⬆️ Update style dictionary to 4.3.3 (#6260)

Co-authored-by: Andrey Fedorov <oran9e.red@gmail.com>
This commit is contained in:
Florian Schrödl 2025-04-10 14:42:24 +02:00 committed by GitHub
parent 744ef1958b
commit 6f2f1b7a76
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 64 additions and 58 deletions

View file

@ -25,7 +25,7 @@
"Initiates the StyleDictionary instance.
Setup transforms from tokens-studio used to parse and resolved token values."
(do
(sd-transforms/registerTransforms sd)
(sd-transforms/register sd)
(.registerFormat sd #js {:name "custom/json"
:format (fn [^js res]
(.-tokens (.-dictionary res)))})
@ -192,9 +192,11 @@
config)
(build-dictionary [_]
(let [config' (clj->js config)]
(let [platform "json"
config' (clj->js config)]
(-> (sd. config')
(.buildAllPlatforms "json")
(.buildAllPlatforms platform)
(p/then #(.getPlatformTokens ^js % platform))
(p/then #(.-allTokens ^js %))))))
(defn resolve-tokens-tree+