@astryxdesign/cli 0.7.17-canary.g5a3fd39 → 0.7.17-canary.g5cf5d69

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 (426) hide show
  1. package/README.md +64 -63
  2. package/api/build/_adapter.d.mts +51 -0
  3. package/api/build/_adapter.mjs +122 -6
  4. package/api/build/build.doc.mjs +1 -1
  5. package/api/build/build.mjs +23 -14
  6. package/api/build/build.type.d.mts +1 -1
  7. package/api/build/build.type.mjs +3 -3
  8. package/api/build/help/help.d.mts +15 -14
  9. package/api/build/help/help.mjs +62 -3
  10. package/api/build/kit/answer.mjs +2 -3
  11. package/api/build/kit/signals.d.mts +10 -0
  12. package/api/build/kit/signals.mjs +15 -2
  13. package/api/component/detail/blocks/blocks.mjs +2 -1
  14. package/api/discover/_adapter.d.mts +57 -6
  15. package/api/discover/_adapter.mjs +278 -49
  16. package/api/discover/_catalog-view.d.mts +7 -0
  17. package/api/discover/_catalog-view.mjs +10 -1
  18. package/api/discover/detail/detail.d.mts +3 -2
  19. package/api/discover/detail/detail.mjs +3 -2
  20. package/api/discover/detail/doc/doc.mjs +1 -1
  21. package/api/discover/discover.d.mts +24 -0
  22. package/api/discover/discover.doc.mjs +1 -1
  23. package/api/discover/discover.mjs +146 -25
  24. package/api/discover/discover.type.d.mts +6 -4
  25. package/api/discover/discover.type.mjs +6 -4
  26. package/api/discover/search/search.d.mts +22 -0
  27. package/api/discover/search/search.mjs +290 -70
  28. package/api/docs/_entry-names.mjs +4 -3
  29. package/api/doctor/_adapter.d.mts +43 -3
  30. package/api/doctor/_adapter.mjs +142 -18
  31. package/api/doctor/built-checks.d.mts +30 -3
  32. package/api/doctor/built-checks.mjs +132 -5
  33. package/api/doctor/doctor.d.mts +93 -6
  34. package/api/doctor/doctor.doc.mjs +2 -2
  35. package/api/doctor/doctor.mjs +524 -33
  36. package/api/doctor/doctor.type.d.mts +2 -1
  37. package/api/doctor/doctor.type.mjs +2 -1
  38. package/api/doctor/theme-checks.d.mts +19 -0
  39. package/api/doctor/theme-checks.mjs +74 -6
  40. package/api/hook/hook.type.d.mts +1 -1
  41. package/api/hook/hook.type.mjs +1 -1
  42. package/api/hook/list/list.mjs +11 -7
  43. package/api/icon/_adapter.d.mts +2 -1
  44. package/api/icon/_adapter.mjs +10 -15
  45. package/api/icon/_records.d.mts +3 -1
  46. package/api/icon/_records.mjs +30 -3
  47. package/api/icon/exportIconIndex.doc.mjs +1 -1
  48. package/api/icon/icon.doc.mjs +3 -3
  49. package/api/icon/icon.type.d.mts +32 -1
  50. package/api/icon/icon.type.mjs +19 -3
  51. package/api/icon/list/list.mjs +4 -1
  52. package/api/icon/rankIconIndex.doc.mjs +1 -1
  53. package/api/icon/search/icon-index.mjs +18 -8
  54. package/api/icon/search/search.d.mts +26 -3
  55. package/api/icon/search/search.mjs +155 -9
  56. package/api/init/_adapter.d.mts +14 -0
  57. package/api/init/_adapter.mjs +26 -4
  58. package/api/init/init.d.mts +1 -1
  59. package/api/init/init.doc.mjs +2 -2
  60. package/api/init/init.mjs +1 -1
  61. package/api/init/init.type.d.mts +29 -1
  62. package/api/init/init.type.mjs +14 -1
  63. package/api/init/run/run.d.mts +11 -1
  64. package/api/init/run/run.mjs +84 -5
  65. package/api/integration/_adapter.d.mts +5 -4
  66. package/api/integration/_adapter.mjs +7 -5
  67. package/api/integration/integrationCheck.doc.mjs +1 -1
  68. package/api/integration/pack-check.mjs +8 -9
  69. package/api/integration/validate-integration.d.mts +1 -1
  70. package/api/integration/validate-integration.mjs +26 -24
  71. package/api/integration/validate-integration.type.d.mts +5 -2
  72. package/api/integration/validate-integration.type.mjs +5 -2
  73. package/api/integration/validateIntegration.doc.mjs +1 -1
  74. package/api/render/_adapter.d.mts +4 -2
  75. package/api/render/_adapter.mjs +62 -21
  76. package/api/render/render.doc.mjs +8 -5
  77. package/api/render/render.mjs +1 -1
  78. package/api/render/render.type.d.mts +2 -0
  79. package/api/render/render.type.mjs +2 -0
  80. package/api/search/ORDERING.md +2 -2
  81. package/api/search/_candidate-score.d.mts +3 -0
  82. package/api/search/_candidate-score.mjs +36 -3
  83. package/api/search/_gather-docs.mjs +29 -2
  84. package/api/search/_gather-templates.mjs +2 -1
  85. package/api/search/_main-searcher.mjs +13 -0
  86. package/api/search/_named-keywords.d.mts +2 -1
  87. package/api/search/_named-keywords.mjs +48 -6
  88. package/api/search/_order.d.mts +36 -1
  89. package/api/search/_order.mjs +141 -3
  90. package/api/swizzle/list/list.mjs +8 -1
  91. package/api/swizzle/swizzle.type.d.mts +1 -1
  92. package/api/swizzle/swizzle.type.mjs +1 -1
  93. package/api/template/copy/copy.mjs +3 -4
  94. package/api/template/list/list.mjs +2 -1
  95. package/api/template/show/show.mjs +2 -1
  96. package/api/template/skeleton/skeleton.mjs +2 -1
  97. package/api/template/template.doc.mjs +1 -1
  98. package/api/template/template.mjs +19 -1
  99. package/api/template/template.type.d.mts +1 -0
  100. package/api/template/template.type.mjs +2 -1
  101. package/api/theme/_adapter.d.mts +1 -0
  102. package/api/theme/_adapter.mjs +3 -5
  103. package/api/theme/_app-provider.d.mts +42 -0
  104. package/api/theme/_app-provider.mjs +61 -27
  105. package/api/theme/build/build.d.mts +4 -10
  106. package/api/theme/build/build.mjs +165 -116
  107. package/api/theme/build/input-fields.d.mts +9 -0
  108. package/api/theme/build/input-fields.mjs +155 -16
  109. package/api/theme/build/radius-values.d.mts +18 -0
  110. package/api/theme/build/radius-values.mjs +76 -0
  111. package/api/theme/build/typography-values.mjs +7 -23
  112. package/api/theme/build/written-values.d.mts +18 -0
  113. package/api/theme/build/written-values.mjs +107 -31
  114. package/api/theme/eject/eject.mjs +6 -1
  115. package/api/theme/palette/generate/generator.mjs +24 -0
  116. package/api/theme/theme.type.d.mts +4 -2
  117. package/api/theme/theme.type.mjs +3 -2
  118. package/api/theme/themeBuild.doc.mjs +2 -2
  119. package/api/theme/themeEject.doc.mjs +1 -1
  120. package/api/theme-edit/_catalog.d.mts +40 -0
  121. package/api/theme-edit/_catalog.mjs +100 -22
  122. package/api/theme-edit/_check.mjs +213 -43
  123. package/api/theme-edit/_color.d.mts +14 -0
  124. package/api/theme-edit/_color.mjs +22 -0
  125. package/api/theme-edit/_compiler.mjs +52 -0
  126. package/api/theme-edit/_context.d.mts +20 -2
  127. package/api/theme-edit/_context.mjs +157 -29
  128. package/api/theme-edit/_edit.mjs +426 -58
  129. package/api/theme-edit/_how-question.d.mts +14 -0
  130. package/api/theme-edit/_how-question.mjs +1541 -127
  131. package/api/theme-edit/_how.mjs +43 -0
  132. package/api/theme-edit/_missed.mjs +107 -27
  133. package/api/theme-edit/_normal.d.mts +18 -4
  134. package/api/theme-edit/_normal.mjs +84 -3
  135. package/api/theme-edit/_palette.d.mts +9 -0
  136. package/api/theme-edit/_palette.mjs +158 -33
  137. package/api/theme-edit/_part-words.mjs +16 -3
  138. package/api/theme-edit/_parts.d.mts +8 -0
  139. package/api/theme-edit/_parts.mjs +120 -36
  140. package/api/theme-edit/_png.d.mts +24 -0
  141. package/api/theme-edit/_png.mjs +99 -0
  142. package/api/theme-edit/_preview-app.d.mts +16 -0
  143. package/api/theme-edit/_preview-app.mjs +52 -18
  144. package/api/theme-edit/_preview.d.mts +44 -26
  145. package/api/theme-edit/_preview.mjs +255 -67
  146. package/api/theme-edit/_project.d.mts +12 -1
  147. package/api/theme-edit/_project.mjs +16 -1
  148. package/api/theme-edit/_settings.d.mts +116 -0
  149. package/api/theme-edit/_settings.mjs +1197 -58
  150. package/api/theme-edit/_tables.d.mts +16 -0
  151. package/api/theme-edit/_tables.mjs +34 -4
  152. package/api/theme-edit/theme-edit.type.d.mts +15 -2
  153. package/api/theme-edit/theme-edit.type.mjs +8 -6
  154. package/api/upgrade/_adapter.d.mts +46 -7
  155. package/api/upgrade/_adapter.mjs +110 -15
  156. package/api/upgrade/registry/registry.d.mts +6 -3
  157. package/api/upgrade/registry/registry.mjs +21 -6
  158. package/api/upgrade/run/run.mjs +23 -11
  159. package/api/upgrade/upgrade.doc.mjs +4 -3
  160. package/assets/component-list.generated.json +1 -1
  161. package/assets/docs/tree/agent-guidance.doc.mjs +3 -2
  162. package/assets/docs/tree/checks.doc.mjs +2 -2
  163. package/assets/docs/tree/host-entry.doc.mjs +4 -0
  164. package/assets/docs/tree/icon-definitions.doc.mjs +3 -3
  165. package/assets/docs/tree/icon-sets.doc.mjs +6 -6
  166. package/assets/docs/tree/problems.doc.mjs +3 -3
  167. package/assets/docs/tree/render-pages.doc.mjs +17 -3
  168. package/assets/docs/tree/share-a-page.doc.mjs +5 -5
  169. package/assets/docs/tree/short-and-findable.doc.mjs +3 -3
  170. package/assets/docs/tree/troubleshooting.doc.mjs +8 -0
  171. package/assets/docs/tree/updates.doc.mjs +1 -1
  172. package/assets/docs/tree/versioning.doc.mjs +1 -1
  173. package/assets/docs/working-with-ai.doc.mjs +40 -5
  174. package/assets/docs-routes.generated.json +1 -1
  175. package/assets/docs.generated.json +2 -2
  176. package/assets/icons/installed-icon-set.doc.mjs +30 -0
  177. package/assets/search-catalog.generated.json +2 -2
  178. package/assets/self-audit.generated.json +1 -1
  179. package/assets/templates/blocks/components/Avatar/AvatarInteractive.tsx +6 -1
  180. package/assets/templates/blocks/components/CodeBlock/CodeBlockTerminal.tsx +1 -1
  181. package/assets/templates/blocks/components/LinkProvider/LinkProviderCustomLink.tsx +3 -1
  182. package/assets/templates/components.generated.json +1 -1
  183. package/assets/templates/pages/ai-chat/page.tsx +6 -2
  184. package/assets/templates/pages/ai-chat-landing/page.tsx +1 -1
  185. package/assets/templates/pages/blank/page.tsx +4 -2
  186. package/assets/templates/pages/canvas-editor/page.tsx +3 -1
  187. package/assets/templates/pages/centered-hero/page.tsx +1 -1
  188. package/assets/templates/pages/checkout-wizard/page.tsx +1 -1
  189. package/assets/templates/pages/classic-gallery/page.tsx +1 -1
  190. package/assets/templates/pages/contact-form/page.tsx +2 -2
  191. package/assets/templates/pages/course-detail/page.tsx +1 -1
  192. package/assets/templates/pages/dashboard/page.tsx +24 -8
  193. package/assets/templates/pages/dashboard-alert-rail/page.tsx +4 -2
  194. package/assets/templates/pages/dashboard-cohort-funnel/page.tsx +7 -3
  195. package/assets/templates/pages/dashboard-comparison/page.tsx +5 -2
  196. package/assets/templates/pages/dashboard-composition/page.tsx +10 -4
  197. package/assets/templates/pages/dashboard-progress/page.tsx +6 -3
  198. package/assets/templates/pages/dashboard-scorecard/page.tsx +17 -8
  199. package/assets/templates/pages/detail-page/page.tsx +22 -5
  200. package/assets/templates/pages/documentation/page.tsx +4 -2
  201. package/assets/templates/pages/documentation-design/page.tsx +5 -2
  202. package/assets/templates/pages/documentation-technical/page.tsx +4 -2
  203. package/assets/templates/pages/editor/page.tsx +28 -9
  204. package/assets/templates/pages/file-explorer/page.tsx +3 -1
  205. package/assets/templates/pages/form-two-column/page.tsx +1 -1
  206. package/assets/templates/pages/form-wizard/page.tsx +1 -1
  207. package/assets/templates/pages/form-wizard-dialog/page.tsx +3 -1
  208. package/assets/templates/pages/form-wizard-inline/page.tsx +1 -1
  209. package/assets/templates/pages/form-wizard-vertical/page.tsx +1 -1
  210. package/assets/templates/pages/gallery-hero/page.tsx +1 -1
  211. package/assets/templates/pages/ide/page.tsx +7 -2
  212. package/assets/templates/pages/kanban-board/page.tsx +10 -4
  213. package/assets/templates/pages/library/page.tsx +31 -61
  214. package/assets/templates/pages/login/page.tsx +4 -2
  215. package/assets/templates/pages/login-card/page.tsx +4 -2
  216. package/assets/templates/pages/login-split/page.tsx +3 -2
  217. package/assets/templates/pages/login-sso/page.tsx +4 -4
  218. package/assets/templates/pages/mixed-gallery/page.tsx +1 -1
  219. package/assets/templates/pages/payment-form/page.tsx +1 -1
  220. package/assets/templates/pages/product-detail/page.tsx +16 -4
  221. package/assets/templates/pages/product-gallery/page.tsx +1 -1
  222. package/assets/templates/pages/settings/page.tsx +10 -4
  223. package/assets/templates/pages/settings-dialog/page.tsx +5 -6
  224. package/assets/templates/pages/settings-sidebar/page.tsx +39 -13
  225. package/assets/templates/pages/side-gallery/page.tsx +1 -1
  226. package/assets/templates/pages/table/page.tsx +2 -2
  227. package/assets/templates/pages/table-filter/page.tsx +21 -6
  228. package/assets/templates/pages/table-grouped/page.tsx +23 -2
  229. package/assets/templates/pages/table-inbox/page.tsx +82 -32
  230. package/assets/templates/pages/theme-showcase/page.tsx +3 -2
  231. package/assets/templates/themes/butter/butterPaletteRefs.generated.ts +12 -12
  232. package/assets/templates/themes/butter/butterTheme.ts +197 -4
  233. package/assets/templates/themes/chocolate/chocolateTheme.ts +72 -8
  234. package/assets/templates/themes/gothic/gothicPaletteRefs.generated.ts +3 -3
  235. package/assets/templates/themes/gothic/gothicTheme.ts +114 -4
  236. package/assets/templates/themes/matcha/matchaPaletteRefs.generated.ts +8 -8
  237. package/assets/templates/themes/matcha/matchaTheme.ts +48 -12
  238. package/assets/templates/themes/neutral/neutralTheme.ts +29 -0
  239. package/assets/templates/themes/stone/stonePaletteRefs.generated.ts +2 -2
  240. package/assets/templates/themes/stone/stoneTheme.ts +69 -0
  241. package/assets/templates/themes/y2k/y2kPaletteRefs.generated.ts +9 -9
  242. package/assets/templates/themes/y2k/y2kTheme.ts +249 -14
  243. package/authoring/codemod/parse.d.mts +0 -36
  244. package/authoring/codemod/parse.mjs +62 -41
  245. package/authoring/config/config.doc.mjs +1 -1
  246. package/authoring/config/parse.d.mts +0 -47
  247. package/authoring/config/parse.mjs +128 -103
  248. package/authoring/config/type.ts +4 -3
  249. package/authoring/debug/parse.d.mts +2 -2
  250. package/authoring/discover/parse.d.mts +2 -2
  251. package/authoring/discover/parse.mjs +52 -38
  252. package/authoring/discover/type.ts +2 -1
  253. package/authoring/doctypes/_schema.d.mts +834 -950
  254. package/authoring/doctypes/_schema.mjs +863 -825
  255. package/authoring/doctypes/command/parse.mjs +2 -2
  256. package/authoring/doctypes/component/parse.mjs +2 -2
  257. package/authoring/doctypes/enum/parse.mjs +2 -2
  258. package/authoring/doctypes/hook/parse.mjs +2 -2
  259. package/authoring/doctypes/icon-definition/icon-definition.doc.mjs +1 -1
  260. package/authoring/doctypes/icon-definition/parse.d.mts +0 -24
  261. package/authoring/doctypes/icon-definition/parse.mjs +59 -43
  262. package/authoring/doctypes/icon-set/parse.d.mts +0 -75
  263. package/authoring/doctypes/icon-set/parse.mjs +239 -210
  264. package/authoring/doctypes/legacy.mjs +3 -3
  265. package/authoring/doctypes/namespace/parse.mjs +2 -2
  266. package/authoring/doctypes/reference/parse.mjs +2 -2
  267. package/authoring/doctypes/schema/parse.mjs +2 -2
  268. package/authoring/doctypes/template/parse.d.mts +0 -101
  269. package/authoring/doctypes/template/parse.mjs +131 -106
  270. package/authoring/doctypes/theme/parse.d.mts +0 -23
  271. package/authoring/doctypes/theme/parse.mjs +52 -36
  272. package/authoring/gap-report/parse.d.mts +1 -1
  273. package/authoring/integration/integration.doc.mjs +8 -0
  274. package/authoring/integration/schema.d.mts +14 -3
  275. package/authoring/integration/schema.mjs +20 -2
  276. package/authoring/integration/type.ts +14 -0
  277. package/clients/cli/build-id.generated.json +1 -1
  278. package/clients/cli/commands/build.mjs +27 -13
  279. package/clients/cli/commands/component.mjs +14 -3
  280. package/clients/cli/commands/discover.doc.mjs +2 -2
  281. package/clients/cli/commands/discover.mjs +20 -3
  282. package/clients/cli/commands/docs.doc.mjs +11 -9
  283. package/clients/cli/commands/docs.mjs +50 -21
  284. package/clients/cli/commands/experimental/icon.mjs +330 -227
  285. package/clients/cli/commands/experimental/render.mjs +16 -1
  286. package/clients/cli/commands/experimental/theme.mjs +42 -17
  287. package/clients/cli/commands/experimental-icon-add.doc.mjs +1 -1
  288. package/clients/cli/commands/experimental-icon-map.doc.mjs +4 -1
  289. package/clients/cli/commands/experimental-icon-new-definition.doc.mjs +4 -1
  290. package/clients/cli/commands/experimental-icon-new-set.doc.mjs +4 -1
  291. package/clients/cli/commands/experimental-icon-use.doc.mjs +1 -1
  292. package/clients/cli/commands/experimental-icon.doc.mjs +1 -1
  293. package/clients/cli/commands/experimental-render.doc.mjs +3 -3
  294. package/clients/cli/commands/experimental-theme-compile.doc.mjs +1 -1
  295. package/clients/cli/commands/experimental-theme-editor-new.doc.mjs +1 -1
  296. package/clients/cli/commands/experimental-theme-editor-set.doc.mjs +1 -1
  297. package/clients/cli/commands/experimental-theme-editor-show.doc.mjs +1 -1
  298. package/clients/cli/commands/experimental-theme-editor-undo.doc.mjs +1 -1
  299. package/clients/cli/commands/init.doc.mjs +36 -24
  300. package/clients/cli/commands/integration-check.doc.mjs +1 -1
  301. package/clients/cli/commands/mcp.doc.mjs +53 -0
  302. package/clients/cli/commands/mcp.mjs +51 -0
  303. package/clients/cli/commands/search.mjs +46 -9
  304. package/clients/cli/commands/template.mjs +3 -2
  305. package/clients/cli/commands/theme-build.doc.mjs +1 -1
  306. package/clients/cli/commands/theme.mjs +12 -2
  307. package/clients/cli/commands/upgrade.doc.mjs +3 -2
  308. package/clients/cli/commands.generated.json +1 -1
  309. package/clients/cli/formatters/index.mjs +52 -6
  310. package/clients/cli/index.mjs +23 -17
  311. package/clients/cli/lib/base-gate.mjs +37 -5
  312. package/clients/cli/lib/define-command.mjs +82 -4
  313. package/clients/cli/lib/json-shim.mjs +61 -4
  314. package/clients/cli/lib/manifest.mjs +9 -1
  315. package/clients/cli/lib/mcp-server.mjs +286 -0
  316. package/clients/cli/lib/mcp-tools.mjs +405 -0
  317. package/clients/cli/lib/other-cli-words.mjs +99 -0
  318. package/clients/cli/lib/stray-option.mjs +27 -1
  319. package/clients/cli/lib/unknown-command.mjs +326 -11
  320. package/clients/cli/manifest.generated.json +1 -1
  321. package/clients/cli/run.mjs +1 -1
  322. package/foundation/agent-docs/agent-docs.d.mts +49 -1
  323. package/foundation/agent-docs/agent-docs.mjs +108 -7
  324. package/foundation/agent-docs/computer-agent-text.mjs +1 -1
  325. package/foundation/bases/core.d.mts +1 -1
  326. package/foundation/bases/core.mjs +3 -3
  327. package/foundation/bases/resolve.d.mts +4 -8
  328. package/foundation/bases/resolve.mjs +15 -21
  329. package/foundation/bases/state.d.mts +15 -9
  330. package/foundation/bases/state.mjs +33 -6
  331. package/foundation/config/project.d.mts +5 -4
  332. package/foundation/config/project.mjs +33 -17
  333. package/foundation/discovery/component-discovery.mjs +15 -28
  334. package/foundation/discovery/icon-imports.d.mts +66 -0
  335. package/foundation/discovery/icon-imports.mjs +225 -0
  336. package/foundation/discovery/icon-ranking.d.mts +12 -2
  337. package/foundation/discovery/icon-ranking.mjs +197 -10
  338. package/foundation/discovery/icon-set-checks.mjs +2 -1
  339. package/foundation/discovery/icon-set-discovery.d.mts +28 -0
  340. package/foundation/discovery/icon-set-discovery.mjs +42 -0
  341. package/foundation/discovery/icon-set-writer.d.mts +2 -11
  342. package/foundation/discovery/icon-set-writer.mjs +3 -29
  343. package/foundation/discovery/module-exports.d.mts +1 -1
  344. package/foundation/discovery/module-exports.mjs +136 -33
  345. package/foundation/discovery/name-roots.d.mts +5 -0
  346. package/foundation/discovery/name-roots.mjs +11 -0
  347. package/foundation/discovery/runner-allowlist.d.mts +1 -0
  348. package/foundation/discovery/runner-allowlist.mjs +2 -0
  349. package/foundation/discovery/runner-commands.mjs +1 -0
  350. package/foundation/discovery/template-adapter.d.mts +1 -1
  351. package/foundation/discovery/template-destination.d.mts +14 -6
  352. package/foundation/discovery/template-destination.mjs +42 -8
  353. package/foundation/discovery/template-icons.d.mts +45 -2
  354. package/foundation/discovery/template-icons.mjs +26 -54
  355. package/foundation/discovery/template-needs.d.mts +28 -2
  356. package/foundation/discovery/template-needs.mjs +92 -11
  357. package/foundation/discovery/theme-discovery.d.mts +8 -0
  358. package/foundation/discovery/theme-discovery.mjs +23 -6
  359. package/foundation/discovery/theme-imports.mjs +2 -4
  360. package/foundation/doc-compiler/parse-readable.mjs +4 -3
  361. package/foundation/doc-compiler/stored-docs.d.mts +13 -0
  362. package/foundation/doc-compiler/stored-docs.mjs +74 -3
  363. package/foundation/env/cli-command.d.mts +68 -10
  364. package/foundation/env/cli-command.mjs +116 -22
  365. package/foundation/env/project-scope.d.mts +9 -0
  366. package/foundation/env/project-scope.mjs +28 -2
  367. package/foundation/fs/gather-cache.d.mts +23 -0
  368. package/foundation/fs/gather-cache.mjs +94 -2
  369. package/foundation/fs/module-loader.d.mts +3 -1
  370. package/foundation/fs/module-loader.mjs +85 -5
  371. package/foundation/fs/read-record.mjs +9 -5
  372. package/foundation/identity/package-names.d.mts +18 -0
  373. package/foundation/identity/package-names.mjs +19 -0
  374. package/foundation/identity/providers.mjs +3 -2
  375. package/foundation/integrations/icon-features.d.mts +63 -0
  376. package/foundation/integrations/icon-features.mjs +54 -0
  377. package/foundation/integrations/integrations.d.mts +13 -1
  378. package/foundation/integrations/integrations.mjs +47 -6
  379. package/foundation/integrations/pack-state.d.mts +21 -0
  380. package/foundation/integrations/pack-state.mjs +42 -19
  381. package/foundation/integrations/validate-contributions.d.mts +11 -3
  382. package/foundation/integrations/validate-contributions.mjs +51 -13
  383. package/foundation/release/cache.d.mts +13 -1
  384. package/foundation/release/cache.mjs +94 -14
  385. package/foundation/release/notices.d.mts +15 -0
  386. package/foundation/release/notices.mjs +111 -7
  387. package/foundation/release/project.d.mts +3 -4
  388. package/foundation/release/project.mjs +5 -6
  389. package/foundation/render/client-bundle.d.mts +126 -0
  390. package/foundation/render/client-bundle.mjs +565 -0
  391. package/foundation/render/cut-short.d.mts +7 -1
  392. package/foundation/render/cut-short.mjs +46 -6
  393. package/foundation/render/embedded-imports.d.mts +4 -3
  394. package/foundation/render/embedded-imports.mjs +13 -8
  395. package/foundation/render/esbuild-dependency.d.mts +14 -0
  396. package/foundation/render/esbuild-dependency.mjs +41 -0
  397. package/foundation/render/file-header.mjs +5 -4
  398. package/foundation/render/page-worker.mjs +562 -86
  399. package/foundation/render/picture-chrome.mjs +54 -29
  400. package/foundation/render/picture-playwright.mjs +78 -42
  401. package/foundation/render/picture-window.d.mts +33 -0
  402. package/foundation/render/picture-window.mjs +78 -0
  403. package/foundation/render/render-page.d.mts +55 -4
  404. package/foundation/render/render-page.mjs +199 -28
  405. package/foundation/render/restore-folder.d.mts +13 -0
  406. package/foundation/render/restore-folder.mjs +30 -0
  407. package/foundation/render/served-packages.d.mts +2 -1
  408. package/foundation/render/served-packages.mjs +5 -3
  409. package/foundation/render/ts-paths.d.mts +11 -0
  410. package/foundation/render/ts-paths.mjs +27 -2
  411. package/foundation/render/value-uses.d.mts +43 -0
  412. package/foundation/render/value-uses.mjs +110 -0
  413. package/foundation/response/error-codes.d.mts +2 -1
  414. package/foundation/response/error-codes.doc.mjs +7 -1
  415. package/foundation/response/error-codes.mjs +10 -2
  416. package/foundation/response/response-types.doc.mjs +12 -12
  417. package/foundation/runtime/package-root.d.mts +8 -0
  418. package/foundation/runtime/package-root.mjs +20 -0
  419. package/foundation/suggest/other-command.d.mts +11 -0
  420. package/foundation/suggest/other-command.mjs +1 -1
  421. package/foundation/text/icon-id.d.mts +20 -0
  422. package/foundation/text/icon-id.mjs +40 -0
  423. package/foundation/text/icon-set-next.d.mts +25 -0
  424. package/foundation/text/icon-set-next.mjs +29 -0
  425. package/foundation/xle/browser.d.mts +2 -2
  426. package/package.json +7 -6
@@ -32,7 +32,7 @@ export const docs = {
32
32
  content: [
33
33
  {
34
34
  type: 'prose',
35
- text: 'Icon sets are experimental: the `astryx experimental icon` commands, the `experimental.iconSet` key in astryx.config, the `experimental.iconSets` key in an integration manifest, the data file, icon definitions, and the output and JSON of all of them can change, or go away, in any patch release without a deprecation period. A project that does not set `experimental.iconSet` sees no change in any stable command, apart from: the marked `experimental` group in help and in `astryx manifest` (its command, and its `responseTypes` and `jsonSupported` entries); the marked experimental entries in the CLI reference listings; and a search for \"experimental\", which also finds the stable `stability` field of the field reference. Templates, discover, and doctor answer as they do with no icon set installed. With a package that ships icon sets installed and no opt-in, the warnings an older CLI gives about the manifest key `experimental` (in `astryx doctor` and `astryx doctor integration validate <package>`, and the one-line nudge other commands print to stderr) are gone. `astryx search` never returns icons or these docs; to find an icon by meaning, use `astryx experimental icon <words>`.',
35
+ text: 'Icon sets are experimental: the `astryx experimental icon` commands, the `experimental.iconSet` key in astryx.config, the `experimental.iconSets` key in an integration manifest, the data file, icon definitions, and the output and JSON of all of them can change, or go away, in any patch release without a deprecation period. A project that installs no icon-set package and does not set `experimental.iconSet` sees no change in any stable command, apart from: the marked `experimental` group in help and in `astryx manifest` (its command, and its `responseTypes` and `jsonSupported` entries); the marked experimental entries in the CLI reference listings; and a search for \"experimental\", which also finds the stable `stability` field of the field reference. Installing a package that ships icon sets turns icon features on, with or without `experimental.iconSet`: discover, doctor, `astryx doctor integration validate <package>`, and the icons topic ({@link generic:icons}) read the installed sets. Copied templates follow a set only once `experimental.iconSet` names it. `astryx search` never returns icons or these docs; to find an icon by meaning, use `astryx experimental icon <words>`.',
36
36
  },
37
37
  ],
38
38
  },
@@ -411,7 +411,7 @@ astryx experimental icon use brand --variant filled # every icon in its filled
411
411
  },
412
412
  {
413
413
  type: 'prose',
414
- text: "`astryx experimental icon --list` shows the order: the project's `order` (each set as `<package>/<set>`), and each set's `role` (`main`, `backup`, or not listed) and `rank`. Its coverage columns count the definitions each set maps: `builtIn` of the built-in names (a valid set maps them all, and `missing` lists any it lacks), and `definitions` of every Astryx definition. When two or more sets are installed and none is the main set, `--list` says so with the command to run, `astryx experimental icon use <main> --backup <set>`. The `use` receipt (`icon.use`) names the main set (`iconSet`, `set`) and each backup (`backups`), and lists installed sets the list leaves out (`unlisted`) with the command that adds them (`next`): `astryx doctor` fails a project that installs more than one set and leaves one out of the list.",
414
+ text: "`astryx experimental icon --list` shows the order: the project's `order` (each set as `<package>/<set>`), and each set's `role` (`main`, `backup`, or not listed) and `rank`. Its coverage columns count the definitions each set maps: `builtIn` of the built-in names (a valid set maps them all, and `missing` lists any it lacks), and `definitions` of every Astryx definition. When two or more sets are installed and none is the main set, `--list` says so with the command to run, `astryx experimental icon use <main> --backup <set>`. When no set is installed, `--list` and `experimental icon <words>` say so and how to get one, and the search names the icon definitions that match, built-in ones first: Core draws those by name with no set. The `use` receipt (`icon.use`) names the main set (`iconSet`, `set`) and each backup (`backups`), and lists installed sets the list leaves out (`unlisted`) with the command that adds them (`next`): `astryx doctor` fails a project that installs more than one set and leaves one out of the list.",
415
415
  },
416
416
  {
417
417
  type: 'prose',
@@ -445,7 +445,7 @@ astryx experimental icon use brand --variant filled # every icon in its filled
445
445
  },
446
446
  {
447
447
  type: 'prose',
448
- text: "Sets match the look by name. Each set in the list draws its variant called `filled`; a set without one draws its default look, and the receipt shows the look of every listed set (`looks`). A set that calls the same look something else, such as `solid` or `regular`, draws its default look until it renames that variant to `filled`. A copied template imports each icon's `filled` export where the icon has one (`TrashFilledIcon`). Where it has none, the copy keeps the set's default export and reports `variant: {asked, used}`; it never fetches that icon from a backup for its look. With a look picked, an icon taken from the main set's own library becomes the main set's icon in that look: the one `map` names for its meaning, or else the one that re-exports that same library export (reported `by: 'variant'`). An icon already imported from a listed set in another look moves to its `filled` export (also `by: 'variant'`). The copy report names the look as `icons.variant`.",
448
+ text: "Sets match the look by name. Each set in the list draws its variant called `filled`; a set without one draws its default look, and the receipt shows the look of every listed set (`looks`). A set that calls the same look something else, such as `solid` or `regular`, draws its default look until it renames that variant to `filled`. A copied template imports each icon's `filled` export where the icon has one (`TrashFilledIcon`). Where it has none, the copy keeps the set's default export and reports `variant: {asked, used}`; it never fetches that icon from a backup for its look. With a look picked, an icon taken from the main set's own library becomes the main set's icon in that look: the one `map` names for its meaning, or else the one that re-exports that same library export (reported `by: 'variant'`). An icon already imported from a listed set in another look moves to its `filled` export (also `by: 'variant'`). The copy report names the look as `icons.variant`. `experimental icon <words>` prints each match from a listed set in that look too; a match whose icon has no `filled` export keeps its default import and names both looks as `look: {asked, used}`.",
449
449
  },
450
450
  {
451
451
  type: 'prose',
@@ -514,7 +514,7 @@ export const brand = defineTheme({name: 'brand', icons: themeIconsFilled});`,
514
514
  content: [
515
515
  {
516
516
  type: 'prose',
517
- text: 'Every place the CLI reads or reports icon sets, all experimental. Outside `astryx experimental icon`, each appears only in a project that sets `experimental.iconSet`; `astryx search` never returns icons:',
517
+ text: 'Every place the CLI reads or reports icon sets, all experimental. Outside `astryx experimental icon`, each appears only in a project that installs an icon-set package or sets `experimental.iconSet`; `astryx search` never returns icons:',
518
518
  },
519
519
  {
520
520
  type: 'table',
@@ -522,7 +522,7 @@ export const brand = defineTheme({name: 'brand', icons: themeIconsFilled});`,
522
522
  rows: [
523
523
  [
524
524
  '`experimental.iconSet` in astryx.config',
525
- "The project's main icon set, by set name or as `<package>/<set>`, or a list: the main set first, then backup sets in order. It is the opt-in: templates, discover, and doctor read icon sets only when it is set. `astryx experimental icon` ranks the main set's icons first, and without it treats the only installed set as the project's. `astryx experimental icon use <main> --backup <set>` writes it.",
525
+ "The project's main icon set, by set name or as `<package>/<set>`, or a list: the main set first, then backup sets in order. Templates follow icon sets only when it is set. Discover and doctor read them when it is set or when an icon-set package is installed. `astryx experimental icon` ranks the main set's icons first, and without it treats the only installed set as the project's. `astryx experimental icon use <main> --backup <set>` writes it.",
526
526
  ],
527
527
  [
528
528
  '`experimental.iconVariant` in astryx.config',
@@ -542,7 +542,7 @@ export const brand = defineTheme({name: 'brand', icons: themeIconsFilled});`,
542
542
  ],
543
543
  [
544
544
  '`astryx doctor`',
545
- 'In an app, the `icon-sets` check: fails when `experimental.iconSet` names a set, main or backup, that is not installed, was withdrawn (an invalid set, or one whose module does not resolve), or that two packages ship by that name, saying why; fails when more than one set is installed and the list leaves one out; fails when `experimental.iconVariant` names a variant the main set does not declare; and warns when another installed set was withdrawn. The `icon-placeholders` check warns while copied code uses the placeholder for a missing icon, naming each file and meaning. In your icon-set package, check with `astryx integration check` instead: plain `doctor` diagnoses an app.',
545
+ 'In an app, the `icon-sets` check: fails when `experimental.iconSet` names a set, main or backup, that is not installed, was withdrawn (an invalid set, or one whose module does not resolve), or that two packages ship by that name, saying why; fails when more than one set is installed and the list leaves one out; fails when `experimental.iconVariant` names a variant the main set does not declare; and warns when another installed set was withdrawn. When a main set is decided (the one `experimental.iconSet` names, or the only installed set), the `icon-placeholders` check warns while copied code uses the placeholder for a missing icon, naming each file and meaning, and the `icon-imports` check names each file and import that does not match your list after you change it or uninstall a set, with the icon of your list that draws the same meaning: it warns for an icon from a set your list leaves out, or from a backup when an earlier set draws the same meaning; it fails for an icon import of a package that is not installed or declared, which breaks the build (an import that a `paths` or `baseUrl` entry in your tsconfig or jsconfig maps to your own code never counts). In your icon-set package, check with `astryx integration check` instead: plain `doctor` diagnoses an app.',
546
546
  ],
547
547
  [
548
548
  'JSON types',
@@ -62,7 +62,7 @@ export const docs = {
62
62
  },
63
63
  {
64
64
  type: 'prose',
65
- text: "The project's own CLI cannot start, so Astryx is installing the CLI version equal to its Core into its cache once. The second line means another run is installing it; this one waits, up to 15 minutes. To avoid the wait, install the project's dependencies.",
65
+ text: "Astryx is installing that CLI version, with its Core, into its cache. This happens once. In a project whose own CLI cannot start, it installs the version that matches the project's Core. To avoid the wait, install the project's dependencies. Outside a project, or in a fresh clone with nothing installed, it installs the version of the astryx command you started. Commands that read components use that version's Core, which is not downloaded yet (`astryx docs global/problems core-offline`). The second line means that another run is installing it. This run waits for up to 15 minutes.",
66
66
  },
67
67
  ],
68
68
  },
@@ -103,7 +103,7 @@ export const docs = {
103
103
  {
104
104
  type: 'code',
105
105
  lang: 'text',
106
- code: "astryx: could not get Astryx 0.6.8 to match this project's Core (the registry could not be reached); answering with CLI 0.7.2 instead\nastryx: could not get Astryx 0.6.8 to match this project's Core (the registry does not have it); answering with CLI 0.7.2 instead\nastryx: could not get Astryx 0.6.8 to match this project's Core (the release cache /home/me/.cache/astryx/releases cannot be written (EACCES)); answering with CLI 0.7.2 instead",
106
+ code: "astryx: could not get Astryx 0.6.8 to match this project's Core (the registry https://registry.npmjs.org/ could not be reached); answering with CLI 0.7.2 instead\nastryx: could not get Astryx 0.6.8 to match this project's Core (the registry https://registry.npmjs.org/ does not have it); answering with CLI 0.7.2 instead\nastryx: could not get Astryx 0.6.8 to match this project's Core (the release cache /home/me/.cache/astryx/releases cannot be written (EACCES)); answering with CLI 0.7.2 instead",
107
107
  },
108
108
  {
109
109
  type: 'prose',
@@ -113,7 +113,7 @@ export const docs = {
113
113
  type: 'list',
114
114
  style: 'unordered',
115
115
  items: [
116
- "The registry could not be reached: you are offline, or a proxy blocks it. Astryx installs with npm, so set npm's `proxy`, `https-proxy`, or `registry` in your `.npmrc`, or add the CLI to the project and install its dependencies.",
116
+ "The registry could not be reached: you are offline, or a proxy blocks it. Astryx installs with npm, so set npm's `proxy`, `https-proxy`, or `registry` in your `.npmrc`, or add the CLI to the project and install its dependencies. A failed install waits 2 minutes before the next try (10 after a second failure in a row), but the next run tries again at once when npm's `registry` or `@astryxdesign:registry` changed.",
117
117
  "The registry does not have it: a private registry without the Astryx packages. Point npm's registry for `@astryxdesign` at one that has them.",
118
118
  'The cache cannot be written: a read-only home folder, as in some containers. Point `XDG_CACHE_HOME` at a writable folder: {@link generic:ci-and-containers}.',
119
119
  ],
@@ -47,7 +47,7 @@ export const docs = {
47
47
  content: [
48
48
  {
49
49
  type: 'prose',
50
- text: 'Build the page with Astryx components as usual, then render it. The page module needs a default export; it renders on your machine with the React and Astryx packages your project installed. Outside a project (no Astryx Core or CLI installed or declared for the folder), it renders with the Astryx, React and StyleX that the CLI itself runs with, so a single page file renders anywhere, a React app included.',
50
+ text: 'Build the page with Astryx components as usual, then render it. The page module needs a default export; it renders on your machine with the React and Astryx packages your project installed. Outside a project (no Astryx Core or CLI installed or declared for the folder), it renders with the Astryx, React and StyleX that the CLI itself runs with, so a single page file renders anywhere, a React app included. A tool that runs the CLI for you through its host entry can also list packages in the `package.json` beside that CLI, such as the icon library that templates import. A page outside a project uses the packages listed there under `dependencies` or `optionalDependencies` too, and `template` does not ask you to install them.',
51
51
  },
52
52
  {
53
53
  type: 'code',
@@ -56,11 +56,11 @@ export const docs = {
56
56
  },
57
57
  {
58
58
  type: 'prose',
59
- text: 'The result is ONE file with nothing beside it: the markup, only the CSS rules the page uses (from Core and from any stylesheet it imports, such as a theme), the page\u2019s own StyleX styles, and local images as data: URIs. For `--reverse`, it also carries every image, font or media file (up to 8 MB each) that a carried module or stylesheet names by a relative path inside the folder that holds the carried files, also when the page does not show it. It runs no script and loads nothing from the network, so it opens from disk, attaches to a message, and displays inside a sandboxed frame that blocks network and script. Colors follow the viewer\u2019s light or dark setting, and a `data-theme` of `light` or `dark` on the root element picks one. The file also carries the source of the page and of every local module, stylesheet, JSON file and image it imports, so whoever you share it with can read that code; keep secrets out of what the page imports.',
59
+ text: 'The result is ONE file with nothing beside it: the markup, the CSS rules the page can use (from Core and from any stylesheet it imports, such as a theme), the page\u2019s own StyleX styles, local images as data: URIs, and the page\u2019s own script (see The page\u2019s script). For `--reverse`, it also carries every image, font or media file (up to 8 MB each) that a carried module or stylesheet names by a relative path inside the folder that holds the carried files, also when the page does not show it. It loads nothing from the network, so it opens from disk, attaches to a message, and displays inside a sandboxed frame that blocks the network; a frame that also blocks scripts shows the rendered markup. Colors follow the viewer\u2019s light or dark setting, and a `data-theme` of `light` or `dark` on the root element picks one. The file also carries the source of the page and of every local module, stylesheet, JSON file and image it imports, so whoever you share it with can read that code; keep secrets out of what the page imports.',
60
60
  },
61
61
  {
62
62
  type: 'prose',
63
- text: 'What it cannot keep: anything that needs a browser while running. State, effects, click handlers and data loaded after the first paint are gone. Charts made with recharts are the exception: the render draws each chart and ResponsiveContainer a module of the page (not an installed package) imports from recharts by name (`import {LineChart} from \'recharts\'`), inside the page, so a custom tick, label or shape sees the page\'s React context. A chart sized by its container is drawn at a set of widths, and the file shows the drawing nearest the width the reader\'s browser gives it, with no script. The widths run from 60 pixels (a sparkline in a narrow table cell) to 1920 (a chart across a wide screen), each the square root of two times the one before, so the drawing shown scales by at most the fourth root of two (about 1.19) either way. The chart keeps the height the page gives it (a number, the width over `aspect`, or its share of the height that the box it fills states in its own style) and fits that box whole, so its text stays within a fifth of its own size. A box whose height comes from a stylesheet gives no height the render can read: the chart is drawn 300 pixels high and fits inside the box, scaled down in a shorter box (its text shrinks with it) and with empty space above and below in a taller one. Each such chart carries eleven drawings, so it takes several times the room in the file that one drawing takes. A legend keeps the place its props give it, in a chart of either kind. Charts show the data and props of the page\'s first render, before its effects run: when the page cannot be drawn again without a browser, or its effects change its charts or re-render the component that makes them, each chart is drawn by itself and its parts see React context defaults. A value a chart\'s parts read from a React context that an effect changes may still show its later value. A `chart-size` warning counts the charts the render cannot draw (one used through `import * as R`, say), and says when charts were drawn by themselves. Read browser-only values such as window inside an effect, or the render stops with ERR_RENDER_BROWSER_API.',
63
+ text: 'What the markup cannot keep: anything that needs a browser while running. State, effects, click handlers and data loaded after the first paint come from the page\u2019s script once it runs (see The page\u2019s script), so a viewer that blocks scripts shows none of them. Charts made with recharts are the exception: the render draws each chart and ResponsiveContainer a module of the page (not an installed package) imports from recharts by name (`import {LineChart} from \'recharts\'`), inside the page, so a custom tick, label or shape sees the page\'s React context. A chart sized by its container is drawn at a set of widths, and the file shows the drawing nearest the width the reader\'s browser gives it, with no script. The widths run from 60 pixels (a sparkline in a narrow table cell) to 1920 (a chart across a wide screen), each the square root of two times the one before, so the drawing shown scales by at most the fourth root of two (about 1.19) either way. The chart keeps the height the page gives it (a number, the width over `aspect`, or its share of the height that the box it fills states in its own style) and fits that box whole, so its text stays within a fifth of its own size. A box whose height comes from a stylesheet gives no height the render can read: the chart is drawn 300 pixels high and fits inside the box, scaled down in a shorter box (its text shrinks with it) and with empty space above and below in a taller one. Each such chart carries eleven drawings, so it takes several times the room in the file that one drawing takes. A legend keeps the place its props give it, in a chart of either kind. Charts show the data and props of the page\'s first render, before its effects run: when the page cannot be drawn again without a browser, or its effects change its charts or re-render the component that makes them, each chart is drawn by itself and its parts see React context defaults. A value a chart\'s parts read from a React context that an effect changes may still show its later value. A `chart-size` warning counts the charts the render cannot draw (one used through `import * as R`, say), and says when charts were drawn by themselves. Read browser-only values such as window inside an effect, or the render stops with ERR_RENDER_BROWSER_API.',
64
64
  },
65
65
  ],
66
66
  },
@@ -74,6 +74,20 @@ export const docs = {
74
74
  },
75
75
  ],
76
76
  },
77
+ {
78
+ id: 'interactive',
79
+ title: 'The page\u2019s script',
80
+ content: [
81
+ {
82
+ type: 'prose',
83
+ text: 'The file carries the page\u2019s own script: the page\u2019s modules and the packages they use, bundled for the browser, inline after the embedded source. The file paints the rendered markup first; then the script draws the live page over it, so state, effects, click handlers, popovers, menus, dialogs, tabs and forms work as in the app, and a layout the page picks with `useMediaQuery` fits the reader\u2019s screen once the script runs. The render adds no network request and no `eval`, so the file works in a sandboxed viewer frame that allows scripts, under a content security policy that allows inline scripts. A link out of the file opens in a new tab, since a viewer\u2019s frame cannot follow it. A form submits through its submit event, which the file fires itself: a viewer\u2019s frame may block form submission, and a file has no server to send a form to. React and the page\u2019s modules add about 0.4 to 1 MB to a page, and up to 2 MB to a page with charts. The note at the file\u2019s top says it runs a script.',
84
+ },
85
+ {
86
+ type: 'prose',
87
+ text: 'esbuild builds the script. It is a dependency of the CLI that only this command loads, so no other command starts slower for it. A page whose script cannot be built for the browser (it imports `fs` or `path`, say) stops with ERR_RENDER_SCRIPT, which names the module, and nothing is written. A sandboxed frame can still block what the page itself does on load or on a click, such as a remote image, storage (`localStorage`, `sessionStorage`, cookies), an `alert()`, or moving focus before the reader acts. When the page\u2019s script throws, in its render or in an effect (a cookie write in a frame that blocks cookies, say), the file keeps showing its first paint. Storage works there in memory, so a page that saves to it keeps working.',
88
+ },
89
+ ],
90
+ },
77
91
  {
78
92
  id: 'get-it-back',
79
93
  title: 'Get the page back',
@@ -37,7 +37,7 @@ export const docs = {
37
37
  content: [
38
38
  {
39
39
  type: 'prose',
40
- text: 'A shareable page is one HTML file. It opens in a browser, as an attachment, or in an artifact viewer that shows HTML in a sandboxed frame. It runs no script and loads nothing from the network. It also carries its own source, so anyone who has the file can turn it back into code, change it, and render it again. The render command is experimental: its options and its output can change in a patch release.',
40
+ text: 'A shareable page is one HTML file. It opens in a browser, as an attachment, or in an artifact viewer that shows HTML in a sandboxed frame. It loads nothing from the network, and it carries the page\u2019s own script, so its controls work as in the app. It also carries its own source, so anyone who has the file can turn it back into code, change it, and render it again. The render command is experimental: its options and its output can change in a patch release.',
41
41
  },
42
42
  {
43
43
  type: 'list',
@@ -72,7 +72,7 @@ export const docs = {
72
72
  type: 'list',
73
73
  style: 'unordered',
74
74
  items: [
75
- 'Readers open the file on phones and on wide screens. Put cards in a row with `<Grid columns={{minWidth: 220, max: 3}}>`, which drops to fewer columns on a narrow screen, down to one. Do not pick a layout with script, such as useMediaQuery: the file runs no script, so every reader, on any screen, gets the one layout that the query\u2019s server answer (false) picks.',
75
+ 'Readers open the file on phones and on wide screens. Put cards in a row with `<Grid columns={{minWidth: 220, max: 3}}>`, which drops to fewer columns on a narrow screen, down to one. Do not pick a layout with script, such as useMediaQuery: every reader, on any screen, first sees the one layout that the query\u2019s server answer (false) picks, and keeps it in a viewer that blocks scripts; elsewhere it changes once the script runs.',
76
76
  'A row runs out of room first. In an HStack, a Badge beside a long heading or text shrinks and cuts off its label. Wrap the badge in `<StackItem size="static">` so it keeps its size, and the text in `<StackItem size="fill">` so the text wraps, as the example does. StackItem comes from `@astryxdesign/core/Stack`.',
77
77
  'A VStack stretches each child to its full width, so a Badge or Token on a line of its own becomes a bar across the page. Wrap that one item in `<StackItem crossAlignSelf="start">`. Do not give the VStack `hAlign="start"`: it shrinks every child, Cards and Grids too.',
78
78
  'A ListItem `label` or `description` that is a string stays on one line and ends in an ellipsis, and the file cannot show the rest. When readers need the whole text, pass an element: `label={<Text type="body">\u2026</Text>}`.',
@@ -80,7 +80,7 @@ export const docs = {
80
80
  'A column\u2019s floor includes its cells\u2019 24 px of padding. It must fit the column\u2019s longest word, because wrapped text breaks inside a word that does not fit, and its header, which stays on one line and is cut off with an ellipsis: `width: pixel(64)` holds a short number under a one-word header such as \u201cp95\u201d, and a two-word header such as \u201cError rate\u201d needs about 100 px.',
81
81
  'Give each CodeBlock `isWrapped`, so a reader on a phone sees whole lines.',
82
82
  'Charts use recharts: install it in the page\u2019s folder first (`{@pm install recharts}`). Size a chart with `<ResponsiveContainer width="100%" aspect={2.5}>`, and color each series with a theme variable, such as `stroke="var(--color-data-categorical-blue)"`, so it follows the theme too.',
83
- 'Leave out controls that need a browser. Buttons, filters, tabs and menus show in the file but do nothing.',
83
+ 'Controls that need a browser (buttons, filters, tabs, menus) work once the page\u2019s script runs, and do nothing in a viewer that blocks scripts. Keep what a reader must see in the first paint, not behind a click (see `astryx docs cli/experimental/render-pages interactive`).',
84
84
  ],
85
85
  },
86
86
  ],
@@ -106,7 +106,7 @@ export const docs = {
106
106
  content: [
107
107
  {
108
108
  type: 'prose',
109
- text: 'The file is the whole page: send it, put it on a web host, or upload it to an artifact viewer that accepts one HTML file. A viewer that shows HTML in a frame with no network and no script shows it as it is. Upload it with the host\u2019s own command, and keep the link or ID it gives back: you update that same artifact later, so readers keep the same link.',
109
+ text: 'The file is the whole page: send it, put it on a web host, or upload it to an artifact viewer that accepts one HTML file. A viewer that shows HTML in a frame with no network shows it as it is; one that also blocks scripts shows its first paint. In a viewer\u2019s frame that allows scripts, forms work, storage works in memory (what the page saves lasts until the page closes), and copying works through the browser\u2019s copy command. A cookie write throws there, fullscreen and printing do not work, and a link opens only when the viewer allows pop-ups. Upload it with the host\u2019s own command, and keep the link or ID it gives back: you update that same artifact later, so readers keep the same link.',
110
110
  },
111
111
  {
112
112
  type: 'prose',
@@ -135,7 +135,7 @@ export const docs = {
135
135
  },
136
136
  {
137
137
  type: 'prose',
138
- text: 'Run each command from the folder that holds the file: the command writes only inside the folder you run it from, so the page and `--out` must both be inside it. When the restored page imports a package, such as recharts or an icon set, install it in that folder first; the render names each package that is missing.',
138
+ text: 'Run each command from the folder that holds the file: a relative `--out` stays inside the folder you run it from, and `--reverse` writes only there. An absolute `--out` can name any folder. When the restored page imports a package, such as recharts or an icon set, install it in that folder first; the render names each package that is missing.',
139
139
  },
140
140
  ],
141
141
  },
@@ -21,7 +21,7 @@ export const docs = {
21
21
  content: [
22
22
  {
23
23
  type: 'prose',
24
- text: 'Readers open one section at a time, so give each section one idea and keep it to about 30 lines. `{@command doctor}` warns on any read over 32 KB.',
24
+ text: 'A long topic is read one section at a time, so give each section one idea and keep it to about 30 lines. `{@command doctor}` warns on any read over 32 KB.',
25
25
  },
26
26
  {
27
27
  type: 'list',
@@ -29,13 +29,13 @@ export const docs = {
29
29
  items: [
30
30
  'When a section needs a second idea, split it into two sections.',
31
31
  'Keep a topic to a few sections. When it grows past five, split it into more guides in your docs section.',
32
- 'A topic with more than one section reads as its section list. Readers open one section by its key, or the whole topic with `--full`.',
32
+ 'A bare read prints the whole topic, and lists its sections instead only when the whole topic is over 16 KB of text. Readers list the sections with `--index` and open one section by its key.',
33
33
  ],
34
34
  },
35
35
  {
36
36
  type: 'code',
37
37
  lang: 'bash',
38
- code: '# The section list\n{@command docs acme/deploying}\n# One section\n{@command docs acme/deploying check-before-you-ship}\n# Everything\n{@command docs acme/deploying --full}',
38
+ code: '# The whole topic\n{@command docs acme/deploying}\n# The section list\n{@command docs acme/deploying --index}\n# One section\n{@command docs acme/deploying check-before-you-ship}',
39
39
  },
40
40
  ],
41
41
  },
@@ -157,6 +157,14 @@ export const docs = {
157
157
  '`invalid_cli_command`',
158
158
  'Your `cliCommand` is not one line of plain text of at most 120 characters, so it is ignored. Fix the value; the rest of the manifest still loads.',
159
159
  ],
160
+ [
161
+ '`install-guidance` warns: `Loaded integrations give different install guidance`',
162
+ "Two packages the app loads set different `installGuidance` values, so the CLI prints the package manager's install command. Agree on one line, or remove the package that does not belong.",
163
+ ],
164
+ [
165
+ '`invalid_install_guidance`',
166
+ 'Your `installGuidance` is not one line of plain text of at most 240 characters, so it is ignored. Fix the value; the rest of the manifest still loads.',
167
+ ],
160
168
  [
161
169
  '`{@command upgrade}` runs none of your codemods',
162
170
  'The app must list your package in `integrations` in `astryx.config`, or pass `--integration @acme/astryx-widgets`. It runs a codemod folder only when its version is after `--from` and at most the installed `@astryxdesign/core`.',
@@ -48,7 +48,7 @@ export const docs = {
48
48
  items: [
49
49
  "The command is the one for the package manager that installed your global install: `npm i -g`, `pnpm add -g`, `yarn global add`, `bun add -g`, or `volta install`. A global folder moved with the package manager's own setting (`BUN_INSTALL`, Yarn's `global-folder`, `PNPM_HOME`, or npm's prefix) counts while that setting names it; an app's own copy never runs the update check.",
50
50
  'When the newest version needs a newer Node than your computer runs, the second line says which Node to install first.',
51
- "Inside a project, the notice is about the project's version, and names the project's install and `upgrade` commands. The install command always adds the CLI next to Core, so a project that installed only Core gets its own CLI too, as recommended. In a project that pins Core to one version, as a starter does, the install command saves the new versions exactly too, with the package manager's flag for it, such as `-E`.",
51
+ "Inside a project, the notice is about the project's version, and names the project's install and `upgrade` commands. The install command always adds the CLI next to Core, so a project that installed only Core gets its own CLI too, as recommended. It also moves every other Astryx package your app lists that is released with Core, such as its themes, to the same release, because each one names the exact Core release it works with. In a project that pins Core to one version, as a starter does, the install command saves the new versions exactly too, with the package manager's flag for it, such as `-E`.",
52
52
  ],
53
53
  },
54
54
  ],
@@ -138,7 +138,7 @@ export const docs = {
138
138
  type: 'list',
139
139
  style: 'unordered',
140
140
  items: [
141
- 'An unknown field in `astryx.integration.mjs` is ignored with an `unknown_manifest_key` warning, and the rest of the manifest still loads.',
141
+ 'An unknown field in `astryx.integration.mjs` is ignored, and the rest of the manifest still loads. `{@command doctor integration validate}` lists it as an `unknown_manifest_key` note; it is not an issue, so everyday commands do not warn about it. CLIs before 0.7.17 report it as a warning.',
142
142
  'A named export that the CLI does not know is ignored with no warning, so `debug` and `gapReport` are safe to add.',
143
143
  'Published 0.6.3 and earlier print each `{@link ...}` as written.',
144
144
  'Published 0.6.3 and earlier reject a template that sets `replaces` or `keywords`, drop that template, and hide every doc topic your package ships. Published 0.6.4 and 0.6.5 still drop a template that sets `keywords`.',
@@ -178,19 +178,54 @@ npm run astryx -- docs tokens --dense`,
178
178
  ],
179
179
  },
180
180
  {
181
- title: 'MCP Server',
181
+ id: 'mcp-server',
182
+ title: 'If your AI tool needs MCP',
182
183
  content: [
183
184
  {
184
185
  type: 'prose',
185
- text: 'Astryx ships a Model Context Protocol (MCP) server that any MCP-compatible AI tool can connect to. Instead of manually pasting CLI output, the AI can query the Astryx design system directly, searching for components, reading full documentation, and pulling code examples on demand.',
186
+ text: 'Start with the CLI: an agent that can run commands runs astryx directly, guided by the agent docs that init writes. Use the Model Context Protocol (MCP) only when your AI tool cannot run commands, or reaches tools only through MCP.',
186
187
  },
187
188
  {
188
189
  type: 'prose',
189
- text: 'The MCP server exposes two tools: search(query) for discovering components, doc topics, and templates; and get(name) for retrieving full documentation with props, usage, and examples.',
190
+ text: 'Astryx serves MCP two ways. In a project, connect the CLI itself: {@command mcp} serves every astryx command as a tool, and each answer is for the version of Astryx the project has, with its theme and integrations. With nothing installed, connect the docs site: it runs the same server for the latest published release, with only the commands that read the docs.',
190
191
  },
191
192
  {
192
193
  type: 'prose',
193
- text: 'Add the server to your MCP config file. The entry is a remote HTTP server, and the exact shape differs per client, so use the snippet for the tool you run. An entry with an unrecognized transport is skipped with a warning rather than an error, which reads as a server that connects but exposes no tools.',
194
+ text: 'The CLI server runs on standard input and output, so your AI tool starts it in the project folder. Each command that answers with --json is one tool, named by its words (theme build is theme_build), and its inputs are the command\'s arguments and options under their CLI names. A tool call runs the command with --json and answers with its output unchanged, so a tool answers as the command does, and a new command or option is a tool input at once. The server also gives the agent the project\'s agent docs, the text init writes, when the project has none yet.',
195
+ },
196
+ {
197
+ type: 'code',
198
+ lang: 'json',
199
+ label: 'Claude Code (.mcp.json), Cursor (.cursor/mcp.json) and Cline',
200
+ code: `{
201
+ "mcpServers": {
202
+ "astryx": {
203
+ "command": "npx",
204
+ "args": ["@astryxdesign/cli", "mcp"]
205
+ }
206
+ }
207
+ }`,
208
+ },
209
+ {
210
+ type: 'prose',
211
+ text: 'Claude Code can also write that entry from the terminal:',
212
+ },
213
+ {
214
+ type: 'code',
215
+ lang: 'bash',
216
+ code: `claude mcp add astryx -- npx @astryxdesign/cli mcp`,
217
+ },
218
+ {
219
+ type: 'code',
220
+ lang: 'toml',
221
+ label: 'Codex (~/.codex/config.toml)',
222
+ code: `[mcp_servers.astryx]
223
+ command = "npx"
224
+ args = ["@astryxdesign/cli", "mcp"]`,
225
+ },
226
+ {
227
+ type: 'prose',
228
+ text: 'The hosted server is the CLI server with `--docs-only`, run by the docs site: its tools are search, build, component, hook, docs, template, discover, theme list and theme targets, and each answers as that command does with --json, for the latest published release, not for your project. It takes one JSON-RPC message per request, and no input that names a folder, a file to write or a package to read. Its entry is a remote HTTP server, and the exact shape differs per client, so use the snippet for the tool you run. An entry with an unrecognized transport is skipped with a warning rather than an error, which reads as a server that connects but exposes no tools.',
194
229
  },
195
230
  {
196
231
  type: 'code',
@@ -246,7 +281,7 @@ npm run astryx -- docs tokens --dense`,
246
281
  },
247
282
  {
248
283
  type: 'prose',
249
- text: 'Once connected, your AI tool can search for components by natural language (e.g. "dropdown menu", "success message") and retrieve full documentation without any manual CLI invocation. The server uses the same keyword index from component docs, so search quality improves automatically as component documentation is updated.',
284
+ text: 'Once connected, your AI tool can search for components by natural language (e.g. "dropdown menu", "success message") and read full documentation, props and template source without running the CLI.',
250
285
  },
251
286
  ],
252
287
  },