@primer/primitives 11.4.0-rc.f798df25 → 11.4.1-rc.4e2d1de5

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 (198) hide show
  1. package/DESIGN_TOKENS_GUIDE.md +185 -0
  2. package/DESIGN_TOKENS_SPEC.md +565 -0
  3. package/dist/build/filters/hasLlmExtensions.d.ts +7 -0
  4. package/dist/build/filters/hasLlmExtensions.js +11 -0
  5. package/dist/build/filters/index.d.ts +1 -0
  6. package/dist/build/filters/index.js +1 -0
  7. package/dist/build/formats/index.d.ts +1 -0
  8. package/dist/build/formats/index.js +1 -0
  9. package/dist/build/formats/markdownLlmGuidelines.d.ts +11 -0
  10. package/dist/build/formats/markdownLlmGuidelines.js +1168 -0
  11. package/dist/build/platforms/index.d.ts +1 -0
  12. package/dist/build/platforms/index.js +1 -0
  13. package/dist/build/platforms/llmGuidelines.d.ts +2 -0
  14. package/dist/build/platforms/llmGuidelines.js +17 -0
  15. package/dist/build/preprocessors/inheritGroupProperties.d.ts +7 -0
  16. package/dist/build/preprocessors/inheritGroupProperties.js +70 -0
  17. package/dist/build/primerStyleDictionary.js +7 -1
  18. package/dist/build/schemas/borderToken.d.ts +22 -2
  19. package/dist/build/schemas/borderToken.js +6 -0
  20. package/dist/build/schemas/colorToken.d.ts +4 -0
  21. package/dist/build/schemas/colorToken.js +2 -0
  22. package/dist/build/schemas/cubicBezierToken.d.ts +6 -0
  23. package/dist/build/schemas/cubicBezierToken.js +10 -2
  24. package/dist/build/schemas/designToken.d.ts +1 -1
  25. package/dist/build/schemas/designToken.js +113 -21
  26. package/dist/build/schemas/dimensionToken.d.ts +14 -3
  27. package/dist/build/schemas/dimensionToken.js +6 -2
  28. package/dist/build/schemas/dimensionValue.d.ts +24 -1
  29. package/dist/build/schemas/dimensionValue.js +20 -1
  30. package/dist/build/schemas/durationToken.d.ts +13 -1
  31. package/dist/build/schemas/durationToken.js +6 -0
  32. package/dist/build/schemas/durationValue.d.ts +11 -1
  33. package/dist/build/schemas/durationValue.js +13 -3
  34. package/dist/build/schemas/fontFamilyToken.d.ts +4 -0
  35. package/dist/build/schemas/fontFamilyToken.js +2 -0
  36. package/dist/build/schemas/fontWeightToken.d.ts +4 -0
  37. package/dist/build/schemas/fontWeightToken.js +2 -0
  38. package/dist/build/schemas/gradientToken.d.ts +4 -0
  39. package/dist/build/schemas/gradientToken.js +2 -0
  40. package/dist/build/schemas/llmExtension.d.ts +9 -0
  41. package/dist/build/schemas/llmExtension.js +11 -0
  42. package/dist/build/schemas/numberToken.d.ts +4 -0
  43. package/dist/build/schemas/numberToken.js +2 -0
  44. package/dist/build/schemas/shadowToken.d.ts +676 -84
  45. package/dist/build/schemas/shadowToken.js +2 -0
  46. package/dist/build/schemas/stringToken.d.ts +6 -0
  47. package/dist/build/schemas/stringToken.js +6 -0
  48. package/dist/build/schemas/transitionToken.d.ts +20 -2
  49. package/dist/build/schemas/transitionToken.js +6 -0
  50. package/dist/build/schemas/typographyToken.d.ts +38 -4
  51. package/dist/build/schemas/typographyToken.js +6 -0
  52. package/dist/build/schemas/validTokenType.d.ts +5 -1
  53. package/dist/build/schemas/validTokenType.js +71 -17
  54. package/dist/build/schemas/viewportRangeToken.d.ts +6 -0
  55. package/dist/build/schemas/viewportRangeToken.js +6 -0
  56. package/dist/build/transformers/dimensionToPixelUnitless.d.ts +3 -2
  57. package/dist/build/transformers/dimensionToPixelUnitless.js +22 -26
  58. package/dist/build/transformers/dimensionToRem.d.ts +2 -1
  59. package/dist/build/transformers/dimensionToRem.js +21 -22
  60. package/dist/build/transformers/dimensionToRemPxArray.d.ts +2 -1
  61. package/dist/build/transformers/dimensionToRemPxArray.js +21 -22
  62. package/dist/build/transformers/durationToCss.d.ts +2 -1
  63. package/dist/build/transformers/durationToCss.js +18 -11
  64. package/dist/build/transformers/utilities/parseDimension.d.ts +12 -0
  65. package/dist/build/transformers/utilities/parseDimension.js +31 -0
  66. package/dist/build/types/dimensionTokenValue.d.ts +9 -0
  67. package/dist/css/base/motion/motion.css +5 -4
  68. package/dist/css/functional/size/border.css +9 -14
  69. package/dist/css/functional/size/radius.css +7 -0
  70. package/dist/css/functional/size/size-coarse.css +3 -3
  71. package/dist/css/functional/size/size-fine.css +3 -3
  72. package/dist/css/functional/size/viewport.css +1 -1
  73. package/dist/css/functional/themes/dark-colorblind-high-contrast.css +194 -190
  74. package/dist/css/functional/themes/dark-colorblind.css +194 -190
  75. package/dist/css/functional/themes/dark-dimmed-high-contrast.css +194 -190
  76. package/dist/css/functional/themes/dark-dimmed.css +194 -190
  77. package/dist/css/functional/themes/dark-high-contrast.css +194 -190
  78. package/dist/css/functional/themes/dark-tritanopia-high-contrast.css +194 -190
  79. package/dist/css/functional/themes/dark-tritanopia.css +194 -190
  80. package/dist/css/functional/themes/dark.css +194 -190
  81. package/dist/css/functional/themes/light-colorblind-high-contrast.css +194 -190
  82. package/dist/css/functional/themes/light-colorblind.css +194 -190
  83. package/dist/css/functional/themes/light-high-contrast.css +194 -190
  84. package/dist/css/functional/themes/light-tritanopia-high-contrast.css +194 -190
  85. package/dist/css/functional/themes/light-tritanopia.css +194 -190
  86. package/dist/css/functional/themes/light.css +194 -190
  87. package/dist/css/functional/typography/typography.css +4 -4
  88. package/dist/css/primitives.css +5 -0
  89. package/dist/docs/base/motion/motion.json +181 -32
  90. package/dist/docs/base/size/size.json +76 -19
  91. package/dist/docs/base/typography/typography.json +24 -6
  92. package/dist/docs/functional/size/border.json +62 -182
  93. package/dist/docs/functional/size/breakpoints.json +24 -6
  94. package/dist/docs/functional/size/radius.json +221 -0
  95. package/dist/docs/functional/size/size-coarse.json +45 -3
  96. package/dist/docs/functional/size/size-fine.json +45 -3
  97. package/dist/docs/functional/size/size.json +60 -15
  98. package/dist/docs/functional/size/viewport.json +2 -2
  99. package/dist/docs/functional/themes/dark-colorblind-high-contrast.json +1043 -97
  100. package/dist/docs/functional/themes/dark-colorblind.json +1043 -97
  101. package/dist/docs/functional/themes/dark-dimmed-high-contrast.json +1043 -97
  102. package/dist/docs/functional/themes/dark-dimmed.json +1081 -135
  103. package/dist/docs/functional/themes/dark-high-contrast.json +1043 -97
  104. package/dist/docs/functional/themes/dark-tritanopia-high-contrast.json +1043 -97
  105. package/dist/docs/functional/themes/dark-tritanopia.json +1043 -97
  106. package/dist/docs/functional/themes/dark.json +1043 -97
  107. package/dist/docs/functional/themes/light-colorblind-high-contrast.json +1049 -103
  108. package/dist/docs/functional/themes/light-colorblind.json +1049 -103
  109. package/dist/docs/functional/themes/light-high-contrast.json +1049 -103
  110. package/dist/docs/functional/themes/light-tritanopia-high-contrast.json +1049 -103
  111. package/dist/docs/functional/themes/light-tritanopia.json +1049 -103
  112. package/dist/docs/functional/themes/light.json +1049 -103
  113. package/dist/docs/functional/typography/typography.json +180 -10
  114. package/dist/fallbacks/base/motion/motion.json +49 -12
  115. package/dist/fallbacks/functional/size/border.json +0 -5
  116. package/dist/fallbacks/functional/size/radius.json +7 -0
  117. package/dist/fallbacks/functional/size/viewport.json +1 -1
  118. package/dist/figma/dimension/dimension.json +30 -20
  119. package/dist/figma/themes/dark-colorblind.json +85 -0
  120. package/dist/figma/themes/dark-dimmed.json +134 -49
  121. package/dist/figma/themes/dark-high-contrast.json +85 -0
  122. package/dist/figma/themes/dark-tritanopia.json +85 -0
  123. package/dist/figma/themes/dark.json +85 -0
  124. package/dist/figma/themes/light-colorblind.json +89 -4
  125. package/dist/figma/themes/light-high-contrast.json +89 -4
  126. package/dist/figma/themes/light-tritanopia.json +89 -4
  127. package/dist/figma/themes/light.json +89 -4
  128. package/dist/figma/typography/typography.json +44 -40
  129. package/dist/internalCss/dark-colorblind-high-contrast.css +208 -218
  130. package/dist/internalCss/dark-colorblind.css +208 -218
  131. package/dist/internalCss/dark-dimmed-high-contrast.css +208 -218
  132. package/dist/internalCss/dark-dimmed.css +208 -218
  133. package/dist/internalCss/dark-high-contrast.css +208 -218
  134. package/dist/internalCss/dark-tritanopia-high-contrast.css +208 -218
  135. package/dist/internalCss/dark-tritanopia.css +208 -218
  136. package/dist/internalCss/dark.css +208 -218
  137. package/dist/internalCss/light-colorblind-high-contrast.css +208 -218
  138. package/dist/internalCss/light-colorblind.css +208 -218
  139. package/dist/internalCss/light-high-contrast.css +208 -218
  140. package/dist/internalCss/light-tritanopia-high-contrast.css +208 -218
  141. package/dist/internalCss/light-tritanopia.css +208 -218
  142. package/dist/internalCss/light.css +208 -218
  143. package/dist/styleLint/base/motion/motion.json +181 -32
  144. package/dist/styleLint/base/size/size.json +76 -19
  145. package/dist/styleLint/base/typography/typography.json +30 -12
  146. package/dist/styleLint/functional/size/border.json +55 -175
  147. package/dist/styleLint/functional/size/breakpoints.json +24 -6
  148. package/dist/styleLint/functional/size/radius.json +221 -0
  149. package/dist/styleLint/functional/size/size-coarse.json +45 -3
  150. package/dist/styleLint/functional/size/size-fine.json +45 -3
  151. package/dist/styleLint/functional/size/size.json +111 -66
  152. package/dist/styleLint/functional/size/viewport.json +2 -2
  153. package/dist/styleLint/functional/themes/dark-colorblind-high-contrast.json +975 -29
  154. package/dist/styleLint/functional/themes/dark-colorblind.json +975 -29
  155. package/dist/styleLint/functional/themes/dark-dimmed-high-contrast.json +975 -29
  156. package/dist/styleLint/functional/themes/dark-dimmed.json +1013 -67
  157. package/dist/styleLint/functional/themes/dark-high-contrast.json +975 -29
  158. package/dist/styleLint/functional/themes/dark-tritanopia-high-contrast.json +975 -29
  159. package/dist/styleLint/functional/themes/dark-tritanopia.json +975 -29
  160. package/dist/styleLint/functional/themes/dark.json +975 -29
  161. package/dist/styleLint/functional/themes/light-colorblind-high-contrast.json +981 -35
  162. package/dist/styleLint/functional/themes/light-colorblind.json +981 -35
  163. package/dist/styleLint/functional/themes/light-high-contrast.json +981 -35
  164. package/dist/styleLint/functional/themes/light-tritanopia-high-contrast.json +981 -35
  165. package/dist/styleLint/functional/themes/light-tritanopia.json +981 -35
  166. package/dist/styleLint/functional/themes/light.json +981 -35
  167. package/dist/styleLint/functional/typography/typography.json +196 -26
  168. package/package.json +6 -3
  169. package/src/tokens/base/motion/easing.json5 +39 -4
  170. package/src/tokens/base/motion/timing.json5 +12 -12
  171. package/src/tokens/base/size/size.json5 +19 -19
  172. package/src/tokens/base/typography/typography.json5 +6 -6
  173. package/src/tokens/functional/border/border.json5 +25 -0
  174. package/src/tokens/functional/color/bgColor.json5 +165 -0
  175. package/src/tokens/functional/color/borderColor.json5 +146 -0
  176. package/src/tokens/functional/color/control.json5 +24 -0
  177. package/src/tokens/functional/color/data-vis.json5 +7 -0
  178. package/src/tokens/functional/color/display.json5 +7 -0
  179. package/src/tokens/functional/color/fgColor.json5 +101 -1
  180. package/src/tokens/functional/color/focus.json5 +5 -0
  181. package/src/tokens/functional/color/selection.json5 +5 -0
  182. package/src/tokens/functional/color/syntax.json5 +14 -0
  183. package/src/tokens/functional/shadow/shadow.json5 +49 -4
  184. package/src/tokens/functional/size/border.json5 +22 -74
  185. package/src/tokens/functional/size/breakpoints.json5 +6 -6
  186. package/src/tokens/functional/size/radius.json5 +90 -0
  187. package/src/tokens/functional/size/size-coarse.json5 +24 -3
  188. package/src/tokens/functional/size/size-fine.json5 +45 -24
  189. package/src/tokens/functional/size/size.json5 +50 -15
  190. package/src/tokens/functional/size/viewport.json5 +1 -1
  191. package/src/tokens/functional/typography/font-stack.json5 +60 -0
  192. package/src/tokens/functional/typography/typography.json5 +71 -44
  193. package/dist/build/parsers/index.d.ts +0 -1
  194. package/dist/build/parsers/index.js +0 -1
  195. package/dist/build/parsers/w3cJsonParser.d.ts +0 -6
  196. package/dist/build/parsers/w3cJsonParser.js +0 -25
  197. package/dist/removed/testing.json5 +0 -4
  198. package/src/tokens/removed/testing.json5 +0 -4
@@ -0,0 +1,60 @@
1
+ {
2
+ fontStack: {
3
+ system: {
4
+ $value: "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'",
5
+ $type: 'fontFamily',
6
+ $description: 'System font stack optimized for cross-platform rendering. Primary font for all UI text.',
7
+ $extensions: {
8
+ 'org.primer.figma': {
9
+ collection: 'typography',
10
+ scopes: ['fontFamily'],
11
+ },
12
+ },
13
+ },
14
+ sansSerif: {
15
+ $value: "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'",
16
+ $type: 'fontFamily',
17
+ $description: 'Sans-serif font stack for body text and general UI elements.',
18
+ $extensions: {
19
+ 'org.primer.figma': {
20
+ collection: 'typography',
21
+ scopes: ['fontFamily'],
22
+ },
23
+ 'org.primer.llm': {
24
+ usage: ['body-text', 'form-inputs', 'labels', 'paragraphs'],
25
+ rules: 'Default font stack for all UI text. Use for body text and standard UI elements. MUST use for readable content.',
26
+ },
27
+ },
28
+ },
29
+ sansSerifDisplay: {
30
+ $value: "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'",
31
+ $type: 'fontFamily',
32
+ $description: 'Display font stack for headings and titles. Same as sansSerif but semantically distinct.',
33
+ $extensions: {
34
+ 'org.primer.figma': {
35
+ collection: 'typography',
36
+ scopes: ['fontFamily'],
37
+ },
38
+ 'org.primer.llm': {
39
+ usage: ['heading', 'title', 'display-text', 'hero-text'],
40
+ rules: 'Use for headings and display text. Prefer over sansSerif for titles.',
41
+ },
42
+ },
43
+ },
44
+ monospace: {
45
+ $value: 'ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace',
46
+ $type: 'fontFamily',
47
+ $description: 'Monospace font stack for code, technical content, and tabular data.',
48
+ $extensions: {
49
+ 'org.primer.figma': {
50
+ collection: 'typography',
51
+ scopes: ['fontFamily'],
52
+ },
53
+ 'org.primer.llm': {
54
+ usage: ['code-block', 'inline-code', 'terminal', 'technical-data', 'tabular-numbers'],
55
+ rules: 'MUST use for all code display. Use for technical content requiring fixed-width characters.',
56
+ },
57
+ },
58
+ },
59
+ },
60
+ }
@@ -1,46 +1,4 @@
1
1
  {
2
- fontStack: {
3
- system: {
4
- $value: "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'",
5
- $type: 'fontFamily',
6
- $extensions: {
7
- 'org.primer.figma': {
8
- collection: 'typography',
9
- scopes: ['fontFamily'],
10
- },
11
- },
12
- },
13
- sansSerif: {
14
- $value: "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'",
15
- $type: 'fontFamily',
16
- $extensions: {
17
- 'org.primer.figma': {
18
- collection: 'typography',
19
- scopes: ['fontFamily'],
20
- },
21
- },
22
- },
23
- sansSerifDisplay: {
24
- $value: "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'",
25
- $type: 'fontFamily',
26
- $extensions: {
27
- 'org.primer.figma': {
28
- collection: 'typography',
29
- scopes: ['fontFamily'],
30
- },
31
- },
32
- },
33
- monospace: {
34
- $value: 'ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace',
35
- $type: 'fontFamily',
36
- $extensions: {
37
- 'org.primer.figma': {
38
- collection: 'typography',
39
- scopes: ['fontFamily'],
40
- },
41
- },
42
- },
43
- },
44
2
  text: {
45
3
  display: {
46
4
  lineBoxHeight: {
@@ -99,6 +57,12 @@
99
57
  },
100
58
  $type: 'typography',
101
59
  $description: 'Hero-style text for brand to product transition pages. Utilize Title (large) styles on narrow viewports.',
60
+ $extensions: {
61
+ 'org.primer.llm': {
62
+ usage: ['hero-section', 'landing-page', 'marketing-header'],
63
+ rules: 'Use sparingly for hero sections. Switch to title.large on narrow viewports.',
64
+ },
65
+ },
102
66
  },
103
67
  },
104
68
  title: {
@@ -217,6 +181,12 @@
217
181
  },
218
182
  $type: 'typography',
219
183
  $description: 'Page headings for user-created objects, such as issues or pull requests. Utilize title (medium) styles on narrow viewports.',
184
+ $extensions: {
185
+ 'org.primer.llm': {
186
+ usage: ['page-heading', 'issue-title', 'pr-title', 'h1'],
187
+ rules: 'Use for primary page headings. Switch to title.medium on narrow viewports.',
188
+ },
189
+ },
220
190
  },
221
191
  medium: {
222
192
  $value: {
@@ -227,6 +197,12 @@
227
197
  },
228
198
  $type: 'typography',
229
199
  $description: 'Default page title. The 32px-equivalent line-height matches with button and other medium control heights. Great for page header composition.',
200
+ $extensions: {
201
+ 'org.primer.llm': {
202
+ usage: ['section-heading', 'card-title', 'dialog-title', 'h2'],
203
+ rules: 'RECOMMENDED default for page titles. Use for section headings and dialog titles.',
204
+ },
205
+ },
230
206
  },
231
207
  small: {
232
208
  $value: {
@@ -237,6 +213,12 @@
237
213
  },
238
214
  $type: 'typography',
239
215
  $description: 'Uses the same size as body (large) with a heavier weight of semibold (600).',
216
+ $extensions: {
217
+ 'org.primer.llm': {
218
+ usage: ['subsection-heading', 'list-title', 'h3', 'sidebar-heading'],
219
+ rules: 'Use for smaller headings within sections. Same size as body.large but semibold.',
220
+ },
221
+ },
240
222
  },
241
223
  },
242
224
  },
@@ -283,6 +265,12 @@
283
265
  },
284
266
  $type: 'typography',
285
267
  $description: 'Page sections/sub headings, or less important object names in page titles (automated action titles, for example). Same line-height as title (medium).',
268
+ $extensions: {
269
+ 'org.primer.llm': {
270
+ usage: ['subtitle', 'description', 'secondary-heading', 'lead-text'],
271
+ rules: 'Use below titles for supporting text. Normal weight distinguishes from title styles.',
272
+ },
273
+ },
286
274
  },
287
275
  },
288
276
  body: {
@@ -379,6 +367,12 @@
379
367
  },
380
368
  $type: 'typography',
381
369
  $description: 'User-generated content, markdown rendering.',
370
+ $extensions: {
371
+ 'org.primer.llm': {
372
+ usage: ['markdown-content', 'article-text', 'readme', 'comment-body'],
373
+ rules: 'Use for user-generated content and markdown. Better readability for longer text.',
374
+ },
375
+ },
382
376
  },
383
377
  medium: {
384
378
  $value: {
@@ -389,6 +383,12 @@
389
383
  },
390
384
  $type: 'typography',
391
385
  $description: 'Default UI font. Most commonly used for body text.',
386
+ $extensions: {
387
+ 'org.primer.llm': {
388
+ usage: ['body-text', 'ui-text', 'form-label', 'button-text', 'navigation'],
389
+ rules: 'RECOMMENDED default for UI text. Use for buttons, labels, and general interface text.',
390
+ },
391
+ },
392
392
  },
393
393
  small: {
394
394
  $value: {
@@ -399,6 +399,12 @@
399
399
  },
400
400
  $type: 'typography',
401
401
  $description: 'Small body text for discrete UI applications, such as helper, footnote text. Should be used sparingly across pages. Line-height matches Body (medium) at 20px.',
402
+ $extensions: {
403
+ 'org.primer.llm': {
404
+ usage: ['helper-text', 'footnote', 'metadata', 'timestamp'],
405
+ rules: 'Use sparingly for secondary information. Do NOT use for primary content or interactive elements.',
406
+ },
407
+ },
402
408
  },
403
409
  },
404
410
  },
@@ -445,11 +451,17 @@
445
451
  },
446
452
  $type: 'typography',
447
453
  $description: 'Compact small font with a smaller line height of 16px. Use it for single-line scenarios, as the small sizing doesn’t pass accessibility requirements.',
454
+ $extensions: {
455
+ 'org.primer.llm': {
456
+ usage: ['caption', 'label', 'badge-text', 'single-line-metadata'],
457
+ rules: 'Use only for single-line or short text. Does NOT meet accessibility requirements for body text.',
458
+ },
459
+ },
448
460
  },
449
461
  },
450
462
  codeBlock: {
451
463
  size: {
452
- $value: '13px',
464
+ $value: {value: 13, unit: 'px'},
453
465
  $type: 'dimension',
454
466
  $extensions: {
455
467
  'org.primer.figma': {
@@ -490,11 +502,20 @@
490
502
  },
491
503
  $type: 'typography',
492
504
  $description: 'Default style for rendering code blocks.',
505
+ $extensions: {
506
+ 'org.primer.llm': {
507
+ usage: ['code-block', 'pre-element', 'code-snippet', 'terminal-output'],
508
+ rules: 'MUST use for multi-line code. Use monospace font stack.',
509
+ },
510
+ },
493
511
  },
494
512
  },
495
513
  codeInline: {
496
514
  size: {
497
- $value: '0.9285em',
515
+ $value: {
516
+ value: 0.9285,
517
+ unit: 'em',
518
+ },
498
519
  $type: 'dimension',
499
520
  $extensions: {
500
521
  'org.primer.figma': {
@@ -521,6 +542,12 @@
521
542
  },
522
543
  $type: 'typography',
523
544
  $description: 'Inline code blocks using em units to inherit size from its parent.',
545
+ $extensions: {
546
+ 'org.primer.llm': {
547
+ usage: ['inline-code', 'code-element', 'variable-name', 'command'],
548
+ rules: 'Use for inline code within text. Size inherits from parent using em units.',
549
+ },
550
+ },
524
551
  },
525
552
  },
526
553
  },
@@ -1 +0,0 @@
1
- export { w3cJsonParser } from './w3cJsonParser.js';
@@ -1 +0,0 @@
1
- export { w3cJsonParser } from './w3cJsonParser.js';
@@ -1,6 +0,0 @@
1
- import type { Parser } from 'style-dictionary/types';
2
- /**
3
- * @description Parses a valid [json5](https://json5.org) file and replaces `$value` with `value` and `$description` with `comment` to make a w3c standard file compatible with style dictionary
4
- * @pattern supported file extensions `.json` or `.json5`
5
- */
6
- export declare const w3cJsonParser: Parser;
@@ -1,25 +0,0 @@
1
- import JSON5 from 'json5';
2
- /**
3
- * @description Parses a valid [json5](https://json5.org) file and replaces `$value` with `value` and `$description` with `comment` to make a w3c standard file compatible with style dictionary
4
- * @pattern supported file extensions `.json` or `.json5`
5
- */
6
- export const w3cJsonParser = {
7
- name: 'w3cJsonParser',
8
- pattern: /\.json5?$/,
9
- parser: ({ filePath, contents }) => {
10
- // replace $value with value so that style dictionary recognizes it
11
- try {
12
- contents = contents
13
- .replace(/["|']?\$value["|']?:/g, '"value":')
14
- // convert $description to comment
15
- .replace(/["|']?\$?description["|']?:/g, '"comment":')
16
- .replace(/["|']?\$?type["|']?:/g, '"$type":')
17
- .replace(/["|']?\$?extensions["|']?:/g, '"$extensions":');
18
- //
19
- return JSON5.parse(contents);
20
- }
21
- catch (error) {
22
- throw new Error(`Invalid json5 file "${filePath}". Error: ${error}`);
23
- }
24
- },
25
- };
@@ -1,4 +0,0 @@
1
- /* rename token to trigger actions to run on token change */
2
- {
3
- "testing": null
4
- }
@@ -1,4 +0,0 @@
1
- /* rename token to trigger actions to run on token change */
2
- {
3
- "testing": null
4
- }