bitboss-ui 3.0.0-alpha.4 → 3.0.0-alpha.6

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 (375) hide show
  1. package/README.md +56 -24
  2. package/bin/bitboss-ui-mcp.mjs +40 -10
  3. package/bin/bitboss-ui.mjs +133 -14
  4. package/dist/ai/BbAlert.md +16 -7
  5. package/dist/ai/BbAvatar.md +68 -32
  6. package/dist/ai/BbBadge.md +21 -4
  7. package/dist/ai/BbBadgeButton.md +13 -0
  8. package/dist/ai/BbBaseButton.md +30 -8
  9. package/dist/ai/BbBaseColorInput.md +1 -0
  10. package/dist/ai/BbBaseDatePicker.md +3 -2
  11. package/dist/ai/BbBaseDatePickerInput.md +6 -6
  12. package/dist/ai/BbBaseInputContainer.md +1 -1
  13. package/dist/ai/BbBaseSlider.md +1 -1
  14. package/dist/ai/BbButton.md +72 -13
  15. package/dist/ai/BbCheckbox.md +1 -1
  16. package/dist/ai/BbCheckboxGroup.md +1 -1
  17. package/dist/ai/BbColorInput.md +15 -2
  18. package/dist/ai/BbColorPalette.md +27 -1
  19. package/dist/ai/BbDatePicker.md +80 -14
  20. package/dist/ai/BbDatePickerInput.md +54 -13
  21. package/dist/ai/BbDropdown.md +25 -6
  22. package/dist/ai/BbDropdownButton.md +0 -1
  23. package/dist/ai/BbDropzone.md +140 -35
  24. package/dist/ai/BbIndicator.md +4 -4
  25. package/dist/ai/BbNumberInput.md +2 -2
  26. package/dist/ai/BbOffCanvas.md +19 -2
  27. package/dist/ai/BbPagination.md +17 -9
  28. package/dist/ai/BbPopover.md +11 -1
  29. package/dist/ai/BbProgress.md +3 -3
  30. package/dist/ai/BbRadio.md +24 -13
  31. package/dist/ai/BbRadioGroup.md +103 -5
  32. package/dist/ai/BbRating.md +1 -1
  33. package/dist/ai/BbSelect.md +28 -13
  34. package/dist/ai/BbSelectPopover.md +71 -15
  35. package/dist/ai/BbSlider.md +6 -3
  36. package/dist/ai/BbSwitch.md +1 -1
  37. package/dist/ai/BbSwitchGroup.md +1 -4
  38. package/dist/ai/BbTable.md +156 -40
  39. package/dist/ai/BbTabs.md +35 -1
  40. package/dist/ai/BbTag.md +1 -1
  41. package/dist/ai/BbTextInput.md +38 -1
  42. package/dist/ai/BbTextarea.md +2 -2
  43. package/dist/ai/BbTimePickerInput.md +5 -3
  44. package/dist/ai/BbToast.md +7 -1
  45. package/dist/ai/BbTree.md +40 -20
  46. package/dist/ai/FlatListBox.md +2 -1
  47. package/dist/ai/GroupedListBox.md +3 -2
  48. package/dist/ai/ListBox.md +2 -1
  49. package/dist/ai/changelog.json +284 -0
  50. package/dist/ai/components.json +483 -97
  51. package/dist/ai/composables/useBbConfig.md +73 -4
  52. package/dist/ai/composables/useBbTableContext.md +21 -21
  53. package/dist/ai/composables/useSafeArea.md +163 -0
  54. package/dist/ai/guides/agent-contract.md +105 -12
  55. package/dist/ai/guides/ai-router.md +7 -2
  56. package/dist/ai/guides/app-layout.md +57 -9
  57. package/dist/ai/guides/coherence-playbook.md +10 -10
  58. package/dist/ai/guides/component-picker.md +69 -30
  59. package/dist/ai/guides/design-language.md +120 -15
  60. package/dist/ai/guides/design-tokens.md +161 -28
  61. package/dist/ai/guides/fetch-items-playbook.md +4 -2
  62. package/dist/ai/guides/inertia-helpers.md +194 -18
  63. package/dist/ai/guides/inline-edit-playbook.md +75 -1
  64. package/dist/ai/guides/installation-and-plugin-setup.md +80 -12
  65. package/dist/ai/guides/migration/components/bb-checkbox-group.md +14 -13
  66. package/dist/ai/guides/migration/components/bb-checkbox.md +10 -9
  67. package/dist/ai/guides/migration/components/bb-date-picker-input.md +68 -0
  68. package/dist/ai/guides/migration/components/bb-pagination.md +16 -2
  69. package/dist/ai/guides/migration/components/bb-select-popover.md +2 -0
  70. package/dist/ai/guides/migration/components/bb-select.md +39 -13
  71. package/dist/ai/guides/migration/components/bb-spinner.md +18 -0
  72. package/dist/ai/guides/migration/components/bb-table.md +45 -8
  73. package/dist/ai/guides/migration/components/bb-text-input.md +9 -0
  74. package/dist/ai/guides/migration/v2-to-v3.md +8 -3
  75. package/dist/ai/guides/options-items-playbook.md +1 -1
  76. package/dist/ai/guides/page-shell.md +162 -10
  77. package/dist/ai/guides/validated-forms.md +3 -1
  78. package/dist/ai/index.md +8 -4
  79. package/dist/ai/recipes/inertia/approvals-inbox.md +28 -12
  80. package/dist/ai/recipes/inertia/command-palette.md +311 -0
  81. package/dist/ai/recipes/inertia/inline-edit-workspace.md +62 -16
  82. package/dist/ai/recipes/inertia/layout-scaffold.md +356 -4
  83. package/dist/ai/recipes/inertia/ownership-atlas.md +64 -2
  84. package/dist/ai/recipes/inertia/record-form.md +2 -2
  85. package/dist/ai/recipes/inertia/records-workspace.md +343 -117
  86. package/dist/ai/recipes/inertia/upload-center.md +20 -12
  87. package/dist/ai/recipes/nuxt/approvals-inbox.md +22 -12
  88. package/dist/ai/recipes/nuxt/command-palette.md +300 -0
  89. package/dist/ai/recipes/nuxt/inline-edit-workspace.md +66 -16
  90. package/dist/ai/recipes/nuxt/layout-scaffold.md +356 -4
  91. package/dist/ai/recipes/nuxt/record-form.md +2 -2
  92. package/dist/ai/recipes/nuxt/records-workspace.md +344 -113
  93. package/dist/ai/recipes/nuxt/upload-center.md +21 -13
  94. package/dist/ai/recipes/vue/approvals-inbox.md +22 -12
  95. package/dist/ai/recipes/vue/command-palette.md +297 -0
  96. package/dist/ai/recipes/vue/inline-edit-workspace.md +67 -16
  97. package/dist/ai/recipes/vue/layout-scaffold.md +356 -4
  98. package/dist/ai/recipes/vue/record-form.md +2 -2
  99. package/dist/ai/recipes/vue/records-workspace.md +345 -114
  100. package/dist/ai/recipes/vue/upload-center.md +21 -13
  101. package/dist/ai/source/BbAccordion.md +12 -0
  102. package/dist/ai/source/BbAlert.md +33 -3
  103. package/dist/ai/source/BbBadge.md +3 -3
  104. package/dist/ai/source/BbBadgeButton.md +3 -3
  105. package/dist/ai/source/BbBaseButton.md +166 -23
  106. package/dist/ai/source/BbBaseColorInput.md +15 -0
  107. package/dist/ai/source/BbBaseColorPalette.md +10 -2
  108. package/dist/ai/source/BbBaseDatePicker.md +500 -53
  109. package/dist/ai/source/BbBaseDatePickerInput.md +246 -91
  110. package/dist/ai/source/BbBaseInputContainer.md +13 -12
  111. package/dist/ai/source/BbBaseRadio.md +6 -2
  112. package/dist/ai/source/BbBaseRadioGroup.md +6 -0
  113. package/dist/ai/source/BbBaseRadioIcon.md +16 -7
  114. package/dist/ai/source/BbBaseSelect.md +23 -5
  115. package/dist/ai/source/BbBaseSlider.md +69 -10
  116. package/dist/ai/source/BbBaseTextarea.md +26 -2
  117. package/dist/ai/source/BbBaseTimePickerInput.md +32 -26
  118. package/dist/ai/source/BbBreadcrumbs.md +2 -2
  119. package/dist/ai/source/BbButton.md +83 -0
  120. package/dist/ai/source/BbCheckbox.md +1 -1
  121. package/dist/ai/source/BbCheckboxGroup.md +1 -1
  122. package/dist/ai/source/BbCollapsible.md +1 -1
  123. package/dist/ai/source/BbColorInput.md +18 -2
  124. package/dist/ai/source/BbColorPalette.md +128 -10
  125. package/dist/ai/source/BbConfirm.md +11 -1
  126. package/dist/ai/source/BbDatePicker.md +151 -36
  127. package/dist/ai/source/BbDatePickerInput.md +24 -10
  128. package/dist/ai/source/BbDialog.md +36 -11
  129. package/dist/ai/source/BbDropdown.md +274 -42
  130. package/dist/ai/source/BbDropdownButton.md +1 -1
  131. package/dist/ai/source/BbDropdownGroup.md +184 -35
  132. package/dist/ai/source/BbDropzone.md +20 -7
  133. package/dist/ai/source/BbIcon.md +43 -2
  134. package/dist/ai/source/BbNumberInput.md +1 -9
  135. package/dist/ai/source/BbOffCanvas.md +34 -14
  136. package/dist/ai/source/BbPagination.md +9 -19
  137. package/dist/ai/source/BbPopover.md +9 -1
  138. package/dist/ai/source/BbProgress.md +18 -2
  139. package/dist/ai/source/BbRadio.md +20 -6
  140. package/dist/ai/source/BbRadioGroup.md +20 -6
  141. package/dist/ai/source/BbRating.md +2 -2
  142. package/dist/ai/source/BbSelect.md +8 -6
  143. package/dist/ai/source/BbSelectPopover.md +288 -56
  144. package/dist/ai/source/BbSlider.md +1 -1
  145. package/dist/ai/source/BbSmoothHeight.md +1 -1
  146. package/dist/ai/source/BbSpinner.md +26 -11
  147. package/dist/ai/source/BbTable.md +205 -101
  148. package/dist/ai/source/BbTabs.md +11 -2
  149. package/dist/ai/source/BbTabsList.md +11 -2
  150. package/dist/ai/source/BbTabsPanes.md +11 -2
  151. package/dist/ai/source/BbTabsRoot.md +11 -2
  152. package/dist/ai/source/BbTag.md +10 -1
  153. package/dist/ai/source/BbTextInput.md +1 -1
  154. package/dist/ai/source/BbTextarea.md +1 -1
  155. package/dist/ai/source/BbTimePickerInput.md +2 -2
  156. package/dist/ai/source/BbToast.md +7 -8
  157. package/dist/ai/source/BbToastPortal.md +7 -8
  158. package/dist/ai/source/BbTooltip.md +36 -12
  159. package/dist/ai/source/BbTree.md +10 -0
  160. package/dist/ai/source/CommonInputWrapper.md +41 -11
  161. package/dist/ai/source/CommonPopover.md +8 -3
  162. package/dist/ai/source/FlatListBox.md +97 -54
  163. package/dist/ai/source/GroupedListBox.md +116 -42
  164. package/dist/ai/source/ListBox.md +9 -1
  165. package/dist/assets/svgs/spinner.svg_raw.js +1 -1
  166. package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +1 -1
  167. package/dist/components/BbAlert/types.d.ts +10 -1
  168. package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +22 -1
  169. package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +113 -90
  170. package/dist/components/BbBaseButton/types.d.ts +77 -0
  171. package/dist/components/BbBaseButton/types.js +13 -0
  172. package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue.d.ts +2 -2
  173. package/dist/components/BbBaseColorInput/BbBaseColorInput.vue.d.ts +3 -2
  174. package/dist/components/BbBaseColorInput/BbBaseColorInput.vue_vue_type_script_setup_true_lang.js +6 -0
  175. package/dist/components/BbBaseColorInput/types.d.ts +9 -0
  176. package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue.d.ts +1 -0
  177. package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue_vue_type_script_setup_true_lang.js +249 -142
  178. package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue.d.ts +3 -0
  179. package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue_vue_type_script_setup_true_lang.js +75 -67
  180. package/dist/components/BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue_vue_type_script_setup_true_lang.js +90 -38
  181. package/dist/components/BbBaseDatePicker/BbBaseDatePickerYearSelector.vue_vue_type_script_setup_true_lang.js +87 -46
  182. package/dist/components/BbBaseDatePicker/types.d.ts +12 -1
  183. package/dist/components/BbBaseDatePicker/useDatePickerContext.d.ts +29 -0
  184. package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue.d.ts +1 -0
  185. package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue_vue_type_script_setup_true_lang.js +275 -254
  186. package/dist/components/BbBaseDatePickerInput/types.d.ts +22 -8
  187. package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue_vue_type_script_setup_true_lang.js +0 -1
  188. package/dist/components/BbBaseInputContainer/types.d.ts +4 -3
  189. package/dist/components/BbBaseNumberInput/BbBaseNumberInput.vue.d.ts +2 -2
  190. package/dist/components/BbBaseRadio/BbBaseRadio.vue.d.ts +2 -2
  191. package/dist/components/BbBaseRadio/BbBaseRadio.vue_vue_type_script_setup_true_lang.js +0 -1
  192. package/dist/components/BbBaseRadioGroup/BbBaseRadioGroup.vue_vue_type_script_setup_true_lang.js +2 -0
  193. package/dist/components/BbBaseRating/BbBaseRating.vue.d.ts +2 -2
  194. package/dist/components/BbBaseSelect/BbBaseSelect.vue_vue_type_script_setup_true_lang.js +108 -107
  195. package/dist/components/BbBaseSlider/BbBaseSlider.vue.d.ts +2 -2
  196. package/dist/components/BbBaseSlider/BbBaseSlider.vue_vue_type_script_setup_true_lang.js +185 -169
  197. package/dist/components/BbBaseSlider/types.d.ts +7 -7
  198. package/dist/components/BbBaseSwitch/BbBaseSwitch.vue.d.ts +2 -2
  199. package/dist/components/BbBaseTag/BbBaseTag.vue.d.ts +3 -3
  200. package/dist/components/BbBaseTextInput/BbBaseTextInput.vue.d.ts +2 -2
  201. package/dist/components/BbBaseTextarea/BbBaseTextarea.vue.d.ts +2 -2
  202. package/dist/components/BbBaseTextarea/BbBaseTextarea.vue_vue_type_script_setup_true_lang.js +23 -11
  203. package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue_vue_type_script_setup_true_lang.js +41 -44
  204. package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +18 -1
  205. package/dist/components/BbButton/types.d.ts +77 -0
  206. package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +2 -2
  207. package/dist/components/BbCheckbox/types.d.ts +1 -1
  208. package/dist/components/BbCheckboxGroup/types.d.ts +1 -1
  209. package/dist/components/BbColorInput/BbColorInput.vue.d.ts +5 -3
  210. package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +6 -0
  211. package/dist/components/BbColorInput/types.d.ts +10 -1
  212. package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +1 -0
  213. package/dist/components/BbColorPalette/BbColorPalette.vue.js +1 -0
  214. package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +141 -91
  215. package/dist/components/BbColorPalette/types.d.ts +9 -0
  216. package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +73 -69
  217. package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -0
  218. package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +108 -99
  219. package/dist/components/BbDatePicker/types.d.ts +64 -21
  220. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +3 -3
  221. package/dist/components/BbDatePickerInput/types.d.ts +22 -8
  222. package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +79 -81
  223. package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +92 -62
  224. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +243 -216
  225. package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +301 -231
  226. package/dist/components/BbDropdown/normalizeGroups.d.ts +9 -0
  227. package/dist/components/BbDropdown/normalizeGroups.js +2 -2
  228. package/dist/components/BbDropdown/types.d.ts +33 -2
  229. package/dist/components/BbDropdown/useDropdownContext.d.ts +26 -0
  230. package/dist/components/BbDropzone/BbDropzone.vue.d.ts +2 -2
  231. package/dist/components/BbDropzone/BbDropzone.vue_vue_type_script_setup_true_lang.js +2 -3
  232. package/dist/components/BbDropzone/types.d.ts +2 -2
  233. package/dist/components/BbIcon/BbIcon.vue_vue_type_script_setup_true_lang.js +15 -10
  234. package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +2 -2
  235. package/dist/components/BbNumberInput/types.d.ts +1 -1
  236. package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +164 -166
  237. package/dist/components/BbOffCanvas/useOffCanvasStack.d.ts +10 -0
  238. package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +84 -90
  239. package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +19 -18
  240. package/dist/components/BbProgress/BbProgress.vue_vue_type_script_setup_true_lang.js +2 -2
  241. package/dist/components/BbRadio/BbRadio.vue.d.ts +2 -2
  242. package/dist/components/BbRadio/BbRadio.vue_vue_type_script_setup_true_lang.js +49 -48
  243. package/dist/components/BbRadio/types.d.ts +8 -3
  244. package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +40 -39
  245. package/dist/components/BbRadioGroup/types.d.ts +8 -3
  246. package/dist/components/BbRating/BbRating.vue.d.ts +2 -2
  247. package/dist/components/BbRating/types.d.ts +2 -2
  248. package/dist/components/BbSelect/types.d.ts +8 -6
  249. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +305 -277
  250. package/dist/components/BbSelectPopover/types.d.ts +7 -4
  251. package/dist/components/BbSlider/BbSlider.vue.d.ts +2 -2
  252. package/dist/components/BbSlider/types.d.ts +1 -1
  253. package/dist/components/BbSwitch/BbSwitch.vue.d.ts +2 -2
  254. package/dist/components/BbTable/BbTable.vue.d.ts +2 -2
  255. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +389 -380
  256. package/dist/components/BbTable/types.d.ts +46 -19
  257. package/dist/components/BbTabs/types.d.ts +11 -2
  258. package/dist/components/BbTag/BbTag.vue.d.ts +2 -2
  259. package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +5 -3
  260. package/dist/components/BbTag/types.d.ts +1 -1
  261. package/dist/components/BbTextInput/BbTextInput.vue.d.ts +2 -2
  262. package/dist/components/BbTextInput/types.d.ts +1 -1
  263. package/dist/components/BbTextarea/BbTextarea.vue.d.ts +2 -2
  264. package/dist/components/BbTextarea/types.d.ts +1 -1
  265. package/dist/components/BbTimePickerInput/types.d.ts +1 -1
  266. package/dist/components/BbToast/BbToastRegion.vue_vue_type_script_setup_true_lang.js +70 -68
  267. package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +81 -78
  268. package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +8 -8
  269. package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +73 -76
  270. package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +112 -105
  271. package/dist/components/FlatListBox/types.d.ts +7 -1
  272. package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +143 -133
  273. package/dist/components/GroupedListBox/types.d.ts +9 -2
  274. package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +5 -0
  275. package/dist/components/ListBox/types.d.ts +7 -1
  276. package/dist/composables/useBaseOptions.d.ts +4 -1
  277. package/dist/composables/useBaseOptions.js +22 -9
  278. package/dist/composables/useBbTableContext.d.ts +12 -12
  279. package/dist/composables/useBbTableContext.js +13 -13
  280. package/dist/composables/useBbTabsContext.js +7 -5
  281. package/dist/composables/useCoarsePointer.d.ts +9 -0
  282. package/dist/composables/useCoarsePointer.js +13 -0
  283. package/dist/composables/useHydrated.d.ts +7 -0
  284. package/dist/composables/useHydrated.js +9 -0
  285. package/dist/composables/useImeDismissBlur.d.ts +103 -0
  286. package/dist/composables/useImeDismissBlur.js +38 -0
  287. package/dist/composables/useItemsGetter.d.ts +1 -1
  288. package/dist/composables/useItemsGetter.js +18 -18
  289. package/dist/composables/useListboxFocus.d.ts +2 -0
  290. package/dist/composables/useListboxFocus.js +30 -19
  291. package/dist/composables/useMobile.d.ts +6 -0
  292. package/dist/composables/useMobile.js +12 -5
  293. package/dist/composables/useQuery.d.ts +14 -2
  294. package/dist/composables/useQuery.js +2 -2
  295. package/dist/composables/useSafeArea.d.ts +96 -48
  296. package/dist/composables/useSafeArea.js +28 -13
  297. package/dist/composables/useSafeAreaInternal.d.ts +79 -0
  298. package/dist/composables/useSafeAreaInternal.js +41 -0
  299. package/dist/composables/useSegmentedFields.js +16 -10
  300. package/dist/composables/useSheetSurface.d.ts +39 -0
  301. package/dist/composables/useSheetSurface.js +10 -0
  302. package/dist/composables/useTableWidthContext.js +1 -1
  303. package/dist/composables/useViewportWidth.d.ts +18 -1
  304. package/dist/composables/useViewportWidth.js +5 -2
  305. package/dist/deprecation/ai-deprecations.json.d.ts +22 -0
  306. package/dist/deprecation/ai-deprecations.json.js +1 -1
  307. package/dist/directives/bbDate.d.ts +15 -6
  308. package/dist/i18n/locales/cs.json +14 -2
  309. package/dist/i18n/locales/da.json +14 -2
  310. package/dist/i18n/locales/de.json +14 -2
  311. package/dist/i18n/locales/el.json +14 -2
  312. package/dist/i18n/locales/en.json +14 -2
  313. package/dist/i18n/locales/es.json +14 -2
  314. package/dist/i18n/locales/fi.json +14 -2
  315. package/dist/i18n/locales/fr.json +14 -2
  316. package/dist/i18n/locales/hu.json +14 -2
  317. package/dist/i18n/locales/it.json +14 -2
  318. package/dist/i18n/locales/ja.json +14 -2
  319. package/dist/i18n/locales/ko.json +14 -2
  320. package/dist/i18n/locales/nb.json +14 -2
  321. package/dist/i18n/locales/nl.json +14 -2
  322. package/dist/i18n/locales/pl.json +14 -2
  323. package/dist/i18n/locales/pt.json +14 -2
  324. package/dist/i18n/locales/ro.json +14 -2
  325. package/dist/i18n/locales/ru.json +14 -2
  326. package/dist/i18n/locales/sv.json +14 -2
  327. package/dist/i18n/locales/tr.json +14 -2
  328. package/dist/i18n/locales/uk.json +14 -2
  329. package/dist/i18n/locales/zh-cn.json +14 -2
  330. package/dist/index.d.ts +4 -1
  331. package/dist/index.js +48 -47
  332. package/dist/llms-full.txt +6101 -1003
  333. package/dist/llms-medium.txt +381 -71
  334. package/dist/llms.txt +8 -4
  335. package/dist/locale-blueprint.json +14 -2
  336. package/dist/nuxt-module.d.ts +14 -0
  337. package/dist/styles.css +1 -1
  338. package/dist/types/Config.d.ts +9 -6
  339. package/dist/types/DatePickerType.d.ts +32 -0
  340. package/dist/types/DatePickerType.js +4 -0
  341. package/dist/utilities/functions/convertDateValue.d.ts +13 -0
  342. package/dist/utilities/functions/convertDateValue.js +13 -8
  343. package/dist/utilities/functions/isDateDisabled.d.ts +3 -0
  344. package/dist/utilities/functions/isDateDisabled.js +17 -15
  345. package/dist/utilities/functions/normalizeDateBound.d.ts +20 -0
  346. package/dist/utilities/functions/normalizeDateBound.js +12 -0
  347. package/dist/utilities/functions/parsePaginationNumber.d.ts +22 -0
  348. package/dist/utilities/functions/parsePaginationNumber.js +11 -0
  349. package/dist/utilities/misc/listboxMetrics.d.ts +41 -0
  350. package/dist/utilities/misc/listboxMetrics.js +4 -0
  351. package/dist/utils/overlayEscapeStack.d.ts +14 -0
  352. package/dist/{components/BbPopover/escapeStack.js → utils/overlayEscapeStack.js} +2 -2
  353. package/dist/utils/overlaySurfaceIsolation.d.ts +1 -0
  354. package/dist/utils/overlaySurfaceIsolation.js +11 -0
  355. package/dist/validated/BbColorInput.vue.d.ts +1 -0
  356. package/dist/validated/BbColorInput.vue_vue_type_script_setup_true_lang.js +4 -0
  357. package/dist/validated/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +1 -1
  358. package/dist/validated/index.d.ts +14 -0
  359. package/dist/vite-plugin.d.ts +64 -0
  360. package/dist/vite.js +341 -161
  361. package/llms.txt +8 -4
  362. package/package.json +39 -16
  363. package/scripts/README.md +66 -0
  364. package/scripts/lib/eslint-plugin.d.ts +65 -0
  365. package/scripts/lib/eslint-plugin.mjs +409 -103
  366. package/scripts/lib/hand-roll-hints.mjs +173 -0
  367. package/scripts/lib/mcp-config.mjs +75 -2
  368. package/scripts/lib/validate-bb-markup.mjs +644 -6
  369. package/bin/bitboss-ui.node.test.mjs +0 -113
  370. package/dist/components/BbPopover/escapeStack.d.ts +0 -6
  371. package/scripts/lib/__fixtures__/validated-manifest.json +0 -65
  372. package/scripts/lib/eslint-plugin-autofix.node.test.mjs +0 -109
  373. package/scripts/lib/eslint-plugin-recommended.node.test.mjs +0 -87
  374. package/scripts/lib/eslint-plugin-slots.node.test.mjs +0 -271
  375. package/scripts/lib/eslint-plugin.node.test.mjs +0 -193
package/README.md CHANGED
@@ -6,11 +6,29 @@ Vue 3 component library used across BitBoss products. It ships typed building bl
6
6
 
7
7
  ## What’s in the package
8
8
 
9
- Published artifacts are **`dist/`** (ESM JavaScript, `.d.ts`, and **`index.css`**) plus this **README**. The sections below match how the library is organised in code and in the [documentation](https://ui-components-docs.vercel.app/).
9
+ Published artifacts are **`dist/`** (ESM JavaScript, `.d.ts`, the two stylesheets **`styles.css`** and **`reset.css`**, and the `dist/ai/` knowledge base), plus the **`bin/`** CLI, **`scripts/lib/`** (ESLint plugin and markup validator), the root **`llms.txt`**, and this **README**. The sections below match how the library is organised in code and in the [documentation](https://ui-components-docs.vercel.app/).
10
10
 
11
11
  ### Styles
12
12
 
13
13
  - **Global stylesheet** — import `bitboss-ui/styles.css` once. It bundles design tokens, base rules, and styles for all exported components (built from the library’s PostCSS/Tailwind pipeline).
14
+ - **Optional reset** — `bitboss-ui/reset.css`, only if your app has no reset of its own. Import it _before_ `styles.css` (or let the build plugin inject it with `resetCss: true`).
15
+
16
+ ### TypeScript: use `vue-tsc` 3
17
+
18
+ Use **`vue-tsc` 3 or newer**. Under `vue-tsc` 2 the template type-checker
19
+ silently checks **nothing** about the props of the nine components declared with
20
+ `generic="T"` — `BbSelect`, `BbSelectPopover`, `BbTable`, `BbTabs`,
21
+ `BbTabsRoot`, `BbTree`, `BbRadioGroup`, `BbCheckboxGroup`, `BbSwitchGroup` —
22
+ because they emit as generic functions rather than `DefineComponent<…>`, a shape
23
+ Vue Language Tools 2 cannot read props out of.
24
+
25
+ The trap is that the failure is partial and invisible: unknown-**component**
26
+ checking still fires and non-generic components still reject bad props, so the
27
+ gate looks like it is working. A real consumer shipped
28
+ `<BbRadioGroup label="…">` (the prop is `legend`) through six release slices on
29
+ `vue-tsc@^2.2.12` with a green `--noEmit`.
30
+
31
+ Full detail: `ai/guides/installation-and-plugin-setup.md`.
14
32
 
15
33
  ### TypeScript: icons
16
34
 
@@ -18,15 +36,16 @@ Published artifacts are **`dist/`** (ESM JavaScript, `.d.ts`, and **`index.css`*
18
36
 
19
37
  ### Composables
20
38
 
21
- | Composable | Role |
22
- | ----------------------------- | --------------------------------------------------------- |
23
- | `useBbConfig` | Global options for the kit (locale, defaults, etc.). |
24
- | `useBroadcastChannelInstance` | Shared `BroadcastChannel` helper for cross-tab messaging. |
25
- | `useConfirm` | Programmatic confirm / modal flows. |
26
- | `useCountdown` | Countdown timer state. |
27
- | `useMobile` | Mobile / viewport-oriented behaviour. |
28
- | `useQueue` | Simple async task queue. |
29
- | `useToast` | Toast notifications API. |
39
+ | Composable | Role |
40
+ | ----------------------------- | ---------------------------------------------------------- |
41
+ | `useBbConfig` | Global options for the kit (locale, defaults, etc.). |
42
+ | `useBroadcastChannelInstance` | Shared `BroadcastChannel` helper for cross-tab messaging. |
43
+ | `useConfirm` | Programmatic confirm / modal flows. |
44
+ | `useCountdown` | Countdown timer state. |
45
+ | `useMobile` | Mobile / viewport-oriented behaviour. |
46
+ | `useQueue` | Simple async task queue. |
47
+ | `useSafeArea` | Claim a screen edge for a docked panel so toasts avoid it. |
48
+ | `useToast` | Toast notifications API. |
30
49
 
31
50
  ### Base\* components (primitives) _(reference-only - prefer `Bb*` equivalents for consumer code)_
32
51
 
@@ -70,13 +89,14 @@ For most **Base\*** and **Bb\*** components, the package exports matching **prop
70
89
 
71
90
  The same knowledge base the npm package ships is served publicly over a CDN, so
72
91
  an agent can read it before anything is installed. `@alpha` tracks the latest
73
- v3 prerelease; pin an exact version (`bitboss-ui@3.0.0-alpha.4`) for stable
74
- links.
92
+ v3 prerelease; pin an exact version (`bitboss-ui@3.0.0-alpha.5`) for stable
93
+ links. Sizes grow with the catalogue — treat them as the current order of
94
+ magnitude, not a contract.
75
95
 
76
- - [Core knowledge base](https://cdn.jsdelivr.net/npm/bitboss-ui@alpha/dist/llms-medium.txt) (~74 KB) — **start here if you can only fetch one file.** Hard rules, setup, component picker, design language, and the full component catalogue.
77
- - [Index](https://cdn.jsdelivr.net/npm/bitboss-ui@alpha/llms.txt) (~17 KB) — link index into every document.
96
+ - [Core knowledge base](https://cdn.jsdelivr.net/npm/bitboss-ui@alpha/dist/llms-medium.txt) (~110 KB) — **start here if you can only fetch one file.** Hard rules, setup, component picker, design language, and the full component catalogue.
97
+ - [Index](https://cdn.jsdelivr.net/npm/bitboss-ui@alpha/llms.txt) (~19 KB) — link index into every document.
78
98
  - [components.json](https://cdn.jsdelivr.net/npm/bitboss-ui@alpha/dist/ai/components.json) — machine-readable API surface, for programmatic validation.
79
- - [Complete knowledge base](https://cdn.jsdelivr.net/npm/bitboss-ui@alpha/dist/llms-full.txt) (~2.9 MB) — everything concatenated. Bulk ingestion only; too large to prompt with.
99
+ - [Complete knowledge base](https://cdn.jsdelivr.net/npm/bitboss-ui@alpha/dist/llms-full.txt) (~3.2 MB) — everything concatenated. Bulk ingestion only; too large to prompt with.
80
100
 
81
101
  Already installed? Prefer the local copy under `node_modules/bitboss-ui/dist/ai/`,
82
102
  run `npx bitboss-ui ai-init` to write agent pointers, and
@@ -203,10 +223,19 @@ can **query** the knowledge base (search components, read a contract, validate
203
223
  markup) instead of reading files blind:
204
224
 
205
225
  ```bash
226
+ npm i -D @modelcontextprotocol/sdk zod
206
227
  npx bitboss-ui ai-init --mcp
207
228
  ```
208
229
 
209
- The agent harness launches the server itself (`npx bitboss-ui mcp`) on demand —
230
+ Those two are **optional peer dependencies**, not dependencies: together they
231
+ weigh ~12 MB — more than every runtime dependency of the component library
232
+ combined — and nothing but the MCP server loads them, so installing
233
+ `bitboss-ui` never drags them in. `ai-init --mcp` warns if they are missing,
234
+ and `bitboss-ui mcp` tells you what to install rather than dying on a module
235
+ resolution error.
236
+
237
+ The agent harness launches the server itself (`npx bitboss-ui@<installed version> mcp`,
238
+ pinned so npx can never fall back to fetching a different version from the registry) on demand —
210
239
  you never run it by hand. `--mcp` merges the server entry into each harness's
211
240
  own config (never overwriting other servers you've registered), and each write
212
241
  is idempotent:
@@ -331,13 +360,16 @@ A standard `llms.txt` discovery file is also published at:
331
360
 
332
361
  ### Package exports
333
362
 
334
- ```ts
335
- // catalogue entry
336
- import 'bitboss-ui/ai';
337
- // or resolve concrete files:
338
- // bitboss-ui/ai/components.json
339
- // bitboss-ui/ai/guides/ai-router.md
340
- ```
363
+ These are **resolution paths, not importable modules** — they resolve to
364
+ Markdown and JSON, so a side-effect `import` of them neither type-checks nor
365
+ bundles. Use them with `import.meta.resolve` / `require.resolve`, or read the
366
+ files directly:
367
+
368
+ | Subpath | Resolves to |
369
+ | ----------------------------------- | ------------------------------ |
370
+ | `bitboss-ui/ai` | `dist/ai/index.md` (catalogue) |
371
+ | `bitboss-ui/ai/components.json` | `dist/ai/components.json` |
372
+ | `bitboss-ui/ai/guides/ai-router.md` | `dist/ai/guides/ai-router.md` |
341
373
 
342
374
  Agents can also read paths under `node_modules/bitboss-ui/dist/ai/` directly.
343
375
 
@@ -374,7 +406,7 @@ MIT — see [`LICENSE`](LICENSE).
374
406
 
375
407
  The source repository is private while v3 is in development, so there is no
376
408
  public issue tracker yet. **Report bugs by email to
377
- [dev@bitboss.it](mailto:dev@bitboss.it)** — that address is the `bugs` contact
409
+ [hey@bitboss.it](mailto:hey@bitboss.it)** — that address is the `bugs` contact
378
410
  in `package.json`, so `npm bugs bitboss-ui` opens it too.
379
411
 
380
412
  To make a report actionable, include:
@@ -7,8 +7,22 @@
7
7
  *
8
8
  * Built on `@modelcontextprotocol/sdk` (McpServer over the stdio transport);
9
9
  * the SDK owns JSON-RPC framing, capability handshake, and protocol-version
10
- * negotiation. Tool input schemas are declared as zod shapes (zod ships with
11
- * the SDK); the SDK renders them to the JSON Schema advertised by tools/list.
10
+ * negotiation. Tool input schemas are declared as zod shapes; the SDK renders
11
+ * them to the JSON Schema advertised by tools/list.
12
+ *
13
+ * BOTH imports below are OPTIONAL PEERS, not dependencies — together ~12 MB,
14
+ * more than every runtime dependency of the component library combined, and
15
+ * loaded by nothing else. `bin/bitboss-ui.mjs` catches the resolution failure
16
+ * and names them; `missingMcpPeers()` warns at registration time.
17
+ *
18
+ * `zod`'s declared range is `^3.25 || ^4.0` — copied verbatim from the SDK's
19
+ * own dependency range, NOT invented. Do not "simplify" it to `>=` or to a
20
+ * single major: the schemas built here are validated by the SDK's OWN copy of
21
+ * zod, so a consumer hoisting a different MAJOR fails the SDK's brand checks
22
+ * while npm stays silent (both ranges are independently satisfied). Mirroring
23
+ * the range means it moves when the SDK's does. Everything used here
24
+ * (`z.string`, `z.enum`, `z.number`, `.describe`, `.int`, `.min`, `.optional`)
25
+ * is stable across zod 3 and 4, so the lower bound costs nothing.
12
26
  *
13
27
  * Run standalone: `npx bitboss-ui mcp` (delegated from bin/bitboss-ui.mjs).
14
28
  * Register with an MCP-capable harness via `npx bitboss-ui ai-init --mcp`.
@@ -17,7 +31,7 @@
17
31
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
18
32
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
19
33
  import { existsSync, readFileSync, readdirSync } from 'node:fs';
20
- import { dirname, join } from 'node:path';
34
+ import { dirname, join, sep } from 'node:path';
21
35
  import { fileURLToPath } from 'node:url';
22
36
  import { z } from 'zod';
23
37
  import {
@@ -257,7 +271,7 @@ function* eachTokenDeclaration(css) {
257
271
 
258
272
  /**
259
273
  * `list_tokens({ filter })` — the `--bb-*` design tokens with their values,
260
- * read from the shipped stylesheet (the same 89 `check:tokens` counts).
274
+ * read from the shipped stylesheet (the same 90 `check:tokens` counts).
261
275
  *
262
276
  * WHY ONLY `--bb-*` — and why there is no opt-in for the unprefixed ones, even
263
277
  * though `search_components` has `includeReferenceOnly`. The two tiers are not
@@ -405,12 +419,28 @@ function getRecipe({ platform, name, maxChars } = {}) {
405
419
  error: `Unknown platform '${platform}' — expected one of ${RECIPE_PLATFORMS.join(', ')}`,
406
420
  };
407
421
  }
408
- const fileName = String(name ?? '').endsWith('.md')
409
- ? String(name)
410
- : `${name}.md`;
411
- const filePath = join(AI_ROOT, 'recipes', platform, fileName);
412
- if (!existsSync(filePath)) {
413
- return { found: false, error: `Recipe not found: ${platform}/${fileName}` };
422
+ // Contain reads to the platform's recipe dir — no traversal out of the
423
+ // knowledge base. `platform` is already allow-listed above, but `name` is
424
+ // free text, so it gets the same treatment as `get_guide`'s: leading
425
+ // separators stripped, `..` rejected outright, and the joined path checked
426
+ // to still sit under the recipe dir.
427
+ const rel = String(name ?? '').replace(/^\/+/, '');
428
+ if (!rel || rel.includes('..')) {
429
+ return {
430
+ found: false,
431
+ error: `Invalid recipe name '${name}'.`,
432
+ hint: 'Call list_recipes for the available names.',
433
+ };
434
+ }
435
+ const fileName = rel.endsWith('.md') ? rel : `${rel}.md`;
436
+ const recipesDir = join(AI_ROOT, 'recipes', platform);
437
+ const filePath = join(recipesDir, fileName);
438
+ if (!filePath.startsWith(`${recipesDir}${sep}`) || !existsSync(filePath)) {
439
+ return {
440
+ found: false,
441
+ error: `Recipe not found: ${platform}/${fileName}`,
442
+ hint: 'Call list_recipes for the available names.',
443
+ };
414
444
  }
415
445
  const { content, ...meta } = truncateMarkdown(
416
446
  readFileSync(filePath, 'utf-8'),
@@ -16,7 +16,9 @@
16
16
  * locale Generate a custom locale blueprint (.locale.ts)
17
17
  * check Validate Bb* markup in .vue/.md files against the installed
18
18
  * components.json manifest (unknown props, removed props, bad
19
- * v-models). Exits 1 on findings; supports --json output.
19
+ * v-models, unknown `<template #slot>` names, `href`/`to`/
20
+ * `method` on a component that doesn't declare them). Exits 1
21
+ * on findings; supports --json output.
20
22
  * mcp Start a stdio MCP server exposing the dist/ai knowledge base
21
23
  * (search_components, get_component, list_recipes, get_recipe,
22
24
  * validate) to MCP-capable agent harnesses.
@@ -33,11 +35,15 @@ import {
33
35
  statSync,
34
36
  writeFileSync,
35
37
  } from 'node:fs';
38
+ import { findHandRollHints } from '../scripts/lib/hand-roll-hints.mjs';
36
39
  import { createRequire } from 'node:module';
37
40
  import { dirname, isAbsolute, join, relative } from 'node:path';
38
41
  import { fileURLToPath } from 'node:url';
39
42
  import { parseArgs } from 'node:util';
40
- import { ensureMcpConfigs } from '../scripts/lib/mcp-config.mjs';
43
+ import {
44
+ ensureMcpConfigs,
45
+ missingMcpPeers,
46
+ } from '../scripts/lib/mcp-config.mjs';
41
47
  import {
42
48
  loadManifest,
43
49
  validateMarkdown,
@@ -236,6 +242,21 @@ function aiInit({ mcp = false } = {}) {
236
242
  action: result.action,
237
243
  });
238
244
  }
245
+
246
+ // The harness launches the server on demand, long after this command
247
+ // ran — so a missing peer would surface inside an agent as a server
248
+ // that never starts. Say it here, where the person is still watching.
249
+ const missing = missingMcpPeers(projectRoot);
250
+ if (missing.length > 0) {
251
+ console.warn(
252
+ `[bitboss-ui] the MCP server needs ${missing.join(' and ')}, which ${
253
+ missing.length > 1 ? 'are' : 'is'
254
+ } not installed:\n` +
255
+ `\n npm i -D ${missing.join(' ')}\n\n` +
256
+ ' Optional peers, not dependencies — ~12 MB that only the MCP\n' +
257
+ ' server uses. The harness entries above are written either way.'
258
+ );
259
+ }
239
260
  }
240
261
 
241
262
  console.log(`[bitboss-ui] ai-init complete (library v${version})`);
@@ -533,10 +554,11 @@ function summarizeFileCounts(files) {
533
554
  }
534
555
 
535
556
  /**
536
- * `npx bitboss-ui check [glob…] [--json]` — validate `Bb*` markup in `.vue`
537
- * and `.md` files against the installed components.json manifest.
557
+ * `npx bitboss-ui check [glob…] [--json]` — validate `Bb*` markup (props,
558
+ * v-models, and `<template #slot>` names) in `.vue` and `.md` files against
559
+ * the installed components.json manifest.
538
560
  */
539
- function checkCommand(globs, jsonMode) {
561
+ function checkCommand(globs, jsonMode, allowEmpty = false) {
540
562
  const projectRoot = process.cwd();
541
563
 
542
564
  const manifestPath = join(PACKAGE_ROOT, 'dist', 'ai', 'components.json');
@@ -547,9 +569,34 @@ function checkCommand(globs, jsonMode) {
547
569
  process.exit(1);
548
570
  }
549
571
  const manifest = loadManifest(manifestPath);
572
+
573
+ /*
574
+ * Every `--bb-*` the INSTALLED package declares, read from the stylesheet
575
+ * the consumer actually ships. Read from disk rather than hardcoded so this
576
+ * can never claim a token is invented when their version does declare it.
577
+ * Absent stylesheet → an empty set → the unknown-token hint stays silent,
578
+ * which is the right failure: no data, no accusation.
579
+ */
580
+ const stylesPath = join(PACKAGE_ROOT, 'dist', 'styles.css');
581
+ const knownTokens = existsSync(stylesPath)
582
+ ? new Set(
583
+ [
584
+ ...readFileSync(stylesPath, 'utf-8').matchAll(
585
+ /(--bb-[a-z0-9-]+)\s*:/gi
586
+ ),
587
+ ].map((m) => m[1].toLowerCase())
588
+ )
589
+ : new Set();
550
590
  const files = resolveCheckFiles(projectRoot, globs);
551
591
 
552
592
  const findings = [];
593
+ /*
594
+ * Advisory only — see scripts/lib/hand-roll-hints.mjs. Hints never touch the
595
+ * exit code, so a guess can never fail a consumer's build. `--no-hints`
596
+ * silences them for anyone who finds them noisy.
597
+ */
598
+ const hints = [];
599
+ const wantHints = !process.argv.includes('--no-hints');
553
600
  for (const file of files) {
554
601
  const relPath = relative(projectRoot, file);
555
602
  const content = readFileSync(file, 'utf-8');
@@ -559,15 +606,53 @@ function checkCommand(globs, jsonMode) {
559
606
  for (const finding of fileFindings) {
560
607
  findings.push({ file: relPath, ...finding });
561
608
  }
609
+ // .md files are documentation ABOUT components; a round <img> in a doc
610
+ // example is illustrative, not a hand-roll.
611
+ if (wantHints && !file.endsWith('.md')) {
612
+ for (const hint of findHandRollHints(content, knownTokens)) {
613
+ hints.push({ file: relPath, ...hint });
614
+ }
615
+ }
562
616
  }
563
617
 
618
+ /** Advisory block, printed on success and on failure alike. Never fatal. */
619
+ const printHints = () => {
620
+ if (hints.length === 0) return;
621
+ console.log(
622
+ `\n[bitboss-ui] ${hints.length} hint(s) — advisory, not errors:`
623
+ );
624
+ for (const hint of hints) {
625
+ console.log(` ${hint.file}:${hint.line}`);
626
+ console.log(` → ${hint.message}`);
627
+ }
628
+ console.log(
629
+ ' Deliberate? Ignore these, record them in a HANDROLLED note, or pass --no-hints.'
630
+ );
631
+ };
632
+
564
633
  if (jsonMode) {
565
- console.log(JSON.stringify({ findings }, null, 2));
634
+ console.log(
635
+ JSON.stringify({ findings, hints, files: files.length }, null, 2)
636
+ );
566
637
  if (findings.length > 0) process.exit(1);
638
+ if (files.length === 0 && globs.length > 0 && !allowEmpty) process.exit(1);
567
639
  return;
568
640
  }
569
641
 
570
642
  if (files.length === 0) {
643
+ // An EXPLICIT pattern that matched nothing is almost always a typo'd or
644
+ // stale CI path, and answering it with exit 0 means the step goes green
645
+ // having validated nothing — the check that was meant to catch bad
646
+ // markup is itself the thing that broke, silently (SWP-016). A bare
647
+ // sweep finding nothing is a different, legitimate case (a package with
648
+ // no .vue files yet), so it still passes.
649
+ if (globs.length > 0 && !allowEmpty) {
650
+ console.error(
651
+ `[bitboss-ui] check: no .vue/.md files matched ${globs.map((g) => `\`${g}\``).join(', ')} — nothing was validated. ` +
652
+ 'Fix the path, or pass `--allow-empty` if an empty match is expected.'
653
+ );
654
+ process.exit(1);
655
+ }
571
656
  console.log(
572
657
  '[bitboss-ui] check: no .vue/.md files matched — nothing to do.'
573
658
  );
@@ -576,8 +661,9 @@ function checkCommand(globs, jsonMode) {
576
661
 
577
662
  if (findings.length === 0) {
578
663
  console.log(
579
- `[bitboss-ui] check OK — ${summarizeFileCounts(files)} file(s), zero unknown Bb* props/v-models.`
664
+ `[bitboss-ui] check OK — ${summarizeFileCounts(files)} file(s), zero unknown Bb* props/v-models/slots/nav-attrs.`
580
665
  );
666
+ printHints();
581
667
  return;
582
668
  }
583
669
 
@@ -603,6 +689,7 @@ function checkCommand(globs, jsonMode) {
603
689
  console.error(
604
690
  '\nFix the markup (or the component API) so it stays copy-safe for agents.'
605
691
  );
692
+ printHints();
606
693
  process.exit(1);
607
694
  }
608
695
 
@@ -621,14 +708,19 @@ Commands:
621
708
  server for Claude Code (.mcp.json), Cursor (.cursor/mcp.json),
622
709
  VS Code/Copilot (.vscode/mcp.json), and Windsurf (~/.codeium
623
710
  global) — merges, never overwrites other servers.
624
- check [glob…] [--json]
711
+ check [glob…] [--json] [--allow-empty]
625
712
  Validate \`Bb*\` markup in .vue/.md files against the
626
713
  installed components.json manifest (unknown/removed props,
627
- bad v-models). Defaults to every .vue/.md file under the
628
- current directory (node_modules, dist, .git, vendor,
714
+ bad v-models, unknown \`<template #slot>\` names,
715
+ \`href\`/\`to\`/\`method\` on a component that doesn't declare
716
+ them). Defaults to every .vue/.md file under the current directory
717
+ (node_modules, dist, .git, vendor,
629
718
  storage, public, .output, .nuxt, bootstrap/cache
630
719
  excluded — pass an explicit glob/path to widen the scan).
631
- Exits 1 on findings; \`--json\` prints \`{ findings: [...] }\`.
720
+ Exits 1 on findings, and on an explicit glob that matched
721
+ nothing (a typo'd CI path validates zero files silently) —
722
+ pass \`--allow-empty\` when an empty match is expected.
723
+ \`--json\` prints \`{ findings: [...], files }\`.
632
724
  mcp Start a stdio MCP server exposing the dist/ai knowledge
633
725
  base (search_components, get_component, list_recipes,
634
726
  get_recipe, validate) to MCP-capable agent harnesses.
@@ -674,14 +766,41 @@ switch (command) {
674
766
  const { values, positionals } = parseCommandArgs(
675
767
  command,
676
768
  commandArgs,
677
- { json: { type: 'boolean' } },
769
+ {
770
+ json: { type: 'boolean' },
771
+ 'allow-empty': { type: 'boolean' },
772
+ },
678
773
  { allowPositionals: true }
679
774
  );
680
- checkCommand(positionals, values.json ?? false);
775
+ checkCommand(
776
+ positionals,
777
+ values.json ?? false,
778
+ values['allow-empty'] ?? false
779
+ );
681
780
  break;
682
781
  }
683
782
  case 'mcp': {
684
- const { main } = await import('./bitboss-ui-mcp.mjs');
783
+ // `@modelcontextprotocol/sdk` + `zod` are OPTIONAL peers, not
784
+ // dependencies: together they weigh ~12 MB — more than every runtime
785
+ // dependency of the component library combined, and the SDK drags in a
786
+ // whole HTTP stack (express, hono, cors, jose). Only this subcommand
787
+ // needs them, so consumers who never run the MCP server do not pay for
788
+ // it. That makes the import failure a SUPPORTED path, and a bare
789
+ // ERR_MODULE_NOT_FOUND stack is not an answer — say what to install.
790
+ let main;
791
+ try {
792
+ ({ main } = await import('./bitboss-ui-mcp.mjs'));
793
+ } catch (error) {
794
+ if (error?.code !== 'ERR_MODULE_NOT_FOUND') throw error;
795
+ console.error(
796
+ 'bitboss-ui mcp needs two optional peer dependencies that are not installed:\n' +
797
+ '\n npm i -D @modelcontextprotocol/sdk zod\n\n' +
798
+ 'They are optional because they are ~12 MB and only this subcommand uses them.\n' +
799
+ `Resolution failed with: ${error.message}`
800
+ );
801
+ process.exitCode = 1;
802
+ break;
803
+ }
685
804
  await main();
686
805
  break;
687
806
  }
@@ -76,6 +76,13 @@ icon as a pair.
76
76
  The default variant is `outline`. `warning` and `destructive` are treated as
77
77
  high-priority for accessibility (see below).
78
78
 
79
+ There is no `success` (or `positive`) variant, and it will not be added — the
80
+ shared status vocabulary is closed to `danger`/`warn` by ruling, see
81
+ [Design Tokens § Brand knobs](./guides/design-tokens.md#brand-knobs-what-a-theme-builder-sets)
82
+ ("state colors are project-owned"). Reach for `primary` for a positive
83
+ confirmation, or register your own variant (below) if the project needs a
84
+ distinct success tone.
85
+
79
86
  #### Registering project variants
80
87
 
81
88
  Variants are an open registry, not a closed enum. The vite/nuxt plugin's
@@ -200,9 +207,13 @@ click handler for something a link can do.
200
207
  </div>
201
208
  ```
202
209
 
203
- These are the only two slots — there is no default or actions slot. A short
204
- inline link in `#text` (as above) is fine; anything more interactive belongs
205
- outside the alert, or in a `BbDialog`.
210
+ **The default slot is the text slot.** `<BbAlert>Something went wrong</BbAlert>`
211
+ is the shortest form and the one to reach for; `text` as a prop is for when a
212
+ string is all you have (an `:items` loop, a server message). When more than one
213
+ is present the most specific wins: `#text` > children > `text`.
214
+
215
+ There is no `actions` slot. A short inline link in the text (as above) is fine;
216
+ anything more interactive belongs outside the alert, or in a `BbDialog`.
206
217
 
207
218
  #### Brand art via a raw SVG
208
219
 
@@ -346,9 +357,6 @@ const publish = () => {
346
357
 
347
358
  ### Gotchas & anti-patterns
348
359
 
349
- - **There is no default slot.** `<BbAlert>some text</BbAlert>` renders
350
- nothing — Vue drops an unconsumed default slot silently, with no warning.
351
- Use `title`/`text` (or `#title`/`#text`, see above).
352
360
  - **Omitting `v-model` does not make an alert permanent** — the close button
353
361
  still dismisses it locally. Use `hide-close` for that.
354
362
  - Don't rebuild dismissal with your own button + `v-if`; the built-in close
@@ -400,7 +408,8 @@ const publish = () => {
400
408
 
401
409
  ## Slots
402
410
 
403
- - `text` — scope: `BbAlertTextSlotProps` — Replaces the default alert body text.
411
+ - `default` — scope: `any` — The alert body — the shortest form, and the one to reach for: `<BbAlert>Something went wrong</BbAlert>`. Same idiom as the rest of the `text`-prop family (BbButton, BbBaseButton, BbTooltip, BbIndicator). When more than one source is present…
412
+ - `text` — scope: `BbAlertTextSlotProps` — Replaces the default alert body text. Wins over children and `text`.
404
413
  - `title` — scope: `BbAlertTitleSlotProps` — Replaces the default alert title text.
405
414
 
406
415
  ## See Also