@astryxdesign/cli 0.1.2-canary.36e7b07 → 0.1.2-canary.39ed50d

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 (135) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/README.md +55 -49
  3. package/package.json +7 -7
  4. package/src/api/doctor.mjs +3 -3
  5. package/src/codemods/transforms/{v0.1.0 → v0.0.15}/drop-xds-prefix-imports.mjs +4 -15
  6. package/src/codemods/transforms/v0.0.15/index.mjs +13 -0
  7. package/src/codemods/transforms/v0.1.0/index.mjs +0 -46
  8. package/src/commands/agent-docs.mjs +1 -1
  9. package/templates/blocks/components/DropdownMenu/DropdownMenuShowcase.tsx +6 -0
  10. package/templates/blocks/components/DropdownMenuItem/DropdownMenuItemShowcase.tsx +5 -1
  11. package/templates/blocks/components/HoverCard/HoverCardInteractiveContent.doc.mjs +1 -1
  12. package/templates/blocks/components/HoverCard/HoverCardInteractiveContent.tsx +4 -9
  13. package/templates/blocks/components/Lightbox/LightboxShowcase.tsx +3 -4
  14. package/templates/blocks/components/MoreMenu/MoreMenuShowcase.tsx +6 -0
  15. package/templates/blocks/components/TreeListBranches/TreeListBranchesShowcase.doc.mjs +14 -0
  16. package/templates/blocks/components/TreeListBranches/TreeListBranchesShowcase.tsx +64 -0
  17. package/templates/blocks/components/TreeListItem/TreeListItemShowcase.doc.mjs +14 -0
  18. package/templates/blocks/components/TreeListItem/TreeListItemShowcase.tsx +60 -0
  19. package/templates/pages/shell-side-nav/page.tsx +1 -0
  20. package/src/codemods/transforms/v0.1.0/__tests__/migrate-xds-css-surfaces.test.mjs +0 -67
  21. package/src/codemods/transforms/v0.1.0/__tests__/migrate-xds-declare-module.test.mjs +0 -61
  22. package/src/codemods/transforms/v0.1.0/__tests__/v0.1.0-ordering.test.mjs +0 -104
  23. package/src/codemods/transforms/v0.1.0/migrate-xds-css-surfaces.mjs +0 -77
  24. package/src/codemods/transforms/v0.1.0/migrate-xds-declare-module.mjs +0 -78
  25. package/templates/blocks/components/AvatarStatusDot/AvatarStatusDotVariants.doc.mjs +0 -14
  26. package/templates/blocks/components/AvatarStatusDot/AvatarStatusDotVariants.tsx +0 -28
  27. package/templates/blocks/components/Blockquote/BlockquoteTestimonials.doc.mjs +0 -14
  28. package/templates/blocks/components/Blockquote/BlockquoteTestimonials.tsx +0 -34
  29. package/templates/blocks/components/Blockquote/BlockquoteWithCite.doc.mjs +0 -14
  30. package/templates/blocks/components/Blockquote/BlockquoteWithCite.tsx +0 -21
  31. package/templates/blocks/components/BreadcrumbItem/BreadcrumbItemBasic.doc.mjs +0 -14
  32. package/templates/blocks/components/BreadcrumbItem/BreadcrumbItemBasic.tsx +0 -15
  33. package/templates/blocks/components/ButtonGroup/ButtonGroupBasic.doc.mjs +0 -14
  34. package/templates/blocks/components/ButtonGroup/ButtonGroupBasic.tsx +0 -16
  35. package/templates/blocks/components/ChatDictationButton/ChatDictationButtonBasic.doc.mjs +0 -19
  36. package/templates/blocks/components/ChatDictationButton/ChatDictationButtonBasic.tsx +0 -34
  37. package/templates/blocks/components/CheckboxListItem/CheckboxListItemBasic.doc.mjs +0 -14
  38. package/templates/blocks/components/CheckboxListItem/CheckboxListItemBasic.tsx +0 -30
  39. package/templates/blocks/components/CollapsibleGroup/CollapsibleGroupAccordion.doc.mjs +0 -14
  40. package/templates/blocks/components/CollapsibleGroup/CollapsibleGroupAccordion.tsx +0 -31
  41. package/templates/blocks/components/CommandPaletteEmpty/CommandPaletteEmptyBasic.doc.mjs +0 -14
  42. package/templates/blocks/components/CommandPaletteEmpty/CommandPaletteEmptyBasic.tsx +0 -26
  43. package/templates/blocks/components/CommandPaletteFooter/CommandPaletteFooterBasic.doc.mjs +0 -14
  44. package/templates/blocks/components/CommandPaletteFooter/CommandPaletteFooterBasic.tsx +0 -32
  45. package/templates/blocks/components/CommandPaletteGroup/CommandPaletteGroupBasic.doc.mjs +0 -18
  46. package/templates/blocks/components/CommandPaletteGroup/CommandPaletteGroupBasic.tsx +0 -32
  47. package/templates/blocks/components/CommandPaletteItem/CommandPaletteItemBasic.doc.mjs +0 -14
  48. package/templates/blocks/components/CommandPaletteItem/CommandPaletteItemBasic.tsx +0 -27
  49. package/templates/blocks/components/ContextMenu/ContextMenuBasic.doc.mjs +0 -14
  50. package/templates/blocks/components/ContextMenu/ContextMenuBasic.tsx +0 -32
  51. package/templates/blocks/components/DateRangeInput/DateRangeInputWithPresets.doc.mjs +0 -14
  52. package/templates/blocks/components/DateRangeInput/DateRangeInputWithPresets.tsx +0 -46
  53. package/templates/blocks/components/DateRangeInput/DateRangeInputWithValidation.doc.mjs +0 -14
  54. package/templates/blocks/components/DateRangeInput/DateRangeInputWithValidation.tsx +0 -52
  55. package/templates/blocks/components/DateTimeInput/DateTimeInputWithValidation.doc.mjs +0 -14
  56. package/templates/blocks/components/DateTimeInput/DateTimeInputWithValidation.tsx +0 -43
  57. package/templates/blocks/components/DialogHeader/DialogHeaderBasic.doc.mjs +0 -14
  58. package/templates/blocks/components/DialogHeader/DialogHeaderBasic.tsx +0 -30
  59. package/templates/blocks/components/DropdownMenuItem/DropdownMenuItemBasic.doc.mjs +0 -14
  60. package/templates/blocks/components/DropdownMenuItem/DropdownMenuItemBasic.tsx +0 -27
  61. package/templates/blocks/components/FieldLabel/FieldLabelBasic.doc.mjs +0 -14
  62. package/templates/blocks/components/FieldLabel/FieldLabelBasic.tsx +0 -20
  63. package/templates/blocks/components/FieldStatus/FieldStatusBasic.doc.mjs +0 -14
  64. package/templates/blocks/components/FieldStatus/FieldStatusBasic.tsx +0 -23
  65. package/templates/blocks/components/FileInput/FileInputBasic.doc.mjs +0 -14
  66. package/templates/blocks/components/FileInput/FileInputBasic.tsx +0 -22
  67. package/templates/blocks/components/GridSpan/GridSpanColumns.doc.mjs +0 -14
  68. package/templates/blocks/components/GridSpan/GridSpanColumns.tsx +0 -38
  69. package/templates/blocks/components/HStack/HStackBasic.doc.mjs +0 -14
  70. package/templates/blocks/components/HStack/HStackBasic.tsx +0 -16
  71. package/templates/blocks/components/Hooks/useKeyboardHintHookUsage.doc.mjs +0 -14
  72. package/templates/blocks/components/Hooks/useKeyboardHintHookUsage.tsx +0 -57
  73. package/templates/blocks/components/InputGroup/InputGroupBasic.doc.mjs +0 -14
  74. package/templates/blocks/components/InputGroup/InputGroupBasic.tsx +0 -27
  75. package/templates/blocks/components/LayoutContent/LayoutContentBasic.doc.mjs +0 -23
  76. package/templates/blocks/components/LayoutContent/LayoutContentBasic.tsx +0 -40
  77. package/templates/blocks/components/LayoutFooter/LayoutFooterActions.doc.mjs +0 -22
  78. package/templates/blocks/components/LayoutFooter/LayoutFooterActions.tsx +0 -41
  79. package/templates/blocks/components/LayoutHeader/LayoutHeaderWithActions.doc.mjs +0 -23
  80. package/templates/blocks/components/LayoutHeader/LayoutHeaderWithActions.tsx +0 -40
  81. package/templates/blocks/components/LayoutPanel/LayoutPanelNavigation.doc.mjs +0 -22
  82. package/templates/blocks/components/LayoutPanel/LayoutPanelNavigation.tsx +0 -37
  83. package/templates/blocks/components/Lightbox/LightboxGallery.doc.mjs +0 -14
  84. package/templates/blocks/components/Lightbox/LightboxGallery.tsx +0 -53
  85. package/templates/blocks/components/Lightbox/LightboxVideo.doc.mjs +0 -14
  86. package/templates/blocks/components/Lightbox/LightboxVideo.tsx +0 -27
  87. package/templates/blocks/components/Lightbox/LightboxZoom.doc.mjs +0 -14
  88. package/templates/blocks/components/Lightbox/LightboxZoom.tsx +0 -33
  89. package/templates/blocks/components/MetadataListItem/MetadataListItemBasic.doc.mjs +0 -14
  90. package/templates/blocks/components/MetadataListItem/MetadataListItemBasic.tsx +0 -19
  91. package/templates/blocks/components/MobileNavToggle/MobileNavToggleBasic.doc.mjs +0 -23
  92. package/templates/blocks/components/MobileNavToggle/MobileNavToggleBasic.tsx +0 -42
  93. package/templates/blocks/components/NavIcon/NavIconBasic.doc.mjs +0 -14
  94. package/templates/blocks/components/NavIcon/NavIconBasic.tsx +0 -16
  95. package/templates/blocks/components/RadioListItem/RadioListItemBasic.doc.mjs +0 -14
  96. package/templates/blocks/components/RadioListItem/RadioListItemBasic.tsx +0 -30
  97. package/templates/blocks/components/Resizable/ResizableSidebar.doc.mjs +0 -25
  98. package/templates/blocks/components/Resizable/ResizableSidebar.tsx +0 -67
  99. package/templates/blocks/components/SegmentedControlItem/SegmentedControlItemBasic.doc.mjs +0 -14
  100. package/templates/blocks/components/SegmentedControlItem/SegmentedControlItemBasic.tsx +0 -21
  101. package/templates/blocks/components/SelectorOption/SelectorOptionBasic.doc.mjs +0 -14
  102. package/templates/blocks/components/SelectorOption/SelectorOptionBasic.tsx +0 -39
  103. package/templates/blocks/components/SideNavCollapseButton/SideNavCollapseButtonBasic.doc.mjs +0 -14
  104. package/templates/blocks/components/SideNavCollapseButton/SideNavCollapseButtonBasic.tsx +0 -55
  105. package/templates/blocks/components/SideNavHeading/SideNavHeadingBasic.doc.mjs +0 -14
  106. package/templates/blocks/components/SideNavHeading/SideNavHeadingBasic.tsx +0 -38
  107. package/templates/blocks/components/SideNavItem/SideNavItemBasic.doc.mjs +0 -14
  108. package/templates/blocks/components/SideNavItem/SideNavItemBasic.tsx +0 -49
  109. package/templates/blocks/components/SideNavSection/SideNavSectionBasic.doc.mjs +0 -14
  110. package/templates/blocks/components/SideNavSection/SideNavSectionBasic.tsx +0 -71
  111. package/templates/blocks/components/StackItem/StackItemFill.doc.mjs +0 -14
  112. package/templates/blocks/components/StackItem/StackItemFill.tsx +0 -28
  113. package/templates/blocks/components/Tab/TabWithSelectedIcon.doc.mjs +0 -13
  114. package/templates/blocks/components/Tab/TabWithSelectedIcon.tsx +0 -39
  115. package/templates/blocks/components/TabMenu/TabMenuBasic.doc.mjs +0 -14
  116. package/templates/blocks/components/TabMenu/TabMenuBasic.tsx +0 -23
  117. package/templates/blocks/components/ToggleButtonGroup/ToggleButtonGroupVertical.doc.mjs +0 -14
  118. package/templates/blocks/components/ToggleButtonGroup/ToggleButtonGroupVertical.tsx +0 -47
  119. package/templates/blocks/components/TopNavHeading/TopNavHeadingBasic.doc.mjs +0 -14
  120. package/templates/blocks/components/TopNavHeading/TopNavHeadingBasic.tsx +0 -22
  121. package/templates/blocks/components/TopNavItem/TopNavItemBasic.doc.mjs +0 -14
  122. package/templates/blocks/components/TopNavItem/TopNavItemBasic.tsx +0 -21
  123. package/templates/blocks/components/TopNavMegaMenu/TopNavMegaMenuBasic.doc.mjs +0 -20
  124. package/templates/blocks/components/TopNavMegaMenu/TopNavMegaMenuBasic.tsx +0 -46
  125. package/templates/blocks/components/TopNavMegaMenuFeaturedCard/TopNavMegaMenuFeaturedCardBasic.doc.mjs +0 -14
  126. package/templates/blocks/components/TopNavMegaMenuFeaturedCard/TopNavMegaMenuFeaturedCardBasic.tsx +0 -16
  127. package/templates/blocks/components/TopNavMegaMenuItem/TopNavMegaMenuItemBasic.doc.mjs +0 -14
  128. package/templates/blocks/components/TopNavMegaMenuItem/TopNavMegaMenuItemBasic.tsx +0 -26
  129. package/templates/blocks/components/TopNavMenu/TopNavMenuBasic.doc.mjs +0 -14
  130. package/templates/blocks/components/TopNavMenu/TopNavMenuBasic.tsx +0 -43
  131. package/templates/blocks/components/TypeaheadItem/TypeaheadItemBasic.doc.mjs +0 -14
  132. package/templates/blocks/components/TypeaheadItem/TypeaheadItemBasic.tsx +0 -43
  133. package/templates/blocks/components/VStack/VStackBasic.doc.mjs +0 -14
  134. package/templates/blocks/components/VStack/VStackBasic.tsx +0 -20
  135. /package/src/codemods/transforms/{v0.1.0 → v0.0.15}/__tests__/drop-xds-prefix-imports.test.mjs +0 -0
package/CHANGELOG.md CHANGED
@@ -110,6 +110,7 @@ Thanks to everyone who contributed to this release:
110
110
  Thanks to everyone who contributed to this release:
111
111
 
112
112
  - @ejhammond
113
+ - @joeyfarina
113
114
  - @josephfarina
114
115
  - @nynexman4464
115
116
 
package/README.md CHANGED
@@ -62,7 +62,8 @@ Options:
62
62
  | `upgrade` | Run codemods to migrate between versions |
63
63
  | `theme build` | Compile a defineTheme file to production CSS and JS |
64
64
  | `discover` | Discover external packages and components |
65
- | `doctor` | Diagnose your Astryx setup and report problems with fixes (CI-friendly via exit code) |
65
+ | `gap-report` | Report a gap when a component doesn't meet your needs |
66
+ | `doctor` | Diagnose your XDS setup and report problems with fixes (CI-friendly via exit code) |
66
67
 
67
68
  ### Global options
68
69
 
@@ -160,6 +161,7 @@ if (isError(result)) {
160
161
  | `ERR_INVALID_VERSION` | A `--from`/`--to` value was not a valid semver string. |
161
162
  | `ERR_DEP_MISSING` | A required external dependency (e.g. jscodeshift) is missing. |
162
163
  | `ERR_GH_CLI` | GitHub CLI (`gh`) is not installed or not authenticated. |
164
+ | `ERR_GAP_REPORT_FAILED` | Filing a gap report failed (disabled, or the integration errored). |
163
165
 
164
166
  ## Capability manifest (agent discovery)
165
167
 
@@ -170,7 +172,7 @@ discriminators each command can emit. Think of it as an OpenAPI spec for the CLI
170
172
 
171
173
  ```bash
172
174
  astryx manifest --json # dedicated surface — type: "manifest"
173
- astryx --json # bare invocation — embeds the same payload under data.manifest
175
+ xds --json # bare invocation — embeds the same payload under data.manifest
174
176
  ```
175
177
 
176
178
  Shape:
@@ -180,7 +182,7 @@ Shape:
180
182
  "apiVersion": 1,
181
183
  "type": "manifest",
182
184
  "data": {
183
- "name": "astryx",
185
+ "name": "xds",
184
186
  "version": "0.0.14",
185
187
  "description": "Design system CLI — components, themes, and tooling",
186
188
  "globalOptions": [
@@ -247,14 +249,14 @@ the `JSON_SUPPORTED` allowlist and a small declarative `RESPONSE_TYPES` map in
247
249
  `src/lib/manifest.mjs`, guarded by a drift test (`manifest.test.mjs`) so adding a
248
250
  command without describing it fails CI.
249
251
 
250
- **Backwards-compat:** the bare `astryx --json` envelope keeps `type: "help"` and its
252
+ **Backwards-compat:** the bare `xds --json` envelope keeps `type: "help"` and its
251
253
  original shallow fields (`name`, `version`, `commands` as a `string[]` of names,
252
254
  `jsonSupported`); the full structured manifest is additive under `data.manifest`.
253
255
  For the standalone manifest envelope (`type: "manifest"`), use `astryx manifest --json`.
254
256
 
255
257
  ## Programmatic API
256
258
 
257
- The same logic that powers `astryx --json` is available as importable, type-safe functions:
259
+ The same logic that powers `xds --json` is available as importable, type-safe functions:
258
260
 
259
261
  ```typescript
260
262
  import {
@@ -267,20 +269,20 @@ import {
267
269
  AstryxError,
268
270
  } from '@astryxdesign/cli/api';
269
271
 
270
- // Same result as: astryx --json component Button
272
+ // Same result as: xds --json component Button
271
273
  const btn = await component('Button');
272
274
  btn.type; // 'component.detail'
273
275
  btn.data.name; // 'Button' (typed as ComponentDoc)
274
276
 
275
- // Same result as: astryx --json component --list
277
+ // Same result as: xds --json component --list
276
278
  const list = await component(undefined, {list: true});
277
279
  list.data; // Record<string, string[]>
278
280
 
279
- // Same result as: astryx --json docs principles
281
+ // Same result as: xds --json docs principles
280
282
  const principles = await docs('principles');
281
- principles.data.title; // 'Principles'
283
+ principles.data.title; // 'XDS Principles'
282
284
 
283
- // Same result as: astryx --json hook useMediaQuery
285
+ // Same result as: xds --json hook useMediaQuery
284
286
  const useMediaQuery = await hook('useMediaQuery');
285
287
  useMediaQuery.data.params; // typed as HookParamDoc[]
286
288
 
@@ -294,7 +296,7 @@ try {
294
296
  }
295
297
  ```
296
298
 
297
- The CLI command handlers are thin wrappers around these functions: they parse args, call the API, then format the output (JSON or text). This guarantees that `@astryxdesign/cli/api` and `astryx --json` always return identical data.
299
+ The CLI command handlers are thin wrappers around these functions: they parse args, call the API, then format the output (JSON or text). This guarantees that `@astryxdesign/cli/api` and `xds --json` always return identical data.
298
300
 
299
301
  ### Consumer utilities
300
302
 
@@ -324,41 +326,43 @@ detail.data.name; // already narrowed
324
326
 
325
327
  Every response has a `type` string that uniquely identifies it:
326
328
 
327
- | Command | Type | Response |
328
- | ------------------------------------------------- | --------------------------- | --------------------------------- |
329
- | `astryx --json component [--list]` | `component.list` | `ComponentListResponse` |
330
- | `astryx --json component --list --detail compact` | `component.brief` | `ComponentBriefResponse` |
331
- | `astryx --json component --list --detail full` | `component.full` | `ComponentFullResponse` |
332
- | `astryx --json component <name>` | `component.detail` | `ComponentDetailResponse` |
333
- | `astryx --json component <name> --props` | `component.detail.props` | `ComponentDetailPropsResponse` |
334
- | `astryx --json component <name> --source` | `component.detail.source` | `ComponentDetailSourceResponse` |
335
- | `astryx --json component <name> --showcase` | `component.detail.showcase` | `ComponentDetailShowcaseResponse` |
336
- | `astryx --json component <name> --blocks` | `component.detail.blocks` | `ComponentDetailBlocksResponse` |
337
- | `astryx --json discover` | `discover.list` | `DiscoverListResponse` |
338
- | `astryx --json discover @scope/name` | `discover.detail` | `DiscoverDetailResponse` |
339
- | `astryx --json discover @scope/name/Comp` | `discover.detail.doc` | `DiscoverDetailDocResponse` |
340
- | `astryx --json discover <search>` | `discover.search` | `DiscoverSearchResponse` |
341
- | `astryx --json docs` | `docs.list` | `DocsListResponse` |
342
- | `astryx --json docs <topic>` | `docs.detail` | `DocsDetailResponse` |
343
- | `astryx --json docs <topic> <section>` | `docs.detail.section` | `DocsDetailSectionResponse` |
344
- | `astryx --json template [--list]` | `template.list` | `TemplateListResponse` |
345
- | `astryx --json template <name>` | `template.show` | `TemplateShowResponse` |
346
- | `astryx --json template <name> --skeleton` | `template.skeleton` | `TemplateSkeletonResponse` |
347
- | `astryx --json template <name> [path]` | `template.copy` | `TemplateCopyResponse` |
348
- | `astryx --json hook [--list]` | `hook.list` | `HookListResponse` |
349
- | `astryx --json hook --list --detail compact` | `hook.brief` | `HookBriefResponse` |
350
- | `astryx --json hook --list --detail full` | `hook.full` | `HookFullResponse` |
351
- | `astryx --json hook <name>` | `hook.detail` | `HookDetailResponse` |
352
- | `astryx --json hook <name> --params` | `hook.detail.params` | `HookDetailParamsResponse` |
353
- | `astryx --json search <query>` | `search` | `SearchResponse` |
354
- | `astryx --json swizzle [--list]` | `swizzle.list` | `SwizzleListResponse` |
355
- | `astryx --json swizzle <component>` | `swizzle.copy` | `SwizzleCopyResponse` |
356
- | `astryx --json theme build <file>` | `theme.build` | `ThemeBuildResponse` |
357
- | `astryx --json upgrade --list` | `upgrade.list` | `UpgradeListResponse` |
358
- | `astryx --json upgrade [--apply]` | `upgrade.run` | `UpgradeRunResponse` |
359
- | `astryx --json doctor` | `doctor` | `DoctorResponse` |
360
- | any error | — | `CLIError` |
361
- | unsupported command | — | `CLIUnsupportedError` |
329
+ | Command | Type | Response |
330
+ | ---------------------------------------------- | --------------------------- | --------------------------------- |
331
+ | `xds --json component [--list]` | `component.list` | `ComponentListResponse` |
332
+ | `xds --json component --list --detail compact` | `component.brief` | `ComponentBriefResponse` |
333
+ | `xds --json component --list --detail full` | `component.full` | `ComponentFullResponse` |
334
+ | `xds --json component <name>` | `component.detail` | `ComponentDetailResponse` |
335
+ | `xds --json component <name> --props` | `component.detail.props` | `ComponentDetailPropsResponse` |
336
+ | `xds --json component <name> --source` | `component.detail.source` | `ComponentDetailSourceResponse` |
337
+ | `xds --json component <name> --showcase` | `component.detail.showcase` | `ComponentDetailShowcaseResponse` |
338
+ | `xds --json component <name> --blocks` | `component.detail.blocks` | `ComponentDetailBlocksResponse` |
339
+ | `xds --json discover` | `discover.list` | `DiscoverListResponse` |
340
+ | `xds --json discover @scope/name` | `discover.detail` | `DiscoverDetailResponse` |
341
+ | `xds --json discover @scope/name/Comp` | `discover.detail.doc` | `DiscoverDetailDocResponse` |
342
+ | `xds --json discover <search>` | `discover.search` | `DiscoverSearchResponse` |
343
+ | `xds --json docs` | `docs.list` | `DocsListResponse` |
344
+ | `xds --json docs <topic>` | `docs.detail` | `DocsDetailResponse` |
345
+ | `xds --json docs <topic> <section>` | `docs.detail.section` | `DocsDetailSectionResponse` |
346
+ | `xds --json template [--list]` | `template.list` | `TemplateListResponse` |
347
+ | `xds --json template <name>` | `template.show` | `TemplateShowResponse` |
348
+ | `xds --json template <name> --skeleton` | `template.skeleton` | `TemplateSkeletonResponse` |
349
+ | `xds --json template <name> [path]` | `template.copy` | `TemplateCopyResponse` |
350
+ | `xds --json hook [--list]` | `hook.list` | `HookListResponse` |
351
+ | `xds --json hook --list --detail compact` | `hook.brief` | `HookBriefResponse` |
352
+ | `xds --json hook --list --detail full` | `hook.full` | `HookFullResponse` |
353
+ | `xds --json hook <name>` | `hook.detail` | `HookDetailResponse` |
354
+ | `xds --json hook <name> --params` | `hook.detail.params` | `HookDetailParamsResponse` |
355
+ | `xds --json search <query>` | `search` | `SearchResponse` |
356
+ | `xds --json swizzle [--list]` | `swizzle.list` | `SwizzleListResponse` |
357
+ | `xds --json swizzle <component>` | `swizzle.copy` | `SwizzleCopyResponse` |
358
+ | `xds --json theme build <file>` | `theme.build` | `ThemeBuildResponse` |
359
+ | `xds --json upgrade --list` | `upgrade.list` | `UpgradeListResponse` |
360
+ | `xds --json upgrade [--apply]` | `upgrade.run` | `UpgradeRunResponse` |
361
+ | `xds --json gap-report --list-categories` | `gap-report.categories` | `GapReportCategoriesResponse` |
362
+ | `xds --json gap-report --component X ...` | `gap-report.file` | `GapReportFileResponse` |
363
+ | `xds --json doctor` | `doctor` | `DoctorResponse` |
364
+ | any error | — | `CLIError` |
365
+ | unsupported command | — | `CLIUnsupportedError` |
362
366
 
363
367
  ## Doctor
364
368
 
@@ -379,7 +383,7 @@ astryx doctor — diagnosing your setup
379
383
  @astryxdesign/core v0.0.14 is in step with @astryxdesign/cli v0.0.14.
380
384
  ⚠ Theme packages
381
385
  No @astryxdesign/theme-* packages are installed.
382
- → fix: Install a theme, e.g. `npm install @astryxdesign/theme-neutral`, then import its CSS or set astryx.theme.
386
+ → fix: Install a theme, e.g. `npm install @astryxdesign/theme-neutral`, then import its CSS or set xds.theme.
383
387
  ℹ astryx.config.mjs
384
388
  No astryx.config.mjs found — using defaults.
385
389
  ℹ AI agent docs
@@ -404,7 +408,7 @@ No failures — but review the ⚠ warnings above when you can.
404
408
  | Version alignment | pass / warn / info | Installed `@astryxdesign/core` is in step with `@astryxdesign/cli` |
405
409
  | Theme packages | pass / warn | An `@astryxdesign/theme-*` package is installed and a theme is wired |
406
410
  | astryx.config.mjs | pass / fail / info | Config (if present) loads cleanly with a valid shape |
407
- | AI agent docs | pass / warn / info | Agent docs exist and contain the Astryx section markers |
411
+ | AI agent docs | pass / warn / info | Agent docs exist and contain the XDS section markers |
408
412
  | Peer dependencies | pass / warn / info | `@astryxdesign/core`'s peer deps (react, …) are installed |
409
413
  | Package manager | info | Reports the detected package manager |
410
414
 
@@ -430,6 +434,8 @@ export default {
430
434
  templates: {
431
435
  get: async id => fetchTemplateFromAPI(id),
432
436
  },
433
- issuesUrl: 'https://github.com/your-org/your-repo/issues',
437
+ gapReport: {
438
+ url: 'https://your-api.com/gaps',
439
+ },
434
440
  };
435
441
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astryxdesign/cli",
3
- "version": "0.1.2-canary.36e7b07",
3
+ "version": "0.1.2-canary.39ed50d",
4
4
  "displayName": "CLI",
5
5
  "description": "Scaffold projects, browse templates, generate themes, and get agent-ready docs from the command line.",
6
6
  "author": "Meta Open Source",
@@ -75,9 +75,9 @@
75
75
  "zod": "^4.4.3"
76
76
  },
77
77
  "peerDependencies": {
78
- "@astryxdesign/core": "0.1.2-canary.36e7b07",
79
- "@astryxdesign/lab": "0.1.2-canary.36e7b07",
80
- "@astryxdesign/theme-neutral": "0.1.2-canary.36e7b07",
78
+ "@astryxdesign/core": "0.1.2-canary.39ed50d",
79
+ "@astryxdesign/lab": "0.1.2-canary.39ed50d",
80
+ "@astryxdesign/theme-neutral": "0.1.2-canary.39ed50d",
81
81
  "gpt-tokenizer": "^2.0.0"
82
82
  },
83
83
  "peerDependenciesMeta": {
@@ -92,9 +92,9 @@
92
92
  }
93
93
  },
94
94
  "devDependencies": {
95
- "@astryxdesign/core": "0.1.2-canary.36e7b07",
96
- "@astryxdesign/lab": "0.1.2-canary.36e7b07",
97
- "@astryxdesign/theme-neutral": "0.1.2-canary.36e7b07",
95
+ "@astryxdesign/core": "0.1.2-canary.39ed50d",
96
+ "@astryxdesign/lab": "0.1.2-canary.39ed50d",
97
+ "@astryxdesign/theme-neutral": "0.1.2-canary.39ed50d",
98
98
  "gpt-tokenizer": "^2.0.0"
99
99
  },
100
100
  "scripts": {
@@ -240,7 +240,7 @@ export function checkThemes(ctx) {
240
240
  label: 'Theme packages',
241
241
  status: 'warn',
242
242
  message: 'No @astryxdesign/theme-* packages are installed.',
243
- fix: 'Install a theme, e.g. `npm install @astryxdesign/theme-neutral`, then import its CSS or set astryx.theme.',
243
+ fix: 'Install a theme, e.g. `npm install @astryxdesign/theme-neutral`, then import its CSS or set xds.theme.',
244
244
  };
245
245
  }
246
246
 
@@ -354,7 +354,7 @@ export function checkAgentDocs(ctx) {
354
354
  label: 'AI agent docs',
355
355
  status: 'warn',
356
356
  message: `Agent docs present (${present.join(', ')}) but no Astryx section markers found.`,
357
- fix: 'Add the Astryx section to your agent docs with `astryx init --features agents`.',
357
+ fix: 'Add the XDS section to your agent docs with `astryx init --features agents`.',
358
358
  };
359
359
  }
360
360
 
@@ -362,7 +362,7 @@ export function checkAgentDocs(ctx) {
362
362
  id: 'agent-docs',
363
363
  label: 'AI agent docs',
364
364
  status: 'pass',
365
- message: `Astryx agent docs section present in ${withMarkers.join(', ')}.`,
365
+ message: `XDS agent docs section present in ${withMarkers.join(', ')}.`,
366
366
  };
367
367
  }
368
368
 
@@ -4,23 +4,12 @@
4
4
  * @file Codemod: Drop the `XDS` prefix from @xds/core imports and their usages
5
5
  *
6
6
  * Part of the XDS-prefix migration (P2380608025). Rewrites consumer code from
7
- * the prefixed names to their bare equivalents:
7
+ * the prefixed names to the bare compatibility aliases shipped in P1:
8
8
  *
9
9
  * XDSButton -> Button
10
10
  * XDSButtonProps -> ButtonProps
11
11
  * useXDSTheme -> useTheme
12
12
  * useXDSToast -> useToast
13
- * XDSIconRegistry-> IconRegistry
14
- *
15
- * Mandatory in v0.1.0: the prefixed compatibility aliases (which made both
16
- * prefixed and bare names valid during the 0.0.x compat window) were dropped
17
- * in v0.1.0, so the un-prefixing is now required for code to keep type-
18
- * checking against @astryxdesign/core.
19
- *
20
- * Ordering: within the v0.1.0 manifest this runs BEFORE
21
- * migrate-xds-module-specifiers so it still matches `@xds/core` imports (its
22
- * source matcher) and un-prefixes the identifiers first; the specifier codemod
23
- * then rewrites the module paths `@xds/*` -> `@astryxdesign/*`.
24
13
  *
25
14
  * Safety: this codemod ONLY renames identifiers that are imported from
26
15
  * `@xds/core` (bare or subpath, e.g. `@xds/core/Button`). It tracks the local
@@ -47,9 +36,9 @@ export const meta = {
47
36
  title: 'Drop XDS prefix from @xds/core imports (XDSButton -> Button)',
48
37
  description:
49
38
  'Rewrites @xds/core imports and their usages from the prefixed names ' +
50
- '(XDSButton, useXDSTheme, XDSIconRegistry, XDSButtonProps) to their bare ' +
51
- 'names (Button, useTheme, IconRegistry, ButtonProps). Only renames ' +
52
- 'bindings imported from @xds/core, leaving unrelated identifiers untouched.',
39
+ '(XDSButton, useXDSTheme, XDSButtonProps) to the bare compatibility ' +
40
+ 'aliases (Button, useTheme, ButtonProps). Only renames bindings imported ' +
41
+ 'from @xds/core, leaving unrelated identifiers untouched.',
53
42
  pr: '#2880',
54
43
  };
55
44
 
@@ -34,6 +34,10 @@ import migrateSelectorChildrenToRenderOption, {
34
34
  meta as migrateSelectorChildrenToRenderOptionMeta,
35
35
  } from './migrate-selector-children-to-render-option.mjs';
36
36
 
37
+ import dropXdsPrefixImports, {
38
+ meta as dropXdsPrefixImportsMeta,
39
+ } from './drop-xds-prefix-imports.mjs';
40
+
37
41
  export default [
38
42
  {
39
43
  name: 'rename-date-picker-to-input',
@@ -71,4 +75,13 @@ export default [
71
75
  transform: migrateSelectorChildrenToRenderOption,
72
76
  meta: migrateSelectorChildrenToRenderOptionMeta,
73
77
  },
78
+ {
79
+ // XDS-prefix migration (P2380608025). Optional + not tied to a version
80
+ // bump: consumers run it explicitly during their migration, e.g.
81
+ // astryx upgrade --codemod drop-xds-prefix-imports --codemod-only --apply
82
+ name: 'drop-xds-prefix-imports',
83
+ transform: dropXdsPrefixImports,
84
+ meta: dropXdsPrefixImportsMeta,
85
+ optional: true,
86
+ },
74
87
  ];
@@ -6,60 +6,14 @@
6
6
  * Lists all codemods for the v0.1.0 release in the order they should run.
7
7
  */
8
8
 
9
- import dropXdsPrefixImports, {
10
- meta as dropXdsPrefixImportsMeta,
11
- } from './drop-xds-prefix-imports.mjs';
12
-
13
9
  import migrateXdsModuleSpecifiers, {
14
10
  meta as migrateXdsModuleSpecifiersMeta,
15
11
  } from './migrate-xds-module-specifiers.mjs';
16
12
 
17
- import migrateXdsDeclareModule, {
18
- meta as migrateXdsDeclareModuleMeta,
19
- } from './migrate-xds-declare-module.mjs';
20
-
21
- import migrateXdsCssSurfaces, {
22
- meta as migrateXdsCssSurfacesMeta,
23
- } from './migrate-xds-css-surfaces.mjs';
24
-
25
13
  export default [
26
- {
27
- // XDS-prefix migration (P2380608025). Mandatory in v0.1.0: the release
28
- // dropped the prefixed compatibility aliases (useXDSTheme, XDSButton,
29
- // XDSIconRegistry, ...), so consumers upgrading from 0.0.x MUST rewrite
30
- // prefixed imports to their bare names.
31
- //
32
- // Ordered BEFORE migrate-xds-module-specifiers so it sees `@xds/core`
33
- // imports (its source matcher) and un-prefixes the identifiers first;
34
- // the specifier codemod then rewrites the paths to `@astryxdesign/core`.
35
- // The runner preserves this array order (see runner.mjs).
36
- name: 'drop-xds-prefix-imports',
37
- transform: dropXdsPrefixImports,
38
- meta: dropXdsPrefixImportsMeta,
39
- },
40
14
  {
41
15
  name: 'migrate-xds-module-specifiers',
42
16
  transform: migrateXdsModuleSpecifiers,
43
17
  meta: migrateXdsModuleSpecifiersMeta,
44
18
  },
45
- {
46
- // Cleans up TypeScript `declare module "@xds/core/..."` augmentations,
47
- // which reference the package by string specifier and so are dead after
48
- // the scope rename. Mandatory in v0.1.0. Ordered AFTER the specifier
49
- // codemod: it uses the same @xds -> @astryxdesign mapping and repairs an
50
- // adjacent surface the specifier codemod does not visit (module-decl ids
51
- // are not import/export/require sources).
52
- name: 'migrate-xds-declare-module',
53
- transform: migrateXdsDeclareModule,
54
- meta: migrateXdsDeclareModuleMeta,
55
- },
56
- {
57
- // Rewrites consumer CSS surfaces broken by the v0.1.0 DOM-namespace rename
58
- // (core no longer dual-emits `xds-*`): the `.xds-*` class-selector prefix,
59
- // `[data-xds-*]` attribute selectors, and `@layer xds-*` layer names all
60
- // become their `astryx-*` forms. Mandatory in v0.1.0.
61
- name: 'migrate-xds-css-surfaces',
62
- transform: migrateXdsCssSurfaces,
63
- meta: migrateXdsCssSurfacesMeta,
64
- },
65
19
  ];
@@ -207,7 +207,7 @@ export function generateCompressedIndex(version, {coreDir, runPrefix = getRunPre
207
207
  .sort();
208
208
  if (topics.length > 0) lines.push(` docs <topic> ${topics.join(', ')}`);
209
209
  }
210
- lines.push(' swizzle <Name> eject component source for deep customization');
210
+ lines.push(' swizzle <Name> eject component source (--gap reports why)');
211
211
  lines.push(' upgrade --apply run after any @astryxdesign/core bump');
212
212
  lines.push(MARKER_END);
213
213
 
@@ -2,11 +2,17 @@
2
2
 
3
3
  'use client';
4
4
 
5
+ import {useState} from 'react';
5
6
  import {DropdownMenu} from '@astryxdesign/core/DropdownMenu';
6
7
 
7
8
  export default function DropdownMenuShowcase() {
9
+ const [isMenuOpen, setIsMenuOpen] = useState(false);
10
+
8
11
  return (
9
12
  <DropdownMenu
13
+ isMenuOpen={isMenuOpen}
14
+ onOpenChange={setIsMenuOpen}
15
+ hasAutoFocus={false}
10
16
  button={{label: 'Actions'}}
11
17
  items={[
12
18
  {label: 'Edit', onClick: () => {}},
@@ -65,7 +65,11 @@ const TrashIcon = (props: React.SVGProps<SVGSVGElement>) => (
65
65
 
66
66
  export default function DropdownMenuItemShowcase() {
67
67
  return (
68
- <DropdownMenu button={{label: 'Actions'}}>
68
+ <DropdownMenu
69
+ button={{label: 'Actions'}}
70
+ isMenuOpen
71
+ hasAutoFocus={false}
72
+ onOpenChange={() => {}}>
69
73
  <DropdownMenuItem
70
74
  icon={PencilIcon}
71
75
  label="Edit"
@@ -10,5 +10,5 @@ export const doc = {
10
10
  'Shows a page summary when hovering a link: title, description, and URL. Use for documentation links, article references, or any URL where a preview helps the user decide whether to click.',
11
11
  isReady: true,
12
12
  aspectRatio: 16 / 9,
13
- componentsUsed: ['HoverCard', 'Icon', 'Layout', 'Link', 'Text'],
13
+ componentsUsed: ['HoverCard', 'Icon', 'Layout', 'Text'],
14
14
  };
@@ -5,14 +5,12 @@
5
5
  import {HoverCard} from '@astryxdesign/core/HoverCard';
6
6
  import {Icon} from '@astryxdesign/core/Icon';
7
7
  import {VStack, HStack} from '@astryxdesign/core/Layout';
8
- import {Link} from '@astryxdesign/core/Link';
9
8
  import {Text} from '@astryxdesign/core/Text';
10
9
  import {LinkIcon} from '@heroicons/react/24/outline';
11
10
 
12
11
  export default function HoverCardInteractiveContent() {
13
12
  return (
14
- <Text type="body">
15
- Read more in the{' '}
13
+ <Text type="body">Read more in the{' '}
16
14
  <HoverCard
17
15
  placement="below"
18
16
  content={
@@ -32,11 +30,8 @@ export default function HoverCardInteractiveContent() {
32
30
  </HStack>
33
31
  </VStack>
34
32
  }>
35
- <Link href="#" hasUnderline>
36
- Getting Started Guide
37
- </Link>
38
- </HoverCard>
39
- .
40
- </Text>
33
+ Getting Started Guide
34
+ </HoverCard>.
35
+ </Text>
41
36
  );
42
37
  }
@@ -12,10 +12,9 @@ export default function LightboxShowcase() {
12
12
  isOpen={isOpen}
13
13
  onOpenChange={setIsOpen}
14
14
  media={{
15
- src: 'https://lookaside.facebook.com/assets/astryx/light-scene-horizontal-1.png',
16
- alt: 'Coastal shoreline with ocean waves',
17
- caption:
18
- 'A scenic coastline with waves rolling onto a sandy beach beneath a clear sky.',
15
+ src: 'https://picsum.photos/id/10/1200/800',
16
+ alt: 'Forest path',
17
+ caption: 'A winding path through the forest',
19
18
  }}
20
19
  />
21
20
  </>
@@ -2,11 +2,17 @@
2
2
 
3
3
  'use client';
4
4
 
5
+ import {useState} from 'react';
5
6
  import {MoreMenu} from '@astryxdesign/core/MoreMenu';
6
7
 
7
8
  export default function MoreMenuShowcase() {
9
+ const [isMenuOpen, setIsMenuOpen] = useState(false);
10
+
8
11
  return (
9
12
  <MoreMenu
13
+ isMenuOpen={isMenuOpen}
14
+ onOpenChange={setIsMenuOpen}
15
+ hasAutoFocus={false}
10
16
  items={[
11
17
  {label: 'Edit', onClick: () => {}},
12
18
  {label: 'Duplicate', onClick: () => {}},
@@ -0,0 +1,14 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
4
+ export const doc = {
5
+ type: 'block',
6
+ exampleFor: 'TreeListBranches',
7
+ name: 'TreeListBranches',
8
+ displayName: 'Tree List Branches',
9
+ description: 'Tree with expandable branches at multiple nesting levels.',
10
+ isReady: true,
11
+ isShowcase: true,
12
+ aspectRatio: 4 / 3,
13
+ componentsUsed: ['TreeList'],
14
+ };
@@ -0,0 +1,64 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ 'use client';
4
+
5
+ import {TreeList} from '@astryxdesign/core/TreeList';
6
+
7
+ const noop = () => {};
8
+
9
+ export default function TreeListBranchesShowcase() {
10
+ return (
11
+ <TreeList
12
+ items={[
13
+ {
14
+ id: 'design-system',
15
+ label: 'Design System',
16
+ isExpanded: true,
17
+ children: [
18
+ {
19
+ id: 'components',
20
+ label: 'Components',
21
+ isExpanded: true,
22
+ children: [
23
+ {
24
+ id: 'inputs',
25
+ label: 'Inputs',
26
+ children: [
27
+ {id: 'text-input', label: 'TextInput', onClick: noop},
28
+ {id: 'checkbox', label: 'Checkbox', onClick: noop},
29
+ {id: 'selector', label: 'Selector', onClick: noop},
30
+ ],
31
+ },
32
+ {
33
+ id: 'layout',
34
+ label: 'Layout',
35
+ children: [
36
+ {id: 'stack', label: 'Stack', onClick: noop},
37
+ {id: 'grid', label: 'Grid', onClick: noop},
38
+ ],
39
+ },
40
+ ],
41
+ },
42
+ {
43
+ id: 'tokens',
44
+ label: 'Tokens',
45
+ children: [
46
+ {id: 'colors', label: 'Colors', onClick: noop},
47
+ {id: 'spacing', label: 'Spacing', onClick: noop},
48
+ {id: 'typography', label: 'Typography', onClick: noop},
49
+ ],
50
+ },
51
+ ],
52
+ },
53
+ {
54
+ id: 'utilities',
55
+ label: 'Utilities',
56
+ children: [
57
+ {id: 'hooks', label: 'Hooks', onClick: noop},
58
+ {id: 'helpers', label: 'Helpers', onClick: noop},
59
+ ],
60
+ },
61
+ ]}
62
+ />
63
+ );
64
+ }
@@ -0,0 +1,14 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
4
+ export const doc = {
5
+ type: 'block',
6
+ exampleFor: 'TreeListItem',
7
+ name: 'TreeListItem',
8
+ displayName: 'Tree List Item',
9
+ description: 'Tree items with descriptions, icons, badges, selection, disabled state, and nested expand/collapse. TreeList is data-driven: no composed children API.',
10
+ isReady: true,
11
+ isShowcase: true,
12
+ aspectRatio: 4 / 3,
13
+ componentsUsed: ['TreeList', 'Badge', 'Icon', 'Layout', 'Text'],
14
+ };