@astryxdesign/cli 0.1.2-canary.745e813 → 0.1.2-canary.7735f9c
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.
- package/CHANGELOG.md +1 -0
- package/README.md +48 -48
- package/package.json +7 -7
- package/src/api/doctor.mjs +3 -3
- package/src/api/index.mjs +0 -1
- package/src/codemods/transforms/v0.1.0/__tests__/v0.1.0-ordering.test.mjs +0 -23
- package/src/codemods/transforms/v0.1.0/index.mjs +0 -28
- package/src/commands/build-theme.mjs +0 -117
- package/src/index.mjs +0 -1
- package/src/lib/error-codes.mjs +0 -8
- package/templates/blocks/components/DropdownMenu/DropdownMenuShowcase.tsx +6 -0
- package/templates/blocks/components/DropdownMenuItem/DropdownMenuItemShowcase.tsx +5 -1
- package/templates/blocks/components/Lightbox/LightboxShowcase.tsx +3 -4
- package/templates/blocks/components/MoreMenu/MoreMenuShowcase.tsx +6 -0
- package/templates/blocks/components/TreeListBranches/TreeListBranchesShowcase.doc.mjs +14 -0
- package/templates/blocks/components/TreeListBranches/TreeListBranchesShowcase.tsx +64 -0
- package/templates/blocks/components/TreeListItem/TreeListItemShowcase.doc.mjs +14 -0
- package/templates/blocks/components/TreeListItem/TreeListItemShowcase.tsx +60 -0
- package/templates/pages/shell-side-nav/page.tsx +1 -0
- package/src/api/blog.mjs +0 -192
- package/src/api/blog.test.mjs +0 -144
- package/src/codemods/transforms/v0.1.0/__tests__/migrate-xds-css-surfaces.test.mjs +0 -67
- package/src/codemods/transforms/v0.1.0/__tests__/migrate-xds-declare-module.test.mjs +0 -61
- package/src/codemods/transforms/v0.1.0/migrate-xds-css-surfaces.mjs +0 -77
- package/src/codemods/transforms/v0.1.0/migrate-xds-declare-module.mjs +0 -78
- package/src/commands/blog.mjs +0 -60
- package/src/commands/build-theme.watch.test.mjs +0 -157
- package/src/lib/site.mjs +0 -20
- package/templates/blocks/components/AvatarStatusDot/AvatarStatusDotVariants.doc.mjs +0 -14
- package/templates/blocks/components/AvatarStatusDot/AvatarStatusDotVariants.tsx +0 -28
- package/templates/blocks/components/Blockquote/BlockquoteTestimonials.doc.mjs +0 -14
- package/templates/blocks/components/Blockquote/BlockquoteTestimonials.tsx +0 -34
- package/templates/blocks/components/Blockquote/BlockquoteWithCite.doc.mjs +0 -14
- package/templates/blocks/components/Blockquote/BlockquoteWithCite.tsx +0 -21
- package/templates/blocks/components/BreadcrumbItem/BreadcrumbItemBasic.doc.mjs +0 -14
- package/templates/blocks/components/BreadcrumbItem/BreadcrumbItemBasic.tsx +0 -15
- package/templates/blocks/components/ButtonGroup/ButtonGroupBasic.doc.mjs +0 -14
- package/templates/blocks/components/ButtonGroup/ButtonGroupBasic.tsx +0 -16
- package/templates/blocks/components/ChatDictationButton/ChatDictationButtonBasic.doc.mjs +0 -19
- package/templates/blocks/components/ChatDictationButton/ChatDictationButtonBasic.tsx +0 -34
- package/templates/blocks/components/CheckboxListItem/CheckboxListItemBasic.doc.mjs +0 -14
- package/templates/blocks/components/CheckboxListItem/CheckboxListItemBasic.tsx +0 -30
- package/templates/blocks/components/CollapsibleGroup/CollapsibleGroupAccordion.doc.mjs +0 -14
- package/templates/blocks/components/CollapsibleGroup/CollapsibleGroupAccordion.tsx +0 -31
- package/templates/blocks/components/CommandPaletteEmpty/CommandPaletteEmptyBasic.doc.mjs +0 -14
- package/templates/blocks/components/CommandPaletteEmpty/CommandPaletteEmptyBasic.tsx +0 -26
- package/templates/blocks/components/CommandPaletteFooter/CommandPaletteFooterBasic.doc.mjs +0 -14
- package/templates/blocks/components/CommandPaletteFooter/CommandPaletteFooterBasic.tsx +0 -32
- package/templates/blocks/components/CommandPaletteGroup/CommandPaletteGroupBasic.doc.mjs +0 -18
- package/templates/blocks/components/CommandPaletteGroup/CommandPaletteGroupBasic.tsx +0 -32
- package/templates/blocks/components/CommandPaletteItem/CommandPaletteItemBasic.doc.mjs +0 -14
- package/templates/blocks/components/CommandPaletteItem/CommandPaletteItemBasic.tsx +0 -27
- package/templates/blocks/components/ContextMenu/ContextMenuBasic.doc.mjs +0 -14
- package/templates/blocks/components/ContextMenu/ContextMenuBasic.tsx +0 -32
- package/templates/blocks/components/DialogHeader/DialogHeaderBasic.doc.mjs +0 -14
- package/templates/blocks/components/DialogHeader/DialogHeaderBasic.tsx +0 -30
- package/templates/blocks/components/DropdownMenuItem/DropdownMenuItemBasic.doc.mjs +0 -14
- package/templates/blocks/components/DropdownMenuItem/DropdownMenuItemBasic.tsx +0 -27
- package/templates/blocks/components/FieldLabel/FieldLabelBasic.doc.mjs +0 -14
- package/templates/blocks/components/FieldLabel/FieldLabelBasic.tsx +0 -20
- package/templates/blocks/components/FieldStatus/FieldStatusBasic.doc.mjs +0 -14
- package/templates/blocks/components/FieldStatus/FieldStatusBasic.tsx +0 -23
- package/templates/blocks/components/FileInput/FileInputBasic.doc.mjs +0 -14
- package/templates/blocks/components/FileInput/FileInputBasic.tsx +0 -22
- package/templates/blocks/components/GridSpan/GridSpanColumns.doc.mjs +0 -14
- package/templates/blocks/components/GridSpan/GridSpanColumns.tsx +0 -38
- package/templates/blocks/components/HStack/HStackBasic.doc.mjs +0 -14
- package/templates/blocks/components/HStack/HStackBasic.tsx +0 -16
- package/templates/blocks/components/Hooks/useKeyboardHintHookUsage.doc.mjs +0 -14
- package/templates/blocks/components/Hooks/useKeyboardHintHookUsage.tsx +0 -57
- package/templates/blocks/components/InputGroup/InputGroupBasic.doc.mjs +0 -14
- package/templates/blocks/components/InputGroup/InputGroupBasic.tsx +0 -27
- package/templates/blocks/components/LayoutContent/LayoutContentBasic.doc.mjs +0 -23
- package/templates/blocks/components/LayoutContent/LayoutContentBasic.tsx +0 -40
- package/templates/blocks/components/LayoutFooter/LayoutFooterActions.doc.mjs +0 -22
- package/templates/blocks/components/LayoutFooter/LayoutFooterActions.tsx +0 -41
- package/templates/blocks/components/LayoutHeader/LayoutHeaderWithActions.doc.mjs +0 -23
- package/templates/blocks/components/LayoutHeader/LayoutHeaderWithActions.tsx +0 -40
- package/templates/blocks/components/LayoutPanel/LayoutPanelNavigation.doc.mjs +0 -22
- package/templates/blocks/components/LayoutPanel/LayoutPanelNavigation.tsx +0 -37
- package/templates/blocks/components/Lightbox/LightboxGallery.doc.mjs +0 -14
- package/templates/blocks/components/Lightbox/LightboxGallery.tsx +0 -53
- package/templates/blocks/components/Lightbox/LightboxVideo.doc.mjs +0 -14
- package/templates/blocks/components/Lightbox/LightboxVideo.tsx +0 -27
- package/templates/blocks/components/Lightbox/LightboxZoom.doc.mjs +0 -14
- package/templates/blocks/components/Lightbox/LightboxZoom.tsx +0 -33
- package/templates/blocks/components/MetadataListItem/MetadataListItemBasic.doc.mjs +0 -14
- package/templates/blocks/components/MetadataListItem/MetadataListItemBasic.tsx +0 -19
- package/templates/blocks/components/MobileNavToggle/MobileNavToggleBasic.doc.mjs +0 -23
- package/templates/blocks/components/MobileNavToggle/MobileNavToggleBasic.tsx +0 -42
- package/templates/blocks/components/NavIcon/NavIconBasic.doc.mjs +0 -14
- package/templates/blocks/components/NavIcon/NavIconBasic.tsx +0 -16
- package/templates/blocks/components/RadioListItem/RadioListItemBasic.doc.mjs +0 -14
- package/templates/blocks/components/RadioListItem/RadioListItemBasic.tsx +0 -30
- package/templates/blocks/components/Resizable/ResizableSidebar.doc.mjs +0 -25
- package/templates/blocks/components/Resizable/ResizableSidebar.tsx +0 -67
- package/templates/blocks/components/SegmentedControlItem/SegmentedControlItemBasic.doc.mjs +0 -14
- package/templates/blocks/components/SegmentedControlItem/SegmentedControlItemBasic.tsx +0 -21
- package/templates/blocks/components/SelectorOption/SelectorOptionBasic.doc.mjs +0 -14
- package/templates/blocks/components/SelectorOption/SelectorOptionBasic.tsx +0 -39
- package/templates/blocks/components/SideNavCollapseButton/SideNavCollapseButtonBasic.doc.mjs +0 -14
- package/templates/blocks/components/SideNavCollapseButton/SideNavCollapseButtonBasic.tsx +0 -55
- package/templates/blocks/components/SideNavHeading/SideNavHeadingBasic.doc.mjs +0 -14
- package/templates/blocks/components/SideNavHeading/SideNavHeadingBasic.tsx +0 -38
- package/templates/blocks/components/SideNavItem/SideNavItemBasic.doc.mjs +0 -14
- package/templates/blocks/components/SideNavItem/SideNavItemBasic.tsx +0 -49
- package/templates/blocks/components/SideNavSection/SideNavSectionBasic.doc.mjs +0 -14
- package/templates/blocks/components/SideNavSection/SideNavSectionBasic.tsx +0 -71
- package/templates/blocks/components/StackItem/StackItemFill.doc.mjs +0 -14
- package/templates/blocks/components/StackItem/StackItemFill.tsx +0 -28
- package/templates/blocks/components/TabMenu/TabMenuBasic.doc.mjs +0 -14
- package/templates/blocks/components/TabMenu/TabMenuBasic.tsx +0 -23
- package/templates/blocks/components/ToggleButtonGroup/ToggleButtonGroupVertical.doc.mjs +0 -14
- package/templates/blocks/components/ToggleButtonGroup/ToggleButtonGroupVertical.tsx +0 -47
- package/templates/blocks/components/TopNavHeading/TopNavHeadingBasic.doc.mjs +0 -14
- package/templates/blocks/components/TopNavHeading/TopNavHeadingBasic.tsx +0 -22
- package/templates/blocks/components/TopNavItem/TopNavItemBasic.doc.mjs +0 -14
- package/templates/blocks/components/TopNavItem/TopNavItemBasic.tsx +0 -21
- package/templates/blocks/components/TopNavMegaMenu/TopNavMegaMenuBasic.doc.mjs +0 -20
- package/templates/blocks/components/TopNavMegaMenu/TopNavMegaMenuBasic.tsx +0 -46
- package/templates/blocks/components/TopNavMegaMenuFeaturedCard/TopNavMegaMenuFeaturedCardBasic.doc.mjs +0 -14
- package/templates/blocks/components/TopNavMegaMenuFeaturedCard/TopNavMegaMenuFeaturedCardBasic.tsx +0 -16
- package/templates/blocks/components/TopNavMegaMenuItem/TopNavMegaMenuItemBasic.doc.mjs +0 -14
- package/templates/blocks/components/TopNavMegaMenuItem/TopNavMegaMenuItemBasic.tsx +0 -26
- package/templates/blocks/components/TopNavMenu/TopNavMenuBasic.doc.mjs +0 -14
- package/templates/blocks/components/TopNavMenu/TopNavMenuBasic.tsx +0 -43
- package/templates/blocks/components/TypeaheadItem/TypeaheadItemBasic.doc.mjs +0 -14
- package/templates/blocks/components/TypeaheadItem/TypeaheadItemBasic.tsx +0 -43
- package/templates/blocks/components/VStack/VStackBasic.doc.mjs +0 -14
- package/templates/blocks/components/VStack/VStackBasic.tsx +0 -20
package/CHANGELOG.md
CHANGED
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
|
|
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
|
-
|
|
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": "
|
|
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 `
|
|
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 `
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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 `
|
|
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
|
|
328
|
-
|
|
|
329
|
-
| `
|
|
330
|
-
| `
|
|
331
|
-
| `
|
|
332
|
-
| `
|
|
333
|
-
| `
|
|
334
|
-
| `
|
|
335
|
-
| `
|
|
336
|
-
| `
|
|
337
|
-
| `
|
|
338
|
-
| `
|
|
339
|
-
| `
|
|
340
|
-
| `
|
|
341
|
-
| `
|
|
342
|
-
| `
|
|
343
|
-
| `
|
|
344
|
-
| `
|
|
345
|
-
| `
|
|
346
|
-
| `
|
|
347
|
-
| `
|
|
348
|
-
| `
|
|
349
|
-
| `
|
|
350
|
-
| `
|
|
351
|
-
| `
|
|
352
|
-
| `
|
|
353
|
-
| `
|
|
354
|
-
| `
|
|
355
|
-
| `
|
|
356
|
-
| `
|
|
357
|
-
| `
|
|
358
|
-
| `
|
|
359
|
-
| `
|
|
360
|
-
| any error
|
|
361
|
-
| unsupported command
|
|
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
|
|
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
|
|
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.
|
|
3
|
+
"version": "0.1.2-canary.7735f9c",
|
|
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.
|
|
79
|
-
"@astryxdesign/lab": "0.1.2-canary.
|
|
80
|
-
"@astryxdesign/theme-neutral": "0.1.2-canary.
|
|
78
|
+
"@astryxdesign/core": "0.1.2-canary.7735f9c",
|
|
79
|
+
"@astryxdesign/lab": "0.1.2-canary.7735f9c",
|
|
80
|
+
"@astryxdesign/theme-neutral": "0.1.2-canary.7735f9c",
|
|
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.
|
|
96
|
-
"@astryxdesign/lab": "0.1.2-canary.
|
|
97
|
-
"@astryxdesign/theme-neutral": "0.1.2-canary.
|
|
95
|
+
"@astryxdesign/core": "0.1.2-canary.7735f9c",
|
|
96
|
+
"@astryxdesign/lab": "0.1.2-canary.7735f9c",
|
|
97
|
+
"@astryxdesign/theme-neutral": "0.1.2-canary.7735f9c",
|
|
98
98
|
"gpt-tokenizer": "^2.0.0"
|
|
99
99
|
},
|
|
100
100
|
"scripts": {
|
package/src/api/doctor.mjs
CHANGED
|
@@ -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
|
|
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
|
|
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: `
|
|
365
|
+
message: `XDS agent docs section present in ${withMarkers.join(', ')}.`,
|
|
366
366
|
};
|
|
367
367
|
}
|
|
368
368
|
|
package/src/api/index.mjs
CHANGED
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
|
|
22
22
|
export {component} from './component.mjs';
|
|
23
23
|
export {docs} from './docs.mjs';
|
|
24
|
-
export {blog} from './blog.mjs';
|
|
25
24
|
export {discover} from './discover.mjs';
|
|
26
25
|
export {template} from './template.mjs';
|
|
27
26
|
export {themeAdd, listThemes} from './theme-add.mjs';
|
|
@@ -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
|
];
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
import * as fs from 'node:fs';
|
|
16
16
|
import * as path from 'node:path';
|
|
17
17
|
import {pathToFileURL, fileURLToPath} from 'node:url';
|
|
18
|
-
import {spawn} from 'node:child_process';
|
|
19
18
|
import {createJiti} from 'jiti';
|
|
20
19
|
import {getRunPrefix} from '../utils/package-manager.mjs';
|
|
21
20
|
import {
|
|
@@ -598,104 +597,6 @@ function validatePrivateVars(themeDef) {
|
|
|
598
597
|
return errors;
|
|
599
598
|
}
|
|
600
599
|
|
|
601
|
-
/**
|
|
602
|
-
* Path to this CLI's real entry (bin/astryx.mjs), resolved from this module's
|
|
603
|
-
* location (src/commands/build-theme.mjs → ../../bin/astryx.mjs). Used to
|
|
604
|
-
* re-invoke `theme build` as a child process in watch mode.
|
|
605
|
-
*/
|
|
606
|
-
function resolveCliBin() {
|
|
607
|
-
const commandsDir = path.dirname(fileURLToPath(import.meta.url));
|
|
608
|
-
return path.resolve(commandsDir, '../../bin/astryx.mjs');
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
/**
|
|
612
|
-
* Run a single `theme build` as a child process, reusing the exact
|
|
613
|
-
* single-build code path (and its error handling) rather than duplicating it.
|
|
614
|
-
* Resolves with the child's exit code; never rejects.
|
|
615
|
-
*
|
|
616
|
-
* @param {string} file - The theme file argument, as the user passed it.
|
|
617
|
-
* @param {object} options - Parsed command options (only `out` is forwarded).
|
|
618
|
-
* @returns {Promise<number>}
|
|
619
|
-
*/
|
|
620
|
-
function runThemeBuildOnceChild(file, options) {
|
|
621
|
-
const cliBin = resolveCliBin();
|
|
622
|
-
const args = [cliBin, 'theme', 'build', file];
|
|
623
|
-
if (options.out) args.push('--out', options.out);
|
|
624
|
-
return new Promise(resolve => {
|
|
625
|
-
const child = spawn(process.execPath, args, {
|
|
626
|
-
stdio: 'inherit',
|
|
627
|
-
env: process.env,
|
|
628
|
-
});
|
|
629
|
-
child.on('close', code => resolve(code ?? 0));
|
|
630
|
-
child.on('error', () => resolve(1));
|
|
631
|
-
});
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
/**
|
|
635
|
-
* Watch a theme file and rebuild on change. Runs an initial build, then
|
|
636
|
-
* rebuilds (debounced) whenever the file changes, until interrupted with
|
|
637
|
-
* Ctrl-C. Each rebuild runs in a child process so a build error (which the
|
|
638
|
-
* single-build path reports via a hard exit) is contained and the watcher
|
|
639
|
-
* keeps running.
|
|
640
|
-
*
|
|
641
|
-
* @param {string} file - The theme file argument, as the user passed it.
|
|
642
|
-
* @param {string} filePath - Absolute path to the theme file.
|
|
643
|
-
* @param {object} options - Parsed command options.
|
|
644
|
-
* @returns {Promise<void>} Resolves when the watcher is stopped (Ctrl-C).
|
|
645
|
-
*/
|
|
646
|
-
async function runThemeBuildWatch(file, filePath, options) {
|
|
647
|
-
const rel = path.relative(process.cwd(), filePath);
|
|
648
|
-
|
|
649
|
-
// Initial build.
|
|
650
|
-
await runThemeBuildOnceChild(file, options);
|
|
651
|
-
|
|
652
|
-
humanLog(`\n👀 Watching ${rel} for changes — press Ctrl-C to stop.`);
|
|
653
|
-
|
|
654
|
-
let building = false;
|
|
655
|
-
let queued = false;
|
|
656
|
-
let debounce = null;
|
|
657
|
-
|
|
658
|
-
const rebuild = async () => {
|
|
659
|
-
if (building) {
|
|
660
|
-
// Coalesce changes that land mid-build into a single follow-up run.
|
|
661
|
-
queued = true;
|
|
662
|
-
return;
|
|
663
|
-
}
|
|
664
|
-
building = true;
|
|
665
|
-
humanLog(`\n♻️ Change detected — rebuilding ${rel}...`);
|
|
666
|
-
await runThemeBuildOnceChild(file, options);
|
|
667
|
-
building = false;
|
|
668
|
-
humanLog(`\n👀 Watching ${rel} for changes — press Ctrl-C to stop.`);
|
|
669
|
-
if (queued) {
|
|
670
|
-
queued = false;
|
|
671
|
-
rebuild();
|
|
672
|
-
}
|
|
673
|
-
};
|
|
674
|
-
|
|
675
|
-
// Some editors replace the file (rename) rather than writing in place, which
|
|
676
|
-
// can drop the watch. Watch the containing directory and filter to our file
|
|
677
|
-
// so edits survive atomic-save/rename.
|
|
678
|
-
const watchDir = path.dirname(filePath);
|
|
679
|
-
const baseName = path.basename(filePath);
|
|
680
|
-
const watcher = fs.watch(watchDir, (_eventType, changed) => {
|
|
681
|
-
if (changed && changed !== baseName) return;
|
|
682
|
-
clearTimeout(debounce);
|
|
683
|
-
// Debounce: editors often emit several events per save.
|
|
684
|
-
debounce = setTimeout(rebuild, 100);
|
|
685
|
-
});
|
|
686
|
-
|
|
687
|
-
await new Promise(resolve => {
|
|
688
|
-
const stop = () => {
|
|
689
|
-
clearTimeout(debounce);
|
|
690
|
-
watcher.close();
|
|
691
|
-
humanLog('\nStopped watching.');
|
|
692
|
-
resolve();
|
|
693
|
-
};
|
|
694
|
-
process.once('SIGINT', stop);
|
|
695
|
-
process.once('SIGTERM', stop);
|
|
696
|
-
});
|
|
697
|
-
}
|
|
698
|
-
|
|
699
600
|
export function registerTheme(program) {
|
|
700
601
|
const theme = program
|
|
701
602
|
.command('theme')
|
|
@@ -720,10 +621,6 @@ export function registerTheme(program) {
|
|
|
720
621
|
.command('build <file>')
|
|
721
622
|
.description('Compile a defineTheme file to CSS + JS')
|
|
722
623
|
.option('-o, --out <path>', 'Output CSS file path')
|
|
723
|
-
.option(
|
|
724
|
-
'-w, --watch',
|
|
725
|
-
'Rebuild automatically when the theme file changes (Ctrl-C to stop)',
|
|
726
|
-
)
|
|
727
624
|
.action(async (file, options) => {
|
|
728
625
|
const filePath = path.resolve(process.cwd(), file);
|
|
729
626
|
const json = program.opts().json || false;
|
|
@@ -733,20 +630,6 @@ export function registerTheme(program) {
|
|
|
733
630
|
return;
|
|
734
631
|
}
|
|
735
632
|
|
|
736
|
-
// Watch mode: run an initial build, then rebuild on every change to the
|
|
737
|
-
// theme file. Watch is a human-interactive, long-running mode — it is not
|
|
738
|
-
// supported in --json (machine) mode, which expects a single envelope.
|
|
739
|
-
if (options.watch) {
|
|
740
|
-
if (json) {
|
|
741
|
-
cliError('--watch is not supported with --json', {
|
|
742
|
-
code: ERROR_CODES.ERR_THEME_INVALID,
|
|
743
|
-
});
|
|
744
|
-
return;
|
|
745
|
-
}
|
|
746
|
-
await runThemeBuildWatch(file, filePath, options);
|
|
747
|
-
return;
|
|
748
|
-
}
|
|
749
|
-
|
|
750
633
|
if (!json) humanLog(`\nBuilding theme from ${path.relative(process.cwd(), filePath)}...`);
|
|
751
634
|
|
|
752
635
|
// Extract theme definition
|
package/src/index.mjs
CHANGED
|
@@ -245,7 +245,6 @@ const commands = [
|
|
|
245
245
|
{name: 'init', path: './commands/init.mjs', register: 'registerInit'},
|
|
246
246
|
{name: 'component', path: './commands/component/index.mjs', register: 'registerComponent'},
|
|
247
247
|
{name: 'docs', path: './commands/docs.mjs', register: 'registerDocs'},
|
|
248
|
-
{name: 'blog', path: './commands/blog.mjs', register: 'registerBlog'},
|
|
249
248
|
{name: 'swizzle', path: './commands/swizzle.mjs', register: 'registerSwizzle'},
|
|
250
249
|
// agent-docs folded into init — functions still importable from agent-docs.mjs
|
|
251
250
|
{name: 'template', path: './commands/template.mjs', register: 'registerTemplate'},
|
package/src/lib/error-codes.mjs
CHANGED
|
@@ -75,8 +75,6 @@
|
|
|
75
75
|
* | 'ERR_INVALID_VERSION'
|
|
76
76
|
* | 'ERR_DEP_MISSING'
|
|
77
77
|
* | 'ERR_GH_CLI'
|
|
78
|
-
* | 'ERR_UNKNOWN_POST'
|
|
79
|
-
* | 'ERR_FETCH_FAILED'
|
|
80
78
|
* | 'ERR_LAYOUT_PARSE'
|
|
81
79
|
* | 'ERR_LAYOUT_INVALID'
|
|
82
80
|
* )} ErrorCode
|
|
@@ -183,12 +181,6 @@ export const ERROR_CODES = Object.freeze({
|
|
|
183
181
|
/** GitHub CLI (`gh`) is not installed or not authenticated. */
|
|
184
182
|
ERR_GH_CLI: 'ERR_GH_CLI',
|
|
185
183
|
|
|
186
|
-
// ── Blog (read via the published RSS feed) ───────────────────────
|
|
187
|
-
/** No blog post matched the requested slug in the feed. */
|
|
188
|
-
ERR_UNKNOWN_POST: 'ERR_UNKNOWN_POST',
|
|
189
|
-
/** A network fetch (RSS feed or post text) failed. */
|
|
190
|
-
ERR_FETCH_FAILED: 'ERR_FETCH_FAILED',
|
|
191
|
-
|
|
192
184
|
// ── Layout expressions (XLE/XLO) ─────────────────────────────────
|
|
193
185
|
/** A layout expression failed to parse (syntax error, with line/col). */
|
|
194
186
|
ERR_LAYOUT_PARSE: 'ERR_LAYOUT_PARSE',
|
|
@@ -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
|
|
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://
|
|
16
|
-
alt: '
|
|
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
|
+
}
|