@agent-scope/tokens 1.9.0 → 1.11.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/dist/index.d.cts CHANGED
@@ -296,7 +296,7 @@ declare class ComplianceEngine {
296
296
  */
297
297
 
298
298
  /** Supported output format identifiers. */
299
- type ExportFormat = "css" | "ts" | "scss" | "tailwind" | "figma";
299
+ type ExportFormat = "css" | "ts" | "scss" | "tailwind" | "flat-json" | "figma";
300
300
  /** Options shared across all export formats. */
301
301
  interface ExportOptions {
302
302
  /**
package/dist/index.d.ts CHANGED
@@ -296,7 +296,7 @@ declare class ComplianceEngine {
296
296
  */
297
297
 
298
298
  /** Supported output format identifiers. */
299
- type ExportFormat = "css" | "ts" | "scss" | "tailwind" | "figma";
299
+ type ExportFormat = "css" | "ts" | "scss" | "tailwind" | "flat-json" | "figma";
300
300
  /** Options shared across all export formats. */
301
301
  interface ExportOptions {
302
302
  /**
package/dist/index.js CHANGED
@@ -7681,6 +7681,13 @@ function exportTailwind(tokens, options) {
7681
7681
  module.exports = ${JSON.stringify(output, null, 2)};
7682
7682
  `;
7683
7683
  }
7684
+ function exportFlatJson(tokens, _options) {
7685
+ const result = {};
7686
+ for (const token of tokens) {
7687
+ result[token.path] = token.resolvedValue;
7688
+ }
7689
+ return JSON.stringify(result, null, 2);
7690
+ }
7684
7691
  function exportFigma(tokens, options) {
7685
7692
  const root = {};
7686
7693
  for (const token of tokens) {
@@ -7738,6 +7745,8 @@ function exportTokens(tokens, format, options = {}) {
7738
7745
  return exportScss(tokens, options);
7739
7746
  case "tailwind":
7740
7747
  return exportTailwind(tokens, options);
7748
+ case "flat-json":
7749
+ return exportFlatJson(tokens);
7741
7750
  case "figma":
7742
7751
  return exportFigma(tokens, options);
7743
7752
  default: {