@astryxdesign/cli 0.3.0-canary.d52d2cb → 0.3.0-canary.d790582

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 (62) hide show
  1. package/README.md +8 -8
  2. package/api/blog/blog.doc.mjs +2 -2
  3. package/api/build/build.doc.mjs +1 -1
  4. package/api/component/component.doc.mjs +1 -1
  5. package/api/discover/discover.doc.mjs +2 -2
  6. package/api/docs/docs.doc.mjs +2 -2
  7. package/api/doctor/doctor.doc.mjs +3 -3
  8. package/api/hook/hook.doc.mjs +1 -1
  9. package/api/init/init.doc.mjs +1 -1
  10. package/api/integration/summarizeIssues.doc.mjs +1 -1
  11. package/api/integration/validateIntegration.doc.mjs +1 -1
  12. package/api/json/assertResponse.doc.mjs +2 -2
  13. package/api/json/isError.doc.mjs +1 -1
  14. package/api/json/parseResponse.doc.mjs +2 -2
  15. package/api/layout/layoutCheck.doc.mjs +1 -1
  16. package/api/layout/layoutExpand.doc.mjs +1 -1
  17. package/api/layout/layoutGrammar.doc.mjs +1 -1
  18. package/api/swizzle/swizzle.doc.mjs +1 -1
  19. package/api/template/template.test.mjs +26 -0
  20. package/api/theme/listThemes.doc.mjs +2 -2
  21. package/api/theme/themeAdd.doc.mjs +1 -1
  22. package/api/theme/themeBuild.doc.mjs +3 -3
  23. package/api/theme/themeList.doc.mjs +2 -2
  24. package/api/upgrade/upgrade.doc.mjs +1 -1
  25. package/assets/docs/browser-support.doc.mjs +6 -6
  26. package/assets/docs/icons.doc.mjs +3 -3
  27. package/assets/docs/illustrations.doc.mjs +2 -2
  28. package/assets/docs/internationalization.doc.mjs +1 -1
  29. package/assets/docs/migration.doc.mjs +1 -1
  30. package/assets/docs/principles.doc.mjs +1 -1
  31. package/assets/docs/styling-libraries.doc.mjs +1 -1
  32. package/assets/docs/styling.doc.mjs +4 -4
  33. package/assets/docs/theme.doc.mjs +3 -3
  34. package/assets/docs/typography.doc.mjs +2 -2
  35. package/assets/templates/themes/neutral/neutralTheme.ts +4 -1
  36. package/authoring/codemod/codemod.doc.mjs +2 -2
  37. package/authoring/config/config.doc.mjs +1 -1
  38. package/authoring/doctypes/command/command.doc.mjs +2 -2
  39. package/authoring/doctypes/component/component.doc.mjs +7 -7
  40. package/authoring/doctypes/enum/enum.doc.mjs +2 -2
  41. package/authoring/doctypes/function/function.doc.mjs +3 -3
  42. package/authoring/doctypes/hook/hook.doc.mjs +3 -3
  43. package/authoring/doctypes/reference/reference.doc.mjs +3 -3
  44. package/authoring/doctypes/schema/schema.doc.mjs +1 -1
  45. package/authoring/doctypes/template/template.doc.mjs +3 -3
  46. package/clients/cli/commands/build.doc.mjs +1 -1
  47. package/clients/cli/commands/component.doc.mjs +1 -1
  48. package/clients/cli/commands/doctor.doc.mjs +2 -2
  49. package/clients/cli/commands/layout-expand.doc.mjs +1 -1
  50. package/clients/cli/commands/layout.doc.mjs +1 -1
  51. package/clients/cli/commands/manifest.doc.mjs +3 -3
  52. package/clients/cli/commands/search.doc.mjs +1 -1
  53. package/clients/cli/commands/theme-add.doc.mjs +1 -1
  54. package/clients/cli/commands/theme-build.doc.mjs +1 -1
  55. package/clients/cli/commands/theme-list.doc.mjs +1 -1
  56. package/clients/cli/commands/theme.doc.mjs +2 -2
  57. package/clients/cli/commands/validate-integration.doc.mjs +2 -2
  58. package/foundation/discovery/template-adapter.d.mts +6 -3
  59. package/foundation/discovery/template-adapter.mjs +30 -14
  60. package/foundation/response/response-types.doc.mjs +7 -7
  61. package/foundation/response/response.doc.mjs +5 -5
  62. package/package.json +9 -9
package/README.md CHANGED
@@ -72,7 +72,7 @@ Options:
72
72
  | `search` | Search components, hooks, docs, and templates in one ranked list |
73
73
  | `swizzle` | Copy component source for customization |
74
74
  | `template` | Inject a page or block template |
75
- | `theme` | Theme tools build, export, and manage themes |
75
+ | `theme` | Theme tools: build, export, and manage themes |
76
76
  | `upgrade` | Run codemods to migrate between versions |
77
77
  | `validate-integration` | Validate an Astryx integration package (manifest + contributions) |
78
78
 
@@ -385,7 +385,7 @@ Every response has a `type` discriminant. The full set is below (generated from
385
385
 
386
386
  | Type | What `data` carries |
387
387
  | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
388
- | `component.list` | The component catalog grouped by category: `detail` (the level names \| compact \| full) and `components`, the grouped map of names+package, brief entries, or a full ComponentDoc per entry. |
388
+ | `component.list` | The component catalog grouped by category: `detail` (the level: names \| compact \| full) and `components`, the grouped map of names+package, brief entries, or a full ComponentDoc per entry. |
389
389
  | `component.detail` | One component's authored ComponentDoc plus ownership metadata (owner package, import specifier, and whether source is available). |
390
390
  | `component.detail.props` | Just one component's props table (ComponentPropDoc[]). |
391
391
  | `component.detail.source` | One component's source file, as {component, source}. |
@@ -393,12 +393,12 @@ Every response has a `type` discriminant. The full set is below (generated from
393
393
  | `component.detail.blocks` | One component's example blocks, as {component, showcase, examples, related} of BlockEntry. |
394
394
  | `docs.list` | All reference-doc topics as DocsListEntry[] ({topic, description}), in discovery order. |
395
395
  | `docs.detail` | One topic's full ReferenceDoc, with token-ref blocks inlined. |
396
- | `docs.detail.section` | A single ReferenceSection of a topic the first whose title contains the section query. |
397
- | `blog.list` | The feed URL plus every post parsed from the RSS feed each with slug, title, description, date, type, authors, link, and plaintext URL. |
396
+ | `docs.detail.section` | A single ReferenceSection of a topic: the first whose title contains the section query. |
397
+ | `blog.list` | The feed URL plus every post parsed from the RSS feed, each with slug, title, description, date, type, authors, link, and plaintext URL. |
398
398
  | `blog.detail` | One post's metadata plus the feed URL and the post's full plaintext body. |
399
399
  | `discover.list` | The configured external packages (name, category, components, version, description); when empty it carries meta.configured to tell "nothing configured" from "nothing discovered". |
400
400
  | `discover.detail` | A single external package entry, for an @scope/name query. |
401
- | `discover.detail.doc` | The validated ComponentDoc for one external component an @scope/name/Component query, or a free-text term resolving to exactly one component. |
401
+ | `discover.detail.doc` | The validated ComponentDoc for one external component: an @scope/name/Component query, or a free-text term resolving to exactly one component. |
402
402
  | `discover.search` | The echoed query plus the matching {package, component} pairs, when a free-text term matches several components. |
403
403
  | `search` | The echoed query plus a ranked SearchResultEntry[] (domain, name, score, reason, description, follow-up command, and import path where relevant). |
404
404
  | `build.help` | A marker (`playbook: true`) that the renderer expands into the how-to-build-a-page workflow; emitted when no query is given. |
@@ -409,15 +409,15 @@ Every response has a `type` discriminant. The full set is below (generated from
409
409
  | `template.show` | The resolved template's raw source plus its description, kind, and the component names it composes. |
410
410
  | `template.skeleton` | A layout skeleton (structural tags with spatial annotations) plus the template's description and the components it composes. |
411
411
  | `template.copy` | A scaffold receipt: template id, output directory, written file name, and file count. |
412
- | `hook.list` | The hook catalog grouped by category: `detail` (the level names \| compact \| full) and `components`, the grouped map of hook names, brief entries, or a full HookDoc per entry. |
412
+ | `hook.list` | The hook catalog grouped by category: `detail` (the level: names \| compact \| full) and `components`, the grouped map of hook names, brief entries, or a full HookDoc per entry. |
413
413
  | `hook.detail` | One hook's full authored HookDoc. |
414
414
  | `hook.detail.params` | Just one hook's parameters table (HookParamDoc[]). |
415
415
  | `theme.build` | A theme build receipt: name, token- and component-override counts, output size, the written outputs {css, js, dts, and variantsDts when applicable}, and any validation warnings. |
416
416
  | `theme.build.check` | The --check receipt: theme name, an upToDate flag, the stale outputs (each {path, reason: missing \| outdated}), and the full list of checked paths. Writes nothing. |
417
- | `theme.list` | Every bundled theme as a ThemeListEntry[] each with slug, displayName, description, and a maintained flag. |
417
+ | `theme.list` | Every bundled theme as a ThemeListEntry[]: each with slug, displayName, description, and a maintained flag. |
418
418
  | `theme.add` | A scaffold receipt: resolved slug, displayName, maintained flag, outputDir (relative to cwd), the theme entry file, its exportName, and the files written. |
419
419
  | `upgrade.list` | Every available codemod, oldest→newest, as {name, title, version, optional}; returned for --list without running anything. |
420
- | `upgrade.status` | A short-circuit outcome with no codemods run up_to_date, no_codemods, or config_fixable each carrying the agent-docs summary. |
420
+ | `upgrade.status` | A short-circuit outcome with no codemods run (up_to_date, no_codemods, or config_fixable), each carrying the agent-docs summary. |
421
421
  | `upgrade.run` | The run receipt: from/to versions, codemod count, integrations processed, the agent-docs summary, and (apply mode) filesChanged, transformsApplied, and per-codemod errors. |
422
422
  | `manifest` | The self-describing CLI capability manifest: name, version, apiVersion, global options, the command tree (args, options, json flag, response types, examples), the jsonSupported allowlist, and the flat responseTypes index. |
423
423
  | `doctor` | The health-check report: `checks` (each with id, label, status: pass \| warn \| fail \| info, a message, and a fix when not passing) plus a `summary` of counts per status. |
@@ -14,7 +14,7 @@ export const doc = {
14
14
  displayName: 'blog()',
15
15
  summary: 'List blog posts, or read one, from the published RSS feed.',
16
16
  description:
17
- 'Reads the design system blog the same way any feed reader does over the ' +
17
+ 'Reads the design system blog the same way any feed reader does, over the ' +
18
18
  "published RSS feed, never the blog's source files. With no slug it lists every " +
19
19
  "post parsed from the feed; with a slug it reads that post's full plaintext body " +
20
20
  'via the .txt alternate the feed advertises. Both envelopes carry feedUrl so a ' +
@@ -35,7 +35,7 @@ export const doc = {
35
35
  {
36
36
  type: 'blog.list',
37
37
  description:
38
- 'The feed URL plus every post parsed from the feed each with slug, title, description, date, type, authors, link, and its plaintext URL.',
38
+ 'The feed URL plus every post parsed from the feed, each with slug, title, description, date, type, authors, link, and its plaintext URL.',
39
39
  },
40
40
  {
41
41
  type: 'blog.detail',
@@ -54,7 +54,7 @@ export const doc = {
54
54
  {
55
55
  type: 'build.help',
56
56
  description:
57
- 'Emitted when the query is omitted a pure marker (`data.playbook: true`) that the command renderer expands into the page-building workflow prose.',
57
+ 'Emitted when the query is omitted: a pure marker (`data.playbook: true`) that the command renderer expands into the page-building workflow prose.',
58
58
  },
59
59
  {
60
60
  type: 'build.kit',
@@ -108,7 +108,7 @@ export const doc = {
108
108
  {
109
109
  type: 'component.list',
110
110
  description:
111
- "The catalog grouped by category. data.detail is the level ('names' | 'compact' | 'full') and data.components is the grouped map names+package, brief entries, or full ComponentDoc per entry.",
111
+ "The catalog grouped by category. data.detail is the level ('names' | 'compact' | 'full') and data.components is the grouped map: names+package, brief entries, or full ComponentDoc per entry.",
112
112
  },
113
113
  {
114
114
  type: 'component.detail',
@@ -15,7 +15,7 @@ export const doc = {
15
15
  summary: 'Browse and search components from configured external packages.',
16
16
  description:
17
17
  'Explores components contributed by configured external packages and integrations ' +
18
- 'the ones that declare a components root. With no query it lists those packages; ' +
18
+ 'the ones that declare a components root. With no query it lists those packages; ' +
19
19
  'an @scope/name query browses one package; @scope/name/Component (or a free-text ' +
20
20
  "term that resolves to a single component) returns that component's validated doc; " +
21
21
  'a free-text term with several matches returns the candidate list.',
@@ -68,7 +68,7 @@ export const doc = {
68
68
  {
69
69
  type: 'discover.detail.doc',
70
70
  description:
71
- 'The validated ComponentDoc for one external component an @scope/name/Component query, or a free-text term that resolves to exactly one component.',
71
+ 'The validated ComponentDoc for one external component: an @scope/name/Component query, or a free-text term that resolves to exactly one component.',
72
72
  },
73
73
  {
74
74
  type: 'discover.search',
@@ -13,7 +13,7 @@ export const doc = {
13
13
  name: 'docs',
14
14
  displayName: 'docs()',
15
15
  summary:
16
- 'Read the reference docs list every topic, one topic, or a single section of a topic.',
16
+ 'Read the reference docs: list every topic, one topic, or a single section of a topic.',
17
17
  description:
18
18
  'Routes on its arguments: no topic lists every reference-doc topic; a topic ' +
19
19
  'returns that full ReferenceDoc (with token-ref blocks inlined); a topic ' +
@@ -75,7 +75,7 @@ export const doc = {
75
75
  {
76
76
  type: 'docs.detail.section',
77
77
  description:
78
- 'A single ReferenceSection of the topic the first whose title contains the section query.',
78
+ 'A single ReferenceSection of the topic: the first whose title contains the section query.',
79
79
  },
80
80
  ],
81
81
  throws: [
@@ -14,10 +14,10 @@ export const doc = {
14
14
  displayName: 'doctor()',
15
15
  summary: 'Read-only project + environment health check.',
16
16
  description:
17
- 'Runs a series of side-effect-free diagnostics Node version, ' +
17
+ 'Runs a series of side-effect-free diagnostics: Node version, ' +
18
18
  '@astryxdesign/core install and version alignment with the CLI, installed ' +
19
19
  'themes and wiring, astryx.config validity, agent docs, core peer ' +
20
- 'dependencies, and the detected package manager and returns a structured ' +
20
+ 'dependencies, and the detected package manager, and returns a structured ' +
21
21
  'report. It only reads (never installs, writes, or mutates), so it is safe ' +
22
22
  'as a CI gate and for agents to invoke.',
23
23
  importPath: '@astryxdesign/cli/api',
@@ -34,7 +34,7 @@ export const doc = {
34
34
  {
35
35
  type: 'doctor',
36
36
  description:
37
- 'The diagnostic report: `data.checks` each with a stable id, label, `status` (`pass` | `warn` | `fail` | `info`), a one-line message, and a `fix` when the status is not `pass` plus `data.summary` with counts per status.',
37
+ 'The diagnostic report: `data.checks`, each with a stable id, label, `status` (`pass` | `warn` | `fail` | `info`), a one-line message, and a `fix` when the status is not `pass`; plus `data.summary` with counts per status.',
38
38
  },
39
39
  ],
40
40
  examples: [
@@ -70,7 +70,7 @@ export const doc = {
70
70
  {
71
71
  type: 'hook.list',
72
72
  description:
73
- "The catalog grouped by category. data.detail is the level ('names' | 'compact' | 'full') and data.components is the grouped map hook names, brief entries, or full HookDoc per entry.",
73
+ "The catalog grouped by category. data.detail is the level ('names' | 'compact' | 'full') and data.components is the grouped map: hook names, brief entries, or full HookDoc per entry.",
74
74
  },
75
75
  {
76
76
  type: 'hook.detail',
@@ -69,7 +69,7 @@ export const doc = {
69
69
  {
70
70
  type: 'init.remove',
71
71
  description:
72
- 'Confirmation that the managed agent-docs block was removed (`data.removed: true`) returned when `removeAgents` is set.',
72
+ 'Confirmation that the managed agent-docs block was removed (`data.removed: true`), returned when `removeAgents` is set.',
73
73
  },
74
74
  ],
75
75
  throws: [
@@ -17,7 +17,7 @@ export const doc = {
17
17
  'Tally integration issues by severity into error and warning counts.',
18
18
  description:
19
19
  'A synchronous helper that reduces an AstryxIntegrationIssue[] (as returned ' +
20
- 'by validateIntegration) to counts of errors and warnings the seam a ' +
20
+ 'by validateIntegration) to counts of errors and warnings: the seam a ' +
21
21
  'caller uses to decide an exit code or print a summary line. Issues of any ' +
22
22
  'other severity are ignored.',
23
23
  importPath: '@astryxdesign/cli/api',
@@ -45,7 +45,7 @@ export const doc = {
45
45
  {
46
46
  type: 'integration.validate',
47
47
  description:
48
- 'The result envelope: `data.name` and `data.version` of the validated package (both null when no local manifest is found), plus `data.issues` an AstryxIntegrationIssue[] of {code, severity: `warning` | `error`, message}.',
48
+ 'The result envelope: `data.name` and `data.version` of the validated package (both null when no local manifest is found), plus `data.issues`, an AstryxIntegrationIssue[] of {code, severity: `warning` | `error`, message}.',
49
49
  },
50
50
  ],
51
51
  examples: [
@@ -27,7 +27,7 @@ export const doc = {
27
27
  name: 'raw',
28
28
  type: 'unknown',
29
29
  description:
30
- 'The CLI stdout to parse a JSON string, or an object that was already parsed.',
30
+ 'The CLI stdout to parse: a JSON string, or an object that was already parsed.',
31
31
  required: true,
32
32
  },
33
33
  {
@@ -42,7 +42,7 @@ export const doc = {
42
42
  {
43
43
  type: 'any',
44
44
  description:
45
- 'The parsed envelope, guaranteed at runtime to carry the requested `type`. The published signature is untyped cast to the matching *Response type for typed access.',
45
+ 'The parsed envelope, guaranteed at runtime to carry the requested `type`. The published signature is untyped; cast to the matching *Response type for typed access.',
46
46
  },
47
47
  ],
48
48
  throws: [
@@ -14,7 +14,7 @@ export const doc = {
14
14
  displayName: 'isError()',
15
15
  summary: 'Did the CLI return an error envelope?',
16
16
  description:
17
- 'Tests a parsed response for an `error` key. Branch on this before touching `data` ' +
17
+ 'Tests a parsed response for an `error` key. Branch on this before touching `data`: ' +
18
18
  'and prefer the stable `code` field over matching the human-readable message, which is ' +
19
19
  'not a contract. Note this returns a plain boolean, not a TypeScript type predicate, so ' +
20
20
  'it does not narrow on its own: cast to the matching *Response type to get typed access.',
@@ -26,7 +26,7 @@ export const doc = {
26
26
  name: 'raw',
27
27
  type: 'unknown',
28
28
  description:
29
- 'The CLI stdout to parse a JSON string, or an object that was already parsed.',
29
+ 'The CLI stdout to parse: a JSON string, or an object that was already parsed.',
30
30
  required: true,
31
31
  },
32
32
  ],
@@ -34,7 +34,7 @@ export const doc = {
34
34
  {
35
35
  type: 'any',
36
36
  description:
37
- 'The { type, data, meta? } envelope, or a CLIError envelope. The published signature is intentionally untyped narrow it by casting to the matching *Response type exported from @astryxdesign/cli/json.',
37
+ 'The { type, data, meta? } envelope, or a CLIError envelope. The published signature is intentionally untyped; narrow it by casting to the matching *Response type exported from @astryxdesign/cli/json.',
38
38
  },
39
39
  ],
40
40
  throws: [
@@ -18,7 +18,7 @@ export const doc = {
18
18
  'The validator behind `astryx layout check`. Parses and validates a compressed XLE/XLO ' +
19
19
  'expression without generating any TSX, and echoes it back in both canonical surfaces ' +
20
20
  '(compact and outline). Validation failures are reported in the layout.check envelope ' +
21
- '(valid: false) with line/col and suggestions not thrown so callers can lint an ' +
21
+ '(valid: false) with line/col and suggestions (not thrown) so callers can lint an ' +
22
22
  'expression and surface fixes.',
23
23
  importPath: '@astryxdesign/cli/api',
24
24
  signature:
@@ -16,7 +16,7 @@ export const doc = {
16
16
  summary: 'Expand a validated layout expression into XDS TSX.',
17
17
  description:
18
18
  'The generator behind `astryx layout expand`. Parses and validates a compressed XLE/XLO ' +
19
- 'expression, then expands it into ready-to-use XDS TSX auto-routing structural children ' +
19
+ 'expression, then expands it into ready-to-use XDS TSX, auto-routing structural children ' +
20
20
  'into the right slots, scaffolding typed useState for interactive controls, and splicing or ' +
21
21
  'importing any referenced template blocks. Returns the code (and metadata) in a layout.expand ' +
22
22
  'envelope, optionally writing it to a path within cwd.',
@@ -15,7 +15,7 @@ export const doc = {
15
15
  displayName: 'layoutGrammar()',
16
16
  summary: 'Return the XLE/XLO grammar cheatsheet for this install.',
17
17
  description:
18
- 'The reference behind `astryx layout grammar` the agent cheatsheet for writing XLE/XLO ' +
18
+ 'The reference behind `astryx layout grammar`: the agent cheatsheet for writing XLE/XLO ' +
19
19
  "layout expressions, with the alias table generated from this branch's registry rather than " +
20
20
  'hand-maintained, so short names always reflect the components actually installed.',
21
21
  importPath: '@astryxdesign/cli/api',
@@ -88,7 +88,7 @@ export const doc = {
88
88
  },
89
89
  {
90
90
  code: 'ERR_AMBIGUOUS_COMPONENT',
91
- when: 'more than one package provides the component choose one with package',
91
+ when: 'more than one package provides the component; choose one with package',
92
92
  },
93
93
  {
94
94
  code: 'ERR_NO_SOURCE',
@@ -52,6 +52,32 @@ describe('stripTemplateAssetRefs', () => {
52
52
  const out = stripTemplateAssetRefs(src);
53
53
  expect(out).toBe(src);
54
54
  });
55
+
56
+ it('strips a /template-assets .mp4 source to an empty string, not the image data URI (#4780)', () => {
57
+ const src = "src: '/template-assets/Nature-1.mp4',";
58
+ const out = stripTemplateAssetRefs(src);
59
+ expect(out).toBe("src: '',");
60
+ expect(out).not.toContain('data:image/svg+xml,');
61
+ expect(out).not.toContain('/template-assets/');
62
+ });
63
+
64
+ it('strips other video extensions (.webm, .mov, .ogv) the same way', () => {
65
+ for (const ext of ['webm', 'mov', 'ogv']) {
66
+ const src = `src: '/template-assets/clip.${ext}',`;
67
+ const out = stripTemplateAssetRefs(src);
68
+ expect(out).toBe("src: '',");
69
+ }
70
+ });
71
+
72
+ it('still replaces an adjacent image reference with the placeholder when a video reference is also present', () => {
73
+ const src = [
74
+ "poster: '/template-assets/Nature-1-poster.jpg',",
75
+ "src: '/template-assets/Nature-1.mp4',",
76
+ ].join('\n');
77
+ const out = stripTemplateAssetRefs(src);
78
+ expect(out).toContain('data:image/svg+xml,');
79
+ expect(out).toContain("src: '',");
80
+ });
55
81
  });
56
82
 
57
83
  describe('template --skeleton component extraction (prefix-agnostic)', () => {
@@ -16,7 +16,7 @@ export const doc = {
16
16
  displayName: 'listThemes()',
17
17
  summary: 'Read the bundled-theme manifest and return its raw entries.',
18
18
  description:
19
- "The shared data layer behind theme list/add reads the CLI's bundled-theme manifest " +
19
+ "The shared data layer behind theme list/add: reads the CLI's bundled-theme manifest " +
20
20
  '(templates/themes/manifest.json, generated by scripts/generate-cli-themes.mjs) and returns ' +
21
21
  'the parsed entries. themeList() projects this into the theme.list envelope; themeAdd() ' +
22
22
  'resolves a slug against it. Returns synchronously.',
@@ -28,7 +28,7 @@ export const doc = {
28
28
  {
29
29
  type: 'BundledTheme[]',
30
30
  description:
31
- 'The parsed themes array from the bundle manifest each BundledTheme has slug, displayName, description, maintained, entry, exportName, and files. Empty when the manifest has not been generated.',
31
+ 'The parsed themes array from the bundle manifest: each BundledTheme has slug, displayName, description, maintained, entry, exportName, and files. Empty when the manifest has not been generated.',
32
32
  },
33
33
  ],
34
34
  throws: [
@@ -16,7 +16,7 @@ export const doc = {
16
16
  summary: 'Scaffold a bundled theme into a project as editable source.',
17
17
  description:
18
18
  "Copies a bundled theme's source (from the CLI's templates/themes/<slug>) into the " +
19
- "consumer's project so they own it no theme package needed. Writes are staged to temp " +
19
+ "consumer's project so they own it, no theme package needed. Writes are staged to temp " +
20
20
  'files then renamed, rolling back partials on failure so a failed write never leaves a ' +
21
21
  'half-written theme. Returns a theme.add receipt describing where the files landed and how ' +
22
22
  'to import them.',
@@ -20,7 +20,7 @@ export const doc = {
20
20
  'emits the exact CSS the <Theme> runtime does), writes a scoped CSS file, a JS module ' +
21
21
  'that re-exports the built theme, and a .d.ts (plus an optional .variants.d.ts when the ' +
22
22
  'theme adds custom prop values). With {check: true} it writes nothing and instead compares ' +
23
- 'each output against disk, returning the drift the CI guard for committed, generated theme CSS.',
23
+ 'each output against disk, returning the drift: the CI guard for committed, generated theme CSS.',
24
24
  importPath: '@astryxdesign/cli/api',
25
25
  signature:
26
26
  'themeBuild(file: string, options?: {out?: string, check?: boolean}, ctx?: {cwd?: string}): Promise<ThemeBuildResponse | ThemeBuildCheckResponse | null>',
@@ -51,7 +51,7 @@ export const doc = {
51
51
  name: 'options.check',
52
52
  type: 'boolean',
53
53
  description:
54
- 'Compile in memory and compare each output against what is on disk instead of writing the CI drift guard.',
54
+ 'Compile in memory and compare each output against what is on disk instead of writing: the CI drift guard.',
55
55
  default: 'false',
56
56
  },
57
57
  {
@@ -86,7 +86,7 @@ export const doc = {
86
86
  },
87
87
  {
88
88
  code: 'ERR_CORE_NOT_FOUND',
89
- when: '@astryxdesign/core/theme cannot be imported a built, resolvable @astryxdesign/core is required',
89
+ when: '@astryxdesign/core/theme cannot be imported; a built, resolvable @astryxdesign/core is required',
90
90
  },
91
91
  {
92
92
  code: 'ERR_WRITE_FAILED',
@@ -15,7 +15,7 @@ export const doc = {
15
15
  displayName: 'themeList()',
16
16
  summary: 'List the themes bundled with this CLI build.',
17
17
  description:
18
- 'Projects the bundled-theme manifest into the theme.list envelope the themes that themeAdd ' +
18
+ 'Projects the bundled-theme manifest into the theme.list envelope: the themes that themeAdd ' +
19
19
  'can scaffold. A pure projection of the manifest read by listThemes(); no I/O beyond that read, ' +
20
20
  'and it returns synchronously.',
21
21
  importPath: '@astryxdesign/cli/api',
@@ -26,7 +26,7 @@ export const doc = {
26
26
  {
27
27
  type: 'theme.list',
28
28
  description:
29
- 'Every bundled theme as a ThemeListEntry[] each entry has slug, displayName, description, and a maintained flag.',
29
+ 'Every bundled theme as a ThemeListEntry[]: each entry has slug, displayName, description, and a maintained flag.',
30
30
  },
31
31
  ],
32
32
  throws: [
@@ -86,7 +86,7 @@ export const doc = {
86
86
  {
87
87
  type: 'upgrade.list',
88
88
  description:
89
- 'Every available codemod, oldest→newest, as {name, title, version, optional} returned when `list` is set; nothing is run.',
89
+ 'Every available codemod, oldest→newest, as {name, title, version, optional}, returned when `list` is set; nothing is run.',
90
90
  },
91
91
  {
92
92
  type: 'upgrade.status',
@@ -15,7 +15,7 @@ export const docs = {
15
15
  content: [
16
16
  {
17
17
  type: 'prose',
18
- text: 'Astryx is built on modern web platform features: the Popover API, CSS anchor positioning, and CSS `light-dark()`. These let components stay small, accessible, and dependency-free, but they also set a floor on which browsers render everything correctly.',
18
+ text: 'Astryx is built on modern web platform features: the [`Popover`](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API) API, CSS anchor positioning, and CSS `light-dark()`. These let components stay small, accessible, and dependency-free, but they also set a floor on which browsers render everything correctly.',
19
19
  },
20
20
  {
21
21
  type: 'prose',
@@ -73,7 +73,7 @@ export const docs = {
73
73
  'Baseline 2026: the tightest requirement.',
74
74
  ],
75
75
  [
76
- 'Popover API',
76
+ '[`Popover`](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API) API',
77
77
  'Opens, stacks, and light-dismisses layered surfaces via the top layer.',
78
78
  'Baseline 2025.',
79
79
  ],
@@ -86,7 +86,7 @@ export const docs = {
86
86
  },
87
87
  {
88
88
  type: 'prose',
89
- text: 'The gap that matters is between Tier 1 and Tier 2: the Popover API and `light-dark()` reached wide availability well before anchor positioning. So in Tier 2 browsers, layered surfaces open and dismiss correctly; they just are not positioned. This is the one feature most consumers will need to reason about.',
89
+ text: 'The gap that matters is between Tier 1 and Tier 2: the [`Popover`](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API) API and `light-dark()` reached wide availability well before anchor positioning. So in Tier 2 browsers, layered surfaces open and dismiss correctly; they just are not positioned. This is the one feature most consumers will need to reason about.',
90
90
  },
91
91
  ],
92
92
  },
@@ -112,7 +112,7 @@ export const docs = {
112
112
  },
113
113
  {
114
114
  type: 'prose',
115
- text: 'If your product does not use any of these, it has no anchor-positioning requirement at all; it needs only `light-dark()` (Tier 2 and up) for correct theme colors. Layout, typography, forms, buttons, cards, tables, and navigation all work down to Tier 2 with no special handling.',
115
+ text: 'If your product does not use any of these, it has no anchor-positioning requirement at all; it needs only `light-dark()` (Tier 2 and up) for correct theme colors. Page layout, typography, forms, buttons, cards, tables, and navigation all work down to Tier 2 with no special handling.',
116
116
  },
117
117
  ],
118
118
  },
@@ -123,7 +123,7 @@ export const docs = {
123
123
  type: 'list',
124
124
  style: 'do',
125
125
  items: [
126
- 'Components never throw on missing platform APIs. Where a browser lacks the Popover API, layers fall back to plain visibility instead of crashing.',
126
+ 'Components never throw on missing platform APIs. Where a browser lacks the [`Popover`](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API) API, layers fall back to plain visibility instead of crashing.',
127
127
  'Tier 1 and Tier 2 are officially supported and tested.',
128
128
  'Non-layered components render correctly down to Tier 2.',
129
129
  ],
@@ -192,7 +192,7 @@ const hasLightDark = CSS.supports('color', 'light-dark(#000, #fff)');`,
192
192
  },
193
193
  {
194
194
  type: 'prose',
195
- text: 'This is not an arbitrary window: Baseline − 2 is close to where anchor positioning stops being available while the Popover API and `light-dark()` still are, so the tier boundary tracks a real capability edge, not a guessed date. The version floors above are reviewed and advanced roughly once a year as new Baseline years land. Always feature-detect rather than hardcoding version numbers, so your app adapts automatically as the platform moves.',
195
+ text: 'This is not an arbitrary window: Baseline − 2 is close to where anchor positioning stops being available while the [`Popover`](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API) API and `light-dark()` still are, so the tier boundary tracks a real capability edge, not a guessed date. The version floors above are reviewed and advanced roughly once a year as new Baseline years land. Always feature-detect rather than hardcoding version numbers, so your app adapts automatically as the platform moves.',
196
196
  },
197
197
  ],
198
198
  },
@@ -114,9 +114,9 @@ export const brandTheme = defineTheme({
114
114
  type: 'list',
115
115
  style: 'ordered',
116
116
  items: [
117
- 'Add the name to IconName type in packages/core/src/Icon/globalIconRegistry.tsx',
118
- 'Add the default SVG to packages/core/src/Icon/defaultIcons.tsx',
119
- 'Add a row to the Available Names table in packages/cli/docs/icons.doc.mjs',
117
+ 'Add the name to IconName type in `packages/core/src/Icon/globalIconRegistry.tsx`',
118
+ 'Add the default SVG to `packages/core/src/Icon/defaultIcons.tsx`',
119
+ 'Add a row to the Available Names table in `packages/cli/assets/docs/icons.doc.mjs`',
120
120
  ],
121
121
  },
122
122
  ],
@@ -40,7 +40,7 @@ export const docs = {
40
40
  'Keep illustrations consistent in style across the product.',
41
41
  'Use simple, flat illustrations that work in both light and dark mode.',
42
42
  'Size illustrations proportionally to the container, typically 120\u2013240px.',
43
- 'Center illustrations with supporting text below.',
43
+ 'Place illustrations centered with supporting text below.',
44
44
  ],
45
45
  },
46
46
  {
@@ -59,7 +59,7 @@ export const docs = {
59
59
  content: [
60
60
  {
61
61
  type: 'prose',
62
- text: 'Center illustrations inside Center with supporting text stacked below. Typical illustration sizes range from 120px for inline empty states to 240px for full-page onboarding screens. Always pair the illustration with a heading and optional body text to explain what the user should do next.',
62
+ text: 'Place illustrations inside Center with supporting text stacked below. Typical illustration sizes range from 120px for inline empty states to 240px for full-page onboarding screens. Always pair the illustration with a heading and optional body text to explain what the user should do next.',
63
63
  },
64
64
  {
65
65
  type: 'code',
@@ -300,7 +300,7 @@ export default function App() {
300
300
  content: [
301
301
  {
302
302
  type: 'prose',
303
- text: 'Astryx generates a `pseudo` locale that wraps every string in `⟦…⟧` and replaces letters with accented look-alikes. Switch to it in development to catch hardcoded astryx strings and layout issues caused by longer text.',
303
+ text: 'Astryx generates a `pseudo` locale that wraps every string in `⟦…⟧` and replaces letters with accented look-alikes. Turn it on in development to catch hardcoded astryx strings and layout issues caused by longer text.',
304
304
  },
305
305
  {
306
306
  type: 'code',
@@ -350,7 +350,7 @@ if (getComputedStyle(button).paddingInline === '0px') {
350
350
  'Run the app in light and dark mode and check that surfaces, borders, text, icons, hover states, focus rings, and status colors flow together.',
351
351
  'Open the command palette from the shell, type into it, select items by keyboard, and confirm focus returns to the trigger.',
352
352
  'Check the SideNav at collapsed, expanded, active, hover, nested, and mobile states.',
353
- 'Verify settings popovers and dialogs in jsdom and in a real browser because native dialog and Popover APIs may need test shims.',
353
+ 'Verify settings popovers and dialogs in jsdom and in a real browser because the native dialog and [`Popover`](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API) APIs may need test shims.',
354
354
  'Search for leftover hardcoded Tailwind colors, arbitrary hex values, and one-off hover colors after each route migration.',
355
355
  'Run component tests, build, and at least one browser screenshot pass for each migrated route.',
356
356
  ],
@@ -39,7 +39,7 @@ export const docs = {
39
39
  style: 'ordered',
40
40
  items: [
41
41
  'Use components for everything they cover',
42
- 'Layout is frame-first: pick the shell and budget regions before writing content (see \`astryx docs layout\`)',
42
+ 'Page layout is frame-first: pick the shell and budget regions before writing content (see \`astryx docs layout\`)',
43
43
  'Dense data renders as rows (Table, List/Item), edge-to-edge with dividers; Card is for widgets, galleries, and settings groups',
44
44
  'StyleX or Tailwind for custom styling; both are first-class (see \`astryx docs styling\`)',
45
45
  'Semantic tokens, not hardcoded values (see \`astryx docs tokens\`)',
@@ -56,7 +56,7 @@ export const docs = {
56
56
  '`@astryxdesign/core/tailwind-theme.css`',
57
57
  ],
58
58
  [
59
- 'Token resolver APIs',
59
+ 'Design token resolver APIs',
60
60
  'JavaScript needs token values for charts, canvas, SVG, or config objects',
61
61
  "`resolveThemeToken(theme, '--color-data-categorical-blue', {mode})`",
62
62
  ],
@@ -22,10 +22,10 @@ export const docs = {
22
22
  type: 'table',
23
23
  headers: ['Approach', 'Use for', 'Example'],
24
24
  rows: [
25
- ['StyleX', 'Component-specific overrides, reusable styles, pseudo-classes, and typed tokens', 'const styles = stylex.create(...); <Button xstyle={styles.save} />'],
26
- ['Tailwind utilities', 'Layout, wrappers, and utility styling', 'className="flex gap-3 p-4"'],
27
- ['className', 'Integrating with external CSS or Tailwind on components', 'className="my-card shadow-lg"'],
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)'"],
25
+ ['StyleX', 'Component-specific overrides, reusable styles, pseudo-classes, and typed tokens', '`const styles = stylex.create(...); <Button xstyle={styles.save} />`'],
26
+ ['Tailwind utilities', 'Page layout, wrappers, and utility styling', '`className="flex gap-3 p-4"`'],
27
+ ['className', 'Integrating with external CSS or Tailwind on components', '`className="my-card shadow-lg"`'],
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)'`"],
29
29
  ],
30
30
  },
31
31
  {
@@ -106,7 +106,7 @@ function App() {
106
106
  [
107
107
  'Y2K',
108
108
  "import {y2kTheme} from '@astryxdesign/theme-y2k'",
109
- 'Playful Y2K pop; periwinkle body, holographic accents, Poppins + Crimson Text.',
109
+ 'Playful Y2K pop; periwinkle body, holographic accents, Poppins + `Crimson Text`.',
110
110
  ],
111
111
  ],
112
112
  },
@@ -510,7 +510,7 @@ import './themes/ocean.css';
510
510
  content: [
511
511
  {
512
512
  type: 'prose',
513
- text: 'Wrap different sections in separate <Theme> providers.',
513
+ text: 'Wrap different sections in separate [`<Theme>`](/components/Theme) providers.',
514
514
  },
515
515
  {
516
516
  type: 'code',
@@ -606,7 +606,7 @@ function ChartConfig() {
606
606
  },
607
607
  {
608
608
  type: 'prose',
609
- text: 'Prefer CSS variables, StyleX token imports, xstyle, or className for ordinary styling. To change the theme or mode, manage state at the app level and pass it to <Theme>.',
609
+ text: 'Prefer CSS variables, StyleX token imports, xstyle, or className for ordinary styling. To change the theme or mode, manage state at the app level and pass it to `<Theme>`.',
610
610
  },
611
611
  {
612
612
  type: 'prose',
@@ -122,7 +122,7 @@ export const docs = {
122
122
  },
123
123
  {
124
124
  type: 'prose',
125
- text: 'Display text often needs heading semantics for accessibility. Use the type prop on Heading to apply display styling while preserving the correct HTML element: <Heading level={1} type="display-1"> gives you display-1 styling with an <h1> tag, so screen readers see the correct document outline.',
125
+ text: 'Display text often needs heading semantics for accessibility. Use the type prop on Heading to apply display styling while preserving the correct HTML element: `<Heading level={1} type="display-1">` gives you display-1 styling with an `<h1>` tag, so screen readers see the correct document outline.',
126
126
  },
127
127
  ],
128
128
  },
@@ -205,7 +205,7 @@ const denseTheme = defineTheme({
205
205
  items: [
206
206
  'Use Heading for document headings and Text for everything else; they apply the full type scale automatically.',
207
207
  'Adjust typography holistically: change base and ratio in defineTheme to shift the entire ramp (e.g. { base: 16, ratio: 1.25 } for editorial, { base: 12, ratio: 1.125 } for dense UI).',
208
- 'Use display types with as="h1" (or h2/h3) when display text is a page heading; this preserves accessibility while giving you display-level sizing. Or better, use <Heading level={1} type="display-1"> which handles both semantics and styling.',
208
+ 'Use display types with as="h1" (or h2/h3) when display text is a page heading; this preserves accessibility while giving you display-level sizing. Or better, use `<Heading level={1} type="display-1">` which handles both semantics and styling.',
209
209
  'Let line-height snap to the 4px grid via the type scale; expandTypeScale computes leading automatically from base and ratio.',
210
210
  'Use the supporting type for secondary information: timestamps, helper text, metadata, captions.',
211
211
  'Use accessibilityLevel on Heading when the visual hierarchy doesn\u0027t match the document outline (e.g. sidebar or card headings).',