bitboss-ui 3.0.0-beta.73 → 3.0.0-beta.75

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 (345) hide show
  1. package/README.md +4 -2
  2. package/bin/bitboss-ui-mcp.mjs +101 -3
  3. package/bin/bitboss-ui.mjs +6 -1
  4. package/bin/cli.mjs +31 -5
  5. package/dist/ai/BbAvatar.md +86 -58
  6. package/dist/ai/BbBadge.md +5 -5
  7. package/dist/ai/BbBreadcrumbs.md +2 -2
  8. package/dist/ai/BbButton.md +2 -2
  9. package/dist/ai/BbCalendar.md +9 -5
  10. package/dist/ai/BbCheckboxGroup.md +5 -4
  11. package/dist/ai/BbColorInput.md +12 -0
  12. package/dist/ai/BbColorPalette.md +19 -15
  13. package/dist/ai/BbConfirmPortal.md +1 -1
  14. package/dist/ai/BbDatePicker.md +16 -3
  15. package/dist/ai/BbDatePickerInput.md +17 -1
  16. package/dist/ai/BbDialog.md +16 -4
  17. package/dist/ai/BbDropdown.md +175 -67
  18. package/dist/ai/BbDropdownButton.md +27 -8
  19. package/dist/ai/BbForm.md +4 -1
  20. package/dist/ai/BbHoverCardPortal.md +1 -1
  21. package/dist/ai/BbNumberInput.md +8 -4
  22. package/dist/ai/BbPopoverPortal.md +1 -1
  23. package/dist/ai/BbRadioGroup.md +4 -4
  24. package/dist/ai/BbSelect.md +79 -67
  25. package/dist/ai/BbSelectPopover.md +24 -5
  26. package/dist/ai/BbSwitchGroup.md +5 -4
  27. package/dist/ai/BbTable.md +59 -34
  28. package/dist/ai/BbTimePicker.md +16 -3
  29. package/dist/ai/BbTimePickerInput.md +15 -1
  30. package/dist/ai/BbToast.md +3 -2
  31. package/dist/ai/BbToastPortal.md +1 -1
  32. package/dist/ai/BbTree.md +5 -1
  33. package/dist/ai/CommonPopover.md +1 -0
  34. package/dist/ai/FlatListBox.md +1 -0
  35. package/dist/ai/GroupedListBox.md +1 -0
  36. package/dist/ai/ListBox.md +1 -0
  37. package/dist/ai/OptionsContainer.md +4 -4
  38. package/dist/ai/changelog.json +215 -6
  39. package/dist/ai/components.json +77 -43
  40. package/dist/ai/composables/useToast.md +2 -2
  41. package/dist/ai/design-tokens.json +60 -0
  42. package/dist/ai/guides/agent-contract.md +8 -4
  43. package/dist/ai/guides/design-tokens.md +33 -0
  44. package/dist/ai/guides/eslint-rules.md +1 -1
  45. package/dist/ai/guides/fetch-items-playbook.md +7 -11
  46. package/dist/ai/guides/inertia-helpers.md +613 -53
  47. package/dist/ai/guides/migration/adoption-checklist.md +5 -5
  48. package/dist/ai/guides/migration/components/bb-color-palette.md +11 -11
  49. package/dist/ai/guides/migration/components/bb-dropdown-button.md +1 -0
  50. package/dist/ai/guides/migration/components/bb-dropdown.md +1 -0
  51. package/dist/ai/guides/migration/components/bb-table.md +2 -1
  52. package/dist/ai/guides/migration/components/bb-toast.md +2 -2
  53. package/dist/ai/guides/migration/v2-to-v3.md +46 -5
  54. package/dist/ai/guides/migration/v3-beta-tooling.md +4 -0
  55. package/dist/ai/guides/passthrough.md +3 -3
  56. package/dist/ai/guides/preset-components.md +15 -2
  57. package/dist/ai/guides/reporting.md +49 -0
  58. package/dist/ai/helpers/inertia/manifest.json +33 -38
  59. package/dist/ai/helpers/inertia/useHasChanged.ts +25 -37
  60. package/dist/ai/helpers/inertia/useQuery.ts +24 -6
  61. package/dist/ai/helpers/inertia/utils.ts +552 -3
  62. package/dist/ai/index.md +2 -1
  63. package/dist/ai/manifest/common.json +1 -0
  64. package/dist/ai/manifest/components/BbAlert.tree.json +1 -1
  65. package/dist/ai/manifest/components/BbAvatar.json +5 -2
  66. package/dist/ai/manifest/components/BbAvatar.tree.json +32 -2
  67. package/dist/ai/manifest/components/BbCalendar.json +2 -2
  68. package/dist/ai/manifest/components/BbCarousel.json +0 -3
  69. package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
  70. package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +2 -0
  71. package/dist/ai/manifest/components/BbColorInput.json +5 -2
  72. package/dist/ai/manifest/components/BbColorPalette.json +7 -4
  73. package/dist/ai/manifest/components/BbColorPalette.removed.json +1 -2
  74. package/dist/ai/manifest/components/BbConfirmPortal.json +1 -1
  75. package/dist/ai/manifest/components/BbDatePicker.json +6 -3
  76. package/dist/ai/manifest/components/BbDatePickerInput.json +3 -0
  77. package/dist/ai/manifest/components/BbDialog.tree.json +7 -1
  78. package/dist/ai/manifest/components/BbDropdown.json +23 -17
  79. package/dist/ai/manifest/components/BbDropdown.removed.json +2 -1
  80. package/dist/ai/manifest/components/BbDropdown.tree.json +16 -5
  81. package/dist/ai/manifest/components/BbDropdownButton.json +15 -9
  82. package/dist/ai/manifest/components/BbDropdownButton.removed.json +2 -1
  83. package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -0
  84. package/dist/ai/manifest/components/BbForm.json +1 -1
  85. package/dist/ai/manifest/components/BbHoverCard.json +1 -1
  86. package/dist/ai/manifest/components/BbHoverCardPortal.json +1 -1
  87. package/dist/ai/manifest/components/BbNumberInput.json +1 -1
  88. package/dist/ai/manifest/components/BbOffCanvas.tree.json +2 -0
  89. package/dist/ai/manifest/components/BbPopover.json +1 -1
  90. package/dist/ai/manifest/components/BbPopoverPortal.json +1 -1
  91. package/dist/ai/manifest/components/BbRadioGroup.json +2 -2
  92. package/dist/ai/manifest/components/BbRadioGroup.tree.json +2 -0
  93. package/dist/ai/manifest/components/BbSelect.json +10 -7
  94. package/dist/ai/manifest/components/BbSelectPopover.json +7 -4
  95. package/dist/ai/manifest/components/BbSelectPopover.tree.json +5 -1
  96. package/dist/ai/manifest/components/BbSwitchGroup.json +2 -2
  97. package/dist/ai/manifest/components/BbSwitchGroup.tree.json +2 -0
  98. package/dist/ai/manifest/components/BbTable.json +6 -6
  99. package/dist/ai/manifest/components/BbTable.tree.json +16 -6
  100. package/dist/ai/manifest/components/BbTimePicker.json +7 -4
  101. package/dist/ai/manifest/components/BbTimePickerInput.json +5 -2
  102. package/dist/ai/manifest/components/BbToastPortal.json +1 -1
  103. package/dist/ai/manifest/components/BbTree.json +1 -1
  104. package/dist/ai/manifest/components/CommonPopover.json +2 -1
  105. package/dist/ai/manifest/components/FlatListBox.json +2 -1
  106. package/dist/ai/manifest/components/GroupedListBox.json +2 -1
  107. package/dist/ai/manifest/components/ListBox.json +2 -1
  108. package/dist/ai/manifest/components/OptionsContainer.json +6 -4
  109. package/dist/ai/manifest/index.json +2 -2
  110. package/dist/ai/manifest/meta.json +36 -3
  111. package/dist/ai/manifest/types.advanced.json +81 -80
  112. package/dist/ai/manifest/types.api.json +64 -65
  113. package/dist/ai/manifest/types.wrapper.json +155 -118
  114. package/dist/ai/recipes/inertia/layout-scaffold.md +3 -1
  115. package/dist/ai/recipes/nuxt/layout-scaffold.md +3 -1
  116. package/dist/ai/recipes/vue/layout-scaffold.md +3 -1
  117. package/dist/ai/source/BbAlert.md +16 -4
  118. package/dist/ai/source/BbAvatar.md +121 -9
  119. package/dist/ai/source/BbBadge.md +12 -5
  120. package/dist/ai/source/BbBreadcrumbs.md +56 -55
  121. package/dist/ai/source/BbButton.md +41 -25
  122. package/dist/ai/source/BbCalendar.md +22 -12
  123. package/dist/ai/source/BbCarousel.md +31 -28
  124. package/dist/ai/source/BbCheckboxGroup.md +15 -9
  125. package/dist/ai/source/BbColorInput.md +19 -0
  126. package/dist/ai/source/BbColorPalette.md +59 -12
  127. package/dist/ai/source/BbConfirm.md +7 -0
  128. package/dist/ai/source/BbConfirmPortal.md +9 -4
  129. package/dist/ai/source/BbDatePicker.md +71 -22
  130. package/dist/ai/source/BbDatePickerInput.md +72 -9
  131. package/dist/ai/source/BbDialog.md +45 -2
  132. package/dist/ai/source/BbDropdown.md +263 -63
  133. package/dist/ai/source/BbDropdownButton.md +27 -2
  134. package/dist/ai/source/BbDropdownGroup.md +121 -59
  135. package/dist/ai/source/BbForm.md +73 -6
  136. package/dist/ai/source/BbGallery.md +76 -55
  137. package/dist/ai/source/BbHost.md +12 -0
  138. package/dist/ai/source/BbHoverCard.md +7 -0
  139. package/dist/ai/source/BbHoverCardPortal.md +9 -5
  140. package/dist/ai/source/BbNumberInput.md +22 -16
  141. package/dist/ai/source/BbOffCanvas.md +48 -2
  142. package/dist/ai/source/BbPopover.md +7 -0
  143. package/dist/ai/source/BbPopoverPortal.md +9 -5
  144. package/dist/ai/source/BbRadio.md +4 -3
  145. package/dist/ai/source/BbRadioGroup.md +19 -10
  146. package/dist/ai/source/BbSelect.md +35 -20
  147. package/dist/ai/source/BbSelectPopover.md +116 -8
  148. package/dist/ai/source/BbSwitchGroup.md +11 -4
  149. package/dist/ai/source/BbTable.md +126 -32
  150. package/dist/ai/source/BbTag.md +10 -3
  151. package/dist/ai/source/BbTimePicker.md +69 -15
  152. package/dist/ai/source/BbTimePickerInput.md +45 -7
  153. package/dist/ai/source/BbToast.md +16 -2
  154. package/dist/ai/source/BbToastPortal.md +18 -6
  155. package/dist/ai/source/BbTree.md +1 -1
  156. package/dist/ai/source/CommonFieldInput.md +11 -5
  157. package/dist/ai/source/CommonPopover.md +28 -2
  158. package/dist/ai/source/FlatListBox.md +26 -5
  159. package/dist/ai/source/GroupedListBox.md +63 -11
  160. package/dist/ai/source/ListBox.md +4 -0
  161. package/dist/ai/source/OptionsContainer.md +29 -11
  162. package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +31 -26
  163. package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -0
  164. package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +61 -43
  165. package/dist/components/BbAvatar/avatarIdentity.js +25 -0
  166. package/dist/components/BbAvatar/ptKeys.generated.d.ts +5 -1
  167. package/dist/components/BbAvatar/types.d.ts +24 -5
  168. package/dist/components/BbAvatar/types.js +5 -1
  169. package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +24 -23
  170. package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +80 -79
  171. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +152 -158
  172. package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +100 -85
  173. package/dist/components/BbCalendar/BbCalendar.vue.d.ts +1 -1
  174. package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +235 -234
  175. package/dist/components/BbCalendar/types.d.ts +2 -2
  176. package/dist/components/BbCalendar/useDayGrid.js +120 -123
  177. package/dist/components/BbCalendar/useDayjsLocale.js +11 -8
  178. package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +7 -7
  179. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +126 -122
  180. package/dist/components/BbCheckboxGroup/types.d.ts +7 -11
  181. package/dist/components/BbColorInput/BbColorInput.vue.d.ts +2 -0
  182. package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +148 -141
  183. package/dist/components/BbColorInput/types.d.ts +7 -0
  184. package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +2 -0
  185. package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +239 -223
  186. package/dist/components/BbColorPalette/types.d.ts +8 -1
  187. package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +2 -4
  188. package/dist/components/BbConfirm/types.d.ts +5 -0
  189. package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +4 -2
  190. package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +160 -143
  191. package/dist/components/BbDatePicker/types.d.ts +9 -2
  192. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +3 -1
  193. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +483 -496
  194. package/dist/components/BbDatePickerInput/types.d.ts +7 -0
  195. package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +252 -236
  196. package/dist/components/BbDialog/leaveGhost.js +38 -0
  197. package/dist/components/BbDialog/overlayActions.js +34 -20
  198. package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +92 -87
  199. package/dist/components/BbDropdown/BbDropdown.vue.d.ts +3 -0
  200. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +419 -368
  201. package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +384 -340
  202. package/dist/components/BbDropdown/DropdownFailures.vue.js +4 -0
  203. package/dist/components/BbDropdown/DropdownFailures.vue_vue_type_script_setup_true_lang.js +24 -0
  204. package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +133 -119
  205. package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +73 -45
  206. package/dist/components/BbDropdown/normalizeGroups.js +6 -2
  207. package/dist/components/BbDropdown/ptKeys.generated.d.ts +8 -0
  208. package/dist/components/BbDropdown/types.d.ts +73 -58
  209. package/dist/components/BbDropdown/types.js +1 -0
  210. package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +2 -0
  211. package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +93 -72
  212. package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +48 -0
  213. package/dist/components/BbDropdownButton/types.d.ts +13 -2
  214. package/dist/components/BbDropdownButton/types.js +2 -0
  215. package/dist/components/BbForm/BbForm.vue.d.ts +2 -21
  216. package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +229 -227
  217. package/dist/components/BbForm/types.d.ts +31 -0
  218. package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +318 -296
  219. package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +7 -1
  220. package/dist/components/BbHoverCard/BbHoverCardPortal.vue.d.ts +2 -5
  221. package/dist/components/BbHoverCard/types.d.ts +5 -0
  222. package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +10 -6
  223. package/dist/components/BbNumberInput/numberDisplay.js +102 -106
  224. package/dist/components/BbNumberInput/types.d.ts +4 -3
  225. package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +425 -409
  226. package/dist/components/BbPopover/BbPopoverPortal.vue.d.ts +2 -5
  227. package/dist/components/BbPopover/types.d.ts +5 -0
  228. package/dist/components/BbRadio/types.d.ts +4 -3
  229. package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +108 -106
  230. package/dist/components/BbRadioGroup/types.d.ts +4 -7
  231. package/dist/components/BbSelect/BbSelect.vue.d.ts +3 -1
  232. package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +167 -163
  233. package/dist/components/BbSelect/types.d.ts +23 -20
  234. package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +3 -1
  235. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +680 -637
  236. package/dist/components/BbSelectPopover/types.d.ts +10 -4
  237. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +159 -155
  238. package/dist/components/BbSwitchGroup/types.d.ts +3 -6
  239. package/dist/components/BbTable/BbTable.vue.d.ts +1 -3
  240. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1182 -1165
  241. package/dist/components/BbTable/BbTableDataRow.js +96 -96
  242. package/dist/components/BbTable/types.d.ts +11 -10
  243. package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +9 -3
  244. package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +4 -2
  245. package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +157 -140
  246. package/dist/components/BbTimePicker/types.d.ts +9 -2
  247. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +3 -1
  248. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +278 -268
  249. package/dist/components/BbTimePickerInput/types.d.ts +7 -0
  250. package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +12 -12
  251. package/dist/components/BbToast/BbToastPortal.vue.d.ts +2 -4
  252. package/dist/components/BbToast/types.d.ts +7 -2
  253. package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +56 -46
  254. package/dist/components/BbTree/types.d.ts +1 -1
  255. package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +36 -36
  256. package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +14 -2
  257. package/dist/components/CommonTimeSelector/useMeridiem.js +6 -6
  258. package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +115 -96
  259. package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +194 -166
  260. package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +7 -4
  261. package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +86 -77
  262. package/dist/composables/formSubmitLock.js +2 -1
  263. package/dist/composables/overlayRegistry.js +52 -42
  264. package/dist/composables/useActiveInactiveState.js +8 -4
  265. package/dist/composables/useBbDialog.js +5 -5
  266. package/dist/composables/useItemsGetter.js +34 -32
  267. package/dist/composables/useOpenModel.js +20 -0
  268. package/dist/composables/useOwnModel.js +16 -0
  269. package/dist/composables/useSegmentedFields.js +31 -20
  270. package/dist/deprecation/ai-deprecations.json.js +1 -1
  271. package/dist/i18n/currencyDigits.js +58 -0
  272. package/dist/i18n/locales/ar.json +2 -0
  273. package/dist/i18n/locales/cs.json +2 -0
  274. package/dist/i18n/locales/da.json +2 -0
  275. package/dist/i18n/locales/de-CH.json +2 -0
  276. package/dist/i18n/locales/de.json +2 -0
  277. package/dist/i18n/locales/el.json +2 -0
  278. package/dist/i18n/locales/en-GB.json +2 -0
  279. package/dist/i18n/locales/en.json +2 -0
  280. package/dist/i18n/locales/es-MX.json +2 -0
  281. package/dist/i18n/locales/es.json +2 -0
  282. package/dist/i18n/locales/fa.json +2 -0
  283. package/dist/i18n/locales/fi.json +2 -0
  284. package/dist/i18n/locales/fr.json +2 -0
  285. package/dist/i18n/locales/he.json +2 -0
  286. package/dist/i18n/locales/hu.json +2 -0
  287. package/dist/i18n/locales/it.json +2 -0
  288. package/dist/i18n/locales/ja.json +2 -0
  289. package/dist/i18n/locales/ko.json +2 -0
  290. package/dist/i18n/locales/nb.json +2 -0
  291. package/dist/i18n/locales/nl.json +2 -0
  292. package/dist/i18n/locales/pl.json +2 -0
  293. package/dist/i18n/locales/pt-BR.json +2 -0
  294. package/dist/i18n/locales/pt-PT.json +2 -0
  295. package/dist/i18n/locales/ro.json +2 -0
  296. package/dist/i18n/locales/ru.json +2 -0
  297. package/dist/i18n/locales/sv.json +2 -0
  298. package/dist/i18n/locales/tr.json +2 -0
  299. package/dist/i18n/locales/uk.json +2 -0
  300. package/dist/i18n/locales/zh-CN.json +2 -0
  301. package/dist/i18n/locales/zh-HK.json +2 -0
  302. package/dist/i18n/locales/zh-TW.json +2 -0
  303. package/dist/i18n/regionDates.js +250 -0
  304. package/dist/i18n/regionHints.js +30 -41
  305. package/dist/icon-scan.js +68 -61
  306. package/dist/index.d.ts +35 -31
  307. package/dist/llms-full.txt +1428 -400
  308. package/dist/llms-medium.txt +8 -4
  309. package/dist/llms.txt +4 -2
  310. package/dist/locale-blueprint.json +2 -0
  311. package/dist/styles.css +2 -2
  312. package/dist/types/ActionButton.d.ts +2 -1
  313. package/dist/types/CommonProps.d.ts +8 -0
  314. package/dist/types/Option.d.ts +10 -0
  315. package/dist/types/ptComponentMap.d.ts +3 -3
  316. package/dist/utilities/functions/hash.js +97 -64
  317. package/dist/utilities/functions/isEqual.js +33 -25
  318. package/dist/utilities/functions/slotContent.js +19 -0
  319. package/dist/utils/loadRetry.js +8 -0
  320. package/dist/utils/versionCheck.js +1 -1
  321. package/dist/vite-plugin.d.ts +2 -1
  322. package/dist/vite.js +11 -4
  323. package/llms.txt +4 -2
  324. package/package.json +3 -2
  325. package/scripts/README.md +3 -1
  326. package/scripts/lib/adoption-checklist.json +6 -5
  327. package/scripts/lib/agent-manifest.mjs +33 -6
  328. package/scripts/lib/agent-setup.mjs +90 -24
  329. package/scripts/lib/cldr-pins.ts +182 -0
  330. package/scripts/lib/engines-include.d.mts +5 -0
  331. package/scripts/lib/engines-include.mjs +40 -0
  332. package/scripts/lib/eslint-plugin.mjs +8 -2
  333. package/scripts/lib/hidden-label-placeholder.mjs +25 -5
  334. package/scripts/lib/idiom-scan.mjs +30 -3
  335. package/scripts/lib/legacy-agent-files.json +152 -0
  336. package/scripts/lib/mcp-config.mjs +74 -7
  337. package/scripts/lib/portal-names.mjs +78 -8
  338. package/scripts/lib/release-results.mjs +5 -2
  339. package/scripts/lib/report.mjs +340 -0
  340. package/scripts/lib/run-beat.mjs +14 -0
  341. package/scripts/lib/run-records.mjs +313 -0
  342. package/scripts/lib/selector-log.mjs +98 -0
  343. package/scripts/lib/ticket-beat.mjs +30 -0
  344. package/scripts/lib/validate-bb-markup.mjs +37 -2
  345. package/dist/ai/manifest/components/BbAvatar.removed.json +0 -6
package/README.md CHANGED
@@ -372,8 +372,9 @@ rows with `members`, guide prose with `sections`; also answers for type names
372
372
  and for v2 / beta names that were renamed), `get_css_surface` (a component's
373
373
  CSS hooks, pt part first, then the class), `get_guide`, `get_composable`,
374
374
  `list_recipes` / `get_recipe`, `list_tokens`, `list_changes` (counts, then one
375
- line per change) and `validate`. Every answer is small by default: ask for the
376
- part you need.
375
+ line per change), `validate`, and `report_issue` (sends a report to the
376
+ maintainers, the one tool that is not read-only). Every answer is small by
377
+ default: ask for the part you need.
377
378
 
378
379
  ### CLI commands
379
380
 
@@ -382,6 +383,7 @@ part you need.
382
383
  | `npx bitboss-ui@beta setup [--manual] [--yes] [--no-ai] [--validation <lib>] [--[no-]eslint]` | Installs bitboss-ui and its prerequisites, wires the build and runtime plugins, adds the app's `postinstall`, sets up coding agents (see Installation). |
383
384
  | `npx bitboss-ui update [--no-install] [--all]` | Installs the newest release on the app's channel (`beta` while on a beta), refreshes the agent files and lists the breaking changes since the old version. `--no-install`: refresh only. As the app's `postinstall` it only refreshes, quietly, and never fails the install. |
384
385
  | `npx bitboss-ui check [paths… \| --changed] [--fix] [--idioms] [--json]` | Validates `Bb*` markup in `.vue` / `.md` files against the installed version; `--fix` applies the library's renames first (v2 → v3, and between 3.0 betas); `--changed` checks only the files git sees changed vs HEAD (plus untracked); `--idioms` also lists the hand-rolled controls the library ships ([adoption checklist](dist/ai/guides/migration/adoption-checklist.md), report-only). |
386
+ | `npx bitboss-ui report --kind <kind> --component <name> --expected … --actual …` | Sends a bug, friction, glue, smell, feature request or docs problem to the maintainers with the installed version, and prints the report id and its status URL ([Reporting](dist/ai/guides/reporting.md)). |
385
387
  | `npx bitboss-ui add <id…> \| --all` | Copies Inertia helpers into the app as files it owns, recorded in `bitboss-ui.lock.json`; never changes an existing file. |
386
388
  | `npx bitboss-ui helpers [list \| diff \| update]` | The helper ids and their state in this app; `diff` your copy against this version`s; `update` replaces the copies you did not edit. |
387
389
  | `npx bitboss-ui changelog --since <version> [--until <version>] [--json]` | Lists the **breaking** changes between the version you are on and the installed one — what breaks if you bump. |
@@ -48,6 +48,13 @@ import { projectResolution } from '../scripts/lib/unimported-components.mjs';
48
48
  import { isDirectRun as isDirectRunOf } from '../scripts/lib/is-direct-run.mjs';
49
49
  import { loadMcpSdk } from '../scripts/lib/mcp-sdk.mjs';
50
50
  import { definePresetCpSource } from '../scripts/lib/define-preset-copy.mjs';
51
+ import {
52
+ KIND_DEFINITIONS,
53
+ REPORT_KINDS,
54
+ buildReport,
55
+ reportingEnabled,
56
+ sendReport,
57
+ } from '../scripts/lib/report.mjs';
51
58
 
52
59
  const SDK = await loadMcpSdk();
53
60
  const { McpServer, StdioServerTransport, z } = SDK;
@@ -3266,6 +3273,53 @@ function toolCallback(fn) {
3266
3273
  };
3267
3274
  }
3268
3275
 
3276
+ /**
3277
+ * report_issue: send one report to the maintainers' inbox, with the installed
3278
+ * version and the proof of work (scripts/lib/report.mjs). Answers the id and
3279
+ * status URL, or what the inbox refused. `fetch` and `bits` are test seams.
3280
+ */
3281
+ async function reportIssue(args = {}, { fetch, bits } = {}) {
3282
+ const version = packageVersion();
3283
+ const { body, problems } = buildReport(args, { version });
3284
+ if (problems.length) return { error: problems.join('; ') };
3285
+ let result;
3286
+ try {
3287
+ result = await sendReport(body, {
3288
+ client: `bitboss-ui-mcp/${version}`,
3289
+ fetch,
3290
+ bits,
3291
+ });
3292
+ } catch (error) {
3293
+ return {
3294
+ error: `Could not reach the inbox: ${error instanceof Error ? error.message : String(error)}. Keep your workaround; try again later.`,
3295
+ };
3296
+ }
3297
+ const { status, body: answer } = result;
3298
+ if ((status === 200 || status === 201) && answer?.id)
3299
+ return {
3300
+ id: answer.id,
3301
+ duplicate: answer.duplicate === true,
3302
+ verified: answer.verified,
3303
+ statusUrl: answer.statusUrl,
3304
+ hint: 'Keep your workaround in place; the status URL says when a fix ships.',
3305
+ };
3306
+ return {
3307
+ error: answer?.error ?? `HTTP ${status}`,
3308
+ ...(answer?.issues ? { issues: answer.issues } : {}),
3309
+ ...(answer?.retryAfter ? { retryAfter: answer.retryAfter } : {}),
3310
+ };
3311
+ }
3312
+
3313
+ function asyncToolCallback(fn) {
3314
+ return async (args) => {
3315
+ const result = await fn(args ?? {});
3316
+ return {
3317
+ content: [{ type: 'text', text: JSON.stringify(result) }],
3318
+ isError: typeof result?.error === 'string',
3319
+ };
3320
+ };
3321
+ }
3322
+
3269
3323
  const platformSchema = z.enum(RECIPE_PLATFORMS);
3270
3324
 
3271
3325
  /**
@@ -3285,13 +3339,19 @@ const SERVER_INSTRUCTIONS = [
3285
3339
  ].join('\n');
3286
3340
 
3287
3341
  /** Register the knowledge-base tools on a fresh McpServer instance. */
3288
- function buildServer() {
3342
+ /**
3343
+ * @param {{ root?: string }} [options] `root`: the project whose package.json
3344
+ * may turn reporting off (`"bitboss-ui": { "report": false }`): then
3345
+ * `report_issue` is not registered at all, so no agent sees or calls it.
3346
+ */
3347
+ function buildServer({ root = process.cwd() } = {}) {
3289
3348
  const server = new McpServer(
3290
3349
  { name: 'bitboss-ui', version: packageVersion() },
3291
3350
  { capabilities: { tools: {} }, instructions: SERVER_INSTRUCTIONS }
3292
3351
  );
3293
- // Every tool reads the installed package and nothing else: say so, so a
3294
- // client can call them without a confirmation (MCP tool annotations).
3352
+ // Every tool but report_issue reads the installed package and nothing
3353
+ // else: say so, so a client can call them without a confirmation (MCP
3354
+ // tool annotations). report_issue overrides them: it sends.
3295
3355
  const registerTool = server.registerTool.bind(server);
3296
3356
  server.registerTool = (name, config, callback) =>
3297
3357
  registerTool(
@@ -3307,6 +3367,7 @@ function buildServer() {
3307
3367
  destructiveHint: false,
3308
3368
  idempotentHint: true,
3309
3369
  openWorldHint: false,
3370
+ ...config.annotations,
3310
3371
  },
3311
3372
  },
3312
3373
  callback
@@ -3636,6 +3697,42 @@ function buildServer() {
3636
3697
  toolCallback(validateCode)
3637
3698
  );
3638
3699
 
3700
+ if (!reportingEnabled(root)) return server;
3701
+ const text = (describe) => z.string().describe(describe);
3702
+ server.registerTool(
3703
+ 'report_issue',
3704
+ {
3705
+ description:
3706
+ 'Report to the bitboss-ui maintainers whenever you work around the library or hit one of these, then KEEP your workaround (never wait on a fix): ' +
3707
+ REPORT_KINDS.map((k) => `${k}: ${KIND_DEFINITIONS[k]}`).join(' ') +
3708
+ ' Send a minimal repro only: never app data, customer data, secrets or proprietary code. Answers the report id and a status URL.',
3709
+ inputSchema: {
3710
+ kind: z.enum(REPORT_KINDS).describe('Which of the kinds above.'),
3711
+ component: text(
3712
+ "The Bb* component, e.g. 'BbSelect', or the surface: 'cli', 'mcp', 'vite-plugin', 'nuxt-module', 'docs', 'other'."
3713
+ ),
3714
+ expected: text('What you expected, in a sentence or two.'),
3715
+ actual: text(
3716
+ 'What happened instead. Its first line becomes the title.'
3717
+ ),
3718
+ workaround: text('What you did instead, if anything.').optional(),
3719
+ snippet: text(
3720
+ 'A minimal repro: a few lines of template or code, nothing from the app beyond that.'
3721
+ ).optional(),
3722
+ page: text('The docs page you were reading, if any.').optional(),
3723
+ version: text(
3724
+ 'The bitboss-ui version; default: the installed one.'
3725
+ ).optional(),
3726
+ },
3727
+ annotations: {
3728
+ readOnlyHint: false,
3729
+ idempotentHint: false,
3730
+ openWorldHint: true,
3731
+ },
3732
+ },
3733
+ asyncToolCallback(reportIssue)
3734
+ );
3735
+
3639
3736
  return server;
3640
3737
  }
3641
3738
 
@@ -3697,6 +3794,7 @@ export {
3697
3794
  listRecipes,
3698
3795
  getRecipe,
3699
3796
  validateCode,
3797
+ reportIssue,
3700
3798
  };
3701
3799
 
3702
3800
  // Through a symlink too (`node_modules/.bin`, a pnpm store): see the helper.
@@ -4,7 +4,8 @@
4
4
  * that runs before the app has `vue` installed (`yarn dlx` / `pnpm dlx`
5
5
  * install no peers), while the full CLI (bin/cli.mjs) loads Vue's template
6
6
  * compiler at start-up for `check`. `update --no-install` (the app's
7
- * postinstall) takes the same slim path, so an install never fails on it.
7
+ * postinstall) takes the same slim path, so an install never fails on it,
8
+ * and so does `report`, which needs nothing but Node.
8
9
  * Every other command is the full CLI.
9
10
  */
10
11
  const [command, ...args] = process.argv.slice(2);
@@ -18,6 +19,10 @@ const refreshOnly =
18
19
  if (command === 'setup') {
19
20
  const { setupCli } = await import('../scripts/lib/setup.mjs');
20
21
  process.exitCode = await setupCli(args);
22
+ } else if (command === 'report') {
23
+ // Zero dependencies: an agent reports from any project, Vue or not.
24
+ const { reportCli } = await import('../scripts/lib/report.mjs');
25
+ process.exitCode = await reportCli(args);
21
26
  } else if (refreshOnly) {
22
27
  // The app's postinstall: the agent refresh alone, on the same slim path.
23
28
  const { refreshCli } = await import('../scripts/lib/agent-refresh.mjs');
package/bin/cli.mjs CHANGED
@@ -50,7 +50,10 @@
50
50
  * mcp Start a stdio MCP server exposing the dist/ai knowledge base
51
51
  * (search_docs, search_components, get_component, get_composable,
52
52
  * get_css_surface, list_tokens, list_guides, get_guide, list_changes,
53
- * list_recipes, get_recipe, validate) to MCP-capable agent harnesses.
53
+ * list_recipes, get_recipe, validate, report_issue) to MCP-capable
54
+ * agent harnesses.
55
+ * report Send a report to the maintainers' inbox (scripts/lib/report.mjs,
56
+ * on the slim entry: it needs nothing but Node).
54
57
  *
55
58
  * Plain ESM JavaScript on purpose: shipped as-is in the package, no build.
56
59
  */
@@ -71,6 +74,7 @@ import {
71
74
  repeatedIdioms,
72
75
  repeatOccurrences,
73
76
  scanIdioms,
77
+ adoptedComponents,
74
78
  } from '../scripts/lib/idiom-scan.mjs';
75
79
  import {
76
80
  disabledChecker,
@@ -1136,6 +1140,18 @@ async function checkCommand(
1136
1140
  if (wantIdioms) {
1137
1141
  const rows = loadAdoptionRows();
1138
1142
  const exts = new Set(rows.flatMap((row) => row.ext));
1143
+ // the app's wrappers already built on a library group.
1144
+ const adopted = adoptedComponents(
1145
+ projectSources
1146
+ .filter((path) => path.endsWith('.vue'))
1147
+ .map((path) => {
1148
+ try {
1149
+ return [path, readText(path)];
1150
+ } catch {
1151
+ return [path, ''];
1152
+ }
1153
+ })
1154
+ );
1139
1155
  const TEST_FILE = /\.(?:test|spec)(?:-d)?\.[cm]?[jt]sx?$/;
1140
1156
  const scope = changed ? changed.all : globs.length ? files : projectSources;
1141
1157
  // the repeats count across files, so they are judged at the end.
@@ -1151,7 +1167,7 @@ async function checkCommand(
1151
1167
  continue;
1152
1168
  }
1153
1169
  const file = relative(projectRoot, path);
1154
- for (const hit of scanIdioms(content, ext, rows))
1170
+ for (const hit of scanIdioms(content, ext, rows, { adopted }))
1155
1171
  idioms.push({ file, ...hit });
1156
1172
  for (const occurrence of repeatOccurrences(content, ext))
1157
1173
  repeats.push({ file, ...occurrence });
@@ -1482,8 +1498,9 @@ Commands:
1482
1498
  error or diff found a difference; 2 refused (add wrote
1483
1499
  nothing); 3 a precondition failed, nothing written; 4 a
1484
1500
  write failed and was rolled back. No --force: to take
1485
- bitboss-ui's copy over your edit, delete the file and
1486
- run add again. --yes is accepted and does nothing (the
1501
+ bitboss-ui's copy over your edit (the edit is lost:
1502
+ read helpers diff <id> first), delete the file and run
1503
+ add again. --yes is accepted and does nothing (the
1487
1504
  commands never prompt).
1488
1505
  check [glob…] [--changed] [--json] [--allow-empty] [--allow-component <Name>]
1489
1506
  [--no-hints] [--manifest <path>] [--fix] [--idioms]
@@ -1782,7 +1799,16 @@ Commands:
1782
1799
  base (search_docs, search_components, get_component,
1783
1800
  get_composable, get_css_surface, list_tokens,
1784
1801
  list_guides, get_guide, list_changes, list_recipes,
1785
- get_recipe, validate) to MCP-capable agent harnesses.
1802
+ get_recipe, validate) and report_issue to MCP-capable
1803
+ agent harnesses.
1804
+ report --kind <kind> --component <name> --expected <text> --actual <text>
1805
+ [--workaround <text>] [--snippet <text>] [--page <path>]
1806
+ [--reporter <contact>] [--version <v>] [--stdin] [--json]
1807
+ Send a bug, friction, glue, smell, feature request or
1808
+ docs problem to the maintainers' inbox, with the
1809
+ installed version; prints the report id and its status
1810
+ URL. \`report --help\` defines the kinds. A minimal
1811
+ repro only: never app data, secrets or proprietary code.
1786
1812
  help Show this help.
1787
1813
  `);
1788
1814
  }
@@ -40,14 +40,23 @@ around.
40
40
  The avatar resolves what to show in a fixed order:
41
41
 
42
42
  1. **Image** — when `src` (or `srcset`) is set and loads correctly.
43
- 2. **Default slot** — when there is no source or the image fails: put initials
44
- (or any markup) here.
45
- 3. **Built-in user icon** — when you supply no slot either.
43
+ 2. **Default slot** — when there is no source or the image fails: any markup
44
+ of your own.
45
+ 3. **Initials from `name`** — no slot: the first letters of the first and the
46
+ last word, uppercased with the locale's rules (`Ada King Lovelace` → `AL`,
47
+ `Ada` → `A`). Words that don't start with a letter are skipped
48
+ (`42 Ada` → `A`).
49
+ 4. **Built-in user icon** — no slot, and no `name` (or none of its words
50
+ starts with a letter).
46
51
 
47
52
  A failed load flips to the fallback automatically, and changing `src`/`srcset`
48
- resets the attempt — so swapping users in place retries the new photo. Always
49
- set `alt`: it labels the photo, and for a fallback it becomes the avatar's
50
- accessible name.
53
+ resets the attempt — so swapping users in place retries the new photo. Pass
54
+ `name` for a person: it gives the initials and the accessible name. `alt`
55
+ describes the photo and wins as the name when written.
56
+
57
+ ```vue
58
+ <BbAvatar :src="user.photoUrl" :name="user.fullName" color />
59
+ ```
51
60
 
52
61
  **Photo, initials, and the built-in fallback**
53
62
 
@@ -61,7 +70,7 @@ accessible name.
61
70
  src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' fill='%23fde2d4'/%3E%3Ccircle cx='32' cy='25' r='11' fill='%23b45a3c'/%3E%3Cpath d='M11 64c1-13 10-20 21-20s20 7 21 20z' fill='%23b45a3c'/%3E%3C/svg%3E"
62
71
  alt="Ada Lovelace"
63
72
  />
64
- <BbAvatar size="56" alt="Grace Hopper">GH</BbAvatar>
73
+ <BbAvatar size="56" name="Grace Hopper" />
65
74
  <BbAvatar size="56" alt="Unknown user" />
66
75
  </div>
67
76
  ```
@@ -94,36 +103,53 @@ Composed demos below use the larger end of that range (and a few explicit px
94
103
  sizes) so faces stay readable in Storybook — `xs`/`sm` are for dense chrome,
95
104
  not hero examples.
96
105
 
97
- The fallback surface is **always painted with the primary design token** —
98
- `--bb-primary` behind, `--bb-primary-fg` for the initials/icon, the same
99
- pairing as a primary button — so initials stay legible in light and dark and
100
- every avatar matches your theme automatically.
106
+ By default the fallback surface is **painted with the primary design token**
107
+ — `--bb-primary` behind, `--bb-primary-fg` for the initials/icon, the same
108
+ pairing as a primary button — so it matches your theme in light and dark.
109
+
110
+ ### Colour per person: `color`
101
111
 
102
- There is no tinting **prop**, but there are two component locals on
103
- `.bb-avatar` for the cases the theme cannot cover — a per-tenant or
104
- per-user colour: `--bg` (fallback surface, defaults to `--bb-primary`) and
105
- `--fg` (initials and slotted fallback, `--bb-primary-fg`). The built-in person
106
- glyph mixes `--fg` over `--bg`, so there is no third local. Set both on the
107
- avatar or on a class you put on it:
112
+ `color` tells people apart in a list (assignees, a comment thread). It is
113
+ decoration, never state, so it is off by default:
114
+
115
+ - **`color` (`true`)** — one of ten palette hues, picked from a stable hash
116
+ of `name`: the same person gets the same colour on every page, render and
117
+ server render (no hydration repaint), whatever the case or spacing of the
118
+ name. A soft fill with deep ink in light, a deep fill with light ink in
119
+ dark; every pair clears 4.5:1. The palette is the `--bb-avatar-*` theme
120
+ tokens (design-tokens guide § Avatar palette). Without `name` the avatar
121
+ keeps the default look.
122
+ - **A string** — any CSS colour or `var()`, used as the fill as is (a
123
+ tenant's brand colour). The ink is black or white, whichever reads
124
+ (`contrast-color()` where the browser has it, else picked from the
125
+ colour's OKLCH lightness).
126
+
127
+ **Palette colours from names, and a brand colour**
108
128
 
109
129
  ```vue
110
- <BbAvatar
111
- alt="Acme Studio"
112
- :style="{ '--bg': tenant.color, '--fg': tenant.fg }"
113
- >
114
- AS
115
- </BbAvatar>
130
+ <div class="flex items-center gap-3">
131
+ <BbAvatar size="40" name="Ada Lovelace" color />
132
+ <BbAvatar size="40" name="Grace Hopper" color />
133
+ <BbAvatar size="40" name="Alan Turing" color />
134
+ <BbAvatar size="40" name="Katherine Johnson" color />
135
+ <BbAvatar size="40" name="Acme Studio" color="#1e293b" />
136
+ </div>
116
137
  ```
117
138
 
139
+ The two component locals stay for anything else: `--bg` (fallback surface)
140
+ and `--fg` (initials and slotted fallback). The built-in person glyph mixes
141
+ `--fg` over `--bg`, so there is no third local. A pinned ink for a brand
142
+ colour: `:style="{ '--fg': tenant.fg }"` beside `:color="tenant.color"`.
143
+
118
144
  **The size scale**
119
145
 
120
146
  ```vue
121
147
  <div class="flex items-end gap-3">
122
- <BbAvatar size="md" alt="Joan Clarke">JC</BbAvatar>
123
- <BbAvatar size="lg" alt="Joan Clarke">JC</BbAvatar>
124
- <BbAvatar size="xl" alt="Joan Clarke">JC</BbAvatar>
125
- <BbAvatar size="2xl" alt="Joan Clarke">JC</BbAvatar>
126
- <BbAvatar size="56" alt="Joan Clarke">JC</BbAvatar>
148
+ <BbAvatar size="md" name="Joan Clarke" />
149
+ <BbAvatar size="lg" name="Joan Clarke" />
150
+ <BbAvatar size="xl" name="Joan Clarke" />
151
+ <BbAvatar size="2xl" name="Joan Clarke" />
152
+ <BbAvatar size="56" name="Joan Clarke" />
127
153
  </div>
128
154
  ```
129
155
 
@@ -284,9 +310,7 @@ list — the row markup stays identical whether a member has a photo or not.
284
310
  "
285
311
  :variant="member.online ? 'success' : 'default'"
286
312
  >
287
- <BbAvatar :alt="member.name" size="40" :src="member.src">
288
- {{ member.initials }}
289
- </BbAvatar>
313
+ <BbAvatar color :name="member.name" size="40" :src="member.src" />
290
314
  </BbIndicator>
291
315
  <span class="flex min-w-0 flex-1 flex-col">
292
316
  <span class="truncate font-medium">{{ member.name }}</span>
@@ -320,11 +344,10 @@ type Member = {
320
344
  role: string;
321
345
  online: boolean;
322
346
  src?: string;
323
- initials?: string;
324
347
  };
325
348
 
326
- // Some members have a photo; others fall back to initials on the
327
- // primary-token surface — both flow through the same row markup.
349
+ // Some members have a photo; the others fall back to the initials from
350
+ // `name`, each in their own palette colour (`color`) — the same row markup.
328
351
  const members: Member[] = [
329
352
  {
330
353
  name: 'Ada Lovelace',
@@ -336,7 +359,6 @@ const members: Member[] = [
336
359
  name: 'Grace Hopper',
337
360
  role: 'Design',
338
361
  online: true,
339
- initials: 'GH',
340
362
  },
341
363
  {
342
364
  name: 'Alan Turing',
@@ -348,13 +370,11 @@ const members: Member[] = [
348
370
  name: 'Katherine Johnson',
349
371
  role: 'Data',
350
372
  online: true,
351
- initials: 'KJ',
352
373
  },
353
374
  {
354
375
  name: 'Linus Torvalds',
355
376
  role: 'Platform',
356
377
  online: false,
357
- initials: 'LT',
358
378
  },
359
379
  ];
360
380
 
@@ -488,12 +508,14 @@ keys.
488
508
  ### Restyling with passthrough
489
509
 
490
510
  `pt` reaches each part with a class list — or, in the object form, a
491
- style and attributes. Parts: `root` (the avatar frame) and `icon` (the default
492
- user glyph). No states — nothing it paints is a state.
493
-
494
- `icon` exists only while the fallback shows (no image, or it failed) and the
495
- default slot is not overridden; when a photo or your own initials render,
496
- `pt:icon` lands nowhere. For the frame, `pt:root` is plain `class` with extra
511
+ style and attributes. Parts: `root` (the avatar frame), `initials` (the
512
+ letters from `name`) and `icon` (the default user glyph). No states — nothing
513
+ it paints is a state.
514
+
515
+ `initials` and `icon` exist only while the fallback shows (no image, or it
516
+ failed) and the default slot is not overridden — `initials` with a `name`
517
+ that gives letters, `icon` otherwise; when a photo or your own slot renders,
518
+ they land nowhere. For the frame, `pt:root` is plain `class` with extra
497
519
  letters: write `class` / `style` on the tag, as on any element. `pt:root`
498
520
  stays for uniformity — the global map, the object form and a wrapper that
499
521
  spreads props address every component the same way.
@@ -558,10 +580,11 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
558
580
 
559
581
  ### Gotchas & anti-patterns
560
582
 
561
- - **There is no `color` prop, and no `variant` either.** The fallback is always
562
- primary-token colored; don't reach for per-avatar inline backgrounds. If the
563
- palette is wrong, retheme `--bb-primary` / `--bb-primary-fg` — theming here
564
- happens through the tokens, not a prop.
583
+ - **Don't hash names into colours yourself** — `color` does it, stable and
584
+ SSR-safe, from the themed palette. There is no `variant`: the default look
585
+ follows `--bb-primary` / `--bb-primary-fg`.
586
+ - **Don't type initials into the slot** when you have the name: `name` does
587
+ it, locale-aware, and labels the avatar too.
565
588
  - **Default `timeout` can false-fallback slow images** (see above) — tune it,
566
589
  don't reimplement image loading around the component.
567
590
  - Don't hand-position presence dots with absolute CSS — `BbIndicator dot`
@@ -575,24 +598,27 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
575
598
  by the frame, so it follows.
576
599
  - Don't pre-crop sources to circles — the component center-crops; ship square
577
600
  or larger originals.
578
- - Don't leave `alt` empty for meaningful avatars: fallbacks lose their
579
- accessible name entirely.
601
+ - Don't leave both `name` and `alt` empty for meaningful avatars: fallbacks
602
+ lose their accessible name entirely.
580
603
 
581
604
  ### Accessibility
582
605
 
583
- Always set `alt`. With an image it labels the photo; with a fallback the
584
- component adds `role="img"` + `aria-label` (from `alt`) to the fallback, so
585
- assistive tech announces the person, not the raw initials. If `alt` is empty,
586
- the fallback renders with no role and no name — acceptable only for purely
587
- decorative avatars. A presence dot is decorative — make the same status
606
+ Set `name` (or `alt`). With an image, `alt` labels the photo (`name` when
607
+ `alt` is empty); with a fallback the component adds `role="img"` +
608
+ `aria-label` (`alt`, else `name`) to the fallback, so assistive tech
609
+ announces the person, not the raw initials. With neither, the fallback
610
+ renders with no role and no name — acceptable only for purely decorative
611
+ avatars. A presence dot is decorative — make the same status
588
612
  available in visible text or an adjacent label.
589
613
 
590
614
  ## Props
591
615
 
592
616
  | Prop | Type | Default | Required | Description |
593
617
  | --- | --- | --- | --- | --- |
594
- | `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `icon`, `root`. States: —. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. In `<script>` a `pt` value is typed `BbAvatarProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
595
- | `alt` | `string \| undefined` | `""` | | Alternative text for the image, used for accessibility. |
618
+ | `pt:<part>`, `pt:<part>:<state>`, `pt` | `PtValue` | | | Passthrough — a class list, or `{ class, style, attrs }`, bound to one named part of the component; the state form applies only while that state is on. Parts: `icon`, `initials`, `root`. States: —. What each one is: _Passthrough parts and states_ below. `pt` is the object form with the same keys minus the prefix (`{ icon: '…', 'icon:loading': '…' }`). See `guides/passthrough.md`. In `<script>` a `pt` value is typed `BbAvatarProps['pt']` (`PtValue` is not exported): § Typing `pt` in `<script>`. |
619
+ | `alt` | `string \| undefined` | `""` | | Alternative text for the image, used for accessibility. Without it the avatar is labelled with `name`. |
620
+ | `color` | `string \| boolean \| undefined` | `false` | | Paints the fallback (initials or icon). `true`: a palette colour picked from `name`, stable across renders and the server. A string: any CSS colour or `var()` as the background, with black or white ink, whichever reads. Unset: the primary colour. |
621
+ | `name` | `string \| undefined` | | | The person's name. With no image and no default slot, the avatar shows its initials (first letters of the first and last word; none: the person icon). Also the accessible name when `alt` is empty, and the input of `color`. |
596
622
  | `size` | `number \| CssSize \| keyof Sizes \| undefined` | `"md"` | | Defines the component size. Accepted values: - A key from the provided size map (`keyof T`), e.g. `'sm' \| 'md' \| 'lg'` - A custom CSS size string (e.g. `'20px'`, `'1.5rem'`, `'2em'`) - A number, typically interpreted as pixels by size parsers |
597
623
  | `sizes` | `string \| undefined` | | | Sizes attribute for the image, used with `srcset`. |
598
624
  | `src` | `string \| undefined` | | | Source URL of the avatar image. |
@@ -606,7 +632,8 @@ available in visible text or an adjacent label.
606
632
  | Part | What it is |
607
633
  | --- | --- |
608
634
  | `root` | The avatar frame, with the image or the fallback inside. |
609
- | `icon` | The default user glyph — rendered only while there is no image to show and the default slot is not overridden, so it lands nowhere otherwise. |
635
+ | `icon` | The default user glyph — rendered only while there is no image to show, the default slot is not overridden and `name` gives no initials, so it lands nowhere otherwise. |
636
+ | `initials` | The initials from `name` — rendered only while there is no image to show and the default slot is not overridden. |
610
637
 
611
638
  ## Events
612
639
 
@@ -626,6 +653,7 @@ Set these on the element, or on a class you put on it, to retune this component
626
653
  | `--fg` | `.bb-avatar` | `var(--bb-primary-fg)` | Initials; the built-in icon is an 80/20 mix of this toward --bg |
627
654
  | `--default-icon-size` | `.bb-avatar` | `clamp(14px, calc(var(--size) * 0.7), 48px)` | Built-in fallback icon: 70% of the avatar, floored at 14px and capped at 48px. `--size` is the avatar's own box, set inline from the `size` prop. |
628
655
  | `--fs` | `.bb-avatar` | `max(8px, calc(var(--size) * 0.4))` | Initials: 40% of the avatar, floored at 8px |
656
+ | `--hue` | `.bb-avatar` | `0` | The palette hue `color` picks (a modifier class sets it). |
629
657
  | `--elev` | `.bb-avatar` | `var(--bb-elev-sm)` | The theme's resting lift on small chrome, declared here so an ancestor's `--elev` cannot reach in; `--elev: none` flattens one. |
630
658
  | `--size` | `.bb-avatar__default-icon` | `var(--default-icon-size)` | |
631
659
 
@@ -638,7 +666,7 @@ Set these on the element, or on a class you put on it, to retune this component
638
666
  - **CSS custom properties** listed on a node are declared on THAT node's root and read by elements inside it. Set one on that node's root or on the element inside it that reads it — the pt part that lands there is how you reach it (`pt:box="[--border-color:…]"` on a text input) — never on `BbAvatar`'s root, where the node's own declaration masks it (design-tokens guide, _Overriding one from a consumer app_, rule 0).
639
667
  - Listed nodes are the ones `BbAvatar`'s API reaches or that declare a documented CSS variable; the rest fold into "also mounts". The complete tree, undocumented locals included, is `manifest/components/BbAvatar.tree.json` (a public component in it is a name: its own tree file has the rest).
640
668
 
641
- - `BbAvatar` _(this component)_ — its own template binds: `icon` → `BbIcon`
669
+ - `BbAvatar` _(this component)_ — its own template binds: `initials` → `span.bb-avatar__initials`, `icon` → `BbIcon`
642
670
  - Also mounts `BbIcon`
643
671
 
644
672
  ## See Also
@@ -29,8 +29,8 @@
29
29
 
30
30
  `BbBadge` is a small inline pill. Use it for a status label ("Active", "Beta"),
31
31
  a short count, a removable token (`clearable`), a clickable chip (slot a
32
- `BbBadgeButton`), or all three at once. The label always goes in the **default
33
- slot**; there is no `text`/`content` prop.
32
+ `BbBadgeButton`), or all three at once. The label goes in `text` or the
33
+ **default slot** (the slot wins, as on `BbButton`).
34
34
 
35
35
  Pick a sibling when the marker should do more:
36
36
 
@@ -266,7 +266,7 @@ hidden accessible name — always write it.
266
266
  ```
267
267
 
268
268
  The slots named after the props (`#prepend:icon`, `#append:icon`)
269
- replace them and render inside the `icon` part, so `pt:icon`, `--icon-size`
269
+ replace them (one that renders nothing falls back to the prop) and render inside the `icon` part, so `pt:icon`, `--icon-size`
270
270
  and the loading spinner still apply. Their scope is the badge's states,
271
271
  `{ activeLink, exactActiveLink, loading }`: a filter chip linking to a page
272
272
  can show a solid glyph while that page is open. What you put in a slot is
@@ -852,8 +852,8 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
852
852
 
853
853
  ### Gotchas & anti-patterns
854
854
 
855
- - The label lives in the **default slot** — there is no `text`/`content` prop.
856
- In button mode it moves to `BbBadgeButton`'s slot; don't write both.
855
+ - The label is `text` or the **default slot** (the slot wins). In button mode
856
+ it moves to `BbBadgeButton`'s slot; don't write both.
857
857
  - **`BbBadgeButton` must be a direct child** of the badge's default slot:
858
858
  inside a wrapper element or your own component, the badge keeps its body —
859
859
  a duplicated label and a button inside a button. Wrap the whole `BbBadge`
@@ -757,10 +757,10 @@ Set these on the element, or on a class you put on it, to retune this component
757
757
 
758
758
  - `BbBreadcrumbs` _(this component)_ — its own template binds: `item` → `li.bb-breadcrumbs__item`, `icon` → `BbIcon`, `text` → `span.bb-breadcrumbs__text`
759
759
  - `BbBaseButton` _(public — [contract](./BbBaseButton.md))_ — its own pt parts (`BbBaseButton`): `root` → `RouterComponent`, `root` → `a`, `root` → `component`; also mounts `RouterComponent`
760
- - `BbDropdown` _(public — [contract](./BbDropdown.md))_ — its own pt parts (`BbDropdown`): `panel` → `CommonPopover`, `root` → `CommonPopover`, `header` → `div.bb-dropdown__header`, `list` → `span.bb-dropdown__list`, `footer` → `div.bb-dropdown__footer`; documented CSS variables: `--menu-inset`; also mounts `CommonPopover`, `DropdownPipelineResolver`
760
+ - `BbDropdown` _(public — [contract](./BbDropdown.md))_ — its own pt parts (`BbDropdown`): `panel` → `CommonPopover`, `root` → `CommonPopover`, `header` → `div.bb-dropdown__header`, `list` → `span.bb-dropdown__list`, `footer` → `div.bb-dropdown__footer`; documented CSS variables: `--menu-inset`; also mounts `CommonPopover`, `DropdownFailures`, `DropdownPipelineResolver`
761
761
  - `BbDropdownList` _(internal — not importable, reach it through `BbDropdown`)_ — also mounts `BbIcon`, `ErrorIcon`, `CommonPopover`, `BbDropdownList`
762
762
  - `BbBadge` _(public — [contract](./BbBadge.md))_ — its own pt parts (`BbBadge`): `spinner` → `BbSpinner`, `icon` → `span.bb-badge__append-icon`, `icon` → `BbIcon`, `clear` → `button.bb-badge__clear`; documented CSS variables: `--bg`, `--fg`, `--bw`, `--ring-color`, `--ring-size`, `--min-size-md`, `--min-size`, `--elev`, `--r`, `--fs`, `--icon-size`, `--gap`, `--px`, `--clear-size`, `--bg-disabled`, `--fg-disabled`, `--border-disabled`, `--pad-left`; also mounts `BbIcon`, `BbSpinner`, `BadgeBodyContent`
763
- - `AdaptiveDropdown` _(internal — not importable, reach it through `BbDropdown`)_ — hands `BbOffCanvas` the pt map `{ header: 'header', footer: 'footer', panel: 'root', sheet: 'root' }` (ours → theirs); also mounts `BbSmoothHeight`, `BbDropdownList`
763
+ - `AdaptiveDropdown` _(internal — not importable, reach it through `BbDropdown`)_ — hands `BbOffCanvas` the pt map `{ header: 'header', footer: 'footer', panel: 'root', sheet: 'root' }` (ours → theirs); also mounts `BbSmoothHeight`, `BbDropdownList`, `DropdownFailures`
764
764
  - `BbOffCanvas` _(public — [contract](./BbOffCanvas.md))_ — its own pt parts (`BbOffCanvas`): `header` → `div.bb-offcanvas__header`, `title` → `span.bb-offcanvas__title`, `description` → `p.bb-offcanvas__description`, `close` → `CloseButton`, `content` → `div.bb-offcanvas__content`, `footer` → `div.bb-offcanvas__footer`; documented CSS variables: `--stack-x`, `--snap-y`, `--stack-fill`, `--stack-transition-duration`, `--px`, `--handle-w`, `--handle-h`, `--handle-bg`, `--safe-top`, `--close-size`
765
765
  - `CloseButton` _(internal — not importable, reach it through `BbOffCanvas`)_ — documented CSS variables: `--size`, `--p`, `--icon-size`; also mounts `BbIcon`
766
766
  - `BbButton` _(public — [contract](./BbButton.md))_ — its own pt parts (`BbButton`): `root` → `BbBaseButton`, `spinner` → `BbSpinner`, `icon` → `span.bb-button__prepend-icon`, `icon` → `BbIcon`, `text` → `span.bb-button__text`, `icon` → `span.bb-button__append-icon`; documented CSS variables: `--h-xs`, `--h`, `--icon-size`, `--px`, `--ipx`, `--fs`, `--r`, `--gap`, `--bg`, `--bg-hover`, `--bg-pressed`, `--fg`, `--border-color`, `--ring-color`, `--ring-size`, `--bw`, `--fg-hover`, `--border-hover`, `--fg-pressed`, `--border-pressed`, `--bg-disabled`, `--fg-disabled`, `--border-disabled`, `--opacity-disabled`, `--elev-tier`, `--elev`; also mounts `BbBaseButton`, `BbSpinner`, `BbIcon`
@@ -426,8 +426,8 @@ a `local:` file in your `iconDir`, not a hand-made icon component wrapped in a
426
426
 
427
427
  To change the glyph with the button's state (a filled star while a toggle is
428
428
  on, a solid icon on the current page's link), use the slot named after the
429
- prop: `#prepend:icon`, `#append:icon`. The slot replaces the prop and
430
- renders inside the `icon` part, so `pt:icon`, `--icon-size` and the loading
429
+ prop: `#prepend:icon`, `#append:icon`. The slot replaces the prop (one that
430
+ renders nothing falls back to it) and renders inside the `icon` part, so `pt:icon`, `--icon-size` and the loading
431
431
  spinner work as they do on the prop's glyph. Its scope is the button's states:
432
432
  `{ activeLink, exactActiveLink, pressed, loading, disabled }`. What you put in
433
433
  it is yours: a `BbIcon` takes the part's size, anything else you size.
@@ -176,7 +176,8 @@ or a time rail with no single value to edit.
176
176
 
177
177
  The value is typed `string | string[] | null` in every mode. `v-model` needs
178
178
  nothing: bind a `ref<string | null>` for one date, a `ref<string[]>` for a
179
- range or `multiple`. An explicit `@update:model-value` handler narrows in one
179
+ range or `multiple`. With no `v-model` at all the calendar keeps the picked value itself, like a
180
+ native input, and still emits `update:modelValue`. An explicit `@update:model-value` handler narrows in one
180
181
  line:
181
182
 
182
183
  ```ts no-check
@@ -231,8 +232,11 @@ const summary = computed(() => {
231
232
  </script>
232
233
  ```
233
234
 
234
- With more than one month, the days of the neighbouring months are left blank:
235
- a date belongs to one grid only.
235
+ With one month, the greyed days of the neighbouring months that fill its
236
+ first and last weeks are ordinary days: a click (or Enter / Space on one)
237
+ picks it, single, range or multiple alike, and the view moves to its month.
238
+ `min`, `max` and `selectable` disable them like any other day. With more than
239
+ one month, those days are left blank: a date belongs to one grid only.
236
240
 
237
241
  ### `type` — what you are picking
238
242
 
@@ -738,7 +742,7 @@ the page is `BbDatePicker`.
738
742
  ## v-model
739
743
 
740
744
  - `v-model:activeSegment` — type: `BbCalendarSegment \| undefined`
741
- - `v-model` — type: `string \| string[] \| null`
745
+ - `v-model` — type: `string \| string[] \| null \| undefined`
742
746
  - `v-model:time` — type: `string \| string[] \| null \| undefined`
743
747
 
744
748
  ## Props
@@ -754,7 +758,7 @@ the page is `BbDatePicker`.
754
758
  | `floating` | `boolean \| undefined` | `false` | | Emit plain calendar strings instead of zoned ISO instants. Implied (and forced) by `type="week"`, `type="month"` and `type="year"`. |
755
759
  | `max` | `string \| undefined` | | | Maximum selectable value, in this `type`'s shape (as `min`). A finer bound is ceiled to the unit, with a warning. With `datetime`, on its own day the time rail disables the times after it. |
756
760
  | `min` | `string \| undefined` | | | Minimum selectable value in this `type`'s shape (`YYYY-MM-DD`, `…THH:mm` with `datetime`, `YYYY-MM` / `YYYY` with `month` / `year`; a week or a date with `week`, whole weeks only). A finer bound is floored to the unit, with a warning. With `datetime` the rail disables the earlier times on its day. |
757
- | `modelValue` | `string \| string[] \| null` | | yes | v-model: `null` when empty, a string, a `[start, end]` pair with `range`, or a sorted array with `multiple`. The string is `YYYY-MM-DD` when `floating` (`YYYY-Www` / `YYYY-MM` / `YYYY` for `week` / `month` / `year`), otherwise a zoned ISO instant (carrying the time under `datetime`). |
761
+ | `modelValue` | `string \| string[] \| null \| undefined` | | | v-model: `null` when empty, a string, a `[start, end]` pair with `range`, or a sorted array with `multiple`. The string is `YYYY-MM-DD` when `floating` (`YYYY-Www` / `YYYY-MM` / `YYYY` for `week` / `month` / `year`), otherwise a zoned ISO instant (carrying the time under `datetime`). |
758
762
  | `multiple` | `boolean` | `false` | | Multi-selection: each pick toggles a value in a sorted array (days, weeks, months or years). Needs an array `modelValue` (`[]` when empty, never `null`). Throws with `range` or `type="datetime"`. |
759
763
  | `numberOfMonths` | `number \| undefined` | `1` | | How many months show side by side (day grids only). The keyboard crosses from one month into the next, and the arrows page all of them at once. Too narrow for them all, the months wrap onto the next row. |
760
764
  | `range` | `boolean` | `false` | | Enables range selection (`[start, end]`). |