@astryxdesign/cli 0.7.3-canary.b74cf21 → 0.7.3-canary.ca48bb7

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 (213) hide show
  1. package/README.md +68 -68
  2. package/api/build/blocks/blocks.d.mts +6 -4
  3. package/api/build/blocks/blocks.mjs +103 -20
  4. package/api/build/blocks/blocks.test.mjs +126 -13
  5. package/api/build/blocks/blocks.weights.json +1 -1
  6. package/api/build/kit/answer.d.mts +5 -4
  7. package/api/build/kit/answer.mjs +114 -12
  8. package/api/build/kit/answer.test.mjs +73 -3
  9. package/api/build/kit/signals.d.mts +8 -0
  10. package/api/build/kit/signals.mjs +10 -0
  11. package/api/build/tree.test.mjs +19 -11
  12. package/api/component/component-replacement.test.mjs +1 -0
  13. package/api/component/component.mjs +17 -3
  14. package/api/component/component.test.mjs +15 -0
  15. package/api/component/doc-links.test.mjs +2 -2
  16. package/api/docs/_adapter.d.mts +2 -2
  17. package/api/docs/_adapter.mjs +61 -18
  18. package/api/docs/docs-homes.test.mjs +127 -0
  19. package/api/docs/docs.doc.mjs +3 -3
  20. package/api/docs/docs.test.mjs +28 -18
  21. package/api/docs/integration-tree.test.mjs +20 -20
  22. package/api/docs/integrationDocs.test.mjs +1 -1
  23. package/api/docs/namespace-section.test.mjs +6 -6
  24. package/api/docs/reference-blocks.test.mjs +2 -2
  25. package/api/doctor/doctor.mjs +16 -12
  26. package/api/doctor/doctor.test.mjs +37 -12
  27. package/api/hook/hook.mjs +1 -1
  28. package/api/integration/_adapter.d.mts +8 -0
  29. package/api/integration/_adapter.mjs +21 -1
  30. package/api/integration/authoring-checks.test.mjs +220 -0
  31. package/api/integration/pack-check.mjs +110 -4
  32. package/api/integration/pack-check.test.mjs +69 -0
  33. package/api/integration/validate-integration-fixes.test.mjs +6 -5
  34. package/api/integration/validate-integration-gaps.test.mjs +304 -1
  35. package/api/integration/validate-integration.d.mts +6 -1
  36. package/api/integration/validate-integration.mjs +82 -13
  37. package/api/integration/validate-integration.type.d.mts +37 -4
  38. package/api/integration/validate-integration.type.mjs +28 -5
  39. package/api/integration/validateIntegration.doc.mjs +1 -1
  40. package/api/search/_adapter.d.mts +16 -0
  41. package/api/search/_adapter.mjs +39 -0
  42. package/api/search/_adapter.test.mjs +173 -0
  43. package/api/search/_candidate-score.mjs +1 -1
  44. package/api/search/_entries.d.mts +11 -0
  45. package/api/search/_entries.mjs +77 -3
  46. package/api/search/_entries.test.mjs +48 -0
  47. package/api/search/_gather-docs.mjs +3 -3
  48. package/api/search/search.doc.mjs +1 -1
  49. package/api/search/search.mjs +6 -2
  50. package/api/search/search.test.mjs +14 -14
  51. package/api/upgrade/_adapter.d.mts +57 -3
  52. package/api/upgrade/_adapter.mjs +149 -27
  53. package/api/upgrade/registry/registry.d.mts +10 -4
  54. package/api/upgrade/registry/registry.mjs +33 -16
  55. package/api/upgrade/registry/registry.test.mjs +85 -0
  56. package/api/upgrade/run/run.d.mts +4 -2
  57. package/api/upgrade/run/run.mjs +13 -2
  58. package/api/upgrade/run/run.test.mjs +417 -3
  59. package/api/upgrade/upgrade.doc.mjs +10 -5
  60. package/api/upgrade/upgrade.mjs +13 -2
  61. package/api/upgrade/upgrade.type.d.mts +5 -3
  62. package/api/upgrade/upgrade.type.mjs +8 -6
  63. package/assets/docs/author-a-theme.doc.mjs +2 -2
  64. package/assets/docs/is-my-code-good.doc.mjs +287 -0
  65. package/assets/docs/tree/add-a-component.doc.mjs +1 -1
  66. package/assets/docs/tree/add-a-theme.doc.mjs +1 -1
  67. package/assets/docs/tree/add-a-topic.doc.mjs +2 -2
  68. package/assets/docs/tree/agent-guidance.doc.mjs +1 -1
  69. package/assets/docs/tree/{integrations.doc.mjs → authoring.doc.mjs} +15 -6
  70. package/assets/docs/tree/block-template.doc.mjs +1 -1
  71. package/assets/docs/tree/build-the-template.doc.mjs +1 -1
  72. package/assets/docs/tree/building-blocks.doc.mjs +2 -2
  73. package/assets/docs/tree/check-the-props.doc.mjs +1 -1
  74. package/assets/docs/tree/check-your-docs.doc.mjs +2 -2
  75. package/assets/docs/tree/checks.doc.mjs +3 -3
  76. package/assets/docs/tree/cli-command.doc.mjs +1 -1
  77. package/assets/docs/tree/cli.doc.mjs +1 -1
  78. package/assets/docs/tree/codemods.doc.mjs +1 -1
  79. package/assets/docs/tree/component-family.doc.mjs +1 -1
  80. package/assets/docs/tree/component-imports.doc.mjs +1 -1
  81. package/assets/docs/tree/components.doc.mjs +1 -1
  82. package/assets/docs/tree/configuration.doc.mjs +1 -1
  83. package/assets/docs/tree/debug-and-gap-reports.doc.mjs +1 -1
  84. package/assets/docs/tree/define-the-theme.doc.mjs +1 -1
  85. package/assets/docs/tree/describe-the-component.doc.mjs +1 -1
  86. package/assets/docs/tree/docs.doc.mjs +1 -1
  87. package/assets/docs/tree/document-the-template.doc.mjs +1 -1
  88. package/assets/docs/tree/document-the-theme.doc.mjs +1 -1
  89. package/assets/docs/tree/export-template-assets.doc.mjs +1 -1
  90. package/assets/docs/tree/extend-or-replace.doc.mjs +1 -1
  91. package/assets/docs/{authoring.doc.mjs → tree/field-reference.doc.mjs} +4 -3
  92. package/assets/docs/tree/fonts-and-assets.doc.mjs +1 -1
  93. package/assets/docs/tree/generate-a-palette.doc.mjs +1 -1
  94. package/assets/docs/tree/global-integrations.doc.mjs +2 -2
  95. package/assets/docs/tree/grade-template-with-agent.doc.mjs +4 -4
  96. package/assets/docs/tree/help.doc.mjs +2 -2
  97. package/assets/docs/tree/links.doc.mjs +1 -1
  98. package/assets/docs/tree/package-and-test.doc.mjs +1 -1
  99. package/assets/docs/tree/page-template.doc.mjs +1 -1
  100. package/assets/docs/tree/publishing.doc.mjs +1 -1
  101. package/assets/docs/tree/quick-start.doc.mjs +1 -1
  102. package/assets/docs/tree/replace-a-core-component.doc.mjs +1 -1
  103. package/assets/docs/tree/replace-a-core-template.doc.mjs +1 -1
  104. package/assets/docs/tree/sections-and-placement.doc.mjs +1 -1
  105. package/assets/docs/tree/see-it-in-an-app.doc.mjs +1 -1
  106. package/assets/docs/tree/ship.doc.mjs +2 -2
  107. package/assets/docs/tree/short-and-findable.doc.mjs +1 -1
  108. package/assets/docs/tree/single-component.doc.mjs +1 -1
  109. package/assets/docs/tree/start-a-template.doc.mjs +1 -1
  110. package/assets/docs/tree/subcomponent.doc.mjs +1 -1
  111. package/assets/docs/tree/template-assets.doc.mjs +1 -1
  112. package/assets/docs/tree/template-doc-overview.doc.mjs +2 -2
  113. package/assets/docs/tree/template-fonts.doc.mjs +1 -1
  114. package/assets/docs/tree/template-grading-rubric.doc.mjs +17 -38
  115. package/assets/docs/tree/template-icons.doc.mjs +1 -1
  116. package/assets/docs/tree/template-images-media.doc.mjs +1 -1
  117. package/assets/docs/tree/template-styles.doc.mjs +1 -1
  118. package/assets/docs/tree/templates.doc.mjs +1 -1
  119. package/assets/docs/tree/test-in-an-app.doc.mjs +1 -1
  120. package/assets/docs/tree/test-template-in-app.doc.mjs +1 -1
  121. package/assets/docs/tree/themes.doc.mjs +1 -1
  122. package/assets/docs/tree/troubleshooting.doc.mjs +1 -1
  123. package/assets/docs/tree/upgrading.doc.mjs +1 -1
  124. package/assets/docs/tree/use-a-theme-in-an-app.doc.mjs +1 -1
  125. package/assets/docs/tree/verify-packed-template.doc.mjs +1 -1
  126. package/assets/docs/tree/versioning.doc.mjs +5 -1
  127. package/assets/docs/tree/write-good-templates.doc.mjs +1 -1
  128. package/assets/docs/tree/write-the-template-file.doc.mjs +1 -1
  129. package/assets/docs/use-integrations.doc.mjs +120 -0
  130. package/assets/templates/themes/butter/butterTheme.ts +4 -2
  131. package/assets/templates/themes/stone/stoneTheme.ts +4 -2
  132. package/assets/templates/themes/y2k/y2kTheme.ts +4 -2
  133. package/authoring/doctypes/schema/schema.doc.mjs +1 -1
  134. package/authoring/integration/integration.doc.mjs +1 -1
  135. package/authoring/integration/type.ts +1 -1
  136. package/clients/cli/command-result-coverage.test.mjs +6 -5
  137. package/clients/cli/commands/build-theme.color-scheme.test.mjs +1 -1
  138. package/clients/cli/commands/{component/index.mjs → component.mjs} +37 -37
  139. package/clients/cli/commands/component.test.mjs +6 -6
  140. package/clients/cli/commands/docs.doc.mjs +2 -2
  141. package/clients/cli/commands/docs.mjs +1 -1
  142. package/clients/cli/commands/docs.test.mjs +14 -14
  143. package/clients/cli/commands/doctor-integration.test.mjs +49 -1
  144. package/clients/cli/commands/doctor.mjs +10 -0
  145. package/clients/cli/commands/{hook/index.mjs → hook.mjs} +22 -22
  146. package/clients/cli/commands/import-hint-correctness.test.mjs +1 -1
  147. package/clients/cli/commands/integration-check.test.mjs +48 -0
  148. package/clients/cli/commands/integration.doc.mjs +1 -1
  149. package/clients/cli/commands/manifest.doc.mjs +1 -1
  150. package/clients/cli/commands/manifest.mjs +67 -0
  151. package/clients/cli/commands/postinstall.doc.mjs +23 -0
  152. package/clients/cli/commands/postinstall.mjs +31 -0
  153. package/clients/cli/commands/{build-theme.mjs → theme.mjs} +1 -1
  154. package/clients/cli/commands/upgrade.doc.mjs +4 -2
  155. package/clients/cli/commands/upgrade.mjs +9 -2
  156. package/clients/cli/commands/upgrade.subfolder-path.test.mjs +97 -0
  157. package/clients/cli/index.mjs +10 -85
  158. package/clients/cli/lib/component-format.mjs +1 -1
  159. package/clients/cli/lib/define-command.mjs +12 -7
  160. package/clients/cli/lib/exit-codes.test.mjs +5 -0
  161. package/clients/cli/lib/manifest.test.mjs +12 -0
  162. package/clients/cli/lib/welcome-box.mjs +50 -0
  163. package/foundation/agent-docs/agent-docs.mjs +2 -1
  164. package/foundation/agent-docs/agent-docs.test.mjs +5 -4
  165. package/foundation/config/project.mjs +5 -20
  166. package/foundation/config/project.test.mjs +56 -0
  167. package/foundation/discovery/authoring-self-docs.d.mts +7 -0
  168. package/foundation/discovery/authoring-self-docs.mjs +16 -4
  169. package/foundation/discovery/authoring-self-docs.test.mjs +15 -3
  170. package/foundation/discovery/authoring-surface.d.mts +1 -1
  171. package/foundation/discovery/authoring-surface.mjs +2 -2
  172. package/foundation/discovery/authoring-surface.test.mjs +1 -1
  173. package/foundation/discovery/cli-self-docs.d.mts +2 -1
  174. package/foundation/discovery/cli-self-docs.mjs +4 -3
  175. package/foundation/discovery/cli-self-docs.test.mjs +2 -2
  176. package/foundation/discovery/runner-allowlist.d.mts +2 -4
  177. package/foundation/discovery/runner-allowlist.mjs +2 -4
  178. package/foundation/discovery/runner-commands.d.mts +77 -0
  179. package/foundation/discovery/runner-commands.mjs +294 -0
  180. package/foundation/discovery/runner-commands.test.mjs +128 -0
  181. package/foundation/discovery/stray-pointers.test.mjs +1 -1
  182. package/foundation/discovery/template-adapter.mjs +18 -1
  183. package/foundation/discovery/template-needs.mjs +1 -44
  184. package/foundation/discovery/theme-discovery.mjs +147 -3
  185. package/foundation/doc-compiler/doc-loads.test.mjs +25 -9
  186. package/foundation/doc-compiler/read.mjs +59 -1
  187. package/foundation/doc-compiler/read.test.mjs +11 -2
  188. package/foundation/doc-compiler/split-topic-keywords.test.mjs +3 -2
  189. package/foundation/doc-compiler/tree.d.mts +32 -6
  190. package/foundation/doc-compiler/tree.mjs +77 -43
  191. package/foundation/doc-compiler/tree.test.mjs +7 -7
  192. package/foundation/fs/paths.d.mts +70 -8
  193. package/foundation/fs/paths.mjs +526 -35
  194. package/foundation/fs/paths.test.mjs +430 -54
  195. package/foundation/fs/read-record.d.mts +18 -0
  196. package/foundation/fs/read-record.mjs +131 -0
  197. package/foundation/fs/read-record.test.mjs +77 -0
  198. package/foundation/integrations/autolink.d.mts +2 -1
  199. package/foundation/integrations/autolink.mjs +4 -13
  200. package/foundation/integrations/cli-peer-version.d.mts +36 -0
  201. package/foundation/integrations/cli-peer-version.mjs +132 -0
  202. package/foundation/integrations/cli-peer-version.test.mjs +354 -0
  203. package/foundation/integrations/exports-subpaths.d.mts +57 -0
  204. package/foundation/integrations/exports-subpaths.mjs +113 -0
  205. package/foundation/integrations/integrations.d.mts +20 -1
  206. package/foundation/integrations/integrations.mjs +59 -2
  207. package/foundation/integrations/public-imports.d.mts +118 -0
  208. package/foundation/integrations/public-imports.mjs +1769 -0
  209. package/foundation/integrations/public-imports.test.mjs +1793 -0
  210. package/foundation/integrations/validate-contributions.d.mts +19 -0
  211. package/foundation/integrations/validate-contributions.mjs +172 -3
  212. package/foundation/response/response-types.doc.mjs +1 -1
  213. package/package.json +9 -9
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  /**
4
- * @file `astryx docs cli/integrations/help/troubleshooting`: the messages the CLI
4
+ * @file `astryx docs authoring/help/troubleshooting`: the messages the CLI
5
5
  * prints while you build, verify, and install an integration, and the fix
6
6
  * for each.
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/ship/upgrading`: update an integration
4
+ * @file `astryx docs authoring/ship/upgrading`: update an integration
5
5
  * package for each Astryx release, and the command apps run to upgrade with
6
6
  * it.
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/building-blocks/themes/use-a-theme-in-an-app`:
4
+ * @file `astryx docs authoring/building-blocks/themes/use-a-theme-in-an-app`:
5
5
  * an app installs the integration and applies or extends the theme, like any theme.
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/building-blocks/templates/build-the-template/package-and-test/verify-packed-template`:
4
+ * @file `astryx docs authoring/building-blocks/templates/build-the-template/package-and-test/verify-packed-template`:
5
5
  * what `integration verify` checks for templates, and what it leaves to the
6
6
  * app test.
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/ship/versioning`: version an integration
4
+ * @file `astryx docs authoring/ship/versioning`: version an integration
5
5
  * package, know which changes break apps, declare peer ranges, keep apps on
6
6
  * older CLIs working, and match codemod folders to versions.
7
7
  */
@@ -120,6 +120,10 @@ export const docs = {
120
120
  type: 'prose',
121
121
  text: '`integration verify` fails a package that needs the CLI peer and lacks it, or whose range admits a stable CLI too old for what it ships. `integration add doc --parent` and `integration add theme` write the peer for you.',
122
122
  },
123
+ {
124
+ type: 'prose',
125
+ text: "When the CLI is outside that range, `doctor integration validate` and `integration check` list a `cli_peer_version` note naming your package. A note fails nothing, `--strict` included, and `integration verify` does not report it. Below the range the note gives the commands that install a newer Core and CLI together, as dev dependencies in your own package folder, and then run `upgrade --apply`. Above it, in an app the note asks for a release of your package that supports that CLI, and in your own package folder it asks you to test your package with that CLI and widen the range.",
126
+ },
123
127
  ],
124
128
  },
125
129
  {
@@ -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/write-good-templates`:
4
+ * @file `astryx docs authoring/building-blocks/templates/write-good-templates`:
5
5
  * what makes a template good, the rubric that scores it, and grading with an agent.
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/building-blocks/templates/build-the-template/write-the-template-file`:
4
+ * @file `astryx docs authoring/building-blocks/templates/build-the-template/write-the-template-file`:
5
5
  * what gets copied, where the copied file lands, and the imports and
6
6
  * export a copied template needs.
7
7
  */
@@ -0,0 +1,120 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /** @type {import('@astryxdesign/cli/authoring').ReferenceDoc} */
4
+
5
+ export const docs = {
6
+ type: 'generic',
7
+ name: 'use-integrations',
8
+ title: 'Use integrations',
9
+ category: 'guide',
10
+ description:
11
+ 'Install, discover, and use integration packages that add components, templates, themes, and docs to your app.',
12
+ keywords: [
13
+ 'install an integration',
14
+ 'add an integration',
15
+ 'install a package',
16
+ 'use an integration',
17
+ 'discover integrations',
18
+ 'integration',
19
+ 'package',
20
+ 'third party',
21
+ 'plugin',
22
+ 'extension',
23
+ ],
24
+
25
+ sections: [
26
+ {
27
+ title: 'Discover integrations',
28
+ content: [
29
+ {
30
+ type: 'prose',
31
+ text: 'Integration packages extend Astryx with extra components, templates, themes, docs, and codemods. They are published as regular npm packages.',
32
+ },
33
+ {
34
+ type: 'prose',
35
+ text: 'Search for what you need:',
36
+ },
37
+ {
38
+ type: 'code',
39
+ lang: 'bash',
40
+ code: 'astryx search carousel\nastryx discover',
41
+ },
42
+ {
43
+ type: 'prose',
44
+ text: '`search` looks across everything the CLI knows (components, docs, templates, themes, and hooks), so a word like "carousel" finds it whether it is a component, a template, or a doc page. `discover` lists every integration the project has, and, with a discover source, packages it could add.',
45
+ },
46
+ ],
47
+ },
48
+ {
49
+ title: 'Install an integration',
50
+ content: [
51
+ {
52
+ type: 'prose',
53
+ text: 'Install the package with your package manager. Integrations autolink: the CLI finds them among your dependencies, so installing is all it takes:',
54
+ },
55
+ {
56
+ type: 'code',
57
+ lang: 'bash',
58
+ code: 'npm install @acme/brand-integration',
59
+ },
60
+ {
61
+ type: 'prose',
62
+ text: 'Run `astryx doctor` to confirm everything is wired up. If you need to load a package that is not a direct dependency, add it explicitly to `astryx.config.mjs`:',
63
+ },
64
+ {
65
+ type: 'code',
66
+ lang: 'js',
67
+ label: 'Optional: explicit config entry',
68
+ code: "export default {\n integrations: ['@acme/brand-integration'],\n};",
69
+ },
70
+ ],
71
+ },
72
+ {
73
+ title: 'Use what it adds',
74
+ content: [
75
+ {
76
+ type: 'prose',
77
+ text: 'Once installed, the integration\'s contributions appear alongside Core:',
78
+ },
79
+ {
80
+ type: 'list',
81
+ style: 'unordered',
82
+ items: [
83
+ '`astryx component --list` shows its components next to Core components.',
84
+ '`astryx template --list` includes its page and block templates.',
85
+ '`astryx theme list` lists its themes; add one with `astryx theme add <slug> --package @acme/brand-integration`.',
86
+ '`astryx docs` shows any guides it provides.',
87
+ '`astryx search <query>` finds everything, from every installed integration.',
88
+ ],
89
+ },
90
+ {
91
+ type: 'prose',
92
+ text: 'Import components at the subpath the integration documents. Run `astryx component <Name>` to see the exact import:',
93
+ },
94
+ {
95
+ type: 'code',
96
+ lang: 'jsx',
97
+ code: "import {AcmeCarousel} from '@acme/brand-integration/components/AcmeCarousel';",
98
+ },
99
+ {
100
+ type: 'prose',
101
+ text: 'For themes, see {@link generic:use-a-theme}. To build an integration of your own, see {@link namespace:authoring}.',
102
+ },
103
+ ],
104
+ },
105
+ {
106
+ title: 'Check for problems',
107
+ content: [
108
+ {
109
+ type: 'prose',
110
+ text: 'Run `astryx doctor` to see integration issues: missing roots, invalid contributions, or a CLI version mismatch. The doctor check is the one place every issue for every package is listed.',
111
+ },
112
+ {
113
+ type: 'code',
114
+ lang: 'bash',
115
+ code: 'astryx doctor',
116
+ },
117
+ ],
118
+ },
119
+ ],
120
+ };
@@ -81,7 +81,8 @@ const SECONDARY_SELECTOR = {
81
81
 
82
82
  /**
83
83
  * The secondary Button treatment on ComplexSelector triggers (AST-079 FR2), with
84
- * the hover kept off a disabled trigger, whose inner button is disabled.
84
+ * the hover kept off a disabled trigger, whose inner button is disabled
85
+ * (natively or, keeping its tab stop, with `aria-disabled`).
85
86
  */
86
87
  const SECONDARY_COMPLEX_SELECTOR = {
87
88
  backgroundColor: SECONDARY_BUTTON.backgroundColor,
@@ -89,7 +90,8 @@ const SECONDARY_COMPLEX_SELECTOR = {
89
90
  borderStyle: SECONDARY_BUTTON.borderStyle,
90
91
  borderColor: SECONDARY_BUTTON.borderColor,
91
92
  color: SECONDARY_BUTTON.color,
92
- ':hover:not(:has(> :disabled))': SECONDARY_BUTTON[':hover'],
93
+ ':hover:not(:has(> :is(:disabled, [aria-disabled="true"])))':
94
+ SECONDARY_BUTTON[':hover'],
93
95
  } as const;
94
96
 
95
97
  export const butterTheme = defineTheme({
@@ -100,14 +100,16 @@ const SECONDARY_SELECTOR = {
100
100
 
101
101
  /**
102
102
  * The secondary Button treatment on ComplexSelector triggers (AST-079 FR2), with
103
- * the hover kept off a disabled trigger, whose inner button is disabled.
103
+ * the hover kept off a disabled trigger, whose inner button is disabled
104
+ * (natively or, keeping its tab stop, with `aria-disabled`).
104
105
  */
105
106
  const SECONDARY_COMPLEX_SELECTOR = {
106
107
  backgroundColor: SECONDARY_BUTTON.backgroundColor,
107
108
  borderWidth: SECONDARY_BUTTON.borderWidth,
108
109
  borderStyle: SECONDARY_BUTTON.borderStyle,
109
110
  borderColor: SECONDARY_BUTTON.borderColor,
110
- ':hover:not(:has(> :disabled))': SECONDARY_BUTTON[':hover'],
111
+ ':hover:not(:has(> :is(:disabled, [aria-disabled="true"])))':
112
+ SECONDARY_BUTTON[':hover'],
111
113
  } as const;
112
114
 
113
115
  export const stoneTheme = defineTheme({
@@ -76,7 +76,8 @@ const SECONDARY_SELECTOR = {
76
76
 
77
77
  /**
78
78
  * The secondary Button treatment on ComplexSelector triggers (AST-079 FR2), with
79
- * the hover kept off a disabled trigger, whose inner button is disabled.
79
+ * the hover kept off a disabled trigger, whose inner button is disabled
80
+ * (natively or, keeping its tab stop, with `aria-disabled`).
80
81
  */
81
82
  const SECONDARY_COMPLEX_SELECTOR = {
82
83
  backgroundColor: SECONDARY_BUTTON.backgroundColor,
@@ -84,7 +85,8 @@ const SECONDARY_COMPLEX_SELECTOR = {
84
85
  borderStyle: SECONDARY_BUTTON.borderStyle,
85
86
  borderColor: SECONDARY_BUTTON.borderColor,
86
87
  color: SECONDARY_BUTTON.color,
87
- ':hover:not(:has(> :disabled))': SECONDARY_BUTTON[':hover'],
88
+ ':hover:not(:has(> :is(:disabled, [aria-disabled="true"])))':
89
+ SECONDARY_BUTTON[':hover'],
88
90
  } as const;
89
91
 
90
92
  export const y2kTheme = defineTheme({
@@ -49,7 +49,7 @@ export const doc = {
49
49
  name: 'namespace',
50
50
  type: 'string',
51
51
  description:
52
- "The group that reads this doc: 'authoring' for a file an author writes (a section of {@link generic:authoring}), or 'cli/api' for a shape the CLI returns (the docs tree adopts it by kind, as the leaf `cli/api/schemas/<name>`). Every schema doc the CLI ships declares one, and `astryx doctor` fails on one that is missing or that nothing reads.",
52
+ "The group that reads this doc: 'authoring' for a file an author writes (a section of {@link generic:field-reference}), or 'cli/api' for a shape the CLI returns (the docs tree adopts it by kind, as the leaf `cli/api/schemas/<name>`). Every schema doc the CLI ships declares one, and `astryx doctor` fails on one that is missing or that nothing reads.",
53
53
  },
54
54
  {
55
55
  name: 'aliases',
@@ -131,7 +131,7 @@ export const doc = {
131
131
  },
132
132
  {
133
133
  type: 'prose',
134
- text: "Set `cliCommand` only when your users run the CLI with a command other than their package manager's, such as `acme astryx`. The CLI picks the command it prints in this order: the `cliCommand` of the loaded integrations when they name one command, then the command a host tool names, then the package manager's. Two different `cliCommand` values cancel out, and `astryx doctor` warns in its `cli-command` check. See `astryx docs cli/integrations/building-blocks/configuration/cli-command`.",
134
+ text: "Set `cliCommand` only when your users run the CLI with a command other than their package manager's, such as `acme astryx`. The CLI picks the command it prints in this order: the `cliCommand` of the loaded integrations when they name one command, then the command a host tool names, then the package manager's. Two different `cliCommand` values cancel out, and `astryx doctor` warns in its `cli-command` check. See `astryx docs authoring/building-blocks/configuration/cli-command`.",
135
135
  },
136
136
  {
137
137
  type: 'prose',
@@ -11,7 +11,7 @@
11
11
  * The manifest module may also carry `debug` and `gapReport` NAMED exports.
12
12
  * They are not fields here on purpose: a CLI released before a given manifest
13
13
  * field existed could reject it and lose every contribution, while an unknown
14
- * named export is simply not read. See `astryx docs cli/integrations`.
14
+ * named export is simply not read. See `astryx docs authoring`.
15
15
  */
16
16
  export interface AstryxIntegration {
17
17
  /** Stable logical provider ID. Omit to use package.json#name. Set this only
@@ -44,12 +44,13 @@ const NO_ACTION_OF_THEIR_OWN = [];
44
44
  /**
45
45
  * Commands that record for themselves instead of returning a descriptor.
46
46
  *
47
- * They cannot come from a CommandDoc — `manifest` introspects the live program,
48
- * `postinstall` is a package-script hook — so they carry the mark by hand. The
49
- * mark is a hatch, and a hatch nobody watches is a hole: this list is the
50
- * watch. The root program is checked separately below.
47
+ * Empty: every command, `manifest` and the hidden `postinstall` hook included,
48
+ * registers through defineCommand. The mark is a hatch, and a hatch nobody
49
+ * watches is a hole: this list is the watch. The root program is checked
50
+ * separately below.
51
+ * @type {string[]}
51
52
  */
52
- const RECORD_FOR_THEMSELVES = ['manifest', 'postinstall'];
53
+ const RECORD_FOR_THEMSELVES = [];
53
54
 
54
55
  /**
55
56
  * Every command in the program, depth first, with its fully qualified name.
@@ -73,7 +73,7 @@ describe('theme build color-scheme output', () => {
73
73
  const project = path.join(tmpDir, 'project');
74
74
  const themesDir = path.join(project, 'themes');
75
75
  // A raw light-dark() token value is what triggers the color-scheme
76
- // injection in build-theme.mjs. `defineTheme.test.ts` already covers the
76
+ // injection in theme.mjs. `defineTheme.test.ts` already covers the
77
77
  // separate [light, dark] tuple -> light-dark() conversion; this fixture
78
78
  // writes the string directly so this test stays focused on the CLI's own
79
79
  // color-scheme decision, not on that conversion.
@@ -6,30 +6,30 @@
6
6
  * Global options: --detail full|compact|brief, --lang en|zh|dense
7
7
  */
8
8
 
9
- import {findCoreDir} from '../../../../foundation/fs/paths.mjs';
9
+ import {findCoreDir} from '../../../foundation/fs/paths.mjs';
10
10
  import {
11
11
  resolveImportPath,
12
- } from '../../../../foundation/discovery/component-discovery.mjs';
12
+ } from '../../../foundation/discovery/component-discovery.mjs';
13
13
  import {
14
14
  formatFull,
15
15
  formatCompact,
16
16
  formatBrief,
17
17
  formatProps,
18
18
  formatBriefAll,
19
- } from '../../lib/component-format.mjs';
20
- import {resolveTheme} from '../../lib/resolve-theme.mjs';
21
- import {getCliInvocation} from '../../../../foundation/env/package-manager.mjs';
22
- import {jsonOut} from '../../../../foundation/response/json.mjs';
23
- import {emit, section, text, list, record, records, code} from '../../formatters/index.mjs';
24
- import {cliError} from '../../lib/cli-error.mjs';
25
- import {defineCommand} from '../../lib/define-command.mjs';
26
- import {resultSet} from '../../../../foundation/debug/index.mjs';
27
- import {ERROR_CODES} from '../../../../foundation/response/error-codes.mjs';
28
- import {component as componentApi} from '../../../../api/component/component.mjs';
29
- import {Project} from '../../../../foundation/config/project.mjs';
30
- import {warnOnIntegrationIssues} from '../../../../foundation/integrations/integration-warnings.mjs';
31
- import {doc as componentCommand} from '../component.doc.mjs';
32
- import {doc as componentFn} from '../../../../api/component/component.doc.mjs';
19
+ } from '../lib/component-format.mjs';
20
+ import {resolveTheme} from '../lib/resolve-theme.mjs';
21
+ import {getCliInvocation} from '../../../foundation/env/package-manager.mjs';
22
+ import {jsonOut} from '../../../foundation/response/json.mjs';
23
+ import {emit, section, text, list, record, records, code} from '../formatters/index.mjs';
24
+ import {cliError} from '../lib/cli-error.mjs';
25
+ import {defineCommand} from '../lib/define-command.mjs';
26
+ import {resultSet} from '../../../foundation/debug/index.mjs';
27
+ import {ERROR_CODES} from '../../../foundation/response/error-codes.mjs';
28
+ import {component as componentApi} from '../../../api/component/component.mjs';
29
+ import {Project} from '../../../foundation/config/project.mjs';
30
+ import {warnOnIntegrationIssues} from '../../../foundation/integrations/integration-warnings.mjs';
31
+ import {doc as componentCommand} from './component.doc.mjs';
32
+ import {doc as componentFn} from '../../../api/component/component.doc.mjs';
33
33
 
34
34
  /**
35
35
  * The api layer's component() widens its return to `{type: string, data: unknown}`,
@@ -37,13 +37,13 @@ import {doc as componentFn} from '../../../../api/component/component.doc.mjs';
37
37
  * src/types/component to get narrowing + typed data.
38
38
  *
39
39
  * @typedef {(
40
- * | import('../../../../api/component/component.type.mjs').ComponentListResponse
41
- * | import('../../../../api/component/component.type.mjs').ComponentBatchResponse
42
- * | import('../../../../api/component/component.type.mjs').ComponentDetailResponse
43
- * | import('../../../../api/component/component.type.mjs').ComponentDetailPropsResponse
44
- * | import('../../../../api/component/component.type.mjs').ComponentDetailSourceResponse
45
- * | import('../../../../api/component/component.type.mjs').ComponentDetailShowcaseResponse
46
- * | import('../../../../api/component/component.type.mjs').ComponentDetailBlocksResponse
40
+ * | import('../../../api/component/component.type.mjs').ComponentListResponse
41
+ * | import('../../../api/component/component.type.mjs').ComponentBatchResponse
42
+ * | import('../../../api/component/component.type.mjs').ComponentDetailResponse
43
+ * | import('../../../api/component/component.type.mjs').ComponentDetailPropsResponse
44
+ * | import('../../../api/component/component.type.mjs').ComponentDetailSourceResponse
45
+ * | import('../../../api/component/component.type.mjs').ComponentDetailShowcaseResponse
46
+ * | import('../../../api/component/component.type.mjs').ComponentDetailBlocksResponse
47
47
  * )} ComponentResult
48
48
  */
49
49
 
@@ -57,7 +57,7 @@ import {doc as componentFn} from '../../../../api/component/component.doc.mjs';
57
57
  * the thing that resolved (the component) is not the thing being counted.
58
58
  *
59
59
  * @param {ComponentResult} result
60
- * @returns {import('../../../../foundation/debug/command-result.mjs').CommandResult}
60
+ * @returns {import('../../../foundation/debug/command-result.mjs').CommandResult}
61
61
  */
62
62
  function summarize(result) {
63
63
  switch (result.type) {
@@ -90,11 +90,11 @@ function summarize(result) {
90
90
 
91
91
  /**
92
92
  * Project one single-component API result through the existing formatter kit.
93
- * @param {import('../../../../api/component/component.type.mjs').ComponentSingleResponse} result
93
+ * @param {import('../../../api/component/component.type.mjs').ComponentSingleResponse} result
94
94
  * @param {string} requestedName
95
95
  * @param {'full'|'compact'|'brief'} detail
96
96
  * @param {Awaited<ReturnType<typeof resolveTheme>>} themeData
97
- * @returns {import('../../formatters/index.mjs').Block[]}
97
+ * @returns {import('../formatters/index.mjs').Block[]}
98
98
  */
99
99
  function componentDetailBlocks(result, requestedName, detail, themeData) {
100
100
  const requested = (requestedName.split('/').pop() ?? requestedName).replace(
@@ -111,7 +111,7 @@ function componentDetailBlocks(result, requestedName, detail, themeData) {
111
111
  : requested;
112
112
  switch (result.type) {
113
113
  case 'component.detail': {
114
- /** @type {import('../../formatters/index.mjs').Block[]} */
114
+ /** @type {import('../formatters/index.mjs').Block[]} */
115
115
  const out = [record({package: result.package})];
116
116
  if (result.data.parentDoc) {
117
117
  out.push(record(result.data, {fields: ['parentDoc']}));
@@ -150,7 +150,7 @@ function componentDetailBlocks(result, requestedName, detail, themeData) {
150
150
  /** @param {{package: string}} block @param {string} label */
151
151
  const owned = (block, label) =>
152
152
  block.package === result.package ? label : `${label} (${block.package})`;
153
- /** @type {import('../../formatters/index.mjs').Block[]} */
153
+ /** @type {import('../formatters/index.mjs').Block[]} */
154
154
  const out = [record({package: result.package})];
155
155
  if (showcase) {
156
156
  out.push(
@@ -243,7 +243,7 @@ export function registerComponent(program) {
243
243
  lang, zh, dense,
244
244
  }));
245
245
  } catch (e) {
246
- const err = /** @type {import('../../../../api/error.mjs').AstryxError} */ (e);
246
+ const err = /** @type {import('../../../api/error.mjs').AstryxError} */ (e);
247
247
  return cliError(err.message, {suggestions: err.suggestions, code: err.code});
248
248
  }
249
249
 
@@ -326,7 +326,7 @@ export function registerComponent(program) {
326
326
  // description), grouped by category. Fields mirror the JSON keys.
327
327
  const groups = result.data.components;
328
328
  const entries = Object.entries(groups);
329
- /** @type {import('../../formatters/index.mjs').Block[]} */
329
+ /** @type {import('../formatters/index.mjs').Block[]} */
330
330
  const out = [];
331
331
  for (const [cat, items] of entries) {
332
332
  // Skip the synthetic group header when there's only one ungrouped category
@@ -362,7 +362,7 @@ export function registerComponent(program) {
362
362
  nameCounts.set(item.name, set);
363
363
  }
364
364
  }
365
- /** @param {import('../../../../api/component/component.type.mjs').ComponentListEntry} item */
365
+ /** @param {import('../../../api/component/component.type.mjs').ComponentListEntry} item */
366
366
  const importCell = item => {
367
367
  // Use a precomputed import when the API supplies one (integration
368
368
  // components carry it); only fall back to the core resolver for
@@ -392,7 +392,7 @@ export function registerComponent(program) {
392
392
  }
393
393
 
394
394
  case 'component.batch': {
395
- /** @type {import('../../formatters/index.mjs').Block[]} */
395
+ /** @type {import('../formatters/index.mjs').Block[]} */
396
396
  const out = [
397
397
  section('Component batch'),
398
398
  record({count: result.data.count}),
@@ -474,8 +474,8 @@ export function registerComponent(program) {
474
474
 
475
475
  // Re-export lib functions for backward compatibility
476
476
  // (agent-docs.mjs, tests, and generate-skill-doc.sh import from here)
477
- export {discoverComponents, discoverExternalComponentsGrouped, findComponentReadme, findComponentSource, findExternalComponentDoc, resolveImportPath} from '../../../../foundation/discovery/component-discovery.mjs';
478
- export {discoverExternalPackages} from '../../../../foundation/fs/paths.mjs';
479
- export {loadDocs} from '../../../../foundation/discovery/component-loader.mjs';
480
- export {formatFull, formatCompact, formatBrief, formatProps, formatBriefAll} from '../../lib/component-format.mjs';
481
- export {levenshteinDistance, findClosestComponents, searchComponents} from '../../../../foundation/text/string-utils.mjs';
477
+ export {discoverComponents, discoverExternalComponentsGrouped, findComponentReadme, findComponentSource, findExternalComponentDoc, resolveImportPath} from '../../../foundation/discovery/component-discovery.mjs';
478
+ export {discoverExternalPackages} from '../../../foundation/fs/paths.mjs';
479
+ export {loadDocs} from '../../../foundation/discovery/component-loader.mjs';
480
+ export {formatFull, formatCompact, formatBrief, formatProps, formatBriefAll} from '../lib/component-format.mjs';
481
+ export {levenshteinDistance, findClosestComponents, searchComponents} from '../../../foundation/text/string-utils.mjs';
@@ -12,7 +12,7 @@ import {
12
12
  findComponentSource,
13
13
  levenshteinDistance,
14
14
  findClosestComponents,
15
- } from './component/index.mjs';
15
+ } from './component.mjs';
16
16
  import {runCli} from '../../../test-utils/run-cli.mjs';
17
17
 
18
18
  const REPO_ROOT = path.resolve(import.meta.dirname, '../../../../..');
@@ -528,7 +528,7 @@ describe('findExternalComponentDoc', () => {
528
528
  describe('searchComponents', () => {
529
529
  it('finds Collapsible when searching "accordion"', async () => {
530
530
  const {searchComponents, discoverComponents} =
531
- await import('./component/index.mjs');
531
+ await import('./component.mjs');
532
532
  const components = discoverComponents('packages/core');
533
533
  const results = await searchComponents(
534
534
  'accordion',
@@ -542,7 +542,7 @@ describe('searchComponents', () => {
542
542
 
543
543
  it('finds Dialog when searching "modal"', async () => {
544
544
  const {searchComponents, discoverComponents} =
545
- await import('./component/index.mjs');
545
+ await import('./component.mjs');
546
546
  const components = discoverComponents('packages/core');
547
547
  const results = await searchComponents(
548
548
  'modal',
@@ -556,7 +556,7 @@ describe('searchComponents', () => {
556
556
 
557
557
  it('returns multiple matches for ambiguous terms like "select"', async () => {
558
558
  const {searchComponents, discoverComponents} =
559
- await import('./component/index.mjs');
559
+ await import('./component.mjs');
560
560
  const components = discoverComponents('packages/core');
561
561
  const results = await searchComponents(
562
562
  'select',
@@ -571,7 +571,7 @@ describe('searchComponents', () => {
571
571
 
572
572
  it('finds exact name matches with score 100', async () => {
573
573
  const {searchComponents, discoverComponents} =
574
- await import('./component/index.mjs');
574
+ await import('./component.mjs');
575
575
  const components = discoverComponents('packages/core');
576
576
  const results = await searchComponents(
577
577
  'Button',
@@ -584,7 +584,7 @@ describe('searchComponents', () => {
584
584
 
585
585
  it('returns empty array for complete gibberish', async () => {
586
586
  const {searchComponents, discoverComponents} =
587
- await import('./component/index.mjs');
587
+ await import('./component.mjs');
588
588
  const components = discoverComponents('packages/core');
589
589
  const results = await searchComponents(
590
590
  'zzzzzzzzzzz',
@@ -58,10 +58,10 @@ export const doc = {
58
58
  {label: 'Every CLI doc, one line each', cli: 'astryx docs cli --depth all'},
59
59
  {
60
60
  label: 'The integration guides as one read',
61
- cli: 'astryx docs cli/integrations --depth all --detail full',
61
+ cli: 'astryx docs authoring --depth all --detail full',
62
62
  },
63
63
  {label: 'One API function', cli: 'astryx docs cli/api/functions/search'},
64
- {label: 'A whole guide', cli: 'astryx docs cli/integrations/quick-start --full'},
64
+ {label: 'A whole guide', cli: 'astryx docs authoring/quick-start --full'},
65
65
  ],
66
66
  outsideProject: 'same',
67
67
  exitCodes: [
@@ -535,7 +535,7 @@ function emitNode(node, detail, run) {
535
535
  text(
536
536
  [
537
537
  // A child's route is its parent's route and its name, except a flat
538
- // topic in the Unorganized level, which keeps its own name.
538
+ // topic in a topic level, which keeps its own name.
539
539
  node.slots.every(slot =>
540
540
  slot.children.every(child => child.route.startsWith(`${node.route}/`)),
541
541
  )