@astryxdesign/cli 0.7.5-canary.e9b3f3e → 0.7.5-canary.f042c6e

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.
@@ -2870,10 +2870,15 @@ async function themeBuildInternal(
2870
2870
  /** @type {string[]} */
2871
2871
  const droppedDeclarations = [];
2872
2872
 
2873
- const {component, prose} = _generateThemeRulesSplit(
2874
- resolvedTheme,
2875
- droppedDeclarations,
2876
- );
2873
+ let themeRules;
2874
+ try {
2875
+ themeRules = _generateThemeRulesSplit(resolvedTheme, droppedDeclarations);
2876
+ } catch (error) {
2877
+ const message =
2878
+ error instanceof Error ? error.message : 'Theme normalization failed.';
2879
+ throw new AstryxError(message, undefined, ERROR_CODES.ERR_THEME_INVALID);
2880
+ }
2881
+ const {component, prose} = themeRules;
2877
2882
  const cssParts = [];
2878
2883
  // Prose element defaults always ship — the `<Theme>` runtime
2879
2884
  // (generateThemeCSS) always emits them, so the build must too, or the
@@ -56,7 +56,7 @@ import {colorVars} from '@astryxdesign/core/theme/tokens.stylex';
56
56
 
57
57
  const styles = stylex.create({
58
58
  trend: {
59
- color: colorVars['--color-success'],
59
+ color: colorVars['--color-text-success'],
60
60
  minWidth: 0,
61
61
  },
62
62
  });
@@ -26,6 +26,55 @@ export const docs = {
26
26
  "type": "prose",
27
27
  "text": "Semantic colors for consistent theming. All colors use light-dark() for automatic mode switching."
28
28
  },
29
+ {
30
+ "type": "prose",
31
+ "text": "Status roles: pick the token by the surface. `<status>` is info, success, warning, or error."
32
+ },
33
+ {
34
+ "type": "table",
35
+ "headers": [
36
+ "Status role",
37
+ "Use it for",
38
+ "Pairs with"
39
+ ],
40
+ "rows": [
41
+ [
42
+ "--color-text-<status>",
43
+ "Status text on the page or a card (4.5:1 or more).",
44
+ "—"
45
+ ],
46
+ [
47
+ "--color-icon-<status>",
48
+ "Status icons on the page or a card. Defaults to the text colour.",
49
+ "—"
50
+ ],
51
+ [
52
+ "--color-border-<status>",
53
+ "Status borders on the page or a card, such as an invalid field. Defaults to the text colour.",
54
+ "—"
55
+ ],
56
+ [
57
+ "--color-<status>",
58
+ "Strong status fill, such as a Badge or StatusDot.",
59
+ "--color-on-<status>"
60
+ ],
61
+ [
62
+ "--color-on-<status>",
63
+ "Text and icons on the strong fill (4.5:1 or more).",
64
+ "--color-<status>"
65
+ ],
66
+ [
67
+ "--color-<status>-muted",
68
+ "Pale status fill, such as a Banner.",
69
+ "--color-on-<status>-muted"
70
+ ],
71
+ [
72
+ "--color-on-<status>-muted",
73
+ "Text and icons on the pale fill (4.5:1 or more).",
74
+ "--color-<status>-muted"
75
+ ]
76
+ ]
77
+ },
29
78
  {
30
79
  "type": "table",
31
80
  "headers": [
@@ -154,6 +203,21 @@ export const docs = {
154
203
  "#AA071E",
155
204
  "#E3193B"
156
205
  ],
206
+ [
207
+ "--color-info",
208
+ "#0064E0",
209
+ "#0064E0"
210
+ ],
211
+ [
212
+ "--color-info-muted",
213
+ "#0082FB33",
214
+ "#0082FB3F"
215
+ ],
216
+ [
217
+ "--color-on-info",
218
+ "#FFFFFF",
219
+ "#FFFFFF"
220
+ ],
157
221
  [
158
222
  "--color-success",
159
223
  "#0D8626",
@@ -182,7 +246,7 @@ export const docs = {
182
246
  [
183
247
  "--color-on-error",
184
248
  "#FFFFFF",
185
- "#FFFFFF"
249
+ "#0A1317"
186
250
  ],
187
251
  [
188
252
  "--color-warning",
@@ -199,6 +263,86 @@ export const docs = {
199
263
  "#0A1317",
200
264
  "#0A1317"
201
265
  ],
266
+ [
267
+ "--color-text-info",
268
+ "var(--color-text-blue)",
269
+ "var(--color-text-blue)"
270
+ ],
271
+ [
272
+ "--color-text-success",
273
+ "var(--color-text-green)",
274
+ "var(--color-text-green)"
275
+ ],
276
+ [
277
+ "--color-text-warning",
278
+ "var(--color-text-yellow)",
279
+ "var(--color-text-yellow)"
280
+ ],
281
+ [
282
+ "--color-text-error",
283
+ "var(--color-text-red)",
284
+ "var(--color-text-red)"
285
+ ],
286
+ [
287
+ "--color-icon-info",
288
+ "var(--color-text-info)",
289
+ "var(--color-text-info)"
290
+ ],
291
+ [
292
+ "--color-icon-success",
293
+ "var(--color-text-success)",
294
+ "var(--color-text-success)"
295
+ ],
296
+ [
297
+ "--color-icon-warning",
298
+ "var(--color-text-warning)",
299
+ "var(--color-text-warning)"
300
+ ],
301
+ [
302
+ "--color-icon-error",
303
+ "var(--color-text-error)",
304
+ "var(--color-text-error)"
305
+ ],
306
+ [
307
+ "--color-border-info",
308
+ "var(--color-text-info)",
309
+ "var(--color-text-info)"
310
+ ],
311
+ [
312
+ "--color-border-success",
313
+ "var(--color-text-success)",
314
+ "var(--color-text-success)"
315
+ ],
316
+ [
317
+ "--color-border-warning",
318
+ "var(--color-text-warning)",
319
+ "var(--color-text-warning)"
320
+ ],
321
+ [
322
+ "--color-border-error",
323
+ "var(--color-text-error)",
324
+ "var(--color-text-error)"
325
+ ],
326
+ [
327
+ "--color-on-info-muted",
328
+ "var(--color-text-blue)",
329
+ "var(--color-text-blue)"
330
+ ],
331
+ [
332
+ "--color-on-success-muted",
333
+ "var(--color-text-green)",
334
+ "var(--color-text-green)"
335
+ ],
336
+ [
337
+ "--color-on-warning-muted",
338
+ "var(--color-text-yellow)",
339
+ "var(--color-text-yellow)"
340
+ ],
341
+ [
342
+ "--color-on-error-muted",
343
+ "var(--color-text-red)",
344
+ "var(--color-text-red)"
345
+ ],
202
346
  [
203
347
  "--color-border",
204
348
  "#05365919",
@@ -2,7 +2,7 @@
2
2
 
3
3
  // AUTO-GENERATED — do not edit manually.
4
4
  // Run: node scripts/generate-token-docs.mjs
5
- // Total: 263 tokens across 15 categories.
5
+ // Total: 282 tokens across 15 categories.
6
6
 
7
7
  /** @type {import('@astryxdesign/cli/authoring').NamespaceDoc} */
8
8
  export const docs = {
@@ -94,9 +94,9 @@ interface WindowSeries {
94
94
  }
95
95
 
96
96
  const STATUS_STROKE: Record<HealthStatus, string> = {
97
- healthy: 'var(--color-success, #0B991F)',
98
- warning: 'var(--color-warning, #B25000)',
99
- critical: 'var(--color-error, #D6002A)',
97
+ healthy: 'var(--color-text-success)',
98
+ warning: 'var(--color-text-warning)',
99
+ critical: 'var(--color-text-error)',
100
100
  };
101
101
 
102
102
  const STATUS_DOT: Record<HealthStatus, StatusDotVariant> = {
@@ -969,12 +969,21 @@ function uptimeStatus(value: number): {
969
969
  status: string;
970
970
  } {
971
971
  if (value >= 99.95) {
972
- return {color: colorVars['--color-success'], status: 'Operational'};
972
+ return {
973
+ color: colorVars['--color-text-success'],
974
+ status: 'Operational',
975
+ };
973
976
  }
974
977
  if (value >= 99) {
975
- return {color: colorVars['--color-warning'], status: 'Degraded'};
978
+ return {
979
+ color: colorVars['--color-text-warning'],
980
+ status: 'Degraded',
981
+ };
976
982
  }
977
- return {color: colorVars['--color-error'], status: 'Outage'};
983
+ return {
984
+ color: colorVars['--color-text-error'],
985
+ status: 'Outage',
986
+ };
978
987
  }
979
988
 
980
989
  interface UptimeDay {
@@ -11,7 +11,7 @@ export const butterPaletteRefs = {
11
11
  dark: {25: '#52237b', 80: '#ddb9f6', 90: '#f2daff'},
12
12
  },
13
13
  green: {
14
- light: {25: '#004a05', 70: '#7bbf7a', 80: '#a2d7a0', 85: '#b6e3b4', 90: '#caeec8'},
14
+ light: {25: '#004a05', 55: '#4a984a', 70: '#7bbf7a', 80: '#a2d7a0', 85: '#b6e3b4', 90: '#caeec8'},
15
15
  dark: {15: '#013004', 20: '#063c0a', 70: '#83bc82', 80: '#a8d4a6', 90: '#cdedcc'},
16
16
  },
17
17
  neutral: {
@@ -31,7 +31,7 @@ export const butterPaletteRefs = {
31
31
  dark: {15: '#4c0700', 25: '#6f1400', 80: '#ffb09b', 85: '#ffc5b5', 90: '#ffd9cf'},
32
32
  },
33
33
  yellow: {
34
- light: {25: '#443c00', 30: '#514700', 70: '#bfae35', 80: '#dfcf5b', 85: '#f0df72', 90: '#fdee8c', 95: '#fff7c0'},
34
+ light: {25: '#443c00', 30: '#514700', 55: '#958500', 70: '#bfae35', 80: '#dfcf5b', 85: '#f0df72', 90: '#fdee8c', 95: '#fff7c0'},
35
35
  dark: {15: '#2c2600', 25: '#443c00', 70: '#bcae4e', 75: '#cdbe59', 85: '#eedf75', 90: '#fdee8c'},
36
36
  },
37
37
  teal: {
@@ -40,6 +40,7 @@ export const butterPaletteRefs = {
40
40
  },
41
41
  accent: {
42
42
  light: {35: '#194ce8', 40: '#225bff', 55: '#4d82ff'},
43
+ dark: {70: '#81a9ff'},
43
44
  },
44
45
  cyan: {
45
46
  light: {25: '#004649', 80: '#8dd2d3', 90: '#a9eff0'},
@@ -107,6 +107,25 @@ const SECONDARY_COMPLEX_SELECTOR = {
107
107
  SECONDARY_BUTTON[':hover'],
108
108
  } as const;
109
109
 
110
+ /**
111
+ * Butter's bright status rims and glyphs in input status scopes. Light mode
112
+ * uses mid-ramp stops so a rim reaches 3:1 on the field (theme-tokens INV11).
113
+ */
114
+ const INPUT_STATUS_VARS = {
115
+ 'status:success': {
116
+ '--color-border-success': lightDark(green.light[55], green.light[70]),
117
+ '--color-icon-success': lightDark(green.light[55], green.light[70]),
118
+ },
119
+ 'status:warning': {
120
+ '--color-border-warning': lightDark(yellow.light[55], yellow.light[80]),
121
+ '--color-icon-warning': lightDark(yellow.light[55], yellow.light[80]),
122
+ },
123
+ 'status:error': {
124
+ '--color-border-error': red.light[60],
125
+ '--color-icon-error': red.light[60],
126
+ },
127
+ } as const;
128
+
110
129
  export const butterTheme = defineTheme({
111
130
  name: 'butter',
112
131
 
@@ -187,6 +206,19 @@ export const butterTheme = defineTheme({
187
206
  '--color-on-error': [red.light[95], red.dark[15]],
188
207
  '--color-on-warning': [yellow.light[95], yellow.dark[15]],
189
208
 
209
+ // Info is its own blue status, independent of the accent.
210
+ '--color-info': [accent.light[40], accent.dark[70]],
211
+ '--color-info-muted': 'var(--color-background-blue)',
212
+
213
+ '--color-text-info': [accent.light[40], accent.dark[70]],
214
+ '--color-text-success': [green.light[25], green.dark[80]],
215
+ '--color-text-warning': [yellow.light[25], yellow.dark[85]],
216
+ '--color-text-error': [red.light[25], red.dark[80]],
217
+ '--color-on-info-muted': 'var(--color-text-blue)',
218
+ '--color-on-success-muted': [green.light[25], green.dark[80]],
219
+ '--color-on-warning-muted': [yellow.light[25], yellow.dark[85]],
220
+ '--color-on-error-muted': [red.light[25], red.dark[90]],
221
+
190
222
  // Icon
191
223
  '--color-icon-accent': [accent.light[40], yellow.dark[90]],
192
224
  '--color-icon-primary': [neutral.light[15], neutral.dark[90]],
@@ -410,34 +442,23 @@ export const butterTheme = defineTheme({
410
442
  },
411
443
  },
412
444
 
413
- // Banner backgrounds match the semantic badge fills.
414
- // Banner status colors — override the muted tokens locally so the
415
- // header (which reads --color-*-muted via StyleX) renders vivid fills
416
- // matching the badge palette. Scoped to the banner root, doesn't leak.
445
+ // Banner status surfaces and content use the reviewed vivid pair.
417
446
  banner: {
418
447
  'status:info': {
419
- '--color-accent-muted': accent.light[55],
420
- '--color-text-primary': neutral.light[15],
421
- '--color-text-secondary': neutral.light[15],
422
- '--color-accent': neutral.light[15],
448
+ '--color-info-muted': accent.light[55],
449
+ '--color-on-info-muted': neutral.light[15],
423
450
  },
424
451
  'status:success': {
425
452
  '--color-success-muted': green.light[70],
426
- '--color-text-primary': neutral.light[15],
427
- '--color-text-secondary': neutral.light[15],
428
- '--color-success': neutral.light[15],
453
+ '--color-on-success-muted': neutral.light[15],
429
454
  },
430
455
  'status:warning': {
431
456
  '--color-warning-muted': yellow.light[80],
432
- '--color-text-primary': neutral.light[15],
433
- '--color-text-secondary': neutral.light[15],
434
- '--color-warning': neutral.light[15],
457
+ '--color-on-warning-muted': neutral.light[15],
435
458
  },
436
459
  'status:error': {
437
460
  '--color-error-muted': red.light[60],
438
- '--color-text-primary': neutral.light[15],
439
- '--color-text-secondary': neutral.light[15],
440
- '--color-error': neutral.light[15],
461
+ '--color-on-error-muted': neutral.light[15],
441
462
  },
442
463
  },
443
464
 
@@ -561,9 +582,7 @@ export const butterTheme = defineTheme({
561
582
  paddingInline: 'var(--spacing-3)',
562
583
  borderColor: 'var(--color-border)',
563
584
  },
564
- 'status:success': {'--color-success': green.light[70]},
565
- 'status:warning': {'--color-warning': yellow.light[80]},
566
- 'status:error': {'--color-error': red.light[60]},
585
+ ...INPUT_STATUS_VARS,
567
586
  },
568
587
  'text-area': {
569
588
  base: {
@@ -571,9 +590,7 @@ export const butterTheme = defineTheme({
571
590
  paddingInline: 'var(--spacing-3)',
572
591
  borderColor: 'var(--color-border)',
573
592
  },
574
- 'status:success': {'--color-success': green.light[70]},
575
- 'status:warning': {'--color-warning': yellow.light[80]},
576
- 'status:error': {'--color-error': red.light[60]},
593
+ ...INPUT_STATUS_VARS,
577
594
  },
578
595
  'number-input': {
579
596
  base: {
@@ -581,9 +598,7 @@ export const butterTheme = defineTheme({
581
598
  paddingInline: 'var(--spacing-3)',
582
599
  borderColor: 'var(--color-border)',
583
600
  },
584
- 'status:success': {'--color-success': green.light[70]},
585
- 'status:warning': {'--color-warning': yellow.light[80]},
586
- 'status:error': {'--color-error': red.light[60]},
601
+ ...INPUT_STATUS_VARS,
587
602
  },
588
603
  'date-input': {
589
604
  base: {
@@ -591,9 +606,7 @@ export const butterTheme = defineTheme({
591
606
  paddingInline: 'var(--spacing-3)',
592
607
  borderColor: 'var(--color-border)',
593
608
  },
594
- 'status:success': {'--color-success': green.light[70]},
595
- 'status:warning': {'--color-warning': yellow.light[80]},
596
- 'status:error': {'--color-error': red.light[60]},
609
+ ...INPUT_STATUS_VARS,
597
610
  },
598
611
  'time-input': {
599
612
  base: {
@@ -601,9 +614,7 @@ export const butterTheme = defineTheme({
601
614
  paddingInline: 'var(--spacing-3)',
602
615
  borderColor: 'var(--color-border)',
603
616
  },
604
- 'status:success': {'--color-success': green.light[70]},
605
- 'status:warning': {'--color-warning': yellow.light[80]},
606
- 'status:error': {'--color-error': red.light[60]},
617
+ ...INPUT_STATUS_VARS,
607
618
  },
608
619
  selector: {
609
620
  base: {
@@ -611,9 +622,7 @@ export const butterTheme = defineTheme({
611
622
  paddingInline: 'var(--spacing-3)',
612
623
  borderColor: 'var(--color-border)',
613
624
  },
614
- 'status:success': {'--color-success': green.light[70]},
615
- 'status:warning': {'--color-warning': yellow.light[80]},
616
- 'status:error': {'--color-error': red.light[60]},
625
+ ...INPUT_STATUS_VARS,
617
626
  'variant:secondary': SECONDARY_SELECTOR,
618
627
  },
619
628
  'multi-selector': {
@@ -622,9 +631,7 @@ export const butterTheme = defineTheme({
622
631
  paddingInline: 'var(--spacing-3)',
623
632
  borderColor: 'var(--color-border)',
624
633
  },
625
- 'status:success': {'--color-success': green.light[70]},
626
- 'status:warning': {'--color-warning': yellow.light[80]},
627
- 'status:error': {'--color-error': red.light[60]},
634
+ ...INPUT_STATUS_VARS,
628
635
  'variant:secondary': SECONDARY_SELECTOR,
629
636
  },
630
637
  'complex-selector': {'variant:secondary': SECONDARY_COMPLEX_SELECTOR},
@@ -634,9 +641,7 @@ export const butterTheme = defineTheme({
634
641
  paddingInline: 'var(--spacing-3)',
635
642
  borderColor: 'var(--color-border)',
636
643
  },
637
- 'status:success': {'--color-success': green.light[70]},
638
- 'status:warning': {'--color-warning': yellow.light[80]},
639
- 'status:error': {'--color-error': red.light[60]},
644
+ ...INPUT_STATUS_VARS,
640
645
  },
641
646
  tokenizer: {
642
647
  base: {
@@ -644,9 +649,7 @@ export const butterTheme = defineTheme({
644
649
  paddingInline: 'var(--spacing-3)',
645
650
  borderColor: 'var(--color-border)',
646
651
  },
647
- 'status:success': {'--color-success': green.light[70]},
648
- 'status:warning': {'--color-warning': yellow.light[80]},
649
- 'status:error': {'--color-error': red.light[60]},
652
+ ...INPUT_STATUS_VARS,
650
653
  },
651
654
 
652
655
  // Display sizes use Sarina — the signature buttery display
@@ -120,10 +120,23 @@ export const chocolateTheme = defineTheme({
120
120
  '--color-on-dark': '#FFFCF7',
121
121
  '--color-on-light': '#4a3520',
122
122
  '--color-on-accent': ['#FFFFFF', '#4a3520'],
123
- '--color-on-success': ['#FFFFFF', '#4a3520'],
124
- '--color-on-error': ['#FFFFFF', '#4a3520'],
123
+ '--color-on-success': '#141010',
124
+ '--color-on-error': '#141010',
125
125
  '--color-on-warning': ['#4a3520', '#4a3520'],
126
126
 
127
+ // Info is its own blue status, independent of the accent.
128
+ '--color-info': ['#3a5e8c', '#7ba8d4'],
129
+ '--color-info-muted': 'var(--color-background-blue)',
130
+
131
+ '--color-text-info': ['#2e4a6e', '#8dbce0'],
132
+ '--color-text-success': ['#526f00', '#a8d43a'],
133
+ '--color-text-warning': ['#7a5500', '#ffd960'],
134
+ '--color-text-error': ['#cc0000', '#ff7a7a'],
135
+ '--color-on-info-muted': ['#2e4a6e', '#8dbce0'],
136
+ '--color-on-success-muted': ['#4d6800', '#a8d43a'],
137
+ '--color-on-warning-muted': ['#7a5500', '#ffd960'],
138
+ '--color-on-error-muted': ['#b40000', '#ff7a7a'],
139
+
127
140
  // Icon
128
141
  '--color-icon-accent': ['#8C5927', '#d4a06a'],
129
142
  '--color-icon-primary': ['#4a3520', '#EDE4D4'],
@@ -135,6 +135,19 @@ export const gothicTheme = defineTheme({
135
135
  '--color-on-error': neutral.dark[10],
136
136
  '--color-on-warning': neutral.dark[10],
137
137
 
138
+ '--color-info': blue.dark[65],
139
+ '--color-info-muted': blue.dark[75],
140
+ '--color-on-info': neutral.dark[10],
141
+
142
+ '--color-text-info': blue.dark[75],
143
+ '--color-text-success': green.dark[75],
144
+ '--color-text-warning': yellow.dark[75],
145
+ '--color-text-error': red.dark[75],
146
+ '--color-on-info-muted': blue.dark[20],
147
+ '--color-on-success-muted': green.dark[20],
148
+ '--color-on-warning-muted': yellow.dark[15],
149
+ '--color-on-error-muted': red.dark[20],
150
+
138
151
  '--color-icon-accent': neutral.dark[95],
139
152
  '--color-icon-primary': neutral.dark[95],
140
153
  '--color-icon-secondary': neutral.dark[75],
@@ -286,28 +299,20 @@ export const gothicTheme = defineTheme({
286
299
  borderRadius: 'var(--radius-element)',
287
300
  },
288
301
  'status:info': {
289
- backgroundColor: 'var(--color-background-blue)',
290
- '--color-text-primary': 'var(--color-text-blue)',
291
- '--color-text-secondary': 'var(--color-text-blue)',
292
- '--color-accent': 'var(--color-text-blue)',
302
+ '--color-info-muted': 'var(--color-background-blue)',
303
+ '--color-on-info-muted': 'var(--color-text-blue)',
293
304
  },
294
305
  'status:success': {
295
- backgroundColor: 'var(--color-background-green)',
296
- '--color-text-primary': 'var(--color-text-green)',
297
- '--color-text-secondary': 'var(--color-text-green)',
298
- '--color-success': 'var(--color-text-green)',
306
+ '--color-success-muted': 'var(--color-background-green)',
307
+ '--color-on-success-muted': 'var(--color-text-green)',
299
308
  },
300
309
  'status:warning': {
301
- backgroundColor: 'var(--color-background-yellow)',
302
- '--color-text-primary': 'var(--color-text-yellow)',
303
- '--color-text-secondary': 'var(--color-text-yellow)',
304
- '--color-warning': 'var(--color-text-yellow)',
310
+ '--color-warning-muted': 'var(--color-background-yellow)',
311
+ '--color-on-warning-muted': 'var(--color-text-yellow)',
305
312
  },
306
313
  'status:error': {
307
- backgroundColor: 'var(--color-background-red)',
308
- '--color-text-primary': 'var(--color-text-red)',
309
- '--color-text-secondary': 'var(--color-text-red)',
310
- '--color-error': 'var(--color-text-red)',
314
+ '--color-error-muted': 'var(--color-background-red)',
315
+ '--color-on-error-muted': 'var(--color-text-red)',
311
316
  },
312
317
  },
313
318
 
@@ -20,7 +20,7 @@ export const matchaPaletteRefs = {
20
20
  },
21
21
  blue: {
22
22
  light: {35: '#2e4a6e', 50: '#3a5e8c'},
23
- dark: {50: '#3a5e8c', 70: '#7ba8d4', 75: '#8dbce0'},
23
+ dark: {50: '#3a5e8c', 70: '#7ba8d4', 75: '#8dbce0', 80: '#a7c9e3'},
24
24
  },
25
25
  purple: {
26
26
  light: {35: '#553a70', 50: '#6b4a8c'},
@@ -103,10 +103,23 @@ export const matchaTheme = defineTheme({
103
103
  '--color-on-dark': neutral.light[100],
104
104
  '--color-on-light': neutral.light[20],
105
105
  '--color-on-accent': [neutral.light[100], neutral.dark[20]],
106
- '--color-on-success': [neutral.light[100], neutral.dark[20]],
107
- '--color-on-error': [neutral.light[100], neutral.dark[20]],
106
+ '--color-on-success': neutral.dark[5],
107
+ '--color-on-error': neutral.dark[5],
108
108
  '--color-on-warning': [neutral.light[20], neutral.dark[20]],
109
109
 
110
+ // Info is its own blue status, independent of the accent.
111
+ '--color-info': [blue.light[50], blue.dark[80]],
112
+ '--color-info-muted': 'var(--color-background-blue)',
113
+
114
+ '--color-text-info': [blue.light[35], blue.dark[75]],
115
+ '--color-text-success': [green.light[35], green.dark[75]],
116
+ '--color-text-warning': [yellow.light[45], yellow.dark[90]],
117
+ '--color-text-error': [red.light[35], red.dark[75]],
118
+ '--color-on-info-muted': [blue.light[35], blue.dark[75]],
119
+ '--color-on-success-muted': [green.light[35], green.dark[75]],
120
+ '--color-on-warning-muted': [yellow.light[45], yellow.dark[90]],
121
+ '--color-on-error-muted': [red.light[35], red.dark[75]],
122
+
110
123
  // Icon
111
124
  '--color-icon-accent': [neutral.light[20], neutral.dark[75]],
112
125
  '--color-icon-primary': [neutral.light[20], neutral.dark[75]],
@@ -23,15 +23,15 @@ export const neutralPaletteRefs = {
23
23
  dark: {25: '#503424', 65: '#df843f', 80: '#ffb37e'},
24
24
  },
25
25
  blue: {
26
- light: {25: '#003978', 30: '#00458c', 50: '#0074e2', 80: '#a1caff', 85: '#b9d7ff'},
26
+ light: {25: '#003978', 30: '#00458c', 45: '#0067ce', 50: '#0074e2', 80: '#a1caff', 85: '#b9d7ff'},
27
27
  dark: {25: '#253c5a', 65: '#5aa0f8', 75: '#88bcff', 80: '#a1caff'},
28
28
  },
29
29
  red: {
30
- light: {25: '#76000c', 30: '#8a0011', 55: '#de4745', 65: '#fa6762', 70: '#ff7f77', 80: '#ffaea7', 85: '#ffc4be'},
31
- dark: {25: '#5b2b28', 65: '#ee736c', 75: '#ff9890', 80: '#ffaea7', 85: '#ffc4be'},
30
+ light: {25: '#76000c', 30: '#8a0011', 45: '#c0262c', 55: '#de4745', 65: '#fa6762', 80: '#ffaea7', 85: '#ffc4be'},
31
+ dark: {25: '#5b2b28', 75: '#ff9890', 80: '#ffaea7'},
32
32
  },
33
33
  yellow: {
34
- light: {25: '#4b3900', 30: '#584400', 65: '#c29900', 75: '#e2b623', 80: '#eec448', 85: '#f8d36a'},
34
+ light: {25: '#4b3900', 30: '#584400', 45: '#836700', 65: '#c29900', 75: '#e2b623', 80: '#eec448', 85: '#f8d36a'},
35
35
  dark: {25: '#453a1c', 80: '#e3c36c', 90: '#fae19e'},
36
36
  },
37
37
  teal: {
@@ -33,40 +33,12 @@ const neutralSyntax = defineSyntaxTheme({
33
33
  });
34
34
 
35
35
  const neutralLocalTokens: Record<string, TokenValue> = {
36
+ // Deprecated: kept with its released name, meaning, and value for Neutral
37
+ // extensions (theme:neutral DEC-1); Neutral itself paints status through the
38
+ // portable --color-* roles and no longer reads it.
36
39
  '--astryx-theme-neutral-color-status-fill-accent': ['#0074e2', '#6d9cfe'],
37
- '--astryx-theme-neutral-color-status-fill-success': ['#198100', '#64af4c'],
38
- '--astryx-theme-neutral-color-status-fill-warning': '#ffce2f',
39
- '--astryx-theme-neutral-color-status-fill-error': ['#c9303a', '#ff705d'],
40
- '--astryx-theme-neutral-color-status-muted-accent': [
41
- blue.light[85],
42
- withAlpha(blue.dark[75], '3D'),
43
- ],
44
- '--astryx-theme-neutral-color-on-tint-neutral': ['#fafafa4D', '#0a0a0a4D'],
45
- '--astryx-theme-neutral-color-on-tint-overlay-hover': [
46
- '#fafafa1A',
47
- '#0a0a0a1A',
48
- ],
49
- '--astryx-theme-neutral-color-on-tint-overlay-pressed': [
50
- '#fafafa33',
51
- '#0a0a0a33',
52
- ],
53
- '--astryx-theme-neutral-color-destructive-overlay-hover': [
54
- withAlpha(red.light[70], '0D'),
55
- withAlpha(red.dark[65], '0D'),
56
- ],
57
- '--astryx-theme-neutral-color-destructive-overlay-pressed': [
58
- withAlpha(red.light[70], '1A'),
59
- withAlpha(red.dark[65], '1A'),
60
- ],
61
40
  };
62
41
 
63
- const statusFill = {
64
- accent: 'var(--astryx-theme-neutral-color-status-fill-accent)',
65
- success: 'var(--astryx-theme-neutral-color-status-fill-success)',
66
- warning: 'var(--astryx-theme-neutral-color-status-fill-warning)',
67
- error: 'var(--astryx-theme-neutral-color-status-fill-error)',
68
- } as const;
69
-
70
42
  export const neutralTheme = defineTheme({
71
43
  name: 'neutral',
72
44
  localTokens: neutralLocalTokens,
@@ -154,15 +126,31 @@ export const neutralTheme = defineTheme({
154
126
  '--color-on-error': [neutral.light[100], neutral.dark[5]],
155
127
  '--color-on-warning': neutral.light[5],
156
128
 
129
+ '--color-info': ['#0074e2', '#6d9cfe'],
130
+ '--color-info-muted': [blue.light[85], withAlpha(blue.dark[75], '3D')],
131
+ '--color-on-info': [neutral.light[100], neutral.dark[5]],
132
+
133
+ '--color-text-info': [blue.light[45], blue.dark[80]],
134
+ '--color-text-success': [green.light[45], green.light[75]],
135
+ '--color-text-warning': [yellow.light[45], yellow.light[80]],
136
+ '--color-text-error': [red.light[45], red.dark[80]],
137
+
138
+ '--color-on-info-muted': [blue.light[25], blue.dark[80]],
139
+ '--color-on-success-muted': [green.light[25], green.light[75]],
140
+ '--color-on-warning-muted': [yellow.light[25], yellow.light[80]],
141
+ '--color-on-error-muted': [red.light[25], red.dark[80]],
142
+
157
143
  // Icon
158
144
  '--color-icon-accent': [neutral.light[10], neutral.dark[95]],
159
145
  '--color-icon-primary': [neutral.light[0], neutral.dark[100]],
160
146
  '--color-icon-secondary': [neutral.light[45], neutral.dark[65]],
161
147
  '--color-icon-disabled': [neutral.light[60], neutral.dark[35]],
162
148
 
163
- '--color-success': [green.light[25], green.light[80]],
164
- '--color-error': [red.light[25], red.dark[85]],
165
- '--color-warning': [yellow.light[25], yellow.light[85]],
149
+ // Strong status fills (architecture:theme-tokens INV11): Neutral's
150
+ // reviewed status-fill colours, with --color-on-<status> above.
151
+ '--color-success': ['#198100', '#64af4c'],
152
+ '--color-warning': '#ffce2f',
153
+ '--color-error': ['#c9303a', '#ff705d'],
166
154
  '--color-success-muted': [green.dark[85], withAlpha(green.light[75], '3D')],
167
155
  '--color-error-muted': [red.light[85], withAlpha(red.dark[75], '3D')],
168
156
  '--color-warning-muted': [
@@ -182,7 +170,7 @@ export const neutralTheme = defineTheme({
182
170
  withAlpha(neutral.light[0], '1A'),
183
171
  withAlpha(neutral.dark[0], '4D'),
184
172
  ],
185
- '--color-tint-hover': ['black', 'white'],
173
+ '--color-tint-hover': [neutral.light[0], neutral.dark[100]],
186
174
 
187
175
  '--color-background-red': [red.light[85], red.dark[25]],
188
176
  '--color-border-red': [red.light[80], red.light[65]],
@@ -288,35 +276,15 @@ export const neutralTheme = defineTheme({
288
276
  button: {
289
277
  'variant:destructive': {
290
278
  backgroundColor: 'var(--color-error-muted)',
291
- color: 'var(--color-error)',
292
- '--color-overlay-hover':
293
- 'var(--astryx-theme-neutral-color-destructive-overlay-hover)',
294
- '--color-overlay-pressed':
295
- 'var(--astryx-theme-neutral-color-destructive-overlay-pressed)',
279
+ color: 'var(--color-on-error-muted)',
296
280
  },
297
281
  },
298
282
 
299
283
  badge: {
300
- 'variant:info': {
301
- backgroundColor: statusFill.accent,
302
- color: 'var(--color-on-accent)',
303
- },
304
284
  'variant:neutral': {
305
285
  backgroundColor: 'var(--color-background-gray)',
306
286
  color: 'var(--color-text-gray)',
307
287
  },
308
- 'variant:success': {
309
- backgroundColor: statusFill.success,
310
- color: 'var(--color-on-success)',
311
- },
312
- 'variant:warning': {
313
- backgroundColor: statusFill.warning,
314
- color: 'var(--color-on-warning)',
315
- },
316
- 'variant:error': {
317
- backgroundColor: statusFill.error,
318
- color: 'var(--color-on-error)',
319
- },
320
288
 
321
289
  'variant:red': {
322
290
  backgroundColor: 'var(--color-background-red)',
@@ -360,18 +328,6 @@ export const neutralTheme = defineTheme({
360
328
  },
361
329
  },
362
330
 
363
- 'status-dot': {
364
- 'variant:success': {backgroundColor: statusFill.success},
365
- 'variant:warning': {backgroundColor: statusFill.warning},
366
- 'variant:error': {backgroundColor: statusFill.error},
367
- 'variant:accent': {backgroundColor: statusFill.accent},
368
- },
369
-
370
- 'avatar-status-dot': {
371
- 'variant:success': {backgroundColor: statusFill.success},
372
- 'variant:error': {backgroundColor: statusFill.error},
373
- },
374
-
375
331
  // Give the Neutral segmented control a roomier inset without changing its
376
332
  // outside height. The selected item stays flat against the tinted track.
377
333
  'segmented-control': {
@@ -394,45 +350,6 @@ export const neutralTheme = defineTheme({
394
350
  },
395
351
  },
396
352
 
397
- banner: {
398
- base: {
399
- '--color-neutral': 'var(--astryx-theme-neutral-color-on-tint-neutral)',
400
- '--color-overlay-hover':
401
- 'var(--astryx-theme-neutral-color-on-tint-overlay-hover)',
402
- '--color-overlay-pressed':
403
- 'var(--astryx-theme-neutral-color-on-tint-overlay-pressed)',
404
- },
405
- 'status:info': {
406
- '--color-accent-muted':
407
- 'var(--astryx-theme-neutral-color-status-muted-accent)',
408
- '--color-text-primary': 'var(--color-text-blue)',
409
- '--color-text-secondary': 'var(--color-text-blue)',
410
- '--color-accent': 'var(--color-text-blue)',
411
- },
412
- 'status:success': {
413
- '--color-text-primary': 'var(--color-text-green)',
414
- '--color-text-secondary': 'var(--color-text-green)',
415
- '--color-success': 'var(--color-text-green)',
416
- },
417
- 'status:warning': {
418
- '--color-text-primary': 'var(--color-text-yellow)',
419
- '--color-text-secondary': 'var(--color-text-yellow)',
420
- '--color-warning': 'var(--color-text-yellow)',
421
- },
422
- 'status:error': {
423
- '--color-text-primary': 'var(--color-text-red)',
424
- '--color-text-secondary': 'var(--color-text-red)',
425
- '--color-error': 'var(--color-text-red)',
426
- },
427
- },
428
-
429
- 'step-indicator': {
430
- 'status:accent': {'--color-accent': statusFill.accent},
431
- 'status:success': {'--color-success': statusFill.success},
432
- 'status:warning': {'--color-warning': statusFill.warning},
433
- 'status:error': {'--color-error': statusFill.error},
434
- },
435
-
436
353
  switch: {
437
354
  base: {
438
355
  '--color-background-gray': 'var(--color-border-emphasized)',
@@ -443,18 +360,6 @@ export const neutralTheme = defineTheme({
443
360
  base: {
444
361
  '--color-background-muted': 'var(--color-border-emphasized)',
445
362
  },
446
- 'variant:accent': {
447
- '--color-accent': statusFill.accent,
448
- },
449
- 'variant:success': {
450
- '--color-success': statusFill.success,
451
- },
452
- 'variant:warning': {
453
- '--color-warning': statusFill.warning,
454
- },
455
- 'variant:error': {
456
- '--color-error': statusFill.error,
457
- },
458
363
  },
459
364
 
460
365
  card: {
@@ -26,13 +26,16 @@ const withAlpha = (color: string, alpha: string): string => `${color}${alpha}`;
26
26
  */
27
27
  const INPUT_STATUS_VARS = {
28
28
  'status:success': {
29
- '--color-success': lightDark(green.light[55], green.dark[70]),
29
+ '--color-border-success': lightDark(green.light[55], green.dark[70]),
30
+ '--color-icon-success': lightDark(green.light[55], green.dark[70]),
30
31
  },
31
32
  'status:warning': {
32
- '--color-warning': lightDark(yellow.light[55], yellow.dark[70]),
33
+ '--color-border-warning': lightDark(yellow.light[55], yellow.dark[70]),
34
+ '--color-icon-warning': lightDark(yellow.light[55], yellow.dark[70]),
33
35
  },
34
36
  'status:error': {
35
- '--color-error': lightDark(red.light[60], red.dark[70]),
37
+ '--color-border-error': lightDark(red.light[60], red.dark[70]),
38
+ '--color-icon-error': lightDark(red.light[60], red.dark[70]),
36
39
  },
37
40
  } as const;
38
41
 
@@ -188,9 +191,22 @@ export const stoneTheme = defineTheme({
188
191
  '--color-on-dark': neutral.light[100],
189
192
  '--color-on-light': [neutral.light[15], neutral.dark[15]],
190
193
  '--color-on-accent': [neutral.light[100], neutral.dark[15]],
191
- '--color-on-success': [green.light[30], green.dark[90]],
192
- '--color-on-error': [red.light[30], red.dark[90]],
193
- '--color-on-warning': [yellow.light[30], yellow.dark[90]],
194
+ '--color-on-success': [neutral.light[100], neutral.dark[10]],
195
+ '--color-on-error': [neutral.light[100], neutral.dark[10]],
196
+ '--color-on-warning': [neutral.light[100], neutral.dark[10]],
197
+
198
+ '--color-info': [blue.light[40], blue.dark[70]],
199
+ '--color-info-muted': [blue.light[90], blue.dark[25]],
200
+ '--color-on-info': [neutral.light[100], neutral.dark[15]],
201
+
202
+ '--color-text-info': [blue.light[30], blue.dark[90]],
203
+ '--color-text-success': [green.light[30], green.dark[90]],
204
+ '--color-text-warning': [yellow.light[30], yellow.dark[90]],
205
+ '--color-text-error': [red.light[30], red.dark[90]],
206
+ '--color-on-info-muted': [blue.light[30], blue.dark[90]],
207
+ '--color-on-success-muted': [green.light[30], green.dark[25]],
208
+ '--color-on-warning-muted': [yellow.light[30], yellow.dark[25]],
209
+ '--color-on-error-muted': [red.light[30], red.dark[25]],
194
210
 
195
211
  // Icon
196
212
  '--color-icon-accent': [neutral.light[15], neutral.dark[95]],
@@ -336,32 +352,23 @@ export const stoneTheme = defineTheme({
336
352
  },
337
353
  },
338
354
 
339
- // Banner surface declarations live above the theme layer, so redirect the
340
- // semantic variables here instead of attempting a losing direct fill.
355
+ // Banner status surfaces and content use the matching categorical pair.
341
356
  banner: {
342
357
  'status:info': {
343
- '--color-accent-muted': 'var(--color-background-blue)',
344
- '--color-text-primary': 'var(--color-text-blue)',
345
- '--color-text-secondary': 'var(--color-text-blue)',
346
- '--color-accent': 'var(--color-text-blue)',
358
+ '--color-info-muted': 'var(--color-background-blue)',
359
+ '--color-on-info-muted': 'var(--color-text-blue)',
347
360
  },
348
361
  'status:success': {
349
362
  '--color-success-muted': 'var(--color-background-green)',
350
- '--color-text-primary': 'var(--color-text-green)',
351
- '--color-text-secondary': 'var(--color-text-green)',
352
- '--color-success': 'var(--color-text-green)',
363
+ '--color-on-success-muted': 'var(--color-text-green)',
353
364
  },
354
365
  'status:warning': {
355
366
  '--color-warning-muted': 'var(--color-background-yellow)',
356
- '--color-text-primary': 'var(--color-text-yellow)',
357
- '--color-text-secondary': 'var(--color-text-yellow)',
358
- '--color-warning': 'var(--color-text-yellow)',
367
+ '--color-on-warning-muted': 'var(--color-text-yellow)',
359
368
  },
360
369
  'status:error': {
361
370
  '--color-error-muted': 'var(--color-background-red)',
362
- '--color-text-primary': 'var(--color-text-red)',
363
- '--color-text-secondary': 'var(--color-text-red)',
364
- '--color-error': 'var(--color-text-red)',
371
+ '--color-on-error-muted': 'var(--color-text-red)',
365
372
  },
366
373
  },
367
374
 
@@ -382,6 +389,21 @@ export const stoneTheme = defineTheme({
382
389
  },
383
390
  },
384
391
 
392
+ 'progress-bar-mark': {
393
+ 'placement:fill+variant:accent': {
394
+ backgroundColor: 'var(--color-on-light)',
395
+ },
396
+ 'placement:fill+variant:success': {
397
+ backgroundColor: 'var(--color-on-light)',
398
+ },
399
+ 'placement:fill+variant:warning': {
400
+ backgroundColor: 'var(--color-on-light)',
401
+ },
402
+ 'placement:fill+variant:error': {
403
+ backgroundColor: 'var(--color-on-light)',
404
+ },
405
+ },
406
+
385
407
  // The default muted track is too close to Stone's body surface.
386
408
  'progress-bar-track': {
387
409
  base: {
@@ -400,12 +422,15 @@ export const stoneTheme = defineTheme({
400
422
  'field-status': {
401
423
  'type:success': {
402
424
  backgroundColor: 'var(--color-background-green)',
425
+ color: 'var(--color-text-green)',
403
426
  },
404
427
  'type:warning': {
405
428
  backgroundColor: 'var(--color-background-yellow)',
429
+ color: 'var(--color-text-yellow)',
406
430
  },
407
431
  'type:error': {
408
432
  backgroundColor: 'var(--color-background-red)',
433
+ color: 'var(--color-text-red)',
409
434
  },
410
435
  },
411
436
 
@@ -192,6 +192,18 @@ export const y2kTheme = defineTheme({
192
192
  '--color-on-error': [red.light[30], red.dark[20]],
193
193
  '--color-on-warning': [yellow.light[30], yellow.dark[20]],
194
194
 
195
+ '--color-info': [blue.light[40], blue.dark[75]],
196
+ '--color-info-muted': 'var(--color-background-blue)',
197
+
198
+ '--color-text-info': [blue.light[20], blue.dark[75]],
199
+ '--color-text-success': [green.light[30], green.dark[75]],
200
+ '--color-text-warning': [yellow.light[30], yellow.dark[85]],
201
+ '--color-text-error': [red.light[30], red.dark[75]],
202
+ '--color-on-info-muted': 'var(--color-text-blue)',
203
+ '--color-on-success-muted': 'var(--color-text-green)',
204
+ '--color-on-warning-muted': 'var(--color-text-yellow)',
205
+ '--color-on-error-muted': 'var(--color-text-red)',
206
+
195
207
  // Icon
196
208
  '--color-icon-accent': [neutral.light[15], neutral.dark[95]],
197
209
  '--color-icon-primary': [neutral.light[15], neutral.dark[95]],
@@ -393,28 +405,20 @@ export const y2kTheme = defineTheme({
393
405
  borderRadius: '0px',
394
406
  },
395
407
  'status:info': {
396
- backgroundColor: 'var(--color-background-blue)',
397
- '--color-text-primary': 'var(--color-text-blue)',
398
- '--color-text-secondary': 'var(--color-text-blue)',
399
- '--color-accent': 'var(--color-text-blue)',
408
+ '--color-info-muted': 'var(--color-background-blue)',
409
+ '--color-on-info-muted': 'var(--color-text-blue)',
400
410
  },
401
411
  'status:success': {
402
- backgroundColor: 'var(--color-background-green)',
403
- '--color-text-primary': 'var(--color-text-green)',
404
- '--color-text-secondary': 'var(--color-text-green)',
405
- '--color-success': 'var(--color-text-green)',
412
+ '--color-success-muted': 'var(--color-background-green)',
413
+ '--color-on-success-muted': 'var(--color-text-green)',
406
414
  },
407
415
  'status:warning': {
408
- backgroundColor: 'var(--color-background-yellow)',
409
- '--color-text-primary': 'var(--color-text-yellow)',
410
- '--color-text-secondary': 'var(--color-text-yellow)',
411
- '--color-warning': 'var(--color-text-yellow)',
416
+ '--color-warning-muted': 'var(--color-background-yellow)',
417
+ '--color-on-warning-muted': 'var(--color-text-yellow)',
412
418
  },
413
419
  'status:error': {
414
- backgroundColor: 'var(--color-background-red)',
415
- '--color-text-primary': 'var(--color-text-red)',
416
- '--color-text-secondary': 'var(--color-text-red)',
417
- '--color-error': 'var(--color-text-red)',
420
+ '--color-error-muted': 'var(--color-background-red)',
421
+ '--color-on-error-muted': 'var(--color-text-red)',
418
422
  },
419
423
  },
420
424
 
@@ -95,6 +95,116 @@ describe('theme build adaptations', () => {
95
95
  );
96
96
  });
97
97
 
98
+ it('emits scoped status aliases in built CSS and preserves child extension parity', async () => {
99
+ const {defineTheme, generateThemeCSS} =
100
+ await import('@astryxdesign/core/theme');
101
+ const project = path.join(tmpDir, 'project');
102
+ const themesDir = path.join(project, 'themes');
103
+ const input = {
104
+ name: 'status-aliases',
105
+ tokens: {
106
+ '--color-info': '#225bff',
107
+ '--color-text-blue': '#203a6c',
108
+ },
109
+ adaptations: {
110
+ rules: [
111
+ {
112
+ when: {contrast: 'more'},
113
+ value: {
114
+ tokens: {'--color-text-success': '#123456'},
115
+ },
116
+ },
117
+ {
118
+ when: {pointer: 'coarse'},
119
+ value: {tokens: {'--color-text-green': '#abcdef'}},
120
+ },
121
+ ],
122
+ },
123
+ onDark: {
124
+ tokens: {'--color-text-blue': '#fefefe'},
125
+ },
126
+ };
127
+ const themeFile = writeTheme(themesDir, input.name, JSON.stringify(input));
128
+
129
+ const result = await build(project, themeFile);
130
+ expect(result.code, result.stderr).toBe(0);
131
+
132
+ const css = fs.readFileSync(
133
+ path.join(themesDir, 'status-aliases.css'),
134
+ 'utf8',
135
+ );
136
+ const mediaAlias = '--color-text-info: var(--color-text-blue);';
137
+ const adaptationAlias = '--color-text-success: var(--color-text-green);';
138
+ const authoredRole = '--color-text-success: #123456;';
139
+ // The authored Info fill is a concrete hue, so theme generation derives
140
+ // its content, text, and pale-fill content (theme-compilation INV17).
141
+ for (const role of ['on-info', 'text-info', 'on-info-muted']) {
142
+ expect(css).toMatch(
143
+ new RegExp(
144
+ `--color-${role}: light-dark\\(#[0-9A-F]{6}, #[0-9A-F]{6}\\);`,
145
+ ),
146
+ );
147
+ }
148
+ // The dark media surface that sets the hue rebinds the text alias.
149
+ expect(css).toContain(mediaAlias);
150
+ expect(css).toContain(adaptationAlias);
151
+ expect(css.split(authoredRole).length - 1).toBeGreaterThanOrEqual(2);
152
+ expect(css.lastIndexOf(authoredRole)).toBeGreaterThan(
153
+ css.lastIndexOf(adaptationAlias),
154
+ );
155
+
156
+ const {statusAliasesTheme: builtTheme} = await import(
157
+ pathToFileURL(path.join(themesDir, 'status-aliases.js')).href
158
+ );
159
+ const source = defineTheme(input);
160
+ const childInput = {
161
+ name: 'status-alias-child',
162
+ tokens: {'--color-text-blue': '#345678'},
163
+ };
164
+ const fromSource = defineTheme({...childInput, extends: source});
165
+ const fromBuilt = defineTheme({...childInput, extends: builtTheme});
166
+ expect(generateThemeCSS(fromBuilt)).toEqual(generateThemeCSS(fromSource));
167
+ });
168
+
169
+ it('derives a complete status set for a minimal theme in built CSS (INV17)', async () => {
170
+ const {defineTheme, generateThemeCSS} =
171
+ await import('@astryxdesign/core/theme');
172
+ const project = path.join(tmpDir, 'project');
173
+ const themesDir = path.join(project, 'themes');
174
+ const input = {
175
+ name: 'status-minimal',
176
+ tokens: {
177
+ '--color-success': '#3FB950',
178
+ '--color-warning': '#D29922',
179
+ '--color-error': '#F85149',
180
+ '--color-info': '#6E40C9',
181
+ },
182
+ };
183
+ const themeFile = writeTheme(themesDir, input.name, JSON.stringify(input));
184
+ const result = await build(project, themeFile);
185
+ expect(result.code, result.stderr).toBe(0);
186
+
187
+ const css = fs.readFileSync(
188
+ path.join(themesDir, 'status-minimal.css'),
189
+ 'utf8',
190
+ );
191
+ for (const status of ['success', 'warning', 'error', 'info']) {
192
+ expect(css).toMatch(
193
+ new RegExp(
194
+ `--color-text-${status}: light-dark\\(#[0-9A-F]{6}, #[0-9A-F]{6}\\);`,
195
+ ),
196
+ );
197
+ expect(css).toContain(
198
+ `--color-icon-${status}: var(--color-text-${status});`,
199
+ );
200
+ }
201
+ // Built and runtime output derive the same values.
202
+ const runtime = generateThemeCSS(defineTheme(input));
203
+ const derived = css.match(/--color-text-warning: [^;]+;/)?.[0];
204
+ expect(derived).toBeDefined();
205
+ expect(JSON.stringify(runtime)).toContain(derived);
206
+ });
207
+
98
208
  it.each([
99
209
  ['defined', writeTheme],
100
210
  ['plain', writePlainTheme],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astryxdesign/cli",
3
- "version": "0.7.5-canary.e9b3f3e",
3
+ "version": "0.7.5-canary.f042c6e",
4
4
  "displayName": "CLI",
5
5
  "description": "Scaffold projects, browse templates, generate themes, and get agent-ready docs from the command line.",
6
6
  "author": "Meta Open Source",
@@ -111,10 +111,10 @@
111
111
  "zod": "^4.4.3"
112
112
  },
113
113
  "peerDependencies": {
114
- "@astryxdesign/charts": "0.7.5-canary.e9b3f3e",
115
- "@astryxdesign/core": "0.7.5-canary.e9b3f3e",
116
- "@astryxdesign/lab": "0.7.5-canary.e9b3f3e",
117
- "@astryxdesign/theme-neutral": "0.7.5-canary.e9b3f3e"
114
+ "@astryxdesign/charts": "0.7.5-canary.f042c6e",
115
+ "@astryxdesign/core": "0.7.5-canary.f042c6e",
116
+ "@astryxdesign/lab": "0.7.5-canary.f042c6e",
117
+ "@astryxdesign/theme-neutral": "0.7.5-canary.f042c6e"
118
118
  },
119
119
  "peerDependenciesMeta": {
120
120
  "@astryxdesign/charts": {
@@ -131,10 +131,10 @@
131
131
  }
132
132
  },
133
133
  "devDependencies": {
134
- "@astryxdesign/charts": "0.7.5-canary.e9b3f3e",
135
- "@astryxdesign/core": "0.7.5-canary.e9b3f3e",
136
- "@astryxdesign/lab": "0.7.5-canary.e9b3f3e",
137
- "@astryxdesign/theme-neutral": "0.7.5-canary.e9b3f3e",
134
+ "@astryxdesign/charts": "0.7.5-canary.f042c6e",
135
+ "@astryxdesign/core": "0.7.5-canary.f042c6e",
136
+ "@astryxdesign/lab": "0.7.5-canary.f042c6e",
137
+ "@astryxdesign/theme-neutral": "0.7.5-canary.f042c6e",
138
138
  "@heroicons/react": "^2.2.0",
139
139
  "@stylexjs/stylex": "^0.19.0",
140
140
  "@types/babel__core": "^7.20.5",