mirror of
https://github.com/penpot/penpot.git
synced 2025-12-30 01:49:37 -05:00
Compare commits
3 Commits
plugins-in
...
niwinz-sta
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a32450de30 | ||
|
|
b8f4a1b61b | ||
|
|
16ecc89ad1 |
@@ -200,7 +200,8 @@
|
||||
"layout/grid"
|
||||
"components/v2"
|
||||
"plugins/runtime"
|
||||
"design-tokens/v1"})
|
||||
"design-tokens/v1"
|
||||
"variants/v1"})
|
||||
|
||||
;; WORKAROUND: the same as features
|
||||
(def available-migrations
|
||||
|
||||
@@ -320,14 +320,18 @@
|
||||
[:shapes {:optional true} [:vector {:gen/max 3} ::sm/any]]
|
||||
[:path {:optional true} :string]
|
||||
[:main-instance-id ::sm/uuid]
|
||||
[:main-instance-page ::sm/uuid]]]
|
||||
[:main-instance-page ::sm/uuid]
|
||||
;; Only used by external processes (like Penpot SDK)
|
||||
[:variant-id {:optional true} ::sm/uuid]
|
||||
[:variant-properties {:optional true} [:vector ctv/schema:variant-property]]]]
|
||||
|
||||
[:mod-component
|
||||
[:map {:title "ModCompoenentChange"}
|
||||
[:type [:= :mod-component]]
|
||||
[:id ::sm/uuid]
|
||||
[:shapes {:optional true} [:vector {:gen/max 3} ::sm/any]]
|
||||
[:name {:optional true} :string]
|
||||
[:path {:optional true} :string]
|
||||
[:shapes {:optional true} [:vector {:gen/max 3} ::sm/any]]
|
||||
[:variant-id {:optional true} ::sm/uuid]
|
||||
[:variant-properties {:optional true} [:vector ctv/schema:variant-property]]]]
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
(defn add-component
|
||||
[fdata {:keys [id name path main-instance-id main-instance-page annotation variant-id variant-properties]}]
|
||||
(let [fdata (update fdata :components assoc id (touch {:id id :name name :path path}))]
|
||||
(let [fdata (update fdata :components assoc id (touch {:id id :name name :path path}))]
|
||||
(cond-> (update-in fdata [:components id] assoc :main-instance-id main-instance-id :main-instance-page main-instance-page)
|
||||
annotation (update-in [:components id] assoc :annotation annotation)
|
||||
variant-id (update-in [:components id] assoc :variant-id variant-id)
|
||||
@@ -83,9 +83,11 @@
|
||||
|
||||
(nil? variant-properties)
|
||||
(dissoc :variant-properties))
|
||||
|
||||
;; The set of properties that doesn't mark a component as touched
|
||||
diff (set/difference
|
||||
(ctk/diff-components component new-comp)
|
||||
#{:annotation :modified-at :variant-id :variant-properties})] ;; The set of properties that doesn't mark a component as touched
|
||||
#{:annotation :modified-at :variant-id :variant-properties})]
|
||||
|
||||
(if (empty? diff)
|
||||
new-comp
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
:dev
|
||||
{:extra-paths ["dev"]
|
||||
:extra-deps
|
||||
{thheller/shadow-cljs {:mvn/version "3.1.7"}
|
||||
{thheller/shadow-cljs {:mvn/version "3.2.1"}
|
||||
com.bhauman/rebel-readline {:mvn/version "RELEASE"}
|
||||
org.clojure/tools.namespace {:mvn/version "RELEASE"}
|
||||
criterium/criterium {:mvn/version "RELEASE"}}}
|
||||
|
||||
Reference in New Issue
Block a user