@idaho6/design 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/createConfig.js +24 -1
- package/dist/figma/tokens.json +522 -174
- package/package.json +7 -1
- package/tokens/primitives/border.json +11 -11
- package/tokens/primitives/color.json +80 -80
- package/tokens/primitives/spacing.json +13 -13
- package/tokens/primitives/typography.json +29 -29
- package/tokens/semantic/animation.json +3 -1
- package/tokens/semantic/border.json +21 -7
- package/tokens/semantic/color.json +36 -12
- package/tokens/semantic/opacity.json +3 -1
- package/tokens/semantic/spacing.json +15 -5
- package/tokens/semantic/typography.json +45 -15
- package/project.json +0 -34
- package/spec/conformance.yaml +0 -28
- package/src/buildTokens.mjs +0 -8
- package/src/createConfig.d.mts +0 -4
- package/src/createConfig.mjs +0 -39
- package/src/extractPrimitives.mjs +0 -189
- package/src/index.ts +0 -13
- package/src/lib/design.ts +0 -1
- package/tsconfig.json +0 -10
- package/tsconfig.lib.json +0 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## 0.2.0 (2026-05-25)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **@idaho6/design:** migrate tokens to DTCG format, add figma output, expose tokens in package ([f140929](https://github.com/wijohnst/id6-mono/commit/f140929))
|
|
6
|
+
|
|
7
|
+
### ❤️ Thank You
|
|
8
|
+
|
|
9
|
+
- wijohnst @wijohnst
|
|
10
|
+
|
|
11
|
+
## 0.1.2 (2026-05-24)
|
|
12
|
+
|
|
13
|
+
This was a version bump only for @idaho6/design to align it with other projects, there were no code changes.
|
|
14
|
+
|
|
15
|
+
## 0.1.1 (2026-05-24)
|
|
16
|
+
|
|
17
|
+
This was a version bump only for @idaho6/design to align it with other projects, there were no code changes.
|
|
18
|
+
|
|
1
19
|
## 0.1.0 (2026-05-24)
|
|
2
20
|
|
|
3
21
|
### 🚀 Features
|
package/dist/createConfig.js
CHANGED
|
@@ -64801,12 +64801,35 @@ ${verbosityInfo}`;
|
|
|
64801
64801
|
};
|
|
64802
64802
|
|
|
64803
64803
|
// src/createConfig.mjs
|
|
64804
|
+
function buildDTCGTree(allTokens) {
|
|
64805
|
+
const tree = {};
|
|
64806
|
+
for (const token of allTokens) {
|
|
64807
|
+
let node = tree;
|
|
64808
|
+
for (let i = 0; i < token.path.length - 1; i++) {
|
|
64809
|
+
const key = token.path[i];
|
|
64810
|
+
node[key] = node[key] || {};
|
|
64811
|
+
node = node[key];
|
|
64812
|
+
}
|
|
64813
|
+
const leaf = token.path[token.path.length - 1];
|
|
64814
|
+
node[leaf] = { $value: token.$value ?? token.value };
|
|
64815
|
+
if (token.$type) node[leaf].$type = token.$type;
|
|
64816
|
+
}
|
|
64817
|
+
return tree;
|
|
64818
|
+
}
|
|
64819
|
+
StyleDictionary.registerFormat({
|
|
64820
|
+
name: "json/figma-dtcg",
|
|
64821
|
+
format: ({ dictionary }) => {
|
|
64822
|
+
const tree = buildDTCGTree(dictionary.allTokens);
|
|
64823
|
+
return JSON.stringify(tree, null, 2) + "\n";
|
|
64824
|
+
}
|
|
64825
|
+
});
|
|
64804
64826
|
async function build({ source, buildPath }) {
|
|
64805
64827
|
const sd2 = new StyleDictionary({
|
|
64806
64828
|
log: {
|
|
64807
64829
|
warnings: "warn",
|
|
64808
64830
|
verbosity: "default"
|
|
64809
64831
|
},
|
|
64832
|
+
usesDtcg: true,
|
|
64810
64833
|
source,
|
|
64811
64834
|
platforms: {
|
|
64812
64835
|
css: {
|
|
@@ -64828,7 +64851,7 @@ async function build({ source, buildPath }) {
|
|
|
64828
64851
|
files: [
|
|
64829
64852
|
{
|
|
64830
64853
|
destination: "tokens.json",
|
|
64831
|
-
format: "json/
|
|
64854
|
+
format: "json/figma-dtcg"
|
|
64832
64855
|
}
|
|
64833
64856
|
]
|
|
64834
64857
|
}
|