mirror of
https://github.com/penpot/penpot.git
synced 2025-12-12 06:24:17 +01:00
✨ Add detach method to plugins
This commit is contained in:
@@ -32,6 +32,7 @@
|
|||||||
[app.common.uuid :as uuid]
|
[app.common.uuid :as uuid]
|
||||||
[app.main.data.workspace :as dw]
|
[app.main.data.workspace :as dw]
|
||||||
[app.main.data.workspace.groups :as dwg]
|
[app.main.data.workspace.groups :as dwg]
|
||||||
|
[app.main.data.workspace.libraries :as dwl]
|
||||||
[app.main.data.workspace.selection :as dws]
|
[app.main.data.workspace.selection :as dws]
|
||||||
[app.main.data.workspace.shape-layout :as dwsl]
|
[app.main.data.workspace.shape-layout :as dwsl]
|
||||||
[app.main.data.workspace.shapes :as dwsh]
|
[app.main.data.workspace.shapes :as dwsh]
|
||||||
@@ -441,6 +442,10 @@
|
|||||||
(let [[root component] (u/locate-component objects shape)]
|
(let [[root component] (u/locate-component objects shape)]
|
||||||
(lib-component-proxy $plugin (:component-file root) (:id component))))))
|
(lib-component-proxy $plugin (:component-file root) (:id component))))))
|
||||||
|
|
||||||
|
(detach
|
||||||
|
[_]
|
||||||
|
(st/emit! (dwl/detach-component $id)))
|
||||||
|
|
||||||
(export
|
(export
|
||||||
[self value]
|
[self value]
|
||||||
(let [value (parser/parse-export value)]
|
(let [value (parser/parse-export value)]
|
||||||
|
|||||||
Reference in New Issue
Block a user