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
@@ -0,0 +1,499 @@
1
+ //#region src/components/BbNumberInput/numberDisplay.ts
2
+ var e = {
3
+ tag: "en",
4
+ decimal: ".",
5
+ group: "",
6
+ primary: 3,
7
+ secondary: 3,
8
+ groupInt: null,
9
+ minusPrefix: "-"
10
+ }, t = /[\u200e\u200f\u061c]/g, n = " \xA0   ", r = "'’ʼ", i = "٫", a = "-−﹣-", o = /* @__PURE__ */ new Map(), s = (e, n) => {
11
+ let r = n ? `${e}|${n}` : e, i = o.get(r);
12
+ if (i) return i;
13
+ let a, c = null;
14
+ try {
15
+ a = new Intl.NumberFormat(e, {
16
+ maximumFractionDigits: 0,
17
+ numberingSystem: "latn",
18
+ useGrouping: "auto"
19
+ }), n && (c = new Intl.NumberFormat(e, {
20
+ style: "currency",
21
+ currency: n,
22
+ maximumFractionDigits: 0,
23
+ numberingSystem: "latn",
24
+ useGrouping: "auto"
25
+ }));
26
+ } catch {
27
+ return s(n ? e : "en");
28
+ }
29
+ let l = new Intl.NumberFormat(e, {
30
+ ...n ? {
31
+ style: "currency",
32
+ currency: n
33
+ } : {},
34
+ numberingSystem: "latn",
35
+ useGrouping: "always"
36
+ }).formatToParts(1234567890.5), u = l.find((e) => e.type === "decimal")?.value ?? (n ? s(e).decimal : "."), d = l.find((e) => e.type === "group")?.value ?? "", f = l.filter((e) => e.type === "integer").map((e) => e.value), p = f.length > 1 ? f[f.length - 1].length : 3, m = f.length > 2 ? f[f.length - 2].length : p, h = "";
37
+ for (let e of a.formatToParts(-1)) {
38
+ if (e.type === "integer") break;
39
+ e.type === "minusSign" ? h += "-" : e.type === "literal" && (h += e.value.replace(/[^\u200e\u200f\u061c]/g, ""));
40
+ }
41
+ h.includes("-") || (h = "-");
42
+ let g = {
43
+ tag: e,
44
+ decimal: u.replace(t, ""),
45
+ group: d.replace(t, ""),
46
+ primary: p,
47
+ secondary: m,
48
+ groupInt: c ? (e) => c.formatToParts(e).filter((e) => e.type === "integer" || e.type === "group").map((e) => e.value).join("").replace(t, "") : (e) => a.format(e).replace(t, "").replace(/^[-\u2212]/, ""),
49
+ minusPrefix: h
50
+ };
51
+ return o.set(r, g), g;
52
+ }, c = /* @__PURE__ */ new Map(), l = (e, t) => {
53
+ let n = `${t}|${e}`;
54
+ if (c.has(n)) return c.get(n);
55
+ let r = null;
56
+ try {
57
+ let { minimumFractionDigits: n, maximumFractionDigits: i } = new Intl.NumberFormat(t, {
58
+ style: "currency",
59
+ currency: e
60
+ }).resolvedOptions();
61
+ r = {
62
+ min: n ?? 0,
63
+ max: i ?? 0
64
+ };
65
+ } catch {
66
+ r = null;
67
+ }
68
+ return c.set(n, r), r;
69
+ }, u = (e) => {
70
+ let t = e;
71
+ for (; t > 0 && /\p{Nd}/u.test(String.fromCodePoint(t - 1));) t--;
72
+ return t;
73
+ }, d = (e) => {
74
+ let t = e.normalize("NFKC");
75
+ if (t.length !== 1 && [...t].length !== 1) return t;
76
+ let n = t.codePointAt(0);
77
+ return n >= 48 && n <= 57 ? t : a.includes(t) ? "-" : /\p{Nd}/u.test(t) ? String((n - u(n)) % 10) : t;
78
+ }, f = (e) => [...e.replace(t, "")].map(d).join(""), p = (e) => e >= "0" && e <= "9", m = (e, t, n) => {
79
+ let r = e.startsWith("-"), i = r ? e.slice(1) : e, a = i.indexOf("."), o = a === -1 ? i : i.slice(0, a), s = a === -1 ? "" : i.slice(a + 1), c = o.length > 1 && o.startsWith("0"), l = o && t.groupInt && !c ? t.groupInt(o) : o, u = [], d = "";
80
+ r && (u.push(t.minusPrefix.indexOf("-")), d = t.minusPrefix);
81
+ for (let e of l) p(e) && u.push(d.length), d += e;
82
+ let f = Math.max(0, n.minPrecision - s.length);
83
+ if (a !== -1) {
84
+ u.push(d.length), d += t.decimal;
85
+ for (let e of s) u.push(d.length), d += e;
86
+ d += "0".repeat(f);
87
+ } else o && n.minPrecision > 0 && (d += t.decimal + "0".repeat(f));
88
+ return {
89
+ text: d,
90
+ positions: u
91
+ };
92
+ }, h = (e, t) => {
93
+ let { hole: n, positions: r } = e;
94
+ if (n) {
95
+ let e = r.length && r[0] < n[0] ? 1 : 0;
96
+ if (t <= e) return t === 0 && e ? r[0] : n[0];
97
+ }
98
+ return t <= 0 ? 0 : r[Math.min(t, r.length) - 1] + 1;
99
+ }, g = (e, t) => {
100
+ let n = 0;
101
+ for (; n < e.positions.length && e.positions[n] < t;) n++;
102
+ return n;
103
+ }, _ = (e, t) => {
104
+ let { hole: n, positions: r } = e;
105
+ if (!n) return t;
106
+ let i = h(e, r.length && r[0] < n[0] ? 1 : 0);
107
+ return Math.min(Math.max(t, i), n[1]);
108
+ }, v = (e, t, n) => {
109
+ let { hole: r } = e;
110
+ return !r || t === n || g(e, t) !== g(e, n) ? !1 : n <= r[0] || t >= r[1];
111
+ }, y = /* @__PURE__ */ new Map(), b = (e, t, n) => {
112
+ let r = `${e.tag}|${e.kind}|${e.code}|${t}|${n}`;
113
+ if (y.has(r)) return y.get(r);
114
+ let i = null;
115
+ try {
116
+ i = new Intl.NumberFormat(e.tag, {
117
+ style: e.kind,
118
+ ...e.kind === "currency" ? {
119
+ currency: e.code,
120
+ currencyDisplay: n ?? "symbol"
121
+ } : {
122
+ unit: e.code,
123
+ unitDisplay: n ? "long" : "short"
124
+ },
125
+ ...t === null ? {} : {
126
+ minimumFractionDigits: t,
127
+ maximumFractionDigits: t
128
+ },
129
+ numberingSystem: "latn",
130
+ useGrouping: "auto"
131
+ });
132
+ } catch {
133
+ i = null;
134
+ }
135
+ return y.set(r, i), i;
136
+ }, x = (e, t, n) => {
137
+ let r = t ? {
138
+ tag: e,
139
+ kind: "currency",
140
+ code: t
141
+ } : n ? {
142
+ tag: e,
143
+ kind: "unit",
144
+ code: n
145
+ } : null;
146
+ return r && b(r, null) ? r : null;
147
+ }, S = /* @__PURE__ */ new Set([
148
+ "integer",
149
+ "group",
150
+ "decimal",
151
+ "fraction"
152
+ ]), C = (e) => {
153
+ let t = e.findIndex((e) => S.has(e.type));
154
+ if (t === -1) return null;
155
+ let n = t;
156
+ for (; n + 1 < e.length && S.has(e[n + 1].type);) n++;
157
+ let r = "", i = -1;
158
+ for (let n of e.slice(0, t)) n.type === "minusSign" ? (i = r.length, r += "-") : r += n.value;
159
+ let a = e.slice(n + 1).filter((e) => e.type !== "minusSign").map((e) => e.value).join("");
160
+ return {
161
+ before: r,
162
+ after: a,
163
+ minusAt: i
164
+ };
165
+ }, w = (e, t) => {
166
+ let n = e.startsWith("-"), r = n ? e.slice(1) : e, i = r.indexOf("."), a = (i === -1 ? r : r.slice(0, i)).replace(/^0+/, "") || "0", o = (i === -1 ? "" : r.slice(i + 1)).padEnd(t, "0"), s = Math.min(100, o.length);
167
+ return {
168
+ text: `${n ? "-" : ""}${a}${s ? `.${o.slice(0, s)}` : ""}`,
169
+ digits: s,
170
+ negative: n
171
+ };
172
+ }, T = (e, t, n) => {
173
+ let r = w(t, n), i = b(e, r.digits), a = (e) => i ? i.formatToParts(e) : [];
174
+ return C(a(r.text)) ?? C(a(r.negative ? "-5" : "5")) ?? {
175
+ before: "",
176
+ after: "",
177
+ minusAt: -1
178
+ };
179
+ }, E = /* @__PURE__ */ new Set([
180
+ "Arab",
181
+ "Hebr",
182
+ "Thaa",
183
+ "Syrc",
184
+ "Nkoo",
185
+ "Adlm"
186
+ ]), D = /* @__PURE__ */ new Map(), O = (e) => {
187
+ let t = D.get(e);
188
+ if (t === void 0) {
189
+ try {
190
+ t = E.has(new Intl.Locale(e).maximize().script ?? "");
191
+ } catch {
192
+ t = !1;
193
+ }
194
+ D.set(e, t);
195
+ }
196
+ return t;
197
+ }, k = (e, t, n, r) => {
198
+ let i = m(e, t, n);
199
+ if (!r || !/\d/.test(e)) return i;
200
+ let a = e.startsWith("-"), o = T(r, e, n.minPrecision), { before: s, minusAt: c } = o, l = i.text, u = i.positions;
201
+ if (a) {
202
+ let e = t.minusPrefix.length;
203
+ l = l.slice(e), u = u.slice(1).map((t) => t - e), c === -1 && (c = s.length, s += "-");
204
+ }
205
+ let { after: d } = o;
206
+ O(r.tag) && /[\p{Script=Latin}\p{Sc}#%°‰]$/u.test(d) && (d += "‎");
207
+ let f = s.length;
208
+ return {
209
+ text: s + l + d,
210
+ positions: [...a ? [c] : [], ...u.map((e) => e + f)],
211
+ hole: [f, f + l.length],
212
+ shell: `${s}\u0000${d}`
213
+ };
214
+ }, A = ["¥", "¥"], j = [
215
+ "0",
216
+ "1",
217
+ "2",
218
+ "5",
219
+ "1.5",
220
+ "1234.5"
221
+ ], M = /* @__PURE__ */ new Map(), N = (e) => {
222
+ let n = `${e.tag}|${e.kind}|${e.code}`, r = M.get(n);
223
+ if (r) return r;
224
+ let i = /* @__PURE__ */ new Set(), a = b(e, null);
225
+ for (let e of j) for (let n of [e, `-${e}`]) for (let e of a?.formatToParts(n) ?? []) (e.type === "currency" || e.type === "unit") && i.add(e.value.replace(t, "").trim());
226
+ return e.kind === "currency" && i.add(e.code.toUpperCase()), [...i].some((e) => A.includes(e)) && A.forEach((e) => i.add(e)), i.delete(""), r = [...i].sort((e, t) => t.length - e.length), M.set(n, r), r;
227
+ }, P = /^([-−﹣-(+]?\s*)\p{L}[\p{L}\p{M}.]*\s*(?=[-−﹣-(\p{Sc}\p{Nd}])/u, F = (e, n) => {
228
+ if (!n) return e;
229
+ let r = e.replace(t, "");
230
+ for (let e of N(n)) {
231
+ let t = /\p{L}$/u.test(e) ? `${e}.` : null;
232
+ t && (r = r.split(t).join("")), r = r.split(e).join("");
233
+ }
234
+ return r.trim().replace(P, "$1");
235
+ }, ee = (e, t, n) => {
236
+ let r = w(e, t), i = b(n, r.digits, "name");
237
+ return i ? i.format(r.text) : e;
238
+ }, I = /* @__PURE__ */ new Map(), L = (e, t) => {
239
+ if (!Number.isFinite(e)) return "";
240
+ let n = Math.max(0, Math.min(100, t)), r = I.get(n);
241
+ r || (r = new Intl.NumberFormat("en", {
242
+ maximumFractionDigits: n,
243
+ numberingSystem: "latn",
244
+ useGrouping: !1
245
+ }), I.set(n, r));
246
+ let i = r.format(e);
247
+ return i === "-0" ? "0" : i;
248
+ }, R = (e) => {
249
+ if (e === "") return null;
250
+ if (!/\d/.test(e)) return;
251
+ let t = Number(e.endsWith(".") ? e.slice(0, -1) : e);
252
+ if (Number.isFinite(t)) return t === 0 ? 0 : t;
253
+ }, z = (e) => {
254
+ let { group: t } = e;
255
+ return t ? n.includes(t) ? n : r.includes(t) ? r : t : "";
256
+ }, B = (e) => e.replace(/[\\\]^-]/g, "\\$&"), V = /* @__PURE__ */ new Map(), H = (e) => {
257
+ let t = `${e.tag}|${e.decimal}|${e.group}`, n = V.get(t);
258
+ if (n) return n;
259
+ let r = z(e), i = e.primary, a = e.secondary, o = r ? `\\d{1,${a}}(?:[${B(r)}]\\d{${a}})*[${B(r)}]\\d{${i}}` : "(?!)", s = e.decimal.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
260
+ return n = RegExp(`^(-?)(\\d*|${o})(?:${s}(\\d*))?$`), V.set(t, n), n;
261
+ }, U = (e, t) => {
262
+ let n = f(e.trim()), r = H(t).exec(n);
263
+ if (!r) return null;
264
+ let [, i, a, o] = r, s = a.replace(/\D/g, "");
265
+ return !s && o === void 0 ? i ? "-" : "" : `${i}${s}${o === void 0 ? "" : `.${o}`}`;
266
+ }, W = (e) => {
267
+ let t = "";
268
+ for (let n of f(e)) n === i ? t += "." : (p(n) || n === "." || n === "," || n === "-") && (t += n);
269
+ let n = /^[^\d]*-/.test(t);
270
+ t = t.replace(/-/g, "");
271
+ let r = t.lastIndexOf(","), a = t.lastIndexOf("."), o;
272
+ if (r !== -1 && a !== -1) {
273
+ let e = Math.max(r, a);
274
+ o = [...t].map((t, n) => t === "," || t === "." ? n === e ? "." : "" : t).join("");
275
+ } else {
276
+ let e = r === -1 ? "." : ",";
277
+ o = t.split(e).length - 1 > 1 ? t.replaceAll(e, "") : t.replace(",", ".");
278
+ }
279
+ return `${n ? "-" : ""}${o}`;
280
+ }, G = /\p{Nd}/u, K = (e) => {
281
+ let t = e?.normalize("NFKC");
282
+ return t === "." || t === "," || t === i;
283
+ }, q = /^(\d+(?:[.,]\d+)?)[eE]([+-]?\d+)$/, J = `.,\u066b\u066c${n}${r}`, Y = (e) => {
284
+ let t = [...e], n = t.findIndex((e) => G.test(e));
285
+ if (n === -1) return null;
286
+ let r = (e) => e < t.length && G.test(t[e]), i = n, o = !1;
287
+ for (; i < t.length;) {
288
+ let e = t[i];
289
+ if (G.test(e)) i++;
290
+ else if (J.includes(e.normalize("NFKC")) && r(i + 1)) i++;
291
+ else if (!o && (e === "e" || e === "E")) {
292
+ let e = a.includes(t[i + 1]) || t[i + 1] === "+";
293
+ if (!r(i + (e ? 2 : 1))) break;
294
+ o = !0, i += e ? 2 : 1;
295
+ } else break;
296
+ }
297
+ let s = n;
298
+ K(t[s - 1]) && s--, K(t[i]) && i++;
299
+ let c = f(t.slice(0, s).join("")), l = t.slice(i).join(""), u = c.includes("-") || c.includes("(") && l.includes(")"), d = f(t.slice(s, i).join("")), p = q.exec(d);
300
+ if (p) {
301
+ let e = L(Number(`${p[1].replace(",", ".")}e${p[2]}`), 20);
302
+ return e && u ? `-${e}` : e;
303
+ }
304
+ return `${u ? "-" : ""}${d}`;
305
+ }, X = (e, t) => {
306
+ let n = Y(e) ?? e;
307
+ return U(n, t) ?? W(n);
308
+ }, Z = 20, Q = (e, t, n, r) => {
309
+ let a = d(n), { raw: o } = e;
310
+ if (p(a)) {
311
+ let n = t === 0 && o.startsWith("-") ? 1 : t;
312
+ return {
313
+ state: {
314
+ ...e,
315
+ raw: o.slice(0, n) + a + o.slice(n)
316
+ },
317
+ caret: n + 1
318
+ };
319
+ }
320
+ if (a === "-") return o.startsWith("-") ? {
321
+ state: {
322
+ ...e,
323
+ raw: o.slice(1)
324
+ },
325
+ caret: Math.max(0, t - 1)
326
+ } : {
327
+ state: {
328
+ ...e,
329
+ raw: `-${o}`
330
+ },
331
+ caret: t + 1
332
+ };
333
+ let s = a === i ? "." : a;
334
+ if (s !== "," && s !== "." || s === e.groupChar) return null;
335
+ let c = o.indexOf(".");
336
+ if (c === -1) return t === 0 && o.startsWith("-") ? null : {
337
+ state: {
338
+ ...e,
339
+ raw: o.slice(0, t) + "." + o.slice(t),
340
+ decChar: s
341
+ },
342
+ caret: t + 1
343
+ };
344
+ if (t === c && Math.min(r.minPrecision, r.maxPrecision) > 0) return {
345
+ state: {
346
+ ...e,
347
+ decChar: e.decChar || s
348
+ },
349
+ caret: t + 1
350
+ };
351
+ if (r.maxPrecision < 3 || t <= c) return null;
352
+ let l = e.decChar || r.localeKey, u = o.slice(0, c) + o.slice(c + 1);
353
+ if (s !== l) {
354
+ let e = t - 1;
355
+ return {
356
+ state: {
357
+ raw: u.slice(0, e) + "." + u.slice(e),
358
+ decChar: s,
359
+ groupChar: l
360
+ },
361
+ caret: e + 1
362
+ };
363
+ }
364
+ return {
365
+ state: {
366
+ raw: u,
367
+ decChar: "",
368
+ groupChar: s
369
+ },
370
+ caret: t - 1
371
+ };
372
+ }, te = (e, t, n) => {
373
+ let r = e, i = t, a = +!!r.startsWith("-");
374
+ r[a] === "." && (r = `${r.slice(0, a)}0${r.slice(a)}`, i > a && i++);
375
+ let o = r.indexOf(".");
376
+ if (o !== -1) {
377
+ let e = Math.max(0, n.maxPrecision);
378
+ r.length - o - 1 > e && (r = r.slice(0, o + 1 + e));
379
+ }
380
+ let s = r.length > Z;
381
+ return s && (r = r.slice(0, Z)), {
382
+ raw: r,
383
+ caret: Math.min(i, r.length),
384
+ cut: s
385
+ };
386
+ }, ne = (e, t, n) => {
387
+ let r = Math.min(n.minPrecision, n.maxPrecision), { raw: i } = e, a = Math.max(0, Math.min(t.start, i.length)), o = Math.max(a, Math.min(t.end, i.length)), s = {
388
+ ...e,
389
+ caret: a,
390
+ rejected: !0
391
+ }, c = a === o, l = i.indexOf("."), u = (e) => r > 0 && l !== -1 && e > l && e - l <= r, d = e, f = a;
392
+ switch (t.type) {
393
+ case "insert": {
394
+ d = {
395
+ ...e,
396
+ raw: i.slice(0, a) + i.slice(o)
397
+ }, a <= l && o > l && (d = {
398
+ ...d,
399
+ decChar: ""
400
+ });
401
+ let r = !c;
402
+ for (let e of t.text) {
403
+ let t = Q(d, f, e, n);
404
+ t && (d = t.state, f = t.caret, r = !0);
405
+ }
406
+ if (!r) return {
407
+ ...s,
408
+ caret: o
409
+ };
410
+ break;
411
+ }
412
+ case "paste": {
413
+ let e = i.slice(0, a) + i.slice(o), r = t.raw;
414
+ if (r.startsWith("-") && (a !== 0 || e.startsWith("-")) && (r = r.slice(1)), r.replace(/^-/, "").length > Z || (n.maxPrecision <= 0 && (r = r.replace(/\.\d*$/, "")), r.includes(".") && e.includes("."))) return {
415
+ ...s,
416
+ caret: o
417
+ };
418
+ d = {
419
+ raw: i.slice(0, a) + r + i.slice(o),
420
+ decChar: "",
421
+ groupChar: ""
422
+ }, f = a + r.length;
423
+ break;
424
+ }
425
+ case "deleteBackward":
426
+ case "deleteForward": {
427
+ if (!c) {
428
+ d = {
429
+ ...e,
430
+ raw: i.slice(0, a) + i.slice(o)
431
+ };
432
+ break;
433
+ }
434
+ let n = t.type === "deleteBackward" ? a - 1 : a;
435
+ if (n < 0 || n >= i.length) return s;
436
+ if (r > 0 && n === l) return {
437
+ ...e,
438
+ caret: t.type === "deleteBackward" ? l : l + 1,
439
+ rejected: !0
440
+ };
441
+ if (u(n) && n < i.length - 1) {
442
+ d = {
443
+ ...e,
444
+ raw: i.slice(0, n) + "0" + i.slice(n + 1)
445
+ }, f = t.type === "deleteBackward" ? n : n + 1;
446
+ break;
447
+ }
448
+ d = {
449
+ ...e,
450
+ raw: i.slice(0, n) + i.slice(n + 1)
451
+ }, f = n;
452
+ break;
453
+ }
454
+ case "deleteToStart":
455
+ case "deleteToEnd": {
456
+ let [n, r] = c ? t.type === "deleteToStart" ? [0, a] : [a, i.length] : [a, o];
457
+ if (n === r) return s;
458
+ d = {
459
+ ...e,
460
+ raw: i.slice(0, n) + i.slice(r)
461
+ }, f = n;
462
+ break;
463
+ }
464
+ }
465
+ t.type !== "insert" && t.type !== "paste" && !/\d/.test(d.raw) && (d = {
466
+ ...d,
467
+ raw: d.raw.replace(".", "")
468
+ }), d.raw.includes(".") || (d = {
469
+ ...d,
470
+ decChar: ""
471
+ });
472
+ let p = te(d.raw, f, n);
473
+ if ((t.type === "insert" || t.type === "paste") && p.cut) return {
474
+ ...s,
475
+ caret: o
476
+ };
477
+ let m = {
478
+ ...d,
479
+ raw: p.raw,
480
+ caret: p.caret,
481
+ rejected: !1
482
+ }, h = R(m.raw);
483
+ if (typeof h == "number" && h > n.max) {
484
+ let e = L(n.max, n.maxPrecision);
485
+ m = {
486
+ raw: e,
487
+ decChar: "",
488
+ groupChar: "",
489
+ caret: e.length,
490
+ rejected: !1
491
+ };
492
+ }
493
+ return {
494
+ ...m,
495
+ raw: $(m.raw, r)
496
+ };
497
+ }, $ = (e, t) => t > 0 && /\d/.test(e) && !e.includes(".") ? `${e}.` : e, re = (e, t) => typeof e == "number" ? L(e, t) : "", ie = { span: "minimal" };
498
+ //#endregion
499
+ export { e as PLAIN_SYMBOLS, x as affixOf, ne as applyEdit, l as currencyDigitsOf, h as displayIndexOf, k as formatAffixed, m as formatRaw, v as isShellOnly, d as normalizeChar, s as numberSymbolsOf, U as parseLocaleText, W as parseLooseText, re as rawAtRest, g as rawIndexOf, L as rawOfNumber, X as readText, _ as snapOffset, ee as spokenAffixed, F as stripAffix, R as valueOfRaw, $ as withPaddedMark, ie as writeStrategy };
@@ -21,6 +21,19 @@ export declare const BB_NUMBER_INPUT_PT: {
21
21
  readonly parts: readonly ["root", "label", "description", "message", "hint", "box", "input", "icon", "spinner", "prefix", "suffix", "clear"];
22
22
  readonly states: readonly ["hasValue", "readonly", "disabled", "warnings", "errors", "loading"];
23
23
  };
24
+ /**
25
+ * The 45 simple units `Intl.NumberFormat` sanctions (ECMA-402;
26
+ * `Intl.supportedValuesOf('unit')`).
27
+ */
28
+ export type BbNumberSimpleUnit = 'acre' | 'bit' | 'byte' | 'celsius' | 'centimeter' | 'day' | 'degree' | 'fahrenheit' | 'fluid-ounce' | 'foot' | 'gallon' | 'gigabit' | 'gigabyte' | 'gram' | 'hectare' | 'hour' | 'inch' | 'kilobit' | 'kilobyte' | 'kilogram' | 'kilometer' | 'liter' | 'megabit' | 'megabyte' | 'meter' | 'microsecond' | 'mile' | 'mile-scandinavian' | 'milliliter' | 'millimeter' | 'millisecond' | 'minute' | 'month' | 'nanosecond' | 'ounce' | 'percent' | 'petabyte' | 'pound' | 'second' | 'stone' | 'terabit' | 'terabyte' | 'week' | 'yard' | 'year';
29
+ /**
30
+ * A unit for `BbNumberInput`'s `unit`: a sanctioned simple unit, or two joined
31
+ * by `-per-` (`kilometer-per-hour`; the halves are not checked, so the
32
+ * manifest stays small). `square-meter` and `kilowatt` are not
33
+ * `Intl` units, so they are type errors. `percent` holds the number you see:
34
+ * 15 shows `15%`.
35
+ */
36
+ export type BbNumberUnit = BbNumberSimpleUnit | `${string}-per-${string}`;
24
37
  export type BbNumberInputProps = {
25
38
  [K in `pt:${BbNumberInputPtPart}` | `pt:${BbNumberInputPtPart}:${BbNumberInputPtState}`]?: PtValue;
26
39
  } & {
@@ -55,6 +68,15 @@ export type BbNumberInputProps = {
55
68
  * `--bb-input-py-compact`) instead.
56
69
  */
57
70
  compact?: boolean;
71
+ /**
72
+ * An ISO 4217 code (`'EUR'`, `'USD'`, `'JPY'`): the field shows the amount
73
+ * the locale's way, symbol included (`1.234,56 €` in Italian, `$1,234.56`
74
+ * in English), inside the text, so `#prefix` / `#suffix` stay free. The
75
+ * model is the number (`1234.56`). The decimals default to the currency's
76
+ * own; `minPrecision` / `maxPrecision` win when set. One or the other with
77
+ * `unit`.
78
+ */
79
+ currency?: string;
58
80
  /**
59
81
  * Visual variant of the field box — the same names and tokens as the
60
82
  * `BbButton` variants. Colours only: height, padding and border width are
@@ -163,11 +185,34 @@ export type BbNumberInputProps = {
163
185
  */
164
186
  max?: number;
165
187
  /**
166
- * Maximum precision of the number.
188
+ * Maximum precision of the number: fraction digits past it are refused as
189
+ * typed (never rounded). With `currency`, the currency's own digits (`2`
190
+ * for EUR, `0` for JPY, `3` for KWD), or `minPrecision` when that is larger.
167
191
  *
168
192
  * @defaultValue `8`
169
193
  */
170
194
  maxPrecision?: number;
195
+ /**
196
+ * Fraction digits always shown (`2`: `1` shows `1,00`, `1,5` shows `1,50`),
197
+ * also while typing, where the padding zeros are placeholders the user types
198
+ * over. The model stays the number (`1.5`). A `minPrecision` above
199
+ * `maxPrecision` gives way to it. Applies with `disableFormatting` too
200
+ * (the padding only, period decimal). With `currency`, the currency's own
201
+ * digits (`2` for EUR, `0` for JPY).
202
+ *
203
+ * @defaultValue `0`
204
+ */
205
+ minPrecision?: number;
206
+ /**
207
+ * Shows the number as typed, with a period decimal and no grouping — the
208
+ * field before Q60.25: no locale display, `name` on the visible input.
209
+ * Without it the field shows the number the locale's way while the user
210
+ * types (`10.005,6` in Italian), groups it for them, and posts the raw value
211
+ * (`10005.6`) through a hidden input carrying `name`.
212
+ *
213
+ * @defaultValue `false`
214
+ */
215
+ disableFormatting?: boolean;
171
216
  /**
172
217
  * Minimum value cap. Applied on blur and on Enter (before a surrounding
173
218
  * form submits), not while typing, so a value above a `min` greater than 1
@@ -217,6 +262,14 @@ export type BbNumberInputProps = {
217
262
  * @defaultValue `1`
218
263
  */
219
264
  step?: number;
265
+ /**
266
+ * A unit `Intl.NumberFormat` knows (`'kilogram'`, `'kilometer-per-hour'`,
267
+ * `'celsius'`, `'percent'`; a typo is a type error): the field shows it
268
+ * the locale's way inside the text (`20 kg`, `15 %`). The model is the number you see: `unit="percent"`
269
+ * showing `15 %` holds `15`, not `0.15`. One or the other with `currency`
270
+ * (set both and `currency` wins).
271
+ */
272
+ unit?: BbNumberUnit;
220
273
  } & FormFieldProps<number | string | null>;
221
274
  export type BbNumberInputEvents = {
222
275
  /**
@@ -0,0 +1,58 @@
1
+ import { Affix, PastePath } from './oracle';
2
+ export type CorpusCase = {
3
+ id: string;
4
+ field: string;
5
+ source: 'spreadsheet' | 'pdf' | 'web' | 'typed-elsewhere';
6
+ clipboard: string;
7
+ expected: number | null;
8
+ path: PastePath;
9
+ note: string;
10
+ /** The spec is silent or ambiguous here: see WAR-ROOM.md § Open questions. */
11
+ open?: string;
12
+ };
13
+ export declare const CORPUS: CorpusCase[];
14
+ /**
15
+ * A paste into an EMPTY currency / unit field (GROK-CURRENCY § 2 Paste, § 5
16
+ * Read-back; oracle `pasteIntoAffixed`). `shell`: the field's own shell was
17
+ * stripped (else the round-5 sign strip and the plain rule ran). `expected`
18
+ * is the model after the field's fraction cap (`maxPrecision`, the currency's
19
+ * own digits by default: oracle `capFraction`). Fields are built-in locale
20
+ * keys, so every row runs in the browser too.
21
+ */
22
+ export type AffixCase = Omit<CorpusCase, 'path'> & {
23
+ affix: Affix;
24
+ path: PastePath;
25
+ shell: boolean;
26
+ props?: {
27
+ maxPrecision?: number;
28
+ minPrecision?: number;
29
+ };
30
+ };
31
+ export declare const AFFIX_CORPUS: AffixCase[];
32
+ /**
33
+ * Shell STRUCTURE per locale (GROK-CURRENCY § 3), asserted by part type and
34
+ * order, never by a `format()` snapshot: which side the symbol sits on, and
35
+ * whether the minus of the negative shell comes before or after it. `symbol`
36
+ * pins the currency / unit part's text only where it is the trap itself.
37
+ * Tags no dictionary ships (`lt`, `ar-EG`, `hi-IN`) are engine-level rows.
38
+ */
39
+ export type ShellCase = {
40
+ id: string;
41
+ field: string;
42
+ affix: Affix;
43
+ side: 'prefix' | 'suffix';
44
+ minus: 'before-symbol' | 'after-symbol';
45
+ symbol?: string;
46
+ /** Two values whose shells must differ (plural-dependent units). */
47
+ plural?: [number, number];
48
+ engineOnly?: boolean;
49
+ note: string;
50
+ };
51
+ export declare const SHELL_CASES: ShellCase[];
52
+ /** Currency fraction digits from `resolvedOptions()`; `icu`: differs between ICU builds, assert in one pinned engine only. */
53
+ export declare const DIGIT_CASES: Array<{
54
+ code: string;
55
+ min: number;
56
+ max: number;
57
+ icu?: boolean;
58
+ }>;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Rows shared by `currency-verify.node.test.ts` and `currency-verify.test.ts`
3
+ * (lane 10 verifier). Tags outside the built-in locale table (`en-PK`,
4
+ * `es-PY`, `es-CL`, `vi`, `is`) are engine-only: the component cannot be
5
+ * mounted in them, so the browser file skips them (as `SHELL_CASES`
6
+ * `engineOnly`).
7
+ */
8
+ export declare const ENGINE_ONLY_TAGS: Set<string>;
9
+ export declare const OWN_DOTTED_ROWS: readonly [readonly ["en-PK", {
10
+ readonly currency: "PKR";
11
+ }, "Rs.1,234", 1234], readonly ["en-PK", {
12
+ readonly currency: "PKR";
13
+ }, "-Rs.1,234", -1234], readonly ["en-PK", {
14
+ readonly currency: "PKR";
15
+ }, "Rs.12", 12], readonly ["sv", {
16
+ readonly currency: "SEK";
17
+ }, "kr.12", 12], readonly ["nb", {
18
+ readonly currency: "NOK";
19
+ }, "kr.12", 12], readonly ["sv", {
20
+ readonly currency: "SEK";
21
+ }, "1 234,50kr.", 1234.5], readonly ["nb", {
22
+ readonly currency: "NOK";
23
+ }, "1 234,50kr.", 1234.5], readonly ["en", {
24
+ readonly unit: "kilogram";
25
+ }, "kg.12", 12], readonly ["en", {
26
+ readonly currency: "USD";
27
+ }, "+Rs.1,234", 1234]];
28
+ export declare const ZERO_DIGIT_OWN_ROWS: readonly [readonly ["es-PY", "PYG", 1234], readonly ["es-PY", "PYG", 12345], readonly ["es-CL", "CLP", 1234], readonly ["vi", "VND", 1234], readonly ["is", "ISK", 1234], readonly ["de", "JPY", 1234], readonly ["de", "KRW", 12345], readonly ["it", "JPY", 12345], readonly ["es", "CLP", 12345], readonly ["nl", "JPY", 1234], readonly ["da", "ISK", 1234], readonly ["pt-BR", "JPY", 12345], readonly ["tr", "JPY", 1234]];
@@ -0,0 +1,2 @@
1
+ import { Affix } from './oracle';
2
+ export declare const FOREIGN_DOT_ROWS: Array<readonly [locale: string, affix: Affix, text: string, expected: number]>;