🐛 Fix token file import of Figma generated file (#5591)

* 🐛 Fix token sets selection representation in exported theme

* 🐛 Fix the loss of token set order

* 🐛 Change data shape according to internal representaion

* 🐛 Persist sets order on import according to metadata

* 🐛 Add fallback for nil values

* 🐛 Fix test assertions accoding to the exported json format

* 🐛 Make `:is-source` optional

* ♻️ Fix test description

* ♻️ Remove outdated comment
This commit is contained in:
Andrei Fëdorov
2025-01-16 12:38:03 +01:00
committed by GitHub
parent cf82e42125
commit 5793c526c0
4 changed files with 51 additions and 27 deletions

View File

@@ -802,7 +802,7 @@
"description": null,
"is-source": false,
"modified-at": "2024-01-01T00:00:00.000+00:00",
"sets": [ "light" ]
"selectedTokenSets": {"light": "enabled"}
} ],
"$metadata": {
"tokenSetOrder": ["core", "light", "dark", "theme"]

View File

@@ -1163,7 +1163,8 @@
"is-source" false
"modified-at" now
"name" "theme-1"
"sets" #{"core"}}]
"selectedTokenSets" {"core" "enabled"}}]
"$metadata" {"tokenSetOrder" ["core"]}
"core"
{"colors" {"red" {"600" {"$value" "#e53e3e"
"$type" "color"}}}