bitboss-ui 3.0.0-beta.63 → 3.0.0-beta.65
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 +25 -20
- package/bin/bitboss-ui.mjs +73 -7
- package/dist/ai/BbAlert.md +10 -1
- package/dist/ai/BbBadge.md +35 -3
- package/dist/ai/BbBadgeButton.md +4 -2
- package/dist/ai/BbBaseButton.md +9 -3
- package/dist/ai/BbBreadcrumbs.md +2 -2
- package/dist/ai/BbButton.md +113 -8
- package/dist/ai/BbCheckbox.md +1 -1
- package/dist/ai/BbCheckboxGroup.md +94 -6
- package/dist/ai/BbColorInput.md +4 -1
- package/dist/ai/BbColorPalette.md +2 -1
- package/dist/ai/BbConfirm.md +7 -3
- package/dist/ai/BbDatePicker.md +2 -1
- package/dist/ai/BbDatePickerInput.md +4 -1
- package/dist/ai/BbDialog.md +12 -11
- package/dist/ai/BbDropdown.md +189 -38
- package/dist/ai/BbDropdownButton.md +27 -7
- package/dist/ai/BbForm.md +55 -22
- package/dist/ai/BbHost.md +2 -2
- package/dist/ai/BbHoverCard.md +7 -3
- package/dist/ai/BbIcon.md +12 -6
- package/dist/ai/BbIndicator.md +11 -1
- package/dist/ai/BbNumberInput.md +4 -1
- package/dist/ai/BbOffCanvas.md +37 -3
- package/dist/ai/BbPopover.md +2 -1
- package/dist/ai/BbRadio.md +1 -1
- package/dist/ai/BbRadioGroup.md +102 -10
- package/dist/ai/BbSelect.md +52 -17
- package/dist/ai/BbSelectPopover.md +93 -26
- package/dist/ai/BbSwitch.md +1 -1
- package/dist/ai/BbSwitchGroup.md +30 -3
- package/dist/ai/BbTable.md +17 -10
- package/dist/ai/BbTabs.md +8 -3
- package/dist/ai/BbTabsList.md +4 -1
- package/dist/ai/BbTag.md +5 -2
- package/dist/ai/BbTextInput.md +4 -1
- package/dist/ai/BbTextarea.md +4 -1
- package/dist/ai/BbTimePicker.md +2 -1
- package/dist/ai/BbTimePickerInput.md +4 -1
- package/dist/ai/BbToast.md +9 -3
- package/dist/ai/BbTooltip.md +71 -9
- package/dist/ai/ChipsBox.md +1 -1
- package/dist/ai/CommonField.md +1 -1
- package/dist/ai/OptionsContainer.md +42 -0
- package/dist/ai/changelog.json +494 -6
- package/dist/ai/components.json +50 -48
- package/dist/ai/composables/useBbConfig.md +8 -1
- package/dist/ai/composables/useConfirm.md +39 -1
- package/dist/ai/design-tokens.json +6 -6
- package/dist/ai/guides/agent-contract.md +2 -2
- package/dist/ai/guides/ai-router.md +24 -23
- package/dist/ai/guides/app-layout.md +5 -0
- package/dist/ai/guides/component-picker.md +9 -2
- package/dist/ai/guides/design-language.md +24 -24
- package/dist/ai/guides/design-tokens.md +15 -8
- package/dist/ai/guides/icons-policy.md +9 -2
- package/dist/ai/guides/inertia-helpers.md +1183 -301
- package/dist/ai/guides/installation-and-plugin-setup.md +12 -2
- package/dist/ai/guides/migration/adoption-checklist.md +235 -0
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +16 -15
- package/dist/ai/guides/migration/components/bb-dialog.md +9 -9
- package/dist/ai/guides/migration/components/bb-dropdown.md +7 -2
- package/dist/ai/guides/migration/components/bb-popover.md +4 -2
- package/dist/ai/guides/migration/components/bb-select.md +19 -0
- package/dist/ai/guides/migration/components/bb-table.md +1 -0
- package/dist/ai/guides/migration/components/bb-toast.md +4 -0
- package/dist/ai/guides/migration/components/bb-tooltip.md +15 -12
- package/dist/ai/guides/migration/components/use-confirm.md +25 -2
- package/dist/ai/guides/migration/v2-to-v3.md +211 -9
- package/dist/ai/guides/migration/v3-beta-css-classes.md +7 -3
- package/dist/ai/guides/options-items-playbook.md +2 -1
- package/dist/ai/guides/passthrough.md +149 -85
- package/dist/ai/guides/preset-components.md +140 -15
- package/dist/ai/helpers/definePreset.json +7 -0
- package/dist/ai/helpers/definePreset.ts +123 -11
- package/dist/ai/helpers/inertia/manifest.json +151 -62
- package/dist/ai/helpers/inertia/messages.ts +33 -0
- package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +120 -20
- package/dist/ai/helpers/inertia/useHasChanged.ts +34 -16
- package/dist/ai/helpers/inertia/useLazyProp.ts +102 -36
- package/dist/ai/helpers/inertia/useLazyPropGetter.ts +3 -1
- package/dist/ai/helpers/inertia/usePaginatedResponseContext.ts +154 -34
- package/dist/ai/helpers/inertia/usePromiseForm.ts +121 -14
- package/dist/ai/helpers/inertia/useQuery.ts +133 -11
- package/dist/ai/helpers/inertia/useQueryObject.ts +74 -67
- package/dist/ai/helpers/inertia/useResourceContext.ts +60 -14
- package/dist/ai/helpers/inertia/useRouteQuery.ts +38 -27
- package/dist/ai/helpers/inertia/useScreenSizes.ts +9 -7
- package/dist/ai/helpers/inertia/useTableContext.ts +5 -2
- package/dist/ai/helpers/inertia/utils.ts +14 -0
- package/dist/ai/index.md +1 -0
- package/dist/ai/manifest/common.json +0 -1
- package/dist/ai/manifest/components/BbAlert.json +7 -2
- package/dist/ai/manifest/components/BbBadge.json +13 -4
- package/dist/ai/manifest/components/BbBadge.tree.json +2 -0
- package/dist/ai/manifest/components/BbBadgeButton.json +4 -2
- package/dist/ai/manifest/components/BbBaseButton.json +4 -2
- package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +1 -1
- package/dist/ai/manifest/components/BbButton.json +14 -3
- package/dist/ai/manifest/components/BbButton.tree.json +5 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.json +13 -8
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +11 -1
- package/dist/ai/manifest/components/BbColorInput.json +18 -15
- package/dist/ai/manifest/components/BbColorPalette.json +1 -1
- package/dist/ai/manifest/components/BbConfirm.json +4 -2
- package/dist/ai/manifest/components/BbConfirm.tree.json +1 -1
- package/dist/ai/manifest/components/BbDatePicker.json +1 -1
- package/dist/ai/manifest/components/BbDatePickerInput.json +17 -14
- package/dist/ai/manifest/components/BbDialog.tree.json +2 -1
- package/dist/ai/manifest/components/BbDropdown.json +24 -19
- package/dist/ai/manifest/components/BbDropdown.tree.json +9 -2
- package/dist/ai/manifest/components/BbDropdownButton.json +33 -20
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -2
- package/dist/ai/manifest/components/BbForm.json +2 -2
- package/dist/ai/manifest/components/BbHost.tree.json +1 -1
- package/dist/ai/manifest/components/BbHoverCard.json +1 -1
- package/dist/ai/manifest/components/BbIndicator.json +8 -2
- package/dist/ai/manifest/components/BbNumberInput.json +5 -2
- package/dist/ai/manifest/components/BbOffCanvas.json +2 -2
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +1 -1
- package/dist/ai/manifest/components/BbPopover.json +1 -1
- package/dist/ai/manifest/components/BbRadioGroup.json +17 -12
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +8 -1
- package/dist/ai/manifest/components/BbSelect.json +21 -18
- package/dist/ai/manifest/components/BbSelect.tree.json +2 -2
- package/dist/ai/manifest/components/BbSelectPopover.json +10 -10
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +3 -2
- package/dist/ai/manifest/components/BbSwitchGroup.json +1 -1
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +3 -1
- package/dist/ai/manifest/components/BbTable.tree.json +14 -1
- package/dist/ai/manifest/components/BbTabs.json +9 -6
- package/dist/ai/manifest/components/BbTabs.tree.json +1 -1
- package/dist/ai/manifest/components/BbTabsList.json +6 -3
- package/dist/ai/manifest/components/BbTag.json +19 -16
- package/dist/ai/manifest/components/BbTag.tree.json +1 -1
- package/dist/ai/manifest/components/BbTextInput.json +6 -3
- package/dist/ai/manifest/components/BbTextarea.json +6 -3
- package/dist/ai/manifest/components/BbTimePicker.json +1 -1
- package/dist/ai/manifest/components/BbTimePickerInput.json +10 -7
- package/dist/ai/manifest/components/BbToast.json +7 -2
- package/dist/ai/manifest/components/BbToast.tree.json +4 -2
- package/dist/ai/manifest/components/BbTooltip.json +6 -5
- package/dist/ai/manifest/components/ChipsBox.tree.json +1 -1
- package/dist/ai/manifest/components/CommonField.json +1 -1
- package/dist/ai/manifest/components/OptionsContainer.json +3 -1
- package/dist/ai/manifest/components/OptionsContainer.tree.json +38 -0
- package/dist/ai/manifest/index.json +3 -3
- package/dist/ai/manifest/meta.json +5 -3
- package/dist/ai/manifest/types.advanced.json +5 -2
- package/dist/ai/manifest/types.api.json +9 -7
- package/dist/ai/recipes/inertia/approvals-inbox.md +1 -1
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/inertia/layout-scaffold.md +19 -6
- package/dist/ai/recipes/inertia/ownership-atlas.md +1 -1
- package/dist/ai/recipes/inertia/records-workspace.md +50 -14
- package/dist/ai/recipes/inertia/upload-center.md +1 -1
- package/dist/ai/recipes/nuxt/layout-scaffold.md +19 -6
- package/dist/ai/recipes/nuxt/records-workspace.md +42 -12
- package/dist/ai/recipes/vue/layout-scaffold.md +19 -6
- package/dist/ai/recipes/vue/records-workspace.md +42 -12
- package/dist/ai/source/BbAlert.md +94 -76
- package/dist/ai/source/BbBadge.md +174 -72
- package/dist/ai/source/BbBadgeButton.md +130 -65
- package/dist/ai/source/BbBaseButton.md +46 -124
- package/dist/ai/source/BbBaseCheckboxIcon.md +38 -0
- package/dist/ai/source/BbBaseRadioIcon.md +18 -0
- package/dist/ai/source/BbBaseSwitchIcon.md +51 -0
- package/dist/ai/source/BbButton.md +153 -36
- package/dist/ai/source/BbCheckboxGroup.md +142 -18
- package/dist/ai/source/BbColorInput.md +240 -204
- package/dist/ai/source/BbColorPalette.md +7 -4
- package/dist/ai/source/BbConfirm.md +34 -11
- package/dist/ai/source/BbConfirmPortal.md +24 -9
- package/dist/ai/source/BbDatePicker.md +11 -7
- package/dist/ai/source/BbDatePickerInput.md +306 -269
- package/dist/ai/source/BbDialog.md +49 -14
- package/dist/ai/source/BbDropdown.md +314 -197
- package/dist/ai/source/BbDropdownButton.md +197 -31
- package/dist/ai/source/BbDropdownGroup.md +274 -176
- package/dist/ai/source/BbForm.md +50 -6
- package/dist/ai/source/BbHoverCard.md +12 -5
- package/dist/ai/source/BbIcon.md +4 -3
- package/dist/ai/source/BbIndicator.md +73 -52
- package/dist/ai/source/BbNumberInput.md +293 -257
- package/dist/ai/source/BbOffCanvas.md +55 -29
- package/dist/ai/source/BbPopover.md +14 -10
- package/dist/ai/source/BbRadioGroup.md +413 -297
- package/dist/ai/source/BbSelect.md +549 -435
- package/dist/ai/source/BbSelectPopover.md +153 -34
- package/dist/ai/source/BbSwitchGroup.md +70 -10
- package/dist/ai/source/BbTable.md +369 -37
- package/dist/ai/source/BbTabs.md +115 -39
- package/dist/ai/source/BbTabsList.md +106 -38
- package/dist/ai/source/BbTabsPanels.md +96 -36
- package/dist/ai/source/BbTabsRoot.md +96 -36
- package/dist/ai/source/BbTag.md +267 -233
- package/dist/ai/source/BbTextInput.md +261 -225
- package/dist/ai/source/BbTextarea.md +251 -215
- package/dist/ai/source/BbTimePicker.md +11 -7
- package/dist/ai/source/BbTimePickerInput.md +257 -220
- package/dist/ai/source/BbToast.md +73 -32
- package/dist/ai/source/BbToastPortal.md +65 -30
- package/dist/ai/source/BbTooltip.md +148 -113
- package/dist/ai/source/CommonPopover.md +6 -1
- package/dist/ai/source/FlatListBox.md +19 -9
- package/dist/ai/source/GroupedListBox.md +19 -9
- package/dist/ai/source/OptionsContainer.md +25 -9
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +61 -36
- package/dist/components/BbAlert/types.d.ts +9 -5
- package/dist/components/BbAlert/types.js +8 -3
- package/dist/components/BbBadge/BadgeBodyContent.vue.d.ts +3 -3
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +26 -17
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +103 -50
- package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +20 -15
- package/dist/components/BbBadge/badgeButtonContext.d.ts +12 -1
- package/dist/components/BbBadge/types.d.ts +45 -15
- package/dist/components/BbBadge/types.js +12 -3
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +89 -126
- package/dist/components/BbBaseButton/types.d.ts +23 -4
- package/dist/components/BbBaseButton/types.js +7 -1
- package/dist/components/BbBaseButton/useLinkState.d.ts +41 -0
- package/dist/components/BbBaseButton/useLinkState.js +70 -0
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +130 -74
- package/dist/components/BbButton/types.d.ts +50 -13
- package/dist/components/BbButton/types.js +10 -3
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +148 -95
- package/dist/components/BbCheckboxGroup/types.d.ts +34 -11
- package/dist/components/BbCheckboxGroup/types.js +9 -4
- package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +1 -1
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +134 -93
- package/dist/components/BbColorInput/types.d.ts +11 -4
- package/dist/components/BbColorInput/types.js +9 -3
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +82 -59
- package/dist/components/BbConfirm/types.d.ts +9 -4
- package/dist/components/BbConfirm/types.js +8 -3
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +68 -67
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +1 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +259 -215
- package/dist/components/BbDatePickerInput/types.d.ts +12 -5
- package/dist/components/BbDatePickerInput/types.js +9 -3
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +223 -219
- package/dist/components/BbDialog/useDialogStack.d.ts +1 -1
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +104 -89
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +1 -0
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +323 -285
- package/dist/components/BbDropdown/BbDropdownList.vue.d.ts +1 -0
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +411 -319
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +100 -98
- package/dist/components/BbDropdown/DropdownRow.vue.d.ts +4 -3
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +49 -28
- package/dist/components/BbDropdown/normalizeGroups.d.ts +6 -0
- package/dist/components/BbDropdown/normalizeGroups.js +21 -15
- package/dist/components/BbDropdown/types.d.ts +59 -12
- package/dist/components/BbDropdown/types.js +16 -3
- package/dist/components/BbDropdown/useDropdownContext.d.ts +6 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +2 -1
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +179 -68
- package/dist/components/BbDropdownButton/types.d.ts +44 -16
- package/dist/components/BbDropdownButton/types.js +28 -3
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +111 -89
- package/dist/components/BbForm/formSchema.d.ts +13 -0
- package/dist/components/BbHoverCard/BbHoverCard.vue_vue_type_script_setup_true_lang.js +100 -100
- package/dist/components/BbIndicator/BbIndicator.vue_vue_type_script_setup_true_lang.js +40 -25
- package/dist/components/BbIndicator/types.d.ts +9 -5
- package/dist/components/BbIndicator/types.js +8 -3
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +243 -202
- package/dist/components/BbNumberInput/types.d.ts +12 -5
- package/dist/components/BbNumberInput/types.js +9 -3
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +1 -1
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +401 -399
- package/dist/components/BbOffCanvas/types.d.ts +6 -2
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +81 -80
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +158 -105
- package/dist/components/BbRadioGroup/types.d.ts +21 -7
- package/dist/components/BbRadioGroup/types.js +9 -4
- package/dist/components/BbSelect/BbSelect.vue.d.ts +4 -3
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +181 -137
- package/dist/components/BbSelect/types.d.ts +36 -22
- package/dist/components/BbSelect/types.js +22 -3
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +4 -4
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +600 -577
- package/dist/components/BbSelectPopover/knownItems.d.ts +5 -0
- package/dist/components/BbSelectPopover/types.d.ts +46 -12
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +1 -1
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbSwitchGroup/types.d.ts +14 -4
- package/dist/components/BbSwitchGroup/types.js +8 -3
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1102 -995
- package/dist/components/BbTable/estimatedFloors.golden.d.ts +25 -0
- package/dist/components/BbTable/measuredFloors.d.ts +46 -0
- package/dist/components/BbTable/measuredFloors.js +322 -0
- package/dist/components/BbTable/measuredFloorsTestKit.d.ts +27 -0
- package/dist/components/BbTable/textRuler.d.ts +71 -0
- package/dist/components/BbTable/textRuler.js +121 -0
- package/dist/components/BbTable/utils.d.ts +113 -6
- package/dist/components/BbTable/utils.js +118 -65
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +53 -35
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +62 -45
- package/dist/components/BbTabs/types.d.ts +26 -11
- package/dist/components/BbTabs/types.js +23 -8
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +205 -164
- package/dist/components/BbTag/types.d.ts +11 -4
- package/dist/components/BbTag/types.js +9 -3
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +98 -57
- package/dist/components/BbTextInput/types.d.ts +12 -5
- package/dist/components/BbTextInput/types.js +9 -3
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +137 -96
- package/dist/components/BbTextarea/types.d.ts +12 -5
- package/dist/components/BbTextarea/types.js +9 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +105 -104
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +241 -197
- package/dist/components/BbTimePickerInput/types.d.ts +12 -5
- package/dist/components/BbTimePickerInput/types.js +9 -3
- package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +74 -32
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +47 -47
- package/dist/components/BbToast/types.d.ts +10 -5
- package/dist/components/BbToast/types.js +18 -3
- package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +85 -71
- package/dist/components/BbTooltip/types.d.ts +13 -8
- package/dist/components/BbTooltip/types.js +8 -3
- package/dist/components/CommonField/CommonField.vue.d.ts +1 -1
- package/dist/components/CommonPopover/CommonPopover.vue.d.ts +1 -1
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +69 -69
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +53 -50
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +146 -143
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +7 -2
- package/dist/components/OptionsContainer/types.d.ts +14 -3
- package/dist/composables/useBbConfig.d.ts +1 -0
- package/dist/composables/useBbConfig.js +11 -7
- package/dist/composables/useBbFormContext.d.ts +4 -3
- package/dist/composables/useBbTabsContext.js +99 -85
- package/dist/composables/useChoiceIndicator.d.ts +58 -0
- package/dist/composables/useChoiceIndicator.js +197 -0
- package/dist/composables/useConfirm.d.ts +4 -4
- package/dist/composables/usePassthrough.d.ts +54 -1
- package/dist/composables/usePassthrough.js +100 -71
- package/dist/directives/bbTooltip.d.ts +12 -6
- package/dist/directives/createPopoverDirective.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/llms-full.txt +3467 -801
- package/dist/llms-medium.txt +71 -53
- package/dist/llms.txt +2 -1
- package/dist/passthrough-deduper.js +6 -3
- package/dist/project-dts.d.ts +24 -0
- package/dist/project-dts.js +43 -17
- package/dist/styles.css +2 -2
- package/dist/types/AlertVariant.d.ts +14 -0
- package/dist/types/AlertVariant.js +9 -0
- package/dist/types/BadgeVariant.d.ts +14 -0
- package/dist/types/BadgeVariant.js +9 -0
- package/dist/types/ButtonVariant.d.ts +16 -0
- package/dist/types/ButtonVariant.js +11 -0
- package/dist/types/CheckboxVariant.d.ts +38 -0
- package/dist/types/CheckboxVariant.js +4 -0
- package/dist/types/CommonProps.d.ts +4 -3
- package/dist/types/Config.d.ts +7 -0
- package/dist/types/ConfirmVariant.d.ts +12 -0
- package/dist/types/ConfirmVariant.js +4 -0
- package/dist/types/DropdownItemVariant.d.ts +12 -0
- package/dist/types/DropdownItemVariant.js +4 -0
- package/dist/types/IndicatorVariant.d.ts +15 -0
- package/dist/types/IndicatorVariant.js +10 -0
- package/dist/types/InputVariant.d.ts +13 -0
- package/dist/types/InputVariant.js +8 -0
- package/dist/types/RadioVariant.d.ts +38 -0
- package/dist/types/RadioVariant.js +4 -0
- package/dist/types/TabsVariant.d.ts +13 -0
- package/dist/types/TabsVariant.js +8 -0
- package/dist/types/ToastVariant.d.ts +15 -0
- package/dist/types/ToastVariant.js +10 -0
- package/dist/types/TooltipVariant.d.ts +12 -0
- package/dist/types/TooltipVariant.js +4 -0
- package/dist/types/passthrough.d.ts +83 -15
- package/dist/types/passthrough.js +2 -2
- package/dist/types/ptComponentMap.d.ts +35 -23
- package/dist/utilities/functions/extractDomContainer.d.ts +20 -1
- package/dist/utilities/functions/extractDomContainer.js +8 -3
- package/dist/utils/focusVisibility.d.ts +6 -0
- package/dist/utils/focusVisibility.js +4 -1
- package/dist/utils/passthroughDeduper.d.ts +14 -0
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +64 -7
- package/dist/vite.js +385 -259
- package/llms.txt +2 -1
- package/package.json +5 -4
- package/scripts/lib/adoption-checklist.json +312 -0
- package/scripts/lib/eslint-plugin.d.ts +13 -0
- package/scripts/lib/eslint-plugin.mjs +75 -11
- package/scripts/lib/helpers-add.mjs +26 -2
- package/scripts/lib/idiom-scan.mjs +65 -0
- package/scripts/lib/mcp-config.mjs +203 -9
- package/scripts/lib/migrate-fix.mjs +42 -1
- package/scripts/lib/project-variant-dts.mjs +18 -0
- package/scripts/lib/validate-bb-markup.mjs +99 -2
package/llms.txt
CHANGED
|
@@ -7,7 +7,7 @@ Note: the `dist/` paths below resolve inside the installed npm package (`node_mo
|
|
|
7
7
|
## AI Knowledge Base
|
|
8
8
|
|
|
9
9
|
- [Core knowledge base](https://llms-bitboss-ui.bitboss.it/dist/llms-medium.txt): **Fetch this if you can only fetch one file** — hard rules, setup, component picker, design language, and the full component catalogue in ~250 KB.
|
|
10
|
-
- [Complete knowledge base](https://llms-bitboss-ui.bitboss.it/dist/llms-full.txt): Everything concatenated (~6.
|
|
10
|
+
- [Complete knowledge base](https://llms-bitboss-ui.bitboss.it/dist/llms-full.txt): Everything concatenated (~6.3 MB). Bulk ingestion only — too large to prompt with.
|
|
11
11
|
- [AI Router](dist/ai/guides/ai-router.md): **Start here** — tiny hop map for any coding agent (which file to open next).
|
|
12
12
|
- [Component index](dist/ai/index.md): Full component catalogue with agent rules, grouped by category. Each entry links a typed contract (props/events/slots/v-model).
|
|
13
13
|
- [Component API files](dist/ai/manifest/index.json): Machine-readable API, one JSON file per component (`manifest/components/<Name>.json`: every prop, event, slot, v-model and pt part, one per line, plus the public types it uses; a row marked `common: true` is whole in `manifest/common.json`) — open the index, then the one component. The same data in one ~1.2 MB file for tools is [components.json](dist/ai/components.json); its `types` array lists the public TYPE exports with a `usage` tier (`api` = the ones you reach for) and, on the `api` ones, a `usedBy` array naming the component and prop or event each is the type OF — `BbTableColumn` is `usedBy` `BbTable.columns`, a value you pass, not a tag you write. This file is props and events, not paint.
|
|
@@ -22,6 +22,7 @@ Note: the `dist/` paths below resolve inside the installed npm package (`node_mo
|
|
|
22
22
|
- [Options and Items Playbook](dist/ai/guides/options-items-playbook.md): How item-driven components turn raw domain items into options — mapping, value identity, model seeding, and the supported ways to disable choices.
|
|
23
23
|
- [Inline Edit Playbook](dist/ai/guides/inline-edit-playbook.md): Who owns the edit? Choosing between draft-map, autosave, and write-back persistence for inline-editing tables — commit rules per control kind, optimistic overlays with rollback, and the dirty-ring / chevron-to-spinner feedback grammar.
|
|
24
24
|
- [Icons Policy](dist/ai/guides/icons-policy.md): Provider-first icon usage (`lucide:*` via `@iconify-json/*` packages), `local:*` for brand art, how the plugin resolves names, and a catalog of every surface that accepts an icon.
|
|
25
|
+
- [Adoption checklist — finish a migration on the library](dist/ai/guides/migration/adoption-checklist.md): The walk every migration ends with, from bitboss-ui v2 or any other library — each hand-rolled pattern the library ships (radio cards, segmented controls, tabs, sortable headers, nested tables, steppers, notice boxes, app sheets, app dialogs and confirms), how to find it (an rg command, or `npx bitboss-ui check --idioms`), and the replacement in its shortest syntax; then the adaptive phase and the production rebuild.
|
|
25
26
|
- [App Layout](dist/ai/guides/app-layout.md): App-side chrome around every page — collapsible left nav sidebar and a fat footer, owning the page's one <main> landmark and the CSS hooks (.layout--sidebar-expanded, --sidebar-max-w) that size the nav.
|
|
26
27
|
- [Design Language](dist/ai/guides/design-language.md): Token vocabulary, variants, sizing, dark mode, and how to style around the components when building on-system UIs.
|
|
27
28
|
- [Design Tokens](dist/ai/guides/design-tokens.md): The token architecture of bitboss-ui — tiers, naming rules, the emphasis ladder, and the theming contract.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bitboss-ui",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.65",
|
|
4
4
|
"description": "Vue 3 component library by BitBoss: forms, selects, layout, overlays, and more.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"prepack": "npm run build && npm run check:pack && npm pkg delete scripts.prepare",
|
|
93
93
|
"preview": "vite preview",
|
|
94
94
|
"storybook": "storybook dev -p 6006",
|
|
95
|
-
"test": "node scripts/ensure-manifest.mjs && vitest run && node scripts/check-guide-types.mjs && npm run check:test-types && node scripts/check-fixture-types.mjs && node scripts/check-recipes.mjs && node scripts/check-examples.mjs && node scripts/recipes.mjs --check && node scripts/check-doc-drift.mjs && node scripts/check-doc-ts.mjs && node scripts/run-ai-evals.mjs && node scripts/check-mcp.mjs && node scripts/check-search-coverage.mjs && node scripts/check-tokens.mjs && node scripts/check-pins.mjs && node scripts/check-deprecation-register.mjs && node scripts/check-inertia-link-props.mjs && node --experimental-strip-types scripts/check-api-consistency.ts --strict && node --experimental-strip-types scripts/check-default-docs.ts && node --experimental-strip-types scripts/generate-component-docs.ts --strict && node scripts/check-doc-links.mjs && node scripts/generate-css-migration.mjs --check",
|
|
95
|
+
"test": "node scripts/ensure-manifest.mjs && vitest run && node scripts/check-guide-types.mjs && npm run check:test-types && node scripts/check-fixture-types.mjs && node scripts/check-recipes.mjs && node scripts/check-examples.mjs && node scripts/recipes.mjs --check && node scripts/check-doc-drift.mjs && node scripts/check-doc-ts.mjs && node scripts/run-ai-evals.mjs && node scripts/check-mcp.mjs && node scripts/check-search-coverage.mjs && node scripts/check-tokens.mjs && node scripts/check-pins.mjs && node scripts/check-deprecation-register.mjs && node scripts/check-inertia-link-props.mjs && node --experimental-strip-types scripts/check-api-consistency.ts --strict && node --experimental-strip-types scripts/check-default-docs.ts && node --experimental-strip-types scripts/generate-component-docs.ts --strict && node scripts/check-doc-links.mjs && node scripts/generate-css-migration.mjs --check && node scripts/generate-adoption-checklist.mjs --check",
|
|
96
96
|
"test:fixtures": "npm run build && node scripts/check-nuxt-types.mjs && node scripts/run-ssr-fixture.mjs && node scripts/invalidate-fixture-caches.mjs && FIXTURE_TARGET=dist node scripts/run-e2es.mjs fixtures/inertia/e2e && FIXTURE_TARGET=dist node scripts/run-e2es.mjs fixtures/vue/e2e && npm run test:nuxt && npm run test:nuxt:prod && node scripts/test-add.mjs",
|
|
97
97
|
"test:fixtures:src": "npm run test:inertia && npm run test:vue && npm run test:nuxt",
|
|
98
98
|
"test:inertia": "node scripts/invalidate-fixture-caches.mjs && node scripts/run-e2es.mjs fixtures/inertia/e2e",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"test:engines": "node scripts/ensure-manifest.mjs && node scripts/run-engines.mjs",
|
|
107
107
|
"test:ci:node": "node scripts/ensure-manifest.mjs && vitest run --project node --project types --project ssr",
|
|
108
108
|
"test:ci:browser": "node scripts/ensure-manifest.mjs && node scripts/run-browser-chunked.mjs 12",
|
|
109
|
-
"test:ci:gates": "node scripts/check-guide-types.mjs && npm run check:test-types && node scripts/check-fixture-types.mjs && node scripts/check-recipes.mjs && node scripts/check-examples.mjs && node scripts/recipes.mjs --check && node scripts/check-doc-drift.mjs && node scripts/check-doc-ts.mjs && node scripts/run-ai-evals.mjs && node scripts/check-pins.mjs && node scripts/check-deprecation-register.mjs && node scripts/check-inertia-link-props.mjs && node --experimental-strip-types scripts/check-default-docs.ts && node scripts/check-doc-links.mjs && node scripts/generate-css-migration.mjs --check && npm run check:helpers-lint",
|
|
109
|
+
"test:ci:gates": "node scripts/check-guide-types.mjs && npm run check:test-types && node scripts/check-fixture-types.mjs && node scripts/check-recipes.mjs && node scripts/check-examples.mjs && node scripts/recipes.mjs --check && node scripts/check-doc-drift.mjs && node scripts/check-doc-ts.mjs && node scripts/run-ai-evals.mjs && node scripts/check-pins.mjs && node scripts/check-deprecation-register.mjs && node scripts/check-inertia-link-props.mjs && node --experimental-strip-types scripts/check-default-docs.ts && node scripts/check-doc-links.mjs && node scripts/generate-css-migration.mjs --check && node scripts/generate-adoption-checklist.mjs --check && npm run check:helpers-lint",
|
|
110
110
|
"test:ci": "npm run test:ci:node && npm run test:ci:browser && npm run test:ci:gates",
|
|
111
111
|
"postpack": "npm pkg set \"scripts.prepare=node scripts/hooks-install.mjs\"",
|
|
112
112
|
"test:ssr": "npm run build && node scripts/run-ssr-fixture.mjs",
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
},
|
|
130
130
|
"peerDependencies": {
|
|
131
131
|
"@iconify/collections": ">=1.0.0",
|
|
132
|
-
"@inertiajs/vue3": ">=
|
|
132
|
+
"@inertiajs/vue3": ">=2.0.0",
|
|
133
133
|
"@modelcontextprotocol/sdk": ">=1.29.0",
|
|
134
134
|
"@nuxt/kit": ">=4.0.0",
|
|
135
135
|
"vee-validate": ">=4.10.0 <5",
|
|
@@ -196,6 +196,7 @@
|
|
|
196
196
|
"gray-matter": "^4.0.3",
|
|
197
197
|
"heroicons": "^2.2.0",
|
|
198
198
|
"husky": "^9.1.7",
|
|
199
|
+
"inertia2-vue3": "npm:@inertiajs/vue3@^2.3.10",
|
|
199
200
|
"joi": "^18.2.9",
|
|
200
201
|
"lightningcss": "^1.32.0",
|
|
201
202
|
"lint-staged": "^17.0.4",
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "The adoption checklist (Q76.0): ONE source for the guide (ai/guides/migration/adoption-checklist.md, the block between the adoption-rows markers, written by scripts/generate-adoption-checklist.mjs) and for `bitboss-ui check --idioms` (scripts/lib/idiom-scan.mjs). Each probe is a regex run per line, in both JavaScript and ripgrep syntax (no lookarounds; `.` stands for a quote so the shell command needs none). `inFile` must also match somewhere in the file, `notInFile` must not, and `notInLine` must not match the hit's own line. `ext` lists the file extensions the row reads.",
|
|
3
|
+
"rows": [
|
|
4
|
+
{
|
|
5
|
+
"id": "radio-group",
|
|
6
|
+
"pattern": "A hand-built single choice: radio cards, a pill row, anything carrying `role=\"radiogroup\"` / `role=\"radio\"`, or raw `<input type=\"radio\">`",
|
|
7
|
+
"ext": ["vue"],
|
|
8
|
+
"probes": [
|
|
9
|
+
{
|
|
10
|
+
"find": "role=.radio(group)?[^a-z]|type=.radio."
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"use": "BbRadioGroup",
|
|
14
|
+
"example": "<BbRadioGroup v-model=\"plan\" legend=\"Plan\" :items=\"plans\" />",
|
|
15
|
+
"note": "Cards: `list-layout=\"vertical-stretch\" item-layout=\"label-fill\"`. A segmented strip: `variant=\"pill\"` (or `\"line\"`), BbTabs' look. Other pill looks: `pt:` on `item` / `label`, with `pt:icon=\"hidden\"`. One look across the app = one `definePreset`."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"id": "checkbox",
|
|
19
|
+
"pattern": "A hand-built checkbox or check square: `role=\"checkbox\"` on your own markup, or a raw `<input type=\"checkbox\">`",
|
|
20
|
+
"ext": ["vue"],
|
|
21
|
+
"probes": [
|
|
22
|
+
{
|
|
23
|
+
"find": "role=.checkbox.|type=.checkbox."
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"use": "BbCheckbox / BbCheckboxGroup",
|
|
27
|
+
"example": "<BbCheckboxGroup v-model=\"ids\" legend=\"Columns\" :items=\"columns\" />",
|
|
28
|
+
"note": "A row of single checkboxes is a group. Selectable table rows are `BbTable selectable`."
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"id": "tabs",
|
|
32
|
+
"pattern": "Hand-built tabs: `role=\"tablist\"` / `role=\"tab\"` on your own markup",
|
|
33
|
+
"ext": ["vue"],
|
|
34
|
+
"probes": [
|
|
35
|
+
{
|
|
36
|
+
"find": "role=.tab(list)?[^a-z]"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"use": "BbTabs",
|
|
40
|
+
"example": "<BbTabs v-model=\"view\" :items=\"views\" />",
|
|
41
|
+
"note": "`pill` is the default look; `line` for page sections; `navigation` puts the tab in the URL."
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"id": "toggle-group",
|
|
45
|
+
"pattern": "A segmented control or tag group: a `v-for` of buttons that carry `aria-pressed`, or an app component named like one (`SegmentedControl`, `TagGroup`, `ChipGroup`, `ToggleGroup`, `RadioCards`)",
|
|
46
|
+
"ext": ["vue"],
|
|
47
|
+
"probes": [
|
|
48
|
+
{
|
|
49
|
+
"find": "aria-pressed",
|
|
50
|
+
"inFile": "v-for"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"find": "<(Segmented[A-Za-z]*|Tags?Group|ChipGroup|ToggleGroup|RadioCards?[A-Za-z]*)[\\s/>]"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"use": "BbTabs (switch views) / BbRadioGroup (pick a value) / BbCheckboxGroup (pick several)",
|
|
57
|
+
"example": "<BbTabs v-model=\"view\" :items=\"views\" />",
|
|
58
|
+
"note": "Decide by the job, not the look: switching what the page shows is BbTabs (`pill`); choosing a value a form or a filter submits is BbRadioGroup `variant=\"pill\"` (several values: BbCheckboxGroup `variant=\"pill\"`). See \"Switch views or pick a value\" above. On/off toggles that are not one choice are `BbButton` with `v-model` (it owns `aria-pressed`; `group` fuses them)."
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"id": "sort-header",
|
|
62
|
+
"pattern": "Hand-built sortable headers: your own `aria-sort`, sort arrows and click handlers on `<th>`",
|
|
63
|
+
"ext": ["vue"],
|
|
64
|
+
"probes": [
|
|
65
|
+
{
|
|
66
|
+
"find": "aria-sort"
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"use": "BbTable `sortable` columns + `v-model:sort`",
|
|
70
|
+
"example": "<BbTable v-model:sort=\"sort\" :columns=\"[{ key: 'name', label: 'Name', sortable: true }]\" :items=\"rows\" />",
|
|
71
|
+
"note": "`v-model:sort` is an ordered array of `[key, dir]`; a server that sorts by one column keeps the last entry."
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"id": "table",
|
|
75
|
+
"pattern": "A raw `<table>`, including a hand-made nested or expanding one (child rows, a chevron in the first cell)",
|
|
76
|
+
"ext": ["vue"],
|
|
77
|
+
"probes": [
|
|
78
|
+
{
|
|
79
|
+
"find": "<table[\\s>]"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"use": "BbTable (nested: `#expand` + a nested `BbTable inherit-column-widths`)",
|
|
83
|
+
"example": "<BbTable :columns=\"columns\" :items=\"rows\" />",
|
|
84
|
+
"note": "Rows that open: `v-model:expanded-items` and the `#expand` slot. An email or print template that needs a raw table stays one."
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"id": "option-check",
|
|
88
|
+
"pattern": "A custom check glyph in select options: a check icon or check square in `#option`, or a class that hides the library's own check (`[&>svg]:hidden`)",
|
|
89
|
+
"ext": ["vue", "ts"],
|
|
90
|
+
"probes": [
|
|
91
|
+
{
|
|
92
|
+
"find": "\\[&>svg\\]:hidden"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"find": "<CheckSquare[\\s/>]"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"find": "icon=.[a-z-]*:?(square-)?check",
|
|
99
|
+
"inFile": "#option"
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"use": "BbSelect / BbSelectPopover / BbDropdown (the selected row draws its own check)",
|
|
103
|
+
"example": "<BbSelect v-model=\"ids\" label=\"Owners\" :items=\"users\" multiple />",
|
|
104
|
+
"note": "Keep `#option` for the row's content; the selection mark is the component's."
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"id": "stepper",
|
|
108
|
+
"pattern": "A hand-built stepper: minus / plus buttons around a number, with your own increment and decrement code",
|
|
109
|
+
"ext": ["vue"],
|
|
110
|
+
"probes": [
|
|
111
|
+
{
|
|
112
|
+
"find": "(increment|decrement|stepUp|stepDown)\\s*\\(",
|
|
113
|
+
"inFile": "<button",
|
|
114
|
+
"notInFile": "<BbNumberInput"
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
"use": "BbNumberInput (its slots get `{ increase, decrease }`)",
|
|
118
|
+
"example": "<BbNumberInput v-model=\"qty\" label=\"Quantity\" :min=\"0\"><template #append=\"{ increase }\"><BbButton icon=\"lucide:plus\" variant=\"ghost\" @click=\"increase\">More</BbButton></template></BbNumberInput>",
|
|
119
|
+
"note": "Arrow keys, clamping to `min` / `max`, `step` and locale formatting come with the field."
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"id": "notice",
|
|
123
|
+
"pattern": "A hand-built notice box: a styled `<div role=\"status\">` / `role=\"alert\"`",
|
|
124
|
+
"ext": ["vue"],
|
|
125
|
+
"probes": [
|
|
126
|
+
{
|
|
127
|
+
"find": "<(div|p|section|aside)\\b[^>]*role=.(status|alert)."
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"use": "BbAlert",
|
|
131
|
+
"example": "<BbAlert title=\"Saved as a draft\" />",
|
|
132
|
+
"note": "`variant=\"destructive\"` for errors (it announces as an alert). An empty-state box (\"nothing here yet\") has no component: keep it, built on tokens."
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"id": "clickable-card",
|
|
136
|
+
"pattern": "A whole card or tile wrapped in a link (`<a>`, `<Link>`, `<RouterLink>` carrying the card's border and padding)",
|
|
137
|
+
"ext": ["vue"],
|
|
138
|
+
"probes": [
|
|
139
|
+
{
|
|
140
|
+
"find": "<(a|Link|RouterLink|router-link)\\b[^>]*class=.[^\"]*\\b(rounded|border|shadow)[^\"]*\\bp-[0-9]"
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"use": "BbBaseButton as an overlay link (BbBaseButton § A clickable card)",
|
|
144
|
+
"example": "<div class=\"relative rounded-(--bb-radius) border p-4\">…<BbBaseButton class=\"absolute inset-0\" :href=\"url\"><span class=\"sr-only\">Open report</span></BbBaseButton></div>",
|
|
145
|
+
"note": "There is no card or KPI-tile component: keep the box, adopt the link (navigation, prefetch, one focus ring, selectable text)."
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"id": "app-sheet",
|
|
149
|
+
"pattern": "An app-made sheet or mobile overlay: a `useBottomSheet` / `BottomSheet` / `ActionSheet` of your own, a `BbOffCanvas` mounted with `v-if` instead of `v-model`, or a side switched by hand on `isMobile`",
|
|
150
|
+
"ext": ["vue", "ts", "js"],
|
|
151
|
+
"probes": [
|
|
152
|
+
{
|
|
153
|
+
"find": "use(Bottom|Action)Sheet\\b|<(Bottom|Action)Sheet[\\s/>]"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"find": "<BbOffCanvas\\b[^>]*\\bv-if="
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"find": ":side=.[A-Za-z.]*[Mm]obile\\b"
|
|
160
|
+
}
|
|
161
|
+
],
|
|
162
|
+
"use": "Adaptive overlays (BbDialog, BbDropdown, BbSelect, BbPopover open as sheets on a phone) / BbOffCanvas with a per-breakpoint `side`",
|
|
163
|
+
"example": "<BbOffCanvas v-model=\"open\" :side=\"{ default: 'bottom', md: 'right' }\" draggable title=\"Filters\" />",
|
|
164
|
+
"note": "Delete the app's sheet, its drag code and its `isMobile` branches: `draggable` gives drag-to-dismiss and the handle, and the panel lifts above the keyboard by itself."
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"id": "app-dialog",
|
|
168
|
+
"pattern": "App-made dialogs and confirms: a raw `<dialog>`, `role=\"dialog\"` on your own markup, `window.confirm()`, or an app `ConfirmDialog` / `ConfirmModal`",
|
|
169
|
+
"ext": ["vue", "ts", "js"],
|
|
170
|
+
"probes": [
|
|
171
|
+
{
|
|
172
|
+
"find": "<dialog[\\s>]|role=.(alert)?dialog."
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"find": "window\\.confirm\\("
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"find": "<Confirm(Dialog|Modal)[\\s/>]"
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"use": "BbDialog (`v-bb-dialog`) / `confirm()`",
|
|
182
|
+
"example": "const ok = await confirm({ title: 'Delete invoice?', variant: 'destructive' });",
|
|
183
|
+
"note": "Open a dialog by id from its trigger: `<BbButton v-bb-dialog=\"'edit-user'\">Edit</BbButton>` + `<BbDialog id=\"edit-user\" title=\"Edit user\">`; `confirm()` comes from `useConfirm()`."
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"id": "destructive-confirm",
|
|
187
|
+
"pattern": "A delete confirm without the destructive look: a `confirm()` in a file that deletes or removes, with no `variant: 'destructive'`",
|
|
188
|
+
"ext": ["vue", "ts", "js"],
|
|
189
|
+
"probes": [
|
|
190
|
+
{
|
|
191
|
+
"find": "confirm\\(\\{",
|
|
192
|
+
"inFile": "[Dd]elete|[Rr]emove|[Ee]limina|[Cc]ancella",
|
|
193
|
+
"notInFile": "variant:\\s*.destructive."
|
|
194
|
+
}
|
|
195
|
+
],
|
|
196
|
+
"use": "`confirm({ variant: 'destructive' })`",
|
|
197
|
+
"example": "const ok = await confirm({ title: 'Delete invoice?', variant: 'destructive' });",
|
|
198
|
+
"note": "The Yes button takes the variant too. A row menu's delete item takes `variant: 'destructive'` on the item."
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"id": "media-query",
|
|
202
|
+
"pattern": "Your own mobile check: a `useIsMobile`, `window.matchMedia(…)` or an `innerWidth` comparison deciding layout",
|
|
203
|
+
"ext": ["vue", "ts", "js"],
|
|
204
|
+
"probes": [
|
|
205
|
+
{
|
|
206
|
+
"find": "\\buseIsMobile\\b|window\\.matchMedia\\(|innerWidth\\s*[<>]"
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
"use": "`useMobile()` from bitboss-ui",
|
|
210
|
+
"example": "const { isMobile } = useMobile();",
|
|
211
|
+
"note": "It is the same breakpoint the adaptive overlays switch at (`mobileMaxWidth`), so the app and the library never disagree."
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"id": "pagination",
|
|
215
|
+
"pattern": "A hand-built pager: page-number buttons, an app `Pagination` / `Pager` component, a `nav` labelled \"pagination\"",
|
|
216
|
+
"ext": ["vue"],
|
|
217
|
+
"probes": [
|
|
218
|
+
{
|
|
219
|
+
"find": "aria-label=.[Pp]agina(tion|zione)."
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"find": "<(Pagination|Pager|XPagination)[\\s/>]"
|
|
223
|
+
}
|
|
224
|
+
],
|
|
225
|
+
"use": "BbPagination",
|
|
226
|
+
"example": "<BbPagination v-model=\"page\" :total-pages=\"pages\" />",
|
|
227
|
+
"note": "`navigation` builds a link per page; inside a BbTable the table's pager reads the table."
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"id": "disclosure",
|
|
231
|
+
"pattern": "A hand-built disclosure or collapsible card: a raw `<details>` / `<summary>`",
|
|
232
|
+
"ext": ["vue"],
|
|
233
|
+
"probes": [
|
|
234
|
+
{
|
|
235
|
+
"find": "<details[\\s>]"
|
|
236
|
+
}
|
|
237
|
+
],
|
|
238
|
+
"use": "BbAccordion (BbCollapsible when you bring the trigger)",
|
|
239
|
+
"example": "<BbAccordion v-model=\"open\" title=\"Can I change plans?\" />",
|
|
240
|
+
"note": "`heading-level` sets the header's heading; the chevron and the ARIA come with it."
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"id": "form-control",
|
|
244
|
+
"pattern": "Raw form controls: `<input>` (text, number, date, time), `<textarea>`, `<select>`",
|
|
245
|
+
"ext": ["vue"],
|
|
246
|
+
"probes": [
|
|
247
|
+
{
|
|
248
|
+
"find": "<(textarea|select)[\\s>]"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"find": "<input\\b",
|
|
252
|
+
"notInLine": "type=.(hidden|radio|checkbox|file)."
|
|
253
|
+
}
|
|
254
|
+
],
|
|
255
|
+
"use": "BbTextInput / BbNumberInput / BbDatePickerInput / BbTimePickerInput / BbTextarea / BbSelect",
|
|
256
|
+
"example": "<BbTextInput v-model=\"name\" label=\"Name\" />",
|
|
257
|
+
"note": "The field brings the label, the hint, errors, `required` and the BbForm wiring."
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"id": "raw-button",
|
|
261
|
+
"pattern": "A raw `<button>`: an icon button, a remove ✕, an add-row button, a pill you click",
|
|
262
|
+
"ext": ["vue"],
|
|
263
|
+
"probes": [
|
|
264
|
+
{
|
|
265
|
+
"find": "<button[\\s>]"
|
|
266
|
+
}
|
|
267
|
+
],
|
|
268
|
+
"use": "BbButton (a styled action) / BbBaseButton (your own look)",
|
|
269
|
+
"example": "<BbButton variant=\"ghost\" prepend:icon=\"lucide:plus\">Add row</BbButton>",
|
|
270
|
+
"note": "BbBaseButton keeps your markup and adds the cursor, the focus ring, `disabled` and links (`href`, Inertia visits). A raw button also loses the pointer cursor under Tailwind 4 without the library reset."
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"id": "progress",
|
|
274
|
+
"pattern": "A hand-built progress bar: a raw `<progress>` or `role=\"progressbar\"`",
|
|
275
|
+
"ext": ["vue"],
|
|
276
|
+
"probes": [
|
|
277
|
+
{
|
|
278
|
+
"find": "<progress[\\s>]|role=.progressbar."
|
|
279
|
+
}
|
|
280
|
+
],
|
|
281
|
+
"use": "BbProgress",
|
|
282
|
+
"example": "<BbProgress label=\"Upload\" :model-value=\"40\" />",
|
|
283
|
+
"note": "A decorative bar with the numbers in text beside it can stay `aria-hidden` markup."
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"id": "avatar",
|
|
287
|
+
"pattern": "An app avatar: an `InitialsAvatar` / `Avatar` component of your own, or initials computed for a round plate",
|
|
288
|
+
"ext": ["vue"],
|
|
289
|
+
"probes": [
|
|
290
|
+
{
|
|
291
|
+
"find": "<(Initials|User)?Avatar[\\s/>]|getInitials\\("
|
|
292
|
+
}
|
|
293
|
+
],
|
|
294
|
+
"use": "BbAvatar",
|
|
295
|
+
"example": "<BbAvatar size=\"40\" alt=\"Grace Hopper\">GH</BbAvatar>",
|
|
296
|
+
"note": "Circle only. The image, its load error and the icon fallback come with it."
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"id": "adaptive-false",
|
|
300
|
+
"pattern": "`adaptive: false` (plugin) or `:adaptive=\"false\"` (one component): the temporary crutch from the migration",
|
|
301
|
+
"ext": ["vue", "ts", "js", "mjs"],
|
|
302
|
+
"probes": [
|
|
303
|
+
{
|
|
304
|
+
"find": "adaptive:\\s*false|:adaptive=.false."
|
|
305
|
+
}
|
|
306
|
+
],
|
|
307
|
+
"use": "Remove it in the adaptive phase (below)",
|
|
308
|
+
"example": "bitbossUi({ iconDir: 'resources/icons' })",
|
|
309
|
+
"note": "Keep it only on a surface that must never become a sheet, and say why in a comment."
|
|
310
|
+
}
|
|
311
|
+
]
|
|
312
|
+
}
|
|
@@ -106,6 +106,19 @@ export interface NoUnknownAttributesOptions {
|
|
|
106
106
|
allowAttributes?: string[];
|
|
107
107
|
/** Component names to skip entirely. */
|
|
108
108
|
allowComponents?: string[];
|
|
109
|
+
/**
|
|
110
|
+
* The app's own variant names per build-plugin option
|
|
111
|
+
* (`{ dropdownItemVariants: ['warning'] }`), so a `:pt` key like
|
|
112
|
+
* `'item:warning'` is a state, not a typo. Read from the project's Vite
|
|
113
|
+
* config when left out.
|
|
114
|
+
*/
|
|
115
|
+
registeredVariants?: Record<string, string[]>;
|
|
116
|
+
/**
|
|
117
|
+
* Whether the app turns Vue's Options API off: then an app's own variant
|
|
118
|
+
* is no `pt:<part>:<name>` attribute (mixins do not merge). Read from the
|
|
119
|
+
* project's config when left out.
|
|
120
|
+
*/
|
|
121
|
+
optionsApiOff?: boolean;
|
|
109
122
|
}
|
|
110
123
|
|
|
111
124
|
declare const plugin: ESLint.Plugin & {
|
|
@@ -104,10 +104,39 @@ import {
|
|
|
104
104
|
NAV_ATTRS,
|
|
105
105
|
unknownComponentFinding,
|
|
106
106
|
PARTNER_PROP_PAIRS,
|
|
107
|
+
REGISTERED_VARIANT_OPTIONS,
|
|
107
108
|
toCamel,
|
|
108
109
|
keyedSlotLookup,
|
|
109
110
|
scriptSetupArrayConsts,
|
|
110
111
|
} from './validate-bb-markup.mjs';
|
|
112
|
+
import {
|
|
113
|
+
readOptionsApiOff,
|
|
114
|
+
readRegisteredVariants,
|
|
115
|
+
} from './project-variant-dts.mjs';
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* The project's registered variant names per plugin option (Q76.7), read from
|
|
119
|
+
* its Vite config once per project root: a `:pt` key naming an app's own
|
|
120
|
+
* variant is a real state, not a typo.
|
|
121
|
+
*/
|
|
122
|
+
const registeredVariantsByRoot = new Map();
|
|
123
|
+
const registeredVariantsFor = (root) => {
|
|
124
|
+
if (!root) return {};
|
|
125
|
+
let found = registeredVariantsByRoot.get(root);
|
|
126
|
+
if (!found) {
|
|
127
|
+
found = readRegisteredVariants(root, REGISTERED_VARIANT_OPTIONS);
|
|
128
|
+
registeredVariantsByRoot.set(root, found);
|
|
129
|
+
}
|
|
130
|
+
return found;
|
|
131
|
+
};
|
|
132
|
+
/** Whether the project's build config turns the Options API off (no mixin props), per root. */
|
|
133
|
+
const optionsApiOffByRoot = new Map();
|
|
134
|
+
const optionsApiOffFor = (root) => {
|
|
135
|
+
if (!root) return false;
|
|
136
|
+
if (!optionsApiOffByRoot.has(root))
|
|
137
|
+
optionsApiOffByRoot.set(root, readOptionsApiOff(root));
|
|
138
|
+
return optionsApiOffByRoot.get(root);
|
|
139
|
+
};
|
|
111
140
|
import {
|
|
112
141
|
REACTIVE_V_MODEL_MESSAGE,
|
|
113
142
|
reactiveConstNames,
|
|
@@ -147,7 +176,11 @@ import {
|
|
|
147
176
|
ruleNamesIn,
|
|
148
177
|
unregisteredRuleMessage,
|
|
149
178
|
} from './rule-registry.mjs';
|
|
150
|
-
import {
|
|
179
|
+
import {
|
|
180
|
+
attrRemovalRange,
|
|
181
|
+
matchNameStyle,
|
|
182
|
+
planAttributeFix,
|
|
183
|
+
} from './migrate-fix.mjs';
|
|
151
184
|
import {
|
|
152
185
|
UNIMPORTED_MESSAGE,
|
|
153
186
|
projectResolution,
|
|
@@ -338,6 +371,15 @@ const noUnknownAttributes = {
|
|
|
338
371
|
allowAttributes: { type: 'array', items: { type: 'string' } },
|
|
339
372
|
allowComponents: { type: 'array', items: { type: 'string' } },
|
|
340
373
|
libraryImports: LIBRARY_IMPORTS_SCHEMA,
|
|
374
|
+
// The app's variant names per plugin option; read from the
|
|
375
|
+
// project's Vite config when left out.
|
|
376
|
+
registeredVariants: {
|
|
377
|
+
type: 'object',
|
|
378
|
+
additionalProperties: { type: 'array', items: { type: 'string' } },
|
|
379
|
+
},
|
|
380
|
+
// Whether the app turns Vue's Options API off; read from the
|
|
381
|
+
// project's config when left out.
|
|
382
|
+
optionsApiOff: { type: 'boolean' },
|
|
341
383
|
},
|
|
342
384
|
additionalProperties: false,
|
|
343
385
|
},
|
|
@@ -366,6 +408,15 @@ const noUnknownAttributes = {
|
|
|
366
408
|
|
|
367
409
|
const allowAttrs = new Set(options.allowAttributes ?? []);
|
|
368
410
|
const allowComps = allowedComponentsFor(context, options);
|
|
411
|
+
const filename = context.filename ?? context.getFilename?.();
|
|
412
|
+
let registered;
|
|
413
|
+
const registeredVariants = () =>
|
|
414
|
+
(registered ??=
|
|
415
|
+
options.registeredVariants ??
|
|
416
|
+
registeredVariantsFor(filename ? projectRootFor(filename) : null));
|
|
417
|
+
const optionsApiOff = () =>
|
|
418
|
+
options.optionsApiOff ??
|
|
419
|
+
optionsApiOffFor(filename ? projectRootFor(filename) : null);
|
|
369
420
|
|
|
370
421
|
/**
|
|
371
422
|
* Which bitboss-ui entrypoint each local name came from. Unlike a
|
|
@@ -416,13 +467,10 @@ const noUnknownAttributes = {
|
|
|
416
467
|
|
|
417
468
|
return (fixer) => {
|
|
418
469
|
switch (plan.action) {
|
|
419
|
-
case 'remove':
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
if (from > 0 && /\s/.test(sourceCode.text[from - 1])) from -= 1;
|
|
424
|
-
return fixer.removeRange([from, end]);
|
|
425
|
-
}
|
|
470
|
+
case 'remove':
|
|
471
|
+
return fixer.removeRange(
|
|
472
|
+
attrRemovalRange(sourceCode.text, attr.range)
|
|
473
|
+
);
|
|
426
474
|
case 'rename': {
|
|
427
475
|
const styled = matchNameStyle(plan.to, originalName);
|
|
428
476
|
const nameNode =
|
|
@@ -437,6 +485,11 @@ const noUnknownAttributes = {
|
|
|
437
485
|
const styled = matchNameStyle(plan.to, originalName);
|
|
438
486
|
return fixer.replaceText(attr, `:${styled}="${plan.expr}"`);
|
|
439
487
|
}
|
|
488
|
+
case 'setBare':
|
|
489
|
+
return fixer.replaceText(
|
|
490
|
+
attr,
|
|
491
|
+
matchNameStyle(plan.to, originalName)
|
|
492
|
+
);
|
|
440
493
|
default:
|
|
441
494
|
return null;
|
|
442
495
|
}
|
|
@@ -475,6 +528,8 @@ const noUnknownAttributes = {
|
|
|
475
528
|
// Q54.4: every form control is form-aware wherever it comes from.
|
|
476
529
|
const checker = createComponentChecker(surface, {
|
|
477
530
|
includeValidated: true,
|
|
531
|
+
registeredVariants: registeredVariants(),
|
|
532
|
+
optionsApiOff: optionsApiOff(),
|
|
478
533
|
});
|
|
479
534
|
for (const attr of node.startTag.attributes) {
|
|
480
535
|
// `v-model` / `:model-value` / `@update:model-value` on BbForm
|
|
@@ -526,7 +581,10 @@ const noUnknownAttributes = {
|
|
|
526
581
|
? prop.key.value
|
|
527
582
|
: null;
|
|
528
583
|
if (key === null) continue;
|
|
529
|
-
const ptFinding = checker.checkPtKey(
|
|
584
|
+
const ptFinding = checker.checkPtKey(
|
|
585
|
+
key,
|
|
586
|
+
registeredVariants()
|
|
587
|
+
);
|
|
530
588
|
if (!ptFinding) continue;
|
|
531
589
|
// A renamed part (Q51.16) is rewritten in the key's
|
|
532
590
|
// own spelling: bare stays bare when it can, a
|
|
@@ -1509,7 +1567,10 @@ const noReverseFalse = {
|
|
|
1509
1567
|
},
|
|
1510
1568
|
{
|
|
1511
1569
|
desc: 'Remove it (control on the left, the v3 default)',
|
|
1512
|
-
fix: (fixer) =>
|
|
1570
|
+
fix: (fixer) =>
|
|
1571
|
+
fixer.removeRange(
|
|
1572
|
+
attrRemovalRange(sourceCode.text, attr.range)
|
|
1573
|
+
),
|
|
1513
1574
|
},
|
|
1514
1575
|
],
|
|
1515
1576
|
});
|
|
@@ -1546,7 +1607,10 @@ const noReverseFalse = {
|
|
|
1546
1607
|
},
|
|
1547
1608
|
{
|
|
1548
1609
|
desc: 'Control on the left: remove the prop (it is the default)',
|
|
1549
|
-
fix: (fixer) =>
|
|
1610
|
+
fix: (fixer) =>
|
|
1611
|
+
fixer.removeRange(
|
|
1612
|
+
attrRemovalRange(sourceCode.text, attr.range)
|
|
1613
|
+
),
|
|
1550
1614
|
},
|
|
1551
1615
|
],
|
|
1552
1616
|
});
|
|
@@ -152,6 +152,21 @@ export function loadContext({ cwd, packageRoot, command }) {
|
|
|
152
152
|
};
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
+
/** An installed package's package.json, walking up from `root`; null if none. */
|
|
156
|
+
function readInstalledJson(root, name) {
|
|
157
|
+
for (let dir = root; ; dir = dirname(dir)) {
|
|
158
|
+
const path = join(dir, 'node_modules', name, 'package.json');
|
|
159
|
+
if (existsSync(path)) {
|
|
160
|
+
try {
|
|
161
|
+
return JSON.parse(readFileSync(path, 'utf-8'));
|
|
162
|
+
} catch {
|
|
163
|
+
return null;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
if (dirname(dir) === dir) return null;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
155
170
|
/** The first `node_modules/bitboss-ui` walking up from `root` (directory walk-up, like Node's resolution). */
|
|
156
171
|
function findInstalled(root) {
|
|
157
172
|
let dir = root;
|
|
@@ -749,10 +764,19 @@ function missingPackages(ctx, names) {
|
|
|
749
764
|
const missing = (set) => [...set].filter((p) => !ctx.declared.has(p)).sort();
|
|
750
765
|
const run = missing(runtime);
|
|
751
766
|
const dev = missing(types);
|
|
767
|
+
// `@inertiajs/core` types must be the core the app's `@inertiajs/vue3`
|
|
768
|
+
// runs on: a bare `-D @inertiajs/core` installs the newest one, and two
|
|
769
|
+
// cores' Visit types do not match (strict apps fail to type-check).
|
|
770
|
+
const spec = (p) => {
|
|
771
|
+
const pinned =
|
|
772
|
+
p === '@inertiajs/core' &&
|
|
773
|
+
readInstalledJson(ctx.root, '@inertiajs/vue3')?.dependencies?.[p];
|
|
774
|
+
return pinned ? `${p}@${pinned}` : p;
|
|
775
|
+
};
|
|
752
776
|
const verb = { npm: 'i', pnpm: 'add', yarn: 'add', bun: 'add' }[ctx.pm];
|
|
753
777
|
const install = [
|
|
754
|
-
...(run.length ? [`${ctx.pm} ${verb} ${run.join(' ')}`] : []),
|
|
755
|
-
...(dev.length ? [`${ctx.pm} ${verb} -D ${dev.join(' ')}`] : []),
|
|
778
|
+
...(run.length ? [`${ctx.pm} ${verb} ${run.map(spec).join(' ')}`] : []),
|
|
779
|
+
...(dev.length ? [`${ctx.pm} ${verb} -D ${dev.map(spec).join(' ')}`] : []),
|
|
756
780
|
];
|
|
757
781
|
return { missing: [...run, ...dev], install };
|
|
758
782
|
}
|