astryx-dracula 0.3.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/USAGE.md +25 -0
  2. package/astryx-dracula.d.ts +2 -2
  3. package/astryx-dracula.js +384 -3
  4. package/astryx-dracula.variants.d.ts +2 -14
  5. package/icons.mjs +125 -0
  6. package/package.json +21 -9
  7. package/shared/auth-chrome.tsx +156 -6
  8. package/shared/chaptered-doc.tsx +3 -4
  9. package/shared/chart-hues.ts +0 -5
  10. package/shared/chart-legend.tsx +2 -3
  11. package/shared/data-bar.tsx +5 -5
  12. package/shared/format-money.ts +3 -0
  13. package/shared/metric-card.tsx +127 -0
  14. package/shared/revenue-chart.tsx +63 -7
  15. package/shared/scene-hues.ts +0 -8
  16. package/shared/scene-tile.tsx +3 -11
  17. package/shared/settings-data.ts +71 -1
  18. package/shared/settings-rows.tsx +76 -30
  19. package/shared/stars.tsx +28 -0
  20. package/templates/ai-chat-landing.tsx +105 -67
  21. package/templates/ai-chat.tsx +67 -80
  22. package/templates/centered-hero.tsx +2 -2
  23. package/templates/contact-form.tsx +11 -10
  24. package/templates/dashboard-portfolio.tsx +77 -155
  25. package/templates/dashboard.tsx +24 -137
  26. package/templates/detail-page.tsx +25 -22
  27. package/templates/documentation-design.tsx +39 -478
  28. package/templates/documentation-technical.tsx +13 -31
  29. package/templates/editor.tsx +168 -185
  30. package/templates/file-explorer.tsx +91 -93
  31. package/templates/form-two-column.tsx +1 -1
  32. package/templates/ide.tsx +18 -24
  33. package/templates/incident-console.tsx +67 -42
  34. package/templates/kanban-board.tsx +36 -85
  35. package/templates/library.tsx +42 -66
  36. package/templates/login-card.tsx +33 -123
  37. package/templates/login-split.tsx +96 -119
  38. package/templates/login-sso.tsx +69 -74
  39. package/templates/login.tsx +21 -118
  40. package/templates/messaging-shell.tsx +162 -168
  41. package/templates/payment-form.tsx +63 -71
  42. package/templates/product-detail.tsx +11 -46
  43. package/templates/product-tour.tsx +38 -60
  44. package/templates/settings-dialog.tsx +93 -118
  45. package/templates/settings-sidebar.tsx +122 -143
  46. package/templates/settings.tsx +208 -121
  47. package/templates/shell-nav.tsx +20 -75
  48. package/templates/shell-side-nav.tsx +16 -90
  49. package/templates/shell-top-nav.tsx +20 -53
  50. package/templates/side-gallery.tsx +19 -19
  51. package/templates/table-grouped.tsx +86 -136
  52. package/templates/table-page-chart.tsx +12 -11
  53. package/templates/table-page-heatmap-status.tsx +0 -17
  54. package/templates/table-page-shoe-store-heatmap.tsx +12 -12
  55. package/templates/table-page.tsx +4 -31
  56. package/templates/table.tsx +18 -2
  57. package/templates/tech-report.tsx +59 -73
  58. package/templates/theme-showcase.tsx +124 -415
  59. package/theme.css +211 -119
@@ -2,7 +2,7 @@
2
2
  // XLE (canonical structure, validated with `bunx astryx layout check`):
3
3
  // L > (Tbar[size=sm] > (H > IB"Go back" + IB"Go forward" + Tx"Folder"[t=label]) + (SG"View mode" > SGI*4) + (H > IB"Group" + IB"Share" + IB"Tags" + IB"More" + IB"Search")) + (LC[p=0 !scroll] > (Hd"File Explorer"[level=1] + H[h=fill] > (S.transparent[p=2 w=240 dv=[end]] > UL[density=compact !hasDividers] > (LI > Ic + Tx"Item"[t=body])*3)*3 + (S.transparent[p=6] > V[g=4 a=center] > Av[size=96] + (V[g=1 a=center] > Tx"Name"[t=body] + Tx"Kind"[t=supporting]) + (ML"Information" > MLI*3))))
4
4
 
5
- import {useState, useMemo, type CSSProperties} from 'react';
5
+ import {useState, useMemo} from 'react';
6
6
  import {Layout, LayoutContent} from '@astryxdesign/core/Layout';
7
7
  import {Toolbar} from '@astryxdesign/core/Toolbar';
8
8
  import {List, ListItem} from '@astryxdesign/core/List';
@@ -262,19 +262,6 @@ const FILESYSTEM: FileSystemItem[] = [
262
262
  },
263
263
  ];
264
264
 
265
- const page: CSSProperties = {height: '100dvh'};
266
- const columnRow: CSSProperties = {overflowX: 'auto', overflowY: 'hidden'};
267
- const scrollable: CSSProperties = {overflowY: 'auto'};
268
- const fixedColumn: CSSProperties = {flexShrink: 0};
269
- // The column's 320px resting width rides on Section's `width` prop; grow
270
- // lets it absorb whatever the fixed columns leave. Inline styles are for
271
- // what props cannot express.
272
- const detailColumn: CSSProperties = {
273
- flexGrow: 1,
274
- flexShrink: 0,
275
- };
276
- const controlsScroll: CSSProperties = {overflowX: 'auto'};
277
-
278
265
  // Static toolbar content, hoisted out of the render path: neither element
279
266
  // reads component state, so rebuilding them per render buys nothing.
280
267
  const viewSwitcher = (
@@ -373,7 +360,6 @@ export default function FileExplorer() {
373
360
  ]);
374
361
 
375
362
  const isNarrow = useMediaQuery('(max-width: 768px)');
376
- const isPhone = isNarrow;
377
363
 
378
364
  const columns = useMemo(() => {
379
365
  // `id` names the folder a column lists, so the React key stays put when
@@ -436,6 +422,15 @@ export default function FileExplorer() {
436
422
  return item?.type === 'file' ? item : null;
437
423
  }, [selectedPath]);
438
424
 
425
+ // Narrow mode is one pane at a time, the same master→detail shape the
426
+ // folder columns already use: the deepest column, or the file preview when
427
+ // the selection ends on a file. Beside each other the column and the
428
+ // preview need 240 + 320 = 560px, so in a 390px pane the preview was cut at
429
+ // the viewport edge with nothing to scroll it into view. "Go back" (:464)
430
+ // pops the selected file off the path, so it is also the way back from the
431
+ // preview to the column.
432
+ const isPreviewPane = isNarrow && selectedFile != null;
433
+
439
434
  const handleSelect = (columnIndex: number, itemId: string) => {
440
435
  setSelectedPath([...selectedPath.slice(0, columnIndex), itemId]);
441
436
  };
@@ -471,19 +466,19 @@ export default function FileExplorer() {
471
466
 
472
467
  return (
473
468
  <Layout
474
- style={page}
469
+ style={{height: '100dvh'}}
475
470
  height="fill"
476
471
  header={
477
472
  <>
478
473
  <Toolbar
479
474
  label="File Explorer"
480
475
  size="sm"
481
- dividers={isPhone ? undefined : ['bottom']}
476
+ dividers={isNarrow ? undefined : ['bottom']}
482
477
  startContent={titleContent}
483
- centerContent={isPhone ? undefined : viewSwitcher}
484
- endContent={isPhone ? undefined : fileActions}
478
+ centerContent={isNarrow ? undefined : viewSwitcher}
479
+ endContent={isNarrow ? undefined : fileActions}
485
480
  />
486
- {isPhone && (
481
+ {isNarrow && (
487
482
  <Section
488
483
  variant="transparent"
489
484
  padding={2}
@@ -491,7 +486,7 @@ export default function FileExplorer() {
491
486
  <HStack
492
487
  gap={2}
493
488
  vAlign="center"
494
- style={controlsScroll}
489
+ style={{overflowX: 'auto'}}
495
490
  role="region"
496
491
  aria-label="View and file actions"
497
492
  tabIndex={0}>
@@ -507,88 +502,91 @@ export default function FileExplorer() {
507
502
  <VisuallyHidden as="h1">
508
503
  File Explorer
509
504
  </VisuallyHidden>
510
- <HStack height="100%" style={columnRow}>
511
- {visibleColumns.map((col, colIndex) => {
512
- const trueIndex = columnOffset + colIndex;
513
- const showDivider =
514
- trueIndex < columns.length - 1 || selectedFile != null;
515
- return (
516
- <Section
517
- key={col.id}
518
- width={240}
519
- padding={2}
520
- variant="transparent"
521
- dividers={showDivider ? ['end'] : undefined}
522
- style={{...scrollable, ...fixedColumn}}
523
- role="region"
524
- aria-label={`Folder column ${trueIndex + 1}`}
525
- tabIndex={0}>
526
- {col.items.length === 0 ? (
527
- <EmptyState
528
- title="Quiet in the crypt"
529
- description="This folder holds no scrolls yet."
530
- isCompact
531
- />
532
- ) : (
533
- <List density="compact" hasDividers={false}>
534
- {col.items.map(item => {
535
- const isSelected = col.selectedId === item.id;
536
- const hasChildren =
537
- item.type === 'folder' &&
538
- item.children != null &&
539
- item.children.length > 0;
540
- return (
541
- <ListItem
542
- key={item.id}
543
- label={
544
- <Text type="body" maxLines={1}>
545
- {item.name}
546
- </Text>
547
- }
548
- startContent={
549
- <Icon
550
- icon={
551
- item.type === 'folder'
552
- ? Folder
553
- : FileText
554
- }
555
- color={
556
- item.type === 'folder' ? 'accent' : 'secondary'
557
- }
558
- size="sm"
559
- />
560
- }
561
- endContent={
562
- hasChildren ? (
505
+ <HStack height="100%" style={{overflowX: 'auto', overflowY: 'hidden'}}>
506
+ {!isPreviewPane &&
507
+ visibleColumns.map((col, colIndex) => {
508
+ const trueIndex = columnOffset + colIndex;
509
+ const showDivider =
510
+ trueIndex < columns.length - 1 || selectedFile != null;
511
+ return (
512
+ <Section
513
+ key={col.id}
514
+ width={240}
515
+ padding={2}
516
+ variant="transparent"
517
+ dividers={showDivider ? ['end'] : undefined}
518
+ style={{overflowY: 'auto', flexShrink: 0}}
519
+ role="region"
520
+ aria-label={`Folder column ${trueIndex + 1}`}
521
+ tabIndex={0}>
522
+ {col.items.length === 0 ? (
523
+ <EmptyState
524
+ title="Quiet in the crypt"
525
+ description="This folder holds no scrolls yet."
526
+ isCompact
527
+ />
528
+ ) : (
529
+ <List density="compact" hasDividers={false}>
530
+ {col.items.map(item => {
531
+ const isSelected = col.selectedId === item.id;
532
+ const hasChildren =
533
+ item.type === 'folder' &&
534
+ item.children != null &&
535
+ item.children.length > 0;
536
+ return (
537
+ <ListItem
538
+ key={item.id}
539
+ label={
540
+ <Text type="body" maxLines={1}>
541
+ {item.name}
542
+ </Text>
543
+ }
544
+ startContent={
563
545
  <Icon
564
- icon={ChevronRight}
565
- size="xsm"
566
- color="secondary"
546
+ icon={
547
+ item.type === 'folder'
548
+ ? Folder
549
+ : FileText
550
+ }
551
+ color={
552
+ item.type === 'folder'
553
+ ? 'accent'
554
+ : 'secondary'
555
+ }
556
+ size="sm"
567
557
  />
568
- ) : undefined
569
- }
570
- onClick={() => handleSelect(trueIndex, item.id)}
571
- isSelected={isSelected}
572
- />
573
- );
574
- })}
575
- </List>
576
- )}
577
- </Section>
578
- );
579
- })}
558
+ }
559
+ endContent={
560
+ hasChildren ? (
561
+ <Icon
562
+ icon={ChevronRight}
563
+ size="xsm"
564
+ color="secondary"
565
+ />
566
+ ) : undefined
567
+ }
568
+ onClick={() => handleSelect(trueIndex, item.id)}
569
+ isSelected={isSelected}
570
+ />
571
+ );
572
+ })}
573
+ </List>
574
+ )}
575
+ </Section>
576
+ );
577
+ })}
580
578
  {selectedFile && (
581
579
  <Section
582
- width={320}
583
- // 16px, not 24. The sibling column at :519 is padding={2}
580
+ width={isPreviewPane ? '100%' : 320}
581
+ // 16px, not 24. The sibling column at :529 is padding={2}
584
582
  // (8px) because it holds a dense compact List, and these two
585
- // sit in one HStack (:510) as columns of the same view --
583
+ // sit in one HStack (:519) as columns of the same view --
586
584
  // 24 beside 8 made the compact column look broken rather
587
585
  // than compact. 16 is the outer-inset value this repo already
588
586
  // uses for exactly this (scaffolds.md new-site recipe).
589
587
  padding={4}
590
588
  variant="transparent"
591
- style={{...scrollable, ...detailColumn}}
589
+ style={{overflowY: 'auto', flexGrow: 1, flexShrink: 0}}
592
590
  role="region"
593
591
  aria-label={`Details for ${selectedFile.name}`}
594
592
  tabIndex={0}>
@@ -238,7 +238,7 @@ export default function TwoColumnForm() {
238
238
  <Text type="supporting" color="secondary">
239
239
  {col.label}
240
240
  </Text>
241
- <Link href={`mailto:${col.email}`}>
241
+ <Link href={`mailto:${col.email}`} hasUnderline>
242
242
  {col.email}
243
243
  </Link>
244
244
  </VStack>
package/templates/ide.tsx CHANGED
@@ -75,6 +75,15 @@ const styles: Record<string, CSSProperties> = {
75
75
  },
76
76
  };
77
77
 
78
+ // Full-bleed CodeBlock inside a panel: the panel owns the chrome, so the
79
+ // block drops its own border and radius rather than drawing a box in a box.
80
+ const codeBlockFlush: CSSProperties = {
81
+ width: '100%',
82
+ height: '100%',
83
+ borderWidth: 0,
84
+ borderRadius: 0,
85
+ };
86
+
78
87
  const EDITOR_CODE = `import {useState, useCallback} from 'react';
79
88
  import {Button} from '@astryxdesign/core/Button';
80
89
  import {Text} from '@astryxdesign/core/Text';
@@ -226,16 +235,16 @@ export default function IdeWorkspace() {
226
235
 
227
236
  const startPanel = useResizable({
228
237
  defaultSize: 256,
229
- minSizePx: 160,
230
- maxSizePx: 400,
238
+ minSize: 160,
239
+ maxSize: 400,
231
240
  collapsible: true,
232
241
  collapsedSize: 50,
233
242
  });
234
243
 
235
244
  const endPanel = useResizable({
236
245
  defaultSize: 320,
237
- minSizePx: 180,
238
- maxSizePx: 500,
246
+ minSize: 180,
247
+ maxSize: 500,
239
248
  collapsible: true,
240
249
  collapsedSize: 50,
241
250
  });
@@ -244,8 +253,8 @@ export default function IdeWorkspace() {
244
253
  // has no minimum of its own, and an unbounded drag leaves nothing to grab.
245
254
  const bottomPanel = useResizable({
246
255
  defaultSize: 300,
247
- minSizePx: 80,
248
- maxSizePx: 520,
256
+ minSize: 80,
257
+ maxSize: 520,
249
258
  collapsible: true,
250
259
  collapsedSize: 40,
251
260
  });
@@ -323,12 +332,7 @@ export default function IdeWorkspace() {
323
332
  highlightLines={[21]}
324
333
  hasCopyButton={false}
325
334
  size="sm"
326
- style={{
327
- width: '100%',
328
- height: '100%',
329
- borderWidth: 0,
330
- borderRadius: 0,
331
- }}
335
+ style={codeBlockFlush}
332
336
  />
333
337
  </StackItem>
334
338
  <ResizeHandle
@@ -366,12 +370,7 @@ export default function IdeWorkspace() {
366
370
  hasLanguageLabel={false}
367
371
  hasCopyButton={false}
368
372
  size="sm"
369
- style={{
370
- width: '100%',
371
- height: '100%',
372
- borderWidth: 0,
373
- borderRadius: 0,
374
- }}
373
+ style={codeBlockFlush}
375
374
  />
376
375
  )}
377
376
  {activeTermTab === 'output' && (
@@ -382,12 +381,7 @@ export default function IdeWorkspace() {
382
381
  hasLanguageLabel={false}
383
382
  hasCopyButton={false}
384
383
  size="sm"
385
- style={{
386
- width: '100%',
387
- height: '100%',
388
- borderWidth: 0,
389
- borderRadius: 0,
390
- }}
384
+ style={codeBlockFlush}
391
385
  />
392
386
  )}
393
387
  {activeTermTab === 'problems' && (
@@ -1,6 +1,14 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
  // XLE (canonical structure, validated with `bunx astryx layout check`):
3
- // L > (LH > H[g3 a=center] > (H[g2 a=center] > Hd"Night watch"[level=1] + Tx"3 investigating"[t=supporting]) + SegmentedControl"Filter by status" + B"Declare incident") + (LC[p0] > V[g0] > (H > PowerSearch"Search the night watch…") + (List > (ListItem)*7)) + (LayoutPanel[w380 p0] > V[g4] > (V[g2] > (H[g2 a=center] > StatusDot + Tx"INC-2417"[t=supporting] + Token"Investigating") + Hd"Checkout API elevated 5xx rate"[level=2]) + (H[g2] > B.primary"Mark mitigated" + B.secondary"Escalate") + Divider + MetadataList + Divider + (V[g2] > Hd"Timeline"[level=3] + List))
3
+ // NOTE on `t=display-2`: the h1 asked for display-2 from the start, but
4
+ // core 0.3.0's Heading emitted no `data-type`, and the 0.3.0 CLI emitted no
5
+ // `.astryx-heading[data-type]` rule, so --text-display-2-size never reached a
6
+ // heading and the 24px level-1 default leaked through. core+CLI 0.6.3 restored
7
+ // the path, so this title now renders at its declared 35px. Verified by
8
+ // pixel-diffing the pre-upgrade build against this one at 1440 and 390: the
9
+ // only regression was this header detaching at 390, fixed by stacking the
10
+ // title group under `isNarrow`.
11
+ // L > (LH > H[g3 a=center] > (H[g2 a=center] > Hd"Night watch"[level=1 t=display-2] + Tx"3 investigating"[t=supporting]) + SegmentedControl"Filter by status" + B"Declare incident") + (LC[p0] > V[g0] > (H > PowerSearch"Search the night watch…") + (List > (ListItem)*7)) + (LayoutPanel[w380 p0] > V[g4] > (V[g2] > (H[g2 a=center] > StatusDot + Tx"INC-2417"[t=supporting] + Token"Investigating") + Hd"Checkout API elevated 5xx rate"[level=2]) + (H[g2] > B.primary"Mark mitigated" + B.secondary"Escalate") + Divider + MetadataList + Divider + (V[g2] > Hd"Timeline"[level=3] + List))
4
12
 
5
13
  /**
6
14
  * Incident Console — an on-call incident response tool for the night watch. Frame-first layout (see `bunx astryx docs layout`), distilled fro (Frame/responsive/container: see XLE header above.)
@@ -261,17 +269,16 @@ const INCIDENTS: Incident[] = [
261
269
 
262
270
  const STATUS_ORDER: Status[] = ['investigating', 'mitigated', 'resolved'];
263
271
 
264
- const STATUS_LABEL: Record<Status, string> = {
265
- investigating: 'Investigating',
266
- mitigated: 'Mitigated',
267
- resolved: 'Resolved',
268
- };
269
-
270
- const STATUS_TOKEN_COLOR: Record<Status, 'cyan' | 'yellow' | 'green'> = {
271
- // Info vocab: an open investigation pulses cyan, never red.
272
- investigating: 'cyan',
273
- mitigated: 'yellow',
274
- resolved: 'green',
272
+ // One union: label for group headings + row tokens, color for row tokens.
273
+ // SEVERITY_DOT stays separate — it keys on severity (sev1/2/3), a different
274
+ // axis than status, so merging would conflate two domains in one map.
275
+ const STATUS: Record<
276
+ Status,
277
+ {label: string; tokenColor: 'cyan' | 'yellow' | 'green'}
278
+ > = {
279
+ investigating: {label: 'Investigating', tokenColor: 'cyan'},
280
+ mitigated: {label: 'Mitigated', tokenColor: 'yellow'},
281
+ resolved: {label: 'Resolved', tokenColor: 'green'},
275
282
  };
276
283
 
277
284
  const SEVERITY_DOT: Record<Severity, 'error' | 'warning' | 'neutral'> = {
@@ -280,6 +287,30 @@ const SEVERITY_DOT: Record<Severity, 'error' | 'warning' | 'neutral'> = {
280
287
  sev3: 'neutral',
281
288
  };
282
289
 
290
+ // SEV badge shared by rows and the inspector: dot + uppercase word travel
291
+ // together (a bare dot leaves SEV1/2/3 as hue alone; StatusDot's label is
292
+ // aria-only on a role="img" span and paints nothing).
293
+ function SeverityBadge({
294
+ severity,
295
+ isPulsing = false,
296
+ }: {
297
+ severity: Severity;
298
+ isPulsing?: boolean;
299
+ }) {
300
+ return (
301
+ <HStack gap={1} vAlign="center">
302
+ <StatusDot
303
+ variant={SEVERITY_DOT[severity]}
304
+ label={severity.toUpperCase()}
305
+ isPulsing={isPulsing}
306
+ />
307
+ <Text type="supporting" color="secondary">
308
+ {severity.toUpperCase()}
309
+ </Text>
310
+ </HStack>
311
+ );
312
+ }
313
+
283
314
  const SERVICE_VALUES = [
284
315
  {value: 'checkout-api', label: 'checkout-api'},
285
316
  {value: 'search-indexer', label: 'search-indexer'},
@@ -342,7 +373,7 @@ function IncidentRows({
342
373
  floor. The group heading is the string this sidebar is scanned
343
374
  for. Hierarchy comes from the two type roles (principle 6),
344
375
  not from dimming the count. */}
345
- <Text type="label">{STATUS_LABEL[group.status]}</Text>
376
+ <Text type="label">{STATUS[group.status].label}</Text>
346
377
  <Text type="supporting" hasTabularNumbers>
347
378
  {group.items.length}
348
379
  </Text>
@@ -354,27 +385,17 @@ function IncidentRows({
354
385
  label={incident.title}
355
386
  description={`${incident.id} · ${incident.service} · ${incident.impact}`}
356
387
  startContent={
357
- // StatusDot's label is aria-label on a role="img" span
358
- // (core StatusDot.js:107-120), so it reaches assistive tech
359
- // and paints nothing. A bare dot leaves SEV1/2/3 as hue
360
- // alone. Dot and word travel together, as at :751-757.
361
- <HStack gap={1} vAlign="center">
362
- <StatusDot
363
- variant={SEVERITY_DOT[incident.severity]}
364
- label={incident.severity.toUpperCase()}
365
- isPulsing={incident.status === 'investigating'}
366
- />
367
- <Text type="supporting" color="secondary">
368
- {incident.severity.toUpperCase()}
369
- </Text>
370
- </HStack>
388
+ <SeverityBadge
389
+ severity={incident.severity}
390
+ isPulsing={incident.status === 'investigating'}
391
+ />
371
392
  }
372
393
  endContent={
373
394
  <HStack gap={3} vAlign="center">
374
395
  <Token
375
396
  size="sm"
376
- color={STATUS_TOKEN_COLOR[incident.status]}
377
- label={STATUS_LABEL[incident.status]}
397
+ color={STATUS[incident.status].tokenColor}
398
+ label={STATUS[incident.status].label}
378
399
  />
379
400
  <Timestamp
380
401
  value={incident.startedAt}
@@ -406,27 +427,23 @@ function IncidentInspector({incident}: {incident: Incident}) {
406
427
  <VStack gap={4} style={styles.inspector}>
407
428
  <VStack gap={2}>
408
429
  <HStack gap={1} vAlign="center">
409
- <StatusDot
410
- variant={SEVERITY_DOT[incident.severity]}
411
- label={incident.severity.toUpperCase()}
430
+ <SeverityBadge
431
+ severity={incident.severity}
412
432
  isPulsing={incident.status === 'investigating'}
413
433
  />
414
- <Text type="supporting" color="secondary">
415
- {incident.severity.toUpperCase()}
416
- </Text>
417
434
  <Text type="supporting" color="secondary">
418
435
  {incident.id}
419
436
  </Text>
420
437
  <Token
421
438
  size="sm"
422
- color={STATUS_TOKEN_COLOR[incident.status]}
423
- label={STATUS_LABEL[incident.status]}
439
+ color={STATUS[incident.status].tokenColor}
440
+ label={STATUS[incident.status].label}
424
441
  />
425
442
  </HStack>
426
443
  <Heading level={2}>{incident.title}</Heading>
427
444
  </VStack>
428
445
 
429
- <HStack gap={2}>
446
+ <HStack gap={2} wrap="wrap">
430
447
  <Button label={nextAction} variant="primary" />
431
448
  <Button label="Escalate" variant="secondary" />
432
449
  </HStack>
@@ -484,8 +501,8 @@ export default function IncidentConsole() {
484
501
 
485
502
  const inspectorPanel = useResizable({
486
503
  defaultSize: 380,
487
- minSizePx: 320,
488
- maxSizePx: 480,
504
+ minSize: 320,
505
+ maxSize: 480,
489
506
  });
490
507
 
491
508
  const visible = useMemo(() => {
@@ -521,9 +538,17 @@ export default function IncidentConsole() {
521
538
  icon={<Icon icon={Plus} size="sm" />}
522
539
  />
523
540
  );
541
+ // Stacks below 1024px. The H1 asks for `display-2` (35px), which is the
542
+ // theme's own declared value but only started rendering in core 0.6.3 —
543
+ // see the note in the XLE header. At 35px the title wraps to two lines on a
544
+ // phone, and the counter beside it then wraps too and detaches into the
545
+ // corner. Stacking keeps the counter on the title's own line at any width
546
+ // the title needs more than one, and costs nothing at desktop.
524
547
  const titleGroup = (
525
- <HStack gap={2} vAlign="center">
526
- <Heading level={1} type="display-2">Night watch</Heading>
548
+ <HStack gap={2} vAlign="center" wrap="wrap">
549
+ <Heading level={1} type="display-2">
550
+ Night watch
551
+ </Heading>
527
552
  <Text type="supporting" color="secondary" hasTabularNumbers>
528
553
  {openCount} investigating
529
554
  </Text>