0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-20 05:34:23 -05:00

♻ Update only TokensLib to 1.1

This commit is contained in:
Florian Schroedl 2024-11-12 14:03:04 +01:00
parent 3869bcf754
commit 3ff084e77a

View file

@ -866,16 +866,28 @@ When `before-set-name` is nil, move set to bottom")
#?(:clj
(fres/add-handlers!
{:name "penpot/token/v1"
:class Token
:wfn (fn [n w o]
(fres/write-tag! w n 1)
(fres/write-object! w (into {} o)))
:rfn (fn [r]
(let [obj (fres/read-object! r)]
(map->Token obj)))}
{:name "penpot/token-set/v1"
:class TokenSet
:wfn (fn [n w o]
(fres/write-tag! w n 1)
(fres/write-object! w (into {} o)))
:rfn (fn [r]
(let [obj (fres/read-object! r)]
(map->TokenSet obj)))}
{:name "penpot/token-theme/v1"
:class TokenTheme
:wfn (fn [n w o]
(fres/write-tag! w n 1)
(fres/write-object! w (into {} o)))
:rfn (fn [r]
(let [obj (fres/read-object! r)]
(map->TokenTheme obj)))}
@ -888,33 +900,6 @@ When `before-set-name` is nil, move set to bottom")
active-themes (fres/read-object! r)]
(->TokensLib sets themes active-themes)))}
{:name "penpot/token/v1.1"
:class Token
:wfn (fn [n w o]
(fres/write-tag! w n 1)
(fres/write-object! w (into {} o)))
:rfn (fn [r]
(let [obj (fres/read-object! r)]
(map->Token obj)))}
{:name "penpot/token-set/v1.1"
:class TokenSet
:wfn (fn [n w o]
(fres/write-tag! w n 1)
(fres/write-object! w (into {} o)))
:rfn (fn [r]
(let [obj (fres/read-object! r)]
(map->TokenSet obj)))}
{:name "penpot/token-theme/v1.1"
:class TokenTheme
:wfn (fn [n w o]
(fres/write-tag! w n 1)
(fres/write-object! w (into {} o)))
:rfn (fn [r]
(let [obj (fres/read-object! r)]
(map->TokenTheme obj)))}
{:name "penpot/tokens-lib/v1.1"
:class TokensLib
:wfn (fn [n w o]