bitboss-ui 3.0.0-beta.53 → 3.0.0-beta.57
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 +55 -38
- package/bin/bitboss-ui-mcp.mjs +18 -8
- package/bin/bitboss-ui.mjs +136 -24
- package/dist/ai/BbAccordion.md +119 -178
- package/dist/ai/BbAlert.md +44 -14
- package/dist/ai/BbAsterisk.md +10 -8
- package/dist/ai/BbAvatar.md +14 -29
- package/dist/ai/BbBadge.md +36 -21
- package/dist/ai/BbBaseButton.md +45 -21
- package/dist/ai/BbBaseCheckboxIcon.md +4 -4
- package/dist/ai/BbBreadcrumbs.md +2 -2
- package/dist/ai/BbButton.md +60 -49
- package/dist/ai/BbCalendar.md +29 -13
- package/dist/ai/BbCheckbox.md +29 -10
- package/dist/ai/BbCheckboxGroup.md +20 -9
- package/dist/ai/BbCollapsible.md +5 -4
- package/dist/ai/BbColorInput.md +11 -9
- package/dist/ai/BbColorPalette.md +1 -1
- package/dist/ai/BbConfirm.md +86 -114
- package/dist/ai/BbConfirmPortal.md +3 -3
- package/dist/ai/BbDatePicker.md +34 -27
- package/dist/ai/BbDatePickerInput.md +22 -13
- package/dist/ai/BbDialog.md +954 -446
- package/dist/ai/BbDropdown.md +15 -7
- package/dist/ai/BbDropdownButton.md +4 -4
- package/dist/ai/BbDropzone.md +89 -45
- package/dist/ai/BbForm.md +45 -25
- package/dist/ai/BbHost.md +159 -0
- package/dist/ai/BbHoverCard.md +12 -12
- package/dist/ai/BbHoverCardPortal.md +4 -4
- package/dist/ai/BbIndicator.md +41 -14
- package/dist/ai/BbNumberInput.md +9 -7
- package/dist/ai/BbOffCanvas.md +489 -291
- package/dist/ai/BbPagination.md +5 -4
- package/dist/ai/BbPopover.md +24 -18
- package/dist/ai/BbPopoverPortal.md +4 -4
- package/dist/ai/BbProgress.md +3 -3
- package/dist/ai/BbPtScope.md +5 -5
- package/dist/ai/BbRadio.md +8 -6
- package/dist/ai/BbRadioGroup.md +25 -9
- package/dist/ai/BbRating.md +14 -8
- package/dist/ai/BbSelect.md +69 -37
- package/dist/ai/BbSelectPopover.md +52 -29
- package/dist/ai/BbSlider.md +36 -13
- package/dist/ai/BbSpinner.md +4 -2
- package/dist/ai/BbSwitch.md +10 -8
- package/dist/ai/BbSwitchGroup.md +15 -14
- package/dist/ai/BbTable.md +13 -8
- package/dist/ai/BbTabs.md +43 -33
- package/dist/ai/BbTag.md +4 -4
- package/dist/ai/BbTextInput.md +31 -5
- package/dist/ai/BbTextarea.md +16 -8
- package/dist/ai/BbTimePicker.md +29 -14
- package/dist/ai/BbTimePickerInput.md +6 -6
- package/dist/ai/BbToast.md +109 -205
- package/dist/ai/BbToastPortal.md +3 -3
- package/dist/ai/BbTooltip.md +14 -13
- package/dist/ai/BbTree.md +33 -39
- package/dist/ai/CommonField.md +4 -4
- package/dist/ai/changelog.json +454 -42
- package/dist/ai/components.json +88 -66
- package/dist/ai/composables/useBbDialogContext.md +145 -0
- package/dist/ai/composables/useBbFormContext.md +10 -7
- package/dist/ai/composables/useBbOffCanvasContext.md +65 -0
- package/dist/ai/composables/useConfirm.md +25 -25
- package/dist/ai/composables/useMobile.md +2 -3
- package/dist/ai/composables/useToast.md +24 -24
- package/dist/ai/guides/agent-contract.md +9 -9
- package/dist/ai/guides/app-layout.md +4 -4
- package/dist/ai/guides/component-picker.md +2 -2
- package/dist/ai/guides/design-language.md +2 -6
- package/dist/ai/guides/design-tokens.md +7 -5
- package/dist/ai/guides/eslint-rules.md +69 -0
- package/dist/ai/guides/fetch-items-playbook.md +4 -0
- package/dist/ai/guides/inertia-helpers.md +188 -130
- package/dist/ai/guides/installation-and-plugin-setup.md +100 -97
- package/dist/ai/guides/migration/components/bb-collapsible.md +5 -5
- package/dist/ai/guides/migration/components/bb-dialog.md +13 -12
- package/dist/ai/guides/migration/components/bb-dropzone.md +8 -8
- package/dist/ai/guides/migration/components/bb-host.md +41 -0
- package/dist/ai/guides/migration/components/bb-offcanvas.md +10 -9
- package/dist/ai/guides/migration/components/bb-select-popover.md +2 -2
- package/dist/ai/guides/migration/components/bb-select.md +15 -15
- package/dist/ai/guides/migration/components/bb-toast.md +23 -17
- package/dist/ai/guides/migration/components/bb-tree.md +8 -8
- package/dist/ai/guides/migration/components/use-confirm.md +1 -1
- package/dist/ai/guides/migration/from-async-validator.md +2 -2
- package/dist/ai/guides/migration/v2-to-v3.md +219 -21
- package/dist/ai/guides/migration/v3-beta-css-classes.md +11 -0
- package/dist/ai/guides/migration/v3-beta-tooling.md +18 -2
- package/dist/ai/guides/options-items-playbook.md +8 -1
- package/dist/ai/guides/page-shell.md +11 -0
- package/dist/ai/guides/passthrough.md +24 -33
- package/dist/ai/guides/preset-components.md +32 -5
- package/dist/ai/guides/validated-forms.md +50 -27
- package/dist/ai/helpers/definePreset.json +26 -0
- package/dist/ai/helpers/definePreset.ts +234 -0
- package/dist/ai/helpers/inertia/manifest.json +21 -13
- package/dist/ai/helpers/inertia/types.ts +18 -7
- package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +13 -8
- package/dist/ai/helpers/inertia/usePaginatedResponseContext.ts +39 -18
- package/dist/ai/helpers/inertia/useQueryObject.ts +68 -33
- package/dist/ai/index.md +18 -13
- package/dist/ai/manifest/components/BbAccordion.json +6 -2
- package/dist/ai/manifest/components/BbAccordion.tree.json +13 -3
- package/dist/ai/manifest/components/BbAlert.json +4 -3
- package/dist/ai/manifest/components/BbAlert.tree.json +3 -3
- package/dist/ai/manifest/components/BbBaseButton.json +1 -1
- package/dist/ai/manifest/components/BbBaseCheckboxIcon.tree.json +4 -4
- package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +1 -1
- package/dist/ai/manifest/components/BbButton.json +1 -1
- package/dist/ai/manifest/components/BbCalendar.json +2 -2
- package/dist/ai/manifest/components/BbCheckbox.json +4 -3
- package/dist/ai/manifest/components/BbCheckbox.tree.json +3 -2
- package/dist/ai/manifest/components/BbCheckboxGroup.json +4 -3
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +4 -1
- package/dist/ai/manifest/components/BbCollapsible.json +1 -1
- package/dist/ai/manifest/components/BbColorInput.json +5 -4
- package/dist/ai/manifest/components/BbColorInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbColorPalette.json +1 -1
- package/dist/ai/manifest/components/BbColorPalette.tree.json +1 -1
- package/dist/ai/manifest/components/BbConfirm.json +3 -4
- package/dist/ai/manifest/components/BbConfirm.tree.json +1 -1
- package/dist/ai/manifest/components/BbConfirmPortal.json +3 -3
- package/dist/ai/manifest/components/BbDatePicker.json +4 -4
- package/dist/ai/manifest/components/BbDatePicker.tree.json +1 -1
- package/dist/ai/manifest/components/BbDatePickerInput.json +7 -6
- package/dist/ai/manifest/components/BbDatePickerInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbDialog.json +22 -12
- package/dist/ai/manifest/components/BbDialog.tree.json +4 -2
- package/dist/ai/manifest/components/BbDropdown.json +2 -2
- package/dist/ai/manifest/components/BbDropdown.tree.json +1 -1
- package/dist/ai/manifest/components/BbDropdownButton.json +2 -2
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +1 -1
- package/dist/ai/manifest/components/BbDropzone.json +2 -2
- package/dist/ai/manifest/components/BbHost.json +14 -0
- package/dist/ai/manifest/components/BbHost.tree.json +9 -0
- package/dist/ai/manifest/components/BbHoverCardPortal.json +3 -3
- package/dist/ai/manifest/components/BbNumberInput.json +5 -4
- package/dist/ai/manifest/components/BbOffCanvas.json +22 -12
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +13 -1
- package/dist/ai/manifest/components/BbPopover.json +1 -1
- package/dist/ai/manifest/components/BbPopover.tree.json +1 -1
- package/dist/ai/manifest/components/BbPopoverPortal.json +3 -3
- package/dist/ai/manifest/components/BbProgress.json +1 -1
- package/dist/ai/manifest/components/BbRadio.json +5 -4
- package/dist/ai/manifest/components/BbRadio.tree.json +2 -1
- package/dist/ai/manifest/components/BbRadioGroup.json +4 -3
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +3 -0
- package/dist/ai/manifest/components/BbRating.json +4 -3
- package/dist/ai/manifest/components/BbRating.tree.json +2 -0
- package/dist/ai/manifest/components/BbSelect.json +6 -5
- package/dist/ai/manifest/components/BbSelect.tree.json +1 -1
- package/dist/ai/manifest/components/BbSelectPopover.json +2 -2
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +1 -1
- package/dist/ai/manifest/components/BbSlider.json +6 -5
- package/dist/ai/manifest/components/BbSwitch.json +6 -5
- package/dist/ai/manifest/components/BbSwitch.tree.json +2 -1
- package/dist/ai/manifest/components/BbSwitchGroup.json +12 -11
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +3 -0
- package/dist/ai/manifest/components/BbTable.json +1 -1
- package/dist/ai/manifest/components/BbTable.tree.json +1 -1
- package/dist/ai/manifest/components/BbTabs.tree.json +1 -0
- package/dist/ai/manifest/components/BbTag.json +4 -3
- package/dist/ai/manifest/components/BbTextInput.json +5 -4
- package/dist/ai/manifest/components/BbTextarea.json +5 -4
- package/dist/ai/manifest/components/BbTimePicker.json +2 -2
- 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 +1 -1
- package/dist/ai/manifest/components/BbToast.json +4 -8
- package/dist/ai/manifest/components/BbToast.removed.json +1 -1
- package/dist/ai/manifest/components/BbToastPortal.json +6 -3
- package/dist/ai/manifest/components/BbTree.json +1 -1
- package/dist/ai/manifest/components/CommonField.json +5 -4
- package/dist/ai/manifest/components/CommonField.tree.json +76 -1
- package/dist/ai/manifest/index.json +9 -10
- package/dist/ai/manifest/meta.json +29 -4
- package/dist/ai/manifest/types.advanced.json +15 -7
- package/dist/ai/manifest/types.api.json +8 -7
- package/dist/ai/manifest/types.wrapper.json +2 -3
- package/dist/ai/recipes/inertia/approvals-inbox.md +180 -162
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +13 -14
- package/dist/ai/recipes/inertia/onboarding.md +15 -18
- package/dist/ai/recipes/inertia/ownership-atlas.md +67 -30
- package/dist/ai/recipes/inertia/record-form.md +14 -41
- package/dist/ai/recipes/inertia/records-workspace.md +121 -97
- package/dist/ai/recipes/inertia/settings-workspace.md +176 -213
- package/dist/ai/recipes/inertia/upload-center.md +30 -24
- package/dist/ai/recipes/inertia/wizard-form.md +9 -7
- package/dist/ai/recipes/nuxt/approvals-inbox.md +180 -161
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +11 -13
- package/dist/ai/recipes/nuxt/onboarding.md +15 -18
- package/dist/ai/recipes/nuxt/ownership-atlas.md +63 -26
- package/dist/ai/recipes/nuxt/record-form.md +14 -42
- package/dist/ai/recipes/nuxt/records-workspace.md +111 -96
- package/dist/ai/recipes/nuxt/settings-workspace.md +178 -219
- package/dist/ai/recipes/nuxt/upload-center.md +25 -23
- package/dist/ai/recipes/nuxt/wizard-form.md +9 -7
- package/dist/ai/recipes/vue/approvals-inbox.md +181 -163
- package/dist/ai/recipes/vue/inline-edit-workspace.md +10 -12
- package/dist/ai/recipes/vue/onboarding.md +15 -20
- package/dist/ai/recipes/vue/ownership-atlas.md +63 -26
- package/dist/ai/recipes/vue/record-form.md +14 -42
- package/dist/ai/recipes/vue/records-workspace.md +111 -96
- package/dist/ai/recipes/vue/settings-workspace.md +178 -219
- package/dist/ai/recipes/vue/upload-center.md +25 -23
- package/dist/ai/recipes/vue/wizard-form.md +9 -9
- package/dist/ai/source/BbAccordion.md +79 -9
- package/dist/ai/source/BbAlert.md +34 -12
- package/dist/ai/source/BbBaseButton.md +15 -2
- package/dist/ai/source/BbBaseCheckboxIcon.md +4 -0
- package/dist/ai/source/BbButton.md +18 -4
- package/dist/ai/source/BbCalendar.md +10 -5
- package/dist/ai/source/BbCheckbox.md +27 -8
- package/dist/ai/source/BbCheckboxGroup.md +26 -6
- package/dist/ai/source/BbCollapsible.md +6 -7
- package/dist/ai/source/BbColorInput.md +9 -6
- package/dist/ai/source/BbColorPalette.md +0 -1
- package/dist/ai/source/BbConfirm.md +16 -28
- package/dist/ai/source/BbConfirmPortal.md +7 -14
- package/dist/ai/source/BbDatePicker.md +66 -2
- package/dist/ai/source/BbDatePickerInput.md +19 -16
- package/dist/ai/source/BbDialog.md +340 -50
- package/dist/ai/source/BbDropdown.md +5 -5
- package/dist/ai/source/BbDropdownGroup.md +5 -4
- package/dist/ai/source/BbDropzone.md +29 -10
- package/dist/ai/source/BbForm.md +20 -1
- package/dist/ai/source/BbHost.md +97 -0
- package/dist/ai/source/BbHoverCard.md +5 -5
- package/dist/ai/source/BbHoverCardPortal.md +7 -7
- package/dist/ai/source/BbNumberInput.md +10 -7
- package/dist/ai/source/BbOffCanvas.md +892 -53
- package/dist/ai/source/BbPopover.md +5 -6
- package/dist/ai/source/BbPopoverPortal.md +7 -7
- package/dist/ai/source/BbProgress.md +1 -1
- package/dist/ai/source/BbRadio.md +29 -8
- package/dist/ai/source/BbRadioGroup.md +25 -6
- package/dist/ai/source/BbRating.md +22 -6
- package/dist/ai/source/BbSelect.md +21 -11
- package/dist/ai/source/BbSelectPopover.md +10 -7
- package/dist/ai/source/BbSlider.md +47 -11
- package/dist/ai/source/BbSwitch.md +22 -3
- package/dist/ai/source/BbSwitchGroup.md +20 -1
- package/dist/ai/source/BbTable.md +5 -3
- package/dist/ai/source/BbTabs.md +33 -3
- package/dist/ai/source/BbTabsList.md +16 -3
- package/dist/ai/source/BbTabsPanels.md +6 -0
- package/dist/ai/source/BbTabsRoot.md +6 -0
- package/dist/ai/source/BbTag.md +9 -6
- package/dist/ai/source/BbTextInput.md +10 -7
- package/dist/ai/source/BbTextarea.md +10 -7
- package/dist/ai/source/BbTimePicker.md +23 -2
- package/dist/ai/source/BbTimePickerInput.md +14 -20
- package/dist/ai/source/BbToast.md +58 -27
- package/dist/ai/source/BbToastPortal.md +25 -14
- package/dist/ai/source/BbTree.md +21 -12
- package/dist/ai/source/CommonField.md +393 -45
- package/dist/ai/source/CommonPopover.md +4 -0
- package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +47 -33
- package/dist/components/BbAccordion/types.d.ts +21 -6
- package/dist/components/BbAccordion/types.js +2 -0
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +39 -37
- package/dist/components/BbAlert/types.d.ts +11 -4
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/BbBaseButton/types.d.ts +3 -2
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +81 -80
- package/dist/components/BbButton/types.d.ts +3 -2
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/BbCalendar/types.d.ts +6 -1
- package/dist/components/BbCalendar/useDayjsLocale.d.ts +8 -0
- package/dist/components/BbCalendar/useDayjsLocale.js +14 -2
- package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +1 -1
- package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +86 -84
- package/dist/components/BbCheckbox/types.d.ts +7 -6
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +91 -90
- package/dist/components/BbCheckboxGroup/types.d.ts +7 -6
- package/dist/components/BbCollapsible/BbCollapsible.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbCollapsible/types.d.ts +4 -4
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +69 -68
- package/dist/components/BbColorInput/types.d.ts +7 -6
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +0 -1
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +46 -48
- package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +1 -1
- package/dist/components/BbConfirm/BbConfirmPortal.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbConfirm/types.d.ts +5 -12
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +118 -103
- package/dist/components/BbDatePicker/types.d.ts +8 -0
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +303 -309
- package/dist/components/BbDatePickerInput/types.d.ts +15 -11
- package/dist/components/BbDialog/BbDialog.vue.d.ts +10 -0
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +250 -164
- package/dist/components/BbDialog/types.d.ts +113 -12
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +0 -1
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +13 -13
- package/dist/components/BbDropdown/types.d.ts +5 -4
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +2 -2
- package/dist/components/BbDropzone/BbDropzone.vue_vue_type_script_setup_true_lang.js +120 -116
- package/dist/components/BbDropzone/types.d.ts +8 -3
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +179 -173
- package/dist/components/BbForm/bindFormField.d.ts +2 -3
- package/dist/components/BbHost/BbHost.vue.d.ts +4 -0
- package/dist/components/BbHost/BbHost.vue.js +5 -0
- package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +30 -0
- package/dist/components/BbHost/BbHostOpening.d.ts +27 -0
- package/dist/components/BbHost/BbHostOpening.js +43 -0
- package/dist/components/BbHost/types.d.ts +7 -0
- package/dist/components/BbHoverCard/BbHoverCardPortal.vue.d.ts +2 -2
- package/dist/components/BbHoverCard/types.d.ts +5 -5
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +143 -142
- package/dist/components/BbNumberInput/types.d.ts +8 -7
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +11 -0
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +520 -253
- package/dist/components/BbOffCanvas/sheetSnap.d.ts +64 -0
- package/dist/components/BbOffCanvas/sheetSnap.js +58 -0
- package/dist/components/BbOffCanvas/types.d.ts +124 -19
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +68 -68
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +0 -1
- package/dist/components/BbPopover/BbPopoverPortal.vue.d.ts +2 -2
- package/dist/components/BbPopover/types.d.ts +5 -5
- package/dist/components/BbProgress/types.d.ts +1 -1
- package/dist/components/BbRadio/BbRadio.vue.d.ts +1 -1
- package/dist/components/BbRadio/BbRadio.vue_vue_type_script_setup_true_lang.js +66 -64
- package/dist/components/BbRadio/types.d.ts +7 -6
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +96 -95
- package/dist/components/BbRadioGroup/types.d.ts +7 -6
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +79 -78
- package/dist/components/BbRating/types.d.ts +7 -6
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +162 -158
- package/dist/components/BbSelect/types.d.ts +12 -10
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +7 -5
- package/dist/components/BbSelectPopover/types.d.ts +5 -4
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +177 -168
- package/dist/components/BbSlider/types.d.ts +14 -6
- package/dist/components/BbSwitch/BbSwitch.vue.d.ts +1 -1
- package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +89 -87
- package/dist/components/BbSwitch/types.d.ts +2 -1
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +131 -130
- package/dist/components/BbSwitchGroup/types.d.ts +2 -1
- package/dist/components/BbTable/types.d.ts +5 -3
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +33 -30
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +54 -50
- package/dist/components/BbTabs/tablistName.d.ts +4 -0
- package/dist/components/BbTabs/tablistName.js +13 -0
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +64 -63
- package/dist/components/BbTag/types.d.ts +7 -6
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +71 -70
- package/dist/components/BbTextInput/types.d.ts +8 -7
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +81 -80
- package/dist/components/BbTextarea/types.d.ts +8 -7
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +90 -86
- package/dist/components/BbTimePicker/types.d.ts +6 -0
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +162 -167
- package/dist/components/BbTimePickerInput/types.d.ts +9 -8
- package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +41 -34
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +79 -78
- package/dist/components/BbToast/BbToastPortal.vue.d.ts +5 -5
- package/dist/components/BbToast/BbToastPortal.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbToast/BbToastRegion.vue.d.ts +2 -0
- package/dist/components/BbToast/BbToastRegion.vue_vue_type_script_setup_true_lang.js +66 -66
- package/dist/components/BbToast/types.d.ts +17 -8
- package/dist/components/BbTree/BbTree.vue.d.ts +1 -1
- package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbTree/types.d.ts +6 -6
- package/dist/components/CommonField/CommonField.vue.d.ts +2 -1
- package/dist/components/CommonField/CommonField.vue_vue_type_script_setup_true_lang.js +146 -99
- package/dist/components/CommonField/types.d.ts +18 -12
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +32 -29
- package/dist/composables/formSubmitLock.d.ts +35 -0
- package/dist/composables/formSubmitLock.js +17 -2
- package/dist/composables/hostOpenings.d.ts +82 -0
- package/dist/composables/hostOpenings.js +70 -0
- package/dist/composables/hostRegistry.d.ts +39 -0
- package/dist/composables/hostRegistry.js +21 -0
- package/dist/composables/overlayRegistry.d.ts +195 -0
- package/dist/composables/overlayRegistry.js +296 -0
- package/dist/composables/useBbDialogContext.d.ts +100 -0
- package/dist/composables/useBbDialogContext.js +56 -0
- package/dist/composables/useBbFormContext.d.ts +7 -0
- package/dist/composables/useBbFormContext.js +40 -34
- package/dist/composables/useBbOffCanvasContext.d.ts +23 -0
- package/dist/composables/useBbOffCanvasContext.js +8 -0
- package/dist/composables/useBbTabsContext.js +140 -171
- package/dist/composables/useConfig.js +4 -0
- package/dist/composables/useConfirm.d.ts +44 -21
- package/dist/composables/useConfirm.js +4 -4
- package/dist/composables/useKeyboardInset.js +10 -20
- package/dist/composables/useOnDemandOpener.d.ts +35 -0
- package/dist/composables/useOnDemandOpener.js +30 -0
- package/dist/composables/useOverlayNavigation.d.ts +37 -0
- package/dist/composables/useOverlayNavigation.js +89 -0
- package/dist/composables/useRefusedCloseAnnouncement.d.ts +13 -0
- package/dist/composables/useRefusedCloseAnnouncement.js +15 -0
- package/dist/composables/useToast.d.ts +5 -6
- package/dist/composables/useToast.js +4 -3
- package/dist/composables/useUrlQueryParam.d.ts +21 -0
- package/dist/composables/useUrlQueryParam.js +48 -0
- package/dist/deprecation/ai-deprecations.json.d.ts +3 -10
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/directives/bbDate.d.ts +40 -9
- package/dist/directives/bbDialog.d.ts +60 -0
- package/dist/directives/bbDialog.js +7 -0
- package/dist/directives/bbHoverCard.d.ts +3 -3
- package/dist/directives/bbHoverCard.js +1 -1
- package/dist/directives/bbOffCanvas.d.ts +46 -0
- package/dist/directives/bbOffCanvas.js +7 -0
- package/dist/directives/bbPopover.d.ts +3 -3
- package/dist/directives/bbPopover.js +1 -1
- package/dist/directives/bbTime.d.ts +23 -6
- package/dist/directives/directivePortal.d.ts +11 -11
- package/dist/directives/directivePortal.js +1 -1
- package/dist/directives/overlayTrigger.d.ts +28 -0
- package/dist/directives/overlayTrigger.js +93 -0
- package/dist/i18n/locales/cs.json +6 -2
- package/dist/i18n/locales/da.json +6 -2
- package/dist/i18n/locales/de-CH.json +6 -2
- package/dist/i18n/locales/de.json +6 -2
- package/dist/i18n/locales/el.json +6 -2
- package/dist/i18n/locales/en-GB.json +6 -2
- package/dist/i18n/locales/en.json +6 -2
- package/dist/i18n/locales/es-MX.json +6 -2
- package/dist/i18n/locales/es.json +6 -2
- package/dist/i18n/locales/fi.json +6 -2
- package/dist/i18n/locales/fr.json +6 -2
- package/dist/i18n/locales/hu.json +6 -2
- package/dist/i18n/locales/it.json +6 -2
- package/dist/i18n/locales/ja.json +6 -2
- package/dist/i18n/locales/ko.json +6 -2
- package/dist/i18n/locales/nb.json +6 -2
- package/dist/i18n/locales/nl.json +6 -2
- package/dist/i18n/locales/pl.json +6 -2
- package/dist/i18n/locales/pt-BR.json +6 -2
- package/dist/i18n/locales/pt-PT.json +6 -2
- package/dist/i18n/locales/ro.json +6 -2
- package/dist/i18n/locales/ru.json +6 -2
- package/dist/i18n/locales/sv.json +6 -2
- package/dist/i18n/locales/tr.json +6 -2
- package/dist/i18n/locales/uk.json +6 -2
- package/dist/i18n/locales/zh-CN.json +6 -2
- package/dist/i18n/locales/zh-HK.json +6 -2
- package/dist/i18n/locales/zh-TW.json +6 -2
- package/dist/icon-scan.d.ts +21 -0
- package/dist/icon-scan.js +29 -26
- package/dist/index.d.ts +14 -5
- package/dist/index.js +75 -72
- package/dist/llms-full.txt +5982 -4188
- package/dist/llms-medium.txt +120 -122
- package/dist/llms.txt +11 -7
- package/dist/locale-blueprint.json +6 -2
- package/dist/nuxt-auto-imports.js +3 -1
- package/dist/nuxt-module.d.ts +7 -4
- package/dist/nuxt.js +23 -20
- package/dist/plugin.js +29 -25
- package/dist/project-dts.d.ts +15 -2
- package/dist/project-dts.js +16 -10
- package/dist/runtime/nuxt-plugin.js +19 -17
- package/dist/styles.css +2 -2
- package/dist/types/Config.d.ts +33 -7
- package/dist/types/ptComponentMap.d.ts +1 -1
- package/dist/utilities/functions/isTextEntry.d.ts +5 -0
- package/dist/utilities/functions/isTextEntry.js +15 -0
- package/dist/utilities/functions/responsiveDefault.d.ts +7 -0
- package/dist/utilities/functions/responsiveDefault.js +11 -0
- package/dist/utilities/misc/autofocus.d.ts +20 -0
- package/dist/utilities/misc/autofocus.js +11 -0
- package/dist/utils/copyData.d.ts +13 -0
- package/dist/utils/copyData.js +29 -0
- package/dist/utils/cssLayers.d.ts +10 -0
- package/dist/utils/cssLayers.js +23 -18
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +29 -14
- package/dist/vite.js +247 -242
- package/llms.txt +11 -7
- package/package.json +1 -1
- package/scripts/lib/agent-manifest.mjs +22 -3
- package/scripts/lib/css-class-check.mjs +33 -2
- package/scripts/lib/define-preset-copy.mjs +123 -0
- package/scripts/lib/eslint-disable.mjs +22 -2
- package/scripts/lib/eslint-plugin.d.ts +4 -2
- package/scripts/lib/eslint-plugin.mjs +130 -93
- package/scripts/lib/portal-names.mjs +198 -28
- package/scripts/lib/prefer-v-bb-dialog.mjs +455 -0
- package/scripts/lib/project-variant-dts.mjs +53 -1
- package/scripts/lib/rule-registry.mjs +379 -0
- package/scripts/lib/swap-noun.mjs +33 -0
- package/scripts/lib/unimported-components.mjs +3 -1
- package/scripts/lib/validate-bb-markup.mjs +93 -77
- package/scripts/lib/required-in-form.mjs +0 -240
package/README.md
CHANGED
|
@@ -38,18 +38,20 @@ Full detail: `dist/ai/guides/installation-and-plugin-setup.md`.
|
|
|
38
38
|
|
|
39
39
|
### Composables
|
|
40
40
|
|
|
41
|
-
| Composable
|
|
42
|
-
|
|
|
43
|
-
| `useBbConfig`
|
|
44
|
-
| `
|
|
45
|
-
| `
|
|
46
|
-
| `
|
|
47
|
-
| `
|
|
48
|
-
| `
|
|
49
|
-
| `
|
|
50
|
-
| `
|
|
51
|
-
| `
|
|
52
|
-
| `
|
|
41
|
+
| Composable | Role |
|
|
42
|
+
| ----------------------- | --------------------------------------------------------------------- |
|
|
43
|
+
| `useBbConfig` | `setConfig()` patches the one runtime-editable kit option: `locale`. |
|
|
44
|
+
| `useBbDialogContext` | Open, close and read a `BbDialog` by id (nearest scope). |
|
|
45
|
+
| `useBbDropdownContext` | Read a `BbDropdown`'s resolved groups/selections from anywhere by id. |
|
|
46
|
+
| `useBbOffCanvasContext` | Open, close and read a `BbOffCanvas` by id (nearest scope). |
|
|
47
|
+
| `useBbTableContext` | Imperative handle onto a `BbTable` by id. |
|
|
48
|
+
| `useBbTabsContext` | Programmatic tab selection for a `BbTabs` by id. |
|
|
49
|
+
| `useConfirm` | Programmatic confirm / modal flows. |
|
|
50
|
+
| `useCountdown` | Countdown timer state. |
|
|
51
|
+
| `useId` | SSR-safe unique ids. |
|
|
52
|
+
| `useMobile` | Mobile / viewport-oriented behaviour. |
|
|
53
|
+
| `useSafeArea` | Claim a screen edge for a docked panel so toasts avoid it. |
|
|
54
|
+
| `useToast` | Toast notifications API. |
|
|
53
55
|
|
|
54
56
|
### Utilities
|
|
55
57
|
|
|
@@ -57,7 +59,7 @@ Full detail: `dist/ai/guides/installation-and-plugin-setup.md`.
|
|
|
57
59
|
|
|
58
60
|
### Directives
|
|
59
61
|
|
|
60
|
-
`vBbTooltip`, `vBbDropdown`, `vBbColor`, `vBbDate`, `vBbTime`, `vBbHoverCard`, `vBbPopover` — plus a
|
|
62
|
+
`vBbTooltip`, `vBbDropdown`, `vBbColor`, `vBbDate`, `vBbTime`, `vBbHoverCard`, `vBbPopover`, `vBbDialog`, `vBbOffCanvas` — plus a
|
|
61
63
|
`Bb*DirectivePlugin` for each, for app-level registration. Prefer the directive
|
|
62
64
|
over the component for simple no-slot cases.
|
|
63
65
|
|
|
@@ -382,7 +384,7 @@ in place — the rule is a codemod, not just a linter:
|
|
|
382
384
|
| `<BbIcon type="star" />` | `<BbIcon icon="star" />` | rename |
|
|
383
385
|
| `<BbTable :allow-select-all="x" />` | `<BbTable :disable-select-all="!(x)" />` | polarity inversion |
|
|
384
386
|
| `<BbSelect allow-writing="not-mobile" />` | `<BbSelect disable-writing="mobile" />` | rename + value remap |
|
|
385
|
-
| `<
|
|
387
|
+
| `<BbHost />` | `<BbHost />` | value map |
|
|
386
388
|
| `<BbPopover show-arrow />` | `<BbPopover />` | removed & inert → deleted |
|
|
387
389
|
| `<BbBadge content="5" />` | _(unchanged — reported)_ | needs a slot: manual |
|
|
388
390
|
|
|
@@ -597,37 +599,52 @@ script, a switch bound to the same ref and your own components are never
|
|
|
597
599
|
reported. `BbAccordion` wires all of it for you.
|
|
598
600
|
`bitboss-ui check` reports the same as `collapsible-trigger-aria`.
|
|
599
601
|
|
|
600
|
-
####
|
|
602
|
+
#### A dialog opened through a ref: `prefer-v-bb-dialog`
|
|
601
603
|
|
|
602
|
-
A `
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
validates; the asterisk follows:
|
|
604
|
+
A `ref(false)` whose only jobs are a `BbDialog` / `BbOffCanvas` `v-model` and
|
|
605
|
+
`@click="open = true"` is wiring the library does for you.
|
|
606
|
+
`bitboss-ui/prefer-v-bb-dialog` (warn, a suggestion) reports it and points at
|
|
607
|
+
the id form, where the trigger also gets `aria-haspopup`, `aria-expanded`,
|
|
608
|
+
`aria-controls` and focus back:
|
|
608
609
|
|
|
609
610
|
```vue
|
|
610
611
|
<template>
|
|
611
|
-
<
|
|
612
|
-
|
|
613
|
-
<BbTextInput
|
|
614
|
-
name="vat"
|
|
615
|
-
label="VAT number"
|
|
616
|
-
:rules="{ required: isCompany }"
|
|
617
|
-
/>
|
|
618
|
-
</BbForm>
|
|
612
|
+
<BbButton v-bb-dialog="'create-label'">New label</BbButton>
|
|
613
|
+
<BbDialog id="create-label" title="Create label">…</BbDialog>
|
|
619
614
|
</template>
|
|
620
615
|
```
|
|
621
616
|
|
|
622
|
-
`--fix` rewrites
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
reported
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
`
|
|
630
|
-
|
|
617
|
+
`--fix` rewrites it only when nothing else uses the ref: it drops the
|
|
618
|
+
declaration (and the `ref` import once unused), turns the `v-model` into an
|
|
619
|
+
`id` and each click into `v-bb-dialog` (`v-bb-off-canvas` on a `BbOffCanvas`).
|
|
620
|
+
A ref the code also writes (`open = false` in a Cancel, `open.value = false`
|
|
621
|
+
after a save) is reported without a fix: those closes become the slots'
|
|
622
|
+
`close` / `complete`. A ref anything reads (`v-if="open"`, `watch(open)`, a
|
|
623
|
+
toggle) is never reported, since the page needs the state.
|
|
624
|
+
`bitboss-ui check` reports the same as `prefer-v-bb-dialog` (a warning).
|
|
625
|
+
|
|
626
|
+
#### A rule nobody registered: `no-unregistered-rule`
|
|
627
|
+
|
|
628
|
+
A string rule is a vee-validate rule name, and vee-validate knows only the
|
|
629
|
+
names your app passes to `defineRule`; it throws "No such validator" when the
|
|
630
|
+
field validates. `bitboss-ui/no-unregistered-rule` (error) reads every rule
|
|
631
|
+
name a library control's `rules` shows (`rules="required|email"`, a bound
|
|
632
|
+
string, `:rules="{ required: isCompany }"`) and looks for its registration
|
|
633
|
+
across the project: a literal `defineRule('email', …)`, a loop over
|
|
634
|
+
`@vee-validate/rules` itself (it reads the installed package), or a loop over
|
|
635
|
+
an object literal in the same file. A registration it cannot read (a name
|
|
636
|
+
from a variable, an object from another file, a shared package) is never a
|
|
637
|
+
silence: the rule is reported as unconfirmed, naming the call. Write the name
|
|
638
|
+
literally, or list it once in `bitboss-ui.check.json`:
|
|
639
|
+
|
|
640
|
+
```json
|
|
641
|
+
{ "registeredRules": ["tenant_code"] }
|
|
642
|
+
```
|
|
643
|
+
|
|
644
|
+
(or `package.json` → `"bitboss-ui": { "registeredRules": [...] }`). A function
|
|
645
|
+
rule needs no registration, and rules beside a form `schema` never run, so
|
|
646
|
+
neither is reported. `bitboss-ui check` reports the same as
|
|
647
|
+
`unregistered-rule`.
|
|
631
648
|
|
|
632
649
|
#### Rating star colours: `no-star-color`
|
|
633
650
|
|
package/bin/bitboss-ui-mcp.mjs
CHANGED
|
@@ -672,7 +672,7 @@ function seeAlso(entry, contract) {
|
|
|
672
672
|
// where "write a MemberSelect around BbSelect" is answered (Q52.6.1).
|
|
673
673
|
if (/options-items-playbook\.md/.test(contract) && isGeneric(entry))
|
|
674
674
|
out.push(
|
|
675
|
-
`Your own ${entry.name} with fixed items (a CustomerSelect): a preset, one call to definePreset (a helper you copy
|
|
675
|
+
`Your own ${entry.name} with fixed items (a CustomerSelect): a preset, one call to definePreset (a helper you copy with: cp node_modules/bitboss-ui/dist/ai/helpers/definePreset.ts src/lib/definePreset.ts; not a bitboss-ui export): get_guide({ name: 'preset-components.md' }). Wrapping BbSelect in your own component with its own logic: get_guide({ name: 'options-items-playbook.md', sections: ['Wrapping BbSelect in your own component'] })`
|
|
676
676
|
);
|
|
677
677
|
if (entry.validated)
|
|
678
678
|
out.push(
|
|
@@ -2180,12 +2180,13 @@ function getComposable({ name, sections, maxChars } = {}) {
|
|
|
2180
2180
|
const markdown = readFileSync(join(dir, file), 'utf-8');
|
|
2181
2181
|
/*
|
|
2182
2182
|
* A composable that needs a host component says so FIRST, as a field: with
|
|
2183
|
-
* no `<
|
|
2183
|
+
* no `<BbHost />`, `await confirm()` resolves `false` after a second and a
|
|
2184
|
+
* toast never shows. Every blind answerer
|
|
2184
2185
|
* of "await an Are-you-sure dialog" (4 of 4, 2026-09-24) left the host out,
|
|
2185
2186
|
* although the doc's second paragraph states it.
|
|
2186
2187
|
*/
|
|
2187
2188
|
const host = frontmatter(markdown).summary?.match(
|
|
2188
|
-
/Requires (exactly one <Bb\w+ \/> host[^.]*)\./
|
|
2189
|
+
/Requires (exactly one <Bb\w+ \/>(?: host)?[^.]*)\./
|
|
2189
2190
|
)?.[1];
|
|
2190
2191
|
const base = {
|
|
2191
2192
|
found: true,
|
|
@@ -2532,6 +2533,8 @@ const ROW_FIELDS =
|
|
|
2532
2533
|
* as their hand-written `summary`; `detail: 'rows'` → the full rows as before.
|
|
2533
2534
|
*/
|
|
2534
2535
|
const CHANGES_PAGE = 60;
|
|
2536
|
+
/** The lines' share of a page (the envelope adds ~1K): keeps it under 8K. */
|
|
2537
|
+
const CHANGES_PAGE_CHARS = 6000;
|
|
2535
2538
|
|
|
2536
2539
|
function changeLine(row, focus) {
|
|
2537
2540
|
// 16 form controls in full is ~250 chars of the line; the component filter
|
|
@@ -2574,15 +2577,22 @@ function changeLines(rows, cursor, withClassMap = false, focus) {
|
|
|
2574
2577
|
: compareVersions(a, b)
|
|
2575
2578
|
);
|
|
2576
2579
|
const start = Math.max(0, Number(cursor ?? 0) || 0);
|
|
2577
|
-
|
|
2580
|
+
// A page ends at CHANGES_PAGE lines or CHANGES_PAGE_CHARS of them, so its
|
|
2581
|
+
// size holds however long the summaries grow; the rest is a cursor away.
|
|
2582
|
+
let end = start;
|
|
2583
|
+
for (let used = 0; end < lines.length && end - start < CHANGES_PAGE; end++) {
|
|
2584
|
+
used += lines[end][1].length + 3;
|
|
2585
|
+
if (used > CHANGES_PAGE_CHARS && end > start) break;
|
|
2586
|
+
}
|
|
2578
2587
|
const byRelease = {};
|
|
2579
|
-
for (const [release, line] of
|
|
2588
|
+
for (const [release, line] of lines.slice(start, end))
|
|
2589
|
+
(byRelease[release] ??= []).push(line);
|
|
2580
2590
|
return {
|
|
2581
2591
|
changes: byRelease,
|
|
2582
|
-
...(
|
|
2592
|
+
...(end < lines.length
|
|
2583
2593
|
? {
|
|
2584
|
-
nextCursor: String(
|
|
2585
|
-
remaining: lines.length -
|
|
2594
|
+
nextCursor: String(end),
|
|
2595
|
+
remaining: lines.length - end,
|
|
2586
2596
|
}
|
|
2587
2597
|
: {}),
|
|
2588
2598
|
...(Object.keys(classRenames).length && start === 0 && !withClassMap
|
package/bin/bitboss-ui.mjs
CHANGED
|
@@ -86,7 +86,10 @@ import {
|
|
|
86
86
|
portalFindings,
|
|
87
87
|
projectPortalIndex,
|
|
88
88
|
} from '../scripts/lib/portal-names.mjs';
|
|
89
|
-
import {
|
|
89
|
+
import {
|
|
90
|
+
cssClassFindings,
|
|
91
|
+
ownedClassBlocks,
|
|
92
|
+
} from '../scripts/lib/css-class-check.mjs';
|
|
90
93
|
import {
|
|
91
94
|
cssLocalFindings,
|
|
92
95
|
libraryTokens,
|
|
@@ -98,6 +101,11 @@ import {
|
|
|
98
101
|
} from '../scripts/lib/hand-imported-styles.mjs';
|
|
99
102
|
import { unknownLocaleFindings } from '../scripts/lib/locale-check.mjs';
|
|
100
103
|
import {
|
|
104
|
+
readShippedDefinePreset,
|
|
105
|
+
staleDefinePresetFindings,
|
|
106
|
+
} from '../scripts/lib/define-preset-copy.mjs';
|
|
107
|
+
import {
|
|
108
|
+
readRegisteredVariants,
|
|
101
109
|
syncNotice,
|
|
102
110
|
syncProjectVariantDts,
|
|
103
111
|
} from '../scripts/lib/project-variant-dts.mjs';
|
|
@@ -117,12 +125,18 @@ import {
|
|
|
117
125
|
MCP_BIN_PATH,
|
|
118
126
|
MCP_PEERS,
|
|
119
127
|
} from '../scripts/lib/mcp-config.mjs';
|
|
128
|
+
import {
|
|
129
|
+
addRegistrations,
|
|
130
|
+
configuredRegisteredRules,
|
|
131
|
+
ownedBy,
|
|
132
|
+
packageRuleNames,
|
|
133
|
+
} from '../scripts/lib/rule-registry.mjs';
|
|
120
134
|
import {
|
|
121
135
|
loadManifest,
|
|
122
|
-
registeredRuleNames,
|
|
123
136
|
presetDefinitions,
|
|
124
137
|
validateMarkdown,
|
|
125
138
|
validateVueSnippet,
|
|
139
|
+
VARIANT_INTENT_OPTIONS,
|
|
126
140
|
} from '../scripts/lib/validate-bb-markup.mjs';
|
|
127
141
|
|
|
128
142
|
const PACKAGE_ROOT = join(dirname(fileURLToPath(import.meta.url)), '..');
|
|
@@ -455,29 +469,71 @@ function inSkippedDir(relPath) {
|
|
|
455
469
|
* `recursive: true` readdir) is what keeps a multi-thousand-file `vendor/`
|
|
456
470
|
* tree from being walked at all.
|
|
457
471
|
*/
|
|
458
|
-
function collectCheckFiles(
|
|
472
|
+
function collectCheckFiles(
|
|
473
|
+
dir,
|
|
474
|
+
relBase = dir,
|
|
475
|
+
extensions = CHECK_EXTENSIONS,
|
|
476
|
+
chain = []
|
|
477
|
+
) {
|
|
459
478
|
let entries;
|
|
460
479
|
try {
|
|
461
480
|
entries = readdirSync(dir, { withFileTypes: true });
|
|
462
481
|
} catch {
|
|
463
482
|
return [];
|
|
464
483
|
}
|
|
484
|
+
// The `.gitignore` chain at this level (git semantics, shared with the
|
|
485
|
+
// icon scan): build output a project ignores (`.vercel/output`, `.nuxt`,
|
|
486
|
+
// `coverage`) is never swept.
|
|
487
|
+
const own = gitignoreKit?.readGitignore(dir);
|
|
488
|
+
const here = own ? [...chain, { dir, ig: own }] : chain;
|
|
489
|
+
const ignored = (full, isDir) =>
|
|
490
|
+
!!gitignoreKit && gitignoreKit.isGitignored(here, full, isDir);
|
|
465
491
|
const out = [];
|
|
466
492
|
for (const entry of entries) {
|
|
467
493
|
const full = join(dir, entry.name);
|
|
468
494
|
if (entry.isDirectory()) {
|
|
469
495
|
if (isSkippedSegment(entry.name)) continue;
|
|
470
496
|
if (isSkippedSubpath(relative(relBase, full))) continue;
|
|
471
|
-
|
|
497
|
+
if (ignored(full, true)) continue;
|
|
498
|
+
out.push(...collectCheckFiles(full, relBase, extensions, here));
|
|
472
499
|
continue;
|
|
473
500
|
}
|
|
474
501
|
if (!entry.isFile()) continue;
|
|
475
502
|
if (!extensions.some((ext) => entry.name.endsWith(ext))) continue;
|
|
503
|
+
if (ignored(full, false)) continue;
|
|
476
504
|
out.push(full);
|
|
477
505
|
}
|
|
478
506
|
return out;
|
|
479
507
|
}
|
|
480
508
|
|
|
509
|
+
/**
|
|
510
|
+
* The icon scan's `.gitignore` reader, loaded once by `check` before its
|
|
511
|
+
* sweep. In the library repo it loads from source (`src/icon-scan.ts`, Node
|
|
512
|
+
* strips the types): `dist` may be absent (the release runs the node suite
|
|
513
|
+
* before the build) or stale. In the package, which ships no `src`, it loads
|
|
514
|
+
* from `dist/icon-scan.js`. Failing to load it is an error, never a sweep
|
|
515
|
+
* without it: that would report a project's gitignored build output.
|
|
516
|
+
* Returns the error, or null once loaded.
|
|
517
|
+
*/
|
|
518
|
+
let gitignoreKit = null;
|
|
519
|
+
async function loadGitignoreKit() {
|
|
520
|
+
const source = join(PACKAGE_ROOT, 'src', 'icon-scan.ts');
|
|
521
|
+
const file = existsSync(source)
|
|
522
|
+
? source
|
|
523
|
+
: join(PACKAGE_ROOT, 'dist', 'icon-scan.js');
|
|
524
|
+
const where = relative(PACKAGE_ROOT, file);
|
|
525
|
+
let kit;
|
|
526
|
+
try {
|
|
527
|
+
kit = await import(pathToFileURL(file).href);
|
|
528
|
+
} catch (error) {
|
|
529
|
+
return `cannot load the .gitignore reader from ${where}: ${error.message}`;
|
|
530
|
+
}
|
|
531
|
+
if (!kit.readGitignore || !kit.isGitignored || !kit.ancestorGitignores)
|
|
532
|
+
return `${where} does not export the .gitignore reader`;
|
|
533
|
+
gitignoreKit = kit;
|
|
534
|
+
return null;
|
|
535
|
+
}
|
|
536
|
+
|
|
481
537
|
/**
|
|
482
538
|
* Resolve the file list for `check`: explicit globs/paths if given, otherwise
|
|
483
539
|
* every `.vue`/`.md` file under `cwd` (excluding `CHECK_SKIP_DIRS`/
|
|
@@ -492,7 +548,13 @@ function collectCheckFiles(dir, relBase = dir, extensions = CHECK_EXTENSIONS) {
|
|
|
492
548
|
* skipped dirs.
|
|
493
549
|
*/
|
|
494
550
|
function resolveCheckFiles(cwd, patterns) {
|
|
495
|
-
if (patterns.length === 0)
|
|
551
|
+
if (patterns.length === 0)
|
|
552
|
+
return collectCheckFiles(
|
|
553
|
+
cwd,
|
|
554
|
+
cwd,
|
|
555
|
+
CHECK_EXTENSIONS,
|
|
556
|
+
gitignoreKit?.ancestorGitignores(cwd) ?? []
|
|
557
|
+
).sort();
|
|
496
558
|
|
|
497
559
|
const matched = new Set();
|
|
498
560
|
for (const pattern of patterns) {
|
|
@@ -855,6 +917,11 @@ async function checkCommand(
|
|
|
855
917
|
}
|
|
856
918
|
) {
|
|
857
919
|
const projectRoot = process.cwd();
|
|
920
|
+
const kitError = await loadGitignoreKit();
|
|
921
|
+
if (kitError) {
|
|
922
|
+
console.error(`[bitboss-ui] check: ${kitError}`);
|
|
923
|
+
process.exit(1);
|
|
924
|
+
}
|
|
858
925
|
if (changedOnly && globs.length) {
|
|
859
926
|
console.error('[bitboss-ui] check: pass paths or `--changed`, not both.');
|
|
860
927
|
process.exit(1);
|
|
@@ -986,7 +1053,8 @@ async function checkCommand(
|
|
|
986
1053
|
const projectSources = collectCheckFiles(
|
|
987
1054
|
projectRoot,
|
|
988
1055
|
projectRoot,
|
|
989
|
-
HAND_IMPORTED_STYLES_EXTENSIONS
|
|
1056
|
+
HAND_IMPORTED_STYLES_EXTENSIONS,
|
|
1057
|
+
gitignoreKit?.ancestorGitignores(projectRoot) ?? []
|
|
990
1058
|
);
|
|
991
1059
|
const texts = new Map();
|
|
992
1060
|
const readText = (path) => {
|
|
@@ -1010,8 +1078,15 @@ async function checkCommand(
|
|
|
1010
1078
|
.map((path) => readFileSync(path, 'utf-8')),
|
|
1011
1079
|
]);
|
|
1012
1080
|
// Q54.2: the rules the project registers with `defineRule`, from the same
|
|
1013
|
-
// whole-project sweep, so a string rule nobody registered is caught.
|
|
1014
|
-
|
|
1081
|
+
// whole-project sweep, so a string rule nobody registered is caught. Q67.1:
|
|
1082
|
+
// a call the sweep cannot read is kept by its place, never a silence.
|
|
1083
|
+
const registeredRules = {
|
|
1084
|
+
names: new Set(configuredRegisteredRules(projectRoot)),
|
|
1085
|
+
unreadable: [],
|
|
1086
|
+
stock: packageRuleNames(projectRoot),
|
|
1087
|
+
};
|
|
1088
|
+
const packageRules = registeredRules.stock;
|
|
1089
|
+
const ownedRuleSource = ownedBy(projectRoot);
|
|
1015
1090
|
const presets = new Map();
|
|
1016
1091
|
const RULE_EXTENSIONS = ['.ts', '.js', '.mjs', '.cjs', '.vue'];
|
|
1017
1092
|
for (const path of projectSources.filter((file) =>
|
|
@@ -1022,18 +1097,29 @@ async function checkCommand(
|
|
|
1022
1097
|
// Q57.3: the project's `definePreset` wrappers, by name.
|
|
1023
1098
|
for (const [name, preset] of presetDefinitions(text))
|
|
1024
1099
|
presets.set(name, preset);
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1100
|
+
// A nested app (its own package.json) registers nothing for this one.
|
|
1101
|
+
if (ownedRuleSource(path))
|
|
1102
|
+
addRegistrations(
|
|
1103
|
+
registeredRules,
|
|
1104
|
+
text,
|
|
1105
|
+
relative(projectRoot, path),
|
|
1106
|
+
packageRules
|
|
1107
|
+
);
|
|
1028
1108
|
} catch {
|
|
1029
|
-
/* unreadable:
|
|
1030
|
-
|
|
1109
|
+
/* unreadable: its registrations are unknown, said where they would be */
|
|
1110
|
+
if (ownedRuleSource(path))
|
|
1111
|
+
registeredRules.unreadable.push(relative(projectRoot, path));
|
|
1031
1112
|
}
|
|
1032
1113
|
const validateOptions = {
|
|
1033
1114
|
allowComponents: allowedComponents,
|
|
1034
1115
|
projectReads,
|
|
1035
1116
|
registeredRules,
|
|
1036
1117
|
presets,
|
|
1118
|
+
// A variant the build plugin registers is the project's own name.
|
|
1119
|
+
registeredVariants: readRegisteredVariants(
|
|
1120
|
+
projectRoot,
|
|
1121
|
+
Object.values(VARIANT_INTENT_OPTIONS)
|
|
1122
|
+
),
|
|
1037
1123
|
};
|
|
1038
1124
|
|
|
1039
1125
|
const findings = [];
|
|
@@ -1165,6 +1251,16 @@ async function checkCommand(
|
|
|
1165
1251
|
readText
|
|
1166
1252
|
)
|
|
1167
1253
|
);
|
|
1254
|
+
// Q67.9: a project copy of the definePreset recipe older than the one
|
|
1255
|
+
// shipped beside the manifest judged against (`<dist>/ai/helpers/`), or
|
|
1256
|
+
// unstamped. Reads the stamp only: an edited copy is the app's own.
|
|
1257
|
+
findings.push(
|
|
1258
|
+
...staleDefinePresetFindings(
|
|
1259
|
+
styleScan.map((path) => ({ path, relPath: relative(projectRoot, path) })),
|
|
1260
|
+
readText,
|
|
1261
|
+
readShippedDefinePreset(dirname(manifestPath))
|
|
1262
|
+
)
|
|
1263
|
+
);
|
|
1168
1264
|
// Q46.5: `.bb-*` selectors in the app's stylesheets (the `.vue` `<style>`
|
|
1169
1265
|
// blocks are read by the validator above).
|
|
1170
1266
|
for (const path of styleScan) {
|
|
@@ -1172,7 +1268,10 @@ async function checkCommand(
|
|
|
1172
1268
|
const relPath = relative(projectRoot, path);
|
|
1173
1269
|
const content = readText(path);
|
|
1174
1270
|
for (const finding of [
|
|
1175
|
-
...cssClassFindings(content, manifest.cssSurface, {
|
|
1271
|
+
...cssClassFindings(content, manifest.cssSurface, {
|
|
1272
|
+
stylesheet: true,
|
|
1273
|
+
ownedBlocks: ownedClassBlocks(allowedComponents, manifest.cssSurface),
|
|
1274
|
+
}),
|
|
1176
1275
|
// Q46.6: custom properties set where nothing reads them.
|
|
1177
1276
|
...cssLocalFindings(content, manifest.cssSurface, manifest.localSurface, {
|
|
1178
1277
|
stylesheet: true,
|
|
@@ -1450,7 +1549,9 @@ Commands:
|
|
|
1450
1549
|
package.json { "bitboss-ui": { "allowComponents": ["BbRichEditor"] } }
|
|
1451
1550
|
or \`bitboss-ui.check.json\` \`{ "allowComponents": [...] }\`.
|
|
1452
1551
|
Same option name as the ESLint rules' \`allowComponents\`,
|
|
1453
|
-
so both gates configure alike.
|
|
1552
|
+
so both gates configure alike. An allowed or
|
|
1553
|
+
project-local component owns its \`bb-<kebab>\` class
|
|
1554
|
+
block, so CSS styling it is never \`unknown-class\`.
|
|
1454
1555
|
|
|
1455
1556
|
\`--json\` prints \`{ findings: [...], warnings: [...], hints: [...],
|
|
1456
1557
|
suppressed, files, manifestVersion, installedVersion }\`
|
|
@@ -1515,11 +1616,6 @@ Commands:
|
|
|
1515
1616
|
\`@click="open = !open"\` flips a BbCollapsible's
|
|
1516
1617
|
ref, with no \`aria-expanded\`: add
|
|
1517
1618
|
\`:aria-expanded="open"\` + \`aria-controls\`),
|
|
1518
|
-
\`required-in-form\` (\`required\` on a form control
|
|
1519
|
-
inside a \`BbForm\`: the asterisk shows but the form
|
|
1520
|
-
posts \`novalidate\`, so nothing enforces it; write
|
|
1521
|
-
\`rules="required"\` or make it required in the
|
|
1522
|
-
schema),
|
|
1523
1619
|
\`form-v-model\` (\`v-model\`, \`:model-value\` or an
|
|
1524
1620
|
\`@update:model-value\` listener on a \`BbForm\`: it
|
|
1525
1621
|
takes its object one way, \`:model="draft"\`),
|
|
@@ -1534,6 +1630,11 @@ Commands:
|
|
|
1534
1630
|
hover-card portal opened by \`v-bb-popover\`, or the
|
|
1535
1631
|
other way round; literal names only, a \`:name\`
|
|
1536
1632
|
binding or a non-literal call site is never judged),
|
|
1633
|
+
\`unknown-dialog\` (\`v-bb-dialog\` /
|
|
1634
|
+
\`v-bb-off-canvas\` / \`useBbDialogContext()\` /
|
|
1635
|
+
\`useBbOffCanvasContext()\` names an id no
|
|
1636
|
+
\`<BbDialog | BbOffCanvas id>\` declares, or one of
|
|
1637
|
+
the other family; literal ids only),
|
|
1537
1638
|
\`positional-provider\` (an \`items\` provider with
|
|
1538
1639
|
positional arguments: it receives one object,
|
|
1539
1640
|
\`({ query, reason, modelValue, signal })\`),
|
|
@@ -1549,12 +1650,18 @@ Commands:
|
|
|
1549
1650
|
\`retired-entrypoint\` (an import from
|
|
1550
1651
|
\`bitboss-ui/validated\`, retired: everything is in
|
|
1551
1652
|
\`bitboss-ui\`; \`--fix\` rewrites it in .vue files),
|
|
1552
|
-
\`unregistered-rule\` (a string rule no
|
|
1553
|
-
\`defineRule\` in the project registers;
|
|
1554
|
-
|
|
1653
|
+
\`unregistered-rule\` (a string or object rule no
|
|
1654
|
+
\`defineRule\` in the project registers; a
|
|
1655
|
+
registration it cannot read is named, never skipped:
|
|
1656
|
+
list such names under \`registeredRules\` in
|
|
1657
|
+
bitboss-ui.check.json),
|
|
1555
1658
|
\`invalid-value\` (a static value outside a closed
|
|
1556
1659
|
union, e.g. \`placement="bottom-centre"\`; variants
|
|
1557
1660
|
and other registry-backed unions are not checked),
|
|
1661
|
+
\`stale-define-preset\` (a copy of the definePreset
|
|
1662
|
+
recipe whose \`// bitboss-ui definePreset rev N\` stamp
|
|
1663
|
+
is older than the shipped one, or missing; update it
|
|
1664
|
+
with \`cp node_modules/bitboss-ui/dist/ai/helpers/definePreset.ts <file>\`),
|
|
1558
1665
|
\`wrapper-drops-props\` (a wrapper whose
|
|
1559
1666
|
\`defineProps\` declares a \`Bb*Props\` type, bare,
|
|
1560
1667
|
\`Omit\` or \`Pick\`, and never binds or reads some
|
|
@@ -1604,7 +1711,12 @@ Commands:
|
|
|
1604
1711
|
\`<…Portal name>\` nothing opens: no call site and the
|
|
1605
1712
|
name in no string of the project), \`vue-tsc-major\`
|
|
1606
1713
|
(\`vue-tsc\` below 3 in package.json: the generic
|
|
1607
|
-
components' props go unchecked)
|
|
1714
|
+
components' props go unchecked), \`prefer-v-bb-dialog\`
|
|
1715
|
+
(a \`ref(false)\` only a BbDialog / BbOffCanvas
|
|
1716
|
+
\`v-model\` and \`@click="x = true"\` use: give the
|
|
1717
|
+
dialog an \`id\` and put \`v-bb-dialog\` on the
|
|
1718
|
+
trigger; ESLint's \`--fix\` rewrites it when nothing
|
|
1719
|
+
else uses the ref).
|
|
1608
1720
|
changelog [--since <version>] [--until <version>] [--json]
|
|
1609
1721
|
Breaking changes between two releases — "what breaks if I
|
|
1610
1722
|
bump". \`--since\` is the version you are ON, and is
|