mirror of
https://github.com/penpot/penpot.git
synced 2025-06-06 07:31:36 +02:00
🎉 Add support typography management via library
This commit is contained in:
parent
fffacf3552
commit
3252088494
3 changed files with 34 additions and 9 deletions
|
@ -91,6 +91,13 @@
|
|||
(rx/filter #(d/not-empty? (second %)))
|
||||
(rx/map e/parse-library-color))
|
||||
|
||||
typographies-stream
|
||||
(->> files-stream
|
||||
(rx/flat-map vals)
|
||||
(rx/map #(vector (:id %) (get-in % [:data :typographies])))
|
||||
(rx/filter #(d/not-empty? (second %)))
|
||||
(rx/map e/parse-library-typographies))
|
||||
|
||||
media-stream
|
||||
(->> files-stream
|
||||
(rx/flat-map vals)
|
||||
|
@ -120,7 +127,8 @@
|
|||
pages-stream
|
||||
components-stream
|
||||
media-stream
|
||||
colors-stream)
|
||||
colors-stream
|
||||
typographies-stream)
|
||||
(rx/reduce conj [])
|
||||
(rx/with-latest-from files-stream)
|
||||
(rx/flat-map (fn [[data _]]
|
||||
|
@ -209,6 +217,14 @@
|
|||
(set! file (fb/delete-library-media file (parse-data data)))
|
||||
(str (:last-id file)))
|
||||
|
||||
(addLibraryTypography [_ data]
|
||||
(set! file (fb/add-library-typography file (parse-data data)))
|
||||
(str (:last-id file)))
|
||||
|
||||
(deleteLibraryTypography [_ data]
|
||||
(set! file (fb/delete-library-typography file (parse-data data)))
|
||||
(str (:last-id file)))
|
||||
|
||||
(startComponent [_ data]
|
||||
(set! file (fb/start-component file (parse-data data)))
|
||||
(str (:current-component-id file)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue