bitboss-ui 3.0.0-beta.68 → 3.0.0-beta.70

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