@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
@@ -3,6 +3,7 @@
3
3
  default: {
4
4
  $value: '{base.color.neutral.13}',
5
5
  $type: 'color',
6
+ $description: 'Default text color for primary content and headings',
6
7
  $extensions: {
7
8
  'org.primer.figma': {
8
9
  collection: 'mode',
@@ -17,14 +18,19 @@
17
18
  'dark-high-contrast': '{base.color.neutral.13}',
18
19
  'dark-tritanopia-high-contrast': '{base.color.neutral.13}',
19
20
  'dark-protanopia-deuteranopia-high-contrast': '{base.color.neutral.13}',
20
- 'dark-dimmed': '{base.color.neutral.11}',
21
+ 'dark-dimmed': '{base.color.neutral.12}',
21
22
  'dark-dimmed-high-contrast': '{base.color.neutral.12}',
22
23
  },
24
+ 'org.primer.llm': {
25
+ usage: ['default-text', 'heading', 'body-text'],
26
+ rules: 'RECOMMENDED default for all text. Use for headings, body text, and primary labels.',
27
+ },
23
28
  },
24
29
  },
25
30
  muted: {
26
31
  $value: '{base.color.neutral.9}',
27
32
  $type: 'color',
33
+ $description: 'Muted text for secondary content and less important information',
28
34
  $extensions: {
29
35
  'org.primer.figma': {
30
36
  collection: 'mode',
@@ -43,11 +49,16 @@
43
49
  'dark-tritanopia-high-contrast': '{base.color.neutral.10}',
44
50
  'dark-protanopia-deuteranopia-high-contrast': '{base.color.neutral.10}',
45
51
  },
52
+ 'org.primer.llm': {
53
+ usage: ['muted-text', 'secondary-text', 'helper-text', 'placeholder'],
54
+ rules: 'Use for secondary text like timestamps, metadata, and helper text. Do NOT use for primary content.',
55
+ },
46
56
  },
47
57
  },
48
58
  onEmphasis: {
49
59
  $value: '{base.color.neutral.0}',
50
60
  $type: 'color',
61
+ $description: 'Text color for use on emphasis backgrounds',
51
62
  $extensions: {
52
63
  'org.primer.figma': {
53
64
  collection: 'mode',
@@ -62,22 +73,32 @@
62
73
  'dark-dimmed': '{base.color.neutral.12}',
63
74
  'dark-dimmed-high-contrast': '#ffffff',
64
75
  },
76
+ 'org.primer.llm': {
77
+ usage: ['text-on-emphasis', 'contrast-text'],
78
+ rules: 'MUST use for text on any emphasis background (bgColor.*.emphasis). Ensures accessibility contrast.',
79
+ },
65
80
  },
66
81
  },
67
82
  onInverse: {
68
83
  $value: '{base.color.neutral.0}',
69
84
  $type: 'color',
85
+ $description: 'Text color for use on inverse backgrounds',
70
86
  $extensions: {
71
87
  'org.primer.figma': {
72
88
  collection: 'mode',
73
89
  group: 'semantic',
74
90
  scopes: ['fgColor'],
75
91
  },
92
+ 'org.primer.llm': {
93
+ usage: ['text-on-inverse', 'inverse-text'],
94
+ rules: 'Use for text on bgColor.inverse. Provides appropriate contrast in both themes.',
95
+ },
76
96
  },
77
97
  },
78
98
  white: {
79
99
  $value: '{base.color.neutral.0}',
80
100
  $type: 'color',
101
+ $description: 'Pure white text',
81
102
  $extensions: {
82
103
  'org.primer.figma': {
83
104
  collection: 'mode',
@@ -87,11 +108,16 @@
87
108
  'org.primer.overrides': {
88
109
  dark: '{base.color.neutral.13}',
89
110
  },
111
+ 'org.primer.llm': {
112
+ doNotUse: true,
113
+ rules: 'Avoid using raw white. Use semantic alternatives: fgColor.onEmphasis for text on dark backgrounds, fgColor.onInverse for inverted contexts. Raw black/white ignore theme preferences and accessibility settings.',
114
+ },
90
115
  },
91
116
  },
92
117
  black: {
93
118
  $value: '{base.color.neutral.13}',
94
119
  $type: 'color',
120
+ $description: 'Pure black text',
95
121
  $extensions: {
96
122
  'org.primer.figma': {
97
123
  collection: 'mode',
@@ -101,11 +127,16 @@
101
127
  'org.primer.overrides': {
102
128
  dark: '{base.color.neutral.0}',
103
129
  },
130
+ 'org.primer.llm': {
131
+ doNotUse: true,
132
+ rules: 'Avoid using raw black. Use semantic alternatives: fgColor.default for standard text, fgColor.muted for secondary text. Raw black/white ignore theme preferences and accessibility settings.',
133
+ },
104
134
  },
105
135
  },
106
136
  disabled: {
107
137
  $value: '{base.color.neutral.8}',
108
138
  $type: 'color',
139
+ $description: 'Text color for disabled interactive elements',
109
140
  $extensions: {
110
141
  'org.primer.figma': {
111
142
  collection: 'mode',
@@ -125,11 +156,16 @@
125
156
  'dark-tritanopia-high-contrast': '{base.color.neutral.8}',
126
157
  'dark-protanopia-deuteranopia-high-contrast': '{base.color.neutral.8}',
127
158
  },
159
+ 'org.primer.llm': {
160
+ usage: ['disabled-text', 'inactive-text', 'unavailable'],
161
+ rules: 'MUST use for disabled state text. Pair with bgColor.disabled. Do NOT use for active elements.',
162
+ },
128
163
  },
129
164
  },
130
165
  link: {
131
166
  $value: '{fgColor.accent}',
132
167
  $type: 'color',
168
+ $description: 'Text color for hyperlinks',
133
169
  $extensions: {
134
170
  'org.primer.figma': {
135
171
  collection: 'mode',
@@ -139,11 +175,16 @@
139
175
  web: 'var(--fgColor-link) /* utility class: .color-fg-accent */',
140
176
  },
141
177
  },
178
+ 'org.primer.llm': {
179
+ usage: ['link-text', 'hyperlink'],
180
+ rules: 'MUST use for all text links. Provides expected link affordance.',
181
+ },
142
182
  },
143
183
  },
144
184
  neutral: {
145
185
  $value: '{base.color.neutral.9}',
146
186
  $type: 'color',
187
+ $description: 'Neutral semantic text for icons and secondary elements',
147
188
  $extensions: {
148
189
  'org.primer.figma': {
149
190
  collection: 'mode',
@@ -159,11 +200,16 @@
159
200
  'dark-tritanopia-high-contrast': '{base.color.neutral.11}',
160
201
  'dark-protanopia-deuteranopia-high-contrast': '{base.color.neutral.11}',
161
202
  },
203
+ 'org.primer.llm': {
204
+ usage: ['neutral-icon', 'neutral-text'],
205
+ rules: 'Use for neutral semantic elements. Prefer fgColor.muted for secondary text.',
206
+ },
162
207
  },
163
208
  },
164
209
  accent: {
165
210
  $value: '{base.color.blue.5}',
166
211
  $type: 'color',
212
+ $description: 'Accent text for links and interactive elements',
167
213
  $extensions: {
168
214
  'org.primer.figma': {
169
215
  collection: 'mode',
@@ -184,11 +230,16 @@
184
230
  'light-tritanopia-high-contrast': '{base.color.blue.6}',
185
231
  'light-protanopia-deuteranopia-high-contrast': '{base.color.blue.6}',
186
232
  },
233
+ 'org.primer.llm': {
234
+ usage: ['accent-text', 'info-text', 'accent-icon'],
235
+ rules: 'Use for accent-colored text and icons. Pair with bgColor.accent.muted for backgrounds.',
236
+ },
187
237
  },
188
238
  },
189
239
  success: {
190
240
  $value: '{base.color.green.5}',
191
241
  $type: 'color',
242
+ $description: 'Success text for positive feedback and completed states',
192
243
  $extensions: {
193
244
  'org.primer.figma': {
194
245
  collection: 'mode',
@@ -212,11 +263,16 @@
212
263
  'light-tritanopia': '{base.color.blue.5}',
213
264
  'light-tritanopia-high-contrast': '{base.color.blue.6}',
214
265
  },
266
+ 'org.primer.llm': {
267
+ usage: ['success-text', 'positive-text', 'success-icon'],
268
+ rules: 'Use for success states and positive feedback text. Pair with bgColor.success.muted for backgrounds.',
269
+ },
215
270
  },
216
271
  },
217
272
  open: {
218
273
  $value: '{fgColor.success}',
219
274
  $type: 'color',
275
+ $description: 'Text color for open state indicators (issues, PRs)',
220
276
  $extensions: {
221
277
  'org.primer.figma': {
222
278
  collection: 'mode',
@@ -236,11 +292,16 @@
236
292
  'light-tritanopia': '{base.color.red.5}',
237
293
  'light-tritanopia-high-contrast': '{base.color.red.6}',
238
294
  },
295
+ 'org.primer.llm': {
296
+ usage: ['open-text', 'open-issue', 'open-pr'],
297
+ rules: 'Use for open/active status text. Specifically for GitHub issues and PRs.',
298
+ },
239
299
  },
240
300
  },
241
301
  attention: {
242
302
  $value: '{base.color.yellow.5}',
243
303
  $type: 'color',
304
+ $description: 'Attention text for warnings and caution states',
244
305
  $extensions: {
245
306
  'org.primer.figma': {
246
307
  collection: 'mode',
@@ -257,11 +318,16 @@
257
318
  'light-tritanopia-high-contrast': '{base.color.yellow.6}',
258
319
  'dark-dimmed-high-contrast': '{base.color.yellow.1}',
259
320
  },
321
+ 'org.primer.llm': {
322
+ usage: ['attention-text', 'warning-text', 'caution-text'],
323
+ rules: 'Use for warning and caution text. Pair with bgColor.attention.muted for backgrounds.',
324
+ },
260
325
  },
261
326
  },
262
327
  severe: {
263
328
  $value: '{base.color.orange.5}',
264
329
  $type: 'color',
330
+ $description: 'Severe text for high-priority warnings',
265
331
  $extensions: {
266
332
  'org.primer.figma': {
267
333
  collection: 'mode',
@@ -283,11 +349,16 @@
283
349
  'light-tritanopia-high-contrast': '{base.color.red.6}',
284
350
  'light-protanopia-deuteranopia-high-contrast': '{base.color.orange.6}',
285
351
  },
352
+ 'org.primer.llm': {
353
+ usage: ['severe-text', 'urgent-text', 'severe-icon'],
354
+ rules: 'Use for severe warnings, less critical than danger. Pair with bgColor.severe.muted for backgrounds.',
355
+ },
286
356
  },
287
357
  },
288
358
  danger: {
289
359
  $value: '#d1242f',
290
360
  $type: 'color',
361
+ $description: 'Danger text for errors and destructive actions',
291
362
  $extensions: {
292
363
  'org.primer.figma': {
293
364
  collection: 'mode',
@@ -309,11 +380,16 @@
309
380
  'light-high-contrast': '{base.color.red.6}',
310
381
  'light-tritanopia-high-contrast': '{base.color.red.6}',
311
382
  },
383
+ 'org.primer.llm': {
384
+ usage: ['danger-text', 'error-text', 'destructive-text'],
385
+ rules: 'Use for error messages and destructive action text. Pair with bgColor.danger.muted for backgrounds.',
386
+ },
312
387
  },
313
388
  },
314
389
  closed: {
315
390
  $value: '{fgColor.danger}',
316
391
  $type: 'color',
392
+ $description: 'Text color for closed state indicators (issues, PRs)',
317
393
  $extensions: {
318
394
  'org.primer.figma': {
319
395
  collection: 'mode',
@@ -333,11 +409,16 @@
333
409
  'light-tritanopia': '{fgColor.muted}',
334
410
  'light-tritanopia-high-contrast': '{fgColor.muted}',
335
411
  },
412
+ 'org.primer.llm': {
413
+ usage: ['closed-text', 'closed-issue', 'closed-pr'],
414
+ rules: 'Use for closed/declined status text. Specifically for GitHub issues and PRs.',
415
+ },
336
416
  },
337
417
  },
338
418
  draft: {
339
419
  $value: '{fgColor.neutral}',
340
420
  $type: 'color',
421
+ $description: 'Text color for draft state indicators',
341
422
  $extensions: {
342
423
  'org.primer.figma': {
343
424
  collection: 'mode',
@@ -347,11 +428,16 @@
347
428
  web: 'var(--fgColor-draft)',
348
429
  },
349
430
  },
431
+ 'org.primer.llm': {
432
+ usage: ['draft-text', 'draft-pr', 'draft-issue'],
433
+ rules: 'Use for draft/WIP status text. Conveys incomplete or pending state.',
434
+ },
350
435
  },
351
436
  },
352
437
  done: {
353
438
  $value: '{base.color.purple.5}',
354
439
  $type: 'color',
440
+ $description: 'Text color for completed/done state indicators',
355
441
  $extensions: {
356
442
  'org.primer.figma': {
357
443
  collection: 'mode',
@@ -371,11 +457,16 @@
371
457
  'light-protanopia-deuteranopia-high-contrast': '{base.color.purple.6}',
372
458
  'light-tritanopia-high-contrast': '{base.color.purple.6}',
373
459
  },
460
+ 'org.primer.llm': {
461
+ usage: ['done-text', 'merged', 'completed'],
462
+ rules: 'Use for completed/done status text. Conveys finished or merged state.',
463
+ },
374
464
  },
375
465
  },
376
466
  upsell: {
377
467
  $value: '{fgColor.done}',
378
468
  $type: 'color',
469
+ $description: 'Text color for upsell and promotional content',
379
470
  $extensions: {
380
471
  'org.primer.figma': {
381
472
  collection: 'mode',
@@ -385,11 +476,16 @@
385
476
  web: 'var(--fgColor-upsell)',
386
477
  },
387
478
  },
479
+ 'org.primer.llm': {
480
+ usage: ['upsell-text', 'premium-text', 'promotional'],
481
+ rules: 'Use for upgrade prompts and premium feature text. Do NOT use for regular content.',
482
+ },
388
483
  },
389
484
  },
390
485
  sponsors: {
391
486
  $value: '{base.color.pink.5}',
392
487
  $type: 'color',
488
+ $description: 'Text color for GitHub Sponsors content',
393
489
  $extensions: {
394
490
  'org.primer.figma': {
395
491
  collection: 'mode',
@@ -409,6 +505,10 @@
409
505
  'light-protanopia-deuteranopia-high-contrast': '{base.color.pink.6}',
410
506
  'light-tritanopia-high-contrast': '{base.color.pink.6}',
411
507
  },
508
+ 'org.primer.llm': {
509
+ usage: ['sponsors-text', 'funding-text', 'sponsors-icon'],
510
+ rules: 'Use for GitHub Sponsors related text. Do NOT use for general pink-colored text.',
511
+ },
412
512
  },
413
513
  },
414
514
  },
@@ -3,12 +3,17 @@
3
3
  outlineColor: {
4
4
  $value: '{borderColor.accent.emphasis}',
5
5
  $type: 'color',
6
+ $description: 'Outline color for focus states on interactive elements',
6
7
  $extensions: {
7
8
  'org.primer.figma': {
8
9
  collection: 'mode',
9
10
  group: 'component (internal)',
10
11
  scopes: ['borderColor', 'effectColor'],
11
12
  },
13
+ 'org.primer.llm': {
14
+ usage: ['focus-ring', 'keyboard-navigation', 'accessibility-indicator'],
15
+ rules: 'Use for focus outlines on interactive elements like buttons, links, and form controls. MUST be visible for keyboard navigation accessibility. Do NOT use for decorative borders or non-interactive elements.',
16
+ },
12
17
  },
13
18
  },
14
19
  },
@@ -3,6 +3,7 @@
3
3
  bgColor: {
4
4
  $value: '{bgColor.accent.emphasis}',
5
5
  $type: 'color',
6
+ $description: 'Background color for text selection highlights',
6
7
  $extensions: {
7
8
  'org.primer.figma': {
8
9
  collection: 'mode',
@@ -15,6 +16,10 @@
15
16
  alpha: 0.7,
16
17
  },
17
18
  },
19
+ 'org.primer.llm': {
20
+ usage: ['text-selection', 'highlighted-text', 'selected-content'],
21
+ rules: 'Use for native text selection (::selection) and programmatic text highlighting. Do NOT use for general emphasis or background colors on containers.',
22
+ },
18
23
  },
19
24
  alpha: 0.2,
20
25
  },
@@ -1,6 +1,13 @@
1
1
  {
2
2
  color: {
3
3
  ansi: {
4
+ $description: 'ANSI terminal color palette for command-line interfaces and terminal emulators. Maps standard ANSI color names to theme-appropriate values.',
5
+ $extensions: {
6
+ 'org.primer.llm': {
7
+ usage: ['terminal-output', 'cli-interface', 'console-text', 'shell-prompt'],
8
+ rules: 'Use exclusively for terminal/CLI contexts. Do NOT use for general UI—use semantic colors (fgColor, bgColor) instead. These colors follow ANSI naming conventions (black, red, green, yellow, blue, magenta, cyan, white) with bright variants.',
9
+ },
10
+ },
4
11
  black: {
5
12
  $value: '{base.color.neutral.13}',
6
13
  $type: 'color',
@@ -248,6 +255,13 @@
248
255
  },
249
256
  },
250
257
  prettylights: {
258
+ $description: 'Syntax highlighting colors for code display. Used by GitHub code rendering (prettylights theme).',
259
+ $extensions: {
260
+ 'org.primer.llm': {
261
+ usage: ['code-syntax-highlighting', 'code-block', 'inline-code', 'diff-view'],
262
+ rules: 'Use exclusively for syntax highlighting in code display contexts. Do NOT use for general UI text or backgrounds. Each token maps to a specific syntax element (comment, keyword, string, etc.).',
263
+ },
264
+ },
251
265
  syntax: {
252
266
  comment: {
253
267
  $value: '{base.color.neutral.9}',
@@ -11,6 +11,7 @@
11
11
  inset: true,
12
12
  },
13
13
  $type: 'shadow',
14
+ $description: 'Inset shadow for recessed elements',
14
15
  $extensions: {
15
16
  'org.primer.figma': {
16
17
  collection: 'mode',
@@ -29,13 +30,17 @@
29
30
  },
30
31
  },
31
32
  },
33
+ 'org.primer.llm': {
34
+ usage: ['input-field', 'pressed-button', 'recessed-area', 'well'],
35
+ rules: 'Use for elements that appear pressed or inset into the surface. Commonly used for input fields and wells. Do NOT use for floating elements.',
36
+ },
32
37
  },
33
38
  },
34
39
  resting: {
35
40
  xsmall: {
36
41
  $value: {
37
42
  color: '{base.color.neutral.13}',
38
- alpha: 0.06,
43
+ alpha: 0.05,
39
44
  offsetX: '0px',
40
45
  offsetY: '1px',
41
46
  blur: '1px',
@@ -43,6 +48,7 @@
43
48
  inset: false,
44
49
  },
45
50
  $type: 'shadow',
51
+ $description: 'Extra small resting shadow for minimal elevation',
46
52
  $extensions: {
47
53
  'org.primer.figma': {
48
54
  collection: 'mode',
@@ -61,13 +67,17 @@
61
67
  },
62
68
  },
63
69
  },
70
+ 'org.primer.llm': {
71
+ usage: ['badge', 'chip', 'small-card', 'subtle-elevation'],
72
+ rules: 'Use for very subtle elevation on small elements. Provides minimal lift from surface. Do NOT use for interactive elements needing clear affordance.',
73
+ },
64
74
  },
65
75
  },
66
76
  small: {
67
77
  $value: [
68
78
  {
69
79
  color: '{base.color.neutral.13}',
70
- alpha: 0.06,
80
+ alpha: 0.04,
71
81
  offsetX: '0px',
72
82
  offsetY: '1px',
73
83
  blur: '1px',
@@ -76,15 +86,16 @@
76
86
  },
77
87
  {
78
88
  color: '{base.color.neutral.13}',
79
- alpha: 0.06,
89
+ alpha: 0.03,
80
90
  offsetX: '0px',
81
91
  offsetY: '1px',
82
- blur: '3px',
92
+ blur: '2px',
83
93
  spread: '0px',
84
94
  inset: false,
85
95
  },
86
96
  ],
87
97
  $type: 'shadow',
98
+ $description: 'Small resting shadow for buttons and interactive elements',
88
99
  $extensions: {
89
100
  'org.primer.figma': {
90
101
  collection: 'mode',
@@ -114,6 +125,10 @@
114
125
  ],
115
126
  },
116
127
  },
128
+ 'org.primer.llm': {
129
+ usage: ['button', 'interactive-card', 'clickable-element'],
130
+ rules: 'Use for buttons and small interactive elements at rest. Provides subtle depth and clickable affordance. RECOMMENDED for default button shadows.',
131
+ },
117
132
  },
118
133
  },
119
134
  medium: {
@@ -136,6 +151,7 @@
136
151
  },
137
152
  ],
138
153
  $type: 'shadow',
154
+ $description: 'Medium resting shadow for cards and elevated surfaces',
139
155
  $extensions: {
140
156
  'org.primer.figma': {
141
157
  collection: 'mode',
@@ -163,6 +179,10 @@
163
179
  ],
164
180
  },
165
181
  },
182
+ 'org.primer.llm': {
183
+ usage: ['card', 'panel', 'elevated-surface', 'elevated-sidebar'],
184
+ rules: 'Use for cards and content panels that sit above the page surface. Provides moderate elevation without appearing to float. Do NOT use for overlays or modals.',
185
+ },
166
186
  },
167
187
  },
168
188
  },
@@ -195,6 +215,7 @@
195
215
  },
196
216
  ],
197
217
  $type: 'shadow',
218
+ $description: 'Small floating shadow for dropdowns, tooltips, and small overlays',
198
219
  $extensions: {
199
220
  'org.primer.figma': {
200
221
  collection: 'mode',
@@ -230,6 +251,10 @@
230
251
  ],
231
252
  },
232
253
  },
254
+ 'org.primer.llm': {
255
+ usage: ['dropdown', 'tooltip', 'popover', 'menu'],
256
+ rules: 'Use for small floating elements like dropdowns and tooltips. Do NOT use for modals or dialogs.',
257
+ },
233
258
  },
234
259
  },
235
260
  medium: {
@@ -276,6 +301,7 @@
276
301
  },
277
302
  ],
278
303
  $type: 'shadow',
304
+ $description: 'Medium floating shadow for popovers and action menus',
279
305
  $extensions: {
280
306
  'org.primer.figma': {
281
307
  collection: 'mode',
@@ -327,6 +353,10 @@
327
353
  ],
328
354
  },
329
355
  },
356
+ 'org.primer.llm': {
357
+ usage: ['popover', 'action-menu', 'select-panel', 'autocomplete'],
358
+ rules: 'Use for medium-sized floating elements like popovers and action menus. More prominent than small but less than dialogs. Do NOT use for full modals.',
359
+ },
330
360
  },
331
361
  },
332
362
  large: {
@@ -349,6 +379,7 @@
349
379
  },
350
380
  ],
351
381
  $type: 'shadow',
382
+ $description: 'Large floating shadow for modals and dialogs',
352
383
  $extensions: {
353
384
  'org.primer.figma': {
354
385
  collection: 'mode',
@@ -376,6 +407,10 @@
376
407
  ],
377
408
  },
378
409
  },
410
+ 'org.primer.llm': {
411
+ usage: ['modal', 'dialog', 'full-screen-overlay'],
412
+ rules: 'MUST use for modals and dialogs. Do NOT use for small floating elements.',
413
+ },
379
414
  },
380
415
  },
381
416
  xlarge: {
@@ -398,6 +433,7 @@
398
433
  },
399
434
  ],
400
435
  $type: 'shadow',
436
+ $description: 'Extra large floating shadow for full-screen overlays and sheets',
401
437
  $extensions: {
402
438
  'org.primer.figma': {
403
439
  collection: 'mode',
@@ -425,6 +461,10 @@
425
461
  ],
426
462
  },
427
463
  },
464
+ 'org.primer.llm': {
465
+ usage: ['full-screen-overlay', 'side-sheet', 'drawer', 'large-modal'],
466
+ rules: 'Use for full-screen or near-full-screen overlays like side sheets and drawers. Maximum elevation in the system. Do NOT use for small floating elements.',
467
+ },
428
468
  },
429
469
  },
430
470
  legacy: {
@@ -447,6 +487,7 @@
447
487
  },
448
488
  ],
449
489
  $type: 'shadow',
490
+ $description: 'Legacy floating shadow for backward compatibility',
450
491
  $extensions: {
451
492
  'org.primer.figma': {},
452
493
  'org.primer.overrides': {
@@ -471,6 +512,10 @@
471
512
  ],
472
513
  },
473
514
  },
515
+ 'org.primer.llm': {
516
+ usage: ['legacy-component', 'backward-compatibility'],
517
+ rules: 'DEPRECATED: Use shadow-floating-small instead. Only use for maintaining backward compatibility with existing implementations.',
518
+ },
474
519
  },
475
520
  },
476
521
  },