@astryxdesign/cli 0.7.8-canary.ffd29c5 → 0.7.9-canary.0236bb8

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 (132) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/README.md +1 -1
  3. package/api/component/__fixtures__/resolutions/modules.txt +1 -1
  4. package/api/discover/_adapter.d.mts +1 -1
  5. package/api/docs/_adapter.d.mts +8 -2
  6. package/api/docs/_adapter.mjs +10 -4
  7. package/api/docs/detail/section/section.d.mts +5 -2
  8. package/api/docs/detail/section/section.mjs +6 -2
  9. package/api/docs/docs.mjs +7 -1
  10. package/api/doctor/_adapter.d.mts +6 -2
  11. package/api/doctor/_adapter.mjs +5 -3
  12. package/api/doctor/built-checks.d.mts +9 -4
  13. package/api/doctor/built-checks.mjs +15 -10
  14. package/api/search/_adapter.d.mts +3 -1
  15. package/api/search/_adapter.mjs +12 -2
  16. package/api/search/_candidate-score.d.mts +4 -1
  17. package/api/search/_candidate-score.mjs +46 -28
  18. package/api/search/_gather-components.mjs +5 -0
  19. package/api/search/_gather-templates.mjs +31 -6
  20. package/api/search/_lexical.d.mts +14 -0
  21. package/api/search/_lexical.mjs +4 -0
  22. package/api/search/_main-searcher.mjs +1 -1
  23. package/api/search/_result.d.mts +6 -5
  24. package/api/search/_result.mjs +1 -0
  25. package/api/search/_words.d.mts +44 -7
  26. package/api/search/_words.mjs +113 -21
  27. package/api/search/search.d.mts +4 -2
  28. package/api/search/search.doc.mjs +1 -1
  29. package/api/search/search.mjs +9 -8
  30. package/api/search/search.type.d.mts +4 -0
  31. package/api/search/search.type.mjs +1 -0
  32. package/api/swizzle/_adapter.d.mts +10 -0
  33. package/api/swizzle/_adapter.mjs +24 -1
  34. package/api/swizzle/copy/copy.mjs +9 -4
  35. package/api/theme/build/build.d.mts +26 -1
  36. package/api/theme/build/build.mjs +71 -20
  37. package/api/theme/build/core-interception.d.mts +2 -1
  38. package/api/theme/build/core-interception.mjs +23 -5
  39. package/assets/codemods/registry.mjs +1 -0
  40. package/assets/codemods/transforms/next/index.mjs +1 -11
  41. package/assets/codemods/transforms/v0.7.8/index.mjs +20 -0
  42. package/assets/discover/official-packages.json +4 -0
  43. package/assets/docs/browser-support.doc.mjs +27 -1
  44. package/assets/docs/tree/calendar-systems.doc.mjs +146 -0
  45. package/assets/docs/tree/calendars.doc.mjs +46 -0
  46. package/assets/docs/tree/i18n-calendars.doc.mjs +51 -0
  47. package/assets/docs/tree/internationalization.doc.mjs +3 -3
  48. package/assets/docs/tree/tokens-color.doc.mjs +1 -1
  49. package/assets/templates/blocks/components/Hooks/useClickableContainerHookUsage.doc.mjs +14 -0
  50. package/assets/templates/blocks/components/Hooks/useClickableContainerHookUsage.tsx +67 -0
  51. package/assets/templates/blocks/components/Hooks/useClipboardHookUsage.doc.mjs +14 -0
  52. package/assets/templates/blocks/components/Hooks/useClipboardHookUsage.tsx +35 -0
  53. package/assets/templates/blocks/components/Hooks/useImageModeHookUsage.doc.mjs +14 -0
  54. package/assets/templates/blocks/components/Hooks/useImageModeHookUsage.tsx +55 -0
  55. package/assets/templates/blocks/components/Hooks/useTreeFocusHookUsage.doc.mjs +15 -0
  56. package/assets/templates/blocks/components/Hooks/useTreeFocusHookUsage.tsx +98 -0
  57. package/assets/templates/blocks/components/InfoTip/InfoTipMetricDefinitions.doc.mjs +14 -0
  58. package/assets/templates/blocks/components/InfoTip/InfoTipMetricDefinitions.tsx +46 -0
  59. package/assets/templates/blocks/components/InfoTip/InfoTipPermissionNotes.doc.mjs +14 -0
  60. package/assets/templates/blocks/components/InfoTip/InfoTipPermissionNotes.tsx +41 -0
  61. package/assets/templates/blocks/components/InfoTip/InfoTipShowcase.doc.mjs +13 -0
  62. package/assets/templates/blocks/components/InfoTip/InfoTipShowcase.tsx +24 -0
  63. package/assets/templates/blocks/components/PowerSearch/PowerSearchContentSearch.tsx +8 -7
  64. package/assets/templates/blocks/components/PowerSearch/PowerSearchFullFeatured.tsx +8 -7
  65. package/assets/templates/blocks/components/PowerSearch/PowerSearchPresetFilters.tsx +8 -7
  66. package/assets/templates/blocks/components/PowerSearch/PowerSearchSearchWithTable.tsx +12 -10
  67. package/assets/templates/blocks/components/PowerSearch/PowerSearchShowcase.tsx +8 -7
  68. package/assets/templates/blocks/components/Tokenizer/TokenizerClear.doc.mjs +2 -1
  69. package/assets/templates/blocks/components/Tokenizer/TokenizerClear.tsx +2 -2
  70. package/assets/templates/blocks/components/Tokenizer/TokenizerCreatable.tsx +0 -1
  71. package/assets/templates/blocks/components/Tokenizer/TokenizerEndContent.tsx +0 -1
  72. package/assets/templates/blocks/components/Tokenizer/TokenizerOverflow.doc.mjs +2 -1
  73. package/assets/templates/blocks/components/Tokenizer/TokenizerOverflow.tsx +0 -2
  74. package/assets/templates/pages/table-inbox/page.tsx +11 -8
  75. package/assets/templates/pages/work-item-detail/page.tsx +6 -2
  76. package/assets/theme.template.ts +1 -1
  77. package/authoring/debug/parse.d.mts +2 -2
  78. package/authoring/doctypes/_schema.d.mts +16 -0
  79. package/authoring/doctypes/_schema.mjs +15 -0
  80. package/authoring/doctypes/component/component.doc.mjs +6 -0
  81. package/authoring/doctypes/component/type.ts +16 -0
  82. package/authoring/index.d.ts +1 -0
  83. package/clients/cli/commands/build.mjs +9 -3
  84. package/clients/cli/commands/ensure-core-built.mjs +399 -43
  85. package/clients/cli/commands/search.mjs +8 -2
  86. package/clients/cli/formatters/index.mjs +11 -0
  87. package/clients/cli/index.mjs +11 -6
  88. package/foundation/agent-docs/agent-docs-target.d.mts +49 -0
  89. package/foundation/agent-docs/agent-docs-target.mjs +201 -0
  90. package/foundation/agent-docs/agent-docs.d.mts +1 -38
  91. package/foundation/agent-docs/agent-docs.mjs +16 -181
  92. package/foundation/config/config-path.d.mts +13 -0
  93. package/foundation/config/config-path.mjs +42 -0
  94. package/foundation/config/project.d.mts +1 -10
  95. package/foundation/config/project.mjs +31 -35
  96. package/foundation/discovery/component-discovery.mjs +39 -4
  97. package/foundation/discovery/component-loader.d.mts +1 -1
  98. package/foundation/discovery/icon-set-paths.d.mts +18 -0
  99. package/foundation/discovery/icon-set-paths.mjs +23 -0
  100. package/foundation/discovery/icon-set-writer.d.mts +2 -7
  101. package/foundation/discovery/icon-set-writer.mjs +3 -12
  102. package/foundation/discovery/template-adapter.d.mts +10 -0
  103. package/foundation/discovery/template-adapter.mjs +94 -4
  104. package/foundation/env/search-path.d.mts +12 -0
  105. package/foundation/env/search-path.mjs +71 -43
  106. package/foundation/fs/module-loader.d.mts +2 -8
  107. package/foundation/fs/module-loader.mjs +3 -12
  108. package/foundation/fs/present-files.d.mts +11 -0
  109. package/foundation/fs/present-files.mjs +25 -0
  110. package/foundation/integrations/autolink.d.mts +2 -21
  111. package/foundation/integrations/autolink.mjs +6 -42
  112. package/foundation/integrations/contribution-fixes.mjs +26 -3
  113. package/foundation/integrations/contribution-inventory.mjs +1 -1
  114. package/foundation/integrations/installed-package.d.mts +36 -0
  115. package/foundation/integrations/installed-package.mjs +57 -0
  116. package/foundation/integrations/integrations.d.mts +3 -75
  117. package/foundation/integrations/integrations.mjs +3 -16
  118. package/foundation/integrations/manifest-paths.d.mts +13 -0
  119. package/foundation/integrations/manifest-paths.mjs +31 -0
  120. package/foundation/integrations/manifest-writer.d.mts +3 -4
  121. package/foundation/integrations/manifest-writer.mjs +5 -3
  122. package/foundation/release/cache.d.mts +11 -4
  123. package/foundation/release/cache.mjs +15 -7
  124. package/foundation/response/response-types.doc.mjs +1 -1
  125. package/foundation/runtime/locked-versions.mjs +1 -1
  126. package/foundation/runtime/package-set.mjs +1 -1
  127. package/foundation/text/levenshtein.d.mts +4 -1
  128. package/foundation/text/levenshtein.mjs +44 -1
  129. package/package.json +9 -9
  130. package/api/swizzle/_github.d.mts +0 -8
  131. package/api/swizzle/_github.mjs +0 -22
  132. /package/assets/codemods/transforms/{next → v0.7.8}/promote-tokenizer-presentation.mjs +0 -0
@@ -0,0 +1,14 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /** @type {import('@astryxdesign/cli/authoring').TemplateDoc} */
4
+ export const doc = {
5
+ type: 'block',
6
+ exampleFor: 'InfoTip',
7
+ name: 'InfoTip — Permission Notes',
8
+ displayName: 'Info Tip — Permission Notes',
9
+ description:
10
+ 'Read-only settings whose labels carry an InfoTip that says who can change each value.',
11
+ isReady: true,
12
+ aspectRatio: 4 / 3,
13
+ componentsUsed: ['InfoTip', 'HStack', 'VStack', 'Text'],
14
+ };
@@ -0,0 +1,41 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ 'use client';
4
+
5
+ import {InfoTip} from '@astryxdesign/core/InfoTip';
6
+ import {HStack, VStack} from '@astryxdesign/core/Stack';
7
+ import {Text} from '@astryxdesign/core/Text';
8
+
9
+ const fields = [
10
+ {
11
+ name: 'Owner',
12
+ value: 'Design Systems',
13
+ note: 'Only admins can change the owner.',
14
+ },
15
+ {
16
+ name: 'Visibility',
17
+ value: 'Everyone in the workspace',
18
+ note: 'Editors can change this field; viewers cannot.',
19
+ },
20
+ ];
21
+
22
+ export default function InfoTipPermissionNotes() {
23
+ return (
24
+ <VStack gap={4}>
25
+ {fields.map(field => (
26
+ <VStack key={field.name} gap={1}>
27
+ <HStack gap={1} align="center">
28
+ <Text type="label">{field.name}</Text>
29
+ <InfoTip
30
+ content={field.note}
31
+ label={`Who can change ${field.name.toLowerCase()}`}
32
+ />
33
+ </HStack>
34
+ <Text type="body" color="secondary">
35
+ {field.value}
36
+ </Text>
37
+ </VStack>
38
+ ))}
39
+ </VStack>
40
+ );
41
+ }
@@ -0,0 +1,13 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /** @type {import('@astryxdesign/cli/authoring').TemplateDoc} */
4
+ export const doc = {
5
+ type: 'block',
6
+ exampleFor: 'InfoTip',
7
+ name: 'InfoTip',
8
+ displayName: 'Info Tip',
9
+ isReady: true,
10
+ aspectRatio: 1,
11
+ isShowcase: true,
12
+ componentsUsed: ['InfoTip', 'HStack', 'VStack', 'Text'],
13
+ };
@@ -0,0 +1,24 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ 'use client';
4
+
5
+ import {InfoTip} from '@astryxdesign/core/InfoTip';
6
+ import {HStack, VStack} from '@astryxdesign/core/Stack';
7
+ import {Text} from '@astryxdesign/core/Text';
8
+
9
+ export default function InfoTipShowcase() {
10
+ return (
11
+ <VStack gap={1}>
12
+ <HStack gap={1} align="center">
13
+ <Text type="label" color="secondary">
14
+ Rolling average
15
+ </Text>
16
+ <InfoTip
17
+ content="30-day rolling average, recomputed nightly."
18
+ label="About this metric"
19
+ />
20
+ </HStack>
21
+ <Text type="display-3">1,284</Text>
22
+ </VStack>
23
+ );
24
+ }
@@ -66,12 +66,13 @@ export default function PowerSearchContentSearch() {
66
66
  const [filters, setFilters] = useState<PowerSearchFilter[]>([]);
67
67
 
68
68
  return (
69
- <PowerSearch
70
- style={{width: 300}}
71
- config={config}
72
- filters={filters}
73
- onChange={newFilters => setFilters([...newFilters])}
74
- placeholder="Type to search by title, or pick a field..."
75
- />
69
+ <div style={{display: 'grid', gridTemplateColumns: 'minmax(0, 300px)'}}>
70
+ <PowerSearch
71
+ config={config}
72
+ filters={filters}
73
+ onChange={newFilters => setFilters([...newFilters])}
74
+ placeholder="Type to search by title, or pick a field..."
75
+ />
76
+ </div>
76
77
  );
77
78
  }
@@ -94,12 +94,13 @@ export default function PowerSearchFullFeatured() {
94
94
  const [filters, setFilters] = useState<PowerSearchFilter[]>([]);
95
95
 
96
96
  return (
97
- <PowerSearch
98
- style={{width: 300}}
99
- config={config}
100
- filters={filters}
101
- onChange={newFilters => setFilters([...newFilters])}
102
- placeholder="Search..."
103
- />
97
+ <div style={{display: 'grid', gridTemplateColumns: 'minmax(0, 300px)'}}>
98
+ <PowerSearch
99
+ config={config}
100
+ filters={filters}
101
+ onChange={newFilters => setFilters([...newFilters])}
102
+ placeholder="Search..."
103
+ />
104
+ </div>
104
105
  );
105
106
  }
@@ -69,12 +69,13 @@ export default function PowerSearchPresetFilters() {
69
69
  ]);
70
70
 
71
71
  return (
72
- <PowerSearch
73
- style={{width: 360}}
74
- config={config}
75
- filters={filters}
76
- onChange={newFilters => setFilters([...newFilters])}
77
- placeholder="Add more filters..."
78
- />
72
+ <div style={{display: 'grid', gridTemplateColumns: 'minmax(0, 360px)'}}>
73
+ <PowerSearch
74
+ config={config}
75
+ filters={filters}
76
+ onChange={newFilters => setFilters([...newFilters])}
77
+ placeholder="Add more filters..."
78
+ />
79
+ </div>
79
80
  );
80
81
  }
@@ -92,15 +92,17 @@ export default function PowerSearchSearchWithTable() {
92
92
  const filteredBooks = applyFilters(filters, books);
93
93
 
94
94
  return (
95
- <VStack gap={4} width="100%" style={{maxWidth: 500}}>
96
- <PowerSearch
97
- config={config}
98
- filters={filters}
99
- onChange={newFilters => setFilters([...newFilters])}
100
- placeholder="Filter books by title, author, year, genre..."
101
- resultCount={filteredBooks.length}
102
- />
103
- <Table data={filteredBooks} columns={columns} idKey="id" hasHover />
104
- </VStack>
95
+ <div style={{display: 'grid', gridTemplateColumns: 'minmax(0, 500px)'}}>
96
+ <VStack gap={4}>
97
+ <PowerSearch
98
+ config={config}
99
+ filters={filters}
100
+ onChange={newFilters => setFilters([...newFilters])}
101
+ placeholder="Filter books by title, author, year, genre..."
102
+ resultCount={filteredBooks.length}
103
+ />
104
+ <Table data={filteredBooks} columns={columns} idKey="id" hasHover />
105
+ </VStack>
106
+ </div>
105
107
  );
106
108
  }
@@ -55,12 +55,13 @@ export default function PowerSearchShowcase() {
55
55
  const [filters, setFilters] = useState<PowerSearchFilter[]>(initialFilters);
56
56
 
57
57
  return (
58
- <PowerSearch
59
- style={{width: 400}}
60
- config={config}
61
- filters={filters}
62
- onChange={newFilters => setFilters([...newFilters])}
63
- placeholder="Search by status, title..."
64
- />
58
+ <div style={{display: 'grid', gridTemplateColumns: 'minmax(0, 400px)'}}>
59
+ <PowerSearch
60
+ config={config}
61
+ filters={filters}
62
+ onChange={newFilters => setFilters([...newFilters])}
63
+ placeholder="Search by status, title..."
64
+ />
65
+ </div>
65
66
  );
66
67
  }
@@ -6,7 +6,8 @@ export const doc = {
6
6
  exampleFor: 'Tokenizer',
7
7
  name: 'Tokenizer \u2014 Clear',
8
8
  displayName: 'Tokenizer \u2014 Clear',
9
- description: 'Tokenizer with a built-in clear-all button for bulk removal of all selected tokens.',
9
+ description:
10
+ "Tokenizer with a built-in clear-all button for bulk removal of all selected tokens. On touch screens, clear through the sheet's Clear all.",
10
11
  isReady: true,
11
12
  aspectRatio: 16 / 9,
12
13
  componentsUsed: ['Tokenizer', 'Layout', 'Text'],
@@ -29,7 +29,8 @@ export default function TokenizerClear() {
29
29
  <div style={{display: 'grid', gridTemplateColumns: 'minmax(0, 400px)'}}>
30
30
  <Stack direction="vertical" gap={2}>
31
31
  <Text type="supporting" color="secondary">
32
- Clear-all button appears when tokens are selected
32
+ Clear-all button appears when tokens are selected; on touch screens,
33
+ clear through the sheet's Clear all
33
34
  </Text>
34
35
  <Tokenizer
35
36
  label="Team Members"
@@ -38,7 +39,6 @@ export default function TokenizerClear() {
38
39
  value={value}
39
40
  onChange={items => setValue(items)}
40
41
  hasClear
41
- presentation="popover"
42
42
  />
43
43
  </Stack>
44
44
  </div>
@@ -59,7 +59,6 @@ export default function TokenizerCreatable() {
59
59
  hasCreate
60
60
  hasEntriesOnFocus
61
61
  placeholder="Search or type a new name..."
62
- presentation="popover"
63
62
  />
64
63
  </Stack>
65
64
  </Stack>
@@ -40,7 +40,6 @@ export default function TokenizerEndContent() {
40
40
  value={value}
41
41
  onChange={items => setValue(items)}
42
42
  endContent={<Button label="Apply" variant="primary" size="sm" />}
43
- presentation="popover"
44
43
  />
45
44
  </Stack>
46
45
  </div>
@@ -6,7 +6,8 @@ export const doc = {
6
6
  exampleFor: 'Tokenizer',
7
7
  name: 'Tokenizer \u2014 Overflow',
8
8
  displayName: 'Tokenizer \u2014 Overflow',
9
- description: 'Tokenizer with overflow truncation when unfocused. Inline mode pushes content down on expand; layer mode overlays without shifting layout.',
9
+ description:
10
+ 'Tokenizer with overflow truncation when unfocused. Inline mode pushes content down on expand; layer mode overlays without shifting layout. Overflow modes apply to the inline field.',
10
11
  isReady: true,
11
12
  aspectRatio: 16 / 9,
12
13
  componentsUsed: ['Tokenizer', 'Layout', 'Text'],
@@ -41,7 +41,6 @@ export default function TokenizerOverflow() {
41
41
  value={inlineValue}
42
42
  onChange={items => setInlineValue(items)}
43
43
  tokenOverflowBehavior="unfocusedInline"
44
- presentation="popover"
45
44
  />
46
45
  </Stack>
47
46
  <Stack direction="vertical" gap={1}>
@@ -55,7 +54,6 @@ export default function TokenizerOverflow() {
55
54
  value={layerValue}
56
55
  onChange={items => setLayerValue(items)}
57
56
  tokenOverflowBehavior="unfocusedLayer"
58
- presentation="popover"
59
57
  />
60
58
  </Stack>
61
59
  </Stack>
@@ -82,6 +82,7 @@ import {
82
82
  StackItem,
83
83
  VStack,
84
84
  } from '@astryxdesign/core/Layout';
85
+ import {rtlStyles} from '@astryxdesign/core/utils';
85
86
  import {
86
87
  durationVars,
87
88
  easeVars,
@@ -1391,7 +1392,13 @@ function ConversationPane({
1391
1392
  <Button
1392
1393
  label="Inbox"
1393
1394
  variant="ghost"
1394
- icon={<Icon icon={ArrowLeftIcon} size="sm" />}
1395
+ icon={
1396
+ <Icon
1397
+ icon={ArrowLeftIcon}
1398
+ size="sm"
1399
+ xstyle={rtlStyles.mirror}
1400
+ />
1401
+ }
1395
1402
  onClick={onClose}
1396
1403
  />
1397
1404
  }
@@ -1840,7 +1847,9 @@ function ComposeWindow({
1840
1847
  // than being rejected for not matching anything.
1841
1848
  hasCreate
1842
1849
  // Stamps data-autofocus, which is what the sheet looks for
1843
- // once the window is actually visible.
1850
+ // once the window is actually visible. It applies to the
1851
+ // inline field: on a compact touch screen the field opens
1852
+ // its own sheet and ignores it.
1844
1853
  //
1845
1854
  // Deliberately without `hasEntriesOnFocus`: the two together
1846
1855
  // mean the window can never open without the full directory
@@ -1874,10 +1883,6 @@ function ComposeWindow({
1874
1883
  )}
1875
1884
  </>
1876
1885
  }
1877
- // The recipient rows read as one header, so all three stay
1878
- // inline fields on every device; the sheet has no end lane
1879
- // for the Cc and Bcc buttons.
1880
- presentation="popover"
1881
1886
  />
1882
1887
  {hasCc ? (
1883
1888
  <Tokenizer
@@ -1888,7 +1893,6 @@ function ComposeWindow({
1888
1893
  value={cc}
1889
1894
  onChange={items => setCc(items)}
1890
1895
  hasCreate
1891
- presentation="popover"
1892
1896
  />
1893
1897
  ) : null}
1894
1898
  {hasBcc ? (
@@ -1900,7 +1904,6 @@ function ComposeWindow({
1900
1904
  value={bcc}
1901
1905
  onChange={items => setBcc(items)}
1902
1906
  hasCreate
1903
- presentation="popover"
1904
1907
  />
1905
1908
  ) : null}
1906
1909
  <TextInput
@@ -29,6 +29,7 @@ import {MoreMenu} from '@astryxdesign/core/MoreMenu';
29
29
  import type {DropdownMenuOption} from '@astryxdesign/core/DropdownMenu';
30
30
  import {Link} from '@astryxdesign/core/Link';
31
31
  import {Icon} from '@astryxdesign/core/Icon';
32
+ import {rtlStyles} from '@astryxdesign/core/utils';
32
33
  import {AspectRatio} from '@astryxdesign/core/AspectRatio';
33
34
  import {Divider} from '@astryxdesign/core/Divider';
34
35
  import {StatusDot} from '@astryxdesign/core/StatusDot';
@@ -381,7 +382,11 @@ function PageHeader({
381
382
  <HStack gap={4} vAlign="center" wrap="wrap">
382
383
  <Link href="#" type="supporting" color="secondary">
383
384
  <HStack as="span" gap={1} vAlign="center">
384
- <Icon icon={ArrowLeftIcon} size="sm" />
385
+ <Icon
386
+ icon={ArrowLeftIcon}
387
+ size="sm"
388
+ xstyle={rtlStyles.mirror}
389
+ />
385
390
  All Tasks
386
391
  </HStack>
387
392
  </Link>
@@ -463,7 +468,6 @@ function PageHeader({
463
468
  onRemove={onRemove}
464
469
  />
465
470
  )}
466
- presentation="popover"
467
471
  />
468
472
  </HStack>
469
473
  </VStack>
@@ -248,7 +248,7 @@ export const myTheme = defineTheme({
248
248
  // palette.neutral.light[100],
249
249
  // palette.neutral.dark[15],
250
250
  // ],
251
- '--color-accent': ['#0064E0', '#2694FE'],
251
+ '--color-accent': ['#0064E0', '#0171E3'],
252
252
  // Changing an accent means owning its on-colour: this is the label that
253
253
  // sits on top of the fill above, in each mode.
254
254
  '--color-on-accent': ['#FFFFFF', '#FFFFFF'],
@@ -78,9 +78,9 @@ declare const eventSchema: z.ZodObject<{
78
78
  template: "template";
79
79
  command: "command";
80
80
  component: "component";
81
- hook: "hook";
82
- theme: "theme";
83
81
  doc: "doc";
82
+ theme: "theme";
83
+ hook: "hook";
84
84
  integration: "integration";
85
85
  migration: "migration";
86
86
  mixed: "mixed";
@@ -219,6 +219,10 @@ export const ComponentDocKindSchema: z.ZodObject<{
219
219
  playground: z.ZodOptional<z.ZodUnknown>;
220
220
  examples: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
221
221
  replaces: z.ZodOptional<z.ZodString>;
222
+ deprecated: z.ZodOptional<z.ZodObject<{
223
+ replacement: z.ZodString;
224
+ description: z.ZodString;
225
+ }, z.core.$strict>>;
222
226
  name: z.ZodString;
223
227
  displayName: z.ZodOptional<z.ZodString>;
224
228
  description: z.ZodOptional<z.ZodString>;
@@ -750,6 +754,10 @@ export const LegacyDocSchema: z.ZodUnion<readonly [z.ZodObject<{
750
754
  default: z.ZodOptional<z.ZodString>;
751
755
  required: z.ZodOptional<z.ZodBoolean>;
752
756
  }, z.core.$loose>>;
757
+ deprecated: z.ZodOptional<z.ZodObject<{
758
+ replacement: z.ZodString;
759
+ description: z.ZodString;
760
+ }, z.core.$strict>>;
753
761
  }, z.core.$loose>, z.ZodObject<{
754
762
  name: z.ZodString;
755
763
  displayName: z.ZodOptional<z.ZodString>;
@@ -823,6 +831,10 @@ export const LegacyDocSchema: z.ZodUnion<readonly [z.ZodObject<{
823
831
  }>>;
824
832
  stability: z.ZodOptional<z.ZodLiteral<"experimental">>;
825
833
  components: z.ZodArray<z.ZodUnknown>;
834
+ deprecated: z.ZodOptional<z.ZodObject<{
835
+ replacement: z.ZodString;
836
+ description: z.ZodString;
837
+ }, z.core.$strict>>;
826
838
  }, z.core.$loose>, z.ZodObject<{
827
839
  name: z.ZodString;
828
840
  displayName: z.ZodOptional<z.ZodString>;
@@ -860,6 +872,10 @@ export const LegacyDocSchema: z.ZodUnion<readonly [z.ZodObject<{
860
872
  default: z.ZodOptional<z.ZodString>;
861
873
  required: z.ZodOptional<z.ZodBoolean>;
862
874
  }, z.core.$loose>>;
875
+ deprecated: z.ZodOptional<z.ZodObject<{
876
+ replacement: z.ZodString;
877
+ description: z.ZodString;
878
+ }, z.core.$strict>>;
863
879
  }, z.core.$loose>, z.ZodObject<{
864
880
  name: z.ZodString;
865
881
  displayName: z.ZodOptional<z.ZodString>;
@@ -306,6 +306,17 @@ const BaseDocFields = {
306
306
  isHiddenFromOverview: z.boolean().optional(),
307
307
  };
308
308
 
309
+ /**
310
+ * A deprecated component's replacement (`ComponentBaseDoc.deprecated`). Strict:
311
+ * the docsite and search read both fields, so a misspelled one fails to load.
312
+ */
313
+ const ComponentDeprecationSchema = z
314
+ .object({
315
+ replacement: nonEmptyString,
316
+ description: nonEmptyString,
317
+ })
318
+ .strict();
319
+
309
320
  const ComponentBaseSchema = z
310
321
  .object({
311
322
  ...BaseDocFields,
@@ -314,6 +325,7 @@ const ComponentBaseSchema = z
314
325
  playground: z.unknown().optional(),
315
326
  examples: z.array(z.unknown()).optional(),
316
327
  replaces: z.string().min(1).optional(),
328
+ deprecated: ComponentDeprecationSchema.optional(),
317
329
  })
318
330
  .passthrough();
319
331
 
@@ -776,10 +788,12 @@ const LegacyReferenceDocSchema = LegacyBaseDocSchema.extend({
776
788
 
777
789
  const LegacySingleComponentDocSchema = LegacyBaseDocSchema.extend({
778
790
  props: z.array(PropSchema),
791
+ deprecated: ComponentDeprecationSchema.optional(),
779
792
  }).passthrough();
780
793
 
781
794
  const LegacyMultiComponentDocSchema = LegacyBaseDocSchema.extend({
782
795
  components: z.array(z.unknown()),
796
+ deprecated: ComponentDeprecationSchema.optional(),
783
797
  }).passthrough();
784
798
 
785
799
  const LegacyHookDocSchema = LegacyBaseDocSchema.extend({
@@ -791,6 +805,7 @@ const LegacySubComponentDocSchema = LegacyBaseDocSchema.extend({
791
805
  subComponentOf: z.string().min(1, 'subComponentOf is required'),
792
806
  description: z.string(),
793
807
  props: z.array(PropSchema),
808
+ deprecated: ComponentDeprecationSchema.optional(),
794
809
  }).passthrough();
795
810
 
796
811
  /** The permissive legacy union (sub-component, hook, multi, single, then reference). */
@@ -58,6 +58,12 @@ export const doc = {
58
58
  description:
59
59
  'Integration components only: the exact `name` of the Core ComponentDoc this component takes over for unqualified lookup, so every app that loads the integration gets it from component detail, component lists, search, `swizzle <Name>`, and issue routing; `swizzle --list` keeps listing Core names. The Core original stays reachable with `--package @astryxdesign/core`. It takes effect only when the package\'s peer range starts at the release that applies it, `"@astryxdesign/cli": ">=0.6.7"` or later; with a lower range nothing changes and `doctor integration components` warns ({@link generic:replace-a-core-component}). Set it only to intentionally own a Core identity; give an alternative or variant its own name instead.',
60
60
  },
61
+ {
62
+ name: 'deprecated',
63
+ type: '{replacement: string; description: string}',
64
+ description:
65
+ "Marks a deprecated component: it keeps working and stays documented, labeled with what replaces it. `replacement` is the `name` of the documented component to use instead; `description` is the modernization route in a sentence or two. The docsite shows a Deprecated badge in the component's page header and index tile, labels its search result, and adds a notice that links the replacement; `astryx search` results and `astryx build` kit entries carry the field. Omit it for a component that is not deprecated.",
66
+ },
61
67
  {
62
68
  name: 'keywords',
63
69
  type: 'string[]',
@@ -21,6 +21,15 @@ import type {
21
21
  UsageDoc,
22
22
  } from '../base/type.js';
23
23
 
24
+ /** What replaces a deprecated component (`ComponentBaseDoc.deprecated`). */
25
+ export interface ComponentDeprecation {
26
+ /** `name` of the documented component to use instead, e.g. `'BottomSheet'`. */
27
+ replacement: string;
28
+ /** The modernization route in a sentence or two: what to write instead,
29
+ * and where the migration is described. */
30
+ description: string;
31
+ }
32
+
24
33
  /**
25
34
  * Shared fields between single-component and multi-component docs.
26
35
  * Do not use this interface directly — use `ComponentDoc` (the union type).
@@ -63,6 +72,13 @@ export interface ComponentBaseDoc extends AuthoredDocGraphFields {
63
72
  * range, and on older CLIs that do not read `replaces`, the component keeps
64
73
  * its own name. */
65
74
  replaces?: string;
75
+ /** Marks a deprecated component (spec:AST-017 FR26, FR29b): it keeps
76
+ * working and stays documented, labeled with its replacement. The docsite
77
+ * shows a Deprecated badge in its page header and index tile, labels its
78
+ * search result, and adds a notice that links the replacement; `astryx
79
+ * search` results and `astryx build` kit entries carry the field. Omit for
80
+ * a component that is not deprecated. */
81
+ deprecated?: ComponentDeprecation;
66
82
  /** Search keywords for CLI discovery. Terms a developer might type when
67
83
  * looking for this component: synonyms, related UI concepts, and common
68
84
  * names from other design systems (MUI, Chakra, Radix, and others).
@@ -118,6 +118,7 @@ export type {
118
118
  SingleComponentDoc,
119
119
  MultiComponentDoc,
120
120
  ComponentEntry,
121
+ ComponentDeprecation,
121
122
  ComponentGroupDoc,
122
123
  ComponentTranslationDoc,
123
124
  ComponentPropDoc,
@@ -21,6 +21,7 @@ import {jsonOut} from '../../../foundation/response/json.mjs';
21
21
  import {resultSet, resultSetOf} from '../../../foundation/debug/index.mjs';
22
22
  import {
23
23
  emit,
24
+ formatDeprecation,
24
25
  section,
25
26
  text,
26
27
  list,
@@ -172,18 +173,23 @@ export function registerBuild(program) {
172
173
  'package',
173
174
  'domain',
174
175
  'displayName',
176
+ 'deprecated',
175
177
  'score',
176
178
  'reason',
177
179
  'import',
178
180
  'description',
179
181
  'command',
180
182
  ],
181
- format: {command: formatCliCommand},
183
+ format: {command: formatCliCommand, deprecated: formatDeprecation},
182
184
  };
183
185
  /** @param {string[]} fields */
184
186
  const brief = fields => ({
185
187
  fields,
186
- format: {command: formatCliCommand, description: firstSentence},
188
+ format: {
189
+ command: formatCliCommand,
190
+ description: firstSentence,
191
+ deprecated: formatDeprecation,
192
+ },
187
193
  });
188
194
  // Blocks and components are extras: the text names the top few, and
189
195
  // says how many more the JSON and --verbose carry.
@@ -277,7 +283,7 @@ export function registerBuild(program) {
277
283
  ? [
278
284
  records(
279
285
  shown(domain),
280
- verbose ? full : brief(['name', 'package', 'description']),
286
+ verbose ? full : brief(['name', 'package', 'deprecated', 'description']),
281
287
  ),
282
288
  ]
283
289
  : []),