@astryxdesign/cli 0.7.18-canary.g6dfc0b6 → 0.7.18-canary.g855cc07

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 (381) hide show
  1. package/CHANGELOG.md +19 -19
  2. package/README.md +19 -19
  3. package/api/component/_adapter.d.mts +2 -1
  4. package/api/component/_adapter.mjs +2 -1
  5. package/api/docs/_adapter.d.mts +25 -7
  6. package/api/docs/_adapter.mjs +102 -10
  7. package/api/doctor/_adapter.d.mts +6 -3
  8. package/api/doctor/_adapter.mjs +13 -5
  9. package/api/doctor/doctor.mjs +3 -3
  10. package/api/doctor/font-packages.d.mts +36 -0
  11. package/api/doctor/font-packages.mjs +124 -0
  12. package/api/doctor/theme-checks.mjs +110 -49
  13. package/api/experimental.d.mts +0 -2
  14. package/api/experimental.mjs +0 -12
  15. package/api/icon/_adapter.d.mts +9 -1
  16. package/api/icon/_adapter.mjs +22 -1
  17. package/api/icon/_authoring.mjs +16 -7
  18. package/api/icon/_default-look.mjs +4 -4
  19. package/api/icon/add/add.mjs +11 -6
  20. package/api/icon/exportIconIndex.doc.mjs +2 -2
  21. package/api/icon/icon.doc.mjs +7 -7
  22. package/api/icon/icon.type.d.mts +37 -33
  23. package/api/icon/icon.type.mjs +46 -45
  24. package/api/icon/iconAdd.doc.mjs +9 -10
  25. package/api/icon/iconMap.doc.mjs +11 -12
  26. package/api/icon/iconNewDefinition.doc.mjs +8 -8
  27. package/api/icon/iconNewSet.doc.mjs +5 -5
  28. package/api/icon/map/map.mjs +7 -7
  29. package/api/icon/search/icon-index.mjs +16 -3
  30. package/api/icon/search/search.d.mts +11 -4
  31. package/api/icon/search/search.mjs +33 -12
  32. package/api/init/run/run.mjs +0 -1
  33. package/api/integration/add-helpers.mjs +1 -1
  34. package/api/integration/pack-check.d.mts +2 -2
  35. package/api/integration/pack-check.mjs +2 -2
  36. package/api/integration/validate-integration.type.d.mts +6 -6
  37. package/api/integration/validate-integration.type.mjs +6 -6
  38. package/api/render/_adapter.d.mts +5 -3
  39. package/api/render/_adapter.mjs +64 -4
  40. package/api/render/render.doc.mjs +9 -2
  41. package/api/render/render.mjs +5 -2
  42. package/api/render/render.type.d.mts +17 -0
  43. package/api/render/render.type.mjs +10 -0
  44. package/api/search/ORDERING.md +1 -1
  45. package/api/search/_adapter.mjs +4 -0
  46. package/api/search/_candidate-score.mjs +20 -0
  47. package/api/search/_icons.d.mts +4 -2
  48. package/api/search/_icons.mjs +4 -2
  49. package/api/search/_words.d.mts +8 -0
  50. package/api/search/_words.mjs +15 -0
  51. package/api/template/template.type.d.mts +2 -2
  52. package/api/template/template.type.mjs +2 -2
  53. package/api/theme/_adapter.mjs +19 -11
  54. package/api/theme/build/build.d.mts +24 -56
  55. package/api/theme/build/build.mjs +202 -200
  56. package/api/theme/build/font-warning.d.mts +19 -2
  57. package/api/theme/build/font-warning.mjs +46 -5
  58. package/api/theme/generateTonalPalette.doc.mjs +1 -1
  59. package/api/theme/palette/generate/derive-look.mjs +108 -37
  60. package/api/theme/palette/generate/mapping.mjs +2 -0
  61. package/api/theme/template/template.d.mts +0 -17
  62. package/api/theme/template/template.mjs +1 -42
  63. package/api/theme/theme.type.d.mts +5 -4
  64. package/api/theme/theme.type.mjs +5 -4
  65. package/api/theme/themePaletteGenerate.doc.mjs +1 -1
  66. package/api/theme/themeRemove.doc.mjs +1 -1
  67. package/assets/codemods/transforms/v0.7.0/preserve-bottom-sheet-content-padding.mjs +3 -1
  68. package/assets/component-list.generated.json +1 -1
  69. package/assets/discover/official-packages.json +26 -2
  70. package/assets/docs/author-a-theme.doc.mjs +6 -5
  71. package/assets/docs/browser-support.doc.mjs +1 -0
  72. package/assets/docs/icons.doc.mjs +15 -13
  73. package/assets/docs/motion.doc.mjs +46 -0
  74. package/assets/docs/theme.doc.dense.mjs +6 -7
  75. package/assets/docs/theme.doc.mjs +6 -6
  76. package/assets/docs/theme.doc.zh.mjs +6 -6
  77. package/assets/docs/tree/ci-and-containers.doc.mjs +1 -1
  78. package/assets/docs/tree/data-colors-in-renderers.doc.mjs +400 -0
  79. package/assets/docs/tree/font-setup.doc.mjs +30 -0
  80. package/assets/docs/tree/icon-sets.doc.mjs +2 -2
  81. package/assets/docs/tree/share-a-page.doc.mjs +1 -1
  82. package/assets/docs/tree/template-icons.doc.mjs +3 -3
  83. package/assets/docs/tree/tokens-color.doc.mjs +5 -0
  84. package/assets/docs/tree/tokens.doc.mjs +4 -3
  85. package/assets/docs/tree/updates.doc.mjs +1 -1
  86. package/assets/docs/tree/visualization.doc.mjs +30 -0
  87. package/assets/docs-routes.generated.json +1 -1
  88. package/assets/docs.generated.json +2 -2
  89. package/assets/icons/definitions/drag.doc.mjs +1 -0
  90. package/assets/search-catalog.generated.json +2 -2
  91. package/assets/self-audit.generated.json +1 -1
  92. package/assets/templates/blocks/components/Card/SelectableCardElevated.doc.mjs +1 -1
  93. package/assets/templates/blocks/components/Card/SelectableCardElevated.tsx +20 -10
  94. package/assets/templates/blocks/components/Card/SelectableCardShowcase.doc.mjs +1 -1
  95. package/assets/templates/blocks/components/Card/SelectableCardShowcase.tsx +36 -16
  96. package/assets/templates/blocks/components/ChatComposerInput/ChatComposerInputMentionTrigger.tsx +6 -0
  97. package/assets/templates/blocks/components/ChatComposerInput/ChatComposerInputMultipleTriggers.tsx +6 -0
  98. package/assets/templates/blocks/components/Hooks/useIndicatorFocusRingHookUsage.doc.mjs +14 -0
  99. package/assets/templates/blocks/components/Hooks/useIndicatorFocusRingHookUsage.tsx +63 -0
  100. package/assets/templates/blocks/components/Hooks/useLongPressHookUsage.doc.mjs +29 -0
  101. package/assets/templates/blocks/components/Hooks/useLongPressHookUsage.tsx +237 -0
  102. package/assets/templates/blocks/components/SideNav/SideNavShowcase.tsx +18 -72
  103. package/assets/templates/blocks/components/SideNav/SideNavWithHeaderMenu.doc.mjs +1 -1
  104. package/assets/templates/blocks/components/SideNav/SideNavWithHeaderMenu.tsx +7 -7
  105. package/assets/templates/blocks/components/SideNavCollapseButton/SideNavCollapseButtonShowcase.doc.mjs +9 -2
  106. package/assets/templates/blocks/components/SideNavHeading/SideNavHeadingShowcase.doc.mjs +3 -2
  107. package/assets/templates/blocks/components/SideNavHeading/SideNavHeadingShowcase.tsx +2 -1
  108. package/assets/templates/blocks/components/SideNavItem/SideNavItemShowcase.doc.mjs +3 -2
  109. package/assets/templates/blocks/components/SideNavSection/SideNavSectionShowcase.doc.mjs +2 -1
  110. package/assets/templates/blocks/components/Table/TableCustomRowTable.doc.mjs +14 -0
  111. package/assets/templates/blocks/components/Table/TableCustomRowTable.tsx +96 -0
  112. package/assets/templates/components.generated.json +1 -1
  113. package/assets/templates/pages/ai-chat-landing/page.tsx +4 -0
  114. package/assets/templates/pages/dashboard-scorecard/page.tsx +26 -7
  115. package/assets/templates/pages/editor/page.tsx +13 -3
  116. package/assets/templates/themes/butter/butterPaletteRefs.generated.ts +2 -2
  117. package/assets/templates/themes/butter/butterTheme.ts +12 -10
  118. package/assets/templates/themes/butter/icons.tsx +2 -0
  119. package/assets/templates/themes/chocolate/chocolateTheme.ts +1 -0
  120. package/assets/templates/themes/chocolate/icons.tsx +2 -0
  121. package/assets/templates/themes/gothic/gothicPaletteRefs.generated.ts +1 -1
  122. package/assets/templates/themes/gothic/gothicTheme.ts +1 -0
  123. package/assets/templates/themes/gothic/icons.tsx +2 -0
  124. package/assets/templates/themes/matcha/icons.tsx +2 -0
  125. package/assets/templates/themes/matcha/matchaPaletteRefs.generated.ts +2 -2
  126. package/assets/templates/themes/matcha/matchaTheme.ts +1 -0
  127. package/assets/templates/themes/neutral/icons.tsx +2 -0
  128. package/assets/templates/themes/neutral/neutralPaletteRefs.generated.ts +2 -2
  129. package/assets/templates/themes/neutral/neutralTheme.ts +1 -0
  130. package/assets/templates/themes/stone/icons.tsx +2 -0
  131. package/assets/templates/themes/stone/stonePaletteRefs.generated.ts +1 -1
  132. package/assets/templates/themes/stone/stoneTheme.ts +1 -0
  133. package/assets/templates/themes/y2k/icons.tsx +2 -0
  134. package/assets/templates/themes/y2k/y2kTheme.ts +1 -0
  135. package/assets/theme.template.ts +9 -5
  136. package/authoring/doctypes/base/type.ts +2 -3
  137. package/authoring/doctypes/component/component.doc.mjs +1 -1
  138. package/authoring/doctypes/icon-definition/parse.mjs +2 -2
  139. package/authoring/doctypes/icon-set/icon-names.mjs +1 -0
  140. package/authoring/doctypes/icon-set/parse.mjs +1 -1
  141. package/authoring/doctypes/template/parse.mjs +1 -4
  142. package/authoring/integration/integration.doc.mjs +1 -1
  143. package/authoring/integration/type.ts +1 -1
  144. package/clients/cli/build-id.generated.json +1 -1
  145. package/clients/cli/commands/doctor.mjs +2 -2
  146. package/clients/cli/commands/experimental/export.mjs +2 -1
  147. package/clients/cli/commands/experimental/icon.mjs +10 -10
  148. package/clients/cli/commands/experimental/index.mjs +0 -5
  149. package/clients/cli/commands/experimental/render-output.mjs +9 -0
  150. package/clients/cli/commands/experimental-export.doc.mjs +6 -0
  151. package/clients/cli/commands/experimental-icon-add.doc.mjs +8 -8
  152. package/clients/cli/commands/experimental-icon-map.doc.mjs +6 -6
  153. package/clients/cli/commands/experimental-icon-new-definition.doc.mjs +6 -6
  154. package/clients/cli/commands/experimental-icon-new-set.doc.mjs +3 -3
  155. package/clients/cli/commands/experimental-icon-use.doc.mjs +1 -1
  156. package/clients/cli/commands/experimental-icon.doc.mjs +6 -6
  157. package/clients/cli/commands/experimental.doc.mjs +2 -6
  158. package/clients/cli/commands/theme-build.doc.mjs +8 -1
  159. package/clients/cli/commands/theme-palette-generate.doc.mjs +1 -1
  160. package/clients/cli/commands/theme-remove.doc.mjs +1 -1
  161. package/clients/cli/commands/theme.doc.mjs +1 -11
  162. package/clients/cli/commands/theme.mjs +110 -475
  163. package/clients/cli/commands.generated.json +1 -1
  164. package/clients/cli/index.mjs +4 -34
  165. package/clients/cli/lib/base-gate.mjs +2 -3
  166. package/clients/cli/lib/cli-error.mjs +8 -72
  167. package/clients/cli/lib/define-command.mjs +0 -19
  168. package/clients/cli/lib/json-shim.mjs +11 -633
  169. package/clients/cli/lib/manifest.mjs +0 -4
  170. package/clients/cli/lib/stray-option.mjs +1 -2
  171. package/clients/cli/manifest.generated.json +1 -1
  172. package/foundation/agent-docs/agent-docs.mjs +1 -1
  173. package/foundation/color/css-color.mjs +2 -3
  174. package/foundation/discovery/app-layout.d.mts +13 -0
  175. package/foundation/discovery/app-layout.mjs +35 -0
  176. package/foundation/discovery/cli-self-docs.mjs +4 -4
  177. package/foundation/discovery/fixture-refs.d.mts +51 -0
  178. package/foundation/discovery/fixture-refs.mjs +351 -0
  179. package/foundation/discovery/icon-definition-discovery.mjs +7 -7
  180. package/foundation/discovery/icon-ranking.d.mts +5 -2
  181. package/foundation/discovery/icon-ranking.mjs +103 -20
  182. package/foundation/discovery/icon-set-checks.mjs +5 -5
  183. package/foundation/discovery/icon-set-discovery.mjs +2 -2
  184. package/foundation/discovery/icon-set-writer.d.mts +24 -7
  185. package/foundation/discovery/icon-set-writer.mjs +76 -32
  186. package/foundation/discovery/static-descriptor.d.mts +49 -0
  187. package/foundation/discovery/static-descriptor.mjs +548 -0
  188. package/foundation/discovery/template-adapter.d.mts +0 -47
  189. package/foundation/discovery/template-adapter.mjs +1 -333
  190. package/foundation/discovery/template-icon-notes.mjs +3 -3
  191. package/foundation/discovery/template-icons.mjs +2 -2
  192. package/foundation/discovery/template-placeholders.mjs +1 -1
  193. package/foundation/discovery/theme-discovery.d.mts +6 -47
  194. package/foundation/discovery/theme-discovery.mjs +15 -537
  195. package/foundation/doc-compiler/bundle.mjs +2 -2
  196. package/foundation/doc-compiler/import.mjs +1 -1
  197. package/foundation/env/user-dirs.d.mts +5 -2
  198. package/foundation/env/user-dirs.mjs +12 -5
  199. package/foundation/fonts/next-font.d.mts +26 -0
  200. package/foundation/fonts/next-font.mjs +149 -0
  201. package/foundation/fs/empty-folder.mjs +2 -2
  202. package/foundation/fs/read-record.mjs +11 -4
  203. package/foundation/pictures/pictures.d.mts +152 -0
  204. package/foundation/pictures/pictures.mjs +565 -0
  205. package/foundation/release/folder-lock.mjs +3 -2
  206. package/foundation/render/cut-short.d.mts +2 -2
  207. package/foundation/render/cut-short.mjs +2 -2
  208. package/foundation/render/drawn-contrast.d.mts +6 -4
  209. package/foundation/render/drawn-contrast.mjs +136 -18
  210. package/foundation/render/font-probe.d.mts +2 -2
  211. package/foundation/render/font-probe.mjs +2 -2
  212. package/foundation/render/layers.mjs +1 -2
  213. package/foundation/render/package-resolve-hooks.d.mts +59 -10
  214. package/foundation/render/package-resolve-hooks.mjs +189 -34
  215. package/foundation/render/page-worker.mjs +29 -10
  216. package/foundation/render/part-boxes.d.mts +2 -3
  217. package/foundation/render/part-boxes.mjs +2 -3
  218. package/foundation/render/picture-chrome.mjs +18 -15
  219. package/foundation/render/picture-playwright.mjs +10 -7
  220. package/foundation/render/picture-window.d.mts +13 -0
  221. package/foundation/render/picture-window.mjs +31 -0
  222. package/foundation/render/render-page.d.mts +1 -1
  223. package/foundation/render/render-page.mjs +4 -5
  224. package/foundation/render/single-copy-hooks.d.mts +2 -0
  225. package/foundation/render/single-copy-hooks.mjs +2 -0
  226. package/foundation/response/error-codes.doc.mjs +14 -14
  227. package/foundation/response/error-codes.mjs +13 -13
  228. package/foundation/response/response-types.doc.mjs +10 -67
  229. package/foundation/runtime/css-tree.mjs +2 -2
  230. package/foundation/runtime/word-table.d.mts +1 -1
  231. package/foundation/runtime/word-table.mjs +1 -1
  232. package/foundation/suggest/other-command.d.mts +52 -15
  233. package/foundation/suggest/other-command.mjs +193 -46
  234. package/foundation/text/icon-set-next.d.mts +1 -1
  235. package/foundation/text/icon-set-next.mjs +2 -2
  236. package/foundation/text/suggest-order.d.mts +7 -0
  237. package/foundation/text/suggest-order.mjs +1 -1
  238. package/package.json +7 -8
  239. package/api/theme-edit/_adapter.d.mts +0 -228
  240. package/api/theme-edit/_adapter.mjs +0 -2023
  241. package/api/theme-edit/_catalog.d.mts +0 -172
  242. package/api/theme-edit/_catalog.mjs +0 -790
  243. package/api/theme-edit/_check.d.mts +0 -391
  244. package/api/theme-edit/_check.mjs +0 -9345
  245. package/api/theme-edit/_color.d.mts +0 -135
  246. package/api/theme-edit/_color.mjs +0 -480
  247. package/api/theme-edit/_compiler.d.mts +0 -77
  248. package/api/theme-edit/_compiler.mjs +0 -1053
  249. package/api/theme-edit/_context.d.mts +0 -397
  250. package/api/theme-edit/_context.mjs +0 -1772
  251. package/api/theme-edit/_css.d.mts +0 -169
  252. package/api/theme-edit/_css.mjs +0 -1167
  253. package/api/theme-edit/_edit.d.mts +0 -167
  254. package/api/theme-edit/_edit.mjs +0 -11206
  255. package/api/theme-edit/_how-commands.d.mts +0 -211
  256. package/api/theme-edit/_how-commands.mjs +0 -1634
  257. package/api/theme-edit/_how-question.d.mts +0 -340
  258. package/api/theme-edit/_how-question.mjs +0 -32955
  259. package/api/theme-edit/_how-sides.d.mts +0 -22
  260. package/api/theme-edit/_how-sides.mjs +0 -173
  261. package/api/theme-edit/_how-steps.d.mts +0 -42
  262. package/api/theme-edit/_how-steps.mjs +0 -208
  263. package/api/theme-edit/_how-values.d.mts +0 -29
  264. package/api/theme-edit/_how-values.mjs +0 -111
  265. package/api/theme-edit/_how-words.d.mts +0 -15
  266. package/api/theme-edit/_how-words.mjs +0 -239
  267. package/api/theme-edit/_how.d.mts +0 -55
  268. package/api/theme-edit/_how.mjs +0 -2378
  269. package/api/theme-edit/_importers.d.mts +0 -38
  270. package/api/theme-edit/_importers.mjs +0 -188
  271. package/api/theme-edit/_marks.d.mts +0 -39
  272. package/api/theme-edit/_marks.mjs +0 -67
  273. package/api/theme-edit/_missed.d.mts +0 -56
  274. package/api/theme-edit/_missed.mjs +0 -1128
  275. package/api/theme-edit/_name-rule.d.mts +0 -11
  276. package/api/theme-edit/_name-rule.mjs +0 -12
  277. package/api/theme-edit/_normal.d.mts +0 -365
  278. package/api/theme-edit/_normal.mjs +0 -1978
  279. package/api/theme-edit/_overview.d.mts +0 -9
  280. package/api/theme-edit/_overview.mjs +0 -293
  281. package/api/theme-edit/_palette.d.mts +0 -616
  282. package/api/theme-edit/_palette.mjs +0 -2776
  283. package/api/theme-edit/_part-pieces.d.mts +0 -54
  284. package/api/theme-edit/_part-pieces.mjs +0 -179
  285. package/api/theme-edit/_part-words.d.mts +0 -39
  286. package/api/theme-edit/_part-words.mjs +0 -242
  287. package/api/theme-edit/_parts.d.mts +0 -402
  288. package/api/theme-edit/_parts.mjs +0 -2294
  289. package/api/theme-edit/_picture-traits.d.mts +0 -259
  290. package/api/theme-edit/_picture-traits.mjs +0 -1030
  291. package/api/theme-edit/_png.d.mts +0 -94
  292. package/api/theme-edit/_png.mjs +0 -479
  293. package/api/theme-edit/_preview-app.d.mts +0 -172
  294. package/api/theme-edit/_preview-app.mjs +0 -6430
  295. package/api/theme-edit/_preview.d.mts +0 -538
  296. package/api/theme-edit/_preview.mjs +0 -3247
  297. package/api/theme-edit/_project.d.mts +0 -207
  298. package/api/theme-edit/_project.mjs +0 -643
  299. package/api/theme-edit/_set-line.d.mts +0 -29
  300. package/api/theme-edit/_set-line.mjs +0 -100
  301. package/api/theme-edit/_settings.d.mts +0 -2426
  302. package/api/theme-edit/_settings.mjs +0 -18163
  303. package/api/theme-edit/_tables.d.mts +0 -227
  304. package/api/theme-edit/_tables.mjs +0 -1128
  305. package/api/theme-edit/_text-looks.d.mts +0 -78
  306. package/api/theme-edit/_text-looks.mjs +0 -376
  307. package/api/theme-edit/_vet.d.mts +0 -50
  308. package/api/theme-edit/_vet.mjs +0 -166
  309. package/api/theme-edit/how/how.d.mts +0 -17
  310. package/api/theme-edit/how/how.mjs +0 -28
  311. package/api/theme-edit/new/new.d.mts +0 -11
  312. package/api/theme-edit/new/new.mjs +0 -22
  313. package/api/theme-edit/preview-add/preview-add.d.mts +0 -14
  314. package/api/theme-edit/preview-add/preview-add.mjs +0 -25
  315. package/api/theme-edit/preview-app/preview-app.d.mts +0 -13
  316. package/api/theme-edit/preview-app/preview-app.mjs +0 -24
  317. package/api/theme-edit/preview-list/preview-list.d.mts +0 -10
  318. package/api/theme-edit/preview-list/preview-list.mjs +0 -21
  319. package/api/theme-edit/preview-remove/preview-remove.d.mts +0 -12
  320. package/api/theme-edit/preview-remove/preview-remove.mjs +0 -23
  321. package/api/theme-edit/set/set.d.mts +0 -13
  322. package/api/theme-edit/set/set.mjs +0 -24
  323. package/api/theme-edit/show/show.d.mts +0 -12
  324. package/api/theme-edit/show/show.mjs +0 -23
  325. package/api/theme-edit/theme-edit.d.mts +0 -12
  326. package/api/theme-edit/theme-edit.mjs +0 -36
  327. package/api/theme-edit/theme-edit.type.d.mts +0 -667
  328. package/api/theme-edit/theme-edit.type.mjs +0 -314
  329. package/api/theme-edit/themeEditHow.doc.d.mts +0 -6
  330. package/api/theme-edit/themeEditHow.doc.mjs +0 -105
  331. package/api/theme-edit/themeEditNew.doc.d.mts +0 -5
  332. package/api/theme-edit/themeEditNew.doc.mjs +0 -112
  333. package/api/theme-edit/themeEditPreviewAdd.doc.d.mts +0 -6
  334. package/api/theme-edit/themeEditPreviewAdd.doc.mjs +0 -121
  335. package/api/theme-edit/themeEditPreviewApp.doc.d.mts +0 -6
  336. package/api/theme-edit/themeEditPreviewApp.doc.mjs +0 -87
  337. package/api/theme-edit/themeEditPreviewList.doc.d.mts +0 -6
  338. package/api/theme-edit/themeEditPreviewList.doc.mjs +0 -62
  339. package/api/theme-edit/themeEditPreviewRemove.doc.d.mts +0 -6
  340. package/api/theme-edit/themeEditPreviewRemove.doc.mjs +0 -96
  341. package/api/theme-edit/themeEditSet.doc.d.mts +0 -6
  342. package/api/theme-edit/themeEditSet.doc.mjs +0 -175
  343. package/api/theme-edit/themeEditShow.doc.d.mts +0 -6
  344. package/api/theme-edit/themeEditShow.doc.mjs +0 -103
  345. package/api/theme-edit/themeEditUndo.doc.d.mts +0 -6
  346. package/api/theme-edit/themeEditUndo.doc.mjs +0 -133
  347. package/api/theme-edit/undo/undo.d.mts +0 -13
  348. package/api/theme-edit/undo/undo.mjs +0 -24
  349. package/assets/preview-app/README.md +0 -6
  350. package/assets/preview-app/css.d.ts +0 -5
  351. package/assets/preview-app/gitignore +0 -4
  352. package/assets/preview-app/next.config.mjs +0 -12
  353. package/assets/preview-app/package.json +0 -24
  354. package/assets/preview-app/src/app/globals.css +0 -6
  355. package/assets/preview-app/src/app/layout.tsx +0 -21
  356. package/assets/preview-app/src/app/page.tsx +0 -94
  357. package/assets/preview-app/src/app/providers.tsx +0 -16
  358. package/assets/preview-app/tsconfig.json +0 -27
  359. package/clients/cli/commands/experimental/theme.mjs +0 -2868
  360. package/clients/cli/commands/experimental-theme-add.doc.mjs +0 -80
  361. package/clients/cli/commands/experimental-theme-compile.doc.mjs +0 -98
  362. package/clients/cli/commands/experimental-theme-editor-how.doc.mjs +0 -196
  363. package/clients/cli/commands/experimental-theme-editor-new.doc.mjs +0 -174
  364. package/clients/cli/commands/experimental-theme-editor-set.doc.mjs +0 -139
  365. package/clients/cli/commands/experimental-theme-editor-show.doc.mjs +0 -67
  366. package/clients/cli/commands/experimental-theme-editor-undo.doc.mjs +0 -105
  367. package/clients/cli/commands/experimental-theme-editor.doc.mjs +0 -49
  368. package/clients/cli/commands/experimental-theme-eject.doc.mjs +0 -72
  369. package/clients/cli/commands/experimental-theme-list.doc.mjs +0 -49
  370. package/clients/cli/commands/experimental-theme-preview-add.doc.mjs +0 -88
  371. package/clients/cli/commands/experimental-theme-preview-app.doc.mjs +0 -61
  372. package/clients/cli/commands/experimental-theme-preview-list.doc.mjs +0 -48
  373. package/clients/cli/commands/experimental-theme-preview-remove.doc.mjs +0 -59
  374. package/clients/cli/commands/experimental-theme-preview.doc.mjs +0 -41
  375. package/clients/cli/commands/experimental-theme-remove.doc.mjs +0 -57
  376. package/clients/cli/commands/experimental-theme-targets.doc.mjs +0 -62
  377. package/clients/cli/commands/experimental-theme-template.doc.mjs +0 -63
  378. package/clients/cli/commands/experimental-theme-use.doc.mjs +0 -57
  379. package/clients/cli/commands/experimental-theme.doc.mjs +0 -60
  380. package/foundation/fonts/fontsource-families.generated.d.mts +0 -5
  381. package/foundation/fonts/fontsource-families.generated.mjs +0 -2110
package/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- # @xds/cli
1
+ # @astryxdesign/cli
2
2
 
3
3
  # 0.7.17
4
4
 
@@ -4278,7 +4278,7 @@ Thanks to everyone who contributed to this release:
4278
4278
  - The CLI README now shows `apiVersion` in every hand-written envelope shape and example, and lists `astryx search --verbose` in place of `--detail`, which needs a level and does not add a result's score or reason. (#6587)
4279
4279
  - The response-type docs, and the CLI README table generated from them, now name the fields of the `component.detail`, `docs.index`, `search`, `build.kit`, `gap-report.file`, `theme.build`, `theme.targets`, and `integration.pack-check` responses by their JSON keys, including `parentDoc`, `hint`, `notices`, `deprecatedFor`, each gap-report delivery's fields, and the pack-check contribution identities and issue fields. The `component.detail` response type declares `parentDoc`. (#6588)
4280
4280
  - `astryx template --help` and the manifest now say which flags win when they are combined: `--cdn` overrides everything else and writes to its value, else to `<path>`, else `cdn.template.html`; `--list` ignores a name, a path, `--skeleton` and `--overwrite`; and `--skeleton` needs a name and writes nothing. (#6591)
4281
- - `astryx upgrade --help` and the manifest now state how its flags combine: `--list` ignores every other flag, `--registry` refuses `--list` and the migration flags, and `--codemod` is the only way to run an optional codemod and also skips the ShadCN composition check. The `--from` help names the legacy `@xds/core` fallback, and the documented exit codes now include a missing core, a missing jscodeshift, an invalid `astryx.config`, a post-codemod hook failure and the refused flag combinations. (#6590)
4281
+ - `astryx upgrade --help` and the manifest now state how its flags combine: `--list` ignores every other flag, `--registry` refuses `--list` and the migration flags, and `--codemod` is the only way to run an optional codemod and also skips the ShadCN composition check. The `--from` help names the legacy core-package fallback, and the documented exit codes now include a missing core, a missing jscodeshift, an invalid `astryx.config`, a post-codemod hook failure and the refused flag combinations. (#6590)
4282
4282
  - `astryx docs authoring` now says where loading a doc is looser than its published type (stamped component and function docs, older generic docs, and templates), and which doc kinds accept fields they do not know. Nothing about how docs load has changed. (#6492)
4283
4283
 
4284
4284
  #### Other Changes
@@ -5120,7 +5120,7 @@ Thanks to everyone who contributed to this release:
5120
5120
  #### Fixes
5121
5121
 
5122
5122
  - theme build: generated custom Button variants now type-check through the public `@astryxdesign/core/Button` subpath.
5123
- - Remove the `@xds/theme-default` → `@astryxdesign/theme-neutral` collapse from the v0.1.0 upgrade codemods (module-specifiers, css-surfaces, and declare-module). `theme-default` was dropped at the v0.1.0 scope move, so no v0.1.x consumer imported it — the collapse was dead and could rewrite unrelated source (including `@xds/theme-default/theme.css` CSS imports) to a `@astryxdesign/theme-neutral` package the app never declared. The `@xds/theme-daily` → `theme-neutral` collapse (and its `defaultTheme` → `neutralTheme` export remap) is unchanged.
5123
+ - Remove the earlier scope's `theme-default` → `@astryxdesign/theme-neutral` collapse from the v0.1.0 upgrade codemods (module-specifiers, css-surfaces, and declare-module). `theme-default` was dropped at the v0.1.0 scope move, so no v0.1.x consumer imported it — the collapse was dead and could rewrite unrelated source (including the earlier scope's `theme-default/theme.css` CSS imports) to a `@astryxdesign/theme-neutral` package the app never declared. The earlier scope's `theme-daily` → `theme-neutral` collapse (and its `defaultTheme` → `neutralTheme` export remap) is unchanged.
5124
5124
  - cli — confine user-controlled file paths, close DoS vectors, and repair paths broken by the authoring reorg (#4637)
5125
5125
  - cli hardening pass — validate inputs at the API layer, close path-safety gaps, and prevent agent-docs content loss. The API is a public surface (`@astryxdesign/cli/api`), so guards that lived only in the CLI wrapper are pushed into the API.
5126
5126
  Path safety (the guard the write commands all depend on):
@@ -5296,7 +5296,7 @@ Thanks to everyone who contributed to this release:
5296
5296
 
5297
5297
  - Stop suggesting bare `npx astryx` before the CLI is installed — it resolves to an unrelated package on the npm registry.
5298
5298
  The CLI now emits an install-aware invocation everywhere it prints a command:
5299
- - Extend the v0.1.0 upgrade codemods to cover test files that mock `@xds/core` modules, which were previously left half-migrated and broke after upgrade:
5299
+ - Extend the v0.1.0 upgrade codemods to cover test files that mock the earlier scope's `core` modules, which were previously left half-migrated and broke after upgrade:
5300
5300
  - `astryx upgrade` now keeps the managed agent-docs block (`<!-- ASTRYX:START --> … <!-- ASTRYX:END -->`) in sync with the installed version on **every** path — including the up-to-date and no-codemods short-circuits that previously returned before any refresh, leaving AI agents reading a stale component index and superseded rules. The block documents the installed library, so it's now refreshed up front (independent of codemods) and reported in the `--json` receipt as `agentDocs`. One detection pass covers three cases: a stale block is rewritten (`--apply`) or reported as a pending change (dry-run, which no longer writes); a project with core installed but no managed block is nudged to run `astryx init --features agents`; an already-current block stays silent. (#4168, #4169)
5301
5301
 
5302
5302
  #### Documentation
@@ -5307,8 +5307,8 @@ Thanks to everyone who contributed to this release:
5307
5307
 
5308
5308
  - Installed / global / dev runs suggest `<pm> astryx <cmd>` (e.g. `pnpm exec astryx …`), unchanged.
5309
5309
  - One-off runs (launched via `npx`/`pnpm dlx`/`yarn dlx`/`bunx`) suggest the scoped package `<dlx> @astryxdesign/cli <cmd>`, which always resolves to us.
5310
- - **migrate-xds-module-specifiers**: rewrite the mocked-module path in `vi.mock`/`vi.doMock`/`jest.mock`/`jest.doMock` (and bare `mock`) calls, plus `import(...)` specifiers used in TS type positions (`typeof import('@xds/core/Text')`), so the mock still intercepts the renamed `@astryxdesign/*` import.
5311
- - **drop-xds-prefix-imports**: un-prefix partial-mock override keys inside an `@xds/core` mock factory (e.g. `useXDSTruncation` → `useTruncation`) so the override matches the renamed export instead of silently overriding nothing. Scoped to recognized `@xds/core` mock factories only; unrelated object keys are untouched.
5310
+ - **migrate-xds-module-specifiers**: rewrite the mocked-module path in `vi.mock`/`vi.doMock`/`jest.mock`/`jest.doMock` (and bare `mock`) calls, plus `import(...)` specifiers used in TS type positions (`typeof import(…)` of the earlier scope's `core/Text`), so the mock still intercepts the renamed `@astryxdesign/*` import.
5311
+ - **drop-xds-prefix-imports**: un-prefix partial-mock override keys inside the earlier scope's `core` mock factory (e.g. `useXDSTruncation` → `useTruncation`) so the override matches the renamed export instead of silently overriding nothing. Scoped to recognized mock factories of the earlier scope's `core` only; unrelated object keys are untouched.
5312
5312
 
5313
5313
  #### Contributors
5314
5314
 
@@ -5414,9 +5414,9 @@ Thanks to everyone who contributed to this release:
5414
5414
 
5415
5415
  #### Other Changes
5416
5416
 
5417
- - **drop-xds-prefix-imports**: when un-prefixing an `@xds/core` import (e.g. `XDSCodeBlock` → `CodeBlock`) would collide with a same-named local binding in the file (such as a local `export function CodeBlock` wrapper), alias the import to `Astryx<Name>` and rewrite its usages instead of producing a duplicate declaration that breaks the build.
5418
- - **migrate-xds-css-surfaces**: rewrite CSS `@import` of `@xds/*` package stylesheets (both `'…'`/`"…"` and `url(…)` forms), including the `@xds/core/xds.css` → `@astryxdesign/core/astryx.css` file rename and the `theme-default`/`theme-daily` → `theme-neutral` collapse.
5419
- - **migrate-xds-module-specifiers**: when collapsing `@xds/theme-default`/`@xds/theme-daily` to `@astryxdesign/theme-neutral`, remap the `defaultTheme` export to `neutralTheme`, aliasing back to the original local name (`neutralTheme as defaultTheme`) so downstream usages keep working.
5417
+ - **drop-xds-prefix-imports**: when un-prefixing an import from the earlier scope's `core` (e.g. `XDSCodeBlock` → `CodeBlock`) would collide with a same-named local binding in the file (such as a local `export function CodeBlock` wrapper), alias the import to `Astryx<Name>` and rewrite its usages instead of producing a duplicate declaration that breaks the build.
5418
+ - **migrate-xds-css-surfaces**: rewrite CSS `@import` of the earlier scope's package stylesheets (both `'…'`/`"…"` and `url(…)` forms), including the earlier scope's `core/xds.css` → `@astryxdesign/core/astryx.css` file rename and the `theme-default`/`theme-daily` → `theme-neutral` collapse.
5419
+ - **migrate-xds-module-specifiers**: when collapsing the earlier scope's `theme-default`/`theme-daily` to `@astryxdesign/theme-neutral`, remap the `defaultTheme` export to `neutralTheme`, aliasing back to the original local name (`neutralTheme as defaultTheme`) so downstream usages keep working.
5420
5420
 
5421
5421
  #### Contributors
5422
5422
 
@@ -5440,7 +5440,7 @@ Thanks to everyone who contributed to this release:
5440
5440
  - Add a Kanban Board page template: color-coded status columns, draggable task cards with priority tags, and board toolbar. Based on a design by @cg-hub18.
5441
5441
  - Add frame-first layout guidance: new `astryx docs layout` topic (shell choice, region budgets, app archetypes, cards-vs-rows policy, responsive contracts), layout rules in the generated agent cheat sheet, and layout anti-patterns in `docs principles`.
5442
5442
  - Add a v0.1.3 config codemod that migrates astryx.config layout.components to experimental.xle.components.
5443
- - Add v0.1.0 codemods for migrating `declare module "@xds/core/..."` type augmentations and `.xds-*` / `[data-xds-theme]` / `@layer xds-theme` CSS surfaces to their `@astryxdesign`/`astryx-*` equivalents.
5443
+ - Add v0.1.0 codemods for migrating `declare module` type augmentations of the earlier scope's `core/...` modules and `.xds-*` / `[data-xds-theme]` / `@layer xds-theme` CSS surfaces to their `@astryxdesign`/`astryx-*` equivalents.
5444
5444
  - Introduce the Project configuration API as the single entry point for reading resolved project config, components, templates, codemods, and issue routing, replacing loadConfig. Misconfigured integrations are now skipped with a warning during upgrade instead of hard-failing, and a new --skip-codemod flag lets you re-run past a failed codemod.
5445
5445
  - Add a Shell page-template category to the CLI: Top Nav, Side Nav, and Shell Nav app-shell scaffolds (#3245, #3246, #3247)
5446
5446
  - Static template authoring API (createPageTemplate/createBlockTemplate) with the @astryxdesign/cli/template export and type-driven, package-scoped template discovery.
@@ -5454,7 +5454,7 @@ Thanks to everyone who contributed to this release:
5454
5454
  - Align the CLI error-code type declarations with the runtime error codes (add the missing ERR_AMBIGUOUS_TEMPLATE declaration).
5455
5455
  - Correct the `doctor` theme-wiring hint to reference the real `astryx.theme` config field (was `xds.theme`) and update the agent-docs check wording to say "Astryx".
5456
5456
  - Update the API/CLI parity harness for the package-qualified `component --list` shape, and make the component API reject a non-string name with a clean error instead of throwing.
5457
- - The XDS-prefix drop codemod now runs as a mandatory v0.1.0 upgrade step, so upgrading from 0.0.x rewrites prefixed imports (useXDSTheme, XDSButton, XDSIconRegistry, ...) to their bare names alongside the @xds/_ → @astryxdesign/_ scope rename.
5457
+ - The XDS-prefix drop codemod now runs as a mandatory v0.1.0 upgrade step, so upgrading from 0.0.x rewrites prefixed imports (useXDSTheme, XDSButton, XDSIconRegistry, ...) to their bare names alongside the scope rename to `@astryxdesign/*`.
5458
5458
  - upgrade now runs core codemods before loading config, so a config codemod can repair an otherwise-invalid config; dry-run reports a fixable config and suggests the command to apply it.
5459
5459
 
5460
5460
  #### Documentation
@@ -5583,7 +5583,7 @@ Thanks to everyone who contributed to this release:
5583
5583
  (realpath of `import.meta.url`), working whether invoked via symlink, copy, or
5584
5584
  Windows shim. Also fixes the non-interactive `init`/`theme` error to say
5585
5585
  `astryx <command>` instead of the stale `xds <command>`.
5586
- - Add a v0.1.0 upgrade codemod that migrates legacy `@xds/*` module specifiers and config surfaces to the Astryx v0.1.0 names.
5586
+ - Add a v0.1.0 upgrade codemod that migrates legacy module specifiers and config surfaces to the Astryx v0.1.0 names.
5587
5587
  [breaking] Remove legacy `astryx.versionFile` update-hint support from package.json.
5588
5588
 
5589
5589
  #### Documentation
@@ -5627,7 +5627,7 @@ Thanks to everyone who contributed to this release:
5627
5627
  name should switch to `astryx`. Part of removing `xds` naming from the public API.
5628
5628
  - Rename the exported `XDSError` class to `AstryxError`
5629
5629
  The CLI's programmatic API error class is renamed `XDSError` -> `AstryxError`
5630
- (exported from `@xds/cli` + declared in its types). Consumers that catch or
5630
+ (exported from `@astryxdesign/cli` + declared in its types). Consumers that catch or
5631
5631
  reference `XDSError` from the CLI's API should switch to `AstryxError`. Part of
5632
5632
  removing `xds` naming from the public API.
5633
5633
  - Remove the XDS-prefix compatibility layer — astryx is now the only public surface
@@ -5640,9 +5640,9 @@ Thanks to everyone who contributed to this release:
5640
5640
 
5641
5641
  - `theme build` generates valid bare type imports (IconRegistry/DefinedTheme)
5642
5642
  `astryx theme build` emitted `.d.ts` files importing `XDSIconRegistry` /
5643
- `XDSDefinedTheme` from `@xds/core`, but those aliases were removed — the
5643
+ `XDSDefinedTheme` from `@astryxdesign/core`, but those aliases were removed — the
5644
5644
  generated types failed to resolve. Generate `IconRegistry` / `DefinedTheme`
5645
- (the bare names `@xds/core` now exports) instead.
5645
+ (the bare names `@astryxdesign/core` now exports) instead.
5646
5646
 
5647
5647
  #### Documentation
5648
5648
 
@@ -5686,8 +5686,8 @@ Thanks to everyone who contributed to this release:
5686
5686
 
5687
5687
  - Remove an internal-only codemod from the public repository (#2970)
5688
5688
  It was an optional, version-independent transform and not part of any standard upgrade path, so removing it does not affect the public `0.0.13 → 0.0.15` migration.
5689
- - Rename the npm package scope from `@xds/*` to `@astryxdesign/*`
5690
- All published packages move to the new `@astryxdesign` scope (e.g. `@xds/core` → `@astryxdesign/core`), along with the workspace lockfile, build/runtime scope-directory scans, and docsite slug derivation. Consumers must update their imports and dependency names. The internal ESLint plugin namespace (`@xds/*` rules) is intentionally untouched and tracked separately. Existing `@xds/*` codemods continue to target the old scope so projects still on `@xds/*` can migrate.
5689
+ - Move every package to the npm package scope `@astryxdesign/*`
5690
+ All published packages move to the new `@astryxdesign` scope, along with the workspace lockfile, build/runtime scope-directory scans, and docsite slug derivation. Consumers must update their imports and dependency names. The ESLint plugin namespace is unchanged. The existing upgrade codemods still migrate projects from the earlier scope.
5691
5691
 
5692
5692
  #### Contributors
5693
5693
 
@@ -5716,7 +5716,7 @@ npx astryx upgrade --apply
5716
5716
  - **`astryx doctor`** — New health-check command for diagnosing project/setup issues. (#2565)
5717
5717
  - **Unified search** — `astryx search` searches across components, hooks, docs, and templates in one query. (#2564)
5718
5718
  - **Capability manifest** — Full machine-readable capability manifest for agent discovery, plus stable machine-readable error codes on every error. (#2562, #2563)
5719
- - **`@xds/cli/api` hook export** — The `hook` is exposed via `@xds/cli/api` with types and parity coverage. (#2558)
5719
+ - **`@astryxdesign/cli/api` hook export** — The `hook` is exposed via `@astryxdesign/cli/api` with types and parity coverage. (#2558)
5720
5720
  - **CLI exit-code policy** — Every user-visible error now exits with code 1 in both human and `--json` modes (previously several command-layer errors printed a message but exited 0, invisible to CI scripts and AI agents). `xds bogus-cmd`, `astryx theme bogus-subcommand`, the bare `theme` group with an unknown subcommand, and "command not found"/"did you mean…" paths all exit 1. Help, version, and bare-list invocations still exit 0. Introduces `lib/cli-error.mjs` as the canonical exit-code helper.
5721
5721
  - **Migration guide** — Added an explicit guide for moving existing Tailwind, shadcn, and Radix applications to XDS incrementally.
5722
5722
  - **Data-attribute selector docs** — Documented the data-attribute selector surface in CLI docs alongside the core dual-emit change.
@@ -5732,7 +5732,7 @@ npx astryx upgrade --apply
5732
5732
  - **`astryx discover --json`** — Includes `meta: { configured: false }` when no packages are configured, distinguishing "configured but empty" from "not configured".
5733
5733
  - **`xds gap-report --json`** — Returns a structured error instead of starting an interactive prompt when required flags are missing; the "gh CLI missing" path also emits a JSON error.
5734
5734
  - **`astryx theme --json`** — The `theme` parent command (without a subcommand) rejects `--json` cleanly; `theme build --json` continues to work.
5735
- - **Theme CSS prose regression** — `astryx theme build` now uses a single CSS generation path (`@xds/core`'s generator) and treats a failed `@xds/core/theme` import as a hard build error instead of a silent fallback, fixing the docsite Markdown typography regression after the XDS-prefix migration. (#2964)
5735
+ - **Theme CSS prose regression** — `astryx theme build` now uses a single CSS generation path (`@astryxdesign/core`'s generator) and treats a failed `@astryxdesign/core/theme` import as a hard build error instead of a silent fallback, fixing the docsite Markdown typography regression after the XDS-prefix migration. (#2964)
5736
5736
 
5737
5737
  #### Contributors
5738
5738
 
package/README.md CHANGED
@@ -101,25 +101,25 @@ Every run reads one base: Core, or an installed integration whose manifest decla
101
101
 
102
102
  <!-- BEGIN GENERATED: commands -->
103
103
 
104
- | Command | Description | Outside a project |
105
- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- |
106
- | `blog` | Read the Astryx blog from the published feed | `same` |
107
- | `build` | Build a page: the template to start from, or the workflow playbook (no query) | `same` |
108
- | `component` | List components or print component docs | `same` |
109
- | `discover` | Browse and search integrations: the ones you have and the ones you could add | `same` |
110
- | `docs` | Print reference docs | `same` |
111
- | `doctor` | Diagnose Astryx projects and integration packages | `own` |
112
- | `experimental` | [experimental] Try features that may change in a patch release: icon sets, one self-contained HTML file from a page built with Astryx components (not for other pages), checked theme editing | by subcommand |
113
- | `gap-report` | Report a missing component or feature to the package that owns it | `same` |
114
- | `hook` | List hooks or print hook docs | `same` |
115
- | `init` | Initialize the design system in your project | `own` |
116
- | `integration` | Author and verify an Astryx integration package | by subcommand |
117
- | `mcp` | For AI tools that cannot run commands: serve every astryx command as an MCP tool, over stdio | `same` |
118
- | `search` | Search components, hooks, docs, templates, and themes in one ranked list | `same` |
119
- | `swizzle` | Copy component source for customization | `refuse` |
120
- | `template` | List, show, or scaffold page and block templates | `same` |
121
- | `theme` | Add, switch, build, and author themes (to make or change one, use experimental theme editor) | by subcommand |
122
- | `upgrade` | Update your code after upgrading Astryx, and refresh ShadCN-copied components | `own` |
104
+ | Command | Description | Outside a project |
105
+ | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- |
106
+ | `blog` | Read the Astryx blog from the published feed | `same` |
107
+ | `build` | Build a page: the template to start from, or the workflow playbook (no query) | `same` |
108
+ | `component` | List components or print component docs | `same` |
109
+ | `discover` | Browse and search integrations: the ones you have and the ones you could add | `same` |
110
+ | `docs` | Print reference docs | `same` |
111
+ | `doctor` | Diagnose Astryx projects and integration packages | `own` |
112
+ | `experimental` | [experimental] Try features that may change in a patch release: icon sets, one self-contained HTML file from a page built with Astryx components (not for other pages) | by subcommand |
113
+ | `gap-report` | Report a missing component or feature to the package that owns it | `same` |
114
+ | `hook` | List hooks or print hook docs | `same` |
115
+ | `init` | Initialize the design system in your project | `own` |
116
+ | `integration` | Author and verify an Astryx integration package | by subcommand |
117
+ | `mcp` | For AI tools that cannot run commands: serve every astryx command as an MCP tool, over stdio | `same` |
118
+ | `search` | Search components, hooks, docs, templates, and themes in one ranked list | `same` |
119
+ | `swizzle` | Copy component source for customization | `refuse` |
120
+ | `template` | List, show, or scaffold page and block templates | `same` |
121
+ | `theme` | Add, switch, build, and author themes | by subcommand |
122
+ | `upgrade` | Update your code after upgrading Astryx, and refresh ShadCN-copied components | `own` |
123
123
 
124
124
  <!-- END GENERATED: commands -->
125
125
  <!-- Generated by scripts/generate-cli-readme.mjs from `astryx manifest`. Run `pnpm -F @astryxdesign/cli readme`. -->
@@ -321,7 +321,8 @@ export function withExampleBlockPointer(error: unknown, dirName: string, { coreD
321
321
  /**
322
322
  * When `error` is the unknown-component error for a name that matches a hook,
323
323
  * template or docs topic (exact, folded or last segment, or a hook it nearly
324
- * spells or whose keyword it is, as foundation/suggest/other-command.mjs
324
+ * spells, whose keyword it is, or whose name without its verb its words
325
+ * carry, as foundation/suggest/other-command.mjs
325
326
  * ranks it), returns the same error with the command that reads that entry
326
327
  * among its suggestions, in the place foundation/suggest/other-command.mjs
327
328
  * gives it: a hint at the folded tier or a worse one stays behind a
@@ -989,7 +989,8 @@ export async function withExampleBlockPointer(error, dirName, {coreDir, cwd}) {
989
989
  /**
990
990
  * When `error` is the unknown-component error for a name that matches a hook,
991
991
  * template or docs topic (exact, folded or last segment, or a hook it nearly
992
- * spells or whose keyword it is, as foundation/suggest/other-command.mjs
992
+ * spells, whose keyword it is, or whose name without its verb its words
993
+ * carry, as foundation/suggest/other-command.mjs
993
994
  * ranks it), returns the same error with the command that reads that entry
994
995
  * among its suggestions, in the place foundation/suggest/other-command.mjs
995
996
  * gives it: a hint at the folded tier or a worse one stays behind a
@@ -464,19 +464,37 @@ export function packageDocSections(catalog: DocsCatalog, tree: DocsTree, owner:
464
464
  * @returns {TreeNode | null}
465
465
  */
466
466
  export function routeOwner(tree: DocsTree, entry: import("../../foundation/discovery/docs-discovery.mjs").DocsTopicEntry): TreeNode | null;
467
+ /**
468
+ * A namespace's ordered children with the page further down placed as
469
+ * spec:AST-046 FR6 says: right after the child that route words alone put
470
+ * first, when the typed text names that child, and first otherwise. A page
471
+ * that is that child is listed once, first.
472
+ * @template {{name: string}} T
473
+ * @param {string} topic
474
+ * @param {T[]} byRoute the children as route words order them
475
+ * @param {T[]} ordered the children as {@link namedFirst} orders them
476
+ * @param {T[]} deeper the page further down ({@link pageBelow}), or none
477
+ * @returns {T[]}
478
+ */
479
+ export function withPageBelow<T extends {
480
+ name: string;
481
+ }>(topic: string, byRoute: T[], ordered: T[], deeper: T[]): T[];
467
482
  /**
468
483
  * The error for a docs argument that names nothing. For a route, it suggests
469
484
  * every child of the deepest namespace the route reaches, closest first by
470
485
  * each child's route, title and keywords, with a child the route names kept
471
- * first. Otherwise it suggests the docs whose own name it is, or whose route
472
- * it spells with hyphens; failing that, the topics and top-level namespaces,
486
+ * first; the one page further down that the rest of the route names
487
+ * ({@link pageBelow}) comes right after that child, or first. Otherwise it
488
+ * suggests the docs whose own name it is, or whose route it spells with
489
+ * hyphens; failing that, the topics and top-level namespaces,
473
490
  * closest first and cut where the matches get weaker (every one of them when
474
491
  * none shares a word with the argument, with the names a slip or two from it
475
- * first). When the argument matches a component, hook or template
476
- * (exact, folded or last segment), the command that reads that entry joins the list as
477
- * foundation/suggest/other-command.mjs places it, and the list keeps its
478
- * length; when no suggested doc
479
- * shares a word with the argument, that command is the only suggestion.
492
+ * first). When the argument matches a component, hook or template (exact,
493
+ * folded or last segment, or a Core component or hook its last path segment
494
+ * names, unless a stable doc has that name), the command that reads that
495
+ * entry joins the list as foundation/suggest/other-command.mjs places it, and
496
+ * the list keeps its length; when no suggested doc shares a word with the
497
+ * argument, that command is the only suggestion.
480
498
  * When no command joins, the docs whose route, title or declared keywords
481
499
  * carry a typed word ({@link wordMatches}) take the place of the topics and
482
500
  * namespaces, the named route that list leads with first, in a list no
@@ -2457,19 +2457,72 @@ function fewerWordMatches(topic, everyDoc, byWords, taken) {
2457
2457
  );
2458
2458
  }
2459
2459
 
2460
+ /**
2461
+ * The one page below `route`, at any depth, whose last route segment or
2462
+ * title has the words of `rest` (nameWords): `authoring/define-the-theme`
2463
+ * finds `authoring/building-blocks/themes/define-the-theme`. None when no page or more than one has them.
2464
+ * An experimental page is never found.
2465
+ * @param {DocsTree} tree
2466
+ * @param {string} route
2467
+ * @param {string} rest the typed segments after `route`
2468
+ * @returns {Array<{name: string, reason: string}>}
2469
+ */
2470
+ function pageBelow(tree, route, rest) {
2471
+ const words = nameWords(rest).join(' ');
2472
+ if (words === '') return [];
2473
+ const found = [...tree.nodes.values()].filter(
2474
+ node =>
2475
+ node.route.startsWith(`${route}/`) &&
2476
+ [node.route.slice(node.route.lastIndexOf('/') + 1), node.title].some(
2477
+ name => name != null && nameWords(name).join(' ') === words,
2478
+ ) &&
2479
+ !isExperimentalTreeNode(tree, node),
2480
+ );
2481
+ return found.length === 1
2482
+ ? [{name: found[0].route, reason: found[0].summary}]
2483
+ : [];
2484
+ }
2485
+
2486
+ /**
2487
+ * A namespace's ordered children with the page further down placed as
2488
+ * spec:AST-046 FR6 says: right after the child that route words alone put
2489
+ * first, when the typed text names that child, and first otherwise. A page
2490
+ * that is that child is listed once, first.
2491
+ * @template {{name: string}} T
2492
+ * @param {string} topic
2493
+ * @param {T[]} byRoute the children as route words order them
2494
+ * @param {T[]} ordered the children as {@link namedFirst} orders them
2495
+ * @param {T[]} deeper the page further down ({@link pageBelow}), or none
2496
+ * @returns {T[]}
2497
+ */
2498
+ export function withPageBelow(topic, byRoute, ordered, deeper) {
2499
+ const kept = namesRoute(topic, byRoute[0]?.name ?? '') ? 1 : 0;
2500
+ const lead = ordered.slice(0, kept);
2501
+ const below = deeper.filter(
2502
+ page => !lead.some(entry => entry.name === page.name),
2503
+ );
2504
+ const rest = ordered
2505
+ .slice(kept)
2506
+ .filter(entry => !below.some(page => page.name === entry.name));
2507
+ return [...lead, ...below, ...rest];
2508
+ }
2509
+
2460
2510
  /**
2461
2511
  * The error for a docs argument that names nothing. For a route, it suggests
2462
2512
  * every child of the deepest namespace the route reaches, closest first by
2463
2513
  * each child's route, title and keywords, with a child the route names kept
2464
- * first. Otherwise it suggests the docs whose own name it is, or whose route
2465
- * it spells with hyphens; failing that, the topics and top-level namespaces,
2514
+ * first; the one page further down that the rest of the route names
2515
+ * ({@link pageBelow}) comes right after that child, or first. Otherwise it
2516
+ * suggests the docs whose own name it is, or whose route it spells with
2517
+ * hyphens; failing that, the topics and top-level namespaces,
2466
2518
  * closest first and cut where the matches get weaker (every one of them when
2467
2519
  * none shares a word with the argument, with the names a slip or two from it
2468
- * first). When the argument matches a component, hook or template
2469
- * (exact, folded or last segment), the command that reads that entry joins the list as
2470
- * foundation/suggest/other-command.mjs places it, and the list keeps its
2471
- * length; when no suggested doc
2472
- * shares a word with the argument, that command is the only suggestion.
2520
+ * first). When the argument matches a component, hook or template (exact,
2521
+ * folded or last segment, or a Core component or hook its last path segment
2522
+ * names, unless a stable doc has that name), the command that reads that
2523
+ * entry joins the list as foundation/suggest/other-command.mjs places it, and
2524
+ * the list keeps its length; when no suggested doc shares a word with the
2525
+ * argument, that command is the only suggestion.
2473
2526
  * When no command joins, the docs whose route, title or declared keywords
2474
2527
  * carry a typed word ({@link wordMatches}) take the place of the topics and
2475
2528
  * namespaces, the named route that list leads with first, in a list no
@@ -2485,6 +2538,8 @@ export async function unknownTopicError(topic, catalog, {cwd} = {}) {
2485
2538
  let suggestions = [];
2486
2539
  // Route children stay whole (spec:AST-046); only the other lists are cut.
2487
2540
  let routeChildren = false;
2541
+ /** @type {Array<{name: string, reason: string}>} */
2542
+ let deeper = [];
2488
2543
  if (typeof topic === 'string' && topic.includes('/')) {
2489
2544
  const parts = topic.split('/');
2490
2545
  for (
@@ -2495,6 +2550,7 @@ export async function unknownTopicError(topic, catalog, {cwd} = {}) {
2495
2550
  const near = tree.get(parts.slice(0, depth).join('/'));
2496
2551
  if (near) {
2497
2552
  routeChildren = true;
2553
+ deeper = pageBelow(tree, near.route, parts.slice(depth).join('/'));
2498
2554
  suggestions = near.slots.flatMap(slot =>
2499
2555
  slot.children.map(route => ({
2500
2556
  name: route,
@@ -2528,11 +2584,20 @@ export async function unknownTopicError(topic, catalog, {cwd} = {}) {
2528
2584
  ...catalog.names().map(name => ({name, reason: 'available topic'})),
2529
2585
  ];
2530
2586
  }
2587
+ // A child the route names stays first, ahead of another command's entry.
2588
+ let namedChild = 0;
2531
2589
  if (typeof topic === 'string' && routeChildren) {
2532
- suggestions = namedFirst(
2590
+ const byRoute = orderRouteSuggestions(topic, suggestions, {closest: false});
2591
+ namedChild = namesRoute(topic, byRoute[0]?.name ?? '') ? 1 : 0;
2592
+ suggestions = withPageBelow(
2533
2593
  topic,
2534
- orderRouteSuggestions(topic, suggestions, {closest: false}),
2535
- orderDocPages(tree, topic, suggestions, false),
2594
+ byRoute,
2595
+ namedFirst(
2596
+ topic,
2597
+ byRoute,
2598
+ orderDocPages(tree, topic, suggestions, false),
2599
+ ),
2600
+ deeper,
2536
2601
  );
2537
2602
  } else if (typeof topic === 'string') {
2538
2603
  // Every topic and namespace is listed, so a near name (`tokns` for
@@ -2583,6 +2648,7 @@ export async function unknownTopicError(topic, catalog, {cwd} = {}) {
2583
2648
  // Kept with the project's one name index (the docs catalog itself
2584
2649
  // is not asked from here).
2585
2650
  docsRoutes: routes.docsRoutesLazily,
2651
+ tail: componentTail(String(topic), hint.tailForms, tree, catalog),
2586
2652
  })
2587
2653
  : null;
2588
2654
  if (hint && elsewhere) {
@@ -2594,6 +2660,7 @@ export async function unknownTopicError(topic, catalog, {cwd} = {}) {
2594
2660
  hint.withOtherCommand(suggestions, elsewhere, String(topic), {
2595
2661
  from: 'docs',
2596
2662
  alone: !sharesAWord,
2663
+ pinned: namedChild,
2597
2664
  }) ?? [];
2598
2665
  } else if (byWords.length > 0) {
2599
2666
  suggestions = fewerWordMatches(String(topic), suggestions, byWords, 0);
@@ -2605,6 +2672,31 @@ export async function unknownTopicError(topic, catalog, {cwd} = {}) {
2605
2672
  );
2606
2673
  }
2607
2674
 
2675
+ /**
2676
+ * The names a typed last route segment may give a Core component or hook by,
2677
+ * or none when a stable doc or topic name, as typed or with its words
2678
+ * singular, is one of them: a doc wins (`icons` is a topic, so `guides/icon`
2679
+ * names no component), while an experimental doc changes no stable answer.
2680
+ * @param {string} topic
2681
+ * @param {(name: string) => string[]} formsOf other-command.mjs tailForms
2682
+ * @param {DocsTree} tree
2683
+ * @param {DocsCatalog} catalog
2684
+ * @returns {string[]}
2685
+ */
2686
+ function componentTail(topic, formsOf, tree, catalog) {
2687
+ const forms = formsOf(topic);
2688
+ const docNames = [
2689
+ ...[...tree.nodes.values()]
2690
+ .filter(node => !isExperimentalTreeNode(tree, node))
2691
+ .map(node => node.name),
2692
+ ...catalog.names(),
2693
+ ];
2694
+ const namesADoc = docNames.some(name =>
2695
+ formsOf(name).some(form => forms.includes(form)),
2696
+ );
2697
+ return namesADoc ? [] : forms;
2698
+ }
2699
+
2608
2700
  /**
2609
2701
  * The project a catalog came from, loaded again when the catalog is not one
2610
2702
  * {@link loadDocsCatalog} made. Undefined when the project does not load.
@@ -439,8 +439,8 @@ export function readBuiltPath(target: string, { fileLimit }?: {
439
439
  export function builtIntegrationPackages(target: string, cwd: string): string[];
440
440
  /**
441
441
  * The install line for the font families a known package loads (an open
442
- * font the editor's table names), as the project's integration install
443
- * guidance gives it, else in the project's package manager, and
442
+ * font with a known Fontsource package), as the project's integration
443
+ * install guidance gives it, else in the project's package manager, and
444
444
  * whether it loads every family given. A family no known package loads (a
445
445
  * self-hosted face) gets none: its package name would be a guess.
446
446
  * @param {string} projectDir
@@ -480,6 +480,7 @@ export { placeholderFixes } from "../../foundation/discovery/template-icons.mjs"
480
480
  export { iconFeatureGate } from "../../foundation/integrations/icon-features.mjs";
481
481
  export { addMatchingCore } from "../../foundation/release/notices.mjs";
482
482
  export { fontServiceFamilies } from "../../foundation/fonts/font-stylesheet.mjs";
483
+ export { declaredColorModes } from "../../foundation/discovery/color-modes.mjs";
483
484
  export { resolveRecordedTheme } from "../theme/theme.mjs";
484
485
  export { themeIdentifier } from "../theme/_fork.mjs";
485
486
  export { collectUnloadedFonts } from "../theme/build/font-warning.mjs";
@@ -578,6 +579,8 @@ export { listProjectSourceFiles, SOURCE_EXTENSIONS } from "../../foundation/fs/p
578
579
  export { projectImportsModule, specifierTargets } from "../../foundation/fs/project-sources.mjs";
579
580
  export { iconUseCommand, unlistedIconSets } from "../../foundation/discovery/icon-set-discovery.mjs";
580
581
  export { isLocalThemeOwner, planThemeAppWrite, readThemeState, resolveThemeModule } from "../../foundation/config/theme-state.mjs";
581
- export { fileMark, generatedSourceCommand, isPrivateVarRefusal, missingThemePackage, themeBuild, validateThemePrivateInputs } from "../theme/build/build.mjs";
582
+ export { fileMark, isPrivateVarRefusal, missingThemePackage, themeBuild, validateThemePrivateInputs } from "../theme/build/build.mjs";
582
583
  export { installCommandFor as packageInstallCommand, installStepFor as packageInstallStep } from "../../foundation/discovery/template-needs.mjs";
584
+ export { nextFontFix, rootLayoutImportsNextFont } from "../../foundation/fonts/next-font.mjs";
585
+ export { APP_ROOT_LAYOUT_FILES, parseAppModule } from "../../foundation/discovery/app-layout.mjs";
583
586
  export { AUTHORING_AUDIT, authoringAudit, authoringAuditData } from "./_authoring-audit.mjs";
@@ -176,7 +176,6 @@ export {
176
176
  } from '../../foundation/config/theme-state.mjs';
177
177
  export {
178
178
  fileMark,
179
- generatedSourceCommand,
180
179
  isPrivateVarRefusal,
181
180
  missingThemePackage,
182
181
  themeBuild,
@@ -188,6 +187,15 @@ export {
188
187
  } from '../../foundation/discovery/template-needs.mjs';
189
188
  export {addMatchingCore} from '../../foundation/release/notices.mjs';
190
189
  export {fontServiceFamilies} from '../../foundation/fonts/font-stylesheet.mjs';
190
+ export {declaredColorModes} from '../../foundation/discovery/color-modes.mjs';
191
+ export {
192
+ nextFontFix,
193
+ rootLayoutImportsNextFont,
194
+ } from '../../foundation/fonts/next-font.mjs';
195
+ export {
196
+ APP_ROOT_LAYOUT_FILES,
197
+ parseAppModule,
198
+ } from '../../foundation/discovery/app-layout.mjs';
191
199
  export {resolveRecordedTheme} from '../theme/theme.mjs';
192
200
  export {themeIdentifier} from '../theme/_fork.mjs';
193
201
  export {collectUnloadedFonts} from '../theme/build/font-warning.mjs';
@@ -1742,8 +1750,8 @@ export function builtIntegrationPackages(target, cwd) {
1742
1750
 
1743
1751
  /**
1744
1752
  * The install line for the font families a known package loads (an open
1745
- * font the editor's table names), as the project's integration install
1746
- * guidance gives it, else in the project's package manager, and
1753
+ * font with a known Fontsource package), as the project's integration
1754
+ * install guidance gives it, else in the project's package manager, and
1747
1755
  * whether it loads every family given. A family no known package loads (a
1748
1756
  * self-hosted face) gets none: its package name would be a guess.
1749
1757
  * @param {string} projectDir
@@ -1751,8 +1759,8 @@ export function builtIntegrationPackages(target, cwd) {
1751
1759
  * @returns {Promise<{line: string | null, coversAll: boolean}>}
1752
1760
  */
1753
1761
  export async function fontPackagesInstallLine(projectDir, families) {
1754
- const {fontsourceSuggestion} = await import('../theme-edit/_settings.mjs');
1755
- const {installLine} = await import('../theme-edit/_project.mjs');
1762
+ const {fontsourceSuggestion, installLine} =
1763
+ await import('./font-packages.mjs');
1756
1764
  const known = families.map(family => {
1757
1765
  const s = fontsourceSuggestion(family);
1758
1766
  return s?.known ? s.pkg : null;
@@ -1730,8 +1730,8 @@ export function checkIconSets(ctx) {
1730
1730
  id,
1731
1731
  label,
1732
1732
  status: 'warn',
1733
- message: `${renamed.join(' | ')}. Each entry maps the definition that replaced it.`,
1734
- fix: 'In the package that ships the set, rename each map key to the definition that replaced it (any `astryx experimental icon map` run there writes it), or install a release of the package that has.',
1733
+ message: `${renamed.join(' | ')}. Each entry maps the meaning that replaced it.`,
1734
+ fix: 'In the package that ships the set, rename each map key to the meaning that replaced it (any `astryx experimental icon map` run there writes it), or install a release of the package that has.',
1735
1735
  };
1736
1736
  }
1737
1737
  return {
@@ -1812,7 +1812,7 @@ export function checkIconPlaceholders(ctx) {
1812
1812
  label,
1813
1813
  status: 'warn',
1814
1814
  message: `${uses} placeholder icon${uses === 1 ? '' : 's'} in copied code: no set in your list has ${meanings.length > 0 ? `"${meanings.join('", "')}"` : 'these icons'}. ${where}.`,
1815
- fix: `Add a backup set that has each meaning (\`astryx discover --type icon-set\` lists sets and the definitions they map): \`${backupFix}\`; or, if you author your main set, map it there: \`${mapFix}\`. Then copy the template again, or replace each use of the placeholder (\`${found[0].local}\`) with the icon \`astryx experimental icon <meaning>\` prints, and delete its declaration. A built-in meaning (\`astryx experimental icon --definitions\` marks them) also renders from the theme by name: \`<Icon icon="<name>" />\`. Otherwise, use your own icon component (\`astryx docs icons custom-icons\`).`,
1815
+ fix: `Add a backup set that has each meaning (\`astryx discover --type icon-set\` lists sets and the meanings they map): \`${backupFix}\`; or, if you author your main set, map it there: \`${mapFix}\`. Then copy the template again, or replace each use of the placeholder (\`${found[0].local}\`) with the icon \`astryx experimental icon <meaning>\` prints, and delete its declaration. A built-in meaning (\`astryx experimental icon --definitions\` marks them) also renders from the theme by name: \`<Icon icon="<name>" />\`. Otherwise, use your own icon component (\`astryx docs icons custom-icons\`).`,
1816
1816
  };
1817
1817
  }
1818
1818
 
@@ -0,0 +1,36 @@
1
+ // @generated by scripts/sync-api-types.mjs from the JSDoc in api/**/*.mjs.
2
+ // DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
3
+
4
+ /**
5
+ * The Fontsource package for a font family, in Fontsource's own naming: an
6
+ * open font's own package (Geist is `@fontsource/geist-sans`); a variable
7
+ * family, which Fontsource names `<Name> Variable`, from
8
+ * `@fontsource-variable/<name>`; else the family's name with every run of
9
+ * other characters as one dash (`Open Sans` is `@fontsource/open-sans`).
10
+ * Null when the name gives no such package name (a name with no Latin
11
+ * letters or digits).
12
+ * @param {string} family
13
+ * @returns {string | null}
14
+ */
15
+ export function fontsourcePackageOf(family: string): string | null;
16
+ /**
17
+ * The Fontsource package to suggest installing for a family: an open
18
+ * font's own package (known to exist); none for a font a system ships (on
19
+ * any platform), which Fontsource does not publish; else the family's
20
+ * package in Fontsource's naming, which may or may not exist (`known`
21
+ * false).
22
+ * @param {string} family
23
+ * @returns {{pkg: string, known: boolean} | null}
24
+ */
25
+ export function fontsourceSuggestion(family: string): {
26
+ pkg: string;
27
+ known: boolean;
28
+ } | null;
29
+ /**
30
+ * The step that adds packages to the app: the install guidance its
31
+ * integrations give, else the add command of the project's package manager.
32
+ * @param {string} cwd
33
+ * @param {string[]} packages
34
+ * @returns {string}
35
+ */
36
+ export function installLine(cwd: string, packages: string[]): string;