bitboss-ui 3.0.0-beta.47 → 3.0.0-beta.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -7
- package/bin/bitboss-ui-mcp.mjs +15 -3
- package/bin/bitboss-ui.mjs +167 -14
- package/dist/ai/BbAccordion.md +1 -1
- package/dist/ai/BbAvatar.md +1 -1
- package/dist/ai/BbBreadcrumbs.md +65 -65
- package/dist/ai/BbButton.md +28 -8
- package/dist/ai/BbCheckbox.md +0 -2
- package/dist/ai/BbCheckboxGroup.md +13 -20
- package/dist/ai/BbCollapsible.md +1 -1
- package/dist/ai/BbColorPalette.md +1 -1
- package/dist/ai/BbConfirm.md +8 -0
- package/dist/ai/BbConfirmPortal.md +1 -1
- package/dist/ai/BbDatePickerInput.md +4 -2
- package/dist/ai/BbDialog.md +1 -8
- package/dist/ai/BbDropdown.md +231 -220
- package/dist/ai/BbDropdownButton.md +65 -65
- package/dist/ai/BbDropdownGroup.md +2 -2
- package/dist/ai/BbDropzone.md +10 -10
- package/dist/ai/BbForm.md +43 -52
- package/dist/ai/BbHoverCard.md +19 -7
- package/dist/ai/BbHoverCardPortal.md +1 -1
- package/dist/ai/BbNumberInput.md +88 -21
- package/dist/ai/BbPopover.md +47 -40
- package/dist/ai/BbPopoverPortal.md +1 -1
- package/dist/ai/BbProgress.md +48 -22
- package/dist/ai/BbRadioGroup.md +13 -19
- package/dist/ai/BbSelect.md +16 -36
- package/dist/ai/BbSelectPopover.md +14 -30
- package/dist/ai/BbSmoothHeight.md +0 -2
- package/dist/ai/BbSwitchGroup.md +13 -20
- package/dist/ai/BbTable.md +11 -10
- package/dist/ai/BbTabs.md +107 -106
- package/dist/ai/BbTabsList.md +2 -2
- package/dist/ai/BbTabsPanels.md +1 -1
- package/dist/ai/BbTabsRoot.md +3 -3
- package/dist/ai/BbTooltip.md +29 -13
- package/dist/ai/BbTree.md +14 -11
- package/dist/ai/CommonPopover.md +1 -1
- package/dist/ai/changelog.json +297 -6
- package/dist/ai/components.json +50 -45
- package/dist/ai/composables/useBbDropdownContext.md +16 -16
- package/dist/ai/composables/useBbFormField.md +5 -1
- package/dist/ai/composables/useBbTabsContext.md +14 -14
- package/dist/ai/guides/agent-contract.md +27 -27
- package/dist/ai/guides/ai-router.md +1 -1
- package/dist/ai/guides/component-picker.md +3 -3
- package/dist/ai/guides/fetch-items-playbook.md +1 -1
- package/dist/ai/guides/icons-policy.md +10 -10
- package/dist/ai/guides/inertia-helpers.md +120 -67
- package/dist/ai/guides/installation-and-plugin-setup.md +45 -15
- package/dist/ai/guides/migration/components/bb-breadcrumbs.md +3 -2
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +16 -16
- package/dist/ai/guides/migration/components/bb-dropdown-button.md +9 -8
- package/dist/ai/guides/migration/components/bb-dropdown.md +15 -14
- package/dist/ai/guides/migration/components/bb-radio-group.md +2 -1
- package/dist/ai/guides/migration/components/bb-select-popover.md +6 -1
- package/dist/ai/guides/migration/components/bb-select.md +10 -2
- package/dist/ai/guides/migration/components/bb-switch-group.md +2 -1
- package/dist/ai/guides/migration/components/bb-tabs.md +9 -8
- package/dist/ai/guides/migration/components/bb-tooltip.md +1 -1
- package/dist/ai/guides/migration/v2-to-v3.md +143 -28
- package/dist/ai/guides/migration/v3-beta-css-classes.md +29 -27
- package/dist/ai/guides/migration/v3-beta-tooling.md +11 -0
- package/dist/ai/guides/options-items-playbook.md +30 -24
- package/dist/ai/guides/passthrough.md +4 -4
- package/dist/ai/guides/preset-components.md +18 -3
- package/dist/ai/guides/typescript-generic-components.md +1 -1
- package/dist/ai/guides/validated-forms.md +11 -22
- package/dist/ai/guides/validation-providers.md +4 -3
- package/dist/ai/helpers/inertia/manifest.json +636 -0
- package/dist/ai/helpers/inertia/types.ts +15 -0
- package/dist/ai/helpers/inertia/useAsyncFn.ts +110 -0
- package/dist/ai/helpers/inertia/useConfirmOnRouteLeave.ts +102 -0
- package/dist/ai/helpers/inertia/useDeleteCmd.ts +30 -0
- package/dist/ai/helpers/inertia/useHasChanged.ts +36 -0
- package/dist/ai/helpers/inertia/useIndexById.ts +23 -0
- package/dist/ai/helpers/inertia/useLazyProp.ts +148 -0
- package/dist/ai/helpers/inertia/useLazyPropGetter.ts +50 -0
- package/dist/ai/helpers/inertia/useLoading.ts +20 -0
- package/dist/ai/helpers/inertia/usePaginatedResponseContext.ts +88 -0
- package/dist/ai/helpers/inertia/usePromiseForm.ts +62 -0
- package/dist/ai/helpers/inertia/useProp.ts +63 -0
- package/dist/ai/helpers/inertia/useQuery.ts +19 -0
- package/dist/ai/helpers/inertia/useQueryObject.ts +116 -0
- package/dist/ai/helpers/inertia/useResourceContext.ts +69 -0
- package/dist/ai/helpers/inertia/useRouteQuery.ts +54 -0
- package/dist/ai/helpers/inertia/useScreenSizes.ts +23 -0
- package/dist/ai/helpers/inertia/useTableContext.ts +34 -0
- package/dist/ai/helpers/inertia/useTableSelectionContext.ts +48 -0
- package/dist/ai/helpers/inertia/useUntil.ts +33 -0
- package/dist/ai/helpers/inertia/utils.ts +24 -0
- package/dist/ai/index.md +6 -6
- package/dist/ai/manifest/components/BbAccordion.json +1 -1
- package/dist/ai/manifest/components/BbBreadcrumbs.json +10 -6
- package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +1 -1
- package/dist/ai/manifest/components/BbButton.json +2 -1
- package/dist/ai/manifest/components/BbButton.tree.json +1 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
- package/dist/ai/manifest/components/BbCollapsible.json +1 -1
- package/dist/ai/manifest/components/BbColorPalette.json +1 -1
- package/dist/ai/manifest/components/BbConfirmPortal.json +5 -2
- package/dist/ai/manifest/components/BbDropdown.json +23 -20
- package/dist/ai/manifest/components/BbDropdown.tree.json +2 -2
- package/dist/ai/manifest/components/BbDropdownButton.json +22 -19
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +1 -1
- package/dist/ai/manifest/components/BbDropdownGroup.json +2 -2
- package/dist/ai/manifest/components/BbForm.json +1 -0
- package/dist/ai/manifest/components/BbHoverCard.json +1 -1
- package/dist/ai/manifest/components/BbHoverCardPortal.json +2 -2
- package/dist/ai/manifest/components/BbNumberInput.json +6 -1
- package/dist/ai/manifest/components/BbNumberInput.tree.json +2 -1
- package/dist/ai/manifest/components/BbPopover.json +2 -1
- package/dist/ai/manifest/components/BbPopoverPortal.json +2 -2
- package/dist/ai/manifest/components/BbProgress.json +6 -6
- package/dist/ai/manifest/components/BbProgress.tree.json +1 -0
- package/dist/ai/manifest/components/BbRadioGroup.json +2 -2
- package/dist/ai/manifest/components/BbSelect.json +2 -2
- package/dist/ai/manifest/components/BbSelect.tree.json +2 -2
- package/dist/ai/manifest/components/BbSelectPopover.json +2 -2
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +1 -1
- package/dist/ai/manifest/components/BbSwitchGroup.json +2 -2
- package/dist/ai/manifest/components/BbTabs.json +8 -7
- package/dist/ai/manifest/components/BbTabsList.json +3 -3
- package/dist/ai/manifest/components/BbTabsPanels.json +1 -1
- package/dist/ai/manifest/components/BbTabsRoot.json +6 -5
- package/dist/ai/manifest/components/BbTag.tree.json +1 -1
- package/dist/ai/manifest/components/BbTooltip.json +2 -2
- package/dist/ai/manifest/components/ChipsBox.tree.json +1 -1
- package/dist/ai/manifest/components/CommonPopover.json +1 -1
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/manifest/meta.json +5 -0
- package/dist/ai/manifest/types.advanced.json +10 -9
- package/dist/ai/manifest/types.api.json +8 -5
- package/dist/ai/manifest/types.wrapper.json +1 -0
- package/dist/ai/recipes/inertia/approvals-inbox.md +16 -18
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +23 -33
- package/dist/ai/recipes/inertia/layout-scaffold.md +16 -16
- package/dist/ai/recipes/inertia/onboarding.md +6 -10
- package/dist/ai/recipes/inertia/ownership-atlas.md +15 -18
- package/dist/ai/recipes/inertia/record-form.md +11 -11
- package/dist/ai/recipes/inertia/records-workspace.md +38 -41
- package/dist/ai/recipes/inertia/settings-workspace.md +26 -38
- package/dist/ai/recipes/inertia/upload-center.md +31 -39
- package/dist/ai/recipes/inertia/wizard-form.md +10 -19
- package/dist/ai/recipes/nuxt/approvals-inbox.md +7 -8
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +14 -24
- package/dist/ai/recipes/nuxt/layout-scaffold.md +16 -16
- package/dist/ai/recipes/nuxt/onboarding.md +2 -6
- package/dist/ai/recipes/nuxt/ownership-atlas.md +7 -9
- package/dist/ai/recipes/nuxt/record-form.md +5 -5
- package/dist/ai/recipes/nuxt/records-workspace.md +29 -31
- package/dist/ai/recipes/nuxt/settings-workspace.md +22 -34
- package/dist/ai/recipes/nuxt/upload-center.md +22 -29
- package/dist/ai/recipes/nuxt/wizard-form.md +3 -11
- package/dist/ai/recipes/vue/approvals-inbox.md +7 -8
- package/dist/ai/recipes/vue/inline-edit-workspace.md +14 -24
- package/dist/ai/recipes/vue/layout-scaffold.md +16 -16
- package/dist/ai/recipes/vue/onboarding.md +2 -6
- package/dist/ai/recipes/vue/ownership-atlas.md +7 -9
- package/dist/ai/recipes/vue/record-form.md +5 -5
- package/dist/ai/recipes/vue/records-workspace.md +29 -31
- package/dist/ai/recipes/vue/settings-workspace.md +22 -34
- package/dist/ai/recipes/vue/upload-center.md +22 -29
- package/dist/ai/recipes/vue/wizard-form.md +3 -11
- package/dist/ai/source/BbAccordion.md +1 -1
- package/dist/ai/source/BbAlert.md +3 -3
- package/dist/ai/source/BbBadge.md +14 -10
- package/dist/ai/source/BbBadgeButton.md +17 -12
- package/dist/ai/source/BbBaseButton.md +1 -1
- package/dist/ai/source/BbBaseRadioIcon.md +1 -0
- package/dist/ai/source/BbBaseSwitchIcon.md +1 -0
- package/dist/ai/source/BbBreadcrumbs.md +63 -42
- package/dist/ai/source/BbButton.md +84 -38
- package/dist/ai/source/BbCalendar.md +17 -16
- package/dist/ai/source/BbCheckbox.md +3 -2
- package/dist/ai/source/BbCheckboxGroup.md +11 -4
- package/dist/ai/source/BbCollapsible.md +2 -1
- package/dist/ai/source/BbColorInput.md +10 -9
- package/dist/ai/source/BbColorPalette.md +2 -1
- package/dist/ai/source/BbConfirm.md +18 -1
- package/dist/ai/source/BbConfirmPortal.md +20 -6
- package/dist/ai/source/BbDatePicker.md +2 -2
- package/dist/ai/source/BbDatePickerInput.md +47 -20
- package/dist/ai/source/BbDialog.md +5 -5
- package/dist/ai/source/BbDropdown.md +231 -158
- package/dist/ai/source/BbDropdownButton.md +19 -12
- package/dist/ai/source/BbDropdownGroup.md +127 -93
- package/dist/ai/source/BbForm.md +25 -1
- package/dist/ai/source/BbHoverCard.md +30 -3
- package/dist/ai/source/BbHoverCardPortal.md +18 -3
- package/dist/ai/source/BbIndicator.md +4 -0
- package/dist/ai/source/BbNumberInput.md +855 -19
- package/dist/ai/source/BbOffCanvas.md +27 -11
- package/dist/ai/source/BbPagination.md +3 -3
- package/dist/ai/source/BbPopover.md +185 -12
- package/dist/ai/source/BbPopoverPortal.md +30 -3
- package/dist/ai/source/BbProgress.md +82 -18
- package/dist/ai/source/BbRadioGroup.md +12 -5
- package/dist/ai/source/BbRating.md +11 -9
- package/dist/ai/source/BbSelect.md +16 -10
- package/dist/ai/source/BbSelectPopover.md +29 -23
- package/dist/ai/source/BbSlider.md +12 -6
- package/dist/ai/source/BbSwitch.md +3 -2
- package/dist/ai/source/BbSwitchGroup.md +5 -2
- package/dist/ai/source/BbTable.md +102 -18
- package/dist/ai/source/BbTabs.md +30 -24
- package/dist/ai/source/BbTabsList.md +29 -23
- package/dist/ai/source/BbTabsPanels.md +29 -23
- package/dist/ai/source/BbTabsRoot.md +28 -22
- package/dist/ai/source/BbTag.md +10 -9
- package/dist/ai/source/BbTextInput.md +5 -4
- package/dist/ai/source/BbTextarea.md +6 -5
- package/dist/ai/source/BbTimePicker.md +1 -1
- package/dist/ai/source/BbTimePickerInput.md +46 -9
- package/dist/ai/source/BbToast.md +10 -7
- package/dist/ai/source/BbToastPortal.md +10 -7
- package/dist/ai/source/BbTooltip.md +88 -11
- package/dist/ai/source/BbTree.md +21 -3
- package/dist/ai/source/CommonField.md +6 -4
- package/dist/ai/source/CommonFieldInput.md +15 -10
- package/dist/ai/source/CommonPopover.md +8 -1
- package/dist/ai/source/CommonTimeSelector.md +5 -4
- package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +10 -8
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +45 -45
- package/dist/components/BbBreadcrumbs/types.d.ts +25 -17
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +88 -70
- package/dist/components/BbButton/toggleRoving.d.ts +6 -0
- package/dist/components/BbButton/toggleRoving.js +45 -0
- package/dist/components/BbButton/types.d.ts +12 -4
- package/dist/components/BbButton/types.js +5 -1
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +178 -178
- package/dist/components/BbCalendar/CalendarMonthPanel.vue_vue_type_script_setup_true_lang.js +15 -15
- package/dist/components/BbCalendar/CalendarYearPanel.vue_vue_type_script_setup_true_lang.js +28 -28
- package/dist/components/BbCalendar/useCalendarGrid.js +141 -139
- package/dist/components/BbCalendar/useDayjsLocale.d.ts +38 -15
- package/dist/components/BbCalendar/useDayjsLocale.js +31 -30
- package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +48 -48
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +81 -80
- package/dist/components/BbCheckboxGroup/types.d.ts +6 -2
- package/dist/components/BbCollapsible/types.d.ts +2 -1
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +69 -69
- package/dist/components/BbColorPalette/types.d.ts +2 -1
- package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +2 -5
- package/dist/components/BbConfirm/types.d.ts +15 -0
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +363 -349
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +91 -86
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +298 -289
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +322 -356
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +17 -15
- package/dist/components/BbDropdown/DropdownRow.vue.d.ts +40 -0
- package/dist/components/BbDropdown/DropdownRow.vue.js +5 -0
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +60 -0
- package/dist/components/BbDropdown/normalizeGroups.d.ts +8 -2
- package/dist/components/BbDropdown/normalizeGroups.js +60 -46
- package/dist/components/BbDropdown/types.d.ts +120 -88
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +11 -2
- package/dist/components/BbDropdownButton/types.d.ts +2 -2
- package/dist/components/BbForm/BbForm.vue.d.ts +9 -0
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +114 -105
- package/dist/components/BbForm/BbFormCustomField.js +1 -1
- package/dist/components/BbForm/bindFormField.js +2 -1
- package/dist/components/BbForm/formFields.d.ts +5 -0
- package/dist/components/BbHoverCard/BbHoverCard.vue_vue_type_script_setup_true_lang.js +145 -142
- package/dist/components/BbHoverCard/BbHoverCardPortal.vue.d.ts +2 -2
- package/dist/components/BbHoverCard/types.d.ts +14 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +0 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +452 -125
- package/dist/components/BbNumberInput/numberDisplay.d.ts +256 -0
- package/dist/components/BbNumberInput/numberDisplay.js +499 -0
- package/dist/components/BbNumberInput/types.d.ts +54 -1
- package/dist/components/BbNumberInput/warroom/corpus.d.ts +58 -0
- package/dist/components/BbNumberInput/warroom/currency-verify.rows.d.ts +28 -0
- package/dist/components/BbNumberInput/warroom/currency.rows.d.ts +2 -0
- package/dist/components/BbNumberInput/warroom/harness.d.ts +217 -0
- package/dist/components/BbNumberInput/warroom/oracle.d.ts +150 -0
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/components/BbPopover/BbPopover.vue.d.ts +1 -0
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +207 -162
- package/dist/components/BbPopover/BbPopoverPortal.vue.d.ts +2 -2
- package/dist/components/BbPopover/types.d.ts +26 -1
- package/dist/components/BbProgress/BbProgress.vue_vue_type_script_setup_true_lang.js +15 -7
- package/dist/components/BbProgress/types.d.ts +23 -7
- package/dist/components/BbProgress/types.js +1 -1
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +102 -101
- package/dist/components/BbRadioGroup/types.d.ts +6 -2
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +63 -63
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +156 -154
- package/dist/components/BbSelect/types.d.ts +6 -2
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/BbSelectPopover/types.d.ts +6 -2
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +153 -153
- package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +62 -62
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +131 -130
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +711 -676
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbTabs/types.d.ts +28 -22
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +76 -76
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +58 -58
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +82 -82
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +246 -236
- package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +99 -86
- package/dist/components/BbTooltip/tooltipWarmup.d.ts +23 -0
- package/dist/components/BbTooltip/tooltipWarmup.js +7 -0
- package/dist/components/BbTooltip/types.d.ts +10 -3
- package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +29 -21
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +10 -7
- package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +37 -36
- package/dist/components/CommonPopover/types.d.ts +2 -1
- package/dist/components/CommonTimeSelector/CommonTimeSelector.vue_vue_type_script_setup_true_lang.js +9 -9
- package/dist/composables/formSubmitLock.d.ts +6 -0
- package/dist/composables/formSubmitLock.js +4 -0
- package/dist/composables/useBaseOptions.d.ts +7 -1
- package/dist/composables/useBaseOptions.js +32 -32
- package/dist/composables/useBbDropdownContext.d.ts +8 -8
- package/dist/composables/useBbFormField.d.ts +9 -0
- package/dist/composables/useBbFormField.js +5 -3
- package/dist/composables/useBbTabsContext.d.ts +10 -10
- package/dist/composables/useBbTabsContext.js +18 -18
- package/dist/composables/useFormBinding.d.ts +11 -0
- package/dist/composables/useFormBinding.js +15 -13
- package/dist/composables/useItemText.d.ts +5 -1
- package/dist/composables/useItemText.js +8 -3
- package/dist/composables/useItemValue.d.ts +5 -1
- package/dist/composables/useItemValue.js +8 -3
- package/dist/composables/useLocale.js +10 -9
- package/dist/deprecation/ai-deprecations.json.d.ts +130 -0
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/deprecation/removedProps.js +1 -1
- package/dist/directives/bbDropdown.js +1 -1
- package/dist/directives/directivePortal.d.ts +13 -7
- package/dist/directives/directivePortal.js +1 -4
- package/dist/i18n/index.d.ts +7 -12
- package/dist/i18n/locales/cs.json +11 -14
- package/dist/i18n/locales/da.json +13 -16
- package/dist/i18n/locales/de-CH.json +137 -0
- package/dist/i18n/locales/de.json +14 -17
- package/dist/i18n/locales/el.json +10 -13
- package/dist/i18n/locales/en-GB.json +137 -0
- package/dist/i18n/locales/en.json +8 -11
- package/dist/i18n/locales/es-MX.json +137 -0
- package/dist/i18n/locales/es.json +16 -19
- package/dist/i18n/locales/fi.json +8 -11
- package/dist/i18n/locales/fr.json +23 -26
- package/dist/i18n/locales/hu.json +8 -11
- package/dist/i18n/locales/it.json +12 -15
- package/dist/i18n/locales/ja.json +13 -16
- package/dist/i18n/locales/ko.json +10 -13
- package/dist/i18n/locales/nb.json +13 -16
- package/dist/i18n/locales/nl.json +21 -24
- package/dist/i18n/locales/pl.json +10 -13
- package/dist/i18n/locales/{pt.json → pt-BR.json} +19 -22
- package/dist/i18n/locales/pt-PT.json +137 -0
- package/dist/i18n/locales/ro.json +22 -25
- package/dist/i18n/locales/ru.json +11 -14
- package/dist/i18n/locales/sv.json +16 -19
- package/dist/i18n/locales/tr.json +14 -17
- package/dist/i18n/locales/uk.json +11 -14
- package/dist/i18n/locales/{zh-cn.json → zh-CN.json} +10 -13
- package/dist/i18n/locales/zh-HK.json +137 -0
- package/dist/i18n/locales/zh-TW.json +137 -0
- package/dist/i18n/regionHints.d.ts +16 -0
- package/dist/i18n/regionHints.js +49 -0
- package/dist/i18n/regions.d.ts +286 -0
- package/dist/i18n/regions.js +265 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/llms-full.txt +1914 -1714
- package/dist/llms-medium.txt +76 -46
- package/dist/llms.txt +7 -7
- package/dist/locale-blueprint.json +16 -13
- package/dist/styles.css +2 -2
- package/dist/types/passthrough.d.ts +1 -1
- package/dist/types/ptComponentMap.d.ts +2 -2
- package/dist/utilities/functions/slotKey.d.ts +2 -2
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +22 -19
- package/dist/vite.js +309 -297
- package/llms.txt +7 -7
- package/package.json +5 -3
- package/scripts/lib/agent-manifest.mjs +2 -1
- package/scripts/lib/eslint-disable.mjs +17 -4
- package/scripts/lib/eslint-plugin.d.ts +9 -1
- package/scripts/lib/eslint-plugin.mjs +256 -6
- package/scripts/lib/helper-canon.mjs +176 -0
- package/scripts/lib/helpers-add.mjs +1303 -0
- package/scripts/lib/local-components.mjs +33 -4
- package/scripts/lib/locale-check.mjs +165 -0
- package/scripts/lib/portal-names.mjs +458 -0
- package/scripts/lib/redundant-item-accessor.mjs +398 -0
- package/scripts/lib/renamed-item-field.mjs +343 -0
- package/scripts/lib/slot-key.mjs +2 -2
- package/scripts/lib/slot-renames.mjs +1 -1
- package/scripts/lib/unimported-components.mjs +5 -2
- package/scripts/lib/validate-bb-markup.mjs +123 -56
- package/dist/i18n/index.js +0 -27
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 (~5.
|
|
10
|
+
- [Complete knowledge base](https://llms-bitboss-ui.bitboss.it/dist/llms-full.txt): Everything concatenated (~5.9 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) — 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.
|
|
@@ -35,18 +35,18 @@ Note: the `dist/` paths below resolve inside the installed npm package (`node_mo
|
|
|
35
35
|
- [Migration v2→v3: BbAlert](dist/ai/guides/migration/components/bb-alert.md): showClose inverted to hideClose, theme replaced by typed variant.
|
|
36
36
|
- [Migration v2→v3: BbAvatar](dist/ai/guides/migration/components/bb-avatar.md): The color prop is removed — retheme the fallback through the --bg / --fg locals.
|
|
37
37
|
- [Migration v2→v3: BbBadge (and where your v2 badges went)](dist/ai/guides/migration/components/bb-badge.md): The v2 BbBadge (floating count/dot) is now BbIndicator; the v3 BbBadge is a new inline pill that also replaces BbChip.
|
|
38
|
-
- [Migration v2→v3: BbBreadcrumbs](dist/ai/guides/migration/components/bb-breadcrumbs.md):
|
|
38
|
+
- [Migration v2→v3: BbBreadcrumbs](dist/ai/guides/migration/components/bb-breadcrumbs.md): Items are { label, value } (were { key, text }), the text divider prop is gone, per-item slot names are normalized.
|
|
39
39
|
- [Migration v2→v3: BbButton](dist/ai/guides/migration/components/bb-button.md): Async click handlers now auto-track loading (behavior flip), built-in tooltip props removed, variant locked to the registry. Leftover v2 --border-color on .bb-button* still paints.
|
|
40
40
|
- [Migration v2→v3: BbCheckbox / BbRadio / BbSwitch](dist/ai/guides/migration/components/bb-checkbox.md): reverse polarity inverted (explicit values flip, default layout unchanged), checked narrowed to boolean, color removed, BbRadio's name no longer required.
|
|
41
|
-
- [Migration v2→v3: BbCheckboxGroup / BbRadioGroup / BbSwitchGroup](dist/ai/guides/migration/components/bb-checkbox-group.md): labelPosition renamed legendPosition, per-item disabled is now inert (use selectable), color and the option affix slots removed, BbRadioGroup's name no longer required, the shared bb-cr-container CSS block split into one per group, and the --bb-checkbox-* / --bb-radio-* / --bb-switch-* globals replaced by glyph locals.
|
|
41
|
+
- [Migration v2→v3: BbCheckboxGroup / BbRadioGroup / BbSwitchGroup](dist/ai/guides/migration/components/bb-checkbox-group.md): labelPosition renamed legendPosition, per-item disabled is now inert (use selectable), color and the option affix slots removed, BbRadioGroup's name no longer required, the shared bb-cr-container CSS block split into one per group, and the --bb-checkbox-* / --bb-radio-* / --bb-switch-* globals replaced by glyph locals, and object items now read their own label / value by default.
|
|
42
42
|
- [Migration v2→v3: BbChip (removed)](dist/ai/guides/migration/components/bb-chip.md): BbChip is gone — BbBadge with clearable is the replacement; non-clearable chips were badges all along.
|
|
43
43
|
- [Migration v2→v3: BbCollapsible](dist/ai/guides/migration/components/bb-collapsible.md): `tag` narrows to `'span' | 'div'` and defaults to `span`; the inner element mirrors it.
|
|
44
44
|
- [Migration v2→v3: BbColorInput](dist/ai/guides/migration/components/bb-color-input.md): picker renamed to eyeDropper.
|
|
45
45
|
- [Migration v2→v3: BbColorPalette](dist/ai/guides/migration/components/bb-color-palette.md): flip inverted to disableFlip, showArrow removed, picker renamed eyeDropper, update:open dropped, model updates never emit null.
|
|
46
46
|
- [Migration v2→v3: BbDatePickerInput](dist/ai/guides/migration/components/bb-date-picker-input.md): allowWriting inverted to disableWriting and hidePopover renamed to disableCalendar, both with a changed token set; the width prop is removed; adaptive mobile sheet by default; non-floating output carries the local offset instead of UTC `Z` (new `utc` prop restores v2 output).
|
|
47
47
|
- [Migration v2→v3: BbDialog](dist/ai/guides/migration/components/bb-dialog.md): showClose inverted to hideClose, #close removed (description restored in beta.19), default widths changed, adaptive bottom sheet on mobile by default, --bb-dialog-* tokens replaced by --bb-panel-p plus locals.
|
|
48
|
-
- [Migration v2→v3: BbDropdown](dist/ai/guides/migration/components/bb-dropdown.md):
|
|
49
|
-
- [Migration v2→v3: BbDropdownButton](dist/ai/guides/migration/components/bb-dropdown-button.md): autoLoading renamed to disableAutoLoading, disabledWhileLoading and theme removed.
|
|
48
|
+
- [Migration v2→v3: BbDropdown](dist/ai/guides/migration/components/bb-dropdown.md): Rows are { label, value } (v2 and v3 up to beta.48 { key, text }), groups are named by id; rows can carry variants/submenus; arrowPadding removed; adaptive mobile sheet on by default.
|
|
49
|
+
- [Migration v2→v3: BbDropdownButton](dist/ai/guides/migration/components/bb-dropdown-button.md): autoLoading renamed to disableAutoLoading, disabledWhileLoading and theme removed; items are { label, value } rows like BbDropdown's.
|
|
50
50
|
- [Migration v2→v3: BbDropzone](dist/ai/guides/migration/components/bb-dropzone.md): modelValue is typed, accept no longer throws and takes bare tokens, and the hidden native-submit input only renders when name is set.
|
|
51
51
|
- [Migration v2→v3: BbIcon](dist/ai/guides/migration/components/bb-icon.md): The required prop is renamed type→icon, color is removed, and the xxl size key becomes 2xl.
|
|
52
52
|
- [Migration v2→v3: BbIntersection](dist/ai/guides/migration/components/bb-intersection.md): Removed with no replacement — it wrapped IntersectionObserver and carried no styling; use @vueuse/core's useIntersectionObserver.
|
|
@@ -55,14 +55,14 @@ Note: the `dist/` paths below resolve inside the installed npm package (`node_mo
|
|
|
55
55
|
- [Migration v2→v3: BbPopover](dist/ai/guides/migration/components/bb-popover.md): Built-in close button, restoreFocus, theme, and the arrow are gone; close affordances move into your content.
|
|
56
56
|
- [Migration v2→v3: BbRadioGroup](dist/ai/guides/migration/components/bb-radio-group.md): Shares its migration with BbCheckboxGroup — see bb-checkbox-group.md.
|
|
57
57
|
- [Migration v2→v3: BbRating](dist/ai/guides/migration/components/bb-rating.md): color removed; name no longer required; the star classes moved from .bb-base-rating to the .bb-rating block (--highlighted became --filled/--empty); --bb-rating-size demoted to a local --size on .bb-rating__stars; input-position finally works.
|
|
58
|
-
- [Migration v2→v3: BbSelect](dist/ai/guides/migration/components/bb-select.md): allowWriting inverted to disableWriting, filterBy narrowed to string[], prefill value renamed, chevron/options slots removed, and
|
|
58
|
+
- [Migration v2→v3: BbSelect](dist/ai/guides/migration/components/bb-select.md): allowWriting inverted to disableWriting, filterBy narrowed to string[], prefill value renamed, chevron/options slots removed, and three behavior changes (second click, mount-time coherence, object items read their own label / value).
|
|
59
59
|
- [Migration v2→v3: BbSelectPopover](dist/ai/guides/migration/components/bb-select-popover.md): flip and allowWriting inverted, arrow props removed, filterBy narrowed, options slots replaced by header/footer; shares BbSelect's behavior changes.
|
|
60
60
|
- [Migration v2→v3: BbSlider](dist/ai/guides/migration/components/bb-slider.md): thumbTranslate inverted to disableThumbTranslate; string model values and color removed.
|
|
61
61
|
- [Migration v2→v3: BbSmoothHeight](dist/ai/guides/migration/components/bb-smooth-height.md): The `tag` prop is narrowed to `div | span`, and the inner measuring element now mirrors it instead of always being a `<div>`.
|
|
62
62
|
- [Migration v2→v3: BbSpinner](dist/ai/guides/migration/components/bb-spinner.md): The color prop is removed; spinners follow currentColor.
|
|
63
63
|
- [Migration v2→v3: BbSwitchGroup](dist/ai/guides/migration/components/bb-switch-group.md): Shares its migration with BbCheckboxGroup — see bb-checkbox-group.md.
|
|
64
64
|
- [Migration v2→v3: BbTable](dist/ai/guides/migration/components/bb-table.md): The table renders as a CSS grid of divs with ARIA roles, not a <table> — every element selector (table/thead/tbody/tr/th/td) under .bb-table matches nothing, #thead/#tbody/#tfoot take role-complete div rows, --fill/--natural-width are gone, column widths drift within documented bounds, copy-to-spreadsheet and print header repetition degrade; allowSelectAll inverted to disableSelectAll; loading no longer blanks populated tables and now inerts rows; #loading is first-load-only; #empty fills a full-width cell instead of replacing the row; row events drop the selected argument; columns gained sortable + rowClass, which collide with same-named consumer fields.
|
|
65
|
-
- [Migration v2→v3: BbTabs (was BbTab)](dist/ai/guides/migration/components/bb-tabs.md): Component renamed; querykey→queryKey; animations default on; label slots renamed, header:* slots → wrapper:*, and all dynamic names/URL slugs normalized; the entire .bb-tab BEM tree renamed to .bb-tabs / .bb-tabs-list / .bb-tabs-panels.
|
|
65
|
+
- [Migration v2→v3: BbTabs (was BbTab)](dist/ai/guides/migration/components/bb-tabs.md): Component renamed; item key→value (v-model carries it); querykey→queryKey; animations default on; label slots renamed, header:* slots → wrapper:*, and all dynamic names/URL slugs normalized; the entire .bb-tab BEM tree renamed to .bb-tabs / .bb-tabs-list / .bb-tabs-panels.
|
|
66
66
|
- [Migration v2→v3: BbTag](dist/ai/guides/migration/components/bb-tag.md): modelValue is strictly string[] now, multiple is removed, and duplicates are rejected case-insensitively by default.
|
|
67
67
|
- [Migration v2→v3: BbTextInput](dist/ai/guides/migration/components/bb-text-input.md): The type prop narrows to the text-like input types — number/date values must move to their dedicated components; a bare `floating` attribute was never a prop, the spelling is label-mode="floating".
|
|
68
68
|
- [Migration v2→v3: BbToast and toast()](dist/ai/guides/migration/components/bb-toast.md): Host placement becomes position with a corner-based value set; toast() options rewritten (variant, duration, actions, portal).
|
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.49",
|
|
4
4
|
"description": "Vue 3 component library by BitBoss: forms, selects, layout, overlays, and more.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"preview": "vite preview",
|
|
92
92
|
"storybook": "storybook dev -p 6006",
|
|
93
93
|
"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-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",
|
|
94
|
-
"test:fixtures": "npm run build && 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",
|
|
94
|
+
"test:fixtures": "npm run build && 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",
|
|
95
95
|
"test:fixtures:src": "npm run test:inertia && npm run test:vue && npm run test:nuxt",
|
|
96
96
|
"test:inertia": "node scripts/invalidate-fixture-caches.mjs && node scripts/run-e2es.mjs fixtures/inertia/e2e",
|
|
97
97
|
"test:inertia:dist": "npm run build && FIXTURE_TARGET=dist node scripts/run-e2es.mjs fixtures/inertia/e2e",
|
|
@@ -106,7 +106,8 @@
|
|
|
106
106
|
"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",
|
|
107
107
|
"test:ci": "npm run test:ci:node && npm run test:ci:browser && npm run test:ci:gates",
|
|
108
108
|
"postpack": "npm pkg set \"scripts.prepare=node scripts/hooks-install.mjs\"",
|
|
109
|
-
"test:ssr": "npm run build && node scripts/run-ssr-fixture.mjs"
|
|
109
|
+
"test:ssr": "npm run build && node scripts/run-ssr-fixture.mjs",
|
|
110
|
+
"helpers:record": "node scripts/helpers-record.mjs"
|
|
110
111
|
},
|
|
111
112
|
"dependencies": {
|
|
112
113
|
"@floating-ui/vue": "^1.1.11",
|
|
@@ -234,6 +235,7 @@
|
|
|
234
235
|
"!scripts/lib/__fixtures__",
|
|
235
236
|
"!scripts/lib/fixture-library.mjs",
|
|
236
237
|
"!scripts/lib/gate.mjs",
|
|
238
|
+
"!scripts/lib/inertia-helpers.mjs",
|
|
237
239
|
"!scripts/lib/recipe-files.mjs",
|
|
238
240
|
"!scripts/lib/vitest-retry.mjs"
|
|
239
241
|
],
|
|
@@ -42,19 +42,32 @@ export function ruleForFinding(finding) {
|
|
|
42
42
|
return 'text-null-value';
|
|
43
43
|
case 'unimported-component':
|
|
44
44
|
return 'no-unimported-component';
|
|
45
|
+
case 'unknown-portal':
|
|
46
|
+
case 'portal-family-mismatch':
|
|
47
|
+
return 'portal-names';
|
|
48
|
+
case 'unused-portal':
|
|
49
|
+
return 'unused-portal';
|
|
45
50
|
case 'form-v-model':
|
|
46
51
|
return 'form-model';
|
|
47
52
|
case 'positional-provider':
|
|
48
53
|
return 'items-provider-context';
|
|
49
54
|
case 'single-reason':
|
|
50
55
|
return 'items-provider-reason';
|
|
56
|
+
case 'redundant-item-accessor':
|
|
57
|
+
return 'no-redundant-item-accessor';
|
|
58
|
+
case 'renamed-item-field':
|
|
59
|
+
return 'no-renamed-item-field';
|
|
51
60
|
// The check-only kinds below have no ESLint twin, so the partner-prop
|
|
52
|
-
// rule's name silences them: object items
|
|
53
|
-
// partner; a dropdown row
|
|
61
|
+
// rule's name silences them: object items with neither `label` nor
|
|
62
|
+
// `text` want their `item-text` partner; a dropdown row in a selectable
|
|
63
|
+
// group needs its `value`, a selectable group its `id`, and rows
|
|
64
|
+
// without a `value` that share a label collide. (`missing-key` /
|
|
65
|
+
// `duplicate-row-text` were these kinds' names before 3.0.0-beta.49.)
|
|
54
66
|
case 'missing-partner-prop':
|
|
55
67
|
case 'object-items-without-text':
|
|
56
|
-
case 'missing-
|
|
57
|
-
case '
|
|
68
|
+
case 'missing-value':
|
|
69
|
+
case 'missing-id':
|
|
70
|
+
case 'duplicate-row-label':
|
|
58
71
|
return 'require-partner-prop';
|
|
59
72
|
// check-only: a CSS local the library removed; an import of the
|
|
60
73
|
// package's build files or of its unexported pt types.
|
|
@@ -38,10 +38,14 @@ export type BitbossUiRuleName =
|
|
|
38
38
|
| 'no-retired-entrypoint'
|
|
39
39
|
| 'no-reactive-v-model'
|
|
40
40
|
| 'no-unimported-component'
|
|
41
|
+
| 'portal-names'
|
|
42
|
+
| 'unused-portal'
|
|
41
43
|
| 'text-null-value'
|
|
42
44
|
| 'form-model'
|
|
43
45
|
| 'items-provider-context'
|
|
44
|
-
| 'items-provider-reason'
|
|
46
|
+
| 'items-provider-reason'
|
|
47
|
+
| 'no-redundant-item-accessor'
|
|
48
|
+
| 'no-renamed-item-field';
|
|
45
49
|
|
|
46
50
|
/** Options accepted by `bitboss-ui/no-unknown-token`. */
|
|
47
51
|
export interface NoUnknownTokenOptions {
|
|
@@ -125,10 +129,14 @@ export const noStarColor: Rule.RuleModule;
|
|
|
125
129
|
export const requireAccessibleName: Rule.RuleModule;
|
|
126
130
|
export const noReactiveVModel: Rule.RuleModule;
|
|
127
131
|
export const noUnimportedComponent: Rule.RuleModule;
|
|
132
|
+
export const portalNames: Rule.RuleModule;
|
|
133
|
+
export const unusedPortal: Rule.RuleModule;
|
|
128
134
|
export const textNullValue: Rule.RuleModule;
|
|
129
135
|
export const formModel: Rule.RuleModule;
|
|
130
136
|
export const itemsProviderContext: Rule.RuleModule;
|
|
131
137
|
export const itemsProviderReason: Rule.RuleModule;
|
|
138
|
+
export const noRedundantItemAccessor: Rule.RuleModule;
|
|
139
|
+
export const noRenamedItemField: Rule.RuleModule;
|
|
132
140
|
|
|
133
141
|
/**
|
|
134
142
|
* Resolves the optional `@typescript-eslint/parser` peer, or `null` when it is
|
|
@@ -119,6 +119,8 @@ import {
|
|
|
119
119
|
writableComputedNames,
|
|
120
120
|
} from './form-v-model.mjs';
|
|
121
121
|
import { libraryAliases, localBbImports } from './local-components.mjs';
|
|
122
|
+
import { redundantItemAccessorFindings } from './redundant-item-accessor.mjs';
|
|
123
|
+
import { renamedItemFieldFindings } from './renamed-item-field.mjs';
|
|
122
124
|
import {
|
|
123
125
|
TEXT_NULL_VALUE_MESSAGE,
|
|
124
126
|
stringControlsFor,
|
|
@@ -134,6 +136,11 @@ import {
|
|
|
134
136
|
projectRootFor,
|
|
135
137
|
resolverFor,
|
|
136
138
|
} from './unimported-components.mjs';
|
|
139
|
+
import {
|
|
140
|
+
MAY_HAVE_PORTALS,
|
|
141
|
+
portalFindings,
|
|
142
|
+
projectPortalIndex,
|
|
143
|
+
} from './portal-names.mjs';
|
|
137
144
|
import {
|
|
138
145
|
ITEMS_PROVIDER_MESSAGES,
|
|
139
146
|
isPositional,
|
|
@@ -146,6 +153,28 @@ import {
|
|
|
146
153
|
topLevelBindings,
|
|
147
154
|
} from './items-provider-context.mjs';
|
|
148
155
|
|
|
156
|
+
/**
|
|
157
|
+
* `libraryImports`: import-source prefixes that ARE the library, for the
|
|
158
|
+
* library's own repo, whose showcases import the source
|
|
159
|
+
* (`@/components/BbSelect/BbSelect.vue`). Without it those `Bb*` imports read
|
|
160
|
+
* as the app's own components and every rule skips them. Empty by default: a
|
|
161
|
+
* consumer's `Bb*` imports stay theirs (Q53.18). See `isLibrarySource`.
|
|
162
|
+
*/
|
|
163
|
+
const LIBRARY_IMPORTS_SCHEMA = { type: 'array', items: { type: 'string' } };
|
|
164
|
+
const LIBRARY_ONLY_SCHEMA = [
|
|
165
|
+
{
|
|
166
|
+
type: 'object',
|
|
167
|
+
properties: { libraryImports: LIBRARY_IMPORTS_SCHEMA },
|
|
168
|
+
additionalProperties: false,
|
|
169
|
+
},
|
|
170
|
+
];
|
|
171
|
+
/** The `isLibrarySource` input for this file. */
|
|
172
|
+
const libraryOf = (context) => ({
|
|
173
|
+
libraryImports: context.options[0]?.libraryImports ?? [],
|
|
174
|
+
filename: context.filename ?? context.getFilename(),
|
|
175
|
+
cwd: context.cwd ?? context.getCwd?.(),
|
|
176
|
+
});
|
|
177
|
+
|
|
149
178
|
/**
|
|
150
179
|
* The components a rule skips entirely: the configured `allowComponents`, plus
|
|
151
180
|
* every `Bb*` name this file imports from a non-`bitboss-ui` path — the app's
|
|
@@ -155,7 +184,7 @@ const allowedComponentsFor = (context, options) => {
|
|
|
155
184
|
const text = (context.sourceCode ?? context.getSourceCode()).text;
|
|
156
185
|
return new Set([
|
|
157
186
|
...(options.allowComponents ?? []),
|
|
158
|
-
...localBbImports(text).keys(),
|
|
187
|
+
...localBbImports(text, libraryOf(context)).keys(),
|
|
159
188
|
// A library component under another name (`{ BbButton as BbSave }`):
|
|
160
189
|
// `check` validates it as the real component; the rules skip it rather
|
|
161
190
|
// than report the alias as unknown.
|
|
@@ -290,6 +319,7 @@ const noUnknownAttributes = {
|
|
|
290
319
|
failClosed: { type: 'boolean' },
|
|
291
320
|
allowAttributes: { type: 'array', items: { type: 'string' } },
|
|
292
321
|
allowComponents: { type: 'array', items: { type: 'string' } },
|
|
322
|
+
libraryImports: LIBRARY_IMPORTS_SCHEMA,
|
|
293
323
|
},
|
|
294
324
|
additionalProperties: false,
|
|
295
325
|
},
|
|
@@ -652,6 +682,7 @@ const requireTableSlotProp = {
|
|
|
652
682
|
manifestPath: { type: 'string' },
|
|
653
683
|
failClosed: { type: 'boolean' },
|
|
654
684
|
allowComponents: { type: 'array', items: { type: 'string' } },
|
|
685
|
+
libraryImports: LIBRARY_IMPORTS_SCHEMA,
|
|
655
686
|
},
|
|
656
687
|
additionalProperties: false,
|
|
657
688
|
},
|
|
@@ -758,6 +789,7 @@ const requirePartnerProp = {
|
|
|
758
789
|
manifestPath: { type: 'string' },
|
|
759
790
|
failClosed: { type: 'boolean' },
|
|
760
791
|
allowComponents: { type: 'array', items: { type: 'string' } },
|
|
792
|
+
libraryImports: LIBRARY_IMPORTS_SCHEMA,
|
|
761
793
|
},
|
|
762
794
|
additionalProperties: false,
|
|
763
795
|
},
|
|
@@ -849,6 +881,7 @@ const noUnknownSlots = {
|
|
|
849
881
|
manifestPath: { type: 'string' },
|
|
850
882
|
failClosed: { type: 'boolean' },
|
|
851
883
|
allowComponents: { type: 'array', items: { type: 'string' } },
|
|
884
|
+
libraryImports: LIBRARY_IMPORTS_SCHEMA,
|
|
852
885
|
allowSlots: { type: 'array', items: { type: 'string' } },
|
|
853
886
|
},
|
|
854
887
|
additionalProperties: false,
|
|
@@ -987,6 +1020,7 @@ const noActiveClassOnRootLink = {
|
|
|
987
1020
|
manifestPath: { type: 'string' },
|
|
988
1021
|
failClosed: { type: 'boolean' },
|
|
989
1022
|
allowComponents: { type: 'array', items: { type: 'string' } },
|
|
1023
|
+
libraryImports: LIBRARY_IMPORTS_SCHEMA,
|
|
990
1024
|
},
|
|
991
1025
|
additionalProperties: false,
|
|
992
1026
|
},
|
|
@@ -1096,6 +1130,7 @@ const noNavigationAttrFallthrough = {
|
|
|
1096
1130
|
manifestPath: { type: 'string' },
|
|
1097
1131
|
failClosed: { type: 'boolean' },
|
|
1098
1132
|
allowComponents: { type: 'array', items: { type: 'string' } },
|
|
1133
|
+
libraryImports: LIBRARY_IMPORTS_SCHEMA,
|
|
1099
1134
|
},
|
|
1100
1135
|
additionalProperties: false,
|
|
1101
1136
|
},
|
|
@@ -1192,6 +1227,7 @@ const noUnknownEvent = {
|
|
|
1192
1227
|
manifestPath: { type: 'string' },
|
|
1193
1228
|
failClosed: { type: 'boolean' },
|
|
1194
1229
|
allowComponents: { type: 'array', items: { type: 'string' } },
|
|
1230
|
+
libraryImports: LIBRARY_IMPORTS_SCHEMA,
|
|
1195
1231
|
allowEvents: { type: 'array', items: { type: 'string' } },
|
|
1196
1232
|
},
|
|
1197
1233
|
additionalProperties: false,
|
|
@@ -1290,6 +1326,7 @@ const noReverseFalse = {
|
|
|
1290
1326
|
manifestPath: { type: 'string' },
|
|
1291
1327
|
failClosed: { type: 'boolean' },
|
|
1292
1328
|
allowComponents: { type: 'array', items: { type: 'string' } },
|
|
1329
|
+
libraryImports: LIBRARY_IMPORTS_SCHEMA,
|
|
1293
1330
|
// Opt-in for a bulk v2→v3 sweep: turn the "control on the right"
|
|
1294
1331
|
// rewrite into a real `--fix`. Off by default because the two
|
|
1295
1332
|
// readings produce OPPOSITE layouts, and a v3-native codebase
|
|
@@ -1462,6 +1499,7 @@ const noStateTextColor = {
|
|
|
1462
1499
|
manifestPath: { type: 'string' },
|
|
1463
1500
|
failClosed: { type: 'boolean' },
|
|
1464
1501
|
allowComponents: { type: 'array', items: { type: 'string' } },
|
|
1502
|
+
libraryImports: LIBRARY_IMPORTS_SCHEMA,
|
|
1465
1503
|
},
|
|
1466
1504
|
additionalProperties: false,
|
|
1467
1505
|
},
|
|
@@ -1669,6 +1707,7 @@ const noStarColor = {
|
|
|
1669
1707
|
manifestPath: { type: 'string' },
|
|
1670
1708
|
failClosed: { type: 'boolean' },
|
|
1671
1709
|
allowComponents: { type: 'array', items: { type: 'string' } },
|
|
1710
|
+
libraryImports: LIBRARY_IMPORTS_SCHEMA,
|
|
1672
1711
|
},
|
|
1673
1712
|
additionalProperties: false,
|
|
1674
1713
|
},
|
|
@@ -1828,6 +1867,7 @@ const noBoxBorderColor = {
|
|
|
1828
1867
|
manifestPath: { type: 'string' },
|
|
1829
1868
|
failClosed: { type: 'boolean' },
|
|
1830
1869
|
allowComponents: { type: 'array', items: { type: 'string' } },
|
|
1870
|
+
libraryImports: LIBRARY_IMPORTS_SCHEMA,
|
|
1831
1871
|
},
|
|
1832
1872
|
additionalProperties: false,
|
|
1833
1873
|
},
|
|
@@ -2165,6 +2205,7 @@ const requireAccessibleName = {
|
|
|
2165
2205
|
manifestPath: { type: 'string' },
|
|
2166
2206
|
failClosed: { type: 'boolean' },
|
|
2167
2207
|
allowComponents: { type: 'array', items: { type: 'string' } },
|
|
2208
|
+
libraryImports: LIBRARY_IMPORTS_SCHEMA,
|
|
2168
2209
|
},
|
|
2169
2210
|
additionalProperties: false,
|
|
2170
2211
|
},
|
|
@@ -2376,6 +2417,7 @@ const noUnimportedComponent = {
|
|
|
2376
2417
|
manifestPath: { type: 'string' },
|
|
2377
2418
|
failClosed: { type: 'boolean' },
|
|
2378
2419
|
allowComponents: { type: 'array', items: { type: 'string' } },
|
|
2420
|
+
libraryImports: LIBRARY_IMPORTS_SCHEMA,
|
|
2379
2421
|
},
|
|
2380
2422
|
additionalProperties: false,
|
|
2381
2423
|
},
|
|
@@ -2413,6 +2455,62 @@ const noUnimportedComponent = {
|
|
|
2413
2455
|
},
|
|
2414
2456
|
};
|
|
2415
2457
|
|
|
2458
|
+
/**
|
|
2459
|
+
* Q63.8 — the twins of `check`'s portal findings, from one shared module
|
|
2460
|
+
* (portal-names.mjs) and one project scan per root. Two rules, because one
|
|
2461
|
+
* rule has one severity: a name nothing declares, or a portal of the other
|
|
2462
|
+
* family, opens nothing (`portal-names`, an error); a portal nothing opens is
|
|
2463
|
+
* dead code at worst (`unused-portal`, a warning). Literal names only:
|
|
2464
|
+
* anything dynamic is never judged.
|
|
2465
|
+
* @param {'portal-names' | 'unused-portal'} which
|
|
2466
|
+
* @returns {import('eslint').Rule.RuleModule}
|
|
2467
|
+
*/
|
|
2468
|
+
const portalRule = (which) => ({
|
|
2469
|
+
meta: {
|
|
2470
|
+
type: which === 'portal-names' ? 'problem' : 'suggestion',
|
|
2471
|
+
docs: {
|
|
2472
|
+
description:
|
|
2473
|
+
which === 'portal-names'
|
|
2474
|
+
? 'Flag a `v-bb-hover-card` / `v-bb-popover` / `confirm()` portal name that no `<…Portal name>` in the project declares, or that belongs to the other family.'
|
|
2475
|
+
: 'Flag a `<BbHoverCardPortal>` / `<BbPopoverPortal>` / `<BbConfirmPortal>` that nothing in the project opens.',
|
|
2476
|
+
recommended: true,
|
|
2477
|
+
},
|
|
2478
|
+
schema: [],
|
|
2479
|
+
messages: { portal: '{{message}}' },
|
|
2480
|
+
},
|
|
2481
|
+
create(context) {
|
|
2482
|
+
const filename = context.filename ?? context.getFilename();
|
|
2483
|
+
if (!filename || !/\.(?:vue|[cm]?[jt]sx?)$/.test(filename)) return {};
|
|
2484
|
+
const sourceCode = context.sourceCode ?? context.getSourceCode();
|
|
2485
|
+
return {
|
|
2486
|
+
'Program:exit'() {
|
|
2487
|
+
const text = sourceCode.text;
|
|
2488
|
+
if (!MAY_HAVE_PORTALS.test(text)) return;
|
|
2489
|
+
const root = projectRootFor(filename);
|
|
2490
|
+
const index = root ? projectPortalIndex(root) : null;
|
|
2491
|
+
const lines = sourceCode.lines ?? text.split('\n');
|
|
2492
|
+
for (const finding of portalFindings(text, filename, index)) {
|
|
2493
|
+
const isUnused = finding.kind === 'unused-portal';
|
|
2494
|
+
if (isUnused !== (which === 'unused-portal')) continue;
|
|
2495
|
+
const line = Math.max(1, Math.min(finding.line, lines.length));
|
|
2496
|
+
const first = lines[line - 1] ?? '';
|
|
2497
|
+
context.report({
|
|
2498
|
+
loc: {
|
|
2499
|
+
start: { line, column: first.length - first.trimStart().length },
|
|
2500
|
+
end: { line, column: first.length },
|
|
2501
|
+
},
|
|
2502
|
+
messageId: 'portal',
|
|
2503
|
+
data: { message: finding.message },
|
|
2504
|
+
});
|
|
2505
|
+
}
|
|
2506
|
+
},
|
|
2507
|
+
};
|
|
2508
|
+
},
|
|
2509
|
+
});
|
|
2510
|
+
|
|
2511
|
+
const portalNames = portalRule('portal-names');
|
|
2512
|
+
const unusedPortal = portalRule('unused-portal');
|
|
2513
|
+
|
|
2416
2514
|
/**
|
|
2417
2515
|
* The twin of `check`'s `text-null-value` (owner 2026-10-05): a `v-model` on
|
|
2418
2516
|
* BbTextInput / BbTextarea bound to a `<script setup>` ref typed `string`
|
|
@@ -2434,7 +2532,7 @@ const textNullValue = {
|
|
|
2434
2532
|
recommended: true,
|
|
2435
2533
|
},
|
|
2436
2534
|
messages: { stringRef: '{{message}}' },
|
|
2437
|
-
schema:
|
|
2535
|
+
schema: LIBRARY_ONLY_SCHEMA,
|
|
2438
2536
|
},
|
|
2439
2537
|
create(context) {
|
|
2440
2538
|
const sourceCode = context.sourceCode ?? context.getSourceCode();
|
|
@@ -2459,7 +2557,7 @@ const textNullValue = {
|
|
|
2459
2557
|
});
|
|
2460
2558
|
if (refs.size === 0) return {};
|
|
2461
2559
|
const aliases = libraryAliases(sourceCode.text);
|
|
2462
|
-
const own = localBbImports(sourceCode.text);
|
|
2560
|
+
const own = localBbImports(sourceCode.text, libraryOf(context));
|
|
2463
2561
|
const filename = context.filename ?? context.getFilename();
|
|
2464
2562
|
let stringControls;
|
|
2465
2563
|
const fixed = new Set();
|
|
@@ -2647,7 +2745,7 @@ const itemsProviderVisitor = (context, onProvider) => {
|
|
|
2647
2745
|
const services = sourceCode.parserServices;
|
|
2648
2746
|
if (!services?.defineTemplateBodyVisitor) return {};
|
|
2649
2747
|
const aliases = libraryAliases(sourceCode.text);
|
|
2650
|
-
const own = localBbImports(sourceCode.text);
|
|
2748
|
+
const own = localBbImports(sourceCode.text, libraryOf(context));
|
|
2651
2749
|
const bindings = topLevelBindings(sourceCode.ast.body);
|
|
2652
2750
|
const seen = new Set();
|
|
2653
2751
|
return services.defineTemplateBodyVisitor({
|
|
@@ -2705,7 +2803,7 @@ const itemsProviderContext = {
|
|
|
2705
2803
|
recommended: true,
|
|
2706
2804
|
},
|
|
2707
2805
|
messages: { positional: '{{message}}' },
|
|
2708
|
-
schema:
|
|
2806
|
+
schema: LIBRARY_ONLY_SCHEMA,
|
|
2709
2807
|
},
|
|
2710
2808
|
create(context) {
|
|
2711
2809
|
return itemsProviderVisitor(
|
|
@@ -2749,7 +2847,7 @@ const itemsProviderReason = {
|
|
|
2749
2847
|
recommended: true,
|
|
2750
2848
|
},
|
|
2751
2849
|
messages: { singleReason: '{{message}}' },
|
|
2752
|
-
schema:
|
|
2850
|
+
schema: LIBRARY_ONLY_SCHEMA,
|
|
2753
2851
|
},
|
|
2754
2852
|
create(context) {
|
|
2755
2853
|
return itemsProviderVisitor(context, ({ fn }) => {
|
|
@@ -2764,6 +2862,140 @@ const itemsProviderReason = {
|
|
|
2764
2862
|
},
|
|
2765
2863
|
};
|
|
2766
2864
|
|
|
2865
|
+
/**
|
|
2866
|
+
* Q60.24 — the twin of `check`'s `redundant-item-accessor` (a warning): an
|
|
2867
|
+
* accessor that names the field the option default already reads —
|
|
2868
|
+
* `item-text="label"` / `"text"`, `item-value="value"` (static or bound to a
|
|
2869
|
+
* string literal, kebab or camel) on BbSelect, BbSelectPopover, BbRadioGroup,
|
|
2870
|
+
* BbCheckboxGroup and BbSwitchGroup, and `itemText: 'label'` / `'text'` /
|
|
2871
|
+
* `itemValue: 'value'` in a BbDropdown / BbDropdownButton group. The fix
|
|
2872
|
+
* deletes it. Caveat: `item-text="text"` is NOT redundant when an item also
|
|
2873
|
+
* has `label` (the default would read `label`), so it is reported only when
|
|
2874
|
+
* every item is visible in the file and none has `label`; on items the file
|
|
2875
|
+
* cannot see only `item-text="label"` and `item-value="value"` are. A group
|
|
2876
|
+
* whose only mapper is the redundant one is left alone: without it the group
|
|
2877
|
+
* would turn hand-written.
|
|
2878
|
+
* @type {import('eslint').Rule.RuleModule}
|
|
2879
|
+
*/
|
|
2880
|
+
const noRedundantItemAccessor = {
|
|
2881
|
+
meta: {
|
|
2882
|
+
type: 'suggestion',
|
|
2883
|
+
fixable: 'code',
|
|
2884
|
+
docs: {
|
|
2885
|
+
description:
|
|
2886
|
+
'Remove an `item-text` / `item-value` (or a dropdown group\'s `itemText` / `itemValue`) that restates the default: options read their own `label`, else `text`, and their own `value`. `item-text="text"` is kept when an item also has `label`.',
|
|
2887
|
+
recommended: true,
|
|
2888
|
+
},
|
|
2889
|
+
messages: { redundant: '{{message}}' },
|
|
2890
|
+
schema: LIBRARY_ONLY_SCHEMA,
|
|
2891
|
+
},
|
|
2892
|
+
create(context) {
|
|
2893
|
+
const sourceCode = context.sourceCode ?? context.getSourceCode();
|
|
2894
|
+
if (!sourceCode.parserServices?.defineTemplateBodyVisitor) return {};
|
|
2895
|
+
return {
|
|
2896
|
+
'Program:exit'() {
|
|
2897
|
+
const text = sourceCode.text;
|
|
2898
|
+
const findings = redundantItemAccessorFindings(text, {
|
|
2899
|
+
arrays: scriptSetupArrayConsts(text),
|
|
2900
|
+
library: libraryOf(context),
|
|
2901
|
+
});
|
|
2902
|
+
// Each finding carries its fix as a text edit. Neighbouring
|
|
2903
|
+
// deletions touch (`item-text="label" item-value="value"`), and
|
|
2904
|
+
// ESLint drops a fix that touches another: the first deletion of a
|
|
2905
|
+
// run carries one fix for the whole run. A rewrite (non-empty
|
|
2906
|
+
// text) is never merged.
|
|
2907
|
+
const ranged = findings
|
|
2908
|
+
.filter((finding) => finding.range)
|
|
2909
|
+
.sort((a, b) => (a.edit?.range[0] ?? 0) - (b.edit?.range[0] ?? 0));
|
|
2910
|
+
const fixFor = new Map();
|
|
2911
|
+
let run = null;
|
|
2912
|
+
for (const finding of ranged) {
|
|
2913
|
+
const edit = finding.edit;
|
|
2914
|
+
if (!edit) continue;
|
|
2915
|
+
if (
|
|
2916
|
+
edit.text === '' &&
|
|
2917
|
+
run?.text === '' &&
|
|
2918
|
+
edit.range[0] <= run.range[1]
|
|
2919
|
+
) {
|
|
2920
|
+
run.range[1] = Math.max(run.range[1], edit.range[1]);
|
|
2921
|
+
continue;
|
|
2922
|
+
}
|
|
2923
|
+
run = { range: [...edit.range], text: edit.text };
|
|
2924
|
+
fixFor.set(finding, run);
|
|
2925
|
+
}
|
|
2926
|
+
for (const finding of ranged) {
|
|
2927
|
+
const own = fixFor.get(finding);
|
|
2928
|
+
context.report({
|
|
2929
|
+
loc: {
|
|
2930
|
+
start: sourceCode.getLocFromIndex(finding.range[0]),
|
|
2931
|
+
end: sourceCode.getLocFromIndex(finding.range[1]),
|
|
2932
|
+
},
|
|
2933
|
+
messageId: 'redundant',
|
|
2934
|
+
data: { message: finding.message },
|
|
2935
|
+
fix: own
|
|
2936
|
+
? (fixer) => fixer.replaceTextRange(own.range, own.text)
|
|
2937
|
+
: undefined,
|
|
2938
|
+
});
|
|
2939
|
+
}
|
|
2940
|
+
},
|
|
2941
|
+
};
|
|
2942
|
+
},
|
|
2943
|
+
};
|
|
2944
|
+
|
|
2945
|
+
/**
|
|
2946
|
+
* Q64.2–Q64.5 — the twin of `check`'s `renamed-item-field`: an item field
|
|
2947
|
+
* spelled the pre-beta.49 way in an `items` array the file spells (inline or a
|
|
2948
|
+
* `<script setup>` const): BbDropdown / BbDropdownButton / `v-bb-dropdown`
|
|
2949
|
+
* rows `key` → `value`, `text` → `label`, groups `key` → `id`; BbTabs /
|
|
2950
|
+
* BbTabsRoot items `key` → `value`; BbBreadcrumbs items `key` → `value`,
|
|
2951
|
+
* `text` → `label`. The fix renames the property (`{ key }` becomes
|
|
2952
|
+
* `{ value: key }`); an object that already has the new field or spreads
|
|
2953
|
+
* another is reported without one. A mapped group's rows (app data) are never
|
|
2954
|
+
* touched.
|
|
2955
|
+
* @type {import('eslint').Rule.RuleModule}
|
|
2956
|
+
*/
|
|
2957
|
+
const noRenamedItemField = {
|
|
2958
|
+
meta: {
|
|
2959
|
+
type: 'problem',
|
|
2960
|
+
fixable: 'code',
|
|
2961
|
+
docs: {
|
|
2962
|
+
description:
|
|
2963
|
+
'Rename an item field the library renamed in 3.0.0-beta.49: dropdown rows and breadcrumbs `{ key, text }` → `{ value, label }`, dropdown groups `key` → `id`, tabs `key` → `value`.',
|
|
2964
|
+
recommended: true,
|
|
2965
|
+
},
|
|
2966
|
+
messages: { renamed: '{{message}}' },
|
|
2967
|
+
schema: LIBRARY_ONLY_SCHEMA,
|
|
2968
|
+
},
|
|
2969
|
+
create(context) {
|
|
2970
|
+
const sourceCode = context.sourceCode ?? context.getSourceCode();
|
|
2971
|
+
if (!sourceCode.parserServices?.defineTemplateBodyVisitor) return {};
|
|
2972
|
+
return {
|
|
2973
|
+
'Program:exit'() {
|
|
2974
|
+
const text = sourceCode.text;
|
|
2975
|
+
const findings = renamedItemFieldFindings(text, {
|
|
2976
|
+
arrays: scriptSetupArrayConsts(text),
|
|
2977
|
+
library: libraryOf(context),
|
|
2978
|
+
});
|
|
2979
|
+
for (const finding of findings) {
|
|
2980
|
+
if (!finding.range) continue;
|
|
2981
|
+
const edit = finding.edit;
|
|
2982
|
+
context.report({
|
|
2983
|
+
loc: {
|
|
2984
|
+
start: sourceCode.getLocFromIndex(finding.range[0]),
|
|
2985
|
+
end: sourceCode.getLocFromIndex(finding.range[1]),
|
|
2986
|
+
},
|
|
2987
|
+
messageId: 'renamed',
|
|
2988
|
+
data: { message: finding.message },
|
|
2989
|
+
fix: edit
|
|
2990
|
+
? (fixer) => fixer.replaceTextRange(edit.range, edit.text)
|
|
2991
|
+
: undefined,
|
|
2992
|
+
});
|
|
2993
|
+
}
|
|
2994
|
+
},
|
|
2995
|
+
};
|
|
2996
|
+
},
|
|
2997
|
+
};
|
|
2998
|
+
|
|
2767
2999
|
const plugin = {
|
|
2768
3000
|
meta: { name: 'bitboss-ui', version: PACKAGE_VERSION },
|
|
2769
3001
|
rules: {
|
|
@@ -2783,10 +3015,14 @@ const plugin = {
|
|
|
2783
3015
|
'no-retired-entrypoint': noRetiredEntrypoint,
|
|
2784
3016
|
'no-reactive-v-model': noReactiveVModel,
|
|
2785
3017
|
'no-unimported-component': noUnimportedComponent,
|
|
3018
|
+
'portal-names': portalNames,
|
|
3019
|
+
'unused-portal': unusedPortal,
|
|
2786
3020
|
'text-null-value': textNullValue,
|
|
2787
3021
|
'form-model': formModel,
|
|
2788
3022
|
'items-provider-context': itemsProviderContext,
|
|
2789
3023
|
'items-provider-reason': itemsProviderReason,
|
|
3024
|
+
'no-redundant-item-accessor': noRedundantItemAccessor,
|
|
3025
|
+
'no-renamed-item-field': noRenamedItemField,
|
|
2790
3026
|
},
|
|
2791
3027
|
};
|
|
2792
3028
|
|
|
@@ -2873,6 +3109,10 @@ plugin.configs = {
|
|
|
2873
3109
|
'bitboss-ui/no-reactive-v-model': 'error',
|
|
2874
3110
|
// Q61.19: `error`, the tag renders nothing; the fix is one import.
|
|
2875
3111
|
'bitboss-ui/no-unimported-component': 'error',
|
|
3112
|
+
// Q63.8: `error`, a portal name nothing declares (or the other
|
|
3113
|
+
// family's) opens nothing; `warn` for a portal nothing opens.
|
|
3114
|
+
'bitboss-ui/portal-names': 'error',
|
|
3115
|
+
'bitboss-ui/unused-portal': 'warn',
|
|
2876
3116
|
// `error`: the ref's type is wrong the moment the field is
|
|
2877
3117
|
// emptied, and the fix (widening it) only makes the type true.
|
|
2878
3118
|
'bitboss-ui/text-null-value': 'error',
|
|
@@ -2885,6 +3125,12 @@ plugin.configs = {
|
|
|
2885
3125
|
// `warn`: a single-cause check can be deliberate, but it usually
|
|
2886
3126
|
// loses the selected labels on the causes it does not list.
|
|
2887
3127
|
'bitboss-ui/items-provider-reason': 'warn',
|
|
3128
|
+
// Q60.24: `warn`, the markup works either way; the fix deletes
|
|
3129
|
+
// an accessor that restates the default.
|
|
3130
|
+
'bitboss-ui/no-redundant-item-accessor': 'warn',
|
|
3131
|
+
// Q64.2–Q64.5: `error`, an item with the old field silently loses
|
|
3132
|
+
// its value, id or label; the fix is mechanical.
|
|
3133
|
+
'bitboss-ui/no-renamed-item-field': 'error',
|
|
2888
3134
|
},
|
|
2889
3135
|
},
|
|
2890
3136
|
],
|
|
@@ -2907,9 +3153,13 @@ export {
|
|
|
2907
3153
|
requireAccessibleName,
|
|
2908
3154
|
noReactiveVModel,
|
|
2909
3155
|
noUnimportedComponent,
|
|
3156
|
+
portalNames,
|
|
3157
|
+
unusedPortal,
|
|
2910
3158
|
textNullValue,
|
|
2911
3159
|
formModel,
|
|
2912
3160
|
itemsProviderContext,
|
|
2913
3161
|
itemsProviderReason,
|
|
3162
|
+
noRedundantItemAccessor,
|
|
3163
|
+
noRenamedItemField,
|
|
2914
3164
|
resolveOptionalTsParser,
|
|
2915
3165
|
};
|