astryx-dracula 0.5.1 → 0.7.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 (120) hide show
  1. package/BRAND.md +57 -6
  2. package/README.md +16 -6
  3. package/USAGE.md +50 -50
  4. package/astryx-dracula.d.ts +2 -2
  5. package/astryx-dracula.js +49 -11
  6. package/astryx-dracula.variants.d.ts +2 -2
  7. package/icons.mjs +4 -0
  8. package/icons.tsx +8 -0
  9. package/package.json +23 -18
  10. package/shared/auth-chrome-config.ts +0 -4
  11. package/shared/auth-chrome.tsx +2 -3
  12. package/shared/chaptered-doc-config.ts +3 -2
  13. package/shared/chaptered-doc.tsx +1 -2
  14. package/shared/chart-hues.ts +21 -6
  15. package/shared/chart-legend.tsx +2 -2
  16. package/shared/data-bar.tsx +2 -2
  17. package/shared/order-desk.tsx +52 -54
  18. package/shared/revenue-chart.tsx +1 -1
  19. package/shared/scene-castle.tsx +21 -13
  20. package/shared/settings-data.ts +0 -6
  21. package/shared/settings-rows.tsx +1 -23
  22. package/templates/ai-chat-landing.template.mjs +1 -0
  23. package/templates/ai-chat-landing.tsx +30 -11
  24. package/templates/ai-chat.template.mjs +1 -0
  25. package/templates/ai-chat.tsx +9 -3
  26. package/templates/blank.template.mjs +1 -0
  27. package/templates/blank.tsx +4 -2
  28. package/templates/centered-hero.template.mjs +1 -0
  29. package/templates/centered-hero.tsx +5 -3
  30. package/templates/classic-gallery.template.mjs +1 -0
  31. package/templates/classic-gallery.tsx +9 -2
  32. package/templates/contact-form.template.mjs +1 -0
  33. package/templates/contact-form.tsx +13 -2
  34. package/templates/dashboard-portfolio.template.mjs +1 -0
  35. package/templates/dashboard-portfolio.tsx +21 -6
  36. package/templates/dashboard.template.mjs +1 -0
  37. package/templates/dashboard.tsx +9 -7
  38. package/templates/detail-page.template.mjs +1 -0
  39. package/templates/detail-page.tsx +28 -36
  40. package/templates/documentation-design.template.mjs +1 -0
  41. package/templates/documentation-design.tsx +8 -3
  42. package/templates/documentation-technical.template.mjs +1 -0
  43. package/templates/documentation-technical.tsx +11 -6
  44. package/templates/documentation.template.mjs +1 -0
  45. package/templates/documentation.tsx +16 -7
  46. package/templates/editor.template.mjs +1 -0
  47. package/templates/editor.tsx +4 -2
  48. package/templates/file-explorer.template.mjs +1 -0
  49. package/templates/file-explorer.tsx +4 -2
  50. package/templates/form-two-column.template.mjs +1 -0
  51. package/templates/form-two-column.tsx +19 -4
  52. package/templates/form-wizard.template.mjs +15 -0
  53. package/templates/form-wizard.tsx +878 -0
  54. package/templates/gallery-hero.template.mjs +1 -0
  55. package/templates/gallery-hero.tsx +14 -6
  56. package/templates/ide.template.mjs +1 -0
  57. package/templates/ide.tsx +187 -101
  58. package/templates/incident-console.template.mjs +1 -0
  59. package/templates/incident-console.tsx +137 -85
  60. package/templates/kanban-board.template.mjs +1 -0
  61. package/templates/kanban-board.tsx +51 -7
  62. package/templates/library.template.mjs +1 -0
  63. package/templates/library.tsx +15 -4
  64. package/templates/login-card.template.mjs +1 -0
  65. package/templates/login-card.tsx +4 -2
  66. package/templates/login-split.template.mjs +1 -0
  67. package/templates/login-split.tsx +8 -5
  68. package/templates/login-sso.template.mjs +1 -0
  69. package/templates/login-sso.tsx +13 -19
  70. package/templates/login.template.mjs +1 -0
  71. package/templates/login.tsx +4 -2
  72. package/templates/messaging-shell.template.mjs +1 -0
  73. package/templates/messaging-shell.tsx +114 -47
  74. package/templates/mixed-gallery.template.mjs +1 -0
  75. package/templates/mixed-gallery.tsx +10 -2
  76. package/templates/payment-form.template.mjs +1 -0
  77. package/templates/payment-form.tsx +34 -31
  78. package/templates/product-detail.template.mjs +1 -0
  79. package/templates/product-detail.tsx +21 -5
  80. package/templates/product-gallery.template.mjs +1 -0
  81. package/templates/product-gallery.tsx +12 -5
  82. package/templates/product-tour.template.mjs +1 -0
  83. package/templates/product-tour.tsx +21 -14
  84. package/templates/settings-dialog.template.mjs +1 -0
  85. package/templates/settings-dialog.tsx +10 -3
  86. package/templates/settings-sidebar.template.mjs +1 -0
  87. package/templates/settings-sidebar.tsx +609 -588
  88. package/templates/settings.template.mjs +1 -0
  89. package/templates/settings.tsx +11 -12
  90. package/templates/shell-nav.template.mjs +1 -0
  91. package/templates/shell-nav.tsx +47 -29
  92. package/templates/shell-side-nav.template.mjs +1 -0
  93. package/templates/shell-side-nav.tsx +88 -70
  94. package/templates/shell-top-nav.template.mjs +1 -0
  95. package/templates/shell-top-nav.tsx +102 -88
  96. package/templates/side-gallery.template.mjs +1 -0
  97. package/templates/side-gallery.tsx +4 -2
  98. package/templates/table-grouped.template.mjs +1 -0
  99. package/templates/table-grouped.tsx +150 -134
  100. package/templates/table-page-chart.template.mjs +1 -0
  101. package/templates/table-page-chart.tsx +4 -2
  102. package/templates/table-page-heatmap-status.template.mjs +1 -0
  103. package/templates/table-page-heatmap-status.tsx +4 -2
  104. package/templates/{table-page-shoe-store-heatmap.template.mjs → table-page-shoe-store.template.mjs} +1 -0
  105. package/templates/{table-page-shoe-store-heatmap.tsx → table-page-shoe-store.tsx} +5 -3
  106. package/templates/table-page.template.mjs +1 -0
  107. package/templates/table-page.tsx +12 -2
  108. package/templates/table-tree.template.mjs +16 -0
  109. package/templates/table-tree.tsx +707 -0
  110. package/templates/table.template.mjs +1 -0
  111. package/templates/table.tsx +4 -2
  112. package/templates/tech-report.template.mjs +1 -0
  113. package/templates/tech-report.tsx +18 -13
  114. package/templates/theme-showcase.template.mjs +1 -0
  115. package/templates/theme-showcase.tsx +41 -28
  116. package/templates/work-item-detail.template.mjs +8 -0
  117. package/templates/work-item-detail.tsx +1049 -0
  118. package/theme.css +71 -78
  119. package/theme.css.d.ts +9 -0
  120. package/tokens.css +79 -46
@@ -1,5 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
- // XLE (canonical structure, validated with `bunx astryx layout check`):
2
+ // XLE (canonical structure of the tree below; the CLI had no XLE validator
3
+ // after `astryx layout` was removed in 0.7.0, so this is a reading aid and a
4
+ // human drift check — update it with the file, never alone):
3
5
  // NOTE on `t=display-2`: the h1 asked for display-2 from the start, but
4
6
  // core 0.3.0's Heading emitted no `data-type`, and the 0.3.0 CLI emitted no
5
7
  // `.astryx-heading[data-type]` rule, so --text-display-2-size never reached a
@@ -8,7 +10,7 @@
8
10
  // pixel-diffing the pre-upgrade build against this one at 1440 and 390: the
9
11
  // only regression was this header detaching at 390, fixed by stacking the
10
12
  // 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))
13
+ // L[h=fill] > (LH[divider p=6] > (H[g=3 a=center] > (SI[fill] > H[g=2 a=center wrap] > Hd"Night watch"[level=1 t=display-2] + Tx"3 investigating"[t=supporting]) + SG"Filter by status" + B"Declare incident")) + (LC[p=0 !scroll] > V[g=0] > (H > (SI[fill] > PS"Search the night watch…")) + (SI[fill] > (V[g=0] > (V[g=0] > (H[g=2 a=center] > Tx"Investigating"[t=label] + Tx"3"[t=supporting]) + (UL[density=compact hasDividers] > (LI > SB)*3)) + (V[g=0] > (H[g=2 a=center] > Tx"Mitigated"[t=label] + Tx"2"[t=supporting]) + (UL[density=compact hasDividers] > (LI > SB)*2)) + (V[g=0] > (H[g=2 a=center] > Tx"Resolved"[t=label] + Tx"2"[t=supporting]) + (UL[density=compact hasDividers] > (LI > SB)*2))))) + (LP[w=380 p=0] > V[g=4] > (V[g=2] > (H[g=1 a=center] > SB + Tx"INC-2417"[t=supporting] + Tk"Investigating") + Hd"Checkout API elevated 5xx rate"[level=2]) + (H[g=2 wrap] > B.primary"Mark mitigated" + B.secondary"Escalate") + D + ML + D + (V[g=2] > Hd"Timeline"[level=3] + (UL[density=compact] > LI*3)))) ;; Drawer"Incident details"[side=end w=380] > (DrawerHeader"Incident details" + (V[g=4] > (V[g2] > (H[g=1 a=center] > SB + Tx"INC-2417"[t=supporting] + Tk"Investigating") + Hd"Checkout API elevated 5xx rate"[level=2]) + (H[g=2 wrap] > B.primary"Mark mitigated" + B.secondary"Escalate") + D + ML + D + (V[g=2] > Hd"Timeline"[level=3] + (UL[density=compact] > LI*3))))
12
14
 
13
15
  /**
14
16
  * 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.)
@@ -16,6 +18,7 @@
16
18
 
17
19
  import { Button } from "@astryxdesign/core/Button";
18
20
  import { Divider } from "@astryxdesign/core/Divider";
21
+ import { Drawer, DrawerHeader } from "@astryxdesign/core/Drawer";
19
22
  import { EmptyState } from "@astryxdesign/core/EmptyState";
20
23
  import { useMediaQuery } from "@astryxdesign/core/hooks";
21
24
  import { Icon } from "@astryxdesign/core/Icon";
@@ -44,6 +47,12 @@ import { BellRing, Plus } from "lucide-react";
44
47
  import { type CSSProperties, useMemo, useState } from "react";
45
48
 
46
49
  const styles: Record<string, CSSProperties> = {
50
+ // The page's definite height. `Layout height="fill"` is height:100%, which
51
+ // resolves to auto against a content-sized host and hands the scroll to the
52
+ // document; 100dvh is absolute and needs no ancestor.
53
+ page: {
54
+ height: "100dvh",
55
+ },
47
56
  contentFill: {
48
57
  height: "100%",
49
58
  minHeight: 0,
@@ -53,7 +62,12 @@ const styles: Record<string, CSSProperties> = {
53
62
  },
54
63
  groupHeader: {
55
64
  padding: "var(--spacing-2) var(--spacing-3)",
56
- backgroundColor: "var(--color-background-muted)",
65
+ // A band sitting over its own rows, so it lifts off the page surface.
66
+ // It used to lean on --color-background-muted, which held Selection
67
+ // #44475A; that token is Background Dark #21222C now, a RECESS, and a
68
+ // header painted in it reads as a trough between the rows instead of a
69
+ // band above them.
70
+ backgroundColor: "var(--color-background-surface)",
57
71
  },
58
72
  // All FOUR edges, not block-only. With `overflowY: auto` and no `overflowX`,
59
73
  // the inline axis computes to `auto` too, so this box clips horizontally as
@@ -357,10 +371,8 @@ function IncidentRows({
357
371
  {groups.map((group) => (
358
372
  <VStack gap={0} key={group.status}>
359
373
  <HStack gap={2} vAlign="center" style={styles.groupHeader}>
360
- {/* Primary, not secondary: --color-text-secondary #9AA1BC on
361
- --color-background-muted #44475A is 3.57:1, under the 4.5:1
362
- floor. The group heading is the string this sidebar is scanned
363
- for. Hierarchy comes from the two type roles (principle 6),
374
+ {/* The group heading is the string this sidebar is scanned
375
+ for, so hierarchy comes from the two type roles (principle 6),
364
376
  not from dimming the count. */}
365
377
  <Text type="label">{STATUS[group.status].label}</Text>
366
378
  <Text type="supporting" hasTabularNumbers>
@@ -373,6 +385,10 @@ function IncidentRows({
373
385
  key={incident.id}
374
386
  label={incident.title}
375
387
  description={`${incident.id} · ${incident.service} · ${incident.impact}`}
388
+ // Incident titles wrap to two lines. The severity badge
389
+ // and the status token belong on the TITLE's first
390
+ // line, not floating at the middle of the block.
391
+ align="first-line"
376
392
  startContent={
377
393
  <SeverityBadge
378
394
  severity={incident.severity}
@@ -476,6 +492,10 @@ export default function IncidentConsole() {
476
492
  const [statusFilter, setStatusFilter] = useState("all");
477
493
  const [filters, setFilters] = useState<PowerSearchFilter[]>([]);
478
494
  const [selectedId, setSelectedId] = useState<string | null>(INCIDENTS[0].id);
495
+ // Mobile inspector drawer. The inspector is a separate surface at <= 1024px
496
+ // (it is the `end` slot of the layout there), so it is a Drawer: a panel
497
+ // that slides in over the row list instead of a column that compresses it.
498
+ const [isInspectorOpen, setInspectorOpen] = useState(false);
479
499
  const { config, applyFilters } = usePowerSearchConfig(fieldDefs, "Incidents");
480
500
 
481
501
  // Responsive contract: the inspector is hidden at <= 1024px so the row
@@ -533,89 +553,121 @@ export default function IncidentConsole() {
533
553
  );
534
554
 
535
555
  return (
536
- <Layout
537
- height="fill"
538
- header={
539
- <LayoutHeader hasDivider padding={6}>
540
- {isNarrow ? (
541
- <VStack gap={2}>
542
- {titleGroup}
543
- <HStack
544
- gap={2}
545
- vAlign="center"
546
- style={styles.controlsRow}
547
- tabIndex={0}
548
- role="region"
549
- aria-label="Incident filter actions"
550
- >
556
+ <>
557
+ <Layout
558
+ height="fill"
559
+ style={styles.page}
560
+ header={
561
+ <LayoutHeader hasDivider padding={6}>
562
+ {isNarrow ? (
563
+ <VStack gap={2}>
564
+ {titleGroup}
565
+ <HStack
566
+ gap={2}
567
+ vAlign="center"
568
+ style={styles.controlsRow}
569
+ tabIndex={0}
570
+ role="region"
571
+ aria-label="Incident filter actions"
572
+ >
573
+ {statusFilterControl}
574
+ {declareButton}
575
+ </HStack>
576
+ </VStack>
577
+ ) : (
578
+ <HStack gap={3} vAlign="center">
579
+ <StackItem size="fill">{titleGroup}</StackItem>
551
580
  {statusFilterControl}
552
581
  {declareButton}
553
582
  </HStack>
554
- </VStack>
555
- ) : (
556
- <HStack gap={3} vAlign="center">
557
- <StackItem size="fill">{titleGroup}</StackItem>
558
- {statusFilterControl}
559
- {declareButton}
560
- </HStack>
561
- )}
562
- </LayoutHeader>
563
- }
564
- content={
565
- <LayoutContent padding={0} isScrollable={false}>
566
- <VStack gap={0} style={styles.contentFill}>
567
- <HStack style={styles.searchRow}>
568
- <StackItem size="fill">
569
- <PowerSearch
570
- config={config}
571
- filters={filters}
572
- onChange={(newFilters) => setFilters([...newFilters])}
573
- placeholder="Search the night watch…"
574
- resultCount={visible.length}
583
+ )}
584
+ </LayoutHeader>
585
+ }
586
+ content={
587
+ <LayoutContent padding={0} isScrollable={false}>
588
+ <VStack gap={0} style={styles.contentFill}>
589
+ <HStack style={styles.searchRow}>
590
+ <StackItem size="fill">
591
+ <PowerSearch
592
+ config={config}
593
+ filters={filters}
594
+ onChange={(newFilters) => setFilters([...newFilters])}
595
+ placeholder="Search the night watch…"
596
+ resultCount={visible.length}
597
+ />
598
+ </StackItem>
599
+ </HStack>
600
+ <StackItem
601
+ size="fill"
602
+ style={styles.rows}
603
+ tabIndex={0}
604
+ role="region"
605
+ aria-label="Incident rows"
606
+ >
607
+ <IncidentRows
608
+ incidents={visible}
609
+ selectedId={selected?.id ?? null}
610
+ onSelect={(id) => {
611
+ setSelectedId(id);
612
+ // On a narrow viewport the inspector is the Drawer, so
613
+ // picking a row is what opens it.
614
+ if (isNarrow) setInspectorOpen(true);
615
+ }}
575
616
  />
576
617
  </StackItem>
577
- </HStack>
578
- <StackItem
579
- size="fill"
580
- style={styles.rows}
581
- tabIndex={0}
582
- role="region"
583
- aria-label="Incident rows"
584
- >
585
- <IncidentRows
586
- incidents={visible}
587
- selectedId={selected?.id ?? null}
588
- onSelect={setSelectedId}
618
+ </VStack>
619
+ </LayoutContent>
620
+ }
621
+ end={
622
+ isNarrow ? undefined : (
623
+ <>
624
+ <ResizeHandle
625
+ direction="horizontal"
626
+ hasDivider
627
+ isAlwaysVisible={false}
628
+ resizable={inspectorPanel.props}
629
+ label="Resize inspector"
589
630
  />
590
- </StackItem>
591
- </VStack>
592
- </LayoutContent>
593
- }
594
- end={
595
- isNarrow ? undefined : (
596
- <>
597
- <ResizeHandle
598
- direction="horizontal"
599
- hasDivider
600
- isAlwaysVisible={false}
601
- resizable={inspectorPanel.props}
602
- label="Resize inspector"
603
- />
604
- <LayoutPanel width={inspectorPanel.size} padding={0} label="Incident details">
605
- {selected ? (
606
- <IncidentInspector incident={selected} />
607
- ) : (
608
- <EmptyState
609
- title="No incident under the lens"
610
- description="Select an incident from the rows to inspect its timeline."
611
- icon={<Icon icon={BellRing} size="lg" color="secondary" />}
612
- isCompact
613
- />
614
- )}
615
- </LayoutPanel>
616
- </>
617
- )
618
- }
619
- />
631
+ <LayoutPanel width={inspectorPanel.size} padding={0} label="Incident details">
632
+ {selected ? (
633
+ <IncidentInspector incident={selected} />
634
+ ) : (
635
+ <EmptyState
636
+ title="No incident under the lens"
637
+ description="Select an incident from the rows to inspect its timeline."
638
+ icon={<Icon icon={BellRing} size="lg" color="secondary" />}
639
+ isCompact
640
+ />
641
+ )}
642
+ </LayoutPanel>
643
+ </>
644
+ )
645
+ }
646
+ />
647
+ {/* Narrow viewport: the inspector is a Drawer, not a column. It is
648
+ non-modal (hasScrim={false}) so the row list stays visible behind it —
649
+ the point of a peek-at-the-detail surface. The close button comes from
650
+ DrawerHeader, which only renders it when it is given onOpenChange. */}
651
+ <Drawer
652
+ side="end"
653
+ label="Incident details"
654
+ isOpen={isNarrow && isInspectorOpen}
655
+ onOpenChange={setInspectorOpen}
656
+ hasScrim={false}
657
+ width={inspectorPanel.size}
658
+ >
659
+ <DrawerHeader title="Incident details" onOpenChange={setInspectorOpen} />
660
+ {selected ? (
661
+ <IncidentInspector incident={selected} />
662
+ ) : (
663
+ <EmptyState
664
+ title="No incident under the lens"
665
+ description="Select an incident from the rows to inspect its timeline."
666
+ icon={<Icon icon={BellRing} size="lg" color="secondary" />}
667
+ isCompact
668
+ />
669
+ )}
670
+ </Drawer>
671
+ </>
620
672
  );
621
673
  }
@@ -2,5 +2,6 @@ export default {
2
2
  type: "page",
3
3
  name: "Kanban Board",
4
4
  description: "Status columns with priority tags and metadata",
5
+ keywords: ["kanban", "board", "tasks", "workflow", "sprint", "columns"],
5
6
  category: "tooling",
6
7
  };
@@ -1,6 +1,8 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
- // XLE (canonical structure, validated with `bunx astryx layout check`):
3
- // S > L > (LH[divider] > Tbar > (Hd"Sprint Board"[level=1] + Bd.neutral"8") + (H[g=2] > SE + D.strong + IB"Sort" + IB"Filter" + IB"Search" + B.primary"Add task")) + (LC[p=0] > G[c={min:280,max:4} g=4] > (C.muted[p=0] > L > (LH[divider] > H[j=between a=center] > (H[g=2 a=center] > SD + Hd"To-do"[level=2] + IB) + Tx) + (LC[p=3] > V[g=2] > (C[p=3] > V[g=2] > (H[j=between] > (H[g=2] > Tk + Bd) + MM) + (V[g=1] > Hd[level=3] + Tx) + Tx)*2))*4)
2
+ // XLE (canonical structure of the tree below; the CLI had no XLE validator
3
+ // after `astryx layout` was removed in 0.7.0, so this is a reading aid and a
4
+ // human drift check — update it with the file, never alone):
5
+ // S[h=100dvh] > VH + (L[h=fill] > (LH[divider p=6] > Tbar[g=2] > (Hd"Sprint Board"[level=1 t=display-2] + Bd.neutral"8") + (H[g=2 wrap] > SE"Sprint" + D.strong + (H[g=1 a=center wrap] > IB"Sort" + IB"Filter" + IB"Search") + B.primary"Add task")) + (LC[p=0 !scroll] > G[c={min:280,max:4} g=4] > (C.muted[p=0] > L[h=fill] > (LH[divider p=3] > H[j=between a=center] > (H[g=1 a=center] > SD + Hd"To-do"[level=2] + (Po > IB)) + Tx"2") + (LC[p=3] > V[g=2] > (C[p=3] > V[g=2] > (H[j=between] > (H[g=2] > Tk + Bd) + MM) + (V[g=1] > Hd[level=3] + Tx) + Tx)*2)) + (C.muted[p=0] > L[h=fill] > (LH[divider p=3] > H[j=between a=center] > (H[g=1 a=center] > SD + Hd"In progress"[level=2] + (Po > IB)) + Tx"2") + (LC[p=3] > V[g=2] > (C[p=3] > V[g=2] > (H[j=between] > (H[g=2] > Tk + Bd) + MM) + (V[g=1] > Hd[level=3] + Tx) + Tx)*2)) + (C.muted[p=0] > L[h=fill] > (LH[divider p=3] > H[j=between a=center] > (H[g=1 a=center] > SD + Hd"In review"[level=2] + (Po > IB)) + Tx"1") + (LC[p=3] > V[g=2] > (C[p=3] > V[g=2] > (H[j=between] > (H[g=2] > Tk + Bd) + MM) + (V[g=1] > Hd[level=3] + Tx) + Tx))) + (C.muted[p=0] > L[h=fill] > (LH[divider p=3] > H[j=between a=center] > (H[g=1 a=center] > SD + Hd"Done"[level=2] + (Po > IB)) + Tx"3") + (LC[p=3] > V[g=2] > (C[p=3] > V[g=2] > (H[j=between] > (H[g=2] > Tk + Bd) + MM) + (V[g=1] > Hd[level=3] + Tx) + Tx)*3))) + (C[p=3] > V[g=2] > (H[j=between] > (H[g=2] > Tk + Bd) + MM) + (V[g=1] > Hd[level=3] + Tx) + Tx)
4
6
 
5
7
  import { Badge } from "@astryxdesign/core/Badge";
6
8
  import { Button } from "@astryxdesign/core/Button";
@@ -19,6 +21,7 @@ import { StatusDot } from "@astryxdesign/core/StatusDot";
19
21
  import { Heading, Text } from "@astryxdesign/core/Text";
20
22
  import { Token } from "@astryxdesign/core/Token";
21
23
  import { Toolbar } from "@astryxdesign/core/Toolbar";
24
+ import { VisuallyHidden } from "@astryxdesign/core/VisuallyHidden";
22
25
  import {
23
26
  ArrowUpDown,
24
27
  CircleCheck,
@@ -310,6 +313,10 @@ function BoardCard({
310
313
  // focused card across columns. The pointer DnD below stays quarantined and
311
314
  // untouched; this only reuses its moveItem commit.
312
315
  const onKeyDown = (e: ReactKeyboardEvent) => {
316
+ // Let the card's own controls (the actions menu) keep arrow keys.
317
+ if ((e.target as HTMLElement).closest('button, [role="menuitem"], [role="menu"]')) {
318
+ return;
319
+ }
313
320
  const at = COLUMNS.findIndex((c) => c.id === item.column);
314
321
  const to =
315
322
  e.key === "ArrowRight"
@@ -331,7 +338,11 @@ function BoardCard({
331
338
  // drag clone floats above the board with the high shadow token instead.
332
339
  style={{ cursor: "grab", userSelect: "none", touchAction: "none" }}
333
340
  tabIndex={0}
334
- role="button"
341
+ // Not `button`: the card contains its own actions menu and a heading,
342
+ // and `button` makes every descendant presentational (ARIA
343
+ // "children presentational"), hiding both from assistive tech. The
344
+ // card is a member of the column list that happens to be focusable.
345
+ role="listitem"
335
346
  aria-label={`${item.title}. In ${COLUMNS.find((c) => c.id === item.column)?.title}. Press left or right arrow to move across columns.`}
336
347
  onPointerDown={(e) => onPointerDown(e, item.id)}
337
348
  onKeyDown={onKeyDown}
@@ -355,7 +366,15 @@ function BoardColumn({
355
366
  children: ReactNode;
356
367
  }) {
357
368
  return (
358
- <Card variant="muted" padding={0} style={{ minWidth: 0, height: "100%" }}>
369
+ <Card
370
+ variant="muted"
371
+ padding={0}
372
+ style={{ minWidth: 0, height: "100%" }}
373
+ // Each column is a landmark: the board region alone announces four
374
+ // undifferentiated lists of cards.
375
+ role="region"
376
+ aria-label={`${meta.title} column`}
377
+ >
359
378
  <Layout
360
379
  height="fill"
361
380
  header={
@@ -419,6 +438,9 @@ export default function KanbanBoard() {
419
438
  const [items, setItems] = useState<WorkItem[]>(INITIAL_ITEMS);
420
439
  const [sprint, setSprint] = useState("003");
421
440
  const [drag, setDrag] = useState<DragState | null>(null);
441
+ // Polite announcement for moves that have no visual follow (keyboard arrows,
442
+ // menu "Move to …"). Pointer drags show their own landing ghost.
443
+ const [announcement, setAnnouncement] = useState("");
422
444
 
423
445
  // Live element registries for pointer hit-testing (kept out of render state).
424
446
  const columnEls = useRef(new Map<ColumnId, HTMLElement>());
@@ -451,7 +473,18 @@ export default function KanbanBoard() {
451
473
  const itemsByColumn = groupByColumn(items);
452
474
 
453
475
  const moveItem = (id: string, to: ColumnId) => {
476
+ // A cross-column move remounts the card inside the destination list, so
477
+ // focus would fall to <body> and the next arrow press would be lost.
478
+ const hadFocus = cardEls.current.get(id)?.contains(document.activeElement) ?? false;
479
+ const moved = items.find((item) => item.id === id);
480
+ const column = COLUMNS.find((meta) => meta.id === to);
454
481
  setItems((prev) => prev.map((item) => (item.id === id ? { ...item, column: to } : item)));
482
+ if (moved && column) {
483
+ setAnnouncement(`Moved ${moved.title} to ${column.title}`);
484
+ }
485
+ if (hadFocus) {
486
+ requestAnimationFrame(() => cardEls.current.get(id)?.focus());
487
+ }
455
488
  };
456
489
 
457
490
  // Resolve the pointer position to a column + insertion index, ignoring the
@@ -595,7 +628,7 @@ export default function KanbanBoard() {
595
628
  const renderColumnCards = (colId: ColumnId): ReactNode => {
596
629
  const colItems = itemsByColumn[colId];
597
630
  const visible = drag ? colItems.filter((it) => it.id !== drag.id) : colItems;
598
- const ghostTarget = drag && drag.target && drag.target.column === colId ? drag : null;
631
+ const ghostTarget = drag?.target && drag.target.column === colId ? drag : null;
599
632
 
600
633
  if (visible.length === 0 && !ghostTarget) {
601
634
  return null;
@@ -611,7 +644,7 @@ export default function KanbanBoard() {
611
644
  />
612
645
  ));
613
646
 
614
- if (ghostTarget && ghostTarget.target) {
647
+ if (ghostTarget?.target) {
615
648
  const index = Math.min(ghostTarget.target.index, nodes.length);
616
649
  nodes.splice(
617
650
  index,
@@ -619,6 +652,8 @@ export default function KanbanBoard() {
619
652
  <VStack
620
653
  key="drag-ghost"
621
654
  // Placeholder marking the landing slot; matches the dragged card's height.
655
+ // Hidden from assistive tech: it is a visual target, not a list member.
656
+ aria-hidden="true"
622
657
  style={{
623
658
  height: ghostTarget.height,
624
659
  borderRadius: "var(--radius-element)",
@@ -628,11 +663,16 @@ export default function KanbanBoard() {
628
663
  );
629
664
  }
630
665
 
631
- return <VStack gap={2}>{nodes}</VStack>;
666
+ return (
667
+ <VStack gap={2} role="list">
668
+ {nodes}
669
+ </VStack>
670
+ );
632
671
  };
633
672
 
634
673
  return (
635
674
  <Section height="100dvh">
675
+ <VisuallyHidden role="status">{announcement}</VisuallyHidden>
636
676
  <Layout
637
677
  height="fill"
638
678
  header={
@@ -716,6 +756,10 @@ export default function KanbanBoard() {
716
756
  <Card
717
757
  padding={3}
718
758
  elevation="none"
759
+ // Visual proxy for the pointer drag: its contents duplicate the
760
+ // real card (including an actions menu), so keep it out of the
761
+ // accessibility tree and the tab order.
762
+ inert
719
763
  style={{
720
764
  position: "fixed",
721
765
  insetBlockStart: 0,
@@ -2,5 +2,6 @@ export default {
2
2
  type: "page",
3
3
  name: "Library",
4
4
  description: "Browsable grid with tabs and filters",
5
+ keywords: ["library", "catalog", "books", "content", "listing", "collection"],
5
6
  category: "docs",
6
7
  };
@@ -1,6 +1,8 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
- // XLE (canonical structure, validated with `bunx astryx layout check`):
3
- // L > (LH[divider] > (V[g=1] > Hd"Library"[level=1] + Tx"30 components across 5 categories"[t=body])) + (LC[p=6] > V[g=8] > (V[g=4] > TI"Search the stacks…" + (H[a=center g=3] > (SI[fill] > TgG"Filter" > OFL > Tg"All"! + Tg"Layout" + Tg"Forms" + Tg"Navigation" + Tg"Feedback" + Tg"Data") + DM"Sort")) + D + (V[g=8] > (H[j=between a=center] > Hd"Layout"[level=2] + Tx"6 items"[t=body]) + (G[c={min:280} g=4] > (C[p=0] > AR + (S.transparent[p=4] > V[g=1] > Hd"Card"[level=3] + Tx"Description"[t=supporting]))*4)))
2
+ // XLE (canonical structure of the tree below; the CLI had no XLE validator
3
+ // after `astryx layout` was removed in 0.7.0, so this is a reading aid and a
4
+ // human drift check — update it with the file, never alone):
5
+ // L[h=fill] > (LH[divider p=6] > (V[g=1] > Hd"Library"[level=1 t=display-2] + Tx"{ITEMS.length} components across {CATEGORIES.length - 1} categories"[t=body])) + (LC[p=6] > V[g=8] > (V[g=4] > TI"Search" + (H[g=3 a=center] > (SI[fill] > V > TgG"Filter" > OFL > Tg"All"! + Tg"Layout" + Tg"Forms" + Tg"Navigation" + Tg"Feedback" + Tg"Data") + DD"A-Z")) + (V[g=8] > (D + (V[g=8] > (H[j=between a=center] > Hd"Layout"[level=2] + Tx"{section.items.length} items"[t=body]) + (G[c={min:280} g=4] > (C[p=0] > AR[ratio=16/9] > Scene{SceneTile}) + (S.transparent[p=4] > V[g=1] > Hd"Card"[level=3] + Tx"Description"[t=body]))*{section.items.length}))*{CATEGORIES.length - 1}))
4
6
 
5
7
  /**
6
8
  * Library — a browsable grid of design-system entries grouped by category. Frame: page header (title) | content column (search, filter row, s (Frame/responsive/container: see XLE header above.)
@@ -24,6 +26,7 @@ import { ToggleButton, ToggleButtonGroup } from "@astryxdesign/core/ToggleButton
24
26
  import type { SceneHue } from "astryx-dracula/shared/scene-hues";
25
27
  import { SceneTile } from "astryx-dracula/shared/scene-tile";
26
28
  import { Search } from "lucide-react";
29
+ import type { CSSProperties } from "react";
27
30
  import { useState } from "react";
28
31
 
29
32
  interface LibraryItem {
@@ -283,6 +286,11 @@ function LibraryCard({ item }: { item: LibraryItem }) {
283
286
  );
284
287
  }
285
288
 
289
+ // Definite ancestor for `height="fill"`: 100dvh, not minHeight: '100%' (a
290
+ // percentage min-height against an indefinite block computes to 0 — CSS 2.1
291
+ // 10.5). Templates ship standalone, so the page owns this, not the host.
292
+ const pageStyle: CSSProperties = { height: "100dvh" };
293
+
286
294
  export default function LibraryGrid() {
287
295
  const [activeTab, setActiveTab] = useState("All");
288
296
  const [search, setSearch] = useState("");
@@ -327,12 +335,15 @@ export default function LibraryGrid() {
327
335
  return (
328
336
  <Layout
329
337
  height="fill"
338
+ style={pageStyle}
330
339
  header={
331
340
  <LayoutHeader hasDivider padding={6}>
332
341
  <VStack gap={1}>
333
- <Heading level={1}>Library</Heading>
342
+ <Heading level={1} type="display-2">
343
+ Library
344
+ </Heading>
334
345
  <Text type="body" color="secondary">
335
- 30 components across 5 categories
346
+ {ITEMS.length} components across {CATEGORIES.length - 1} categories
336
347
  </Text>
337
348
  </VStack>
338
349
  </LayoutHeader>
@@ -2,5 +2,6 @@ export default {
2
2
  type: "page",
3
3
  name: "Login Card",
4
4
  description: "Centered auth card with email and password",
5
+ keywords: ["login", "sign in", "auth", "card", "credentials", "account"],
5
6
  category: "auth",
6
7
  };
@@ -1,6 +1,8 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
- // XLE (canonical structure, validated with `bunx astryx layout check`):
3
- // Ctr > V[g=4 a=center] > (V[g=2 a=center] > Ic + Tx"Castle Dracula"[t=body]) + (C[p=4] > V[g=4] > (V[g=1 a=center] > Hd"Welcome back to the night"[level=1] + Tx"Sign in to your crypt"[t=body]) + (V[g=2] > TI"Email"[t=email] + (V[g=1] > TI"Password"[t=password] + Lk"Forgot password?")) + B.primary"Enter the night" + D"Or continue with" + (V[g=3] > B.secondary"Login with Apple" + B.secondary"Login with Google") + (V[a=center] > Tx"New to the castle?"[t=supporting] + Lk"Sign up")) + (V[a=center] > Tx"By clicking continue, you agree to our Terms of service and Privacy policy"[t=supporting])
2
+ // XLE (canonical structure of the tree below; the CLI had no XLE validator
3
+ // after `astryx layout` was removed in 0.7.0, so this is a reading aid and a
4
+ // human drift check — update it with the file, never alone):
5
+ // Ctr > V[g=4 a=center] > (V[g=2 a=center] > Ic + Tx"Castle Dracula"[t=body]) + (C[p=4] > V[g=4] > (V[g=1 a=center] > Hd"Welcome back to the night"[level=1 t=display-2] + Tx"Sign in to your crypt"[t=body]) + (V[g=2] > TI"Email"[t=email] + (V[g=1] > TI"Password"[t=password] + Lk"Forgot password?")) + B.primary"Sign in" + D"Or continue with" + (V[g=3] > B.secondary"Login with Apple" + B.secondary"Login with Google") + (V[a=center] > Tx"New to the castle?"[t=supporting] + Lk"Sign up")) + (V[a=center] > Tx"By clicking continue, you agree to our Terms of service and Privacy policy"[t=supporting])
4
6
 
5
7
  import { Button } from "@astryxdesign/core/Button";
6
8
  import { Center } from "@astryxdesign/core/Center";
@@ -2,5 +2,6 @@ export default {
2
2
  type: "page",
3
3
  name: "Login Split",
4
4
  description: "Two-column auth with cover art panel",
5
+ keywords: ["login", "sign in", "auth", "split", "credentials", "account"],
5
6
  category: "auth",
6
7
  };
@@ -1,6 +1,8 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
- // XLE (canonical structure, validated with `bunx astryx layout check`):
3
- // Ctr > V[g=4] > (Ctr.horizontal > C[p=0] > G[c={min:240} g=8 a=stretch] > (S[p=0] > V[g=4] > (H[g=2 a=center] > Ic + Tx"Castle Dracula"[t=body]) + (V[g=4] > (V[g=1] > Hd"Welcome back to the night"[level=1] + Tx"Sign in to your crypt"[t=body]) + (V[g=2] > TI"Email"[t=email] + (V[g=1] > TI"Password"[t=password] + Lk"Forgot password?")) + B.primary"Enter the night" + D"Or continue with" + (G[c={min:200} g=3] > B.secondary"Login with Apple" + B.secondary"Login with Google")) + (V[a=center] > Tx"New to the castle?"[t=supporting] + Lk"Sign up")) + (C[p=0] > AR)) + (V[a=center] > Tx"By clicking continue, you agree to our Terms of service and Privacy policy"[t=supporting])
2
+ // XLE (canonical structure of the tree below; the CLI had no XLE validator
3
+ // after `astryx layout` was removed in 0.7.0, so this is a reading aid and a
4
+ // human drift check — update it with the file, never alone):
5
+ // Ctr > V[g=4] > (Ctr.horizontal > C[p=0] > G[c={min:240} g=8 a=stretch] > (S.transparent[p=0] > V[g=4] > (H[g=2 a=center] > Ic + Tx"Castle Dracula"[t=body]) + (V[g=4] > (V[g=1] > Hd"Welcome back to the night"[level=1 t=display-2] + Tx"Sign in to your crypt"[t=body]) + (V[g=2] > TI"Email"[t=email] + (V[g=1] > TI"Password"[t=password] + Lk"Forgot password?")) + B.primary"Sign in" + D"Or continue with" + (G[c={min:200} g=3] > B.secondary"Login with Apple" + B.secondary"Login with Google")) + (V[a=center] > Tx"New to the castle?"[t=supporting] + Lk"Sign up")) + (C.transparent[p=0] > Scene{SceneCastle})) + (V[a=center] > Tx"By clicking continue, you agree to our Terms of service and Privacy policy"[t=supporting])
4
6
 
5
7
  import { Button } from "@astryxdesign/core/Button";
6
8
  import { Card } from "@astryxdesign/core/Card";
@@ -13,7 +15,7 @@ import { Link } from "@astryxdesign/core/Link";
13
15
  import { Section } from "@astryxdesign/core/Section";
14
16
  import { Heading, Text } from "@astryxdesign/core/Text";
15
17
  import { TextInput } from "@astryxdesign/core/TextInput";
16
- import { authPageStyle, inputAutoComplete } from "astryx-dracula/shared/auth-chrome-config";
18
+ import { authPageStyle } from "astryx-dracula/shared/auth-chrome-config";
17
19
  import {
18
20
  AUTH_BRAND_NAME,
19
21
  AUTH_EMAIL_PLACEHOLDER,
@@ -30,6 +32,7 @@ import {
30
32
  AUTH_TERMS_PRIVACY,
31
33
  AUTH_TERMS_SERVICE,
32
34
  } from "astryx-dracula/shared/auth-copy";
35
+
33
36
  import { demoLogin } from "astryx-dracula/shared/login-demo";
34
37
  import { SceneCastle } from "astryx-dracula/shared/scene-castle";
35
38
  import { AppleIcon, GoogleIcon } from "astryx-dracula/shared/sso-icons";
@@ -133,7 +136,7 @@ export default function LoginSplit() {
133
136
  label="Email"
134
137
  isLabelHidden
135
138
  type="email"
136
- {...inputAutoComplete("email")}
139
+ autoComplete="email"
137
140
  placeholder={AUTH_EMAIL_PLACEHOLDER}
138
141
  value={email}
139
142
  onChange={(v: string) => {
@@ -150,7 +153,7 @@ export default function LoginSplit() {
150
153
  isLabelHidden
151
154
  placeholder={AUTH_PASSWORD_PLACEHOLDER}
152
155
  type="password"
153
- {...inputAutoComplete("current-password")}
156
+ autoComplete="current-password"
154
157
  value={password}
155
158
  onChange={(v: string) => {
156
159
  setPassword(v);
@@ -2,5 +2,6 @@ export default {
2
2
  type: "page",
3
3
  name: "Login SSO",
4
4
  description: "Email-first SSO with password fallback",
5
+ keywords: ["login", "sso", "saml", "oauth", "auth", "providers", "account"],
5
6
  category: "auth",
6
7
  };