@astryxdesign/cli 0.6.5 → 0.6.6-canary.dc3a939

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 (433) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/README.md +58 -55
  3. package/api/build/_adapter.d.mts +55 -2
  4. package/api/build/_adapter.mjs +100 -10
  5. package/api/build/build.doc.mjs +2 -2
  6. package/api/build/build.test.mjs +111 -2
  7. package/api/build/build.type.d.mts +8 -0
  8. package/api/build/build.type.mjs +2 -0
  9. package/api/build/kit/kit.mjs +99 -22
  10. package/api/build/kit/rank.d.mts +32 -8
  11. package/api/build/kit/rank.mjs +291 -97
  12. package/api/build/kit/rank.test.mjs +231 -48
  13. package/api/build/kit/weights.d.mts +82 -0
  14. package/api/build/kit/weights.json +1 -0
  15. package/api/build/kit/weights.mjs +305 -0
  16. package/api/build/kit/weights.test.mjs +190 -0
  17. package/api/component/_adapter.d.mts +19 -0
  18. package/api/component/_adapter.mjs +33 -0
  19. package/api/component/component-replacement.test.mjs +603 -0
  20. package/api/component/component.mjs +49 -15
  21. package/api/component/component.test.mjs +32 -0
  22. package/api/component/component.type.d.mts +33 -3
  23. package/api/component/component.type.mjs +10 -3
  24. package/api/component/detail/blocks/blocks.d.mts +2 -1
  25. package/api/component/detail/blocks/blocks.mjs +5 -2
  26. package/api/component/detail/detail.mjs +5 -1
  27. package/api/component/detail/props/props.d.mts +2 -1
  28. package/api/component/detail/props/props.mjs +3 -2
  29. package/api/component/detail/showcase/showcase.d.mts +3 -1
  30. package/api/component/detail/showcase/showcase.mjs +3 -1
  31. package/api/component/detail/source/source.d.mts +3 -2
  32. package/api/component/detail/source/source.mjs +7 -3
  33. package/api/component/list/list.mjs +128 -10
  34. package/api/docs/_adapter.d.mts +11 -0
  35. package/api/docs/_adapter.mjs +25 -0
  36. package/api/docs/detail/detail.mjs +19 -3
  37. package/api/docs/detail/section/section.mjs +7 -1
  38. package/api/docs/docOverlays.test.mjs +10 -6
  39. package/api/docs/docs.d.mts +6 -0
  40. package/api/docs/docs.depth.test.mjs +134 -0
  41. package/api/docs/docs.doc.mjs +31 -2
  42. package/api/docs/docs.mjs +46 -1
  43. package/api/docs/docs.test.mjs +279 -0
  44. package/api/docs/docs.type.d.mts +81 -4
  45. package/api/docs/docs.type.mjs +41 -4
  46. package/api/docs/index/index.mjs +11 -2
  47. package/api/docs/index/index.test.mjs +7 -2
  48. package/api/docs/integration-tree.test.mjs +572 -0
  49. package/api/docs/integrationDocs.test.mjs +337 -0
  50. package/api/docs/node/node.d.mts +28 -3
  51. package/api/docs/node/node.mjs +149 -23
  52. package/api/doctor/_adapter.d.mts +43 -0
  53. package/api/doctor/_adapter.mjs +142 -0
  54. package/api/doctor/doctor.d.mts +0 -10
  55. package/api/doctor/doctor.doc.mjs +1 -3
  56. package/api/doctor/doctor.mjs +6 -123
  57. package/api/doctor/theme-checks.d.mts +12 -0
  58. package/api/doctor/theme-checks.mjs +1117 -0
  59. package/api/doctor/theme-checks.test.mjs +526 -0
  60. package/api/error.d.mts +22 -0
  61. package/api/error.mjs +42 -0
  62. package/api/gap-report/gap-report.d.mts +3 -1
  63. package/api/gap-report/gap-report.mjs +27 -3
  64. package/api/gap-report/gap-report.test.mjs +106 -0
  65. package/api/hook/_adapter.d.mts +1 -0
  66. package/api/hook/_adapter.mjs +3 -0
  67. package/api/hook/detail/detail.mjs +2 -2
  68. package/api/hook/detail/params/params.mjs +2 -2
  69. package/api/hook/hook.type.d.mts +12 -0
  70. package/api/hook/hook.type.mjs +3 -0
  71. package/api/hook/list/list.d.mts +1 -1
  72. package/api/hook/list/list.mjs +8 -8
  73. package/api/index.d.mts +1 -1
  74. package/api/index.mjs +4 -0
  75. package/api/init/run/run.d.mts +3 -5
  76. package/api/init/run/run.mjs +10 -11
  77. package/api/integration/__fixtures__/released-0.6.5-ocean.d.mts +14 -0
  78. package/api/integration/__fixtures__/released-0.6.5-ocean.mjs +15 -0
  79. package/api/integration/add-contribution.d.mts +2 -1
  80. package/api/integration/add-contribution.mjs +7 -3
  81. package/api/integration/add-contribution.test.mjs +3 -3
  82. package/api/integration/add-helpers.d.mts +26 -5
  83. package/api/integration/add-helpers.mjs +50 -5
  84. package/api/integration/add-theme.mjs +354 -28
  85. package/api/integration/add-theme.test.mjs +380 -16
  86. package/api/integration/authoring-checks.mjs +31 -8
  87. package/api/integration/authoring-checks.type.d.mts +8 -0
  88. package/api/integration/authoring-checks.type.mjs +7 -3
  89. package/api/integration/integration-authoring.type.d.mts +4 -1
  90. package/api/integration/integration-authoring.type.mjs +6 -1
  91. package/api/integration/integrationAdd.doc.mjs +6 -0
  92. package/api/integration/integrationAddTheme.doc.mjs +10 -0
  93. package/api/integration/integrationComponentConflicts.doc.mjs +6 -3
  94. package/api/integration/integrationDocConflicts.doc.mjs +1 -1
  95. package/api/integration/integrationTemplateConflicts.doc.mjs +1 -1
  96. package/api/integration/pack-check.component-replaces.test.mjs +126 -0
  97. package/api/integration/pack-check.d.mts +10 -0
  98. package/api/integration/pack-check.lifecycle-output.test.mjs +21 -2
  99. package/api/integration/pack-check.mjs +495 -4
  100. package/api/integration/pack-check.test.mjs +619 -10
  101. package/api/integration/validate-integration.d.mts +4 -2
  102. package/api/integration/validate-integration.mjs +7 -2
  103. package/api/integration/validate-integration.test.mjs +55 -0
  104. package/api/integration/validate-integration.type.d.mts +5 -0
  105. package/api/integration/validate-integration.type.mjs +5 -1
  106. package/api/integration/validateIntegration.doc.mjs +1 -1
  107. package/api/layout/expand/expand.mjs +12 -7
  108. package/api/layout/expand/expand.receipt.test.mjs +74 -0
  109. package/api/layout/layout.type.d.mts +1 -0
  110. package/api/layout/layout.type.mjs +1 -0
  111. package/api/layout/layoutExpand.doc.mjs +1 -1
  112. package/api/search/search.d.mts +39 -8
  113. package/api/search/search.doc.mjs +4 -4
  114. package/api/search/search.mjs +248 -66
  115. package/api/search/search.test.mjs +829 -0
  116. package/api/search/search.type.d.mts +6 -6
  117. package/api/search/search.type.mjs +5 -5
  118. package/api/swizzle/_adapter.d.mts +10 -0
  119. package/api/swizzle/_adapter.mjs +23 -0
  120. package/api/swizzle/copy/copy.d.mts +5 -6
  121. package/api/swizzle/copy/copy.mjs +95 -13
  122. package/api/swizzle/list/list.mjs +2 -2
  123. package/api/swizzle/swizzle.doc.mjs +4 -0
  124. package/api/swizzle/swizzle.test.mjs +55 -5
  125. package/api/swizzle/swizzle.type.d.mts +8 -0
  126. package/api/swizzle/swizzle.type.mjs +2 -0
  127. package/api/template/copy/copy.mjs +15 -8
  128. package/api/template/copy/copy.receipt.test.mjs +77 -0
  129. package/api/template/show/show.mjs +17 -4
  130. package/api/template/show/show.test.mjs +76 -0
  131. package/api/template/skeleton/skeleton.mjs +2 -1
  132. package/api/template/template-integration.test.mjs +14 -0
  133. package/api/template/template.d.mts +1 -1
  134. package/api/template/template.doc.mjs +6 -2
  135. package/api/template/template.mjs +2 -0
  136. package/api/template/template.type.d.mts +14 -0
  137. package/api/template/template.type.mjs +5 -0
  138. package/api/theme/_adapter.d.mts +106 -6
  139. package/api/theme/_adapter.mjs +687 -18
  140. package/api/theme/add/add.binary.test.mjs +76 -3
  141. package/api/theme/add/add.d.mts +5 -9
  142. package/api/theme/add/add.mjs +87 -64
  143. package/api/theme/add/add.rollback.test.mjs +9 -9
  144. package/api/theme/add/add.staging.test.mjs +9 -9
  145. package/api/theme/add/add.test.mjs +461 -55
  146. package/api/theme/add/add.types.test.mjs +151 -0
  147. package/api/theme/build/build.d.mts +50 -2
  148. package/api/theme/build/build.family.test.mjs +13 -4
  149. package/api/theme/build/build.icon-lineage.test.mjs +117 -0
  150. package/api/theme/build/build.icon-preservation.test.mjs +639 -0
  151. package/api/theme/build/build.mjs +463 -155
  152. package/api/theme/build/build.project-core.test.mjs +165 -0
  153. package/api/theme/build/build.test.mjs +220 -1
  154. package/api/theme/build/icon-imports.d.mts +47 -0
  155. package/api/theme/build/icon-imports.mjs +691 -0
  156. package/api/theme/eject/eject.binary.test.mjs +90 -0
  157. package/api/theme/eject/eject.d.mts +17 -0
  158. package/api/theme/eject/eject.mjs +65 -0
  159. package/api/theme/eject/eject.rollback.test.mjs +158 -0
  160. package/api/theme/eject/eject.staging.test.mjs +83 -0
  161. package/api/theme/eject/eject.test.mjs +160 -0
  162. package/api/theme/integration-themes.test.mjs +30 -6
  163. package/api/theme/list/list.d.mts +10 -0
  164. package/api/theme/list/list.mjs +75 -7
  165. package/api/theme/list/list.test.mjs +155 -4
  166. package/api/theme/remove/remove.d.mts +12 -0
  167. package/api/theme/remove/remove.mjs +15 -0
  168. package/api/theme/remove/remove.test.mjs +94 -0
  169. package/api/theme/template/template.mjs +3 -4
  170. package/api/theme/theme.d.mts +5 -2
  171. package/api/theme/theme.mjs +13 -8
  172. package/api/theme/theme.type.d.mts +106 -2
  173. package/api/theme/theme.type.mjs +54 -5
  174. package/api/theme/themeAdd.doc.d.mts +1 -3
  175. package/api/theme/themeAdd.doc.mjs +35 -22
  176. package/api/theme/themeBuild.doc.d.mts +4 -1
  177. package/api/theme/themeBuild.doc.mjs +15 -4
  178. package/api/theme/themeEject.doc.d.mts +8 -0
  179. package/api/theme/themeEject.doc.mjs +89 -0
  180. package/api/theme/themeListAvailable.doc.mjs +4 -4
  181. package/api/theme/themeListCopySources.doc.d.mts +8 -0
  182. package/api/theme/themeListCopySources.doc.mjs +60 -0
  183. package/api/theme/themeRemove.doc.d.mts +6 -0
  184. package/api/theme/themeRemove.doc.mjs +50 -0
  185. package/api/theme/themeTemplate.doc.mjs +4 -3
  186. package/api/theme/themeUse.doc.d.mts +6 -0
  187. package/api/theme/themeUse.doc.mjs +47 -0
  188. package/api/theme/use/use.d.mts +12 -0
  189. package/api/theme/use/use.mjs +15 -0
  190. package/api/theme/use/use.test.mjs +98 -0
  191. package/api/upgrade/_adapter.d.mts +1 -0
  192. package/api/upgrade/_adapter.mjs +3 -0
  193. package/api/upgrade/list/list.mjs +9 -3
  194. package/api/upgrade/run/run.mjs +20 -3
  195. package/api/upgrade/run/run.test.mjs +45 -1
  196. package/api/upgrade/upgrade.doc.mjs +1 -1
  197. package/api/upgrade/upgrade.type.d.mts +5 -0
  198. package/api/upgrade/upgrade.type.mjs +2 -0
  199. package/assets/codemods/integration-discovery.mjs +1 -1
  200. package/assets/codemods/integration-discovery.test.mjs +64 -0
  201. package/assets/codemods/transforms/next/__tests__/migrate-copied-themes-to-descriptors.test.mjs +129 -0
  202. package/assets/codemods/transforms/next/index.mjs +14 -1
  203. package/assets/codemods/transforms/next/migrate-copied-themes-to-descriptors.mjs +54 -0
  204. package/assets/docs/author-a-theme.doc.mjs +161 -0
  205. package/assets/docs/getting-started.doc.mjs +59 -15
  206. package/assets/docs/icons.doc.mjs +1 -0
  207. package/assets/docs/principles.doc.dense.mjs +2 -2
  208. package/assets/docs/principles.doc.mjs +2 -2
  209. package/assets/docs/principles.doc.zh.mjs +2 -2
  210. package/assets/docs/styling-libraries.doc.mjs +1 -1
  211. package/assets/docs/styling.doc.mjs +2 -2
  212. package/assets/docs/theme.doc.dense.mjs +10 -198
  213. package/assets/docs/theme.doc.mjs +13 -770
  214. package/assets/docs/theme.doc.zh.mjs +31 -12
  215. package/assets/docs/tokens.doc.mjs +4 -4
  216. package/assets/docs/tree/add-a-theme.doc.mjs +6 -2
  217. package/assets/docs/tree/add-a-topic.doc.mjs +1 -1
  218. package/assets/docs/tree/check-your-docs.doc.mjs +2 -2
  219. package/assets/docs/tree/checks.doc.mjs +6 -5
  220. package/assets/docs/tree/debug-and-gap-reports.doc.mjs +1 -1
  221. package/assets/docs/tree/define-the-theme.doc.mjs +2 -2
  222. package/assets/docs/tree/document-the-theme.doc.mjs +4 -4
  223. package/assets/docs/tree/fonts-and-assets.doc.mjs +25 -20
  224. package/assets/docs/tree/headers-and-footers.doc.mjs +68 -0
  225. package/assets/docs/tree/layout-spacing.doc.mjs +168 -0
  226. package/assets/docs/tree/layout.doc.mjs +32 -0
  227. package/assets/docs/tree/replace-a-core-component.doc.mjs +21 -4
  228. package/assets/docs/tree/responsive.doc.mjs +102 -0
  229. package/assets/docs/tree/scaffold.doc.mjs +145 -0
  230. package/assets/docs/tree/sections-and-placement.doc.mjs +1 -1
  231. package/assets/docs/tree/side-panels.doc.mjs +82 -0
  232. package/assets/docs/tree/structure.doc.mjs +144 -0
  233. package/assets/docs/tree/template-doc-overview.doc.mjs +13 -1
  234. package/assets/docs/tree/themes.doc.mjs +2 -2
  235. package/assets/docs/tree/troubleshooting.doc.mjs +13 -5
  236. package/assets/docs/tree/use-a-theme-in-an-app.doc.mjs +22 -5
  237. package/assets/docs/tree/versioning.doc.mjs +11 -7
  238. package/assets/docs/use-a-theme.doc.mjs +97 -0
  239. package/assets/templates/blocks/components/DropdownMenuGroup/DropdownMenuGroupShowcase.doc.mjs +15 -0
  240. package/assets/templates/blocks/components/DropdownMenuGroup/DropdownMenuGroupShowcase.tsx +38 -0
  241. package/assets/templates/blocks/components/DropdownMenuGroup/DropdownMenuGroupWithSelectable.doc.mjs +20 -0
  242. package/assets/templates/blocks/components/DropdownMenuGroup/DropdownMenuGroupWithSelectable.tsx +48 -0
  243. package/assets/templates/pages/ai-chat/template.doc.mjs +16 -1
  244. package/assets/templates/pages/ai-chat-landing/template.doc.mjs +9 -1
  245. package/assets/templates/pages/blank/template.doc.mjs +3 -1
  246. package/assets/templates/pages/canvas-editor/template.doc.mjs +9 -1
  247. package/assets/templates/pages/centered-hero/template.doc.mjs +3 -1
  248. package/assets/templates/pages/checkout-wizard/template.doc.mjs +1 -0
  249. package/assets/templates/pages/classic-gallery/template.doc.mjs +3 -1
  250. package/assets/templates/pages/contact-form/template.doc.mjs +16 -1
  251. package/assets/templates/pages/dashboard/template.doc.mjs +15 -1
  252. package/assets/templates/pages/dashboard-alert-rail/template.doc.mjs +23 -1
  253. package/assets/templates/pages/dashboard-cohort-funnel/template.doc.mjs +10 -1
  254. package/assets/templates/pages/dashboard-comparison/template.doc.mjs +9 -1
  255. package/assets/templates/pages/dashboard-composition/template.doc.mjs +10 -1
  256. package/assets/templates/pages/dashboard-progress/template.doc.mjs +17 -1
  257. package/assets/templates/pages/dashboard-scorecard/template.doc.mjs +2 -1
  258. package/assets/templates/pages/detail-page/template.doc.mjs +8 -0
  259. package/assets/templates/pages/documentation/template.doc.mjs +10 -1
  260. package/assets/templates/pages/documentation-design/template.doc.mjs +10 -1
  261. package/assets/templates/pages/documentation-technical/template.doc.mjs +10 -1
  262. package/assets/templates/pages/editor/template.doc.mjs +9 -1
  263. package/assets/templates/pages/file-explorer/template.doc.mjs +3 -1
  264. package/assets/templates/pages/form-two-column/template.doc.mjs +17 -1
  265. package/assets/templates/pages/form-wizard/template.doc.mjs +14 -1
  266. package/assets/templates/pages/form-wizard-dialog/template.doc.mjs +1 -0
  267. package/assets/templates/pages/gallery-hero/template.doc.mjs +10 -1
  268. package/assets/templates/pages/ide/template.doc.mjs +9 -1
  269. package/assets/templates/pages/incident-console/template.doc.mjs +10 -1
  270. package/assets/templates/pages/kanban-board/template.doc.mjs +11 -1
  271. package/assets/templates/pages/library/template.doc.mjs +15 -1
  272. package/assets/templates/pages/login/template.doc.mjs +10 -1
  273. package/assets/templates/pages/login-card/template.doc.mjs +11 -1
  274. package/assets/templates/pages/login-split/template.doc.mjs +10 -1
  275. package/assets/templates/pages/login-sso/template.doc.mjs +10 -1
  276. package/assets/templates/pages/messaging-shell/template.doc.mjs +11 -1
  277. package/assets/templates/pages/mixed-gallery/template.doc.mjs +10 -1
  278. package/assets/templates/pages/payment-form/template.doc.mjs +3 -1
  279. package/assets/templates/pages/product-detail/template.doc.mjs +9 -1
  280. package/assets/templates/pages/product-gallery/template.doc.mjs +10 -1
  281. package/assets/templates/pages/settings/template.doc.mjs +3 -1
  282. package/assets/templates/pages/settings-dialog/template.doc.mjs +9 -1
  283. package/assets/templates/pages/settings-sidebar/template.doc.mjs +9 -1
  284. package/assets/templates/pages/shell-nav/template.doc.mjs +10 -1
  285. package/assets/templates/pages/shell-side-nav/template.doc.mjs +14 -1
  286. package/assets/templates/pages/shell-top-nav/template.doc.mjs +11 -1
  287. package/assets/templates/pages/side-gallery/template.doc.mjs +3 -1
  288. package/assets/templates/pages/table/template.doc.mjs +11 -1
  289. package/assets/templates/pages/table-collapsible/page.tsx +1474 -0
  290. package/assets/templates/pages/table-collapsible/template.doc.mjs +12 -0
  291. package/assets/templates/pages/table-comparison/page.tsx +1449 -0
  292. package/assets/templates/pages/table-comparison/template.doc.mjs +12 -0
  293. package/assets/templates/pages/table-filter/template.doc.mjs +21 -1
  294. package/assets/templates/pages/table-grouped/template.doc.mjs +15 -1
  295. package/assets/templates/pages/table-inbox/template.doc.mjs +18 -6
  296. package/assets/templates/pages/table-page/template.doc.mjs +20 -1
  297. package/assets/templates/pages/table-tree/template.doc.mjs +14 -1
  298. package/assets/templates/pages/theme-showcase/template.doc.mjs +10 -1
  299. package/assets/templates/pages/work-item-detail/template.doc.mjs +10 -0
  300. package/assets/templates/themes/butter/icons.tsx +2 -0
  301. package/assets/templates/themes/chocolate/icons.tsx +2 -0
  302. package/assets/templates/themes/gothic/icons.tsx +2 -0
  303. package/assets/templates/themes/matcha/icons.tsx +2 -0
  304. package/assets/templates/themes/neutral/icons.tsx +2 -0
  305. package/assets/templates/themes/stone/icons.tsx +2 -0
  306. package/assets/templates/themes/y2k/icons.tsx +2 -0
  307. package/authoring/doctypes/command/command.doc.mjs +5 -0
  308. package/authoring/doctypes/command/type.ts +2 -0
  309. package/authoring/doctypes/component/component.doc.mjs +1 -1
  310. package/authoring/doctypes/component/type.ts +8 -4
  311. package/authoring/doctypes/template/parse.d.mts +2 -0
  312. package/authoring/doctypes/template/parse.mjs +1 -0
  313. package/authoring/doctypes/template/parse.test.mjs +21 -0
  314. package/authoring/doctypes/template/template.doc.mjs +6 -0
  315. package/authoring/doctypes/template/type.ts +10 -0
  316. package/authoring/integration/integration.doc.mjs +1 -1
  317. package/clients/cli/commands/build-theme.mjs +279 -30
  318. package/clients/cli/commands/build.mjs +7 -6
  319. package/clients/cli/commands/build.text-fields.test.mjs +1 -1
  320. package/clients/cli/commands/component/index.mjs +88 -12
  321. package/clients/cli/commands/component-replacement.text.test.mjs +271 -0
  322. package/clients/cli/commands/component.doc.mjs +9 -2
  323. package/clients/cli/commands/discover.mjs +29 -1
  324. package/clients/cli/commands/discover.no-source.test.mjs +75 -0
  325. package/clients/cli/commands/docs.depth.test.mjs +219 -0
  326. package/clients/cli/commands/docs.doc.mjs +15 -2
  327. package/clients/cli/commands/docs.mjs +273 -16
  328. package/clients/cli/commands/docs.test.mjs +382 -0
  329. package/clients/cli/commands/doctor-integration-components.doc.mjs +15 -4
  330. package/clients/cli/commands/doctor.doc.mjs +1 -1
  331. package/clients/cli/commands/doctor.mjs +4 -4
  332. package/clients/cli/commands/doctor.test.mjs +9 -51
  333. package/clients/cli/commands/gap-report.doc.mjs +2 -2
  334. package/clients/cli/commands/gap-report.mjs +12 -0
  335. package/clients/cli/commands/gap-report.test.mjs +63 -0
  336. package/clients/cli/commands/hook/index.mjs +7 -2
  337. package/clients/cli/commands/import-hint-correctness.test.mjs +5 -5
  338. package/clients/cli/commands/init.next-steps.test.mjs +18 -23
  339. package/clients/cli/commands/integration-add.doc.mjs +10 -0
  340. package/clients/cli/commands/integration-authoring.test.mjs +12 -2
  341. package/clients/cli/commands/integration-real-world.test.mjs +61 -12
  342. package/clients/cli/commands/integration.mjs +3 -1
  343. package/clients/cli/commands/layout-check.doc.mjs +1 -0
  344. package/clients/cli/commands/layout-expand.doc.mjs +4 -1
  345. package/clients/cli/commands/layout-grammar.doc.mjs +1 -0
  346. package/clients/cli/commands/layout.doc.mjs +1 -0
  347. package/clients/cli/commands/layout.expand-receipt.test.mjs +94 -0
  348. package/clients/cli/commands/layout.mjs +61 -4
  349. package/clients/cli/commands/no-prompt-wording.test.mjs +4 -4
  350. package/clients/cli/commands/search.doc.mjs +5 -4
  351. package/clients/cli/commands/search.mjs +30 -6
  352. package/clients/cli/commands/search.test.mjs +63 -17
  353. package/clients/cli/commands/swizzle.doc.mjs +12 -3
  354. package/clients/cli/commands/swizzle.mjs +2 -1
  355. package/clients/cli/commands/template.copy-receipt.test.mjs +60 -0
  356. package/clients/cli/commands/template.mjs +70 -6
  357. package/clients/cli/commands/template.show-media.test.mjs +62 -0
  358. package/clients/cli/commands/text-json-parity.test.mjs +40 -0
  359. package/clients/cli/commands/theme-add-lifecycle.test.mjs +132 -0
  360. package/clients/cli/commands/theme-add.doc.mjs +19 -19
  361. package/clients/cli/commands/theme-eject.doc.mjs +47 -0
  362. package/clients/cli/commands/theme-list.behavior.test.mjs +44 -0
  363. package/clients/cli/commands/theme-list.doc.mjs +2 -2
  364. package/clients/cli/commands/theme-palette-generate.doc.mjs +1 -2
  365. package/clients/cli/commands/theme-remove.doc.mjs +22 -0
  366. package/clients/cli/commands/theme-template.doc.mjs +4 -3
  367. package/clients/cli/commands/theme-use.doc.mjs +22 -0
  368. package/clients/cli/commands/theme.doc.mjs +21 -16
  369. package/clients/cli/commands/upgrade.ascii-output.test.mjs +14 -0
  370. package/clients/cli/commands/upgrade.mjs +1 -1
  371. package/clients/cli/commands/write-failure.test.mjs +175 -0
  372. package/clients/cli/index.mjs +4 -1
  373. package/clients/cli/lib/component-format.mjs +19 -2
  374. package/clients/cli/lib/manifest.mjs +44 -165
  375. package/clients/cli/lib/manifest.test.mjs +98 -7
  376. package/clients/cli/lib/resolve-theme.mjs +80 -78
  377. package/clients/cli/lib/resolve-theme.test.mjs +523 -27
  378. package/foundation/agent-docs/agent-docs.mjs +31 -28
  379. package/foundation/agent-docs/agent-docs.test.mjs +1163 -0
  380. package/foundation/agent-docs/app-theme-workflow.test.mjs +13 -0
  381. package/foundation/config/project.d.mts +20 -5
  382. package/foundation/config/project.mjs +43 -6
  383. package/foundation/config/theme-private-vars.d.mts +12 -0
  384. package/foundation/config/theme-private-vars.mjs +107 -0
  385. package/foundation/config/theme-private-vars.test.mjs +55 -0
  386. package/foundation/config/theme-state.d.mts +145 -0
  387. package/foundation/config/theme-state.mjs +417 -0
  388. package/foundation/config/theme-state.test.mjs +182 -0
  389. package/foundation/discovery/component-discovery.d.mts +5 -2
  390. package/foundation/discovery/component-discovery.mjs +12 -6
  391. package/foundation/discovery/component-replacement.d.mts +91 -0
  392. package/foundation/discovery/component-replacement.mjs +417 -0
  393. package/foundation/discovery/component-replacement.test.mjs +480 -0
  394. package/foundation/discovery/docs-output-budget.d.mts +6 -2
  395. package/foundation/discovery/docs-output-budget.mjs +2 -1
  396. package/foundation/discovery/docs-section-key.d.mts +4 -2
  397. package/foundation/discovery/docs-section-key.mjs +1 -1
  398. package/foundation/discovery/module-exports.d.mts +10 -0
  399. package/foundation/discovery/module-exports.mjs +146 -0
  400. package/foundation/discovery/package-exports.d.mts +29 -0
  401. package/foundation/discovery/package-exports.mjs +200 -0
  402. package/foundation/discovery/template-adapter.d.mts +14 -0
  403. package/foundation/discovery/template-adapter.fixture-refs.test.mjs +37 -1
  404. package/foundation/discovery/template-adapter.mjs +21 -1
  405. package/foundation/discovery/theme-discovery.d.mts +78 -5
  406. package/foundation/discovery/theme-discovery.mjs +143 -18
  407. package/foundation/discovery/theme-discovery.test.mjs +9 -3
  408. package/foundation/discovery/theme-imports.d.mts +15 -0
  409. package/foundation/discovery/theme-imports.mjs +217 -0
  410. package/foundation/discovery/theme-imports.test.mjs +173 -0
  411. package/foundation/doc-compiler/doc-loads.test.mjs +18 -8
  412. package/foundation/doc-compiler/inputs.mjs +2 -1
  413. package/foundation/doc-compiler/inputs.test.mjs +0 -1
  414. package/foundation/doc-compiler/lenses.d.mts +4 -2
  415. package/foundation/doc-compiler/lenses.mjs +1 -1
  416. package/foundation/doc-compiler/tree.test.mjs +649 -0
  417. package/foundation/fs/module-loader.d.mts +9 -0
  418. package/foundation/fs/module-loader.mjs +71 -2
  419. package/foundation/integrations/cli-requirement.d.mts +79 -13
  420. package/foundation/integrations/cli-requirement.mjs +115 -22
  421. package/foundation/integrations/cli-requirement.test.mjs +205 -8
  422. package/foundation/integrations/contribution-inventory.mjs +3 -3
  423. package/foundation/response/base.d.ts +9 -3
  424. package/foundation/response/json.d.mts +7 -4
  425. package/foundation/response/json.mjs +10 -6
  426. package/foundation/response/response-types.doc.d.mts +5 -5
  427. package/foundation/response/response-types.doc.mjs +50 -35
  428. package/foundation/response/response.doc.mjs +18 -4
  429. package/foundation/text/copyright-header.mjs +1 -1
  430. package/foundation/text/copyright-header.test.mjs +1 -1
  431. package/package.json +9 -9
  432. package/assets/docs/layout.doc.dense.mjs +0 -388
  433. package/assets/docs/layout.doc.mjs +0 -550
@@ -29,7 +29,7 @@ export const docs = {
29
29
  style: 'unordered',
30
30
  items: [
31
31
  'Your component intentionally serves the same role as one specific Core component.',
32
- 'Every app that loads the integration should get your component from unqualified component detail, lists, search, swizzle, and issue routing.',
32
+ 'Every app that loads the integration should get your component from unqualified component detail, `component --list`, search, `swizzle <Name>`, and issue routing.',
33
33
  'You have tested both the replacement and explicit access to the original Core component.',
34
34
  ],
35
35
  },
@@ -70,13 +70,30 @@ export default {
70
70
  projection: {fields: ['replaces']},
71
71
  presentation: 'full',
72
72
  },
73
+ {
74
+ type: 'prose',
75
+ text: 'The replacement turns on only when your package declares the first CLI release that applies it. Add this to its `package.json`:',
76
+ },
77
+ {
78
+ type: 'code',
79
+ lang: 'json',
80
+ label: 'package.json',
81
+ code: `{
82
+ "peerDependencies": {"@astryxdesign/cli": ">=0.6.7"},
83
+ "peerDependenciesMeta": {"@astryxdesign/cli": {"optional": true}}
84
+ }`,
85
+ },
73
86
  {
74
87
  type: 'list',
75
88
  style: 'unordered',
76
89
  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.',
91
+ '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.',
77
92
  '`replaces` names the Core `ComponentDoc` identity, not its display label, import path, or a standalone hook.',
78
93
  '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`.',
79
- '`--package @astryxdesign/core` always selects the original Core component.',
94
+ '`--package @astryxdesign/core` always selects the original Core component, and `--package` with your package selects your component by either name.',
95
+ 'Replacing `SideNav` replaces only that name. `SideNavItem` and the other SideNav parts stay Core components; document any parts your package provides under their own names.',
96
+ '`swizzle --list` lists Core components, including the one you replace. `swizzle SideNav` copies your component, and `swizzle SideNav --package @astryxdesign/core` copies the original.',
80
97
  ],
81
98
  },
82
99
  ],
@@ -94,8 +111,8 @@ export default {
94
111
  type: 'list',
95
112
  style: 'unordered',
96
113
  items: [
97
- 'A missing target, invalid value, second replacement for one target in the same package, or a replacement named after a different Core component is an error.',
98
- 'When several integrations replace one target, explicit configuration beats the automatic pick. Among explicitly configured integrations, the later package wins and Doctor warns.',
114
+ 'Once the package declares the range, a missing target, invalid value, second replacement for one target in the same package, or a replacement named after a different Core component is an error. Without the range, `doctor integration components` reports each of these as a warning.',
115
+ 'When several integrations replace one target, explicit configuration beats the automatic pick. Among explicitly configured integrations, the later package wins and Doctor warns. Among autolinked integrations alone, the dependency listed later in `package.json` wins and Doctor warns.',
99
116
  ],
100
117
  },
101
118
  ],
@@ -0,0 +1,102 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /**
4
+ * @file `astryx docs layout/responsive`: decide what each region does as
5
+ * width changes.
6
+ */
7
+
8
+ /** @type {import('@astryxdesign/cli/authoring').ReferenceDoc} */
9
+
10
+ export const docs = {
11
+ type: 'generic',
12
+ name: 'responsive',
13
+ title: 'Responsive',
14
+ placement: {parent: 'namespace:layout', slot: 'guides', order: 50},
15
+ category: 'guide',
16
+ description:
17
+ 'Decide what each region does as width changes: divide, reveal, resize, or swap.',
18
+ keywords: [
19
+ 'responsive',
20
+ 'breakpoints',
21
+ 'useMediaQuery',
22
+ 'mobileNav',
23
+ 'MobileNav',
24
+ 'Dialog',
25
+ 'BottomSheet',
26
+ 'contentWidth',
27
+ 'contract',
28
+ ],
29
+
30
+ sections: [
31
+ {
32
+ id: 'breakpoints',
33
+ title: 'Breakpoints',
34
+ content: [
35
+ {
36
+ type: 'prose',
37
+ text: 'Decide what each region does as width changes. Write the responsive contract down for every region before you call the layout done.',
38
+ },
39
+ {
40
+ type: 'list',
41
+ style: 'do',
42
+ items: [
43
+ 'Write the contract down for every region before you call the layout done',
44
+ 'Decide per region whether it is revealed, resized, or swapped at each width',
45
+ 'Drop a region rather than let it compete for width it does not have',
46
+ ],
47
+ },
48
+ {
49
+ type: 'list',
50
+ style: 'dont',
51
+ items: [
52
+ 'Hold three regions at a width where none of them has usable space',
53
+ 'Shrink every region uniformly instead of swapping or dropping one',
54
+ 'Wire a breakpoint in CSS that the contract comment never mentions',
55
+ ],
56
+ },
57
+ ],
58
+ },
59
+ {
60
+ id: 'responsive-contract',
61
+ title: 'Responsive contract',
62
+ content: [
63
+ {
64
+ type: 'prose',
65
+ text: 'Lock what each region does as width changes, and pair every line of the contract with the prop or hook that enforces it.',
66
+ },
67
+ {
68
+ type: 'list',
69
+ style: 'unordered',
70
+ items: [
71
+ 'Divide: how many regions survive at each width',
72
+ 'Reveal: which regions earn their width only when there is room, and open on demand below that',
73
+ 'Resize: content flexes while fixed regions hold their budgets, and text stays capped by contentWidth so line length holds',
74
+ 'Swap: navigation becomes MobileNav at the AppShell mobileNav breakpoint; the side panel becomes a Dialog or BottomSheet, driven by useMediaQuery',
75
+ ],
76
+ },
77
+ {
78
+ type: 'code',
79
+ lang: 'tsx',
80
+ label: 'Contract wired to props',
81
+ code: `// Recommended thresholds: 3 regions above 1024, 2 from 768,
82
+ // 1 below. Text reads best at 40–60 characters per line.
83
+ // >1024 SideNav 256 | content | side panel 380
84
+ // <=1024 panel moves to a Dialog (useMediaQuery)
85
+ // <=768 nav collapses to MobileNav (mobileNav "md")
86
+ const isNarrow = useMediaQuery('(max-width: 1024px)');
87
+
88
+ <AppShell sideNav={<SideNav />} mobileNav={{breakpoint: 'md'}}>
89
+ <Layout
90
+ content={<LayoutContent>{/* rows */}</LayoutContent>}
91
+ end={isNarrow ? undefined : <LayoutPanel width={380} hasDivider />}
92
+ />
93
+ </AppShell>`,
94
+ },
95
+ {
96
+ type: 'prose',
97
+ text: 'Verify: every contract line names a mechanism, so the comment cannot drift from the behavior.',
98
+ },
99
+ ],
100
+ },
101
+ ],
102
+ };
@@ -0,0 +1,145 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /**
4
+ * @file `astryx docs layout/scaffold`: pick the shell, budget each region,
5
+ * and choose navigation — before any content exists.
6
+ */
7
+
8
+ /** @type {import('@astryxdesign/cli/authoring').ReferenceDoc} */
9
+
10
+ export const docs = {
11
+ type: 'generic',
12
+ name: 'scaffold',
13
+ title: 'Scaffold',
14
+ placement: {parent: 'namespace:layout', slot: 'guides', order: 10},
15
+ category: 'guide',
16
+ description:
17
+ 'Pick the shell, budget each region, and choose navigation, before any content exists.',
18
+ keywords: [
19
+ 'shell',
20
+ 'navigation',
21
+ 'AppShell',
22
+ 'SideNav',
23
+ 'TopNav',
24
+ 'MobileNav',
25
+ 'frame',
26
+ 'region',
27
+ 'width budget',
28
+ 'contentWidth',
29
+ ],
30
+
31
+ sections: [
32
+ {
33
+ id: 'scaffold',
34
+ title: 'Scaffold',
35
+ content: [
36
+ {
37
+ type: 'prose',
38
+ text: 'Pick the shell, budget each region, and choose navigation, before any content exists. Shell and Navigation cover each step; these rules hold for both.',
39
+ },
40
+ {
41
+ type: 'list',
42
+ style: 'do',
43
+ items: [
44
+ 'Decide the frame, region width budgets, and fill or capped before any content exists',
45
+ 'State the reason for the navigation choice, or inherit the template pairing',
46
+ 'Reserve raw px for structural widths; interior spacing uses tokens',
47
+ ],
48
+ },
49
+ {
50
+ type: 'list',
51
+ style: 'dont',
52
+ items: [
53
+ 'Build content-first and wrap each section in a Card, producing a padded scroll column',
54
+ 'Stretch prose, forms, or lists across a wide region instead of capping with contentWidth',
55
+ 'SideNav when the nav is really filters or controls, or must hold wide elements like breadcrumbs',
56
+ 'TopNav when top-slot ownership is unclear, or the hierarchy is deep or still growing',
57
+ 'Both bars when the ecosystem layer is thin, so the second only wastes space',
58
+ 'Deviate from the template navigation pairing without a stated reason',
59
+ ],
60
+ },
61
+ ],
62
+ },
63
+ {
64
+ id: 'shell',
65
+ title: 'Shell',
66
+ content: [
67
+ {
68
+ type: 'prose',
69
+ text: 'Pick the shell and budget its regions before any content exists. Structural widths are the one place raw px belongs; everything inside them uses the spacing scale.',
70
+ },
71
+ {
72
+ type: 'list',
73
+ style: 'ordered',
74
+ items: [
75
+ 'Pick the frame: AppShell for nav apps, Layout with LayoutPanel in a start or end slot for multi-pane tools, or a plain content column for documents and forms',
76
+ 'Give every fixed region a width budget, so no region has to negotiate for space at render time',
77
+ 'Read the content to set fill or capped: tables, charts, and boards fill their region; prose, forms, and lists cap with Layout contentWidth so lines never over-stretch',
78
+ 'Set each region container policy, rows or card grid, before writing content',
79
+ ],
80
+ },
81
+ {
82
+ type: 'code',
83
+ lang: 'tsx',
84
+ label: 'A three-region tool frame',
85
+ code: `// Recommended budgets: SideNav 240–280, icon rail 64–72,
86
+ // side panel 340–420, filter rail 220–260.
87
+ <AppShell sideNav={<SideNav>{/* nav items */}</SideNav>}>
88
+ <Layout
89
+ content={<LayoutContent>{/* table fills its region */}</LayoutContent>}
90
+ end={<LayoutPanel width={380} hasDivider>{/* detail */}</LayoutPanel>}
91
+ />
92
+ </AppShell>
93
+
94
+ // Capped instead: 640 suits text and forms, 960 mixed content.
95
+ // Dividers stay full-bleed.
96
+ <Layout
97
+ contentWidth={640}
98
+ content={<LayoutContent>{/* settings form */}</LayoutContent>}
99
+ />`,
100
+ },
101
+ {
102
+ type: 'prose',
103
+ text: 'Verify: every region has a width budget, a fill-or-capped decision, and a container policy written down before any content exists.',
104
+ },
105
+ ],
106
+ },
107
+ {
108
+ id: 'navigation',
109
+ title: 'Navigation',
110
+ content: [
111
+ {
112
+ type: 'prose',
113
+ text: 'When the frame leaves navigation open, default to SideNav: it absorbs destinations you have not planned yet. App type and destination count are guiding indicators, not determining rules.',
114
+ },
115
+ {
116
+ type: 'list',
117
+ style: 'unordered',
118
+ items: [
119
+ 'SideNav, the default: grouping needed, customizable nav, items with secondary actions, or nav that collapses. Trackers, consoles, and settings usually start here',
120
+ 'TopNav: a shallow nav you expect to stay shallow, context that must stay visible, or a control- and filter-heavy page; add a TabList for a second level. Media libraries often sit here, over grid content',
121
+ 'Both: a genuine suite, where TopNav carries ecosystem-wide concerns (context switcher, global search) and SideNav carries product nav',
122
+ 'Neither: messaging and feeds use a column frame of rail, nav, stream, and panel',
123
+ ],
124
+ },
125
+ {
126
+ type: 'code',
127
+ lang: 'tsx',
128
+ label: 'Navigation passed to AppShell',
129
+ code: `// Default: product nav on the side.
130
+ <AppShell sideNav={<SideNav>{/* items */}</SideNav>} />
131
+
132
+ // Shallow, stable nav on a control-heavy page.
133
+ <AppShell topNav={<TopNav>{/* items */}</TopNav>} />
134
+
135
+ // Suite: ecosystem concerns on top, product nav on the side.
136
+ <AppShell topNav={<TopNav />} sideNav={<SideNav />} />`,
137
+ },
138
+ {
139
+ type: 'prose',
140
+ text: 'Verify: you can state the reason in one sentence, and the choice still holds if the nav doubles in size. `npx astryx build "<idea>"` names the template to start from; scaffold it and the pairing is already wired up.',
141
+ },
142
+ ],
143
+ },
144
+ ],
145
+ };
@@ -40,7 +40,7 @@ export const docs = {
40
40
  items: [
41
41
  'Edit its `title` and `summary`: readers see them in the docs list and at the top of your section.',
42
42
  "The guide, `docs/deploying.doc.mjs`, gets `placement: {parent: 'namespace:acme', slot: 'guides'}`. Later runs with `--parent acme` reuse the namespace doc.",
43
- '`package.json` gets the optional peer `"@astryxdesign/cli": ">=0.7.0"`, because an older CLI does not read sections; see {@link generic:versioning}.',
43
+ '`package.json` gets the optional peer `"@astryxdesign/cli": ">=0.6.4"`, because an older CLI does not read sections; see {@link generic:versioning}.',
44
44
  ],
45
45
  },
46
46
  ],
@@ -0,0 +1,82 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /**
4
+ * @file `astryx docs layout/side-panels`: add a master-detail side panel
5
+ * that opens on row select instead of navigating away.
6
+ */
7
+
8
+ /** @type {import('@astryxdesign/cli/authoring').ReferenceDoc} */
9
+
10
+ export const docs = {
11
+ type: 'generic',
12
+ name: 'side-panels',
13
+ title: 'Side panels',
14
+ placement: {parent: 'namespace:layout', slot: 'guides', order: 35},
15
+ category: 'guide',
16
+ description:
17
+ 'Add a master-detail side panel that opens on row select instead of navigating away.',
18
+ keywords: [
19
+ 'LayoutPanel',
20
+ 'side panel',
21
+ 'master detail',
22
+ 'ResizeHandle',
23
+ 'useResizable',
24
+ 'EmptyState',
25
+ 'hasDivider',
26
+ 'isScrollable',
27
+ 'detail panel',
28
+ 'split view',
29
+ ],
30
+
31
+ sections: [
32
+ {
33
+ id: 'side-panels',
34
+ title: 'Side panels',
35
+ content: [
36
+ {
37
+ type: 'prose',
38
+ text: 'Master-detail: selecting a row opens a fixed-width side panel instead of navigating away.',
39
+ },
40
+ {
41
+ type: 'list',
42
+ style: 'unordered',
43
+ items: [
44
+ 'LayoutPanel in the start or end slot of Layout, holding a fixed width budget',
45
+ 'hasDivider to fence it from the content region; isScrollable so long detail scrolls on its own',
46
+ 'For user-adjustable width, pair useResizable() with a ResizeHandle on the panel inner edge: after the panel in a start slot, before it in an end slot with isReversed',
47
+ 'The handle then owns the divider, so the panel sets hasDivider={false}',
48
+ 'Render an EmptyState when nothing is selected, so the region never collapses',
49
+ ],
50
+ },
51
+ {
52
+ type: 'code',
53
+ lang: 'tsx',
54
+ label: 'Fixed panel, then the resizable form',
55
+ code: `// Recommended panel width: 340–420.
56
+ <Layout
57
+ content={<LayoutContent>{/* rows */}</LayoutContent>}
58
+ end={
59
+ <LayoutPanel width={380} hasDivider isScrollable label="Details">
60
+ {/* detail fields, or EmptyState when nothing is selected */}
61
+ </LayoutPanel>
62
+ }
63
+ />
64
+
65
+ // Resizable: handle first in an end slot, and isReversed so
66
+ // dragging left widens the panel.
67
+ end={
68
+ <>
69
+ <ResizeHandle isReversed hasDivider resizable={panel.props}
70
+ label="Resize details" />
71
+ <LayoutPanel width={panel.size} hasDivider={false} />
72
+ </>
73
+ }`,
74
+ },
75
+ {
76
+ type: 'prose',
77
+ text: 'Verify: at narrow widths the panel yields width instead of squeezing content (see the Responsive guide), and only one element between the regions draws a border.',
78
+ },
79
+ ],
80
+ },
81
+ ],
82
+ };
@@ -0,0 +1,144 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /**
4
+ * @file `astryx docs layout/structure`: rank the content in each region,
5
+ * then pick the weakest container that groups it.
6
+ */
7
+
8
+ /** @type {import('@astryxdesign/cli/authoring').ReferenceDoc} */
9
+
10
+ export const docs = {
11
+ type: 'generic',
12
+ name: 'structure',
13
+ title: 'Structure',
14
+ placement: {parent: 'namespace:layout', slot: 'guides', order: 20},
15
+ category: 'guide',
16
+ description:
17
+ 'Rank the content in each region, then pick the weakest container that groups it.',
18
+ keywords: [
19
+ 'type hierarchy',
20
+ 'Card',
21
+ 'Section',
22
+ 'Table',
23
+ 'List',
24
+ 'containers',
25
+ 'rows',
26
+ 'Heading',
27
+ 'Text',
28
+ 'weight',
29
+ 'color',
30
+ 'secondary',
31
+ 'Divider',
32
+ ],
33
+
34
+ sections: [
35
+ {
36
+ id: 'structure',
37
+ title: 'Structure',
38
+ content: [
39
+ {
40
+ type: 'prose',
41
+ text: 'Rank the content in each region, then pick the weakest container that groups it. Type hierarchy and Card or rows cover each step; these rules hold for all of them.',
42
+ },
43
+ {
44
+ type: 'list',
45
+ style: 'do',
46
+ items: [
47
+ 'One lead per region; rank with weight and color; one primary action',
48
+ 'Leave body copy at its defaults; demote by weight and color, not size',
49
+ 'Default to Section; use the weakest container that reads as a group',
50
+ 'Render collections as rows (Table or List), edge-to-edge with dividers',
51
+ ],
52
+ },
53
+ {
54
+ type: 'list',
55
+ style: 'dont',
56
+ items: [
57
+ 'Grey and shrink body copy, so a whole region reads as secondary metadata',
58
+ 'The disabled color for content; it fails contrast and is for disabled controls',
59
+ 'Card soup: each record wrapped in its own Card instead of rendered as rows',
60
+ 'Cards inside Cards, or full-width Cards stacked as page structure',
61
+ 'Flexbox soup: nested ad-hoc flexboxes instead of Grid, Layout, Section, or FormLayout',
62
+ 'Two competing primary actions in one region',
63
+ 'Badge as decoration; use StatusDot or Token for status and metadata',
64
+ ],
65
+ },
66
+ ],
67
+ },
68
+ {
69
+ id: 'type-hierarchy',
70
+ title: 'Type hierarchy',
71
+ content: [
72
+ {
73
+ type: 'prose',
74
+ text: 'Give every region one lead, then rank the rest with weight and color rather than size. Content uses two text colors, primary and secondary, and nothing dimmer: body copy needs no props at all.',
75
+ },
76
+ {
77
+ type: 'list',
78
+ style: 'unordered',
79
+ items: [
80
+ 'Body, the default: plain Text with no type, color, or size prop',
81
+ 'Lead: Heading at the level matching page depth, or body Text at a heavier weight',
82
+ 'Support: step to the secondary color, not to a smaller size',
83
+ 'Metadata: the supporting type, or a StatusDot or Token instead of prose',
84
+ ],
85
+ },
86
+ {
87
+ type: 'code',
88
+ lang: 'tsx',
89
+ label: 'Body copy, then one row of four ranks',
90
+ code: `// Body copy takes no props. Text already defaults to body
91
+ // size in the primary color.
92
+ <Text>Credentials rotate every 90 days</Text>
93
+
94
+ <HStack gap={2}>
95
+ <Text weight="semibold">Payments API</Text>
96
+ <StatusDot variant="success" label="Healthy" />
97
+ <Text color="secondary">v2.14</Text>
98
+ <Text type="supporting">edited 3h ago</Text>
99
+ </HStack>`,
100
+ },
101
+ {
102
+ type: 'prose',
103
+ text: 'Squint test: blurred, you read lead, then support, then groups, in that order. If everything reads at once, raise contrast with weight and color, not borders and not smaller text.',
104
+ },
105
+ ],
106
+ },
107
+ {
108
+ id: 'containers',
109
+ title: 'Card or rows',
110
+ content: [
111
+ {
112
+ type: 'prose',
113
+ text: 'Reach for the weakest container that reads as a group, and escalate only when it fails. Weakest to strongest:',
114
+ },
115
+ {
116
+ type: 'list',
117
+ style: 'ordered',
118
+ items: [
119
+ 'spacing and gap: related items inside one group. The default rhythm',
120
+ 'Divider: peers in a dense list or toolbar, or fencing a header from a scrollable body',
121
+ 'Section: the default page-structure unit, related content under a heading. No border',
122
+ 'Card: a self-contained widget (KPI tile, chart, gallery entry), or a hard boundary around critical content',
123
+ ],
124
+ },
125
+ {
126
+ type: 'code',
127
+ lang: 'tsx',
128
+ label: 'Section as the default unit',
129
+ code: `// Records are rows in one Section, not one Card each.
130
+ // Recommended row height: 32–40px.
131
+ <Section padding={0}>
132
+ <List header={<Heading level={3}>Members</Heading>} hasDividers>
133
+ {/* ListItem per member */}
134
+ </List>
135
+ </Section>`,
136
+ },
137
+ {
138
+ type: 'prose',
139
+ text: 'Decision test: records render as rows, Table for columnar and List for single-line; a self-contained widget or hard boundary is a Card; everything else is a Section.',
140
+ },
141
+ ],
142
+ },
143
+ ],
144
+ };
@@ -60,7 +60,14 @@ export const docs = {
60
60
  type: 'reference',
61
61
  target: 'schema:template-doc',
62
62
  projection: {
63
- fields: ['type', 'name', 'displayName', 'description', 'isReady'],
63
+ fields: [
64
+ 'type',
65
+ 'name',
66
+ 'displayName',
67
+ 'description',
68
+ 'keywords',
69
+ 'isReady',
70
+ ],
64
71
  },
65
72
  presentation: 'full',
66
73
  },
@@ -71,9 +78,14 @@ export const docs = {
71
78
  'Set `type` to the kind you chose in {@link generic:start-a-template}. It decides which other fields the doc accepts.',
72
79
  'The file name sets the template id ({@link generic:start-a-template}). Labels live in the doc: the terminal list prints `name`, and JSON listings print `displayName`. Changing either never changes the id.',
73
80
  'Write the description for someone choosing between templates. The Doc metadata category in {@link generic:template-grading-rubric} defines what a complete description covers.',
81
+ "Name the ideas the template serves in `keywords`: the domains, tasks, and other names a builder might use for it, in lowercase, such as `['monitoring', 'uptime', 'on-call']` for a service-health dashboard. `astryx search` matches them as it matches the description, and `astryx build` ranks page templates on them, so the description can stay about the layout.",
74
82
  'Add `isReady: false` as soon as you generate the doc, because a doc without `isReady` is listed as ready. Keep it until the template passes {@link generic:test-template-in-app} and the quality review.',
75
83
  ],
76
84
  },
85
+ {
86
+ type: 'prose',
87
+ text: 'Note: `keywords` needs `@astryxdesign/cli` 0.7.0 or later. A stable CLI before 0.7.0 rejects the field, drops that template, and hides your doc topics: `template --list` and `search` print one warning, and `docs` and `build` say nothing. Declare the CLI floor as an optional peer ({@link generic:versioning}); `integration verify` fails until you do.',
88
+ },
77
89
  ],
78
90
  },
79
91
  {
@@ -23,11 +23,11 @@ export const docs = {
23
23
  blocks: [
24
24
  {
25
25
  type: 'prose',
26
- text: 'A theme is an editable `defineTheme` source with a generated color palette. An integration ships a theme the same way a standalone theme package does: an app installs the package, applies the theme with `<Theme>`, and customizes it with `extends`. An integration theme and a standalone theme package are the same shape.',
26
+ text: 'A theme contribution has editable `defineTheme` source plus a built module and production CSS. `integration add theme` scaffolds the source and declares the package exports; `theme build` writes the built outputs. An app installs the package, runs `theme add --import`, applies the theme from its generated app module, and customizes it with `extends` instead of copying source.',
27
27
  },
28
28
  {
29
29
  type: 'prose',
30
- text: 'These guides cover authoring a theme inside an integration — scaffold it, generate its palette, define its tokens, ship its fonts, and document it. Using a theme, applying and extending it, is the same for every theme; see {@link generic:theme}.',
30
+ text: 'These guides cover the whole path: scaffold the source, generate its palette, define and build the theme, ship fonts and assets, run `integration verify`, and document how apps add and extend it. Applying a theme, including mode and SSR, works the same for every theme; see {@link generic:use-a-theme}.',
31
31
  },
32
32
  ],
33
33
  slots: {
@@ -87,19 +87,27 @@ export const docs = {
87
87
  ],
88
88
  [
89
89
  '`docs_tree_needs_cli`: `The package ships a namespace doc or a placed guide but declares no @astryxdesign/cli peer.`',
90
- "Run `npm pkg set 'peerDependencies.@astryxdesign/cli=>=0.7.0'` and `npm pkg set 'peerDependenciesMeta.@astryxdesign/cli.optional=true' --json`.",
90
+ "Run `npm pkg set 'peerDependencies.@astryxdesign/cli=>=0.6.4'` and `npm pkg set 'peerDependenciesMeta.@astryxdesign/cli.optional=true' --json`.",
91
91
  ],
92
92
  [
93
93
  '`replaces_needs_cli`: The package has a template that sets `replaces` but declares no @astryxdesign/cli peer.',
94
- 'Same fix: an older CLI rejects `replaces`, drops that template, and hides your doc topics.',
94
+ "Run `npm pkg set 'peerDependencies.@astryxdesign/cli=>=0.7.0'` and `npm pkg set 'peerDependenciesMeta.@astryxdesign/cli.optional=true' --json`. A stable CLI before 0.7.0 rejects `replaces`, drops that template, and hides your doc topics.",
95
+ ],
96
+ [
97
+ '`component_replaces_needs_cli` (a warning): The package has a component that sets `replaces` but declares no @astryxdesign/cli peer, or a peer range that admits an earlier CLI.',
98
+ "Run `npm pkg set 'peerDependencies.@astryxdesign/cli=>=0.6.7'` and `npm pkg set 'peerDependenciesMeta.@astryxdesign/cli.optional=true' --json` to turn the replacement on. Until then the component keeps its own name and the Core component stays selected; a component named like its target stays ambiguous by that bare name.",
99
+ ],
100
+ [
101
+ '`keywords_needs_cli`: The package has a template that sets `keywords` but declares no @astryxdesign/cli peer.',
102
+ 'The same fix as `replaces_needs_cli`: a stable CLI before 0.7.0 rejects `keywords`, drops that template, and hides your doc topics.',
95
103
  ],
96
104
  [
97
105
  '`themes_need_cli`: The package ships a theme but declares no @astryxdesign/cli peer.',
98
- 'Same fix: an older CLI cannot read typed theme descriptors, so it drops your themes and can hide your doc topics.',
106
+ "Run `npm pkg set 'peerDependencies.@astryxdesign/cli=>=0.6.4'` and `npm pkg set 'peerDependenciesMeta.@astryxdesign/cli.optional=true' --json`. A stable CLI before 0.6.4 cannot read typed theme descriptors, so it drops your themes and can hide your doc topics.",
99
107
  ],
100
108
  [
101
109
  '`section_ids_need_cli`: The package has a doc section that sets `id` but declares no @astryxdesign/cli peer.',
102
- 'Same fix, or drop the section `id`s: an older CLI rejects them and hides your doc topics.',
110
+ 'The same fix as `themes_need_cli`, or drop the section `id`s: a stable CLI before 0.6.4 rejects them and hides your doc topics.',
103
111
  ],
104
112
  ],
105
113
  },
@@ -135,7 +143,7 @@ export const docs = {
135
143
  ],
136
144
  [
137
145
  'Your docs section, templates, or themes are missing only in some apps',
138
- 'Those apps run a stable CLI before 0.7.0. Update `@astryxdesign/cli` there, and keep your optional `@astryxdesign/cli` peer so npm warns about an old CLI.',
146
+ 'Those apps run a CLI too old to read them: a stable CLI before 0.7.0 for a template that sets `replaces` or `keywords`, or before 0.6.4 for a docs section or a theme. Update `@astryxdesign/cli` there, and keep your optional `@astryxdesign/cli` peer so npm warns about an old CLI.',
139
147
  ],
140
148
  ],
141
149
  },