@astryxdesign/cli 0.7.2-canary.7462c41 → 0.7.2-canary.7ae39ea

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 (111) hide show
  1. package/README.md +6 -6
  2. package/api/doctor/doctor.mjs +27 -3
  3. package/api/doctor/doctor.test.mjs +43 -0
  4. package/api/integration/integrationComponentConflicts.doc.mjs +9 -3
  5. package/api/integration/validateIntegration.doc.mjs +3 -1
  6. package/api/search/search.d.mts +59 -6
  7. package/api/search/search.domain-priority.test.mjs +15 -0
  8. package/api/search/search.mjs +468 -28
  9. package/api/search/search.test.mjs +139 -0
  10. package/assets/docs/styling-overview.doc.mjs +1 -1
  11. package/assets/docs/tree/add-a-component.doc.mjs +1 -1
  12. package/assets/docs/tree/add-a-theme.doc.mjs +1 -1
  13. package/assets/docs/tree/add-a-topic.doc.mjs +10 -7
  14. package/assets/docs/tree/agent-guidance.doc.mjs +2 -2
  15. package/assets/docs/tree/block-template.doc.mjs +6 -18
  16. package/assets/docs/tree/build-the-template.doc.mjs +1 -1
  17. package/assets/docs/tree/check-the-props.doc.mjs +1 -1
  18. package/assets/docs/tree/check-your-docs.doc.mjs +10 -5
  19. package/assets/docs/tree/checks.doc.mjs +3 -3
  20. package/assets/docs/tree/codemods.doc.mjs +4 -4
  21. package/assets/docs/tree/component-family.doc.mjs +3 -5
  22. package/assets/docs/tree/component-imports.doc.mjs +2 -2
  23. package/assets/docs/tree/components.doc.mjs +1 -1
  24. package/assets/docs/tree/debug-and-gap-reports.doc.mjs +7 -18
  25. package/assets/docs/tree/define-the-theme.doc.mjs +6 -5
  26. package/assets/docs/tree/describe-the-component.doc.mjs +1 -1
  27. package/assets/docs/tree/docs.doc.mjs +3 -3
  28. package/assets/docs/tree/document-the-template.doc.mjs +1 -1
  29. package/assets/docs/tree/document-the-theme.doc.mjs +1 -1
  30. package/assets/docs/tree/export-template-assets.doc.mjs +1 -1
  31. package/assets/docs/tree/extend-or-replace.doc.mjs +6 -6
  32. package/assets/docs/tree/fonts-and-assets.doc.mjs +2 -2
  33. package/assets/docs/tree/generate-a-palette.doc.mjs +5 -3
  34. package/assets/docs/tree/grade-template-with-agent.doc.mjs +1 -1
  35. package/assets/docs/tree/integrations.doc.mjs +4 -0
  36. package/assets/docs/tree/links.doc.mjs +5 -4
  37. package/assets/docs/tree/migration-setup.doc.mjs +1 -0
  38. package/assets/docs/tree/migration-verification.doc.mjs +0 -1
  39. package/assets/docs/tree/migration.doc.mjs +0 -1
  40. package/assets/docs/tree/package-and-test.doc.mjs +1 -1
  41. package/assets/docs/tree/page-template.doc.mjs +3 -7
  42. package/assets/docs/tree/publishing.doc.mjs +1 -1
  43. package/assets/docs/tree/quick-start.doc.mjs +7 -19
  44. package/assets/docs/tree/replace-a-core-component.doc.mjs +4 -6
  45. package/assets/docs/tree/replace-a-core-template.doc.mjs +5 -7
  46. package/assets/docs/tree/sections-and-placement.doc.mjs +4 -6
  47. package/assets/docs/tree/see-it-in-an-app.doc.mjs +4 -2
  48. package/assets/docs/tree/short-and-findable.doc.mjs +6 -5
  49. package/assets/docs/tree/single-component.doc.mjs +12 -4
  50. package/assets/docs/tree/start-a-template.doc.mjs +3 -3
  51. package/assets/docs/tree/subcomponent.doc.mjs +6 -6
  52. package/assets/docs/tree/template-assets.doc.mjs +2 -2
  53. package/assets/docs/tree/template-doc-overview.doc.mjs +4 -15
  54. package/assets/docs/tree/template-fonts.doc.mjs +1 -1
  55. package/assets/docs/tree/template-icons.doc.mjs +1 -1
  56. package/assets/docs/tree/template-images-media.doc.mjs +1 -1
  57. package/assets/docs/tree/template-styles.doc.mjs +2 -2
  58. package/assets/docs/tree/templates.doc.mjs +1 -1
  59. package/assets/docs/tree/test-in-an-app.doc.mjs +3 -3
  60. package/assets/docs/tree/test-template-in-app.doc.mjs +1 -1
  61. package/assets/docs/tree/tokens-and-setup.doc.mjs +19 -15
  62. package/assets/docs/tree/troubleshooting.doc.mjs +4 -4
  63. package/assets/docs/tree/upgrading.doc.mjs +3 -3
  64. package/assets/docs/tree/use-a-theme-in-an-app.doc.mjs +3 -1
  65. package/assets/docs/tree/verify-packed-template.doc.mjs +1 -1
  66. package/assets/docs/tree/versioning.doc.mjs +6 -6
  67. package/assets/docs/tree/write-the-template-file.doc.mjs +2 -2
  68. package/authoring/codemod/codemod.doc.mjs +7 -3
  69. package/authoring/config/config.doc.mjs +9 -6
  70. package/authoring/config/type.ts +4 -2
  71. package/authoring/discover/discover.doc.mjs +1 -1
  72. package/authoring/doctypes/base/graph-fields.doc.mjs +6 -4
  73. package/authoring/doctypes/command/command.doc.mjs +14 -12
  74. package/authoring/doctypes/component/component.doc.mjs +28 -25
  75. package/authoring/doctypes/component/type.ts +7 -5
  76. package/authoring/doctypes/enum/enum.doc.mjs +7 -4
  77. package/authoring/doctypes/function/function.doc.mjs +9 -8
  78. package/authoring/doctypes/hook/hook.doc.mjs +5 -4
  79. package/authoring/doctypes/namespace/namespace.doc.mjs +7 -6
  80. package/authoring/doctypes/reference/reference.doc.mjs +11 -10
  81. package/authoring/doctypes/schema/schema.doc.mjs +9 -9
  82. package/authoring/doctypes/template/template.doc.mjs +2 -2
  83. package/authoring/doctypes/theme/theme.doc.mjs +2 -2
  84. package/authoring/gap-report/gap-report.doc.mjs +2 -2
  85. package/authoring/identity/identity.doc.mjs +3 -3
  86. package/authoring/integration/integration.doc.mjs +4 -3
  87. package/clients/cli/commands/cli-postinstall.test.mjs +49 -1
  88. package/clients/cli/commands/doctor-integration-components.doc.mjs +3 -1
  89. package/clients/cli/commands/doctor-integration-validate.doc.mjs +3 -1
  90. package/clients/cli/commands/setup-nudge.test.mjs +79 -1
  91. package/clients/cli/commands/swizzle.mjs +5 -3
  92. package/clients/cli/commands/swizzle.routing.test.mjs +18 -1
  93. package/clients/cli/index.mjs +29 -5
  94. package/foundation/agent-docs/agent-doc-state.d.mts +14 -0
  95. package/foundation/agent-docs/agent-doc-state.mjs +38 -0
  96. package/foundation/agent-docs/agent-docs.d.mts +2 -1
  97. package/foundation/agent-docs/agent-docs.mjs +8 -6
  98. package/foundation/discovery/authoring-self-docs.mjs +1 -1
  99. package/foundation/discovery/doc-types.d.mts +1 -1
  100. package/foundation/discovery/doc-types.mjs +3 -3
  101. package/foundation/discovery/doc-types.test.mjs +48 -0
  102. package/foundation/discovery/project-typescript.d.mts +11 -2
  103. package/foundation/discovery/project-typescript.mjs +32 -4
  104. package/foundation/discovery/prop-drift.d.mts +1 -1
  105. package/foundation/discovery/prop-drift.mjs +2 -2
  106. package/foundation/discovery/prop-drift.test.mjs +55 -2
  107. package/foundation/discovery/type-text.mjs +1 -1
  108. package/foundation/discovery/type-text.test.mjs +1 -1
  109. package/foundation/doc-compiler/doc-loads.test.mjs +6 -2
  110. package/package.json +9 -9
  111. package/scripts/postinstall.mjs +3 -3
@@ -1,9 +1,9 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/docs/extend-or-replace`: take over an
5
- * existing topic with `replaces`, merge sections into one with `extends`, and
6
- * check overlaps with Core topics.
4
+ * @file `astryx docs cli/integrations/building-blocks/docs/extend-or-replace`:
5
+ * take over an existing topic with `replaces`, merge sections into one with
6
+ * `extends`, and check overlaps with Core topics.
7
7
  */
8
8
 
9
9
  /** @type {import('@astryxdesign/cli/authoring').ReferenceDoc} */
@@ -46,7 +46,7 @@ export const docs = {
46
46
  content: [
47
47
  {
48
48
  type: 'prose',
49
- text: 'Set `extends` to merge sections into an existing topic instead of owning it. A section with the same key replaces the base section, and a new section is added at the end.',
49
+ text: 'Set `extends` to merge sections into an existing topic instead of owning it. A section replaces the base section it matches, and a section that matches none is added at the end.',
50
50
  },
51
51
  {
52
52
  type: 'code',
@@ -63,7 +63,7 @@ export const docs = {
63
63
  type: 'list',
64
64
  style: 'unordered',
65
65
  items: [
66
- "A section's key is its `id`, or a key made from its title. Read the base topic's keys with `--index`.",
66
+ "Read the base topic's keys with `--index`, and give a section that replaces one that key as its `id`. A section without an `id` matches only a base section with exactly its title, or one whose `id` is the key its title makes, so `Integration Themes` is added beside a base `Integration themes` that has no `id`.",
67
67
  "The topic keeps the base's title and description, and readers open it by the base's name.",
68
68
  'Replace the `Overview` placeholder that `integration add` writes, or it is added to the base topic.',
69
69
  "Extend a topic to correct or add to it. A copy made with `replaces` stops getting the owner's fixes.",
@@ -87,7 +87,7 @@ export const docs = {
87
87
  {
88
88
  type: 'code',
89
89
  lang: 'text',
90
- code: 'severity: [info]\ntopic: acme-getting-started\nrelationship: replaces\ncoreTopic: getting-started\nmessage: Intentional override: "acme-getting-started" replaces the Core topic "getting-started".\n\nseverity: [fail]\ntopic: tokens\nrelationship: accidental\ncoreTopic: tokens\nmessage: Accidental conflict: "tokens" is already a Core topic. Rename it, declare replaces: \'tokens\' to take it over, or declare extends: \'tokens\' to merge sections.',
90
+ code: 'severity: [info]\ntopic: acme-getting-started\nrelationship: replaces\ncoreTopic: getting-started\nmessage: Intentional override: "acme-getting-started" replaces the Core topic "getting-started".\n\nseverity: [fail]\ntopic: color\nrelationship: accidental\ncoreTopic: color\nmessage: Accidental conflict: "color" is already a Core topic. Rename it, declare replaces: \'color\' to take it over, or declare extends: \'color\' to merge sections.',
91
91
  },
92
92
  {
93
93
  type: 'list',
@@ -61,7 +61,7 @@ export const oceanTheme = defineTheme({
61
61
  },
62
62
  {
63
63
  type: 'prose',
64
- text: 'The stylesheet can contain self-hosted `@font-face` rules or import a hosted stylesheet. A hosted `@import` is simple, but it delays loading compared with a preconnected `<link>`; choose that trade-off deliberately. If the app loads the same family outside the generated module, Doctor warns because it cannot prove the loader, but the warning does not fail the app.',
64
+ text: 'The stylesheet can contain self-hosted `@font-face` rules or import a hosted stylesheet. A hosted `@import` is simple, but it delays loading compared with a preconnected `<link>`; choose that trade-off deliberately. Doctor warns when it cannot prove the loader — a hosted `@import`, or no font stylesheet while the app loads the family itself — but the warning does not fail the app.',
65
65
  },
66
66
  {
67
67
  type: 'code',
@@ -83,7 +83,7 @@ export const oceanTheme = defineTheme({
83
83
  'Load every weight and style the theme uses. Do not let the browser synthesize bold or italic.',
84
84
  'Include self-hosted font files and their licenses in the packed package.',
85
85
  'Keep CSS and font assets side-effectful so a bundler does not remove the loader.',
86
- 'Run `integration verify`; it fails when an exported font stylesheet or one of its packed files cannot resolve.',
86
+ 'Run `integration verify`; it fails when an exported font stylesheet cannot resolve, but it does not check the font files the stylesheet names.',
87
87
  ],
88
88
  },
89
89
  ],
@@ -21,7 +21,7 @@ export const docs = {
21
21
  content: [
22
22
  {
23
23
  type: 'prose',
24
- text: 'A theme needs dozens of related colors — shades of each brand color for backgrounds, borders, text, and states, in both light and dark mode. A palette is that full set of shades. Rather than hand-pick every one, you name a few seed colors and generate the rest, so the shades stay consistent and keep enough contrast to read.',
24
+ text: 'A theme needs dozens of related colors — shades of each brand color for backgrounds, borders, text, and states, in both light and dark mode. A palette is that full set of shades. Rather than hand-pick every one, you name a few seed colors and generate the rest, so the shades stay consistent.',
25
25
  },
26
26
  {
27
27
  type: 'prose',
@@ -50,7 +50,9 @@ npx astryx theme palette generate themes/ocean/palette.config.json \\
50
50
  lang: 'text',
51
51
  code: `[ok] Wrote themes/ocean/tokens/ocean.palette.ts
52
52
 
53
- [ok] Wrote themes/ocean/tokens/ocean.palette.receipt.json`,
53
+ [ok] Wrote themes/ocean/tokens/ocean.palette.receipt.json
54
+
55
+ Review and edit the candidate before adopting it as theme-owned palette data.`,
54
56
  },
55
57
  {
56
58
  type: 'prose',
@@ -58,7 +60,7 @@ npx astryx theme palette generate themes/ocean/palette.config.json \\
58
60
  },
59
61
  {
60
62
  type: 'prose',
61
- text: 'Add `--preview <file>.html` to also get a web page showing every shade, so you can eyeball the palette in a browser. Write it outside `themes/` so it does not ship in your package. The full list of config fields and options is in {@link command:theme palette generate}.',
63
+ text: 'Add `--preview <file>.html` to also get a web page showing every shade, so you can eyeball the palette in a browser. Write it outside `themes/` so it does not ship in your package. Every option is in {@link command:theme palette generate}, and the config it reads is described in {@link function:generateTonalPalette}.',
62
64
  },
63
65
  ],
64
66
  },
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/building-blocks/templates/grade-template-with-agent`:
4
+ * @file `astryx docs cli/integrations/building-blocks/templates/write-good-templates/grade-template-with-agent`:
5
5
  * give an agent the canonical rubric and require a reproducible template grade.
6
6
  */
7
7
 
@@ -36,6 +36,10 @@ export const docs = {
36
36
  type: 'prose',
37
37
  text: 'An integration can also replace a built-in template or doc. To start, install `@astryxdesign/cli` and open {@link generic:quick-start}.',
38
38
  },
39
+ {
40
+ type: 'prose',
41
+ text: 'Every field of every file you write for an integration is in {@link generic:authoring}.',
42
+ },
39
43
  {
40
44
  type: 'prose',
41
45
  text: "Every integration runs `astryx integration check --strict` in its own build: it is required, not optional, so a doc, prop, or link that stops matching the code fails your build instead of your users' apps. See {@link generic:checks}.",
@@ -1,8 +1,9 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/docs/links`: link one doc to another by
5
- * identity, link the CLI's docs, and fix a link that names no doc.
4
+ * @file `astryx docs cli/integrations/building-blocks/docs/links`: link one doc
5
+ * to another by identity, link the CLI's docs, and fix a link that names no
6
+ * doc.
6
7
  */
7
8
 
8
9
  /** @type {import('@astryxdesign/cli/authoring').ReferenceDoc} */
@@ -36,7 +37,7 @@ export const docs = {
36
37
  type: 'list',
37
38
  style: 'unordered',
38
39
  items: [
39
- 'The kind is `generic` for a topic or guide, `namespace` for a docs section, `command` or `function` for a CLI command or API function, `component` for a component, and `page` or `block` for a template.',
40
+ 'The kind is `generic` for a topic or guide, `namespace` for a docs section, `command` or `function` for a CLI command or API function, `schema` or `enum` for a schema or a fixed set of values, `component` for a component, and `page` or `block` for a template.',
40
41
  'Name a component by its export name and a template by its id. Its link reads as the command that opens it, such as `astryx component AcmeCarousel --package @acme/widgets`.',
41
42
  'Inside backticks or a code block, link syntax prints as written.',
42
43
  ],
@@ -89,7 +90,7 @@ export const docs = {
89
90
  style: 'unordered',
90
91
  items: [
91
92
  'The warning keeps exit code 0, so read the report before you ship; see {@link generic:check-your-docs}.',
92
- 'A stable CLI before 0.7.0 does not read links: it prints each one as written. See {@link generic:versioning}.',
93
+ 'Published 0.6.4 and later read links. An older CLI, such as published 0.6.3, prints each one as written; see {@link generic:versioning}.',
93
94
  ],
94
95
  },
95
96
  ],
@@ -21,6 +21,7 @@ export const docs = {
21
21
  'reset',
22
22
  'smoke test',
23
23
  'layer audit',
24
+ 'cascade layers',
24
25
  'Tailwind coexistence',
25
26
  ],
26
27
 
@@ -19,7 +19,6 @@ export const docs = {
19
19
  'verification',
20
20
  'checklist',
21
21
  'AI prompt',
22
- 'keyboard navigation',
23
22
  ],
24
23
 
25
24
  sections: [
@@ -19,7 +19,6 @@ export const docs = {
19
19
  'Tailwind',
20
20
  'shadcn',
21
21
  'Radix',
22
- 'cascade layers',
23
22
  'coexistence',
24
23
  ],
25
24
  slots: {
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/templates/package-and-test`:
4
+ * @file `astryx docs cli/integrations/building-blocks/templates/build-the-template/package-and-test`:
5
5
  * expose a template from its package and prove the copied result in an app.
6
6
  */
7
7
 
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/templates/document-the-template/page-template`:
4
+ * @file `astryx docs cli/integrations/building-blocks/templates/document-the-template/page-template`:
5
5
  * the page-only fields that help people find a page.
6
6
  */
7
7
 
@@ -49,12 +49,8 @@ export default {
49
49
  title: 'Help people find the page',
50
50
  content: [
51
51
  {
52
- type: 'reference',
53
- target: 'schema:template-doc',
54
- projection: {
55
- fields: ['category', 'scaffold'],
56
- },
57
- presentation: 'full',
52
+ type: 'prose',
53
+ text: 'Every field is in {@link schema:template-doc}.',
58
54
  },
59
55
  {
60
56
  type: 'list',
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/publishing`: publish an integration to
4
+ * @file `astryx docs cli/integrations/ship/publishing`: publish an integration to
5
5
  * npm, use release tags, and check the package before and after.
6
6
  */
7
7
 
@@ -34,21 +34,22 @@ export const docs = {
34
34
  },
35
35
  {
36
36
  type: 'prose',
37
- text: 'An integration starts as a normal npm package. Make a folder for it, create a package.json inside that folder, give the package a name, then install the Astryx CLI, Core, and TypeScript for development.',
37
+ text: 'An integration starts as a normal npm package. Make a folder for it, create a package.json inside that folder, give the package a name, make it an ES module, then install the Astryx CLI, Core, and TypeScript for development.',
38
38
  },
39
39
  {
40
40
  type: 'code',
41
41
  lang: 'bash',
42
- code: "mkdir acme-widgets && cd acme-widgets\nnpm init -y\nnpm pkg set name=@acme/astryx-widgets\nnpm pkg set 'exports={}' --json\nnpm install -D @astryxdesign/cli @astryxdesign/core typescript@6",
42
+ code: "mkdir acme-widgets && cd acme-widgets\nnpm init -y\nnpm pkg set name=@acme/astryx-widgets type=module\nnpm pkg set 'exports={}' --json\nnpm install -D @astryxdesign/cli @astryxdesign/core typescript@6",
43
43
  },
44
44
  {
45
45
  type: 'list',
46
46
  style: 'unordered',
47
47
  items: [
48
+ 'Set `"type": "module"`: the `.js` files the CLI generates, such as a built theme, are ES modules, and Node fails to load them in a package marked `"type": "commonjs"`, which `npm init -y` writes on npm 11.',
48
49
  'Start with `"exports": {}`: each component and template you add then writes the public import that `integration verify` resolves.',
49
50
  'Run the CLI as `npx astryx`, which runs the `@astryxdesign/cli` you installed as a devDependency.',
50
51
  'Component commands read Core, so they need `@astryxdesign/core` installed.',
51
- "The checks compare your docs with your code through TypeScript's JavaScript compiler API, so they need `typescript` 5.0 through 6 installed. TypeScript 7 does not ship that API, and with it the checks skip those comparisons.",
52
+ "The checks compare your docs with your code through TypeScript's JavaScript compiler API, which `typescript` 5.0 through 6 has. TypeScript 7 does not ship that API: on TypeScript 7, also install `@typescript/typescript6`, its TypeScript 6 API package, and the checks use it.",
52
53
  ],
53
54
  },
54
55
  {
@@ -200,7 +201,7 @@ export const docs = {
200
201
  ],
201
202
  [
202
203
  '`peerDependencies`',
203
- '`@astryxdesign/cli`; add `@astryxdesign/core` when your code imports it',
204
+ '`@astryxdesign/core` when your code imports it; `@astryxdesign/cli`, optional, when you ship a feature that needs a newer CLI ({@link generic:versioning})',
204
205
  'The app supplies these packages for your integration.',
205
206
  ],
206
207
  [
@@ -254,21 +255,8 @@ export const docs = {
254
255
  text: 'The file tells the CLI where this package keeps its integration items. Edit it only when you want a custom root or another optional setting. Paths are relative to package.json, and later adds keep a custom path you already set.',
255
256
  },
256
257
  {
257
- type: 'reference',
258
- target: 'schema:integration',
259
- projection: {
260
- fields: [
261
- 'providerId',
262
- 'components',
263
- 'templates',
264
- 'codemods',
265
- 'docs',
266
- 'themes',
267
- 'agentDocs',
268
- 'issuesUrl',
269
- ],
270
- },
271
- presentation: 'full',
258
+ type: 'prose',
259
+ text: 'Every field is in {@link schema:integration}.',
272
260
  },
273
261
  {
274
262
  type: 'heading',
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/components/replace-a-core-component`:
4
+ * @file `astryx docs cli/integrations/building-blocks/components/replace-a-core-component`:
5
5
  * intentionally make an integration component the default for a Core identity.
6
6
  */
7
7
 
@@ -65,10 +65,8 @@ export default {
65
65
  };`,
66
66
  },
67
67
  {
68
- type: 'reference',
69
- target: 'schema:component-doc',
70
- projection: {fields: ['replaces']},
71
- presentation: 'full',
68
+ type: 'prose',
69
+ text: 'Every field is in {@link schema:component-doc}.',
72
70
  },
73
71
  {
74
72
  type: 'prose',
@@ -87,7 +85,7 @@ export default {
87
85
  type: 'list',
88
86
  style: 'unordered',
89
87
  items: [
90
- 'Any `@astryxdesign/cli` range that starts at that release or later turns it on, including the `>=0.7.0` that earlier `integration add theme` and `integration add doc --parent` wrote.',
88
+ 'Any `@astryxdesign/cli` range that starts at that release or later turns it on, including the `>=0.7.0` that `integration add doc --parent` wrote in published 0.6.4 and 0.6.5, and `integration add theme` in published 0.6.5.',
91
89
  'Without such a range, the component keeps its own name, the Core component stays selected (a component named like its target stays ambiguous by that bare name, as before), and `doctor integration components` warns with the range to add. Apps that load such a package see no change.',
92
90
  '`replaces` names the Core `ComponentDoc` identity, not its display label, import path, or a standalone hook.',
93
91
  'Your component may keep a distinct name or use the same name as the target. A distinct name remains directly addressable on older CLIs that ignore `replaces`.',
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/templates/document-the-template/replace-a-core-template`:
4
+ * @file `astryx docs cli/integrations/building-blocks/templates/document-the-template/replace-a-core-template`:
5
5
  * deliberately replace one Core template through template metadata.
6
6
  */
7
7
 
@@ -67,10 +67,8 @@ export default {
67
67
  };`,
68
68
  },
69
69
  {
70
- type: 'reference',
71
- target: 'schema:template-doc',
72
- projection: {fields: ['replaces']},
73
- presentation: 'full',
70
+ type: 'prose',
71
+ text: 'Every field is in {@link schema:template-doc}.',
74
72
  },
75
73
  {
76
74
  type: 'prose',
@@ -84,7 +82,7 @@ export default {
84
82
  content: [
85
83
  {
86
84
  type: 'prose',
87
- text: 'Declare the CLI floor from the field above as an optional peer ({@link generic:versioning}).',
85
+ text: 'Declare the CLI floor that `integration verify` names as an optional peer ({@link generic:versioning}).',
88
86
  },
89
87
  {
90
88
  type: 'code',
@@ -103,7 +101,7 @@ export default {
103
101
  },
104
102
  {
105
103
  type: 'prose',
106
- text: '`integration verify` reports `replaces_needs_cli` when that peer is missing or too old. Without it, an older CLI drops that template and hides your doc topics.',
104
+ text: '`integration verify` reports `replaces_needs_cli` when that peer is missing or too old. Without it, published 0.6.3 and earlier drop that template and hide your doc topics.',
107
105
  },
108
106
  ],
109
107
  },
@@ -1,9 +1,9 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/docs/sections-and-placement`: give an
5
- * integration package its own section in the docs tree, place guides in it,
6
- * and fix a placement that fails.
4
+ * @file `astryx docs cli/integrations/building-blocks/docs/sections-and-placement`:
5
+ * give an integration package its own section in the docs tree, place guides
6
+ * in it, and fix a placement that fails.
7
7
  */
8
8
 
9
9
  /** @type {import('@astryxdesign/cli/authoring').ReferenceDoc} */
@@ -62,9 +62,7 @@ export const docs = {
62
62
  type: 'list',
63
63
  style: 'unordered',
64
64
  items: [
65
- "`parent` is `namespace:<name>`, a namespace that your own package ships. You cannot place a doc in the CLI's sections or in another package's.",
66
- "`slot` is a slot that the namespace declares for the doc's kind. You can leave it out when the namespace has only one slot.",
67
- '`order` is an integer that sorts the guides in the slot and sets their Previous and Next moves. Guides without one come last, by name.',
65
+ 'Every field is in {@link schema:authored-doc-graph-fields}.',
68
66
  'A placed guide opens only by its route, `acme/deploying`. Its bare name no longer opens it.',
69
67
  ],
70
68
  },
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/components/see-it-in-an-app`: inspect an
4
+ * @file `astryx docs cli/integrations/building-blocks/components/see-it-in-an-app`: inspect an
5
5
  * integration component from an app that installs the package.
6
6
  */
7
7
 
@@ -33,7 +33,9 @@ npx astryx search carousel`,
33
33
  {
34
34
  type: 'code',
35
35
  lang: 'text',
36
- code: `# AcmeCarousel
36
+ code: `package: @acme/astryx-widgets
37
+
38
+ # AcmeCarousel
37
39
 
38
40
  Cycles through slides one at a time. Use it for a small set of related cards.
39
41
 
@@ -1,8 +1,9 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/docs/short-and-findable`: keep each read
5
- * short, lead each section with its summary, and write docs that search finds.
4
+ * @file `astryx docs cli/integrations/building-blocks/docs/short-and-findable`:
5
+ * keep each read short, lead each section with its summary, and write docs
6
+ * that search finds.
6
7
  */
7
8
 
8
9
  /** @type {import('@astryxdesign/cli/authoring').ReferenceDoc} */
@@ -58,7 +59,7 @@ export const docs = {
58
59
  {
59
60
  type: 'code',
60
61
  lang: 'text',
61
- code: 'build-before-you-ship Build before you ship - Build the app, then upload the `dist` folder to your host.',
62
+ code: 'build-before-you-ship Build before you ship - Build the app, then upload the `dist` folder.',
62
63
  },
63
64
  ],
64
65
  },
@@ -68,14 +69,14 @@ export const docs = {
68
69
  content: [
69
70
  {
70
71
  type: 'prose',
71
- text: 'Search ranks a query that matches a whole title, or an identifier in backticks, above words in body text. Title each section with the task a reader searches for.',
72
+ text: 'In a topic with more than one section, search ranks a section whose title matches the query, or that names it in backticks, above words in body text. Title each section with the task a reader searches for.',
72
73
  },
73
74
  {
74
75
  type: 'list',
75
76
  style: 'unordered',
76
77
  items: [
77
78
  'Name the task in the words a reader types, such as "Deploy to production". Avoid titles such as "Overview" or "Details".',
78
- 'Write field names, file names, and error codes in backticks, such as `deployTarget`: search treats each one as a keyword.',
79
+ 'Write field names, file names, and error codes in backticks, such as `deployTarget`: in a topic with more than one section, search treats each one as a keyword.',
79
80
  'Other words in the summary and body match too, but rank below titles and identifiers. The summary shows under each hit, so make it answer the query.',
80
81
  ],
81
82
  },
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/components/describe-the-component/single-component`:
4
+ * @file `astryx docs cli/integrations/building-blocks/components/describe-the-component/single-component`:
5
5
  * write and maintain the default ComponentDoc for one public component.
6
6
  */
7
7
 
@@ -61,9 +61,8 @@ export default {
61
61
  ],
62
62
  },
63
63
  {
64
- type: 'reference',
65
- target: 'schema:component-doc',
66
- presentation: 'summary',
64
+ type: 'prose',
65
+ text: 'Every field is in {@link schema:component-doc}.',
67
66
  },
68
67
  ],
69
68
  },
@@ -87,6 +86,15 @@ export default {
87
86
  ],
88
87
  },`,
89
88
  },
89
+ {
90
+ type: 'prose',
91
+ text: "Set `keywords` to the words people search for: synonyms and the task the component does, such as `keywords: ['slider', 'slideshow', 'rotating cards']`. `astryx search` ranks a match on a component's name or keywords above one in its description, so without keywords a search for the component's task can list Core components first. Check with the words a person would type:",
92
+ },
93
+ {
94
+ type: 'code',
95
+ lang: 'bash',
96
+ code: 'npx astryx search "rotating cards" --type component',
97
+ },
90
98
  ],
91
99
  },
92
100
  {
@@ -1,9 +1,9 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/templates/start-a-template`: what a
5
- * template is, why an integration shares one, whether it is a page or a
6
- * block, and how to add one.
4
+ * @file `astryx docs cli/integrations/building-blocks/templates/start-a-template`:
5
+ * what a template is, why an integration shares one, whether it is a page or
6
+ * a block, and how to add one.
7
7
  */
8
8
 
9
9
  /** @type {import('@astryxdesign/cli/authoring').ReferenceDoc} */
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/components/describe-the-component/subcomponent`:
4
+ * @file `astryx docs cli/integrations/building-blocks/components/describe-the-component/subcomponent`:
5
5
  * give one member of a component family its own ComponentDoc.
6
6
  */
7
7
 
@@ -51,6 +51,7 @@ export default {
51
51
  type: 'component',
52
52
  name: 'AcmeDialog',
53
53
  displayName: 'Acme Dialog',
54
+ import: '@acme/astryx-widgets/components/AcmeDialog',
54
55
  usage: {description: 'Presents a focused task above the current page.'},
55
56
  components: [
56
57
  {
@@ -82,6 +83,7 @@ export default {
82
83
  type: 'component',
83
84
  name: 'AcmeDialogHeader',
84
85
  displayName: 'Acme Dialog Header',
86
+ import: '@acme/astryx-widgets/components/AcmeDialogHeader',
85
87
  subComponentOf: 'AcmeDialog',
86
88
  description: 'Labels an Acme Dialog and holds its close action.',
87
89
  props: [
@@ -95,10 +97,8 @@ export default {
95
97
  };`,
96
98
  },
97
99
  {
98
- type: 'reference',
99
- target: 'schema:component-doc',
100
- projection: {fields: ['subComponentOf', 'description', 'props']},
101
- presentation: 'full',
100
+ type: 'prose',
101
+ text: 'Every field is in {@link schema:component-doc}.',
102
102
  },
103
103
  {
104
104
  type: 'list',
@@ -106,7 +106,7 @@ export default {
106
106
  items: [
107
107
  '`subComponentOf` must exactly match the parent doc\'s `name`.',
108
108
  '`description` explains this member\'s role in the family. `usage` is optional; add it when the member needs guidance beyond that sentence.',
109
- 'The child inherits family fields such as `group`, `category`, `keywords`, `theming`, and `playground` unless it overrides them.',
109
+ 'The CLI does not copy family fields such as `group`, `category`, or `keywords` from the parent to the child. Set any the child needs in its own doc.',
110
110
  ],
111
111
  },
112
112
  ],
@@ -1,8 +1,8 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/templates/template-assets`: make every
5
- * style, font, icon, and media dependency survive a template copy.
4
+ * @file `astryx docs cli/integrations/building-blocks/templates/build-the-template/template-assets`:
5
+ * make every style, font, icon, and media dependency survive a template copy.
6
6
  */
7
7
 
8
8
  /** @type {import('@astryxdesign/cli/authoring').NamespaceDoc} */
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/templates/document-the-template/template-doc-overview`:
4
+ * @file `astryx docs cli/integrations/building-blocks/templates/document-the-template/template-doc-overview`:
5
5
  * the source and doc file pair, the fields every template doc shares, and how
6
6
  * to check what Astryx lists.
7
7
  */
@@ -54,22 +54,11 @@ export const docs = {
54
54
  content: [
55
55
  {
56
56
  type: 'prose',
57
- text: 'These fields apply to every page and block. The page, block, and replacement guides add the fields unique to each.',
57
+ text: 'The fields below apply to every page and block. The page, block, and replacement guides add the fields unique to each.',
58
58
  },
59
59
  {
60
- type: 'reference',
61
- target: 'schema:template-doc',
62
- projection: {
63
- fields: [
64
- 'type',
65
- 'name',
66
- 'displayName',
67
- 'description',
68
- 'keywords',
69
- 'isReady',
70
- ],
71
- },
72
- presentation: 'full',
60
+ type: 'prose',
61
+ text: 'Every field is in {@link schema:template-doc}.',
73
62
  },
74
63
  {
75
64
  type: 'list',
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/templates/build-the-template/template-assets/template-fonts`:
4
+ * @file `astryx docs cli/integrations/building-blocks/templates/build-the-template/template-assets/template-fonts`:
5
5
  * use the app typeface by default, and ship every font file a template needs
6
6
  * when it must bring its own.
7
7
  */
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/templates/build-the-template/template-assets/template-icons`:
4
+ * @file `astryx docs cli/integrations/building-blocks/templates/build-the-template/template-assets/template-icons`:
5
5
  * render template icons through Astryx and ship custom product icons from the
6
6
  * package.
7
7
  */
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/templates/build-the-template/template-assets/template-images-media`:
4
+ * @file `astryx docs cli/integrations/building-blocks/templates/build-the-template/template-assets/template-images-media`:
5
5
  * keep template images and video working after the copy, or make them clear
6
6
  * placeholders.
7
7
  */
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/templates/build-the-template/template-assets/template-styles`:
4
+ * @file `astryx docs cli/integrations/building-blocks/templates/build-the-template/template-assets/template-styles`:
5
5
  * style a template with Astryx first, keep editable styles in the file, and
6
6
  * ship shared CSS from the package.
7
7
  */
@@ -85,7 +85,7 @@ const styles = stylex.create({
85
85
  },
86
86
  {
87
87
  type: 'prose',
88
- text: 'Then export that path and include the file in the package ({@link generic:export-template-assets}). In a TypeScript app, this import type-checks only when the app declares `*.css` modules.',
88
+ text: 'Then export that path and include the file in the package ({@link generic:export-template-assets}). TypeScript 6 and later check side-effect imports by default, so this import type-checks only when the app or its framework declares `*.css` modules.',
89
89
  },
90
90
  ],
91
91
  },
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/templates`: guides for adding,
4
+ * @file `astryx docs cli/integrations/building-blocks/templates`: guides for adding,
5
5
  * documenting, packaging, and testing templates in an integration package.
6
6
  */
7
7