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

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 (409) hide show
  1. package/README.md +7 -2
  2. package/api/build/_adapter.d.mts +7 -6
  3. package/api/build/_adapter.mjs +18 -11
  4. package/api/build/build.type.mjs +1 -1
  5. package/api/build/kit/kind.d.mts +6 -0
  6. package/api/build/kit/kind.mjs +1 -1
  7. package/api/build/kit/rank.d.mts +7 -1
  8. package/api/build/kit/rank.mjs +15 -5
  9. package/api/build/kit/signals.mjs +58 -57
  10. package/api/build/kit/start.d.mts +2 -1
  11. package/api/build/kit/start.mjs +62 -9
  12. package/api/build/kit/words.d.mts +6 -2
  13. package/api/build/kit/words.mjs +7 -3
  14. package/api/component/__fixtures__/resolutions/modules.txt +2 -2
  15. package/api/component/_adapter.d.mts +30 -24
  16. package/api/component/_adapter.mjs +72 -31
  17. package/api/component/component.mjs +4 -4
  18. package/api/component/detail/detail.d.mts +2 -2
  19. package/api/component/detail/detail.mjs +1 -1
  20. package/api/component/list/list.d.mts +2 -2
  21. package/api/component/list/list.mjs +4 -4
  22. package/api/discover/_adapter.mjs +15 -15
  23. package/api/docs/_adapter.d.mts +13 -5
  24. package/api/docs/_adapter.mjs +37 -10
  25. package/api/doctor/_adapter.d.mts +32 -0
  26. package/api/doctor/_adapter.mjs +56 -1
  27. package/api/doctor/doctor.mjs +28 -5
  28. package/api/doctor/theme-checks.mjs +165 -83
  29. package/api/error.d.mts +4 -3
  30. package/api/error.mjs +3 -2
  31. package/api/hook/_adapter.d.mts +5 -4
  32. package/api/hook/_adapter.mjs +6 -5
  33. package/api/icon/_options.d.mts +17 -0
  34. package/api/icon/_options.mjs +54 -0
  35. package/api/icon/exportIconIndex.doc.d.mts +10 -0
  36. package/api/icon/exportIconIndex.doc.mjs +59 -0
  37. package/api/icon/icon.mjs +11 -34
  38. package/api/icon/icon.type.d.mts +49 -0
  39. package/api/icon/icon.type.mjs +24 -0
  40. package/api/icon/rankIconIndex.doc.d.mts +10 -0
  41. package/api/icon/rankIconIndex.doc.mjs +79 -0
  42. package/api/icon/search/icon-index.d.mts +41 -0
  43. package/api/icon/search/icon-index.mjs +139 -0
  44. package/api/icon/search/search.d.mts +18 -0
  45. package/api/icon/search/search.mjs +13 -0
  46. package/api/index.d.mts +1 -0
  47. package/api/index.mjs +1 -0
  48. package/api/search/_adapter.d.mts +8 -5
  49. package/api/search/_adapter.mjs +14 -10
  50. package/api/search/_gather-components.d.mts +4 -4
  51. package/api/search/_gather-components.mjs +4 -3
  52. package/api/search/_gather-hooks.d.mts +2 -2
  53. package/api/search/_gather-hooks.mjs +1 -1
  54. package/api/search/_lexical.mjs +12 -2
  55. package/api/search/_priority.d.mts +10 -2
  56. package/api/search/_priority.mjs +37 -7
  57. package/api/search/_score.d.mts +12 -3
  58. package/api/search/_score.mjs +6 -3
  59. package/api/search/_words.mjs +12 -3
  60. package/api/search/search.d.mts +7 -1
  61. package/api/search/search.mjs +37 -4
  62. package/api/swizzle/_adapter.d.mts +7 -5
  63. package/api/swizzle/_adapter.mjs +7 -3
  64. package/api/swizzle/copy/copy.mjs +5 -4
  65. package/api/theme/build/build.d.mts +5 -0
  66. package/api/theme/build/build.mjs +400 -21
  67. package/api/theme/build/family.mjs +18 -7
  68. package/api/theme/build/font-warning.mjs +5 -4
  69. package/api/theme/build/input-fields.d.mts +21 -6
  70. package/api/theme/build/input-fields.mjs +104 -13
  71. package/api/theme/build/typography-values.d.mts +22 -0
  72. package/api/theme/build/typography-values.mjs +172 -22
  73. package/api/theme/build/written-values.d.mts +7 -0
  74. package/api/theme/build/written-values.mjs +57 -8
  75. package/api/theme/generateTonalPalette.doc.mjs +1 -1
  76. package/api/theme/palette/generate/generator.d.mts +14 -2
  77. package/api/theme/palette/generate/generator.mjs +94 -8
  78. package/api/theme/theme.type.d.mts +21 -4
  79. package/api/theme/theme.type.mjs +14 -5
  80. package/api/theme/themePaletteGenerate.doc.mjs +1 -1
  81. package/api/theme/themeTemplate.doc.mjs +18 -3
  82. package/api/theme-edit/_adapter.d.mts +1 -1
  83. package/api/theme-edit/_adapter.mjs +1 -1
  84. package/api/theme-edit/_catalog.d.mts +10 -4
  85. package/api/theme-edit/_catalog.mjs +81 -22
  86. package/api/theme-edit/_check.mjs +402 -88
  87. package/api/theme-edit/_color.d.mts +11 -2
  88. package/api/theme-edit/_color.mjs +23 -7
  89. package/api/theme-edit/_compiler.mjs +11 -3
  90. package/api/theme-edit/_context.d.mts +87 -6
  91. package/api/theme-edit/_context.mjs +224 -17
  92. package/api/theme-edit/_css.mjs +4 -0
  93. package/api/theme-edit/_edit.mjs +331 -58
  94. package/api/theme-edit/_how-question.d.mts +11 -0
  95. package/api/theme-edit/_how-question.mjs +2514 -234
  96. package/api/theme-edit/_how.mjs +79 -14
  97. package/api/theme-edit/_missed.mjs +294 -32
  98. package/api/theme-edit/_normal.d.mts +3 -1
  99. package/api/theme-edit/_normal.mjs +4 -1
  100. package/api/theme-edit/_palette.mjs +36 -5
  101. package/api/theme-edit/_part-words.mjs +20 -2
  102. package/api/theme-edit/_parts.d.mts +12 -1
  103. package/api/theme-edit/_parts.mjs +116 -11
  104. package/api/theme-edit/_preview-app.mjs +40 -2
  105. package/api/theme-edit/_preview.d.mts +45 -5
  106. package/api/theme-edit/_preview.mjs +173 -21
  107. package/api/theme-edit/_settings.d.mts +20 -0
  108. package/api/theme-edit/_settings.mjs +1033 -94
  109. package/api/theme-edit/_tables.mjs +2 -2
  110. package/api/theme-edit/theme-edit.type.d.mts +6 -5
  111. package/api/theme-edit/theme-edit.type.mjs +8 -8
  112. package/api/upgrade/_adapter.mjs +13 -2
  113. package/assets/component-list.generated.json +1 -1
  114. package/assets/docs/tree/authoring.doc.mjs +1 -0
  115. package/assets/docs/tree/cli.doc.mjs +1 -0
  116. package/assets/docs/tree/computer-agent-guide.doc.mjs +1 -1
  117. package/assets/docs/tree/generate-a-palette.doc.mjs +2 -2
  118. package/assets/docs/tree/global.doc.mjs +1 -0
  119. package/assets/docs/tree/single-component.doc.mjs +40 -2
  120. package/assets/docs/tree/updates.doc.mjs +1 -1
  121. package/assets/docs/tree/who-answers.doc.mjs +2 -2
  122. package/assets/docs-routes.generated.json +1 -1
  123. package/assets/docs.generated.json +2 -2
  124. package/assets/search-catalog.generated.json +2 -2
  125. package/assets/self-audit.generated.json +1 -1
  126. package/assets/templates/blocks/components/Blockquote/BlockquoteShowcase.tsx +1 -1
  127. package/assets/templates/blocks/components/BreadcrumbItem/BreadcrumbItemShowcase.tsx +4 -4
  128. package/assets/templates/blocks/components/Breadcrumbs/BreadcrumbsCustomSeparator.tsx +1 -0
  129. package/assets/templates/blocks/components/Breadcrumbs/BreadcrumbsSupportingVariant.tsx +2 -2
  130. package/assets/templates/blocks/components/Card/CardElevations.tsx +1 -1
  131. package/assets/templates/blocks/components/Card/CardWithInnerLayout.tsx +19 -3
  132. package/assets/templates/blocks/components/Card/ClickableCardWithNestedButton.tsx +11 -1
  133. package/assets/templates/blocks/components/Card/SelectableCardElevated.tsx +1 -1
  134. package/assets/templates/blocks/components/Card/SelectableCardMulti.tsx +1 -1
  135. package/assets/templates/blocks/components/Center/CenterHorizontal.tsx +1 -1
  136. package/assets/templates/blocks/components/Center/CenterInsideACard.tsx +1 -1
  137. package/assets/templates/blocks/components/ChatComposer/ChatComposerFullFeatured.tsx +8 -0
  138. package/assets/templates/blocks/components/ChatComposerDrawer/ChatComposerDrawerWithProgress.tsx +8 -2
  139. package/assets/templates/blocks/components/ChatLayout/ChatLayoutPanelChat.tsx +1 -0
  140. package/assets/templates/blocks/components/ChatLayout/ChatLayoutShowcase.tsx +1 -1
  141. package/assets/templates/blocks/components/ChatMessageBubble/ChatMessageBubbleCustomContent.tsx +9 -1
  142. package/assets/templates/blocks/components/ChatMessageBubble/ChatMessageBubbleMetadata.tsx +12 -2
  143. package/assets/templates/blocks/components/ChatMessageMetadata/ChatMessageMetadataFooter.tsx +28 -7
  144. package/assets/templates/blocks/components/ChatMessageMetadata/ChatMessageMetadataShowcase.tsx +35 -7
  145. package/assets/templates/blocks/components/Collapsible/CollapsibleShowcase.tsx +1 -1
  146. package/assets/templates/blocks/components/CommandPaletteGroup/CommandPaletteGroupBasic.tsx +20 -4
  147. package/assets/templates/blocks/components/CommandPaletteList/CommandPaletteListBasic.tsx +15 -3
  148. package/assets/templates/blocks/components/CommandPaletteList/CommandPaletteListShowcase.tsx +29 -6
  149. package/assets/templates/blocks/components/ContextMenu/ContextMenuBasic.tsx +2 -2
  150. package/assets/templates/blocks/components/ContextMenu/ContextMenuBottomSheet.tsx +1 -1
  151. package/assets/templates/blocks/components/ContextMenu/ContextMenuShowcase.tsx +2 -2
  152. package/assets/templates/blocks/components/Divider/DividerFullBleed.tsx +1 -1
  153. package/assets/templates/blocks/components/Divider/DividerShowcase.tsx +1 -1
  154. package/assets/templates/blocks/components/Divider/DividerVariants.tsx +1 -1
  155. package/assets/templates/blocks/components/DropdownMenuGroup/DropdownMenuGroupShowcase.tsx +23 -4
  156. package/assets/templates/blocks/components/EmptyState/EmptyStateActions.tsx +18 -2
  157. package/assets/templates/blocks/components/EmptyState/EmptyStateCompact.tsx +20 -2
  158. package/assets/templates/blocks/components/EmptyState/EmptyStateContainer.tsx +16 -2
  159. package/assets/templates/blocks/components/EmptyState/EmptyStateShowcase.tsx +11 -1
  160. package/assets/templates/blocks/components/Heading/HeadingTruncation.tsx +12 -2
  161. package/assets/templates/blocks/components/InternationalizationProvider/useDirectionHookUsage.tsx +1 -1
  162. package/assets/templates/blocks/components/LayoutContent/LayoutContentBasic.tsx +1 -1
  163. package/assets/templates/blocks/components/LayoutContent/LayoutContentShowcase.tsx +1 -1
  164. package/assets/templates/blocks/components/LayoutFooter/LayoutFooterActions.tsx +17 -3
  165. package/assets/templates/blocks/components/LayoutFooter/LayoutFooterShowcase.tsx +17 -3
  166. package/assets/templates/blocks/components/LayoutHeader/LayoutHeaderShowcase.tsx +15 -3
  167. package/assets/templates/blocks/components/LayoutHeader/LayoutHeaderWithActions.tsx +9 -2
  168. package/assets/templates/blocks/components/LayoutPanel/LayoutPanelNavigation.tsx +1 -1
  169. package/assets/templates/blocks/components/LayoutPanel/LayoutPanelShowcase.tsx +1 -1
  170. package/assets/templates/blocks/components/MoreMenu/MoreMenuBottomSheet.tsx +1 -1
  171. package/assets/templates/blocks/components/MultiSelector/MultiSelectorGhostToolbar.tsx +14 -2
  172. package/assets/templates/blocks/components/Outline/OutlineDensity.tsx +2 -0
  173. package/assets/templates/blocks/components/OverflowList/OverflowListShowcase.tsx +6 -1
  174. package/assets/templates/blocks/components/Pagination/PaginationVariants.tsx +4 -0
  175. package/assets/templates/blocks/components/Popover/PopoverHookUsage.tsx +17 -2
  176. package/assets/templates/blocks/components/SegmentedControl/SegmentedControlFillLayout.tsx +1 -1
  177. package/assets/templates/blocks/components/Selector/SelectorGhostToolbar.tsx +14 -2
  178. package/assets/templates/blocks/components/Selector/SelectorOptionDescriptions.tsx +8 -1
  179. package/assets/templates/blocks/components/SideNav/SideNavWithHeaderMenu.tsx +2 -2
  180. package/assets/templates/blocks/components/SideNavHeading/SideNavHeadingShowcase.tsx +2 -0
  181. package/assets/templates/blocks/components/Switch/SwitchWithStatus.tsx +1 -1
  182. package/assets/templates/blocks/components/TabList/TabListTabsFillLayout.tsx +1 -1
  183. package/assets/templates/blocks/components/TabList/TabListTabsWithActions.tsx +12 -1
  184. package/assets/templates/blocks/components/Table/TableBulkActionsTable.tsx +11 -1
  185. package/assets/templates/blocks/components/Table/TableInCard.tsx +2 -2
  186. package/assets/templates/blocks/components/Text/TextTruncation.tsx +1 -1
  187. package/assets/templates/blocks/components/Text/TextWordBreak.tsx +12 -2
  188. package/assets/templates/blocks/components/Text/TextWrap.tsx +19 -4
  189. package/assets/templates/blocks/components/TextArea/TextAreaCharacterCount.tsx +1 -1
  190. package/assets/templates/blocks/components/TextArea/TextAreaShowcase.tsx +1 -1
  191. package/assets/templates/blocks/components/TextArea/TextAreaStates.tsx +1 -1
  192. package/assets/templates/blocks/components/TextArea/TextAreaValidation.tsx +1 -1
  193. package/assets/templates/blocks/components/TextArea/TextAreaWithIcon.tsx +1 -1
  194. package/assets/templates/blocks/components/TextInput/TextInputStatusVariant.tsx +2 -2
  195. package/assets/templates/blocks/components/Timestamp/TimestampAutoFormat.tsx +15 -1
  196. package/assets/templates/blocks/components/Timestamp/TimestampRelativeFormat.tsx +15 -1
  197. package/assets/templates/blocks/components/Toolbar/ToolbarCardHeader.tsx +8 -0
  198. package/assets/templates/blocks/components/Toolbar/ToolbarSizes.tsx +12 -1
  199. package/assets/templates/blocks/components/Toolbar/ToolbarThreeSlot.tsx +18 -3
  200. package/assets/templates/blocks/components/TopNav/TopNavCenteredNavigation.tsx +6 -0
  201. package/assets/templates/blocks/components/TopNav/TopNavEnterpriseDashboard.tsx +7 -1
  202. package/assets/templates/blocks/components/TopNav/TopNavMegaMenu.tsx +2 -2
  203. package/assets/templates/blocks/components/TopNav/TopNavShowcase.tsx +9 -0
  204. package/assets/templates/components.generated.json +1 -1
  205. package/assets/templates/pages/ai-chat/page.tsx +102 -6
  206. package/assets/templates/pages/canvas-editor/page.tsx +73 -2
  207. package/assets/templates/pages/centered-hero/page.tsx +10 -4
  208. package/assets/templates/pages/course-detail/page.tsx +46 -2
  209. package/assets/templates/pages/dashboard/page.tsx +45 -16
  210. package/assets/templates/pages/dashboard-cohort-funnel/page.tsx +31 -20
  211. package/assets/templates/pages/dashboard-comparison/page.tsx +9 -0
  212. package/assets/templates/pages/dashboard-composition/page.tsx +22 -9
  213. package/assets/templates/pages/dashboard-progress/page.tsx +27 -15
  214. package/assets/templates/pages/dashboard-scorecard/page.tsx +9 -0
  215. package/assets/templates/pages/detail-page/page.tsx +105 -77
  216. package/assets/templates/pages/documentation/page.tsx +15 -2
  217. package/assets/templates/pages/documentation-design/page.tsx +7 -34
  218. package/assets/templates/pages/documentation-technical/page.tsx +76 -12
  219. package/assets/templates/pages/editor/page.tsx +26 -21
  220. package/assets/templates/pages/file-explorer/page.tsx +35 -1
  221. package/assets/templates/pages/form-two-column/page.tsx +2 -3
  222. package/assets/templates/pages/form-wizard/page.tsx +31 -3
  223. package/assets/templates/pages/form-wizard-vertical/page.tsx +32 -3
  224. package/assets/templates/pages/gallery-hero/page.tsx +2 -1
  225. package/assets/templates/pages/ide/page.tsx +15 -1
  226. package/assets/templates/pages/incident-console/page.tsx +2 -1
  227. package/assets/templates/pages/incident-console/template.doc.mjs +1 -1
  228. package/assets/templates/pages/kanban-board/page.tsx +39 -2
  229. package/assets/templates/pages/payment-form/page.tsx +77 -39
  230. package/assets/templates/pages/product-gallery/page.tsx +16 -14
  231. package/assets/templates/pages/settings/page.tsx +35 -3
  232. package/assets/templates/pages/settings-dialog/page.tsx +34 -5
  233. package/assets/templates/pages/settings-sidebar/page.tsx +23 -3
  234. package/assets/templates/pages/shell-nav/page.tsx +28 -12
  235. package/assets/templates/pages/shell-side-nav/page.tsx +16 -1
  236. package/assets/templates/pages/shell-top-nav/page.tsx +27 -1
  237. package/assets/templates/pages/side-gallery/page.tsx +1 -1
  238. package/assets/templates/pages/table/page.tsx +2 -1
  239. package/assets/templates/pages/table/template.doc.mjs +1 -1
  240. package/assets/templates/pages/table-collapsible/page.tsx +1 -1
  241. package/assets/templates/pages/table-comparison/page.tsx +1 -1
  242. package/assets/templates/pages/table-filter/page.tsx +9 -2
  243. package/assets/templates/pages/table-grouped/page.tsx +16 -6
  244. package/assets/templates/pages/table-inbox/page.tsx +60 -1
  245. package/assets/templates/pages/table-page/page.tsx +10 -2
  246. package/assets/templates/pages/table-tree/page.tsx +95 -13
  247. package/assets/templates/pages/theme-showcase/page.tsx +107 -11
  248. package/assets/templates/pages/work-item-detail/page.tsx +88 -74
  249. package/assets/templates/pages/work-item-detail/template.doc.mjs +0 -1
  250. package/assets/templates/themes/gothic/gothicPaletteRefs.generated.ts +1 -1
  251. package/assets/templates/themes/gothic/gothicTheme.ts +5 -0
  252. package/assets/templates/themes/neutral/neutralTheme.ts +1 -1
  253. package/assets/templates/themes/y2k/y2kPaletteRefs.generated.ts +1 -1
  254. package/assets/templates/themes/y2k/y2kTheme.ts +1 -1
  255. package/authoring/debug/parse.d.mts +1 -1
  256. package/authoring/doctypes/_schema.d.mts +22 -8
  257. package/authoring/doctypes/_schema.mjs +31 -0
  258. package/authoring/doctypes/command/command.doc.mjs +24 -0
  259. package/authoring/doctypes/command/type.ts +31 -0
  260. package/authoring/doctypes/component/component.doc.mjs +1 -1
  261. package/authoring/doctypes/component/type.ts +8 -5
  262. package/authoring/doctypes/namespace/namespace.doc.mjs +6 -0
  263. package/authoring/doctypes/namespace/type.ts +4 -0
  264. package/authoring/doctypes/template/type.ts +0 -7
  265. package/authoring/index.d.ts +6 -1
  266. package/authoring/integration/integration.doc.mjs +7 -0
  267. package/authoring/integration/schema.d.mts +6 -0
  268. package/authoring/integration/schema.mjs +3 -0
  269. package/authoring/integration/type.ts +34 -0
  270. package/clients/cli/build-id.generated.json +1 -1
  271. package/clients/cli/commands/component.doc.mjs +1 -0
  272. package/clients/cli/commands/component.mjs +5 -1
  273. package/clients/cli/commands/docs.doc.mjs +1 -1
  274. package/clients/cli/commands/experimental/index.mjs +4 -1
  275. package/clients/cli/commands/experimental/theme.mjs +139 -64
  276. package/clients/cli/commands/experimental-render.doc.mjs +2 -0
  277. package/clients/cli/commands/experimental-theme-add.doc.mjs +2 -0
  278. package/clients/cli/commands/experimental-theme-compile.doc.mjs +1 -0
  279. package/clients/cli/commands/experimental-theme-editor-how.doc.mjs +1 -0
  280. package/clients/cli/commands/experimental-theme-editor-new.doc.mjs +3 -1
  281. package/clients/cli/commands/experimental-theme-editor-set.doc.mjs +3 -2
  282. package/clients/cli/commands/experimental-theme-editor-show.doc.mjs +2 -1
  283. package/clients/cli/commands/experimental-theme-editor-undo.doc.mjs +3 -2
  284. package/clients/cli/commands/experimental-theme-eject.doc.mjs +1 -0
  285. package/clients/cli/commands/experimental-theme-preview-add.doc.mjs +1 -0
  286. package/clients/cli/commands/experimental-theme-preview-app.doc.mjs +1 -0
  287. package/clients/cli/commands/experimental-theme-remove.doc.mjs +2 -0
  288. package/clients/cli/commands/experimental-theme-targets.doc.mjs +1 -0
  289. package/clients/cli/commands/experimental-theme-template.doc.mjs +1 -0
  290. package/clients/cli/commands/experimental-theme-use.doc.mjs +2 -0
  291. package/clients/cli/commands/gap-report.doc.mjs +1 -0
  292. package/clients/cli/commands/hook.doc.mjs +1 -1
  293. package/clients/cli/commands/init.doc.mjs +1 -1
  294. package/clients/cli/commands/integration-add.doc.mjs +1 -0
  295. package/clients/cli/commands/manifest.mjs +10 -3
  296. package/clients/cli/commands/swizzle.doc.mjs +8 -1
  297. package/clients/cli/commands/swizzle.mjs +13 -6
  298. package/clients/cli/commands/template.doc.mjs +3 -0
  299. package/clients/cli/commands/theme-add.doc.mjs +2 -1
  300. package/clients/cli/commands/theme-build.doc.mjs +2 -1
  301. package/clients/cli/commands/theme-eject.doc.mjs +1 -1
  302. package/clients/cli/commands/theme-palette-generate.doc.mjs +3 -2
  303. package/clients/cli/commands/theme-remove.doc.mjs +2 -1
  304. package/clients/cli/commands/theme-targets.doc.mjs +1 -0
  305. package/clients/cli/commands/theme-template.doc.mjs +1 -0
  306. package/clients/cli/commands/theme-use.doc.mjs +2 -1
  307. package/clients/cli/commands/theme.doc.mjs +7 -2
  308. package/clients/cli/commands/theme.mjs +21 -5
  309. package/clients/cli/index.mjs +167 -59
  310. package/clients/cli/lib/base-gate.mjs +522 -0
  311. package/clients/cli/lib/command-path.mjs +26 -0
  312. package/clients/cli/lib/define-command.mjs +161 -12
  313. package/clients/cli/lib/json-shim.mjs +34 -31
  314. package/clients/cli/lib/manifest.d.ts +14 -0
  315. package/clients/cli/lib/manifest.mjs +78 -22
  316. package/clients/cli/lib/root-args.mjs +79 -0
  317. package/clients/cli/lib/stray-option.mjs +21 -8
  318. package/clients/cli/lib/unknown-command.mjs +27 -6
  319. package/clients/cli/manifest.generated.json +1 -1
  320. package/clients/cli/run.mjs +13 -1
  321. package/foundation/agent-docs/computer-agent-text.mjs +1 -1
  322. package/foundation/bases/core-docs.d.mts +10 -0
  323. package/foundation/bases/core-docs.mjs +42 -0
  324. package/foundation/bases/core.d.mts +11 -0
  325. package/foundation/bases/core.mjs +32 -0
  326. package/foundation/bases/requirements.d.mts +128 -0
  327. package/foundation/bases/requirements.mjs +193 -0
  328. package/foundation/bases/resolve.d.mts +134 -0
  329. package/foundation/bases/resolve.mjs +295 -0
  330. package/foundation/bases/state.d.mts +24 -0
  331. package/foundation/bases/state.mjs +46 -0
  332. package/foundation/bases/steps.d.mts +49 -0
  333. package/foundation/bases/steps.mjs +88 -0
  334. package/foundation/config/project.d.mts +14 -0
  335. package/foundation/config/project.mjs +68 -1
  336. package/foundation/discovery/cli-self-docs.mjs +9 -1
  337. package/foundation/discovery/command-pointers.d.mts +28 -0
  338. package/foundation/discovery/command-pointers.mjs +31 -0
  339. package/foundation/discovery/component-discovery.d.mts +9 -8
  340. package/foundation/discovery/component-discovery.mjs +9 -4
  341. package/foundation/discovery/docs-discovery.d.mts +13 -5
  342. package/foundation/discovery/docs-discovery.mjs +25 -6
  343. package/foundation/discovery/hook-discovery.d.mts +6 -6
  344. package/foundation/discovery/hook-discovery.mjs +6 -4
  345. package/foundation/discovery/template-adapter.mjs +5 -0
  346. package/foundation/discovery/template-ids.d.mts +1 -1
  347. package/foundation/discovery/template-ids.mjs +5 -1
  348. package/foundation/discovery/theme-discovery.mjs +3 -0
  349. package/foundation/discovery/theme-imports.mjs +19 -1
  350. package/foundation/doc-compiler/tree.d.mts +4 -2
  351. package/foundation/doc-compiler/tree.mjs +46 -1
  352. package/foundation/env/package-manager.d.mts +7 -0
  353. package/foundation/env/package-manager.mjs +21 -0
  354. package/foundation/fonts/font-stylesheet.d.mts +8 -0
  355. package/foundation/fonts/font-stylesheet.mjs +26 -2
  356. package/foundation/fs/gather-cache.mjs +44 -13
  357. package/foundation/fs/own-modules.d.mts +29 -0
  358. package/foundation/fs/own-modules.mjs +57 -0
  359. package/foundation/fs/paths.d.mts +30 -2
  360. package/foundation/fs/paths.mjs +49 -2
  361. package/foundation/integrations/integrations.d.mts +4 -0
  362. package/foundation/integrations/integrations.mjs +6 -1
  363. package/foundation/release/choose.d.mts +7 -0
  364. package/foundation/release/choose.mjs +16 -2
  365. package/foundation/release/notices.d.mts +26 -0
  366. package/foundation/release/notices.mjs +48 -19
  367. package/foundation/release/project.d.mts +3 -2
  368. package/foundation/release/project.mjs +4 -5
  369. package/foundation/release/run-context.d.mts +7 -2
  370. package/foundation/release/run-context.mjs +6 -2
  371. package/foundation/render/css-cut.mjs +86 -6
  372. package/foundation/render/cut-short.d.mts +35 -0
  373. package/foundation/render/cut-short.mjs +124 -0
  374. package/foundation/render/font-probe.d.mts +27 -0
  375. package/foundation/render/font-probe.mjs +77 -0
  376. package/foundation/render/layers.d.mts +1 -9
  377. package/foundation/render/layers.mjs +2 -111
  378. package/foundation/render/page-worker.mjs +83 -6
  379. package/foundation/render/picture-chrome.mjs +24 -2
  380. package/foundation/render/picture-playwright.mjs +22 -2
  381. package/foundation/render/picture-window.d.mts +20 -4
  382. package/foundation/render/picture-window.mjs +137 -4
  383. package/foundation/response/base.d.ts +25 -0
  384. package/foundation/response/error-codes.d.mts +4 -1
  385. package/foundation/response/error-codes.d.ts +4 -1
  386. package/foundation/response/error-codes.doc.mjs +17 -0
  387. package/foundation/response/error-codes.mjs +21 -0
  388. package/foundation/response/json.d.mts +3 -1
  389. package/foundation/response/json.mjs +7 -2
  390. package/foundation/response/response-types.doc.mjs +2 -2
  391. package/foundation/suggest/name-index.d.mts +2 -1
  392. package/foundation/suggest/name-index.mjs +1 -1
  393. package/foundation/suggest/other-command.d.mts +4 -1
  394. package/foundation/suggest/other-command.mjs +23 -6
  395. package/foundation/text/string-utils.d.mts +7 -2
  396. package/foundation/text/string-utils.mjs +24 -10
  397. package/package.json +6 -6
  398. package/assets/templates/pages/access-denied/page.tsx +0 -101
  399. package/assets/templates/pages/access-denied/template.doc.mjs +0 -24
  400. package/assets/templates/pages/error-page/page.tsx +0 -130
  401. package/assets/templates/pages/error-page/template.doc.mjs +0 -22
  402. package/assets/templates/pages/not-found/page.tsx +0 -124
  403. package/assets/templates/pages/not-found/template.doc.mjs +0 -30
  404. package/assets/templates/pages/review-workspace/page.tsx +0 -551
  405. package/assets/templates/pages/review-workspace/template.doc.mjs +0 -31
  406. package/assets/templates/pages/run-console/page.tsx +0 -945
  407. package/assets/templates/pages/run-console/template.doc.mjs +0 -27
  408. package/assets/templates/pages/welcome-portal/page.tsx +0 -538
  409. package/assets/templates/pages/welcome-portal/template.doc.mjs +0 -38
@@ -25,10 +25,10 @@ import {
25
25
  loadTemplates,
26
26
  loadWeights,
27
27
  pageDestination,
28
- requireBuildCoreDir,
28
+ buildCoreContentDir,
29
29
  templateSetupNotes,
30
30
  } from '../_adapter.mjs';
31
- import {ideaKind} from './kind.mjs';
31
+ import {ideaKind, nameTerms} from './kind.mjs';
32
32
  import {pickStart, rankPages} from './rank.mjs';
33
33
  import {pickFit} from './weights.mjs';
34
34
  import {readNames} from './words.mjs';
@@ -125,6 +125,29 @@ function blockScore(r) {
125
125
  return [r.name, r.score, coverage?.matched ?? null, coverage?.total ?? null];
126
126
  }
127
127
 
128
+ /**
129
+ * The not-ready page template the idea names and search matches directly, or
130
+ * null: the one case where build's reason names a template it does not start
131
+ * from. Search for the kit leaves not-ready templates out, so only an idea
132
+ * that names one outright pays for a search that keeps them.
133
+ * @param {string} query the caller's idea
134
+ * @param {{name: string}[]} notReady the project's not-ready page templates
135
+ * @param {() => Promise<SearchResultEntry[]>} searchAll search's results with every template
136
+ * @param {(r: SearchResultEntry) => boolean} pageMatch
137
+ * @returns {Promise<string | null>}
138
+ */
139
+ async function namedNotReady(query, notReady, searchAll, pageMatch) {
140
+ /** @param {{name: string}} t */
141
+ const named = t =>
142
+ namedOutright([t.name], readNames(query, [{name: t.name}]), [t])[0];
143
+ const names = new Set(notReady.filter(named).map(t => t.name));
144
+ if (names.size === 0) return null;
145
+ const found = (await searchAll()).find(
146
+ r => names.has(r.name) && pageMatch(r) && r.score >= PAGE_DIRECT,
147
+ );
148
+ return found?.name ?? null;
149
+ }
150
+
128
151
  /**
129
152
  * Build's signals for one request (see {@link KitSignals}).
130
153
  *
@@ -136,7 +159,7 @@ export async function kitSignals(query, options = {}) {
136
159
  const {cwd = process.cwd(), type, limit = 60} = options;
137
160
  // A kit is built from Core's components, hooks, and templates. An open
138
161
  // search without core covers the docs alone, so the kit asks for core here.
139
- if (type !== 'doc') coreDirOrThrow(requireBuildCoreDir, cwd);
162
+ if (type !== 'doc') coreDirOrThrow(buildCoreContentDir, cwd);
140
163
  // search()'s JSDoc @returns widens results to object[]; the SearchResponse
141
164
  // shape is the contract (api/search/search.type.mjs). Cast locally rather than
142
165
  // tightening the search @returns (a separate follow-up).
@@ -145,43 +168,36 @@ export async function kitSignals(query, options = {}) {
145
168
  const wantsPages = !type || type === 'template';
146
169
  const templates = wantsPages
147
170
  ? await loadTemplates(cwd)
148
- : {pages: [], blocks: [], notReadyPages: 0};
171
+ : {pages: [], blocks: [], notReadyPages: []};
149
172
  const catalog = templates.pages;
150
173
  // Search reads a page template the idea names in any case, separator or
151
174
  // with a neighbour-letter swap in a word of six or more letters as that template's own words
152
175
  // (readNames), as the page ranker does, so such a name matches by name.
153
176
  const searched = wantsPages ? readNames(query, catalog) : query;
154
- // Search wider than the surfaced kit so a flood of doc matches cannot bury
155
- // the page templates past the cutoff; the caller's `limit` still caps the
156
- // kit below. A non-positive or non-integer limit is passed through
157
- // unchanged so search rejects it (ERR_INVALID_ARGUMENT).
158
- const wide =
159
- Number.isInteger(limit) && limit > 0 ? Math.max(limit, 200) : limit;
160
- // A page template not ready yet is still a search match, but build reads
161
- // search as if it were absent: it asks for one more result per such
162
- // template, sets them aside, and keeps the same number of results, so none
163
- // takes a block's or a component's place.
177
+ const searchOptions = {
178
+ cwd,
179
+ type,
180
+ // Search wider than the surfaced kit so a flood of doc matches cannot
181
+ // bury the page templates past the cutoff; the caller's `limit` still
182
+ // caps the kit below. A non-positive or non-integer limit is passed
183
+ // through unchanged so search rejects it (ERR_INVALID_ARGUMENT).
184
+ limit: Number.isInteger(limit) && limit > 0 ? Math.max(limit, 200) : limit,
185
+ };
164
186
  const result =
165
187
  /** @type {import('../../search/search.type.mjs').SearchResponse} */ (
166
188
  await search(searched, {
167
- cwd,
168
- type,
169
- limit: wide + (wide > 0 ? templates.notReadyPages : 0),
189
+ ...searchOptions,
190
+ // Build starts only from ready page templates, so it reads search as
191
+ // if a template not ready yet were absent: such a template takes no
192
+ // place, moves no order and adds nothing to the count.
193
+ readyTemplatesOnly: true,
170
194
  })
171
195
  );
172
- /** @param {SearchResultEntry} r */
173
- const isReady = r =>
174
- catalog.some(t => t.name === r.name && t.package === r.package);
175
- /** @param {SearchResultEntry} r */
176
- const notReadyPage = r =>
177
- r.domain === 'template' && r.kind !== 'block' && !isReady(r);
178
- const allResults = result.data.results;
179
- const results = allResults.filter(r => !notReadyPage(r)).slice(0, wide);
196
+ const results = result.data.results;
180
197
  // The TOTAL number of matches, not the number that survived `limit`. The kit
181
198
  // below is deliberately small (≤3 pages, ≤5 blocks, ≤6 components) and
182
199
  // `results` is itself capped, so every other count here is a cap; this is the
183
- // one field that says how much the query actually matched. It is search's
184
- // own total, so it also counts not-ready page templates that match.
200
+ // one field that says how much the query actually matched.
185
201
  const matchCount = result.data.matchCount;
186
202
 
187
203
  /**
@@ -197,12 +213,6 @@ export async function kitSignals(query, options = {}) {
197
213
  return (coverage?.matched ?? 0) / total >= PAGE_COVERAGE;
198
214
  };
199
215
 
200
- // Build starts only from ready page templates, and the kit reads only
201
- // search's other results: a template not ready yet is no direct match, does
202
- // not hold back the shell lift, is never listed, and takes no place from a
203
- // page, block or component. The one exception is the reason: when the idea
204
- // names a not-ready template that search matched directly, the reason says
205
- // it is not ready yet.
206
216
  /** @param {SearchResultEntry} r */
207
217
  const pageMatch = r =>
208
218
  r.domain === 'template' &&
@@ -210,17 +220,15 @@ export async function kitSignals(query, options = {}) {
210
220
  r.score >= PAGE_FLOOR &&
211
221
  covers(r);
212
222
  const matchedPages = results.filter(pageMatch).slice(0, 3);
213
- // Any not-ready template the idea names and search matched directly, not
214
- // only search's first: another not-ready template ranked above it must not
215
- // hide the one the reader asked for.
216
- const namedUnready =
217
- allResults.find(
218
- r =>
219
- pageMatch(r) &&
220
- !isReady(r) &&
221
- r.score >= PAGE_DIRECT &&
222
- namedOutright([r.name], readNames(query, [{name: r.name}]), [r])[0],
223
- )?.name ?? null;
223
+ const namedUnready = await namedNotReady(
224
+ query,
225
+ templates.notReadyPages,
226
+ async () =>
227
+ /** @type {import('../../search/search.type.mjs').SearchResponse} */ (
228
+ await search(searched, searchOptions)
229
+ ).data.results,
230
+ pageMatch,
231
+ );
224
232
  const searchedBlocks = results.filter(
225
233
  r => r.domain === 'template' && r.kind === 'block',
226
234
  );
@@ -245,18 +253,9 @@ export async function kitSignals(query, options = {}) {
245
253
  * `start`, which always scaffolds. Copied rather than mutated: these entries
246
254
  * come from `search()` and are not this function's to modify.
247
255
  */
248
- // The kit names only page templates build could start from: a match the
249
- // catalog holds as not ready is left out of the surfaced list, and the
250
- // response's `directMatch` and `--skeleton` describe that list. The start
251
- // is still chosen from every match (chooseStart).
252
- const startable = matchedPages.filter(page =>
253
- catalog.some(t => t.name === page.name && t.package === page.package),
254
- );
255
- const shownDirect =
256
- directMatch && startable[0]?.name === matchedPages[0]?.name;
257
- const pages = shownDirect
258
- ? startable
259
- : startable.map(page => ({
256
+ const pages = directMatch
257
+ ? matchedPages
258
+ : matchedPages.map(page => ({
260
259
  ...page,
261
260
  command: `${page.command} --skeleton`,
262
261
  }));
@@ -289,6 +288,7 @@ export async function kitSignals(query, options = {}) {
289
288
  const kind = wantsPages ? ideaKind(query, catalog, components) : 'page';
290
289
  /** @param {import('../_adapter.mjs').PageTemplate} t */
291
290
  const placeOf = t => pageDestination(t.name, cwd);
291
+ const pieceWords = new Set(components.map(c => nameTerms(c).at(-1) ?? ''));
292
292
  const chosen = wantsPages
293
293
  ? chooseStart(
294
294
  ranked,
@@ -299,6 +299,7 @@ export async function kitSignals(query, options = {}) {
299
299
  query,
300
300
  placeOf,
301
301
  namedUnready,
302
+ pieceWords,
302
303
  )
303
304
  : null;
304
305
  // Name the ranker's next two templates beside the start: the reader judges
@@ -355,7 +356,7 @@ export async function kitSignals(query, options = {}) {
355
356
  query: String(query).trim(),
356
357
  idea: searched,
357
358
  matchCount,
358
- directMatch: shownDirect,
359
+ directMatch,
359
360
  start,
360
361
  pages: pagesKept,
361
362
  blocks: blocksKept,
@@ -23,9 +23,10 @@
23
23
  * is scaffolded to, quoted for a shell; null when none is known
24
24
  * @param {string | null} [unready] a not-ready page template the idea names
25
25
  * and search matched directly; the reason says it is not ready yet
26
+ * @param {Set<string>} [pieceWords] the last word of each component's name
26
27
  * @returns {Omit<BuildStart, 'alternatives' | 'isReady'> | null}
27
28
  */
28
- export function chooseStart(ranked: import("./rank.mjs").RankedPage[], kind: import("./rank.mjs").IdeaKind, pages: SearchResultEntry[], directMatch: boolean, catalog: PageTemplate[], idea: string, placeOf?: (t: PageTemplate) => string | null, unready?: string | null): Omit<BuildStart, "alternatives" | "isReady"> | null;
29
+ export function chooseStart(ranked: import("./rank.mjs").RankedPage[], kind: import("./rank.mjs").IdeaKind, pages: SearchResultEntry[], directMatch: boolean, catalog: PageTemplate[], idea: string, placeOf?: (t: PageTemplate) => string | null, unready?: string | null, pieceWords?: Set<string>): Omit<BuildStart, "alternatives" | "isReady"> | null;
29
30
  /**
30
31
  * The next best page templates beside the start (spec:AST-048/FR7), in the
31
32
  * order the start itself is chosen from. The candidates are the ranker's (a
@@ -11,8 +11,13 @@ import {loadWeights} from '../_adapter.mjs';
11
11
  import {asksForNewPage} from './kind.mjs';
12
12
  import {pickAlternatives, pickStart} from './rank.mjs';
13
13
  import {hasEditPhrase, shellCallScore} from './shellcall.mjs';
14
- import {isAppShell} from './words.mjs';
15
- import {blendOrder, blendSummary, weighStart} from './weights.mjs';
14
+ import {isAppShell, keywordUnits, phrasesIn, terms} from './words.mjs';
15
+ import {
16
+ blendOrder,
17
+ blendSummary,
18
+ namedOutright,
19
+ weighStart,
20
+ } from './weights.mjs';
16
21
 
17
22
  /**
18
23
  * @typedef {import('../../search/search.type.mjs').SearchResultEntry} SearchResultEntry
@@ -29,6 +34,20 @@ import {blendOrder, blendSummary, weighStart} from './weights.mjs';
29
34
  */
30
35
  const FALLBACK_STARTS = ['shell-top-nav', 'blank'];
31
36
 
37
+ /**
38
+ * Whether an idea names one of a shell variant's own keywords as a whole
39
+ * phrase. The default app shell needs no such words.
40
+ * @param {{name: string} | null | undefined} page
41
+ * @param {string} idea
42
+ * @param {readonly {name: string, keywords?: readonly string[]}[]} catalog
43
+ */
44
+ function namesShellVariant(page, idea, catalog) {
45
+ if (!page || page.name === FALLBACK_STARTS[0]) return true;
46
+ const doc = catalog.find(t => t.name === page.name);
47
+ const units = keywordUnits(doc?.keywords ?? [], terms);
48
+ return phrasesIn(terms(idea), units, {oneWord: true}).size > 0;
49
+ }
50
+
32
51
  /**
33
52
  * A page template as the kit names it: the command that selects exactly that
34
53
  * template and scaffolds it to `to`, or to the `<path>` placeholder when no
@@ -50,15 +69,23 @@ export const asTemplate = (t, to = null) => ({
50
69
  * null for a whole page.
51
70
  * @param {import('./rank.mjs').IdeaKind} kind
52
71
  * @param {boolean} inPage whether the start is the page the idea names
72
+ * @param {{variant?: string | null, base?: string | null}} [away] for a part
73
+ * that starts from the app shell although it names a page family: the
74
+ * variant page the idea names, else the family's base page, which does not
75
+ * lead
53
76
  * @returns {string | null}
54
77
  */
55
- function placement(kind, inPage) {
78
+ function placement(kind, inPage, away = {}) {
56
79
  if (kind === 'edit')
57
80
  return 'the idea changes a page you already have, so keep it and add blocks to it; a new page starts from the app shell.';
58
81
  if (kind === 'part')
59
82
  return inPage
60
83
  ? 'the idea is a part of a page, so it starts from the page it names.'
61
- : 'the idea is a part of a page and names no page, so it starts from the app shell.';
84
+ : away.variant
85
+ ? `the idea is a part of \`${away.variant}\`, a variant page; a part starts from a family's base page only when that page leads, so it starts from the app shell.`
86
+ : away.base
87
+ ? `the idea is a part of a page in \`${away.base}\`'s family; a part starts there only when \`${away.base}\` leads, so it starts from the app shell.`
88
+ : 'the idea is a part of a page and names no page, so it starts from the app shell.';
62
89
  return null;
63
90
  }
64
91
 
@@ -148,6 +175,7 @@ function liftFromShell(ranked, kind, catalog, idea) {
148
175
  * is scaffolded to, quoted for a shell; null when none is known
149
176
  * @param {string | null} [unready] a not-ready page template the idea names
150
177
  * and search matched directly; the reason says it is not ready yet
178
+ * @param {Set<string>} [pieceWords] the last word of each component's name
151
179
  * @returns {Omit<BuildStart, 'alternatives' | 'isReady'> | null}
152
180
  */
153
181
  export function chooseStart(
@@ -159,6 +187,7 @@ export function chooseStart(
159
187
  idea,
160
188
  placeOf = () => null,
161
189
  unready = null,
190
+ pieceWords = new Set(),
162
191
  ) {
163
192
  const direct = directMatch ? pages[0].name : null;
164
193
  // The reason never denies a match the same response reports: a direct
@@ -177,7 +206,7 @@ export function chooseStart(
177
206
  direct && direct !== startName
178
207
  ? `Search matched \`${direct}\` by name, but ${place}`
179
208
  : place[0].toUpperCase() + place.slice(1);
180
- const proposed = pickStart(ranked, kind);
209
+ const proposed = pickStart(ranked, kind, pieceWords);
181
210
  // The checked-in word weights (weights.mjs), blended with the ranker's
182
211
  // scores, decide the start of a whole page, so it can differ from the
183
212
  // ranker's own pick, its head-noun family included. A part or an edit starts
@@ -191,14 +220,23 @@ export function chooseStart(
191
220
  : undefined;
192
221
  // A shell start keeps the shell the ranker named, if any, and never replaces
193
222
  // the template the ranker chose for a page search matched directly.
194
- const pick =
223
+ const kept =
195
224
  weighed === undefined
196
225
  ? proposed
197
226
  : weighed === null
198
227
  ? isAppShell(proposed) || (proposed && direct)
199
228
  ? proposed
200
229
  : null
201
- : (ranked.find(r => r.name === weighed) ?? proposed);
230
+ : undefined;
231
+ // A part, an edit or a kept shell starts from a shell variant only when the
232
+ // idea names that variant's own keywords; otherwise it starts from the
233
+ // default app shell.
234
+ const pick =
235
+ kept === undefined
236
+ ? (ranked.find(r => r.name === weighed) ?? proposed)
237
+ : isAppShell(kept) && !direct && !namesShellVariant(kept, idea, catalog)
238
+ ? null
239
+ : kept;
202
240
  // An idea that would start on the app shell starts from the blend's best page
203
241
  // when the decision's whole-page probability is at least 0.30. A direct match,
204
242
  // ready or not, keeps the start and reason it already has.
@@ -233,14 +271,29 @@ export function chooseStart(
233
271
  const nearest =
234
272
  (ranked[0]?.name === shell.name && ranked[0].hits > 0) ||
235
273
  (weighed === null && !!proposed && proposed.family !== 'Shell');
236
- const place = placement(kind, false);
274
+ // A part placed on a family whose variant leads (DEC-13): the reason
275
+ // names the variant when the idea names it by its own name, else the
276
+ // family's base page, and says why build did not start there.
277
+ const lead = ranked[0];
278
+ const onVariant =
279
+ kind === 'part' && lead?.familyNamed && !lead.base && !isAppShell(lead);
280
+ const variant =
281
+ onVariant && namedOutright([lead.name], idea, catalog)[0]
282
+ ? lead.name
283
+ : null;
284
+ const base = onVariant
285
+ ? (ranked.find(r => r.base && r.family === lead.family)?.name ?? null)
286
+ : null;
287
+ const place = placement(kind, false, {variant, base});
237
288
  return {
238
289
  ...asTemplate(shell, placeOf(shell)),
239
290
  basis: 'fallback',
240
291
  reason: unready
241
292
  ? notReady(shell.name)
242
293
  : place
243
- ? placed(place, shell.name)
294
+ ? variant && variant === direct
295
+ ? place[0].toUpperCase() + place.slice(1)
296
+ : placed(place, shell.name)
244
297
  : direct
245
298
  ? weighed === null
246
299
  ? `Search matched \`${direct}\` by name, but the app shell is the closer start.`
@@ -45,12 +45,16 @@ export function keywordUnits(keywords: readonly string[], read: (text: string) =
45
45
  /**
46
46
  * The phrase units (two or more words) a request names: the unit's words
47
47
  * appear next to each other, in order, in the request's words as the same
48
- * reader reads them.
48
+ * reader reads them. With `oneWord`, a one-word unit the request names counts
49
+ * too.
49
50
  * @param {readonly string[]} words the request's words, in order
50
51
  * @param {Iterable<string>} units
52
+ * @param {{oneWord?: boolean}} [options]
51
53
  * @returns {Set<string>}
52
54
  */
53
- export function phrasesIn(words: readonly string[], units: Iterable<string>): Set<string>;
55
+ export function phrasesIn(words: readonly string[], units: Iterable<string>, { oneWord }?: {
56
+ oneWord?: boolean;
57
+ }): Set<string>;
54
58
  /**
55
59
  * The words a template's keyword units give an idea: each one-word keyword,
56
60
  * and every word of each phrase keyword the idea names (`phrasesIn`). A named
@@ -168,16 +168,20 @@ export function keywordUnits(keywords, read) {
168
168
  /**
169
169
  * The phrase units (two or more words) a request names: the unit's words
170
170
  * appear next to each other, in order, in the request's words as the same
171
- * reader reads them.
171
+ * reader reads them. With `oneWord`, a one-word unit the request names counts
172
+ * too.
172
173
  * @param {readonly string[]} words the request's words, in order
173
174
  * @param {Iterable<string>} units
175
+ * @param {{oneWord?: boolean}} [options]
174
176
  * @returns {Set<string>}
175
177
  */
176
- export function phrasesIn(words, units) {
178
+ export function phrasesIn(words, units, {oneWord = false} = {}) {
177
179
  const text = ` ${words.join(' ')} `;
178
180
  const found = new Set();
179
181
  for (const unit of units) {
180
- if (unit.includes(' ') && text.includes(` ${unit} `)) found.add(unit);
182
+ if ((oneWord || unit.includes(' ')) && text.includes(` ${unit} `)) {
183
+ found.add(unit);
184
+ }
181
185
  }
182
186
  return found;
183
187
  }
@@ -183,7 +183,7 @@ onMediaTokens onMediaTokens theme/MediaTheme.doc.mjs theme/onMediaTokens.ts
183
183
  optionShape optionShape Selector/Selector.doc.mjs Selector/optionShape.ts
184
184
  outsidePress outsidePress Layer/Layer.doc.mjs Layer/outsidePress.ts
185
185
  paginateData paginateData Table/Table.doc.mjs Table/plugins/pagination/paginateData.ts
186
- paging Pagination Pagination/Pagination.doc.mjs motion/paging.ts
186
+ paging ERR_UNKNOWN_COMPONENT - motion/paging.ts
187
187
  parseOutlineFromMarkdown parseOutlineFromMarkdown Outline/Outline.doc.mjs Outline/parseOutlineFromMarkdown.ts
188
188
  parser parser Markdown/Markdown.doc.mjs Markdown/parser.ts
189
189
  popoverOperations popoverOperations Layer/Layer.doc.mjs Layer/popoverOperations.ts
@@ -233,7 +233,7 @@ tokenReferences tokenReferences theme/MediaTheme.doc.mjs theme/tokenReferences.t
233
233
  tokens tokens theme/MediaTheme.doc.mjs theme/tokens.ts
234
234
  toml toml CodeBlock/CodeBlock.doc.mjs CodeBlock/languages/toml.ts
235
235
  tooltipEntries tooltipEntries Timestamp/Timestamp.doc.mjs Timestamp/tooltipEntries.ts
236
- touch BottomSheet BottomSheet/BottomSheet.doc.mjs internal/touch.ts
236
+ touch ERR_UNKNOWN_COMPONENT - internal/touch.ts
237
237
  trailingKeyDown trailingKeyDown Typeahead/BaseTypeahead.doc.mjs Typeahead/trailingKeyDown.tsx
238
238
  translator translator i18n/InternationalizationProvider.doc.mjs i18n/translator.ts
239
239
  types types Field/Field.doc.mjs Field/types.ts
@@ -57,11 +57,13 @@
57
57
  * @property {string|null} resolvedSourcePath
58
58
  */
59
59
  /**
60
- * Locate `@astryxdesign/core`, throwing the stable not-found error when absent.
60
+ * Locate the Core whose components this run reads, throwing the stable
61
+ * not-found error when a run on Core finds none. Null in a run whose base is
62
+ * not Core: it has no Core components.
61
63
  * @param {string} cwd
62
- * @returns {string}
64
+ * @returns {string | null}
63
65
  */
64
- export function requireCoreDir(cwd: string): string;
66
+ export function coreContentDir(cwd: string): string | null;
65
67
  /**
66
68
  * Load the configured integrations for `cwd`, swallowing any config errors so
67
69
  * component discovery never hard-fails on a malformed/absent integration. An
@@ -83,32 +85,32 @@ export function loadComponentReplacements(coreDir: string | null, loadedIntegrat
83
85
  /**
84
86
  * The integration component that answers to the Core component name
85
87
  * `dirName` for unqualified lookup, or undefined when none replaces it.
86
- * @param {string} coreDir
88
+ * @param {string | null} coreDir
87
89
  * @param {import('../../foundation/integrations/integrations.mjs').LoadedIntegration[]} loadedIntegrations
88
90
  * @param {string} dirName
89
91
  * @returns {Promise<import('../../foundation/discovery/component-replacement.mjs').ActiveComponentReplacement | undefined>}
90
92
  */
91
- export function resolveComponentReplacement(coreDir: string, loadedIntegrations: import("../../foundation/integrations/integrations.mjs").LoadedIntegration[], dirName: string): Promise<import("../../foundation/discovery/component-replacement.mjs").ActiveComponentReplacement | undefined>;
93
+ export function resolveComponentReplacement(coreDir: string | null, loadedIntegrations: import("../../foundation/integrations/integrations.mjs").LoadedIntegration[], dirName: string): Promise<import("../../foundation/discovery/component-replacement.mjs").ActiveComponentReplacement | undefined>;
92
94
  /**
93
95
  * Read the exact installed version available to a package-qualified component
94
96
  * selector. Legacy docs packages do not expose a reliable version here, so a
95
97
  * version-qualified lookup never falls through to them.
96
- * @param {string} coreDir
98
+ * @param {string | null} coreDir
97
99
  * @param {import('../../foundation/integrations/integrations.mjs').LoadedIntegration[]} loadedIntegrations
98
100
  * @param {string} packageName
99
101
  * @returns {string|null}
100
102
  */
101
- export function installedComponentPackageVersion(coreDir: string, loadedIntegrations: import("../../foundation/integrations/integrations.mjs").LoadedIntegration[], packageName: string): string | null;
103
+ export function installedComponentPackageVersion(coreDir: string | null, loadedIntegrations: import("../../foundation/integrations/integrations.mjs").LoadedIntegration[], packageName: string): string | null;
102
104
  /**
103
105
  * Build the set of OWNER packages that provide a component with this name
104
106
  * across core + every loaded integration. This is what lets the CLI
105
107
  * disambiguate by package and expose the owner's source + issuesUrl.
106
- * @param {string} coreDir
108
+ * @param {string | null} coreDir
107
109
  * @param {string} dirName - bare component name (no `XDS` prefix)
108
110
  * @param {import('../../foundation/integrations/integrations.mjs').LoadedIntegration[]} loadedIntegrations
109
111
  * @returns {ComponentOwner[]}
110
112
  */
111
- export function resolveOwners(coreDir: string, dirName: string, loadedIntegrations: import("../../foundation/integrations/integrations.mjs").LoadedIntegration[]): ComponentOwner[];
113
+ export function resolveOwners(coreDir: string | null, dirName: string, loadedIntegrations: import("../../foundation/integrations/integrations.mjs").LoadedIntegration[]): ComponentOwner[];
112
114
  /**
113
115
  * Classify a `--package`-scoped lookup. Searches the scoped package first so a
114
116
  * component that exists in both core and an external package (e.g. AppShell,
@@ -162,11 +164,11 @@ export function legacyExternalKeeps(cwd: string, dirName: string, owners: Array<
162
164
  /**
163
165
  * The core source file for `dirName` (the no-scope `--source` path reads core
164
166
  * directly — it does NOT fall back to externals or fuzzy search).
165
- * @param {string} coreDir
167
+ * @param {string | null} coreDir
166
168
  * @param {string} dirName
167
169
  * @returns {string | null}
168
170
  */
169
- export function resolveCoreSourcePath(coreDir: string, dirName: string): string | null;
171
+ export function resolveCoreSourcePath(coreDir: string | null, dirName: string): string | null;
170
172
  /**
171
173
  * Resolve a bare (unscoped) name to a `.doc.mjs`: core first, then back-compat
172
174
  * externals, then a conservative fuzzy search. Throws ERR_UNKNOWN_COMPONENT
@@ -175,14 +177,17 @@ export function resolveCoreSourcePath(coreDir: string, dirName: string): string
175
177
  * (with candidate suggestions when close) or ERR_NO_DOC.
176
178
  *
177
179
  * The suggestions for an unknown name come from every component the bare
178
- * lookup reads: Core's and each loaded integration's. Only a Core component
179
- * resolves by a close match.
180
+ * lookup reads: Core's and each loaded integration's. Past the exact file
181
+ * name, only a Core component whose name is the typed name, ignoring case,
182
+ * resolves, and only when no other Core component comes close. A typed name
183
+ * that is a component's keyword never resolves: that component goes first in
184
+ * the suggestions.
180
185
  * @param {string} dirName - bare component name (no `XDS` prefix)
181
- * @param {{coreDir: string, cwd: string, name: string, loadedIntegrations?: import('../../foundation/integrations/integrations.mjs').LoadedIntegration[]}} ctx - `name` is the caller's original (prefixed) input, used in error text
186
+ * @param {{coreDir: string | null, cwd: string, name: string, loadedIntegrations?: import('../../foundation/integrations/integrations.mjs').LoadedIntegration[]}} ctx - `name` is the caller's original (prefixed) input, used in error text
182
187
  * @returns {Promise<ResolvedUnscopedDoc>}
183
188
  */
184
189
  export function resolveUnscopedDoc(dirName: string, { coreDir, cwd, name, loadedIntegrations }: {
185
- coreDir: string;
190
+ coreDir: string | null;
186
191
  cwd: string;
187
192
  name: string;
188
193
  loadedIntegrations?: import("../../foundation/integrations/integrations.mjs").LoadedIntegration[];
@@ -215,10 +220,10 @@ export function extractProps(docs: LoadedComponentDoc): any[];
215
220
  * @param {LoadedComponentDoc} docs
216
221
  * @param {OwnershipSubject} owner
217
222
  * @param {string} componentName
218
- * @param {string} coreDir
223
+ * @param {string | null} coreDir
219
224
  * @returns {import('./component.type.mjs').ComponentDetailResponse['data']}
220
225
  */
221
- export function withOwnership(docs: LoadedComponentDoc, owner: OwnershipSubject, componentName: string, coreDir: string): import("./component.type.mjs").ComponentDetailResponse["data"];
226
+ export function withOwnership(docs: LoadedComponentDoc, owner: OwnershipSubject, componentName: string, coreDir: string | null): import("./component.type.mjs").ComponentDetailResponse["data"];
222
227
  /**
223
228
  * When the caller asked for "Code" but the resolved doc is for "CodeBlock"
224
229
  * (parent), scope the response to just the matching sub-component. Returns the
@@ -226,10 +231,10 @@ export function withOwnership(docs: LoadedComponentDoc, owner: OwnershipSubject,
226
231
  * not a scopeable parent.
227
232
  * @param {LoadedComponentDoc} docs
228
233
  * @param {string} dirName
229
- * @param {string} coreDir
234
+ * @param {string | null} coreDir
230
235
  * @returns {{scoped: LoadedComponentDoc & {parentDoc?: string, import?: string}, matchingComponent: any} | null}
231
236
  */
232
- export function scopeSubComponent(docs: LoadedComponentDoc, dirName: string, coreDir: string): {
237
+ export function scopeSubComponent(docs: LoadedComponentDoc, dirName: string, coreDir: string | null): {
233
238
  scoped: LoadedComponentDoc & {
234
239
  parentDoc?: string;
235
240
  import?: string;
@@ -289,11 +294,11 @@ export function linkComponentResponse<R extends {
289
294
  * matcher's suggestions stay. Returns `error` unchanged otherwise.
290
295
  * @param {unknown} error
291
296
  * @param {string} dirName
292
- * @param {{coreDir: string, cwd: string}} context
297
+ * @param {{coreDir: string | null, cwd: string}} context
293
298
  * @returns {Promise<unknown>}
294
299
  */
295
300
  export function withExampleBlockPointer(error: unknown, dirName: string, { coreDir, cwd }: {
296
- coreDir: string;
301
+ coreDir: string | null;
297
302
  cwd: string;
298
303
  }): Promise<unknown>;
299
304
  /**
@@ -304,15 +309,16 @@ export function withExampleBlockPointer(error: unknown, dirName: string, { coreD
304
309
  * among its suggestions, in the place foundation/suggest/other-command.mjs
305
310
  * gives it: a hint at the folded tier or a worse one stays behind a
306
311
  * suggested component that declares the name as a keyword or synonym, and a
307
- * hook keyword hint behind one that declares the same keyword. Returns `error` unchanged otherwise,
312
+ * hook keyword hint behind one that declares the same keyword. A component
313
+ * whose keyword the name clearly is stays first. Returns `error` unchanged otherwise,
308
314
  * and when the check fails.
309
315
  * @param {unknown} error
310
316
  * @param {string} dirName
311
- * @param {{coreDir: string, cwd: string, loadedIntegrations: import('../../foundation/integrations/integrations.mjs').LoadedIntegration[]}} context
317
+ * @param {{coreDir: string | null, cwd: string, loadedIntegrations: import('../../foundation/integrations/integrations.mjs').LoadedIntegration[]}} context
312
318
  * @returns {Promise<unknown>}
313
319
  */
314
320
  export function withOtherCommandHint(error: unknown, dirName: string, { coreDir, cwd, loadedIntegrations }: {
315
- coreDir: string;
321
+ coreDir: string | null;
316
322
  cwd: string;
317
323
  loadedIntegrations: import("../../foundation/integrations/integrations.mjs").LoadedIntegration[];
318
324
  }): Promise<unknown>;