@astryxdesign/cli 0.7.12-canary.f543ec7 → 0.7.12

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 (113) hide show
  1. package/CHANGELOG.md +107 -0
  2. package/api/build/blocks/blocks.d.mts +41 -0
  3. package/api/build/blocks/blocks.mjs +118 -68
  4. package/api/component/__fixtures__/resolutions/modules.txt +3 -3
  5. package/api/docs/_adapter.d.mts +22 -0
  6. package/api/docs/_adapter.mjs +81 -3
  7. package/api/docs/docs.doc.mjs +5 -5
  8. package/api/docs/docs.type.d.mts +21 -0
  9. package/api/docs/docs.type.mjs +11 -0
  10. package/api/docs/list/list.d.mts +5 -1
  11. package/api/docs/list/list.mjs +72 -6
  12. package/api/docs/node/node.mjs +2 -40
  13. package/api/doctor/doctor.d.mts +4 -4
  14. package/api/doctor/doctor.mjs +248 -78
  15. package/api/icon/_authoring.mjs +8 -1
  16. package/api/icon/add/add.mjs +45 -5
  17. package/api/icon/icon.type.d.mts +24 -0
  18. package/api/icon/icon.type.mjs +6 -0
  19. package/api/icon/iconAdd.doc.mjs +1 -1
  20. package/api/icon/map/map.mjs +11 -4
  21. package/api/index.d.mts +1 -0
  22. package/api/index.mjs +1 -0
  23. package/api/integration/add-helpers.d.mts +5 -1
  24. package/api/integration/add-helpers.mjs +1 -1
  25. package/api/render/_adapter.mjs +9 -0
  26. package/api/render/render.doc.mjs +3 -3
  27. package/api/render/render.type.d.mts +1 -1
  28. package/api/render/render.type.mjs +1 -1
  29. package/api/search/ORDERING.md +3 -0
  30. package/api/search/_adapter.d.mts +32 -3
  31. package/api/search/_adapter.mjs +50 -22
  32. package/api/search/_fit-order.d.mts +47 -0
  33. package/api/search/_fit-order.mjs +257 -0
  34. package/api/search/_main-searcher.mjs +15 -5
  35. package/api/search/exportSearchIndex.doc.d.mts +10 -0
  36. package/api/search/exportSearchIndex.doc.mjs +58 -0
  37. package/api/search/rankSearchIndex.doc.d.mts +10 -0
  38. package/api/search/rankSearchIndex.doc.mjs +79 -0
  39. package/api/search/search-index.d.mts +44 -0
  40. package/api/search/search-index.mjs +270 -0
  41. package/api/search/search.type.d.mts +28 -0
  42. package/api/search/search.type.mjs +17 -0
  43. package/api/swizzle/_moduleGraph.d.mts +7 -0
  44. package/api/swizzle/_moduleGraph.mjs +191 -83
  45. package/api/swizzle/copy/copy.mjs +28 -6
  46. package/api/template/skeleton/skeleton.mjs +1 -1
  47. package/api/template/template.mjs +1 -0
  48. package/assets/codemods/transforms/v0.1.0/drop-xds-prefix-imports.mjs +1 -1
  49. package/assets/codemods/transforms/v0.1.0/index.mjs +1 -1
  50. package/assets/discover/official-packages.json +16 -0
  51. package/assets/docs/styling-overview.doc.mjs +3 -3
  52. package/assets/docs/tree/icon-sets.doc.mjs +4 -4
  53. package/assets/docs/tree/render-pages.doc.mjs +3 -3
  54. package/assets/docs/tree/tailwind.doc.mjs +41 -1
  55. package/assets/docs/tree/type-scale.doc.mjs +19 -2
  56. package/assets/templates/blocks/components/Hooks/useInputStatusIconHookUsage.tsx +1 -0
  57. package/assets/templates/blocks/components/Hooks/useInteractiveRoleHookUsage.doc.mjs +14 -0
  58. package/assets/templates/blocks/components/Hooks/useInteractiveRoleHookUsage.tsx +56 -0
  59. package/assets/templates/blocks/components/Hooks/useStreamingTextHookUsage.doc.mjs +2 -2
  60. package/assets/templates/blocks/components/Hooks/useStreamingTextHookUsage.tsx +66 -10
  61. package/assets/templates/blocks/components/Link/useLinkifyHookUsage.doc.mjs +14 -0
  62. package/assets/templates/blocks/components/Link/useLinkifyHookUsage.tsx +39 -0
  63. package/assets/templates/blocks/components/PowerSearch/usePowerSearchConfigHookUsage.doc.mjs +14 -0
  64. package/assets/templates/blocks/components/PowerSearch/usePowerSearchConfigHookUsage.tsx +83 -0
  65. package/assets/templates/blocks/components/Table/RowsVirtualizationHookUsage.doc.mjs +14 -0
  66. package/assets/templates/blocks/components/Table/RowsVirtualizationHookUsage.tsx +41 -0
  67. package/assets/templates/blocks/components/Table/useTableColumnSettingsStateHookUsage.doc.mjs +14 -0
  68. package/assets/templates/blocks/components/Table/useTableColumnSettingsStateHookUsage.tsx +97 -0
  69. package/assets/templates/pages/table-filter/page.tsx +15 -23
  70. package/assets/templates/pages/table-grouped/page.tsx +30 -30
  71. package/assets/templates/pages/table-inbox/page.tsx +3 -6
  72. package/assets/templates/themes/butter/butterTheme.ts +1 -1
  73. package/assets/templates/themes/gothic/gothicTheme.ts +16 -0
  74. package/assets/templates/themes/matcha/matchaTheme.ts +1 -1
  75. package/assets/templates/themes/neutral/neutralTheme.ts +6 -0
  76. package/assets/templates/themes/y2k/y2kPaletteRefs.generated.ts +1 -1
  77. package/assets/templates/themes/y2k/y2kTheme.ts +1 -1
  78. package/clients/cli/commands/docs.doc.mjs +5 -1
  79. package/clients/cli/commands/docs.mjs +30 -2
  80. package/clients/cli/commands/experimental/icon.mjs +25 -4
  81. package/clients/cli/commands/experimental-render.doc.mjs +1 -1
  82. package/clients/cli/commands/template.mjs +204 -181
  83. package/clients/cli/lib/resolve-theme.mjs +16 -7
  84. package/foundation/discovery/component-discovery.mjs +1 -1
  85. package/foundation/discovery/hook-discovery.mjs +31 -8
  86. package/foundation/discovery/icon-set-writer.d.mts +21 -5
  87. package/foundation/discovery/icon-set-writer.mjs +114 -13
  88. package/foundation/discovery/template-adapter.mjs +2 -2
  89. package/foundation/doc-compiler/import.d.mts +5 -1
  90. package/foundation/doc-compiler/import.mjs +40 -6
  91. package/foundation/fs/import-url.d.mts +20 -0
  92. package/foundation/fs/import-url.mjs +22 -0
  93. package/foundation/fs/module-loader.d.mts +24 -3
  94. package/foundation/fs/module-loader.mjs +69 -47
  95. package/foundation/render/charts.d.mts +59 -0
  96. package/foundation/render/charts.mjs +216 -0
  97. package/foundation/render/embedded-imports.d.mts +7 -7
  98. package/foundation/render/embedded-imports.mjs +63 -54
  99. package/foundation/render/page-host.d.mts +4 -0
  100. package/foundation/render/page-host.mjs +45 -0
  101. package/foundation/render/page-worker.mjs +350 -57
  102. package/foundation/render/render-page.d.mts +11 -6
  103. package/foundation/render/render-page.mjs +164 -54
  104. package/foundation/render/ts-paths.d.mts +63 -0
  105. package/foundation/render/ts-paths.mjs +138 -0
  106. package/foundation/response/error-codes.doc.mjs +3 -3
  107. package/foundation/response/error-codes.mjs +3 -2
  108. package/foundation/text/levenshtein.d.mts +6 -1
  109. package/foundation/text/levenshtein.mjs +25 -9
  110. package/foundation/text/suggest-order.d.mts +8 -1
  111. package/foundation/text/suggest-order.mjs +72 -6
  112. package/foundation/xle/registry-core.mjs +1 -1
  113. package/package.json +7 -6
@@ -1129,18 +1129,6 @@ const INITIAL_SAVED_VIEWS: SavedView[] = [
1129
1129
  const COMPACT_SURFACE_QUERY =
1130
1130
  '(max-width: 768px), (max-width: 1024px) and (pointer: coarse) and (hover: none)';
1131
1131
 
1132
- /**
1133
- * Top padding for whatever opens a BottomSheet, on the spacing scale.
1134
- *
1135
- * The panel's grab pill floats over the content instead of reserving layout
1136
- * space for itself: it is 4px centered in a 24px band, so it covers the top
1137
- * 10-14px of the sheet. Content that starts at the usual 16px gutter clears it
1138
- * by 2px, which does not read as a gap — it reads as the sheet being cut off.
1139
- * Opening at the full 24px band puts real space under the pill, and every
1140
- * sheet here uses this one value so they all start on the same line.
1141
- */
1142
- const SHEET_TOP_INSET = 6;
1143
-
1144
1132
  /**
1145
1133
  * Width the filter row holds back, in px, for the readout that trails the
1146
1134
  * clauses — the density toggle, the result count and Clear all.
@@ -1698,6 +1686,7 @@ const styles = stylex.create({
1698
1686
  fontSize: typeScaleVars['--text-body-size'],
1699
1687
  fontWeight: typeScaleVars['--text-body-weight'],
1700
1688
  height: 'auto',
1689
+ minHeight: 0,
1701
1690
  lineHeight: typeScaleVars['--text-body-leading'],
1702
1691
  paddingBlock: 0,
1703
1692
  paddingInline: 0,
@@ -2052,7 +2041,8 @@ function FilterOverflow({
2052
2041
  <VStack
2053
2042
  gap={2}
2054
2043
  padding={isCompactSurface ? 4 : 0}
2055
- paddingBlockStart={isCompactSurface ? SHEET_TOP_INSET : 0}>
2044
+ // In a sheet the sheet's band under its grab bar is the top inset.
2045
+ paddingBlockStart={0}>
2056
2046
  {items.map(({child, index}) => (
2057
2047
  <StackItem key={index} xstyle={styles.overflowItem}>
2058
2048
  {child}
@@ -2145,7 +2135,8 @@ function AdaptiveSavedViewForm({
2145
2135
  <Section
2146
2136
  variant="transparent"
2147
2137
  padding={4}
2148
- paddingBlockStart={SHEET_TOP_INSET}>
2138
+ // The sheet's band under its grab bar is the top inset.
2139
+ paddingBlockStart={0}>
2149
2140
  <VStack gap={4}>
2150
2141
  <HStack gap={2}>
2151
2142
  <StackItem size="fill">
@@ -4090,11 +4081,11 @@ export default function TableFilterTemplate() {
4090
4081
  label="View options"
4091
4082
  height="tall"
4092
4083
  // The tab strip compensates against a container inset, so the sheet
4093
- // publishes none and the wrapper below owns the top band.
4084
+ // publishes none; its band under the grab bar is the only top inset,
4085
+ // so the strip's own box starts at the tab row and its scroll arrow
4086
+ // lands on the tabs rather than above them.
4094
4087
  padding={0}>
4095
- {/* The inset is the wrapper's, so the strip's own box starts at the tab
4096
- row and its scroll arrow lands on the tabs rather than above them. */}
4097
- <VStack gap={0} paddingBlockStart={SHEET_TOP_INSET}>
4088
+ <VStack gap={0}>
4098
4089
  {/* The heading the popover puts above the pane is dropped here: it
4099
4090
  restates the selected tab word for word, and the strip already
4100
4091
  marks which one that is. On a phone that is a line of vertical
@@ -4148,14 +4139,15 @@ export default function TableFilterTemplate() {
4148
4139
  const detailBody =
4149
4140
  activeJob == null ? null : (
4150
4141
  <VStack gap={0} xstyle={styles.detailPanel}>
4151
- {/* The only part of the body that knows which host it is in: the sheet
4152
- needs the pill cleared, the docked panel has no pill and would just
4153
- sit 8px lower than the panels beside it. The two never coexist —
4154
- Layout drops the panel entirely on a compact surface. */}
4142
+ {/* The only part of the body that knows which host it is in: in the
4143
+ sheet, the sheet's band under its grab bar is the top inset; the
4144
+ docked panel has no pill and keeps the 16px gutter of the panels
4145
+ beside it. The two never coexist — Layout drops the panel entirely
4146
+ on a compact surface. */}
4155
4147
  <Section
4156
4148
  variant="transparent"
4157
4149
  padding={4}
4158
- paddingBlockStart={isCompactSurface ? SHEET_TOP_INSET : 4}>
4150
+ paddingBlockStart={isCompactSurface ? 0 : 4}>
4159
4151
  <VStack gap={4}>
4160
4152
  <HStack gap={2}>
4161
4153
  <StackItem size="fill">
@@ -100,7 +100,7 @@ const PRIORITY_COLOR: Record<
100
100
  const allTasks: TaskRow[] = [
101
101
  {
102
102
  id: '1',
103
- taskId: 'T235040469',
103
+ taskId: 'TASK-1001',
104
104
  title: 'Update user interface',
105
105
  subtitle: 'Update payment gateway integration',
106
106
  status: 'in_progress',
@@ -115,7 +115,7 @@ const allTasks: TaskRow[] = [
115
115
  },
116
116
  {
117
117
  id: '2',
118
- taskId: 'T235040470',
118
+ taskId: 'TASK-1002',
119
119
  title: 'Use Projects to organize work for features or releases',
120
120
  subtitle: '',
121
121
  status: 'in_progress',
@@ -130,7 +130,7 @@ const allTasks: TaskRow[] = [
130
130
  },
131
131
  {
132
132
  id: '3',
133
- taskId: 'T235040471',
133
+ taskId: 'TASK-1003',
134
134
  title: 'Use Cycles to focus work over n-weeks',
135
135
  subtitle: '',
136
136
  status: 'in_progress',
@@ -145,7 +145,7 @@ const allTasks: TaskRow[] = [
145
145
  },
146
146
  {
147
147
  id: '4',
148
- taskId: 'T235040472',
148
+ taskId: 'TASK-1004',
149
149
  title: 'Testing code',
150
150
  subtitle: 'Update payment gateway integration',
151
151
  status: 'todo',
@@ -160,7 +160,7 @@ const allTasks: TaskRow[] = [
160
160
  },
161
161
  {
162
162
  id: '5',
163
- taskId: 'T235040473',
163
+ taskId: 'TASK-1005',
164
164
  title: 'Update backend code',
165
165
  subtitle: 'Update payment gateway integration',
166
166
  status: 'todo',
@@ -175,7 +175,7 @@ const allTasks: TaskRow[] = [
175
175
  },
176
176
  {
177
177
  id: '6',
178
- taskId: 'T235040474',
178
+ taskId: 'TASK-1006',
179
179
  title: 'Update front end code',
180
180
  subtitle: 'Update payment gateway integration',
181
181
  status: 'todo',
@@ -190,7 +190,7 @@ const allTasks: TaskRow[] = [
190
190
  },
191
191
  {
192
192
  id: '7',
193
- taskId: 'T235040475',
193
+ taskId: 'TASK-1007',
194
194
  title: 'Update payment gateway integration',
195
195
  subtitle: '',
196
196
  status: 'todo',
@@ -205,7 +205,7 @@ const allTasks: TaskRow[] = [
205
205
  },
206
206
  {
207
207
  id: '8',
208
- taskId: 'T235040476',
208
+ taskId: 'TASK-1008',
209
209
  title: 'Update payment gateway backend code',
210
210
  subtitle: '',
211
211
  status: 'todo',
@@ -220,7 +220,7 @@ const allTasks: TaskRow[] = [
220
220
  },
221
221
  {
222
222
  id: '9',
223
- taskId: 'T235040477',
223
+ taskId: 'TASK-1009',
224
224
  title: 'Invite your teammates',
225
225
  subtitle: '',
226
226
  status: 'todo',
@@ -235,7 +235,7 @@ const allTasks: TaskRow[] = [
235
235
  },
236
236
  {
237
237
  id: '10',
238
- taskId: 'T235040478',
238
+ taskId: 'TASK-1010',
239
239
  title: 'Next steps',
240
240
  subtitle: '',
241
241
  status: 'todo',
@@ -250,7 +250,7 @@ const allTasks: TaskRow[] = [
250
250
  },
251
251
  {
252
252
  id: '11',
253
- taskId: 'T235040479',
253
+ taskId: 'TASK-1011',
254
254
  title: 'Welcome to Linear',
255
255
  subtitle: '',
256
256
  status: 'backlog',
@@ -265,7 +265,7 @@ const allTasks: TaskRow[] = [
265
265
  },
266
266
  {
267
267
  id: '12',
268
- taskId: 'T235040480',
268
+ taskId: 'TASK-1012',
269
269
  title: 'Connect GitHub or GitLab',
270
270
  subtitle: '',
271
271
  status: 'backlog',
@@ -280,7 +280,7 @@ const allTasks: TaskRow[] = [
280
280
  },
281
281
  {
282
282
  id: '13',
283
- taskId: 'T235040481',
283
+ taskId: 'TASK-1013',
284
284
  title: 'Customize settings',
285
285
  subtitle: '',
286
286
  status: 'backlog',
@@ -295,7 +295,7 @@ const allTasks: TaskRow[] = [
295
295
  },
296
296
  {
297
297
  id: '14',
298
- taskId: 'T235040482',
298
+ taskId: 'TASK-1014',
299
299
  title: 'Try 3 ways to navigate: Command menu, keyboard or mouse',
300
300
  subtitle: '',
301
301
  status: 'done',
@@ -310,7 +310,7 @@ const allTasks: TaskRow[] = [
310
310
  },
311
311
  {
312
312
  id: '15',
313
- taskId: 'T235040483',
313
+ taskId: 'TASK-1015',
314
314
  title: 'Connect to Slack',
315
315
  subtitle: '',
316
316
  status: 'done',
@@ -325,7 +325,7 @@ const allTasks: TaskRow[] = [
325
325
  },
326
326
  {
327
327
  id: '16',
328
- taskId: 'T235040484',
328
+ taskId: 'TASK-1016',
329
329
  title: 'Migrate database schema to v2',
330
330
  subtitle: 'Payment gateway integration',
331
331
  status: 'in_progress',
@@ -340,7 +340,7 @@ const allTasks: TaskRow[] = [
340
340
  },
341
341
  {
342
342
  id: '17',
343
- taskId: 'T235040485',
343
+ taskId: 'TASK-1017',
344
344
  title: 'Write integration tests for checkout flow',
345
345
  subtitle: '',
346
346
  status: 'in_progress',
@@ -355,7 +355,7 @@ const allTasks: TaskRow[] = [
355
355
  },
356
356
  {
357
357
  id: '18',
358
- taskId: 'T235040486',
358
+ taskId: 'TASK-1018',
359
359
  title: 'Set up CI/CD pipeline for staging',
360
360
  subtitle: '',
361
361
  status: 'in_progress',
@@ -370,7 +370,7 @@ const allTasks: TaskRow[] = [
370
370
  },
371
371
  {
372
372
  id: '19',
373
- taskId: 'T235040487',
373
+ taskId: 'TASK-1019',
374
374
  title: 'Add rate limiting to public API endpoints',
375
375
  subtitle: '',
376
376
  status: 'todo',
@@ -385,7 +385,7 @@ const allTasks: TaskRow[] = [
385
385
  },
386
386
  {
387
387
  id: '20',
388
- taskId: 'T235040488',
388
+ taskId: 'TASK-1020',
389
389
  title: 'Refactor auth middleware to support OAuth2',
390
390
  subtitle: '',
391
391
  status: 'todo',
@@ -400,7 +400,7 @@ const allTasks: TaskRow[] = [
400
400
  },
401
401
  {
402
402
  id: '21',
403
- taskId: 'T235040489',
403
+ taskId: 'TASK-1021',
404
404
  title: 'Design error pages for 404 and 500',
405
405
  subtitle: '',
406
406
  status: 'todo',
@@ -415,7 +415,7 @@ const allTasks: TaskRow[] = [
415
415
  },
416
416
  {
417
417
  id: '22',
418
- taskId: 'T235040490',
418
+ taskId: 'TASK-1022',
419
419
  title: 'Audit third-party dependencies for vulnerabilities',
420
420
  subtitle: '',
421
421
  status: 'todo',
@@ -430,7 +430,7 @@ const allTasks: TaskRow[] = [
430
430
  },
431
431
  {
432
432
  id: '23',
433
- taskId: 'T235040491',
433
+ taskId: 'TASK-1023',
434
434
  title: 'Implement webhook retry logic with exponential backoff',
435
435
  subtitle: 'Payment gateway integration',
436
436
  status: 'todo',
@@ -445,7 +445,7 @@ const allTasks: TaskRow[] = [
445
445
  },
446
446
  {
447
447
  id: '24',
448
- taskId: 'T235040492',
448
+ taskId: 'TASK-1024',
449
449
  title: 'Add dark mode support to dashboard',
450
450
  subtitle: '',
451
451
  status: 'backlog',
@@ -460,7 +460,7 @@ const allTasks: TaskRow[] = [
460
460
  },
461
461
  {
462
462
  id: '25',
463
- taskId: 'T235040493',
463
+ taskId: 'TASK-1025',
464
464
  title: 'Create onboarding flow for new team members',
465
465
  subtitle: '',
466
466
  status: 'backlog',
@@ -475,7 +475,7 @@ const allTasks: TaskRow[] = [
475
475
  },
476
476
  {
477
477
  id: '26',
478
- taskId: 'T235040494',
478
+ taskId: 'TASK-1026',
479
479
  title: 'Set up error tracking with Sentry',
480
480
  subtitle: '',
481
481
  status: 'backlog',
@@ -490,7 +490,7 @@ const allTasks: TaskRow[] = [
490
490
  },
491
491
  {
492
492
  id: '27',
493
- taskId: 'T235040495',
493
+ taskId: 'TASK-1027',
494
494
  title: 'Improve search performance with indexing',
495
495
  subtitle: '',
496
496
  status: 'backlog',
@@ -505,7 +505,7 @@ const allTasks: TaskRow[] = [
505
505
  },
506
506
  {
507
507
  id: '28',
508
- taskId: 'T235040496',
508
+ taskId: 'TASK-1028',
509
509
  title: 'Write API documentation for v2 endpoints',
510
510
  subtitle: '',
511
511
  status: 'done',
@@ -520,7 +520,7 @@ const allTasks: TaskRow[] = [
520
520
  },
521
521
  {
522
522
  id: '29',
523
- taskId: 'T235040497',
523
+ taskId: 'TASK-1029',
524
524
  title: 'Set up staging environment',
525
525
  subtitle: '',
526
526
  status: 'done',
@@ -535,7 +535,7 @@ const allTasks: TaskRow[] = [
535
535
  },
536
536
  {
537
537
  id: '30',
538
- taskId: 'T235040498',
538
+ taskId: 'TASK-1030',
539
539
  title: 'Fix flaky end-to-end tests in CI',
540
540
  subtitle: '',
541
541
  status: 'done',
@@ -1785,12 +1785,9 @@ function ComposeWindow({
1785
1785
  hasScrim={false}
1786
1786
  // The Layout below owns the inset; the sheet adds none of its own.
1787
1787
  padding={0}>
1788
- {/* The grab handle floats over the top edge, out of flow, about 12px
1789
- down. The Layout's own padding is not quite enough to clear it — the
1790
- heading came up level with the pill, four pixels under it — so the
1791
- sheet buys the handle its own band of space before the content
1792
- starts. */}
1793
- <VStack paddingBlockStart={3}>
1788
+ {/* The sheet keeps a band under its grab handle at rest, so the Layout
1789
+ starts below the pill without a band of its own. */}
1790
+ <VStack>
1794
1791
  <Layout
1795
1792
  // auto, not fill: the sheet is sized by this Layout now rather than
1796
1793
  // the other way round. `fill` would stretch it to a height that
@@ -394,8 +394,8 @@ export const butterTheme = defineTheme({
394
394
  // Radius intentionally not pinned, so buttons keep core's
395
395
  // `var(--_button-radius, --radius-element)`: standalone buttons stay 8px,
396
396
  // while the chat composer (which sets --_button-radius) rounds them fully.
397
+ // Inline padding only. Button sets its own block padding and height.
397
398
  base: {
398
- paddingBlock: 'var(--spacing-3)',
399
399
  paddingInline: 'var(--spacing-4)',
400
400
  },
401
401
  'variant:secondary': SECONDARY_BUTTON,
@@ -395,6 +395,22 @@ export const gothicTheme = defineTheme({
395
395
  },
396
396
  },
397
397
 
398
+ // Gothic's accent text and icons are one light color. On a media surface
399
+ // they follow that surface's accent, so a dark surface inside a light one
400
+ // gets its light accent back.
401
+ onDark: {
402
+ tokens: {
403
+ '--color-text-accent': 'var(--color-accent)',
404
+ '--color-icon-accent': 'var(--color-accent)',
405
+ },
406
+ },
407
+ onLight: {
408
+ tokens: {
409
+ '--color-text-accent': 'var(--color-accent)',
410
+ '--color-icon-accent': 'var(--color-accent)',
411
+ },
412
+ },
413
+
398
414
  icons: gothicIconRegistry,
399
415
  });
400
416
 
@@ -97,7 +97,7 @@ export const matchaTheme = defineTheme({
97
97
 
98
98
  // Text
99
99
  '--color-text-primary': [neutral.light[20], neutral.dark[75]],
100
- '--color-text-secondary': [neutral.light[40], neutral.dark[60]],
100
+ '--color-text-secondary': [neutral.light[30], neutral.dark[60]],
101
101
  '--color-text-disabled': [neutral.light[75], neutral.dark[30]],
102
102
  '--color-text-accent': [neutral.light[20], neutral.dark[75]],
103
103
  '--color-on-dark': neutral.light[100],
@@ -361,7 +361,13 @@ export const neutralTheme = defineTheme({
361
361
  padding: 'var(--spacing-1)',
362
362
  },
363
363
  },
364
+ // An unselected label sits on the translucent track, which lifts the
365
+ // page under it. In dark mode secondary text falls under 4.5:1 on the
366
+ // track over the surface, so it takes the same next stop.
364
367
  'segmented-control-item': {
368
+ base: {
369
+ '--color-text-secondary': `light-dark(${neutral.light[30]}, ${neutral.dark[80]})`,
370
+ },
365
371
  'size:sm': {
366
372
  height: 'calc(var(--size-element-sm) - 8px)',
367
373
  },
@@ -15,7 +15,7 @@ export const y2kPaletteRefs = {
15
15
  dark: {20: '#2a3600', 65: '#95b041', 75: '#b5d263', 80: '#c5e17a'},
16
16
  },
17
17
  neutral: {
18
- light: {15: '#2d241b', 20: '#382e24', 30: '#4f453b', 40: '#675d52', 80: '#d1c5b8', 85: '#dfd5c9', 90: '#f1e6db', 95: '#fff6ed', 100: '#ffffff'},
18
+ light: {15: '#2d241b', 20: '#382e24', 30: '#4f453b', 35: '#5a5146', 40: '#675d52', 80: '#d1c5b8', 85: '#dfd5c9', 90: '#f1e6db', 95: '#fff6ed', 100: '#ffffff'},
19
19
  dark: {0: '#000000', 5: '#0e0f1a', 10: '#16182b', 20: '#1f2238', 25: '#2c3048', 35: '#4a4f6b', 45: '#636889', 70: '#a6acd6', 85: '#d0d4eb', 90: '#dfe2f3', 95: '#edeffc'},
20
20
  },
21
21
  orange: {
@@ -182,7 +182,7 @@ export const y2kTheme = defineTheme({
182
182
 
183
183
  // Text
184
184
  '--color-text-primary': [neutral.light[15], neutral.dark[95]],
185
- '--color-text-secondary': [neutral.light[40], neutral.dark[70]],
185
+ '--color-text-secondary': [neutral.light[35], neutral.dark[70]],
186
186
  '--color-text-disabled': [neutral.light[80], neutral.dark[35]],
187
187
  '--color-text-accent': [neutral.light[15], neutral.dark[95]],
188
188
  '--color-on-dark': neutral.light[100],
@@ -46,7 +46,7 @@ export const doc = {
46
46
  flag: '--depth <levels>',
47
47
  param: 'options.depth',
48
48
  description:
49
- 'How many levels of the docs tree to read below a namespace: 0 for the namespace alone, 1 for its children (what a read without --depth shows), all for everything below it. With it, --detail sets how much of each doc below shows: brief (one line each, the default), compact (with its sections), or full',
49
+ 'How many levels of the docs tree to read below a namespace: 0 for the namespace alone, 1 for its children (what a read without --depth shows), all for everything below it. On the topic list, where a namespace otherwise lists alone, it names the docs below each one by the route that opens them, one line each. With it on a namespace read, --detail sets how much of each doc below shows: brief (one line each, the default), compact (with its sections), or full; the topic list is one line per doc whatever the detail',
50
50
  },
51
51
  ],
52
52
  examples: [
@@ -56,6 +56,10 @@ export const doc = {
56
56
  {label: 'One section', cli: 'astryx docs theme quick-start'},
57
57
  {label: 'The CLI docs tree', cli: 'astryx docs cli'},
58
58
  {label: 'Every CLI doc, one line each', cli: 'astryx docs cli --depth all'},
59
+ {
60
+ label: 'Every route in the docs tree, one line each',
61
+ cli: 'astryx docs --depth all',
62
+ },
59
63
  {
60
64
  label: 'The integration guides as one read',
61
65
  cli: 'astryx docs authoring --depth all --detail full',
@@ -615,6 +615,32 @@ function summarize(result) {
615
615
 
616
616
  // ─── Command ─────────────────────────────────────────────────────────────────
617
617
 
618
+ /**
619
+ * Every namespace of the list and, where a `--depth` read carried them, the
620
+ * docs below it, in reading order and in one flat list: each row's `topic` is
621
+ * the route that opens it, so the depth of a row never changes how a reader
622
+ * uses it, and each names the package that owns it.
623
+ * @param {Array<import('../../../api/docs/docs.type.mjs').DocsListNamespace | import('../../../api/docs/docs.type.mjs').DocsListChild>} rows
624
+ * @returns {Array<{topic: string, description: string, package: string}>}
625
+ */
626
+ function flattenNamespaces(rows) {
627
+ return rows.flatMap(row => [
628
+ {
629
+ topic: row.topic,
630
+ // An experimental doc is marked here as it is wherever else it is
631
+ // listed, so a reader cannot take a row of this list for a stable doc.
632
+ description:
633
+ 'stability' in row &&
634
+ row.stability === 'experimental' &&
635
+ !/^experimental\b/iu.test(row.description)
636
+ ? `[experimental] ${row.description}`
637
+ : row.description,
638
+ package: row.package,
639
+ },
640
+ ...flattenNamespaces(row.children ?? []),
641
+ ]);
642
+ }
643
+
618
644
  /**
619
645
  * @param {import('commander').Command} program
620
646
  */
@@ -703,8 +729,10 @@ export function registerDocs(program) {
703
729
  // The text view mirrors the JSON list, with the docs tree's
704
730
  // namespaces (`meta.namespaces`) first under their own heading: that
705
731
  // is where the CLI's own docs start, and a namespace reads
706
- // differently from a topic.
707
- const namespaces = result.meta?.namespaces ?? [];
732
+ // differently from a topic. With --depth each branch is flattened
733
+ // into the same list, so every line is a route a reader can pass
734
+ // straight back to `docs`.
735
+ const namespaces = flattenNamespaces(result.meta?.namespaces ?? []);
708
736
  const topics = result.data;
709
737
  emit(
710
738
  ...(namespaces.length > 0
@@ -59,6 +59,20 @@ const defaultVariantText = value =>
59
59
  /** @param {unknown} value */
60
60
  const variantsText = value => (Array.isArray(value) ? value.join('/') : '');
61
61
 
62
+ /**
63
+ * The receipt line for a data file whose `module` the command rewrote after
64
+ * a package rename.
65
+ * @param {{moduleUpdate?: {previous: string, module: string}, dryRun?: boolean}} data
66
+ */
67
+ const moduleUpdateLines = data =>
68
+ data.moduleUpdate
69
+ ? [
70
+ text(
71
+ `${data.dryRun ? '[plan] Would update' : '[ok] Updated'} module to "${data.moduleUpdate.module}" (was "${data.moduleUpdate.previous}"), from the package name in package.json.`,
72
+ ),
73
+ ]
74
+ : [];
75
+
62
76
  /**
63
77
  * Register `icon` and its subcommands under the `experimental` group.
64
78
  * @param {import('commander').Command} group the `experimental` command
@@ -376,20 +390,24 @@ export function registerExperimentalIcon(group, program) {
376
390
  (
377
391
  /** @type {{definition: string, icon: string, previous: string | null}} */ each,
378
392
  ) =>
379
- `${each.definition} = "${each.icon}"${each.previous && each.previous !== each.icon ? ` (was "${each.previous}")` : ''}`,
393
+ `${each.definition} = "${each.icon}"${each.previous === each.icon ? ' (unchanged)' : each.previous ? ` (was "${each.previous}")` : ' (was not mapped)'}`,
380
394
  ),
381
395
  ),
396
+ ...moduleUpdateLines(data),
382
397
  )
383
398
  : emit(
399
+ // The entry line reads `previous` and `icon`: a write can
400
+ // come from a package rename alone.
384
401
  text(
385
402
  data.icon == null
386
- ? data.changed
403
+ ? data.previous != null
387
404
  ? `[ok] Removed map.${data.definition} (was "${data.previous}") from ${data.file}.`
388
405
  : `[ok] ${data.file} has no map.${data.definition}.`
389
- : data.changed
406
+ : data.previous !== data.icon
390
407
  ? `[ok] map.${data.definition} = "${data.icon}" in ${data.file}${data.previous ? ` (was "${data.previous}")` : ''}.`
391
408
  : `[ok] map.${data.definition} is already "${data.icon}".`,
392
409
  ),
410
+ ...moduleUpdateLines(data),
393
411
  ),
394
412
  ),
395
413
  });
@@ -430,6 +448,7 @@ export function registerExperimentalIcon(group, program) {
430
448
  text(
431
449
  `[ok] ${data.variant}: ${data.added} icons gained it${data.already > 0 ? `, ${data.already} already had it` : ''}, read from ${data.from}.`,
432
450
  ),
451
+ ...moduleUpdateLines(data),
433
452
  ...(data.files.length > 0 ? [list(data.files)] : []),
434
453
  ...(data.missing.length > 0
435
454
  ? [
@@ -488,10 +507,11 @@ export function registerExperimentalIcon(group, program) {
488
507
  const {data} = result;
489
508
  emit(
490
509
  text(
491
- data.changed
510
+ data.added
492
511
  ? `[ok] Added ${data.icon.export} as "${data.icon.id}"${data.variant ? ` (variant ${data.variant})` : ''}${data.definition ? `, map.${data.definition} = "${data.icon.id}"` : ''}.`
493
512
  : `[ok] ${data.icon.export} is already "${data.icon.id}"${data.definition ? ` and map.${data.definition} names it` : ''}.`,
494
513
  ),
514
+ ...moduleUpdateLines(data),
495
515
  ...(data.files.length > 0 ? [list(data.files)] : []),
496
516
  ...(data.note ? [text(`[next] ${data.note}`)] : []),
497
517
  );
@@ -543,6 +563,7 @@ export function registerExperimentalIcon(group, program) {
543
563
  : `The experimental.iconSets root ${root.path} in ${manifest} is unchanged.`
544
564
  : `${dryRun ? 'Would update' : 'Updated'} ${manifest}.`,
545
565
  ),
566
+ ...moduleUpdateLines(data),
546
567
  ...(files.length > 0 ? [list(files)] : []),
547
568
  // What to do next comes before the long lists, so it never scrolls
548
569
  // away.
@@ -53,7 +53,7 @@ export const doc = {
53
53
  {code: 0, when: 'the file was written (warnings included)'},
54
54
  {
55
55
  code: 1,
56
- when: 'no file, a wrong extension, a missing file, a page that does not compile, has no default export, imports a package that is not installed, reads a browser API while rendering, throws, or takes over 60 seconds; a file to write outside the current folder; with --reverse, an existing output without --overwrite, a damaged embedded source, or HTML that is not an Astryx page',
56
+ when: 'no file, a wrong extension, a missing file, a page that does not compile, has no default export, imports a package that is not installed, reads a browser API while rendering, throws, crashes Node, or takes over 60 seconds; a file to write outside the current folder; with --reverse, an existing output without --overwrite, a damaged embedded source, or HTML that is not an Astryx page',
57
57
  },
58
58
  ],
59
59
  related: ['template', 'build'],