bitboss-ui 3.0.0-beta.67 → 3.0.0-beta.68
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 +1 -1
- package/bin/bitboss-ui-mcp.mjs +87 -19
- package/bin/bitboss-ui.mjs +6 -2
- package/dist/ai/BbAlert.md +15 -11
- package/dist/ai/BbAsterisk.md +1 -1
- package/dist/ai/BbAvatar.md +2 -2
- package/dist/ai/BbBadge.md +4 -4
- package/dist/ai/BbBaseCheckboxIcon.md +4 -0
- package/dist/ai/BbBaseRadioIcon.md +7 -3
- package/dist/ai/BbBaseSwitchIcon.md +11 -2
- package/dist/ai/BbBreadcrumbs.md +2 -2
- package/dist/ai/BbButton.md +62 -9
- package/dist/ai/BbCalendar.md +1 -1
- package/dist/ai/BbCheckbox.md +23 -5
- package/dist/ai/BbCheckboxGroup.md +52 -25
- package/dist/ai/BbColorInput.md +13 -12
- package/dist/ai/BbColorPalette.md +5 -5
- package/dist/ai/BbConfigScope.md +218 -0
- package/dist/ai/BbConfirm.md +24 -21
- package/dist/ai/BbDatePicker.md +4 -4
- package/dist/ai/BbDatePickerInput.md +16 -15
- package/dist/ai/BbDialog.md +10 -9
- package/dist/ai/BbDropdown.md +26 -16
- package/dist/ai/BbDropdownButton.md +18 -18
- package/dist/ai/BbDropzone.md +1 -1
- package/dist/ai/BbForm.md +6 -4
- package/dist/ai/BbHost.md +19 -13
- package/dist/ai/BbIcon.md +3 -3
- package/dist/ai/BbIndicator.md +4 -4
- package/dist/ai/BbNumberInput.md +17 -13
- package/dist/ai/BbOffCanvas.md +4 -3
- package/dist/ai/BbPagination.md +10 -2
- package/dist/ai/BbPopover.md +5 -5
- package/dist/ai/BbRadio.md +23 -4
- package/dist/ai/BbRadioGroup.md +69 -30
- package/dist/ai/BbRating.md +5 -5
- package/dist/ai/BbSelect.md +74 -39
- package/dist/ai/BbSelectPopover.md +28 -26
- package/dist/ai/BbSlider.md +258 -61
- package/dist/ai/BbSpinner.md +2 -2
- package/dist/ai/BbSwitch.md +27 -4
- package/dist/ai/BbSwitchGroup.md +22 -13
- package/dist/ai/BbTable.md +10 -5
- package/dist/ai/BbTabs.md +6 -6
- package/dist/ai/BbTabsRoot.md +1 -1
- package/dist/ai/BbTag.md +12 -11
- package/dist/ai/BbTextInput.md +25 -17
- package/dist/ai/BbTextarea.md +15 -14
- package/dist/ai/BbTimePicker.md +3 -3
- package/dist/ai/BbTimePickerInput.md +12 -11
- package/dist/ai/BbToast.md +65 -26
- package/dist/ai/BbTooltip.md +2 -2
- package/dist/ai/CommonField.md +2 -2
- package/dist/ai/CommonFieldInput.md +2 -1
- package/dist/ai/FlatListBox.md +4 -3
- package/dist/ai/GroupedListBox.md +4 -3
- package/dist/ai/ListBox.md +5 -4
- package/dist/ai/OptionsContainer.md +17 -1
- package/dist/ai/changelog.json +454 -7
- package/dist/ai/components.json +77 -69
- package/dist/ai/composables/useBbConfig.md +3 -3
- package/dist/ai/composables/useBbDialog.md +1 -1
- package/dist/ai/composables/useBbFormField.md +1 -1
- package/dist/ai/composables/useConfirm.md +1 -1
- package/dist/ai/composables/useToast.md +16 -16
- package/dist/ai/design-tokens.json +10 -5
- package/dist/ai/guides/agent-contract.md +8 -8
- package/dist/ai/guides/ai-router.md +1 -1
- package/dist/ai/guides/app-layout.md +1 -1
- package/dist/ai/guides/design-language.md +17 -13
- package/dist/ai/guides/design-tokens.md +81 -42
- package/dist/ai/guides/eslint-rules.md +3 -1
- package/dist/ai/guides/fetch-items-playbook.md +1 -1
- package/dist/ai/guides/icons-policy.md +1 -1
- package/dist/ai/guides/inline-edit-playbook.md +1 -1
- package/dist/ai/guides/installation-and-plugin-setup.md +335 -161
- package/dist/ai/guides/migration/adoption-checklist.md +5 -5
- package/dist/ai/guides/migration/components/bb-alert.md +2 -2
- package/dist/ai/guides/migration/components/bb-badge.md +1 -1
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +15 -15
- package/dist/ai/guides/migration/components/bb-dialog.md +2 -2
- package/dist/ai/guides/migration/components/bb-dropdown.md +1 -1
- package/dist/ai/guides/migration/components/bb-host.md +10 -8
- package/dist/ai/guides/migration/components/bb-offcanvas.md +1 -1
- package/dist/ai/guides/migration/components/bb-select-popover.md +2 -2
- package/dist/ai/guides/migration/components/bb-select.md +3 -3
- package/dist/ai/guides/migration/components/bb-slider.md +17 -2
- package/dist/ai/guides/migration/components/bb-tabs.md +1 -1
- package/dist/ai/guides/migration/components/bb-toast.md +6 -6
- package/dist/ai/guides/migration/components/use-confirm.md +1 -1
- package/dist/ai/guides/migration/v2-to-v3.md +191 -56
- package/dist/ai/guides/migration/v3-beta-tooling.md +2 -2
- package/dist/ai/guides/passthrough.md +140 -131
- package/dist/ai/guides/typescript-generic-components.md +7 -7
- package/dist/ai/guides/validated-forms.md +5 -5
- package/dist/ai/guides/validation-libraries.md +4 -4
- package/dist/ai/helpers/inertia/manifest.json +1 -1
- package/dist/ai/index.md +3 -3
- package/dist/ai/manifest/common.json +9 -11
- package/dist/ai/manifest/components/BbAlert.json +3 -2
- package/dist/ai/manifest/components/BbAvatar.json +2 -1
- package/dist/ai/manifest/components/BbBadge.json +3 -2
- package/dist/ai/manifest/components/BbBaseCheckboxIcon.tree.json +5 -1
- package/dist/ai/manifest/components/BbBaseRadioIcon.tree.json +7 -3
- package/dist/ai/manifest/components/BbBaseSwitchIcon.tree.json +9 -1
- package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +1 -1
- package/dist/ai/manifest/components/BbButton.json +4 -3
- package/dist/ai/manifest/components/BbButton.tree.json +3 -1
- package/dist/ai/manifest/components/BbCalendar.tree.json +1 -0
- package/dist/ai/manifest/components/BbCheckbox.json +4 -3
- package/dist/ai/manifest/components/BbCheckbox.tree.json +1 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.json +17 -14
- package/dist/ai/manifest/components/BbCheckboxGroup.removed.json +1 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +25 -4
- package/dist/ai/manifest/components/BbColorInput.json +6 -5
- package/dist/ai/manifest/components/BbColorInput.tree.json +4 -3
- package/dist/ai/manifest/components/BbColorPalette.json +2 -1
- package/dist/ai/manifest/components/BbColorPalette.tree.json +2 -1
- package/dist/ai/manifest/components/BbConfigScope.json +23 -0
- package/dist/ai/manifest/components/BbConfirm.json +2 -1
- package/dist/ai/manifest/components/BbConfirm.tree.json +2 -2
- package/dist/ai/manifest/components/BbDatePicker.json +2 -1
- package/dist/ai/manifest/components/BbDatePicker.tree.json +2 -2
- package/dist/ai/manifest/components/BbDatePickerInput.json +6 -5
- package/dist/ai/manifest/components/BbDatePickerInput.tree.json +6 -4
- package/dist/ai/manifest/components/BbDialog.json +3 -2
- package/dist/ai/manifest/components/BbDialog.tree.json +2 -2
- package/dist/ai/manifest/components/BbDropdown.json +7 -4
- package/dist/ai/manifest/components/BbDropdown.tree.json +1 -1
- package/dist/ai/manifest/components/BbDropdownButton.json +11 -8
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +3 -3
- package/dist/ai/manifest/components/BbDropzone.json +1 -0
- package/dist/ai/manifest/components/BbForm.json +1 -1
- package/dist/ai/manifest/components/BbHost.tree.json +1 -1
- package/dist/ai/manifest/components/BbIcon.json +2 -1
- package/dist/ai/manifest/components/BbIndicator.json +2 -1
- package/dist/ai/manifest/components/BbNumberInput.json +5 -4
- package/dist/ai/manifest/components/BbNumberInput.tree.json +3 -2
- package/dist/ai/manifest/components/BbOffCanvas.json +2 -1
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +1 -1
- package/dist/ai/manifest/components/BbPagination.json +1 -1
- package/dist/ai/manifest/components/BbPagination.tree.json +2 -1
- package/dist/ai/manifest/components/BbPopover.json +2 -1
- package/dist/ai/manifest/components/BbPopover.tree.json +1 -1
- package/dist/ai/manifest/components/BbRadio.json +3 -2
- package/dist/ai/manifest/components/BbRadio.tree.json +1 -1
- package/dist/ai/manifest/components/BbRadioGroup.json +21 -18
- package/dist/ai/manifest/components/BbRadioGroup.removed.json +1 -1
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +25 -4
- package/dist/ai/manifest/components/BbRating.json +3 -2
- package/dist/ai/manifest/components/BbSelect.json +11 -9
- package/dist/ai/manifest/components/BbSelect.tree.json +7 -5
- package/dist/ai/manifest/components/BbSelectPopover.json +11 -9
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +5 -2
- package/dist/ai/manifest/components/BbSlider.json +20 -18
- package/dist/ai/manifest/components/BbSlider.removed.json +3 -0
- package/dist/ai/manifest/components/BbSlider.tree.json +4 -2
- package/dist/ai/manifest/components/BbSwitch.json +2 -1
- package/dist/ai/manifest/components/BbSwitch.tree.json +1 -1
- package/dist/ai/manifest/components/BbSwitchGroup.json +7 -5
- package/dist/ai/manifest/components/BbSwitchGroup.removed.json +1 -1
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +6 -2
- package/dist/ai/manifest/components/BbTable.json +3 -2
- package/dist/ai/manifest/components/BbTable.tree.json +4 -3
- package/dist/ai/manifest/components/BbTabs.json +3 -2
- package/dist/ai/manifest/components/BbTabsRoot.json +2 -2
- package/dist/ai/manifest/components/BbTag.json +6 -5
- package/dist/ai/manifest/components/BbTag.tree.json +3 -2
- package/dist/ai/manifest/components/BbTextInput.json +5 -4
- package/dist/ai/manifest/components/BbTextInput.tree.json +3 -2
- package/dist/ai/manifest/components/BbTextarea.json +6 -5
- package/dist/ai/manifest/components/BbTextarea.tree.json +3 -2
- package/dist/ai/manifest/components/BbTimePicker.json +2 -1
- package/dist/ai/manifest/components/BbTimePicker.tree.json +1 -1
- package/dist/ai/manifest/components/BbTimePickerInput.json +6 -5
- package/dist/ai/manifest/components/BbTimePickerInput.tree.json +5 -3
- package/dist/ai/manifest/components/BbToast.json +2 -1
- package/dist/ai/manifest/components/BbToast.tree.json +6 -1
- package/dist/ai/manifest/components/BbTooltip.json +1 -0
- package/dist/ai/manifest/components/CommonField.json +2 -2
- package/dist/ai/manifest/components/CommonFieldInput.json +2 -2
- package/dist/ai/manifest/components/CommonFieldInput.tree.json +2 -0
- package/dist/ai/manifest/components/FlatListBox.json +1 -1
- package/dist/ai/manifest/components/FlatListBox.tree.json +2 -1
- package/dist/ai/manifest/components/GroupedListBox.json +1 -1
- package/dist/ai/manifest/components/GroupedListBox.tree.json +2 -1
- package/dist/ai/manifest/components/ListBox.json +1 -1
- package/dist/ai/manifest/components/ListBox.tree.json +2 -2
- package/dist/ai/manifest/components/OptionsContainer.json +3 -2
- package/dist/ai/manifest/components/OptionsContainer.tree.json +16 -1
- package/dist/ai/manifest/index.json +3 -3
- package/dist/ai/manifest/meta.json +16 -7
- package/dist/ai/manifest/types.advanced.json +5 -6
- package/dist/ai/manifest/types.api.json +15 -6
- package/dist/ai/manifest/types.wrapper.json +2 -2
- package/dist/ai/recipes/inertia/approvals-inbox.md +2 -2
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +13 -9
- package/dist/ai/recipes/inertia/onboarding.md +2 -2
- package/dist/ai/recipes/inertia/ownership-atlas.md +2 -2
- package/dist/ai/recipes/inertia/record-form.md +2 -2
- package/dist/ai/recipes/inertia/records-workspace.md +2 -2
- package/dist/ai/recipes/inertia/settings-workspace.md +5 -4
- package/dist/ai/recipes/inertia/upload-center.md +3 -3
- package/dist/ai/recipes/inertia/wizard-form.md +2 -2
- package/dist/ai/recipes/nuxt/approvals-inbox.md +2 -2
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +13 -9
- package/dist/ai/recipes/nuxt/onboarding.md +2 -2
- package/dist/ai/recipes/nuxt/ownership-atlas.md +2 -2
- package/dist/ai/recipes/nuxt/record-form.md +2 -2
- package/dist/ai/recipes/nuxt/records-workspace.md +2 -2
- package/dist/ai/recipes/nuxt/settings-workspace.md +5 -4
- package/dist/ai/recipes/nuxt/upload-center.md +4 -4
- package/dist/ai/recipes/nuxt/wizard-form.md +2 -2
- package/dist/ai/recipes/vue/approvals-inbox.md +2 -2
- package/dist/ai/recipes/vue/inline-edit-workspace.md +13 -9
- package/dist/ai/recipes/vue/onboarding.md +2 -2
- package/dist/ai/recipes/vue/ownership-atlas.md +2 -2
- package/dist/ai/recipes/vue/record-form.md +2 -2
- package/dist/ai/recipes/vue/records-workspace.md +2 -2
- package/dist/ai/recipes/vue/settings-workspace.md +5 -4
- package/dist/ai/recipes/vue/upload-center.md +4 -4
- package/dist/ai/recipes/vue/wizard-form.md +2 -2
- package/dist/ai/source/BbAlert.md +10 -4
- package/dist/ai/source/BbAvatar.md +5 -4
- package/dist/ai/source/BbBadge.md +16 -9
- package/dist/ai/source/BbBadgeButton.md +1 -1
- package/dist/ai/source/BbBaseCheckboxIcon.md +7 -5
- package/dist/ai/source/BbBaseRadioIcon.md +17 -11
- package/dist/ai/source/BbBaseSwitchIcon.md +14 -9
- package/dist/ai/source/BbButton.md +38 -22
- package/dist/ai/source/BbCalendar.md +5 -30
- package/dist/ai/source/BbCheckbox.md +20 -7
- package/dist/ai/source/BbCheckboxGroup.md +66 -27
- package/dist/ai/source/BbColorInput.md +29 -22
- package/dist/ai/source/BbColorPalette.md +23 -22
- package/dist/ai/source/BbConfigScope.md +123 -0
- package/dist/ai/source/BbConfirm.md +5 -3
- package/dist/ai/source/BbDatePicker.md +18 -8
- package/dist/ai/source/BbDatePickerInput.md +44 -27
- package/dist/ai/source/BbDialog.md +23 -13
- package/dist/ai/source/BbDropdown.md +61 -25
- package/dist/ai/source/BbDropdownButton.md +67 -25
- package/dist/ai/source/BbDropdownGroup.md +38 -15
- package/dist/ai/source/BbForm.md +1 -1
- package/dist/ai/source/BbHost.md +4 -4
- package/dist/ai/source/BbHoverCard.md +6 -2
- package/dist/ai/source/BbIcon.md +5 -4
- package/dist/ai/source/BbIndicator.md +1 -1
- package/dist/ai/source/BbNumberInput.md +44 -30
- package/dist/ai/source/BbOffCanvas.md +17 -10
- package/dist/ai/source/BbPagination.md +10 -18
- package/dist/ai/source/BbPopover.md +17 -9
- package/dist/ai/source/BbPopoverPortal.md +2 -2
- package/dist/ai/source/BbRadio.md +18 -7
- package/dist/ai/source/BbRadioGroup.md +67 -27
- package/dist/ai/source/BbRating.md +21 -11
- package/dist/ai/source/BbSelect.md +51 -32
- package/dist/ai/source/BbSelectPopover.md +81 -38
- package/dist/ai/source/BbSlider.md +929 -565
- package/dist/ai/source/BbSwitchGroup.md +28 -9
- package/dist/ai/source/BbTable.md +17 -30
- package/dist/ai/source/BbTabs.md +5 -2
- package/dist/ai/source/BbTabsList.md +1 -1
- package/dist/ai/source/BbTabsPanels.md +1 -1
- package/dist/ai/source/BbTabsRoot.md +1 -1
- package/dist/ai/source/BbTag.md +27 -20
- package/dist/ai/source/BbTextInput.md +29 -26
- package/dist/ai/source/BbTextarea.md +53 -45
- package/dist/ai/source/BbTimePicker.md +19 -7
- package/dist/ai/source/BbTimePickerInput.md +34 -21
- package/dist/ai/source/BbToast.md +18 -9
- package/dist/ai/source/BbToastPortal.md +14 -6
- package/dist/ai/source/BbTooltip.md +1 -1
- package/dist/ai/source/CommonFieldInput.md +9 -4
- package/dist/ai/source/FlatListBox.md +11 -1
- package/dist/ai/source/GroupedListBox.md +12 -1
- package/dist/ai/source/ListBox.md +1 -1
- package/dist/ai/source/OptionsContainer.md +48 -1
- package/dist/assets/svgs/arrow_up.svg_raw.js +3 -0
- package/dist/assets/svgs/caret_down.svg_raw.js +3 -0
- package/dist/assets/svgs/chevron_left_small.svg_raw.js +3 -0
- package/dist/assets/svgs/chevron_right_small.svg_raw.js +3 -0
- package/dist/assets/svgs/close.svg_raw.js +3 -0
- package/dist/assets/svgs/eyedropper.svg_raw.js +3 -0
- package/dist/assets/svgs/move.svg_raw.js +3 -0
- package/dist/assets/svgs/x.svg_raw.js +3 -0
- package/dist/components/BbAlert/BbAlert.vue.d.ts +1 -0
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +48 -44
- package/dist/components/BbAlert/types.d.ts +1 -1
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -1
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +54 -53
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +60 -56
- package/dist/components/BbBadge/types.d.ts +1 -1
- package/dist/components/BbButton/BbButton.vue.d.ts +2 -0
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +110 -98
- package/dist/components/BbButton/types.d.ts +12 -10
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +17 -17
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +298 -313
- package/dist/components/BbCalendar/useCalendarGrid.js +3 -2
- package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +4 -2
- package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +94 -82
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +78 -55
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +184 -151
- package/dist/components/BbCheckboxGroup/types.d.ts +10 -5
- package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +1 -1
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +13 -11
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +82 -71
- package/dist/components/BbColorInput/types.d.ts +8 -8
- package/dist/components/BbColorInput/types.js +1 -1
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +2 -2
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +180 -182
- package/dist/components/BbColorPalette/types.d.ts +2 -2
- package/dist/components/BbConfigScope/BbConfigScope.vue.d.ts +12 -0
- package/dist/components/BbConfigScope/BbConfigScope.vue.js +4 -0
- package/dist/components/BbConfigScope/BbConfigScope.vue_vue_type_script_setup_true_lang.js +37 -0
- package/dist/components/BbConfigScope/types.d.ts +20 -0
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +31 -31
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +171 -170
- package/dist/components/BbDatePicker/types.d.ts +2 -2
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +110 -110
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +457 -441
- package/dist/components/BbDatePickerInput/types.d.ts +8 -8
- package/dist/components/BbDatePickerInput/types.js +1 -1
- package/dist/components/BbDialog/BbDialog.vue.d.ts +4 -3
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +204 -197
- package/dist/components/BbDialog/types.d.ts +2 -2
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +5 -4
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +302 -286
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +348 -344
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +97 -97
- package/dist/components/BbDropdown/DropdownRow.vue.d.ts +1 -1
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbDropdown/pointerTrail.d.ts +5 -0
- package/dist/components/BbDropdown/pointerTrail.js +26 -0
- package/dist/components/BbDropdown/types.d.ts +25 -13
- package/dist/components/BbDropdown/types.js +11 -2
- package/dist/components/BbDropdown/useDropdownContext.d.ts +1 -1
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +4 -3
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +93 -69
- package/dist/components/BbDropdownButton/types.d.ts +30 -13
- package/dist/components/BbDropdownButton/types.js +7 -3
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +5 -5
- package/dist/components/BbForm/BbForm.vue.d.ts +2 -2
- package/dist/components/BbForm/BbFormCustomField.js +2 -2
- package/dist/components/BbForm/bindFormField.js +66 -66
- package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbHost/BbHostOpening.d.ts +1 -1
- package/dist/components/BbHost/types.d.ts +2 -2
- package/dist/components/BbHoverCard/BbHoverCard.vue.d.ts +2 -2
- package/dist/components/BbHoverCard/BbHoverCard.vue_vue_type_script_setup_true_lang.js +158 -157
- package/dist/components/BbIcon/BbIcon.vue.d.ts +1 -1
- package/dist/components/BbIcon/BbIcon.vue_vue_type_script_setup_true_lang.js +41 -40
- package/dist/components/BbIndicator/types.d.ts +1 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +12 -9
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +248 -232
- package/dist/components/BbNumberInput/types.d.ts +12 -11
- package/dist/components/BbNumberInput/types.js +1 -1
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +2 -2
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +275 -274
- package/dist/components/BbPagination/BbPagination.vue.d.ts +1 -1
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +104 -108
- package/dist/components/BbPopover/BbPopover.vue.d.ts +2 -2
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +90 -90
- package/dist/components/BbPopover/types.d.ts +2 -2
- package/dist/components/BbRadio/BbRadio.vue.d.ts +4 -2
- package/dist/components/BbRadio/BbRadio.vue_vue_type_script_setup_true_lang.js +105 -93
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +72 -49
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +214 -181
- package/dist/components/BbRadioGroup/types.d.ts +11 -5
- package/dist/components/BbRating/BbRating.vue.d.ts +7 -5
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +139 -128
- package/dist/components/BbSelect/BbSelect.vue.d.ts +174 -155
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +179 -158
- package/dist/components/BbSelect/types.d.ts +23 -19
- package/dist/components/BbSelect/types.js +4 -2
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +21 -16
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +637 -623
- package/dist/components/BbSelectPopover/reclickClears.d.ts +17 -0
- package/dist/components/BbSelectPopover/reclickClears.js +4 -0
- package/dist/components/BbSelectPopover/types.d.ts +21 -16
- package/dist/components/BbSelectPopover/types.js +3 -1
- package/dist/components/BbSlider/BbSlider.vue.d.ts +22 -15
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +382 -315
- package/dist/components/BbSlider/types.d.ts +136 -47
- package/dist/components/BbSwitch/BbSwitch.vue.d.ts +2 -2
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +28 -27
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +3 -0
- package/dist/components/BbTable/BbTable.vue.d.ts +4 -4
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1128 -1135
- package/dist/components/BbTable/BbTableSelectToggle.d.ts +1 -1
- package/dist/components/BbTabs/BbTabs.vue.d.ts +21 -21
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +8 -2
- package/dist/components/BbTabs/types.d.ts +1 -1
- package/dist/components/BbTag/BbTag.vue.d.ts +15 -13
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +196 -185
- package/dist/components/BbTag/types.d.ts +7 -7
- package/dist/components/BbTag/types.js +1 -1
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +30 -30
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +66 -55
- package/dist/components/BbTextInput/types.d.ts +9 -9
- package/dist/components/BbTextInput/types.js +1 -1
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +30 -30
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +96 -86
- package/dist/components/BbTextarea/types.d.ts +8 -8
- package/dist/components/BbTextarea/types.js +1 -1
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +12 -12
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +131 -130
- package/dist/components/BbTimePicker/types.d.ts +2 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +73 -73
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +286 -273
- package/dist/components/BbTimePickerInput/types.d.ts +8 -8
- package/dist/components/BbTimePickerInput/types.js +1 -1
- package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +75 -80
- package/dist/components/BbToast/types.d.ts +2 -2
- package/dist/components/BbTooltip/BbTooltip.vue.d.ts +3 -3
- package/dist/components/BbTooltip/types.d.ts +1 -1
- package/dist/components/BbTree/BbTree.vue.d.ts +1 -1
- package/dist/components/CloseIcon/CloseButton.vue.js +1 -1
- package/dist/components/CloseIcon/CloseButton.vue_vue_type_script_setup_true_lang.js +11 -16
- package/dist/components/CommonFieldInput/types.d.ts +1 -1
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/components/FlatListBox/types.d.ts +1 -1
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/components/GroupedListBox/types.d.ts +1 -1
- package/dist/components/ListBox/types.d.ts +1 -1
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +87 -69
- package/dist/components/OptionsContainer/types.d.ts +5 -0
- package/dist/components/Transitions/Slide.vue.d.ts +1 -1
- package/dist/composables/useBbTabs.js +94 -90
- package/dist/composables/useConfig.js +2 -9
- package/dist/composables/useConfigDefaults.d.ts +54 -0
- package/dist/composables/useConfigDefaults.js +56 -0
- package/dist/composables/useConfirm.d.ts +7 -7
- package/dist/composables/useFormBinding.d.ts +1 -1
- package/dist/composables/useFormBinding.js +3 -3
- package/dist/composables/usePassthrough.d.ts +7 -5
- package/dist/composables/usePassthrough.js +137 -133
- package/dist/composables/useToast.d.ts +5 -4
- package/dist/composables/useToast.js +47 -37
- package/dist/deprecation/ai-deprecations.json.d.ts +44 -15
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/directives/bbDropdown.js +7 -7
- package/dist/i18n/locales/cs.json +2 -1
- package/dist/i18n/locales/da.json +2 -1
- package/dist/i18n/locales/de-CH.json +2 -1
- package/dist/i18n/locales/de.json +2 -1
- package/dist/i18n/locales/el.json +2 -1
- package/dist/i18n/locales/en-GB.json +2 -1
- package/dist/i18n/locales/en.json +2 -1
- package/dist/i18n/locales/es-MX.json +2 -1
- package/dist/i18n/locales/es.json +2 -1
- package/dist/i18n/locales/fi.json +2 -1
- package/dist/i18n/locales/fr.json +2 -1
- package/dist/i18n/locales/hu.json +2 -1
- package/dist/i18n/locales/it.json +2 -1
- package/dist/i18n/locales/ja.json +2 -1
- package/dist/i18n/locales/ko.json +2 -1
- package/dist/i18n/locales/nb.json +2 -1
- package/dist/i18n/locales/nl.json +2 -1
- package/dist/i18n/locales/pl.json +2 -1
- package/dist/i18n/locales/pt-BR.json +2 -1
- package/dist/i18n/locales/pt-PT.json +2 -1
- package/dist/i18n/locales/ro.json +2 -1
- package/dist/i18n/locales/ru.json +2 -1
- package/dist/i18n/locales/sv.json +2 -1
- package/dist/i18n/locales/tr.json +2 -1
- package/dist/i18n/locales/uk.json +2 -1
- package/dist/i18n/locales/zh-CN.json +2 -1
- package/dist/i18n/locales/zh-HK.json +2 -1
- package/dist/i18n/locales/zh-TW.json +2 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +2 -2
- package/dist/llms-full.txt +2273 -1243
- package/dist/llms-medium.txt +362 -184
- package/dist/llms.txt +4 -4
- package/dist/locale-blueprint.json +2 -1
- package/dist/nuxt-auto-imports.js +1 -1
- package/dist/nuxt-module.d.ts +1 -1
- package/dist/nuxt.js +17 -17
- package/dist/project-dts.d.ts +72 -10
- package/dist/project-dts.js +69 -21
- package/dist/styles.css +2 -2
- package/dist/types/AlertVariant.d.ts +1 -1
- package/dist/types/BadgeVariant.d.ts +1 -1
- package/dist/types/ButtonVariant.d.ts +1 -1
- package/dist/types/CheckboxVariant.d.ts +7 -4
- package/dist/types/CheckboxVariant.js +5 -1
- package/dist/types/Config.d.ts +17 -103
- package/dist/types/ConfigDefaults.d.ts +352 -0
- package/dist/types/ConfigDefaults.js +115 -0
- package/dist/types/ConfirmVariant.d.ts +1 -1
- package/dist/types/DropdownItemVariant.d.ts +1 -1
- package/dist/types/FieldLayout.d.ts +3 -3
- package/dist/types/IndicatorVariant.d.ts +1 -1
- package/dist/types/InputVariant.d.ts +57 -24
- package/dist/types/RadioVariant.d.ts +7 -4
- package/dist/types/RadioVariant.js +5 -1
- package/dist/types/SizeScale.d.ts +4 -0
- package/dist/types/SizeScale.js +17 -0
- package/dist/types/TabsVariant.d.ts +1 -1
- package/dist/types/ToastVariant.d.ts +1 -1
- package/dist/types/TooltipVariant.d.ts +1 -1
- package/dist/types/passthrough.d.ts +6 -6
- package/dist/types/ptComponentMap.d.ts +14 -14
- package/dist/utilities/functions/searchRank.d.ts +19 -0
- package/dist/utilities/functions/searchRank.js +76 -0
- package/dist/utilities/misc/listboxMetrics.d.ts +1 -1
- package/dist/utils/configDefaults.d.ts +33 -0
- package/dist/utils/configDefaults.js +140 -0
- package/dist/utils/configScope.d.ts +43 -0
- package/dist/utils/configScope.js +13 -0
- package/dist/utils/passthrough.d.ts +4 -7
- package/dist/utils/passthrough.js +31 -29
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +54 -191
- package/dist/vite.js +318 -367
- package/llms.txt +4 -4
- package/package.json +3 -3
- package/scripts/lib/adoption-checklist.json +2 -2
- package/scripts/lib/agent-manifest.mjs +2 -0
- package/scripts/lib/eslint-disable.mjs +2 -0
- package/scripts/lib/eslint-plugin.d.ts +4 -2
- package/scripts/lib/eslint-plugin.mjs +67 -0
- package/scripts/lib/idiom-scan.mjs +8 -7
- package/scripts/lib/project-variant-dts.mjs +105 -36
- package/scripts/lib/validate-bb-markup.mjs +73 -13
- package/dist/ai/BbPtScope.md +0 -138
- package/dist/ai/manifest/components/BbPtScope.json +0 -21
- package/dist/ai/source/BbPtScope.md +0 -54
- package/dist/components/BbPtScope/BbPtScope.vue.d.ts +0 -12
- package/dist/components/BbPtScope/BbPtScope.vue.js +0 -4
- package/dist/components/BbPtScope/BbPtScope.vue_vue_type_script_setup_true_lang.js +0 -12
- package/dist/components/BbPtScope/types.d.ts +0 -15
- package/dist/types/PtScope.d.ts +0 -15
- package/dist/utilities/functions/head.js +0 -3
- package/dist/utilities/functions/matchAnyKey.d.ts +0 -8
- package/dist/utilities/functions/matchAnyKey.js +0 -14
- package/dist/utils/ptScope.d.ts +0 -8
- package/dist/utils/ptScope.js +0 -3
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { CONFIG_SCOPE_KEY as e, appComponents as t, scopesInUse as n } from "../utils/configScope.js";
|
|
2
|
+
import { ALL_PROPS as r, DEFAULTS_ALLOWLIST as i } from "../types/ConfigDefaults.js";
|
|
3
|
+
import { computed as a, hasInjectionContext as o, inject as s } from "vue";
|
|
4
|
+
// src/composables/useConfigDefaults.ts
|
|
5
|
+
var c = i, l = () => n() && o() ? s(e, null) : null, u = (e, n, r, i) => {
|
|
6
|
+
let a = (e) => {
|
|
7
|
+
let t = n ? e[n]?.[r] : void 0;
|
|
8
|
+
return t === void 0 ? i ? e.all?.[r] : void 0 : t;
|
|
9
|
+
};
|
|
10
|
+
for (let t = e.length - 1; t >= 0; t--) {
|
|
11
|
+
let n = a(e[t].map);
|
|
12
|
+
if (n !== void 0) return n;
|
|
13
|
+
}
|
|
14
|
+
return a(t.value);
|
|
15
|
+
}, d = (e, t) => r.includes(t) && !!c[e]?.includes(t), f = (e, t) => {
|
|
16
|
+
let n = l(), r = d(e, t);
|
|
17
|
+
return () => u(n?.value ?? [], e, t, r);
|
|
18
|
+
}, p = (e, t, n) => {
|
|
19
|
+
let r = l(), a = (i) => {
|
|
20
|
+
let a = t[i];
|
|
21
|
+
if (a !== void 0) return a;
|
|
22
|
+
let o = u(r?.value ?? [], e, i, d(e, i));
|
|
23
|
+
return o === void 0 ? n[i] : o;
|
|
24
|
+
}, o = {};
|
|
25
|
+
for (let t of i[e]) Object.defineProperty(o, t, {
|
|
26
|
+
enumerable: !0,
|
|
27
|
+
get: () => a(t)
|
|
28
|
+
});
|
|
29
|
+
return o;
|
|
30
|
+
}, m = (e, t) => {
|
|
31
|
+
let n = l();
|
|
32
|
+
return () => u(n?.value ?? [], e, t, e === null);
|
|
33
|
+
}, h = (e, t) => {
|
|
34
|
+
let n = l();
|
|
35
|
+
return () => {
|
|
36
|
+
let r = n?.value ?? [];
|
|
37
|
+
for (let n = r.length - 1; n >= 0; n--) {
|
|
38
|
+
let i = r[n].map[e]?.[t];
|
|
39
|
+
if (i !== void 0) return i;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
}, g = (e, t) => u([], e, t, d(e, t)), _ = (e, n) => {
|
|
43
|
+
let r = l();
|
|
44
|
+
return a(() => {
|
|
45
|
+
let i = n;
|
|
46
|
+
for (let n of [t.value, ...(r?.value ?? []).map((e) => e.map)]) {
|
|
47
|
+
let t = n[e]?.sizeMap;
|
|
48
|
+
t && (i = {
|
|
49
|
+
...i,
|
|
50
|
+
...t
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return i;
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
export { g as appConfigDefault, l as useConfigChain, p as useConfigDefaults, f as useConfigFallback, m as useConfigSetting, h as useScopedSetting, _ as useSizeMap };
|
|
@@ -142,11 +142,11 @@ export type BbConfirmMessage = {
|
|
|
142
142
|
returning?: boolean;
|
|
143
143
|
/**
|
|
144
144
|
* Maximum width of the dialog, as one of the named presets (`'xs'` – `'2xl'`)
|
|
145
|
-
* resolved through the plugin config's `
|
|
145
|
+
* resolved through the plugin config's `components.BbDialog.sizeMap`. Arbitrary CSS
|
|
146
146
|
* values and per-breakpoint maps are not accepted here. Not to be confused
|
|
147
147
|
* with the per-button `size` inside `yes` / `no` / `actions`. Overrides the
|
|
148
|
-
* plugin config's `
|
|
149
|
-
* @defaultValue `
|
|
148
|
+
* plugin config's `BbConfirm.size`, the default for every confirm.
|
|
149
|
+
* @defaultValue `BbConfirm.size`, else `'sm'` (the `BbDialog` default)
|
|
150
150
|
*/
|
|
151
151
|
size?: keyof DialogSizes;
|
|
152
152
|
/**
|
|
@@ -261,13 +261,13 @@ export declare const confirmState: import('vue').ComputedRef<{
|
|
|
261
261
|
readonly text?: string | undefined;
|
|
262
262
|
readonly size?: keyof DialogSizes | undefined;
|
|
263
263
|
readonly title?: string | undefined;
|
|
264
|
+
readonly hideClose?: boolean | undefined;
|
|
264
265
|
readonly variant?: ConfirmVariantType | undefined;
|
|
266
|
+
readonly focusTarget?: string | undefined;
|
|
267
|
+
readonly persistent?: boolean | undefined;
|
|
265
268
|
readonly stack?: string | undefined;
|
|
266
269
|
readonly autoClose?: boolean | undefined;
|
|
267
270
|
readonly dismissAsNo?: boolean | undefined;
|
|
268
|
-
readonly focusTarget?: string | undefined;
|
|
269
|
-
readonly hideClose?: boolean | undefined;
|
|
270
|
-
readonly persistent?: boolean | undefined;
|
|
271
271
|
readonly portal?: string | import('vue').FunctionalComponent<any, {}, any, {}> | {
|
|
272
272
|
new (...args: any[]): any;
|
|
273
273
|
__isFragment?: never;
|
|
@@ -590,7 +590,7 @@ export declare const processMessage: (value: boolean, explicit?: boolean, entry?
|
|
|
590
590
|
*
|
|
591
591
|
* The plugin renders the `<BbHost />` that shows it: mount nothing. Without
|
|
592
592
|
* any host (no plugin), `confirm()` resolves `false` after a 1s grace. Each
|
|
593
|
-
* call opens its own dialog with the caller's provides (its `<
|
|
593
|
+
* call opens its own dialog with the caller's provides (its `<BbConfigScope>`,
|
|
594
594
|
* its tokens): a call from no component takes the host's.
|
|
595
595
|
* Use `<BbConfirmPortal name="...">` anywhere in the component tree to register
|
|
596
596
|
* named portal content that can be activated by passing `portal: 'name'` to `confirm()`.
|
|
@@ -19,7 +19,7 @@ export interface FormFieldProps<T> {
|
|
|
19
19
|
* When the field validates: `aggressive` (each change), `balanced` (on
|
|
20
20
|
* leave, then live while in error), `lazy` (on leave), `submit-only`,
|
|
21
21
|
* `submit-live`. Unset: the `BbForm`'s `validation-mode`, then
|
|
22
|
-
* `
|
|
22
|
+
* `all.validationMode` (`'balanced'`). `BbForm` only.
|
|
23
23
|
*/
|
|
24
24
|
validationMode?: ValidationMode;
|
|
25
25
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { hasVnodeListener as e } from "../utilities/functions/hasVnodeListener.js";
|
|
2
|
-
import {
|
|
2
|
+
import { useConfigSetting as t } from "./useConfigDefaults.js";
|
|
3
3
|
import { computed as n, getCurrentInstance as r, inject as i, shallowRef as a, watch as o } from "vue";
|
|
4
4
|
// src/composables/useFormBinding.ts
|
|
5
5
|
var s = Symbol.for("bitboss-ui:form-connection"), c = (i, s, c) => {
|
|
6
|
-
let l = t(), u = r(), d = a(i.modelValue);
|
|
6
|
+
let l = t(null, "requiredAsterisk"), u = r(), d = a(i.modelValue);
|
|
7
7
|
o(() => i.modelValue, (e) => d.value = e);
|
|
8
8
|
let f = () => e(u, "update:modelValue") ? i.modelValue : d.value, p = (e) => {
|
|
9
9
|
d.value = e, s("update:modelValue", e);
|
|
@@ -16,7 +16,7 @@ var s = Symbol.for("bitboss-ui:form-connection"), c = (i, s, c) => {
|
|
|
16
16
|
errors: n(() => i.errors),
|
|
17
17
|
required: n(() => i.required),
|
|
18
18
|
ariaRequired: n(() => void 0),
|
|
19
|
-
showAsterisk: n(() =>
|
|
19
|
+
showAsterisk: n(() => l() !== !1 && !!i.required),
|
|
20
20
|
setModelValue: p,
|
|
21
21
|
leave: () => {},
|
|
22
22
|
commit: p,
|
|
@@ -57,7 +57,7 @@ export interface PassthroughOptions<Part extends string, State extends string> {
|
|
|
57
57
|
* still win. `current` is the component-level variant; a per-node one (a
|
|
58
58
|
* dropdown entry's) is the fourth argument of `part()`. `names` are the
|
|
59
59
|
* built-in names, `option` the plugin option that registers the app's own
|
|
60
|
-
* (`buttonVariants`), both only for the dev check of unknown keys and for
|
|
60
|
+
* (its internal key, `buttonVariants` for `components.BbButton.variants`), both only for the dev check of unknown keys and for
|
|
61
61
|
* `forward()`. A list for a component with two (BbDropdownButton: its
|
|
62
62
|
* button's on the control parts, its menu entries' on the entry parts).
|
|
63
63
|
*/
|
|
@@ -178,8 +178,10 @@ export type PassthroughBindings<Part extends string, State extends string> = Rea
|
|
|
178
178
|
/** The frozen build-time map — what `useConfig().pt` exposes (read-only by construction). */
|
|
179
179
|
export declare const getGlobalPt: () => Readonly<PtGlobalMap>;
|
|
180
180
|
/**
|
|
181
|
-
* Test lever: swaps the
|
|
182
|
-
*
|
|
181
|
+
* Test lever: swaps the named scopes for one test file, given as their `pt`
|
|
182
|
+
* maps (`{ webapp: { BbButton: { root: '…' } } }`, each component's entry
|
|
183
|
+
* becoming its `pt`). Not exported from the package; no argument restores the
|
|
184
|
+
* built scopes.
|
|
183
185
|
* @internal
|
|
184
186
|
*/
|
|
185
187
|
export declare const __setPtScopesForTest: (scopes?: Record<string, PtGlobalMap>) => void;
|
|
@@ -244,8 +246,8 @@ export declare const variantPt: (pt: {
|
|
|
244
246
|
* Resolution, per part (plans/PASSTHROUGH.md § Precedence, T17, T20):
|
|
245
247
|
*
|
|
246
248
|
* keys = [part, ...activeStates.map(s => `${part}:${s}`)] state axis
|
|
247
|
-
* sources = for each key: global map (build-time) → active `
|
|
248
|
-
* (outermost `<
|
|
249
|
+
* sources = for each key: global map (build-time) → active scopes' `pt`
|
|
250
|
+
* (outermost `<BbConfigScope>` first) → `pt` object → `pt:key` attribute
|
|
249
251
|
* binding = mergeProps(...sources)
|
|
250
252
|
*
|
|
251
253
|
* So a state entry is merged AFTER the base entry, and within one key the
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useLogger as
|
|
3
|
-
import { isNotEmpty as
|
|
4
|
-
import { PT_ITEM_FN as
|
|
5
|
-
import { camelize as
|
|
6
|
-
import { config as
|
|
1
|
+
import { CONFIG_SCOPE_KEY as e, scopesInUse as t } from "../utils/configScope.js";
|
|
2
|
+
import { useLogger as n } from "./useLogger.js";
|
|
3
|
+
import { isNotEmpty as r } from "../utilities/functions/isNotEmpty.js";
|
|
4
|
+
import { PT_ITEM_FN as i, itemFnsIn as a, normalizePtValue as o, parsePtKey as s } from "../utils/passthrough.js";
|
|
5
|
+
import { camelize as c, computed as l, hasInjectionContext as u, inject as d, mergeProps as f, normalizeClass as p, toRaw as m, watchEffect as ee } from "vue";
|
|
6
|
+
import { config as h } from "virtual:bitboss-ui/config";
|
|
7
7
|
import g from "virtual:bitboss-ui/passthrough-deduper";
|
|
8
8
|
// src/composables/usePassthrough.ts
|
|
9
9
|
var _ = [
|
|
@@ -31,7 +31,10 @@ var _ = [
|
|
|
31
31
|
for (let t of Object.values(e)) x(t);
|
|
32
32
|
}
|
|
33
33
|
return e;
|
|
34
|
-
}, S = x(((e) => JSON.parse(JSON.stringify(
|
|
34
|
+
}, S = x(((e) => JSON.parse(JSON.stringify(m(e) ?? {})))(h.pt)), C = () => S, w = /* @__PURE__ */ new WeakMap(), T = (e) => {
|
|
35
|
+
let t = w.get(e);
|
|
36
|
+
return t || (t = Object.fromEntries(Object.entries(e).flatMap(([e, t]) => t?.pt ? [[e, t.pt]] : [])), w.set(e, t)), t;
|
|
37
|
+
}, E = {
|
|
35
38
|
resolves: 0,
|
|
36
39
|
merges: 0,
|
|
37
40
|
dedupes: 0,
|
|
@@ -40,13 +43,13 @@ var _ = [
|
|
|
40
43
|
if (g !== null && typeof g != "function") throw Error("[bitboss-ui] the passthroughDeduper module must default-export a function (className: string) => string.");
|
|
41
44
|
var D = 1e3, O = /* @__PURE__ */ new Map(), k = (e) => {
|
|
42
45
|
if (!g) return e;
|
|
43
|
-
let t =
|
|
46
|
+
let t = p(e);
|
|
44
47
|
if (!t) return e;
|
|
45
48
|
E.dedupes++;
|
|
46
49
|
let n = O.get(t);
|
|
47
50
|
return n === void 0 && (E.dedupeMisses++, n = g(t), O.size >= D && O.clear(), O.set(t, n)), n;
|
|
48
51
|
}, A = (e) => (e.class !== void 0 && (e.class = k(e.class)), e), j = /* @__PURE__ */ new Set(), M = (e) => Array.isArray(e) || !!e && typeof e == "object" && !("class" in e) && !("style" in e) && !("attrs" in e) && Object.keys(e).length > 0, N = (e) => {
|
|
49
|
-
let t =
|
|
52
|
+
let t = h, n = t.variantNames?.[e], r = t[e], i = [...Array.isArray(n) ? n : [], ...Array.isArray(r) ? r : r && typeof r == "object" ? Object.keys(r) : []];
|
|
50
53
|
return [...new Set(i.filter((e) => typeof e == "string").map((e) => e.trim()).filter(Boolean))];
|
|
51
54
|
}, P = (e, t) => [.../* @__PURE__ */ new Set([...e, ...N(t)])], F = (e) => {
|
|
52
55
|
let t = {};
|
|
@@ -62,123 +65,123 @@ var D = 1e3, O = /* @__PURE__ */ new Map(), k = (e) => {
|
|
|
62
65
|
states: n
|
|
63
66
|
};
|
|
64
67
|
}, L = (e) => e.startsWith("pt:"), R = (e) => e.replace(/-/g, "").toLowerCase();
|
|
65
|
-
function z(
|
|
66
|
-
let { component:
|
|
68
|
+
function z(r) {
|
|
69
|
+
let { component: p, props: m, parts: h, states: g, active: _, attrs: v, inherit: y, variant: x } = r, C = (x ? [].concat(x) : []).map((e) => {
|
|
67
70
|
let t;
|
|
68
71
|
return {
|
|
69
|
-
parts: e.parts ??
|
|
72
|
+
parts: e.parts ?? h,
|
|
70
73
|
current: e.current,
|
|
71
74
|
names: () => t ??= P(e.names, e.option)
|
|
72
75
|
};
|
|
73
|
-
}),
|
|
74
|
-
let n =
|
|
75
|
-
return r && !
|
|
76
|
+
}), w = (e, t) => {
|
|
77
|
+
let n = C.find((t) => t.parts.includes(e)), r = n?.current ? n.current() : t;
|
|
78
|
+
return r && !g.includes(r) ? `${e}:${r}` : void 0;
|
|
76
79
|
}, D = (e) => {
|
|
77
|
-
if (!
|
|
78
|
-
let t = e.indexOf(":"), n = t < 0 ? e : e.slice(0, t), r =
|
|
80
|
+
if (!y) return;
|
|
81
|
+
let t = e.indexOf(":"), n = t < 0 ? e : e.slice(0, t), r = y.parts[n];
|
|
79
82
|
return r && (t < 0 ? r : r + e.slice(t));
|
|
80
|
-
}, O = new Map((
|
|
83
|
+
}, O = new Map((r.controlAttrs ?? []).map((e) => [R(e), e])), k = t() && u() ? d(e, null) : null, N = () => {
|
|
81
84
|
let e = [];
|
|
82
85
|
for (let t of k?.value ?? []) {
|
|
83
|
-
let n =
|
|
84
|
-
n && e.push([t, n]);
|
|
86
|
+
let n = T(t.map)[p];
|
|
87
|
+
n && e.push([t.source, n]);
|
|
85
88
|
}
|
|
86
89
|
return e;
|
|
87
90
|
}, F = (e) => O.size > 0 ? O.get(R(e)) : void 0, z = (e) => F(e) !== void 0;
|
|
88
91
|
if (process.env.NODE_ENV !== "production") {
|
|
89
|
-
let e =
|
|
90
|
-
for (let e of
|
|
91
|
-
|
|
92
|
-
for (let
|
|
92
|
+
let e = n(), t = /* @__PURE__ */ new Set();
|
|
93
|
+
for (let e of h) {
|
|
94
|
+
t.add(e);
|
|
95
|
+
for (let n of g) t.add(`${e}:${n}`);
|
|
93
96
|
}
|
|
94
|
-
for (let e of
|
|
97
|
+
for (let e of C) for (let n of e.parts) for (let r of e.names()) t.add(`${n}:${r}`);
|
|
95
98
|
let r = (e) => {
|
|
96
|
-
let
|
|
97
|
-
return !!
|
|
99
|
+
let n = I(e);
|
|
100
|
+
return !!n && n.states.every((e) => t.has(`${n.part}:${e}`));
|
|
98
101
|
}, i = (t, n) => {
|
|
99
|
-
let r = `${
|
|
102
|
+
let r = `${p}|${t}|${n}`;
|
|
100
103
|
if (j.has(r)) return;
|
|
101
104
|
j.add(r);
|
|
102
|
-
let i =
|
|
103
|
-
e.warn(`${
|
|
105
|
+
let i = s(n), a = i && !h.includes(i.part) ? `"${i.part}" is not a part of ${p}. Parts: ${h.join(", ")}.` : i && i.state && !g.includes(i.state) ? `"${i.state}" is not a state of ${p}. States: ${g.join(", ")}.${C.map((e) => ` Variants (on ${e.parts.join(", ")}): ${e.names().join(", ")}.`).join("")}` : "Use \"<part>\", \"<part>:<state>\", or \"<part>:<a>&<b>\" for several states at once.";
|
|
106
|
+
e.warn(`${p}: passthrough key "${n}" in ${t} matches nothing and is ignored. ${a}`);
|
|
104
107
|
}, a = (t, n) => {
|
|
105
|
-
let r = `${
|
|
106
|
-
j.has(r) || (j.add(r), e.warn(`${
|
|
107
|
-
},
|
|
108
|
-
for (let [o, s] of Object.entries(
|
|
108
|
+
let r = `${p}|${t}|${n}|shape`;
|
|
109
|
+
j.has(r) || (j.add(r), e.warn(`${p}: passthrough value for "${n}" in ${t} carries nothing and is ignored. A value is a class string or { class, style, attrs } — not an array or a class object.`));
|
|
110
|
+
}, o = (e, n) => {
|
|
111
|
+
for (let [o, s] of Object.entries(n)) !t.has(o) && !r(o) ? i(e, o) : M(s) && a(e, o);
|
|
109
112
|
};
|
|
110
|
-
(
|
|
111
|
-
let e =
|
|
112
|
-
e && typeof e == "object" &&
|
|
113
|
-
let t = S[
|
|
114
|
-
t && typeof t == "object" &&
|
|
115
|
-
for (let [e, t] of N()) typeof t == "object" &&
|
|
113
|
+
(m.pt !== void 0 || S[p] || k?.value.some((e) => T(e.map)[p])) && ee(() => {
|
|
114
|
+
let e = m.pt;
|
|
115
|
+
e && typeof e == "object" && o("the `pt` object", e);
|
|
116
|
+
let t = S[p];
|
|
117
|
+
t && typeof t == "object" && o("the global `pt` map", t);
|
|
118
|
+
for (let [e, t] of N()) typeof t == "object" && o(`the \`${e}.${p}.pt\` map`, t);
|
|
116
119
|
});
|
|
117
|
-
for (let e of
|
|
118
|
-
let e =
|
|
120
|
+
for (let e of h) for (let t of [e, ...g.map((t) => `${e}:${t}`)]) {
|
|
121
|
+
let e = m[c(`pt:${t}`)];
|
|
119
122
|
M(e) && a(`the \`pt:${t}\` attribute`, t);
|
|
120
123
|
}
|
|
121
124
|
}
|
|
122
125
|
let B = (e, t, n = !1) => {
|
|
123
|
-
let r =
|
|
124
|
-
e.includes("&") && (G.value,
|
|
126
|
+
let r = m.pt, i = 0, a = D(e), s = null;
|
|
127
|
+
e.includes("&") && (G.value, s = H.get(e) ?? [e]);
|
|
125
128
|
let l = (n) => {
|
|
126
129
|
if (!n) return;
|
|
127
|
-
if (
|
|
128
|
-
for (let e of
|
|
129
|
-
let r = D(e),
|
|
130
|
-
|
|
131
|
-
let s =
|
|
130
|
+
if (s) {
|
|
131
|
+
for (let e of s) {
|
|
132
|
+
let r = D(e), a = r ? o(n[y.component]?.[r]) : void 0;
|
|
133
|
+
a && (t.push(a), i++);
|
|
134
|
+
let s = o(n[p]?.[e]);
|
|
132
135
|
s && (t.push(s), i++);
|
|
133
136
|
}
|
|
134
137
|
return;
|
|
135
138
|
}
|
|
136
|
-
if (
|
|
137
|
-
let e =
|
|
139
|
+
if (a) {
|
|
140
|
+
let e = o(n[y.component]?.[a]);
|
|
138
141
|
e && (t.push(e), i++);
|
|
139
142
|
}
|
|
140
|
-
let r =
|
|
143
|
+
let r = o(n[p]?.[e]);
|
|
141
144
|
r && (t.push(r), i++);
|
|
142
145
|
};
|
|
143
|
-
if (n || l(S), k && !n) for (let e of k.value) l(
|
|
144
|
-
if (e === "root" &&
|
|
145
|
-
let e =
|
|
146
|
+
if (n || l(S), k && !n) for (let e of k.value) l(T(e.map));
|
|
147
|
+
if (e === "root" && v && !n && !s) {
|
|
148
|
+
let e = v.class;
|
|
146
149
|
e != null && e !== "" && t.push({ class: e });
|
|
147
150
|
}
|
|
148
|
-
let u =
|
|
151
|
+
let u = s ? [...s.map((e) => r?.[e]), ...s.map((e) => {
|
|
149
152
|
let t = V.get(e);
|
|
150
|
-
return t === void 0 ? void 0 :
|
|
151
|
-
})] : [r?.[e],
|
|
153
|
+
return t === void 0 ? void 0 : v?.[t];
|
|
154
|
+
})] : [r?.[e], m[c(`pt:${e}`)]];
|
|
152
155
|
for (let e of u) {
|
|
153
|
-
let n =
|
|
156
|
+
let n = o(e);
|
|
154
157
|
n && (t.push(n), i++);
|
|
155
158
|
}
|
|
156
159
|
return i;
|
|
157
|
-
}, V = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), U = "", W = null, G =
|
|
160
|
+
}, V = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), U = "", W = null, G = l(() => {
|
|
158
161
|
let e = /* @__PURE__ */ new Set(), t = (t) => {
|
|
159
162
|
if (t && typeof t == "object") for (let n in t) n.includes("&") && e.add(n);
|
|
160
163
|
};
|
|
161
|
-
if (t(S[
|
|
162
|
-
if (
|
|
164
|
+
if (t(S[p]), k) for (let e of k.value) t(T(e.map)[p]);
|
|
165
|
+
if (y) {
|
|
163
166
|
let t = (t) => {
|
|
164
167
|
if (t && typeof t == "object") for (let n in t) {
|
|
165
168
|
if (!n.includes("&")) continue;
|
|
166
169
|
let t = n.indexOf(":"), r = n.slice(0, t);
|
|
167
|
-
for (let [i, a] of Object.entries(
|
|
170
|
+
for (let [i, a] of Object.entries(y.parts)) a === r && e.add(i + n.slice(t));
|
|
168
171
|
}
|
|
169
172
|
};
|
|
170
|
-
if (t(S[
|
|
173
|
+
if (t(S[y.component]), k) for (let e of k.value) t(T(e.map)[y.component]);
|
|
171
174
|
}
|
|
172
|
-
if (t(
|
|
173
|
-
for (let t in
|
|
174
|
-
let n =
|
|
175
|
+
if (t(m.pt), V.clear(), v) {
|
|
176
|
+
for (let t in v) if (t.startsWith("pt:") && t.includes("&")) {
|
|
177
|
+
let n = c(t).slice(3);
|
|
175
178
|
V.set(n, t), e.add(n);
|
|
176
179
|
}
|
|
177
180
|
}
|
|
178
181
|
let n = [...e].sort().join("|");
|
|
179
182
|
if (n === U) return W;
|
|
180
183
|
if (U = n, H.clear(), !e.size) return W = null;
|
|
181
|
-
let r = (e) =>
|
|
184
|
+
let r = (e) => g.indexOf(e), i = /* @__PURE__ */ new Map();
|
|
182
185
|
for (let t of e) {
|
|
183
186
|
let e = I(t);
|
|
184
187
|
if (!e || e.states.some((e) => r(e) < 0)) continue;
|
|
@@ -200,127 +203,128 @@ function z(n) {
|
|
|
200
203
|
return W = i.size ? i : null;
|
|
201
204
|
}), K = (e, t, n) => {
|
|
202
205
|
E.resolves++;
|
|
203
|
-
let r = [], i = B(e, r), a =
|
|
206
|
+
let r = [], i = B(e, r), a = w(e, n);
|
|
204
207
|
a && (i += B(a, r));
|
|
205
|
-
for (let n of
|
|
208
|
+
for (let n of g) t(n) && (i += B(`${e}:${n}`, r));
|
|
206
209
|
let o = G.value?.get(e);
|
|
207
210
|
if (o) for (let e of o) e.states.every((e) => t(e)) && (i += B(e.key, r));
|
|
208
|
-
return r.length === 0 ? b : i === 0 ? r[0] : r.length === 1 ? A(r[0]) : (E.merges++, A(
|
|
209
|
-
}, q = (e) =>
|
|
210
|
-
for (let e of
|
|
211
|
+
return r.length === 0 ? b : i === 0 ? r[0] : r.length === 1 ? A(r[0]) : (E.merges++, A(f(...r)));
|
|
212
|
+
}, q = (e) => _[e]?.() ?? !1, J = () => C.find((e) => e.current)?.current?.(), Y = {};
|
|
213
|
+
for (let e of h) {
|
|
211
214
|
let t;
|
|
212
215
|
Object.defineProperty(Y, e, {
|
|
213
|
-
get: () => (t ??=
|
|
216
|
+
get: () => (t ??= l(() => K(e, q))).value,
|
|
214
217
|
enumerable: !0
|
|
215
218
|
});
|
|
216
219
|
}
|
|
217
220
|
let X = (e) => {
|
|
218
|
-
let t =
|
|
221
|
+
let t = m.pt, n = a(t?.[e]), r = a(m[c(`pt:${e}`)]);
|
|
219
222
|
return n.length ? n.concat(r) : r;
|
|
220
|
-
}, Z = /* @__PURE__ */ new Map(), te = (e, t,
|
|
221
|
-
let
|
|
222
|
-
for (let e of
|
|
223
|
+
}, Z = /* @__PURE__ */ new Map(), te = (e, t, n, i) => {
|
|
224
|
+
let a = e;
|
|
225
|
+
for (let e of g) {
|
|
223
226
|
let n = t[e];
|
|
224
|
-
n !== void 0 && (
|
|
227
|
+
n !== void 0 && (a += `|${e}=${+!!n}`);
|
|
225
228
|
}
|
|
226
|
-
i !== void 0 && (
|
|
227
|
-
let s = Z.get(
|
|
229
|
+
i !== void 0 && (a += `|v=${i}`);
|
|
230
|
+
let s = Z.get(a);
|
|
228
231
|
if (!s) {
|
|
229
232
|
let n = { ...t };
|
|
230
|
-
s =
|
|
233
|
+
s = l(() => K(e, (e) => n[e] ?? q(e), i)), Z.set(a, s);
|
|
231
234
|
}
|
|
232
|
-
let
|
|
233
|
-
if (
|
|
235
|
+
let c = s.value;
|
|
236
|
+
if (n === void 0) return c;
|
|
234
237
|
let u = X(e);
|
|
235
|
-
if (u.length === 0) return
|
|
236
|
-
let
|
|
237
|
-
for (let e of
|
|
238
|
-
|
|
239
|
-
let p =
|
|
238
|
+
if (u.length === 0) return c;
|
|
239
|
+
let d = { item: n };
|
|
240
|
+
for (let e of g) d[e] = !!(t[e] ?? q(e));
|
|
241
|
+
C.length && (d.variant = i ?? J()), r.facts && Object.assign(d, r.facts(n));
|
|
242
|
+
let p = c;
|
|
240
243
|
for (let e of u) {
|
|
241
|
-
let t =
|
|
242
|
-
t && (E.merges++, p = A(p === b ? t :
|
|
244
|
+
let t = o(e(d));
|
|
245
|
+
t && (E.merges++, p = A(p === b ? t : f(p, t)));
|
|
243
246
|
}
|
|
244
247
|
return p;
|
|
245
248
|
}, ne = (e, t) => {
|
|
246
|
-
let n =
|
|
249
|
+
let n = g.filter((e) => !(t ?? g).includes(e)), r = C.some((e) => e.current);
|
|
247
250
|
return !n.length && !r || !e.length ? e : e.map((e) => (t) => {
|
|
248
251
|
let i = {};
|
|
249
252
|
for (let e of n) i[e] = q(e);
|
|
250
|
-
return
|
|
251
|
-
...
|
|
252
|
-
...t
|
|
253
|
+
return e({
|
|
254
|
+
...r ? { variant: J() } : {},
|
|
255
|
+
...t,
|
|
256
|
+
...i
|
|
253
257
|
});
|
|
254
258
|
});
|
|
255
|
-
}, Q = /* @__PURE__ */ new Map(), $ = (e, t, n,
|
|
256
|
-
let s = Array.isArray(e) ? e.map((e) => [e, e]) : Object.entries(e),
|
|
257
|
-
return u || (u =
|
|
258
|
-
let e = {}, c = (t, n,
|
|
259
|
-
let a = e[t], o = { attrs:
|
|
260
|
-
s.length && (o[
|
|
259
|
+
}, Q = /* @__PURE__ */ new Map(), $ = (e, t, n, r = !1) => {
|
|
260
|
+
let s = Array.isArray(e) ? e.map((e) => [e, e]) : Object.entries(e), c = s.map(([e, t]) => `${e}>${t}`).join(",") + "#" + (t ?? g).join(",") + (n ? "+extra" : "") + (r ? "+instance" : ""), u = Q.get(c);
|
|
261
|
+
return u || (u = l(() => {
|
|
262
|
+
let e = {}, c = (t, n, r = []) => {
|
|
263
|
+
let a = e[t], o = { attrs: f(...a?.attrs ? [a.attrs] : [], ...n) }, s = [...a?.[i] ?? [], ...r];
|
|
264
|
+
s.length && (o[i] = s), e[t] = o;
|
|
261
265
|
};
|
|
262
266
|
for (let [e, n] of s) {
|
|
263
|
-
let
|
|
264
|
-
B(e,
|
|
265
|
-
let
|
|
266
|
-
if (
|
|
267
|
-
let
|
|
268
|
-
for (let s of
|
|
267
|
+
let i = [];
|
|
268
|
+
B(e, i, r);
|
|
269
|
+
let a = C.find((t) => t.parts.includes(e));
|
|
270
|
+
if (a) {
|
|
271
|
+
let o = a.current?.();
|
|
272
|
+
for (let s of a.names()) if (!g.includes(s)) {
|
|
269
273
|
if ((t ?? []).includes(s)) {
|
|
270
274
|
let t = [];
|
|
271
|
-
B(`${e}:${s}`, t,
|
|
272
|
-
} else s ===
|
|
275
|
+
B(`${e}:${s}`, t, r), t.length && c(`${n}:${s}`, t);
|
|
276
|
+
} else s === o && B(`${e}:${s}`, i, r);
|
|
273
277
|
}
|
|
274
278
|
}
|
|
275
|
-
for (let
|
|
279
|
+
for (let a of g) if ((t ?? g).includes(a)) {
|
|
276
280
|
let t = [];
|
|
277
|
-
B(`${e}:${
|
|
278
|
-
} else q(
|
|
279
|
-
for (let
|
|
280
|
-
let e = t ??
|
|
281
|
-
if (!
|
|
282
|
-
if (!
|
|
283
|
-
B(
|
|
281
|
+
B(`${e}:${a}`, t, r), t.length && c(`${n}:${a}`, t);
|
|
282
|
+
} else q(a) && B(`${e}:${a}`, i, r);
|
|
283
|
+
for (let a of G.value?.get(e) ?? []) {
|
|
284
|
+
let e = t ?? g, o = a.states.filter((t) => e.includes(t));
|
|
285
|
+
if (!a.states.filter((t) => !e.includes(t)).every((e) => q(e))) continue;
|
|
286
|
+
if (!o.length) {
|
|
287
|
+
B(a.key, i, r);
|
|
284
288
|
continue;
|
|
285
289
|
}
|
|
286
290
|
let s = [];
|
|
287
|
-
B(
|
|
291
|
+
B(a.key, s, r), s.length && c(`${n}:${o.join("&")}`, s);
|
|
288
292
|
}
|
|
289
|
-
let
|
|
290
|
-
(
|
|
293
|
+
let o = ne(X(e), t);
|
|
294
|
+
(i.length || o.length) && c(n, i, o);
|
|
291
295
|
}
|
|
292
296
|
let l = n?.();
|
|
293
297
|
if (l && typeof l == "object") for (let [e, t] of Object.entries(l)) {
|
|
294
|
-
let n =
|
|
298
|
+
let n = o(t), r = a(t);
|
|
295
299
|
(n || r.length) && c(e, n ? [n] : [], r);
|
|
296
300
|
}
|
|
297
301
|
return e;
|
|
298
|
-
}), Q.set(
|
|
302
|
+
}), Q.set(c, u)), u.value;
|
|
299
303
|
};
|
|
300
304
|
return Object.defineProperty(Y, "rootAttrs", {
|
|
301
305
|
get: () => {
|
|
302
306
|
let e = Y.root ?? b;
|
|
303
|
-
if (!
|
|
307
|
+
if (!v) return e;
|
|
304
308
|
let t;
|
|
305
|
-
for (let e in
|
|
306
|
-
return t ?
|
|
309
|
+
for (let e in v) e !== "class" && !L(e) && !z(e) && ((t ??= {})[e] = v[e]);
|
|
310
|
+
return t ? f(t, e) : e;
|
|
307
311
|
},
|
|
308
312
|
enumerable: !1
|
|
309
313
|
}), Object.defineProperty(Y, "forwardAttrs", {
|
|
310
314
|
get: () => {
|
|
311
|
-
if (!
|
|
315
|
+
if (!v) return b;
|
|
312
316
|
let e;
|
|
313
|
-
for (let t in
|
|
317
|
+
for (let t in v) t !== "class" && !L(t) && !z(t) && ((e ??= {})[t] = v[t]);
|
|
314
318
|
return e ?? b;
|
|
315
319
|
},
|
|
316
320
|
enumerable: !1
|
|
317
321
|
}), Object.defineProperty(Y, "controlAttrs", {
|
|
318
322
|
get: () => {
|
|
319
|
-
if (!
|
|
323
|
+
if (!v || !O.size) return b;
|
|
320
324
|
let e;
|
|
321
|
-
for (let t in
|
|
325
|
+
for (let t in v) {
|
|
322
326
|
let n = F(t);
|
|
323
|
-
n !== void 0 && ((e ??= {})[n] =
|
|
327
|
+
n !== void 0 && ((e ??= {})[n] = v[t]);
|
|
324
328
|
}
|
|
325
329
|
return e ?? b;
|
|
326
330
|
},
|
|
@@ -346,11 +350,11 @@ var B = (e, t) => {
|
|
|
346
350
|
});
|
|
347
351
|
}
|
|
348
352
|
return r;
|
|
349
|
-
}, V = (e, t = () =>
|
|
350
|
-
let
|
|
353
|
+
}, V = (e, t = () => r(e.modelValue)) => {
|
|
354
|
+
let n = (e) => Array.isArray(e) ? e.length > 0 : !!e, i = () => !!e.hasErrors || n(e.errors);
|
|
351
355
|
return {
|
|
352
356
|
errors: i,
|
|
353
|
-
warnings: () => !i() && (!!e.hasWarnings ||
|
|
357
|
+
warnings: () => !i() && (!!e.hasWarnings || n(e.warnings)),
|
|
354
358
|
loading: () => !!e.loading,
|
|
355
359
|
disabled: () => !!e.disabled,
|
|
356
360
|
readonly: () => !!e.readonly,
|
|
@@ -37,9 +37,10 @@ export declare const __resetForTest: () => void;
|
|
|
37
37
|
/**
|
|
38
38
|
* Test-only, sealed like `__resetForTest` — but deliberately NOT part of it:
|
|
39
39
|
* that reset runs before every browser test (vitest.setup.ts), and re-arming
|
|
40
|
-
* the warn-once
|
|
41
|
-
* suite print the zero-host warning. Only tests that assert
|
|
42
|
-
* itself re-arm
|
|
40
|
+
* the warn-once flags there would make every hostless `toast()` call in the
|
|
41
|
+
* suite print the zero-host warning. Only tests that assert a warning
|
|
42
|
+
* itself re-arm them (the zero-host flag and the per-variant icon set),
|
|
43
|
+
* explicitly.
|
|
43
44
|
*/
|
|
44
45
|
export declare const __resetHostTrackingForTest: () => void;
|
|
45
46
|
export declare const registerToastPortal: (name: string, render: FunctionalComponent<BbToastPortalContext>) => () => boolean;
|
|
@@ -51,7 +52,7 @@ export declare const resolveToastPosition: (toast: BbToast, hostDefault?: BbToas
|
|
|
51
52
|
* Composable for firing, updating and dismissing toasts from anywhere.
|
|
52
53
|
*
|
|
53
54
|
* The plugin renders the `<BbHost />` that shows it: mount nothing (areas
|
|
54
|
-
* scoped with `<
|
|
55
|
+
* scoped with `<BbConfigScope>`: place one per area layout, it takes over).
|
|
55
56
|
* Without any host (no plugin), messages stay queued (DEV warns) and show
|
|
56
57
|
* once a host mounts, because the dismiss timer lives inside the host.
|
|
57
58
|
*/
|