@primer/primitives 9.1.2 → 10.0.0-rc.29e661a3

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 (289) hide show
  1. package/dist/build/PrimerStyleDictionary.d.ts +1 -2
  2. package/dist/build/PrimerStyleDictionary.js +51 -64
  3. package/dist/build/filters/index.d.ts +14 -13
  4. package/dist/build/filters/index.js +14 -29
  5. package/dist/build/filters/isBorder.d.ts +3 -3
  6. package/dist/build/filters/isBorder.js +2 -6
  7. package/dist/build/filters/isColor.d.ts +3 -3
  8. package/dist/build/filters/isColor.js +8 -7
  9. package/dist/build/filters/isColorWithAlpha.d.ts +3 -3
  10. package/dist/build/filters/isColorWithAlpha.js +4 -8
  11. package/dist/build/filters/isColorWithMix.d.ts +3 -3
  12. package/dist/build/filters/isColorWithMix.js +4 -8
  13. package/dist/build/filters/isDeprecated.d.ts +3 -3
  14. package/dist/build/filters/isDeprecated.js +2 -6
  15. package/dist/build/filters/isDimension.d.ts +3 -3
  16. package/dist/build/filters/isDimension.js +2 -6
  17. package/dist/build/filters/isDuration.d.ts +3 -3
  18. package/dist/build/filters/isDuration.js +2 -6
  19. package/dist/build/filters/isFontFamily.d.ts +3 -3
  20. package/dist/build/filters/isFontFamily.js +2 -6
  21. package/dist/build/filters/isFontWeight.d.ts +3 -3
  22. package/dist/build/filters/isFontWeight.js +2 -6
  23. package/dist/build/filters/isFromFile.d.ts +3 -3
  24. package/dist/build/filters/isFromFile.js +2 -6
  25. package/dist/build/filters/isNumber.d.ts +3 -3
  26. package/dist/build/filters/isNumber.js +4 -6
  27. package/dist/build/filters/isShadow.d.ts +3 -3
  28. package/dist/build/filters/isShadow.js +2 -6
  29. package/dist/build/filters/isSource.d.ts +3 -3
  30. package/dist/build/filters/isSource.js +2 -6
  31. package/dist/build/filters/isTypography.d.ts +3 -3
  32. package/dist/build/filters/isTypography.js +2 -6
  33. package/dist/build/formats/cssAdvanced.d.ts +2 -2
  34. package/dist/build/formats/cssAdvanced.js +22 -20
  35. package/dist/build/formats/cssCustomMedia.d.ts +2 -2
  36. package/dist/build/formats/cssCustomMedia.js +16 -15
  37. package/dist/build/formats/index.d.ts +9 -9
  38. package/dist/build/formats/index.js +9 -21
  39. package/dist/build/formats/javascriptCommonJs.d.ts +2 -2
  40. package/dist/build/formats/javascriptCommonJs.js +17 -16
  41. package/dist/build/formats/javascriptEsm.d.ts +2 -2
  42. package/dist/build/formats/javascriptEsm.js +17 -16
  43. package/dist/build/formats/jsonFigma.d.ts +2 -2
  44. package/dist/build/formats/jsonFigma.js +27 -22
  45. package/dist/build/formats/jsonNestedPrefixed.d.ts +3 -3
  46. package/dist/build/formats/jsonNestedPrefixed.js +17 -15
  47. package/dist/build/formats/jsonOneDimensional.d.ts +3 -3
  48. package/dist/build/formats/jsonOneDimensional.js +24 -16
  49. package/dist/build/formats/jsonPostCssFallback.d.ts +3 -3
  50. package/dist/build/formats/jsonPostCssFallback.js +5 -12
  51. package/dist/build/formats/typescriptExportDefinition.d.ts +2 -2
  52. package/dist/build/formats/typescriptExportDefinition.js +48 -44
  53. package/dist/build/formats/utilities/getPropName.d.ts +1 -0
  54. package/dist/build/formats/utilities/getPropName.js +16 -0
  55. package/dist/build/formats/utilities/jsonToFlat.d.ts +2 -2
  56. package/dist/build/formats/utilities/jsonToFlat.js +1 -5
  57. package/dist/build/formats/utilities/jsonToNestedValue.d.ts +2 -2
  58. package/dist/build/formats/utilities/jsonToNestedValue.js +4 -6
  59. package/dist/build/formats/utilities/prefixTokens.d.ts +2 -2
  60. package/dist/build/formats/utilities/prefixTokens.js +1 -5
  61. package/dist/build/parsers/index.d.ts +1 -1
  62. package/dist/build/parsers/index.js +1 -5
  63. package/dist/build/parsers/w3cJsonParser.d.ts +2 -2
  64. package/dist/build/parsers/w3cJsonParser.js +5 -7
  65. package/dist/build/platforms/css.d.ts +1 -1
  66. package/dist/build/platforms/css.js +19 -11
  67. package/dist/build/platforms/deprecatedJson.d.ts +1 -1
  68. package/dist/build/platforms/deprecatedJson.js +3 -7
  69. package/dist/build/platforms/docJson.d.ts +1 -1
  70. package/dist/build/platforms/docJson.js +8 -7
  71. package/dist/build/platforms/fallbacks.d.ts +1 -1
  72. package/dist/build/platforms/fallbacks.js +3 -7
  73. package/dist/build/platforms/figma.d.ts +1 -1
  74. package/dist/build/platforms/figma.js +21 -14
  75. package/dist/build/platforms/index.d.ts +10 -10
  76. package/dist/build/platforms/index.js +10 -23
  77. package/dist/build/platforms/javascript.d.ts +1 -1
  78. package/dist/build/platforms/javascript.js +3 -7
  79. package/dist/build/platforms/json.d.ts +1 -1
  80. package/dist/build/platforms/json.js +3 -7
  81. package/dist/build/platforms/styleLint.d.ts +1 -1
  82. package/dist/build/platforms/styleLint.js +3 -7
  83. package/dist/build/platforms/typeDefinitions.d.ts +1 -1
  84. package/dist/build/platforms/typeDefinitions.js +6 -10
  85. package/dist/build/platforms/typescript.d.ts +1 -1
  86. package/dist/build/platforms/typescript.js +3 -7
  87. package/dist/build/schemas/alphaValue.js +4 -7
  88. package/dist/build/schemas/baseToken.d.ts +2 -2
  89. package/dist/build/schemas/baseToken.js +4 -7
  90. package/dist/build/schemas/borderToken.d.ts +5 -5
  91. package/dist/build/schemas/borderToken.js +13 -16
  92. package/dist/build/schemas/collections.js +8 -14
  93. package/dist/build/schemas/colorHexValue.js +4 -7
  94. package/dist/build/schemas/colorToken.d.ts +20 -15
  95. package/dist/build/schemas/colorToken.js +24 -24
  96. package/dist/build/schemas/designToken.js +28 -31
  97. package/dist/build/schemas/dimensionToken.d.ts +5 -5
  98. package/dist/build/schemas/dimensionToken.js +14 -17
  99. package/dist/build/schemas/dimensionValue.js +7 -10
  100. package/dist/build/schemas/durationToken.d.ts +5 -5
  101. package/dist/build/schemas/durationToken.js +8 -11
  102. package/dist/build/schemas/durationValue.js +4 -7
  103. package/dist/build/schemas/fontFamilyToken.d.ts +5 -5
  104. package/dist/build/schemas/fontFamilyToken.js +13 -16
  105. package/dist/build/schemas/fontWeightToken.d.ts +5 -5
  106. package/dist/build/schemas/fontWeightToken.js +14 -17
  107. package/dist/build/schemas/fontWeightValue.js +4 -7
  108. package/dist/build/schemas/numberToken.d.ts +5 -5
  109. package/dist/build/schemas/numberToken.js +15 -18
  110. package/dist/build/schemas/referenceValue.js +4 -7
  111. package/dist/build/schemas/scopes.js +5 -10
  112. package/dist/build/schemas/shadowToken.d.ts +5 -5
  113. package/dist/build/schemas/shadowToken.js +23 -26
  114. package/dist/build/schemas/stringToken.d.ts +5 -5
  115. package/dist/build/schemas/stringToken.js +7 -10
  116. package/dist/build/schemas/tokenName.js +4 -7
  117. package/dist/build/schemas/tokenType.d.ts +2 -2
  118. package/dist/build/schemas/tokenType.js +2 -6
  119. package/dist/build/schemas/typographyToken.d.ts +5 -5
  120. package/dist/build/schemas/typographyToken.js +14 -17
  121. package/dist/build/schemas/validTokenType.js +9 -13
  122. package/dist/build/schemas/viewportRangeToken.d.ts +5 -5
  123. package/dist/build/schemas/viewportRangeToken.js +7 -10
  124. package/dist/build/transformers/borderToCss.d.ts +3 -3
  125. package/dist/build/transformers/borderToCss.js +16 -16
  126. package/dist/build/transformers/colorToHex.d.ts +2 -2
  127. package/dist/build/transformers/colorToHex.js +11 -13
  128. package/dist/build/transformers/colorToHexMix.d.ts +2 -2
  129. package/dist/build/transformers/colorToHexMix.js +10 -15
  130. package/dist/build/transformers/colorToRgbAlpha.d.ts +2 -2
  131. package/dist/build/transformers/colorToRgbAlpha.js +10 -12
  132. package/dist/build/transformers/colorToRgbaFloat.d.ts +2 -2
  133. package/dist/build/transformers/colorToRgbaFloat.js +24 -28
  134. package/dist/build/transformers/dimensionToPixelUnitless.d.ts +2 -2
  135. package/dist/build/transformers/dimensionToPixelUnitless.js +13 -14
  136. package/dist/build/transformers/dimensionToRem.d.ts +2 -2
  137. package/dist/build/transformers/dimensionToRem.js +12 -13
  138. package/dist/build/transformers/dimensionToRemPxArray.d.ts +2 -2
  139. package/dist/build/transformers/dimensionToRemPxArray.js +11 -12
  140. package/dist/build/transformers/durationToCss.d.ts +2 -2
  141. package/dist/build/transformers/durationToCss.js +9 -10
  142. package/dist/build/transformers/figmaAttributes.d.ts +2 -2
  143. package/dist/build/transformers/figmaAttributes.js +3 -5
  144. package/dist/build/transformers/floatToPixel.d.ts +4 -4
  145. package/dist/build/transformers/floatToPixel.js +12 -14
  146. package/dist/build/transformers/fontFamilyToCss.d.ts +2 -2
  147. package/dist/build/transformers/fontFamilyToCss.js +10 -13
  148. package/dist/build/transformers/fontFamilyToFigma.d.ts +3 -3
  149. package/dist/build/transformers/fontFamilyToFigma.js +15 -17
  150. package/dist/build/transformers/fontWeightToNumber.d.ts +2 -2
  151. package/dist/build/transformers/fontWeightToNumber.js +8 -11
  152. package/dist/build/transformers/index.d.ts +24 -24
  153. package/dist/build/transformers/index.js +24 -51
  154. package/dist/build/transformers/jsonDeprecated.d.ts +2 -2
  155. package/dist/build/transformers/jsonDeprecated.js +6 -8
  156. package/dist/build/transformers/namePathToCamelCase.d.ts +2 -2
  157. package/dist/build/transformers/namePathToCamelCase.js +5 -7
  158. package/dist/build/transformers/namePathToDotNotation.d.ts +2 -2
  159. package/dist/build/transformers/namePathToDotNotation.js +6 -8
  160. package/dist/build/transformers/namePathToFigma.d.ts +3 -3
  161. package/dist/build/transformers/namePathToFigma.js +5 -8
  162. package/dist/build/transformers/namePathToKebabCase.d.ts +2 -2
  163. package/dist/build/transformers/namePathToKebabCase.js +4 -6
  164. package/dist/build/transformers/namePathToPascalCase.d.ts +2 -2
  165. package/dist/build/transformers/namePathToPascalCase.js +5 -7
  166. package/dist/build/transformers/namePathToSlashNotation.d.ts +2 -2
  167. package/dist/build/transformers/namePathToSlashNotation.js +4 -6
  168. package/dist/build/transformers/shadowToCss.d.ts +2 -2
  169. package/dist/build/transformers/shadowToCss.js +14 -15
  170. package/dist/build/transformers/typographyToCss.d.ts +2 -2
  171. package/dist/build/transformers/typographyToCss.js +13 -15
  172. package/dist/build/transformers/utilities/alpha.d.ts +1 -1
  173. package/dist/build/transformers/utilities/alpha.js +4 -8
  174. package/dist/build/transformers/utilities/checkRequiredTokenProperties.js +1 -5
  175. package/dist/build/transformers/utilities/getTokenValue.d.ts +2 -2
  176. package/dist/build/transformers/utilities/getTokenValue.js +10 -12
  177. package/dist/build/transformers/utilities/hasSpaceInString.js +1 -5
  178. package/dist/build/transformers/utilities/hexToRgbaFloat.d.ts +1 -1
  179. package/dist/build/transformers/utilities/hexToRgbaFloat.js +1 -5
  180. package/dist/build/transformers/utilities/invalidTokenError.d.ts +1 -1
  181. package/dist/build/transformers/utilities/invalidTokenError.js +11 -10
  182. package/dist/build/transformers/utilities/isRgbaFloat.js +1 -5
  183. package/dist/build/transformers/utilities/mix.js +5 -7
  184. package/dist/build/transformers/utilities/rgbaFloatToHex.js +1 -5
  185. package/dist/build/types/Border.d.ts +5 -0
  186. package/dist/build/types/BorderTokenValue.d.ts +10 -0
  187. package/dist/build/types/ColorHex.d.ts +4 -0
  188. package/dist/build/types/PlatformInitializer.d.ts +11 -0
  189. package/dist/build/types/Shadow.d.ts +5 -0
  190. package/dist/build/types/ShadowTokenValue.d.ts +14 -0
  191. package/dist/build/types/SizeEm.d.ts +4 -0
  192. package/dist/build/types/SizePx.d.ts +4 -0
  193. package/dist/build/types/SizeRem.d.ts +4 -0
  194. package/dist/build/types/StyleDictionaryConfigGenerator.d.ts +15 -0
  195. package/dist/build/types/TokenBuildInput.d.ts +8 -0
  196. package/dist/build/types/TypographyTokenValue.d.ts +12 -0
  197. package/dist/build/types/w3cTransformedToken.d.ts +8 -0
  198. package/dist/build/utilities/copyFromDir.d.ts +2 -2
  199. package/dist/build/utilities/copyFromDir.js +7 -10
  200. package/dist/build/utilities/filterStringArray.js +1 -5
  201. package/dist/build/utilities/getFlag.js +1 -5
  202. package/dist/build/utilities/index.d.ts +9 -3
  203. package/dist/build/utilities/index.js +9 -9
  204. package/dist/build/utilities/joinFriendly.js +1 -5
  205. package/dist/build/utilities/schemaErrorMessage.js +1 -5
  206. package/dist/build/utilities/toCamelCase.js +5 -9
  207. package/dist/build/utilities/toPascalCase.js +5 -9
  208. package/dist/build/utilities/treeWalker.js +2 -6
  209. package/dist/build/utilities/upperCaseFirstCharacter.js +1 -5
  210. package/dist/css/functional/themes/dark-colorblind.css +4 -4
  211. package/dist/css/functional/themes/dark-high-contrast.css +20 -20
  212. package/dist/css/functional/themes/light-high-contrast.css +14 -14
  213. package/dist/css/functional/typography/typography.css +20 -20
  214. package/dist/css/primitives.css +20 -20
  215. package/dist/docs/base/size/size.json +76 -76
  216. package/dist/docs/base/typography/typography.json +16 -16
  217. package/dist/docs/functional/motion/motion.json +18 -18
  218. package/dist/docs/functional/size/border.json +56 -56
  219. package/dist/docs/functional/size/breakpoints.json +24 -24
  220. package/dist/docs/functional/size/size-coarse.json +12 -12
  221. package/dist/docs/functional/size/size-fine.json +12 -12
  222. package/dist/docs/functional/size/size.json +264 -264
  223. package/dist/docs/functional/size/viewport.json +24 -24
  224. package/dist/docs/functional/themes/dark-colorblind.json +2310 -3186
  225. package/dist/docs/functional/themes/dark-dimmed.json +2300 -2794
  226. package/dist/docs/functional/themes/dark-high-contrast.json +2520 -5038
  227. package/dist/docs/functional/themes/dark-tritanopia.json +2351 -3003
  228. package/dist/docs/functional/themes/dark.json +2270 -2270
  229. package/dist/docs/functional/themes/light-colorblind.json +2298 -3124
  230. package/dist/docs/functional/themes/light-high-contrast.json +2419 -4645
  231. package/dist/docs/functional/themes/light-tritanopia.json +2330 -2990
  232. package/dist/docs/functional/themes/light.json +2260 -2260
  233. package/dist/docs/functional/typography/typography.json +206 -206
  234. package/dist/figma/dimension/dimension.json +489 -489
  235. package/dist/figma/figma.json +11 -3
  236. package/dist/figma/scales/dark-dimmed.json +38 -38
  237. package/dist/figma/scales/dark-high-constrast.json +38 -38
  238. package/dist/figma/scales/dark.json +35 -35
  239. package/dist/figma/scales/light-high-constrast.json +40 -40
  240. package/dist/figma/scales/light.json +40 -40
  241. package/dist/figma/shadows/dark-colorblind.json +280 -280
  242. package/dist/figma/shadows/dark-dimmed.json +280 -280
  243. package/dist/figma/shadows/dark-high-contrast.json +280 -280
  244. package/dist/figma/shadows/dark-tritanopia.json +280 -280
  245. package/dist/figma/shadows/dark.json +280 -280
  246. package/dist/figma/shadows/light-colorblind.json +281 -281
  247. package/dist/figma/shadows/light-high-contrast.json +281 -281
  248. package/dist/figma/shadows/light-tritanopia.json +281 -281
  249. package/dist/figma/shadows/light.json +281 -281
  250. package/dist/figma/themes/dark-colorblind.json +4991 -5854
  251. package/dist/figma/themes/dark-dimmed.json +5314 -5799
  252. package/dist/figma/themes/dark-high-contrast.json +4210 -6679
  253. package/dist/figma/themes/dark-tritanopia.json +5165 -5817
  254. package/dist/figma/themes/dark.json +5534 -5537
  255. package/dist/figma/themes/light-colorblind.json +4857 -5669
  256. package/dist/figma/themes/light-high-contrast.json +4198 -6372
  257. package/dist/figma/themes/light-tritanopia.json +4901 -5529
  258. package/dist/figma/themes/light.json +5349 -5349
  259. package/dist/figma/typography/typography.json +112 -156
  260. package/dist/internalCss/dark-colorblind.css +4 -4
  261. package/dist/internalCss/dark-high-contrast.css +20 -20
  262. package/dist/internalCss/light-high-contrast.css +14 -14
  263. package/dist/styleLint/base/size/size.json +38 -38
  264. package/dist/styleLint/base/typography/typography.json +8 -8
  265. package/dist/styleLint/functional/motion/motion.json +12 -12
  266. package/dist/styleLint/functional/size/border.json +30 -30
  267. package/dist/styleLint/functional/size/breakpoints.json +12 -12
  268. package/dist/styleLint/functional/size/size-coarse.json +6 -6
  269. package/dist/styleLint/functional/size/size-fine.json +6 -6
  270. package/dist/styleLint/functional/size/size.json +132 -132
  271. package/dist/styleLint/functional/size/viewport.json +12 -12
  272. package/dist/styleLint/functional/themes/dark-colorblind.json +1171 -2047
  273. package/dist/styleLint/functional/themes/dark-dimmed.json +1160 -1654
  274. package/dist/styleLint/functional/themes/dark-high-contrast.json +1307 -3825
  275. package/dist/styleLint/functional/themes/dark-tritanopia.json +1232 -1884
  276. package/dist/styleLint/functional/themes/dark.json +1140 -1140
  277. package/dist/styleLint/functional/themes/light-colorblind.json +1198 -2024
  278. package/dist/styleLint/functional/themes/light-high-contrast.json +1270 -3496
  279. package/dist/styleLint/functional/themes/light-tritanopia.json +1205 -1865
  280. package/dist/styleLint/functional/themes/light.json +1130 -1130
  281. package/dist/styleLint/functional/typography/typography.json +114 -114
  282. package/package.json +19 -10
  283. package/src/tokens/functional/color/dark/overrides/dark.high-contrast.json5 +4 -4
  284. package/src/tokens/functional/color/dark/overrides/dark.protanopia-deuteranopia.json5 +6 -0
  285. package/src/tokens/functional/color/dark/overrides/dark.tritanopia.json5 +21 -3
  286. package/src/tokens/functional/color/dark/primitives-dark.json5 +3 -3
  287. package/src/tokens/functional/color/light/overrides/light.protanopia-deuteranopia.json5 +4 -1
  288. package/src/tokens/functional/color/light/overrides/light.tritanopia.json5 +4 -1
  289. package/src/tokens/functional/color/light/primitives-light.json5 +2 -2
@@ -4,7 +4,7 @@ export declare const dimensionToken: z.ZodObject<z.objectUtil.extendShape<{
4
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
- $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange">;
7
+ $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange">;
8
8
  $extensions: z.ZodOptional<z.ZodObject<{
9
9
  'org.primer.figma': z.ZodObject<{
10
10
  collection: z.ZodEffects<z.ZodString, string, string>;
@@ -28,8 +28,9 @@ export declare const dimensionToken: z.ZodObject<z.objectUtil.extendShape<{
28
28
  };
29
29
  }>>;
30
30
  }>, "strict", z.ZodTypeAny, {
31
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange";
32
31
  $value: string | 0;
32
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
33
+ $description?: string | undefined;
33
34
  deprecated?: string | boolean | undefined;
34
35
  $extensions?: {
35
36
  'org.primer.figma': {
@@ -37,10 +38,10 @@ export declare const dimensionToken: z.ZodObject<z.objectUtil.extendShape<{
37
38
  scopes: string[];
38
39
  };
39
40
  } | undefined;
40
- $description?: string | undefined;
41
41
  }, {
42
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange";
43
42
  $value: string | 0;
43
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
44
+ $description?: string | undefined;
44
45
  deprecated?: string | boolean | undefined;
45
46
  $extensions?: {
46
47
  'org.primer.figma': {
@@ -48,5 +49,4 @@ export declare const dimensionToken: z.ZodObject<z.objectUtil.extendShape<{
48
49
  scopes: string[];
49
50
  };
50
51
  } | undefined;
51
- $description?: string | undefined;
52
52
  }>;
@@ -1,22 +1,19 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dimensionToken = void 0;
4
- const zod_1 = require("zod");
5
- const baseToken_1 = require("./baseToken");
6
- const referenceValue_1 = require("./referenceValue");
7
- const collections_1 = require("./collections");
8
- const scopes_1 = require("./scopes");
9
- const dimensionValue_1 = require("./dimensionValue");
10
- const tokenType_1 = require("./tokenType");
11
- exports.dimensionToken = baseToken_1.baseToken
1
+ import { z } from 'zod';
2
+ import { baseToken } from './baseToken.js';
3
+ import { referenceValue } from './referenceValue.js';
4
+ import { collection } from './collections.js';
5
+ import { scopes } from './scopes.js';
6
+ import { dimensionValue } from './dimensionValue.js';
7
+ import { tokenType } from './tokenType.js';
8
+ export const dimensionToken = baseToken
12
9
  .extend({
13
- $value: zod_1.z.union([dimensionValue_1.dimensionValue, referenceValue_1.referenceValue]),
14
- $type: (0, tokenType_1.tokenType)('dimension'),
15
- $extensions: zod_1.z
10
+ $value: z.union([dimensionValue, referenceValue]),
11
+ $type: tokenType('dimension'),
12
+ $extensions: z
16
13
  .object({
17
- 'org.primer.figma': zod_1.z.object({
18
- collection: (0, collections_1.collection)(['base/size', 'functional/size', 'pattern/size', 'typography']),
19
- scopes: (0, scopes_1.scopes)([
14
+ 'org.primer.figma': z.object({
15
+ collection: collection(['base/size', 'functional/size', 'pattern/size', 'typography']),
16
+ scopes: scopes([
20
17
  'all',
21
18
  'size',
22
19
  'gap',
@@ -1,12 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dimensionValue = void 0;
4
- const zod_1 = require("zod");
5
- const schemaErrorMessage_1 = require("../utilities/schemaErrorMessage");
6
- exports.dimensionValue = zod_1.z.union([
7
- zod_1.z.string().refine(dim => /(^-?[0-9]+(px|rem)$|^-?[0-9]+\.?[0-9]*em$)/.test(dim), val => ({
8
- message: (0, schemaErrorMessage_1.schemaErrorMessage)(`Invalid dimension: "${val}"`, `Dimension must be a string with a unit (px, rem or em) or 0`),
1
+ import { z } from 'zod';
2
+ import { schemaErrorMessage } from '../utilities/index.js';
3
+ export const dimensionValue = z.union([
4
+ z.string().refine(dim => /(^-?[0-9]+(px|rem)$|^-?[0-9]+\.?[0-9]*em$)/.test(dim), val => ({
5
+ message: schemaErrorMessage(`Invalid dimension: "${val}"`, `Dimension must be a string with a unit (px, rem or em) or 0`),
9
6
  })),
10
- zod_1.z.literal('0'),
11
- zod_1.z.literal(0),
7
+ z.literal('0'),
8
+ z.literal(0),
12
9
  ]);
@@ -4,15 +4,15 @@ export declare const durationToken: z.ZodObject<z.objectUtil.extendShape<{
4
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
- $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange">;
7
+ $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange">;
8
8
  }>, "strict", z.ZodTypeAny, {
9
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange";
10
9
  $value: string;
11
- deprecated?: string | boolean | undefined;
10
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
12
11
  $description?: string | undefined;
12
+ deprecated?: string | boolean | undefined;
13
13
  }, {
14
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange";
15
14
  $value: string;
16
- deprecated?: string | boolean | undefined;
15
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
17
16
  $description?: string | undefined;
17
+ deprecated?: string | boolean | undefined;
18
18
  }>;
@@ -1,14 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.durationToken = void 0;
4
- const zod_1 = require("zod");
5
- const baseToken_1 = require("./baseToken");
6
- const referenceValue_1 = require("./referenceValue");
7
- const durationValue_1 = require("./durationValue");
8
- const tokenType_1 = require("./tokenType");
9
- exports.durationToken = baseToken_1.baseToken
1
+ import { z } from 'zod';
2
+ import { baseToken } from './baseToken.js';
3
+ import { referenceValue } from './referenceValue.js';
4
+ import { durationValue } from './durationValue.js';
5
+ import { tokenType } from './tokenType.js';
6
+ export const durationToken = baseToken
10
7
  .extend({
11
- $value: zod_1.z.union([durationValue_1.durationValue, referenceValue_1.referenceValue]),
12
- $type: (0, tokenType_1.tokenType)('duration'),
8
+ $value: z.union([durationValue, referenceValue]),
9
+ $type: tokenType('duration'),
13
10
  })
14
11
  .strict();
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.durationValue = void 0;
4
- const zod_1 = require("zod");
5
- const schemaErrorMessage_1 = require("../utilities/schemaErrorMessage");
6
- exports.durationValue = zod_1.z.string().refine(duration => /(^[0-9]+ms$)/.test(duration), val => ({
7
- message: (0, schemaErrorMessage_1.schemaErrorMessage)(`Invalid duration: "${val}"`, `A duration must be a string with an "ms"`),
1
+ import { z } from 'zod';
2
+ import { schemaErrorMessage } from '../utilities/index.js';
3
+ export const durationValue = z.string().refine(duration => /(^[0-9]+ms$)/.test(duration), val => ({
4
+ message: schemaErrorMessage(`Invalid duration: "${val}"`, `A duration must be a string with an "ms"`),
8
5
  }));
@@ -4,7 +4,7 @@ export declare const fontFamilyToken: z.ZodObject<z.objectUtil.extendShape<{
4
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
- $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange">;
7
+ $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange">;
8
8
  $extensions: z.ZodOptional<z.ZodObject<{
9
9
  'org.primer.figma': z.ZodObject<{
10
10
  collection: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
@@ -28,8 +28,9 @@ export declare const fontFamilyToken: z.ZodObject<z.objectUtil.extendShape<{
28
28
  };
29
29
  }>>;
30
30
  }>, "strict", z.ZodTypeAny, {
31
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange";
32
31
  $value: string;
32
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
33
+ $description?: string | undefined;
33
34
  deprecated?: string | boolean | undefined;
34
35
  $extensions?: {
35
36
  'org.primer.figma': {
@@ -37,10 +38,10 @@ export declare const fontFamilyToken: z.ZodObject<z.objectUtil.extendShape<{
37
38
  scopes?: string[] | undefined;
38
39
  };
39
40
  } | undefined;
40
- $description?: string | undefined;
41
41
  }, {
42
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange";
43
42
  $value: string;
43
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
44
+ $description?: string | undefined;
44
45
  deprecated?: string | boolean | undefined;
45
46
  $extensions?: {
46
47
  'org.primer.figma': {
@@ -48,5 +49,4 @@ export declare const fontFamilyToken: z.ZodObject<z.objectUtil.extendShape<{
48
49
  scopes?: string[] | undefined;
49
50
  };
50
51
  } | undefined;
51
- $description?: string | undefined;
52
52
  }>;
@@ -1,21 +1,18 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fontFamilyToken = void 0;
4
- const zod_1 = require("zod");
5
- const referenceValue_1 = require("./referenceValue");
6
- const baseToken_1 = require("./baseToken");
7
- const tokenType_1 = require("./tokenType");
8
- const collections_1 = require("./collections");
9
- const scopes_1 = require("./scopes");
10
- exports.fontFamilyToken = baseToken_1.baseToken
1
+ import { z } from 'zod';
2
+ import { referenceValue } from './referenceValue.js';
3
+ import { baseToken } from './baseToken.js';
4
+ import { tokenType } from './tokenType.js';
5
+ import { collection } from './collections.js';
6
+ import { scopes } from './scopes.js';
7
+ export const fontFamilyToken = baseToken
11
8
  .extend({
12
- $value: zod_1.z.union([zod_1.z.string(), referenceValue_1.referenceValue]),
13
- $type: (0, tokenType_1.tokenType)('fontFamily'),
14
- $extensions: zod_1.z
9
+ $value: z.union([z.string(), referenceValue]),
10
+ $type: tokenType('fontFamily'),
11
+ $extensions: z
15
12
  .object({
16
- 'org.primer.figma': zod_1.z.object({
17
- collection: (0, collections_1.collection)(['base/typography', 'typography']).optional(),
18
- scopes: (0, scopes_1.scopes)(['fontFamily']).optional(),
13
+ 'org.primer.figma': z.object({
14
+ collection: collection(['base/typography', 'typography']).optional(),
15
+ scopes: scopes(['fontFamily']).optional(),
19
16
  }),
20
17
  })
21
18
  .optional(),
@@ -3,7 +3,7 @@ export declare const fontWeightToken: z.ZodObject<z.objectUtil.extendShape<{
3
3
  $description: z.ZodOptional<z.ZodString>;
4
4
  deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
5
5
  }, {
6
- $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange">;
6
+ $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange">;
7
7
  $value: z.ZodUnion<[z.ZodEffects<z.ZodNumber, number, number>, z.ZodEffects<z.ZodString, string, string>]>;
8
8
  $extensions: z.ZodOptional<z.ZodObject<{
9
9
  'org.primer.figma': z.ZodObject<{
@@ -28,8 +28,9 @@ export declare const fontWeightToken: z.ZodObject<z.objectUtil.extendShape<{
28
28
  };
29
29
  }>>;
30
30
  }>, "strict", z.ZodTypeAny, {
31
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange";
32
31
  $value: string | number;
32
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
33
+ $description?: string | undefined;
33
34
  deprecated?: string | boolean | undefined;
34
35
  $extensions?: {
35
36
  'org.primer.figma': {
@@ -37,10 +38,10 @@ export declare const fontWeightToken: z.ZodObject<z.objectUtil.extendShape<{
37
38
  scopes?: string[] | undefined;
38
39
  };
39
40
  } | undefined;
40
- $description?: string | undefined;
41
41
  }, {
42
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange";
43
42
  $value: string | number;
43
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
44
+ $description?: string | undefined;
44
45
  deprecated?: string | boolean | undefined;
45
46
  $extensions?: {
46
47
  'org.primer.figma': {
@@ -48,5 +49,4 @@ export declare const fontWeightToken: z.ZodObject<z.objectUtil.extendShape<{
48
49
  scopes?: string[] | undefined;
49
50
  };
50
51
  } | undefined;
51
- $description?: string | undefined;
52
52
  }>;
@@ -1,22 +1,19 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fontWeightToken = void 0;
4
- const zod_1 = require("zod");
5
- const fontWeightValue_1 = require("./fontWeightValue");
6
- const referenceValue_1 = require("./referenceValue");
7
- const baseToken_1 = require("./baseToken");
8
- const tokenType_1 = require("./tokenType");
9
- const collections_1 = require("./collections");
10
- const scopes_1 = require("./scopes");
11
- exports.fontWeightToken = baseToken_1.baseToken
1
+ import { z } from 'zod';
2
+ import { fontWeightValue } from './fontWeightValue.js';
3
+ import { referenceValue } from './referenceValue.js';
4
+ import { baseToken } from './baseToken.js';
5
+ import { tokenType } from './tokenType.js';
6
+ import { collection } from './collections.js';
7
+ import { scopes } from './scopes.js';
8
+ export const fontWeightToken = baseToken
12
9
  .extend({
13
- $type: (0, tokenType_1.tokenType)('fontWeight'),
14
- $value: zod_1.z.union([fontWeightValue_1.fontWeightValue, referenceValue_1.referenceValue]),
15
- $extensions: zod_1.z
10
+ $type: tokenType('fontWeight'),
11
+ $value: z.union([fontWeightValue, referenceValue]),
12
+ $extensions: z
16
13
  .object({
17
- 'org.primer.figma': zod_1.z.object({
18
- collection: (0, collections_1.collection)(['base/typography', 'typography']).optional(),
19
- scopes: (0, scopes_1.scopes)(['fontWeight']).optional(),
14
+ 'org.primer.figma': z.object({
15
+ collection: collection(['base/typography', 'typography']).optional(),
16
+ scopes: scopes(['fontWeight']).optional(),
20
17
  }),
21
18
  })
22
19
  .optional(),
@@ -1,9 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fontWeightValue = void 0;
4
- const zod_1 = require("zod");
5
- const schemaErrorMessage_1 = require("../utilities/schemaErrorMessage");
1
+ import { z } from 'zod';
2
+ import { schemaErrorMessage } from '../utilities/index.js';
6
3
  const allowed = [100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
7
- exports.fontWeightValue = zod_1.z.number().refine(value => allowed.includes(value), value => ({
8
- message: (0, schemaErrorMessage_1.schemaErrorMessage)(`Invalid font weight value: "${value}"`, `Font weight must be one of ${allowed.join(', ')}`),
4
+ export const fontWeightValue = z.number().refine(value => allowed.includes(value), value => ({
5
+ message: schemaErrorMessage(`Invalid font weight value: "${value}"`, `Font weight must be one of ${allowed.join(', ')}`),
9
6
  }));
@@ -4,7 +4,7 @@ export declare const numberToken: z.ZodObject<z.objectUtil.extendShape<{
4
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
- $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange">;
7
+ $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange">;
8
8
  $extensions: z.ZodOptional<z.ZodObject<{
9
9
  'org.primer.data': z.ZodOptional<z.ZodObject<{
10
10
  fontSize: z.ZodOptional<z.ZodNumber>;
@@ -41,8 +41,9 @@ export declare const numberToken: z.ZodObject<z.objectUtil.extendShape<{
41
41
  } | undefined;
42
42
  }>>;
43
43
  }>, "strict", z.ZodTypeAny, {
44
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange";
45
44
  $value: string | number;
45
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
46
+ $description?: string | undefined;
46
47
  deprecated?: string | boolean | undefined;
47
48
  $extensions?: {
48
49
  'org.primer.data'?: {
@@ -53,10 +54,10 @@ export declare const numberToken: z.ZodObject<z.objectUtil.extendShape<{
53
54
  scopes?: string[] | undefined;
54
55
  } | undefined;
55
56
  } | undefined;
56
- $description?: string | undefined;
57
57
  }, {
58
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange";
59
58
  $value: string | number;
59
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
60
+ $description?: string | undefined;
60
61
  deprecated?: string | boolean | undefined;
61
62
  $extensions?: {
62
63
  'org.primer.data'?: {
@@ -67,5 +68,4 @@ export declare const numberToken: z.ZodObject<z.objectUtil.extendShape<{
67
68
  scopes?: string[] | undefined;
68
69
  } | undefined;
69
70
  } | undefined;
70
- $description?: string | undefined;
71
71
  }>;
@@ -1,27 +1,24 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.numberToken = void 0;
4
- const zod_1 = require("zod");
5
- const baseToken_1 = require("./baseToken");
6
- const referenceValue_1 = require("./referenceValue");
7
- const tokenType_1 = require("./tokenType");
8
- const scopes_1 = require("./scopes");
9
- const collections_1 = require("./collections");
10
- exports.numberToken = baseToken_1.baseToken
1
+ import { z } from 'zod';
2
+ import { baseToken } from './baseToken.js';
3
+ import { referenceValue } from './referenceValue.js';
4
+ import { tokenType } from './tokenType.js';
5
+ import { scopes } from './scopes.js';
6
+ import { collection } from './collections.js';
7
+ export const numberToken = baseToken
11
8
  .extend({
12
- $value: zod_1.z.union([zod_1.z.number(), referenceValue_1.referenceValue]),
13
- $type: (0, tokenType_1.tokenType)('number'),
14
- $extensions: zod_1.z
9
+ $value: z.union([z.number(), referenceValue]),
10
+ $type: tokenType('number'),
11
+ $extensions: z
15
12
  .object({
16
- 'org.primer.data': zod_1.z
13
+ 'org.primer.data': z
17
14
  .object({
18
- fontSize: zod_1.z.number().optional(),
15
+ fontSize: z.number().optional(),
19
16
  })
20
17
  .optional(),
21
- 'org.primer.figma': zod_1.z
18
+ 'org.primer.figma': z
22
19
  .object({
23
- collection: (0, collections_1.collection)(['typography']).optional(),
24
- scopes: (0, scopes_1.scopes)(['fontWeight', 'lineHeight']).optional(),
20
+ collection: collection(['typography']).optional(),
21
+ scopes: scopes(['fontWeight', 'lineHeight']).optional(),
25
22
  })
26
23
  .optional(),
27
24
  })
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.referenceValue = void 0;
4
- const zod_1 = require("zod");
5
- const schemaErrorMessage_1 = require("../utilities/schemaErrorMessage");
6
- exports.referenceValue = zod_1.z.string().refine(ref => /^{\w+(\.\w+)*(\.\w+|\.@)}$/.test(ref), ref => ({
7
- message: (0, schemaErrorMessage_1.schemaErrorMessage)(`Invalid reference: "${ref}"`, 'Reference must be a string in the format "{path.to.token}".'),
1
+ import { z } from 'zod';
2
+ import { schemaErrorMessage } from '../utilities/index.js';
3
+ export const referenceValue = z.string().refine(ref => /^{\w+(\.\w+)*(\.\w+|\.@)}$/.test(ref), ref => ({
4
+ message: schemaErrorMessage(`Invalid reference: "${ref}"`, 'Reference must be a string in the format "{path.to.token}".'),
8
5
  }));
@@ -1,9 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.scopes = void 0;
4
- const zod_1 = require("zod");
5
- const joinFriendly_1 = require("../utilities/joinFriendly");
6
- const schemaErrorMessage_1 = require("../utilities/schemaErrorMessage");
1
+ import { z } from 'zod';
2
+ import { joinFriendly, schemaErrorMessage } from '../utilities/index.js';
7
3
  const validScopes = [
8
4
  'all',
9
5
  'bgColor',
@@ -25,10 +21,9 @@ const validScopes = [
25
21
  'paragraphSpacing',
26
22
  'paragraphIndent',
27
23
  ];
28
- const scopes = (scopeSubset) => {
24
+ export const scopes = (scopeSubset) => {
29
25
  const scopeArray = scopeSubset !== null && scopeSubset !== void 0 ? scopeSubset : validScopes;
30
- return zod_1.z.array(zod_1.z.string()).refine(value => value.every(item => scopeArray.includes(item)), value => ({
31
- message: (0, schemaErrorMessage_1.schemaErrorMessage)(`Invalid scope: "${value}"`, `Valid scopes are: ${(0, joinFriendly_1.joinFriendly)(scopeArray)}`),
26
+ return z.array(z.string()).refine(value => value.every(item => scopeArray.includes(item)), value => ({
27
+ message: schemaErrorMessage(`Invalid scope: "${value}"`, `Valid scopes are: ${joinFriendly(scopeArray)}`),
32
28
  }));
33
29
  };
34
- exports.scopes = scopes;
@@ -77,7 +77,7 @@ export declare const shadowToken: z.ZodObject<z.objectUtil.extendShape<{
77
77
  alpha?: any;
78
78
  inset?: boolean | undefined;
79
79
  }>, "many">, z.ZodEffects<z.ZodString, string, string>]>;
80
- $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange">;
80
+ $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange">;
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>>;
@@ -101,7 +101,6 @@ export declare const shadowToken: z.ZodObject<z.objectUtil.extendShape<{
101
101
  };
102
102
  }>>;
103
103
  }>, "strict", z.ZodTypeAny, {
104
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange";
105
104
  $value: string | {
106
105
  color: string;
107
106
  blur: string | 0;
@@ -119,6 +118,8 @@ export declare const shadowToken: z.ZodObject<z.objectUtil.extendShape<{
119
118
  alpha?: any;
120
119
  inset?: boolean | undefined;
121
120
  }[];
121
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
122
+ $description?: string | undefined;
122
123
  deprecated?: string | boolean | undefined;
123
124
  $extensions?: {
124
125
  'org.primer.figma': {
@@ -126,9 +127,7 @@ export declare const shadowToken: z.ZodObject<z.objectUtil.extendShape<{
126
127
  collection?: string | undefined;
127
128
  };
128
129
  } | undefined;
129
- $description?: string | undefined;
130
130
  }, {
131
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange";
132
131
  $value: string | {
133
132
  color: string;
134
133
  blur: string | 0;
@@ -146,6 +145,8 @@ export declare const shadowToken: z.ZodObject<z.objectUtil.extendShape<{
146
145
  alpha?: any;
147
146
  inset?: boolean | undefined;
148
147
  }[];
148
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
149
+ $description?: string | undefined;
149
150
  deprecated?: string | boolean | undefined;
150
151
  $extensions?: {
151
152
  'org.primer.figma': {
@@ -153,5 +154,4 @@ export declare const shadowToken: z.ZodObject<z.objectUtil.extendShape<{
153
154
  collection?: string | undefined;
154
155
  };
155
156
  } | undefined;
156
- $description?: string | undefined;
157
157
  }>;
@@ -1,34 +1,31 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.shadowToken = exports.shadowValue = void 0;
4
- const zod_1 = require("zod");
5
- const baseToken_1 = require("./baseToken");
6
- const referenceValue_1 = require("./referenceValue");
7
- const colorHexValue_1 = require("./colorHexValue");
8
- const alphaValue_1 = require("./alphaValue");
9
- const dimensionValue_1 = require("./dimensionValue");
10
- const tokenType_1 = require("./tokenType");
11
- const collections_1 = require("./collections");
12
- exports.shadowValue = zod_1.z
1
+ import { z } from 'zod';
2
+ import { baseToken } from './baseToken.js';
3
+ import { referenceValue } from './referenceValue.js';
4
+ import { colorHexValue } from './colorHexValue.js';
5
+ import { alphaValue } from './alphaValue.js';
6
+ import { dimensionValue } from './dimensionValue.js';
7
+ import { tokenType } from './tokenType.js';
8
+ import { collection, mode } from './collections.js';
9
+ export const shadowValue = z
13
10
  .object({
14
- color: zod_1.z.union([colorHexValue_1.colorHexValue, referenceValue_1.referenceValue]),
15
- alpha: zod_1.z.union([alphaValue_1.alphaValue, referenceValue_1.referenceValue]),
16
- offsetX: zod_1.z.union([dimensionValue_1.dimensionValue, referenceValue_1.referenceValue]),
17
- offsetY: zod_1.z.union([dimensionValue_1.dimensionValue, referenceValue_1.referenceValue]),
18
- blur: zod_1.z.union([dimensionValue_1.dimensionValue, referenceValue_1.referenceValue]),
19
- spread: zod_1.z.union([dimensionValue_1.dimensionValue, referenceValue_1.referenceValue]),
20
- inset: zod_1.z.boolean().optional(),
11
+ color: z.union([colorHexValue, referenceValue]),
12
+ alpha: z.union([alphaValue, referenceValue]),
13
+ offsetX: z.union([dimensionValue, referenceValue]),
14
+ offsetY: z.union([dimensionValue, referenceValue]),
15
+ blur: z.union([dimensionValue, referenceValue]),
16
+ spread: z.union([dimensionValue, referenceValue]),
17
+ inset: z.boolean().optional(),
21
18
  })
22
19
  .strict();
23
- exports.shadowToken = baseToken_1.baseToken
20
+ export const shadowToken = baseToken
24
21
  .extend({
25
- $value: zod_1.z.union([exports.shadowValue, zod_1.z.array(exports.shadowValue), referenceValue_1.referenceValue]),
26
- $type: (0, tokenType_1.tokenType)('shadow'),
27
- $extensions: zod_1.z
22
+ $value: z.union([shadowValue, z.array(shadowValue), referenceValue]),
23
+ $type: tokenType('shadow'),
24
+ $extensions: z
28
25
  .object({
29
- 'org.primer.figma': zod_1.z.object({
30
- collection: (0, collections_1.collection)(['mode']).optional(),
31
- mode: (0, collections_1.mode)([
26
+ 'org.primer.figma': z.object({
27
+ collection: collection(['mode']).optional(),
28
+ mode: mode([
32
29
  'light',
33
30
  'dark',
34
31
  'dark dimmed',
@@ -4,15 +4,15 @@ export declare const stringToken: z.ZodObject<z.objectUtil.extendShape<{
4
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
- $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange">;
7
+ $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange">;
8
8
  }>, "strict", z.ZodTypeAny, {
9
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange";
10
9
  $value: string;
11
- deprecated?: string | boolean | undefined;
10
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
12
11
  $description?: string | undefined;
12
+ deprecated?: string | boolean | undefined;
13
13
  }, {
14
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "shadow" | "typography" | "duration" | "custom-viewportRange";
15
14
  $value: string;
16
- deprecated?: string | boolean | undefined;
15
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
17
16
  $description?: string | undefined;
17
+ deprecated?: string | boolean | undefined;
18
18
  }>;
@@ -1,13 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.stringToken = void 0;
4
- const zod_1 = require("zod");
5
- const baseToken_1 = require("./baseToken");
6
- const referenceValue_1 = require("./referenceValue");
7
- const tokenType_1 = require("./tokenType");
8
- exports.stringToken = baseToken_1.baseToken
1
+ import { z } from 'zod';
2
+ import { baseToken } from './baseToken.js';
3
+ import { referenceValue } from './referenceValue.js';
4
+ import { tokenType } from './tokenType.js';
5
+ export const stringToken = baseToken
9
6
  .extend({
10
- $value: zod_1.z.union([zod_1.z.string(), referenceValue_1.referenceValue]),
11
- $type: (0, tokenType_1.tokenType)('string'),
7
+ $value: z.union([z.string(), referenceValue]),
8
+ $type: tokenType('string'),
12
9
  })
13
10
  .strict();