@astryxdesign/cli 0.6.3-canary.db4e378 → 0.6.3-canary.db52d98

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 (397) hide show
  1. package/README.md +38 -15
  2. package/api/blog/blog.doc.mjs +1 -0
  3. package/api/build/_adapter.d.mts +50 -0
  4. package/api/build/_adapter.mjs +60 -0
  5. package/api/build/build.doc.mjs +14 -7
  6. package/api/build/build.test.mjs +184 -6
  7. package/api/build/build.type.d.mts +57 -2
  8. package/api/build/build.type.mjs +30 -7
  9. package/api/build/help/help.d.mts +4 -0
  10. package/api/build/help/help.mjs +24 -11
  11. package/api/build/kit/kit.d.mts +4 -1
  12. package/api/build/kit/kit.mjs +165 -49
  13. package/api/build/kit/rank.d.mts +44 -0
  14. package/api/build/kit/rank.mjs +432 -0
  15. package/api/build/kit/rank.test.mjs +196 -0
  16. package/api/component/_adapter.d.mts +6 -12
  17. package/api/component/_adapter.mjs +20 -10
  18. package/api/component/component.doc.mjs +1 -0
  19. package/api/component/component.mjs +60 -12
  20. package/api/component/list/list.mjs +3 -2
  21. package/api/discover/discover.doc.mjs +1 -0
  22. package/api/docs/_adapter.d.mts +252 -34
  23. package/api/docs/_adapter.mjs +923 -132
  24. package/api/docs/detail/detail.mjs +11 -3
  25. package/api/docs/detail/section/section.mjs +24 -13
  26. package/api/docs/detail/section/section.test.mjs +15 -6
  27. package/api/docs/docs.d.mts +5 -3
  28. package/api/docs/docs.doc.mjs +39 -17
  29. package/api/docs/docs.mjs +44 -8
  30. package/api/docs/docs.test.mjs +158 -4
  31. package/api/docs/docs.type.d.mts +181 -2
  32. package/api/docs/docs.type.mjs +117 -3
  33. package/api/docs/index/index.mjs +11 -3
  34. package/api/docs/index/index.test.mjs +1 -1
  35. package/api/docs/integration-tree.test.mjs +555 -0
  36. package/api/docs/integrationDocs.test.mjs +14 -14
  37. package/api/docs/list/list.mjs +28 -12
  38. package/api/docs/node/node.d.mts +43 -0
  39. package/api/docs/node/node.mjs +192 -0
  40. package/api/docs/reference-blocks.test.mjs +406 -0
  41. package/api/doctor/doctor.d.mts +54 -4
  42. package/api/doctor/doctor.doc.mjs +1 -0
  43. package/api/doctor/doctor.mjs +331 -16
  44. package/api/doctor/doctor.test.mjs +420 -7
  45. package/api/gap-report/gap-report.doc.mjs +1 -0
  46. package/api/hook/_adapter.mjs +19 -5
  47. package/api/hook/hook.doc.mjs +1 -0
  48. package/api/hook/list/list.d.mts +1 -1
  49. package/api/hook/list/list.mjs +69 -17
  50. package/api/index.d.mts +1 -1
  51. package/api/index.mjs +1 -0
  52. package/api/init/init.doc.mjs +2 -1
  53. package/api/integration/add-contribution.d.mts +2 -1
  54. package/api/integration/add-contribution.mjs +114 -12
  55. package/api/integration/add-contribution.test.mjs +174 -3
  56. package/api/integration/add-theme.mjs +34 -64
  57. package/api/integration/add-theme.test.mjs +105 -21
  58. package/api/integration/authoring-checks.mjs +138 -28
  59. package/api/integration/authoring-checks.test.mjs +179 -7
  60. package/api/integration/authoring-checks.type.mjs +6 -1
  61. package/api/integration/integration-authoring.type.d.mts +2 -0
  62. package/api/integration/integration-authoring.type.mjs +2 -0
  63. package/api/integration/integration-block-exports.test.mjs +10 -6
  64. package/api/integration/integrationAdd.doc.mjs +7 -0
  65. package/api/integration/integrationAddAgentDoc.doc.mjs +1 -0
  66. package/api/integration/integrationAddCodemod.doc.mjs +1 -0
  67. package/api/integration/integrationAddComponent.doc.mjs +1 -0
  68. package/api/integration/integrationAddDoc.doc.mjs +8 -1
  69. package/api/integration/integrationAddTemplate.doc.mjs +1 -0
  70. package/api/integration/integrationAddTheme.doc.mjs +6 -5
  71. package/api/integration/integrationComponentConflicts.doc.mjs +1 -0
  72. package/api/integration/integrationDocConflicts.doc.mjs +2 -1
  73. package/api/integration/integrationPackCheck.doc.mjs +2 -1
  74. package/api/integration/integrationTemplateConflicts.doc.d.mts +3 -0
  75. package/api/integration/integrationTemplateConflicts.doc.mjs +4 -0
  76. package/api/integration/pack-check.mjs +34 -0
  77. package/api/integration/pack-check.test.mjs +138 -47
  78. package/api/integration/pack-check.type.d.mts +26 -2
  79. package/api/integration/pack-check.type.mjs +14 -1
  80. package/api/integration/summarizeIssues.doc.mjs +1 -0
  81. package/api/integration/template-conflict-compatibility.test.mjs +73 -0
  82. package/api/integration/validate-integration-fixes.test.mjs +1389 -0
  83. package/api/integration/validate-integration.mjs +50 -102
  84. package/api/integration/validate-integration.test.mjs +88 -26
  85. package/api/integration/validate-unread-theme-folders.test.mjs +110 -0
  86. package/api/integration/validateIntegration.doc.mjs +2 -1
  87. package/api/json/assertResponse.doc.mjs +1 -0
  88. package/api/json/index.ts +2 -0
  89. package/api/json/isError.doc.mjs +1 -0
  90. package/api/json/parseResponse.doc.mjs +1 -0
  91. package/api/layout/_adapter.mjs +20 -5
  92. package/api/layout/layoutCheck.doc.mjs +1 -0
  93. package/api/layout/layoutExpand.doc.mjs +1 -0
  94. package/api/layout/layoutGrammar.doc.mjs +1 -0
  95. package/api/search/search.d.mts +59 -1
  96. package/api/search/search.doc.mjs +5 -3
  97. package/api/search/search.mjs +458 -77
  98. package/api/search/search.test.mjs +91 -2
  99. package/api/search/search.type.d.mts +13 -1
  100. package/api/search/search.type.mjs +4 -1
  101. package/api/swizzle/swizzle.doc.mjs +1 -0
  102. package/api/template/list/list.mjs +1 -0
  103. package/api/template/table-floating-bulk-actions.test.mjs +66 -0
  104. package/api/template/template-integration.test.mjs +1072 -3
  105. package/api/template/template-suffix.test.mjs +41 -21
  106. package/api/template/template.doc.mjs +28 -7
  107. package/api/template/template.mjs +45 -8
  108. package/api/template/template.type.d.mts +6 -8
  109. package/api/template/template.type.mjs +3 -2
  110. package/api/theme/_adapter.d.mts +2 -3
  111. package/api/theme/_adapter.mjs +4 -5
  112. package/api/theme/add/add.binary.test.mjs +10 -17
  113. package/api/theme/add/add.test.mjs +14 -1
  114. package/api/theme/generateTonalPalette.doc.mjs +1 -0
  115. package/api/theme/integration-themes.test.mjs +39 -28
  116. package/api/theme/list/list.test.mjs +19 -20
  117. package/api/theme/listThemes.doc.mjs +6 -5
  118. package/api/theme/template/template.test.mjs +5 -0
  119. package/api/theme/themeAdd.doc.mjs +4 -3
  120. package/api/theme/themeBuild.doc.mjs +1 -0
  121. package/api/theme/themeList.doc.mjs +6 -3
  122. package/api/theme/themeListAvailable.doc.mjs +5 -3
  123. package/api/theme/themePaletteGenerate.doc.mjs +1 -0
  124. package/api/theme/themeTargets.doc.mjs +1 -0
  125. package/api/theme/themeTemplate.doc.mjs +2 -1
  126. package/api/upgrade/_adapter.d.mts +32 -5
  127. package/api/upgrade/_adapter.mjs +97 -69
  128. package/api/upgrade/provider-agreement.test.mjs +152 -0
  129. package/api/upgrade/run/run.mjs +356 -59
  130. package/api/upgrade/upgrade.doc.mjs +6 -1
  131. package/api/upgrade/upgrade.type.d.mts +34 -0
  132. package/api/upgrade/upgrade.type.mjs +15 -0
  133. package/assets/codemods/__tests__/runner.test.mjs +330 -8
  134. package/assets/codemods/integration-discovery.mjs +8 -2
  135. package/assets/codemods/integration-discovery.test.mjs +15 -0
  136. package/assets/codemods/integration-runner.mjs +56 -4
  137. package/assets/codemods/integration-runner.protection.test.mjs +153 -0
  138. package/assets/codemods/run-codemod.mjs +177 -34
  139. package/assets/codemods/runner.mjs +350 -102
  140. package/assets/codemods/transforms/next/__tests__/migrate-native-picker-to-presentation.test.mjs +63 -0
  141. package/assets/codemods/transforms/next/__tests__/migrate-theme-catalog-to-descriptors.test.mjs +220 -0
  142. package/assets/codemods/transforms/next/index.mjs +19 -1
  143. package/assets/codemods/transforms/next/migrate-native-picker-to-presentation.mjs +148 -0
  144. package/assets/codemods/transforms/next/migrate-theme-catalog-to-descriptors.mjs +141 -0
  145. package/assets/docs/getting-started.doc.mjs +2 -2
  146. package/assets/docs/layout.doc.dense.mjs +2 -2
  147. package/assets/docs/layout.doc.mjs +1 -1
  148. package/assets/docs/principles.doc.mjs +6 -6
  149. package/assets/docs/styling-libraries.doc.mjs +3 -3
  150. package/assets/docs/styling.doc.mjs +4 -4
  151. package/assets/docs/theme.doc.mjs +5 -5
  152. package/assets/docs/tokens.doc.mjs +1 -1
  153. package/assets/docs/tree/api.doc.mjs +30 -0
  154. package/assets/docs/tree/cli.doc.mjs +23 -0
  155. package/assets/docs/tree/commands.doc.mjs +25 -0
  156. package/assets/docs/{cli-integrations.doc.mjs → tree/integrations.doc.mjs} +66 -38
  157. package/assets/docs/tree/integrations.test.mjs +62 -0
  158. package/assets/docs/tree/writing-docs.doc.mjs +286 -0
  159. package/assets/docs/working-with-ai.doc.mjs +3 -3
  160. package/assets/templates/blocks/components/CheckboxList/CheckboxListSelectAllPattern.doc.mjs +1 -1
  161. package/assets/templates/blocks/components/CheckboxList/CheckboxListSelectAllPattern.tsx +1 -3
  162. package/assets/templates/blocks/components/DateInput/DateInputDateRange.tsx +1 -1
  163. package/assets/templates/blocks/components/Item/ItemDocumentTabs.doc.mjs +14 -0
  164. package/assets/templates/blocks/components/Item/ItemDocumentTabs.tsx +100 -0
  165. package/assets/templates/blocks/components/Table/TableBulkActionsTable.doc.mjs +14 -0
  166. package/assets/templates/blocks/components/Table/TableBulkActionsTable.tsx +71 -0
  167. package/assets/templates/blocks/components/Table/TableFloatingBulkActionsTable.doc.mjs +19 -0
  168. package/assets/templates/blocks/components/Table/TableFloatingBulkActionsTable.tsx +139 -0
  169. package/assets/templates/blocks/components/TimeInput/TimeInputConstrained.tsx +1 -0
  170. package/assets/templates/themes/butter/butterTheme.doc.mjs +11 -0
  171. package/assets/templates/themes/chocolate/chocolateTheme.doc.mjs +11 -0
  172. package/assets/templates/themes/gothic/gothicTheme.doc.mjs +11 -0
  173. package/assets/templates/themes/matcha/matchaTheme.doc.mjs +11 -0
  174. package/assets/templates/themes/neutral/neutralTheme.doc.mjs +11 -0
  175. package/assets/templates/themes/stone/stoneTheme.doc.mjs +11 -0
  176. package/assets/templates/themes/y2k/y2kTheme.doc.mjs +11 -0
  177. package/authoring/codemod/codemod.doc.mjs +1 -1
  178. package/authoring/codemod/type.ts +12 -0
  179. package/authoring/config/config.doc.mjs +1 -1
  180. package/authoring/debug/debug.doc.d.mts +11 -0
  181. package/authoring/debug/debug.doc.mjs +182 -0
  182. package/authoring/debug/parse.d.mts +3 -3
  183. package/authoring/doctypes/_schema.d.mts +119 -117
  184. package/authoring/doctypes/_schema.mjs +54 -3
  185. package/authoring/doctypes/base/graph-fields.doc.mjs +8 -6
  186. package/authoring/doctypes/base/type.ts +6 -5
  187. package/authoring/doctypes/command/command.doc.mjs +1 -1
  188. package/authoring/doctypes/command/type.ts +2 -2
  189. package/authoring/doctypes/component/type.ts +2 -2
  190. package/authoring/doctypes/doctypes-new.test.mjs +48 -6
  191. package/authoring/doctypes/enum/enum.doc.mjs +1 -1
  192. package/authoring/doctypes/enum/type.ts +1 -1
  193. package/authoring/doctypes/function/function.doc.mjs +3 -2
  194. package/authoring/doctypes/function/type.ts +3 -2
  195. package/authoring/doctypes/hook/type.ts +2 -2
  196. package/authoring/doctypes/load-contract.test.mjs +28 -2
  197. package/authoring/doctypes/namespace/namespace.doc.mjs +6 -10
  198. package/authoring/doctypes/namespace/parse.test.mjs +23 -25
  199. package/authoring/doctypes/namespace/type.ts +5 -2
  200. package/authoring/doctypes/parse.d.mts +4 -2
  201. package/authoring/doctypes/parse.mjs +10 -5
  202. package/authoring/doctypes/reference/reference.doc.mjs +35 -6
  203. package/authoring/doctypes/reference/type.ts +30 -13
  204. package/authoring/doctypes/schema/schema.doc.mjs +1 -1
  205. package/authoring/doctypes/schema/type.ts +1 -2
  206. package/authoring/doctypes/template/parse.d.mts +2 -0
  207. package/authoring/doctypes/template/parse.mjs +4 -0
  208. package/authoring/doctypes/template/parse.test.mjs +18 -0
  209. package/authoring/doctypes/template/template.doc.mjs +9 -3
  210. package/authoring/doctypes/template/type.ts +8 -0
  211. package/authoring/doctypes/theme/parse.d.mts +35 -0
  212. package/authoring/doctypes/theme/parse.mjs +76 -0
  213. package/authoring/doctypes/theme/theme.doc.d.mts +9 -0
  214. package/authoring/doctypes/theme/theme.doc.mjs +79 -0
  215. package/authoring/doctypes/theme/type.ts +42 -0
  216. package/authoring/doctypes/types.ts +2 -1
  217. package/authoring/gap-report/gap-report.doc.d.mts +12 -0
  218. package/authoring/gap-report/gap-report.doc.mjs +183 -0
  219. package/authoring/identity/identity.doc.mjs +2 -2
  220. package/authoring/index.d.mts +1 -0
  221. package/authoring/index.d.ts +7 -4
  222. package/authoring/index.mjs +2 -1
  223. package/authoring/integration/integration.doc.mjs +2 -2
  224. package/authoring/integration/type.ts +4 -10
  225. package/clients/cli/__tests__/cliManifest.test.ts +27 -29
  226. package/clients/cli/commands/blog.doc.mjs +1 -1
  227. package/clients/cli/commands/build-theme.adaptations.test.mjs +100 -1
  228. package/clients/cli/commands/build-theme.mjs +11 -45
  229. package/clients/cli/commands/build.doc.mjs +12 -7
  230. package/clients/cli/commands/build.mjs +105 -67
  231. package/clients/cli/commands/build.text-fields.test.mjs +41 -0
  232. package/clients/cli/commands/component/index.mjs +1 -1
  233. package/clients/cli/commands/component-ownership.test.mjs +3 -3
  234. package/clients/cli/commands/component.doc.mjs +1 -1
  235. package/clients/cli/commands/discover.broken-integration.test.mjs +7 -8
  236. package/clients/cli/commands/discover.doc.mjs +1 -1
  237. package/clients/cli/commands/discover.mjs +1 -1
  238. package/clients/cli/commands/docs.doc.mjs +21 -9
  239. package/clients/cli/commands/docs.mjs +184 -70
  240. package/clients/cli/commands/docs.test.mjs +120 -16
  241. package/clients/cli/commands/doctor-integration-components.doc.mjs +1 -1
  242. package/clients/cli/commands/doctor-integration-docs.doc.mjs +3 -3
  243. package/clients/cli/commands/doctor-integration-templates.doc.mjs +15 -8
  244. package/clients/cli/commands/doctor-integration-validate.doc.mjs +1 -1
  245. package/clients/cli/commands/doctor-integration.doc.mjs +1 -1
  246. package/clients/cli/commands/doctor-integration.test.mjs +90 -8
  247. package/clients/cli/commands/doctor.doc.mjs +1 -1
  248. package/clients/cli/commands/doctor.mjs +53 -16
  249. package/clients/cli/commands/gap-report.doc.mjs +1 -1
  250. package/clients/cli/commands/hook.doc.mjs +1 -1
  251. package/clients/cli/commands/init.doc.mjs +1 -1
  252. package/clients/cli/commands/integration-add.controls.test.mjs +1 -1
  253. package/clients/cli/commands/integration-add.doc.mjs +11 -1
  254. package/clients/cli/commands/integration-pack.doc.mjs +1 -1
  255. package/clients/cli/commands/integration-real-world.test.mjs +3 -9
  256. package/clients/cli/commands/integration.doc.mjs +1 -1
  257. package/clients/cli/commands/integration.mjs +1 -0
  258. package/clients/cli/commands/layout-check.doc.mjs +1 -1
  259. package/clients/cli/commands/layout-expand.doc.mjs +1 -1
  260. package/clients/cli/commands/layout-grammar.doc.mjs +1 -1
  261. package/clients/cli/commands/layout.doc.mjs +1 -1
  262. package/clients/cli/commands/manifest.doc.mjs +1 -1
  263. package/clients/cli/commands/search.doc.mjs +1 -1
  264. package/clients/cli/commands/search.mjs +11 -2
  265. package/clients/cli/commands/setup-nudge.test.mjs +6 -0
  266. package/clients/cli/commands/swizzle.doc.mjs +1 -1
  267. package/clients/cli/commands/template.doc.mjs +24 -7
  268. package/clients/cli/commands/template.mjs +4 -91
  269. package/clients/cli/commands/text-json-parity.test.mjs +719 -0
  270. package/clients/cli/commands/theme-add.doc.mjs +2 -2
  271. package/clients/cli/commands/theme-build.doc.mjs +1 -1
  272. package/clients/cli/commands/theme-list.doc.mjs +2 -2
  273. package/clients/cli/commands/theme-palette-generate.doc.mjs +3 -3
  274. package/clients/cli/commands/theme-palette.doc.mjs +1 -1
  275. package/clients/cli/commands/theme-targets.behavior.test.mjs +4 -3
  276. package/clients/cli/commands/theme-targets.doc.mjs +1 -1
  277. package/clients/cli/commands/theme-template.doc.mjs +1 -1
  278. package/clients/cli/commands/theme.doc.mjs +1 -1
  279. package/clients/cli/commands/upgrade.doc.mjs +3 -2
  280. package/clients/cli/commands/upgrade.file-protection.test.mjs +228 -0
  281. package/clients/cli/commands/upgrade.mjs +29 -7
  282. package/clients/cli/formatters/index.mjs +2 -0
  283. package/clients/cli/formatters/index.test.mjs +6 -0
  284. package/clients/cli/index.mjs +8 -0
  285. package/clients/cli/lib/hook-format.mjs +14 -5
  286. package/clients/cli/lib/manifest.mjs +9 -2
  287. package/foundation/agent-docs/agent-docs.d.mts +3 -2
  288. package/foundation/agent-docs/agent-docs.mjs +13 -9
  289. package/foundation/agent-docs/agent-docs.test.mjs +19 -1
  290. package/foundation/config/project-themes.test.mjs +11 -19
  291. package/foundation/config/project.d.mts +20 -11
  292. package/foundation/config/project.mjs +123 -80
  293. package/foundation/config/project.test.mjs +144 -21
  294. package/foundation/discovery/authoring-self-docs.d.mts +18 -0
  295. package/foundation/discovery/authoring-self-docs.mjs +37 -15
  296. package/foundation/discovery/authoring-self-docs.test.mjs +25 -9
  297. package/foundation/discovery/authoring-surface.d.mts +74 -0
  298. package/foundation/discovery/authoring-surface.mjs +525 -0
  299. package/foundation/discovery/authoring-surface.test.mjs +392 -0
  300. package/foundation/discovery/cli-self-docs.d.mts +119 -0
  301. package/foundation/discovery/cli-self-docs.mjs +490 -0
  302. package/foundation/discovery/cli-self-docs.test.mjs +375 -0
  303. package/foundation/discovery/component-discovery.d.mts +38 -0
  304. package/foundation/discovery/component-discovery.mjs +48 -0
  305. package/foundation/discovery/component-loader.d.mts +35 -38
  306. package/foundation/discovery/component-loader.mjs +53 -222
  307. package/foundation/discovery/docs-discovery.d.mts +112 -11
  308. package/foundation/discovery/docs-discovery.mjs +231 -36
  309. package/foundation/discovery/docs-discovery.test.mjs +111 -32
  310. package/foundation/discovery/docs-output-budget.d.mts +2 -2
  311. package/foundation/discovery/docs-output-budget.mjs +1 -1
  312. package/foundation/discovery/docs-section-key.d.mts +28 -10
  313. package/foundation/discovery/docs-section-key.mjs +134 -33
  314. package/foundation/discovery/docs-section-key.test.mjs +41 -19
  315. package/foundation/discovery/template-adapter.d.mts +99 -6
  316. package/foundation/discovery/template-adapter.mjs +480 -57
  317. package/foundation/discovery/template-adapter.test.mjs +57 -0
  318. package/foundation/discovery/template-conflict-release.d.mts +13 -0
  319. package/foundation/discovery/template-conflict-release.mjs +40 -0
  320. package/foundation/discovery/template-conflict-release.test.mjs +40 -0
  321. package/foundation/discovery/theme-discovery.d.mts +67 -7
  322. package/foundation/discovery/theme-discovery.mjs +916 -186
  323. package/foundation/discovery/theme-discovery.test.mjs +613 -219
  324. package/foundation/doc-compiler/bundle.d.mts +47 -0
  325. package/foundation/doc-compiler/bundle.mjs +278 -0
  326. package/foundation/doc-compiler/bundle.test.mjs +266 -0
  327. package/foundation/doc-compiler/compile.d.mts +220 -39
  328. package/foundation/doc-compiler/compile.mjs +311 -15
  329. package/foundation/doc-compiler/diagnostics.d.mts +126 -0
  330. package/foundation/doc-compiler/diagnostics.mjs +305 -0
  331. package/foundation/doc-compiler/doc-compiler.test.mjs +28 -1
  332. package/foundation/doc-compiler/doc-loads.test.mjs +1642 -0
  333. package/foundation/doc-compiler/import.d.mts +24 -0
  334. package/foundation/doc-compiler/import.mjs +59 -0
  335. package/foundation/doc-compiler/inputs.d.mts +102 -0
  336. package/foundation/doc-compiler/inputs.mjs +291 -0
  337. package/foundation/doc-compiler/inputs.test.mjs +299 -0
  338. package/foundation/doc-compiler/ir.d.mts +13 -0
  339. package/foundation/doc-compiler/ir.mjs +196 -12
  340. package/foundation/doc-compiler/lenses.d.mts +8 -5
  341. package/foundation/doc-compiler/lenses.mjs +50 -4
  342. package/foundation/doc-compiler/links.d.mts +162 -0
  343. package/foundation/doc-compiler/links.mjs +294 -0
  344. package/foundation/doc-compiler/links.test.mjs +192 -0
  345. package/foundation/doc-compiler/lower-doc.test.mjs +495 -0
  346. package/foundation/doc-compiler/overlays.d.mts +37 -0
  347. package/foundation/doc-compiler/overlays.mjs +206 -0
  348. package/foundation/doc-compiler/parse-readable.d.mts +9 -0
  349. package/foundation/doc-compiler/parse-readable.mjs +29 -0
  350. package/foundation/doc-compiler/read.d.mts +127 -0
  351. package/foundation/doc-compiler/read.mjs +325 -0
  352. package/foundation/doc-compiler/read.test.mjs +313 -0
  353. package/foundation/doc-compiler/source.d.mts +33 -0
  354. package/foundation/doc-compiler/source.mjs +128 -0
  355. package/foundation/doc-compiler/tree.d.mts +288 -0
  356. package/foundation/doc-compiler/tree.mjs +876 -0
  357. package/foundation/doc-compiler/tree.test.mjs +598 -0
  358. package/foundation/fs/file-protection.d.mts +33 -0
  359. package/foundation/fs/file-protection.mjs +825 -0
  360. package/foundation/fs/file-protection.test.mjs +250 -0
  361. package/foundation/integrations/autolink.d.mts +58 -1
  362. package/foundation/integrations/autolink.mjs +143 -57
  363. package/foundation/integrations/autolink.test.mjs +1 -1
  364. package/foundation/integrations/cli-requirement.d.mts +45 -0
  365. package/foundation/integrations/cli-requirement.mjs +154 -0
  366. package/foundation/integrations/cli-requirement.test.mjs +84 -0
  367. package/foundation/integrations/contribution-fixes.d.mts +145 -0
  368. package/foundation/integrations/contribution-fixes.mjs +1284 -0
  369. package/foundation/integrations/contribution-inventory.d.mts +3 -2
  370. package/foundation/integrations/contribution-inventory.mjs +27 -24
  371. package/foundation/integrations/contribution-inventory.test.mjs +86 -27
  372. package/foundation/integrations/integration-warnings.d.mts +9 -2
  373. package/foundation/integrations/integration-warnings.mjs +51 -26
  374. package/foundation/integrations/integration-warnings.test.mjs +74 -1
  375. package/foundation/integrations/integrations.d.mts +3 -0
  376. package/foundation/integrations/integrations.mjs +11 -97
  377. package/foundation/integrations/provider-ledger.test.mjs +275 -0
  378. package/foundation/integrations/provider-resolution.d.mts +152 -0
  379. package/foundation/integrations/provider-resolution.mjs +576 -0
  380. package/foundation/integrations/provider-resolution.test.mjs +369 -0
  381. package/foundation/integrations/theme-descriptor.d.mts +8 -0
  382. package/foundation/integrations/theme-descriptor.mjs +44 -0
  383. package/foundation/integrations/validate-contributions.mjs +121 -29
  384. package/foundation/response/error-codes.d.mts +3 -1
  385. package/foundation/response/error-codes.d.ts +2 -0
  386. package/foundation/response/error-codes.doc.mjs +12 -2
  387. package/foundation/response/error-codes.mjs +7 -1
  388. package/foundation/response/error-codes.test.mjs +55 -11
  389. package/foundation/response/response-types.doc.d.mts +5 -1
  390. package/foundation/response/response-types.doc.mjs +20 -11
  391. package/foundation/response/response.doc.mjs +1 -1
  392. package/foundation/text/string-utils.d.mts +8 -0
  393. package/foundation/text/string-utils.mjs +40 -10
  394. package/foundation/xle/expand.mjs +1 -1
  395. package/foundation/xle/xle.test.mjs +13 -0
  396. package/package.json +10 -9
  397. package/assets/templates/themes/manifest.json +0 -95
@@ -12,7 +12,7 @@ export const doc = {
12
12
  type: 'enum',
13
13
  name: 'error-codes',
14
14
  displayName: 'Error Codes',
15
- namespace: 'cli',
15
+ namespace: 'cli/api',
16
16
  description:
17
17
  'Stable, append-only machine-readable error codes on the --json error envelope (envelope.code). Codes never change or get removed; branch on these, not on prose.',
18
18
  members: [
@@ -154,6 +154,16 @@ export const doc = {
154
154
  value: 'ERR_CODEMOD_FAILED',
155
155
  description: 'One or more codemods failed during an upgrade run.',
156
156
  },
157
+ {
158
+ value: 'ERR_CODEMOD_PROTECTED',
159
+ description:
160
+ 'A required codemod change remains blocked by a protected consumer file.',
161
+ },
162
+ {
163
+ value: 'ERR_CODEMOD_PROTECTION_SOURCE',
164
+ description:
165
+ 'A working-tree protection declaration could not be read or parsed.',
166
+ },
157
167
  {
158
168
  value: 'ERR_NOT_FOUND',
159
169
  description:
@@ -203,7 +213,7 @@ export const doc = {
203
213
  {
204
214
  value: 'ERR_THEME_INVALID',
205
215
  description:
206
- 'A theme definition or contributed theme catalog is invalid.',
216
+ 'A theme definition or contributed theme descriptor is invalid.',
207
217
  },
208
218
  {
209
219
  value: 'ERR_THEME_LOAD',
@@ -64,6 +64,8 @@
64
64
  * | 'ERR_UNKNOWN_FEATURE'
65
65
  * | 'ERR_UNKNOWN_CODEMOD'
66
66
  * | 'ERR_CODEMOD_FAILED'
67
+ * | 'ERR_CODEMOD_PROTECTED'
68
+ * | 'ERR_CODEMOD_PROTECTION_SOURCE'
67
69
  * | 'ERR_NOT_FOUND'
68
70
  * | 'ERR_NO_DOC'
69
71
  * | 'ERR_NO_SHOWCASE'
@@ -161,6 +163,10 @@ export const ERROR_CODES = Object.freeze({
161
163
  ERR_UNKNOWN_CODEMOD: 'ERR_UNKNOWN_CODEMOD',
162
164
  /** One or more codemods failed during an upgrade run. */
163
165
  ERR_CODEMOD_FAILED: 'ERR_CODEMOD_FAILED',
166
+ /** A required codemod change remains blocked by a protected consumer file. */
167
+ ERR_CODEMOD_PROTECTED: 'ERR_CODEMOD_PROTECTED',
168
+ /** A working-tree protection declaration could not be read or parsed. */
169
+ ERR_CODEMOD_PROTECTION_SOURCE: 'ERR_CODEMOD_PROTECTION_SOURCE',
164
170
  /** A generic discover/lookup query matched nothing in any package. */
165
171
  ERR_NOT_FOUND: 'ERR_NOT_FOUND',
166
172
 
@@ -185,7 +191,7 @@ export const ERROR_CODES = Object.freeze({
185
191
  ERR_WRITE_FAILED: 'ERR_WRITE_FAILED',
186
192
 
187
193
  // ── Theme build ──────────────────────────────────────────────────
188
- /** A theme definition or contributed theme catalog is invalid. */
194
+ /** A theme definition or contributed theme descriptor is invalid. */
189
195
  ERR_THEME_INVALID: 'ERR_THEME_INVALID',
190
196
  /** A theme file could not be loaded / parsed into a defineTheme result. */
191
197
  ERR_THEME_LOAD: 'ERR_THEME_LOAD',
@@ -86,6 +86,8 @@ describe('error codes: shipped set', () => {
86
86
  'ERR_AMBIGUOUS_TEMPLATE',
87
87
  'ERR_AMBIGUOUS_THEME',
88
88
  'ERR_CODEMOD_FAILED',
89
+ 'ERR_CODEMOD_PROTECTED',
90
+ 'ERR_CODEMOD_PROTECTION_SOURCE',
89
91
  'ERR_CORE_INCOMPATIBLE',
90
92
  'ERR_CORE_NOT_FOUND',
91
93
  'ERR_DEP_MISSING',
@@ -135,25 +137,67 @@ describe('error codes: shipped set', () => {
135
137
  ];
136
138
 
137
139
  it('still carries every shipped code, spelled the same', () => {
138
- const missing = SHIPPED.filter(code => !isErrorCode(code) || ERROR_CODES[code] !== code);
140
+ const missing = SHIPPED.filter(
141
+ code => !isErrorCode(code) || ERROR_CODES[code] !== code,
142
+ );
139
143
  expect(missing, 'shipped codes removed or respelled').toEqual([]);
140
144
  });
141
145
  });
142
146
 
143
147
  describe('error codes: end-to-end JSON envelopes', () => {
144
148
  const cases = [
145
- {name: 'unknown component', args: ['component', 'Bogus', '--json'], code: 'ERR_UNKNOWN_COMPONENT'},
146
- {name: 'unknown hook', args: ['hook', 'bogusHook', '--json'], code: 'ERR_UNKNOWN_HOOK'},
147
- {name: 'unknown topic', args: ['docs', 'bogusTopic', '--json'], code: 'ERR_UNKNOWN_TOPIC'},
148
- {name: 'unknown template', args: ['template', 'bogusTemplate', '--json'], code: 'ERR_UNKNOWN_TEMPLATE'},
149
- {name: 'unknown command', args: ['bogus-cmd', '--json'], code: 'ERR_UNKNOWN_COMMAND'},
150
- {name: 'invalid --lang', args: ['docs', 'color', '--lang', 'fr', '--json'], code: 'ERR_INVALID_LANG'},
151
- {name: 'invalid --detail', args: ['docs', 'color', '--detail', 'bogus', '--json'], code: 'ERR_INVALID_DETAIL'},
152
- {name: 'unknown option', args: ['component', 'Button', '--bogus-flag', '--json'], code: 'ERR_INVALID_OPTION'},
153
- {name: 'missing argument', args: ['theme', 'build', '--json'], code: 'ERR_MISSING_ARGUMENT'},
149
+ {
150
+ name: 'unknown component',
151
+ args: ['component', 'Bogus', '--json'],
152
+ code: 'ERR_UNKNOWN_COMPONENT',
153
+ },
154
+ {
155
+ name: 'unknown hook',
156
+ args: ['hook', 'bogusHook', '--json'],
157
+ code: 'ERR_UNKNOWN_HOOK',
158
+ },
159
+ {
160
+ name: 'unknown topic',
161
+ args: ['docs', 'bogusTopic', '--json'],
162
+ code: 'ERR_UNKNOWN_TOPIC',
163
+ },
164
+ {
165
+ name: 'unknown template',
166
+ args: ['template', 'bogusTemplate', '--json'],
167
+ code: 'ERR_UNKNOWN_TEMPLATE',
168
+ },
169
+ {
170
+ name: 'unknown command',
171
+ args: ['bogus-cmd', '--json'],
172
+ code: 'ERR_UNKNOWN_COMMAND',
173
+ },
174
+ {
175
+ name: 'invalid --lang',
176
+ args: ['docs', 'color', '--lang', 'fr', '--json'],
177
+ code: 'ERR_INVALID_LANG',
178
+ },
179
+ {
180
+ name: 'invalid --detail',
181
+ args: ['docs', 'color', '--detail', 'bogus', '--json'],
182
+ code: 'ERR_INVALID_DETAIL',
183
+ },
184
+ {
185
+ name: 'unknown option',
186
+ args: ['component', 'Button', '--bogus-flag', '--json'],
187
+ code: 'ERR_INVALID_OPTION',
188
+ },
189
+ {
190
+ name: 'missing argument',
191
+ args: ['theme', 'build', '--json'],
192
+ code: 'ERR_MISSING_ARGUMENT',
193
+ },
154
194
  // `theme` is not on the --json allowlist, so --json on any theme subcommand
155
195
  // is rejected at the preAction gate with a stable invalid-option code.
156
- {name: 'json not supported', args: ['theme', 'bogus-sub', '--json'], code: 'ERR_INVALID_OPTION'},
196
+ {
197
+ name: 'json not supported',
198
+ args: ['theme', 'bogus-sub', '--json'],
199
+ code: 'ERR_INVALID_OPTION',
200
+ },
157
201
  ];
158
202
 
159
203
  for (const {name, args, code} of cases) {
@@ -5,7 +5,11 @@
5
5
  * @file EnumDoc for the `type` discriminant carried on every --json success
6
6
  * envelope. The vocabulary mirrors the RESPONSE_TYPES map (each command's
7
7
  * `jsonOut(...)` call sites) in `clients/cli/lib/manifest.mjs`; a consumer
8
- * switches on `type` to narrow the `data` payload.
8
+ * switches on `type` to narrow the `data` payload. Descriptions follow the
9
+ * currently published response projection, not a future package-version boundary.
10
+ *
11
+ * @input Public response discriminants and their currently released payloads.
12
+ * @output Generated consumer reference for every typed JSON success response.
9
13
  * @position packages/cli/foundation/response — enum documentation
10
14
  */
11
15
  /** @type {import('@astryxdesign/cli/authoring').EnumDoc} */
@@ -4,7 +4,11 @@
4
4
  * @file EnumDoc for the `type` discriminant carried on every --json success
5
5
  * envelope. The vocabulary mirrors the RESPONSE_TYPES map (each command's
6
6
  * `jsonOut(...)` call sites) in `clients/cli/lib/manifest.mjs`; a consumer
7
- * switches on `type` to narrow the `data` payload.
7
+ * switches on `type` to narrow the `data` payload. Descriptions follow the
8
+ * currently published response projection, not a future package-version boundary.
9
+ *
10
+ * @input Public response discriminants and their currently released payloads.
11
+ * @output Generated consumer reference for every typed JSON success response.
8
12
  * @position packages/cli/foundation/response — enum documentation
9
13
  */
10
14
 
@@ -13,7 +17,7 @@ export const doc = {
13
17
  type: 'enum',
14
18
  name: 'response-types',
15
19
  displayName: 'Response Types',
16
- namespace: 'cli',
20
+ namespace: 'cli/api',
17
21
  description:
18
22
  'The `type` discriminant present on every --json success envelope. Consumers switch on it to narrow `data`.',
19
23
  members: [
@@ -61,22 +65,27 @@ export const doc = {
61
65
  {
62
66
  value: 'docs.list',
63
67
  description:
64
- 'All reference-doc topics as DocsListEntry[] ({topic, description}), in discovery order.',
68
+ "All reference-doc topics as DocsListEntry[] ({topic, description, package, replaces?}), in read order; meta.namespaces lists the docs tree's top-level namespaces, and meta.notLoaded each package whose docs did not load.",
65
69
  },
66
70
  {
67
71
  value: 'docs.detail',
68
72
  description:
69
- "One topic's full ReferenceDoc, with token-ref blocks inlined.",
73
+ "One topic's full ReferenceDoc (the JSON read of a topic, --full, --dense, or a topic with one section), with token-ref blocks inlined, plus links ({up, previous, next}: the commands that open the level it sits in and its neighbors there).",
70
74
  },
71
75
  {
72
76
  value: 'docs.index',
73
77
  description:
74
- "One topic's section index (--index): the topic's name, title, and description, plus sections, each {id, title, summary} (pass the id as the section argument; summary is the section's one-line summary).",
78
+ "One topic's section index, the text read of a topic with more than one section (and --index): the topic's name, title, and description, plus sections, each {id, title, summary} (pass the id as the section argument; summary is the section's one-line summary), and links ({up, previous, next}: the commands that open the level it sits in and its neighbors there).",
75
79
  },
76
80
  {
77
81
  value: 'docs.detail.section',
78
82
  description:
79
- 'One ReferenceSection of a topic, found by key or title, with token-ref blocks inlined.',
83
+ 'One ReferenceSection of a topic, found by key or title, with token-ref blocks inlined, plus links ({up, previous, next}: the commands that open its topic index and the sections before and after it).',
84
+ },
85
+ {
86
+ value: 'docs.node',
87
+ description:
88
+ "One node of the docs tree, read by its route: its id, kind, package, title, summary, and breadcrumb, plus a namespace's slots with their children (one level down) or a typed doc's content, and links ({up, previous, next, related}: the commands that open its parent, its neighbors, and the docs it names).",
80
89
  },
81
90
 
82
91
  // blog (read from the published RSS feed)
@@ -116,7 +125,7 @@ export const doc = {
116
125
  {
117
126
  value: 'search',
118
127
  description:
119
- 'The echoed query, `matchCount` (total matches, before `limit`), and results, a ranked SearchResultEntry[] bounded by `limit`: each {domain, name, score, reason, description, command}, plus import (components, hooks), title (docs), or displayName and kind (templates).',
128
+ 'The echoed query, `matchCount` (total matches, before `limit`), and results, a ranked SearchResultEntry[] bounded by `limit`: each {domain, name, score, reason, description, command}, plus import (components, hooks), title, parent (the command that opens the level above), package (for a docs-tree hit), and, for a hit on one section, section (docs), or displayName and kind (templates).',
120
129
  },
121
130
 
122
131
  // build
@@ -128,7 +137,7 @@ export const doc = {
128
137
  {
129
138
  value: 'build.kit',
130
139
  description:
131
- 'The composition kit: echoed query, hasResults, matchCount (total matched, never a cap), directMatch, pages (closest templates), blocks (drop-in patterns) and domain (idea components/hooks) as SearchResultEntry[], frame and foundation name arrays, and hint {reason, commands} when thin.',
140
+ "The template to start from and its kit: query, hasResults, matchCount (never a cap), directMatch, start {name, command, basis, reason, alternatives, ...}, pages (search's closest templates), blocks and domain as SearchResultEntry[], frame, foundation, and hint {reason, commands} when thin.",
132
141
  },
133
142
 
134
143
  // swizzle
@@ -158,7 +167,7 @@ export const doc = {
158
167
  {
159
168
  value: 'template.list',
160
169
  description:
161
- 'Every discovered template (page + block); each entry carries id, name, description, kind, owning package, optional category and componentsUsed, and readiness flags.',
170
+ 'The effective discovered TemplateListEntry[] for pages and blocks. A winning replacement entry includes optional `replaces`, naming the Core id omitted from the default list.',
162
171
  },
163
172
  {
164
173
  value: 'template.show',
@@ -286,7 +295,7 @@ export const doc = {
286
295
  {
287
296
  value: 'integration.template-conflicts',
288
297
  description:
289
- 'The integration identity, structural issues, and non-blocking conflicts where an integration template id is also owned by Core; each conflict includes the exact package-qualified command.',
298
+ 'The integration identity, structural issues, and non-blocking Core template-id conflicts as {id, severity: warning, integrationPackage, integrationType, integrationName, coreMatches, message, command}.',
290
299
  },
291
300
  {
292
301
  value: 'integration.component-conflicts',
@@ -296,7 +305,7 @@ export const doc = {
296
305
  {
297
306
  value: 'integration.doc-conflicts',
298
307
  description:
299
- 'The integration identity, structural issues, and Core doc overlaps classified as intentional replacements, intentional extensions, or accidental same-name conflicts.',
308
+ 'The integration identity, structural issues, and Core doc overlaps. Each finding includes `severity` (`info` | `error`) and `relationship` (`replaces` | `extends` | `accidental`).',
300
309
  },
301
310
 
302
311
  // layout (XLE/XLO)
@@ -12,7 +12,7 @@ export const doc = {
12
12
  type: 'schema',
13
13
  name: 'output',
14
14
  displayName: 'Output Envelope',
15
- namespace: 'cli',
15
+ namespace: 'cli/api',
16
16
  description:
17
17
  'The single JSON envelope every command emits under --json. Success is ' +
18
18
  '{ apiVersion, type, data, meta? }; failure is { apiVersion, error, code, ' +
@@ -40,4 +40,12 @@ export function searchComponents(needle: string, coreDir: string, components: Re
40
40
  score: number;
41
41
  reason: string;
42
42
  }[]>;
43
+ /**
44
+ * The first sentence of a text, whitespace collapsed. A period after "e.g" or
45
+ * "i.e" does not end the sentence. Used where a description has to fit on one
46
+ * line: `build`'s alternatives and its text kit.
47
+ * @param {string} text
48
+ * @returns {string}
49
+ */
50
+ export function firstSentence(text: string): string;
43
51
  export { levenshteinDistance } from "./levenshtein.mjs";
@@ -56,7 +56,7 @@ export function findClosestComponents(name, components, maxDistance = 3) {
56
56
  * @returns {Promise<{name: string, score: number, reason: string}[]>}
57
57
  */
58
58
  export async function searchComponents(needle, coreDir, components) {
59
- const {pathToFileURL} = await import('node:url');
59
+ const {readDocView} = await import('../doc-compiler/read.mjs');
60
60
  const fs = await import('node:fs');
61
61
  const path = await import('node:path');
62
62
 
@@ -100,8 +100,10 @@ export async function searchComponents(needle, coreDir, components) {
100
100
  // Levenshtein on name
101
101
  const dist = levenshteinDistance(term, compLower);
102
102
  if (dist === 1) addMatch(comp, 80, 'similar name (distance ' + dist + ')');
103
- else if (dist === 2) addMatch(comp, 40, 'similar name (distance ' + dist + ')');
104
- else if (dist === 3) addMatch(comp, 20, 'similar name (distance ' + dist + ')');
103
+ else if (dist === 2)
104
+ addMatch(comp, 40, 'similar name (distance ' + dist + ')');
105
+ else if (dist === 3)
106
+ addMatch(comp, 20, 'similar name (distance ' + dist + ')');
105
107
  }
106
108
 
107
109
  // --- Pass 2: Keyword + description matching (async, reads doc files) ---
@@ -124,15 +126,22 @@ export async function searchComponents(needle, coreDir, components) {
124
126
  for (const entry of entries) {
125
127
  if (!entry.isDirectory()) continue;
126
128
  const nested = path.join(srcDir, entry.name, comp, comp + '.doc.mjs');
127
- if (fs.existsSync(nested)) { docPath = nested; break; }
129
+ if (fs.existsSync(nested)) {
130
+ docPath = nested;
131
+ break;
132
+ }
128
133
  }
129
134
  }
130
135
 
131
136
  if (!docPath) continue;
132
137
 
133
138
  try {
134
- const mod = await import(pathToFileURL(docPath).href);
135
- const docs = mod.docs;
139
+ // Only the legacy `docs` export has ever been indexed here.
140
+ const docs = await readDocView(docPath, {
141
+ root: 'components',
142
+ loader: 'native',
143
+ exports: ['docs'],
144
+ });
136
145
  if (!docs) continue;
137
146
 
138
147
  // Keyword matching
@@ -157,8 +166,10 @@ export async function searchComponents(needle, coreDir, components) {
157
166
  }
158
167
 
159
168
  const dist = levenshteinDistance(term, kwLower);
160
- if (dist === 1) addMatch(comp, 70, 'keyword "' + kw + '" (distance ' + dist + ')');
161
- else if (dist === 2) addMatch(comp, 30, 'keyword "' + kw + '" (distance ' + dist + ')');
169
+ if (dist === 1)
170
+ addMatch(comp, 70, 'keyword "' + kw + '" (distance ' + dist + ')');
171
+ else if (dist === 2)
172
+ addMatch(comp, 30, 'keyword "' + kw + '" (distance ' + dist + ')');
162
173
  }
163
174
  }
164
175
 
@@ -191,8 +202,27 @@ export async function searchComponents(needle, coreDir, components) {
191
202
  }
192
203
  }
193
204
 
194
- const results = Array.from(scored.values())
195
- .sort((a, b) => b.score - a.score || a.name.localeCompare(b.name));
205
+ const results = Array.from(scored.values()).sort(
206
+ (a, b) => b.score - a.score || a.name.localeCompare(b.name),
207
+ );
196
208
 
197
209
  return results;
198
210
  }
211
+
212
+ /**
213
+ * The first sentence of a text, whitespace collapsed. A period after "e.g" or
214
+ * "i.e" does not end the sentence. Used where a description has to fit on one
215
+ * line: `build`'s alternatives and its text kit.
216
+ * @param {string} text
217
+ * @returns {string}
218
+ */
219
+ export function firstSentence(text) {
220
+ const flat = String(text ?? '').replace(/\s+/g, ' ').trim();
221
+ const ends = /[.!?](?=\s|$)/g;
222
+ for (let m = ends.exec(flat); m; m = ends.exec(flat)) {
223
+ if (!/\b(e\.g|i\.e)$/i.test(flat.slice(0, m.index))) {
224
+ return flat.slice(0, m.index + 1);
225
+ }
226
+ }
227
+ return flat;
228
+ }
@@ -545,7 +545,7 @@ class Emitter {
545
545
  const flags = hint.flags.length > 0 ? ` (+${hint.flags.join(' +')})` : '';
546
546
  const arg = hint.arg ? `:${hint.arg}` : '';
547
547
  return [
548
- `${pad}{/* TODO(xle): content block '${hint.block.name}'${flags}${arg} — scaffold it with: astryx template ${hint.block.name} */}`,
548
+ `${pad}{/* TODO(xle): content block '${hint.block.name}'${flags}${arg} — scaffold it with: astryx template ${hint.block.name} --type block */}`,
549
549
  ];
550
550
  }
551
551
  this.todos.push(`unresolved hint {${hint.name}}`);
@@ -10,6 +10,7 @@ import {describe, it, expect} from 'vitest';
10
10
  import {parse, parseCompact, parseOutline, detectForm, XLEParseError} from './parse.mjs';
11
11
  import {toCompact, toOutline} from './print.mjs';
12
12
  import {validate} from './validate.mjs';
13
+ import {expand} from './expand.mjs';
13
14
  import {parseEnumValues, SPACING_STEPS} from './registry.mjs';
14
15
 
15
16
  // ─── parser: compact ───────────────────────────────────────────────────────
@@ -309,6 +310,18 @@ describe('validate', () => {
309
310
  expect(doc.roots[0].hint.block.name).toBe('CardCallout');
310
311
  });
311
312
 
313
+ it('includes --type block when a known block source is unavailable', () => {
314
+ const doc = parse('Bx{card-callout}');
315
+ expect(validate(doc, registry, BLOCKS).errors).toEqual([]);
316
+ const result = expand(doc, registry, {
317
+ componentName: 'Demo',
318
+ blockModules: new Map(),
319
+ });
320
+ expect(result.code).toContain(
321
+ 'astryx template CardCallout --type block',
322
+ );
323
+ });
324
+
312
325
  it('enforces structural pairings', () => {
313
326
  const doc = parse('Bx > Sh');
314
327
  const {errors} = validate(doc, registry, BLOCKS);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astryxdesign/cli",
3
- "version": "0.6.3-canary.db4e378",
3
+ "version": "0.6.3-canary.db52d98",
4
4
  "displayName": "CLI",
5
5
  "description": "Scaffold projects, browse templates, generate themes, and get agent-ready docs from the command line.",
6
6
  "author": "Meta Open Source",
@@ -91,6 +91,7 @@
91
91
  "@babel/types": "7.29.8",
92
92
  "ast-types": "0.16.3",
93
93
  "commander": "^12.1.0",
94
+ "ignore": "^7.0.5",
94
95
  "jiti": "^2.7.0",
95
96
  "jscodeshift": "^17.3.0",
96
97
  "node-diff3": "3.2.1",
@@ -100,10 +101,10 @@
100
101
  "zod": "^4.4.3"
101
102
  },
102
103
  "peerDependencies": {
103
- "@astryxdesign/charts": "0.6.3-canary.db4e378",
104
- "@astryxdesign/core": "0.6.3-canary.db4e378",
105
- "@astryxdesign/lab": "0.6.3-canary.db4e378",
106
- "@astryxdesign/theme-neutral": "0.6.3-canary.db4e378"
104
+ "@astryxdesign/charts": "0.6.3-canary.db52d98",
105
+ "@astryxdesign/core": "0.6.3-canary.db52d98",
106
+ "@astryxdesign/lab": "0.6.3-canary.db52d98",
107
+ "@astryxdesign/theme-neutral": "0.6.3-canary.db52d98"
107
108
  },
108
109
  "peerDependenciesMeta": {
109
110
  "@astryxdesign/charts": {
@@ -120,10 +121,10 @@
120
121
  }
121
122
  },
122
123
  "devDependencies": {
123
- "@astryxdesign/charts": "0.6.3-canary.db4e378",
124
- "@astryxdesign/core": "0.6.3-canary.db4e378",
125
- "@astryxdesign/lab": "0.6.3-canary.db4e378",
126
- "@astryxdesign/theme-neutral": "0.6.3-canary.db4e378",
124
+ "@astryxdesign/charts": "0.6.3-canary.db52d98",
125
+ "@astryxdesign/core": "0.6.3-canary.db52d98",
126
+ "@astryxdesign/lab": "0.6.3-canary.db52d98",
127
+ "@astryxdesign/theme-neutral": "0.6.3-canary.db52d98",
127
128
  "@heroicons/react": "^2.2.0",
128
129
  "@stylexjs/stylex": "^0.19.0",
129
130
  "@types/babel__core": "^7.20.5",
@@ -1,95 +0,0 @@
1
- {
2
- "version": 1,
3
- "generatedBy": "scripts/generate-cli-themes.mjs",
4
- "themes": [
5
- {
6
- "slug": "butter",
7
- "displayName": "Butter",
8
- "description": "Warm, creamy yellows with a friendly blue accent. Playful enough for consumer surfaces, soft enough to stay readable.",
9
- "maintained": false,
10
- "entry": "butterTheme.ts",
11
- "exportName": "butterTheme",
12
- "files": [
13
- "butterTheme.ts",
14
- "icons.tsx"
15
- ]
16
- },
17
- {
18
- "slug": "chocolate",
19
- "displayName": "Chocolate",
20
- "description": "Warm chocolate theme for Astryx — rich brown palette with Fraunces headings, Albert Sans body, and Lucide icons",
21
- "maintained": false,
22
- "entry": "chocolateTheme.ts",
23
- "exportName": "chocolateTheme",
24
- "files": [
25
- "chocolateTheme.ts",
26
- "icons.tsx"
27
- ]
28
- },
29
- {
30
- "slug": "gothic",
31
- "displayName": "Gothic",
32
- "description": "Deep blue-grays and a signature display serif. Dramatic and editorial, for surfaces that want to be remembered.",
33
- "maintained": false,
34
- "entry": "gothicTheme.ts",
35
- "exportName": "gothicTheme",
36
- "files": [
37
- "gothicTheme.ts",
38
- "icons.tsx"
39
- ]
40
- },
41
- {
42
- "slug": "matcha",
43
- "displayName": "Matcha",
44
- "description": "Earthy greens with a calm, organic feel. Naturalistic and grounded, great for wellness or content-first apps.",
45
- "maintained": false,
46
- "entry": "matchaTheme.ts",
47
- "exportName": "matchaTheme",
48
- "files": [
49
- "matchaTheme.ts",
50
- "icons.tsx"
51
- ]
52
- },
53
- {
54
- "slug": "neutral",
55
- "displayName": "Neutral",
56
- "description": "Restrained warm grays. Minimal and quiet, so the content stays the focus.",
57
- "maintained": true,
58
- "entry": "neutralTheme.ts",
59
- "exportName": "neutralTheme",
60
- "files": [
61
- "neutralTheme.ts",
62
- "icons.tsx",
63
- "neutralPalettes.ts",
64
- "neutralPalettes.generated.ts",
65
- "neutralPaletteRefs.generated.ts",
66
- "neutralPalettes.generated.receipt.json",
67
- "palette.config.json"
68
- ]
69
- },
70
- {
71
- "slug": "stone",
72
- "displayName": "Stone",
73
- "description": "Warm stone and slate, earthy and understated, with just enough character to feel handcrafted.",
74
- "maintained": false,
75
- "entry": "stoneTheme.ts",
76
- "exportName": "stoneTheme",
77
- "files": [
78
- "stoneTheme.ts",
79
- "icons.tsx"
80
- ]
81
- },
82
- {
83
- "slug": "y2k",
84
- "displayName": "Y2K",
85
- "description": "Hot pinks, lime greens, and Poppins. Bubbly, playful, and unmistakably retro.",
86
- "maintained": false,
87
- "entry": "y2kTheme.ts",
88
- "exportName": "y2kTheme",
89
- "files": [
90
- "y2kTheme.ts",
91
- "icons.tsx"
92
- ]
93
- }
94
- ]
95
- }