@idaho6/design 0.1.2 → 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 CHANGED
@@ -1,3 +1,13 @@
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
+
1
11
  ## 0.1.2 (2026-05-24)
2
12
 
3
13
  This was a version bump only for @idaho6/design to align it with other projects, there were no code changes.
@@ -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/nested"
64854
+ format: "json/figma-dtcg"
64832
64855
  }
64833
64856
  ]
64834
64857
  }