0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-06 12:01:19 -05:00

🐛 Fix issues on penpot file import and components-v2

This commit is contained in:
Andrey Antukh 2023-05-23 16:04:47 +02:00 committed by Alejandro Alonso
parent 68c0b0e8a7
commit 8f72faf27d
3 changed files with 6 additions and 4 deletions

View file

@ -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

View file

@ -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))

View file

@ -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]