Merge pull request #6518 from penpot/niwinz-staging-tokenslib-json-encoding

🐛 Add json encoding for tokenslib type
This commit is contained in:
Alejandro Alonso 2025-05-21 10:17:37 +02:00 committed by GitHub
commit 0748ef7267
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View file

@ -53,6 +53,7 @@
- Fix share button being displayed with no permissions [Taiga #11086](https://tree.taiga.io/project/penpot/issue/11086)
- Fix inline styles in code tab [Taiga Issue #7583](https://tree.taiga.io/project/penpot/issue/7583)
- Fix exception on returning openapi.json
- Fix json encoding of TokensLib [Taiga #10994](https://tree.taiga.io/project/penpot/issue/10994)
## 2.6.2

View file

@ -7,6 +7,7 @@
(ns app.common.types.tokens-lib
(:require
#?(:clj [app.common.fressian :as fres])
#?(:clj [clojure.data.json :as json])
[app.common.data :as d]
[app.common.data.macros :as dm]
[app.common.files.helpers :as cfh]
@ -911,6 +912,12 @@ Will return a value that matches this schema:
"themes" (clj->js themes)
"active-themes" (clj->js active-themes)))])
#?@(:clj
[json/JSONWriter
(-write [this writter options] (json/-write (encode-dtcg this) writter options))])
ITokenSets
(add-set [_ token-set]
(let [path (get-token-set-prefixed-path token-set)