bitboss-ui 3.0.0-beta.2 β 3.0.0-beta.21
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.
- package/README.md +72 -33
- package/dist/ai/BbAccordion.md +3 -3
- package/dist/ai/BbAlert.md +9 -5
- package/dist/ai/BbAsterisk.md +17 -0
- package/dist/ai/BbAvatar.md +12 -3
- package/dist/ai/BbBadge.md +15 -10
- package/dist/ai/BbBadgeButton.md +16 -16
- package/dist/ai/BbBaseButton.md +16 -16
- package/dist/ai/BbBaseCheckbox.md +8 -8
- package/dist/ai/BbBaseCheckboxGroup.md +13 -13
- package/dist/ai/BbBaseCheckboxIcon.md +26 -9
- package/dist/ai/BbBaseColorInput.md +11 -11
- package/dist/ai/BbBaseDatePicker.md +6 -6
- package/dist/ai/BbBaseDatePickerInput.md +15 -15
- package/dist/ai/BbBaseInputContainer.md +12 -12
- package/dist/ai/BbBaseNumberInput.md +8 -8
- package/dist/ai/BbBaseRadio.md +5 -5
- package/dist/ai/BbBaseRadioGroup.md +7 -7
- package/dist/ai/BbBaseRadioIcon.md +25 -9
- package/dist/ai/BbBaseRating.md +5 -5
- package/dist/ai/BbBaseSelect.md +22 -21
- package/dist/ai/BbBaseSlider.md +9 -9
- package/dist/ai/BbBaseSwitch.md +8 -8
- package/dist/ai/BbBaseSwitchGroup.md +13 -13
- package/dist/ai/BbBaseSwitchIcon.md +28 -10
- package/dist/ai/BbBaseTag.md +10 -10
- package/dist/ai/BbBaseTextInput.md +9 -9
- package/dist/ai/BbBaseTextarea.md +9 -9
- package/dist/ai/BbBaseTimePickerInput.md +13 -13
- package/dist/ai/BbBreadcrumbs.md +2 -2
- package/dist/ai/BbButton.md +15 -15
- package/dist/ai/BbCheckbox.md +18 -17
- package/dist/ai/BbCheckboxGroup.md +15 -14
- package/dist/ai/BbCollapsible.md +11 -9
- package/dist/ai/BbColorInput.md +15 -15
- package/dist/ai/BbColorPalette.md +12 -6
- package/dist/ai/BbConfirm.md +12 -5
- package/dist/ai/BbDatePicker.md +13 -13
- package/dist/ai/BbDatePickerInput.md +20 -20
- package/dist/ai/BbDialog.md +78 -12
- package/dist/ai/BbDropdown.md +132 -22
- package/dist/ai/BbDropdownButton.md +12 -12
- package/dist/ai/BbDropdownGroup.md +1 -1
- package/dist/ai/BbDropzone.md +4 -4
- package/dist/ai/BbForm.md +49 -14
- package/dist/ai/BbIcon.md +6 -0
- package/dist/ai/BbIndicator.md +5 -5
- package/dist/ai/BbNumberInput.md +11 -11
- package/dist/ai/BbOffCanvas.md +90 -20
- package/dist/ai/BbPagination.md +3 -3
- package/dist/ai/BbPopover.md +32 -17
- package/dist/ai/BbProgress.md +7 -4
- package/dist/ai/BbRadio.md +16 -15
- package/dist/ai/BbRadioGroup.md +20 -17
- package/dist/ai/BbRating.md +11 -11
- package/dist/ai/BbSelect.md +138 -37
- package/dist/ai/BbSelectPopover.md +40 -41
- package/dist/ai/BbSlider.md +37 -22
- package/dist/ai/BbSmoothHeight.md +1 -1
- package/dist/ai/BbSwitch.md +25 -10
- package/dist/ai/BbSwitchGroup.md +17 -14
- package/dist/ai/BbTable.md +920 -109
- package/dist/ai/BbTabs.md +28 -14
- package/dist/ai/BbTabsList.md +1 -1
- package/dist/ai/BbTabsPanes.md +1 -1
- package/dist/ai/BbTabsRoot.md +10 -10
- package/dist/ai/BbTag.md +14 -14
- package/dist/ai/BbTextInput.md +16 -15
- package/dist/ai/BbTextarea.md +13 -13
- package/dist/ai/BbTimePicker.md +10 -10
- package/dist/ai/BbTimePickerInput.md +17 -17
- package/dist/ai/BbToast.md +1 -1
- package/dist/ai/BbToastPortal.md +1 -1
- package/dist/ai/BbTooltip.md +12 -10
- package/dist/ai/BbTree.md +1 -1
- package/dist/ai/ChipsBox.md +1 -1
- package/dist/ai/CommonInputWrapper.md +10 -10
- package/dist/ai/CommonPopover.md +6 -6
- package/dist/ai/FlatListBox.md +5 -5
- package/dist/ai/GroupedListBox.md +5 -5
- package/dist/ai/ListBox.md +4 -4
- package/dist/ai/OptionsContainer.md +4 -4
- package/dist/ai/changelog.json +128 -2
- package/dist/ai/components.json +917 -100
- package/dist/ai/composables/useBbConfig.md +72 -11
- package/dist/ai/composables/useConfirm.md +5 -3
- package/dist/ai/guides/ai-router.md +9 -4
- package/dist/ai/guides/component-picker.md +18 -18
- package/dist/ai/guides/design-language.md +14 -14
- package/dist/ai/guides/design-tokens.md +25 -18
- package/dist/ai/guides/fetch-items-playbook.md +1 -1
- package/dist/ai/guides/icons-policy.md +11 -5
- package/dist/ai/guides/installation-and-plugin-setup.md +85 -23
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +30 -0
- package/dist/ai/guides/migration/components/bb-checkbox.md +37 -3
- package/dist/ai/guides/migration/components/bb-collapsible.md +5 -5
- package/dist/ai/guides/migration/components/bb-dialog.md +62 -34
- package/dist/ai/guides/migration/components/bb-offcanvas.md +29 -13
- package/dist/ai/guides/migration/components/bb-rating.md +8 -2
- package/dist/ai/guides/migration/components/bb-select.md +5 -2
- package/dist/ai/guides/migration/components/bb-table.md +560 -28
- package/dist/ai/guides/migration/components/bb-text-input.md +6 -6
- package/dist/ai/guides/migration/v2-to-v3.md +260 -89
- package/dist/ai/guides/ssr-prefill.md +120 -0
- package/dist/ai/index.md +10 -9
- package/dist/ai/recipes/inertia/approvals-inbox.md +0 -1
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +0 -1
- package/dist/ai/recipes/inertia/layout-scaffold.md +5 -1
- package/dist/ai/recipes/inertia/ownership-atlas.md +49 -29
- package/dist/ai/recipes/inertia/record-form.md +0 -1
- package/dist/ai/recipes/inertia/records-workspace.md +26 -8
- package/dist/ai/recipes/inertia/upload-center.md +0 -1
- package/dist/ai/recipes/nuxt/approvals-inbox.md +0 -1
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +0 -1
- package/dist/ai/recipes/nuxt/layout-scaffold.md +5 -1
- package/dist/ai/recipes/nuxt/record-form.md +0 -1
- package/dist/ai/recipes/nuxt/records-workspace.md +26 -8
- package/dist/ai/recipes/nuxt/upload-center.md +0 -1
- package/dist/ai/recipes/vue/approvals-inbox.md +0 -1
- package/dist/ai/recipes/vue/inline-edit-workspace.md +0 -1
- package/dist/ai/recipes/vue/layout-scaffold.md +5 -1
- package/dist/ai/recipes/vue/records-workspace.md +26 -8
- package/dist/ai/recipes/vue/upload-center.md +0 -1
- package/dist/ai/source/BbAlert.md +60 -2
- package/dist/ai/source/BbAvatar.md +3 -3
- package/dist/ai/source/BbBadge.md +60 -15
- package/dist/ai/source/BbBadgeButton.md +8 -2
- package/dist/ai/source/BbBaseButton.md +3 -1
- package/dist/ai/source/BbBaseCheckboxGroup.md +6 -2
- package/dist/ai/source/BbBaseDatePicker.md +3 -1
- package/dist/ai/source/BbBaseDatePickerInput.md +5 -1
- package/dist/ai/source/BbBaseInputContainer.md +52 -1
- package/dist/ai/source/BbBaseRadioGroup.md +4 -0
- package/dist/ai/source/BbBaseRating.md +3 -1
- package/dist/ai/source/BbBaseSelect.md +71 -16
- package/dist/ai/source/BbBaseSwitchGroup.md +4 -0
- package/dist/ai/source/BbBaseTimePickerInput.md +5 -1
- package/dist/ai/source/BbBreadcrumbs.md +31 -0
- package/dist/ai/source/BbButton.md +51 -24
- package/dist/ai/source/BbCheckbox.md +15 -1
- package/dist/ai/source/BbCheckboxGroup.md +2 -1
- package/dist/ai/source/BbCollapsible.md +7 -1
- package/dist/ai/source/BbColorInput.md +3 -4
- package/dist/ai/source/BbColorPalette.md +3 -4
- package/dist/ai/source/BbDatePicker.md +5 -1
- package/dist/ai/source/BbDatePickerInput.md +5 -1
- package/dist/ai/source/BbDialog.md +175 -19
- package/dist/ai/source/BbDropdown.md +376 -69
- package/dist/ai/source/BbDropdownGroup.md +330 -59
- package/dist/ai/source/BbForm.md +93 -5
- package/dist/ai/source/BbIcon.md +46 -36
- package/dist/ai/source/BbNumberInput.md +3 -4
- package/dist/ai/source/BbOffCanvas.md +474 -194
- package/dist/ai/source/BbPopover.md +24 -17
- package/dist/ai/source/BbProgress.md +2 -2
- package/dist/ai/source/BbRadio.md +15 -1
- package/dist/ai/source/BbRadioGroup.md +3 -1
- package/dist/ai/source/BbSelect.md +50 -2
- package/dist/ai/source/BbSelectPopover.md +171 -23
- package/dist/ai/source/BbSlider.md +3 -4
- package/dist/ai/source/BbSwitch.md +15 -1
- package/dist/ai/source/BbSwitchGroup.md +8 -5
- package/dist/ai/source/BbTable.md +5092 -1446
- package/dist/ai/source/BbTabs.md +6 -7
- package/dist/ai/source/BbTabsList.md +6 -7
- package/dist/ai/source/BbTabsPanes.md +6 -7
- package/dist/ai/source/BbTabsRoot.md +6 -7
- package/dist/ai/source/BbTag.md +3 -4
- package/dist/ai/source/BbTextInput.md +3 -4
- package/dist/ai/source/BbTextarea.md +3 -4
- package/dist/ai/source/BbTimePicker.md +4 -1
- package/dist/ai/source/BbTimePickerInput.md +5 -1
- package/dist/ai/source/BbToast.md +3 -1
- package/dist/ai/source/BbTooltip.md +5 -1
- package/dist/ai/source/CommonInputWrapper.md +4 -0
- package/dist/ai/source/CommonPopover.md +6 -0
- package/dist/ai/source/FlatListBox.md +11 -5
- package/dist/ai/source/GroupedListBox.md +7 -5
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/BbAlert/types.d.ts +10 -1
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -1
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +33 -33
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +22 -16
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +36 -15
- package/dist/components/BbBadge/badgeButtonContext.d.ts +21 -8
- package/dist/components/BbBadge/types.d.ts +8 -2
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +47 -47
- package/dist/components/BbBaseButton/RouterComponent.vue_vue_type_script_setup_true_lang.js +14 -14
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue_vue_type_script_setup_true_lang.js +30 -28
- package/dist/components/BbBaseCheckboxGroup/types.d.ts +2 -2
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue_vue_type_script_setup_true_lang.js +167 -167
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue.d.ts +9 -9
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue_vue_type_script_setup_true_lang.js +78 -78
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue_vue_type_script_setup_true_lang.js +64 -64
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue.d.ts +1 -1
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue_vue_type_script_setup_true_lang.js +138 -138
- package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbBaseRadioGroup/BbBaseRadioGroup.vue_vue_type_script_setup_true_lang.js +24 -22
- package/dist/components/BbBaseRating/BbBaseRating.vue_vue_type_script_setup_true_lang.js +40 -40
- package/dist/components/BbBaseSelect/BbBaseSelect.vue_vue_type_script_setup_true_lang.js +74 -65
- package/dist/components/BbBaseSelect/types.d.ts +22 -0
- package/dist/components/BbBaseSlider/BbBaseSlider.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue_vue_type_script_setup_true_lang.js +30 -28
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue.d.ts +1 -1
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue_vue_type_script_setup_true_lang.js +104 -104
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +35 -35
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +85 -81
- package/dist/components/BbCheckboxGroup/types.d.ts +2 -1
- package/dist/components/BbCollapsible/types.d.ts +7 -1
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +1 -1
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +18 -18
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +2 -2
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +50 -50
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +100 -100
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +21 -21
- package/dist/components/BbDialog/BbDialog.vue.d.ts +1 -1
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +133 -107
- package/dist/components/BbDialog/types.d.ts +29 -2
- package/dist/components/BbDropdown/AdaptiveDropdown.vue.d.ts +2 -0
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +99 -100
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +2 -2
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +208 -201
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +225 -208
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +21 -21
- package/dist/components/BbDropdown/types.d.ts +20 -5
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/BbIcon/BbIcon.vue_vue_type_script_setup_true_lang.js +46 -46
- package/dist/components/BbIcon/iconCache.d.ts +33 -0
- package/dist/components/BbIcon/iconCache.js +17 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +1 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +15 -15
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +1 -1
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +254 -208
- package/dist/components/BbOffCanvas/types.d.ts +30 -5
- package/dist/components/BbPagination/BbPagination.vue.d.ts +1 -1
- package/dist/components/BbPopover/BbPopover.vue.d.ts +2 -2
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +149 -146
- package/dist/components/BbPopover/types.d.ts +3 -2
- package/dist/components/BbRadioGroup/types.d.ts +3 -1
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +27 -23
- package/dist/components/BbSelect/types.d.ts +32 -0
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +221 -213
- package/dist/components/BbSlider/BbSlider.vue.d.ts +1 -1
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +20 -20
- package/dist/components/BbTable/BbTable.vue.d.ts +10 -4
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1433 -600
- package/dist/components/BbTable/BbTableDataRow.d.ts +162 -0
- package/dist/components/BbTable/BbTableDataRow.js +136 -0
- package/dist/components/BbTable/BbTableExpandRow.d.ts +73 -0
- package/dist/components/BbTable/BbTableExpandRow.js +52 -0
- package/dist/components/BbTable/types.d.ts +324 -111
- package/dist/components/BbTable/utils.d.ts +92 -4
- package/dist/components/BbTable/utils.js +71 -36
- package/dist/components/BbTabs/types.d.ts +0 -8
- package/dist/components/BbTag/BbTag.vue.d.ts +1 -1
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +18 -18
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +1 -1
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +18 -18
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +1 -1
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +54 -54
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +1 -1
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +80 -80
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +61 -61
- package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +13 -13
- package/dist/components/BbTooltip/types.d.ts +5 -1
- package/dist/components/ChipsBox/ChipsBox.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +83 -83
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +56 -56
- package/dist/composables/useBaseOptions.js +30 -20
- package/dist/composables/useBbConfig.d.ts +27 -6
- package/dist/composables/useBbConfig.js +8 -2
- package/dist/composables/useConfig.d.ts +59 -0
- package/dist/composables/useConfig.js +9 -0
- package/dist/composables/useItemsGetter.d.ts +11 -0
- package/dist/composables/useItemsGetter.js +44 -18
- package/dist/composables/useLocale.js +10 -7
- package/dist/composables/useMobile.js +5 -5
- package/dist/composables/usePrefill.d.ts +21 -2
- package/dist/composables/usePrefill.js +25 -19
- package/dist/composables/useSsrState.d.ts +20 -0
- package/dist/composables/useSsrState.js +13 -0
- package/dist/composables/useTableWidthContext.d.ts +24 -4
- package/dist/composables/useTableWidthContext.js +31 -28
- package/dist/composables/useToast.js +5 -5
- package/dist/deprecation/ai-deprecations.json.d.ts +121 -11
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/directives/bbDropdown.d.ts +15 -4
- package/dist/directives/bbDropdown.js +31 -9
- package/dist/directives/createPopoverDirective.d.ts +62 -0
- package/dist/directives/createPopoverDirective.js +63 -23
- package/dist/i18n/locales/cs.json +4 -1
- package/dist/i18n/locales/da.json +4 -1
- package/dist/i18n/locales/de.json +4 -1
- package/dist/i18n/locales/el.json +4 -1
- package/dist/i18n/locales/en.json +4 -1
- package/dist/i18n/locales/es.json +4 -1
- package/dist/i18n/locales/fi.json +4 -1
- package/dist/i18n/locales/fr.json +4 -1
- package/dist/i18n/locales/hu.json +4 -1
- package/dist/i18n/locales/it.json +4 -1
- package/dist/i18n/locales/ja.json +4 -1
- package/dist/i18n/locales/ko.json +4 -1
- package/dist/i18n/locales/nb.json +4 -1
- package/dist/i18n/locales/nl.json +4 -1
- package/dist/i18n/locales/pl.json +4 -1
- package/dist/i18n/locales/pt.json +4 -1
- package/dist/i18n/locales/ro.json +4 -1
- package/dist/i18n/locales/ru.json +4 -1
- package/dist/i18n/locales/sv.json +4 -1
- package/dist/i18n/locales/tr.json +4 -1
- package/dist/i18n/locales/uk.json +4 -1
- package/dist/i18n/locales/zh-cn.json +4 -1
- package/dist/index.d.ts +7 -2
- package/dist/index.js +69 -67
- package/dist/llms-full.txt +3997 -1458
- package/dist/llms-medium.txt +140 -73
- package/dist/llms.txt +7 -6
- package/dist/locale-blueprint.json +4 -1
- package/dist/nuxt-auto-imports.d.ts +100 -0
- package/dist/nuxt-auto-imports.js +55 -0
- package/dist/nuxt-module.d.ts +22 -1
- package/dist/nuxt.js +22 -8
- package/dist/plugin.d.ts +10 -1
- package/dist/plugin.js +20 -19
- package/dist/runtime/nuxt-plugin.js +28 -21
- package/dist/styles.css +1 -1
- package/dist/utilities/misc/listboxMetrics.d.ts +3 -3
- package/dist/utilities/misc/listboxMetrics.js +2 -2
- package/dist/utilities/misc/ssrStateInjectionKey.d.ts +42 -0
- package/dist/utilities/misc/ssrStateInjectionKey.js +4 -0
- package/dist/validated/BbForm.vue_vue_type_script_setup_true_lang.js +45 -27
- package/dist/validated/BbSelect.vue.d.ts +2 -0
- package/dist/validated/BbSelect.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/validated/useValidatedField.js +25 -23
- package/dist/vite.js +7 -3
- package/llms.txt +8 -7
- package/package.json +2 -2
- package/scripts/lib/eslint-plugin.d.ts +19 -1
- package/scripts/lib/eslint-plugin.mjs +155 -14
- package/scripts/lib/html-attributes.mjs +91 -0
- package/scripts/lib/validate-bb-markup.mjs +59 -11
- package/dist/assets/svgs/sort.svg_raw.js +0 -4
- package/dist/components/BbBadge/BadgeAppendIcon.vue.d.ts +0 -3
- package/dist/components/BbBadge/BadgeAppendIcon.vue.js +0 -5
- package/dist/components/BbBadge/BadgeAppendIcon.vue_vue_type_script_setup_true_lang.js +0 -22
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { InjectionKey } from 'vue';
|
|
2
|
+
import { ResolvedConfig } from '../types/Config';
|
|
3
|
+
/**
|
|
4
|
+
* Per-app runtime config (Q18.2).
|
|
5
|
+
*
|
|
6
|
+
* ## The problem this replaces
|
|
7
|
+
*
|
|
8
|
+
* `virtual:bitboss-ui/config` is a module-level `reactive({...})` β ONE object
|
|
9
|
+
* for the whole JS module graph, i.e. one per Node process under SSR. Writing
|
|
10
|
+
* to it (`setConfig({ locale })`) therefore wrote for every visitor being
|
|
11
|
+
* served at that moment, not just the one who asked. The victim was never the
|
|
12
|
+
* person who triggered it, and the damage was visible: every library string β
|
|
13
|
+
* a table's no-data text, select-all, pagination, close buttons β comes from
|
|
14
|
+
* this object and is baked into the HTML crawlers and JS-disabled readers get.
|
|
15
|
+
*
|
|
16
|
+
* ## The shape now
|
|
17
|
+
*
|
|
18
|
+
* The virtual module keeps its job as the **build-time defaults**, which is
|
|
19
|
+
* what it always was: values resolved from the Vite plugin's options. What
|
|
20
|
+
* changed is that they are no longer the runtime store. `bitbossUiPlugin`
|
|
21
|
+
* provides a reactive CLONE per app, and SSR already gives every request its
|
|
22
|
+
* own app instance β so per-app is per-request for free, with no new concept
|
|
23
|
+
* for consumers to learn.
|
|
24
|
+
*
|
|
25
|
+
* ## Reading it
|
|
26
|
+
*
|
|
27
|
+
* `useConfig()` from a component (or from a composable a component calls)
|
|
28
|
+
* returns that app's config. With no injection context at all there is no app
|
|
29
|
+
* to ask, so it returns the build-time defaults β the guard is what keeps that
|
|
30
|
+
* silent instead of tripping Vue's "inject() can only be used inside setup()"
|
|
31
|
+
* warning.
|
|
32
|
+
*
|
|
33
|
+
* The guard is `hasInjectionContext()`, NOT `getCurrentInstance()` (Q20.4).
|
|
34
|
+
* The two agree inside a component, but they differ in the one place that
|
|
35
|
+
* matters for SSR: `app.runWithContext(fn)` has an injection context and NO
|
|
36
|
+
* component instance. That is the shape of a framework plugin β a Nuxt plugin
|
|
37
|
+
* setting a per-request locale β and under `getCurrentInstance()` such a call
|
|
38
|
+
* silently resolved to the process-global instead of the app it was made for.
|
|
39
|
+
* Measured: at module scope both are false; in setup both true; inside
|
|
40
|
+
* `app.runWithContext` only `hasInjectionContext()` is true.
|
|
41
|
+
*
|
|
42
|
+
* A call site that reads a **build-time** value (a media query string, the SSR
|
|
43
|
+
* viewport seed, plugin-install options) should keep importing the virtual
|
|
44
|
+
* module directly: those are not per-visitor, they are resolved once at build,
|
|
45
|
+
* and routing them through an injection would only imply a flexibility that
|
|
46
|
+
* does not exist.
|
|
47
|
+
*/
|
|
48
|
+
export declare const BB_CONFIG_KEY: InjectionKey<ResolvedConfig>;
|
|
49
|
+
/**
|
|
50
|
+
* A fresh, independent config for one app. Spread rather than shared, so two
|
|
51
|
+
* apps in the same process cannot see each other's writes.
|
|
52
|
+
*/
|
|
53
|
+
export declare const createAppConfig: (overrides?: Partial<ResolvedConfig>) => ResolvedConfig;
|
|
54
|
+
/**
|
|
55
|
+
* The active config: this app's, or the build-time defaults when called
|
|
56
|
+
* outside an app (module scope, a store created before mount, a plain
|
|
57
|
+
* function).
|
|
58
|
+
*/
|
|
59
|
+
export declare const useConfig: () => ResolvedConfig;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { hasInjectionContext as e, inject as t, reactive as n } from "vue";
|
|
2
|
+
import { config as r } from "virtual:bitboss-ui/config";
|
|
3
|
+
//#region src/composables/useConfig.ts
|
|
4
|
+
var i = Symbol("bitboss-ui:config"), a = (e) => n({
|
|
5
|
+
...r,
|
|
6
|
+
...e
|
|
7
|
+
}), o = () => e() ? t(i, r) : r;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { i as BB_CONFIG_KEY, a as createAppConfig, o as useConfig };
|
|
@@ -7,6 +7,17 @@ export declare const useItemsGetter: (options: Options) => {
|
|
|
7
7
|
getter: (...args: any[]) => Promise<void>;
|
|
8
8
|
debouncedGetter: (...args: any[]) => Promise<void>;
|
|
9
9
|
items: import('vue').ShallowRef<any[], any[]>;
|
|
10
|
+
/**
|
|
11
|
+
* Can the client rebuild this load unaided? True for a plain ARRAY source:
|
|
12
|
+
* it arrives as a prop, so the server may resolve it even where no
|
|
13
|
+
* SSR-state adapter exists. Consumers hand it to `usePrefill`.
|
|
14
|
+
*/
|
|
15
|
+
clientReproducible: import('vue').ComputedRef<boolean>;
|
|
16
|
+
/**
|
|
17
|
+
* Plain boolean, not a ref: it is decided once, in setup, before the first
|
|
18
|
+
* render, and nothing can flip it afterwards.
|
|
19
|
+
*/
|
|
20
|
+
hydratedFromSsr: boolean;
|
|
10
21
|
loading: import('vue').ComputedRef<boolean>;
|
|
11
22
|
};
|
|
12
23
|
export {};
|
|
@@ -1,30 +1,56 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { useHydrated as e } from "./useHydrated.js";
|
|
2
|
+
import { isServerRender as t, useSsrState as n } from "./useSsrState.js";
|
|
3
|
+
import { computed as r, ref as i, shallowRef as a, unref as o, useId as s } from "vue";
|
|
4
|
+
import { useDebounceFn as c } from "@vueuse/core";
|
|
3
5
|
//#region src/composables/useItemsGetter.ts
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
var l = (e) => {
|
|
7
|
+
if (!Array.isArray(e)) return !1;
|
|
8
|
+
let t = e.find((e) => e && typeof e == "object");
|
|
9
|
+
return !t || !Object.values(t).some((e) => typeof e == "function" || typeof e == "symbol");
|
|
10
|
+
}, u = (u) => {
|
|
11
|
+
let d = r(() => o(u.items)), f = a([]), p = i(0), m = 0, h = n(), g = `bb-items:${s()}`, _ = !1, v = null;
|
|
12
|
+
if (h.enabled && !t) {
|
|
13
|
+
let e = h.get(g);
|
|
14
|
+
Array.isArray(e) && (f.value = e, v = e, _ = !0);
|
|
15
|
+
}
|
|
16
|
+
let y = (e) => {
|
|
17
|
+
if (!(!h.enabled || !t)) {
|
|
18
|
+
if (!l(e)) {
|
|
19
|
+
process.env.NODE_ENV !== "production" && console.warn("[bitboss-ui] An `items` provider resolved rows that cannot be serialized into the SSR payload (a row carries a function or a symbol β a class instance or an ORM model, most likely). The server-rendered options were dropped so hydration still matches; the client will fetch them again. Return plain objects to keep the server-side resolution."), f.value = [];
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
h.set(g, e);
|
|
23
|
+
}
|
|
24
|
+
}, b = async (...e) => {
|
|
25
|
+
if (Array.isArray(d.value)) {
|
|
26
|
+
++m, f.value = d.value;
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
if (typeof d.value != "function") return;
|
|
30
|
+
if (v) {
|
|
31
|
+
let e = v;
|
|
32
|
+
v = null, ++m, f.value = e;
|
|
8
33
|
return;
|
|
9
34
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
c.value++;
|
|
35
|
+
let t = ++m;
|
|
36
|
+
p.value++;
|
|
13
37
|
try {
|
|
14
|
-
let n = await
|
|
15
|
-
t ===
|
|
38
|
+
let n = await d.value(...e);
|
|
39
|
+
t === m && (f.value = n, y(n));
|
|
16
40
|
} catch (e) {
|
|
17
41
|
console.error(e);
|
|
18
42
|
} finally {
|
|
19
|
-
|
|
43
|
+
p.value--;
|
|
20
44
|
}
|
|
21
|
-
},
|
|
45
|
+
}, x = c(b, u.debounce || 0), S = (...e) => Array.isArray(d.value) ? b(...e) : x(...e), { isHydrated: C } = e();
|
|
22
46
|
return {
|
|
23
|
-
getter:
|
|
24
|
-
debouncedGetter:
|
|
25
|
-
items:
|
|
26
|
-
|
|
47
|
+
getter: b,
|
|
48
|
+
debouncedGetter: S,
|
|
49
|
+
items: f,
|
|
50
|
+
clientReproducible: r(() => Array.isArray(d.value)),
|
|
51
|
+
hydratedFromSsr: _,
|
|
52
|
+
loading: r(() => C.value ? p.value > 0 : !1)
|
|
27
53
|
};
|
|
28
54
|
};
|
|
29
55
|
//#endregion
|
|
30
|
-
export {
|
|
56
|
+
export { u as useItemsGetter };
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { useConfig as e } from "./useConfig.js";
|
|
2
|
+
import { get as t } from "../utilities/functions/get.js";
|
|
3
3
|
import { computed as n, readonly as r } from "vue";
|
|
4
4
|
import { locales as i } from "virtual:bitboss-ui/locales";
|
|
5
5
|
//#region src/composables/useLocale.ts
|
|
6
|
-
var a = (
|
|
7
|
-
let
|
|
8
|
-
return
|
|
9
|
-
}
|
|
6
|
+
var a = () => {
|
|
7
|
+
let a = e();
|
|
8
|
+
return { t: (e, ...o) => r(n(() => {
|
|
9
|
+
let n = i[a.locale] ?? {}, r = i[a.defaultLocale] ?? {}, s = t(n, e) ?? t(r, e) ?? e;
|
|
10
|
+
return String(s).replace(/\{(\d+)\}/g, (e, t) => o[Number(t)]);
|
|
11
|
+
})) };
|
|
12
|
+
};
|
|
10
13
|
//#endregion
|
|
11
|
-
export {
|
|
14
|
+
export { a as useLocale };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { computed as e, ref as t } from "vue";
|
|
2
|
+
import { config as n } from "virtual:bitboss-ui/config";
|
|
3
3
|
//#region src/composables/useMobile.ts
|
|
4
|
-
var r = `(max-width: ${
|
|
4
|
+
var r = `(max-width: ${n.mobileMaxWidth - .02}px)`, i = typeof window < "u" && typeof window.matchMedia == "function", a = n.ssrViewportWidth < n.mobileMaxWidth, o = t(i ? window.matchMedia(r).matches : a);
|
|
5
5
|
i && window.matchMedia(r).addEventListener("change", (e) => {
|
|
6
6
|
o.value = e.matches;
|
|
7
7
|
});
|
|
8
|
-
var s =
|
|
8
|
+
var s = t(!i);
|
|
9
9
|
i && queueMicrotask(() => {
|
|
10
10
|
s.value = !0;
|
|
11
11
|
});
|
|
12
|
-
var c =
|
|
12
|
+
var c = t(null), l = t(null), u = e(() => c.value == null ? l.value ?? s.value ? o.value : a : c.value), d = () => ({ isMobile: u });
|
|
13
13
|
//#endregion
|
|
14
14
|
export { d as useMobile };
|
|
@@ -12,9 +12,28 @@ type Options = {
|
|
|
12
12
|
trigger?: MaybeRefOrGetter<boolean>;
|
|
13
13
|
multiple?: boolean;
|
|
14
14
|
currentValue?: MaybeRefOrGetter<any>;
|
|
15
|
+
/**
|
|
16
|
+
* "The first load already happened β don't do it again."
|
|
17
|
+
*
|
|
18
|
+
* Set by consumers from `useItemsGetter`'s `hydratedFromSsr`: the server
|
|
19
|
+
* resolved the provider and the result travelled in the SSR payload, so the
|
|
20
|
+
* options are already in hand before the first client render. Read ONCE, in
|
|
21
|
+
* setup β it describes how this instance started, and nothing later changes
|
|
22
|
+
* that.
|
|
23
|
+
*/
|
|
24
|
+
alreadyLoaded?: MaybeRefOrGetter<boolean>;
|
|
25
|
+
/**
|
|
26
|
+
* "The client can rebuild this load without help."
|
|
27
|
+
*
|
|
28
|
+
* True for a plain `items` ARRAY: it arrives as a prop, so a server render of
|
|
29
|
+
* it is reproduced exactly on the client with no transfer. Such a source may
|
|
30
|
+
* resolve during SSR even on a host with no SSR-state adapter. An async
|
|
31
|
+
* provider is the opposite case and needs the adapter.
|
|
32
|
+
*/
|
|
33
|
+
clientReproducible?: MaybeRefOrGetter<boolean>;
|
|
15
34
|
};
|
|
16
|
-
export declare const usePrefill: ({ fn, trigger, multiple, currentValue, }: Options) => {
|
|
17
|
-
isPrefilling: import('vue').
|
|
35
|
+
export declare const usePrefill: ({ fn, trigger, multiple, currentValue, alreadyLoaded, clientReproducible, }: Options) => {
|
|
36
|
+
isPrefilling: import('vue').ComputedRef<boolean>;
|
|
18
37
|
hasPrefilled: import('vue').Ref<boolean, boolean>;
|
|
19
38
|
canLoad: import('vue').ComputedRef<boolean>;
|
|
20
39
|
prefill: () => Promise<void>;
|
|
@@ -1,24 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { useHydrated as e } from "./useHydrated.js";
|
|
2
|
+
import { useSsrState as t } from "./useSsrState.js";
|
|
3
|
+
import { isNotNil as n } from "../utilities/functions/isNotNil.js";
|
|
4
|
+
import { computed as r, onBeforeMount as i, onServerPrefetch as a, ref as o, toValue as s } from "vue";
|
|
3
5
|
//#region src/composables/usePrefill.ts
|
|
4
|
-
var
|
|
5
|
-
let
|
|
6
|
-
let
|
|
7
|
-
return
|
|
8
|
-
}),
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
prefill: h,
|
|
18
|
-
markPrefilled: () => {
|
|
19
|
-
p.value = !0;
|
|
6
|
+
var c = ({ fn: c, trigger: l = !1, multiple: u, currentValue: d, alreadyLoaded: f, clientReproducible: p }) => {
|
|
7
|
+
let m = r(() => {
|
|
8
|
+
let e = s(d);
|
|
9
|
+
return u ? !!e?.length : n(e);
|
|
10
|
+
}), h = r(() => !!s(l) || m.value), g = o(!1), { isHydrated: _ } = e(), v = r(() => _.value ? g.value : !1), y = o(s(f) === !0), b = r(() => h.value || y.value), x = async () => {
|
|
11
|
+
g.value || y.value || (g.value = !0, await c(!0), g.value = !1, y.value = !0);
|
|
12
|
+
}, S = () => {
|
|
13
|
+
y.value = !0;
|
|
14
|
+
}, C = t();
|
|
15
|
+
return h.value && ((C.enabled || s(p) === !0) && a(x), i(async () => {
|
|
16
|
+
if (y.value) {
|
|
17
|
+
s(f) === !0 && await c(!0);
|
|
18
|
+
return;
|
|
20
19
|
}
|
|
20
|
+
await x();
|
|
21
|
+
})), {
|
|
22
|
+
isPrefilling: v,
|
|
23
|
+
hasPrefilled: y,
|
|
24
|
+
canLoad: b,
|
|
25
|
+
prefill: x,
|
|
26
|
+
markPrefilled: S
|
|
21
27
|
};
|
|
22
28
|
};
|
|
23
29
|
//#endregion
|
|
24
|
-
export {
|
|
30
|
+
export { c as usePrefill };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** True while rendering on a server (no DOM). */
|
|
2
|
+
export declare const isServerRender: boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Read the host's SSR-state adapter, if it installed one.
|
|
5
|
+
*
|
|
6
|
+
* `enabled` is the load-bearing part of the return: it is what lets the library
|
|
7
|
+
* decide whether it is ALLOWED to resolve async data on the server. Rendering
|
|
8
|
+
* resolved content the client cannot reproduce is worse than rendering a cold
|
|
9
|
+
* placeholder β the client repaints either way, but the mismatched version also
|
|
10
|
+
* logs a hydration error and, in production, keeps the stale server HTML.
|
|
11
|
+
*
|
|
12
|
+
* Must be called from a component `setup()` (it injects). Safe to call in an
|
|
13
|
+
* app with no SSR at all: `enabled` is then false and both methods are no-ops.
|
|
14
|
+
*/
|
|
15
|
+
export declare const useSsrState: () => {
|
|
16
|
+
/** Did the host install an adapter? Gates all server-side prefetching. */
|
|
17
|
+
enabled: boolean;
|
|
18
|
+
get: <T>(key: string) => T | undefined;
|
|
19
|
+
set: <T>(key: string, value: T) => void;
|
|
20
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SSR_STATE_INJECTION_KEY as e } from "../utilities/misc/ssrStateInjectionKey.js";
|
|
2
|
+
import { inject as t } from "vue";
|
|
3
|
+
//#region src/composables/useSsrState.ts
|
|
4
|
+
var n = typeof window > "u", r = () => {
|
|
5
|
+
let n = t(e, null);
|
|
6
|
+
return {
|
|
7
|
+
enabled: !!n,
|
|
8
|
+
get: (e) => n?.get(e),
|
|
9
|
+
set: (e, t) => n?.set(e, t)
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { n as isServerRender, r as useSsrState };
|
|
@@ -2,15 +2,33 @@ import { MaybeRefOrGetter } from 'vue';
|
|
|
2
2
|
/**
|
|
3
3
|
* A single table's entry in the shared width registry.
|
|
4
4
|
*
|
|
5
|
-
* `tracks` is keyed
|
|
6
|
-
*
|
|
5
|
+
* `tracks` is keyed by COLUMN KEY (the raw key as the consumer wrote it), and
|
|
6
|
+
* the structural columns participate under their reserved names: `'select'`,
|
|
7
|
+
* then every rendered data column's key, then `'actions'`. `keys` is that
|
|
8
|
+
* list in render order β a record cannot carry order a descendant may rely
|
|
9
|
+
* on, and a nested table needs it to turn a key into a gridline.
|
|
7
10
|
*/
|
|
8
11
|
export interface TableWidthNode {
|
|
9
12
|
id: string;
|
|
10
13
|
parentId: string | null;
|
|
11
|
-
/** Measured track widths as CSS lengths, keyed by
|
|
14
|
+
/** Measured track widths as CSS lengths, keyed by column key. */
|
|
12
15
|
tracks: Record<string, string>;
|
|
16
|
+
/** The track keys in render order (`select`?, data keysβ¦, `actions`?). */
|
|
17
|
+
keys: string[];
|
|
18
|
+
/**
|
|
19
|
+
* True while this table's data columns can be reordered at runtime
|
|
20
|
+
* (`reorderable`, or a non-empty `order` model). A nested table's `snap`
|
|
21
|
+
* targets are ignored under such a parent β see BbTable Β§ Nested tables.
|
|
22
|
+
*/
|
|
23
|
+
ordered: boolean;
|
|
13
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* The custom-property segment for a column key. Raw keys are the API
|
|
27
|
+
* everywhere (`order`, `hidden`, `snap`, the eventsβ¦); only the CSS variable
|
|
28
|
+
* NAME needs an identifier-safe spelling, so the normalisation is internal
|
|
29
|
+
* and shared with the slot names (`address.city` β `address_city`).
|
|
30
|
+
*/
|
|
31
|
+
export declare const trackVarKey: (key: string) => string;
|
|
14
32
|
export type TableWidthRegistry = Map<string, TableWidthNode>;
|
|
15
33
|
export interface UseTableWidthContextOptions {
|
|
16
34
|
/** Explicit table id. When omitted a stable unique id is generated. */
|
|
@@ -35,9 +53,11 @@ export declare function useTableWidthContext(options: UseTableWidthContextOption
|
|
|
35
53
|
id: string;
|
|
36
54
|
parentId: string | null;
|
|
37
55
|
tracks: Record<string, string>;
|
|
56
|
+
keys: string[];
|
|
57
|
+
ordered: boolean;
|
|
38
58
|
};
|
|
39
59
|
registry: TableWidthRegistry;
|
|
40
|
-
setTracks: (tracks: Record<string, string
|
|
60
|
+
setTracks: (tracks: Record<string, string>, keys?: string[]) => void;
|
|
41
61
|
cssVars: import('vue').ComputedRef<Record<string, string>>;
|
|
42
62
|
};
|
|
43
63
|
/**
|
|
@@ -1,42 +1,45 @@
|
|
|
1
1
|
import { useId as e } from "./useId.js";
|
|
2
|
-
import {
|
|
2
|
+
import { slotKey as t } from "../utilities/functions/slotKey.js";
|
|
3
|
+
import { computed as n, onBeforeUnmount as r, onMounted as i, reactive as a, ref as o, toValue as s, watch as c, watchEffect as l } from "vue";
|
|
3
4
|
//#region src/composables/useTableWidthContext.ts
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
let
|
|
7
|
-
id:
|
|
5
|
+
var u = (e) => t(e), d = a(/* @__PURE__ */ new Map()), f = "[data-bb-table-id]";
|
|
6
|
+
function p(t) {
|
|
7
|
+
let p = e().id, m = n(() => s(t.id) || p.value), h = o(null), g = a({
|
|
8
|
+
id: m.value,
|
|
8
9
|
parentId: null,
|
|
9
|
-
tracks: {}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
tracks: {},
|
|
11
|
+
keys: [],
|
|
12
|
+
ordered: !1
|
|
13
|
+
}), _;
|
|
14
|
+
l(() => {
|
|
15
|
+
g.id = m.value, g.parentId = h.value, !(typeof window > "u") && (_ !== void 0 && _ !== m.value && d.get(_) === g && d.delete(_), d.set(m.value, g), _ = m.value);
|
|
13
16
|
});
|
|
14
|
-
let
|
|
15
|
-
let e =
|
|
16
|
-
if (
|
|
17
|
-
|
|
17
|
+
let v = () => {
|
|
18
|
+
let e = s(t.container), n = s(t.inheritFrom), r = e?.parentElement?.closest(f) ?? null;
|
|
19
|
+
if (n) for (; r && r.dataset.bbTableId !== n;) r = r.parentElement?.closest(f) ?? null;
|
|
20
|
+
h.value = r?.dataset.bbTableId ?? null;
|
|
18
21
|
};
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
i(v), c(() => s(t.inheritFrom), v), r(() => {
|
|
23
|
+
d.get(m.value) === g && d.delete(m.value);
|
|
21
24
|
});
|
|
22
|
-
let
|
|
25
|
+
let y = n(() => h.value ? d.get(h.value) ?? null : null);
|
|
23
26
|
return {
|
|
24
|
-
id:
|
|
25
|
-
parentId:
|
|
26
|
-
parentNode:
|
|
27
|
-
parentHasTrack: (e) => !!
|
|
28
|
-
parentVar: (e, t = "auto") =>
|
|
29
|
-
node:
|
|
30
|
-
registry:
|
|
31
|
-
setTracks: (e) => {
|
|
32
|
-
|
|
27
|
+
id: m,
|
|
28
|
+
parentId: h,
|
|
29
|
+
parentNode: y,
|
|
30
|
+
parentHasTrack: (e) => !!y.value?.tracks[e],
|
|
31
|
+
parentVar: (e, t = "auto") => h.value ? `var(--table-${h.value}-track-${u(e)}, ${t})` : t,
|
|
32
|
+
node: g,
|
|
33
|
+
registry: d,
|
|
34
|
+
setTracks: (e, t) => {
|
|
35
|
+
g.tracks = e, g.keys = t ?? Object.keys(e);
|
|
33
36
|
},
|
|
34
|
-
cssVars:
|
|
37
|
+
cssVars: n(() => {
|
|
35
38
|
let e = {};
|
|
36
|
-
for (let [t, n] of Object.entries(
|
|
39
|
+
for (let [t, n] of Object.entries(g.tracks)) e[`--table-${m.value}-track-${u(t)}`] = n;
|
|
37
40
|
return e;
|
|
38
41
|
})
|
|
39
42
|
};
|
|
40
43
|
}
|
|
41
44
|
//#endregion
|
|
42
|
-
export {
|
|
45
|
+
export { u as trackVarKey, p as useTableWidthContext };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { wait as e } from "../utilities/functions/wait.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { reactive as t } from "vue";
|
|
3
|
+
import { config as n } from "virtual:bitboss-ui/config";
|
|
4
4
|
//#region src/composables/useToast.ts
|
|
5
5
|
var r = 300, i = /* @__PURE__ */ new Set([
|
|
6
6
|
"success",
|
|
7
7
|
"info",
|
|
8
8
|
"warning",
|
|
9
9
|
"destructive"
|
|
10
|
-
]), a =
|
|
10
|
+
]), a = t({ toasts: [] }), o = 0, s = !1, c = !1, l = () => {
|
|
11
11
|
o++, s = !0;
|
|
12
12
|
let e = !1;
|
|
13
13
|
return {
|
|
@@ -16,7 +16,7 @@ var r = 300, i = /* @__PURE__ */ new Set([
|
|
|
16
16
|
e || (e = !0, o--);
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
|
-
}, u =
|
|
19
|
+
}, u = t(/* @__PURE__ */ new Map()), d = (e, t) => (u.set(e, t), () => u.delete(e)), f = 0, p = (e) => {
|
|
20
20
|
if (e.duration !== void 0 && e.duration <= 0) throw Error("Toast duration must be a positive number of milliseconds.");
|
|
21
21
|
let t = e.id ?? `bb-toast-${++f}`, n = Date.now(), r = a.toasts.find((e) => e.id === t), i = e.loading ?? r?.loading ?? !1, o = e.persistent ?? i, s, c;
|
|
22
22
|
o ? (s = Infinity, c = Number.isFinite(r?.duration) ? r?.duration : r?.preLoadingDuration) : e.duration === void 0 ? r && Number.isFinite(r.duration) ? s = r.duration : r && Number.isFinite(r.preLoadingDuration) && (s = r.preLoadingDuration) : s = e.duration;
|
|
@@ -53,7 +53,7 @@ var r = 300, i = /* @__PURE__ */ new Set([
|
|
|
53
53
|
}) : e, _ = (e) => {
|
|
54
54
|
let t = typeof e == "string" ? { title: e } : e;
|
|
55
55
|
return typeof window > "u" ? (process.env.NODE_ENV !== "production" && console.warn("[BbToast] toast() was called during server-side rendering β ignored. Trigger toasts from client-side code (onMounted, event handlers)."), t.id ?? "") : (process.env.NODE_ENV !== "production" && !s && !c && (c = !0, console.warn("[BbToast] toast() was called but no <BbToast> host has ever mounted β the toast is queued but nothing will render or expire it. Mount exactly one <BbToast /> at the app root.")), process.env.NODE_ENV !== "production" && !t.title && !t.text && !t.portal && console.warn("[BbToast] A toast was created with no title, text, or portal β it will render empty."), process.env.NODE_ENV !== "production" && t.portal && t.actions && console.warn("[BbToast] A toast carries both `portal` and `actions` β portal content owns the body, so the actions are not rendered. Render the buttons inside the portal instead."), process.env.NODE_ENV !== "production" && t.variant && t.variant !== "default" && i.has(t.variant) && !t.icon && !t.loading && !t.portal && console.warn(`[BbToast] A "${t.variant}" toast was created with no \`icon\` β the variant tints the icon and sets announcement priority, nothing else, so this renders identically to a default toast. Pass a matching \`icon\` (e.g. lucide:circle-check / lucide:circle-x) when the tone should be visible.`), p(t));
|
|
56
|
-
}, v = (e,
|
|
56
|
+
}, v = (e, t) => e.position ?? t ?? n.toastPosition ?? "bottom-right", y = () => ({
|
|
57
57
|
toast: _,
|
|
58
58
|
dismiss: h,
|
|
59
59
|
update: g
|