@primer/primitives 10.0.0-rc.f7aad39e → 10.0.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.
Files changed (59) hide show
  1. package/dist/build/filters/isDeprecated.js +1 -1
  2. package/dist/build/schemas/baseToken.d.ts +3 -3
  3. package/dist/build/schemas/baseToken.js +1 -1
  4. package/dist/build/schemas/borderToken.d.ts +3 -3
  5. package/dist/build/schemas/colorToken.d.ts +17 -10
  6. package/dist/build/schemas/colorToken.js +2 -1
  7. package/dist/build/schemas/cubicBezierToken.d.ts +3 -3
  8. package/dist/build/schemas/dimensionToken.d.ts +10 -3
  9. package/dist/build/schemas/dimensionToken.js +1 -0
  10. package/dist/build/schemas/durationToken.d.ts +3 -3
  11. package/dist/build/schemas/fontFamilyToken.d.ts +3 -3
  12. package/dist/build/schemas/fontWeightToken.d.ts +3 -3
  13. package/dist/build/schemas/numberToken.d.ts +3 -3
  14. package/dist/build/schemas/shadowToken.d.ts +18 -11
  15. package/dist/build/schemas/shadowToken.js +6 -3
  16. package/dist/build/schemas/stringToken.d.ts +3 -3
  17. package/dist/build/schemas/typographyToken.d.ts +3 -3
  18. package/dist/build/schemas/viewportRangeToken.d.ts +3 -3
  19. package/dist/build/transformers/figmaAttributes.js +2 -2
  20. package/dist/build/transformers/jsonDeprecated.js +1 -1
  21. package/dist/docs/functional/themes/dark-colorblind.json +0 -1046
  22. package/dist/docs/functional/themes/dark-dimmed.json +0 -1092
  23. package/dist/docs/functional/themes/dark-high-contrast.json +0 -850
  24. package/dist/docs/functional/themes/dark-tritanopia.json +0 -1072
  25. package/dist/docs/functional/themes/dark.json +0 -1148
  26. package/dist/docs/functional/themes/light-colorblind.json +0 -1054
  27. package/dist/docs/functional/themes/light-high-contrast.json +0 -884
  28. package/dist/docs/functional/themes/light-tritanopia.json +0 -1070
  29. package/dist/docs/functional/themes/light.json +0 -1144
  30. package/dist/styleLint/functional/themes/dark-colorblind.json +0 -1046
  31. package/dist/styleLint/functional/themes/dark-dimmed.json +0 -1092
  32. package/dist/styleLint/functional/themes/dark-high-contrast.json +0 -850
  33. package/dist/styleLint/functional/themes/dark-tritanopia.json +0 -1072
  34. package/dist/styleLint/functional/themes/dark.json +0 -1148
  35. package/dist/styleLint/functional/themes/light-colorblind.json +0 -1054
  36. package/dist/styleLint/functional/themes/light-high-contrast.json +0 -884
  37. package/dist/styleLint/functional/themes/light-tritanopia.json +0 -1070
  38. package/dist/styleLint/functional/themes/light.json +0 -1144
  39. package/package.json +3 -2
  40. package/src/tokens/functional/color/dark/app-dark.json5 +49 -49
  41. package/src/tokens/functional/color/dark/data-vis-dark.json5 +20 -20
  42. package/src/tokens/functional/color/dark/display-dark.json5 +95 -95
  43. package/src/tokens/functional/color/dark/overrides/dark.dimmed.json5 +1 -1
  44. package/src/tokens/functional/color/dark/overrides/dark.high-contrast.json5 +2 -2
  45. package/src/tokens/functional/color/dark/patterns-dark.json +3963 -0
  46. package/src/tokens/functional/color/dark/patterns-dark.json5 +114 -277
  47. package/src/tokens/functional/color/dark/primitives-dark.json5 +78 -78
  48. package/src/tokens/functional/color/dark/syntax-dark.json5 +47 -47
  49. package/src/tokens/functional/color/light/app-light.json5 +0 -49
  50. package/src/tokens/functional/color/light/data-vis-light.json5 +20 -20
  51. package/src/tokens/functional/color/light/display-light.json5 +0 -95
  52. package/src/tokens/functional/color/light/overrides/light.high-contrast.json5 +0 -2
  53. package/src/tokens/functional/color/light/overrides/light.protanopia-deuteranopia.json5 +0 -3
  54. package/src/tokens/functional/color/light/overrides/light.tritanopia.json5 +0 -3
  55. package/src/tokens/functional/color/light/patterns-light.json5 +114 -276
  56. package/src/tokens/functional/color/light/primitives-light.json5 +0 -78
  57. package/src/tokens/functional/color/light/syntax-light.json5 +0 -47
  58. package/src/tokens/functional/shadow/dark.json5 +0 -14
  59. package/src/tokens/functional/shadow/light.json5 +0 -13
@@ -4,5 +4,5 @@
4
4
  * @returns boolean
5
5
  */
6
6
  export const isDeprecated = (token) => {
7
- return token.deprecated === true || typeof token.deprecated === 'string';
7
+ return token.$deprecated === true || typeof token.$deprecated === 'string';
8
8
  };
@@ -1,11 +1,11 @@
1
1
  import { z } from 'zod';
2
2
  export declare const baseToken: z.ZodObject<{
3
3
  $description: z.ZodOptional<z.ZodString>;
4
- deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
4
+ $deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
5
5
  }, "strict", z.ZodTypeAny, {
6
6
  $description?: string | undefined;
7
- deprecated?: string | boolean | undefined;
7
+ $deprecated?: string | boolean | undefined;
8
8
  }, {
9
9
  $description?: string | undefined;
10
- deprecated?: string | boolean | undefined;
10
+ $deprecated?: string | boolean | undefined;
11
11
  }>;
@@ -2,6 +2,6 @@ import { z } from 'zod';
2
2
  export const baseToken = z
3
3
  .object({
4
4
  $description: z.string().optional(),
5
- deprecated: z.union([z.string(), z.boolean()]).optional(),
5
+ $deprecated: z.union([z.string(), z.boolean()]).optional(),
6
6
  })
7
7
  .strict();
@@ -14,7 +14,7 @@ export declare const borderValue: z.ZodObject<{
14
14
  }>;
15
15
  export declare const borderToken: z.ZodObject<z.objectUtil.extendShape<{
16
16
  $description: z.ZodOptional<z.ZodString>;
17
- deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
17
+ $deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
18
18
  }, {
19
19
  $value: z.ZodUnion<[z.ZodObject<{
20
20
  color: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>]>;
@@ -38,7 +38,7 @@ export declare const borderToken: z.ZodObject<z.objectUtil.extendShape<{
38
38
  };
39
39
  $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
40
40
  $description?: string | undefined;
41
- deprecated?: string | boolean | undefined;
41
+ $deprecated?: string | boolean | undefined;
42
42
  }, {
43
43
  $value: string | {
44
44
  width: string | 0;
@@ -47,5 +47,5 @@ export declare const borderToken: z.ZodObject<z.objectUtil.extendShape<{
47
47
  };
48
48
  $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
49
49
  $description?: string | undefined;
50
- deprecated?: string | boolean | undefined;
50
+ $deprecated?: string | boolean | undefined;
51
51
  }>;
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export declare const colorToken: z.ZodObject<z.objectUtil.extendShape<{
3
3
  $description: z.ZodOptional<z.ZodString>;
4
- deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
4
+ $deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
5
5
  }, {
6
6
  $value: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>]>;
7
7
  $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange">;
@@ -20,29 +20,34 @@ export declare const colorToken: z.ZodObject<z.objectUtil.extendShape<{
20
20
  alpha: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
21
21
  'org.primer.figma': z.ZodOptional<z.ZodObject<{
22
22
  collection: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
23
- mode: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
23
+ modeOverride: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
24
24
  scopes: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
25
+ group: z.ZodOptional<z.ZodString>;
25
26
  }, "strip", z.ZodTypeAny, {
26
- mode?: string | undefined;
27
+ group?: string | undefined;
27
28
  collection?: string | undefined;
29
+ modeOverride?: string | undefined;
28
30
  scopes?: string[] | undefined;
29
31
  }, {
30
- mode?: string | undefined;
32
+ group?: string | undefined;
31
33
  collection?: string | undefined;
34
+ modeOverride?: string | undefined;
32
35
  scopes?: string[] | undefined;
33
36
  }>>;
34
37
  }, "strip", z.ZodTypeAny, {
35
38
  alpha?: number | null | undefined;
36
39
  'org.primer.figma'?: {
37
- mode?: string | undefined;
40
+ group?: string | undefined;
38
41
  collection?: string | undefined;
42
+ modeOverride?: string | undefined;
39
43
  scopes?: string[] | undefined;
40
44
  } | undefined;
41
45
  }, {
42
46
  alpha?: number | null | undefined;
43
47
  'org.primer.figma'?: {
44
- mode?: string | undefined;
48
+ group?: string | undefined;
45
49
  collection?: string | undefined;
50
+ modeOverride?: string | undefined;
46
51
  scopes?: string[] | undefined;
47
52
  } | undefined;
48
53
  }>>;
@@ -55,12 +60,13 @@ export declare const colorToken: z.ZodObject<z.objectUtil.extendShape<{
55
60
  color: string;
56
61
  weight: number;
57
62
  } | null | undefined;
58
- deprecated?: string | boolean | undefined;
63
+ $deprecated?: string | boolean | undefined;
59
64
  $extensions?: {
60
65
  alpha?: number | null | undefined;
61
66
  'org.primer.figma'?: {
62
- mode?: string | undefined;
67
+ group?: string | undefined;
63
68
  collection?: string | undefined;
69
+ modeOverride?: string | undefined;
64
70
  scopes?: string[] | undefined;
65
71
  } | undefined;
66
72
  } | undefined;
@@ -73,12 +79,13 @@ export declare const colorToken: z.ZodObject<z.objectUtil.extendShape<{
73
79
  color: string;
74
80
  weight: number;
75
81
  } | null | undefined;
76
- deprecated?: string | boolean | undefined;
82
+ $deprecated?: string | boolean | undefined;
77
83
  $extensions?: {
78
84
  alpha?: number | null | undefined;
79
85
  'org.primer.figma'?: {
80
- mode?: string | undefined;
86
+ group?: string | undefined;
81
87
  collection?: string | undefined;
88
+ modeOverride?: string | undefined;
82
89
  scopes?: string[] | undefined;
83
90
  } | undefined;
84
91
  } | undefined;
@@ -32,7 +32,7 @@ export const colorToken = baseToken
32
32
  'mode',
33
33
  'pattern/mode',
34
34
  ]).optional(),
35
- mode: mode([
35
+ modeOverride: mode([
36
36
  'light',
37
37
  'dark',
38
38
  'dark dimmed',
@@ -44,6 +44,7 @@ export const colorToken = baseToken
44
44
  'dark tritanopia',
45
45
  ]).optional(),
46
46
  scopes: scopes(['all', 'bgColor', 'fgColor', 'borderColor', 'effectColor']).optional(),
47
+ group: z.string().optional(),
47
48
  })
48
49
  .optional(),
49
50
  })
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export declare const cubicBezierToken: z.ZodObject<z.objectUtil.extendShape<{
3
3
  $description: z.ZodOptional<z.ZodString>;
4
- deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
4
+ $deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
5
5
  }, {
6
6
  $value: z.ZodUnion<[z.ZodArray<z.ZodNumber, "many">, z.ZodEffects<z.ZodString, string, string>]>;
7
7
  $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange">;
@@ -9,10 +9,10 @@ export declare const cubicBezierToken: z.ZodObject<z.objectUtil.extendShape<{
9
9
  $value: string | number[];
10
10
  $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
11
11
  $description?: string | undefined;
12
- deprecated?: string | boolean | undefined;
12
+ $deprecated?: string | boolean | undefined;
13
13
  }, {
14
14
  $value: string | number[];
15
15
  $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
16
16
  $description?: string | undefined;
17
- deprecated?: string | boolean | undefined;
17
+ $deprecated?: string | boolean | undefined;
18
18
  }>;
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export declare const dimensionToken: z.ZodObject<z.objectUtil.extendShape<{
3
3
  $description: z.ZodOptional<z.ZodString>;
4
- deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
4
+ $deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
5
5
  }, {
6
6
  $value: z.ZodUnion<[z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodLiteral<"0">, z.ZodLiteral<0>]>, z.ZodEffects<z.ZodString, string, string>]>;
7
7
  $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange">;
@@ -9,44 +9,51 @@ export declare const dimensionToken: z.ZodObject<z.objectUtil.extendShape<{
9
9
  'org.primer.figma': z.ZodObject<{
10
10
  collection: z.ZodEffects<z.ZodString, string, string>;
11
11
  scopes: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
12
+ group: z.ZodOptional<z.ZodString>;
12
13
  }, "strip", z.ZodTypeAny, {
13
14
  collection: string;
14
15
  scopes: string[];
16
+ group?: string | undefined;
15
17
  }, {
16
18
  collection: string;
17
19
  scopes: string[];
20
+ group?: string | undefined;
18
21
  }>;
19
22
  }, "strip", z.ZodTypeAny, {
20
23
  'org.primer.figma': {
21
24
  collection: string;
22
25
  scopes: string[];
26
+ group?: string | undefined;
23
27
  };
24
28
  }, {
25
29
  'org.primer.figma': {
26
30
  collection: string;
27
31
  scopes: string[];
32
+ group?: string | undefined;
28
33
  };
29
34
  }>>;
30
35
  }>, "strict", z.ZodTypeAny, {
31
36
  $value: string | 0;
32
37
  $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
33
38
  $description?: string | undefined;
34
- deprecated?: string | boolean | undefined;
39
+ $deprecated?: string | boolean | undefined;
35
40
  $extensions?: {
36
41
  'org.primer.figma': {
37
42
  collection: string;
38
43
  scopes: string[];
44
+ group?: string | undefined;
39
45
  };
40
46
  } | undefined;
41
47
  }, {
42
48
  $value: string | 0;
43
49
  $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
44
50
  $description?: string | undefined;
45
- deprecated?: string | boolean | undefined;
51
+ $deprecated?: string | boolean | undefined;
46
52
  $extensions?: {
47
53
  'org.primer.figma': {
48
54
  collection: string;
49
55
  scopes: string[];
56
+ group?: string | undefined;
50
57
  };
51
58
  } | undefined;
52
59
  }>;
@@ -26,6 +26,7 @@ export const dimensionToken = baseToken
26
26
  'paragraphSpacing',
27
27
  'paragraphIndent',
28
28
  ]),
29
+ group: z.string().optional(),
29
30
  }),
30
31
  })
31
32
  .optional(),
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export declare const durationToken: z.ZodObject<z.objectUtil.extendShape<{
3
3
  $description: z.ZodOptional<z.ZodString>;
4
- deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
4
+ $deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
5
5
  }, {
6
6
  $value: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>]>;
7
7
  $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange">;
@@ -9,10 +9,10 @@ export declare const durationToken: z.ZodObject<z.objectUtil.extendShape<{
9
9
  $value: string;
10
10
  $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
11
11
  $description?: string | undefined;
12
- deprecated?: string | boolean | undefined;
12
+ $deprecated?: string | boolean | undefined;
13
13
  }, {
14
14
  $value: string;
15
15
  $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
16
16
  $description?: string | undefined;
17
- deprecated?: string | boolean | undefined;
17
+ $deprecated?: string | boolean | undefined;
18
18
  }>;
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export declare const fontFamilyToken: z.ZodObject<z.objectUtil.extendShape<{
3
3
  $description: z.ZodOptional<z.ZodString>;
4
- deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
4
+ $deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
5
5
  }, {
6
6
  $value: z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodString, string, string>]>;
7
7
  $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange">;
@@ -31,7 +31,7 @@ export declare const fontFamilyToken: z.ZodObject<z.objectUtil.extendShape<{
31
31
  $value: string;
32
32
  $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
33
33
  $description?: string | undefined;
34
- deprecated?: string | boolean | undefined;
34
+ $deprecated?: string | boolean | undefined;
35
35
  $extensions?: {
36
36
  'org.primer.figma': {
37
37
  collection?: string | undefined;
@@ -42,7 +42,7 @@ export declare const fontFamilyToken: z.ZodObject<z.objectUtil.extendShape<{
42
42
  $value: string;
43
43
  $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
44
44
  $description?: string | undefined;
45
- deprecated?: string | boolean | undefined;
45
+ $deprecated?: string | boolean | undefined;
46
46
  $extensions?: {
47
47
  'org.primer.figma': {
48
48
  collection?: string | undefined;
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export declare const fontWeightToken: z.ZodObject<z.objectUtil.extendShape<{
3
3
  $description: z.ZodOptional<z.ZodString>;
4
- deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
4
+ $deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
5
5
  }, {
6
6
  $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange">;
7
7
  $value: z.ZodUnion<[z.ZodEffects<z.ZodNumber, number, number>, z.ZodEffects<z.ZodString, string, string>]>;
@@ -31,7 +31,7 @@ export declare const fontWeightToken: z.ZodObject<z.objectUtil.extendShape<{
31
31
  $value: string | number;
32
32
  $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
33
33
  $description?: string | undefined;
34
- deprecated?: string | boolean | undefined;
34
+ $deprecated?: string | boolean | undefined;
35
35
  $extensions?: {
36
36
  'org.primer.figma': {
37
37
  collection?: string | undefined;
@@ -42,7 +42,7 @@ export declare const fontWeightToken: z.ZodObject<z.objectUtil.extendShape<{
42
42
  $value: string | number;
43
43
  $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
44
44
  $description?: string | undefined;
45
- deprecated?: string | boolean | undefined;
45
+ $deprecated?: string | boolean | undefined;
46
46
  $extensions?: {
47
47
  'org.primer.figma': {
48
48
  collection?: string | undefined;
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export declare const numberToken: z.ZodObject<z.objectUtil.extendShape<{
3
3
  $description: z.ZodOptional<z.ZodString>;
4
- deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
4
+ $deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
5
5
  }, {
6
6
  $value: z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, string, string>]>;
7
7
  $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange">;
@@ -44,7 +44,7 @@ export declare const numberToken: z.ZodObject<z.objectUtil.extendShape<{
44
44
  $value: string | number;
45
45
  $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
46
46
  $description?: string | undefined;
47
- deprecated?: string | boolean | undefined;
47
+ $deprecated?: string | boolean | undefined;
48
48
  $extensions?: {
49
49
  'org.primer.data'?: {
50
50
  fontSize?: number | undefined;
@@ -58,7 +58,7 @@ export declare const numberToken: z.ZodObject<z.objectUtil.extendShape<{
58
58
  $value: string | number;
59
59
  $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
60
60
  $description?: string | undefined;
61
- deprecated?: string | boolean | undefined;
61
+ $deprecated?: string | boolean | undefined;
62
62
  $extensions?: {
63
63
  'org.primer.data'?: {
64
64
  fontSize?: number | undefined;
@@ -26,7 +26,7 @@ export declare const shadowValue: z.ZodObject<{
26
26
  }>;
27
27
  export declare const shadowToken: z.ZodObject<z.objectUtil.extendShape<{
28
28
  $description: z.ZodOptional<z.ZodString>;
29
- deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
29
+ $deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
30
30
  }, {
31
31
  $value: z.ZodUnion<[z.ZodObject<{
32
32
  color: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>]>;
@@ -81,23 +81,28 @@ export declare const shadowToken: z.ZodObject<z.objectUtil.extendShape<{
81
81
  $extensions: z.ZodOptional<z.ZodObject<{
82
82
  'org.primer.figma': z.ZodObject<{
83
83
  collection: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
84
- mode: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
85
- }, "strip", z.ZodTypeAny, {
86
- mode?: string | undefined;
84
+ modeOverride: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
85
+ group: z.ZodOptional<z.ZodString>;
86
+ }, "strict", z.ZodTypeAny, {
87
+ group?: string | undefined;
87
88
  collection?: string | undefined;
89
+ modeOverride?: string | undefined;
88
90
  }, {
89
- mode?: string | undefined;
91
+ group?: string | undefined;
90
92
  collection?: string | undefined;
93
+ modeOverride?: string | undefined;
91
94
  }>;
92
95
  }, "strip", z.ZodTypeAny, {
93
96
  'org.primer.figma': {
94
- mode?: string | undefined;
97
+ group?: string | undefined;
95
98
  collection?: string | undefined;
99
+ modeOverride?: string | undefined;
96
100
  };
97
101
  }, {
98
102
  'org.primer.figma': {
99
- mode?: string | undefined;
103
+ group?: string | undefined;
100
104
  collection?: string | undefined;
105
+ modeOverride?: string | undefined;
101
106
  };
102
107
  }>>;
103
108
  }>, "strict", z.ZodTypeAny, {
@@ -120,11 +125,12 @@ export declare const shadowToken: z.ZodObject<z.objectUtil.extendShape<{
120
125
  }[];
121
126
  $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
122
127
  $description?: string | undefined;
123
- deprecated?: string | boolean | undefined;
128
+ $deprecated?: string | boolean | undefined;
124
129
  $extensions?: {
125
130
  'org.primer.figma': {
126
- mode?: string | undefined;
131
+ group?: string | undefined;
127
132
  collection?: string | undefined;
133
+ modeOverride?: string | undefined;
128
134
  };
129
135
  } | undefined;
130
136
  }, {
@@ -147,11 +153,12 @@ export declare const shadowToken: z.ZodObject<z.objectUtil.extendShape<{
147
153
  }[];
148
154
  $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
149
155
  $description?: string | undefined;
150
- deprecated?: string | boolean | undefined;
156
+ $deprecated?: string | boolean | undefined;
151
157
  $extensions?: {
152
158
  'org.primer.figma': {
153
- mode?: string | undefined;
159
+ group?: string | undefined;
154
160
  collection?: string | undefined;
161
+ modeOverride?: string | undefined;
155
162
  };
156
163
  } | undefined;
157
164
  }>;
@@ -23,9 +23,10 @@ export const shadowToken = baseToken
23
23
  $type: tokenType('shadow'),
24
24
  $extensions: z
25
25
  .object({
26
- 'org.primer.figma': z.object({
26
+ 'org.primer.figma': z
27
+ .object({
27
28
  collection: collection(['mode']).optional(),
28
- mode: mode([
29
+ modeOverride: mode([
29
30
  'light',
30
31
  'dark',
31
32
  'dark dimmed',
@@ -36,7 +37,9 @@ export const shadowToken = baseToken
36
37
  'light tritanopia',
37
38
  'dark tritanopia',
38
39
  ]).optional(),
39
- }),
40
+ group: z.string().optional(),
41
+ })
42
+ .strict(),
40
43
  })
41
44
  .optional(),
42
45
  })
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export declare const stringToken: z.ZodObject<z.objectUtil.extendShape<{
3
3
  $description: z.ZodOptional<z.ZodString>;
4
- deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
4
+ $deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
5
5
  }, {
6
6
  $value: z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodString, string, string>]>;
7
7
  $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange">;
@@ -9,10 +9,10 @@ export declare const stringToken: z.ZodObject<z.objectUtil.extendShape<{
9
9
  $value: string;
10
10
  $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
11
11
  $description?: string | undefined;
12
- deprecated?: string | boolean | undefined;
12
+ $deprecated?: string | boolean | undefined;
13
13
  }, {
14
14
  $value: string;
15
15
  $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
16
16
  $description?: string | undefined;
17
- deprecated?: string | boolean | undefined;
17
+ $deprecated?: string | boolean | undefined;
18
18
  }>;
@@ -17,7 +17,7 @@ export declare const typographyValue: z.ZodObject<{
17
17
  }>;
18
18
  export declare const typographyToken: z.ZodObject<z.objectUtil.extendShape<{
19
19
  $description: z.ZodOptional<z.ZodString>;
20
- deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
20
+ $deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
21
21
  }, {
22
22
  $value: z.ZodUnion<[z.ZodObject<{
23
23
  fontSize: z.ZodUnion<[z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodLiteral<"0">, z.ZodLiteral<0>]>, z.ZodEffects<z.ZodString, string, string>]>;
@@ -45,7 +45,7 @@ export declare const typographyToken: z.ZodObject<z.objectUtil.extendShape<{
45
45
  };
46
46
  $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
47
47
  $description?: string | undefined;
48
- deprecated?: string | boolean | undefined;
48
+ $deprecated?: string | boolean | undefined;
49
49
  }, {
50
50
  $value: string | {
51
51
  fontFamily: string;
@@ -55,5 +55,5 @@ export declare const typographyToken: z.ZodObject<z.objectUtil.extendShape<{
55
55
  };
56
56
  $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
57
57
  $description?: string | undefined;
58
- deprecated?: string | boolean | undefined;
58
+ $deprecated?: string | boolean | undefined;
59
59
  }>;
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export declare const viewportRangeToken: z.ZodObject<z.objectUtil.extendShape<{
3
3
  $description: z.ZodOptional<z.ZodString>;
4
- deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
4
+ $deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
5
5
  }, {
6
6
  $value: z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodString, string, string>]>;
7
7
  $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange">;
@@ -9,10 +9,10 @@ export declare const viewportRangeToken: z.ZodObject<z.objectUtil.extendShape<{
9
9
  $value: string;
10
10
  $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
11
11
  $description?: string | undefined;
12
- deprecated?: string | boolean | undefined;
12
+ $deprecated?: string | boolean | undefined;
13
13
  }, {
14
14
  $value: string;
15
15
  $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
16
16
  $description?: string | undefined;
17
- deprecated?: string | boolean | undefined;
17
+ $deprecated?: string | boolean | undefined;
18
18
  }>;
@@ -43,9 +43,9 @@ export const figmaAttributes = {
43
43
  type: `attribute`,
44
44
  transform: (token, platform = {}) => {
45
45
  var _a, _b;
46
- const { mode, collection, scopes, group, codeSyntax } = ((_a = token.$extensions) === null || _a === void 0 ? void 0 : _a['org.primer.figma']) || {};
46
+ const { modeOverride, collection, scopes, group, codeSyntax } = ((_a = token.$extensions) === null || _a === void 0 ? void 0 : _a['org.primer.figma']) || {};
47
47
  return {
48
- mode: ((_b = platform.options) === null || _b === void 0 ? void 0 : _b.mode) || mode || 'default',
48
+ mode: modeOverride || ((_b = platform.options) === null || _b === void 0 ? void 0 : _b.mode) || 'default',
49
49
  collection,
50
50
  group: group || collection,
51
51
  scopes: getScopes(scopes),
@@ -10,5 +10,5 @@ export const jsonDeprecated = {
10
10
  type: 'value',
11
11
  transitive: true,
12
12
  filter: isDeprecated,
13
- transform: (token) => typeof token.deprecated === 'string' ? token.deprecated.replace(/[{}]/g, '') : null,
13
+ transform: (token) => typeof token.$deprecated === 'string' ? token.$deprecated.replace(/[{}]/g, '') : null,
14
14
  };