bitboss-ui 3.0.0-beta.48 → 3.0.0-beta.49

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 (356) hide show
  1. package/README.md +24 -7
  2. package/bin/bitboss-ui-mcp.mjs +15 -3
  3. package/bin/bitboss-ui.mjs +115 -13
  4. package/dist/ai/BbAvatar.md +1 -1
  5. package/dist/ai/BbBreadcrumbs.md +65 -65
  6. package/dist/ai/BbButton.md +16 -5
  7. package/dist/ai/BbCheckbox.md +0 -2
  8. package/dist/ai/BbCheckboxGroup.md +13 -20
  9. package/dist/ai/BbDatePickerInput.md +4 -2
  10. package/dist/ai/BbDialog.md +1 -8
  11. package/dist/ai/BbDropdown.md +231 -220
  12. package/dist/ai/BbDropdownButton.md +65 -65
  13. package/dist/ai/BbDropdownGroup.md +2 -2
  14. package/dist/ai/BbDropzone.md +10 -10
  15. package/dist/ai/BbForm.md +43 -52
  16. package/dist/ai/BbHoverCard.md +4 -2
  17. package/dist/ai/BbNumberInput.md +88 -21
  18. package/dist/ai/BbPopover.md +29 -23
  19. package/dist/ai/BbProgress.md +48 -22
  20. package/dist/ai/BbRadioGroup.md +13 -19
  21. package/dist/ai/BbSelect.md +16 -36
  22. package/dist/ai/BbSelectPopover.md +14 -30
  23. package/dist/ai/BbSmoothHeight.md +0 -2
  24. package/dist/ai/BbSwitchGroup.md +13 -20
  25. package/dist/ai/BbTable.md +11 -10
  26. package/dist/ai/BbTabs.md +106 -105
  27. package/dist/ai/BbTabsList.md +2 -2
  28. package/dist/ai/BbTabsPanels.md +1 -1
  29. package/dist/ai/BbTabsRoot.md +2 -2
  30. package/dist/ai/BbTooltip.md +24 -10
  31. package/dist/ai/BbTree.md +14 -11
  32. package/dist/ai/changelog.json +256 -5
  33. package/dist/ai/components.json +36 -34
  34. package/dist/ai/composables/useBbDropdownContext.md +16 -16
  35. package/dist/ai/composables/useBbFormField.md +5 -1
  36. package/dist/ai/composables/useBbTabsContext.md +14 -14
  37. package/dist/ai/guides/agent-contract.md +27 -27
  38. package/dist/ai/guides/ai-router.md +1 -1
  39. package/dist/ai/guides/component-picker.md +3 -3
  40. package/dist/ai/guides/fetch-items-playbook.md +1 -1
  41. package/dist/ai/guides/icons-policy.md +10 -10
  42. package/dist/ai/guides/inertia-helpers.md +120 -67
  43. package/dist/ai/guides/installation-and-plugin-setup.md +43 -15
  44. package/dist/ai/guides/migration/components/bb-breadcrumbs.md +3 -2
  45. package/dist/ai/guides/migration/components/bb-checkbox-group.md +16 -16
  46. package/dist/ai/guides/migration/components/bb-dropdown-button.md +9 -8
  47. package/dist/ai/guides/migration/components/bb-dropdown.md +15 -14
  48. package/dist/ai/guides/migration/components/bb-radio-group.md +2 -1
  49. package/dist/ai/guides/migration/components/bb-select-popover.md +6 -1
  50. package/dist/ai/guides/migration/components/bb-select.md +10 -2
  51. package/dist/ai/guides/migration/components/bb-switch-group.md +2 -1
  52. package/dist/ai/guides/migration/components/bb-tabs.md +9 -8
  53. package/dist/ai/guides/migration/components/bb-tooltip.md +1 -1
  54. package/dist/ai/guides/migration/v2-to-v3.md +114 -17
  55. package/dist/ai/guides/migration/v3-beta-tooling.md +11 -0
  56. package/dist/ai/guides/options-items-playbook.md +30 -24
  57. package/dist/ai/guides/passthrough.md +2 -2
  58. package/dist/ai/guides/preset-components.md +18 -3
  59. package/dist/ai/guides/typescript-generic-components.md +1 -1
  60. package/dist/ai/guides/validated-forms.md +11 -22
  61. package/dist/ai/guides/validation-providers.md +4 -3
  62. package/dist/ai/helpers/inertia/manifest.json +636 -0
  63. package/dist/ai/helpers/inertia/types.ts +15 -0
  64. package/dist/ai/helpers/inertia/useAsyncFn.ts +110 -0
  65. package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +102 -0
  66. package/dist/ai/helpers/inertia/useDeleteCmd.ts +30 -0
  67. package/dist/ai/helpers/inertia/useHasChanged.ts +36 -0
  68. package/dist/ai/helpers/inertia/useIndexById.ts +23 -0
  69. package/dist/ai/helpers/inertia/useLazyProp.ts +148 -0
  70. package/dist/ai/helpers/inertia/useLazyPropGetter.ts +50 -0
  71. package/dist/ai/helpers/inertia/useLoading.ts +20 -0
  72. package/dist/ai/helpers/inertia/usePaginatedResponseContext.ts +88 -0
  73. package/dist/ai/helpers/inertia/usePromiseForm.ts +62 -0
  74. package/dist/ai/helpers/inertia/useProp.ts +63 -0
  75. package/dist/ai/helpers/inertia/useQuery.ts +19 -0
  76. package/dist/ai/helpers/inertia/useQueryObject.ts +116 -0
  77. package/dist/ai/helpers/inertia/useResourceContext.ts +69 -0
  78. package/dist/ai/helpers/inertia/useRouteQuery.ts +54 -0
  79. package/dist/ai/helpers/inertia/useScreenSizes.ts +23 -0
  80. package/dist/ai/helpers/inertia/useTableContext.ts +34 -0
  81. package/dist/ai/helpers/inertia/useTableSelectionContext.ts +48 -0
  82. package/dist/ai/helpers/inertia/useUntil.ts +33 -0
  83. package/dist/ai/helpers/inertia/utils.ts +24 -0
  84. package/dist/ai/index.md +6 -6
  85. package/dist/ai/manifest/components/BbBreadcrumbs.json +10 -6
  86. package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +1 -1
  87. package/dist/ai/manifest/components/BbButton.json +1 -1
  88. package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
  89. package/dist/ai/manifest/components/BbDropdown.json +23 -20
  90. package/dist/ai/manifest/components/BbDropdown.tree.json +2 -2
  91. package/dist/ai/manifest/components/BbDropdownButton.json +22 -19
  92. package/dist/ai/manifest/components/BbDropdownButton.tree.json +1 -1
  93. package/dist/ai/manifest/components/BbDropdownGroup.json +2 -2
  94. package/dist/ai/manifest/components/BbForm.json +1 -0
  95. package/dist/ai/manifest/components/BbNumberInput.json +6 -1
  96. package/dist/ai/manifest/components/BbNumberInput.tree.json +2 -1
  97. package/dist/ai/manifest/components/BbPopover.json +1 -0
  98. package/dist/ai/manifest/components/BbProgress.json +6 -6
  99. package/dist/ai/manifest/components/BbProgress.tree.json +1 -0
  100. package/dist/ai/manifest/components/BbRadioGroup.json +2 -2
  101. package/dist/ai/manifest/components/BbSelect.json +2 -2
  102. package/dist/ai/manifest/components/BbSelectPopover.json +2 -2
  103. package/dist/ai/manifest/components/BbSwitchGroup.json +2 -2
  104. package/dist/ai/manifest/components/BbTabs.json +7 -6
  105. package/dist/ai/manifest/components/BbTabsList.json +3 -3
  106. package/dist/ai/manifest/components/BbTabsPanels.json +1 -1
  107. package/dist/ai/manifest/components/BbTabsRoot.json +5 -4
  108. package/dist/ai/manifest/components/BbTooltip.json +1 -1
  109. package/dist/ai/manifest/index.json +2 -2
  110. package/dist/ai/manifest/meta.json +2 -0
  111. package/dist/ai/manifest/types.advanced.json +10 -9
  112. package/dist/ai/manifest/types.api.json +5 -4
  113. package/dist/ai/recipes/inertia/approvals-inbox.md +16 -18
  114. package/dist/ai/recipes/inertia/inline-edit-workspace.md +23 -33
  115. package/dist/ai/recipes/inertia/layout-scaffold.md +16 -16
  116. package/dist/ai/recipes/inertia/onboarding.md +6 -10
  117. package/dist/ai/recipes/inertia/ownership-atlas.md +15 -18
  118. package/dist/ai/recipes/inertia/record-form.md +11 -11
  119. package/dist/ai/recipes/inertia/records-workspace.md +38 -41
  120. package/dist/ai/recipes/inertia/settings-workspace.md +26 -38
  121. package/dist/ai/recipes/inertia/upload-center.md +31 -39
  122. package/dist/ai/recipes/inertia/wizard-form.md +10 -19
  123. package/dist/ai/recipes/nuxt/approvals-inbox.md +7 -8
  124. package/dist/ai/recipes/nuxt/inline-edit-workspace.md +14 -24
  125. package/dist/ai/recipes/nuxt/layout-scaffold.md +16 -16
  126. package/dist/ai/recipes/nuxt/onboarding.md +2 -6
  127. package/dist/ai/recipes/nuxt/ownership-atlas.md +7 -9
  128. package/dist/ai/recipes/nuxt/record-form.md +5 -5
  129. package/dist/ai/recipes/nuxt/records-workspace.md +29 -31
  130. package/dist/ai/recipes/nuxt/settings-workspace.md +22 -34
  131. package/dist/ai/recipes/nuxt/upload-center.md +22 -29
  132. package/dist/ai/recipes/nuxt/wizard-form.md +3 -11
  133. package/dist/ai/recipes/vue/approvals-inbox.md +7 -8
  134. package/dist/ai/recipes/vue/inline-edit-workspace.md +14 -24
  135. package/dist/ai/recipes/vue/layout-scaffold.md +16 -16
  136. package/dist/ai/recipes/vue/onboarding.md +2 -6
  137. package/dist/ai/recipes/vue/ownership-atlas.md +7 -9
  138. package/dist/ai/recipes/vue/record-form.md +5 -5
  139. package/dist/ai/recipes/vue/records-workspace.md +29 -31
  140. package/dist/ai/recipes/vue/settings-workspace.md +22 -34
  141. package/dist/ai/recipes/vue/upload-center.md +22 -29
  142. package/dist/ai/recipes/vue/wizard-form.md +3 -11
  143. package/dist/ai/source/BbAccordion.md +1 -1
  144. package/dist/ai/source/BbAlert.md +3 -3
  145. package/dist/ai/source/BbBadge.md +2 -2
  146. package/dist/ai/source/BbBadgeButton.md +5 -4
  147. package/dist/ai/source/BbBaseButton.md +1 -1
  148. package/dist/ai/source/BbBaseRadioIcon.md +1 -0
  149. package/dist/ai/source/BbBaseSwitchIcon.md +1 -0
  150. package/dist/ai/source/BbBreadcrumbs.md +63 -42
  151. package/dist/ai/source/BbButton.md +71 -33
  152. package/dist/ai/source/BbCalendar.md +17 -16
  153. package/dist/ai/source/BbCheckbox.md +3 -2
  154. package/dist/ai/source/BbCheckboxGroup.md +11 -4
  155. package/dist/ai/source/BbColorInput.md +10 -9
  156. package/dist/ai/source/BbConfirm.md +1 -1
  157. package/dist/ai/source/BbConfirmPortal.md +1 -1
  158. package/dist/ai/source/BbDatePicker.md +2 -2
  159. package/dist/ai/source/BbDatePickerInput.md +47 -20
  160. package/dist/ai/source/BbDialog.md +5 -5
  161. package/dist/ai/source/BbDropdown.md +230 -158
  162. package/dist/ai/source/BbDropdownButton.md +19 -12
  163. package/dist/ai/source/BbDropdownGroup.md +126 -93
  164. package/dist/ai/source/BbForm.md +25 -1
  165. package/dist/ai/source/BbIndicator.md +4 -0
  166. package/dist/ai/source/BbNumberInput.md +855 -19
  167. package/dist/ai/source/BbOffCanvas.md +27 -11
  168. package/dist/ai/source/BbPagination.md +3 -3
  169. package/dist/ai/source/BbPopover.md +152 -8
  170. package/dist/ai/source/BbPopoverPortal.md +11 -0
  171. package/dist/ai/source/BbProgress.md +82 -18
  172. package/dist/ai/source/BbRadioGroup.md +12 -5
  173. package/dist/ai/source/BbRating.md +11 -9
  174. package/dist/ai/source/BbSelect.md +16 -10
  175. package/dist/ai/source/BbSelectPopover.md +29 -23
  176. package/dist/ai/source/BbSlider.md +12 -6
  177. package/dist/ai/source/BbSwitch.md +3 -2
  178. package/dist/ai/source/BbSwitchGroup.md +5 -2
  179. package/dist/ai/source/BbTable.md +102 -18
  180. package/dist/ai/source/BbTabs.md +27 -23
  181. package/dist/ai/source/BbTabsList.md +26 -22
  182. package/dist/ai/source/BbTabsPanels.md +26 -22
  183. package/dist/ai/source/BbTabsRoot.md +25 -21
  184. package/dist/ai/source/BbTag.md +10 -9
  185. package/dist/ai/source/BbTextInput.md +5 -4
  186. package/dist/ai/source/BbTextarea.md +6 -5
  187. package/dist/ai/source/BbTimePicker.md +1 -1
  188. package/dist/ai/source/BbTimePickerInput.md +46 -9
  189. package/dist/ai/source/BbToast.md +10 -7
  190. package/dist/ai/source/BbToastPortal.md +10 -7
  191. package/dist/ai/source/BbTooltip.md +54 -8
  192. package/dist/ai/source/BbTree.md +21 -3
  193. package/dist/ai/source/CommonField.md +6 -4
  194. package/dist/ai/source/CommonFieldInput.md +15 -10
  195. package/dist/ai/source/CommonPopover.md +6 -0
  196. package/dist/ai/source/CommonTimeSelector.md +5 -4
  197. package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +10 -8
  198. package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +8 -8
  199. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +45 -45
  200. package/dist/components/BbBreadcrumbs/types.d.ts +25 -17
  201. package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +84 -71
  202. package/dist/components/BbButton/toggleRoving.d.ts +6 -0
  203. package/dist/components/BbButton/toggleRoving.js +45 -0
  204. package/dist/components/BbButton/types.d.ts +4 -1
  205. package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +178 -178
  206. package/dist/components/BbCalendar/CalendarMonthPanel.vue_vue_type_script_setup_true_lang.js +15 -15
  207. package/dist/components/BbCalendar/CalendarYearPanel.vue_vue_type_script_setup_true_lang.js +28 -28
  208. package/dist/components/BbCalendar/useCalendarGrid.js +141 -139
  209. package/dist/components/BbCalendar/useDayjsLocale.d.ts +38 -15
  210. package/dist/components/BbCalendar/useDayjsLocale.js +31 -30
  211. package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +48 -48
  212. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +81 -80
  213. package/dist/components/BbCheckboxGroup/types.d.ts +6 -2
  214. package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +69 -69
  215. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +363 -349
  216. package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +91 -86
  217. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +298 -289
  218. package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +322 -356
  219. package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +17 -15
  220. package/dist/components/BbDropdown/DropdownRow.vue.d.ts +40 -0
  221. package/dist/components/BbDropdown/DropdownRow.vue.js +5 -0
  222. package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +60 -0
  223. package/dist/components/BbDropdown/normalizeGroups.d.ts +8 -2
  224. package/dist/components/BbDropdown/normalizeGroups.js +60 -46
  225. package/dist/components/BbDropdown/types.d.ts +119 -88
  226. package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +11 -2
  227. package/dist/components/BbDropdownButton/types.d.ts +2 -2
  228. package/dist/components/BbForm/BbForm.vue.d.ts +9 -0
  229. package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +114 -105
  230. package/dist/components/BbForm/BbFormCustomField.js +1 -1
  231. package/dist/components/BbForm/bindFormField.js +2 -1
  232. package/dist/components/BbForm/formFields.d.ts +5 -0
  233. package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +0 -1
  234. package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +452 -125
  235. package/dist/components/BbNumberInput/numberDisplay.d.ts +256 -0
  236. package/dist/components/BbNumberInput/numberDisplay.js +499 -0
  237. package/dist/components/BbNumberInput/types.d.ts +54 -1
  238. package/dist/components/BbNumberInput/warroom/corpus.d.ts +58 -0
  239. package/dist/components/BbNumberInput/warroom/currency-verify.rows.d.ts +28 -0
  240. package/dist/components/BbNumberInput/warroom/currency.rows.d.ts +2 -0
  241. package/dist/components/BbNumberInput/warroom/harness.d.ts +217 -0
  242. package/dist/components/BbNumberInput/warroom/oracle.d.ts +150 -0
  243. package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +7 -7
  244. package/dist/components/BbPopover/BbPopover.vue.d.ts +1 -0
  245. package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +207 -164
  246. package/dist/components/BbPopover/types.d.ts +11 -0
  247. package/dist/components/BbProgress/BbProgress.vue_vue_type_script_setup_true_lang.js +15 -7
  248. package/dist/components/BbProgress/types.d.ts +23 -7
  249. package/dist/components/BbProgress/types.js +1 -1
  250. package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +102 -101
  251. package/dist/components/BbRadioGroup/types.d.ts +6 -2
  252. package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +63 -63
  253. package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +156 -154
  254. package/dist/components/BbSelect/types.d.ts +6 -2
  255. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +2 -1
  256. package/dist/components/BbSelectPopover/types.d.ts +6 -2
  257. package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +153 -153
  258. package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +62 -62
  259. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +131 -130
  260. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +711 -676
  261. package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +1 -1
  262. package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +1 -1
  263. package/dist/components/BbTabs/types.d.ts +25 -21
  264. package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +76 -76
  265. package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +58 -58
  266. package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +82 -82
  267. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +246 -236
  268. package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +102 -97
  269. package/dist/components/BbTooltip/tooltipWarmup.d.ts +23 -0
  270. package/dist/components/BbTooltip/tooltipWarmup.js +7 -0
  271. package/dist/components/BbTooltip/types.d.ts +7 -2
  272. package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +29 -21
  273. package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +10 -7
  274. package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +37 -36
  275. package/dist/components/CommonTimeSelector/CommonTimeSelector.vue_vue_type_script_setup_true_lang.js +9 -9
  276. package/dist/composables/formSubmitLock.d.ts +6 -0
  277. package/dist/composables/formSubmitLock.js +4 -0
  278. package/dist/composables/useBaseOptions.d.ts +7 -1
  279. package/dist/composables/useBaseOptions.js +32 -32
  280. package/dist/composables/useBbDropdownContext.d.ts +8 -8
  281. package/dist/composables/useBbFormField.d.ts +9 -0
  282. package/dist/composables/useBbFormField.js +5 -3
  283. package/dist/composables/useBbTabsContext.d.ts +10 -10
  284. package/dist/composables/useBbTabsContext.js +18 -18
  285. package/dist/composables/useFormBinding.d.ts +11 -0
  286. package/dist/composables/useFormBinding.js +15 -13
  287. package/dist/composables/useItemText.d.ts +5 -1
  288. package/dist/composables/useItemText.js +8 -3
  289. package/dist/composables/useItemValue.d.ts +5 -1
  290. package/dist/composables/useItemValue.js +8 -3
  291. package/dist/composables/useLocale.js +10 -9
  292. package/dist/deprecation/ai-deprecations.json.d.ts +130 -0
  293. package/dist/deprecation/ai-deprecations.json.js +1 -1
  294. package/dist/deprecation/removedProps.js +1 -1
  295. package/dist/directives/bbDropdown.js +1 -1
  296. package/dist/i18n/index.d.ts +7 -12
  297. package/dist/i18n/locales/cs.json +11 -14
  298. package/dist/i18n/locales/da.json +13 -16
  299. package/dist/i18n/locales/de-CH.json +137 -0
  300. package/dist/i18n/locales/de.json +14 -17
  301. package/dist/i18n/locales/el.json +10 -13
  302. package/dist/i18n/locales/en-GB.json +137 -0
  303. package/dist/i18n/locales/en.json +8 -11
  304. package/dist/i18n/locales/es-MX.json +137 -0
  305. package/dist/i18n/locales/es.json +16 -19
  306. package/dist/i18n/locales/fi.json +8 -11
  307. package/dist/i18n/locales/fr.json +23 -26
  308. package/dist/i18n/locales/hu.json +8 -11
  309. package/dist/i18n/locales/it.json +12 -15
  310. package/dist/i18n/locales/ja.json +13 -16
  311. package/dist/i18n/locales/ko.json +10 -13
  312. package/dist/i18n/locales/nb.json +13 -16
  313. package/dist/i18n/locales/nl.json +21 -24
  314. package/dist/i18n/locales/pl.json +10 -13
  315. package/dist/i18n/locales/{pt.json → pt-BR.json} +19 -22
  316. package/dist/i18n/locales/pt-PT.json +137 -0
  317. package/dist/i18n/locales/ro.json +22 -25
  318. package/dist/i18n/locales/ru.json +11 -14
  319. package/dist/i18n/locales/sv.json +16 -19
  320. package/dist/i18n/locales/tr.json +14 -17
  321. package/dist/i18n/locales/uk.json +11 -14
  322. package/dist/i18n/locales/{zh-cn.json → zh-CN.json} +10 -13
  323. package/dist/i18n/locales/zh-HK.json +137 -0
  324. package/dist/i18n/locales/zh-TW.json +137 -0
  325. package/dist/i18n/regionHints.d.ts +16 -0
  326. package/dist/i18n/regionHints.js +49 -0
  327. package/dist/i18n/regions.d.ts +286 -0
  328. package/dist/i18n/regions.js +265 -0
  329. package/dist/index.d.ts +1 -1
  330. package/dist/index.js +4 -4
  331. package/dist/llms-full.txt +1785 -1637
  332. package/dist/llms-medium.txt +74 -46
  333. package/dist/llms.txt +7 -7
  334. package/dist/locale-blueprint.json +16 -13
  335. package/dist/styles.css +2 -2
  336. package/dist/types/ptComponentMap.d.ts +1 -1
  337. package/dist/utilities/functions/slotKey.d.ts +2 -2
  338. package/dist/utils/versionCheck.js +1 -1
  339. package/dist/vite-plugin.d.ts +22 -19
  340. package/dist/vite.js +309 -297
  341. package/llms.txt +7 -7
  342. package/package.json +5 -3
  343. package/scripts/lib/agent-manifest.mjs +2 -1
  344. package/scripts/lib/eslint-disable.mjs +12 -4
  345. package/scripts/lib/eslint-plugin.d.ts +5 -1
  346. package/scripts/lib/eslint-plugin.mjs +187 -6
  347. package/scripts/lib/helper-canon.mjs +176 -0
  348. package/scripts/lib/helpers-add.mjs +1303 -0
  349. package/scripts/lib/local-components.mjs +33 -4
  350. package/scripts/lib/locale-check.mjs +165 -0
  351. package/scripts/lib/redundant-item-accessor.mjs +398 -0
  352. package/scripts/lib/renamed-item-field.mjs +343 -0
  353. package/scripts/lib/slot-key.mjs +2 -2
  354. package/scripts/lib/slot-renames.mjs +1 -1
  355. package/scripts/lib/validate-bb-markup.mjs +123 -56
  356. package/dist/i18n/index.js +0 -27
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 (~5.8 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 (~5.9 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) — 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.
@@ -35,18 +35,18 @@ Note: the `dist/` paths below resolve inside the installed npm package (`node_mo
35
35
  - [Migration v2→v3: BbAlert](dist/ai/guides/migration/components/bb-alert.md): showClose inverted to hideClose, theme replaced by typed variant.
36
36
  - [Migration v2→v3: BbAvatar](dist/ai/guides/migration/components/bb-avatar.md): The color prop is removed — retheme the fallback through the --bg / --fg locals.
37
37
  - [Migration v2→v3: BbBadge (and where your v2 badges went)](dist/ai/guides/migration/components/bb-badge.md): The v2 BbBadge (floating count/dot) is now BbIndicator; the v3 BbBadge is a new inline pill that also replaces BbChip.
38
- - [Migration v2→v3: BbBreadcrumbs](dist/ai/guides/migration/components/bb-breadcrumbs.md): Item keys must be strings, the text divider prop is gone, per-item slot names are normalized.
38
+ - [Migration v2→v3: BbBreadcrumbs](dist/ai/guides/migration/components/bb-breadcrumbs.md): Items are { label, value } (were { key, text }), the text divider prop is gone, per-item slot names are normalized.
39
39
  - [Migration v2→v3: BbButton](dist/ai/guides/migration/components/bb-button.md): Async click handlers now auto-track loading (behavior flip), built-in tooltip props removed, variant locked to the registry. Leftover v2 --border-color on .bb-button* still paints.
40
40
  - [Migration v2→v3: BbCheckbox / BbRadio / BbSwitch](dist/ai/guides/migration/components/bb-checkbox.md): reverse polarity inverted (explicit values flip, default layout unchanged), checked narrowed to boolean, color removed, BbRadio's name no longer required.
41
- - [Migration v2→v3: BbCheckboxGroup / BbRadioGroup / BbSwitchGroup](dist/ai/guides/migration/components/bb-checkbox-group.md): labelPosition renamed legendPosition, per-item disabled is now inert (use selectable), color and the option affix slots removed, BbRadioGroup's name no longer required, the shared bb-cr-container CSS block split into one per group, and the --bb-checkbox-* / --bb-radio-* / --bb-switch-* globals replaced by glyph locals.
41
+ - [Migration v2→v3: BbCheckboxGroup / BbRadioGroup / BbSwitchGroup](dist/ai/guides/migration/components/bb-checkbox-group.md): labelPosition renamed legendPosition, per-item disabled is now inert (use selectable), color and the option affix slots removed, BbRadioGroup's name no longer required, the shared bb-cr-container CSS block split into one per group, and the --bb-checkbox-* / --bb-radio-* / --bb-switch-* globals replaced by glyph locals, and object items now read their own label / value by default.
42
42
  - [Migration v2→v3: BbChip (removed)](dist/ai/guides/migration/components/bb-chip.md): BbChip is gone — BbBadge with clearable is the replacement; non-clearable chips were badges all along.
43
43
  - [Migration v2→v3: BbCollapsible](dist/ai/guides/migration/components/bb-collapsible.md): `tag` narrows to `'span' | 'div'` and defaults to `span`; the inner element mirrors it.
44
44
  - [Migration v2→v3: BbColorInput](dist/ai/guides/migration/components/bb-color-input.md): picker renamed to eyeDropper.
45
45
  - [Migration v2→v3: BbColorPalette](dist/ai/guides/migration/components/bb-color-palette.md): flip inverted to disableFlip, showArrow removed, picker renamed eyeDropper, update:open dropped, model updates never emit null.
46
46
  - [Migration v2→v3: BbDatePickerInput](dist/ai/guides/migration/components/bb-date-picker-input.md): allowWriting inverted to disableWriting and hidePopover renamed to disableCalendar, both with a changed token set; the width prop is removed; adaptive mobile sheet by default; non-floating output carries the local offset instead of UTC `Z` (new `utc` prop restores v2 output).
47
47
  - [Migration v2→v3: BbDialog](dist/ai/guides/migration/components/bb-dialog.md): showClose inverted to hideClose, #close removed (description restored in beta.19), default widths changed, adaptive bottom sheet on mobile by default, --bb-dialog-* tokens replaced by --bb-panel-p plus locals.
48
- - [Migration v2→v3: BbDropdown](dist/ai/guides/migration/components/bb-dropdown.md): Items now expect text as the label and can carry variants/submenus; arrowPadding removed; adaptive mobile sheet on by default.
49
- - [Migration v2→v3: BbDropdownButton](dist/ai/guides/migration/components/bb-dropdown-button.md): autoLoading renamed to disableAutoLoading, disabledWhileLoading and theme removed.
48
+ - [Migration v2→v3: BbDropdown](dist/ai/guides/migration/components/bb-dropdown.md): Rows are { label, value } (v2 and v3 up to beta.48 { key, text }), groups are named by id; rows can carry variants/submenus; arrowPadding removed; adaptive mobile sheet on by default.
49
+ - [Migration v2→v3: BbDropdownButton](dist/ai/guides/migration/components/bb-dropdown-button.md): autoLoading renamed to disableAutoLoading, disabledWhileLoading and theme removed; items are { label, value } rows like BbDropdown's.
50
50
  - [Migration v2→v3: BbDropzone](dist/ai/guides/migration/components/bb-dropzone.md): modelValue is typed, accept no longer throws and takes bare tokens, and the hidden native-submit input only renders when name is set.
51
51
  - [Migration v2→v3: BbIcon](dist/ai/guides/migration/components/bb-icon.md): The required prop is renamed type→icon, color is removed, and the xxl size key becomes 2xl.
52
52
  - [Migration v2→v3: BbIntersection](dist/ai/guides/migration/components/bb-intersection.md): Removed with no replacement — it wrapped IntersectionObserver and carried no styling; use @vueuse/core's useIntersectionObserver.
@@ -55,14 +55,14 @@ Note: the `dist/` paths below resolve inside the installed npm package (`node_mo
55
55
  - [Migration v2→v3: BbPopover](dist/ai/guides/migration/components/bb-popover.md): Built-in close button, restoreFocus, theme, and the arrow are gone; close affordances move into your content.
56
56
  - [Migration v2→v3: BbRadioGroup](dist/ai/guides/migration/components/bb-radio-group.md): Shares its migration with BbCheckboxGroup — see bb-checkbox-group.md.
57
57
  - [Migration v2→v3: BbRating](dist/ai/guides/migration/components/bb-rating.md): color removed; name no longer required; the star classes moved from .bb-base-rating to the .bb-rating block (--highlighted became --filled/--empty); --bb-rating-size demoted to a local --size on .bb-rating__stars; input-position finally works.
58
- - [Migration v2→v3: BbSelect](dist/ai/guides/migration/components/bb-select.md): allowWriting inverted to disableWriting, filterBy narrowed to string[], prefill value renamed, chevron/options slots removed, and two behavior changes (second click, mount-time coherence).
58
+ - [Migration v2→v3: BbSelect](dist/ai/guides/migration/components/bb-select.md): allowWriting inverted to disableWriting, filterBy narrowed to string[], prefill value renamed, chevron/options slots removed, and three behavior changes (second click, mount-time coherence, object items read their own label / value).
59
59
  - [Migration v2→v3: BbSelectPopover](dist/ai/guides/migration/components/bb-select-popover.md): flip and allowWriting inverted, arrow props removed, filterBy narrowed, options slots replaced by header/footer; shares BbSelect's behavior changes.
60
60
  - [Migration v2→v3: BbSlider](dist/ai/guides/migration/components/bb-slider.md): thumbTranslate inverted to disableThumbTranslate; string model values and color removed.
61
61
  - [Migration v2→v3: BbSmoothHeight](dist/ai/guides/migration/components/bb-smooth-height.md): The `tag` prop is narrowed to `div | span`, and the inner measuring element now mirrors it instead of always being a `<div>`.
62
62
  - [Migration v2→v3: BbSpinner](dist/ai/guides/migration/components/bb-spinner.md): The color prop is removed; spinners follow currentColor.
63
63
  - [Migration v2→v3: BbSwitchGroup](dist/ai/guides/migration/components/bb-switch-group.md): Shares its migration with BbCheckboxGroup — see bb-checkbox-group.md.
64
64
  - [Migration v2→v3: BbTable](dist/ai/guides/migration/components/bb-table.md): The table renders as a CSS grid of divs with ARIA roles, not a <table> — every element selector (table/thead/tbody/tr/th/td) under .bb-table matches nothing, #thead/#tbody/#tfoot take role-complete div rows, --fill/--natural-width are gone, column widths drift within documented bounds, copy-to-spreadsheet and print header repetition degrade; allowSelectAll inverted to disableSelectAll; loading no longer blanks populated tables and now inerts rows; #loading is first-load-only; #empty fills a full-width cell instead of replacing the row; row events drop the selected argument; columns gained sortable + rowClass, which collide with same-named consumer fields.
65
- - [Migration v2→v3: BbTabs (was BbTab)](dist/ai/guides/migration/components/bb-tabs.md): Component renamed; querykey→queryKey; animations default on; label slots renamed, header:* slots → wrapper:*, and all dynamic names/URL slugs normalized; the entire .bb-tab BEM tree renamed to .bb-tabs / .bb-tabs-list / .bb-tabs-panels.
65
+ - [Migration v2→v3: BbTabs (was BbTab)](dist/ai/guides/migration/components/bb-tabs.md): Component renamed; item key→value (v-model carries it); querykey→queryKey; animations default on; label slots renamed, header:* slots → wrapper:*, and all dynamic names/URL slugs normalized; the entire .bb-tab BEM tree renamed to .bb-tabs / .bb-tabs-list / .bb-tabs-panels.
66
66
  - [Migration v2→v3: BbTag](dist/ai/guides/migration/components/bb-tag.md): modelValue is strictly string[] now, multiple is removed, and duplicates are rejected case-insensitively by default.
67
67
  - [Migration v2→v3: BbTextInput](dist/ai/guides/migration/components/bb-text-input.md): The type prop narrows to the text-like input types — number/date values must move to their dedicated components; a bare `floating` attribute was never a prop, the spelling is label-mode="floating".
68
68
  - [Migration v2→v3: BbToast and toast()](dist/ai/guides/migration/components/bb-toast.md): Host placement becomes position with a corner-based value set; toast() options rewritten (variant, duration, actions, portal).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bitboss-ui",
3
- "version": "3.0.0-beta.48",
3
+ "version": "3.0.0-beta.49",
4
4
  "description": "Vue 3 component library by BitBoss: forms, selects, layout, overlays, and more.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -91,7 +91,7 @@
91
91
  "preview": "vite preview",
92
92
  "storybook": "storybook dev -p 6006",
93
93
  "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-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",
94
- "test:fixtures": "npm run build && 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",
94
+ "test:fixtures": "npm run build && 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",
95
95
  "test:fixtures:src": "npm run test:inertia && npm run test:vue && npm run test:nuxt",
96
96
  "test:inertia": "node scripts/invalidate-fixture-caches.mjs && node scripts/run-e2es.mjs fixtures/inertia/e2e",
97
97
  "test:inertia:dist": "npm run build && FIXTURE_TARGET=dist node scripts/run-e2es.mjs fixtures/inertia/e2e",
@@ -106,7 +106,8 @@
106
106
  "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",
107
107
  "test:ci": "npm run test:ci:node && npm run test:ci:browser && npm run test:ci:gates",
108
108
  "postpack": "npm pkg set \"scripts.prepare=node scripts/hooks-install.mjs\"",
109
- "test:ssr": "npm run build && node scripts/run-ssr-fixture.mjs"
109
+ "test:ssr": "npm run build && node scripts/run-ssr-fixture.mjs",
110
+ "helpers:record": "node scripts/helpers-record.mjs"
110
111
  },
111
112
  "dependencies": {
112
113
  "@floating-ui/vue": "^1.1.11",
@@ -234,6 +235,7 @@
234
235
  "!scripts/lib/__fixtures__",
235
236
  "!scripts/lib/fixture-library.mjs",
236
237
  "!scripts/lib/gate.mjs",
238
+ "!scripts/lib/inertia-helpers.mjs",
237
239
  "!scripts/lib/recipe-files.mjs",
238
240
  "!scripts/lib/vitest-retry.mjs"
239
241
  ],
@@ -207,7 +207,8 @@ export function renamedFrom(removed) {
207
207
  r.new &&
208
208
  r.surface !== 'event' &&
209
209
  r.surface !== 'method' &&
210
- r.surface !== 'option'
210
+ r.surface !== 'option' &&
211
+ r.surface !== 'item'
211
212
  )
212
213
  .map((r) => ({
213
214
  from: r.name,
@@ -53,13 +53,21 @@ export function ruleForFinding(finding) {
53
53
  return 'items-provider-context';
54
54
  case 'single-reason':
55
55
  return 'items-provider-reason';
56
+ case 'redundant-item-accessor':
57
+ return 'no-redundant-item-accessor';
58
+ case 'renamed-item-field':
59
+ return 'no-renamed-item-field';
56
60
  // The check-only kinds below have no ESLint twin, so the partner-prop
57
- // rule's name silences them: object items want their `item-text`
58
- // partner; a dropdown row needs its key, or keyless rows collide.
61
+ // rule's name silences them: object items with neither `label` nor
62
+ // `text` want their `item-text` partner; a dropdown row in a selectable
63
+ // group needs its `value`, a selectable group its `id`, and rows
64
+ // without a `value` that share a label collide. (`missing-key` /
65
+ // `duplicate-row-text` were these kinds' names before 3.0.0-beta.49.)
59
66
  case 'missing-partner-prop':
60
67
  case 'object-items-without-text':
61
- case 'missing-key':
62
- case 'duplicate-row-text':
68
+ case 'missing-value':
69
+ case 'missing-id':
70
+ case 'duplicate-row-label':
63
71
  return 'require-partner-prop';
64
72
  // check-only: a CSS local the library removed; an import of the
65
73
  // package's build files or of its unexported pt types.
@@ -43,7 +43,9 @@ export type BitbossUiRuleName =
43
43
  | 'text-null-value'
44
44
  | 'form-model'
45
45
  | 'items-provider-context'
46
- | 'items-provider-reason';
46
+ | 'items-provider-reason'
47
+ | 'no-redundant-item-accessor'
48
+ | 'no-renamed-item-field';
47
49
 
48
50
  /** Options accepted by `bitboss-ui/no-unknown-token`. */
49
51
  export interface NoUnknownTokenOptions {
@@ -133,6 +135,8 @@ export const textNullValue: Rule.RuleModule;
133
135
  export const formModel: Rule.RuleModule;
134
136
  export const itemsProviderContext: Rule.RuleModule;
135
137
  export const itemsProviderReason: Rule.RuleModule;
138
+ export const noRedundantItemAccessor: Rule.RuleModule;
139
+ export const noRenamedItemField: Rule.RuleModule;
136
140
 
137
141
  /**
138
142
  * Resolves the optional `@typescript-eslint/parser` peer, or `null` when it is
@@ -119,6 +119,8 @@ import {
119
119
  writableComputedNames,
120
120
  } from './form-v-model.mjs';
121
121
  import { libraryAliases, localBbImports } from './local-components.mjs';
122
+ import { redundantItemAccessorFindings } from './redundant-item-accessor.mjs';
123
+ import { renamedItemFieldFindings } from './renamed-item-field.mjs';
122
124
  import {
123
125
  TEXT_NULL_VALUE_MESSAGE,
124
126
  stringControlsFor,
@@ -151,6 +153,28 @@ import {
151
153
  topLevelBindings,
152
154
  } from './items-provider-context.mjs';
153
155
 
156
+ /**
157
+ * `libraryImports`: import-source prefixes that ARE the library, for the
158
+ * library's own repo, whose showcases import the source
159
+ * (`@/components/BbSelect/BbSelect.vue`). Without it those `Bb*` imports read
160
+ * as the app's own components and every rule skips them. Empty by default: a
161
+ * consumer's `Bb*` imports stay theirs (Q53.18). See `isLibrarySource`.
162
+ */
163
+ const LIBRARY_IMPORTS_SCHEMA = { type: 'array', items: { type: 'string' } };
164
+ const LIBRARY_ONLY_SCHEMA = [
165
+ {
166
+ type: 'object',
167
+ properties: { libraryImports: LIBRARY_IMPORTS_SCHEMA },
168
+ additionalProperties: false,
169
+ },
170
+ ];
171
+ /** The `isLibrarySource` input for this file. */
172
+ const libraryOf = (context) => ({
173
+ libraryImports: context.options[0]?.libraryImports ?? [],
174
+ filename: context.filename ?? context.getFilename(),
175
+ cwd: context.cwd ?? context.getCwd?.(),
176
+ });
177
+
154
178
  /**
155
179
  * The components a rule skips entirely: the configured `allowComponents`, plus
156
180
  * every `Bb*` name this file imports from a non-`bitboss-ui` path — the app's
@@ -160,7 +184,7 @@ const allowedComponentsFor = (context, options) => {
160
184
  const text = (context.sourceCode ?? context.getSourceCode()).text;
161
185
  return new Set([
162
186
  ...(options.allowComponents ?? []),
163
- ...localBbImports(text).keys(),
187
+ ...localBbImports(text, libraryOf(context)).keys(),
164
188
  // A library component under another name (`{ BbButton as BbSave }`):
165
189
  // `check` validates it as the real component; the rules skip it rather
166
190
  // than report the alias as unknown.
@@ -295,6 +319,7 @@ const noUnknownAttributes = {
295
319
  failClosed: { type: 'boolean' },
296
320
  allowAttributes: { type: 'array', items: { type: 'string' } },
297
321
  allowComponents: { type: 'array', items: { type: 'string' } },
322
+ libraryImports: LIBRARY_IMPORTS_SCHEMA,
298
323
  },
299
324
  additionalProperties: false,
300
325
  },
@@ -657,6 +682,7 @@ const requireTableSlotProp = {
657
682
  manifestPath: { type: 'string' },
658
683
  failClosed: { type: 'boolean' },
659
684
  allowComponents: { type: 'array', items: { type: 'string' } },
685
+ libraryImports: LIBRARY_IMPORTS_SCHEMA,
660
686
  },
661
687
  additionalProperties: false,
662
688
  },
@@ -763,6 +789,7 @@ const requirePartnerProp = {
763
789
  manifestPath: { type: 'string' },
764
790
  failClosed: { type: 'boolean' },
765
791
  allowComponents: { type: 'array', items: { type: 'string' } },
792
+ libraryImports: LIBRARY_IMPORTS_SCHEMA,
766
793
  },
767
794
  additionalProperties: false,
768
795
  },
@@ -854,6 +881,7 @@ const noUnknownSlots = {
854
881
  manifestPath: { type: 'string' },
855
882
  failClosed: { type: 'boolean' },
856
883
  allowComponents: { type: 'array', items: { type: 'string' } },
884
+ libraryImports: LIBRARY_IMPORTS_SCHEMA,
857
885
  allowSlots: { type: 'array', items: { type: 'string' } },
858
886
  },
859
887
  additionalProperties: false,
@@ -992,6 +1020,7 @@ const noActiveClassOnRootLink = {
992
1020
  manifestPath: { type: 'string' },
993
1021
  failClosed: { type: 'boolean' },
994
1022
  allowComponents: { type: 'array', items: { type: 'string' } },
1023
+ libraryImports: LIBRARY_IMPORTS_SCHEMA,
995
1024
  },
996
1025
  additionalProperties: false,
997
1026
  },
@@ -1101,6 +1130,7 @@ const noNavigationAttrFallthrough = {
1101
1130
  manifestPath: { type: 'string' },
1102
1131
  failClosed: { type: 'boolean' },
1103
1132
  allowComponents: { type: 'array', items: { type: 'string' } },
1133
+ libraryImports: LIBRARY_IMPORTS_SCHEMA,
1104
1134
  },
1105
1135
  additionalProperties: false,
1106
1136
  },
@@ -1197,6 +1227,7 @@ const noUnknownEvent = {
1197
1227
  manifestPath: { type: 'string' },
1198
1228
  failClosed: { type: 'boolean' },
1199
1229
  allowComponents: { type: 'array', items: { type: 'string' } },
1230
+ libraryImports: LIBRARY_IMPORTS_SCHEMA,
1200
1231
  allowEvents: { type: 'array', items: { type: 'string' } },
1201
1232
  },
1202
1233
  additionalProperties: false,
@@ -1295,6 +1326,7 @@ const noReverseFalse = {
1295
1326
  manifestPath: { type: 'string' },
1296
1327
  failClosed: { type: 'boolean' },
1297
1328
  allowComponents: { type: 'array', items: { type: 'string' } },
1329
+ libraryImports: LIBRARY_IMPORTS_SCHEMA,
1298
1330
  // Opt-in for a bulk v2→v3 sweep: turn the "control on the right"
1299
1331
  // rewrite into a real `--fix`. Off by default because the two
1300
1332
  // readings produce OPPOSITE layouts, and a v3-native codebase
@@ -1467,6 +1499,7 @@ const noStateTextColor = {
1467
1499
  manifestPath: { type: 'string' },
1468
1500
  failClosed: { type: 'boolean' },
1469
1501
  allowComponents: { type: 'array', items: { type: 'string' } },
1502
+ libraryImports: LIBRARY_IMPORTS_SCHEMA,
1470
1503
  },
1471
1504
  additionalProperties: false,
1472
1505
  },
@@ -1674,6 +1707,7 @@ const noStarColor = {
1674
1707
  manifestPath: { type: 'string' },
1675
1708
  failClosed: { type: 'boolean' },
1676
1709
  allowComponents: { type: 'array', items: { type: 'string' } },
1710
+ libraryImports: LIBRARY_IMPORTS_SCHEMA,
1677
1711
  },
1678
1712
  additionalProperties: false,
1679
1713
  },
@@ -1833,6 +1867,7 @@ const noBoxBorderColor = {
1833
1867
  manifestPath: { type: 'string' },
1834
1868
  failClosed: { type: 'boolean' },
1835
1869
  allowComponents: { type: 'array', items: { type: 'string' } },
1870
+ libraryImports: LIBRARY_IMPORTS_SCHEMA,
1836
1871
  },
1837
1872
  additionalProperties: false,
1838
1873
  },
@@ -2170,6 +2205,7 @@ const requireAccessibleName = {
2170
2205
  manifestPath: { type: 'string' },
2171
2206
  failClosed: { type: 'boolean' },
2172
2207
  allowComponents: { type: 'array', items: { type: 'string' } },
2208
+ libraryImports: LIBRARY_IMPORTS_SCHEMA,
2173
2209
  },
2174
2210
  additionalProperties: false,
2175
2211
  },
@@ -2381,6 +2417,7 @@ const noUnimportedComponent = {
2381
2417
  manifestPath: { type: 'string' },
2382
2418
  failClosed: { type: 'boolean' },
2383
2419
  allowComponents: { type: 'array', items: { type: 'string' } },
2420
+ libraryImports: LIBRARY_IMPORTS_SCHEMA,
2384
2421
  },
2385
2422
  additionalProperties: false,
2386
2423
  },
@@ -2495,7 +2532,7 @@ const textNullValue = {
2495
2532
  recommended: true,
2496
2533
  },
2497
2534
  messages: { stringRef: '{{message}}' },
2498
- schema: [],
2535
+ schema: LIBRARY_ONLY_SCHEMA,
2499
2536
  },
2500
2537
  create(context) {
2501
2538
  const sourceCode = context.sourceCode ?? context.getSourceCode();
@@ -2520,7 +2557,7 @@ const textNullValue = {
2520
2557
  });
2521
2558
  if (refs.size === 0) return {};
2522
2559
  const aliases = libraryAliases(sourceCode.text);
2523
- const own = localBbImports(sourceCode.text);
2560
+ const own = localBbImports(sourceCode.text, libraryOf(context));
2524
2561
  const filename = context.filename ?? context.getFilename();
2525
2562
  let stringControls;
2526
2563
  const fixed = new Set();
@@ -2708,7 +2745,7 @@ const itemsProviderVisitor = (context, onProvider) => {
2708
2745
  const services = sourceCode.parserServices;
2709
2746
  if (!services?.defineTemplateBodyVisitor) return {};
2710
2747
  const aliases = libraryAliases(sourceCode.text);
2711
- const own = localBbImports(sourceCode.text);
2748
+ const own = localBbImports(sourceCode.text, libraryOf(context));
2712
2749
  const bindings = topLevelBindings(sourceCode.ast.body);
2713
2750
  const seen = new Set();
2714
2751
  return services.defineTemplateBodyVisitor({
@@ -2766,7 +2803,7 @@ const itemsProviderContext = {
2766
2803
  recommended: true,
2767
2804
  },
2768
2805
  messages: { positional: '{{message}}' },
2769
- schema: [],
2806
+ schema: LIBRARY_ONLY_SCHEMA,
2770
2807
  },
2771
2808
  create(context) {
2772
2809
  return itemsProviderVisitor(
@@ -2810,7 +2847,7 @@ const itemsProviderReason = {
2810
2847
  recommended: true,
2811
2848
  },
2812
2849
  messages: { singleReason: '{{message}}' },
2813
- schema: [],
2850
+ schema: LIBRARY_ONLY_SCHEMA,
2814
2851
  },
2815
2852
  create(context) {
2816
2853
  return itemsProviderVisitor(context, ({ fn }) => {
@@ -2825,6 +2862,140 @@ const itemsProviderReason = {
2825
2862
  },
2826
2863
  };
2827
2864
 
2865
+ /**
2866
+ * Q60.24 — the twin of `check`'s `redundant-item-accessor` (a warning): an
2867
+ * accessor that names the field the option default already reads —
2868
+ * `item-text="label"` / `"text"`, `item-value="value"` (static or bound to a
2869
+ * string literal, kebab or camel) on BbSelect, BbSelectPopover, BbRadioGroup,
2870
+ * BbCheckboxGroup and BbSwitchGroup, and `itemText: 'label'` / `'text'` /
2871
+ * `itemValue: 'value'` in a BbDropdown / BbDropdownButton group. The fix
2872
+ * deletes it. Caveat: `item-text="text"` is NOT redundant when an item also
2873
+ * has `label` (the default would read `label`), so it is reported only when
2874
+ * every item is visible in the file and none has `label`; on items the file
2875
+ * cannot see only `item-text="label"` and `item-value="value"` are. A group
2876
+ * whose only mapper is the redundant one is left alone: without it the group
2877
+ * would turn hand-written.
2878
+ * @type {import('eslint').Rule.RuleModule}
2879
+ */
2880
+ const noRedundantItemAccessor = {
2881
+ meta: {
2882
+ type: 'suggestion',
2883
+ fixable: 'code',
2884
+ docs: {
2885
+ description:
2886
+ 'Remove an `item-text` / `item-value` (or a dropdown group\'s `itemText` / `itemValue`) that restates the default: options read their own `label`, else `text`, and their own `value`. `item-text="text"` is kept when an item also has `label`.',
2887
+ recommended: true,
2888
+ },
2889
+ messages: { redundant: '{{message}}' },
2890
+ schema: LIBRARY_ONLY_SCHEMA,
2891
+ },
2892
+ create(context) {
2893
+ const sourceCode = context.sourceCode ?? context.getSourceCode();
2894
+ if (!sourceCode.parserServices?.defineTemplateBodyVisitor) return {};
2895
+ return {
2896
+ 'Program:exit'() {
2897
+ const text = sourceCode.text;
2898
+ const findings = redundantItemAccessorFindings(text, {
2899
+ arrays: scriptSetupArrayConsts(text),
2900
+ library: libraryOf(context),
2901
+ });
2902
+ // Each finding carries its fix as a text edit. Neighbouring
2903
+ // deletions touch (`item-text="label" item-value="value"`), and
2904
+ // ESLint drops a fix that touches another: the first deletion of a
2905
+ // run carries one fix for the whole run. A rewrite (non-empty
2906
+ // text) is never merged.
2907
+ const ranged = findings
2908
+ .filter((finding) => finding.range)
2909
+ .sort((a, b) => (a.edit?.range[0] ?? 0) - (b.edit?.range[0] ?? 0));
2910
+ const fixFor = new Map();
2911
+ let run = null;
2912
+ for (const finding of ranged) {
2913
+ const edit = finding.edit;
2914
+ if (!edit) continue;
2915
+ if (
2916
+ edit.text === '' &&
2917
+ run?.text === '' &&
2918
+ edit.range[0] <= run.range[1]
2919
+ ) {
2920
+ run.range[1] = Math.max(run.range[1], edit.range[1]);
2921
+ continue;
2922
+ }
2923
+ run = { range: [...edit.range], text: edit.text };
2924
+ fixFor.set(finding, run);
2925
+ }
2926
+ for (const finding of ranged) {
2927
+ const own = fixFor.get(finding);
2928
+ context.report({
2929
+ loc: {
2930
+ start: sourceCode.getLocFromIndex(finding.range[0]),
2931
+ end: sourceCode.getLocFromIndex(finding.range[1]),
2932
+ },
2933
+ messageId: 'redundant',
2934
+ data: { message: finding.message },
2935
+ fix: own
2936
+ ? (fixer) => fixer.replaceTextRange(own.range, own.text)
2937
+ : undefined,
2938
+ });
2939
+ }
2940
+ },
2941
+ };
2942
+ },
2943
+ };
2944
+
2945
+ /**
2946
+ * Q64.2–Q64.5 — the twin of `check`'s `renamed-item-field`: an item field
2947
+ * spelled the pre-beta.49 way in an `items` array the file spells (inline or a
2948
+ * `<script setup>` const): BbDropdown / BbDropdownButton / `v-bb-dropdown`
2949
+ * rows `key` → `value`, `text` → `label`, groups `key` → `id`; BbTabs /
2950
+ * BbTabsRoot items `key` → `value`; BbBreadcrumbs items `key` → `value`,
2951
+ * `text` → `label`. The fix renames the property (`{ key }` becomes
2952
+ * `{ value: key }`); an object that already has the new field or spreads
2953
+ * another is reported without one. A mapped group's rows (app data) are never
2954
+ * touched.
2955
+ * @type {import('eslint').Rule.RuleModule}
2956
+ */
2957
+ const noRenamedItemField = {
2958
+ meta: {
2959
+ type: 'problem',
2960
+ fixable: 'code',
2961
+ docs: {
2962
+ description:
2963
+ 'Rename an item field the library renamed in 3.0.0-beta.49: dropdown rows and breadcrumbs `{ key, text }` → `{ value, label }`, dropdown groups `key` → `id`, tabs `key` → `value`.',
2964
+ recommended: true,
2965
+ },
2966
+ messages: { renamed: '{{message}}' },
2967
+ schema: LIBRARY_ONLY_SCHEMA,
2968
+ },
2969
+ create(context) {
2970
+ const sourceCode = context.sourceCode ?? context.getSourceCode();
2971
+ if (!sourceCode.parserServices?.defineTemplateBodyVisitor) return {};
2972
+ return {
2973
+ 'Program:exit'() {
2974
+ const text = sourceCode.text;
2975
+ const findings = renamedItemFieldFindings(text, {
2976
+ arrays: scriptSetupArrayConsts(text),
2977
+ library: libraryOf(context),
2978
+ });
2979
+ for (const finding of findings) {
2980
+ if (!finding.range) continue;
2981
+ const edit = finding.edit;
2982
+ context.report({
2983
+ loc: {
2984
+ start: sourceCode.getLocFromIndex(finding.range[0]),
2985
+ end: sourceCode.getLocFromIndex(finding.range[1]),
2986
+ },
2987
+ messageId: 'renamed',
2988
+ data: { message: finding.message },
2989
+ fix: edit
2990
+ ? (fixer) => fixer.replaceTextRange(edit.range, edit.text)
2991
+ : undefined,
2992
+ });
2993
+ }
2994
+ },
2995
+ };
2996
+ },
2997
+ };
2998
+
2828
2999
  const plugin = {
2829
3000
  meta: { name: 'bitboss-ui', version: PACKAGE_VERSION },
2830
3001
  rules: {
@@ -2850,6 +3021,8 @@ const plugin = {
2850
3021
  'form-model': formModel,
2851
3022
  'items-provider-context': itemsProviderContext,
2852
3023
  'items-provider-reason': itemsProviderReason,
3024
+ 'no-redundant-item-accessor': noRedundantItemAccessor,
3025
+ 'no-renamed-item-field': noRenamedItemField,
2853
3026
  },
2854
3027
  };
2855
3028
 
@@ -2952,6 +3125,12 @@ plugin.configs = {
2952
3125
  // `warn`: a single-cause check can be deliberate, but it usually
2953
3126
  // loses the selected labels on the causes it does not list.
2954
3127
  'bitboss-ui/items-provider-reason': 'warn',
3128
+ // Q60.24: `warn`, the markup works either way; the fix deletes
3129
+ // an accessor that restates the default.
3130
+ 'bitboss-ui/no-redundant-item-accessor': 'warn',
3131
+ // Q64.2–Q64.5: `error`, an item with the old field silently loses
3132
+ // its value, id or label; the fix is mechanical.
3133
+ 'bitboss-ui/no-renamed-item-field': 'error',
2955
3134
  },
2956
3135
  },
2957
3136
  ],
@@ -2980,5 +3159,7 @@ export {
2980
3159
  formModel,
2981
3160
  itemsProviderContext,
2982
3161
  itemsProviderReason,
3162
+ noRedundantItemAccessor,
3163
+ noRenamedItemField,
2983
3164
  resolveOptionalTsParser,
2984
3165
  };