@digdir/designsystemet 1.0.5 → 1.0.7

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.
Files changed (49) hide show
  1. package/LICENSE +7 -0
  2. package/configs/digdir.config.json +59 -0
  3. package/configs/test-tokens.config.json +45 -0
  4. package/dist/bin/designsystemet.js +82 -88
  5. package/dist/config.schema.json +38 -27
  6. package/dist/src/colors/index.js +32 -0
  7. package/dist/src/colors/theme.js +1 -0
  8. package/dist/src/colors/utils.d.ts +13 -0
  9. package/dist/src/colors/utils.d.ts.map +1 -1
  10. package/dist/src/colors/utils.js +32 -0
  11. package/dist/src/config.d.ts +24 -176
  12. package/dist/src/config.d.ts.map +1 -1
  13. package/dist/src/config.js +23 -32
  14. package/dist/src/index.js +85 -50
  15. package/dist/src/migrations/beta-to-v1.js +2 -2
  16. package/dist/src/migrations/codemods/css/run.js +2 -2
  17. package/dist/src/migrations/color-rename-next49.js +2 -2
  18. package/dist/src/migrations/index.js +2 -2
  19. package/dist/src/scripts/createJsonSchema.js +33 -1292
  20. package/dist/src/scripts/update-design-tokens.js +4 -4
  21. package/dist/src/scripts/update-template.js +7 -7
  22. package/dist/src/tokens/build.js +56 -53
  23. package/dist/src/tokens/create/generators/$designsystemet.js +27 -25
  24. package/dist/src/tokens/create/generators/$themes.js +10 -10
  25. package/dist/src/tokens/create/generators/color.js +1 -0
  26. package/dist/src/tokens/create/write.js +39 -37
  27. package/dist/src/tokens/create.js +1 -0
  28. package/dist/src/tokens/format.js +54 -50
  29. package/dist/src/tokens/index.js +54 -50
  30. package/dist/src/tokens/process/configs/color.js +26 -22
  31. package/dist/src/tokens/process/configs/semantic.js +16 -12
  32. package/dist/src/tokens/process/configs/shared.js +16 -12
  33. package/dist/src/tokens/process/configs/storefront.js +16 -12
  34. package/dist/src/tokens/process/configs/typography.js +16 -12
  35. package/dist/src/tokens/process/configs.js +26 -22
  36. package/dist/src/tokens/process/formats/css/color.js +16 -12
  37. package/dist/src/tokens/process/formats/css/semantic.js +16 -12
  38. package/dist/src/tokens/process/formats/css.js +16 -12
  39. package/dist/src/tokens/process/formats/js-tokens.js +16 -12
  40. package/dist/src/tokens/process/platform.js +26 -22
  41. package/dist/src/tokens/process/theme.d.ts.map +1 -1
  42. package/dist/src/tokens/process/theme.js +27 -28
  43. package/dist/src/tokens/process/transformers.js +16 -12
  44. package/dist/src/tokens/process/utils/getMultidimensionalThemes.js +26 -22
  45. package/dist/src/tokens/utils.d.ts +2 -2
  46. package/dist/src/tokens/utils.d.ts.map +1 -1
  47. package/dist/src/tokens/utils.js +16 -12
  48. package/dist/src/utils.js +1 -1
  49. package/package.json +35 -33
@@ -994,6 +994,7 @@ import * as R4 from "ramda";
994
994
 
995
995
  // src/colors/utils.ts
996
996
  import chroma from "chroma-js";
997
+ import Colorjs from "colorjs.io";
997
998
  import { Hsluv } from "hsluv";
998
999
  var getLuminanceFromLightness = (lightness) => {
999
1000
  const conv = new Hsluv();
@@ -2089,14 +2090,14 @@ var createTokens = async (opts) => {
2089
2090
  // src/tokens/format.ts
2090
2091
  import * as R20 from "ramda";
2091
2092
 
2092
- // ../../node_modules/@tokens-studio/types/dist/constants/BoxShadowTypes.js
2093
+ // ../../node_modules/.pnpm/@tokens-studio+types@0.5.2/node_modules/@tokens-studio/types/dist/constants/BoxShadowTypes.js
2093
2094
  var BoxShadowTypes;
2094
2095
  (function(BoxShadowTypes2) {
2095
2096
  BoxShadowTypes2["DROP_SHADOW"] = "dropShadow";
2096
2097
  BoxShadowTypes2["INNER_SHADOW"] = "innerShadow";
2097
2098
  })(BoxShadowTypes || (BoxShadowTypes = {}));
2098
2099
 
2099
- // ../../node_modules/@tokens-studio/types/dist/constants/ColorModifierTypes.js
2100
+ // ../../node_modules/.pnpm/@tokens-studio+types@0.5.2/node_modules/@tokens-studio/types/dist/constants/ColorModifierTypes.js
2100
2101
  var ColorModifierTypes;
2101
2102
  (function(ColorModifierTypes2) {
2102
2103
  ColorModifierTypes2["LIGHTEN"] = "lighten";
@@ -2105,7 +2106,7 @@ var ColorModifierTypes;
2105
2106
  ColorModifierTypes2["ALPHA"] = "alpha";
2106
2107
  })(ColorModifierTypes || (ColorModifierTypes = {}));
2107
2108
 
2108
- // ../../node_modules/@tokens-studio/types/dist/constants/ColorSpaceTypes.js
2109
+ // ../../node_modules/.pnpm/@tokens-studio+types@0.5.2/node_modules/@tokens-studio/types/dist/constants/ColorSpaceTypes.js
2109
2110
  var ColorSpaceTypes;
2110
2111
  (function(ColorSpaceTypes2) {
2111
2112
  ColorSpaceTypes2["LCH"] = "lch";
@@ -2114,7 +2115,7 @@ var ColorSpaceTypes;
2114
2115
  ColorSpaceTypes2["HSL"] = "hsl";
2115
2116
  })(ColorSpaceTypes || (ColorSpaceTypes = {}));
2116
2117
 
2117
- // ../../node_modules/@tokens-studio/types/dist/constants/Properties.js
2118
+ // ../../node_modules/.pnpm/@tokens-studio+types@0.5.2/node_modules/@tokens-studio/types/dist/constants/Properties.js
2118
2119
  var Properties;
2119
2120
  (function(Properties2) {
2120
2121
  Properties2["sizing"] = "sizing";
@@ -2166,7 +2167,7 @@ var Properties;
2166
2167
  Properties2["description"] = "description";
2167
2168
  })(Properties || (Properties = {}));
2168
2169
 
2169
- // ../../node_modules/@tokens-studio/types/dist/constants/TokenSetStatus.js
2170
+ // ../../node_modules/.pnpm/@tokens-studio+types@0.5.2/node_modules/@tokens-studio/types/dist/constants/TokenSetStatus.js
2170
2171
  var TokenSetStatus;
2171
2172
  (function(TokenSetStatus2) {
2172
2173
  TokenSetStatus2["DISABLED"] = "disabled";
@@ -2174,7 +2175,7 @@ var TokenSetStatus;
2174
2175
  TokenSetStatus2["ENABLED"] = "enabled";
2175
2176
  })(TokenSetStatus || (TokenSetStatus = {}));
2176
2177
 
2177
- // ../../node_modules/@tokens-studio/types/dist/constants/TokenTypes.js
2178
+ // ../../node_modules/.pnpm/@tokens-studio+types@0.5.2/node_modules/@tokens-studio/types/dist/constants/TokenTypes.js
2178
2179
  var TokenTypes;
2179
2180
  (function(TokenTypes2) {
2180
2181
  TokenTypes2["OTHER"] = "other";
@@ -2205,7 +2206,7 @@ var TokenTypes;
2205
2206
  TokenTypes2["NUMBER"] = "number";
2206
2207
  })(TokenTypes || (TokenTypes = {}));
2207
2208
 
2208
- // ../../node_modules/@tokens-studio/types/dist/constants/BorderValues.js
2209
+ // ../../node_modules/.pnpm/@tokens-studio+types@0.5.2/node_modules/@tokens-studio/types/dist/constants/BorderValues.js
2209
2210
  var BorderValues;
2210
2211
  (function(BorderValues2) {
2211
2212
  BorderValues2["BORDER_COLOR"] = "color";
@@ -2213,7 +2214,7 @@ var BorderValues;
2213
2214
  BorderValues2["BORDER_STYLE"] = "style";
2214
2215
  })(BorderValues || (BorderValues = {}));
2215
2216
 
2216
- // ../../node_modules/@tokens-studio/types/dist/constants/StrokeStyleValues.js
2217
+ // ../../node_modules/.pnpm/@tokens-studio+types@0.5.2/node_modules/@tokens-studio/types/dist/constants/StrokeStyleValues.js
2217
2218
  var StrokeStyleValues;
2218
2219
  (function(StrokeStyleValues2) {
2219
2220
  StrokeStyleValues2["SOLID"] = "solid";
@@ -2226,7 +2227,7 @@ var StrokeStyleValues;
2226
2227
  StrokeStyleValues2["INSET"] = "inset";
2227
2228
  })(StrokeStyleValues || (StrokeStyleValues = {}));
2228
2229
 
2229
- // ../../node_modules/@tokens-studio/types/dist/constants/BoxShadowValues.js
2230
+ // ../../node_modules/.pnpm/@tokens-studio+types@0.5.2/node_modules/@tokens-studio/types/dist/constants/BoxShadowValues.js
2230
2231
  var BoxShadowValues;
2231
2232
  (function(BoxShadowValues2) {
2232
2233
  BoxShadowValues2["TYPE"] = "type";
@@ -2238,7 +2239,7 @@ var BoxShadowValues;
2238
2239
  BoxShadowValues2["BLEND_MODE"] = "blendMode";
2239
2240
  })(BoxShadowValues || (BoxShadowValues = {}));
2240
2241
 
2241
- // ../../node_modules/@tokens-studio/types/dist/constants/TypographyValues.js
2242
+ // ../../node_modules/.pnpm/@tokens-studio+types@0.5.2/node_modules/@tokens-studio/types/dist/constants/TypographyValues.js
2242
2243
  var TypographyValues;
2243
2244
  (function(TypographyValues2) {
2244
2245
  TypographyValues2["FONT_FAMILY"] = "fontFamily";
@@ -2442,20 +2443,24 @@ var mapToLowerCase = R7.map(R7.toLower);
2442
2443
  var hasAnyTruth = R7.any(R7.equals(true));
2443
2444
  var getType = (token) => (token.$type ?? token.type) || "";
2444
2445
  var getValue = (token) => token.$value ?? token.value;
2445
- var typeEquals = R7.curry((types, token) => {
2446
- if (R7.isNil(token)) {
2447
- return false;
2446
+ var typeEquals = R7.curry(
2447
+ (types, token) => {
2448
+ if (R7.isNil(token)) {
2449
+ return false;
2450
+ }
2451
+ return R7.includes(R7.toLower(getType(token)), R7.map(R7.toLower, Array.isArray(types) ? types : [types]));
2448
2452
  }
2449
- return R7.includes(R7.toLower(getType(token)), R7.map(R7.toLower, Array.isArray(types) ? types : [types]));
2450
- });
2451
- var pathStartsWithOneOf = R7.curry((paths, token) => {
2452
- if (R7.isNil(token)) {
2453
- return false;
2453
+ );
2454
+ var pathStartsWithOneOf = R7.curry(
2455
+ (paths, token) => {
2456
+ if (R7.isNil(token)) {
2457
+ return false;
2458
+ }
2459
+ const tokenPath = mapToLowerCase(token.path);
2460
+ const matchPathsStartingWith = R7.map((path) => R7.startsWith([path], tokenPath), mapToLowerCase(paths));
2461
+ return hasAnyTruth(matchPathsStartingWith);
2454
2462
  }
2455
- const tokenPath = mapToLowerCase(token.path);
2456
- const matchPathsStartingWith = R7.map((path) => R7.startsWith([path], tokenPath), mapToLowerCase(paths));
2457
- return hasAnyTruth(matchPathsStartingWith);
2458
- });
2463
+ );
2459
2464
  function isSemanticToken(token) {
2460
2465
  return token.filePath.includes("semantic/");
2461
2466
  }
@@ -3351,11 +3356,11 @@ import chalk3 from "chalk";
3351
3356
  // package.json
3352
3357
  var package_default = {
3353
3358
  name: "@digdir/designsystemet",
3354
- version: "1.0.5",
3359
+ version: "1.0.7",
3355
3360
  description: "CLI for Designsystemet",
3356
3361
  author: "Designsystemet team",
3357
3362
  engines: {
3358
- node: ">=22.14.0"
3363
+ node: ">=22.16.0"
3359
3364
  },
3360
3365
  repository: {
3361
3366
  type: "git",
@@ -3366,7 +3371,8 @@ var package_default = {
3366
3371
  type: "module",
3367
3372
  main: "./dist/src/index.js",
3368
3373
  files: [
3369
- "./dist/**"
3374
+ "./dist/**",
3375
+ "./configs/**"
3370
3376
  ],
3371
3377
  bin: "dist/bin/designsystemet.js",
3372
3378
  exports: {
@@ -3385,57 +3391,58 @@ var package_default = {
3385
3391
  },
3386
3392
  scripts: {
3387
3393
  designsystemet: "tsx ./bin/designsystemet.ts",
3388
- "build:tokens": "yarn designsystemet tokens build -p -t ../../design-tokens -o ../../packages/theme/brand --clean",
3389
- "build:tokens:debug": "tsx --inspect-brk ./bin/designsystemet.ts tokens build -p -t ../../design-tokens -o ../../packages/theme/brand --clean",
3390
- build: "tsup && yarn build:types && yarn build:json-schema",
3394
+ "build:tokens": "pnpm run designsystemet tokens build -p -t ../../internal/design-tokens -o ../../packages/theme/brand --clean",
3395
+ "build:tokens:debug": "tsx --inspect-brk ./bin/designsystemet.ts tokens build -p -t ../../internal/design-tokens -o ../../packages/theme/brand --clean",
3396
+ build: "tsup && pnpm build:types && pnpm build:json-schema",
3391
3397
  "build:types": "tsc --emitDeclarationOnly --declaration",
3392
3398
  "build:json-schema": "tsx ./src/scripts/createJsonSchema.ts",
3393
3399
  types: "tsc --noEmit",
3394
- "test:tokens-create-options": "yarn designsystemet tokens create -m dominant:#007682 -n #003333 -b 99 -o ./test-tokens/options --theme options --clean",
3395
- "test:tokens-create-config": "yarn designsystemet tokens create --config ./test/test-tokens.config.json",
3396
- "test:tokens-build": "yarn designsystemet tokens build -t ./test-tokens/options -o ./test-tokens/options-build --clean",
3397
- "test:tokens-build-config": "yarn designsystemet tokens build -t ./test-tokens/config -o ./test-tokens/config-build --clean",
3398
- "test:tokens-create-and-build-options": "yarn test:tokens-create-options && yarn test:tokens-build",
3399
- "test:tokens-create-and-build-config": "yarn test:tokens-create-config && yarn test:tokens-build-config",
3400
- test: "yarn test:tokens-create-and-build-options && yarn test:tokens-create-and-build-config",
3401
- "internal:tokens-create": "yarn designsystemet tokens create --config ./internal.config.json",
3400
+ "test:tokens-create-options": 'pnpm run designsystemet tokens create -m dominant:"#007682" -n "#003333" -b 99 -o ./temp/options/design-tokens --theme options --clean',
3401
+ "test:tokens-create-config": "pnpm run designsystemet tokens create --config ./configs/test-tokens.config.json",
3402
+ "test:tokens-build": "pnpm run designsystemet tokens build -t ./temp/options/design-tokens -o ./temp/options/build --clean",
3403
+ "test:tokens-build-config": "pnpm run designsystemet tokens build -t ./temp/config/design-tokens -o ./temp/config/build --clean",
3404
+ "test:tokens-create-and-build-options": "pnpm test:tokens-create-options && pnpm test:tokens-build",
3405
+ "test:tokens-create-and-build-config": "pnpm test:tokens-create-config && pnpm test:tokens-build-config",
3406
+ test: "pnpm test:tokens-create-and-build-options && pnpm test:tokens-create-and-build-config",
3407
+ "digdir:tokens-create": "pnpm run designsystemet tokens create --config ./configs/digdir.config.json",
3402
3408
  "update:template": "tsx ./src/scripts/update-template.ts",
3403
- "update:design-tokens": "yarn internal:tokens-create && tsx ./src/scripts/update-design-tokens.ts",
3404
- verify: "yarn test && yarn update:template && yarn update:design-tokens"
3409
+ "update:design-tokens": "pnpm digdir:tokens-create && tsx ./src/scripts/update-design-tokens.ts",
3410
+ verify: "pnpm test && pnpm update:template && pnpm update:design-tokens"
3405
3411
  },
3406
3412
  dependencies: {
3407
3413
  "@commander-js/extra-typings": "^13.1.0",
3408
- "@tokens-studio/sd-transforms": "1.2.12",
3414
+ "@tokens-studio/sd-transforms": "1.3.0",
3409
3415
  "apca-w3": "^0.1.9",
3410
3416
  chalk: "^5.4.1",
3411
3417
  "change-case": "^5.4.4",
3412
3418
  "chroma-js": "^3.1.2",
3419
+ "colorjs.io": "^0.6.0-alpha.1",
3413
3420
  commander: "^13.1.0",
3414
3421
  "fast-glob": "^3.3.3",
3415
3422
  hsluv: "^1.0.1",
3416
3423
  "object-hash": "^3.0.0",
3417
3424
  postcss: "^8.5.3",
3418
3425
  ramda: "^0.30.1",
3419
- "style-dictionary": "^4.3.3",
3420
- zod: "^3.24.2",
3421
- "zod-validation-error": "^3.4.0"
3426
+ "style-dictionary": "^4.4.0",
3427
+ zod: "^3.25.30",
3428
+ "zod-validation-error": "^3.4.1"
3422
3429
  },
3423
3430
  devDependencies: {
3431
+ "@tokens-studio/types": "0.5.2",
3424
3432
  "@types/apca-w3": "^0.1.3",
3425
3433
  "@types/chroma-js": "^3.1.1",
3426
3434
  "@types/fs-extra": "^11.0.4",
3427
3435
  "@types/glob": "^8.1.0",
3428
3436
  "@types/jscodeshift": "^0.12.0",
3429
- "@types/node": "^22.14.0",
3437
+ "@types/node": "^22.15.21",
3430
3438
  "@types/object-hash": "^3.0.6",
3431
3439
  "@types/ramda": "^0.30.2",
3432
3440
  "fs-extra": "^11.3.0",
3433
3441
  "ts-toolbelt": "^9.6.0",
3434
3442
  tslib: "^2.8.1",
3435
- tsup: "^8.4.0",
3436
- tsx: "^4.19.3",
3437
- typescript: "^5.8.2",
3438
- "zod-to-json-schema": "^3.24.5"
3443
+ tsup: "^8.5.0",
3444
+ tsx: "^4.19.4",
3445
+ typescript: "^5.8.3"
3439
3446
  }
3440
3447
  };
3441
3448
 
@@ -3489,9 +3496,6 @@ order may change due to nondeterminism.`.trim()
3489
3496
  return sortIndex;
3490
3497
  });
3491
3498
  const header = `@charset "UTF-8";
3492
-
3493
- @layer ds.theme, ds.base, ds.utilities, ds.components;
3494
-
3495
3499
  /*
3496
3500
  ${fileHeader2}
3497
3501
  */
@@ -7,20 +7,24 @@ var mapToLowerCase = R.map(R.toLower);
7
7
  var hasAnyTruth = R.any(R.equals(true));
8
8
  var getType = (token) => (token.$type ?? token.type) || "";
9
9
  var getValue = (token) => token.$value ?? token.value;
10
- var typeEquals = R.curry((types, token) => {
11
- if (R.isNil(token)) {
12
- return false;
10
+ var typeEquals = R.curry(
11
+ (types, token) => {
12
+ if (R.isNil(token)) {
13
+ return false;
14
+ }
15
+ return R.includes(R.toLower(getType(token)), R.map(R.toLower, Array.isArray(types) ? types : [types]));
13
16
  }
14
- return R.includes(R.toLower(getType(token)), R.map(R.toLower, Array.isArray(types) ? types : [types]));
15
- });
16
- var pathStartsWithOneOf = R.curry((paths, token) => {
17
- if (R.isNil(token)) {
18
- return false;
17
+ );
18
+ var pathStartsWithOneOf = R.curry(
19
+ (paths, token) => {
20
+ if (R.isNil(token)) {
21
+ return false;
22
+ }
23
+ const tokenPath = mapToLowerCase(token.path);
24
+ const matchPathsStartingWith = R.map((path) => R.startsWith([path], tokenPath), mapToLowerCase(paths));
25
+ return hasAnyTruth(matchPathsStartingWith);
19
26
  }
20
- const tokenPath = mapToLowerCase(token.path);
21
- const matchPathsStartingWith = R.map((path) => R.startsWith([path], tokenPath), mapToLowerCase(paths));
22
- return hasAnyTruth(matchPathsStartingWith);
23
- });
27
+ );
24
28
  function isSemanticToken(token) {
25
29
  return token.filePath.includes("semantic/");
26
30
  }
@@ -510,14 +514,14 @@ var typographyVariables = ({ theme, typography: typography2 }) => {
510
514
  };
511
515
  };
512
516
 
513
- // ../../node_modules/@tokens-studio/types/dist/constants/BoxShadowTypes.js
517
+ // ../../node_modules/.pnpm/@tokens-studio+types@0.5.2/node_modules/@tokens-studio/types/dist/constants/BoxShadowTypes.js
514
518
  var BoxShadowTypes;
515
519
  (function(BoxShadowTypes2) {
516
520
  BoxShadowTypes2["DROP_SHADOW"] = "dropShadow";
517
521
  BoxShadowTypes2["INNER_SHADOW"] = "innerShadow";
518
522
  })(BoxShadowTypes || (BoxShadowTypes = {}));
519
523
 
520
- // ../../node_modules/@tokens-studio/types/dist/constants/ColorModifierTypes.js
524
+ // ../../node_modules/.pnpm/@tokens-studio+types@0.5.2/node_modules/@tokens-studio/types/dist/constants/ColorModifierTypes.js
521
525
  var ColorModifierTypes;
522
526
  (function(ColorModifierTypes2) {
523
527
  ColorModifierTypes2["LIGHTEN"] = "lighten";
@@ -526,7 +530,7 @@ var ColorModifierTypes;
526
530
  ColorModifierTypes2["ALPHA"] = "alpha";
527
531
  })(ColorModifierTypes || (ColorModifierTypes = {}));
528
532
 
529
- // ../../node_modules/@tokens-studio/types/dist/constants/ColorSpaceTypes.js
533
+ // ../../node_modules/.pnpm/@tokens-studio+types@0.5.2/node_modules/@tokens-studio/types/dist/constants/ColorSpaceTypes.js
530
534
  var ColorSpaceTypes;
531
535
  (function(ColorSpaceTypes2) {
532
536
  ColorSpaceTypes2["LCH"] = "lch";
@@ -535,7 +539,7 @@ var ColorSpaceTypes;
535
539
  ColorSpaceTypes2["HSL"] = "hsl";
536
540
  })(ColorSpaceTypes || (ColorSpaceTypes = {}));
537
541
 
538
- // ../../node_modules/@tokens-studio/types/dist/constants/Properties.js
542
+ // ../../node_modules/.pnpm/@tokens-studio+types@0.5.2/node_modules/@tokens-studio/types/dist/constants/Properties.js
539
543
  var Properties;
540
544
  (function(Properties2) {
541
545
  Properties2["sizing"] = "sizing";
@@ -587,7 +591,7 @@ var Properties;
587
591
  Properties2["description"] = "description";
588
592
  })(Properties || (Properties = {}));
589
593
 
590
- // ../../node_modules/@tokens-studio/types/dist/constants/TokenSetStatus.js
594
+ // ../../node_modules/.pnpm/@tokens-studio+types@0.5.2/node_modules/@tokens-studio/types/dist/constants/TokenSetStatus.js
591
595
  var TokenSetStatus;
592
596
  (function(TokenSetStatus2) {
593
597
  TokenSetStatus2["DISABLED"] = "disabled";
@@ -595,7 +599,7 @@ var TokenSetStatus;
595
599
  TokenSetStatus2["ENABLED"] = "enabled";
596
600
  })(TokenSetStatus || (TokenSetStatus = {}));
597
601
 
598
- // ../../node_modules/@tokens-studio/types/dist/constants/TokenTypes.js
602
+ // ../../node_modules/.pnpm/@tokens-studio+types@0.5.2/node_modules/@tokens-studio/types/dist/constants/TokenTypes.js
599
603
  var TokenTypes;
600
604
  (function(TokenTypes2) {
601
605
  TokenTypes2["OTHER"] = "other";
@@ -626,7 +630,7 @@ var TokenTypes;
626
630
  TokenTypes2["NUMBER"] = "number";
627
631
  })(TokenTypes || (TokenTypes = {}));
628
632
 
629
- // ../../node_modules/@tokens-studio/types/dist/constants/BorderValues.js
633
+ // ../../node_modules/.pnpm/@tokens-studio+types@0.5.2/node_modules/@tokens-studio/types/dist/constants/BorderValues.js
630
634
  var BorderValues;
631
635
  (function(BorderValues2) {
632
636
  BorderValues2["BORDER_COLOR"] = "color";
@@ -634,7 +638,7 @@ var BorderValues;
634
638
  BorderValues2["BORDER_STYLE"] = "style";
635
639
  })(BorderValues || (BorderValues = {}));
636
640
 
637
- // ../../node_modules/@tokens-studio/types/dist/constants/StrokeStyleValues.js
641
+ // ../../node_modules/.pnpm/@tokens-studio+types@0.5.2/node_modules/@tokens-studio/types/dist/constants/StrokeStyleValues.js
638
642
  var StrokeStyleValues;
639
643
  (function(StrokeStyleValues2) {
640
644
  StrokeStyleValues2["SOLID"] = "solid";
@@ -647,7 +651,7 @@ var StrokeStyleValues;
647
651
  StrokeStyleValues2["INSET"] = "inset";
648
652
  })(StrokeStyleValues || (StrokeStyleValues = {}));
649
653
 
650
- // ../../node_modules/@tokens-studio/types/dist/constants/BoxShadowValues.js
654
+ // ../../node_modules/.pnpm/@tokens-studio+types@0.5.2/node_modules/@tokens-studio/types/dist/constants/BoxShadowValues.js
651
655
  var BoxShadowValues;
652
656
  (function(BoxShadowValues2) {
653
657
  BoxShadowValues2["TYPE"] = "type";
@@ -659,7 +663,7 @@ var BoxShadowValues;
659
663
  BoxShadowValues2["BLEND_MODE"] = "blendMode";
660
664
  })(BoxShadowValues || (BoxShadowValues = {}));
661
665
 
662
- // ../../node_modules/@tokens-studio/types/dist/constants/TypographyValues.js
666
+ // ../../node_modules/.pnpm/@tokens-studio+types@0.5.2/node_modules/@tokens-studio/types/dist/constants/TypographyValues.js
663
667
  var TypographyValues;
664
668
  (function(TypographyValues2) {
665
669
  TypographyValues2["FONT_FAMILY"] = "fontFamily";
@@ -8,20 +8,24 @@ var mapToLowerCase = R.map(R.toLower);
8
8
  var hasAnyTruth = R.any(R.equals(true));
9
9
  var getType = (token) => (token.$type ?? token.type) || "";
10
10
  var getValue = (token) => token.$value ?? token.value;
11
- var typeEquals = R.curry((types, token) => {
12
- if (R.isNil(token)) {
13
- return false;
11
+ var typeEquals = R.curry(
12
+ (types, token) => {
13
+ if (R.isNil(token)) {
14
+ return false;
15
+ }
16
+ return R.includes(R.toLower(getType(token)), R.map(R.toLower, Array.isArray(types) ? types : [types]));
14
17
  }
15
- return R.includes(R.toLower(getType(token)), R.map(R.toLower, Array.isArray(types) ? types : [types]));
16
- });
17
- var pathStartsWithOneOf = R.curry((paths, token) => {
18
- if (R.isNil(token)) {
19
- return false;
18
+ );
19
+ var pathStartsWithOneOf = R.curry(
20
+ (paths, token) => {
21
+ if (R.isNil(token)) {
22
+ return false;
23
+ }
24
+ const tokenPath = mapToLowerCase(token.path);
25
+ const matchPathsStartingWith = R.map((path) => R.startsWith([path], tokenPath), mapToLowerCase(paths));
26
+ return hasAnyTruth(matchPathsStartingWith);
20
27
  }
21
- const tokenPath = mapToLowerCase(token.path);
22
- const matchPathsStartingWith = R.map((path) => R.startsWith([path], tokenPath), mapToLowerCase(paths));
23
- return hasAnyTruth(matchPathsStartingWith);
24
- });
28
+ );
25
29
  function isSemanticToken(token) {
26
30
  return token.filePath.includes("semantic/");
27
31
  }
@@ -8,20 +8,24 @@ var mapToLowerCase = R.map(R.toLower);
8
8
  var hasAnyTruth = R.any(R.equals(true));
9
9
  var getType = (token) => (token.$type ?? token.type) || "";
10
10
  var getValue = (token) => token.$value ?? token.value;
11
- var typeEquals = R.curry((types, token) => {
12
- if (R.isNil(token)) {
13
- return false;
11
+ var typeEquals = R.curry(
12
+ (types, token) => {
13
+ if (R.isNil(token)) {
14
+ return false;
15
+ }
16
+ return R.includes(R.toLower(getType(token)), R.map(R.toLower, Array.isArray(types) ? types : [types]));
14
17
  }
15
- return R.includes(R.toLower(getType(token)), R.map(R.toLower, Array.isArray(types) ? types : [types]));
16
- });
17
- var pathStartsWithOneOf = R.curry((paths, token) => {
18
- if (R.isNil(token)) {
19
- return false;
18
+ );
19
+ var pathStartsWithOneOf = R.curry(
20
+ (paths, token) => {
21
+ if (R.isNil(token)) {
22
+ return false;
23
+ }
24
+ const tokenPath = mapToLowerCase(token.path);
25
+ const matchPathsStartingWith = R.map((path) => R.startsWith([path], tokenPath), mapToLowerCase(paths));
26
+ return hasAnyTruth(matchPathsStartingWith);
20
27
  }
21
- const tokenPath = mapToLowerCase(token.path);
22
- const matchPathsStartingWith = R.map((path) => R.startsWith([path], tokenPath), mapToLowerCase(paths));
23
- return hasAnyTruth(matchPathsStartingWith);
24
- });
28
+ );
25
29
 
26
30
  // src/tokens/process/transformers.ts
27
31
  var isPx = R2.test(/\b\d+px\b/g);
@@ -8,20 +8,24 @@ var mapToLowerCase = R.map(R.toLower);
8
8
  var hasAnyTruth = R.any(R.equals(true));
9
9
  var getType = (token) => (token.$type ?? token.type) || "";
10
10
  var getValue = (token) => token.$value ?? token.value;
11
- var typeEquals = R.curry((types, token) => {
12
- if (R.isNil(token)) {
13
- return false;
11
+ var typeEquals = R.curry(
12
+ (types, token) => {
13
+ if (R.isNil(token)) {
14
+ return false;
15
+ }
16
+ return R.includes(R.toLower(getType(token)), R.map(R.toLower, Array.isArray(types) ? types : [types]));
14
17
  }
15
- return R.includes(R.toLower(getType(token)), R.map(R.toLower, Array.isArray(types) ? types : [types]));
16
- });
17
- var pathStartsWithOneOf = R.curry((paths, token) => {
18
- if (R.isNil(token)) {
19
- return false;
18
+ );
19
+ var pathStartsWithOneOf = R.curry(
20
+ (paths, token) => {
21
+ if (R.isNil(token)) {
22
+ return false;
23
+ }
24
+ const tokenPath = mapToLowerCase(token.path);
25
+ const matchPathsStartingWith = R.map((path) => R.startsWith([path], tokenPath), mapToLowerCase(paths));
26
+ return hasAnyTruth(matchPathsStartingWith);
20
27
  }
21
- const tokenPath = mapToLowerCase(token.path);
22
- const matchPathsStartingWith = R.map((path) => R.startsWith([path], tokenPath), mapToLowerCase(paths));
23
- return hasAnyTruth(matchPathsStartingWith);
24
- });
28
+ );
25
29
  function isColorCategoryToken(token, category) {
26
30
  if (!category) {
27
31
  return ["main", "support"].some((c) => isColorCategoryToken(token, c));
@@ -7,20 +7,24 @@ var mapToLowerCase = R.map(R.toLower);
7
7
  var hasAnyTruth = R.any(R.equals(true));
8
8
  var getType = (token) => (token.$type ?? token.type) || "";
9
9
  var getValue = (token) => token.$value ?? token.value;
10
- var typeEquals = R.curry((types, token) => {
11
- if (R.isNil(token)) {
12
- return false;
10
+ var typeEquals = R.curry(
11
+ (types, token) => {
12
+ if (R.isNil(token)) {
13
+ return false;
14
+ }
15
+ return R.includes(R.toLower(getType(token)), R.map(R.toLower, Array.isArray(types) ? types : [types]));
13
16
  }
14
- return R.includes(R.toLower(getType(token)), R.map(R.toLower, Array.isArray(types) ? types : [types]));
15
- });
16
- var pathStartsWithOneOf = R.curry((paths, token) => {
17
- if (R.isNil(token)) {
18
- return false;
17
+ );
18
+ var pathStartsWithOneOf = R.curry(
19
+ (paths, token) => {
20
+ if (R.isNil(token)) {
21
+ return false;
22
+ }
23
+ const tokenPath = mapToLowerCase(token.path);
24
+ const matchPathsStartingWith = R.map((path) => R.startsWith([path], tokenPath), mapToLowerCase(paths));
25
+ return hasAnyTruth(matchPathsStartingWith);
19
26
  }
20
- const tokenPath = mapToLowerCase(token.path);
21
- const matchPathsStartingWith = R.map((path) => R.startsWith([path], tokenPath), mapToLowerCase(paths));
22
- return hasAnyTruth(matchPathsStartingWith);
23
- });
27
+ );
24
28
  function isSemanticToken(token) {
25
29
  return token.filePath.includes("semantic/");
26
30
  }
@@ -9,20 +9,24 @@ var mapToLowerCase = R.map(R.toLower);
9
9
  var hasAnyTruth = R.any(R.equals(true));
10
10
  var getType = (token) => (token.$type ?? token.type) || "";
11
11
  var getValue = (token) => token.$value ?? token.value;
12
- var typeEquals = R.curry((types, token) => {
13
- if (R.isNil(token)) {
14
- return false;
12
+ var typeEquals = R.curry(
13
+ (types, token) => {
14
+ if (R.isNil(token)) {
15
+ return false;
16
+ }
17
+ return R.includes(R.toLower(getType(token)), R.map(R.toLower, Array.isArray(types) ? types : [types]));
15
18
  }
16
- return R.includes(R.toLower(getType(token)), R.map(R.toLower, Array.isArray(types) ? types : [types]));
17
- });
18
- var pathStartsWithOneOf = R.curry((paths, token) => {
19
- if (R.isNil(token)) {
20
- return false;
19
+ );
20
+ var pathStartsWithOneOf = R.curry(
21
+ (paths, token) => {
22
+ if (R.isNil(token)) {
23
+ return false;
24
+ }
25
+ const tokenPath = mapToLowerCase(token.path);
26
+ const matchPathsStartingWith = R.map((path) => R.startsWith([path], tokenPath), mapToLowerCase(paths));
27
+ return hasAnyTruth(matchPathsStartingWith);
21
28
  }
22
- const tokenPath = mapToLowerCase(token.path);
23
- const matchPathsStartingWith = R.map((path) => R.startsWith([path], tokenPath), mapToLowerCase(paths));
24
- return hasAnyTruth(matchPathsStartingWith);
25
- });
29
+ );
26
30
  function isSemanticToken(token) {
27
31
  return token.filePath.includes("semantic/");
28
32
  }
@@ -272,14 +276,14 @@ import chalk2 from "chalk";
272
276
  import * as R6 from "ramda";
273
277
  import StyleDictionary from "style-dictionary";
274
278
 
275
- // ../../node_modules/@tokens-studio/types/dist/constants/BoxShadowTypes.js
279
+ // ../../node_modules/.pnpm/@tokens-studio+types@0.5.2/node_modules/@tokens-studio/types/dist/constants/BoxShadowTypes.js
276
280
  var BoxShadowTypes;
277
281
  (function(BoxShadowTypes2) {
278
282
  BoxShadowTypes2["DROP_SHADOW"] = "dropShadow";
279
283
  BoxShadowTypes2["INNER_SHADOW"] = "innerShadow";
280
284
  })(BoxShadowTypes || (BoxShadowTypes = {}));
281
285
 
282
- // ../../node_modules/@tokens-studio/types/dist/constants/ColorModifierTypes.js
286
+ // ../../node_modules/.pnpm/@tokens-studio+types@0.5.2/node_modules/@tokens-studio/types/dist/constants/ColorModifierTypes.js
283
287
  var ColorModifierTypes;
284
288
  (function(ColorModifierTypes2) {
285
289
  ColorModifierTypes2["LIGHTEN"] = "lighten";
@@ -288,7 +292,7 @@ var ColorModifierTypes;
288
292
  ColorModifierTypes2["ALPHA"] = "alpha";
289
293
  })(ColorModifierTypes || (ColorModifierTypes = {}));
290
294
 
291
- // ../../node_modules/@tokens-studio/types/dist/constants/ColorSpaceTypes.js
295
+ // ../../node_modules/.pnpm/@tokens-studio+types@0.5.2/node_modules/@tokens-studio/types/dist/constants/ColorSpaceTypes.js
292
296
  var ColorSpaceTypes;
293
297
  (function(ColorSpaceTypes2) {
294
298
  ColorSpaceTypes2["LCH"] = "lch";
@@ -297,7 +301,7 @@ var ColorSpaceTypes;
297
301
  ColorSpaceTypes2["HSL"] = "hsl";
298
302
  })(ColorSpaceTypes || (ColorSpaceTypes = {}));
299
303
 
300
- // ../../node_modules/@tokens-studio/types/dist/constants/Properties.js
304
+ // ../../node_modules/.pnpm/@tokens-studio+types@0.5.2/node_modules/@tokens-studio/types/dist/constants/Properties.js
301
305
  var Properties;
302
306
  (function(Properties2) {
303
307
  Properties2["sizing"] = "sizing";
@@ -349,7 +353,7 @@ var Properties;
349
353
  Properties2["description"] = "description";
350
354
  })(Properties || (Properties = {}));
351
355
 
352
- // ../../node_modules/@tokens-studio/types/dist/constants/TokenSetStatus.js
356
+ // ../../node_modules/.pnpm/@tokens-studio+types@0.5.2/node_modules/@tokens-studio/types/dist/constants/TokenSetStatus.js
353
357
  var TokenSetStatus;
354
358
  (function(TokenSetStatus2) {
355
359
  TokenSetStatus2["DISABLED"] = "disabled";
@@ -357,7 +361,7 @@ var TokenSetStatus;
357
361
  TokenSetStatus2["ENABLED"] = "enabled";
358
362
  })(TokenSetStatus || (TokenSetStatus = {}));
359
363
 
360
- // ../../node_modules/@tokens-studio/types/dist/constants/TokenTypes.js
364
+ // ../../node_modules/.pnpm/@tokens-studio+types@0.5.2/node_modules/@tokens-studio/types/dist/constants/TokenTypes.js
361
365
  var TokenTypes;
362
366
  (function(TokenTypes2) {
363
367
  TokenTypes2["OTHER"] = "other";
@@ -388,7 +392,7 @@ var TokenTypes;
388
392
  TokenTypes2["NUMBER"] = "number";
389
393
  })(TokenTypes || (TokenTypes = {}));
390
394
 
391
- // ../../node_modules/@tokens-studio/types/dist/constants/BorderValues.js
395
+ // ../../node_modules/.pnpm/@tokens-studio+types@0.5.2/node_modules/@tokens-studio/types/dist/constants/BorderValues.js
392
396
  var BorderValues;
393
397
  (function(BorderValues2) {
394
398
  BorderValues2["BORDER_COLOR"] = "color";
@@ -396,7 +400,7 @@ var BorderValues;
396
400
  BorderValues2["BORDER_STYLE"] = "style";
397
401
  })(BorderValues || (BorderValues = {}));
398
402
 
399
- // ../../node_modules/@tokens-studio/types/dist/constants/StrokeStyleValues.js
403
+ // ../../node_modules/.pnpm/@tokens-studio+types@0.5.2/node_modules/@tokens-studio/types/dist/constants/StrokeStyleValues.js
400
404
  var StrokeStyleValues;
401
405
  (function(StrokeStyleValues2) {
402
406
  StrokeStyleValues2["SOLID"] = "solid";
@@ -409,7 +413,7 @@ var StrokeStyleValues;
409
413
  StrokeStyleValues2["INSET"] = "inset";
410
414
  })(StrokeStyleValues || (StrokeStyleValues = {}));
411
415
 
412
- // ../../node_modules/@tokens-studio/types/dist/constants/BoxShadowValues.js
416
+ // ../../node_modules/.pnpm/@tokens-studio+types@0.5.2/node_modules/@tokens-studio/types/dist/constants/BoxShadowValues.js
413
417
  var BoxShadowValues;
414
418
  (function(BoxShadowValues2) {
415
419
  BoxShadowValues2["TYPE"] = "type";
@@ -421,7 +425,7 @@ var BoxShadowValues;
421
425
  BoxShadowValues2["BLEND_MODE"] = "blendMode";
422
426
  })(BoxShadowValues || (BoxShadowValues = {}));
423
427
 
424
- // ../../node_modules/@tokens-studio/types/dist/constants/TypographyValues.js
428
+ // ../../node_modules/.pnpm/@tokens-studio+types@0.5.2/node_modules/@tokens-studio/types/dist/constants/TypographyValues.js
425
429
  var TypographyValues;
426
430
  (function(TypographyValues2) {
427
431
  TypographyValues2["FONT_FAMILY"] = "fontFamily";