@astryxdesign/cli 0.1.2-canary.07fadf0 → 0.1.2-canary.0f66be7

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 (121) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/README.md +48 -48
  3. package/package.json +7 -7
  4. package/src/api/doctor.mjs +3 -3
  5. package/src/codemods/transforms/v0.1.0/__tests__/v0.1.0-ordering.test.mjs +0 -23
  6. package/src/codemods/transforms/v0.1.0/index.mjs +0 -28
  7. package/templates/blocks/components/DropdownMenu/DropdownMenuShowcase.tsx +6 -0
  8. package/templates/blocks/components/DropdownMenuItem/DropdownMenuItemShowcase.tsx +5 -1
  9. package/templates/blocks/components/Lightbox/LightboxShowcase.tsx +3 -4
  10. package/templates/blocks/components/MoreMenu/MoreMenuShowcase.tsx +6 -0
  11. package/templates/blocks/components/TreeListBranches/TreeListBranchesShowcase.doc.mjs +14 -0
  12. package/templates/blocks/components/TreeListBranches/TreeListBranchesShowcase.tsx +64 -0
  13. package/templates/blocks/components/TreeListItem/TreeListItemShowcase.doc.mjs +14 -0
  14. package/templates/blocks/components/TreeListItem/TreeListItemShowcase.tsx +60 -0
  15. package/templates/pages/shell-side-nav/page.tsx +1 -0
  16. package/src/codemods/transforms/v0.1.0/__tests__/migrate-xds-css-surfaces.test.mjs +0 -67
  17. package/src/codemods/transforms/v0.1.0/__tests__/migrate-xds-declare-module.test.mjs +0 -61
  18. package/src/codemods/transforms/v0.1.0/migrate-xds-css-surfaces.mjs +0 -77
  19. package/src/codemods/transforms/v0.1.0/migrate-xds-declare-module.mjs +0 -78
  20. package/templates/blocks/components/AvatarStatusDot/AvatarStatusDotVariants.doc.mjs +0 -14
  21. package/templates/blocks/components/AvatarStatusDot/AvatarStatusDotVariants.tsx +0 -28
  22. package/templates/blocks/components/Blockquote/BlockquoteTestimonials.doc.mjs +0 -14
  23. package/templates/blocks/components/Blockquote/BlockquoteTestimonials.tsx +0 -34
  24. package/templates/blocks/components/Blockquote/BlockquoteWithCite.doc.mjs +0 -14
  25. package/templates/blocks/components/Blockquote/BlockquoteWithCite.tsx +0 -21
  26. package/templates/blocks/components/BreadcrumbItem/BreadcrumbItemBasic.doc.mjs +0 -14
  27. package/templates/blocks/components/BreadcrumbItem/BreadcrumbItemBasic.tsx +0 -15
  28. package/templates/blocks/components/ButtonGroup/ButtonGroupBasic.doc.mjs +0 -14
  29. package/templates/blocks/components/ButtonGroup/ButtonGroupBasic.tsx +0 -16
  30. package/templates/blocks/components/ChatDictationButton/ChatDictationButtonBasic.doc.mjs +0 -19
  31. package/templates/blocks/components/ChatDictationButton/ChatDictationButtonBasic.tsx +0 -34
  32. package/templates/blocks/components/CheckboxListItem/CheckboxListItemBasic.doc.mjs +0 -14
  33. package/templates/blocks/components/CheckboxListItem/CheckboxListItemBasic.tsx +0 -30
  34. package/templates/blocks/components/CollapsibleGroup/CollapsibleGroupAccordion.doc.mjs +0 -14
  35. package/templates/blocks/components/CollapsibleGroup/CollapsibleGroupAccordion.tsx +0 -31
  36. package/templates/blocks/components/CommandPaletteEmpty/CommandPaletteEmptyBasic.doc.mjs +0 -14
  37. package/templates/blocks/components/CommandPaletteEmpty/CommandPaletteEmptyBasic.tsx +0 -26
  38. package/templates/blocks/components/CommandPaletteFooter/CommandPaletteFooterBasic.doc.mjs +0 -14
  39. package/templates/blocks/components/CommandPaletteFooter/CommandPaletteFooterBasic.tsx +0 -32
  40. package/templates/blocks/components/CommandPaletteGroup/CommandPaletteGroupBasic.doc.mjs +0 -18
  41. package/templates/blocks/components/CommandPaletteGroup/CommandPaletteGroupBasic.tsx +0 -32
  42. package/templates/blocks/components/CommandPaletteItem/CommandPaletteItemBasic.doc.mjs +0 -14
  43. package/templates/blocks/components/CommandPaletteItem/CommandPaletteItemBasic.tsx +0 -27
  44. package/templates/blocks/components/ContextMenu/ContextMenuBasic.doc.mjs +0 -14
  45. package/templates/blocks/components/ContextMenu/ContextMenuBasic.tsx +0 -32
  46. package/templates/blocks/components/DialogHeader/DialogHeaderBasic.doc.mjs +0 -14
  47. package/templates/blocks/components/DialogHeader/DialogHeaderBasic.tsx +0 -30
  48. package/templates/blocks/components/DropdownMenuItem/DropdownMenuItemBasic.doc.mjs +0 -14
  49. package/templates/blocks/components/DropdownMenuItem/DropdownMenuItemBasic.tsx +0 -27
  50. package/templates/blocks/components/FieldLabel/FieldLabelBasic.doc.mjs +0 -14
  51. package/templates/blocks/components/FieldLabel/FieldLabelBasic.tsx +0 -20
  52. package/templates/blocks/components/FieldStatus/FieldStatusBasic.doc.mjs +0 -14
  53. package/templates/blocks/components/FieldStatus/FieldStatusBasic.tsx +0 -23
  54. package/templates/blocks/components/FileInput/FileInputBasic.doc.mjs +0 -14
  55. package/templates/blocks/components/FileInput/FileInputBasic.tsx +0 -22
  56. package/templates/blocks/components/GridSpan/GridSpanColumns.doc.mjs +0 -14
  57. package/templates/blocks/components/GridSpan/GridSpanColumns.tsx +0 -38
  58. package/templates/blocks/components/HStack/HStackBasic.doc.mjs +0 -14
  59. package/templates/blocks/components/HStack/HStackBasic.tsx +0 -16
  60. package/templates/blocks/components/Hooks/useKeyboardHintHookUsage.doc.mjs +0 -14
  61. package/templates/blocks/components/Hooks/useKeyboardHintHookUsage.tsx +0 -57
  62. package/templates/blocks/components/InputGroup/InputGroupBasic.doc.mjs +0 -14
  63. package/templates/blocks/components/InputGroup/InputGroupBasic.tsx +0 -27
  64. package/templates/blocks/components/LayoutContent/LayoutContentBasic.doc.mjs +0 -23
  65. package/templates/blocks/components/LayoutContent/LayoutContentBasic.tsx +0 -40
  66. package/templates/blocks/components/LayoutFooter/LayoutFooterActions.doc.mjs +0 -22
  67. package/templates/blocks/components/LayoutFooter/LayoutFooterActions.tsx +0 -41
  68. package/templates/blocks/components/LayoutHeader/LayoutHeaderWithActions.doc.mjs +0 -23
  69. package/templates/blocks/components/LayoutHeader/LayoutHeaderWithActions.tsx +0 -40
  70. package/templates/blocks/components/LayoutPanel/LayoutPanelNavigation.doc.mjs +0 -22
  71. package/templates/blocks/components/LayoutPanel/LayoutPanelNavigation.tsx +0 -37
  72. package/templates/blocks/components/Lightbox/LightboxGallery.doc.mjs +0 -14
  73. package/templates/blocks/components/Lightbox/LightboxGallery.tsx +0 -53
  74. package/templates/blocks/components/Lightbox/LightboxVideo.doc.mjs +0 -14
  75. package/templates/blocks/components/Lightbox/LightboxVideo.tsx +0 -27
  76. package/templates/blocks/components/Lightbox/LightboxZoom.doc.mjs +0 -14
  77. package/templates/blocks/components/Lightbox/LightboxZoom.tsx +0 -33
  78. package/templates/blocks/components/MetadataListItem/MetadataListItemBasic.doc.mjs +0 -14
  79. package/templates/blocks/components/MetadataListItem/MetadataListItemBasic.tsx +0 -19
  80. package/templates/blocks/components/MobileNavToggle/MobileNavToggleBasic.doc.mjs +0 -23
  81. package/templates/blocks/components/MobileNavToggle/MobileNavToggleBasic.tsx +0 -42
  82. package/templates/blocks/components/NavIcon/NavIconBasic.doc.mjs +0 -14
  83. package/templates/blocks/components/NavIcon/NavIconBasic.tsx +0 -16
  84. package/templates/blocks/components/RadioListItem/RadioListItemBasic.doc.mjs +0 -14
  85. package/templates/blocks/components/RadioListItem/RadioListItemBasic.tsx +0 -30
  86. package/templates/blocks/components/Resizable/ResizableSidebar.doc.mjs +0 -25
  87. package/templates/blocks/components/Resizable/ResizableSidebar.tsx +0 -67
  88. package/templates/blocks/components/SegmentedControlItem/SegmentedControlItemBasic.doc.mjs +0 -14
  89. package/templates/blocks/components/SegmentedControlItem/SegmentedControlItemBasic.tsx +0 -21
  90. package/templates/blocks/components/SelectorOption/SelectorOptionBasic.doc.mjs +0 -14
  91. package/templates/blocks/components/SelectorOption/SelectorOptionBasic.tsx +0 -39
  92. package/templates/blocks/components/SideNavCollapseButton/SideNavCollapseButtonBasic.doc.mjs +0 -14
  93. package/templates/blocks/components/SideNavCollapseButton/SideNavCollapseButtonBasic.tsx +0 -55
  94. package/templates/blocks/components/SideNavHeading/SideNavHeadingBasic.doc.mjs +0 -14
  95. package/templates/blocks/components/SideNavHeading/SideNavHeadingBasic.tsx +0 -38
  96. package/templates/blocks/components/SideNavItem/SideNavItemBasic.doc.mjs +0 -14
  97. package/templates/blocks/components/SideNavItem/SideNavItemBasic.tsx +0 -49
  98. package/templates/blocks/components/SideNavSection/SideNavSectionBasic.doc.mjs +0 -14
  99. package/templates/blocks/components/SideNavSection/SideNavSectionBasic.tsx +0 -71
  100. package/templates/blocks/components/StackItem/StackItemFill.doc.mjs +0 -14
  101. package/templates/blocks/components/StackItem/StackItemFill.tsx +0 -28
  102. package/templates/blocks/components/TabMenu/TabMenuBasic.doc.mjs +0 -14
  103. package/templates/blocks/components/TabMenu/TabMenuBasic.tsx +0 -23
  104. package/templates/blocks/components/ToggleButtonGroup/ToggleButtonGroupVertical.doc.mjs +0 -14
  105. package/templates/blocks/components/ToggleButtonGroup/ToggleButtonGroupVertical.tsx +0 -47
  106. package/templates/blocks/components/TopNavHeading/TopNavHeadingBasic.doc.mjs +0 -14
  107. package/templates/blocks/components/TopNavHeading/TopNavHeadingBasic.tsx +0 -22
  108. package/templates/blocks/components/TopNavItem/TopNavItemBasic.doc.mjs +0 -14
  109. package/templates/blocks/components/TopNavItem/TopNavItemBasic.tsx +0 -21
  110. package/templates/blocks/components/TopNavMegaMenu/TopNavMegaMenuBasic.doc.mjs +0 -20
  111. package/templates/blocks/components/TopNavMegaMenu/TopNavMegaMenuBasic.tsx +0 -46
  112. package/templates/blocks/components/TopNavMegaMenuFeaturedCard/TopNavMegaMenuFeaturedCardBasic.doc.mjs +0 -14
  113. package/templates/blocks/components/TopNavMegaMenuFeaturedCard/TopNavMegaMenuFeaturedCardBasic.tsx +0 -16
  114. package/templates/blocks/components/TopNavMegaMenuItem/TopNavMegaMenuItemBasic.doc.mjs +0 -14
  115. package/templates/blocks/components/TopNavMegaMenuItem/TopNavMegaMenuItemBasic.tsx +0 -26
  116. package/templates/blocks/components/TopNavMenu/TopNavMenuBasic.doc.mjs +0 -14
  117. package/templates/blocks/components/TopNavMenu/TopNavMenuBasic.tsx +0 -43
  118. package/templates/blocks/components/TypeaheadItem/TypeaheadItemBasic.doc.mjs +0 -14
  119. package/templates/blocks/components/TypeaheadItem/TypeaheadItemBasic.tsx +0 -43
  120. package/templates/blocks/components/VStack/VStackBasic.doc.mjs +0 -14
  121. package/templates/blocks/components/VStack/VStackBasic.tsx +0 -20
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,7 @@ 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
+ | `doctor` | Diagnose your XDS setup and report problems with fixes (CI-friendly via exit code) |
66
66
 
67
67
  ### Global options
68
68
 
@@ -170,7 +170,7 @@ discriminators each command can emit. Think of it as an OpenAPI spec for the CLI
170
170
 
171
171
  ```bash
172
172
  astryx manifest --json # dedicated surface — type: "manifest"
173
- astryx --json # bare invocation — embeds the same payload under data.manifest
173
+ xds --json # bare invocation — embeds the same payload under data.manifest
174
174
  ```
175
175
 
176
176
  Shape:
@@ -180,7 +180,7 @@ Shape:
180
180
  "apiVersion": 1,
181
181
  "type": "manifest",
182
182
  "data": {
183
- "name": "astryx",
183
+ "name": "xds",
184
184
  "version": "0.0.14",
185
185
  "description": "Design system CLI — components, themes, and tooling",
186
186
  "globalOptions": [
@@ -247,14 +247,14 @@ the `JSON_SUPPORTED` allowlist and a small declarative `RESPONSE_TYPES` map in
247
247
  `src/lib/manifest.mjs`, guarded by a drift test (`manifest.test.mjs`) so adding a
248
248
  command without describing it fails CI.
249
249
 
250
- **Backwards-compat:** the bare `astryx --json` envelope keeps `type: "help"` and its
250
+ **Backwards-compat:** the bare `xds --json` envelope keeps `type: "help"` and its
251
251
  original shallow fields (`name`, `version`, `commands` as a `string[]` of names,
252
252
  `jsonSupported`); the full structured manifest is additive under `data.manifest`.
253
253
  For the standalone manifest envelope (`type: "manifest"`), use `astryx manifest --json`.
254
254
 
255
255
  ## Programmatic API
256
256
 
257
- The same logic that powers `astryx --json` is available as importable, type-safe functions:
257
+ The same logic that powers `xds --json` is available as importable, type-safe functions:
258
258
 
259
259
  ```typescript
260
260
  import {
@@ -267,20 +267,20 @@ import {
267
267
  AstryxError,
268
268
  } from '@astryxdesign/cli/api';
269
269
 
270
- // Same result as: astryx --json component Button
270
+ // Same result as: xds --json component Button
271
271
  const btn = await component('Button');
272
272
  btn.type; // 'component.detail'
273
273
  btn.data.name; // 'Button' (typed as ComponentDoc)
274
274
 
275
- // Same result as: astryx --json component --list
275
+ // Same result as: xds --json component --list
276
276
  const list = await component(undefined, {list: true});
277
277
  list.data; // Record<string, string[]>
278
278
 
279
- // Same result as: astryx --json docs principles
279
+ // Same result as: xds --json docs principles
280
280
  const principles = await docs('principles');
281
- principles.data.title; // 'Principles'
281
+ principles.data.title; // 'XDS Principles'
282
282
 
283
- // Same result as: astryx --json hook useMediaQuery
283
+ // Same result as: xds --json hook useMediaQuery
284
284
  const useMediaQuery = await hook('useMediaQuery');
285
285
  useMediaQuery.data.params; // typed as HookParamDoc[]
286
286
 
@@ -294,7 +294,7 @@ try {
294
294
  }
295
295
  ```
296
296
 
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.
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 `xds --json` always return identical data.
298
298
 
299
299
  ### Consumer utilities
300
300
 
@@ -324,41 +324,41 @@ detail.data.name; // already narrowed
324
324
 
325
325
  Every response has a `type` string that uniquely identifies it:
326
326
 
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` |
327
+ | Command | Type | Response |
328
+ | ---------------------------------------------- | --------------------------- | --------------------------------- |
329
+ | `xds --json component [--list]` | `component.list` | `ComponentListResponse` |
330
+ | `xds --json component --list --detail compact` | `component.brief` | `ComponentBriefResponse` |
331
+ | `xds --json component --list --detail full` | `component.full` | `ComponentFullResponse` |
332
+ | `xds --json component <name>` | `component.detail` | `ComponentDetailResponse` |
333
+ | `xds --json component <name> --props` | `component.detail.props` | `ComponentDetailPropsResponse` |
334
+ | `xds --json component <name> --source` | `component.detail.source` | `ComponentDetailSourceResponse` |
335
+ | `xds --json component <name> --showcase` | `component.detail.showcase` | `ComponentDetailShowcaseResponse` |
336
+ | `xds --json component <name> --blocks` | `component.detail.blocks` | `ComponentDetailBlocksResponse` |
337
+ | `xds --json discover` | `discover.list` | `DiscoverListResponse` |
338
+ | `xds --json discover @scope/name` | `discover.detail` | `DiscoverDetailResponse` |
339
+ | `xds --json discover @scope/name/Comp` | `discover.detail.doc` | `DiscoverDetailDocResponse` |
340
+ | `xds --json discover <search>` | `discover.search` | `DiscoverSearchResponse` |
341
+ | `xds --json docs` | `docs.list` | `DocsListResponse` |
342
+ | `xds --json docs <topic>` | `docs.detail` | `DocsDetailResponse` |
343
+ | `xds --json docs <topic> <section>` | `docs.detail.section` | `DocsDetailSectionResponse` |
344
+ | `xds --json template [--list]` | `template.list` | `TemplateListResponse` |
345
+ | `xds --json template <name>` | `template.show` | `TemplateShowResponse` |
346
+ | `xds --json template <name> --skeleton` | `template.skeleton` | `TemplateSkeletonResponse` |
347
+ | `xds --json template <name> [path]` | `template.copy` | `TemplateCopyResponse` |
348
+ | `xds --json hook [--list]` | `hook.list` | `HookListResponse` |
349
+ | `xds --json hook --list --detail compact` | `hook.brief` | `HookBriefResponse` |
350
+ | `xds --json hook --list --detail full` | `hook.full` | `HookFullResponse` |
351
+ | `xds --json hook <name>` | `hook.detail` | `HookDetailResponse` |
352
+ | `xds --json hook <name> --params` | `hook.detail.params` | `HookDetailParamsResponse` |
353
+ | `xds --json search <query>` | `search` | `SearchResponse` |
354
+ | `xds --json swizzle [--list]` | `swizzle.list` | `SwizzleListResponse` |
355
+ | `xds --json swizzle <component>` | `swizzle.copy` | `SwizzleCopyResponse` |
356
+ | `xds --json theme build <file>` | `theme.build` | `ThemeBuildResponse` |
357
+ | `xds --json upgrade --list` | `upgrade.list` | `UpgradeListResponse` |
358
+ | `xds --json upgrade [--apply]` | `upgrade.run` | `UpgradeRunResponse` |
359
+ | `xds --json doctor` | `doctor` | `DoctorResponse` |
360
+ | any error | — | `CLIError` |
361
+ | unsupported command | — | `CLIUnsupportedError` |
362
362
 
363
363
  ## Doctor
364
364
 
@@ -379,7 +379,7 @@ astryx doctor — diagnosing your setup
379
379
  @astryxdesign/core v0.0.14 is in step with @astryxdesign/cli v0.0.14.
380
380
  ⚠ Theme packages
381
381
  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.
382
+ → fix: Install a theme, e.g. `npm install @astryxdesign/theme-neutral`, then import its CSS or set xds.theme.
383
383
  ℹ astryx.config.mjs
384
384
  No astryx.config.mjs found — using defaults.
385
385
  ℹ AI agent docs
@@ -404,7 +404,7 @@ No failures — but review the ⚠ warnings above when you can.
404
404
  | Version alignment | pass / warn / info | Installed `@astryxdesign/core` is in step with `@astryxdesign/cli` |
405
405
  | Theme packages | pass / warn | An `@astryxdesign/theme-*` package is installed and a theme is wired |
406
406
  | 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 |
407
+ | AI agent docs | pass / warn / info | Agent docs exist and contain the XDS section markers |
408
408
  | Peer dependencies | pass / warn / info | `@astryxdesign/core`'s peer deps (react, …) are installed |
409
409
  | Package manager | info | Reports the detected package manager |
410
410
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astryxdesign/cli",
3
- "version": "0.1.2-canary.07fadf0",
3
+ "version": "0.1.2-canary.0f66be7",
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.07fadf0",
79
- "@astryxdesign/lab": "0.1.2-canary.07fadf0",
80
- "@astryxdesign/theme-neutral": "0.1.2-canary.07fadf0",
78
+ "@astryxdesign/core": "0.1.2-canary.0f66be7",
79
+ "@astryxdesign/lab": "0.1.2-canary.0f66be7",
80
+ "@astryxdesign/theme-neutral": "0.1.2-canary.0f66be7",
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.07fadf0",
96
- "@astryxdesign/lab": "0.1.2-canary.07fadf0",
97
- "@astryxdesign/theme-neutral": "0.1.2-canary.07fadf0",
95
+ "@astryxdesign/core": "0.1.2-canary.0f66be7",
96
+ "@astryxdesign/lab": "0.1.2-canary.0f66be7",
97
+ "@astryxdesign/theme-neutral": "0.1.2-canary.0f66be7",
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
 
@@ -41,29 +41,6 @@ describe('v0.1.0 codemod manifest ordering', () => {
41
41
  expect(entry.optional).toBeFalsy();
42
42
  });
43
43
 
44
- it('orders declare-module and CSS codemods after migrate-xds-module-specifiers', async () => {
45
- const {default: manifest} = await import('../index.mjs');
46
- const names = manifest.map(entry => entry.name);
47
- expect(names).toEqual([
48
- 'drop-xds-prefix-imports',
49
- 'migrate-xds-module-specifiers',
50
- 'migrate-xds-declare-module',
51
- 'migrate-xds-css-surfaces',
52
- ]);
53
- });
54
-
55
- it('marks migrate-xds-declare-module and migrate-xds-css-surfaces mandatory', async () => {
56
- const {default: manifest} = await import('../index.mjs');
57
- for (const name of [
58
- 'migrate-xds-declare-module',
59
- 'migrate-xds-css-surfaces',
60
- ]) {
61
- const entry = manifest.find(e => e.name === name);
62
- expect(entry, name).toBeDefined();
63
- expect(entry.optional).toBeFalsy();
64
- }
65
- });
66
-
67
44
  it('un-prefixes useXDSTheme from @xds/core/theme AND renames the scope to @astryxdesign', async () => {
68
45
  const input = [
69
46
  "import {useXDSTheme} from '@xds/core/theme';",
@@ -14,14 +14,6 @@ import migrateXdsModuleSpecifiers, {
14
14
  meta as migrateXdsModuleSpecifiersMeta,
15
15
  } from './migrate-xds-module-specifiers.mjs';
16
16
 
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
17
  export default [
26
18
  {
27
19
  // XDS-prefix migration (P2380608025). Mandatory in v0.1.0: the release
@@ -42,24 +34,4 @@ export default [
42
34
  transform: migrateXdsModuleSpecifiers,
43
35
  meta: migrateXdsModuleSpecifiersMeta,
44
36
  },
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
37
  ];
@@ -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"
@@ -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
+ };
@@ -0,0 +1,60 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ 'use client';
4
+
5
+ import {TreeList} from '@astryxdesign/core/TreeList';
6
+ import {Badge} from '@astryxdesign/core/Badge';
7
+ import {Icon} from '@astryxdesign/core/Icon';
8
+
9
+ const noop = () => {};
10
+
11
+ export default function TreeListItemShowcase() {
12
+ return (
13
+ <TreeList
14
+ style={{width: 400}}
15
+ items={[
16
+ {
17
+ id: 'inbox',
18
+ label: 'Inbox',
19
+ description: '12 unread messages',
20
+ isExpanded: true,
21
+ startContent: <Icon icon="info" size="sm" />,
22
+ endContent: <Badge label="12" variant="info" />,
23
+ children: [
24
+ {
25
+ id: 'primary',
26
+ label: 'Primary',
27
+ isSelected: true,
28
+ startContent: <Icon icon="check" size="sm" />,
29
+ onClick: noop,
30
+ },
31
+ {
32
+ id: 'updates',
33
+ label: 'Updates',
34
+ endContent: <Badge label="4" variant="info" />,
35
+ onClick: noop,
36
+ },
37
+ ],
38
+ },
39
+ {
40
+ id: 'drafts',
41
+ label: 'Drafts',
42
+ description: '3 draft messages',
43
+ startContent: <Icon icon="clock" size="sm" />,
44
+ onClick: noop,
45
+ },
46
+ {
47
+ id: 'archive',
48
+ label: 'Archive',
49
+ onClick: noop,
50
+ },
51
+ {
52
+ id: 'spam',
53
+ label: 'Spam',
54
+ isDisabled: true,
55
+ startContent: <Icon icon="warning" size="sm" />,
56
+ },
57
+ ]}
58
+ />
59
+ );
60
+ }
@@ -142,6 +142,7 @@ function ConversationItem({
142
142
  <MoreMenu
143
143
  size="sm"
144
144
  label="Conversation options"
145
+ hasAutoFocus={false}
145
146
  onOpenChange={setIsMenuOpen}
146
147
  items={[
147
148
  {label: 'Pin', onClick: () => {}},
@@ -1,67 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- import {describe, it, expect} from 'vitest';
4
-
5
- async function applyTransform(source, filePath = 'test.css') {
6
- const {default: transform} = await import('../migrate-xds-css-surfaces.mjs');
7
- // api.jscodeshift is unused by this CSS codemod, but the runner still
8
- // passes it — mirror that shape.
9
- const jscodeshift = (await import('jscodeshift')).default;
10
- const api = {jscodeshift, stats: () => {}, report: () => {}};
11
- const file = {source, path: filePath};
12
- const result = transform(file, api);
13
- return result ?? source;
14
- }
15
-
16
- describe('migrate-xds-css-surfaces', () => {
17
- it('rewrites the .xds- class-selector prefix', async () => {
18
- const input = '.xds-heading { color: red; }';
19
- const output = await applyTransform(input);
20
- expect(output).toBe('.astryx-heading { color: red; }');
21
- });
22
-
23
- it('rewrites the [data-xds-theme] attribute selector', async () => {
24
- const input = '[data-xds-theme="dark"] .xds-card { background: black; }';
25
- const output = await applyTransform(input);
26
- expect(output).toContain('[data-astryx-theme="dark"]');
27
- expect(output).toContain('.astryx-card');
28
- expect(output).not.toContain('xds-');
29
- });
30
-
31
- it('rewrites data-xds-theme-prose and data-xds-media attribute selectors', async () => {
32
- const input =
33
- '[data-xds-theme-prose] {} [data-xds-media="print"] {}';
34
- const output = await applyTransform(input);
35
- expect(output).toContain('[data-astryx-theme-prose]');
36
- expect(output).toContain('[data-astryx-media="print"]');
37
- });
38
-
39
- it('rewrites @layer xds-theme and @layer xds-base', async () => {
40
- const input = '@layer xds-theme, xds-base;\n@layer xds-theme { a { color: red; } }';
41
- const output = await applyTransform(input);
42
- expect(output).toContain('astryx-theme');
43
- expect(output).toContain('astryx-base');
44
- expect(output).not.toContain('xds-theme');
45
- expect(output).not.toContain('xds-base');
46
- });
47
-
48
- it('does NOT rewrite a bare "xds" in a comment or value', async () => {
49
- const input = '/* xds tokens live here */\n.card { content: "xds"; }';
50
- const output = await applyTransform(input);
51
- expect(output).toBe(input);
52
- });
53
-
54
- it('does NOT rewrite a class-like word missing the leading dot', async () => {
55
- // e.g. inside a JS-ish string or a comment fragment — not a class selector.
56
- const input = '/* use xds-heading in markup */';
57
- const output = await applyTransform(input);
58
- expect(output).toBe(input);
59
- });
60
-
61
- it('leaves already-migrated CSS unchanged', async () => {
62
- const input =
63
- '@layer astryx-theme { [data-astryx-theme="dark"] .astryx-card {} }';
64
- const output = await applyTransform(input);
65
- expect(output).toBe(input);
66
- });
67
- });