@astryxdesign/cli 0.7.17-canary.g6ecaa86 → 0.7.17-canary.g7f328d2

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 (332) hide show
  1. package/README.md +2 -2
  2. package/api/build/_adapter.d.mts +16 -0
  3. package/api/build/_adapter.mjs +20 -0
  4. package/api/build/blocks/blocks.weights.json +1 -1
  5. package/api/build/build.doc.mjs +2 -2
  6. package/api/build/build.type.d.mts +1 -1
  7. package/api/build/build.type.mjs +1 -1
  8. package/api/build/kit/kit.mjs +1 -1
  9. package/api/build/kit/rank.d.mts +2 -2
  10. package/api/build/kit/rank.mjs +7 -4
  11. package/api/build/kit/signals.d.mts +7 -1
  12. package/api/build/kit/signals.mjs +34 -12
  13. package/api/build/kit/start.d.mts +4 -2
  14. package/api/build/kit/start.mjs +43 -12
  15. package/api/build/kit/weights.d.mts +14 -4
  16. package/api/build/kit/weights.json +1 -1
  17. package/api/build/kit/weights.mjs +51 -18
  18. package/api/build/kit/words.d.mts +38 -0
  19. package/api/build/kit/words.mjs +152 -1
  20. package/api/build/tree.mjs +1 -1
  21. package/api/component/__fixtures__/resolutions/modules.txt +1 -1
  22. package/api/component/_adapter.d.mts +26 -2
  23. package/api/component/_adapter.mjs +135 -8
  24. package/api/component/component.mjs +14 -1
  25. package/api/discover/_adapter.d.mts +10 -0
  26. package/api/discover/_adapter.mjs +95 -1
  27. package/api/discover/detail/item/item.mjs +5 -0
  28. package/api/discover/discover.mjs +12 -3
  29. package/api/discover/discover.type.d.mts +16 -3
  30. package/api/discover/discover.type.mjs +13 -3
  31. package/api/docs/_adapter.d.mts +52 -21
  32. package/api/docs/_adapter.mjs +230 -210
  33. package/api/docs/_entry-names-lazily.d.mts +22 -0
  34. package/api/docs/_entry-names-lazily.mjs +25 -0
  35. package/api/docs/_entry-names.d.mts +23 -0
  36. package/api/docs/_entry-names.mjs +105 -0
  37. package/api/doctor/_adapter.d.mts +27 -0
  38. package/api/doctor/_adapter.mjs +79 -1
  39. package/api/doctor/doctor.d.mts +11 -0
  40. package/api/doctor/doctor.doc.mjs +1 -1
  41. package/api/doctor/doctor.mjs +48 -25
  42. package/api/doctor/theme-checks.d.mts +35 -3
  43. package/api/doctor/theme-checks.mjs +256 -12
  44. package/api/hook/_adapter.d.mts +10 -4
  45. package/api/hook/_adapter.mjs +41 -5
  46. package/api/hook/detail/detail.mjs +5 -2
  47. package/api/hook/detail/params/params.mjs +10 -3
  48. package/api/integration/add-helpers.mjs +10 -0
  49. package/api/integration/authoring-checks.mjs +5 -2
  50. package/api/integration/pack-check.mjs +20 -1
  51. package/api/integration/validate-integration.d.mts +18 -6
  52. package/api/integration/validate-integration.mjs +110 -14
  53. package/api/integration/validate-integration.type.d.mts +13 -0
  54. package/api/integration/validate-integration.type.mjs +2 -1
  55. package/api/integration/validateIntegration.doc.mjs +1 -1
  56. package/api/render/render.type.d.mts +1 -1
  57. package/api/render/render.type.mjs +1 -1
  58. package/api/search/ORDERING.md +1 -1
  59. package/api/search/_candidate-score.d.mts +9 -4
  60. package/api/search/_candidate-score.mjs +82 -14
  61. package/api/search/_lexical.d.mts +9 -0
  62. package/api/search/_lexical.mjs +85 -9
  63. package/api/template/_adapter.d.mts +16 -0
  64. package/api/template/_adapter.mjs +39 -2
  65. package/api/template/cdn/cdn.mjs +37 -8
  66. package/api/template/copy/copy.d.mts +6 -3
  67. package/api/template/copy/copy.mjs +40 -8
  68. package/api/template/template.doc.mjs +3 -3
  69. package/api/template/template.mjs +63 -11
  70. package/api/template/template.type.d.mts +1 -0
  71. package/api/template/template.type.mjs +1 -0
  72. package/api/theme/_adapter.d.mts +20 -1
  73. package/api/theme/_adapter.mjs +149 -12
  74. package/api/theme/_app-provider.d.mts +31 -0
  75. package/api/theme/_app-provider.mjs +135 -0
  76. package/api/theme/add/add.mjs +3 -1
  77. package/api/theme/build/build.d.mts +72 -6
  78. package/api/theme/build/build.mjs +643 -248
  79. package/api/theme/build/core-interception.d.mts +10 -0
  80. package/api/theme/build/core-interception.mjs +10 -0
  81. package/api/theme/build/font-warning.d.mts +73 -5
  82. package/api/theme/build/font-warning.mjs +311 -60
  83. package/api/theme/build/icon-imports.mjs +51 -9
  84. package/api/theme/build/null-values.d.mts +28 -0
  85. package/api/theme/build/null-values.mjs +191 -0
  86. package/api/theme/build/self-contained.d.mts +90 -0
  87. package/api/theme/build/self-contained.mjs +312 -0
  88. package/api/theme/list/list.mjs +17 -1
  89. package/api/theme/remove/remove.d.mts +2 -1
  90. package/api/theme/remove/remove.mjs +7 -3
  91. package/api/theme/theme.type.d.mts +68 -1
  92. package/api/theme/theme.type.mjs +32 -2
  93. package/api/theme/themeAdd.doc.mjs +1 -1
  94. package/api/theme/themeListAvailable.doc.mjs +1 -1
  95. package/api/theme/themeRemove.doc.mjs +8 -5
  96. package/api/theme-edit/_adapter.d.mts +55 -4
  97. package/api/theme-edit/_adapter.mjs +322 -71
  98. package/api/theme-edit/_catalog.d.mts +46 -2
  99. package/api/theme-edit/_catalog.mjs +115 -14
  100. package/api/theme-edit/_check.d.mts +93 -2
  101. package/api/theme-edit/_check.mjs +1552 -383
  102. package/api/theme-edit/_color.d.mts +16 -0
  103. package/api/theme-edit/_color.mjs +43 -1
  104. package/api/theme-edit/_compiler.d.mts +5 -1
  105. package/api/theme-edit/_compiler.mjs +132 -17
  106. package/api/theme-edit/_context.d.mts +71 -3
  107. package/api/theme-edit/_context.mjs +367 -38
  108. package/api/theme-edit/_css.d.mts +7 -0
  109. package/api/theme-edit/_css.mjs +41 -13
  110. package/api/theme-edit/_edit.d.mts +58 -5
  111. package/api/theme-edit/_edit.mjs +3076 -499
  112. package/api/theme-edit/_how-commands.d.mts +11 -1
  113. package/api/theme-edit/_how-commands.mjs +168 -16
  114. package/api/theme-edit/_how-question.d.mts +15 -8
  115. package/api/theme-edit/_how-question.mjs +4263 -669
  116. package/api/theme-edit/_how.d.mts +5 -2
  117. package/api/theme-edit/_how.mjs +118 -20
  118. package/api/theme-edit/_importers.d.mts +38 -0
  119. package/api/theme-edit/_importers.mjs +188 -0
  120. package/api/theme-edit/_normal.d.mts +85 -20
  121. package/api/theme-edit/_normal.mjs +467 -89
  122. package/api/theme-edit/_palette.d.mts +49 -0
  123. package/api/theme-edit/_palette.mjs +170 -34
  124. package/api/theme-edit/_part-words.d.mts +39 -0
  125. package/api/theme-edit/_part-words.mjs +152 -0
  126. package/api/theme-edit/_parts.d.mts +46 -3
  127. package/api/theme-edit/_parts.mjs +254 -45
  128. package/api/theme-edit/_preview-app.d.mts +0 -12
  129. package/api/theme-edit/_preview-app.mjs +644 -502
  130. package/api/theme-edit/_preview.d.mts +56 -5
  131. package/api/theme-edit/_preview.mjs +286 -69
  132. package/api/theme-edit/_project.d.mts +61 -1
  133. package/api/theme-edit/_project.mjs +177 -6
  134. package/api/theme-edit/_settings.d.mts +334 -80
  135. package/api/theme-edit/_settings.mjs +2462 -813
  136. package/api/theme-edit/_tables.d.mts +38 -3
  137. package/api/theme-edit/_tables.mjs +230 -53
  138. package/api/theme-edit/_vet.d.mts +14 -1
  139. package/api/theme-edit/_vet.mjs +86 -12
  140. package/api/theme-edit/theme-edit.type.d.mts +24 -1
  141. package/api/theme-edit/theme-edit.type.mjs +14 -2
  142. package/api/theme-edit/themeEditPreviewApp.doc.mjs +1 -1
  143. package/api/upgrade/upgrade.mjs +16 -1
  144. package/assets/codemods/integration-runner.mjs +1 -1
  145. package/assets/codemods/jscodeshift.d.ts +1 -1
  146. package/assets/codemods/run-codemod.mjs +71 -18
  147. package/assets/codemods/runner.mjs +1 -4
  148. package/assets/component-list.generated.json +1 -1
  149. package/assets/docs/author-a-theme.doc.mjs +1 -0
  150. package/assets/docs/theme.doc.dense.mjs +76 -7
  151. package/assets/docs/theme.doc.mjs +66 -2
  152. package/assets/docs/theme.doc.zh.mjs +51 -1
  153. package/assets/docs/tree/checks.doc.mjs +2 -2
  154. package/assets/docs/tree/document-the-theme.doc.mjs +1 -1
  155. package/assets/docs/tree/font-setup.doc.mjs +1 -1
  156. package/assets/docs/tree/fonts-and-assets.doc.mjs +1 -1
  157. package/assets/docs/tree/render-pages.doc.mjs +2 -2
  158. package/assets/docs/tree/share-a-page.doc.mjs +157 -0
  159. package/assets/docs/tree/write-good-templates.doc.mjs +1 -1
  160. package/assets/docs/use-a-theme.doc.mjs +1 -1
  161. package/assets/docs-routes.generated.json +1 -0
  162. package/assets/docs.generated.json +2 -2
  163. package/assets/search-catalog.generated.json +2 -2
  164. package/assets/self-audit.generated.json +1 -1
  165. package/assets/templates/blocks/components/ChatComposerInput/useSpeechRecognitionHookUsage.doc.mjs +14 -0
  166. package/assets/templates/blocks/components/ChatComposerInput/useSpeechRecognitionHookUsage.tsx +43 -0
  167. package/assets/templates/components.generated.json +1 -1
  168. package/assets/templates/pages/ai-chat-landing/page.tsx +31 -4
  169. package/assets/templates/pages/ai-chat-landing/template.doc.mjs +3 -0
  170. package/assets/templates/pages/dashboard-alert-rail/page.tsx +1 -1
  171. package/assets/templates/pages/dashboard-cohort-funnel/page.tsx +1 -1
  172. package/assets/templates/pages/dashboard-comparison/page.tsx +2 -2
  173. package/assets/templates/pages/dashboard-progress/page.tsx +1 -1
  174. package/assets/templates/pages/detail-page/page.tsx +60 -7
  175. package/assets/templates/pages/documentation-technical/page.tsx +13 -13
  176. package/assets/templates/pages/editor/page.tsx +14 -2
  177. package/assets/templates/pages/file-explorer/page.tsx +9 -0
  178. package/assets/templates/pages/form-wizard-vertical/page.tsx +23 -3
  179. package/assets/templates/pages/ide/page.tsx +9 -0
  180. package/assets/templates/pages/kanban-board/page.tsx +12 -2
  181. package/assets/templates/pages/login-card/page.tsx +16 -0
  182. package/assets/templates/pages/login-split/page.tsx +19 -6
  183. package/assets/templates/pages/messaging-shell/template.doc.mjs +6 -0
  184. package/assets/templates/pages/payment-form/page.tsx +30 -4
  185. package/assets/templates/pages/product-detail/page.tsx +26 -2
  186. package/assets/templates/pages/settings-dialog/page.tsx +162 -12
  187. package/assets/templates/pages/shell-side-nav/page.tsx +11 -3
  188. package/assets/templates/pages/table-filter/page.tsx +9 -0
  189. package/assets/templates/pages/table-grouped/page.tsx +161 -133
  190. package/assets/templates/pages/table-page/page.tsx +14 -1
  191. package/assets/templates/pages/work-item-detail/page.tsx +47 -7
  192. package/assets/theme.template.ts +3 -2
  193. package/authoring/doctypes/_schema.d.mts +6 -6
  194. package/authoring/integration/integration.doc.mjs +8 -0
  195. package/authoring/integration/schema.d.mts +24 -1
  196. package/authoring/integration/schema.mjs +126 -4
  197. package/authoring/integration/type.ts +14 -0
  198. package/clients/cli/build-id.generated.json +1 -1
  199. package/clients/cli/commands/component.mjs +85 -38
  200. package/clients/cli/commands/discover.mjs +70 -3
  201. package/clients/cli/commands/docs.mjs +41 -5
  202. package/clients/cli/commands/doctor.mjs +52 -2
  203. package/clients/cli/commands/experimental/theme.mjs +896 -133
  204. package/clients/cli/commands/experimental-theme-compile.doc.mjs +1 -1
  205. package/clients/cli/commands/experimental-theme-editor-new.doc.mjs +1 -1
  206. package/clients/cli/commands/experimental-theme-editor-set.doc.mjs +2 -2
  207. package/clients/cli/commands/experimental-theme-editor-show.doc.mjs +2 -2
  208. package/clients/cli/commands/experimental-theme-editor-undo.doc.mjs +2 -2
  209. package/clients/cli/commands/experimental-theme-preview-app.doc.mjs +2 -2
  210. package/clients/cli/commands/experimental-theme-remove.doc.mjs +4 -4
  211. package/clients/cli/commands/init.mjs +14 -6
  212. package/clients/cli/commands/template.doc.mjs +1 -1
  213. package/clients/cli/commands/template.mjs +11 -0
  214. package/clients/cli/commands/theme-add.doc.mjs +1 -1
  215. package/clients/cli/commands/theme-build.doc.mjs +8 -0
  216. package/clients/cli/commands/theme-list.doc.mjs +1 -1
  217. package/clients/cli/commands/theme-remove.doc.mjs +13 -5
  218. package/clients/cli/commands/theme.mjs +783 -572
  219. package/clients/cli/commands/upgrade.mjs +7 -3
  220. package/clients/cli/index.mjs +8 -18
  221. package/clients/cli/lib/cli-error.mjs +21 -0
  222. package/clients/cli/lib/json-shim.mjs +189 -9
  223. package/clients/cli/lib/stray-option.mjs +478 -0
  224. package/clients/cli/lib/unknown-command.mjs +353 -0
  225. package/clients/cli/manifest.generated.json +1 -1
  226. package/foundation/agent-docs/agent-docs.mjs +1 -1
  227. package/foundation/config/project.d.mts +8 -0
  228. package/foundation/config/project.mjs +26 -29
  229. package/foundation/config/theme-build-header.d.mts +14 -0
  230. package/foundation/config/theme-build-header.mjs +14 -0
  231. package/foundation/config/theme-state.d.mts +19 -2
  232. package/foundation/config/theme-state.mjs +93 -1
  233. package/foundation/discovery/cli-self-doc-names.d.mts +13 -0
  234. package/foundation/discovery/cli-self-doc-names.mjs +51 -0
  235. package/foundation/discovery/cli-self-docs.d.mts +0 -2
  236. package/foundation/discovery/cli-self-docs.mjs +2 -15
  237. package/foundation/discovery/component-discovery.mjs +3 -2
  238. package/foundation/discovery/core-component-docs.d.mts +29 -0
  239. package/foundation/discovery/core-component-docs.mjs +83 -0
  240. package/foundation/discovery/core-theme-facts.d.mts +70 -0
  241. package/foundation/discovery/core-theme-facts.mjs +384 -0
  242. package/foundation/discovery/docs-discovery.d.mts +66 -9
  243. package/foundation/discovery/docs-discovery.mjs +126 -60
  244. package/foundation/discovery/entry-name-files.d.mts +72 -9
  245. package/foundation/discovery/entry-name-files.mjs +193 -103
  246. package/foundation/discovery/hook-discovery.d.mts +10 -0
  247. package/foundation/discovery/hook-discovery.mjs +77 -40
  248. package/foundation/discovery/integration-component-views.d.mts +15 -0
  249. package/foundation/discovery/integration-component-views.mjs +91 -0
  250. package/foundation/discovery/module-exports.d.mts +26 -1
  251. package/foundation/discovery/module-exports.mjs +114 -40
  252. package/foundation/discovery/name-roots.d.mts +38 -0
  253. package/foundation/discovery/name-roots.mjs +108 -0
  254. package/foundation/discovery/next-routes.d.mts +48 -0
  255. package/foundation/discovery/next-routes.mjs +197 -0
  256. package/foundation/discovery/stored-self-audit.mjs +2 -0
  257. package/foundation/discovery/template-adapter.d.mts +31 -63
  258. package/foundation/discovery/template-adapter.mjs +33 -207
  259. package/foundation/discovery/template-destination.d.mts +28 -0
  260. package/foundation/discovery/template-destination.mjs +106 -0
  261. package/foundation/discovery/template-ids.d.mts +69 -0
  262. package/foundation/discovery/template-ids.mjs +199 -0
  263. package/foundation/discovery/theme-discovery.d.mts +12 -0
  264. package/foundation/discovery/theme-discovery.mjs +31 -2
  265. package/foundation/discovery/theme-imports.d.mts +10 -0
  266. package/foundation/discovery/theme-imports.mjs +18 -3
  267. package/foundation/discovery/theming-targets.d.mts +13 -5
  268. package/foundation/discovery/theming-targets.mjs +38 -45
  269. package/foundation/doc-compiler/generated-levels.d.mts +43 -0
  270. package/foundation/doc-compiler/generated-levels.mjs +72 -0
  271. package/foundation/doc-compiler/literal-doc.d.mts +12 -0
  272. package/foundation/doc-compiler/literal-doc.mjs +322 -0
  273. package/foundation/doc-compiler/stored-docs.d.mts +7 -0
  274. package/foundation/doc-compiler/stored-docs.mjs +14 -1
  275. package/foundation/doc-compiler/tree.d.mts +4 -84
  276. package/foundation/doc-compiler/tree.mjs +4 -62
  277. package/foundation/fonts/font-stylesheet.d.mts +15 -0
  278. package/foundation/fonts/font-stylesheet.mjs +61 -3
  279. package/foundation/fs/exact-codec.d.mts +12 -2
  280. package/foundation/fs/exact-codec.mjs +23 -6
  281. package/foundation/fs/file-protection.mjs +12 -2
  282. package/foundation/fs/gather-cache.d.mts +34 -2
  283. package/foundation/fs/gather-cache.mjs +230 -71
  284. package/foundation/fs/glob.d.mts +16 -0
  285. package/foundation/fs/glob.mjs +105 -0
  286. package/foundation/fs/kept-tree.d.mts +34 -14
  287. package/foundation/fs/kept-tree.mjs +124 -38
  288. package/foundation/fs/path-safety.d.mts +11 -2
  289. package/foundation/fs/path-safety.mjs +108 -18
  290. package/foundation/fs/read-record.d.mts +51 -11
  291. package/foundation/fs/read-record.mjs +273 -57
  292. package/foundation/fs/regular-file.d.mts +29 -0
  293. package/foundation/fs/regular-file.mjs +77 -0
  294. package/foundation/fs/stop-cleanup.d.mts +12 -0
  295. package/foundation/fs/stop-cleanup.mjs +66 -0
  296. package/foundation/integrations/integrations.d.mts +23 -1
  297. package/foundation/integrations/integrations.mjs +18 -1
  298. package/foundation/integrations/pack-state.d.mts +75 -0
  299. package/foundation/integrations/pack-state.mjs +314 -0
  300. package/foundation/integrations/shipped-imports.d.mts +125 -0
  301. package/foundation/integrations/shipped-imports.mjs +530 -0
  302. package/foundation/integrations/validate-contributions.d.mts +0 -17
  303. package/foundation/integrations/validate-contributions.mjs +81 -290
  304. package/foundation/render/assets.mjs +52 -7
  305. package/foundation/render/charts.d.mts +78 -27
  306. package/foundation/render/charts.mjs +266 -90
  307. package/foundation/render/embedded-imports.d.mts +31 -0
  308. package/foundation/render/embedded-imports.mjs +164 -35
  309. package/foundation/render/layers.d.mts +30 -0
  310. package/foundation/render/layers.mjs +158 -0
  311. package/foundation/render/offline.d.mts +32 -0
  312. package/foundation/render/offline.mjs +56 -0
  313. package/foundation/render/page-worker.mjs +234 -9
  314. package/foundation/render/picture-chrome.mjs +7 -0
  315. package/foundation/render/picture-playwright.mjs +13 -1
  316. package/foundation/render/render-page.d.mts +46 -4
  317. package/foundation/render/render-page.mjs +450 -98
  318. package/foundation/response/response-types.doc.mjs +4 -4
  319. package/foundation/suggest/name-index.d.mts +148 -0
  320. package/foundation/suggest/name-index.mjs +317 -0
  321. package/foundation/suggest/other-command.d.mts +140 -0
  322. package/foundation/suggest/other-command.mjs +756 -0
  323. package/foundation/text/css-escape.d.mts +18 -0
  324. package/foundation/text/css-escape.mjs +35 -0
  325. package/foundation/text/entry-names.d.mts +14 -0
  326. package/foundation/text/entry-names.mjs +14 -0
  327. package/foundation/text/string-utils.d.mts +43 -4
  328. package/foundation/text/string-utils.mjs +100 -16
  329. package/foundation/text/suggest-order.d.mts +38 -4
  330. package/foundation/text/suggest-order.mjs +159 -4
  331. package/foundation/xle/browser.d.mts +2 -2
  332. package/package.json +7 -6
package/README.md CHANGED
@@ -507,7 +507,7 @@ Every response has a `type` discriminant. The full set is below (generated from
507
507
  | `template.list` | The effective discovered TemplateListEntry[] for pages and blocks. A winning replacement entry includes optional `replaces`, naming the Core id omitted from the default list. |
508
508
  | `template.show` | The resolved template's source, exactly as a copy writes it, plus its description, kind, the component names it composes, and demoMediaReplaced (how many Astryx demo media references were replaced with placeholders for you to swap for your own media), and demoContentReplaced (how many Astryx docs-only demo content elements were replaced with a Text placeholder for your own content). |
509
509
  | `template.skeleton` | A layout skeleton (structural tags with spatial annotations) plus the template's description and the components it composes. The envelope's package names the npm package that owns the template. |
510
- | `template.copy` | A scaffold receipt: template id, output directory, written file name, file count, demoMediaReplaced (how many Astryx demo media references were replaced with placeholders), demoContentReplaced (how many Astryx docs-only demo content elements were replaced with a Text placeholder), notes (setup notes naming what the template needs that the project lacks — missing packages, missing StyleX compiler; empty when satisfied), missingPackages (external package names the template imports that are not in the project), and installCommand (a ready-to-run install command with the detected package manager and workspace version ranges; null when nothing is missing, or when several lockfiles leave the package manager undetermined). The envelope's package names the npm package that owns the template. |
510
+ | `template.copy` | A scaffold receipt: template id, output directory, written file name, file count, givenPath (optional; the absolute path as given, present only when it was inside the project), demoMediaReplaced (how many Astryx demo media references were replaced with placeholders), demoContentReplaced (how many Astryx docs-only demo content elements were replaced with a Text placeholder), notes (setup notes naming what the template needs that the project lacks — missing packages, missing StyleX compiler; empty when satisfied), missingPackages (external package names the template imports that are not in the project), and installCommand (a ready-to-run install command with the detected package manager and workspace version ranges; null when nothing is missing, or when several lockfiles leave the package manager undetermined). The envelope's package names the npm package that owns the template. |
511
511
  | `template.cdn` | A write receipt for the no-build-step CDN starter page: the path (relative to cwd), the Astryx version every CDN URL was pinned to, whether it was written, and the reason it was not. `exists` when a file was already there, which is a success. |
512
512
  | `hook.list` | The hook catalog grouped by category: `detail` (the level: names \| compact \| full) and `components`, the grouped map of hook names, brief entries, or a full HookDoc per entry. The envelope's package is @astryxdesign/core, the only package that ships hooks. |
513
513
  | `hook.detail` | One hook's full authored HookDoc. The envelope's package is @astryxdesign/core. |
@@ -515,7 +515,7 @@ Every response has a `type` discriminant. The full set is below (generated from
515
515
  | `theme.build` | A theme build receipt: name, tokenCount and componentCount (override counts), sizeKB, the written outputs {css, cssDts, js, dts, and variantsDts when applicable}, warnings (defects to fix), and notices (advisories about a correct theme, such as a named font it does not load). |
516
516
  | `theme.build.check` | The --check receipt: theme name, an upToDate flag, the stale outputs (each {path, reason: missing \| outdated}), the full list of checked paths, and, when any is stale or missing, code ERR_THEME_STALE. Writes nothing. |
517
517
  | `theme.build.batch` | Several themes built in one invocation: `count` plus one {file, receipt} per theme in argument order, where receipt is that theme's theme.build (or theme.build.check) envelope, or null when it produced no CSS. |
518
- | `theme.list` | Every bundled, installed package, and local theme as a ThemeListEntry[]. Each entry has slug, displayName, description, maintained, owner package or local root, source, added, and default fields. Optional meta.unmigratedCopies names earlier descriptor-less copies, their missing descriptor, and the upgrade command; those copies are not data entries. |
518
+ | `theme.list` | Every bundled, installed package, and local theme as a ThemeListEntry[]. Each entry has slug, displayName, description, maintained, package (the package that provides it, or the local root), source, added, and default fields, plus owner (the package the app imports the built theme from, such as the bundled theme package @astryxdesign/theme-<slug>, or the local root) and installed (whether that owner is installed). Optional meta.unmigratedCopies names earlier descriptor-less copies, their missing descriptor, and the upgrade command; those copies are not data entries. |
519
519
  | `theme.app` | The app theme record after add, remove, or use. It includes every added theme and its built imports, the default slug, generated module path, and the command change. After add, the envelope package names the npm package that owns the added theme; a local theme has none. |
520
520
  | `theme.eject` | A local source-fork receipt with the resolved slug, displayName, source theme maintained flag, source-selector package, outputDir, source entry, exportName, and every file written, including the descriptor. The written local descriptor always uses maintained: false. |
521
521
  | `theme.template` | A write receipt for the annotated theme template: the path (relative to cwd), whether it was written, and the reason it was not. `exists` when a file was already there, which is a success. |
@@ -13,6 +13,7 @@
13
13
  * @property {string[]} keywords The ideas the page serves, as its own descriptor names them; empty when it declares none.
14
14
  * @property {string} filePath Absolute path to the template source file on disk.
15
15
  * @property {string[]} components The components its page composes, read from its source on first use; empty when the source cannot be read.
16
+ * @property {boolean} hidden The template's own `isHiddenFromOverview`: kept off the gallery, so never taken as the app shell.
16
17
  */
17
18
  /**
18
19
  * A component the project can use, as the ranker reads it.
@@ -116,6 +117,17 @@ export function isWeightsFile(file: any): file is import("./kit/weights.mjs").We
116
117
  * @returns {string[]} Setup notes (empty when the template needs nothing).
117
118
  */
118
119
  export function templateSetupNotes(template: PageTemplate, cwd: string): string[];
120
+ /**
121
+ * Where a page template goes in the project where build ran, quoted for a
122
+ * printed command: the path `astryx template` names for it from the
123
+ * project's layout (in a Next app, the App Router folder). Null when that
124
+ * folder has no package.json, so no project layout is known.
125
+ *
126
+ * @param {string} id the template's own id
127
+ * @param {string} cwd the folder build ran in
128
+ * @returns {string | null}
129
+ */
130
+ export function pageDestination(id: string, cwd: string): string | null;
119
131
  /**
120
132
  * The Core a build answers from: the project's, else the release's own,
121
133
  * installed into the per-user cache first when needed (a network install
@@ -165,6 +177,10 @@ export type PageTemplate = {
165
177
  * The components its page composes, read from its source on first use; empty when the source cannot be read.
166
178
  */
167
179
  components: string[];
180
+ /**
181
+ * The template's own `isHiddenFromOverview`: kept off the gallery, so never taken as the app shell.
182
+ */
183
+ hidden: boolean;
168
184
  };
169
185
  /**
170
186
  * A component the project can use, as the ranker reads it.
@@ -21,6 +21,7 @@
21
21
  */
22
22
 
23
23
  import fs from 'node:fs';
24
+ import path from 'node:path';
24
25
  import {fileURLToPath} from 'node:url';
25
26
 
26
27
  import {discoverTemplates} from '../template/template.mjs';
@@ -29,6 +30,8 @@ import {findCoreDir, requireCoreDir} from '../../foundation/fs/paths.mjs';
29
30
  import {persistedDerived} from '../../foundation/fs/gather-cache.mjs';
30
31
  import {analyzeTemplateNeeds} from '../../foundation/discovery/template-needs.mjs';
31
32
  import {extractComponents} from '../../foundation/discovery/template-adapter.mjs';
33
+ import {templateDestination} from '../../foundation/discovery/template-destination.mjs';
34
+ import {quoteCommandArgument} from '../../foundation/env/package-manager.mjs';
32
35
  import {isWordModel} from './kit/word-model.mjs';
33
36
 
34
37
  /**
@@ -50,6 +53,7 @@ export {withListingCache} from '../../foundation/fs/listing-cache.mjs';
50
53
  * @property {string[]} keywords The ideas the page serves, as its own descriptor names them; empty when it declares none.
51
54
  * @property {string} filePath Absolute path to the template source file on disk.
52
55
  * @property {string[]} components The components its page composes, read from its source on first use; empty when the source cannot be read.
56
+ * @property {boolean} hidden The template's own `isHiddenFromOverview`: kept off the gallery, so never taken as the app shell.
53
57
  */
54
58
 
55
59
  /**
@@ -113,6 +117,7 @@ export async function loadTemplates(cwd) {
113
117
  package: t.package ?? '@astryxdesign/core',
114
118
  category: t.category || '',
115
119
  keywords: t.keywords ?? [],
120
+ hidden: t.hidden === true,
116
121
  filePath: t.filePath,
117
122
  // The id `template()` resolves back to this entry: an active
118
123
  // replacement owns the Core id it names, so that id selects it.
@@ -341,6 +346,21 @@ export function templateSetupNotes(template, cwd) {
341
346
  }
342
347
  }
343
348
 
349
+ /**
350
+ * Where a page template goes in the project where build ran, quoted for a
351
+ * printed command: the path `astryx template` names for it from the
352
+ * project's layout (in a Next app, the App Router folder). Null when that
353
+ * folder has no package.json, so no project layout is known.
354
+ *
355
+ * @param {string} id the template's own id
356
+ * @param {string} cwd the folder build ran in
357
+ * @returns {string | null}
358
+ */
359
+ export function pageDestination(id, cwd) {
360
+ if (!fs.existsSync(path.join(cwd, 'package.json'))) return null;
361
+ return quoteCommandArgument(templateDestination(cwd, 'page', id));
362
+ }
363
+
344
364
  /**
345
365
  * The Core a build answers from: the project's, else the release's own,
346
366
  * installed into the per-user cache first when needed (a network install