bitboss-ui 3.0.0-beta.67 → 3.0.0-beta.69

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 (1027) hide show
  1. package/README.md +230 -91
  2. package/bin/bitboss-ui-mcp.mjs +368 -142
  3. package/bin/bitboss-ui.mjs +24 -2073
  4. package/bin/cli.mjs +1922 -0
  5. package/dist/ai/BbAccordion.md +1 -1
  6. package/dist/ai/BbAlert.md +16 -12
  7. package/dist/ai/BbAsterisk.md +1 -1
  8. package/dist/ai/BbAvatar.md +3 -3
  9. package/dist/ai/BbBadge.md +5 -5
  10. package/dist/ai/BbBadgeButton.md +1 -1
  11. package/dist/ai/BbBaseButton.md +1 -1
  12. package/dist/ai/BbBaseCheckboxIcon.md +4 -0
  13. package/dist/ai/BbBaseRadioIcon.md +7 -3
  14. package/dist/ai/BbBaseSwitchIcon.md +11 -2
  15. package/dist/ai/BbBreadcrumbs.md +3 -3
  16. package/dist/ai/BbButton.md +63 -10
  17. package/dist/ai/BbCalendar.md +15 -2
  18. package/dist/ai/BbCarousel.md +1093 -0
  19. package/dist/ai/BbCheckbox.md +28 -8
  20. package/dist/ai/BbCheckboxGroup.md +65 -32
  21. package/dist/ai/BbColorInput.md +18 -15
  22. package/dist/ai/BbColorPalette.md +9 -6
  23. package/dist/ai/BbConfigScope.md +218 -0
  24. package/dist/ai/BbConfirm.md +25 -22
  25. package/dist/ai/BbDatePicker.md +12 -6
  26. package/dist/ai/BbDatePickerInput.md +29 -18
  27. package/dist/ai/BbDialog.md +11 -10
  28. package/dist/ai/BbDropdown.md +36 -29
  29. package/dist/ai/BbDropdownButton.md +21 -21
  30. package/dist/ai/BbDropzone.md +5 -16
  31. package/dist/ai/BbForm.md +14 -8
  32. package/dist/ai/BbHost.md +20 -14
  33. package/dist/ai/BbHoverCard.md +2 -2
  34. package/dist/ai/BbIcon.md +3 -3
  35. package/dist/ai/BbIndicator.md +4 -4
  36. package/dist/ai/BbNumberInput.md +20 -16
  37. package/dist/ai/BbOffCanvas.md +15 -10
  38. package/dist/ai/BbPagination.md +15 -6
  39. package/dist/ai/BbPopover.md +16 -9
  40. package/dist/ai/BbRadio.md +30 -9
  41. package/dist/ai/BbRadioGroup.md +78 -35
  42. package/dist/ai/BbRating.md +13 -11
  43. package/dist/ai/BbSelect.md +84 -49
  44. package/dist/ai/BbSelectPopover.md +33 -31
  45. package/dist/ai/BbSlider.md +266 -66
  46. package/dist/ai/BbSpinner.md +3 -3
  47. package/dist/ai/BbSwitch.md +33 -9
  48. package/dist/ai/BbSwitchGroup.md +27 -18
  49. package/dist/ai/BbTable.md +28 -25
  50. package/dist/ai/BbTabs.md +29 -32
  51. package/dist/ai/BbTabsList.md +4 -4
  52. package/dist/ai/BbTabsRoot.md +2 -2
  53. package/dist/ai/BbTag.md +15 -14
  54. package/dist/ai/BbTextInput.md +32 -22
  55. package/dist/ai/BbTextarea.md +20 -18
  56. package/dist/ai/BbTimePicker.md +5 -5
  57. package/dist/ai/BbTimePickerInput.md +15 -14
  58. package/dist/ai/BbToast.md +72 -28
  59. package/dist/ai/BbTooltip.md +7 -6
  60. package/dist/ai/BbTree.md +1 -1
  61. package/dist/ai/ChipsBox.md +1 -1
  62. package/dist/ai/ClearableButton.md +1 -1
  63. package/dist/ai/CommonField.md +5 -5
  64. package/dist/ai/CommonFieldInput.md +3 -2
  65. package/dist/ai/CommonPopover.md +4 -4
  66. package/dist/ai/CommonTimeSelector.md +1 -1
  67. package/dist/ai/ErrorIcon.md +1 -1
  68. package/dist/ai/FlatListBox.md +5 -4
  69. package/dist/ai/GroupedListBox.md +5 -4
  70. package/dist/ai/ListBox.md +6 -5
  71. package/dist/ai/OptionsContainer.md +20 -4
  72. package/dist/ai/WarningIcon.md +1 -1
  73. package/dist/ai/changelog.json +1002 -39
  74. package/dist/ai/components.json +117 -246
  75. package/dist/ai/composables/useBbConfig.md +3 -3
  76. package/dist/ai/composables/useBbDialog.md +1 -1
  77. package/dist/ai/composables/useBbFormField.md +1 -1
  78. package/dist/ai/composables/useConfirm.md +1 -1
  79. package/dist/ai/composables/useToast.md +16 -16
  80. package/dist/ai/design-tokens.json +10 -5
  81. package/dist/ai/guides/agent-contract.md +15 -10
  82. package/dist/ai/guides/ai-router.md +15 -10
  83. package/dist/ai/guides/app-layout.md +1 -1
  84. package/dist/ai/guides/calendars-and-digits.md +123 -0
  85. package/dist/ai/guides/component-picker.md +1 -1
  86. package/dist/ai/guides/design-language.md +18 -14
  87. package/dist/ai/guides/design-tokens.md +85 -43
  88. package/dist/ai/guides/eslint-rules.md +21 -2
  89. package/dist/ai/guides/fetch-items-playbook.md +1 -1
  90. package/dist/ai/guides/icons-policy.md +1 -1
  91. package/dist/ai/guides/inertia-helpers.md +322 -41
  92. package/dist/ai/guides/inline-edit-playbook.md +1 -1
  93. package/dist/ai/guides/installation-and-plugin-setup.md +498 -189
  94. package/dist/ai/guides/migration/adoption-checklist.md +5 -5
  95. package/dist/ai/guides/migration/components/bb-alert.md +2 -2
  96. package/dist/ai/guides/migration/components/bb-badge.md +1 -1
  97. package/dist/ai/guides/migration/components/bb-checkbox-group.md +15 -15
  98. package/dist/ai/guides/migration/components/bb-dialog.md +2 -2
  99. package/dist/ai/guides/migration/components/bb-dropdown.md +1 -1
  100. package/dist/ai/guides/migration/components/bb-host.md +10 -8
  101. package/dist/ai/guides/migration/components/bb-offcanvas.md +1 -1
  102. package/dist/ai/guides/migration/components/bb-rating.md +1 -1
  103. package/dist/ai/guides/migration/components/bb-select-popover.md +2 -2
  104. package/dist/ai/guides/migration/components/bb-select.md +3 -3
  105. package/dist/ai/guides/migration/components/bb-slider.md +17 -2
  106. package/dist/ai/guides/migration/components/bb-table.md +1 -0
  107. package/dist/ai/guides/migration/components/bb-tabs.md +33 -15
  108. package/dist/ai/guides/migration/components/bb-toast.md +10 -9
  109. package/dist/ai/guides/migration/components/use-confirm.md +1 -1
  110. package/dist/ai/guides/migration/v2-to-v3.md +345 -76
  111. package/dist/ai/guides/migration/v3-beta-css-classes.md +1 -0
  112. package/dist/ai/guides/migration/v3-beta-tooling.md +30 -13
  113. package/dist/ai/guides/options-items-playbook.md +5 -1
  114. package/dist/ai/guides/passthrough.md +150 -135
  115. package/dist/ai/guides/ssr-prefill.md +7 -1
  116. package/dist/ai/guides/typescript-generic-components.md +7 -7
  117. package/dist/ai/guides/validated-forms.md +14 -5
  118. package/dist/ai/guides/validation-libraries.md +4 -4
  119. package/dist/ai/helpers/inertia/manifest.json +23 -14
  120. package/dist/ai/helpers/inertia/useQuery.ts +74 -0
  121. package/dist/ai/helpers/inertia/useQueryObject.ts +33 -1
  122. package/dist/ai/helpers/inertia/useRouteQuery.ts +158 -30
  123. package/dist/ai/index.md +5 -3
  124. package/dist/ai/manifest/common.json +13 -15
  125. package/dist/ai/manifest/components/BbAccordion.tree.json +22 -4
  126. package/dist/ai/manifest/components/BbAlert.json +3 -2
  127. package/dist/ai/manifest/components/BbAlert.tree.json +26 -3
  128. package/dist/ai/manifest/components/BbAsterisk.tree.json +7 -1
  129. package/dist/ai/manifest/components/BbAvatar.json +2 -1
  130. package/dist/ai/manifest/components/BbAvatar.tree.json +16 -2
  131. package/dist/ai/manifest/components/BbBadge.json +4 -3
  132. package/dist/ai/manifest/components/BbBadge.tree.json +39 -4
  133. package/dist/ai/manifest/components/BbBadgeButton.tree.json +2 -2
  134. package/dist/ai/manifest/components/BbBaseButton.tree.json +16 -1
  135. package/dist/ai/manifest/components/BbBaseCheckboxIcon.tree.json +23 -2
  136. package/dist/ai/manifest/components/BbBaseRadioIcon.tree.json +21 -4
  137. package/dist/ai/manifest/components/BbBaseSwitchIcon.tree.json +26 -2
  138. package/dist/ai/manifest/components/BbBreadcrumbs.json +1 -1
  139. package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +34 -4
  140. package/dist/ai/manifest/components/BbButton.json +5 -4
  141. package/dist/ai/manifest/components/BbButton.tree.json +78 -5
  142. package/dist/ai/manifest/components/BbCalendar.json +2 -2
  143. package/dist/ai/manifest/components/BbCalendar.tree.json +81 -5
  144. package/dist/ai/manifest/components/BbCarousel.json +59 -0
  145. package/dist/ai/manifest/components/BbCarousel.tree.json +135 -0
  146. package/dist/ai/manifest/components/BbCheckbox.json +5 -4
  147. package/dist/ai/manifest/components/BbCheckbox.tree.json +31 -2
  148. package/dist/ai/manifest/components/BbCheckboxGroup.json +18 -15
  149. package/dist/ai/manifest/components/BbCheckboxGroup.removed.json +1 -1
  150. package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +89 -5
  151. package/dist/ai/manifest/components/BbCollapsible.tree.json +11 -1
  152. package/dist/ai/manifest/components/BbColorInput.json +7 -6
  153. package/dist/ai/manifest/components/BbColorInput.tree.json +49 -4
  154. package/dist/ai/manifest/components/BbColorPalette.json +4 -3
  155. package/dist/ai/manifest/components/BbColorPalette.tree.json +36 -2
  156. package/dist/ai/manifest/components/BbConfigScope.json +23 -0
  157. package/dist/ai/manifest/components/BbConfirm.json +3 -2
  158. package/dist/ai/manifest/components/BbConfirm.tree.json +27 -3
  159. package/dist/ai/manifest/components/BbDatePicker.json +7 -6
  160. package/dist/ai/manifest/components/BbDatePicker.tree.json +42 -3
  161. package/dist/ai/manifest/components/BbDatePickerInput.json +7 -6
  162. package/dist/ai/manifest/components/BbDatePickerInput.tree.json +86 -5
  163. package/dist/ai/manifest/components/BbDialog.json +3 -2
  164. package/dist/ai/manifest/components/BbDialog.tree.json +28 -3
  165. package/dist/ai/manifest/components/BbDropdown.json +14 -10
  166. package/dist/ai/manifest/components/BbDropdown.tree.json +80 -3
  167. package/dist/ai/manifest/components/BbDropdownButton.json +14 -11
  168. package/dist/ai/manifest/components/BbDropdownButton.tree.json +47 -4
  169. package/dist/ai/manifest/components/BbDropzone.json +2 -1
  170. package/dist/ai/manifest/components/BbDropzone.tree.json +27 -1
  171. package/dist/ai/manifest/components/BbForm.json +2 -2
  172. package/dist/ai/manifest/components/BbHost.tree.json +1 -1
  173. package/dist/ai/manifest/components/BbHoverCard.json +3 -3
  174. package/dist/ai/manifest/components/BbHoverCard.tree.json +18 -1
  175. package/dist/ai/manifest/components/BbIcon.json +2 -1
  176. package/dist/ai/manifest/components/BbIcon.tree.json +7 -1
  177. package/dist/ai/manifest/components/BbIndicator.json +2 -1
  178. package/dist/ai/manifest/components/BbIndicator.tree.json +27 -1
  179. package/dist/ai/manifest/components/BbNumberInput.json +6 -5
  180. package/dist/ai/manifest/components/BbNumberInput.tree.json +40 -3
  181. package/dist/ai/manifest/components/BbOffCanvas.json +2 -1
  182. package/dist/ai/manifest/components/BbOffCanvas.tree.json +55 -2
  183. package/dist/ai/manifest/components/BbPagination.json +1 -1
  184. package/dist/ai/manifest/components/BbPagination.tree.json +23 -3
  185. package/dist/ai/manifest/components/BbPopover.json +5 -4
  186. package/dist/ai/manifest/components/BbPopover.tree.json +20 -2
  187. package/dist/ai/manifest/components/BbProgress.tree.json +9 -1
  188. package/dist/ai/manifest/components/BbRadio.json +3 -2
  189. package/dist/ai/manifest/components/BbRadio.tree.json +30 -2
  190. package/dist/ai/manifest/components/BbRadioGroup.json +22 -19
  191. package/dist/ai/manifest/components/BbRadioGroup.removed.json +1 -1
  192. package/dist/ai/manifest/components/BbRadioGroup.tree.json +88 -5
  193. package/dist/ai/manifest/components/BbRating.json +6 -5
  194. package/dist/ai/manifest/components/BbRating.removed.json +1 -0
  195. package/dist/ai/manifest/components/BbRating.tree.json +37 -2
  196. package/dist/ai/manifest/components/BbSelect.json +13 -11
  197. package/dist/ai/manifest/components/BbSelect.tree.json +70 -7
  198. package/dist/ai/manifest/components/BbSelectPopover.json +17 -13
  199. package/dist/ai/manifest/components/BbSelectPopover.tree.json +94 -8
  200. package/dist/ai/manifest/components/BbSlider.json +30 -27
  201. package/dist/ai/manifest/components/BbSlider.removed.json +3 -0
  202. package/dist/ai/manifest/components/BbSlider.tree.json +48 -3
  203. package/dist/ai/manifest/components/BbSmoothHeight.tree.json +10 -1
  204. package/dist/ai/manifest/components/BbSpinner.tree.json +21 -2
  205. package/dist/ai/manifest/components/BbSwitch.json +3 -2
  206. package/dist/ai/manifest/components/BbSwitch.tree.json +31 -2
  207. package/dist/ai/manifest/components/BbSwitchGroup.json +9 -7
  208. package/dist/ai/manifest/components/BbSwitchGroup.removed.json +1 -1
  209. package/dist/ai/manifest/components/BbSwitchGroup.tree.json +65 -3
  210. package/dist/ai/manifest/components/BbTable.json +10 -9
  211. package/dist/ai/manifest/components/BbTable.tree.json +144 -5
  212. package/dist/ai/manifest/components/BbTabs.json +7 -6
  213. package/dist/ai/manifest/components/BbTabs.removed.json +5 -1
  214. package/dist/ai/manifest/components/BbTabs.tree.json +34 -3
  215. package/dist/ai/manifest/components/BbTabsList.json +4 -4
  216. package/dist/ai/manifest/components/BbTabsList.removed.json +5 -1
  217. package/dist/ai/manifest/components/BbTabsList.tree.json +24 -2
  218. package/dist/ai/manifest/components/BbTabsPanels.tree.json +16 -1
  219. package/dist/ai/manifest/components/BbTabsRoot.json +3 -3
  220. package/dist/ai/manifest/components/BbTag.json +7 -6
  221. package/dist/ai/manifest/components/BbTag.tree.json +49 -4
  222. package/dist/ai/manifest/components/BbTextInput.json +6 -5
  223. package/dist/ai/manifest/components/BbTextInput.tree.json +43 -3
  224. package/dist/ai/manifest/components/BbTextarea.json +7 -6
  225. package/dist/ai/manifest/components/BbTextarea.tree.json +46 -3
  226. package/dist/ai/manifest/components/BbTimePicker.json +7 -6
  227. package/dist/ai/manifest/components/BbTimePicker.tree.json +30 -3
  228. package/dist/ai/manifest/components/BbTimePickerInput.json +7 -6
  229. package/dist/ai/manifest/components/BbTimePickerInput.tree.json +58 -6
  230. package/dist/ai/manifest/components/BbToast.json +3 -2
  231. package/dist/ai/manifest/components/BbToast.tree.json +46 -2
  232. package/dist/ai/manifest/components/BbTooltip.json +4 -3
  233. package/dist/ai/manifest/components/BbTooltip.tree.json +17 -1
  234. package/dist/ai/manifest/components/BbTree.tree.json +14 -1
  235. package/dist/ai/manifest/components/ChipsBox.tree.json +1 -1
  236. package/dist/ai/manifest/components/ClearableButton.tree.json +8 -2
  237. package/dist/ai/manifest/components/CommonField.json +2 -2
  238. package/dist/ai/manifest/components/CommonField.tree.json +68 -1
  239. package/dist/ai/manifest/components/CommonFieldInput.json +2 -2
  240. package/dist/ai/manifest/components/CommonFieldInput.tree.json +38 -6
  241. package/dist/ai/manifest/components/CommonPopover.json +7 -5
  242. package/dist/ai/manifest/components/CommonPopover.tree.json +11 -1
  243. package/dist/ai/manifest/components/CommonTimeSelector.tree.json +18 -2
  244. package/dist/ai/manifest/components/ErrorIcon.tree.json +8 -2
  245. package/dist/ai/manifest/components/FlatListBox.json +1 -1
  246. package/dist/ai/manifest/components/FlatListBox.tree.json +4 -3
  247. package/dist/ai/manifest/components/GroupedListBox.json +1 -1
  248. package/dist/ai/manifest/components/GroupedListBox.tree.json +4 -3
  249. package/dist/ai/manifest/components/ListBox.json +1 -1
  250. package/dist/ai/manifest/components/ListBox.tree.json +2 -2
  251. package/dist/ai/manifest/components/OptionsContainer.json +4 -3
  252. package/dist/ai/manifest/components/OptionsContainer.tree.json +16 -1
  253. package/dist/ai/manifest/components/WarningIcon.tree.json +8 -2
  254. package/dist/ai/manifest/index.json +6 -5
  255. package/dist/ai/manifest/meta.json +23 -153
  256. package/dist/ai/manifest/types.advanced.json +78 -77
  257. package/dist/ai/manifest/types.api.json +29 -19
  258. package/dist/ai/manifest/types.wrapper.json +115 -112
  259. package/dist/ai/recipes/inertia/approvals-inbox.md +10 -10
  260. package/dist/ai/recipes/inertia/inline-edit-workspace.md +24 -20
  261. package/dist/ai/recipes/inertia/onboarding.md +10 -10
  262. package/dist/ai/recipes/inertia/ownership-atlas.md +8 -8
  263. package/dist/ai/recipes/inertia/record-form.md +16 -16
  264. package/dist/ai/recipes/inertia/records-workspace.md +13 -12
  265. package/dist/ai/recipes/inertia/settings-workspace.md +16 -15
  266. package/dist/ai/recipes/inertia/upload-center.md +13 -13
  267. package/dist/ai/recipes/inertia/wizard-form.md +16 -16
  268. package/dist/ai/recipes/nuxt/approvals-inbox.md +13 -13
  269. package/dist/ai/recipes/nuxt/inline-edit-workspace.md +26 -22
  270. package/dist/ai/recipes/nuxt/onboarding.md +10 -10
  271. package/dist/ai/recipes/nuxt/ownership-atlas.md +12 -12
  272. package/dist/ai/recipes/nuxt/record-form.md +16 -16
  273. package/dist/ai/recipes/nuxt/records-workspace.md +16 -15
  274. package/dist/ai/recipes/nuxt/settings-workspace.md +15 -14
  275. package/dist/ai/recipes/nuxt/upload-center.md +15 -15
  276. package/dist/ai/recipes/nuxt/wizard-form.md +17 -17
  277. package/dist/ai/recipes/vue/approvals-inbox.md +15 -13
  278. package/dist/ai/recipes/vue/inline-edit-workspace.md +26 -22
  279. package/dist/ai/recipes/vue/onboarding.md +16 -11
  280. package/dist/ai/recipes/vue/ownership-atlas.md +12 -12
  281. package/dist/ai/recipes/vue/record-form.md +18 -16
  282. package/dist/ai/recipes/vue/records-workspace.md +18 -15
  283. package/dist/ai/recipes/vue/settings-workspace.md +18 -15
  284. package/dist/ai/recipes/vue/upload-center.md +15 -15
  285. package/dist/ai/recipes/vue/wizard-form.md +18 -16
  286. package/dist/ai/source/BbAccordion.md +11 -14
  287. package/dist/ai/source/BbAlert.md +103 -91
  288. package/dist/ai/source/BbAsterisk.md +6 -7
  289. package/dist/ai/source/BbAvatar.md +42 -41
  290. package/dist/ai/source/BbBadge.md +100 -89
  291. package/dist/ai/source/BbBadgeButton.md +80 -76
  292. package/dist/ai/source/BbBaseButton.md +284 -276
  293. package/dist/ai/source/BbBaseCheckboxIcon.md +76 -68
  294. package/dist/ai/source/BbBaseRadioIcon.md +80 -68
  295. package/dist/ai/source/BbBaseSwitchIcon.md +98 -74
  296. package/dist/ai/source/BbBreadcrumbs.md +76 -63
  297. package/dist/ai/source/BbButton.md +101 -77
  298. package/dist/ai/source/BbCalendar.md +166 -176
  299. package/dist/ai/source/BbCarousel.md +2897 -0
  300. package/dist/ai/source/BbCheckbox.md +230 -192
  301. package/dist/ai/source/BbCheckboxGroup.md +172 -79
  302. package/dist/ai/source/BbCollapsible.md +7 -10
  303. package/dist/ai/source/BbColorInput.md +256 -243
  304. package/dist/ai/source/BbColorPalette.md +239 -160
  305. package/dist/ai/source/BbConfigScope.md +123 -0
  306. package/dist/ai/source/BbConfirm.md +38 -32
  307. package/dist/ai/source/BbConfirmPortal.md +30 -26
  308. package/dist/ai/source/BbDatePicker.md +218 -187
  309. package/dist/ai/source/BbDatePickerInput.md +789 -428
  310. package/dist/ai/source/BbDialog.md +207 -191
  311. package/dist/ai/source/BbDropdown.md +326 -234
  312. package/dist/ai/source/BbDropdownButton.md +115 -68
  313. package/dist/ai/source/BbDropdownGroup.md +271 -216
  314. package/dist/ai/source/BbDropzone.md +101 -100
  315. package/dist/ai/source/BbForm.md +29 -29
  316. package/dist/ai/source/BbHost.md +6 -6
  317. package/dist/ai/source/BbHoverCard.md +34 -20
  318. package/dist/ai/source/BbHoverCardPortal.md +9 -12
  319. package/dist/ai/source/BbIcon.md +32 -30
  320. package/dist/ai/source/BbIndicator.md +76 -70
  321. package/dist/ai/source/BbNumberInput.md +334 -313
  322. package/dist/ai/source/BbOffCanvas.md +245 -216
  323. package/dist/ai/source/BbPagination.md +144 -116
  324. package/dist/ai/source/BbPopover.md +49 -31
  325. package/dist/ai/source/BbPopoverPortal.md +11 -14
  326. package/dist/ai/source/BbProgress.md +20 -12
  327. package/dist/ai/source/BbRadio.md +205 -181
  328. package/dist/ai/source/BbRadioGroup.md +461 -364
  329. package/dist/ai/source/BbRating.md +212 -177
  330. package/dist/ai/source/BbSelect.md +514 -482
  331. package/dist/ai/source/BbSelectPopover.md +497 -413
  332. package/dist/ai/source/BbSlider.md +1208 -777
  333. package/dist/ai/source/BbSmoothHeight.md +8 -9
  334. package/dist/ai/source/BbSpinner.md +20 -20
  335. package/dist/ai/source/BbSwitch.md +25 -13
  336. package/dist/ai/source/BbSwitchGroup.md +115 -34
  337. package/dist/ai/source/BbTable.md +577 -531
  338. package/dist/ai/source/BbTabs.md +134 -116
  339. package/dist/ai/source/BbTabsList.md +164 -136
  340. package/dist/ai/source/BbTabsPanels.md +128 -113
  341. package/dist/ai/source/BbTabsRoot.md +125 -110
  342. package/dist/ai/source/BbTag.md +286 -281
  343. package/dist/ai/source/BbTextInput.md +59 -50
  344. package/dist/ai/source/BbTextarea.md +85 -71
  345. package/dist/ai/source/BbTimePicker.md +145 -126
  346. package/dist/ai/source/BbTimePickerInput.md +383 -316
  347. package/dist/ai/source/BbToast.md +97 -44
  348. package/dist/ai/source/BbToastPortal.md +56 -36
  349. package/dist/ai/source/BbTooltip.md +155 -129
  350. package/dist/ai/source/BbTree.md +16 -12
  351. package/dist/ai/source/CommonField.md +94 -59
  352. package/dist/ai/source/CommonFieldInput.md +18 -13
  353. package/dist/ai/source/CommonPopover.md +28 -9
  354. package/dist/ai/source/CommonTimeSelector.md +41 -8
  355. package/dist/ai/source/FlatListBox.md +16 -5
  356. package/dist/ai/source/GroupedListBox.md +18 -6
  357. package/dist/ai/source/ListBox.md +2 -1
  358. package/dist/ai/source/OptionsContainer.md +82 -4
  359. package/dist/assets/svgs/arrow_up.svg_raw.js +3 -0
  360. package/dist/assets/svgs/caret_down.svg_raw.js +3 -0
  361. package/dist/assets/svgs/chevron_left.svg_raw.js +3 -0
  362. package/dist/assets/svgs/chevron_left_small.svg_raw.js +3 -0
  363. package/dist/assets/svgs/chevron_right_small.svg_raw.js +3 -0
  364. package/dist/assets/svgs/close.svg_raw.js +3 -0
  365. package/dist/assets/svgs/eyedropper.svg_raw.js +3 -0
  366. package/dist/assets/svgs/move.svg_raw.js +3 -0
  367. package/dist/assets/svgs/pause.svg_raw.js +3 -0
  368. package/dist/assets/svgs/play.svg_raw.js +3 -0
  369. package/dist/assets/svgs/star.svg_raw.js +1 -1
  370. package/dist/assets/svgs/x.svg_raw.js +3 -0
  371. package/dist/calendar-runtime.js +112 -0
  372. package/dist/calendars.js +83 -0
  373. package/dist/components/BbAccordion/BbAccordion.vue.d.ts +2 -2
  374. package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +4 -4
  375. package/dist/components/BbAccordion/ptKeys.generated.d.ts +44 -0
  376. package/dist/components/BbAccordion/types.d.ts +5 -6
  377. package/dist/components/BbAlert/BbAlert.vue.d.ts +5 -4
  378. package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +52 -48
  379. package/dist/components/BbAlert/ptKeys.generated.d.ts +104 -0
  380. package/dist/components/BbAlert/types.d.ts +16 -9
  381. package/dist/components/BbAsterisk/BbAsterisk.vue.d.ts +2 -2
  382. package/dist/components/BbAsterisk/ptKeys.generated.d.ts +8 -0
  383. package/dist/components/BbAsterisk/types.d.ts +4 -5
  384. package/dist/components/BbAvatar/BbAvatar.vue.d.ts +3 -3
  385. package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +54 -53
  386. package/dist/components/BbAvatar/ptKeys.generated.d.ts +12 -0
  387. package/dist/components/BbAvatar/types.d.ts +5 -6
  388. package/dist/components/BbBadge/BbBadge.vue.d.ts +4 -4
  389. package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +75 -71
  390. package/dist/components/BbBadge/BbBadgeButton.vue.d.ts +2 -2
  391. package/dist/components/BbBadge/badgeButtonContext.d.ts +5 -5
  392. package/dist/components/BbBadge/ptKeys.generated.d.ts +160 -0
  393. package/dist/components/BbBadge/types.d.ts +17 -10
  394. package/dist/components/BbBaseButton/BbBaseButton.vue.d.ts +2 -2
  395. package/dist/components/BbBaseButton/ptKeys.generated.d.ts +20 -0
  396. package/dist/components/BbBaseButton/types.d.ts +13 -6
  397. package/dist/components/BbBaseButton/useLinkState.d.ts +1 -1
  398. package/dist/components/BbBaseCheckboxIcon/BbBaseCheckboxIcon.vue.d.ts +2 -2
  399. package/dist/components/BbBaseCheckboxIcon/BbBaseCheckboxIcon.vue_vue_type_script_setup_true_lang.js +4 -4
  400. package/dist/components/BbBaseCheckboxIcon/ptKeys.generated.d.ts +40 -0
  401. package/dist/components/BbBaseCheckboxIcon/types.d.ts +12 -6
  402. package/dist/components/BbBaseRadioIcon/BbBaseRadioIcon.vue.d.ts +2 -2
  403. package/dist/components/BbBaseRadioIcon/BbBaseRadioIcon.vue_vue_type_script_setup_true_lang.js +4 -4
  404. package/dist/components/BbBaseRadioIcon/ptKeys.generated.d.ts +36 -0
  405. package/dist/components/BbBaseRadioIcon/types.d.ts +12 -6
  406. package/dist/components/BbBaseSwitchIcon/BbBaseSwitchIcon.vue.d.ts +2 -2
  407. package/dist/components/BbBaseSwitchIcon/BbBaseSwitchIcon.vue_vue_type_script_setup_true_lang.js +4 -4
  408. package/dist/components/BbBaseSwitchIcon/ptKeys.generated.d.ts +40 -0
  409. package/dist/components/BbBaseSwitchIcon/types.d.ts +12 -6
  410. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue.d.ts +2 -2
  411. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +5 -5
  412. package/dist/components/BbBreadcrumbs/ptKeys.generated.d.ts +48 -0
  413. package/dist/components/BbBreadcrumbs/types.d.ts +15 -8
  414. package/dist/components/BbButton/BbButton.vue.d.ts +6 -4
  415. package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +130 -118
  416. package/dist/components/BbButton/ptKeys.generated.d.ts +196 -0
  417. package/dist/components/BbButton/toggleRoving.js +29 -28
  418. package/dist/components/BbButton/types.d.ts +29 -21
  419. package/dist/components/BbCalendar/BbCalendar.vue.d.ts +9 -71
  420. package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +327 -340
  421. package/dist/components/BbCalendar/CalendarMonthPanel.vue_vue_type_script_setup_true_lang.js +67 -65
  422. package/dist/components/BbCalendar/CalendarYearPanel.vue_vue_type_script_setup_true_lang.js +76 -67
  423. package/dist/components/BbCalendar/calendarHost.d.ts +1 -1
  424. package/dist/components/BbCalendar/calendarMath.d.ts +102 -0
  425. package/dist/components/BbCalendar/calendarMath.js +124 -0
  426. package/dist/components/BbCalendar/ptKeys.generated.d.ts +248 -0
  427. package/dist/components/BbCalendar/types.d.ts +15 -9
  428. package/dist/components/BbCalendar/useCalendarContext.d.ts +43 -17
  429. package/dist/components/BbCalendar/useCalendarGrid.d.ts +71 -4
  430. package/dist/components/BbCalendar/useCalendarGrid.js +264 -209
  431. package/dist/components/BbCalendar/useDayGrid.d.ts +26 -8
  432. package/dist/components/BbCalendar/useDayGrid.js +178 -172
  433. package/dist/components/BbCalendar/useDayjsLocale.d.ts +18 -3
  434. package/dist/components/BbCalendar/useDayjsLocale.js +28 -28
  435. package/dist/components/BbCalendar/useToday.d.ts +5 -3
  436. package/dist/components/BbCalendar/useToday.js +22 -12
  437. package/dist/components/BbCarousel/BbCarousel.vue.d.ts +51 -0
  438. package/dist/components/BbCarousel/BbCarousel.vue.js +5 -0
  439. package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +818 -0
  440. package/dist/components/BbCarousel/ptKeys.generated.d.ts +60 -0
  441. package/dist/components/BbCarousel/types.d.ts +213 -0
  442. package/dist/components/BbCarousel/types.js +27 -0
  443. package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +8 -6
  444. package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +123 -111
  445. package/dist/components/BbCheckbox/ptKeys.generated.d.ts +220 -0
  446. package/dist/components/BbCheckbox/types.d.ts +30 -14
  447. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +167 -306
  448. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +222 -189
  449. package/dist/components/BbCheckboxGroup/ptKeys.generated.d.ts +492 -0
  450. package/dist/components/BbCheckboxGroup/types.d.ts +42 -28
  451. package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +4 -4
  452. package/dist/components/BbCollapsible/BbCollapsible.vue_vue_type_script_setup_true_lang.js +1 -1
  453. package/dist/components/BbCollapsible/ptKeys.generated.d.ts +20 -0
  454. package/dist/components/BbCollapsible/types.d.ts +5 -6
  455. package/dist/components/BbColorInput/BbColorInput.vue.d.ts +16 -14
  456. package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +206 -195
  457. package/dist/components/BbColorInput/ptKeys.generated.d.ts +656 -0
  458. package/dist/components/BbColorInput/types.d.ts +30 -20
  459. package/dist/components/BbColorInput/types.js +1 -1
  460. package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +4 -4
  461. package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +331 -296
  462. package/dist/components/BbColorPalette/ptKeys.generated.d.ts +40 -0
  463. package/dist/components/BbColorPalette/types.d.ts +17 -10
  464. package/dist/components/BbConfigScope/BbConfigScope.vue.d.ts +12 -0
  465. package/dist/components/BbConfigScope/BbConfigScope.vue.js +4 -0
  466. package/dist/components/BbConfigScope/BbConfigScope.vue_vue_type_script_setup_true_lang.js +37 -0
  467. package/dist/components/BbConfigScope/types.d.ts +20 -0
  468. package/dist/components/BbConfirm/BbConfirm.vue.d.ts +1 -1
  469. package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +27 -27
  470. package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +1 -1
  471. package/dist/components/BbConfirm/confirmEntry.d.ts +2 -2
  472. package/dist/components/BbConfirm/ptKeys.generated.d.ts +184 -0
  473. package/dist/components/BbConfirm/types.d.ts +14 -7
  474. package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +16 -97
  475. package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +201 -197
  476. package/dist/components/BbDatePicker/ptKeys.generated.d.ts +324 -0
  477. package/dist/components/BbDatePicker/types.d.ts +22 -15
  478. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +20 -309
  479. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +793 -660
  480. package/dist/components/BbDatePickerInput/calendarFields.d.ts +91 -0
  481. package/dist/components/BbDatePickerInput/calendarFields.js +188 -0
  482. package/dist/components/BbDatePickerInput/dateFieldLayout.d.ts +6 -0
  483. package/dist/components/BbDatePickerInput/dateFieldLayout.js +11 -1
  484. package/dist/components/BbDatePickerInput/ptKeys.generated.d.ts +1156 -0
  485. package/dist/components/BbDatePickerInput/types.d.ts +36 -26
  486. package/dist/components/BbDatePickerInput/types.js +1 -1
  487. package/dist/components/BbDialog/BbDialog.vue.d.ts +9 -8
  488. package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +211 -204
  489. package/dist/components/BbDialog/ptKeys.generated.d.ts +100 -0
  490. package/dist/components/BbDialog/types.d.ts +26 -20
  491. package/dist/components/BbDropdown/AdaptiveDropdown.vue.d.ts +1 -1
  492. package/dist/components/BbDropdown/BbDropdown.vue.d.ts +7 -6
  493. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +399 -377
  494. package/dist/components/BbDropdown/BbDropdownGroup.vue.d.ts +2 -2
  495. package/dist/components/BbDropdown/BbDropdownList.vue.d.ts +1 -1
  496. package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +297 -292
  497. package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +97 -97
  498. package/dist/components/BbDropdown/DropdownRow.vue.d.ts +3 -3
  499. package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +2 -2
  500. package/dist/components/BbDropdown/normalizeGroups.d.ts +2 -2
  501. package/dist/components/BbDropdown/pointerTrail.d.ts +5 -0
  502. package/dist/components/BbDropdown/pointerTrail.js +26 -0
  503. package/dist/components/BbDropdown/ptKeys.generated.d.ts +228 -0
  504. package/dist/components/BbDropdown/types.d.ts +65 -48
  505. package/dist/components/BbDropdown/types.js +11 -2
  506. package/dist/components/BbDropdown/useDropdownContext.d.ts +3 -3
  507. package/dist/components/BbDropdown/useDropdownGroupRegistry.d.ts +5 -5
  508. package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +7 -6
  509. package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +168 -144
  510. package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +616 -0
  511. package/dist/components/BbDropdownButton/types.d.ts +47 -23
  512. package/dist/components/BbDropdownButton/types.js +7 -3
  513. package/dist/components/BbDropzone/BbDropzone.vue.d.ts +7 -26
  514. package/dist/components/BbDropzone/BbDropzone.vue_vue_type_script_setup_true_lang.js +14 -14
  515. package/dist/components/BbDropzone/ptKeys.generated.d.ts +76 -0
  516. package/dist/components/BbDropzone/types.d.ts +15 -8
  517. package/dist/components/BbForm/BbForm.vue.d.ts +5 -5
  518. package/dist/components/BbForm/BbFormCustomField.d.ts +1 -1
  519. package/dist/components/BbForm/BbFormCustomField.js +2 -2
  520. package/dist/components/BbForm/bindFormField.d.ts +4 -4
  521. package/dist/components/BbForm/bindFormField.js +66 -66
  522. package/dist/components/BbForm/formFields.d.ts +5 -5
  523. package/dist/components/BbForm/formSchema.d.ts +4 -4
  524. package/dist/components/BbHost/BbHost.vue.d.ts +1 -1
  525. package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +1 -1
  526. package/dist/components/BbHost/BbHostOpening.d.ts +4 -4
  527. package/dist/components/BbHost/types.d.ts +3 -3
  528. package/dist/components/BbHoverCard/BbHoverCard.vue.d.ts +4 -4
  529. package/dist/components/BbHoverCard/BbHoverCard.vue_vue_type_script_setup_true_lang.js +169 -162
  530. package/dist/components/BbHoverCard/BbHoverCardPortal.vue.d.ts +1 -1
  531. package/dist/components/BbHoverCard/ptKeys.generated.d.ts +44 -0
  532. package/dist/components/BbHoverCard/types.d.ts +8 -9
  533. package/dist/components/BbIcon/BbIcon.vue.d.ts +3 -3
  534. package/dist/components/BbIcon/BbIcon.vue_vue_type_script_setup_true_lang.js +41 -40
  535. package/dist/components/BbIcon/ptKeys.generated.d.ts +8 -0
  536. package/dist/components/BbIcon/types.d.ts +7 -8
  537. package/dist/components/BbIndicator/BbIndicator.vue.d.ts +4 -4
  538. package/dist/components/BbIndicator/BbIndicator.vue_vue_type_script_setup_true_lang.js +1 -1
  539. package/dist/components/BbIndicator/ptKeys.generated.d.ts +52 -0
  540. package/dist/components/BbIndicator/types.d.ts +15 -8
  541. package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +15 -12
  542. package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +327 -311
  543. package/dist/components/BbNumberInput/numberDisplay.d.ts +10 -11
  544. package/dist/components/BbNumberInput/ptKeys.generated.d.ts +476 -0
  545. package/dist/components/BbNumberInput/types.d.ts +33 -22
  546. package/dist/components/BbNumberInput/types.js +1 -1
  547. package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +9 -9
  548. package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +408 -406
  549. package/dist/components/BbOffCanvas/ptKeys.generated.d.ts +88 -0
  550. package/dist/components/BbOffCanvas/sheetAttrs.d.ts +1 -1
  551. package/dist/components/BbOffCanvas/sheetSnap.d.ts +2 -2
  552. package/dist/components/BbOffCanvas/types.d.ts +30 -23
  553. package/dist/components/BbOffCanvas/useOffCanvasStack.d.ts +1 -1
  554. package/dist/components/BbPagination/BbPagination.vue.d.ts +3 -3
  555. package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +110 -114
  556. package/dist/components/BbPagination/paginationFit.d.ts +1 -1
  557. package/dist/components/BbPagination/ptKeys.generated.d.ts +48 -0
  558. package/dist/components/BbPagination/types.d.ts +16 -8
  559. package/dist/components/BbPopover/BbPopover.vue.d.ts +4 -4
  560. package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +121 -115
  561. package/dist/components/BbPopover/BbPopoverPortal.vue.d.ts +1 -1
  562. package/dist/components/BbPopover/ptKeys.generated.d.ts +52 -0
  563. package/dist/components/BbPopover/types.d.ts +10 -11
  564. package/dist/components/BbProgress/BbProgress.vue.d.ts +2 -2
  565. package/dist/components/BbProgress/BbProgress.vue_vue_type_script_setup_true_lang.js +1 -1
  566. package/dist/components/BbProgress/ptKeys.generated.d.ts +20 -0
  567. package/dist/components/BbProgress/types.d.ts +4 -5
  568. package/dist/components/BbRadio/BbRadio.vue.d.ts +8 -6
  569. package/dist/components/BbRadio/BbRadio.vue_vue_type_script_setup_true_lang.js +134 -122
  570. package/dist/components/BbRadio/ptKeys.generated.d.ts +196 -0
  571. package/dist/components/BbRadio/types.d.ts +24 -13
  572. package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +152 -248
  573. package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +248 -215
  574. package/dist/components/BbRadioGroup/ptKeys.generated.d.ts +492 -0
  575. package/dist/components/BbRadioGroup/types.d.ts +41 -24
  576. package/dist/components/BbRating/BbRating.vue.d.ts +9 -7
  577. package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +153 -142
  578. package/dist/components/BbRating/ptKeys.generated.d.ts +152 -0
  579. package/dist/components/BbRating/types.d.ts +31 -20
  580. package/dist/components/BbRating/types.js +1 -1
  581. package/dist/components/BbSelect/BbSelect.vue.d.ts +269 -483
  582. package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +362 -341
  583. package/dist/components/BbSelect/ptKeys.generated.d.ts +960 -0
  584. package/dist/components/BbSelect/types.d.ts +50 -37
  585. package/dist/components/BbSelect/types.js +4 -2
  586. package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +23 -50
  587. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +750 -730
  588. package/dist/components/BbSelectPopover/knownItems.d.ts +4 -4
  589. package/dist/components/BbSelectPopover/ptKeys.generated.d.ts +148 -0
  590. package/dist/components/BbSelectPopover/reclickClears.d.ts +17 -0
  591. package/dist/components/BbSelectPopover/reclickClears.js +4 -0
  592. package/dist/components/BbSelectPopover/sheetChipAttrs.d.ts +1 -1
  593. package/dist/components/BbSelectPopover/types.d.ts +44 -31
  594. package/dist/components/BbSelectPopover/types.js +3 -1
  595. package/dist/components/BbSlider/BbSlider.vue.d.ts +27 -86
  596. package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +414 -331
  597. package/dist/components/BbSlider/ptKeys.generated.d.ts +316 -0
  598. package/dist/components/BbSlider/types.d.ts +162 -61
  599. package/dist/components/BbSlider/types.js +2 -0
  600. package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +3 -3
  601. package/dist/components/BbSmoothHeight/ptKeys.generated.d.ts +8 -0
  602. package/dist/components/BbSmoothHeight/types.d.ts +5 -6
  603. package/dist/components/BbSpinner/BbSpinner.vue.d.ts +3 -3
  604. package/dist/components/BbSpinner/ptKeys.generated.d.ts +8 -0
  605. package/dist/components/BbSpinner/types.d.ts +5 -6
  606. package/dist/components/BbSwitch/BbSwitch.vue.d.ts +6 -6
  607. package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +30 -30
  608. package/dist/components/BbSwitch/ptKeys.generated.d.ts +220 -0
  609. package/dist/components/BbSwitch/types.d.ts +15 -5
  610. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +38 -116
  611. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +13 -10
  612. package/dist/components/BbSwitchGroup/ptKeys.generated.d.ts +332 -0
  613. package/dist/components/BbSwitchGroup/types.d.ts +14 -5
  614. package/dist/components/BbTable/BbTable.vue.d.ts +13 -13
  615. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1360 -1366
  616. package/dist/components/BbTable/BbTableDataRow.d.ts +4 -4
  617. package/dist/components/BbTable/BbTableEdgeRow.d.ts +5 -5
  618. package/dist/components/BbTable/BbTableExpandRow.d.ts +2 -2
  619. package/dist/components/BbTable/BbTableSelectToggle.d.ts +3 -3
  620. package/dist/components/BbTable/estimatedFloors.golden.d.ts +1 -1
  621. package/dist/components/BbTable/gridWidgets.d.ts +1 -1
  622. package/dist/components/BbTable/measuredFloors.d.ts +1 -1
  623. package/dist/components/BbTable/measuredFloorsTestKit.d.ts +1 -1
  624. package/dist/components/BbTable/ptKeys.generated.d.ts +280 -0
  625. package/dist/components/BbTable/types.d.ts +30 -22
  626. package/dist/components/BbTable/utils.d.ts +5 -5
  627. package/dist/components/BbTable/utils.js +89 -88
  628. package/dist/components/BbTabs/BbTabs.vue.d.ts +41 -69
  629. package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +21 -15
  630. package/dist/components/BbTabs/BbTabsList.vue.d.ts +3 -3
  631. package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +121 -122
  632. package/dist/components/BbTabs/BbTabsPanels.vue.d.ts +3 -3
  633. package/dist/components/BbTabs/BbTabsPanels.vue_vue_type_script_setup_true_lang.js +1 -1
  634. package/dist/components/BbTabs/BbTabsRoot.vue.d.ts +2 -2
  635. package/dist/components/BbTabs/ptKeys.generated.d.ts +226 -0
  636. package/dist/components/BbTabs/types.d.ts +41 -23
  637. package/dist/components/BbTag/BbTag.vue.d.ts +18 -16
  638. package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +248 -238
  639. package/dist/components/BbTag/ptKeys.generated.d.ts +540 -0
  640. package/dist/components/BbTag/types.d.ts +28 -18
  641. package/dist/components/BbTag/types.js +1 -1
  642. package/dist/components/BbTextInput/BbTextInput.vue.d.ts +19 -171
  643. package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +176 -165
  644. package/dist/components/BbTextInput/ptKeys.generated.d.ts +608 -0
  645. package/dist/components/BbTextInput/types.d.ts +30 -21
  646. package/dist/components/BbTextInput/types.js +1 -1
  647. package/dist/components/BbTextarea/BbTextarea.vue.d.ts +19 -171
  648. package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +206 -196
  649. package/dist/components/BbTextarea/ptKeys.generated.d.ts +608 -0
  650. package/dist/components/BbTextarea/types.d.ts +29 -20
  651. package/dist/components/BbTextarea/types.js +1 -1
  652. package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +13 -33
  653. package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +137 -136
  654. package/dist/components/BbTimePicker/ptKeys.generated.d.ts +80 -0
  655. package/dist/components/BbTimePicker/types.d.ts +19 -13
  656. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +18 -201
  657. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +421 -397
  658. package/dist/components/BbTimePickerInput/ptKeys.generated.d.ts +732 -0
  659. package/dist/components/BbTimePickerInput/types.d.ts +35 -23
  660. package/dist/components/BbTimePickerInput/types.js +1 -1
  661. package/dist/components/BbToast/BbToast.vue.d.ts +2 -2
  662. package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +60 -53
  663. package/dist/components/BbToast/BbToastMessage.vue.d.ts +2 -2
  664. package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +75 -80
  665. package/dist/components/BbToast/BbToastPortal.vue.d.ts +1 -1
  666. package/dist/components/BbToast/BbToastRegion.vue.d.ts +5 -3
  667. package/dist/components/BbToast/ptKeys.generated.d.ts +232 -0
  668. package/dist/components/BbToast/types.d.ts +22 -13
  669. package/dist/components/BbTooltip/BbTooltip.vue.d.ts +6 -6
  670. package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +99 -88
  671. package/dist/components/BbTooltip/ptKeys.generated.d.ts +36 -0
  672. package/dist/components/BbTooltip/tooltipWarmup.d.ts +2 -2
  673. package/dist/components/BbTooltip/types.d.ts +16 -9
  674. package/dist/components/BbTree/BbTree.vue.d.ts +7 -11
  675. package/dist/components/BbTree/BbTreeLevel.vue.d.ts +1 -1
  676. package/dist/components/BbTree/context.d.ts +2 -2
  677. package/dist/components/BbTree/ptKeys.generated.d.ts +16 -0
  678. package/dist/components/BbTree/types.d.ts +5 -6
  679. package/dist/components/ChipsBox/ChipsBox.vue.d.ts +2 -2
  680. package/dist/components/ChipsBox/types.d.ts +2 -2
  681. package/dist/components/ClearableButton/ClearableButton.vue.d.ts +2 -2
  682. package/dist/components/CloseIcon/CloseButton.vue.d.ts +2 -2
  683. package/dist/components/CloseIcon/CloseButton.vue.js +1 -1
  684. package/dist/components/CloseIcon/CloseButton.vue_vue_type_script_setup_true_lang.js +11 -16
  685. package/dist/components/CommaBox/CommaBox.vue.d.ts +2 -2
  686. package/dist/components/CommaBox/types.d.ts +2 -2
  687. package/dist/components/CommonField/CommonField.vue.d.ts +7 -7
  688. package/dist/components/CommonField/CommonField.vue_vue_type_script_setup_true_lang.js +9 -4
  689. package/dist/components/CommonField/messageHeightMatrix.d.ts +1 -1
  690. package/dist/components/CommonField/types.d.ts +18 -14
  691. package/dist/components/CommonFieldInput/CommonFieldInput.vue.d.ts +3 -3
  692. package/dist/components/CommonFieldInput/types.d.ts +4 -4
  693. package/dist/components/CommonPopover/CommonPopover.vue.d.ts +4 -4
  694. package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +56 -55
  695. package/dist/components/CommonPopover/resolvePlacement.d.ts +9 -0
  696. package/dist/components/CommonPopover/resolvePlacement.js +9 -0
  697. package/dist/components/CommonPopover/types.d.ts +5 -5
  698. package/dist/components/CommonTimeSelector/CommonTimeSelector.vue.d.ts +2 -2
  699. package/dist/components/CommonTimeSelector/CommonTimeSelector.vue_vue_type_script_setup_true_lang.js +110 -99
  700. package/dist/components/CommonTimeSelector/useMeridiem.d.ts +1 -1
  701. package/dist/components/ErrorIcon/ErrorIcon.vue.d.ts +2 -2
  702. package/dist/components/FlatListBox/FlatListBox.vue.d.ts +2 -2
  703. package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +5 -2
  704. package/dist/components/FlatListBox/types.d.ts +3 -3
  705. package/dist/components/GroupedListBox/GroupedListBox.vue.d.ts +2 -2
  706. package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +5 -2
  707. package/dist/components/GroupedListBox/types.d.ts +3 -3
  708. package/dist/components/ListBox/ListBox.vue.d.ts +2 -2
  709. package/dist/components/ListBox/types.d.ts +3 -3
  710. package/dist/components/OptionsContainer/OptionsContainer.vue.d.ts +1 -1
  711. package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +101 -69
  712. package/dist/components/OptionsContainer/types.d.ts +8 -3
  713. package/dist/components/Transitions/Slide.vue.d.ts +5 -3
  714. package/dist/components/Transitions/Slide.vue.js +1 -1
  715. package/dist/components/WarningIcon/WarningIcon.vue.d.ts +2 -2
  716. package/dist/composables/autoHost.d.ts +1 -1
  717. package/dist/composables/formSubmitLock.d.ts +5 -5
  718. package/dist/composables/hostOpenings.d.ts +6 -6
  719. package/dist/composables/hostRegistry.d.ts +2 -2
  720. package/dist/composables/overlayRegistry.d.ts +25 -25
  721. package/dist/composables/overlayRegistry.js +13 -7
  722. package/dist/composables/useBaseOptions.d.ts +2 -2
  723. package/dist/composables/useBbConfig.d.ts +5 -5
  724. package/dist/composables/useBbDialog.d.ts +17 -17
  725. package/dist/composables/useBbDialog.js +2 -1
  726. package/dist/composables/useBbDropdown.d.ts +1 -1
  727. package/dist/composables/useBbForm.d.ts +2 -2
  728. package/dist/composables/useBbFormField.d.ts +4 -4
  729. package/dist/composables/useBbOffCanvas.d.ts +6 -6
  730. package/dist/composables/useBbTable.d.ts +4 -4
  731. package/dist/composables/useBbTabs.d.ts +4 -4
  732. package/dist/composables/useBbTabs.js +99 -94
  733. package/dist/composables/useBreakpoint.d.ts +1 -1
  734. package/dist/composables/useCharacterCounter.d.ts +2 -2
  735. package/dist/composables/useChoiceIndicator.d.ts +2 -2
  736. package/dist/composables/useClosingInert.d.ts +1 -1
  737. package/dist/composables/useConfig.d.ts +3 -3
  738. package/dist/composables/useConfig.js +2 -9
  739. package/dist/composables/useConfigDefaults.d.ts +54 -0
  740. package/dist/composables/useConfigDefaults.js +56 -0
  741. package/dist/composables/useConfirm.d.ts +18 -18
  742. package/dist/composables/useDirection.d.ts +43 -0
  743. package/dist/composables/useDirection.js +12 -0
  744. package/dist/composables/useFormBinding.d.ts +5 -5
  745. package/dist/composables/useFormBinding.js +3 -3
  746. package/dist/composables/useId.d.ts +1 -1
  747. package/dist/composables/useItemsGetter.d.ts +3 -3
  748. package/dist/composables/useKeyboardInset.d.ts +1 -1
  749. package/dist/composables/useListboxFocus.d.ts +1 -1
  750. package/dist/composables/useLocale.d.ts +2 -2
  751. package/dist/composables/useOnDemandOpener.d.ts +3 -3
  752. package/dist/composables/useOverlayNavigation.d.ts +1 -1
  753. package/dist/composables/useOverlayYield.d.ts +1 -1
  754. package/dist/composables/usePassthrough.d.ts +13 -11
  755. package/dist/composables/usePassthrough.js +137 -133
  756. package/dist/composables/useQuery.d.ts +1 -1
  757. package/dist/composables/useRefusedCloseAnnouncement.d.ts +1 -1
  758. package/dist/composables/useSafeArea.d.ts +1 -1
  759. package/dist/composables/useSafeAreaInternal.d.ts +1 -1
  760. package/dist/composables/useSegmentedFields.d.ts +25 -0
  761. package/dist/composables/useSegmentedFields.js +165 -115
  762. package/dist/composables/useServerPrefetch.d.ts +2 -2
  763. package/dist/composables/useSheetSurface.d.ts +1 -1
  764. package/dist/composables/useSsrState.d.ts +2 -2
  765. package/dist/composables/useToast.d.ts +13 -5
  766. package/dist/composables/useToast.js +52 -38
  767. package/dist/composables/useTypeahead.js +22 -21
  768. package/dist/deprecation/ai-deprecations.json.d.ts +160 -15
  769. package/dist/deprecation/ai-deprecations.json.js +1 -1
  770. package/dist/deprecation/removedProps.d.ts +1 -1
  771. package/dist/directives/bbColor.d.ts +1 -1
  772. package/dist/directives/bbDate.d.ts +1 -1
  773. package/dist/directives/bbDialog.d.ts +3 -3
  774. package/dist/directives/bbDropdown.d.ts +1 -1
  775. package/dist/directives/bbDropdown.js +7 -7
  776. package/dist/directives/bbHoverCard.d.ts +3 -3
  777. package/dist/directives/bbOffCanvas.d.ts +2 -2
  778. package/dist/directives/bbPopover.d.ts +3 -3
  779. package/dist/directives/bbTime.d.ts +1 -1
  780. package/dist/directives/bbTooltip.d.ts +4 -4
  781. package/dist/directives/directivePortal.d.ts +4 -4
  782. package/dist/directives/overlayTrigger.d.ts +4 -4
  783. package/dist/directives/overlayTrigger.js +2 -1
  784. package/dist/i18n/eraNames.d.ts +2 -0
  785. package/dist/i18n/eraNames.js +2013 -0
  786. package/dist/i18n/index.d.ts +9 -7
  787. package/dist/i18n/localeTags.d.ts +36 -0
  788. package/dist/i18n/locales/ar.json +176 -0
  789. package/dist/i18n/locales/cs.json +23 -3
  790. package/dist/i18n/locales/da.json +23 -3
  791. package/dist/i18n/locales/de-CH.json +23 -3
  792. package/dist/i18n/locales/de.json +23 -3
  793. package/dist/i18n/locales/el.json +23 -3
  794. package/dist/i18n/locales/en-GB.json +23 -3
  795. package/dist/i18n/locales/en.json +23 -3
  796. package/dist/i18n/locales/es-MX.json +23 -3
  797. package/dist/i18n/locales/es.json +23 -3
  798. package/dist/i18n/locales/fa.json +176 -0
  799. package/dist/i18n/locales/fi.json +23 -3
  800. package/dist/i18n/locales/fr.json +23 -3
  801. package/dist/i18n/locales/he.json +176 -0
  802. package/dist/i18n/locales/hu.json +23 -3
  803. package/dist/i18n/locales/it.json +23 -3
  804. package/dist/i18n/locales/ja.json +23 -3
  805. package/dist/i18n/locales/ko.json +23 -3
  806. package/dist/i18n/locales/nb.json +23 -3
  807. package/dist/i18n/locales/nl.json +23 -3
  808. package/dist/i18n/locales/pl.json +23 -3
  809. package/dist/i18n/locales/pt-BR.json +23 -3
  810. package/dist/i18n/locales/pt-PT.json +23 -3
  811. package/dist/i18n/locales/ro.json +23 -3
  812. package/dist/i18n/locales/ru.json +23 -3
  813. package/dist/i18n/locales/sv.json +23 -3
  814. package/dist/i18n/locales/tr.json +23 -3
  815. package/dist/i18n/locales/uk.json +23 -3
  816. package/dist/i18n/locales/zh-CN.json +23 -3
  817. package/dist/i18n/locales/zh-HK.json +23 -3
  818. package/dist/i18n/locales/zh-TW.json +23 -3
  819. package/dist/i18n/regionHints.js +22 -22
  820. package/dist/i18n/regions.d.ts +73 -24
  821. package/dist/i18n/regions.js +57 -12
  822. package/dist/index.d.ts +192 -190
  823. package/dist/index.js +55 -54
  824. package/dist/llms-full.txt +8848 -5872
  825. package/dist/llms-medium.txt +830 -506
  826. package/dist/llms.txt +6 -5
  827. package/dist/locale-blueprint.json +26 -3
  828. package/dist/locale-tags.js +81 -0
  829. package/dist/mcp-sdk.LICENSES.txt +210 -0
  830. package/dist/mcp-sdk.mjs +78 -0
  831. package/dist/nuxt-auto-imports.d.ts +1 -1
  832. package/dist/nuxt-auto-imports.js +1 -1
  833. package/dist/nuxt-module.d.ts +5 -5
  834. package/dist/nuxt.js +26 -23
  835. package/dist/plugin.d.ts +2 -2
  836. package/dist/project-dts.d.ts +76 -14
  837. package/dist/project-dts.js +117 -63
  838. package/dist/setup-kit.LICENSES.txt +23 -0
  839. package/dist/setup-kit.mjs +9 -0
  840. package/dist/styles.css +2 -2
  841. package/dist/types/ActionButton.d.ts +3 -3
  842. package/dist/types/AlertVariant.d.ts +2 -2
  843. package/dist/types/BadgeVariant.d.ts +2 -2
  844. package/dist/types/ButtonVariant.d.ts +2 -2
  845. package/dist/types/CheckboxVariant.d.ts +9 -6
  846. package/dist/types/CheckboxVariant.js +5 -1
  847. package/dist/types/ColumnName.d.ts +1 -1
  848. package/dist/types/CommonProps.d.ts +25 -3
  849. package/dist/types/Config.d.ts +24 -110
  850. package/dist/types/ConfigDefaults.d.ts +352 -0
  851. package/dist/types/ConfigDefaults.js +115 -0
  852. package/dist/types/ConfirmVariant.d.ts +2 -2
  853. package/dist/types/DatePickerType.d.ts +29 -2
  854. package/dist/types/DatePickerType.js +6 -2
  855. package/dist/types/DropdownItemVariant.d.ts +2 -2
  856. package/dist/types/FieldLayout.d.ts +3 -3
  857. package/dist/types/IndicatorVariant.d.ts +2 -2
  858. package/dist/types/InputVariant.d.ts +58 -25
  859. package/dist/types/ItemAccessor.d.ts +7 -1
  860. package/dist/types/ItemProps.d.ts +3 -3
  861. package/dist/types/ItemsProvider.d.ts +2 -2
  862. package/dist/types/Placement.d.ts +7 -2
  863. package/dist/types/RadioVariant.d.ts +9 -6
  864. package/dist/types/RadioVariant.js +5 -1
  865. package/dist/types/ShapeErased.d.ts +1 -1
  866. package/dist/types/SizeScale.d.ts +4 -0
  867. package/dist/types/SizeScale.js +17 -0
  868. package/dist/types/TabsVariant.d.ts +2 -2
  869. package/dist/types/ToastVariant.d.ts +2 -2
  870. package/dist/types/TooltipVariant.d.ts +2 -2
  871. package/dist/types/fallthrough.d.ts +1 -1
  872. package/dist/types/passthrough.d.ts +23 -23
  873. package/dist/types/ptComponentMap.d.ts +29 -28
  874. package/dist/utilities/calendar/canonicalParts.d.ts +29 -0
  875. package/dist/utilities/calendar/canonicalParts.js +12 -0
  876. package/dist/utilities/calendar/digits.d.ts +18 -0
  877. package/dist/utilities/calendar/digits.js +26 -0
  878. package/dist/utilities/calendar/gregorian.d.ts +2 -0
  879. package/dist/utilities/calendar/gregorian.js +36 -0
  880. package/dist/utilities/calendar/index.d.ts +3 -0
  881. package/dist/utilities/calendar/index.js +1 -0
  882. package/dist/utilities/calendar/international.d.ts +19 -0
  883. package/dist/utilities/calendar/resolve.d.ts +32 -0
  884. package/dist/utilities/calendar/resolve.js +12 -0
  885. package/dist/utilities/calendar/runtime.d.ts +49 -0
  886. package/dist/utilities/calendar/types.d.ts +140 -0
  887. package/dist/utilities/calendar/types.js +83 -0
  888. package/dist/utilities/functions/convertDateValue.d.ts +15 -2
  889. package/dist/utilities/functions/convertDateValue.js +22 -17
  890. package/dist/utilities/functions/elementLabel.d.ts +1 -1
  891. package/dist/utilities/functions/extractDomContainer.d.ts +1 -1
  892. package/dist/utilities/functions/isDateDisabled.d.ts +9 -1
  893. package/dist/utilities/functions/isDateDisabled.js +38 -21
  894. package/dist/utilities/functions/itemProps.d.ts +1 -1
  895. package/dist/utilities/functions/normalizeDateBound.d.ts +45 -2
  896. package/dist/utilities/functions/normalizeDateBound.js +52 -11
  897. package/dist/utilities/functions/parseSize.d.ts +2 -2
  898. package/dist/utilities/functions/readableValue.d.ts +1 -1
  899. package/dist/utilities/functions/responsiveDefault.d.ts +1 -1
  900. package/dist/utilities/functions/searchRank.d.ts +19 -0
  901. package/dist/utilities/functions/searchRank.js +76 -0
  902. package/dist/utilities/functions/slotKey.d.ts +1 -1
  903. package/dist/utilities/functions/toggleInput.d.ts +1 -1
  904. package/dist/utilities/functions/warnRemovedAttrs.d.ts +3 -3
  905. package/dist/utilities/functions/when.d.ts +1 -1
  906. package/dist/utilities/misc/autofocus.d.ts +2 -2
  907. package/dist/utilities/misc/listboxMetrics.d.ts +2 -2
  908. package/dist/utilities/misc/maskaDataOptions.d.ts +1 -1
  909. package/dist/utilities/misc/ssrStateInjectionKey.d.ts +1 -1
  910. package/dist/utilities/misc/ssrValue.d.ts +1 -1
  911. package/dist/utils/configDefaults.d.ts +43 -0
  912. package/dist/utils/configDefaults.js +170 -0
  913. package/dist/utils/configScope.d.ts +43 -0
  914. package/dist/utils/configScope.js +13 -0
  915. package/dist/utils/copyData.d.ts +2 -2
  916. package/dist/utils/cssLayers.d.ts +1 -1
  917. package/dist/utils/focusVisibility.d.ts +1 -1
  918. package/dist/utils/injectLibraryStyles.d.ts +1 -1
  919. package/dist/utils/overlayEscapeStack.d.ts +1 -1
  920. package/dist/utils/passthrough.d.ts +5 -8
  921. package/dist/utils/passthrough.js +31 -29
  922. package/dist/utils/passthroughDeduper.d.ts +1 -1
  923. package/dist/utils/releasedActivator.d.ts +20 -0
  924. package/dist/utils/releasedActivator.js +11 -0
  925. package/dist/utils/versionCheck.d.ts +1 -1
  926. package/dist/utils/versionCheck.js +1 -1
  927. package/dist/vite-plugin.d.ts +139 -218
  928. package/dist/vite.js +451 -425
  929. package/llms.txt +6 -5
  930. package/package.json +51 -19
  931. package/scripts/README.md +2 -1
  932. package/scripts/lib/adoption-checklist.json +2 -2
  933. package/scripts/lib/agent-manifest.mjs +107 -22
  934. package/scripts/lib/agent-refresh.mjs +151 -0
  935. package/scripts/lib/agent-setup.mjs +679 -0
  936. package/scripts/lib/carousel-items-without-slide.mjs +263 -0
  937. package/scripts/lib/carousel-prop-or-local.mjs +117 -0
  938. package/scripts/lib/check-fix.mjs +1 -1
  939. package/scripts/lib/collapsible-trigger-aria.mjs +1 -1
  940. package/scripts/lib/css-class-check.mjs +3 -3
  941. package/scripts/lib/css-local-check.mjs +25 -17
  942. package/scripts/lib/css-surface-answer.mjs +117 -0
  943. package/scripts/lib/define-preset-copy.mjs +1 -1
  944. package/scripts/lib/distributed-alias.mjs +81 -0
  945. package/scripts/lib/doc-sections.mjs +12 -4
  946. package/scripts/lib/dropdown-default-slot.mjs +1 -1
  947. package/scripts/lib/eslint-disable.mjs +60 -2
  948. package/scripts/lib/eslint-plugin.d.ts +13 -2
  949. package/scripts/lib/eslint-plugin.mjs +609 -64
  950. package/scripts/lib/form-v-model.mjs +1 -1
  951. package/scripts/lib/hand-imported-styles.mjs +2 -2
  952. package/scripts/lib/hand-roll-hints.mjs +25 -3
  953. package/scripts/lib/helper-canon.mjs +4 -4
  954. package/scripts/lib/helpers-add.mjs +39 -24
  955. package/scripts/lib/hidden-label-placeholder.mjs +1 -1
  956. package/scripts/lib/idiom-scan.mjs +12 -11
  957. package/scripts/lib/is-direct-run.mjs +20 -0
  958. package/scripts/lib/items-provider-context.mjs +1 -1
  959. package/scripts/lib/linked-target.mjs +26 -2
  960. package/scripts/lib/local-components.mjs +2 -2
  961. package/scripts/lib/locale-check.mjs +109 -13
  962. package/scripts/lib/mcp-config.mjs +140 -75
  963. package/scripts/lib/mcp-sdk.mjs +199 -0
  964. package/scripts/lib/migrate-fix.mjs +3 -3
  965. package/scripts/lib/plugin-options-check.mjs +170 -0
  966. package/scripts/lib/pnp.mjs +165 -0
  967. package/scripts/lib/portal-names.mjs +4 -4
  968. package/scripts/lib/prefer-v-bb-dialog.mjs +1 -1
  969. package/scripts/lib/project-variant-dts.mjs +182 -48
  970. package/scripts/lib/reactive-v-model.mjs +2 -2
  971. package/scripts/lib/redundant-item-accessor.mjs +1 -1
  972. package/scripts/lib/renamed-item-field.mjs +1 -1
  973. package/scripts/lib/renamed-slot-prop.mjs +524 -0
  974. package/scripts/lib/rule-registry.mjs +1 -1
  975. package/scripts/lib/setup-edits.mjs +1845 -0
  976. package/scripts/lib/setup.mjs +440 -0
  977. package/scripts/lib/slot-key.mjs +1 -1
  978. package/scripts/lib/slot-renames.mjs +3 -3
  979. package/scripts/lib/squashed-slot-words.mjs +1 -1
  980. package/scripts/lib/tab-links.mjs +2 -2
  981. package/scripts/lib/text-null-value.mjs +1 -1
  982. package/scripts/lib/toolchain-check.mjs +3 -3
  983. package/scripts/lib/tooling-options.mjs +87 -0
  984. package/scripts/lib/unimported-components.mjs +1 -1
  985. package/scripts/lib/unstyled-variants.mjs +1 -1
  986. package/scripts/lib/valid-locale.mjs +119 -0
  987. package/scripts/lib/validate-bb-markup.mjs +219 -115
  988. package/scripts/lib/wrapper-props.mjs +2 -2
  989. package/dist/ai/BbPtScope.md +0 -138
  990. package/dist/ai/manifest/components/BbPtScope.json +0 -21
  991. package/dist/ai/source/BbPtScope.md +0 -54
  992. package/dist/components/BbNumberInput/warroom/corpus.d.ts +0 -58
  993. package/dist/components/BbNumberInput/warroom/currency-verify.rows.d.ts +0 -28
  994. package/dist/components/BbNumberInput/warroom/currency.rows.d.ts +0 -2
  995. package/dist/components/BbNumberInput/warroom/harness.d.ts +0 -217
  996. package/dist/components/BbNumberInput/warroom/oracle.d.ts +0 -150
  997. package/dist/components/BbPtScope/BbPtScope.vue.d.ts +0 -12
  998. package/dist/components/BbPtScope/BbPtScope.vue.js +0 -4
  999. package/dist/components/BbPtScope/BbPtScope.vue_vue_type_script_setup_true_lang.js +0 -12
  1000. package/dist/components/BbPtScope/types.d.ts +0 -15
  1001. package/dist/components/BbTable/warroom/harness.d.ts +0 -260
  1002. package/dist/types/PtScope.d.ts +0 -15
  1003. package/dist/utilities/functions/head.js +0 -3
  1004. package/dist/utilities/functions/matchAnyKey.d.ts +0 -8
  1005. package/dist/utilities/functions/matchAnyKey.js +0 -14
  1006. package/dist/utilities/functions/pipe.d.ts +0 -3
  1007. package/dist/utilities/functions/range.js +0 -7
  1008. package/dist/utils/ptScope.d.ts +0 -8
  1009. package/dist/utils/ptScope.js +0 -3
  1010. package/scripts/lib/check-queue.mjs +0 -102
  1011. package/scripts/lib/component-attr-targets.ts +0 -123
  1012. package/scripts/lib/component-tree.ts +0 -648
  1013. package/scripts/lib/consumer-install.mjs +0 -64
  1014. package/scripts/lib/css-class-surface.mjs +0 -328
  1015. package/scripts/lib/css-color-resolve.mjs +0 -296
  1016. package/scripts/lib/css-comment-text.mjs +0 -16
  1017. package/scripts/lib/design-token-manifest.mjs +0 -506
  1018. package/scripts/lib/ensure-manifest.mjs +0 -135
  1019. package/scripts/lib/example-checks.mjs +0 -337
  1020. package/scripts/lib/guide-claims.mjs +0 -452
  1021. package/scripts/lib/manifest-pointers.mjs +0 -71
  1022. package/scripts/lib/pack.mjs +0 -55
  1023. package/scripts/lib/public-type-exports.mjs +0 -273
  1024. package/scripts/lib/quiet-gate.mjs +0 -385
  1025. package/scripts/lib/recipe-excerpts.mjs +0 -98
  1026. package/scripts/lib/swap-noun.mjs +0 -33
  1027. package/scripts/lib/token-color-mix.mjs +0 -114
@@ -1,2076 +1,27 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * bitboss-ui CLI — AI-affordance utilities for consumer projects.
4
- *
5
- * Commands:
6
- * ai-init Inject bitboss-ui knowledge-base pointers into the current
7
- * project so coding agents discover and follow the library's
8
- * agent contract — harness-agnostic, not Claude-only. Writes:
9
- * - AGENTS.md fragment (Cursor, Codex, many others)
10
- * - .cursor/rules/bitboss-ui.mdc (Cursor)
11
- * - .github/copilot-instructions.md fragment (GitHub Copilot)
12
- * - .claude/skills/bitboss-ui/SKILL.md (Claude Code)
13
- * - .windsurf/rules/bitboss-ui.md (Windsurf)
14
- * - `vueCompilerOptions.checkUnknownComponents: true` in the
15
- * tsconfig (Q60.6), unless the project already names it
16
- * Also registers the `bitboss-ui mcp` server for Claude Code,
17
- * Cursor, VS Code and Zed and installs its optional peers
18
- * (`@modelcontextprotocol/sdk`, `zod`) with the project's package
19
- * manager; pass --no-mcp to skip both.
20
- * check Validate Bb* markup in .vue/.md files against the installed
21
- * components.json manifest (unknown props, removed props, bad
22
- * v-models, unknown `<template #slot>` names, `href`/`to`/
23
- * `method` on a component that doesn't declare them). Exits 1
24
- * on findings; supports --json output. Every finding carries the
25
- * source line. `--allow-component <Name>` (or package.json's
26
- * `bitboss-ui.allowComponents`) exempts an app-owned component
27
- * whose name happens to start with `Bb`.
28
- *
29
- * `--manifest <path>` judges against ANOTHER version's
30
- * components.json instead of the installed one — answers "what
31
- * breaks if I upgrade" BEFORE upgrading. A path, not a version:
32
- * no network call inside a CI validator.
33
- *
34
- * SCOPE: `check` knows the INSTALLED v3 API and nothing about v2.
35
- * "was removed from X" is a recorded v2→v3 break; "is not in X's
36
- * API" only says the prop is not a v3 prop of that component —
37
- * it may never have been one anywhere. `printFindingLegend` says
38
- * so in the output, because two migrating fleets each spent real
39
- * time discovering it the hard way.
40
- * add Copy Inertia helpers into the app as files it owns
41
- * (scripts/lib/helpers-add.mjs); `helpers list|diff|update`
42
- * reports on them and refreshes the ones the app has not edited.
43
- * changelog Breaking changes between two releases, then what they added —
44
- * `--since <version>` answers "what breaks if I bump", without MCP. Reads the
45
- * installed `dist/ai/changelog.json`.
46
- * mcp Start a stdio MCP server exposing the dist/ai knowledge base
47
- * (search_docs, search_components, get_component, get_composable,
48
- * list_tokens, list_guides, get_guide, list_changes, list_recipes,
49
- * get_recipe, validate) to MCP-capable agent harnesses.
50
- *
51
- * Plain ESM JavaScript on purpose: shipped as-is in the package, no build.
52
- */
53
-
54
- import { spawnSync } from 'node:child_process';
55
- // `globSync` is read off the namespace, not imported by name: it only exists
56
- // from Node 22, and a named import of a missing builtin export is a
57
- // SyntaxError at load time, which killed every command on Node 20 (Sail
58
- // images still ship it). Only quoted glob arguments need it (Q46.4).
59
- import * as fs from 'node:fs';
60
- import {
61
- existsSync,
62
- mkdirSync,
63
- readdirSync,
64
- readFileSync,
65
- statSync,
66
- writeFileSync,
67
- } from 'node:fs';
68
- import {
69
- findHandRollHints,
70
- loadKnownTokens,
71
- } from '../scripts/lib/hand-roll-hints.mjs';
72
- import {
73
- loadAdoptionRows,
74
- repeatedIdioms,
75
- repeatOccurrences,
76
- scanIdioms,
77
- } from '../scripts/lib/idiom-scan.mjs';
78
- import {
79
- disabledChecker,
80
- ruleForFinding,
81
- } from '../scripts/lib/eslint-disable.mjs';
82
- import {
83
- localBbImports,
84
- localBbWarning,
85
- projectLocalBbComponents,
86
- } from '../scripts/lib/local-components.mjs';
87
- import { applyBitbossFixes } from '../scripts/lib/check-fix.mjs';
88
- import { stringControlsFor } from '../scripts/lib/text-null-value.mjs';
89
- import { projectResolution } from '../scripts/lib/unimported-components.mjs';
90
- import {
91
- MAY_HAVE_PORTALS,
92
- portalFindings,
93
- projectPortalIndex,
94
- } from '../scripts/lib/portal-names.mjs';
95
- import {
96
- cssClassFindings,
97
- ownedClassBlocks,
98
- } from '../scripts/lib/css-class-check.mjs';
99
- import {
100
- cssLocalFindings,
101
- libraryTokens,
102
- localReads,
103
- } from '../scripts/lib/css-local-check.mjs';
104
- import {
105
- HAND_IMPORTED_STYLES_EXTENSIONS,
106
- handImportedStylesFindings,
107
- readPluginConfig,
108
- } from '../scripts/lib/hand-imported-styles.mjs';
109
- import { unstyledVariants } from '../scripts/lib/unstyled-variants.mjs';
110
- import { unknownLocaleFindings } from '../scripts/lib/locale-check.mjs';
111
- import {
112
- readShippedDefinePreset,
113
- staleDefinePresetFindings,
114
- } from '../scripts/lib/define-preset-copy.mjs';
115
- import {
116
- readOptionsApiOff,
117
- readRegisteredVariants,
118
- syncNotice,
119
- syncProjectVariantDts,
120
- } from '../scripts/lib/project-variant-dts.mjs';
121
- import { refuseLinkedTarget } from '../scripts/lib/linked-target.mjs';
122
- import {
123
- ensureCheckUnknownComponents,
124
- strictTemplateSuggestion,
125
- toolchainWarnings,
126
- } from '../scripts/lib/toolchain-check.mjs';
127
- import { dirname, isAbsolute, join, relative, resolve } from 'node:path';
128
- import { fileURLToPath, pathToFileURL } from 'node:url';
129
- import { parseArgs } from 'node:util';
130
- import {
131
- detectPackageManager,
132
- devInstallCommand,
133
- ensureMcpConfigs,
134
- missingMcpPeers,
135
- MCP_BIN_PATH,
136
- MCP_PEERS,
137
- } from '../scripts/lib/mcp-config.mjs';
138
- import {
139
- addRegistrations,
140
- configuredRegisteredRules,
141
- ownedBy,
142
- packageRuleNames,
143
- } from '../scripts/lib/rule-registry.mjs';
144
- import {
145
- loadManifest,
146
- presetDefinitions,
147
- validateMarkdown,
148
- validateVueSnippet,
149
- REGISTERED_VARIANT_OPTIONS,
150
- } from '../scripts/lib/validate-bb-markup.mjs';
151
-
152
- const PACKAGE_ROOT = join(dirname(fileURLToPath(import.meta.url)), '..');
153
- const KNOWLEDGE_BASE = 'node_modules/bitboss-ui/dist/ai';
154
- const ROUTER = `${KNOWLEDGE_BASE}/guides/ai-router.md`;
155
- const CONTRACT = `${KNOWLEDGE_BASE}/guides/agent-contract.md`;
156
-
157
- const START_MARKER = '<!-- bitboss-ui:ai:start -->';
158
- const END_MARKER = '<!-- bitboss-ui:ai:end -->';
159
-
160
- function packageVersion() {
161
- try {
162
- const pkg = JSON.parse(
163
- readFileSync(join(PACKAGE_ROOT, 'package.json'), 'utf-8')
164
- );
165
- return pkg.version ?? 'unknown';
166
- } catch {
167
- return 'unknown';
168
- }
169
- }
170
-
171
- /** Shared rules body used by every harness (paths relative to project root). */
172
- function coreRules(version) {
173
- return `This project uses \`bitboss-ui\` (v${version}). Before writing any UI that uses it:
174
-
175
- **If the \`bitboss-ui\` MCP server is connected** (\`ai-init\` registers it), ask it first: \`search_docs\` for "how do I…", \`get_component\` for one component (then \`members\` / \`sections\` for detail), \`list_changes({ since })\` before an upgrade, \`validate\` after writing markup. It answers in small pieces; the files below are the fallback.
176
-
177
- 1. **Start at the AI Router**: \`${ROUTER}\` — which file to open next (do not dump the full catalogue into context).
178
- 2. **Obey the agent contract**: \`${CONTRACT}\`.
179
- 3. **Prefer \`Bb*\` consumer components**; never use entries marked "Reference Only - Internal" unless the user explicitly asks for internals. (\`BbBaseButton\` and the \`BbBase*Icon\` glyphs are consumer API; the \`Common*\` building blocks are not.)
180
- 4. **Never invent prop/event/slot names** — open \`${KNOWLEDGE_BASE}/<ComponentName>.md\` (Usage & Guidelines first) or its API file \`${KNOWLEDGE_BASE}/manifest/components/<ComponentName>.json\` (one member per line; a row marked \`common: true\` is whole in \`${KNOWLEDGE_BASE}/manifest/common.json\`; the list is \`${KNOWLEDGE_BASE}/manifest/index.json\`). Never read \`components.json\` whole: it is the 1.2 MB file the tools use.
181
- 5. **Icons**: discover names first; never invent them (\`${KNOWLEDGE_BASE}/guides/icons-policy.md\`).
182
- 6. **Item-driven components**: declarative \`items\` (an object row reads its own \`label\` and \`value\`; \`item-text\` / \`item-value\` only for other field names, never to restate those two), \`dependencies\`, \`enforce-coherence\` — no manual watchers for coherence.
183
- 7. **Whole pages**: one recipe under \`${KNOWLEDGE_BASE}/recipes/{vue|nuxt|inertia}/\` (see the router table).
184
- 8. **CSS near components**: \`${KNOWLEDGE_BASE}/guides/design-language.md\`. Paint as data is \`${KNOWLEDGE_BASE}/design-tokens.json\` and \`design-tokens.manifest.yaml\` (DESIGN.md-shaped). Grep \`--bb-*\`, not \`--color-*\` or \`--radius-*\`. A repo-root DESIGN.md is not this library. Two token tiers, and reaching for the wrong one is why apps end up re-skinning by class: \`--bb-*\` is the small GLOBAL theme tier (brand knobs, no numeric ramp — there is no \`--bb-primary-800\`), while each component declares its own **unprefixed** \`--*\` tokens for its look (\`.bb-table { --cell-h: 32px }\`). A missing \`--bb-*\` name is not a gap in the library — it means the knob you want is a component token. Set it on the element that DECLARES it (grep \`${KNOWLEDGE_BASE}/source/<ComponentName>.md\`); a value set further out is masked, not inherited. Prefer tokens, variants and \`pt\`; CSS on \`.bb-*__*\` internals is allowed for fine-tuning but unsupported: it can break on upgrade. \`.bb-common-*\` / \`.bb-field*\` internals: expect it to break. (\`.bb-base-button\` and the three \`.bb-base-*-icon\` glyph classes are consumer API — a supported hook, not an internal.) An override on an internal is a signal to check for a \`pt\` part or request one. A Tailwind utility on a \`Bb*\` component that does nothing is rule 9, not a library bug. One primary action per view region.
185
- 9. **Tailwind v4 app: turn on cascade layers when you set bitboss-ui up**, not later when a class "doesn't work". In the build plugin: \`import { bitbossUi, TAILWIND_V4_LAYERS } from 'bitboss-ui/vite'\` and \`bitbossUi({ cssLayers: TAILWIND_V4_LAYERS })\` (Nuxt: \`bitboss: { cssLayers: TAILWIND_V4_LAYERS }\`, same import). Tailwind v4 emits layered CSS; without this the library's CSS is unlayered and beats every utility you put on a \`Bb*\` component or a \`pt:*\` part, whatever the specificity. With it, your utilities win. You still need the runtime plugin (\`app.use(bitbossUiPlugin)\`; Nuxt does it for you): it is what injects the sheet, into that layer. **Do not also \`@import 'bitboss-ui/styles.css'\`**: a hand import adds a second, unlayered copy and undoes the setting. Tailwind v3 or plain CSS: leave it unset. Details: \`${KNOWLEDGE_BASE}/guides/installation-and-plugin-setup.md\` § Cascade layers.
186
- 10. **Set a \`font-family\` on \`body\`** (components inherit it; there is no font token), e.g. \`body { font-family: system-ui, sans-serif; }\`, or load the optional reset (\`resetCss: true\`), which sets that stack. Without either the whole app renders in the browser's default serif.
187
- 11. **Variants are yours to add**: the shipped \`variant\` names are a floor, not a ceiling. When the design needs a colour the library doesn't ship (soft status badges, a brand button tone), **register the name** in the build plugin's \`badgeVariants\`/\`buttonVariants\`/\`alertVariants\`/… and **style \`.bb-badge--<name>\`** (etc.) in a project stylesheet loaded after \`bitboss-ui/styles.css\`. Do both halves — a registered name with no CSS ships an unstyled pill, and CSS with no registration fails \`vue-tsc\`. After registering, run \`npx bitboss-ui check\`: it writes the project's \`bitboss-ui.d.ts\` so the new name type-checks before Vite has run. Never write an unregistered name, and never downgrade the design to a neutral shipped variant to avoid registering. Canonical palette + snippet: \`${KNOWLEDGE_BASE}/guides/design-language.md\` § Getting soft semantic badges.
188
- 12. **Never name your own components \`Bb…\`** — that prefix is bitboss-ui's. Use your app's prefix (\`App…\`, \`Acme…\`). \`check\` leaves an app's own \`Bb*\` component alone but warns: a future bitboss-ui component could take the name.
189
- 13. **Set \`locale\` explicitly** in the build plugin (\`bitbossUi({ locale: 'it' })\` / nuxt \`bitboss: { locale: 'it' }\`) for any app that is not English: the built-in strings default to English (\`'en'\`, since 3.0.0-beta.41; it was \`'it'\`).
190
- 14. **After writing bitboss-ui markup**, run \`npx bitboss-ui check\` — validates \`Bb*\` usage against the installed \`components.json\` and catches invented/removed props before review. In an edit loop, \`npx bitboss-ui check --changed\` checks only the files git sees changed; run the full check before you finish.
191
- 15. **Inertia apps: install the app-side helpers with \`npx bitboss-ui add <name>\`** (\`useQueryObject\`, \`usePromiseForm\`, \`useTableContext\`, …; \`npx bitboss-ui helpers list\` names them). Never paste them from the guide. If \`add\` or \`helpers update\` refuses, stop and show the user its output and \`npx bitboss-ui helpers diff <name>\`; never edit \`bitboss-ui.lock.json\`, and never delete a helper file to get past a refusal.
192
-
193
- After upgrading bitboss-ui, re-run: \`npx bitboss-ui ai-init\` (Inertia apps: then \`npx bitboss-ui helpers update\`)`;
194
- }
195
-
196
- // A blank line after the start marker and before the end marker: an HTML
197
- // comment butting against a heading or a paragraph is not Prettier-stable
198
- // markdown, and a consumer running `prettier --check` on their AGENTS.md
199
- // (as our own fixture does in CI) would fail on text we wrote.
200
- function agentsFragment(version) {
201
- return `${START_MARKER}
202
-
203
- ## bitboss-ui (v${version})
204
-
205
- ${coreRules(version)}
206
-
207
- ${END_MARKER}`;
208
- }
209
-
210
- function skillContent(version) {
211
- return `---
212
- name: bitboss-ui
213
- description: Use when writing, reviewing, or debugging Vue code that uses the bitboss-ui component library (Bb* components, useToast/useConfirm composables) — provides typed component contracts, agent rules, and usage playbooks.
214
- ---
215
-
216
- # bitboss-ui knowledge base (v${version})
217
-
218
- All paths are relative to the project root.
219
-
220
- ## Before writing any bitboss-ui code
221
-
222
- ${coreRules(version)}
223
-
224
- ## Deeper material
225
-
226
- - Playbooks and setup: \`${KNOWLEDGE_BASE}/guides/\`
227
- - Composables: \`${KNOWLEDGE_BASE}/composables/\`
228
- - Full index (last resort): \`${KNOWLEDGE_BASE}/index.md\`
229
- - Implementation source (rarely needed): \`${KNOWLEDGE_BASE}/source/<ComponentName>.md\`
230
- `;
231
- }
232
-
233
- function cursorRuleContent(version) {
234
- return `---
235
- description: bitboss-ui Vue component library — read AI router before generating Bb* usage
236
- globs: **/*.{vue,ts,tsx,js,jsx}
237
- alwaysApply: false
238
- ---
239
-
240
- # bitboss-ui (v${version})
241
-
242
- ${coreRules(version)}
243
- `;
244
- }
245
-
246
- function windsurfRuleContent(version) {
247
- return `# bitboss-ui (v${version})
248
-
249
- ${coreRules(version)}
250
- `;
251
- }
252
-
253
- function upsertMarkedFile(filePath, fragment, { createHeader } = {}) {
254
- refuseLinkedTarget(filePath);
255
- const existed = existsSync(filePath);
256
-
257
- if (!existed) {
258
- mkdirSync(dirname(filePath), { recursive: true });
259
- const header = createHeader ? `${createHeader}\n\n` : '';
260
- writeFileSync(filePath, `${header}${fragment}\n`, 'utf-8');
261
- return { path: filePath, action: 'created' };
262
- }
263
-
264
- const current = readFileSync(filePath, 'utf-8');
265
- const startIndex = current.indexOf(START_MARKER);
266
- const endIndex = current.indexOf(END_MARKER);
267
-
268
- if (startIndex !== -1 && endIndex !== -1 && endIndex > startIndex) {
269
- const updated =
270
- current.slice(0, startIndex) +
271
- fragment +
272
- current.slice(endIndex + END_MARKER.length);
273
- writeFileSync(filePath, updated, 'utf-8');
274
- return { path: filePath, action: 'updated' };
275
- }
276
-
277
- writeFileSync(filePath, `${current.trimEnd()}\n\n${fragment}\n`, 'utf-8');
278
- return { path: filePath, action: 'appended' };
279
- }
280
-
281
- function writeWholeFile(filePath, content) {
282
- refuseLinkedTarget(filePath);
283
- const existed = existsSync(filePath);
284
- mkdirSync(dirname(filePath), { recursive: true });
285
- writeFileSync(filePath, content, 'utf-8');
286
- return { path: filePath, action: existed ? 'updated' : 'created' };
287
- }
288
-
289
- function tryWrite(label, fn) {
290
- try {
291
- return fn();
292
- } catch (error) {
293
- const message = error instanceof Error ? error.message : String(error);
294
- console.error(`[bitboss-ui] skipped ${label}: ${message}`);
295
- return { path: label, action: 'skipped' };
296
- }
297
- }
298
-
299
- function aiInit({ mcp = true } = {}) {
300
- const projectRoot = process.cwd();
301
- const version = packageVersion();
302
-
303
- if (!existsSync(join(projectRoot, 'package.json'))) {
304
- console.error(
305
- '[bitboss-ui] No package.json found in the current directory — run ai-init from your project root.'
306
- );
307
- process.exit(1);
308
- }
309
-
310
- const results = [
311
- tryWrite('AGENTS.md', () =>
312
- upsertMarkedFile(
313
- join(projectRoot, 'AGENTS.md'),
314
- agentsFragment(version),
315
- {
316
- createHeader: '# Agent Instructions',
317
- }
318
- )
319
- ),
320
- tryWrite('.cursor/rules/bitboss-ui.mdc', () =>
321
- writeWholeFile(
322
- join(projectRoot, '.cursor', 'rules', 'bitboss-ui.mdc'),
323
- cursorRuleContent(version)
324
- )
325
- ),
326
- tryWrite('.github/copilot-instructions.md', () =>
327
- upsertMarkedFile(
328
- join(projectRoot, '.github', 'copilot-instructions.md'),
329
- agentsFragment(version),
330
- { createHeader: '# Copilot instructions' }
331
- )
332
- ),
333
- tryWrite('.claude/skills/bitboss-ui/SKILL.md', () =>
334
- writeWholeFile(
335
- join(projectRoot, '.claude', 'skills', 'bitboss-ui', 'SKILL.md'),
336
- skillContent(version)
337
- )
338
- ),
339
- tryWrite('.windsurf/rules/bitboss-ui.md', () =>
340
- writeWholeFile(
341
- join(projectRoot, '.windsurf', 'rules', 'bitboss-ui.md'),
342
- windsurfRuleContent(version)
343
- )
344
- ),
345
- ];
346
- // Q60.6: unknown-component checking is opt-in in Vue Language Tools 3.
347
- const flag = tryWrite('tsconfig checkUnknownComponents', () =>
348
- ensureCheckUnknownComponents(projectRoot)
349
- );
350
- if (flag)
351
- results.push({
352
- ...flag,
353
- path: flag.reason ? `${flag.path} (${flag.reason})` : flag.path,
354
- });
355
-
356
- if (mcp) {
357
- for (const result of ensureMcpConfigs(projectRoot)) {
358
- const suffix = result.reason ? ` (${result.reason})` : '';
359
- results.push({
360
- path: `${result.path} [${result.label}]${suffix}`,
361
- action: result.action,
362
- });
363
- }
364
-
365
- // The harness launches the server on demand, long after this command
366
- // ran — a missing peer would surface inside an agent as a server that
367
- // never starts. They are optional peers (~12 MB only the server loads),
368
- // so installing the library never adds them; registering the server is
369
- // the moment the project opts in, so install them here.
370
- const missing = missingMcpPeers(projectRoot);
371
- if (missing.length > 0) {
372
- const [cmd, ...args] = devInstallCommand(
373
- detectPackageManager(projectRoot),
374
- missing
375
- );
376
- const printed = [cmd, ...args].join(' ');
377
- console.log(`[bitboss-ui] installing the MCP server's peers: ${printed}`);
378
- const installed = spawnSync(cmd, args, {
379
- cwd: projectRoot,
380
- stdio: 'inherit',
381
- // npm/pnpm/yarn are .cmd shims on Windows, which only a shell runs.
382
- shell: process.platform === 'win32',
383
- });
384
- if (installed.status === 0) {
385
- results.push({ path: missing.join(', '), action: 'installed' });
386
- } else {
387
- console.warn(
388
- `[bitboss-ui] could not install ${missing.join(' and ')} — run it yourself:\n` +
389
- `\n ${printed}\n\n` +
390
- ' The harness entries are written either way; the server starts\n' +
391
- ' once the peers are installed.'
392
- );
393
- }
394
- }
395
- }
396
-
397
- console.log(`[bitboss-ui] ai-init complete (library v${version})`);
398
- for (const result of results) {
399
- console.log(` - ${result.action}: ${result.path}`);
400
- }
401
- console.log(
402
- '\nHarness-agnostic kickstart: AGENTS.md + Cursor / Copilot / Claude / Windsurf pointers.'
403
- );
404
- if (mcp) {
405
- console.log(
406
- 'MCP: registered the bitboss-ui server for Claude Code (.mcp.json), Cursor (.cursor/mcp.json), VS Code/Copilot (.vscode/mcp.json) and Zed (.zed/settings.json) — restart your harness to pick it up; Zed starts it once you trust the project. `--no-mcp` skips this.'
407
- );
408
- } else {
409
- console.log(
410
- 'MCP: skipped (--no-mcp). Re-run without it to let agents query the knowledge base through the bitboss-ui MCP server instead of reading files.'
411
- );
412
- }
413
- // L34: the guide's strict set, suggested only (see STRICT_TEMPLATE_SET).
414
- const strict = strictTemplateSuggestion(projectRoot);
415
- if (strict) console.log(strict);
416
- // Q82.15 (c): Muse skips project rules and skills in an untrusted
417
- // workspace and reads MCP servers from its user settings only.
418
- console.log(
419
- 'Muse: trust the workspace (its prompt, or `--trust-workspace`) so it loads AGENTS.md and the skill; for MCP, add `bitboss-ui` under `mcpServers` in ~/.config/muse/settings.json (or ask Muse to migrate it from .mcp.json).'
420
- );
421
- // Q61.7: Laravel's vue-starter-kit (and others) git-ignore these.
422
- console.log(
423
- "Some starters (Laravel's vue-starter-kit) git-ignore AGENTS.md, CLAUDE.md, .claude, .cursor and .mcp.json: teammates won't see these files until you un-ignore them."
424
- );
425
- console.log('Re-run after upgrading bitboss-ui to refresh the pointers.');
426
- console.log(
427
- 'Tip: `npx bitboss-ui ai-init --update` is the same command (idempotent).'
428
- );
429
-
430
- if (results.some((r) => r.action === 'skipped')) {
431
- process.exitCode = 1;
432
- }
433
- }
434
-
435
- // SNT-007: a bare-segment skip list of `node_modules`/`dist`/`.git` let a
436
- // default (no-glob) `check` sweep straight through a Laravel-style consumer's
437
- // `vendor/`, `storage/`, and `public/` trees — hundreds of vendored
438
- // `README.md`s outnumbering the app's own `.vue`/`.md` files 20:1. These are
439
- // all directories no project authors `Bb*` markup into, so they're safe
440
- // blanket exclusions; framework build caches (`.nuxt`, `.output`) get the
441
- // same treatment.
442
- const CHECK_SKIP_DIRS = new Set([
443
- 'node_modules',
444
- 'dist',
445
- '.git',
446
- 'vendor',
447
- 'storage',
448
- 'public',
449
- '.output',
450
- '.nuxt',
451
- ]);
452
- // Composite (multi-segment) skips: too narrow to earn a bare-segment entry —
453
- // skipping all of `bootstrap/` would also hide a project's own
454
- // `bootstrap/*.md` — but `bootstrap/cache` specifically is Laravel's compiled
455
- // config/routes cache, never hand-authored.
456
- const CHECK_SKIP_SUBPATHS = ['bootstrap/cache'];
457
- const CHECK_EXTENSIONS = ['.vue', '.md'];
458
-
459
- /** True when a path segment (by itself) is a directory `check` never descends into. */
460
- function isSkippedSegment(name) {
461
- return CHECK_SKIP_DIRS.has(name);
462
- }
463
-
464
- /** True when the relative path IS, or falls under, a skipped multi-segment subpath. */
465
- function isSkippedSubpath(relPath) {
466
- const normalized = relPath.split(/[\\/]/).join('/');
467
- return CHECK_SKIP_SUBPATHS.some(
468
- (sub) => normalized === sub || normalized.startsWith(`${sub}/`)
469
- );
470
- }
471
-
472
- /** True when any path segment (or composite subpath) is skipped. */
473
- function inSkippedDir(relPath) {
474
- return (
475
- relPath.split(/[\\/]/).some((segment) => isSkippedSegment(segment)) ||
476
- isSkippedSubpath(relPath)
477
- );
478
- }
479
-
480
- /**
481
- * Every `.vue`/`.md` file under `dir`, excluding the skip list (see
482
- * `CHECK_SKIP_DIRS`/`CHECK_SKIP_SUBPATHS`) at any depth. A hand-rolled
483
- * recursive walk rather than `globSync` because glob's `**` never traverses
484
- * dot-directories (and there is no `dot` option) — the sweep must keep
485
- * matching files like `.github/copilot-instructions.md`. Pruning skipped
486
- * directories BEFORE descending (rather than filtering after a flat
487
- * `recursive: true` readdir) is what keeps a multi-thousand-file `vendor/`
488
- * tree from being walked at all.
489
- */
490
- function collectCheckFiles(
491
- dir,
492
- relBase = dir,
493
- extensions = CHECK_EXTENSIONS,
494
- chain = []
495
- ) {
496
- let entries;
497
- try {
498
- entries = readdirSync(dir, { withFileTypes: true });
499
- } catch {
500
- return [];
501
- }
502
- // The `.gitignore` chain at this level (git semantics, shared with the
503
- // icon scan): build output a project ignores (`.vercel/output`, `.nuxt`,
504
- // `coverage`) is never swept.
505
- const own = gitignoreKit?.readGitignore(dir);
506
- const here = own ? [...chain, { dir, ig: own }] : chain;
507
- const ignored = (full, isDir) =>
508
- !!gitignoreKit && gitignoreKit.isGitignored(here, full, isDir);
509
- const out = [];
510
- for (const entry of entries) {
511
- const full = join(dir, entry.name);
512
- if (entry.isDirectory()) {
513
- if (isSkippedSegment(entry.name)) continue;
514
- if (isSkippedSubpath(relative(relBase, full))) continue;
515
- if (ignored(full, true)) continue;
516
- out.push(...collectCheckFiles(full, relBase, extensions, here));
517
- continue;
518
- }
519
- if (!entry.isFile()) continue;
520
- if (!extensions.some((ext) => entry.name.endsWith(ext))) continue;
521
- if (ignored(full, false)) continue;
522
- out.push(full);
523
- }
524
- return out;
525
- }
526
-
527
- /**
528
- * The icon scan's `.gitignore` reader, loaded once by `check` before its
529
- * sweep. In the library repo it loads from source (`src/icon-scan.ts`, Node
530
- * strips the types): `dist` may be absent (the release runs the node suite
531
- * before the build) or stale. In the package, which ships no `src`, it loads
532
- * from `dist/icon-scan.js`. Failing to load it is an error, never a sweep
533
- * without it: that would report a project's gitignored build output.
534
- * Returns the error, or null once loaded.
535
- */
536
- let gitignoreKit = null;
537
- async function loadGitignoreKit() {
538
- const source = join(PACKAGE_ROOT, 'src', 'icon-scan.ts');
539
- const file = existsSync(source)
540
- ? source
541
- : join(PACKAGE_ROOT, 'dist', 'icon-scan.js');
542
- const where = relative(PACKAGE_ROOT, file);
543
- let kit;
544
- try {
545
- kit = await import(pathToFileURL(file).href);
546
- } catch (error) {
547
- return `cannot load the .gitignore reader from ${where}: ${error.message}`;
548
- }
549
- if (!kit.readGitignore || !kit.isGitignored || !kit.ancestorGitignores)
550
- return `${where} does not export the .gitignore reader`;
551
- gitignoreKit = kit;
552
- return null;
553
- }
554
-
555
- /**
556
- * Resolve the file list for `check`: explicit globs/paths if given, otherwise
557
- * every `.vue`/`.md` file under `cwd` (excluding `CHECK_SKIP_DIRS`/
558
- * `CHECK_SKIP_SUBPATHS` — node_modules, dist, .git, vendor, storage, public,
559
- * .output, .nuxt, bootstrap/cache). Literal paths resolve directly: a literal
560
- * FILE is always included (even one that lives inside a skipped dir — asking
561
- * for it by name is the widen-the-scan escape hatch), a literal DIRECTORY is
562
- * swept recursively and only its descendants are checked against the skip
563
- * list (so `check vendor/some-pkg` still works even though a bare sweep would
564
- * never enter `vendor/` on its own). Glob patterns (`*`, `**`, `?`, `{a,b}`)
565
- * go through `node:fs` globSync, restricted to `.vue`/`.md` outside the
566
- * skipped dirs.
567
- */
568
- function resolveCheckFiles(cwd, patterns) {
569
- if (patterns.length === 0)
570
- return collectCheckFiles(
571
- cwd,
572
- cwd,
573
- CHECK_EXTENSIONS,
574
- gitignoreKit?.ancestorGitignores(cwd) ?? []
575
- ).sort();
576
-
577
- const matched = new Set();
578
- for (const pattern of patterns) {
579
- if (!/[*?{}[\]]/.test(pattern)) {
580
- const abs = isAbsolute(pattern) ? pattern : join(cwd, pattern);
581
- if (existsSync(abs)) {
582
- const stat = statSync(abs);
583
- if (stat.isDirectory()) {
584
- for (const file of collectCheckFiles(abs)) matched.add(file);
585
- } else if (stat.isFile()) {
586
- matched.add(abs);
587
- }
588
- continue;
589
- }
590
- }
591
- if (typeof fs.globSync !== 'function') {
592
- console.error(
593
- `[bitboss-ui] quoted glob patterns need Node >= 22 (this is ${process.version}): "${pattern}". Pass the directory, or leave the pattern unquoted so the shell expands it.`
594
- );
595
- process.exit(1);
596
- }
597
- const dirents = fs.globSync(pattern, {
598
- cwd,
599
- withFileTypes: true,
600
- // Pruning is a traversal shortcut; the inSkippedDir filter below is
601
- // what guarantees skip-dir parity. `entry` is a Dirent when
602
- // withFileTypes is set, but tolerate the string form too.
603
- exclude: (entry) =>
604
- CHECK_SKIP_DIRS.has(
605
- typeof entry === 'string' ? entry.split('/').pop() : entry.name
606
- ),
607
- });
608
- for (const dirent of dirents) {
609
- if (!dirent.isFile()) continue;
610
- if (!CHECK_EXTENSIONS.some((ext) => dirent.name.endsWith(ext))) continue;
611
- const joined = join(dirent.parentPath, dirent.name);
612
- const full = isAbsolute(joined) ? joined : join(cwd, joined);
613
- if (inSkippedDir(relative(cwd, full))) continue;
614
- matched.add(full);
615
- }
616
- }
617
-
618
- return [...matched].sort();
619
- }
620
-
621
- /**
622
- * `check --changed` (Q57.11): the files git reports changed against HEAD
623
- * (staged or not) plus the untracked ones, under `cwd`, minus the sweep's skip
624
- * list. `files` are the .vue/.md ones `check` validates; `all` (any extension)
625
- * feeds the stylesheet and styles-import scans, which read other files too.
626
- * @returns {{ files: string[], all: string[] } | { error: string }}
627
- */
628
- function changedCheckFiles(cwd) {
629
- const git = (args) =>
630
- spawnSync('git', args, {
631
- cwd,
632
- encoding: 'utf-8',
633
- maxBuffer: 64 * 1024 * 1024,
634
- });
635
- const diff = git(['diff', '--name-only', '--relative', '-z', 'HEAD', '--']);
636
- const untracked = git(['ls-files', '--others', '--exclude-standard', '-z']);
637
- const failed = [diff, untracked].find((r) => r.error || r.status !== 0);
638
- if (failed)
639
- return {
640
- error:
641
- 'check --changed: git could not list the changed files here (not a git repository, git missing, or no commit yet): ' +
642
- (failed.error?.message ?? failed.stderr.trim().split('\n')[0]),
643
- };
644
- const all = [
645
- ...new Set(`${diff.stdout}${untracked.stdout}`.split('\0').filter(Boolean)),
646
- ]
647
- .filter((rel) => !inSkippedDir(rel))
648
- .map((rel) => join(cwd, rel))
649
- // A deleted file is a change with nothing left to check.
650
- .filter((path) => existsSync(path) && statSync(path).isFile())
651
- .sort();
652
- return {
653
- files: all.filter((path) =>
654
- CHECK_EXTENSIONS.some((ext) => path.endsWith(ext))
655
- ),
656
- all,
657
- };
658
- }
659
-
660
- /**
661
- * `4 .vue + 8 .md` — a plain file count on its own ("715 file(s)") reads as
662
- * "715 files carefully checked" when SNT-007 showed it can just as easily be
663
- * "701 vendored READMEs + 14 real files"; splitting by extension makes the
664
- * number honest about what was actually covered. `.vue`/`.md` sort first
665
- * (the extensions `check` targets by default); any other extension a literal
666
- * path argument pulled in — see `resolveCheckFiles` — sorts after, A-Z.
667
- */
668
- function summarizeFileCounts(files) {
669
- const counts = new Map();
670
- for (const file of files) {
671
- const base = file.split(/[\\/]/).pop() ?? file;
672
- const dot = base.lastIndexOf('.');
673
- const ext = dot === -1 ? '(no extension)' : base.slice(dot);
674
- counts.set(ext, (counts.get(ext) ?? 0) + 1);
675
- }
676
- const priority = ['.vue', '.md'];
677
- const exts = [...counts.keys()].sort((a, b) => {
678
- const pa = priority.indexOf(a);
679
- const pb = priority.indexOf(b);
680
- if (pa !== -1 || pb !== -1) {
681
- return (
682
- (pa === -1 ? priority.length : pa) - (pb === -1 ? priority.length : pb)
683
- );
684
- }
685
- return a.localeCompare(b);
686
- });
687
- return exts.map((ext) => `${counts.get(ext)} ${ext}`).join(' + ');
688
- }
689
-
690
- /**
691
- * Component names the PROJECT owns despite the `Bb` prefix, read from disk so
692
- * CI, the editor and a local run agree without repeating a flag.
693
- *
694
- * Two sources, merged: `bitboss-ui.check.json`'s `allowComponents`, and
695
- * package.json's `bitboss-ui.allowComponents`. The package.json key is the one
696
- * to reach for — it sits next to the `eslint.config.js` that already carries
697
- * the same list for `no-unknown-attributes`, so the two gates stay in sync.
698
- * Unreadable/malformed files are ignored: a broken config must not turn into a
699
- * check failure about markup.
700
- * @returns {string[]}
701
- */
702
- function configuredAllowComponents(projectRoot) {
703
- const out = [];
704
- const readList = (path, pick) => {
705
- try {
706
- if (!existsSync(path)) return;
707
- const value = pick(JSON.parse(readFileSync(path, 'utf-8')));
708
- if (Array.isArray(value))
709
- for (const name of value) if (typeof name === 'string') out.push(name);
710
- } catch {
711
- /* malformed config — ignore, never fail the check on it */
712
- }
713
- };
714
- readList(
715
- join(projectRoot, 'bitboss-ui.check.json'),
716
- (cfg) => cfg?.allowComponents
717
- );
718
- readList(
719
- join(projectRoot, 'package.json'),
720
- (pkg) => pkg?.['bitboss-ui']?.allowComponents
721
- );
722
- return out;
723
- }
724
-
725
- /**
726
- * CHK-SINCE-V2 — the two unknown-prop message shapes mean OPPOSITE things and
727
- * nothing in the output said so. One migrating fleet filed two non-findings
728
- * against the library, and the other told the categories apart only by
729
- * installing v2 alongside and diffing by hand. Printed once per failing run,
730
- * and only for the kinds actually present.
731
- *
732
- * `check` is honest about its limits here: it validates against the INSTALLED
733
- * v3 manifest and holds no record of v2, so "is not in X's API" is a statement
734
- * about v3 alone. Deciding whether such a prop ever worked is the reader's job,
735
- * and the greps in the migration guide are how it is done.
736
- */
737
- function printFindingLegend(findings) {
738
- const kinds = new Set(findings.map((f) => f.kind));
739
- const rows = [];
740
- if (kinds.has('removed-prop'))
741
- rows.push(
742
- ' "was removed from X" a recorded break (v2→v3, or a v3 beta rename). X really\n' +
743
- ' / "was renamed on X" had this prop or pt key; `check --fix` rewrites the renames.'
744
- );
745
- if (kinds.has('renamed-slot'))
746
- rows.push(
747
- ' "slot … was renamed" a recorded slot rename; `check --fix` rewrites it.'
748
- );
749
- if (kinds.has('unknown-prop'))
750
- rows.push(
751
- ' "is not in X\'s API" X does not declare this prop in v3 — and `check` cannot\n' +
752
- ' say whether it ever did. It may be a v3 removal that\n' +
753
- ' predates the removal register, or a name that was never\n' +
754
- ' a prop at all and has always fallen through to the DOM\n' +
755
- ' as an inert attribute. Check the v2 source before\n' +
756
- ' "restoring" anything: the second case needs deleting,\n' +
757
- ' not porting.'
758
- );
759
- // A type written as a tag is its own category: the name IS ours, so neither
760
- // "check the spelling" nor the allowlist applies, and a reader who skims the
761
- // message alone would reach for one of them.
762
- if (
763
- findings.some((f) => / is a type export, not a component$/.test(f.message))
764
- )
765
- rows.push(
766
- ' "is a type export" a real export, but a TYPE — it types a prop, it does not\n' +
767
- ' render. Import it (`import type { … }`) and pass the\n' +
768
- ' value; never allowlist it, which would only silence\n' +
769
- ' every other check on that tag.'
770
- );
771
- if (findings.some((f) => f.fallthrough))
772
- rows.push(
773
- ' ⚠ (vs ✗) markup that is not a typo and may work today: an\n' +
774
- ' undeclared listener Vue binds to the root ELEMENT,\n' +
775
- ' so whether it fires depends on what that root is —\n' +
776
- " an internal detail, on the component's schedule or\n" +
777
- " the element's. `<BbDialog @close>` runs (that root is\n" +
778
- ' a native <dialog>); `<BbAlert @close>` does not.\n' +
779
- ' Still reported, because neither is the contract. In\n' +
780
- ' ESLint this is `no-unknown-event`, a warning.'
781
- );
782
- if (rows.length === 0) return;
783
- console.error('\nReading these findings:');
784
- for (const row of rows) console.error(row);
785
- console.error(
786
- ' `check` reads the installed v3 manifest only; the package carries no v2 API.'
787
- );
788
- }
789
-
790
- /**
791
- * `npx bitboss-ui check [glob…] [--json]` — validate `Bb*` markup (props,
792
- * v-models, and `<template #slot>` names) in `.vue` and `.md` files against
793
- * the installed components.json manifest.
794
- */
795
- /**
796
- * The version a components.json describes. `loadManifest` returns the indexed
797
- * component map, not the envelope, so read the field straight off the file.
798
- */
799
- /**
800
- * `changelog [--since <v>] [--until <v>] [--json]` — what breaks between two
801
- * releases, then what they added (Q74.4: one line per feature), for anyone not driving the MCP server (a human at a terminal, CI,
802
- * or an agent whose harness has no MCP). Same data and same range rules as the
803
- * `list_changes` tool; this is the transport-free path to it.
804
- */
805
- function changelogCommand({ since, until, json: jsonMode }) {
806
- const path = join(PACKAGE_ROOT, 'dist', 'ai', 'changelog.json');
807
- if (!existsSync(path)) {
808
- console.error(
809
- `[bitboss-ui] changelog: not found at ${path} — reinstall bitboss-ui (or run \`npm run build\` when working in the library repo).`
810
- );
811
- process.exit(1);
812
- }
813
- const doc = JSON.parse(readFileSync(path, 'utf-8'));
814
- const releases = doc.releases ?? [];
815
-
816
- for (const [label, value] of [
817
- ['--since', since],
818
- ['--until', until],
819
- ]) {
820
- if (value != null && !releases.includes(value)) {
821
- // A tagged-but-never-published version (beta.34): say where its
822
- // changes went instead of "unknown", which reads like a typo.
823
- const unpublished = (doc.unpublished ?? []).includes(value);
824
- const next = releases.find((r) => compareReleaseVersions(r, value) > 0);
825
- console.error(
826
- (unpublished
827
- ? `[bitboss-ui] changelog: ${label} ${value} was never published to npm; its changes shipped in ${next ?? 'the next release'}.\n`
828
- : `[bitboss-ui] changelog: unknown ${label} version '${value}'.\n`) +
829
- `Known releases: ${releases.join(', ')}`
830
- );
831
- process.exit(1);
832
- }
833
- }
834
-
835
- const ranged = since != null || until != null;
836
- const rows = (doc.breaking ?? []).filter((entry) => {
837
- if (!ranged) return true;
838
- const at = entry.firstReleasedIn;
839
- if (at == null) return until == null;
840
- if (since != null && compareReleaseVersions(at, since) <= 0) return false;
841
- if (until != null && compareReleaseVersions(at, until) > 0) return false;
842
- return true;
843
- });
844
- // Q74.4: what the range ADDED (feat commits, one line each), oldest first.
845
- const inRange = (at) => {
846
- if (!ranged) return true;
847
- if (at === 'unreleased') return until == null;
848
- if (since != null && compareReleaseVersions(at, since) <= 0) return false;
849
- if (until != null && compareReleaseVersions(at, until) > 0) return false;
850
- return true;
851
- };
852
- const added = Object.entries(doc.added ?? {})
853
- .filter(([at]) => inRange(at))
854
- .flatMap(([at, entries]) =>
855
- entries.map((entry) => ({
856
- at,
857
- line: typeof entry === 'string' ? entry : entry.text,
858
- }))
859
- );
860
-
861
- if (jsonMode) {
862
- console.log(
863
- JSON.stringify(
864
- {
865
- version: doc.version,
866
- since: since ?? null,
867
- until: until ?? doc.version,
868
- count: rows.length,
869
- breaking: rows,
870
- added: added.map(({ at, line }) => `[${at}] ${line}`),
871
- guide: doc.guide,
872
- },
873
- null,
874
- 2
875
- )
876
- );
877
- return;
878
- }
879
-
880
- const range = ranged
881
- ? `${since ?? 'the start of v3'} → ${until ?? doc.version}`
882
- : `the whole v2 → v3 upgrade`;
883
- const printAdded = () => {
884
- if (!added.length) return;
885
- // Compact by default: the whole v3 line is hundreds of lines.
886
- if (!ranged) {
887
- console.log(
888
- `\n${added.length} addition(s) over ${range}: list one hop with --since <your version>.`
889
- );
890
- return;
891
- }
892
- console.log(`\n${added.length} addition(s), ${range}:\n`);
893
- for (const { at, line } of added) console.log(` [${at}] ${line}`);
894
- };
895
- if (rows.length === 0) {
896
- // "Nothing breaks" and "I could not tell you" must not look alike.
897
- console.log(
898
- `[bitboss-ui] changelog: no BREAKING changes in ${range}.\n` +
899
- ' Fixes are not tracked here, so this means nothing\n' +
900
- ' breaks — not that nothing changed.'
901
- );
902
- printAdded();
903
- return;
904
- }
905
- console.log(
906
- `[bitboss-ui] changelog: ${rows.length} breaking change(s), ${range}\n`
907
- );
908
- for (const entry of rows) {
909
- const at = entry.firstReleasedIn ?? 'unreleased';
910
- if (entry.kind === 'rename') {
911
- // `surface` says what kind of name it is (Q51.19); a slot reads `#…`.
912
- const spell = (name) => (entry.surface === 'slot' ? `#${name}` : name);
913
- const surface =
914
- entry.surface && entry.surface !== 'prop' ? `${entry.surface} ` : '';
915
- console.log(
916
- ` [${at}] ${entry.components.join(', ')}: ${surface}\`${spell(entry.from)}\` → ` +
917
- (entry.to == null ? 'removed' : `\`${spell(entry.to)}\``) +
918
- (entry.note ? ` (${entry.note})` : '')
919
- );
920
- } else {
921
- console.log(` [${at}] ${entry.description}`);
922
- }
923
- if (entry.guide) console.log(` ${entry.guide}`);
924
- }
925
- printAdded();
926
- console.log(`\nFull migration guide: ${doc.guide}`);
927
- }
928
-
929
- /** Numeric, prerelease-aware ordering; the twin of the MCP server's copy. */
930
- function compareReleaseVersions(a, b) {
931
- const parse = (v) => {
932
- const [core, pre = ''] = String(v).split('-');
933
- const nums = core.split('.').map((n) => Number.parseInt(n, 10) || 0);
934
- const [tag = '', n = ''] = pre.split('.');
935
- return { nums, tag, n: Number.parseInt(n, 10) || 0 };
936
- };
937
- const x = parse(a);
938
- const y = parse(b);
939
- for (let i = 0; i < 3; i += 1) {
940
- if ((x.nums[i] ?? 0) !== (y.nums[i] ?? 0))
941
- return (x.nums[i] ?? 0) - (y.nums[i] ?? 0);
942
- }
943
- if (!x.tag && y.tag) return 1;
944
- if (x.tag && !y.tag) return -1;
945
- if (x.tag !== y.tag) return x.tag < y.tag ? -1 : 1;
946
- return x.n - y.n;
947
- }
948
-
949
- function manifestVersionOf(manifestPath) {
950
- try {
951
- return JSON.parse(readFileSync(manifestPath, 'utf-8')).version ?? 'unknown';
952
- } catch {
953
- return 'unknown';
954
- }
955
- }
956
-
957
- async function checkCommand(
958
- globs,
959
- {
960
- json: jsonMode,
961
- allowEmpty,
962
- allowComponents,
963
- manifest: manifestOverride,
964
- fix,
965
- changed: changedOnly,
966
- idioms: wantIdioms,
967
- }
968
- ) {
969
- const projectRoot = process.cwd();
970
- const kitError = await loadGitignoreKit();
971
- if (kitError) {
972
- console.error(`[bitboss-ui] check: ${kitError}`);
973
- process.exit(1);
974
- }
975
- if (changedOnly && globs.length) {
976
- console.error('[bitboss-ui] check: pass paths or `--changed`, not both.');
977
- process.exit(1);
978
- }
979
- const changed = changedOnly ? changedCheckFiles(projectRoot) : null;
980
- if (changed && 'error' in changed) {
981
- console.error(`[bitboss-ui] ${changed.error}`);
982
- process.exit(1);
983
- }
984
-
985
- /*
986
- * `--manifest` answers the question `check` could not: "which of my files
987
- * break in the version I am about to move to?" (reported 2026-09-09). By
988
- * default the manifest is the INSTALLED one, so the only way to see an
989
- * upgrade's damage was to perform the upgrade first — exactly backwards for
990
- * the one moment the answer is worth having.
991
- *
992
- * Deliberately a PATH, not a version: fetching a version would put a network
993
- * call inside a validator that consumers run in CI, with a registry outage
994
- * as a new failure mode. Getting the file is one documented command
995
- * (`npm pack bitboss-ui@<version>`, or the public CDN copy), and pointing at
996
- * it keeps this offline and reproducible.
997
- */
998
- const installedManifest = join(PACKAGE_ROOT, 'dist', 'ai', 'components.json');
999
- const manifestPath = manifestOverride
1000
- ? resolve(projectRoot, manifestOverride)
1001
- : installedManifest;
1002
- if (!existsSync(manifestPath)) {
1003
- console.error(
1004
- manifestOverride
1005
- ? `[bitboss-ui] --manifest: no file at ${manifestPath}.\n` +
1006
- 'Point it at a components.json from the version you are moving to:\n' +
1007
- ' npm pack bitboss-ui@<version> && tar -xzf bitboss-ui-<version>.tgz\n' +
1008
- ' npx bitboss-ui check --manifest package/dist/ai/components.json'
1009
- : `[bitboss-ui] Manifest not found at ${manifestPath} — reinstall bitboss-ui (or run \`npm run build\` when working in the library repo).`
1010
- );
1011
- process.exit(1);
1012
- }
1013
- const manifest = loadManifest(manifestPath);
1014
-
1015
- /*
1016
- * Q53.23: write the project's `bitboss-ui.d.ts` from the build config, the
1017
- * file the Vite plugin writes when Vite starts. Agents run `vue-tsc` before
1018
- * any dev start, so a name registered in `badgeVariants` was a type error
1019
- * (and an `as any`) until then. Same generator as the plugin; a config it
1020
- * cannot read is left alone. Not under `--manifest` (an upgrade preview
1021
- * must not touch the project).
1022
- */
1023
- if (!manifestOverride) {
1024
- try {
1025
- const projectDts = await import(
1026
- pathToFileURL(join(PACKAGE_ROOT, 'dist', 'project-dts.js')).href
1027
- );
1028
- const synced = syncProjectVariantDts(projectRoot, projectDts);
1029
- const notice = syncNotice(synced);
1030
- // Q65.2: a skip is said too (stderr under `--json`, like `--fix`'s lines).
1031
- if (notice && !(jsonMode && synced.status === 'written'))
1032
- (jsonMode ? console.error : console.log)(notice);
1033
- } catch {
1034
- // No built `dist/project-dts.js` (the library repo before a build):
1035
- // nothing to write with, and nothing for `check` to fail over.
1036
- }
1037
- }
1038
-
1039
- /*
1040
- * Every `--bb-*` the INSTALLED package declares, read from the stylesheet
1041
- * the consumer actually ships. Read from disk rather than hardcoded so this
1042
- * can never claim a token is invented when their version does declare it.
1043
- * Absent stylesheet → an empty set → the unknown-token hint stays silent,
1044
- * which is the right failure: no data, no accusation.
1045
- */
1046
- // Under `--manifest`, take the sheet from beside THAT manifest
1047
- // (`<pkg>/dist/ai/components.json` → `<pkg>/dist/styles.css`). Reading the
1048
- // installed sheet while judging props against another version would mix two
1049
- // releases in one verdict — the exact confusion this flag exists to end.
1050
- const stylesPath = manifestOverride
1051
- ? join(dirname(dirname(manifestPath)), 'styles.css')
1052
- : join(PACKAGE_ROOT, 'dist', 'styles.css');
1053
- const knownTokens = loadKnownTokens(stylesPath);
1054
- const files = changed ? changed.files : resolveCheckFiles(projectRoot, globs);
1055
-
1056
- // CHK-ALLOWCOMPONENTS: `Bb` is a naming convention, not proof of ownership.
1057
- // An app component called `BbRichEditor` is not invalid library markup, and
1058
- // before this the only way to silence it was to rename the component.
1059
- const explicitlyAllowed = new Set([
1060
- ...configuredAllowComponents(projectRoot),
1061
- ...allowComponents,
1062
- ]);
1063
- // Q53.18: the app's own `Bb*` components (`.vue` files in its `components`
1064
- // dirs, Nuxt path-prefix names included) are skipped with zero config;
1065
- // imports from the app's own paths are handled per file by the validator.
1066
- const projectLocal = projectLocalBbComponents(projectRoot);
1067
- const allowedComponents = [...explicitlyAllowed, ...projectLocal.keys()];
1068
-
1069
- // Q46.8: `--fix` applies the ESLint plugin's fixes (the registered v2→v3
1070
- // migrations) with ONLY the bitboss rules, then the check below reports
1071
- // what is left, so one command migrates and verifies.
1072
- if (fix) {
1073
- const outcome = await applyBitbossFixes({
1074
- projectRoot,
1075
- files,
1076
- manifestPath: manifestOverride ? manifestPath : undefined,
1077
- allowComponents: allowedComponents,
1078
- });
1079
- if ('error' in outcome) {
1080
- console.error(`[bitboss-ui] ${outcome.error}`);
1081
- process.exit(1);
1082
- }
1083
- const log = jsonMode ? console.error : console.log;
1084
- log(
1085
- outcome.fixed.length
1086
- ? `[bitboss-ui] check --fix: fixed ${outcome.fixed.length} file(s):\n${outcome.fixed
1087
- .map((file) => ` ${relative(projectRoot, file)}`)
1088
- .join('\n')}`
1089
- : '[bitboss-ui] check --fix: nothing to fix.'
1090
- );
1091
- if (outcome.skipped?.length)
1092
- log(
1093
- `[bitboss-ui] check --fix: ESLint ignored ${outcome.skipped.length} file(s), not fixed:\n${outcome.skipped
1094
- .map((file) => ` ${relative(projectRoot, file)}`)
1095
- .join('\n')}`
1096
- );
1097
- }
1098
- // Q46.6: every `var(--x)` the project reads, from a whole-project sweep
1099
- // (explicit paths included): a local or token the app reads itself is its
1100
- // own, never "set and unread".
1101
- // Q57.11: one walk and one read per file serve every project-wide sweep
1102
- // below (reads, registered rules, the style scan) and the per-file loop.
1103
- const projectSources = collectCheckFiles(
1104
- projectRoot,
1105
- projectRoot,
1106
- HAND_IMPORTED_STYLES_EXTENSIONS,
1107
- gitignoreKit?.ancestorGitignores(projectRoot) ?? []
1108
- );
1109
- const texts = new Map();
1110
- const readText = (path) => {
1111
- if (!texts.has(path)) texts.set(path, readFileSync(path, 'utf-8'));
1112
- return texts.get(path);
1113
- };
1114
- const projectReads = new Set();
1115
- for (const path of projectSources)
1116
- try {
1117
- for (const name of localReads(readText(path))) projectReads.add(name);
1118
- } catch {
1119
- /* unreadable: its reads are unknown, which only means fewer passes */
1120
- }
1121
- // The tokens of the sheet `check` judges against (the installed one, or
1122
- // the one beside `--manifest`) — read AND declared names both count.
1123
- if (manifest.localSurface && existsSync(stylesPath))
1124
- manifest.localSurface.knownTokens = libraryTokens([
1125
- readFileSync(stylesPath, 'utf-8'),
1126
- ...[join(dirname(stylesPath), 'reset.css')]
1127
- .filter((path) => existsSync(path))
1128
- .map((path) => readFileSync(path, 'utf-8')),
1129
- ]);
1130
- // Q54.2: the rules the project registers with `defineRule`, from the same
1131
- // whole-project sweep, so a string rule nobody registered is caught. Q67.1:
1132
- // a call the sweep cannot read is kept by its place, never a silence.
1133
- const registeredRules = {
1134
- names: new Set(configuredRegisteredRules(projectRoot)),
1135
- unreadable: [],
1136
- stock: packageRuleNames(projectRoot),
1137
- };
1138
- const packageRules = registeredRules.stock;
1139
- const ownedRuleSource = ownedBy(projectRoot);
1140
- const presets = new Map();
1141
- const RULE_EXTENSIONS = ['.ts', '.js', '.mjs', '.cjs', '.vue'];
1142
- for (const path of projectSources.filter((file) =>
1143
- RULE_EXTENSIONS.some((ext) => file.endsWith(ext))
1144
- ))
1145
- try {
1146
- const text = readText(path);
1147
- // Q57.3: the project's `definePreset` wrappers, by name.
1148
- for (const [name, preset] of presetDefinitions(text))
1149
- presets.set(name, preset);
1150
- // A nested app (its own package.json) registers nothing for this one.
1151
- if (ownedRuleSource(path))
1152
- addRegistrations(
1153
- registeredRules,
1154
- text,
1155
- relative(projectRoot, path),
1156
- packageRules
1157
- );
1158
- } catch {
1159
- /* unreadable: its registrations are unknown, said where they would be */
1160
- if (ownedRuleSource(path))
1161
- registeredRules.unreadable.push(relative(projectRoot, path));
1162
- }
1163
- const validateOptions = {
1164
- allowComponents: allowedComponents,
1165
- projectReads,
1166
- registeredRules,
1167
- presets,
1168
- // A variant the build plugin registers is the project's own name.
1169
- registeredVariants: readRegisteredVariants(
1170
- projectRoot,
1171
- REGISTERED_VARIANT_OPTIONS
1172
- ),
1173
- optionsApiOff: readOptionsApiOff(projectRoot),
1174
- };
1175
-
1176
- const findings = [];
1177
- let suppressed = 0;
1178
- /** One warning per local `Bb*` component, unless allowlisted (Q53.18). */
1179
- const warnedLocal = new Set();
1180
- const warnLocal = (name, file, line) => {
1181
- if (explicitlyAllowed.has(name) || warnedLocal.has(name)) return;
1182
- warnedLocal.add(name);
1183
- warnings.push(localBbWarning(name, file, line));
1184
- };
1185
- /*
1186
- * Advisory only — see scripts/lib/hand-roll-hints.mjs. Hints never touch the
1187
- * exit code, so a guess can never fail a consumer's build. `--no-hints`
1188
- * silences them for anyone who finds them noisy.
1189
- */
1190
- const hints = [];
1191
- /** Findings graded `severity: 'warning'` — printed, never fatal. */
1192
- const warnings = [];
1193
- const wantHints = !process.argv.includes('--no-hints');
1194
- for (const file of files) {
1195
- const relPath = relative(projectRoot, file);
1196
- const content = readText(file);
1197
- const { findings: fileFindings } = file.endsWith('.md')
1198
- ? validateMarkdown(content, manifest, validateOptions)
1199
- : validateVueSnippet(content, manifest, {
1200
- ...validateOptions,
1201
- // The app's null-value policy, from the project bitboss-ui.d.ts.
1202
- stringControls: stringControlsFor(file),
1203
- // Q61.19: what the project registers globally.
1204
- unimported: { project: projectResolution(projectRoot) },
1205
- });
1206
- // Q46.9: a finding the author silenced for ESLint (`eslint-disable*`,
1207
- // usually with a reason) is silenced here too, or `check` cannot gate
1208
- // CI next to a lint step that passes. `.md` lines are fence-relative,
1209
- // and docs carry no directives, so only `.vue` files are filtered.
1210
- const isDisabled = file.endsWith('.vue')
1211
- ? disabledChecker(content)
1212
- : () => false;
1213
- if (file.endsWith('.vue'))
1214
- for (const [name, line] of localBbImports(content))
1215
- warnLocal(name, relPath, line);
1216
- for (const finding of fileFindings) {
1217
- if (isDisabled(finding.line, ruleForFinding(finding))) {
1218
- suppressed++;
1219
- continue;
1220
- }
1221
- // A `severity: 'warning'` finding (Q53.15 C9b: a slot spelled the
1222
- // pre-reset way) is shown and suppressible, but never fails the run.
1223
- if (finding.severity === 'warning')
1224
- warnings.push({ file: relPath, ...finding });
1225
- else findings.push({ file: relPath, ...finding });
1226
- }
1227
- // .md files are documentation ABOUT components; a round <img> in a doc
1228
- // example is illustrative, not a hand-roll.
1229
- if (wantHints && !file.endsWith('.md')) {
1230
- for (const hint of findHandRollHints(content, knownTokens)) {
1231
- hints.push({ file: relPath, ...hint });
1232
- }
1233
- }
1234
- }
1235
-
1236
- // Q82.20 (b): a variant the build plugin registers that nothing paints
1237
- // renders as the base plate (a solid primary badge). Read across the whole
1238
- // project whatever the file scope: the paint can live in any stylesheet.
1239
- {
1240
- const config = readPluginConfig(projectRoot)?.config ?? 'vite.config';
1241
- const sources = projectSources.flatMap((path) => {
1242
- try {
1243
- return [readText(path)];
1244
- } catch {
1245
- return [];
1246
- }
1247
- });
1248
- for (const { option, name, className } of unstyledVariants(
1249
- validateOptions.registeredVariants,
1250
- sources
1251
- ))
1252
- warnings.push({
1253
- file: config,
1254
- message: `\`${option}\` registers "${name}", but no project file paints \`.${className}\` (or a \`pt\` state for it): it renders as the default variant. Style it in a stylesheet loaded after bitboss-ui/styles.css (design-language guide § Getting soft semantic badges).`,
1255
- });
1256
- }
1257
-
1258
- // Q63.8: portal names, judged against the whole project's declarations
1259
- // and call sites (scripts too: `confirm({ portal })` lives there). A full
1260
- // run reads every source file; explicit paths / `--changed`, only those.
1261
- // Markdown fences are never read: a doc names portals it never declares.
1262
- {
1263
- const portalIndex = projectPortalIndex(projectRoot);
1264
- const PORTAL_SOURCE = /\.(?:vue|[cm]?[jt]sx?)$/;
1265
- const TEST_FILE = /\.(?:test|spec)(?:-d)?\.[cm]?[jt]sx?$/;
1266
- const portalScope = (
1267
- changed ? changed.all : globs.length ? files : projectSources
1268
- ).filter(
1269
- (path) =>
1270
- PORTAL_SOURCE.test(path) &&
1271
- !path.endsWith('.d.ts') &&
1272
- !TEST_FILE.test(path)
1273
- );
1274
- for (const path of portalScope) {
1275
- let content;
1276
- try {
1277
- content = readText(path);
1278
- } catch {
1279
- continue;
1280
- }
1281
- if (!MAY_HAVE_PORTALS.test(content)) continue;
1282
- const isDisabled = disabledChecker(content);
1283
- for (const finding of portalFindings(content, path, portalIndex)) {
1284
- if (isDisabled(finding.line, ruleForFinding(finding))) {
1285
- suppressed++;
1286
- continue;
1287
- }
1288
- const entry = { file: relative(projectRoot, path), ...finding };
1289
- if (finding.severity === 'warning') warnings.push(entry);
1290
- else findings.push(entry);
1291
- }
1292
- }
1293
- }
1294
-
1295
- // Q76.0: `--idioms`, the adoption checklist's patterns. Opt-in and
1296
- // report-only (scripts/lib/idiom-scan.mjs): never a finding, never the exit
1297
- // code. Same file scope as the portal names: scripts hold confirms and
1298
- // mobile checks too.
1299
- const idioms = [];
1300
- if (wantIdioms) {
1301
- const rows = loadAdoptionRows();
1302
- const exts = new Set(rows.flatMap((row) => row.ext));
1303
- const TEST_FILE = /\.(?:test|spec)(?:-d)?\.[cm]?[jt]sx?$/;
1304
- const scope = changed ? changed.all : globs.length ? files : projectSources;
1305
- // Q82.4: the repeats count across files, so they are judged at the end.
1306
- const repeats = [];
1307
- for (const path of scope) {
1308
- const ext = path.slice(path.lastIndexOf('.') + 1);
1309
- if (!exts.has(ext) || path.endsWith('.d.ts') || TEST_FILE.test(path))
1310
- continue;
1311
- let content;
1312
- try {
1313
- content = readText(path);
1314
- } catch {
1315
- continue;
1316
- }
1317
- const file = relative(projectRoot, path);
1318
- for (const hit of scanIdioms(content, ext, rows))
1319
- idioms.push({ file, ...hit });
1320
- for (const occurrence of repeatOccurrences(content, ext))
1321
- repeats.push({ file, ...occurrence });
1322
- }
1323
- idioms.push(...repeatedIdioms(repeats));
1324
- }
1325
-
1326
- for (const [name, file] of projectLocal) warnLocal(name, file);
1327
- // Q60.6: a `vue-tsc` below 3, read from package.json. One line, never
1328
- // fatal. (A missing `checkUnknownComponents` is no longer warned about:
1329
- // `unimported-component` covers it, Q61.19.)
1330
- warnings.push(...toolchainWarnings(projectRoot));
1331
-
1332
- // Q25: a hand import of `bitboss-ui/styles.css` while the runtime plugin
1333
- // injects it. Project-level — the answer needs the build config — so it
1334
- // reads the style and script files too; with explicit paths, only those.
1335
- // `--changed`: every changed file, stylesheets and scripts included.
1336
- const styleScan = changed
1337
- ? changed.all
1338
- : globs.length
1339
- ? files
1340
- : projectSources;
1341
- findings.push(
1342
- ...handImportedStylesFindings(
1343
- projectRoot,
1344
- styleScan.map((path) => ({ path, relPath: relative(projectRoot, path) })),
1345
- readText
1346
- )
1347
- );
1348
- // A locale the library does not ship, in the build config and in
1349
- // `setConfig({ locale })` (owner 2026-10-07: `en-UK` → `en-GB`).
1350
- findings.push(
1351
- ...unknownLocaleFindings(
1352
- projectRoot,
1353
- styleScan.map((path) => ({ path, relPath: relative(projectRoot, path) })),
1354
- manifest,
1355
- readText
1356
- )
1357
- );
1358
- // Q67.9: a project copy of the definePreset recipe older than the one
1359
- // shipped beside the manifest judged against (`<dist>/ai/helpers/`), or
1360
- // unstamped. Reads the stamp only: an edited copy is the app's own.
1361
- findings.push(
1362
- ...staleDefinePresetFindings(
1363
- styleScan.map((path) => ({ path, relPath: relative(projectRoot, path) })),
1364
- readText,
1365
- readShippedDefinePreset(dirname(manifestPath))
1366
- )
1367
- );
1368
- // Q46.5: `.bb-*` selectors in the app's stylesheets (the `.vue` `<style>`
1369
- // blocks are read by the validator above).
1370
- for (const path of styleScan) {
1371
- if (!/\.(?:css|scss|sass|less|pcss|postcss|styl)$/.test(path)) continue;
1372
- const relPath = relative(projectRoot, path);
1373
- const content = readText(path);
1374
- for (const finding of [
1375
- ...cssClassFindings(content, manifest.cssSurface, {
1376
- stylesheet: true,
1377
- ownedBlocks: ownedClassBlocks(allowedComponents, manifest.cssSurface),
1378
- }),
1379
- // Q46.6: custom properties set where nothing reads them.
1380
- ...cssLocalFindings(content, manifest.cssSurface, manifest.localSurface, {
1381
- stylesheet: true,
1382
- projectReads,
1383
- }),
1384
- ])
1385
- findings.push({ file: relPath, ...finding });
1386
- }
1387
-
1388
- /** One line, so a silenced finding is never invisible. */
1389
- const printSuppressed = () => {
1390
- if (suppressed === 0) return;
1391
- console.log(
1392
- `[bitboss-ui] ${suppressed} finding(s) silenced by eslint-disable comments.`
1393
- );
1394
- };
1395
-
1396
- /** Warning block, printed on success and on failure alike. Never fatal. */
1397
- const printWarnings = () => {
1398
- if (warnings.length === 0) return;
1399
- console.log(
1400
- `\n[bitboss-ui] ${warnings.length} warning(s) — not fatal, but likely wrong:`
1401
- );
1402
- for (const warning of warnings) {
1403
- const at = warning.line != null ? `:${warning.line}` : '';
1404
- console.log(` ⚠ ${warning.file}${at} ${warning.message}`);
1405
- }
1406
- };
1407
-
1408
- /** Advisory block, printed on success and on failure alike. Never fatal. */
1409
- const printHints = () => {
1410
- if (hints.length === 0) return;
1411
- console.log(
1412
- `\n[bitboss-ui] ${hints.length} hint(s) — advisory, not errors:`
1413
- );
1414
- for (const hint of hints) {
1415
- console.log(` ${hint.file}:${hint.line}`);
1416
- console.log(` → ${hint.message}`);
1417
- }
1418
- console.log(
1419
- ' Deliberate? Ignore these, record them in a HANDROLLED note, or pass --no-hints.'
1420
- );
1421
- };
1422
-
1423
- /** The adoption checklist's report (`--idioms`). Never fatal. */
1424
- const printIdioms = () => {
1425
- if (!wantIdioms) return;
1426
- if (idioms.length === 0) {
1427
- console.log(
1428
- '\n[bitboss-ui] idioms: no hand-rolled pattern from the adoption checklist found.'
1429
- );
1430
- return;
1431
- }
1432
- console.log(
1433
- `\n[bitboss-ui] ${idioms.length} idiom(s) — hand-rolled patterns the library ships, report-only:`
1434
- );
1435
- for (const idiom of idioms)
1436
- console.log(` ${idiom.file}:${idiom.line} [${idiom.id}] → ${idiom.use}`);
1437
- console.log(
1438
- ' Rows, replacements and the scope rule: node_modules/bitboss-ui/dist/ai/guides/migration/adoption-checklist.md.\n' +
1439
- ' Kept on purpose? Say why in one line of a HANDROLLED note.'
1440
- );
1441
- };
1442
-
1443
- /*
1444
- * Which API the verdict is against. Silent when it is the installed one —
1445
- * that is the assumption, and a banner on every run trains people to skip
1446
- * it. Loud under `--manifest`, because "12 findings" means something
1447
- * completely different when it describes a version you have not installed
1448
- * yet, and a scrollback with no marker is indistinguishable from a normal
1449
- * run.
1450
- */
1451
- const judgedAgainst = manifestOverride
1452
- ? manifestVersionOf(manifestPath)
1453
- : packageVersion();
1454
- if (changed && !jsonMode) {
1455
- console.log(
1456
- `[bitboss-ui] check --changed: ${files.length} .vue/.md file(s) changed vs HEAD (untracked included).\n` +
1457
- ' Unchanged files are not validated, and the styles-import scan reads only the\n' +
1458
- ' changed files; the project-wide context (var() reads, defineRule names, local\n' +
1459
- ' Bb* components) still comes from the whole project. Run a full `check` before merging.'
1460
- );
1461
- }
1462
- if (manifestOverride && !jsonMode) {
1463
- console.log(
1464
- `[bitboss-ui] check: judging against bitboss-ui ${judgedAgainst} (--manifest), NOT the installed ${packageVersion()}.\n` +
1465
- ' Findings describe the version you are moving TO.'
1466
- );
1467
- }
1468
-
1469
- if (jsonMode) {
1470
- console.log(
1471
- JSON.stringify(
1472
- {
1473
- findings,
1474
- warnings,
1475
- hints,
1476
- ...(wantIdioms ? { idioms } : {}),
1477
- suppressed,
1478
- files: files.length,
1479
- ...(changed ? { changed: true } : {}),
1480
- manifestVersion: judgedAgainst,
1481
- installedVersion: packageVersion(),
1482
- },
1483
- null,
1484
- 2
1485
- )
1486
- );
1487
- if (findings.length > 0) process.exit(1);
1488
- if (files.length === 0 && globs.length > 0 && !allowEmpty) process.exit(1);
1489
- return;
1490
- }
1491
-
1492
- if (files.length === 0) {
1493
- // An EXPLICIT pattern that matched nothing is almost always a typo'd or
1494
- // stale CI path, and answering it with exit 0 means the step goes green
1495
- // having validated nothing — the check that was meant to catch bad
1496
- // markup is itself the thing that broke, silently (SWP-016). A bare
1497
- // sweep finding nothing is a different, legitimate case (a package with
1498
- // no .vue files yet), so it still passes.
1499
- if (changed) {
1500
- console.log(
1501
- '[bitboss-ui] check --changed: no changed .vue/.md files — nothing to validate.'
1502
- );
1503
- return;
1504
- }
1505
- if (globs.length > 0 && !allowEmpty) {
1506
- console.error(
1507
- `[bitboss-ui] check: no .vue/.md files matched ${globs.map((g) => `\`${g}\``).join(', ')} — nothing was validated. ` +
1508
- 'Fix the path, or pass `--allow-empty` if an empty match is expected.'
1509
- );
1510
- process.exit(1);
1511
- }
1512
- console.log(
1513
- '[bitboss-ui] check: no .vue/.md files matched — nothing to do.'
1514
- );
1515
- printIdioms();
1516
- return;
1517
- }
1518
-
1519
- if (findings.length === 0) {
1520
- console.log(
1521
- `[bitboss-ui] check OK — ${summarizeFileCounts(files)} file(s), zero unknown Bb* props/v-models/slots/nav-attrs.`
1522
- );
1523
- printSuppressed();
1524
- printWarnings();
1525
- printHints();
1526
- printIdioms();
1527
- return;
1528
- }
1529
-
1530
- printSuppressed();
1531
- printWarnings();
1532
- const fileCount = new Set(findings.map((f) => f.file)).size;
1533
- console.error(
1534
- `[bitboss-ui] check FAILED — ${findings.length} finding(s) across ${fileCount} file(s):`
1535
- );
1536
- let lastFile = null;
1537
- for (const finding of findings) {
1538
- if (finding.file !== lastFile) {
1539
- console.error(`\n ${finding.file}`);
1540
- lastFile = finding.file;
1541
- }
1542
- const where =
1543
- finding.fenceInfo != null
1544
- ? `fence#${finding.fenceIndex}${finding.fenceInfo ? ` (${finding.fenceInfo})` : ''} `
1545
- : '';
1546
- // CHK-LINE: three identical `full-screen` findings under one filename
1547
- // were indistinguishable, so every automated fix had to re-parse the
1548
- // file to place them. The line comes straight off the template AST.
1549
- const at = finding.line != null ? `line ${finding.line}: ` : '';
1550
- // A `fallthrough` finding is not a typo and may be doing something
1551
- // today — a native listener reaching the root element. It still counts,
1552
- // but marking it `✗` alongside a genuinely broken prop is what let one
1553
- // migration report read a live `<BbDialog @close>` as dead code.
1554
- const mark = finding.fallthrough ? '⚠' : '✗';
1555
- console.error(
1556
- ` ${mark} ${at}${where ? `[${where.trim()}] ` : ''}${finding.message}`
1557
- );
1558
- if (finding.hint) console.error(` hint: ${finding.hint}`);
1559
- }
1560
- console.error(
1561
- '\nFix the markup (or the component API) so it stays copy-safe for agents.'
1562
- );
1563
- printFindingLegend(findings);
1564
- printHints();
1565
- printIdioms();
1566
- process.exit(1);
1567
- }
1568
-
1569
- function printHelp() {
1570
- console.log(`bitboss-ui CLI
1571
-
1572
- Usage:
1573
- npx bitboss-ui <command>
1574
-
1575
- Commands:
1576
- ai-init [--update] [--no-mcp]
1577
- Inject AI-agent knowledge-base pointers into the current
1578
- project (AGENTS.md, Cursor rules, Copilot instructions,
1579
- Claude skill, Windsurf rules), register the bitboss-ui MCP
1580
- server for Claude Code (.mcp.json), Cursor
1581
- (.cursor/mcp.json), VS Code/Copilot (.vscode/mcp.json) and
1582
- Zed (.zed/settings.json) —
1583
- merges, never overwrites other servers — and install its
1584
- optional peers with the project's package manager. Sets
1585
- \`vueCompilerOptions.checkUnknownComponents: true\` in the
1586
- tsconfig unless it is already named (Nuxt: says where),
1587
- and suggests (never writes) the install guide's strict
1588
- template set when \`strictTemplates\` is not on.
1589
- \`--no-mcp\` skips the server and the install. Idempotent —
1590
- safe to re-run after upgrades.
1591
- add <id…> | --all [--dir <path>] [--dry-run] [--json]
1592
- Copy Inertia helpers (\`helpers list\`; --all for every
1593
- one) into the app as
1594
- files it owns, with every file they import, and record
1595
- them in bitboss-ui.lock.json. Creates missing files and
1596
- adopts identical ones; never changes an existing file.
1597
- Prints the install line for missing npm packages; never
1598
- runs it. First run: --dir, else
1599
- resources/js/composables/inertia-helpers (Laravel) or
1600
- src/composables/inertia-helpers.
1601
- helpers [list] [--json]
1602
- Every helper id, what it does, its files and packages,
1603
- and its state in this app.
1604
- helpers diff [id…] [--json]
1605
- The state of every installed helper file; with ids, the
1606
- difference between your copy and this bitboss-ui's.
1607
- Exit 1 when something differs. Comments never count as
1608
- edits: a stale file's comments are replaced by update.
1609
- helpers update [id…] [--dry-run] [--json]
1610
- Replace helper files that hold an older bitboss-ui
1611
- version (formatting does not matter); keep the files
1612
- you edited; keep a file you edited that bitboss-ui also
1613
- changed, and the files that import it (exit 2), and
1614
- update the rest of its group. \`npm update bitboss-ui\`
1615
- does not touch your copies: run this after upgrading.
1616
- add/helpers exit codes: 0 done or nothing to do; 1 usage
1617
- error or diff found a difference; 2 refused (add wrote
1618
- nothing); 3 a precondition failed, nothing written; 4 a
1619
- write failed and was rolled back. No --force: to take
1620
- bitboss-ui's copy over your edit, delete the file and
1621
- run add again. --yes is accepted and does nothing (the
1622
- commands never prompt).
1623
- check [glob…] [--changed] [--json] [--allow-empty] [--allow-component <Name>]
1624
- [--no-hints] [--manifest <path>] [--fix] [--idioms]
1625
- Validate \`Bb*\` markup in .vue/.md files against the
1626
- installed components.json manifest (unknown/removed props,
1627
- bad v-models, unknown \`<template #slot>\` names,
1628
- \`href\`/\`to\`/\`method\` on a component that doesn't declare
1629
- them). Defaults to every .vue/.md file under the current directory
1630
- (node_modules, dist, .git, vendor,
1631
- storage, public, .output, .nuxt, bootstrap/cache
1632
- excluded — pass an explicit glob/path to widen the scan).
1633
- Exits 1 on findings, and on an explicit glob that matched
1634
- nothing (a typo'd CI path validates zero files silently) —
1635
- pass \`--allow-empty\` when an empty match is expected.
1636
-
1637
- \`--changed\` validates only the .vue/.md files git reports
1638
- changed against HEAD (staged or not) plus untracked ones —
1639
- the fast loop after an edit. Unchanged files are not
1640
- validated and the styles-import scan reads only the
1641
- changed files; what a finding depends on elsewhere (the
1642
- project's var() reads, defineRule names, local Bb*
1643
- components) is still read from the whole project. Nothing
1644
- changed → exit 0. Not with paths. Run a full \`check\`
1645
- before merging.
1646
-
1647
- It also writes your project's \`bitboss-ui.d.ts\` (the
1648
- file the Vite plugin writes on start) from the variant
1649
- options in vite.config / nuxt.config, so a newly
1650
- registered variant name type-checks before Vite runs.
1651
- Left alone when the options are not inline literals, and
1652
- under \`--manifest\`.
1653
-
1654
- \`--fix\` first applies the ESLint plugin's fixes (the
1655
- registered renames — v2→v3 and between 3.0 betas, item
1656
- fields included — polarity flips and value remaps) to the matched .vue files with ONLY the
1657
- bitboss-ui rules — your own ESLint config is not used —
1658
- then reports what is left. Needs \`eslint\` and
1659
- \`vue-eslint-parser\` in the project.
1660
-
1661
- \`--idioms\` also lists the hand-rolled controls still in
1662
- the app that the library ships (radio cards, segmented
1663
- controls, sortable headers, steppers, app sheets, app
1664
- confirms, …) with file:line and the replacement: the
1665
- adoption checklist's own rows, run over .vue and script
1666
- files, and two repeats across files: one \`icon\` literal
1667
- on 3+ BbAlert / toasts (→ a variant) and one \`pt:<part>\`
1668
- literal on 3+ instances of a component (→ the global
1669
- \`pt\` map). Report-only and opt-in: it never changes the
1670
- exit code, and plain \`check\` never runs it. Guide:
1671
- dist/ai/guides/migration/adoption-checklist.md.
1672
-
1673
- Honours ESLint disable comments in .vue files: a finding
1674
- silenced for the matching \`bitboss-ui/*\` rule (or by a
1675
- bare \`eslint-disable\`) is not reported, only counted:
1676
- <!-- eslint-disable-next-line bitboss-ui/require-table-slot-prop -- why -->
1677
-
1678
- \`--manifest <path>\` judges against another version's
1679
- components.json instead of the installed one — the answer
1680
- to "which of my files break if I upgrade", BEFORE you
1681
- upgrade. The banner names both versions so a findings list
1682
- is never mistaken for one about your current install.
1683
- npm pack bitboss-ui@3.0.0-beta.21
1684
- tar -xzf bitboss-ui-3.0.0-beta.21.tgz
1685
- npx bitboss-ui check --manifest package/dist/ai/components.json
1686
- A path, not a version, on purpose: fetching one would put
1687
- a registry call inside a validator people run in CI.
1688
-
1689
- \`--allow-component <Name>\` (repeatable) exempts a
1690
- component your APP owns whose name starts with \`Bb\` —
1691
- the prefix is a convention, not proof of provenance.
1692
- Persist the list instead of repeating the flag:
1693
- package.json { "bitboss-ui": { "allowComponents": ["BbRichEditor"] } }
1694
- or \`bitboss-ui.check.json\` \`{ "allowComponents": [...] }\`.
1695
- Same option name as the ESLint rules' \`allowComponents\`,
1696
- so both gates configure alike. An allowed or
1697
- project-local component owns its \`bb-<kebab>\` class
1698
- block, so CSS styling it is never \`unknown-class\`.
1699
-
1700
- \`--json\` prints \`{ findings: [...], warnings: [...], hints: [...],
1701
- suppressed, files, manifestVersion, installedVersion }\`
1702
- (plus \`changed: true\` under \`--changed\`, and
1703
- \`idioms: [{ file, line, id, use, count? }]\` under \`--idioms\`).
1704
- Each finding: \`{ file, line, component, attr, kind,
1705
- message, hint?, to? }\` (plus \`fenceIndex\`/\`fenceInfo\`
1706
- inside a markdown fence; \`line\` is absolute in the file).
1707
- \`kind\` is one of: \`removed-prop\` (a recorded break on a
1708
- prop or a \`pt\` key, v2→v3 or a v3 beta; \`to\` is the new
1709
- name when there is one and \`--fix\` writes it, else the
1710
- message says what to do), \`unknown-prop\` (not a v3 prop of that component;
1711
- may never have been one — see the legend the text output
1712
- prints), \`unknown-component\` (a \`Bb*\` tag the
1713
- manifest doesn't have; \`attr\` is the tag),
1714
- \`unknown-model\`, \`unknown-event\`, \`removed-event\`
1715
- (a listener for an event the component no longer emits,
1716
- e.g. BbColorPalette \`@update:open\`), \`unknown-slot\`,
1717
- \`unknown-pt-key\` (a key of the \`pt\` object form that
1718
- matches no part / state; \`to\` when the part was renamed),
1719
- \`no-default-slot\`, \`empty-dropzone\` (a warning: a
1720
- BbDropzone with nothing in its slot, the only surface
1721
- it has, renders 0px tall), \`inert-nav-attr\`,
1722
- \`nameless-control\` (an icon-only BbButton or BbBadge,
1723
- or a BbProgress, with no accessible name),
1724
- \`removed-css-local\` (a component CSS local the
1725
- library removed, e.g. \`--day-slot-allowance\`),
1726
- \`renamed-export\` (an import of a name bitboss-ui
1727
- renamed, e.g. \`useBbFormContext\` → \`useBbForm\`),
1728
- \`private-import\` (an import from inside the package's
1729
- \`dist/\`), \`not-exported-type\` (a \`Pt*\` pt type
1730
- imported from bitboss-ui: type pt through
1731
- \`<Component>Props['pt']\` instead),
1732
- \`missing-value\` / \`missing-id\` /
1733
- \`duplicate-row-label\` (a BbDropdown row in a
1734
- selectable group without a \`value\`, a selectable
1735
- group without an \`id\`, or two value-less rows with
1736
- the same \`label\` in one group; before
1737
- 3.0.0-beta.49 \`missing-key\` / \`duplicate-row-text\`),
1738
- \`renamed-item-field\` (a dropdown row \`key\` /
1739
- \`text\`, a dropdown group \`key\`, a tab \`key\` or a
1740
- crumb \`key\` / \`text\` in an inline or same-file
1741
- items array: rows and crumbs take \`value\` /
1742
- \`label\`, tabs \`value\`, groups \`id\`; \`--fix\`
1743
- rewrites it),
1744
- \`tab-link-navigation\` / \`tab-link-missing\` (a
1745
- BbTabs whose items have \`href\` / \`to\` is a nav of
1746
- links: \`navigation\` on it does nothing, and an item
1747
- with neither renders as a disabled link),
1748
- \`unknown-variant\` (a variant name from another
1749
- library, e.g. \`danger\` on BbAlert / BbBadge; the
1750
- message names ours),
1751
- \`duplicate-field-identity\` (two validated fields in
1752
- one \`BbForm\` on the same path: the same \`name\`,
1753
- or the same label with no \`name\`),
1754
- \`unimported-component\` (a \`.vue\` file uses a
1755
- bitboss-ui tag it never imports and the project never
1756
- registers globally: it renders as an empty element),
1757
- \`reactive-v-model\` (a \`v-model\` on a \`<script
1758
- setup>\` \`const x = reactive(…)\`: a production build
1759
- rejects the write-back; hold it in a \`ref()\`),
1760
- \`text-null-value\` (a \`v-model\` on BbTextInput /
1761
- BbTextarea bound to a ref typed \`string\` while the
1762
- field writes \`null\` once emptied: widen it to
1763
- \`ref<string | null>\`, or \`null-value="string"\`),
1764
- \`dropdown-default-slot\` (a trigger in a BbDropdown's
1765
- default slot, which holds BbDropdownGroup companions:
1766
- it opens nothing; use \`#activator="{ props }"\` with
1767
- \`v-bind="props"\`, or \`v-bb-dropdown\`),
1768
- \`collapsible-trigger-aria\` (an element whose
1769
- \`@click="open = !open"\` flips a BbCollapsible's
1770
- ref, with no \`aria-expanded\`: add
1771
- \`:aria-expanded="open"\` + \`aria-controls\`),
1772
- \`form-v-model\` (\`v-model\`, \`:model-value\` or an
1773
- \`@update:model-value\` listener on a \`BbForm\`: it
1774
- takes its object one way, \`:model="draft"\`),
1775
- \`bare-portal-name\` (\`v-bb-popover="user-card"\` /
1776
- \`v-bb-hover-card="user-card"\` without the inner
1777
- quotes: an expression, not a portal name; write
1778
- \`"'user-card'"\`),
1779
- \`unknown-portal\` (\`v-bb-hover-card\` /
1780
- \`v-bb-popover\` / \`confirm()\` names a portal no
1781
- \`<…Portal name>\` in the project declares; did-you-mean
1782
- in the message), \`portal-family-mismatch\` (a
1783
- hover-card portal opened by \`v-bb-popover\`, or the
1784
- other way round; literal names only, a \`:name\`
1785
- binding or a non-literal call site is never judged),
1786
- \`unknown-dialog\` (\`v-bb-dialog\` /
1787
- \`v-bb-off-canvas\` / \`useBbDialog()\` /
1788
- \`useBbOffCanvas()\` names an id no
1789
- \`<BbDialog | BbOffCanvas id>\` declares, or one of
1790
- the other family; literal ids only),
1791
- \`positional-provider\` (an \`items\` provider with
1792
- positional arguments: it receives one object,
1793
- \`({ query, reason, modelValue, signal })\`),
1794
- \`rules-ignored-by-schema\` (a validated field's
1795
- \`rules\` inside a \`BbForm\` that has a \`schema\`:
1796
- vee-validate reads only the schema),
1797
- \`row-without-name\` (a form control in a \`v-for\`
1798
- inside a \`BbForm\` with a bound label and no \`name\`),
1799
- \`field-without-name\` (a field with its own
1800
- \`v-model\` and no \`name\` in a \`BbForm\` with
1801
- \`field-errors\`: its errors never reach it; your
1802
- \`definePreset\` wrappers count as their Bb* control),
1803
- \`retired-entrypoint\` (an import from
1804
- \`bitboss-ui/validated\`, retired: everything is in
1805
- \`bitboss-ui\`; \`--fix\` rewrites it in .vue files),
1806
- \`unregistered-rule\` (a string or object rule no
1807
- \`defineRule\` in the project registers (in a .md
1808
- page, also one the page's own fences show); a
1809
- registration it cannot read is named, never skipped:
1810
- list such names under \`registeredRules\` in
1811
- bitboss-ui.check.json),
1812
- \`invalid-value\` (a static value outside a closed
1813
- union, e.g. \`placement="bottom-centre"\`; variants
1814
- and other registry-backed unions are not checked),
1815
- \`stale-define-preset\` (a copy of the definePreset
1816
- recipe whose \`// bitboss-ui definePreset rev N\` stamp
1817
- is older than the shipped one, or missing; update it
1818
- with \`cp node_modules/bitboss-ui/dist/ai/helpers/definePreset.ts <file>\`),
1819
- \`wrapper-drops-props\` (a wrapper whose
1820
- \`defineProps\` declares a \`Bb*Props\` type, bare,
1821
- \`Omit\` or \`Pick\`, and never binds or reads some
1822
- of those props: a caller's value is dropped),
1823
- \`renamed-slot\` (a slot the library renamed;
1824
- \`--fix\` rewrites it), \`missing-partner-prop\`,
1825
- \`partner-prop\`,
1826
- \`validated-only-prop\`, \`object-items-without-text\`
1827
- (object \`items\` with neither a \`label\` nor a
1828
- \`text\` field and no \`item-text\`; reads only
1829
- an inline array, or a \`const\` array, \`ref([…])\` or
1830
- \`reactive([…])\` in the same file's
1831
- \`<script setup>\`), \`reserved-key\` (a column
1832
- \`key\` or item \`value\` whose slot name is one of
1833
- the component's own slots, e.g. a BbTable column keyed
1834
- \`actions\`; read from the manifest, same-file items
1835
- only), \`hand-imported-styles\`
1836
- (\`bitboss-ui/styles.css\` imported in CSS, a script or
1837
- Nuxt's \`css\` while \`injectStyles\` is on: delete it;
1838
- read only when vite.config / nuxt.config says so),
1839
- \`unknown-locale\` (a \`locale\` / \`enabledLocales\`
1840
- literal in vite.config / nuxt.config, or a
1841
- \`setConfig({ locale })\`, that bitboss-ui does not
1842
- ship; \`suggestion\` is the nearest one: en-UK →
1843
- en-GB), \`unknown-class\` (a selector on a \`.bb-*\` class the
1844
- library does not render, in a stylesheet or a
1845
- \`<style>\` block; \`suggestion\` is the nearest real
1846
- one), \`renamed-class\` (a class the library renamed;
1847
- \`to\` is its successor). Your own classes are never
1848
- read, nor a \`bb-*\` class the same file adds itself
1849
- (\`class\`, \`:class\`, \`pt:*\`), \`inert-token\` (a
1850
- \`--bb-*\` SET that the library neither declares nor
1851
- reads; \`suggestion\` = the nearest token),
1852
- \`inert-local\` (a local set on a \`.bb-*\` block, nested
1853
- rules included, or on a Bb* tag's \`style\` / \`:style\` /
1854
- \`[--x:…]\` class, whose component, and what it mounts,
1855
- never reads it; \`to\` when it was renamed). A local on your own ancestor
1856
- element, or one your CSS reads, is never judged.
1857
- \`warnings[]\` (never fail the run) use the same shape with
1858
- \`severity: "warning"\`: \`likely-squashed-slot\` (a slot
1859
- name that looks like a camelCase key squashed, e.g.
1860
- \`#createdat\`), \`computed-slot-key\` (a computed slot
1861
- name over keys \`check\` cannot see, not spelled
1862
- through \`slotKey(…)\`), \`local-bb-component\` (your own
1863
- component uses the \`Bb\` prefix; rename it),
1864
- \`single-reason\` (an \`items\` provider that tests
1865
- \`reason\` against one cause other than \`'search'\`;
1866
- check \`reason !== 'search'\`), \`unused-portal\` (a
1867
- \`<…Portal name>\` nothing opens: no call site and the
1868
- name in no string of the project), \`vue-tsc-major\`
1869
- (\`vue-tsc\` below 3 in package.json: the generic
1870
- components' props go unchecked), \`prefer-v-bb-dialog\`
1871
- (a \`ref(false)\` only a BbDialog / BbOffCanvas
1872
- \`v-model\` and \`@click="x = true"\` use: give the
1873
- dialog an \`id\` and put \`v-bb-dialog\` on the
1874
- trigger; ESLint's \`--fix\` rewrites it when nothing
1875
- else uses the ref), \`hidden-label-placeholder\` (a
1876
- field or select with \`hide-label\` and no
1877
- \`placeholder\`: an empty unlabelled box to a sighted
1878
- user; add a \`placeholder\`).
1879
- changelog [--since <version>] [--until <version>] [--json]
1880
- Breaking changes between two releases — "what breaks if I
1881
- bump". \`--since\` is the version you are ON, and is
1882
- exclusive. With no range, every break in the v2 → v3
1883
- upgrade. Then what the range added, one line per feature
1884
- (with no range, only their count). Fixes are not tracked,
1885
- so no breaking changes means nothing breaks, not that
1886
- nothing changed.
1887
- npx bitboss-ui changelog --since 3.0.0-beta.20
1888
- Pair it with \`check --manifest\` to turn the list into the
1889
- files in YOUR app that break.
1890
-
1891
- mcp Start a stdio MCP server exposing the dist/ai knowledge
1892
- base (search_docs, search_components, get_component,
1893
- get_composable, list_tokens, list_guides, get_guide,
1894
- list_changes, list_recipes, get_recipe, validate) to
1895
- MCP-capable agent harnesses.
1896
- help Show this help.
1897
- `);
1898
- }
1899
-
1900
- /**
1901
- * Strict `node:util` parseArgs wrapper: unknown flags/positionals become an
1902
- * actionable `[bitboss-ui] <command>: …` error + help + exit 1.
1903
- */
1904
- function parseCommandArgs(
1905
- command,
1906
- args,
1907
- options,
1908
- { allowPositionals = false } = {}
1909
- ) {
1910
- try {
1911
- return parseArgs({ args, options, allowPositionals, strict: true });
1912
- } catch (error) {
1913
- const message = error instanceof Error ? error.message : String(error);
1914
- console.error(`[bitboss-ui] ${command}: ${message}`);
1915
- printHelp();
1916
- process.exit(1);
1917
- }
1918
- }
1919
-
1920
- const [command, ...commandArgs] = process.argv.slice(2);
1921
-
1922
- switch (command) {
1923
- case 'ai-init': {
1924
- const { values } = parseCommandArgs(command, commandArgs, {
1925
- update: { type: 'boolean' },
1926
- // The MCP server is registered by default: people ran ai-init, got
1927
- // the pointers, and never learned the server existed.
1928
- 'no-mcp': { type: 'boolean' },
1929
- });
1930
- aiInit({ mcp: !values['no-mcp'] });
1931
- break;
1932
- }
1933
- case 'check': {
1934
- const { values, positionals } = parseCommandArgs(
1935
- command,
1936
- commandArgs,
1937
- {
1938
- json: { type: 'boolean' },
1939
- 'allow-empty': { type: 'boolean' },
1940
- 'allow-component': { type: 'string', multiple: true },
1941
- fix: { type: 'boolean' },
1942
- manifest: { type: 'string' },
1943
- changed: { type: 'boolean' },
1944
- idioms: { type: 'boolean' },
1945
- // Accepted and ignored here — read straight off argv inside
1946
- // checkCommand, but parseArgs is strict, so it must be declared.
1947
- 'no-hints': { type: 'boolean' },
1948
- },
1949
- { allowPositionals: true }
1950
- );
1951
- await checkCommand(positionals, {
1952
- fix: values.fix ?? false,
1953
- json: values.json ?? false,
1954
- allowEmpty: values['allow-empty'] ?? false,
1955
- allowComponents: values['allow-component'] ?? [],
1956
- manifest: values.manifest,
1957
- changed: values.changed ?? false,
1958
- idioms: values.idioms ?? false,
1959
- });
1960
- break;
1961
- }
1962
- case 'changelog': {
1963
- const { values } = parseCommandArgs(command, commandArgs, {
1964
- since: { type: 'string' },
1965
- until: { type: 'string' },
1966
- json: { type: 'boolean' },
1967
- });
1968
- changelogCommand({
1969
- since: values.since,
1970
- until: values.until,
1971
- json: values.json ?? false,
1972
- });
1973
- break;
1974
- }
1975
- case 'mcp': {
1976
- // `@modelcontextprotocol/sdk` + `zod` are OPTIONAL peers, not
1977
- // dependencies: together they weigh ~12 MB — more than every runtime
1978
- // dependency of the component library combined, and the SDK drags in a
1979
- // whole HTTP stack (express, hono, cors, jose). Only this subcommand
1980
- // needs them, so consumers who never run the MCP server do not pay for
1981
- // it. That makes the import failure a SUPPORTED path, and a bare
1982
- // ERR_MODULE_NOT_FOUND stack is not an answer — say what to install.
1983
- let main;
1984
- try {
1985
- ({ main } = await import('./bitboss-ui-mcp.mjs'));
1986
- } catch (error) {
1987
- if (error?.code !== 'ERR_MODULE_NOT_FOUND') throw error;
1988
- // Running from an npx cache is a DIFFERENT failure wearing the same
1989
- // error: the peers resolve relative to the package we were launched
1990
- // from, so a cached copy can never see the project's node_modules no
1991
- // matter what is installed there. Telling that user to install peers
1992
- // they already have is what sent a consumer down a dead end
1993
- // (2026-09-09). `ai-init` now writes the local binary instead
1994
- // of `npx`, so the fix is to rewrite the config.
1995
- const fromNpxCache = /[/\\]_npx[/\\]/.test(
1996
- fileURLToPath(import.meta.url)
1997
- );
1998
- const projectHasPeers = missingMcpPeers(process.cwd()).length === 0;
1999
- if (fromNpxCache && projectHasPeers) {
2000
- console.error(
2001
- 'bitboss-ui mcp was launched through `npx`, which runs it from the npx cache —\n' +
2002
- 'its optional peers resolve there, not in your project, so the server cannot start\n' +
2003
- `even though this project has them installed (${MCP_PEERS.join(', ')}).\n\n` +
2004
- 'Fix the harness config to invoke the installed binary:\n\n' +
2005
- ' npx bitboss-ui ai-init\n\n' +
2006
- `which writes \`node ${MCP_BIN_PATH} mcp\`. To run it right now:\n\n` +
2007
- ` node ${MCP_BIN_PATH} mcp\n\n` +
2008
- `Resolution failed with: ${error.message}`
2009
- );
2010
- process.exitCode = 1;
2011
- break;
2012
- }
2013
- console.error(
2014
- 'bitboss-ui mcp needs two optional peer dependencies that are not installed:\n' +
2015
- `\n npm i -D ${MCP_PEERS.join(' ')}\n\n` +
2016
- 'They are optional because they are ~12 MB and only this subcommand uses them.\n' +
2017
- `Resolution failed with: ${error.message}`
2018
- );
2019
- process.exitCode = 1;
2020
- break;
2021
- }
2022
- await main();
2023
- break;
2024
- }
2025
- case 'add':
2026
- case 'helpers': {
2027
- const { values, positionals } = parseCommandArgs(
2028
- command,
2029
- commandArgs,
2030
- {
2031
- json: { type: 'boolean' },
2032
- 'dry-run': { type: 'boolean' },
2033
- yes: { type: 'boolean', short: 'y' },
2034
- ...(command === 'add'
2035
- ? { dir: { type: 'string' }, all: { type: 'boolean' } }
2036
- : {}),
2037
- },
2038
- { allowPositionals: true }
2039
- );
2040
- const [sub, ...rest] =
2041
- command === 'add' ? ['add', ...positionals] : positionals;
2042
- const subcommand = command === 'add' ? 'add' : (sub ?? 'list');
2043
- if (subcommand === 'list' && values['dry-run']) {
2044
- console.error(
2045
- '[bitboss-ui] helpers list: --dry-run applies to add and update'
2046
- );
2047
- process.exit(1);
2048
- }
2049
- const { runHelpers } = await import('../scripts/lib/helpers-add.mjs');
2050
- const result = await runHelpers({
2051
- command: subcommand,
2052
- ids: command === 'add' ? positionals : rest,
2053
- options: {
2054
- dir: values.dir,
2055
- dryRun: values['dry-run'] ?? false,
2056
- all: values.all ?? false,
2057
- },
2058
- cwd: process.cwd(),
2059
- packageRoot: PACKAGE_ROOT,
2060
- });
2061
- if (values.json) console.log(JSON.stringify(result.report));
2062
- else (result.stderr ? console.error : console.log)(result.lines.join('\n'));
2063
- process.exitCode = result.code;
2064
- break;
2065
- }
2066
- case 'help':
2067
- case '--help':
2068
- case '-h':
2069
- case undefined:
2070
- printHelp();
2071
- break;
2072
- default:
2073
- console.error(`[bitboss-ui] Unknown command: ${command}`);
2074
- printHelp();
2075
- process.exit(1);
3
+ * bitboss-ui CLI entry. `setup` runs on a slim path: it is the one command
4
+ * that runs before the app has `vue` installed (`yarn dlx` / `pnpm dlx`
5
+ * install no peers), while the full CLI (bin/cli.mjs) loads Vue's template
6
+ * compiler at start-up for `check`. `update --no-install` (the app's
7
+ * postinstall) takes the same slim path, so an install never fails on it.
8
+ * Every other command is the full CLI.
9
+ */
10
+ const [command, ...args] = process.argv.slice(2);
11
+
12
+ const refreshOnly =
13
+ command === 'update' &&
14
+ args.every((a) => a === '--no-install' || a === '--all') &&
15
+ (args.includes('--no-install') ||
16
+ process.env.npm_lifecycle_event === 'postinstall');
17
+
18
+ if (command === 'setup') {
19
+ const { setupCli } = await import('../scripts/lib/setup.mjs');
20
+ process.exitCode = await setupCli(args);
21
+ } else if (refreshOnly) {
22
+ // The app's postinstall: the agent refresh alone, on the same slim path.
23
+ const { refreshCli } = await import('../scripts/lib/agent-refresh.mjs');
24
+ process.exitCode = await refreshCli(args);
25
+ } else {
26
+ await import('./cli.mjs');
2076
27
  }