mirror of
https://github.com/penpot/penpot.git
synced 2025-05-11 07:16:38 +02:00
WIP: add pages list sidebar to workspace.
This commit is contained in:
parent
3a387d8820
commit
7ceca619e0
2 changed files with 69 additions and 9 deletions
|
@ -42,16 +42,16 @@
|
|||
(str ":rum/cursored-" (:rum/id state)))
|
||||
|
||||
(def ^:private
|
||||
deref-map-xform
|
||||
(map (fn [[k v]] [k (if (satisfies? IDeref v) @v v)])))
|
||||
deref-xform
|
||||
(map (fn [x] (if (satisfies? IDeref x) @x x))))
|
||||
|
||||
(defn- deref-props
|
||||
[data]
|
||||
(into {} deref-map-xform data))
|
||||
(into [] deref-xform data))
|
||||
|
||||
(defn- cursored-did-mount
|
||||
[state]
|
||||
(doseq [[k v] (:rum/props state)
|
||||
(doseq [v (:rum/props state)
|
||||
:when (satisfies? IWatchable v)]
|
||||
(add-watch v (cursored-key state)
|
||||
(fn [_ _ _ _]
|
||||
|
@ -126,6 +126,10 @@
|
|||
(fn [s f]
|
||||
(throw (ex-info "Not implemented" {})))))
|
||||
|
||||
(defn getter
|
||||
[f]
|
||||
(l/lens f #(throw (ex-info "Not implemented" {}))))
|
||||
|
||||
(defn derive
|
||||
[a path]
|
||||
(l/focus-atom (l/in path) a))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue