mirror of
https://github.com/penpot/penpot.git
synced 2025-12-12 06:24:17 +01:00
Merge branch 'main' into staging
This commit is contained in:
@@ -1547,14 +1547,10 @@
|
||||
(update component :path #(d/nilv % "")))]
|
||||
(d/update-when data :components d/update-vals update-component)))
|
||||
|
||||
(defmethod migrate-data "0014-fix-tokens-lib-duplicate-ids"
|
||||
[data _]
|
||||
(d/update-when data :tokens-lib types.tokens-lib/fix-duplicate-token-set-ids))
|
||||
|
||||
(def ^:private valid-stroke?
|
||||
(sm/lazy-validator cts/schema:stroke))
|
||||
|
||||
(defmethod migrate-data "0015-clear-invalid-strokes-and-fills"
|
||||
(defmethod migrate-data "0013-clear-invalid-strokes-and-fills"
|
||||
[data _]
|
||||
(letfn [(clear-color-image [image]
|
||||
(select-keys image types.color/image-attrs))
|
||||
@@ -1621,6 +1617,10 @@
|
||||
(update :pages-index d/update-vals update-container)
|
||||
(d/update-when :components d/update-vals update-container))))
|
||||
|
||||
(defmethod migrate-data "0014-fix-tokens-lib-duplicate-ids"
|
||||
[data _]
|
||||
(d/update-when data :tokens-lib types.tokens-lib/fix-duplicate-token-set-ids))
|
||||
|
||||
(def available-migrations
|
||||
(into (d/ordered-set)
|
||||
["legacy-2"
|
||||
@@ -1690,5 +1690,5 @@
|
||||
"0011-fix-invalid-text-touched-flags"
|
||||
"0012-fix-position-data"
|
||||
"0013-fix-component-path"
|
||||
"0014-fix-tokens-lib-duplicate-ids"
|
||||
"0015-clear-invalid-strokes-and-fills"]))
|
||||
"0013-clear-invalid-strokes-and-fills"
|
||||
"0014-fix-tokens-lib-duplicate-ids"]))
|
||||
|
||||
@@ -420,7 +420,7 @@
|
||||
:min 0
|
||||
:max 1
|
||||
:compile
|
||||
(fn [{:keys [kind max min] :as props} children _]
|
||||
(fn [{:keys [kind max min ordered] :as props} children _]
|
||||
(let [kind (or (last children) kind)
|
||||
|
||||
pred
|
||||
@@ -456,18 +456,23 @@
|
||||
(fn [value]
|
||||
(every? pred value)))
|
||||
|
||||
empty-set
|
||||
(if ordered
|
||||
(d/ordered-set)
|
||||
#{})
|
||||
|
||||
decode
|
||||
(fn [v]
|
||||
(cond
|
||||
(string? v)
|
||||
(let [v (str/split v #"[\s,]+")]
|
||||
(into #{} xf:filter-word-strings v))
|
||||
(into empty-set xf:filter-word-strings v))
|
||||
|
||||
(set? v)
|
||||
v
|
||||
|
||||
(coll? v)
|
||||
(into #{} v)
|
||||
(into empty-set v)
|
||||
|
||||
:else
|
||||
v))
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
[:version :int]
|
||||
[:features ::cfeat/features]
|
||||
[:migrations {:optional true}
|
||||
[::sm/set :string]]])
|
||||
[::sm/set {:ordered true} :string]]])
|
||||
|
||||
(sm/register! ::data schema:data)
|
||||
(sm/register! ::file schema:file)
|
||||
|
||||
Reference in New Issue
Block a user