mirror of
https://github.com/penpot/penpot.git
synced 2026-03-31 00:29:37 +02:00
🐛 Fix issues on penpot file import and components-v2
This commit is contained in:
committed by
Alejandro Alonso
parent
68c0b0e8a7
commit
8f72faf27d
@@ -268,7 +268,8 @@
|
||||
(binding [pmap/*tracked* (atom {})]
|
||||
(let [data (ctf/migrate-to-components-v2 data)
|
||||
features (conj features "components/v2")
|
||||
modified-at (dt/now)]
|
||||
modified-at (dt/now)
|
||||
features (db/create-array conn "text" features)]
|
||||
(db/update! conn :file
|
||||
{:data (blob/encode data)
|
||||
:modified-at modified-at
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
[app.common.types.component :as ctk]
|
||||
[app.common.types.components-list :as ctkl]
|
||||
[app.common.types.pages-list :as ctpl]
|
||||
[app.common.types.shape :as cts]
|
||||
[app.common.types.shape-tree :as ctst]
|
||||
[app.common.uuid :as uuid]))
|
||||
|
||||
@@ -34,7 +33,7 @@
|
||||
[:path {:optional true} [:maybe :string]]
|
||||
[:modified-at {:optional true} ::sm/inst]
|
||||
[:objects {:optional true}
|
||||
[:map-of {:gen/max 10} ::sm/uuid ::cts/shape]]])
|
||||
[:map-of {:gen/max 10} ::sm/uuid :map]]])
|
||||
|
||||
(def container?
|
||||
(sm/pred-fn ::container))
|
||||
@@ -68,6 +67,7 @@
|
||||
|
||||
(defn get-shape
|
||||
[container shape-id]
|
||||
|
||||
(dm/assert!
|
||||
"expected valid container"
|
||||
(container? container))
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
[:type [:= "paragraph"]]
|
||||
[:key {:optional true} :string]
|
||||
[:fills {:optional true}
|
||||
[:vector {:gen/max 2} ::shape/fill]]
|
||||
[:maybe
|
||||
[:vector {:gen/max 2} ::shape/fill]]]
|
||||
[:font-family {:optional true} :string]
|
||||
[:font-size {:optional true} :string]
|
||||
[:font-style {:optional true} :string]
|
||||
|
||||
Reference in New Issue
Block a user