@astryxdesign/cli 0.1.0-canary.b075032 → 0.1.0-canary.c6356d4

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/README.md +117 -75
  2. package/docs/getting-started.doc.mjs +11 -11
  3. package/docs/styling.doc.mjs +1 -2
  4. package/docs/working-with-ai.doc.mjs +1 -1
  5. package/package.json +7 -7
  6. package/src/api/doctor.mjs +3 -3
  7. package/src/api/search.mjs +207 -13
  8. package/src/api/template.mjs +2 -1
  9. package/src/codemods/__tests__/registry.test.mjs +1 -0
  10. package/src/codemods/registry.mjs +1 -0
  11. package/src/codemods/runner.mjs +105 -51
  12. package/src/codemods/transforms/v0.1.0/__tests__/migrate-xds-config-surfaces.test.mjs +116 -0
  13. package/src/codemods/transforms/v0.1.0/__tests__/migrate-xds-module-specifiers.test.mjs +51 -0
  14. package/src/codemods/transforms/v0.1.0/index.mjs +28 -0
  15. package/src/codemods/transforms/v0.1.0/migrate-xds-config-surfaces.mjs +230 -0
  16. package/src/codemods/transforms/v0.1.0/migrate-xds-module-specifiers.mjs +84 -0
  17. package/src/commands/agent-docs.mjs +50 -16
  18. package/src/commands/agent-docs.test.mjs +21 -21
  19. package/src/commands/build.mjs +196 -0
  20. package/src/commands/init.mjs +10 -2
  21. package/src/commands/json-contract.test.mjs +9 -2
  22. package/src/commands/upgrade.mjs +353 -169
  23. package/src/commands/upgrade.test.mjs +40 -26
  24. package/src/index.mjs +1 -0
  25. package/src/lib/config.mjs +12 -0
  26. package/src/lib/config.test.mjs +42 -0
  27. package/src/lib/error-codes.mjs +3 -0
  28. package/src/types/error-codes.d.ts +1 -0
  29. package/src/utils/package-manager.mjs +1 -1
  30. package/src/utils/update-check.mjs +4 -26
  31. package/src/utils/update-check.test.mjs +1 -63
  32. package/templates/blocks/components/AppShell/AppShellContentOnly.tsx +1 -9
  33. package/templates/blocks/components/AppShell/AppShellShowcase.tsx +1 -10
  34. package/templates/blocks/components/AppShell/AppShellSideNavOnly.tsx +1 -9
  35. package/templates/blocks/components/AppShell/AppShellTopNavOnly.tsx +1 -9
  36. package/templates/blocks/components/AppShell/AppShellTopNavWithSideNav.tsx +1 -9
  37. package/templates/blocks/components/AppShell/AppShellWithBanner.tsx +1 -9
  38. package/templates/blocks/components/AspectRatio/AspectRatioShowcase.tsx +12 -19
  39. package/templates/blocks/components/Banner/BannerShowcase.tsx +1 -8
  40. package/templates/blocks/components/Blockquote/BlockquoteShowcase.tsx +1 -8
  41. package/templates/blocks/components/Carousel/CarouselShowcase.tsx +2 -12
  42. package/templates/blocks/components/ChatComposerDrawer/ChatComposerDrawerShowcase.tsx +6 -9
  43. package/templates/blocks/components/ChatLayout/ChatLayoutPanelChat.tsx +10 -12
  44. package/templates/blocks/components/ChatMessageList/ChatMessageListDensity.tsx +1 -9
  45. package/templates/blocks/components/ChatMessageList/ChatMessageListFullFeatured.tsx +1 -9
  46. package/templates/blocks/components/ChatMessageList/ChatMessageListShowcase.tsx +1 -9
  47. package/templates/blocks/components/ChatMessageMetadata/ChatMessageMetadataShowcase.tsx +1 -8
  48. package/templates/blocks/components/ChatSendButton/ChatSendButtonInComposer.tsx +1 -8
  49. package/templates/blocks/components/Citation/CitationInlineText.tsx +4 -4
  50. package/templates/blocks/components/Code/CodeInlineInParagraph.tsx +1 -8
  51. package/templates/blocks/components/CodeBlock/CodeBlockBashCommand.tsx +1 -1
  52. package/templates/blocks/components/CodeBlock/CodeBlockJSONConfig.tsx +1 -1
  53. package/templates/blocks/components/CommandPaletteItem/CommandPaletteItemShowcase.tsx +9 -12
  54. package/templates/blocks/components/ContextMenu/ContextMenuShowcase.tsx +13 -15
  55. package/templates/blocks/components/Divider/DividerShowcase.tsx +1 -8
  56. package/templates/blocks/components/Divider/DividerVertical.tsx +7 -9
  57. package/templates/blocks/components/Field/FieldShowcase.tsx +1 -8
  58. package/templates/blocks/components/FormLayout/FormLayoutHorizontal.tsx +1 -6
  59. package/templates/blocks/components/Grid/GridResponsiveAutoFit.tsx +1 -9
  60. package/templates/blocks/components/HoverCard/HoverCardInlineTextHoverCard.tsx +4 -6
  61. package/templates/blocks/components/HoverCard/HoverCardInteractiveContent.tsx +1 -6
  62. package/templates/blocks/components/HoverCard/HoverCardProfileHoverCard.tsx +2 -8
  63. package/templates/blocks/components/HoverCard/HoverCardShowcase.tsx +1 -8
  64. package/templates/blocks/components/MoreMenu/MoreMenuInToolbar.tsx +2 -12
  65. package/templates/blocks/components/OverflowList/OverflowListOverflowBadges.tsx +8 -11
  66. package/templates/blocks/components/OverflowList/OverflowListOverflowDropdownActions.tsx +9 -12
  67. package/templates/blocks/components/Overlay/OverlayBottomStrip.tsx +4 -17
  68. package/templates/blocks/components/Overlay/OverlayHoverReveal.tsx +15 -16
  69. package/templates/blocks/components/Overlay/OverlayShowcase.tsx +5 -21
  70. package/templates/blocks/components/Pagination/PaginationDotsCarousel.tsx +2 -14
  71. package/templates/blocks/components/Pagination/PaginationPageSize.tsx +12 -14
  72. package/templates/blocks/components/Pagination/PaginationVariants.tsx +1 -8
  73. package/templates/blocks/components/Pagination/PaginationWithTable.tsx +2 -14
  74. package/templates/blocks/components/Tokenizer/TokenizerClear.tsx +1 -6
  75. package/templates/blocks/components/Tokenizer/TokenizerCreatable.tsx +2 -7
  76. package/templates/blocks/components/Tokenizer/TokenizerEndContent.tsx +1 -6
  77. package/templates/blocks/components/Tokenizer/TokenizerIcon.tsx +1 -6
  78. package/templates/blocks/components/Tokenizer/TokenizerMaxEntries.tsx +1 -6
  79. package/templates/blocks/components/Tokenizer/TokenizerOverflow.tsx +2 -7
  80. package/templates/blocks/components/Tokenizer/TokenizerShowcase.tsx +1 -6
  81. package/templates/blocks/components/Tokenizer/TokenizerStates.tsx +4 -9
  82. package/templates/blocks/components/Toolbar/ToolbarCardHeader.tsx +1 -10
  83. package/templates/blocks/components/Toolbar/ToolbarSizes.tsx +1 -8
  84. package/templates/blocks/components/Toolbar/ToolbarTableFilter.tsx +1 -8
  85. package/templates/blocks/components/Toolbar/ToolbarThreeSlot.tsx +1 -10
  86. package/templates/blocks/components/Toolbar/ToolbarWithTabs.tsx +8 -11
  87. package/templates/pages/ai-chat/page.tsx +71 -64
  88. package/templates/pages/ai-chat-landing/page.tsx +8 -12
  89. package/templates/pages/centered-hero/page.tsx +13 -15
  90. package/templates/pages/classic-gallery/page.tsx +27 -34
  91. package/templates/pages/detail-page/page.tsx +18 -18
  92. package/templates/pages/documentation/page.tsx +42 -58
  93. package/templates/pages/documentation-design/page.tsx +82 -60
  94. package/templates/pages/documentation-technical/page.tsx +101 -60
  95. package/templates/pages/editor/page.tsx +42 -54
  96. package/templates/pages/file-explorer/page.tsx +13 -16
  97. package/templates/pages/form-two-column/page.tsx +13 -17
  98. package/templates/pages/gallery-hero/page.tsx +13 -15
  99. package/templates/pages/ide/page.tsx +188 -264
  100. package/templates/pages/library/page.tsx +16 -23
  101. package/templates/pages/login/page.tsx +14 -18
  102. package/templates/pages/login-card/page.tsx +14 -18
  103. package/templates/pages/login-split/page.tsx +50 -48
  104. package/templates/pages/login-sso/page.tsx +9 -13
  105. package/templates/pages/mixed-gallery/page.tsx +51 -45
  106. package/templates/pages/payment-form/page.tsx +56 -70
  107. package/templates/pages/product-detail/page.tsx +27 -33
  108. package/templates/pages/product-gallery/page.tsx +7 -13
  109. package/templates/pages/settings-dialog/page.tsx +35 -43
  110. package/templates/pages/settings-sidebar/page.tsx +39 -47
  111. package/templates/pages/side-gallery/page.tsx +6 -9
  112. package/templates/pages/table-grouped/page.tsx +11 -15
  113. package/templates/pages/theme-showcase/page.tsx +33 -37
package/README.md CHANGED
@@ -11,7 +11,7 @@ npx astryx docs migration
11
11
  npx astryx template --list
12
12
  ```
13
13
 
14
- ### Finding things: `astryx search`
14
+ ## Finding things: `astryx search`
15
15
 
16
16
  When you don't know whether what you need is a component, a hook, a docs topic,
17
17
  or a template, search across all of them at once. Results are ranked by
@@ -50,20 +50,20 @@ Options:
50
50
 
51
51
  ## Commands
52
52
 
53
- | Command | Description |
54
- | ------------- | --------------------------------------------------------------------------------------- |
53
+ | Command | Description |
54
+ | ------------- | ---------------------------------------------------------------------------------------------------- |
55
55
  | `init` | Initialize the design system in your project: installs packages, sets up theming, adds AI agent docs |
56
- | `component` | List components or print detailed docs, props, usage examples, and source |
57
- | `search` | Find components, hooks, docs, and templates in one ranked, cross-domain result set |
58
- | `docs` | Print reference documentation (tokens, theme, color, typography, spacing, etc.) |
59
- | `template` | Inject page or block templates into your project |
60
- | `hook` | List hooks and print hook documentation |
61
- | `swizzle` | Copy component source into your project for deep customization |
62
- | `upgrade` | Run codemods to migrate between versions |
63
- | `theme build` | Compile a defineTheme file to production CSS and JS |
64
- | `discover` | Discover external packages and components |
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) |
56
+ | `component` | List components or print detailed docs, props, usage examples, and source |
57
+ | `search` | Find components, hooks, docs, and templates in one ranked, cross-domain result set |
58
+ | `docs` | Print reference documentation (tokens, theme, color, typography, spacing, etc.) |
59
+ | `template` | Inject page or block templates into your project |
60
+ | `hook` | List hooks and print hook documentation |
61
+ | `swizzle` | Copy component source into your project for deep customization |
62
+ | `upgrade` | Run codemods to migrate between versions |
63
+ | `theme build` | Compile a defineTheme file to production CSS and JS |
64
+ | `discover` | Discover external packages and components |
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) |
67
67
 
68
68
  ### Global options
69
69
 
@@ -122,46 +122,46 @@ if (isError(result)) {
122
122
 
123
123
  ### Error codes
124
124
 
125
- | Code | Meaning |
126
- | --- | --- |
127
- | `ERR_UNKNOWN` | Generic fallback for any error without a more specific code. |
128
- | `ERR_UNKNOWN_COMMAND` | A top-level command name was not recognized (e.g. `astryx bogus`). |
129
- | `ERR_UNKNOWN_SUBCOMMAND` | A subcommand under a group was not recognized (e.g. `astryx theme bogus`). |
130
- | `ERR_INVALID_OPTION` | An unknown flag was passed, or `--json` was used on a command that doesn't support it. |
131
- | `ERR_INVALID_ARGUMENT` | An option/argument value was rejected, or required flags were missing. |
132
- | `ERR_MISSING_ARGUMENT` | A required positional argument was omitted (e.g. `astryx theme build` with no file). |
133
- | `ERR_INVALID_LANG` | `--lang` was given a value outside its choices (`en`, `zh`, `dense`). |
134
- | `ERR_INVALID_DETAIL` | `--detail` was given a value outside its choices (`full`, `compact`, `brief`). |
135
- | `ERR_NODE_VERSION` | The running Node.js version is below the supported minimum. |
136
- | `ERR_CORE_NOT_FOUND` | `@astryxdesign/core` could not be located (not installed / not in a monorepo). |
137
- | `ERR_UNKNOWN_COMPONENT` | No component matched the requested name. |
138
- | `ERR_UNKNOWN_HOOK` | No hook matched the requested name. |
139
- | `ERR_UNKNOWN_TOPIC` | No docs topic matched the requested name. |
140
- | `ERR_UNKNOWN_SECTION` | A docs topic exists but the requested section within it does not. |
141
- | `ERR_UNKNOWN_CATEGORY` | A `--category` filter value did not match any known category. |
142
- | `ERR_UNKNOWN_TEMPLATE` | No template matched the requested name. |
143
- | `ERR_UNKNOWN_PACKAGE` | No package matched the requested name (discover). |
144
- | `ERR_UNKNOWN_AGENT` | An unrecognized `--agent` value was passed (agent docs / init). |
145
- | `ERR_UNKNOWN_FEATURE` | An unrecognized `--features` value was passed to `init`. |
146
- | `ERR_UNKNOWN_CODEMOD` | A `--codemod` value did not match any registered codemod (upgrade). |
147
- | `ERR_NOT_FOUND` | A discover/lookup query matched nothing in any package. |
148
- | `ERR_NO_DOC` | A component exists but has no typed `.doc.mjs` file. |
149
- | `ERR_NO_SHOWCASE` | No showcase exists for the requested component. |
150
- | `ERR_NO_SOURCE` | No source file could be located for the component/template. |
151
- | `ERR_INVALID_DOC` | A component's docs failed validation (malformed `.doc.mjs`). |
152
- | `ERR_FILE_NOT_FOUND` | A required input file did not exist. |
153
- | `ERR_FILE_EXISTS` | Refused to overwrite an existing file in non-interactive mode. |
154
- | `ERR_PATH_TRAVERSAL` | A path escaped its allowed root, or a name contained traversal markers. |
155
- | `ERR_WRITE_FAILED` | Writing output files failed (and was rolled back). |
156
- | `ERR_THEME_INVALID` | A theme definition was missing a required property (e.g. `name`). |
157
- | `ERR_THEME_LOAD` | A theme file could not be loaded / parsed into a `defineTheme` result. |
158
- | `ERR_TEMPLATE_CONFIG` | `template.get` is not configured in `astryx.config.mjs` (fetch-by-id). |
159
- | `ERR_TEMPLATE_GET` | A configured `template.get` threw or returned an invalid value. |
160
- | `ERR_VERSION_DETECT` | The current `@astryxdesign/core` version could not be detected. |
161
- | `ERR_INVALID_VERSION` | A `--from`/`--to` value was not a valid semver string. |
162
- | `ERR_DEP_MISSING` | A required external dependency (e.g. jscodeshift) is missing. |
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). |
125
+ | Code | Meaning |
126
+ | ------------------------ | -------------------------------------------------------------------------------------- |
127
+ | `ERR_UNKNOWN` | Generic fallback for any error without a more specific code. |
128
+ | `ERR_UNKNOWN_COMMAND` | A top-level command name was not recognized (e.g. `astryx bogus`). |
129
+ | `ERR_UNKNOWN_SUBCOMMAND` | A subcommand under a group was not recognized (e.g. `astryx theme bogus`). |
130
+ | `ERR_INVALID_OPTION` | An unknown flag was passed, or `--json` was used on a command that doesn't support it. |
131
+ | `ERR_INVALID_ARGUMENT` | An option/argument value was rejected, or required flags were missing. |
132
+ | `ERR_MISSING_ARGUMENT` | A required positional argument was omitted (e.g. `astryx theme build` with no file). |
133
+ | `ERR_INVALID_LANG` | `--lang` was given a value outside its choices (`en`, `zh`, `dense`). |
134
+ | `ERR_INVALID_DETAIL` | `--detail` was given a value outside its choices (`full`, `compact`, `brief`). |
135
+ | `ERR_NODE_VERSION` | The running Node.js version is below the supported minimum. |
136
+ | `ERR_CORE_NOT_FOUND` | `@astryxdesign/core` could not be located (not installed / not in a monorepo). |
137
+ | `ERR_UNKNOWN_COMPONENT` | No component matched the requested name. |
138
+ | `ERR_UNKNOWN_HOOK` | No hook matched the requested name. |
139
+ | `ERR_UNKNOWN_TOPIC` | No docs topic matched the requested name. |
140
+ | `ERR_UNKNOWN_SECTION` | A docs topic exists but the requested section within it does not. |
141
+ | `ERR_UNKNOWN_CATEGORY` | A `--category` filter value did not match any known category. |
142
+ | `ERR_UNKNOWN_TEMPLATE` | No template matched the requested name. |
143
+ | `ERR_UNKNOWN_PACKAGE` | No package matched the requested name (discover). |
144
+ | `ERR_UNKNOWN_AGENT` | An unrecognized `--agent` value was passed (agent docs / init). |
145
+ | `ERR_UNKNOWN_FEATURE` | An unrecognized `--features` value was passed to `init`. |
146
+ | `ERR_UNKNOWN_CODEMOD` | A `--codemod` value did not match any registered codemod (upgrade). |
147
+ | `ERR_NOT_FOUND` | A discover/lookup query matched nothing in any package. |
148
+ | `ERR_NO_DOC` | A component exists but has no typed `.doc.mjs` file. |
149
+ | `ERR_NO_SHOWCASE` | No showcase exists for the requested component. |
150
+ | `ERR_NO_SOURCE` | No source file could be located for the component/template. |
151
+ | `ERR_INVALID_DOC` | A component's docs failed validation (malformed `.doc.mjs`). |
152
+ | `ERR_FILE_NOT_FOUND` | A required input file did not exist. |
153
+ | `ERR_FILE_EXISTS` | Refused to overwrite an existing file in non-interactive mode. |
154
+ | `ERR_PATH_TRAVERSAL` | A path escaped its allowed root, or a name contained traversal markers. |
155
+ | `ERR_WRITE_FAILED` | Writing output files failed (and was rolled back). |
156
+ | `ERR_THEME_INVALID` | A theme definition was missing a required property (e.g. `name`). |
157
+ | `ERR_THEME_LOAD` | A theme file could not be loaded / parsed into a `defineTheme` result. |
158
+ | `ERR_TEMPLATE_CONFIG` | `template.get` is not configured in `astryx.config.mjs` (fetch-by-id). |
159
+ | `ERR_TEMPLATE_GET` | A configured `template.get` threw or returned an invalid value. |
160
+ | `ERR_VERSION_DETECT` | The current `@astryxdesign/core` version could not be detected. |
161
+ | `ERR_INVALID_VERSION` | A `--from`/`--to` value was not a valid semver string. |
162
+ | `ERR_DEP_MISSING` | A required external dependency (e.g. jscodeshift) is missing. |
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). |
165
165
 
166
166
  ## Capability manifest (agent discovery)
167
167
 
@@ -186,25 +186,59 @@ Shape:
186
186
  "version": "0.0.14",
187
187
  "description": "Design system CLI — components, themes, and tooling",
188
188
  "globalOptions": [
189
- {"flag": "--json", "type": "boolean", "description": "Output as typed JSON…"},
190
- {"flag": "--lang <locale>", "type": "enum", "choices": ["en", "zh", "dense"]},
191
- {"flag": "--detail <level>", "type": "enum", "choices": ["full", "compact", "brief"], "default": "full"}
189
+ {
190
+ "flag": "--json",
191
+ "type": "boolean",
192
+ "description": "Output as typed JSON…",
193
+ },
194
+ {
195
+ "flag": "--lang <locale>",
196
+ "type": "enum",
197
+ "choices": ["en", "zh", "dense"],
198
+ },
199
+ {
200
+ "flag": "--detail <level>",
201
+ "type": "enum",
202
+ "choices": ["full", "compact", "brief"],
203
+ "default": "full",
204
+ },
192
205
  ],
193
206
  "commands": [
194
207
  {
195
208
  "name": "component",
196
209
  "description": "List components or print component docs",
197
- "arguments": [{"name": "name", "required": false, "variadic": false, "description": ""}],
198
- "options": [{"flag": "--props", "type": "boolean", "description": "Print only the props table"}],
210
+ "arguments": [
211
+ {
212
+ "name": "name",
213
+ "required": false,
214
+ "variadic": false,
215
+ "description": "",
216
+ },
217
+ ],
218
+ "options": [
219
+ {
220
+ "flag": "--props",
221
+ "type": "boolean",
222
+ "description": "Print only the props table",
223
+ },
224
+ ],
199
225
  "json": true,
200
- "responseTypes": ["component.list", "component.detail", "component.detail.props", "…"],
201
- "examples": ["astryx component Button --props --json"]
202
- }
226
+ "responseTypes": [
227
+ "component.list",
228
+ "component.detail",
229
+ "component.detail.props",
230
+ "…",
231
+ ],
232
+ "examples": ["astryx component Button --props --json"],
233
+ },
203
234
  // …one entry per command; subcommands (e.g. `theme build`) nest under `subcommands`
204
235
  ],
205
236
  "jsonSupported": ["component", "docs", "…"],
206
- "responseTypes": {"component": ["component.list", "…"], "theme build": ["theme.build"]}
207
- }
237
+ "responseTypes": {
238
+ "component": ["component.list", "…"],
239
+ "theme build": ["theme.build"],
240
+ },
241
+ },
208
242
  }
209
243
  ```
210
244
 
@@ -225,7 +259,15 @@ For the standalone manifest envelope (`type: "manifest"`), use `astryx manifest
225
259
  The same logic that powers `xds --json` is available as importable, type-safe functions:
226
260
 
227
261
  ```typescript
228
- import {component, docs, discover, template, hook, search, AstryxError} from '@astryxdesign/cli/api';
262
+ import {
263
+ component,
264
+ docs,
265
+ discover,
266
+ template,
267
+ hook,
268
+ search,
269
+ AstryxError,
270
+ } from '@astryxdesign/cli/api';
229
271
 
230
272
  // Same result as: xds --json component Button
231
273
  const btn = await component('Button');
@@ -359,16 +401,16 @@ No failures — but review the ⚠ warnings above when you can.
359
401
 
360
402
  ### Checks
361
403
 
362
- | Check | Status it can return | What it verifies |
363
- | -------------------- | -------------------- | ----------------------------------------------------------- |
364
- | Node.js version | pass / fail | Running Node meets the CLI's minimum |
365
- | @astryxdesign/core installed | pass / fail | `@astryxdesign/core` is resolvable from the project |
366
- | Version alignment | pass / warn / info | Installed `@astryxdesign/core` is in step with `@astryxdesign/cli` |
367
- | Theme packages | pass / warn | An `@astryxdesign/theme-*` package is installed and a theme is wired |
368
- | astryx.config.mjs | pass / fail / info | Config (if present) loads cleanly with a valid shape |
369
- | AI agent docs | pass / warn / info | Agent docs exist and contain the XDS section markers |
370
- | Peer dependencies | pass / warn / info | `@astryxdesign/core`'s peer deps (react, …) are installed |
371
- | Package manager | info | Reports the detected package manager |
404
+ | Check | Status it can return | What it verifies |
405
+ | ---------------------------- | -------------------- | -------------------------------------------------------------------- |
406
+ | Node.js version | pass / fail | Running Node meets the CLI's minimum |
407
+ | @astryxdesign/core installed | pass / fail | `@astryxdesign/core` is resolvable from the project |
408
+ | Version alignment | pass / warn / info | Installed `@astryxdesign/core` is in step with `@astryxdesign/cli` |
409
+ | Theme packages | pass / warn | An `@astryxdesign/theme-*` package is installed and a theme is wired |
410
+ | astryx.config.mjs | pass / fail / info | Config (if present) loads cleanly with a valid shape |
411
+ | AI agent docs | pass / warn / info | Agent docs exist and contain the XDS section markers |
412
+ | Peer dependencies | pass / warn / info | `@astryxdesign/core`'s peer deps (react, …) are installed |
413
+ | Package manager | info | Reports the detected package manager |
372
414
 
373
415
  ### CI gate
374
416
 
@@ -88,7 +88,7 @@ import {VStack} from '@astryxdesign/core/Layout';
88
88
  export default function Page() {
89
89
  return (
90
90
  <VStack gap={2}>
91
- <Button label="Hello XDS" onClick={() => alert('Hi!')} />
91
+ <Button label="Hello Astryx" onClick={() => alert('Hi!')} />
92
92
  </VStack>
93
93
  );
94
94
  }`,
@@ -96,11 +96,11 @@ export default function Page() {
96
96
  ],
97
97
  },
98
98
  {
99
- title: 'Customize with xstyle',
99
+ title: 'Customize with StyleX',
100
100
  content: [
101
101
  {
102
102
  type: 'prose',
103
- text: 'Every component accepts an `xstyle` prop for StyleX style overrides created via `stylex.create()`.',
103
+ text: 'Astryx components support various styling solutions, from plain CSS and `className` to Tailwind and CSS-in-JS. See the [styling docs](/docs/styling) for the full guide. Astryx also has a deep integration with [StyleX](https://stylexjs.com/), an atomic CSS-in-JS library: create styles with `stylex.create()` and pass them to components with the `xstyle` prop.',
104
104
  },
105
105
  {
106
106
  type: 'code',
@@ -127,19 +127,19 @@ const overrides = stylex.create({
127
127
  type: 'table',
128
128
  headers: ['Example', 'Stack', 'Path'],
129
129
  rows: [
130
- ['Next.js', 'Next.js + theme CSS', 'apps/example-nextjs'],
131
- ['Next.js + StyleX', 'Next.js + StyleX for custom styles', 'apps/example-nextjs-stylex'],
132
- ['Next.js + Tailwind', 'Next.js + Tailwind bridge', 'apps/example-nextjs-tailwind'],
133
- ['Next.js Source', 'Next.js importing from source', 'apps/example-nextjs-source'],
134
- ['Vite', 'Vite', 'apps/example-vite'],
130
+ ['Next.js', 'Next.js + theme CSS', '[apps/example-nextjs](https://github.com/facebook/astryx/tree/main/apps/example-nextjs)'],
131
+ ['Next.js + StyleX', 'Next.js + StyleX for custom styles', '[apps/example-nextjs-stylex](https://github.com/facebook/astryx/tree/main/apps/example-nextjs-stylex)'],
132
+ ['Next.js + Tailwind', 'Next.js + Tailwind bridge', '[apps/example-nextjs-tailwind](https://github.com/facebook/astryx/tree/main/apps/example-nextjs-tailwind)'],
133
+ ['Next.js Source', 'Next.js importing from source', '[apps/example-nextjs-source](https://github.com/facebook/astryx/tree/main/apps/example-nextjs-source)'],
134
+ ['Vite', 'Vite', '[apps/example-vite](https://github.com/facebook/astryx/tree/main/apps/example-vite)'],
135
135
  ],
136
136
  },
137
137
  {
138
138
  type: 'code',
139
139
  lang: 'bash',
140
140
  label: 'Clone and run an example',
141
- code: `git clone https://github.com/facebookexperimental/xds.git
142
- cd xds/apps/example-nextjs
141
+ code: `git clone https://github.com/facebook/astryx.git
142
+ cd astryx/apps/example-nextjs
143
143
  pnpm install
144
144
  pnpm dev`,
145
145
  },
@@ -157,7 +157,7 @@ pnpm dev`,
157
157
  lang: 'json',
158
158
  label: 'package.json',
159
159
  code: `"scripts": {
160
- "xds": "node node_modules/@astryxdesign/cli/bin/astryx.mjs"
160
+ "astryx": "node node_modules/@astryxdesign/cli/bin/astryx.mjs"
161
161
  }`,
162
162
  },
163
163
  {
@@ -22,9 +22,8 @@ export const docs = {
22
22
  type: 'table',
23
23
  headers: ['Approach', 'Use for', 'Example'],
24
24
  rows: [
25
- ['xstyle prop', 'Overriding a specific component', 'xstyle={styles.override}'],
25
+ ['StyleX', 'Component-specific overrides, reusable styles, pseudo-classes, and typed tokens', 'const styles = stylex.create(...); <Button xstyle={styles.save} />'],
26
26
  ['Tailwind utilities', 'Layout, wrappers, and utility styling', 'className="flex gap-3 p-4"'],
27
- ['stylex.create', 'Reusable styles, pseudo-classes, typed tokens', 'stylex.create({ card: { ... } })'],
28
27
  ['className', 'Integrating with external CSS or Tailwind on components', 'className="my-card shadow-lg"'],
29
28
  ['Styling-library token aliases', 'Keeping Panda, Chakra, MUI, Emotion, styled-components, UnoCSS, CSS Modules, or Sass in sync with the system', "colors.surface = 'var(--color-background-surface)'"],
30
29
  ],
@@ -183,7 +183,7 @@ npx astryx docs tokens --dense`,
183
183
  "mcpServers": {
184
184
  "xds": {
185
185
  "type": "url",
186
- "url": "https://astryx.meta.com/mcp"
186
+ "url": "https://astryx.atmeta.com/mcp"
187
187
  }
188
188
  }
189
189
  }`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astryxdesign/cli",
3
- "version": "0.1.0-canary.b075032",
3
+ "version": "0.1.0-canary.c6356d4",
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",
@@ -54,9 +54,9 @@
54
54
  "jscodeshift": "^17.3.0"
55
55
  },
56
56
  "peerDependencies": {
57
- "@astryxdesign/core": "0.1.0-canary.b075032",
58
- "@astryxdesign/lab": "0.1.0-canary.b075032",
59
- "@astryxdesign/theme-neutral": "0.1.0-canary.b075032"
57
+ "@astryxdesign/core": "0.1.0-canary.c6356d4",
58
+ "@astryxdesign/lab": "0.1.0-canary.c6356d4",
59
+ "@astryxdesign/theme-neutral": "0.1.0-canary.c6356d4"
60
60
  },
61
61
  "peerDependenciesMeta": {
62
62
  "@astryxdesign/core": {
@@ -70,9 +70,9 @@
70
70
  }
71
71
  },
72
72
  "devDependencies": {
73
- "@astryxdesign/core": "0.1.0-canary.b075032",
74
- "@astryxdesign/lab": "0.1.0-canary.b075032",
75
- "@astryxdesign/theme-neutral": "0.1.0-canary.b075032"
73
+ "@astryxdesign/core": "0.1.0-canary.c6356d4",
74
+ "@astryxdesign/lab": "0.1.0-canary.c6356d4",
75
+ "@astryxdesign/theme-neutral": "0.1.0-canary.c6356d4"
76
76
  },
77
77
  "scripts": {
78
78
  "astryx": "node bin/astryx.mjs",
@@ -355,8 +355,8 @@ export function checkAgentDocs(ctx) {
355
355
  try {
356
356
  const content = fs.readFileSync(path.join(ctx.cwd, rel), 'utf-8');
357
357
  return (
358
- content.includes('<!-- XDS:START -->') &&
359
- content.includes('<!-- XDS:END -->')
358
+ (content.includes('<!-- ASTRYX:START -->') || content.includes('<!-- XDS:START -->')) &&
359
+ (content.includes('<!-- ASTRYX:END -->') || content.includes('<!-- XDS:END -->'))
360
360
  );
361
361
  } catch {
362
362
  return false;
@@ -368,7 +368,7 @@ export function checkAgentDocs(ctx) {
368
368
  id: 'agent-docs',
369
369
  label: 'AI agent docs',
370
370
  status: 'warn',
371
- message: `Agent docs present (${present.join(', ')}) but no XDS section markers found.`,
371
+ message: `Agent docs present (${present.join(', ')}) but no Astryx section markers found.`,
372
372
  fix: 'Add the XDS section to your agent docs with `astryx init --features agents`.',
373
373
  };
374
374
  }