bitboss-ui 3.0.0-beta.63 → 3.0.0-beta.65

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 (396) hide show
  1. package/README.md +25 -20
  2. package/bin/bitboss-ui.mjs +73 -7
  3. package/dist/ai/BbAlert.md +10 -1
  4. package/dist/ai/BbBadge.md +35 -3
  5. package/dist/ai/BbBadgeButton.md +4 -2
  6. package/dist/ai/BbBaseButton.md +9 -3
  7. package/dist/ai/BbBreadcrumbs.md +2 -2
  8. package/dist/ai/BbButton.md +113 -8
  9. package/dist/ai/BbCheckbox.md +1 -1
  10. package/dist/ai/BbCheckboxGroup.md +94 -6
  11. package/dist/ai/BbColorInput.md +4 -1
  12. package/dist/ai/BbColorPalette.md +2 -1
  13. package/dist/ai/BbConfirm.md +7 -3
  14. package/dist/ai/BbDatePicker.md +2 -1
  15. package/dist/ai/BbDatePickerInput.md +4 -1
  16. package/dist/ai/BbDialog.md +12 -11
  17. package/dist/ai/BbDropdown.md +189 -38
  18. package/dist/ai/BbDropdownButton.md +27 -7
  19. package/dist/ai/BbForm.md +55 -22
  20. package/dist/ai/BbHost.md +2 -2
  21. package/dist/ai/BbHoverCard.md +7 -3
  22. package/dist/ai/BbIcon.md +12 -6
  23. package/dist/ai/BbIndicator.md +11 -1
  24. package/dist/ai/BbNumberInput.md +4 -1
  25. package/dist/ai/BbOffCanvas.md +37 -3
  26. package/dist/ai/BbPopover.md +2 -1
  27. package/dist/ai/BbRadio.md +1 -1
  28. package/dist/ai/BbRadioGroup.md +102 -10
  29. package/dist/ai/BbSelect.md +52 -17
  30. package/dist/ai/BbSelectPopover.md +93 -26
  31. package/dist/ai/BbSwitch.md +1 -1
  32. package/dist/ai/BbSwitchGroup.md +30 -3
  33. package/dist/ai/BbTable.md +17 -10
  34. package/dist/ai/BbTabs.md +8 -3
  35. package/dist/ai/BbTabsList.md +4 -1
  36. package/dist/ai/BbTag.md +5 -2
  37. package/dist/ai/BbTextInput.md +4 -1
  38. package/dist/ai/BbTextarea.md +4 -1
  39. package/dist/ai/BbTimePicker.md +2 -1
  40. package/dist/ai/BbTimePickerInput.md +4 -1
  41. package/dist/ai/BbToast.md +9 -3
  42. package/dist/ai/BbTooltip.md +71 -9
  43. package/dist/ai/ChipsBox.md +1 -1
  44. package/dist/ai/CommonField.md +1 -1
  45. package/dist/ai/OptionsContainer.md +42 -0
  46. package/dist/ai/changelog.json +494 -6
  47. package/dist/ai/components.json +50 -48
  48. package/dist/ai/composables/useBbConfig.md +8 -1
  49. package/dist/ai/composables/useConfirm.md +39 -1
  50. package/dist/ai/design-tokens.json +6 -6
  51. package/dist/ai/guides/agent-contract.md +2 -2
  52. package/dist/ai/guides/ai-router.md +24 -23
  53. package/dist/ai/guides/app-layout.md +5 -0
  54. package/dist/ai/guides/component-picker.md +9 -2
  55. package/dist/ai/guides/design-language.md +24 -24
  56. package/dist/ai/guides/design-tokens.md +15 -8
  57. package/dist/ai/guides/icons-policy.md +9 -2
  58. package/dist/ai/guides/inertia-helpers.md +1183 -301
  59. package/dist/ai/guides/installation-and-plugin-setup.md +12 -2
  60. package/dist/ai/guides/migration/adoption-checklist.md +235 -0
  61. package/dist/ai/guides/migration/components/bb-checkbox-group.md +16 -15
  62. package/dist/ai/guides/migration/components/bb-dialog.md +9 -9
  63. package/dist/ai/guides/migration/components/bb-dropdown.md +7 -2
  64. package/dist/ai/guides/migration/components/bb-popover.md +4 -2
  65. package/dist/ai/guides/migration/components/bb-select.md +19 -0
  66. package/dist/ai/guides/migration/components/bb-table.md +1 -0
  67. package/dist/ai/guides/migration/components/bb-toast.md +4 -0
  68. package/dist/ai/guides/migration/components/bb-tooltip.md +15 -12
  69. package/dist/ai/guides/migration/components/use-confirm.md +25 -2
  70. package/dist/ai/guides/migration/v2-to-v3.md +211 -9
  71. package/dist/ai/guides/migration/v3-beta-css-classes.md +7 -3
  72. package/dist/ai/guides/options-items-playbook.md +2 -1
  73. package/dist/ai/guides/passthrough.md +149 -85
  74. package/dist/ai/guides/preset-components.md +140 -15
  75. package/dist/ai/helpers/definePreset.json +7 -0
  76. package/dist/ai/helpers/definePreset.ts +123 -11
  77. package/dist/ai/helpers/inertia/manifest.json +151 -62
  78. package/dist/ai/helpers/inertia/messages.ts +33 -0
  79. package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +120 -20
  80. package/dist/ai/helpers/inertia/useHasChanged.ts +34 -16
  81. package/dist/ai/helpers/inertia/useLazyProp.ts +102 -36
  82. package/dist/ai/helpers/inertia/useLazyPropGetter.ts +3 -1
  83. package/dist/ai/helpers/inertia/usePaginatedResponseContext.ts +154 -34
  84. package/dist/ai/helpers/inertia/usePromiseForm.ts +121 -14
  85. package/dist/ai/helpers/inertia/useQuery.ts +133 -11
  86. package/dist/ai/helpers/inertia/useQueryObject.ts +74 -67
  87. package/dist/ai/helpers/inertia/useResourceContext.ts +60 -14
  88. package/dist/ai/helpers/inertia/useRouteQuery.ts +38 -27
  89. package/dist/ai/helpers/inertia/useScreenSizes.ts +9 -7
  90. package/dist/ai/helpers/inertia/useTableContext.ts +5 -2
  91. package/dist/ai/helpers/inertia/utils.ts +14 -0
  92. package/dist/ai/index.md +1 -0
  93. package/dist/ai/manifest/common.json +0 -1
  94. package/dist/ai/manifest/components/BbAlert.json +7 -2
  95. package/dist/ai/manifest/components/BbBadge.json +13 -4
  96. package/dist/ai/manifest/components/BbBadge.tree.json +2 -0
  97. package/dist/ai/manifest/components/BbBadgeButton.json +4 -2
  98. package/dist/ai/manifest/components/BbBaseButton.json +4 -2
  99. package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +1 -1
  100. package/dist/ai/manifest/components/BbButton.json +14 -3
  101. package/dist/ai/manifest/components/BbButton.tree.json +5 -1
  102. package/dist/ai/manifest/components/BbCheckboxGroup.json +13 -8
  103. package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +11 -1
  104. package/dist/ai/manifest/components/BbColorInput.json +18 -15
  105. package/dist/ai/manifest/components/BbColorPalette.json +1 -1
  106. package/dist/ai/manifest/components/BbConfirm.json +4 -2
  107. package/dist/ai/manifest/components/BbConfirm.tree.json +1 -1
  108. package/dist/ai/manifest/components/BbDatePicker.json +1 -1
  109. package/dist/ai/manifest/components/BbDatePickerInput.json +17 -14
  110. package/dist/ai/manifest/components/BbDialog.tree.json +2 -1
  111. package/dist/ai/manifest/components/BbDropdown.json +24 -19
  112. package/dist/ai/manifest/components/BbDropdown.tree.json +9 -2
  113. package/dist/ai/manifest/components/BbDropdownButton.json +33 -20
  114. package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -2
  115. package/dist/ai/manifest/components/BbForm.json +2 -2
  116. package/dist/ai/manifest/components/BbHost.tree.json +1 -1
  117. package/dist/ai/manifest/components/BbHoverCard.json +1 -1
  118. package/dist/ai/manifest/components/BbIndicator.json +8 -2
  119. package/dist/ai/manifest/components/BbNumberInput.json +5 -2
  120. package/dist/ai/manifest/components/BbOffCanvas.json +2 -2
  121. package/dist/ai/manifest/components/BbOffCanvas.tree.json +1 -1
  122. package/dist/ai/manifest/components/BbPopover.json +1 -1
  123. package/dist/ai/manifest/components/BbRadioGroup.json +17 -12
  124. package/dist/ai/manifest/components/BbRadioGroup.tree.json +8 -1
  125. package/dist/ai/manifest/components/BbSelect.json +21 -18
  126. package/dist/ai/manifest/components/BbSelect.tree.json +2 -2
  127. package/dist/ai/manifest/components/BbSelectPopover.json +10 -10
  128. package/dist/ai/manifest/components/BbSelectPopover.tree.json +3 -2
  129. package/dist/ai/manifest/components/BbSwitchGroup.json +1 -1
  130. package/dist/ai/manifest/components/BbSwitchGroup.tree.json +3 -1
  131. package/dist/ai/manifest/components/BbTable.tree.json +14 -1
  132. package/dist/ai/manifest/components/BbTabs.json +9 -6
  133. package/dist/ai/manifest/components/BbTabs.tree.json +1 -1
  134. package/dist/ai/manifest/components/BbTabsList.json +6 -3
  135. package/dist/ai/manifest/components/BbTag.json +19 -16
  136. package/dist/ai/manifest/components/BbTag.tree.json +1 -1
  137. package/dist/ai/manifest/components/BbTextInput.json +6 -3
  138. package/dist/ai/manifest/components/BbTextarea.json +6 -3
  139. package/dist/ai/manifest/components/BbTimePicker.json +1 -1
  140. package/dist/ai/manifest/components/BbTimePickerInput.json +10 -7
  141. package/dist/ai/manifest/components/BbToast.json +7 -2
  142. package/dist/ai/manifest/components/BbToast.tree.json +4 -2
  143. package/dist/ai/manifest/components/BbTooltip.json +6 -5
  144. package/dist/ai/manifest/components/ChipsBox.tree.json +1 -1
  145. package/dist/ai/manifest/components/CommonField.json +1 -1
  146. package/dist/ai/manifest/components/OptionsContainer.json +3 -1
  147. package/dist/ai/manifest/components/OptionsContainer.tree.json +38 -0
  148. package/dist/ai/manifest/index.json +3 -3
  149. package/dist/ai/manifest/meta.json +5 -3
  150. package/dist/ai/manifest/types.advanced.json +5 -2
  151. package/dist/ai/manifest/types.api.json +9 -7
  152. package/dist/ai/recipes/inertia/approvals-inbox.md +1 -1
  153. package/dist/ai/recipes/inertia/inline-edit-workspace.md +1 -1
  154. package/dist/ai/recipes/inertia/layout-scaffold.md +19 -6
  155. package/dist/ai/recipes/inertia/ownership-atlas.md +1 -1
  156. package/dist/ai/recipes/inertia/records-workspace.md +50 -14
  157. package/dist/ai/recipes/inertia/upload-center.md +1 -1
  158. package/dist/ai/recipes/nuxt/layout-scaffold.md +19 -6
  159. package/dist/ai/recipes/nuxt/records-workspace.md +42 -12
  160. package/dist/ai/recipes/vue/layout-scaffold.md +19 -6
  161. package/dist/ai/recipes/vue/records-workspace.md +42 -12
  162. package/dist/ai/source/BbAlert.md +94 -76
  163. package/dist/ai/source/BbBadge.md +174 -72
  164. package/dist/ai/source/BbBadgeButton.md +130 -65
  165. package/dist/ai/source/BbBaseButton.md +46 -124
  166. package/dist/ai/source/BbBaseCheckboxIcon.md +38 -0
  167. package/dist/ai/source/BbBaseRadioIcon.md +18 -0
  168. package/dist/ai/source/BbBaseSwitchIcon.md +51 -0
  169. package/dist/ai/source/BbButton.md +153 -36
  170. package/dist/ai/source/BbCheckboxGroup.md +142 -18
  171. package/dist/ai/source/BbColorInput.md +240 -204
  172. package/dist/ai/source/BbColorPalette.md +7 -4
  173. package/dist/ai/source/BbConfirm.md +34 -11
  174. package/dist/ai/source/BbConfirmPortal.md +24 -9
  175. package/dist/ai/source/BbDatePicker.md +11 -7
  176. package/dist/ai/source/BbDatePickerInput.md +306 -269
  177. package/dist/ai/source/BbDialog.md +49 -14
  178. package/dist/ai/source/BbDropdown.md +314 -197
  179. package/dist/ai/source/BbDropdownButton.md +197 -31
  180. package/dist/ai/source/BbDropdownGroup.md +274 -176
  181. package/dist/ai/source/BbForm.md +50 -6
  182. package/dist/ai/source/BbHoverCard.md +12 -5
  183. package/dist/ai/source/BbIcon.md +4 -3
  184. package/dist/ai/source/BbIndicator.md +73 -52
  185. package/dist/ai/source/BbNumberInput.md +293 -257
  186. package/dist/ai/source/BbOffCanvas.md +55 -29
  187. package/dist/ai/source/BbPopover.md +14 -10
  188. package/dist/ai/source/BbRadioGroup.md +413 -297
  189. package/dist/ai/source/BbSelect.md +549 -435
  190. package/dist/ai/source/BbSelectPopover.md +153 -34
  191. package/dist/ai/source/BbSwitchGroup.md +70 -10
  192. package/dist/ai/source/BbTable.md +369 -37
  193. package/dist/ai/source/BbTabs.md +115 -39
  194. package/dist/ai/source/BbTabsList.md +106 -38
  195. package/dist/ai/source/BbTabsPanels.md +96 -36
  196. package/dist/ai/source/BbTabsRoot.md +96 -36
  197. package/dist/ai/source/BbTag.md +267 -233
  198. package/dist/ai/source/BbTextInput.md +261 -225
  199. package/dist/ai/source/BbTextarea.md +251 -215
  200. package/dist/ai/source/BbTimePicker.md +11 -7
  201. package/dist/ai/source/BbTimePickerInput.md +257 -220
  202. package/dist/ai/source/BbToast.md +73 -32
  203. package/dist/ai/source/BbToastPortal.md +65 -30
  204. package/dist/ai/source/BbTooltip.md +148 -113
  205. package/dist/ai/source/CommonPopover.md +6 -1
  206. package/dist/ai/source/FlatListBox.md +19 -9
  207. package/dist/ai/source/GroupedListBox.md +19 -9
  208. package/dist/ai/source/OptionsContainer.md +25 -9
  209. package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +61 -36
  210. package/dist/components/BbAlert/types.d.ts +9 -5
  211. package/dist/components/BbAlert/types.js +8 -3
  212. package/dist/components/BbBadge/BadgeBodyContent.vue.d.ts +3 -3
  213. package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +26 -17
  214. package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +103 -50
  215. package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +20 -15
  216. package/dist/components/BbBadge/badgeButtonContext.d.ts +12 -1
  217. package/dist/components/BbBadge/types.d.ts +45 -15
  218. package/dist/components/BbBadge/types.js +12 -3
  219. package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +89 -126
  220. package/dist/components/BbBaseButton/types.d.ts +23 -4
  221. package/dist/components/BbBaseButton/types.js +7 -1
  222. package/dist/components/BbBaseButton/useLinkState.d.ts +41 -0
  223. package/dist/components/BbBaseButton/useLinkState.js +70 -0
  224. package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +130 -74
  225. package/dist/components/BbButton/types.d.ts +50 -13
  226. package/dist/components/BbButton/types.js +10 -3
  227. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +148 -95
  228. package/dist/components/BbCheckboxGroup/types.d.ts +34 -11
  229. package/dist/components/BbCheckboxGroup/types.js +9 -4
  230. package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +1 -1
  231. package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +134 -93
  232. package/dist/components/BbColorInput/types.d.ts +11 -4
  233. package/dist/components/BbColorInput/types.js +9 -3
  234. package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +82 -59
  235. package/dist/components/BbConfirm/types.d.ts +9 -4
  236. package/dist/components/BbConfirm/types.js +8 -3
  237. package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
  238. package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +68 -67
  239. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +1 -1
  240. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +259 -215
  241. package/dist/components/BbDatePickerInput/types.d.ts +12 -5
  242. package/dist/components/BbDatePickerInput/types.js +9 -3
  243. package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +223 -219
  244. package/dist/components/BbDialog/useDialogStack.d.ts +1 -1
  245. package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +104 -89
  246. package/dist/components/BbDropdown/BbDropdown.vue.d.ts +1 -0
  247. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +323 -285
  248. package/dist/components/BbDropdown/BbDropdownList.vue.d.ts +1 -0
  249. package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +411 -319
  250. package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +100 -98
  251. package/dist/components/BbDropdown/DropdownRow.vue.d.ts +4 -3
  252. package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +49 -28
  253. package/dist/components/BbDropdown/normalizeGroups.d.ts +6 -0
  254. package/dist/components/BbDropdown/normalizeGroups.js +21 -15
  255. package/dist/components/BbDropdown/types.d.ts +59 -12
  256. package/dist/components/BbDropdown/types.js +16 -3
  257. package/dist/components/BbDropdown/useDropdownContext.d.ts +6 -0
  258. package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +2 -1
  259. package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +179 -68
  260. package/dist/components/BbDropdownButton/types.d.ts +44 -16
  261. package/dist/components/BbDropdownButton/types.js +28 -3
  262. package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +111 -89
  263. package/dist/components/BbForm/formSchema.d.ts +13 -0
  264. package/dist/components/BbHoverCard/BbHoverCard.vue_vue_type_script_setup_true_lang.js +100 -100
  265. package/dist/components/BbIndicator/BbIndicator.vue_vue_type_script_setup_true_lang.js +40 -25
  266. package/dist/components/BbIndicator/types.d.ts +9 -5
  267. package/dist/components/BbIndicator/types.js +8 -3
  268. package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +243 -202
  269. package/dist/components/BbNumberInput/types.d.ts +12 -5
  270. package/dist/components/BbNumberInput/types.js +9 -3
  271. package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +1 -1
  272. package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +401 -399
  273. package/dist/components/BbOffCanvas/types.d.ts +6 -2
  274. package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +81 -80
  275. package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +158 -105
  276. package/dist/components/BbRadioGroup/types.d.ts +21 -7
  277. package/dist/components/BbRadioGroup/types.js +9 -4
  278. package/dist/components/BbSelect/BbSelect.vue.d.ts +4 -3
  279. package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +181 -137
  280. package/dist/components/BbSelect/types.d.ts +36 -22
  281. package/dist/components/BbSelect/types.js +22 -3
  282. package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +4 -4
  283. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +600 -577
  284. package/dist/components/BbSelectPopover/knownItems.d.ts +5 -0
  285. package/dist/components/BbSelectPopover/types.d.ts +46 -12
  286. package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +1 -1
  287. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +2 -2
  288. package/dist/components/BbSwitchGroup/types.d.ts +14 -4
  289. package/dist/components/BbSwitchGroup/types.js +8 -3
  290. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1102 -995
  291. package/dist/components/BbTable/estimatedFloors.golden.d.ts +25 -0
  292. package/dist/components/BbTable/measuredFloors.d.ts +46 -0
  293. package/dist/components/BbTable/measuredFloors.js +322 -0
  294. package/dist/components/BbTable/measuredFloorsTestKit.d.ts +27 -0
  295. package/dist/components/BbTable/textRuler.d.ts +71 -0
  296. package/dist/components/BbTable/textRuler.js +121 -0
  297. package/dist/components/BbTable/utils.d.ts +113 -6
  298. package/dist/components/BbTable/utils.js +118 -65
  299. package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +53 -35
  300. package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +62 -45
  301. package/dist/components/BbTabs/types.d.ts +26 -11
  302. package/dist/components/BbTabs/types.js +23 -8
  303. package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +205 -164
  304. package/dist/components/BbTag/types.d.ts +11 -4
  305. package/dist/components/BbTag/types.js +9 -3
  306. package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +98 -57
  307. package/dist/components/BbTextInput/types.d.ts +12 -5
  308. package/dist/components/BbTextInput/types.js +9 -3
  309. package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +137 -96
  310. package/dist/components/BbTextarea/types.d.ts +12 -5
  311. package/dist/components/BbTextarea/types.js +9 -3
  312. package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +105 -104
  313. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +241 -197
  314. package/dist/components/BbTimePickerInput/types.d.ts +12 -5
  315. package/dist/components/BbTimePickerInput/types.js +9 -3
  316. package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +74 -32
  317. package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +47 -47
  318. package/dist/components/BbToast/types.d.ts +10 -5
  319. package/dist/components/BbToast/types.js +18 -3
  320. package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +85 -71
  321. package/dist/components/BbTooltip/types.d.ts +13 -8
  322. package/dist/components/BbTooltip/types.js +8 -3
  323. package/dist/components/CommonField/CommonField.vue.d.ts +1 -1
  324. package/dist/components/CommonPopover/CommonPopover.vue.d.ts +1 -1
  325. package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +69 -69
  326. package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +53 -50
  327. package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +146 -143
  328. package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +7 -2
  329. package/dist/components/OptionsContainer/types.d.ts +14 -3
  330. package/dist/composables/useBbConfig.d.ts +1 -0
  331. package/dist/composables/useBbConfig.js +11 -7
  332. package/dist/composables/useBbFormContext.d.ts +4 -3
  333. package/dist/composables/useBbTabsContext.js +99 -85
  334. package/dist/composables/useChoiceIndicator.d.ts +58 -0
  335. package/dist/composables/useChoiceIndicator.js +197 -0
  336. package/dist/composables/useConfirm.d.ts +4 -4
  337. package/dist/composables/usePassthrough.d.ts +54 -1
  338. package/dist/composables/usePassthrough.js +100 -71
  339. package/dist/directives/bbTooltip.d.ts +12 -6
  340. package/dist/directives/createPopoverDirective.js +1 -1
  341. package/dist/index.d.ts +3 -1
  342. package/dist/llms-full.txt +3467 -801
  343. package/dist/llms-medium.txt +71 -53
  344. package/dist/llms.txt +2 -1
  345. package/dist/passthrough-deduper.js +6 -3
  346. package/dist/project-dts.d.ts +24 -0
  347. package/dist/project-dts.js +43 -17
  348. package/dist/styles.css +2 -2
  349. package/dist/types/AlertVariant.d.ts +14 -0
  350. package/dist/types/AlertVariant.js +9 -0
  351. package/dist/types/BadgeVariant.d.ts +14 -0
  352. package/dist/types/BadgeVariant.js +9 -0
  353. package/dist/types/ButtonVariant.d.ts +16 -0
  354. package/dist/types/ButtonVariant.js +11 -0
  355. package/dist/types/CheckboxVariant.d.ts +38 -0
  356. package/dist/types/CheckboxVariant.js +4 -0
  357. package/dist/types/CommonProps.d.ts +4 -3
  358. package/dist/types/Config.d.ts +7 -0
  359. package/dist/types/ConfirmVariant.d.ts +12 -0
  360. package/dist/types/ConfirmVariant.js +4 -0
  361. package/dist/types/DropdownItemVariant.d.ts +12 -0
  362. package/dist/types/DropdownItemVariant.js +4 -0
  363. package/dist/types/IndicatorVariant.d.ts +15 -0
  364. package/dist/types/IndicatorVariant.js +10 -0
  365. package/dist/types/InputVariant.d.ts +13 -0
  366. package/dist/types/InputVariant.js +8 -0
  367. package/dist/types/RadioVariant.d.ts +38 -0
  368. package/dist/types/RadioVariant.js +4 -0
  369. package/dist/types/TabsVariant.d.ts +13 -0
  370. package/dist/types/TabsVariant.js +8 -0
  371. package/dist/types/ToastVariant.d.ts +15 -0
  372. package/dist/types/ToastVariant.js +10 -0
  373. package/dist/types/TooltipVariant.d.ts +12 -0
  374. package/dist/types/TooltipVariant.js +4 -0
  375. package/dist/types/passthrough.d.ts +83 -15
  376. package/dist/types/passthrough.js +2 -2
  377. package/dist/types/ptComponentMap.d.ts +35 -23
  378. package/dist/utilities/functions/extractDomContainer.d.ts +20 -1
  379. package/dist/utilities/functions/extractDomContainer.js +8 -3
  380. package/dist/utils/focusVisibility.d.ts +6 -0
  381. package/dist/utils/focusVisibility.js +4 -1
  382. package/dist/utils/passthroughDeduper.d.ts +14 -0
  383. package/dist/utils/versionCheck.js +1 -1
  384. package/dist/vite-plugin.d.ts +64 -7
  385. package/dist/vite.js +385 -259
  386. package/llms.txt +2 -1
  387. package/package.json +5 -4
  388. package/scripts/lib/adoption-checklist.json +312 -0
  389. package/scripts/lib/eslint-plugin.d.ts +13 -0
  390. package/scripts/lib/eslint-plugin.mjs +75 -11
  391. package/scripts/lib/helpers-add.mjs +26 -2
  392. package/scripts/lib/idiom-scan.mjs +65 -0
  393. package/scripts/lib/mcp-config.mjs +203 -9
  394. package/scripts/lib/migrate-fix.mjs +42 -1
  395. package/scripts/lib/project-variant-dts.mjs +18 -0
  396. package/scripts/lib/validate-bb-markup.mjs +99 -2
package/llms.txt CHANGED
@@ -7,7 +7,7 @@ Note: the `dist/` paths below resolve inside the installed npm package (`node_mo
7
7
  ## AI Knowledge Base
8
8
 
9
9
  - [Core knowledge base](https://llms-bitboss-ui.bitboss.it/dist/llms-medium.txt): **Fetch this if you can only fetch one file** — hard rules, setup, component picker, design language, and the full component catalogue in ~250 KB.
10
- - [Complete knowledge base](https://llms-bitboss-ui.bitboss.it/dist/llms-full.txt): Everything concatenated (~6.1 MB). Bulk ingestion only — too large to prompt with.
10
+ - [Complete knowledge base](https://llms-bitboss-ui.bitboss.it/dist/llms-full.txt): Everything concatenated (~6.3 MB). Bulk ingestion only — too large to prompt with.
11
11
  - [AI Router](dist/ai/guides/ai-router.md): **Start here** — tiny hop map for any coding agent (which file to open next).
12
12
  - [Component index](dist/ai/index.md): Full component catalogue with agent rules, grouped by category. Each entry links a typed contract (props/events/slots/v-model).
13
13
  - [Component API files](dist/ai/manifest/index.json): Machine-readable API, one JSON file per component (`manifest/components/<Name>.json`: every prop, event, slot, v-model and pt part, one per line, plus the public types it uses; a row marked `common: true` is whole in `manifest/common.json`) — open the index, then the one component. The same data in one ~1.2 MB file for tools is [components.json](dist/ai/components.json); its `types` array lists the public TYPE exports with a `usage` tier (`api` = the ones you reach for) and, on the `api` ones, a `usedBy` array naming the component and prop or event each is the type OF — `BbTableColumn` is `usedBy` `BbTable.columns`, a value you pass, not a tag you write. This file is props and events, not paint.
@@ -22,6 +22,7 @@ Note: the `dist/` paths below resolve inside the installed npm package (`node_mo
22
22
  - [Options and Items Playbook](dist/ai/guides/options-items-playbook.md): How item-driven components turn raw domain items into options — mapping, value identity, model seeding, and the supported ways to disable choices.
23
23
  - [Inline Edit Playbook](dist/ai/guides/inline-edit-playbook.md): Who owns the edit? Choosing between draft-map, autosave, and write-back persistence for inline-editing tables — commit rules per control kind, optimistic overlays with rollback, and the dirty-ring / chevron-to-spinner feedback grammar.
24
24
  - [Icons Policy](dist/ai/guides/icons-policy.md): Provider-first icon usage (`lucide:*` via `@iconify-json/*` packages), `local:*` for brand art, how the plugin resolves names, and a catalog of every surface that accepts an icon.
25
+ - [Adoption checklist — finish a migration on the library](dist/ai/guides/migration/adoption-checklist.md): The walk every migration ends with, from bitboss-ui v2 or any other library — each hand-rolled pattern the library ships (radio cards, segmented controls, tabs, sortable headers, nested tables, steppers, notice boxes, app sheets, app dialogs and confirms), how to find it (an rg command, or `npx bitboss-ui check --idioms`), and the replacement in its shortest syntax; then the adaptive phase and the production rebuild.
25
26
  - [App Layout](dist/ai/guides/app-layout.md): App-side chrome around every page — collapsible left nav sidebar and a fat footer, owning the page's one <main> landmark and the CSS hooks (.layout--sidebar-expanded, --sidebar-max-w) that size the nav.
26
27
  - [Design Language](dist/ai/guides/design-language.md): Token vocabulary, variants, sizing, dark mode, and how to style around the components when building on-system UIs.
27
28
  - [Design Tokens](dist/ai/guides/design-tokens.md): The token architecture of bitboss-ui — tiers, naming rules, the emphasis ladder, and the theming contract.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bitboss-ui",
3
- "version": "3.0.0-beta.63",
3
+ "version": "3.0.0-beta.65",
4
4
  "description": "Vue 3 component library by BitBoss: forms, selects, layout, overlays, and more.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -92,7 +92,7 @@
92
92
  "prepack": "npm run build && npm run check:pack && npm pkg delete scripts.prepare",
93
93
  "preview": "vite preview",
94
94
  "storybook": "storybook dev -p 6006",
95
- "test": "node scripts/ensure-manifest.mjs && vitest run && node scripts/check-guide-types.mjs && npm run check:test-types && node scripts/check-fixture-types.mjs && node scripts/check-recipes.mjs && node scripts/check-examples.mjs && node scripts/recipes.mjs --check && node scripts/check-doc-drift.mjs && node scripts/check-doc-ts.mjs && node scripts/run-ai-evals.mjs && node scripts/check-mcp.mjs && node scripts/check-search-coverage.mjs && node scripts/check-tokens.mjs && node scripts/check-pins.mjs && node scripts/check-deprecation-register.mjs && node scripts/check-inertia-link-props.mjs && node --experimental-strip-types scripts/check-api-consistency.ts --strict && node --experimental-strip-types scripts/check-default-docs.ts && node --experimental-strip-types scripts/generate-component-docs.ts --strict && node scripts/check-doc-links.mjs && node scripts/generate-css-migration.mjs --check",
95
+ "test": "node scripts/ensure-manifest.mjs && vitest run && node scripts/check-guide-types.mjs && npm run check:test-types && node scripts/check-fixture-types.mjs && node scripts/check-recipes.mjs && node scripts/check-examples.mjs && node scripts/recipes.mjs --check && node scripts/check-doc-drift.mjs && node scripts/check-doc-ts.mjs && node scripts/run-ai-evals.mjs && node scripts/check-mcp.mjs && node scripts/check-search-coverage.mjs && node scripts/check-tokens.mjs && node scripts/check-pins.mjs && node scripts/check-deprecation-register.mjs && node scripts/check-inertia-link-props.mjs && node --experimental-strip-types scripts/check-api-consistency.ts --strict && node --experimental-strip-types scripts/check-default-docs.ts && node --experimental-strip-types scripts/generate-component-docs.ts --strict && node scripts/check-doc-links.mjs && node scripts/generate-css-migration.mjs --check && node scripts/generate-adoption-checklist.mjs --check",
96
96
  "test:fixtures": "npm run build && node scripts/check-nuxt-types.mjs && node scripts/run-ssr-fixture.mjs && node scripts/invalidate-fixture-caches.mjs && FIXTURE_TARGET=dist node scripts/run-e2es.mjs fixtures/inertia/e2e && FIXTURE_TARGET=dist node scripts/run-e2es.mjs fixtures/vue/e2e && npm run test:nuxt && npm run test:nuxt:prod && node scripts/test-add.mjs",
97
97
  "test:fixtures:src": "npm run test:inertia && npm run test:vue && npm run test:nuxt",
98
98
  "test:inertia": "node scripts/invalidate-fixture-caches.mjs && node scripts/run-e2es.mjs fixtures/inertia/e2e",
@@ -106,7 +106,7 @@
106
106
  "test:engines": "node scripts/ensure-manifest.mjs && node scripts/run-engines.mjs",
107
107
  "test:ci:node": "node scripts/ensure-manifest.mjs && vitest run --project node --project types --project ssr",
108
108
  "test:ci:browser": "node scripts/ensure-manifest.mjs && node scripts/run-browser-chunked.mjs 12",
109
- "test:ci:gates": "node scripts/check-guide-types.mjs && npm run check:test-types && node scripts/check-fixture-types.mjs && node scripts/check-recipes.mjs && node scripts/check-examples.mjs && node scripts/recipes.mjs --check && node scripts/check-doc-drift.mjs && node scripts/check-doc-ts.mjs && node scripts/run-ai-evals.mjs && node scripts/check-pins.mjs && node scripts/check-deprecation-register.mjs && node scripts/check-inertia-link-props.mjs && node --experimental-strip-types scripts/check-default-docs.ts && node scripts/check-doc-links.mjs && node scripts/generate-css-migration.mjs --check && npm run check:helpers-lint",
109
+ "test:ci:gates": "node scripts/check-guide-types.mjs && npm run check:test-types && node scripts/check-fixture-types.mjs && node scripts/check-recipes.mjs && node scripts/check-examples.mjs && node scripts/recipes.mjs --check && node scripts/check-doc-drift.mjs && node scripts/check-doc-ts.mjs && node scripts/run-ai-evals.mjs && node scripts/check-pins.mjs && node scripts/check-deprecation-register.mjs && node scripts/check-inertia-link-props.mjs && node --experimental-strip-types scripts/check-default-docs.ts && node scripts/check-doc-links.mjs && node scripts/generate-css-migration.mjs --check && node scripts/generate-adoption-checklist.mjs --check && npm run check:helpers-lint",
110
110
  "test:ci": "npm run test:ci:node && npm run test:ci:browser && npm run test:ci:gates",
111
111
  "postpack": "npm pkg set \"scripts.prepare=node scripts/hooks-install.mjs\"",
112
112
  "test:ssr": "npm run build && node scripts/run-ssr-fixture.mjs",
@@ -129,7 +129,7 @@
129
129
  },
130
130
  "peerDependencies": {
131
131
  "@iconify/collections": ">=1.0.0",
132
- "@inertiajs/vue3": ">=1.0.0",
132
+ "@inertiajs/vue3": ">=2.0.0",
133
133
  "@modelcontextprotocol/sdk": ">=1.29.0",
134
134
  "@nuxt/kit": ">=4.0.0",
135
135
  "vee-validate": ">=4.10.0 <5",
@@ -196,6 +196,7 @@
196
196
  "gray-matter": "^4.0.3",
197
197
  "heroicons": "^2.2.0",
198
198
  "husky": "^9.1.7",
199
+ "inertia2-vue3": "npm:@inertiajs/vue3@^2.3.10",
199
200
  "joi": "^18.2.9",
200
201
  "lightningcss": "^1.32.0",
201
202
  "lint-staged": "^17.0.4",
@@ -0,0 +1,312 @@
1
+ {
2
+ "$comment": "The adoption checklist (Q76.0): ONE source for the guide (ai/guides/migration/adoption-checklist.md, the block between the adoption-rows markers, written by scripts/generate-adoption-checklist.mjs) and for `bitboss-ui check --idioms` (scripts/lib/idiom-scan.mjs). Each probe is a regex run per line, in both JavaScript and ripgrep syntax (no lookarounds; `.` stands for a quote so the shell command needs none). `inFile` must also match somewhere in the file, `notInFile` must not, and `notInLine` must not match the hit's own line. `ext` lists the file extensions the row reads.",
3
+ "rows": [
4
+ {
5
+ "id": "radio-group",
6
+ "pattern": "A hand-built single choice: radio cards, a pill row, anything carrying `role=\"radiogroup\"` / `role=\"radio\"`, or raw `<input type=\"radio\">`",
7
+ "ext": ["vue"],
8
+ "probes": [
9
+ {
10
+ "find": "role=.radio(group)?[^a-z]|type=.radio."
11
+ }
12
+ ],
13
+ "use": "BbRadioGroup",
14
+ "example": "<BbRadioGroup v-model=\"plan\" legend=\"Plan\" :items=\"plans\" />",
15
+ "note": "Cards: `list-layout=\"vertical-stretch\" item-layout=\"label-fill\"`. A segmented strip: `variant=\"pill\"` (or `\"line\"`), BbTabs' look. Other pill looks: `pt:` on `item` / `label`, with `pt:icon=\"hidden\"`. One look across the app = one `definePreset`."
16
+ },
17
+ {
18
+ "id": "checkbox",
19
+ "pattern": "A hand-built checkbox or check square: `role=\"checkbox\"` on your own markup, or a raw `<input type=\"checkbox\">`",
20
+ "ext": ["vue"],
21
+ "probes": [
22
+ {
23
+ "find": "role=.checkbox.|type=.checkbox."
24
+ }
25
+ ],
26
+ "use": "BbCheckbox / BbCheckboxGroup",
27
+ "example": "<BbCheckboxGroup v-model=\"ids\" legend=\"Columns\" :items=\"columns\" />",
28
+ "note": "A row of single checkboxes is a group. Selectable table rows are `BbTable selectable`."
29
+ },
30
+ {
31
+ "id": "tabs",
32
+ "pattern": "Hand-built tabs: `role=\"tablist\"` / `role=\"tab\"` on your own markup",
33
+ "ext": ["vue"],
34
+ "probes": [
35
+ {
36
+ "find": "role=.tab(list)?[^a-z]"
37
+ }
38
+ ],
39
+ "use": "BbTabs",
40
+ "example": "<BbTabs v-model=\"view\" :items=\"views\" />",
41
+ "note": "`pill` is the default look; `line` for page sections; `navigation` puts the tab in the URL."
42
+ },
43
+ {
44
+ "id": "toggle-group",
45
+ "pattern": "A segmented control or tag group: a `v-for` of buttons that carry `aria-pressed`, or an app component named like one (`SegmentedControl`, `TagGroup`, `ChipGroup`, `ToggleGroup`, `RadioCards`)",
46
+ "ext": ["vue"],
47
+ "probes": [
48
+ {
49
+ "find": "aria-pressed",
50
+ "inFile": "v-for"
51
+ },
52
+ {
53
+ "find": "<(Segmented[A-Za-z]*|Tags?Group|ChipGroup|ToggleGroup|RadioCards?[A-Za-z]*)[\\s/>]"
54
+ }
55
+ ],
56
+ "use": "BbTabs (switch views) / BbRadioGroup (pick a value) / BbCheckboxGroup (pick several)",
57
+ "example": "<BbTabs v-model=\"view\" :items=\"views\" />",
58
+ "note": "Decide by the job, not the look: switching what the page shows is BbTabs (`pill`); choosing a value a form or a filter submits is BbRadioGroup `variant=\"pill\"` (several values: BbCheckboxGroup `variant=\"pill\"`). See \"Switch views or pick a value\" above. On/off toggles that are not one choice are `BbButton` with `v-model` (it owns `aria-pressed`; `group` fuses them)."
59
+ },
60
+ {
61
+ "id": "sort-header",
62
+ "pattern": "Hand-built sortable headers: your own `aria-sort`, sort arrows and click handlers on `<th>`",
63
+ "ext": ["vue"],
64
+ "probes": [
65
+ {
66
+ "find": "aria-sort"
67
+ }
68
+ ],
69
+ "use": "BbTable `sortable` columns + `v-model:sort`",
70
+ "example": "<BbTable v-model:sort=\"sort\" :columns=\"[{ key: 'name', label: 'Name', sortable: true }]\" :items=\"rows\" />",
71
+ "note": "`v-model:sort` is an ordered array of `[key, dir]`; a server that sorts by one column keeps the last entry."
72
+ },
73
+ {
74
+ "id": "table",
75
+ "pattern": "A raw `<table>`, including a hand-made nested or expanding one (child rows, a chevron in the first cell)",
76
+ "ext": ["vue"],
77
+ "probes": [
78
+ {
79
+ "find": "<table[\\s>]"
80
+ }
81
+ ],
82
+ "use": "BbTable (nested: `#expand` + a nested `BbTable inherit-column-widths`)",
83
+ "example": "<BbTable :columns=\"columns\" :items=\"rows\" />",
84
+ "note": "Rows that open: `v-model:expanded-items` and the `#expand` slot. An email or print template that needs a raw table stays one."
85
+ },
86
+ {
87
+ "id": "option-check",
88
+ "pattern": "A custom check glyph in select options: a check icon or check square in `#option`, or a class that hides the library's own check (`[&>svg]:hidden`)",
89
+ "ext": ["vue", "ts"],
90
+ "probes": [
91
+ {
92
+ "find": "\\[&>svg\\]:hidden"
93
+ },
94
+ {
95
+ "find": "<CheckSquare[\\s/>]"
96
+ },
97
+ {
98
+ "find": "icon=.[a-z-]*:?(square-)?check",
99
+ "inFile": "#option"
100
+ }
101
+ ],
102
+ "use": "BbSelect / BbSelectPopover / BbDropdown (the selected row draws its own check)",
103
+ "example": "<BbSelect v-model=\"ids\" label=\"Owners\" :items=\"users\" multiple />",
104
+ "note": "Keep `#option` for the row's content; the selection mark is the component's."
105
+ },
106
+ {
107
+ "id": "stepper",
108
+ "pattern": "A hand-built stepper: minus / plus buttons around a number, with your own increment and decrement code",
109
+ "ext": ["vue"],
110
+ "probes": [
111
+ {
112
+ "find": "(increment|decrement|stepUp|stepDown)\\s*\\(",
113
+ "inFile": "<button",
114
+ "notInFile": "<BbNumberInput"
115
+ }
116
+ ],
117
+ "use": "BbNumberInput (its slots get `{ increase, decrease }`)",
118
+ "example": "<BbNumberInput v-model=\"qty\" label=\"Quantity\" :min=\"0\"><template #append=\"{ increase }\"><BbButton icon=\"lucide:plus\" variant=\"ghost\" @click=\"increase\">More</BbButton></template></BbNumberInput>",
119
+ "note": "Arrow keys, clamping to `min` / `max`, `step` and locale formatting come with the field."
120
+ },
121
+ {
122
+ "id": "notice",
123
+ "pattern": "A hand-built notice box: a styled `<div role=\"status\">` / `role=\"alert\"`",
124
+ "ext": ["vue"],
125
+ "probes": [
126
+ {
127
+ "find": "<(div|p|section|aside)\\b[^>]*role=.(status|alert)."
128
+ }
129
+ ],
130
+ "use": "BbAlert",
131
+ "example": "<BbAlert title=\"Saved as a draft\" />",
132
+ "note": "`variant=\"destructive\"` for errors (it announces as an alert). An empty-state box (\"nothing here yet\") has no component: keep it, built on tokens."
133
+ },
134
+ {
135
+ "id": "clickable-card",
136
+ "pattern": "A whole card or tile wrapped in a link (`<a>`, `<Link>`, `<RouterLink>` carrying the card's border and padding)",
137
+ "ext": ["vue"],
138
+ "probes": [
139
+ {
140
+ "find": "<(a|Link|RouterLink|router-link)\\b[^>]*class=.[^\"]*\\b(rounded|border|shadow)[^\"]*\\bp-[0-9]"
141
+ }
142
+ ],
143
+ "use": "BbBaseButton as an overlay link (BbBaseButton § A clickable card)",
144
+ "example": "<div class=\"relative rounded-(--bb-radius) border p-4\">…<BbBaseButton class=\"absolute inset-0\" :href=\"url\"><span class=\"sr-only\">Open report</span></BbBaseButton></div>",
145
+ "note": "There is no card or KPI-tile component: keep the box, adopt the link (navigation, prefetch, one focus ring, selectable text)."
146
+ },
147
+ {
148
+ "id": "app-sheet",
149
+ "pattern": "An app-made sheet or mobile overlay: a `useBottomSheet` / `BottomSheet` / `ActionSheet` of your own, a `BbOffCanvas` mounted with `v-if` instead of `v-model`, or a side switched by hand on `isMobile`",
150
+ "ext": ["vue", "ts", "js"],
151
+ "probes": [
152
+ {
153
+ "find": "use(Bottom|Action)Sheet\\b|<(Bottom|Action)Sheet[\\s/>]"
154
+ },
155
+ {
156
+ "find": "<BbOffCanvas\\b[^>]*\\bv-if="
157
+ },
158
+ {
159
+ "find": ":side=.[A-Za-z.]*[Mm]obile\\b"
160
+ }
161
+ ],
162
+ "use": "Adaptive overlays (BbDialog, BbDropdown, BbSelect, BbPopover open as sheets on a phone) / BbOffCanvas with a per-breakpoint `side`",
163
+ "example": "<BbOffCanvas v-model=\"open\" :side=\"{ default: 'bottom', md: 'right' }\" draggable title=\"Filters\" />",
164
+ "note": "Delete the app's sheet, its drag code and its `isMobile` branches: `draggable` gives drag-to-dismiss and the handle, and the panel lifts above the keyboard by itself."
165
+ },
166
+ {
167
+ "id": "app-dialog",
168
+ "pattern": "App-made dialogs and confirms: a raw `<dialog>`, `role=\"dialog\"` on your own markup, `window.confirm()`, or an app `ConfirmDialog` / `ConfirmModal`",
169
+ "ext": ["vue", "ts", "js"],
170
+ "probes": [
171
+ {
172
+ "find": "<dialog[\\s>]|role=.(alert)?dialog."
173
+ },
174
+ {
175
+ "find": "window\\.confirm\\("
176
+ },
177
+ {
178
+ "find": "<Confirm(Dialog|Modal)[\\s/>]"
179
+ }
180
+ ],
181
+ "use": "BbDialog (`v-bb-dialog`) / `confirm()`",
182
+ "example": "const ok = await confirm({ title: 'Delete invoice?', variant: 'destructive' });",
183
+ "note": "Open a dialog by id from its trigger: `<BbButton v-bb-dialog=\"'edit-user'\">Edit</BbButton>` + `<BbDialog id=\"edit-user\" title=\"Edit user\">`; `confirm()` comes from `useConfirm()`."
184
+ },
185
+ {
186
+ "id": "destructive-confirm",
187
+ "pattern": "A delete confirm without the destructive look: a `confirm()` in a file that deletes or removes, with no `variant: 'destructive'`",
188
+ "ext": ["vue", "ts", "js"],
189
+ "probes": [
190
+ {
191
+ "find": "confirm\\(\\{",
192
+ "inFile": "[Dd]elete|[Rr]emove|[Ee]limina|[Cc]ancella",
193
+ "notInFile": "variant:\\s*.destructive."
194
+ }
195
+ ],
196
+ "use": "`confirm({ variant: 'destructive' })`",
197
+ "example": "const ok = await confirm({ title: 'Delete invoice?', variant: 'destructive' });",
198
+ "note": "The Yes button takes the variant too. A row menu's delete item takes `variant: 'destructive'` on the item."
199
+ },
200
+ {
201
+ "id": "media-query",
202
+ "pattern": "Your own mobile check: a `useIsMobile`, `window.matchMedia(…)` or an `innerWidth` comparison deciding layout",
203
+ "ext": ["vue", "ts", "js"],
204
+ "probes": [
205
+ {
206
+ "find": "\\buseIsMobile\\b|window\\.matchMedia\\(|innerWidth\\s*[<>]"
207
+ }
208
+ ],
209
+ "use": "`useMobile()` from bitboss-ui",
210
+ "example": "const { isMobile } = useMobile();",
211
+ "note": "It is the same breakpoint the adaptive overlays switch at (`mobileMaxWidth`), so the app and the library never disagree."
212
+ },
213
+ {
214
+ "id": "pagination",
215
+ "pattern": "A hand-built pager: page-number buttons, an app `Pagination` / `Pager` component, a `nav` labelled \"pagination\"",
216
+ "ext": ["vue"],
217
+ "probes": [
218
+ {
219
+ "find": "aria-label=.[Pp]agina(tion|zione)."
220
+ },
221
+ {
222
+ "find": "<(Pagination|Pager|XPagination)[\\s/>]"
223
+ }
224
+ ],
225
+ "use": "BbPagination",
226
+ "example": "<BbPagination v-model=\"page\" :total-pages=\"pages\" />",
227
+ "note": "`navigation` builds a link per page; inside a BbTable the table's pager reads the table."
228
+ },
229
+ {
230
+ "id": "disclosure",
231
+ "pattern": "A hand-built disclosure or collapsible card: a raw `<details>` / `<summary>`",
232
+ "ext": ["vue"],
233
+ "probes": [
234
+ {
235
+ "find": "<details[\\s>]"
236
+ }
237
+ ],
238
+ "use": "BbAccordion (BbCollapsible when you bring the trigger)",
239
+ "example": "<BbAccordion v-model=\"open\" title=\"Can I change plans?\" />",
240
+ "note": "`heading-level` sets the header's heading; the chevron and the ARIA come with it."
241
+ },
242
+ {
243
+ "id": "form-control",
244
+ "pattern": "Raw form controls: `<input>` (text, number, date, time), `<textarea>`, `<select>`",
245
+ "ext": ["vue"],
246
+ "probes": [
247
+ {
248
+ "find": "<(textarea|select)[\\s>]"
249
+ },
250
+ {
251
+ "find": "<input\\b",
252
+ "notInLine": "type=.(hidden|radio|checkbox|file)."
253
+ }
254
+ ],
255
+ "use": "BbTextInput / BbNumberInput / BbDatePickerInput / BbTimePickerInput / BbTextarea / BbSelect",
256
+ "example": "<BbTextInput v-model=\"name\" label=\"Name\" />",
257
+ "note": "The field brings the label, the hint, errors, `required` and the BbForm wiring."
258
+ },
259
+ {
260
+ "id": "raw-button",
261
+ "pattern": "A raw `<button>`: an icon button, a remove ✕, an add-row button, a pill you click",
262
+ "ext": ["vue"],
263
+ "probes": [
264
+ {
265
+ "find": "<button[\\s>]"
266
+ }
267
+ ],
268
+ "use": "BbButton (a styled action) / BbBaseButton (your own look)",
269
+ "example": "<BbButton variant=\"ghost\" prepend:icon=\"lucide:plus\">Add row</BbButton>",
270
+ "note": "BbBaseButton keeps your markup and adds the cursor, the focus ring, `disabled` and links (`href`, Inertia visits). A raw button also loses the pointer cursor under Tailwind 4 without the library reset."
271
+ },
272
+ {
273
+ "id": "progress",
274
+ "pattern": "A hand-built progress bar: a raw `<progress>` or `role=\"progressbar\"`",
275
+ "ext": ["vue"],
276
+ "probes": [
277
+ {
278
+ "find": "<progress[\\s>]|role=.progressbar."
279
+ }
280
+ ],
281
+ "use": "BbProgress",
282
+ "example": "<BbProgress label=\"Upload\" :model-value=\"40\" />",
283
+ "note": "A decorative bar with the numbers in text beside it can stay `aria-hidden` markup."
284
+ },
285
+ {
286
+ "id": "avatar",
287
+ "pattern": "An app avatar: an `InitialsAvatar` / `Avatar` component of your own, or initials computed for a round plate",
288
+ "ext": ["vue"],
289
+ "probes": [
290
+ {
291
+ "find": "<(Initials|User)?Avatar[\\s/>]|getInitials\\("
292
+ }
293
+ ],
294
+ "use": "BbAvatar",
295
+ "example": "<BbAvatar size=\"40\" alt=\"Grace Hopper\">GH</BbAvatar>",
296
+ "note": "Circle only. The image, its load error and the icon fallback come with it."
297
+ },
298
+ {
299
+ "id": "adaptive-false",
300
+ "pattern": "`adaptive: false` (plugin) or `:adaptive=\"false\"` (one component): the temporary crutch from the migration",
301
+ "ext": ["vue", "ts", "js", "mjs"],
302
+ "probes": [
303
+ {
304
+ "find": "adaptive:\\s*false|:adaptive=.false."
305
+ }
306
+ ],
307
+ "use": "Remove it in the adaptive phase (below)",
308
+ "example": "bitbossUi({ iconDir: 'resources/icons' })",
309
+ "note": "Keep it only on a surface that must never become a sheet, and say why in a comment."
310
+ }
311
+ ]
312
+ }
@@ -106,6 +106,19 @@ export interface NoUnknownAttributesOptions {
106
106
  allowAttributes?: string[];
107
107
  /** Component names to skip entirely. */
108
108
  allowComponents?: string[];
109
+ /**
110
+ * The app's own variant names per build-plugin option
111
+ * (`{ dropdownItemVariants: ['warning'] }`), so a `:pt` key like
112
+ * `'item:warning'` is a state, not a typo. Read from the project's Vite
113
+ * config when left out.
114
+ */
115
+ registeredVariants?: Record<string, string[]>;
116
+ /**
117
+ * Whether the app turns Vue's Options API off: then an app's own variant
118
+ * is no `pt:<part>:<name>` attribute (mixins do not merge). Read from the
119
+ * project's config when left out.
120
+ */
121
+ optionsApiOff?: boolean;
109
122
  }
110
123
 
111
124
  declare const plugin: ESLint.Plugin & {
@@ -104,10 +104,39 @@ import {
104
104
  NAV_ATTRS,
105
105
  unknownComponentFinding,
106
106
  PARTNER_PROP_PAIRS,
107
+ REGISTERED_VARIANT_OPTIONS,
107
108
  toCamel,
108
109
  keyedSlotLookup,
109
110
  scriptSetupArrayConsts,
110
111
  } from './validate-bb-markup.mjs';
112
+ import {
113
+ readOptionsApiOff,
114
+ readRegisteredVariants,
115
+ } from './project-variant-dts.mjs';
116
+
117
+ /**
118
+ * The project's registered variant names per plugin option (Q76.7), read from
119
+ * its Vite config once per project root: a `:pt` key naming an app's own
120
+ * variant is a real state, not a typo.
121
+ */
122
+ const registeredVariantsByRoot = new Map();
123
+ const registeredVariantsFor = (root) => {
124
+ if (!root) return {};
125
+ let found = registeredVariantsByRoot.get(root);
126
+ if (!found) {
127
+ found = readRegisteredVariants(root, REGISTERED_VARIANT_OPTIONS);
128
+ registeredVariantsByRoot.set(root, found);
129
+ }
130
+ return found;
131
+ };
132
+ /** Whether the project's build config turns the Options API off (no mixin props), per root. */
133
+ const optionsApiOffByRoot = new Map();
134
+ const optionsApiOffFor = (root) => {
135
+ if (!root) return false;
136
+ if (!optionsApiOffByRoot.has(root))
137
+ optionsApiOffByRoot.set(root, readOptionsApiOff(root));
138
+ return optionsApiOffByRoot.get(root);
139
+ };
111
140
  import {
112
141
  REACTIVE_V_MODEL_MESSAGE,
113
142
  reactiveConstNames,
@@ -147,7 +176,11 @@ import {
147
176
  ruleNamesIn,
148
177
  unregisteredRuleMessage,
149
178
  } from './rule-registry.mjs';
150
- import { matchNameStyle, planAttributeFix } from './migrate-fix.mjs';
179
+ import {
180
+ attrRemovalRange,
181
+ matchNameStyle,
182
+ planAttributeFix,
183
+ } from './migrate-fix.mjs';
151
184
  import {
152
185
  UNIMPORTED_MESSAGE,
153
186
  projectResolution,
@@ -338,6 +371,15 @@ const noUnknownAttributes = {
338
371
  allowAttributes: { type: 'array', items: { type: 'string' } },
339
372
  allowComponents: { type: 'array', items: { type: 'string' } },
340
373
  libraryImports: LIBRARY_IMPORTS_SCHEMA,
374
+ // The app's variant names per plugin option; read from the
375
+ // project's Vite config when left out.
376
+ registeredVariants: {
377
+ type: 'object',
378
+ additionalProperties: { type: 'array', items: { type: 'string' } },
379
+ },
380
+ // Whether the app turns Vue's Options API off; read from the
381
+ // project's config when left out.
382
+ optionsApiOff: { type: 'boolean' },
341
383
  },
342
384
  additionalProperties: false,
343
385
  },
@@ -366,6 +408,15 @@ const noUnknownAttributes = {
366
408
 
367
409
  const allowAttrs = new Set(options.allowAttributes ?? []);
368
410
  const allowComps = allowedComponentsFor(context, options);
411
+ const filename = context.filename ?? context.getFilename?.();
412
+ let registered;
413
+ const registeredVariants = () =>
414
+ (registered ??=
415
+ options.registeredVariants ??
416
+ registeredVariantsFor(filename ? projectRootFor(filename) : null));
417
+ const optionsApiOff = () =>
418
+ options.optionsApiOff ??
419
+ optionsApiOffFor(filename ? projectRootFor(filename) : null);
369
420
 
370
421
  /**
371
422
  * Which bitboss-ui entrypoint each local name came from. Unlike a
@@ -416,13 +467,10 @@ const noUnknownAttributes = {
416
467
 
417
468
  return (fixer) => {
418
469
  switch (plan.action) {
419
- case 'remove': {
420
- // Drop the attribute and one leading space so no gap remains.
421
- let [from] = attr.range;
422
- const [, end] = attr.range;
423
- if (from > 0 && /\s/.test(sourceCode.text[from - 1])) from -= 1;
424
- return fixer.removeRange([from, end]);
425
- }
470
+ case 'remove':
471
+ return fixer.removeRange(
472
+ attrRemovalRange(sourceCode.text, attr.range)
473
+ );
426
474
  case 'rename': {
427
475
  const styled = matchNameStyle(plan.to, originalName);
428
476
  const nameNode =
@@ -437,6 +485,11 @@ const noUnknownAttributes = {
437
485
  const styled = matchNameStyle(plan.to, originalName);
438
486
  return fixer.replaceText(attr, `:${styled}="${plan.expr}"`);
439
487
  }
488
+ case 'setBare':
489
+ return fixer.replaceText(
490
+ attr,
491
+ matchNameStyle(plan.to, originalName)
492
+ );
440
493
  default:
441
494
  return null;
442
495
  }
@@ -475,6 +528,8 @@ const noUnknownAttributes = {
475
528
  // Q54.4: every form control is form-aware wherever it comes from.
476
529
  const checker = createComponentChecker(surface, {
477
530
  includeValidated: true,
531
+ registeredVariants: registeredVariants(),
532
+ optionsApiOff: optionsApiOff(),
478
533
  });
479
534
  for (const attr of node.startTag.attributes) {
480
535
  // `v-model` / `:model-value` / `@update:model-value` on BbForm
@@ -526,7 +581,10 @@ const noUnknownAttributes = {
526
581
  ? prop.key.value
527
582
  : null;
528
583
  if (key === null) continue;
529
- const ptFinding = checker.checkPtKey(key);
584
+ const ptFinding = checker.checkPtKey(
585
+ key,
586
+ registeredVariants()
587
+ );
530
588
  if (!ptFinding) continue;
531
589
  // A renamed part (Q51.16) is rewritten in the key's
532
590
  // own spelling: bare stays bare when it can, a
@@ -1509,7 +1567,10 @@ const noReverseFalse = {
1509
1567
  },
1510
1568
  {
1511
1569
  desc: 'Remove it (control on the left, the v3 default)',
1512
- fix: (fixer) => fixer.remove(attr),
1570
+ fix: (fixer) =>
1571
+ fixer.removeRange(
1572
+ attrRemovalRange(sourceCode.text, attr.range)
1573
+ ),
1513
1574
  },
1514
1575
  ],
1515
1576
  });
@@ -1546,7 +1607,10 @@ const noReverseFalse = {
1546
1607
  },
1547
1608
  {
1548
1609
  desc: 'Control on the left: remove the prop (it is the default)',
1549
- fix: (fixer) => fixer.remove(attr),
1610
+ fix: (fixer) =>
1611
+ fixer.removeRange(
1612
+ attrRemovalRange(sourceCode.text, attr.range)
1613
+ ),
1550
1614
  },
1551
1615
  ],
1552
1616
  });
@@ -152,6 +152,21 @@ export function loadContext({ cwd, packageRoot, command }) {
152
152
  };
153
153
  }
154
154
 
155
+ /** An installed package's package.json, walking up from `root`; null if none. */
156
+ function readInstalledJson(root, name) {
157
+ for (let dir = root; ; dir = dirname(dir)) {
158
+ const path = join(dir, 'node_modules', name, 'package.json');
159
+ if (existsSync(path)) {
160
+ try {
161
+ return JSON.parse(readFileSync(path, 'utf-8'));
162
+ } catch {
163
+ return null;
164
+ }
165
+ }
166
+ if (dirname(dir) === dir) return null;
167
+ }
168
+ }
169
+
155
170
  /** The first `node_modules/bitboss-ui` walking up from `root` (directory walk-up, like Node's resolution). */
156
171
  function findInstalled(root) {
157
172
  let dir = root;
@@ -749,10 +764,19 @@ function missingPackages(ctx, names) {
749
764
  const missing = (set) => [...set].filter((p) => !ctx.declared.has(p)).sort();
750
765
  const run = missing(runtime);
751
766
  const dev = missing(types);
767
+ // `@inertiajs/core` types must be the core the app's `@inertiajs/vue3`
768
+ // runs on: a bare `-D @inertiajs/core` installs the newest one, and two
769
+ // cores' Visit types do not match (strict apps fail to type-check).
770
+ const spec = (p) => {
771
+ const pinned =
772
+ p === '@inertiajs/core' &&
773
+ readInstalledJson(ctx.root, '@inertiajs/vue3')?.dependencies?.[p];
774
+ return pinned ? `${p}@${pinned}` : p;
775
+ };
752
776
  const verb = { npm: 'i', pnpm: 'add', yarn: 'add', bun: 'add' }[ctx.pm];
753
777
  const install = [
754
- ...(run.length ? [`${ctx.pm} ${verb} ${run.join(' ')}`] : []),
755
- ...(dev.length ? [`${ctx.pm} ${verb} -D ${dev.join(' ')}`] : []),
778
+ ...(run.length ? [`${ctx.pm} ${verb} ${run.map(spec).join(' ')}`] : []),
779
+ ...(dev.length ? [`${ctx.pm} ${verb} -D ${dev.map(spec).join(' ')}`] : []),
756
780
  ];
757
781
  return { missing: [...run, ...dev], install };
758
782
  }