bitboss-ui 3.0.0-beta.67 → 3.0.0-beta.69
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 +230 -91
- package/bin/bitboss-ui-mcp.mjs +368 -142
- package/bin/bitboss-ui.mjs +24 -2073
- package/bin/cli.mjs +1922 -0
- package/dist/ai/BbAccordion.md +1 -1
- package/dist/ai/BbAlert.md +16 -12
- package/dist/ai/BbAsterisk.md +1 -1
- package/dist/ai/BbAvatar.md +3 -3
- package/dist/ai/BbBadge.md +5 -5
- package/dist/ai/BbBadgeButton.md +1 -1
- package/dist/ai/BbBaseButton.md +1 -1
- package/dist/ai/BbBaseCheckboxIcon.md +4 -0
- package/dist/ai/BbBaseRadioIcon.md +7 -3
- package/dist/ai/BbBaseSwitchIcon.md +11 -2
- package/dist/ai/BbBreadcrumbs.md +3 -3
- package/dist/ai/BbButton.md +63 -10
- package/dist/ai/BbCalendar.md +15 -2
- package/dist/ai/BbCarousel.md +1093 -0
- package/dist/ai/BbCheckbox.md +28 -8
- package/dist/ai/BbCheckboxGroup.md +65 -32
- package/dist/ai/BbColorInput.md +18 -15
- package/dist/ai/BbColorPalette.md +9 -6
- package/dist/ai/BbConfigScope.md +218 -0
- package/dist/ai/BbConfirm.md +25 -22
- package/dist/ai/BbDatePicker.md +12 -6
- package/dist/ai/BbDatePickerInput.md +29 -18
- package/dist/ai/BbDialog.md +11 -10
- package/dist/ai/BbDropdown.md +36 -29
- package/dist/ai/BbDropdownButton.md +21 -21
- package/dist/ai/BbDropzone.md +5 -16
- package/dist/ai/BbForm.md +14 -8
- package/dist/ai/BbHost.md +20 -14
- package/dist/ai/BbHoverCard.md +2 -2
- package/dist/ai/BbIcon.md +3 -3
- package/dist/ai/BbIndicator.md +4 -4
- package/dist/ai/BbNumberInput.md +20 -16
- package/dist/ai/BbOffCanvas.md +15 -10
- package/dist/ai/BbPagination.md +15 -6
- package/dist/ai/BbPopover.md +16 -9
- package/dist/ai/BbRadio.md +30 -9
- package/dist/ai/BbRadioGroup.md +78 -35
- package/dist/ai/BbRating.md +13 -11
- package/dist/ai/BbSelect.md +84 -49
- package/dist/ai/BbSelectPopover.md +33 -31
- package/dist/ai/BbSlider.md +266 -66
- package/dist/ai/BbSpinner.md +3 -3
- package/dist/ai/BbSwitch.md +33 -9
- package/dist/ai/BbSwitchGroup.md +27 -18
- package/dist/ai/BbTable.md +28 -25
- package/dist/ai/BbTabs.md +29 -32
- package/dist/ai/BbTabsList.md +4 -4
- package/dist/ai/BbTabsRoot.md +2 -2
- package/dist/ai/BbTag.md +15 -14
- package/dist/ai/BbTextInput.md +32 -22
- package/dist/ai/BbTextarea.md +20 -18
- package/dist/ai/BbTimePicker.md +5 -5
- package/dist/ai/BbTimePickerInput.md +15 -14
- package/dist/ai/BbToast.md +72 -28
- package/dist/ai/BbTooltip.md +7 -6
- package/dist/ai/BbTree.md +1 -1
- package/dist/ai/ChipsBox.md +1 -1
- package/dist/ai/ClearableButton.md +1 -1
- package/dist/ai/CommonField.md +5 -5
- package/dist/ai/CommonFieldInput.md +3 -2
- package/dist/ai/CommonPopover.md +4 -4
- package/dist/ai/CommonTimeSelector.md +1 -1
- package/dist/ai/ErrorIcon.md +1 -1
- package/dist/ai/FlatListBox.md +5 -4
- package/dist/ai/GroupedListBox.md +5 -4
- package/dist/ai/ListBox.md +6 -5
- package/dist/ai/OptionsContainer.md +20 -4
- package/dist/ai/WarningIcon.md +1 -1
- package/dist/ai/changelog.json +1002 -39
- package/dist/ai/components.json +117 -246
- package/dist/ai/composables/useBbConfig.md +3 -3
- package/dist/ai/composables/useBbDialog.md +1 -1
- package/dist/ai/composables/useBbFormField.md +1 -1
- package/dist/ai/composables/useConfirm.md +1 -1
- package/dist/ai/composables/useToast.md +16 -16
- package/dist/ai/design-tokens.json +10 -5
- package/dist/ai/guides/agent-contract.md +15 -10
- package/dist/ai/guides/ai-router.md +15 -10
- package/dist/ai/guides/app-layout.md +1 -1
- package/dist/ai/guides/calendars-and-digits.md +123 -0
- package/dist/ai/guides/component-picker.md +1 -1
- package/dist/ai/guides/design-language.md +18 -14
- package/dist/ai/guides/design-tokens.md +85 -43
- package/dist/ai/guides/eslint-rules.md +21 -2
- package/dist/ai/guides/fetch-items-playbook.md +1 -1
- package/dist/ai/guides/icons-policy.md +1 -1
- package/dist/ai/guides/inertia-helpers.md +322 -41
- package/dist/ai/guides/inline-edit-playbook.md +1 -1
- package/dist/ai/guides/installation-and-plugin-setup.md +498 -189
- package/dist/ai/guides/migration/adoption-checklist.md +5 -5
- package/dist/ai/guides/migration/components/bb-alert.md +2 -2
- package/dist/ai/guides/migration/components/bb-badge.md +1 -1
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +15 -15
- package/dist/ai/guides/migration/components/bb-dialog.md +2 -2
- package/dist/ai/guides/migration/components/bb-dropdown.md +1 -1
- package/dist/ai/guides/migration/components/bb-host.md +10 -8
- package/dist/ai/guides/migration/components/bb-offcanvas.md +1 -1
- package/dist/ai/guides/migration/components/bb-rating.md +1 -1
- package/dist/ai/guides/migration/components/bb-select-popover.md +2 -2
- package/dist/ai/guides/migration/components/bb-select.md +3 -3
- package/dist/ai/guides/migration/components/bb-slider.md +17 -2
- package/dist/ai/guides/migration/components/bb-table.md +1 -0
- package/dist/ai/guides/migration/components/bb-tabs.md +33 -15
- package/dist/ai/guides/migration/components/bb-toast.md +10 -9
- package/dist/ai/guides/migration/components/use-confirm.md +1 -1
- package/dist/ai/guides/migration/v2-to-v3.md +345 -76
- package/dist/ai/guides/migration/v3-beta-css-classes.md +1 -0
- package/dist/ai/guides/migration/v3-beta-tooling.md +30 -13
- package/dist/ai/guides/options-items-playbook.md +5 -1
- package/dist/ai/guides/passthrough.md +150 -135
- package/dist/ai/guides/ssr-prefill.md +7 -1
- package/dist/ai/guides/typescript-generic-components.md +7 -7
- package/dist/ai/guides/validated-forms.md +14 -5
- package/dist/ai/guides/validation-libraries.md +4 -4
- package/dist/ai/helpers/inertia/manifest.json +23 -14
- package/dist/ai/helpers/inertia/useQuery.ts +74 -0
- package/dist/ai/helpers/inertia/useQueryObject.ts +33 -1
- package/dist/ai/helpers/inertia/useRouteQuery.ts +158 -30
- package/dist/ai/index.md +5 -3
- package/dist/ai/manifest/common.json +13 -15
- package/dist/ai/manifest/components/BbAccordion.tree.json +22 -4
- package/dist/ai/manifest/components/BbAlert.json +3 -2
- package/dist/ai/manifest/components/BbAlert.tree.json +26 -3
- package/dist/ai/manifest/components/BbAsterisk.tree.json +7 -1
- package/dist/ai/manifest/components/BbAvatar.json +2 -1
- package/dist/ai/manifest/components/BbAvatar.tree.json +16 -2
- package/dist/ai/manifest/components/BbBadge.json +4 -3
- package/dist/ai/manifest/components/BbBadge.tree.json +39 -4
- package/dist/ai/manifest/components/BbBadgeButton.tree.json +2 -2
- package/dist/ai/manifest/components/BbBaseButton.tree.json +16 -1
- package/dist/ai/manifest/components/BbBaseCheckboxIcon.tree.json +23 -2
- package/dist/ai/manifest/components/BbBaseRadioIcon.tree.json +21 -4
- package/dist/ai/manifest/components/BbBaseSwitchIcon.tree.json +26 -2
- package/dist/ai/manifest/components/BbBreadcrumbs.json +1 -1
- package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +34 -4
- package/dist/ai/manifest/components/BbButton.json +5 -4
- package/dist/ai/manifest/components/BbButton.tree.json +78 -5
- package/dist/ai/manifest/components/BbCalendar.json +2 -2
- package/dist/ai/manifest/components/BbCalendar.tree.json +81 -5
- package/dist/ai/manifest/components/BbCarousel.json +59 -0
- package/dist/ai/manifest/components/BbCarousel.tree.json +135 -0
- package/dist/ai/manifest/components/BbCheckbox.json +5 -4
- package/dist/ai/manifest/components/BbCheckbox.tree.json +31 -2
- package/dist/ai/manifest/components/BbCheckboxGroup.json +18 -15
- package/dist/ai/manifest/components/BbCheckboxGroup.removed.json +1 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +89 -5
- package/dist/ai/manifest/components/BbCollapsible.tree.json +11 -1
- package/dist/ai/manifest/components/BbColorInput.json +7 -6
- package/dist/ai/manifest/components/BbColorInput.tree.json +49 -4
- package/dist/ai/manifest/components/BbColorPalette.json +4 -3
- package/dist/ai/manifest/components/BbColorPalette.tree.json +36 -2
- package/dist/ai/manifest/components/BbConfigScope.json +23 -0
- package/dist/ai/manifest/components/BbConfirm.json +3 -2
- package/dist/ai/manifest/components/BbConfirm.tree.json +27 -3
- package/dist/ai/manifest/components/BbDatePicker.json +7 -6
- package/dist/ai/manifest/components/BbDatePicker.tree.json +42 -3
- package/dist/ai/manifest/components/BbDatePickerInput.json +7 -6
- package/dist/ai/manifest/components/BbDatePickerInput.tree.json +86 -5
- package/dist/ai/manifest/components/BbDialog.json +3 -2
- package/dist/ai/manifest/components/BbDialog.tree.json +28 -3
- package/dist/ai/manifest/components/BbDropdown.json +14 -10
- package/dist/ai/manifest/components/BbDropdown.tree.json +80 -3
- package/dist/ai/manifest/components/BbDropdownButton.json +14 -11
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +47 -4
- package/dist/ai/manifest/components/BbDropzone.json +2 -1
- package/dist/ai/manifest/components/BbDropzone.tree.json +27 -1
- 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 +3 -3
- package/dist/ai/manifest/components/BbHoverCard.tree.json +18 -1
- package/dist/ai/manifest/components/BbIcon.json +2 -1
- package/dist/ai/manifest/components/BbIcon.tree.json +7 -1
- package/dist/ai/manifest/components/BbIndicator.json +2 -1
- package/dist/ai/manifest/components/BbIndicator.tree.json +27 -1
- package/dist/ai/manifest/components/BbNumberInput.json +6 -5
- package/dist/ai/manifest/components/BbNumberInput.tree.json +40 -3
- package/dist/ai/manifest/components/BbOffCanvas.json +2 -1
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +55 -2
- package/dist/ai/manifest/components/BbPagination.json +1 -1
- package/dist/ai/manifest/components/BbPagination.tree.json +23 -3
- package/dist/ai/manifest/components/BbPopover.json +5 -4
- package/dist/ai/manifest/components/BbPopover.tree.json +20 -2
- package/dist/ai/manifest/components/BbProgress.tree.json +9 -1
- package/dist/ai/manifest/components/BbRadio.json +3 -2
- package/dist/ai/manifest/components/BbRadio.tree.json +30 -2
- package/dist/ai/manifest/components/BbRadioGroup.json +22 -19
- package/dist/ai/manifest/components/BbRadioGroup.removed.json +1 -1
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +88 -5
- package/dist/ai/manifest/components/BbRating.json +6 -5
- package/dist/ai/manifest/components/BbRating.removed.json +1 -0
- package/dist/ai/manifest/components/BbRating.tree.json +37 -2
- package/dist/ai/manifest/components/BbSelect.json +13 -11
- package/dist/ai/manifest/components/BbSelect.tree.json +70 -7
- package/dist/ai/manifest/components/BbSelectPopover.json +17 -13
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +94 -8
- package/dist/ai/manifest/components/BbSlider.json +30 -27
- package/dist/ai/manifest/components/BbSlider.removed.json +3 -0
- package/dist/ai/manifest/components/BbSlider.tree.json +48 -3
- package/dist/ai/manifest/components/BbSmoothHeight.tree.json +10 -1
- package/dist/ai/manifest/components/BbSpinner.tree.json +21 -2
- package/dist/ai/manifest/components/BbSwitch.json +3 -2
- package/dist/ai/manifest/components/BbSwitch.tree.json +31 -2
- package/dist/ai/manifest/components/BbSwitchGroup.json +9 -7
- package/dist/ai/manifest/components/BbSwitchGroup.removed.json +1 -1
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +65 -3
- package/dist/ai/manifest/components/BbTable.json +10 -9
- package/dist/ai/manifest/components/BbTable.tree.json +144 -5
- package/dist/ai/manifest/components/BbTabs.json +7 -6
- package/dist/ai/manifest/components/BbTabs.removed.json +5 -1
- package/dist/ai/manifest/components/BbTabs.tree.json +34 -3
- package/dist/ai/manifest/components/BbTabsList.json +4 -4
- package/dist/ai/manifest/components/BbTabsList.removed.json +5 -1
- package/dist/ai/manifest/components/BbTabsList.tree.json +24 -2
- package/dist/ai/manifest/components/BbTabsPanels.tree.json +16 -1
- package/dist/ai/manifest/components/BbTabsRoot.json +3 -3
- package/dist/ai/manifest/components/BbTag.json +7 -6
- package/dist/ai/manifest/components/BbTag.tree.json +49 -4
- package/dist/ai/manifest/components/BbTextInput.json +6 -5
- package/dist/ai/manifest/components/BbTextInput.tree.json +43 -3
- package/dist/ai/manifest/components/BbTextarea.json +7 -6
- package/dist/ai/manifest/components/BbTextarea.tree.json +46 -3
- package/dist/ai/manifest/components/BbTimePicker.json +7 -6
- package/dist/ai/manifest/components/BbTimePicker.tree.json +30 -3
- package/dist/ai/manifest/components/BbTimePickerInput.json +7 -6
- package/dist/ai/manifest/components/BbTimePickerInput.tree.json +58 -6
- package/dist/ai/manifest/components/BbToast.json +3 -2
- package/dist/ai/manifest/components/BbToast.tree.json +46 -2
- package/dist/ai/manifest/components/BbTooltip.json +4 -3
- package/dist/ai/manifest/components/BbTooltip.tree.json +17 -1
- package/dist/ai/manifest/components/BbTree.tree.json +14 -1
- package/dist/ai/manifest/components/ChipsBox.tree.json +1 -1
- package/dist/ai/manifest/components/ClearableButton.tree.json +8 -2
- package/dist/ai/manifest/components/CommonField.json +2 -2
- package/dist/ai/manifest/components/CommonField.tree.json +68 -1
- package/dist/ai/manifest/components/CommonFieldInput.json +2 -2
- package/dist/ai/manifest/components/CommonFieldInput.tree.json +38 -6
- package/dist/ai/manifest/components/CommonPopover.json +7 -5
- package/dist/ai/manifest/components/CommonPopover.tree.json +11 -1
- package/dist/ai/manifest/components/CommonTimeSelector.tree.json +18 -2
- package/dist/ai/manifest/components/ErrorIcon.tree.json +8 -2
- package/dist/ai/manifest/components/FlatListBox.json +1 -1
- package/dist/ai/manifest/components/FlatListBox.tree.json +4 -3
- package/dist/ai/manifest/components/GroupedListBox.json +1 -1
- package/dist/ai/manifest/components/GroupedListBox.tree.json +4 -3
- package/dist/ai/manifest/components/ListBox.json +1 -1
- package/dist/ai/manifest/components/ListBox.tree.json +2 -2
- package/dist/ai/manifest/components/OptionsContainer.json +4 -3
- package/dist/ai/manifest/components/OptionsContainer.tree.json +16 -1
- package/dist/ai/manifest/components/WarningIcon.tree.json +8 -2
- package/dist/ai/manifest/index.json +6 -5
- package/dist/ai/manifest/meta.json +23 -153
- package/dist/ai/manifest/types.advanced.json +78 -77
- package/dist/ai/manifest/types.api.json +29 -19
- package/dist/ai/manifest/types.wrapper.json +115 -112
- package/dist/ai/recipes/inertia/approvals-inbox.md +10 -10
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +24 -20
- package/dist/ai/recipes/inertia/onboarding.md +10 -10
- package/dist/ai/recipes/inertia/ownership-atlas.md +8 -8
- package/dist/ai/recipes/inertia/record-form.md +16 -16
- package/dist/ai/recipes/inertia/records-workspace.md +13 -12
- package/dist/ai/recipes/inertia/settings-workspace.md +16 -15
- package/dist/ai/recipes/inertia/upload-center.md +13 -13
- package/dist/ai/recipes/inertia/wizard-form.md +16 -16
- package/dist/ai/recipes/nuxt/approvals-inbox.md +13 -13
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +26 -22
- package/dist/ai/recipes/nuxt/onboarding.md +10 -10
- package/dist/ai/recipes/nuxt/ownership-atlas.md +12 -12
- package/dist/ai/recipes/nuxt/record-form.md +16 -16
- package/dist/ai/recipes/nuxt/records-workspace.md +16 -15
- package/dist/ai/recipes/nuxt/settings-workspace.md +15 -14
- package/dist/ai/recipes/nuxt/upload-center.md +15 -15
- package/dist/ai/recipes/nuxt/wizard-form.md +17 -17
- package/dist/ai/recipes/vue/approvals-inbox.md +15 -13
- package/dist/ai/recipes/vue/inline-edit-workspace.md +26 -22
- package/dist/ai/recipes/vue/onboarding.md +16 -11
- package/dist/ai/recipes/vue/ownership-atlas.md +12 -12
- package/dist/ai/recipes/vue/record-form.md +18 -16
- package/dist/ai/recipes/vue/records-workspace.md +18 -15
- package/dist/ai/recipes/vue/settings-workspace.md +18 -15
- package/dist/ai/recipes/vue/upload-center.md +15 -15
- package/dist/ai/recipes/vue/wizard-form.md +18 -16
- package/dist/ai/source/BbAccordion.md +11 -14
- package/dist/ai/source/BbAlert.md +103 -91
- package/dist/ai/source/BbAsterisk.md +6 -7
- package/dist/ai/source/BbAvatar.md +42 -41
- package/dist/ai/source/BbBadge.md +100 -89
- package/dist/ai/source/BbBadgeButton.md +80 -76
- package/dist/ai/source/BbBaseButton.md +284 -276
- package/dist/ai/source/BbBaseCheckboxIcon.md +76 -68
- package/dist/ai/source/BbBaseRadioIcon.md +80 -68
- package/dist/ai/source/BbBaseSwitchIcon.md +98 -74
- package/dist/ai/source/BbBreadcrumbs.md +76 -63
- package/dist/ai/source/BbButton.md +101 -77
- package/dist/ai/source/BbCalendar.md +166 -176
- package/dist/ai/source/BbCarousel.md +2897 -0
- package/dist/ai/source/BbCheckbox.md +230 -192
- package/dist/ai/source/BbCheckboxGroup.md +172 -79
- package/dist/ai/source/BbCollapsible.md +7 -10
- package/dist/ai/source/BbColorInput.md +256 -243
- package/dist/ai/source/BbColorPalette.md +239 -160
- package/dist/ai/source/BbConfigScope.md +123 -0
- package/dist/ai/source/BbConfirm.md +38 -32
- package/dist/ai/source/BbConfirmPortal.md +30 -26
- package/dist/ai/source/BbDatePicker.md +218 -187
- package/dist/ai/source/BbDatePickerInput.md +789 -428
- package/dist/ai/source/BbDialog.md +207 -191
- package/dist/ai/source/BbDropdown.md +326 -234
- package/dist/ai/source/BbDropdownButton.md +115 -68
- package/dist/ai/source/BbDropdownGroup.md +271 -216
- package/dist/ai/source/BbDropzone.md +101 -100
- package/dist/ai/source/BbForm.md +29 -29
- package/dist/ai/source/BbHost.md +6 -6
- package/dist/ai/source/BbHoverCard.md +34 -20
- package/dist/ai/source/BbHoverCardPortal.md +9 -12
- package/dist/ai/source/BbIcon.md +32 -30
- package/dist/ai/source/BbIndicator.md +76 -70
- package/dist/ai/source/BbNumberInput.md +334 -313
- package/dist/ai/source/BbOffCanvas.md +245 -216
- package/dist/ai/source/BbPagination.md +144 -116
- package/dist/ai/source/BbPopover.md +49 -31
- package/dist/ai/source/BbPopoverPortal.md +11 -14
- package/dist/ai/source/BbProgress.md +20 -12
- package/dist/ai/source/BbRadio.md +205 -181
- package/dist/ai/source/BbRadioGroup.md +461 -364
- package/dist/ai/source/BbRating.md +212 -177
- package/dist/ai/source/BbSelect.md +514 -482
- package/dist/ai/source/BbSelectPopover.md +497 -413
- package/dist/ai/source/BbSlider.md +1208 -777
- package/dist/ai/source/BbSmoothHeight.md +8 -9
- package/dist/ai/source/BbSpinner.md +20 -20
- package/dist/ai/source/BbSwitch.md +25 -13
- package/dist/ai/source/BbSwitchGroup.md +115 -34
- package/dist/ai/source/BbTable.md +577 -531
- package/dist/ai/source/BbTabs.md +134 -116
- package/dist/ai/source/BbTabsList.md +164 -136
- package/dist/ai/source/BbTabsPanels.md +128 -113
- package/dist/ai/source/BbTabsRoot.md +125 -110
- package/dist/ai/source/BbTag.md +286 -281
- package/dist/ai/source/BbTextInput.md +59 -50
- package/dist/ai/source/BbTextarea.md +85 -71
- package/dist/ai/source/BbTimePicker.md +145 -126
- package/dist/ai/source/BbTimePickerInput.md +383 -316
- package/dist/ai/source/BbToast.md +97 -44
- package/dist/ai/source/BbToastPortal.md +56 -36
- package/dist/ai/source/BbTooltip.md +155 -129
- package/dist/ai/source/BbTree.md +16 -12
- package/dist/ai/source/CommonField.md +94 -59
- package/dist/ai/source/CommonFieldInput.md +18 -13
- package/dist/ai/source/CommonPopover.md +28 -9
- package/dist/ai/source/CommonTimeSelector.md +41 -8
- package/dist/ai/source/FlatListBox.md +16 -5
- package/dist/ai/source/GroupedListBox.md +18 -6
- package/dist/ai/source/ListBox.md +2 -1
- package/dist/ai/source/OptionsContainer.md +82 -4
- package/dist/assets/svgs/arrow_up.svg_raw.js +3 -0
- package/dist/assets/svgs/caret_down.svg_raw.js +3 -0
- package/dist/assets/svgs/chevron_left.svg_raw.js +3 -0
- package/dist/assets/svgs/chevron_left_small.svg_raw.js +3 -0
- package/dist/assets/svgs/chevron_right_small.svg_raw.js +3 -0
- package/dist/assets/svgs/close.svg_raw.js +3 -0
- package/dist/assets/svgs/eyedropper.svg_raw.js +3 -0
- package/dist/assets/svgs/move.svg_raw.js +3 -0
- package/dist/assets/svgs/pause.svg_raw.js +3 -0
- package/dist/assets/svgs/play.svg_raw.js +3 -0
- package/dist/assets/svgs/star.svg_raw.js +1 -1
- package/dist/assets/svgs/x.svg_raw.js +3 -0
- package/dist/calendar-runtime.js +112 -0
- package/dist/calendars.js +83 -0
- package/dist/components/BbAccordion/BbAccordion.vue.d.ts +2 -2
- package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/BbAccordion/ptKeys.generated.d.ts +44 -0
- package/dist/components/BbAccordion/types.d.ts +5 -6
- package/dist/components/BbAlert/BbAlert.vue.d.ts +5 -4
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +52 -48
- package/dist/components/BbAlert/ptKeys.generated.d.ts +104 -0
- package/dist/components/BbAlert/types.d.ts +16 -9
- package/dist/components/BbAsterisk/BbAsterisk.vue.d.ts +2 -2
- package/dist/components/BbAsterisk/ptKeys.generated.d.ts +8 -0
- package/dist/components/BbAsterisk/types.d.ts +4 -5
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +3 -3
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +54 -53
- package/dist/components/BbAvatar/ptKeys.generated.d.ts +12 -0
- package/dist/components/BbAvatar/types.d.ts +5 -6
- package/dist/components/BbBadge/BbBadge.vue.d.ts +4 -4
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +75 -71
- package/dist/components/BbBadge/BbBadgeButton.vue.d.ts +2 -2
- package/dist/components/BbBadge/badgeButtonContext.d.ts +5 -5
- package/dist/components/BbBadge/ptKeys.generated.d.ts +160 -0
- package/dist/components/BbBadge/types.d.ts +17 -10
- package/dist/components/BbBaseButton/BbBaseButton.vue.d.ts +2 -2
- package/dist/components/BbBaseButton/ptKeys.generated.d.ts +20 -0
- package/dist/components/BbBaseButton/types.d.ts +13 -6
- package/dist/components/BbBaseButton/useLinkState.d.ts +1 -1
- package/dist/components/BbBaseCheckboxIcon/BbBaseCheckboxIcon.vue.d.ts +2 -2
- package/dist/components/BbBaseCheckboxIcon/BbBaseCheckboxIcon.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/BbBaseCheckboxIcon/ptKeys.generated.d.ts +40 -0
- package/dist/components/BbBaseCheckboxIcon/types.d.ts +12 -6
- package/dist/components/BbBaseRadioIcon/BbBaseRadioIcon.vue.d.ts +2 -2
- package/dist/components/BbBaseRadioIcon/BbBaseRadioIcon.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/BbBaseRadioIcon/ptKeys.generated.d.ts +36 -0
- package/dist/components/BbBaseRadioIcon/types.d.ts +12 -6
- package/dist/components/BbBaseSwitchIcon/BbBaseSwitchIcon.vue.d.ts +2 -2
- package/dist/components/BbBaseSwitchIcon/BbBaseSwitchIcon.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/BbBaseSwitchIcon/ptKeys.generated.d.ts +40 -0
- package/dist/components/BbBaseSwitchIcon/types.d.ts +12 -6
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue.d.ts +2 -2
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/BbBreadcrumbs/ptKeys.generated.d.ts +48 -0
- package/dist/components/BbBreadcrumbs/types.d.ts +15 -8
- package/dist/components/BbButton/BbButton.vue.d.ts +6 -4
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +130 -118
- package/dist/components/BbButton/ptKeys.generated.d.ts +196 -0
- package/dist/components/BbButton/toggleRoving.js +29 -28
- package/dist/components/BbButton/types.d.ts +29 -21
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +9 -71
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +327 -340
- package/dist/components/BbCalendar/CalendarMonthPanel.vue_vue_type_script_setup_true_lang.js +67 -65
- package/dist/components/BbCalendar/CalendarYearPanel.vue_vue_type_script_setup_true_lang.js +76 -67
- package/dist/components/BbCalendar/calendarHost.d.ts +1 -1
- package/dist/components/BbCalendar/calendarMath.d.ts +102 -0
- package/dist/components/BbCalendar/calendarMath.js +124 -0
- package/dist/components/BbCalendar/ptKeys.generated.d.ts +248 -0
- package/dist/components/BbCalendar/types.d.ts +15 -9
- package/dist/components/BbCalendar/useCalendarContext.d.ts +43 -17
- package/dist/components/BbCalendar/useCalendarGrid.d.ts +71 -4
- package/dist/components/BbCalendar/useCalendarGrid.js +264 -209
- package/dist/components/BbCalendar/useDayGrid.d.ts +26 -8
- package/dist/components/BbCalendar/useDayGrid.js +178 -172
- package/dist/components/BbCalendar/useDayjsLocale.d.ts +18 -3
- package/dist/components/BbCalendar/useDayjsLocale.js +28 -28
- package/dist/components/BbCalendar/useToday.d.ts +5 -3
- package/dist/components/BbCalendar/useToday.js +22 -12
- package/dist/components/BbCarousel/BbCarousel.vue.d.ts +51 -0
- package/dist/components/BbCarousel/BbCarousel.vue.js +5 -0
- package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +818 -0
- package/dist/components/BbCarousel/ptKeys.generated.d.ts +60 -0
- package/dist/components/BbCarousel/types.d.ts +213 -0
- package/dist/components/BbCarousel/types.js +27 -0
- package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +8 -6
- package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +123 -111
- package/dist/components/BbCheckbox/ptKeys.generated.d.ts +220 -0
- package/dist/components/BbCheckbox/types.d.ts +30 -14
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +167 -306
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +222 -189
- package/dist/components/BbCheckboxGroup/ptKeys.generated.d.ts +492 -0
- package/dist/components/BbCheckboxGroup/types.d.ts +42 -28
- package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +4 -4
- package/dist/components/BbCollapsible/BbCollapsible.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbCollapsible/ptKeys.generated.d.ts +20 -0
- package/dist/components/BbCollapsible/types.d.ts +5 -6
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +16 -14
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +206 -195
- package/dist/components/BbColorInput/ptKeys.generated.d.ts +656 -0
- package/dist/components/BbColorInput/types.d.ts +30 -20
- package/dist/components/BbColorInput/types.js +1 -1
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +4 -4
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +331 -296
- package/dist/components/BbColorPalette/ptKeys.generated.d.ts +40 -0
- package/dist/components/BbColorPalette/types.d.ts +17 -10
- package/dist/components/BbConfigScope/BbConfigScope.vue.d.ts +12 -0
- package/dist/components/BbConfigScope/BbConfigScope.vue.js +4 -0
- package/dist/components/BbConfigScope/BbConfigScope.vue_vue_type_script_setup_true_lang.js +37 -0
- package/dist/components/BbConfigScope/types.d.ts +20 -0
- package/dist/components/BbConfirm/BbConfirm.vue.d.ts +1 -1
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +27 -27
- package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +1 -1
- package/dist/components/BbConfirm/confirmEntry.d.ts +2 -2
- package/dist/components/BbConfirm/ptKeys.generated.d.ts +184 -0
- package/dist/components/BbConfirm/types.d.ts +14 -7
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +16 -97
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +201 -197
- package/dist/components/BbDatePicker/ptKeys.generated.d.ts +324 -0
- package/dist/components/BbDatePicker/types.d.ts +22 -15
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +20 -309
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +793 -660
- package/dist/components/BbDatePickerInput/calendarFields.d.ts +91 -0
- package/dist/components/BbDatePickerInput/calendarFields.js +188 -0
- package/dist/components/BbDatePickerInput/dateFieldLayout.d.ts +6 -0
- package/dist/components/BbDatePickerInput/dateFieldLayout.js +11 -1
- package/dist/components/BbDatePickerInput/ptKeys.generated.d.ts +1156 -0
- package/dist/components/BbDatePickerInput/types.d.ts +36 -26
- package/dist/components/BbDatePickerInput/types.js +1 -1
- package/dist/components/BbDialog/BbDialog.vue.d.ts +9 -8
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +211 -204
- package/dist/components/BbDialog/ptKeys.generated.d.ts +100 -0
- package/dist/components/BbDialog/types.d.ts +26 -20
- package/dist/components/BbDropdown/AdaptiveDropdown.vue.d.ts +1 -1
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +7 -6
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +399 -377
- package/dist/components/BbDropdown/BbDropdownGroup.vue.d.ts +2 -2
- package/dist/components/BbDropdown/BbDropdownList.vue.d.ts +1 -1
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +297 -292
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +97 -97
- package/dist/components/BbDropdown/DropdownRow.vue.d.ts +3 -3
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/BbDropdown/normalizeGroups.d.ts +2 -2
- package/dist/components/BbDropdown/pointerTrail.d.ts +5 -0
- package/dist/components/BbDropdown/pointerTrail.js +26 -0
- package/dist/components/BbDropdown/ptKeys.generated.d.ts +228 -0
- package/dist/components/BbDropdown/types.d.ts +65 -48
- package/dist/components/BbDropdown/types.js +11 -2
- package/dist/components/BbDropdown/useDropdownContext.d.ts +3 -3
- package/dist/components/BbDropdown/useDropdownGroupRegistry.d.ts +5 -5
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +7 -6
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +168 -144
- package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +616 -0
- package/dist/components/BbDropdownButton/types.d.ts +47 -23
- package/dist/components/BbDropdownButton/types.js +7 -3
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +7 -26
- package/dist/components/BbDropzone/BbDropzone.vue_vue_type_script_setup_true_lang.js +14 -14
- package/dist/components/BbDropzone/ptKeys.generated.d.ts +76 -0
- package/dist/components/BbDropzone/types.d.ts +15 -8
- package/dist/components/BbForm/BbForm.vue.d.ts +5 -5
- package/dist/components/BbForm/BbFormCustomField.d.ts +1 -1
- package/dist/components/BbForm/BbFormCustomField.js +2 -2
- package/dist/components/BbForm/bindFormField.d.ts +4 -4
- package/dist/components/BbForm/bindFormField.js +66 -66
- package/dist/components/BbForm/formFields.d.ts +5 -5
- package/dist/components/BbForm/formSchema.d.ts +4 -4
- package/dist/components/BbHost/BbHost.vue.d.ts +1 -1
- package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbHost/BbHostOpening.d.ts +4 -4
- package/dist/components/BbHost/types.d.ts +3 -3
- package/dist/components/BbHoverCard/BbHoverCard.vue.d.ts +4 -4
- package/dist/components/BbHoverCard/BbHoverCard.vue_vue_type_script_setup_true_lang.js +169 -162
- package/dist/components/BbHoverCard/BbHoverCardPortal.vue.d.ts +1 -1
- package/dist/components/BbHoverCard/ptKeys.generated.d.ts +44 -0
- package/dist/components/BbHoverCard/types.d.ts +8 -9
- package/dist/components/BbIcon/BbIcon.vue.d.ts +3 -3
- package/dist/components/BbIcon/BbIcon.vue_vue_type_script_setup_true_lang.js +41 -40
- package/dist/components/BbIcon/ptKeys.generated.d.ts +8 -0
- package/dist/components/BbIcon/types.d.ts +7 -8
- package/dist/components/BbIndicator/BbIndicator.vue.d.ts +4 -4
- package/dist/components/BbIndicator/BbIndicator.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbIndicator/ptKeys.generated.d.ts +52 -0
- package/dist/components/BbIndicator/types.d.ts +15 -8
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +15 -12
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +327 -311
- package/dist/components/BbNumberInput/numberDisplay.d.ts +10 -11
- package/dist/components/BbNumberInput/ptKeys.generated.d.ts +476 -0
- package/dist/components/BbNumberInput/types.d.ts +33 -22
- package/dist/components/BbNumberInput/types.js +1 -1
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +9 -9
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +408 -406
- package/dist/components/BbOffCanvas/ptKeys.generated.d.ts +88 -0
- package/dist/components/BbOffCanvas/sheetAttrs.d.ts +1 -1
- package/dist/components/BbOffCanvas/sheetSnap.d.ts +2 -2
- package/dist/components/BbOffCanvas/types.d.ts +30 -23
- package/dist/components/BbOffCanvas/useOffCanvasStack.d.ts +1 -1
- package/dist/components/BbPagination/BbPagination.vue.d.ts +3 -3
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +110 -114
- package/dist/components/BbPagination/paginationFit.d.ts +1 -1
- package/dist/components/BbPagination/ptKeys.generated.d.ts +48 -0
- package/dist/components/BbPagination/types.d.ts +16 -8
- package/dist/components/BbPopover/BbPopover.vue.d.ts +4 -4
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +121 -115
- package/dist/components/BbPopover/BbPopoverPortal.vue.d.ts +1 -1
- package/dist/components/BbPopover/ptKeys.generated.d.ts +52 -0
- package/dist/components/BbPopover/types.d.ts +10 -11
- package/dist/components/BbProgress/BbProgress.vue.d.ts +2 -2
- package/dist/components/BbProgress/BbProgress.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbProgress/ptKeys.generated.d.ts +20 -0
- package/dist/components/BbProgress/types.d.ts +4 -5
- package/dist/components/BbRadio/BbRadio.vue.d.ts +8 -6
- package/dist/components/BbRadio/BbRadio.vue_vue_type_script_setup_true_lang.js +134 -122
- package/dist/components/BbRadio/ptKeys.generated.d.ts +196 -0
- package/dist/components/BbRadio/types.d.ts +24 -13
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +152 -248
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +248 -215
- package/dist/components/BbRadioGroup/ptKeys.generated.d.ts +492 -0
- package/dist/components/BbRadioGroup/types.d.ts +41 -24
- package/dist/components/BbRating/BbRating.vue.d.ts +9 -7
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +153 -142
- package/dist/components/BbRating/ptKeys.generated.d.ts +152 -0
- package/dist/components/BbRating/types.d.ts +31 -20
- package/dist/components/BbRating/types.js +1 -1
- package/dist/components/BbSelect/BbSelect.vue.d.ts +269 -483
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +362 -341
- package/dist/components/BbSelect/ptKeys.generated.d.ts +960 -0
- package/dist/components/BbSelect/types.d.ts +50 -37
- package/dist/components/BbSelect/types.js +4 -2
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +23 -50
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +750 -730
- package/dist/components/BbSelectPopover/knownItems.d.ts +4 -4
- package/dist/components/BbSelectPopover/ptKeys.generated.d.ts +148 -0
- package/dist/components/BbSelectPopover/reclickClears.d.ts +17 -0
- package/dist/components/BbSelectPopover/reclickClears.js +4 -0
- package/dist/components/BbSelectPopover/sheetChipAttrs.d.ts +1 -1
- package/dist/components/BbSelectPopover/types.d.ts +44 -31
- package/dist/components/BbSelectPopover/types.js +3 -1
- package/dist/components/BbSlider/BbSlider.vue.d.ts +27 -86
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +414 -331
- package/dist/components/BbSlider/ptKeys.generated.d.ts +316 -0
- package/dist/components/BbSlider/types.d.ts +162 -61
- package/dist/components/BbSlider/types.js +2 -0
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +3 -3
- package/dist/components/BbSmoothHeight/ptKeys.generated.d.ts +8 -0
- package/dist/components/BbSmoothHeight/types.d.ts +5 -6
- package/dist/components/BbSpinner/BbSpinner.vue.d.ts +3 -3
- package/dist/components/BbSpinner/ptKeys.generated.d.ts +8 -0
- package/dist/components/BbSpinner/types.d.ts +5 -6
- package/dist/components/BbSwitch/BbSwitch.vue.d.ts +6 -6
- package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +30 -30
- package/dist/components/BbSwitch/ptKeys.generated.d.ts +220 -0
- package/dist/components/BbSwitch/types.d.ts +15 -5
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +38 -116
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +13 -10
- package/dist/components/BbSwitchGroup/ptKeys.generated.d.ts +332 -0
- package/dist/components/BbSwitchGroup/types.d.ts +14 -5
- package/dist/components/BbTable/BbTable.vue.d.ts +13 -13
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1360 -1366
- package/dist/components/BbTable/BbTableDataRow.d.ts +4 -4
- package/dist/components/BbTable/BbTableEdgeRow.d.ts +5 -5
- package/dist/components/BbTable/BbTableExpandRow.d.ts +2 -2
- package/dist/components/BbTable/BbTableSelectToggle.d.ts +3 -3
- package/dist/components/BbTable/estimatedFloors.golden.d.ts +1 -1
- package/dist/components/BbTable/gridWidgets.d.ts +1 -1
- package/dist/components/BbTable/measuredFloors.d.ts +1 -1
- package/dist/components/BbTable/measuredFloorsTestKit.d.ts +1 -1
- package/dist/components/BbTable/ptKeys.generated.d.ts +280 -0
- package/dist/components/BbTable/types.d.ts +30 -22
- package/dist/components/BbTable/utils.d.ts +5 -5
- package/dist/components/BbTable/utils.js +89 -88
- package/dist/components/BbTabs/BbTabs.vue.d.ts +41 -69
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +21 -15
- package/dist/components/BbTabs/BbTabsList.vue.d.ts +3 -3
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +121 -122
- package/dist/components/BbTabs/BbTabsPanels.vue.d.ts +3 -3
- package/dist/components/BbTabs/BbTabsPanels.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbTabs/BbTabsRoot.vue.d.ts +2 -2
- package/dist/components/BbTabs/ptKeys.generated.d.ts +226 -0
- package/dist/components/BbTabs/types.d.ts +41 -23
- package/dist/components/BbTag/BbTag.vue.d.ts +18 -16
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +248 -238
- package/dist/components/BbTag/ptKeys.generated.d.ts +540 -0
- package/dist/components/BbTag/types.d.ts +28 -18
- package/dist/components/BbTag/types.js +1 -1
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +19 -171
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +176 -165
- package/dist/components/BbTextInput/ptKeys.generated.d.ts +608 -0
- package/dist/components/BbTextInput/types.d.ts +30 -21
- package/dist/components/BbTextInput/types.js +1 -1
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +19 -171
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +206 -196
- package/dist/components/BbTextarea/ptKeys.generated.d.ts +608 -0
- package/dist/components/BbTextarea/types.d.ts +29 -20
- package/dist/components/BbTextarea/types.js +1 -1
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +13 -33
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +137 -136
- package/dist/components/BbTimePicker/ptKeys.generated.d.ts +80 -0
- package/dist/components/BbTimePicker/types.d.ts +19 -13
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +18 -201
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +421 -397
- package/dist/components/BbTimePickerInput/ptKeys.generated.d.ts +732 -0
- package/dist/components/BbTimePickerInput/types.d.ts +35 -23
- package/dist/components/BbTimePickerInput/types.js +1 -1
- package/dist/components/BbToast/BbToast.vue.d.ts +2 -2
- package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +60 -53
- package/dist/components/BbToast/BbToastMessage.vue.d.ts +2 -2
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +75 -80
- package/dist/components/BbToast/BbToastPortal.vue.d.ts +1 -1
- package/dist/components/BbToast/BbToastRegion.vue.d.ts +5 -3
- package/dist/components/BbToast/ptKeys.generated.d.ts +232 -0
- package/dist/components/BbToast/types.d.ts +22 -13
- package/dist/components/BbTooltip/BbTooltip.vue.d.ts +6 -6
- package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +99 -88
- package/dist/components/BbTooltip/ptKeys.generated.d.ts +36 -0
- package/dist/components/BbTooltip/tooltipWarmup.d.ts +2 -2
- package/dist/components/BbTooltip/types.d.ts +16 -9
- package/dist/components/BbTree/BbTree.vue.d.ts +7 -11
- package/dist/components/BbTree/BbTreeLevel.vue.d.ts +1 -1
- package/dist/components/BbTree/context.d.ts +2 -2
- package/dist/components/BbTree/ptKeys.generated.d.ts +16 -0
- package/dist/components/BbTree/types.d.ts +5 -6
- package/dist/components/ChipsBox/ChipsBox.vue.d.ts +2 -2
- package/dist/components/ChipsBox/types.d.ts +2 -2
- package/dist/components/ClearableButton/ClearableButton.vue.d.ts +2 -2
- package/dist/components/CloseIcon/CloseButton.vue.d.ts +2 -2
- package/dist/components/CloseIcon/CloseButton.vue.js +1 -1
- package/dist/components/CloseIcon/CloseButton.vue_vue_type_script_setup_true_lang.js +11 -16
- package/dist/components/CommaBox/CommaBox.vue.d.ts +2 -2
- package/dist/components/CommaBox/types.d.ts +2 -2
- package/dist/components/CommonField/CommonField.vue.d.ts +7 -7
- package/dist/components/CommonField/CommonField.vue_vue_type_script_setup_true_lang.js +9 -4
- package/dist/components/CommonField/messageHeightMatrix.d.ts +1 -1
- package/dist/components/CommonField/types.d.ts +18 -14
- package/dist/components/CommonFieldInput/CommonFieldInput.vue.d.ts +3 -3
- package/dist/components/CommonFieldInput/types.d.ts +4 -4
- package/dist/components/CommonPopover/CommonPopover.vue.d.ts +4 -4
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +56 -55
- package/dist/components/CommonPopover/resolvePlacement.d.ts +9 -0
- package/dist/components/CommonPopover/resolvePlacement.js +9 -0
- package/dist/components/CommonPopover/types.d.ts +5 -5
- package/dist/components/CommonTimeSelector/CommonTimeSelector.vue.d.ts +2 -2
- package/dist/components/CommonTimeSelector/CommonTimeSelector.vue_vue_type_script_setup_true_lang.js +110 -99
- package/dist/components/CommonTimeSelector/useMeridiem.d.ts +1 -1
- package/dist/components/ErrorIcon/ErrorIcon.vue.d.ts +2 -2
- package/dist/components/FlatListBox/FlatListBox.vue.d.ts +2 -2
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/components/FlatListBox/types.d.ts +3 -3
- package/dist/components/GroupedListBox/GroupedListBox.vue.d.ts +2 -2
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/components/GroupedListBox/types.d.ts +3 -3
- package/dist/components/ListBox/ListBox.vue.d.ts +2 -2
- package/dist/components/ListBox/types.d.ts +3 -3
- package/dist/components/OptionsContainer/OptionsContainer.vue.d.ts +1 -1
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +101 -69
- package/dist/components/OptionsContainer/types.d.ts +8 -3
- package/dist/components/Transitions/Slide.vue.d.ts +5 -3
- package/dist/components/Transitions/Slide.vue.js +1 -1
- package/dist/components/WarningIcon/WarningIcon.vue.d.ts +2 -2
- package/dist/composables/autoHost.d.ts +1 -1
- package/dist/composables/formSubmitLock.d.ts +5 -5
- package/dist/composables/hostOpenings.d.ts +6 -6
- package/dist/composables/hostRegistry.d.ts +2 -2
- package/dist/composables/overlayRegistry.d.ts +25 -25
- package/dist/composables/overlayRegistry.js +13 -7
- package/dist/composables/useBaseOptions.d.ts +2 -2
- package/dist/composables/useBbConfig.d.ts +5 -5
- package/dist/composables/useBbDialog.d.ts +17 -17
- package/dist/composables/useBbDialog.js +2 -1
- package/dist/composables/useBbDropdown.d.ts +1 -1
- package/dist/composables/useBbForm.d.ts +2 -2
- package/dist/composables/useBbFormField.d.ts +4 -4
- package/dist/composables/useBbOffCanvas.d.ts +6 -6
- package/dist/composables/useBbTable.d.ts +4 -4
- package/dist/composables/useBbTabs.d.ts +4 -4
- package/dist/composables/useBbTabs.js +99 -94
- package/dist/composables/useBreakpoint.d.ts +1 -1
- package/dist/composables/useCharacterCounter.d.ts +2 -2
- package/dist/composables/useChoiceIndicator.d.ts +2 -2
- package/dist/composables/useClosingInert.d.ts +1 -1
- package/dist/composables/useConfig.d.ts +3 -3
- package/dist/composables/useConfig.js +2 -9
- package/dist/composables/useConfigDefaults.d.ts +54 -0
- package/dist/composables/useConfigDefaults.js +56 -0
- package/dist/composables/useConfirm.d.ts +18 -18
- package/dist/composables/useDirection.d.ts +43 -0
- package/dist/composables/useDirection.js +12 -0
- package/dist/composables/useFormBinding.d.ts +5 -5
- package/dist/composables/useFormBinding.js +3 -3
- package/dist/composables/useId.d.ts +1 -1
- package/dist/composables/useItemsGetter.d.ts +3 -3
- package/dist/composables/useKeyboardInset.d.ts +1 -1
- package/dist/composables/useListboxFocus.d.ts +1 -1
- package/dist/composables/useLocale.d.ts +2 -2
- package/dist/composables/useOnDemandOpener.d.ts +3 -3
- package/dist/composables/useOverlayNavigation.d.ts +1 -1
- package/dist/composables/useOverlayYield.d.ts +1 -1
- package/dist/composables/usePassthrough.d.ts +13 -11
- package/dist/composables/usePassthrough.js +137 -133
- package/dist/composables/useQuery.d.ts +1 -1
- package/dist/composables/useRefusedCloseAnnouncement.d.ts +1 -1
- package/dist/composables/useSafeArea.d.ts +1 -1
- package/dist/composables/useSafeAreaInternal.d.ts +1 -1
- package/dist/composables/useSegmentedFields.d.ts +25 -0
- package/dist/composables/useSegmentedFields.js +165 -115
- package/dist/composables/useServerPrefetch.d.ts +2 -2
- package/dist/composables/useSheetSurface.d.ts +1 -1
- package/dist/composables/useSsrState.d.ts +2 -2
- package/dist/composables/useToast.d.ts +13 -5
- package/dist/composables/useToast.js +52 -38
- package/dist/composables/useTypeahead.js +22 -21
- package/dist/deprecation/ai-deprecations.json.d.ts +160 -15
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/deprecation/removedProps.d.ts +1 -1
- package/dist/directives/bbColor.d.ts +1 -1
- package/dist/directives/bbDate.d.ts +1 -1
- package/dist/directives/bbDialog.d.ts +3 -3
- package/dist/directives/bbDropdown.d.ts +1 -1
- package/dist/directives/bbDropdown.js +7 -7
- package/dist/directives/bbHoverCard.d.ts +3 -3
- package/dist/directives/bbOffCanvas.d.ts +2 -2
- package/dist/directives/bbPopover.d.ts +3 -3
- package/dist/directives/bbTime.d.ts +1 -1
- package/dist/directives/bbTooltip.d.ts +4 -4
- package/dist/directives/directivePortal.d.ts +4 -4
- package/dist/directives/overlayTrigger.d.ts +4 -4
- package/dist/directives/overlayTrigger.js +2 -1
- package/dist/i18n/eraNames.d.ts +2 -0
- package/dist/i18n/eraNames.js +2013 -0
- package/dist/i18n/index.d.ts +9 -7
- package/dist/i18n/localeTags.d.ts +36 -0
- package/dist/i18n/locales/ar.json +176 -0
- package/dist/i18n/locales/cs.json +23 -3
- package/dist/i18n/locales/da.json +23 -3
- package/dist/i18n/locales/de-CH.json +23 -3
- package/dist/i18n/locales/de.json +23 -3
- package/dist/i18n/locales/el.json +23 -3
- package/dist/i18n/locales/en-GB.json +23 -3
- package/dist/i18n/locales/en.json +23 -3
- package/dist/i18n/locales/es-MX.json +23 -3
- package/dist/i18n/locales/es.json +23 -3
- package/dist/i18n/locales/fa.json +176 -0
- package/dist/i18n/locales/fi.json +23 -3
- package/dist/i18n/locales/fr.json +23 -3
- package/dist/i18n/locales/he.json +176 -0
- package/dist/i18n/locales/hu.json +23 -3
- package/dist/i18n/locales/it.json +23 -3
- package/dist/i18n/locales/ja.json +23 -3
- package/dist/i18n/locales/ko.json +23 -3
- package/dist/i18n/locales/nb.json +23 -3
- package/dist/i18n/locales/nl.json +23 -3
- package/dist/i18n/locales/pl.json +23 -3
- package/dist/i18n/locales/pt-BR.json +23 -3
- package/dist/i18n/locales/pt-PT.json +23 -3
- package/dist/i18n/locales/ro.json +23 -3
- package/dist/i18n/locales/ru.json +23 -3
- package/dist/i18n/locales/sv.json +23 -3
- package/dist/i18n/locales/tr.json +23 -3
- package/dist/i18n/locales/uk.json +23 -3
- package/dist/i18n/locales/zh-CN.json +23 -3
- package/dist/i18n/locales/zh-HK.json +23 -3
- package/dist/i18n/locales/zh-TW.json +23 -3
- package/dist/i18n/regionHints.js +22 -22
- package/dist/i18n/regions.d.ts +73 -24
- package/dist/i18n/regions.js +57 -12
- package/dist/index.d.ts +192 -190
- package/dist/index.js +55 -54
- package/dist/llms-full.txt +8848 -5872
- package/dist/llms-medium.txt +830 -506
- package/dist/llms.txt +6 -5
- package/dist/locale-blueprint.json +26 -3
- package/dist/locale-tags.js +81 -0
- package/dist/mcp-sdk.LICENSES.txt +210 -0
- package/dist/mcp-sdk.mjs +78 -0
- package/dist/nuxt-auto-imports.d.ts +1 -1
- package/dist/nuxt-auto-imports.js +1 -1
- package/dist/nuxt-module.d.ts +5 -5
- package/dist/nuxt.js +26 -23
- package/dist/plugin.d.ts +2 -2
- package/dist/project-dts.d.ts +76 -14
- package/dist/project-dts.js +117 -63
- package/dist/setup-kit.LICENSES.txt +23 -0
- package/dist/setup-kit.mjs +9 -0
- package/dist/styles.css +2 -2
- package/dist/types/ActionButton.d.ts +3 -3
- package/dist/types/AlertVariant.d.ts +2 -2
- package/dist/types/BadgeVariant.d.ts +2 -2
- package/dist/types/ButtonVariant.d.ts +2 -2
- package/dist/types/CheckboxVariant.d.ts +9 -6
- package/dist/types/CheckboxVariant.js +5 -1
- package/dist/types/ColumnName.d.ts +1 -1
- package/dist/types/CommonProps.d.ts +25 -3
- package/dist/types/Config.d.ts +24 -110
- package/dist/types/ConfigDefaults.d.ts +352 -0
- package/dist/types/ConfigDefaults.js +115 -0
- package/dist/types/ConfirmVariant.d.ts +2 -2
- package/dist/types/DatePickerType.d.ts +29 -2
- package/dist/types/DatePickerType.js +6 -2
- package/dist/types/DropdownItemVariant.d.ts +2 -2
- package/dist/types/FieldLayout.d.ts +3 -3
- package/dist/types/IndicatorVariant.d.ts +2 -2
- package/dist/types/InputVariant.d.ts +58 -25
- package/dist/types/ItemAccessor.d.ts +7 -1
- package/dist/types/ItemProps.d.ts +3 -3
- package/dist/types/ItemsProvider.d.ts +2 -2
- package/dist/types/Placement.d.ts +7 -2
- package/dist/types/RadioVariant.d.ts +9 -6
- package/dist/types/RadioVariant.js +5 -1
- package/dist/types/ShapeErased.d.ts +1 -1
- package/dist/types/SizeScale.d.ts +4 -0
- package/dist/types/SizeScale.js +17 -0
- package/dist/types/TabsVariant.d.ts +2 -2
- package/dist/types/ToastVariant.d.ts +2 -2
- package/dist/types/TooltipVariant.d.ts +2 -2
- package/dist/types/fallthrough.d.ts +1 -1
- package/dist/types/passthrough.d.ts +23 -23
- package/dist/types/ptComponentMap.d.ts +29 -28
- package/dist/utilities/calendar/canonicalParts.d.ts +29 -0
- package/dist/utilities/calendar/canonicalParts.js +12 -0
- package/dist/utilities/calendar/digits.d.ts +18 -0
- package/dist/utilities/calendar/digits.js +26 -0
- package/dist/utilities/calendar/gregorian.d.ts +2 -0
- package/dist/utilities/calendar/gregorian.js +36 -0
- package/dist/utilities/calendar/index.d.ts +3 -0
- package/dist/utilities/calendar/index.js +1 -0
- package/dist/utilities/calendar/international.d.ts +19 -0
- package/dist/utilities/calendar/resolve.d.ts +32 -0
- package/dist/utilities/calendar/resolve.js +12 -0
- package/dist/utilities/calendar/runtime.d.ts +49 -0
- package/dist/utilities/calendar/types.d.ts +140 -0
- package/dist/utilities/calendar/types.js +83 -0
- package/dist/utilities/functions/convertDateValue.d.ts +15 -2
- package/dist/utilities/functions/convertDateValue.js +22 -17
- package/dist/utilities/functions/elementLabel.d.ts +1 -1
- package/dist/utilities/functions/extractDomContainer.d.ts +1 -1
- package/dist/utilities/functions/isDateDisabled.d.ts +9 -1
- package/dist/utilities/functions/isDateDisabled.js +38 -21
- package/dist/utilities/functions/itemProps.d.ts +1 -1
- package/dist/utilities/functions/normalizeDateBound.d.ts +45 -2
- package/dist/utilities/functions/normalizeDateBound.js +52 -11
- package/dist/utilities/functions/parseSize.d.ts +2 -2
- package/dist/utilities/functions/readableValue.d.ts +1 -1
- package/dist/utilities/functions/responsiveDefault.d.ts +1 -1
- package/dist/utilities/functions/searchRank.d.ts +19 -0
- package/dist/utilities/functions/searchRank.js +76 -0
- package/dist/utilities/functions/slotKey.d.ts +1 -1
- package/dist/utilities/functions/toggleInput.d.ts +1 -1
- package/dist/utilities/functions/warnRemovedAttrs.d.ts +3 -3
- package/dist/utilities/functions/when.d.ts +1 -1
- package/dist/utilities/misc/autofocus.d.ts +2 -2
- package/dist/utilities/misc/listboxMetrics.d.ts +2 -2
- package/dist/utilities/misc/maskaDataOptions.d.ts +1 -1
- package/dist/utilities/misc/ssrStateInjectionKey.d.ts +1 -1
- package/dist/utilities/misc/ssrValue.d.ts +1 -1
- package/dist/utils/configDefaults.d.ts +43 -0
- package/dist/utils/configDefaults.js +170 -0
- package/dist/utils/configScope.d.ts +43 -0
- package/dist/utils/configScope.js +13 -0
- package/dist/utils/copyData.d.ts +2 -2
- package/dist/utils/cssLayers.d.ts +1 -1
- package/dist/utils/focusVisibility.d.ts +1 -1
- package/dist/utils/injectLibraryStyles.d.ts +1 -1
- package/dist/utils/overlayEscapeStack.d.ts +1 -1
- package/dist/utils/passthrough.d.ts +5 -8
- package/dist/utils/passthrough.js +31 -29
- package/dist/utils/passthroughDeduper.d.ts +1 -1
- package/dist/utils/releasedActivator.d.ts +20 -0
- package/dist/utils/releasedActivator.js +11 -0
- package/dist/utils/versionCheck.d.ts +1 -1
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +139 -218
- package/dist/vite.js +451 -425
- package/llms.txt +6 -5
- package/package.json +51 -19
- package/scripts/README.md +2 -1
- package/scripts/lib/adoption-checklist.json +2 -2
- package/scripts/lib/agent-manifest.mjs +107 -22
- package/scripts/lib/agent-refresh.mjs +151 -0
- package/scripts/lib/agent-setup.mjs +679 -0
- package/scripts/lib/carousel-items-without-slide.mjs +263 -0
- package/scripts/lib/carousel-prop-or-local.mjs +117 -0
- package/scripts/lib/check-fix.mjs +1 -1
- package/scripts/lib/collapsible-trigger-aria.mjs +1 -1
- package/scripts/lib/css-class-check.mjs +3 -3
- package/scripts/lib/css-local-check.mjs +25 -17
- package/scripts/lib/css-surface-answer.mjs +117 -0
- package/scripts/lib/define-preset-copy.mjs +1 -1
- package/scripts/lib/distributed-alias.mjs +81 -0
- package/scripts/lib/doc-sections.mjs +12 -4
- package/scripts/lib/dropdown-default-slot.mjs +1 -1
- package/scripts/lib/eslint-disable.mjs +60 -2
- package/scripts/lib/eslint-plugin.d.ts +13 -2
- package/scripts/lib/eslint-plugin.mjs +609 -64
- package/scripts/lib/form-v-model.mjs +1 -1
- package/scripts/lib/hand-imported-styles.mjs +2 -2
- package/scripts/lib/hand-roll-hints.mjs +25 -3
- package/scripts/lib/helper-canon.mjs +4 -4
- package/scripts/lib/helpers-add.mjs +39 -24
- package/scripts/lib/hidden-label-placeholder.mjs +1 -1
- package/scripts/lib/idiom-scan.mjs +12 -11
- package/scripts/lib/is-direct-run.mjs +20 -0
- package/scripts/lib/items-provider-context.mjs +1 -1
- package/scripts/lib/linked-target.mjs +26 -2
- package/scripts/lib/local-components.mjs +2 -2
- package/scripts/lib/locale-check.mjs +109 -13
- package/scripts/lib/mcp-config.mjs +140 -75
- package/scripts/lib/mcp-sdk.mjs +199 -0
- package/scripts/lib/migrate-fix.mjs +3 -3
- package/scripts/lib/plugin-options-check.mjs +170 -0
- package/scripts/lib/pnp.mjs +165 -0
- package/scripts/lib/portal-names.mjs +4 -4
- package/scripts/lib/prefer-v-bb-dialog.mjs +1 -1
- package/scripts/lib/project-variant-dts.mjs +182 -48
- package/scripts/lib/reactive-v-model.mjs +2 -2
- package/scripts/lib/redundant-item-accessor.mjs +1 -1
- package/scripts/lib/renamed-item-field.mjs +1 -1
- package/scripts/lib/renamed-slot-prop.mjs +524 -0
- package/scripts/lib/rule-registry.mjs +1 -1
- package/scripts/lib/setup-edits.mjs +1845 -0
- package/scripts/lib/setup.mjs +440 -0
- package/scripts/lib/slot-key.mjs +1 -1
- package/scripts/lib/slot-renames.mjs +3 -3
- package/scripts/lib/squashed-slot-words.mjs +1 -1
- package/scripts/lib/tab-links.mjs +2 -2
- package/scripts/lib/text-null-value.mjs +1 -1
- package/scripts/lib/toolchain-check.mjs +3 -3
- package/scripts/lib/tooling-options.mjs +87 -0
- package/scripts/lib/unimported-components.mjs +1 -1
- package/scripts/lib/unstyled-variants.mjs +1 -1
- package/scripts/lib/valid-locale.mjs +119 -0
- package/scripts/lib/validate-bb-markup.mjs +219 -115
- package/scripts/lib/wrapper-props.mjs +2 -2
- package/dist/ai/BbPtScope.md +0 -138
- package/dist/ai/manifest/components/BbPtScope.json +0 -21
- package/dist/ai/source/BbPtScope.md +0 -54
- package/dist/components/BbNumberInput/warroom/corpus.d.ts +0 -58
- package/dist/components/BbNumberInput/warroom/currency-verify.rows.d.ts +0 -28
- package/dist/components/BbNumberInput/warroom/currency.rows.d.ts +0 -2
- package/dist/components/BbNumberInput/warroom/harness.d.ts +0 -217
- package/dist/components/BbNumberInput/warroom/oracle.d.ts +0 -150
- package/dist/components/BbPtScope/BbPtScope.vue.d.ts +0 -12
- package/dist/components/BbPtScope/BbPtScope.vue.js +0 -4
- package/dist/components/BbPtScope/BbPtScope.vue_vue_type_script_setup_true_lang.js +0 -12
- package/dist/components/BbPtScope/types.d.ts +0 -15
- package/dist/components/BbTable/warroom/harness.d.ts +0 -260
- package/dist/types/PtScope.d.ts +0 -15
- package/dist/utilities/functions/head.js +0 -3
- package/dist/utilities/functions/matchAnyKey.d.ts +0 -8
- package/dist/utilities/functions/matchAnyKey.js +0 -14
- package/dist/utilities/functions/pipe.d.ts +0 -3
- package/dist/utilities/functions/range.js +0 -7
- package/dist/utils/ptScope.d.ts +0 -8
- package/dist/utils/ptScope.js +0 -3
- package/scripts/lib/check-queue.mjs +0 -102
- package/scripts/lib/component-attr-targets.ts +0 -123
- package/scripts/lib/component-tree.ts +0 -648
- package/scripts/lib/consumer-install.mjs +0 -64
- package/scripts/lib/css-class-surface.mjs +0 -328
- package/scripts/lib/css-color-resolve.mjs +0 -296
- package/scripts/lib/css-comment-text.mjs +0 -16
- package/scripts/lib/design-token-manifest.mjs +0 -506
- package/scripts/lib/ensure-manifest.mjs +0 -135
- package/scripts/lib/example-checks.mjs +0 -337
- package/scripts/lib/guide-claims.mjs +0 -452
- package/scripts/lib/manifest-pointers.mjs +0 -71
- package/scripts/lib/pack.mjs +0 -55
- package/scripts/lib/public-type-exports.mjs +0 -273
- package/scripts/lib/quiet-gate.mjs +0 -385
- package/scripts/lib/recipe-excerpts.mjs +0 -98
- package/scripts/lib/swap-noun.mjs +0 -33
- package/scripts/lib/token-color-mix.mjs +0 -114
package/bin/cli.mjs
ADDED
|
@@ -0,0 +1,1922 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* bitboss-ui CLI — AI-affordance utilities for consumer projects.
|
|
3
|
+
*
|
|
4
|
+
* Commands:
|
|
5
|
+
* ai-init Inject bitboss-ui knowledge-base pointers into the current
|
|
6
|
+
* project so coding agents discover and follow the library's
|
|
7
|
+
* agent contract — harness-agnostic, not Claude-only. Writes:
|
|
8
|
+
* - AGENTS.md fragment (Cursor, Codex, many others)
|
|
9
|
+
* - CLAUDE.md fragment importing AGENTS.md (Claude Code)
|
|
10
|
+
* - .cursor/rules/bitboss-ui.mdc (Cursor)
|
|
11
|
+
* - .github/copilot-instructions.md fragment (GitHub Copilot)
|
|
12
|
+
* - .claude/skills/bitboss-ui/SKILL.md (Claude Code)
|
|
13
|
+
* - .windsurf/rules/bitboss-ui.md (Windsurf)
|
|
14
|
+
* - `vueCompilerOptions.checkUnknownComponents: true` in the
|
|
15
|
+
* tsconfig, unless the project already names it
|
|
16
|
+
* Also registers the `bitboss-ui mcp` server for Claude Code,
|
|
17
|
+
* Cursor, VS Code and Zed (its MCP SDK ships bundled, nothing
|
|
18
|
+
* to install); pass --no-mcp to skip it.
|
|
19
|
+
* check Validate Bb* markup in .vue/.md files against the installed
|
|
20
|
+
* components.json manifest (unknown props, removed props, bad
|
|
21
|
+
* v-models, unknown `<template #slot>` names, `href`/`to`/
|
|
22
|
+
* `method` on a component that doesn't declare them). Exits 1
|
|
23
|
+
* on findings; supports --json output. Every finding carries the
|
|
24
|
+
* source line. `--allow-component <Name>` (or package.json's
|
|
25
|
+
* `bitboss-ui.allowComponents`) exempts an app-owned component
|
|
26
|
+
* whose name happens to start with `Bb`.
|
|
27
|
+
*
|
|
28
|
+
* `--manifest <path>` judges against ANOTHER version's
|
|
29
|
+
* components.json instead of the installed one — answers "what
|
|
30
|
+
* breaks if I upgrade" BEFORE upgrading. A path, not a version:
|
|
31
|
+
* no network call inside a CI validator.
|
|
32
|
+
*
|
|
33
|
+
* SCOPE: `check` knows the INSTALLED v3 API and nothing about v2.
|
|
34
|
+
* "was removed from X" is a recorded v2→v3 break; "is not in X's
|
|
35
|
+
* API" only says the prop is not a v3 prop of that component —
|
|
36
|
+
* it may never have been one anywhere. `printFindingLegend` says
|
|
37
|
+
* so in the output, because two migrating fleets each spent real
|
|
38
|
+
* time discovering it the hard way.
|
|
39
|
+
* add Copy Inertia helpers into the app as files it owns
|
|
40
|
+
* (scripts/lib/helpers-add.mjs); `helpers list|diff|update`
|
|
41
|
+
* reports on them and refreshes the ones the app has not edited.
|
|
42
|
+
* changelog Breaking changes between two releases, then what they added —
|
|
43
|
+
* `--since <version>` answers "what breaks if I bump", without MCP. Reads the
|
|
44
|
+
* installed `dist/ai/changelog.json`.
|
|
45
|
+
* mcp Start a stdio MCP server exposing the dist/ai knowledge base
|
|
46
|
+
* (search_docs, search_components, get_component, get_composable,
|
|
47
|
+
* get_css_surface, list_tokens, list_guides, get_guide, list_changes,
|
|
48
|
+
* list_recipes, get_recipe, validate) to MCP-capable agent harnesses.
|
|
49
|
+
*
|
|
50
|
+
* Plain ESM JavaScript on purpose: shipped as-is in the package, no build.
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
import { spawnSync } from 'node:child_process';
|
|
54
|
+
// `globSync` is read off the namespace, not imported by name: it only exists
|
|
55
|
+
// from Node 22, and a named import of a missing builtin export is a
|
|
56
|
+
// SyntaxError at load time, which killed every command on Node 20 (Sail
|
|
57
|
+
// images still ship it). Only quoted glob arguments need it.
|
|
58
|
+
import * as fs from 'node:fs';
|
|
59
|
+
import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs';
|
|
60
|
+
import {
|
|
61
|
+
findHandRollHints,
|
|
62
|
+
loadKnownTokens,
|
|
63
|
+
} from '../scripts/lib/hand-roll-hints.mjs';
|
|
64
|
+
import {
|
|
65
|
+
loadAdoptionRows,
|
|
66
|
+
repeatedIdioms,
|
|
67
|
+
repeatOccurrences,
|
|
68
|
+
scanIdioms,
|
|
69
|
+
} from '../scripts/lib/idiom-scan.mjs';
|
|
70
|
+
import {
|
|
71
|
+
disabledChecker,
|
|
72
|
+
ruleForFinding,
|
|
73
|
+
} from '../scripts/lib/eslint-disable.mjs';
|
|
74
|
+
import {
|
|
75
|
+
localBbImports,
|
|
76
|
+
localBbWarning,
|
|
77
|
+
projectLocalBbComponents,
|
|
78
|
+
} from '../scripts/lib/local-components.mjs';
|
|
79
|
+
import { applyBitbossFixes } from '../scripts/lib/check-fix.mjs';
|
|
80
|
+
import { stringControlsFor } from '../scripts/lib/text-null-value.mjs';
|
|
81
|
+
import { projectResolution } from '../scripts/lib/unimported-components.mjs';
|
|
82
|
+
import {
|
|
83
|
+
MAY_HAVE_PORTALS,
|
|
84
|
+
portalFindings,
|
|
85
|
+
projectPortalIndex,
|
|
86
|
+
} from '../scripts/lib/portal-names.mjs';
|
|
87
|
+
import {
|
|
88
|
+
cssClassFindings,
|
|
89
|
+
ownedClassBlocks,
|
|
90
|
+
} from '../scripts/lib/css-class-check.mjs';
|
|
91
|
+
import {
|
|
92
|
+
cssLocalFindings,
|
|
93
|
+
libraryTokens,
|
|
94
|
+
localReads,
|
|
95
|
+
} from '../scripts/lib/css-local-check.mjs';
|
|
96
|
+
import {
|
|
97
|
+
HAND_IMPORTED_STYLES_EXTENSIONS,
|
|
98
|
+
handImportedStylesFindings,
|
|
99
|
+
readPluginConfig,
|
|
100
|
+
} from '../scripts/lib/hand-imported-styles.mjs';
|
|
101
|
+
import { unstyledVariants } from '../scripts/lib/unstyled-variants.mjs';
|
|
102
|
+
import {
|
|
103
|
+
loadLocaleTags,
|
|
104
|
+
unknownLocaleFindings,
|
|
105
|
+
} from '../scripts/lib/locale-check.mjs';
|
|
106
|
+
import {
|
|
107
|
+
loadPluginOptionKeys,
|
|
108
|
+
unknownPluginOptionFindings,
|
|
109
|
+
} from '../scripts/lib/plugin-options-check.mjs';
|
|
110
|
+
import {
|
|
111
|
+
readShippedDefinePreset,
|
|
112
|
+
staleDefinePresetFindings,
|
|
113
|
+
} from '../scripts/lib/define-preset-copy.mjs';
|
|
114
|
+
import {
|
|
115
|
+
readOptionsApiOff,
|
|
116
|
+
readRegisteredVariants,
|
|
117
|
+
variantOptionLabel,
|
|
118
|
+
syncNotice,
|
|
119
|
+
syncProjectVariantDts,
|
|
120
|
+
} from '../scripts/lib/project-variant-dts.mjs';
|
|
121
|
+
import { toolchainWarnings } from '../scripts/lib/toolchain-check.mjs';
|
|
122
|
+
import { dirname, isAbsolute, join, relative, resolve } from 'node:path';
|
|
123
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
124
|
+
import { parseArgs } from 'node:util';
|
|
125
|
+
import { createRequire } from 'node:module';
|
|
126
|
+
import { detectPackageManager, mcpLaunch } from '../scripts/lib/mcp-config.mjs';
|
|
127
|
+
import { loadI18n, refreshAgentSetup } from '../scripts/lib/agent-refresh.mjs';
|
|
128
|
+
import {
|
|
129
|
+
readToolingOptions,
|
|
130
|
+
toolingNotice,
|
|
131
|
+
} from '../scripts/lib/tooling-options.mjs';
|
|
132
|
+
import {
|
|
133
|
+
addRegistrations,
|
|
134
|
+
configuredRegisteredRules,
|
|
135
|
+
ownedBy,
|
|
136
|
+
packageRuleNames,
|
|
137
|
+
} from '../scripts/lib/rule-registry.mjs';
|
|
138
|
+
import {
|
|
139
|
+
loadManifest,
|
|
140
|
+
presetDefinitions,
|
|
141
|
+
validateMarkdown,
|
|
142
|
+
validateVueSnippet,
|
|
143
|
+
REGISTERED_VARIANT_OPTIONS,
|
|
144
|
+
} from '../scripts/lib/validate-bb-markup.mjs';
|
|
145
|
+
|
|
146
|
+
const PACKAGE_ROOT = join(dirname(fileURLToPath(import.meta.url)), '..');
|
|
147
|
+
function packageVersion() {
|
|
148
|
+
try {
|
|
149
|
+
const pkg = JSON.parse(
|
|
150
|
+
readFileSync(join(PACKAGE_ROOT, 'package.json'), 'utf-8')
|
|
151
|
+
);
|
|
152
|
+
return pkg.version ?? 'unknown';
|
|
153
|
+
} catch {
|
|
154
|
+
return 'unknown';
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/** `pnpm add` / `yarn add` / `bun add` / `npm install`, dev or not. */
|
|
159
|
+
function addCommand(pm, specs, { dev }) {
|
|
160
|
+
const verb = pm === 'npm' ? 'install' : 'add';
|
|
161
|
+
const flag = dev ? (pm === 'npm' ? '--save-dev' : '-D') : [];
|
|
162
|
+
return [pm, verb, ...[flag].flat(), ...specs];
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
function runPm(argv, cwd) {
|
|
166
|
+
console.log(`[bitboss-ui] ${argv.join(' ')}`);
|
|
167
|
+
const result = spawnSync(argv[0], argv.slice(1), {
|
|
168
|
+
cwd,
|
|
169
|
+
stdio: 'inherit',
|
|
170
|
+
shell: process.platform === 'win32',
|
|
171
|
+
});
|
|
172
|
+
return result.status === 0;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/** The installed bitboss-ui of `root` and whether it is a devDependency. */
|
|
176
|
+
function installedBitboss(root) {
|
|
177
|
+
try {
|
|
178
|
+
const pkg = JSON.parse(readFileSync(join(root, 'package.json'), 'utf-8'));
|
|
179
|
+
const dev = Boolean(pkg.devDependencies?.['bitboss-ui']);
|
|
180
|
+
const declared =
|
|
181
|
+
pkg.dependencies?.['bitboss-ui'] ?? pkg.devDependencies?.['bitboss-ui'];
|
|
182
|
+
let version;
|
|
183
|
+
try {
|
|
184
|
+
// Node resolution first: it also answers under Yarn PnP.
|
|
185
|
+
version = createRequire(join(root, 'package.json'))(
|
|
186
|
+
'bitboss-ui/package.json'
|
|
187
|
+
).version;
|
|
188
|
+
} catch {
|
|
189
|
+
version = undefined;
|
|
190
|
+
}
|
|
191
|
+
if (!version)
|
|
192
|
+
try {
|
|
193
|
+
version = JSON.parse(
|
|
194
|
+
readFileSync(
|
|
195
|
+
join(root, 'node_modules', 'bitboss-ui', 'package.json'),
|
|
196
|
+
'utf-8'
|
|
197
|
+
)
|
|
198
|
+
).version;
|
|
199
|
+
} catch {
|
|
200
|
+
version = undefined;
|
|
201
|
+
}
|
|
202
|
+
return { declared, dev, version };
|
|
203
|
+
} catch {
|
|
204
|
+
return { declared: undefined, dev: false, version: undefined };
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/** The release channel of a version: its prerelease tag (`beta`), else `latest`. */
|
|
209
|
+
const channelOf = (version) =>
|
|
210
|
+
/^\d+\.\d+\.\d+-([a-z]+)/i.exec(version ?? '')?.[1] ?? 'latest';
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* `update`: install the newest release on the app's channel, then refresh
|
|
214
|
+
* the agent setup and list the breaking changes since the old version. Run
|
|
215
|
+
* by an install (the app's `postinstall`) it only refreshes: the install is
|
|
216
|
+
* already happening, and installing from inside it would loop.
|
|
217
|
+
*/
|
|
218
|
+
async function updateCommand({ install, since, all = false }) {
|
|
219
|
+
const root = process.cwd();
|
|
220
|
+
const insideInstall = process.env.npm_lifecycle_event === 'postinstall';
|
|
221
|
+
if (insideInstall || !install) {
|
|
222
|
+
// An install must never fail on us: problems are printed, exit 0.
|
|
223
|
+
try {
|
|
224
|
+
await refreshAgentSetup({
|
|
225
|
+
automatic: insideInstall,
|
|
226
|
+
quiet: insideInstall,
|
|
227
|
+
all,
|
|
228
|
+
});
|
|
229
|
+
} catch (error) {
|
|
230
|
+
console.warn(
|
|
231
|
+
`[bitboss-ui] agent setup failed: ${error instanceof Error ? error.message : String(error)}`
|
|
232
|
+
);
|
|
233
|
+
if (!insideInstall) process.exitCode = 1;
|
|
234
|
+
}
|
|
235
|
+
if (insideInstall) process.exitCode = 0;
|
|
236
|
+
if (since && !insideInstall) changelogCommand({ since });
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
const before = installedBitboss(root);
|
|
240
|
+
const channel = channelOf(before.version ?? packageVersion());
|
|
241
|
+
const pm = detectPackageManager(root);
|
|
242
|
+
if (
|
|
243
|
+
!runPm(addCommand(pm, [`bitboss-ui@${channel}`], { dev: before.dev }), root)
|
|
244
|
+
) {
|
|
245
|
+
console.error(
|
|
246
|
+
'[bitboss-ui] update: the install failed, nothing else changed.'
|
|
247
|
+
);
|
|
248
|
+
process.exitCode = 1;
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
// The NEW version refreshes the files and reads its own changelog.
|
|
252
|
+
// Launched as the MCP entry is: node + the bin path, or through Yarn
|
|
253
|
+
// under PnP (no node_modules there).
|
|
254
|
+
const launch = mcpLaunch(root);
|
|
255
|
+
const args = [...launch.args.slice(0, -1), 'update', '--no-install'];
|
|
256
|
+
if (before.version) args.push('--since', before.version);
|
|
257
|
+
const after = spawnSync(launch.command, args, {
|
|
258
|
+
cwd: root,
|
|
259
|
+
stdio: 'inherit',
|
|
260
|
+
shell: process.platform === 'win32',
|
|
261
|
+
});
|
|
262
|
+
process.exitCode = after.status ?? 1;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// a bare-segment skip list of `node_modules`/`dist`/`.git` let a
|
|
266
|
+
// default (no-glob) `check` sweep straight through a Laravel-style consumer's
|
|
267
|
+
// `vendor/`, `storage/`, and `public/` trees — hundreds of vendored
|
|
268
|
+
// `README.md`s outnumbering the app's own `.vue`/`.md` files 20:1. These are
|
|
269
|
+
// all directories no project authors `Bb*` markup into, so they're safe
|
|
270
|
+
// blanket exclusions; framework build caches (`.nuxt`, `.output`) get the
|
|
271
|
+
// same treatment.
|
|
272
|
+
const CHECK_SKIP_DIRS = new Set([
|
|
273
|
+
'node_modules',
|
|
274
|
+
'dist',
|
|
275
|
+
'.git',
|
|
276
|
+
'vendor',
|
|
277
|
+
'storage',
|
|
278
|
+
'public',
|
|
279
|
+
'.output',
|
|
280
|
+
'.nuxt',
|
|
281
|
+
]);
|
|
282
|
+
// Composite (multi-segment) skips: too narrow to earn a bare-segment entry —
|
|
283
|
+
// skipping all of `bootstrap/` would also hide a project's own
|
|
284
|
+
// `bootstrap/*.md` — but `bootstrap/cache` specifically is Laravel's compiled
|
|
285
|
+
// config/routes cache, never hand-authored.
|
|
286
|
+
const CHECK_SKIP_SUBPATHS = ['bootstrap/cache'];
|
|
287
|
+
const CHECK_EXTENSIONS = ['.vue', '.md'];
|
|
288
|
+
|
|
289
|
+
/** True when a path segment (by itself) is a directory `check` never descends into. */
|
|
290
|
+
function isSkippedSegment(name) {
|
|
291
|
+
return CHECK_SKIP_DIRS.has(name);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/** True when the relative path IS, or falls under, a skipped multi-segment subpath. */
|
|
295
|
+
function isSkippedSubpath(relPath) {
|
|
296
|
+
const normalized = relPath.split(/[\\/]/).join('/');
|
|
297
|
+
return CHECK_SKIP_SUBPATHS.some(
|
|
298
|
+
(sub) => normalized === sub || normalized.startsWith(`${sub}/`)
|
|
299
|
+
);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/** True when any path segment (or composite subpath) is skipped. */
|
|
303
|
+
function inSkippedDir(relPath) {
|
|
304
|
+
return (
|
|
305
|
+
relPath.split(/[\\/]/).some((segment) => isSkippedSegment(segment)) ||
|
|
306
|
+
isSkippedSubpath(relPath)
|
|
307
|
+
);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Every `.vue`/`.md` file under `dir`, excluding the skip list (see
|
|
312
|
+
* `CHECK_SKIP_DIRS`/`CHECK_SKIP_SUBPATHS`) at any depth. A hand-rolled
|
|
313
|
+
* recursive walk rather than `globSync` because glob's `**` never traverses
|
|
314
|
+
* dot-directories (and there is no `dot` option) — the sweep must keep
|
|
315
|
+
* matching files like `.github/copilot-instructions.md`. Pruning skipped
|
|
316
|
+
* directories BEFORE descending (rather than filtering after a flat
|
|
317
|
+
* `recursive: true` readdir) is what keeps a multi-thousand-file `vendor/`
|
|
318
|
+
* tree from being walked at all.
|
|
319
|
+
*/
|
|
320
|
+
function collectCheckFiles(
|
|
321
|
+
dir,
|
|
322
|
+
relBase = dir,
|
|
323
|
+
extensions = CHECK_EXTENSIONS,
|
|
324
|
+
chain = []
|
|
325
|
+
) {
|
|
326
|
+
let entries;
|
|
327
|
+
try {
|
|
328
|
+
entries = readdirSync(dir, { withFileTypes: true });
|
|
329
|
+
} catch {
|
|
330
|
+
return [];
|
|
331
|
+
}
|
|
332
|
+
// The `.gitignore` chain at this level (git semantics, shared with the
|
|
333
|
+
// icon scan): build output a project ignores (`.vercel/output`, `.nuxt`,
|
|
334
|
+
// `coverage`) is never swept.
|
|
335
|
+
const own = gitignoreKit?.readGitignore(dir);
|
|
336
|
+
const here = own ? [...chain, { dir, ig: own }] : chain;
|
|
337
|
+
const ignored = (full, isDir) =>
|
|
338
|
+
!!gitignoreKit && gitignoreKit.isGitignored(here, full, isDir);
|
|
339
|
+
const out = [];
|
|
340
|
+
for (const entry of entries) {
|
|
341
|
+
const full = join(dir, entry.name);
|
|
342
|
+
if (entry.isDirectory()) {
|
|
343
|
+
if (isSkippedSegment(entry.name)) continue;
|
|
344
|
+
if (isSkippedSubpath(relative(relBase, full))) continue;
|
|
345
|
+
if (ignored(full, true)) continue;
|
|
346
|
+
out.push(...collectCheckFiles(full, relBase, extensions, here));
|
|
347
|
+
continue;
|
|
348
|
+
}
|
|
349
|
+
if (!entry.isFile()) continue;
|
|
350
|
+
if (!extensions.some((ext) => entry.name.endsWith(ext))) continue;
|
|
351
|
+
if (ignored(full, false)) continue;
|
|
352
|
+
out.push(full);
|
|
353
|
+
}
|
|
354
|
+
return out;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* The icon scan's `.gitignore` reader, loaded once by `check` before its
|
|
359
|
+
* sweep. In the library repo it loads from source (`src/icon-scan.ts`, Node
|
|
360
|
+
* strips the types): `dist` may be absent (the release runs the node suite
|
|
361
|
+
* before the build) or stale. In the package, which ships no `src`, it loads
|
|
362
|
+
* from `dist/icon-scan.js`. Failing to load it is an error, never a sweep
|
|
363
|
+
* without it: that would report a project's gitignored build output.
|
|
364
|
+
* Returns the error, or null once loaded.
|
|
365
|
+
*/
|
|
366
|
+
let gitignoreKit = null;
|
|
367
|
+
async function loadGitignoreKit() {
|
|
368
|
+
const source = join(PACKAGE_ROOT, 'src', 'icon-scan.ts');
|
|
369
|
+
const file = existsSync(source)
|
|
370
|
+
? source
|
|
371
|
+
: join(PACKAGE_ROOT, 'dist', 'icon-scan.js');
|
|
372
|
+
const where = relative(PACKAGE_ROOT, file);
|
|
373
|
+
let kit;
|
|
374
|
+
try {
|
|
375
|
+
kit = await import(pathToFileURL(file).href);
|
|
376
|
+
} catch (error) {
|
|
377
|
+
return `cannot load the .gitignore reader from ${where}: ${error.message}`;
|
|
378
|
+
}
|
|
379
|
+
if (!kit.readGitignore || !kit.isGitignored || !kit.ancestorGitignores)
|
|
380
|
+
return `${where} does not export the .gitignore reader`;
|
|
381
|
+
gitignoreKit = kit;
|
|
382
|
+
return null;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* Resolve the file list for `check`: explicit globs/paths if given, otherwise
|
|
387
|
+
* every `.vue`/`.md` file under `cwd` (excluding `CHECK_SKIP_DIRS`/
|
|
388
|
+
* `CHECK_SKIP_SUBPATHS` — node_modules, dist, .git, vendor, storage, public,
|
|
389
|
+
* .output, .nuxt, bootstrap/cache). Literal paths resolve directly: a literal
|
|
390
|
+
* FILE is always included (even one that lives inside a skipped dir — asking
|
|
391
|
+
* for it by name is the widen-the-scan escape hatch), a literal DIRECTORY is
|
|
392
|
+
* swept recursively and only its descendants are checked against the skip
|
|
393
|
+
* list (so `check vendor/some-pkg` still works even though a bare sweep would
|
|
394
|
+
* never enter `vendor/` on its own). Glob patterns (`*`, `**`, `?`, `{a,b}`)
|
|
395
|
+
* go through `node:fs` globSync, restricted to `.vue`/`.md` outside the
|
|
396
|
+
* skipped dirs.
|
|
397
|
+
*/
|
|
398
|
+
function resolveCheckFiles(cwd, patterns) {
|
|
399
|
+
if (patterns.length === 0)
|
|
400
|
+
return collectCheckFiles(
|
|
401
|
+
cwd,
|
|
402
|
+
cwd,
|
|
403
|
+
CHECK_EXTENSIONS,
|
|
404
|
+
gitignoreKit?.ancestorGitignores(cwd) ?? []
|
|
405
|
+
).sort();
|
|
406
|
+
|
|
407
|
+
const matched = new Set();
|
|
408
|
+
for (const pattern of patterns) {
|
|
409
|
+
if (!/[*?{}[\]]/.test(pattern)) {
|
|
410
|
+
const abs = isAbsolute(pattern) ? pattern : join(cwd, pattern);
|
|
411
|
+
if (existsSync(abs)) {
|
|
412
|
+
const stat = statSync(abs);
|
|
413
|
+
if (stat.isDirectory()) {
|
|
414
|
+
for (const file of collectCheckFiles(abs)) matched.add(file);
|
|
415
|
+
} else if (stat.isFile()) {
|
|
416
|
+
matched.add(abs);
|
|
417
|
+
}
|
|
418
|
+
continue;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
if (typeof fs.globSync !== 'function') {
|
|
422
|
+
console.error(
|
|
423
|
+
`[bitboss-ui] quoted glob patterns need Node >= 22 (this is ${process.version}): "${pattern}". Pass the directory, or leave the pattern unquoted so the shell expands it.`
|
|
424
|
+
);
|
|
425
|
+
process.exit(1);
|
|
426
|
+
}
|
|
427
|
+
const dirents = fs.globSync(pattern, {
|
|
428
|
+
cwd,
|
|
429
|
+
withFileTypes: true,
|
|
430
|
+
// Pruning is a traversal shortcut; the inSkippedDir filter below is
|
|
431
|
+
// what guarantees skip-dir parity. `entry` is a Dirent when
|
|
432
|
+
// withFileTypes is set, but tolerate the string form too.
|
|
433
|
+
exclude: (entry) =>
|
|
434
|
+
CHECK_SKIP_DIRS.has(
|
|
435
|
+
typeof entry === 'string' ? entry.split('/').pop() : entry.name
|
|
436
|
+
),
|
|
437
|
+
});
|
|
438
|
+
for (const dirent of dirents) {
|
|
439
|
+
if (!dirent.isFile()) continue;
|
|
440
|
+
if (!CHECK_EXTENSIONS.some((ext) => dirent.name.endsWith(ext))) continue;
|
|
441
|
+
const joined = join(dirent.parentPath, dirent.name);
|
|
442
|
+
const full = isAbsolute(joined) ? joined : join(cwd, joined);
|
|
443
|
+
if (inSkippedDir(relative(cwd, full))) continue;
|
|
444
|
+
matched.add(full);
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
return [...matched].sort();
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* `check --changed`: the files git reports changed against HEAD
|
|
453
|
+
* (staged or not) plus the untracked ones, under `cwd`, minus the sweep's skip
|
|
454
|
+
* list. `files` are the .vue/.md ones `check` validates; `all` (any extension)
|
|
455
|
+
* feeds the stylesheet and styles-import scans, which read other files too.
|
|
456
|
+
* @returns {{ files: string[], all: string[] } | { error: string }}
|
|
457
|
+
*/
|
|
458
|
+
function changedCheckFiles(cwd) {
|
|
459
|
+
const git = (args) =>
|
|
460
|
+
spawnSync('git', args, {
|
|
461
|
+
cwd,
|
|
462
|
+
encoding: 'utf-8',
|
|
463
|
+
maxBuffer: 64 * 1024 * 1024,
|
|
464
|
+
});
|
|
465
|
+
const diff = git(['diff', '--name-only', '--relative', '-z', 'HEAD', '--']);
|
|
466
|
+
const untracked = git(['ls-files', '--others', '--exclude-standard', '-z']);
|
|
467
|
+
const failed = [diff, untracked].find((r) => r.error || r.status !== 0);
|
|
468
|
+
if (failed)
|
|
469
|
+
return {
|
|
470
|
+
error:
|
|
471
|
+
'check --changed: git could not list the changed files here (not a git repository, git missing, or no commit yet): ' +
|
|
472
|
+
(failed.error?.message ?? failed.stderr.trim().split('\n')[0]),
|
|
473
|
+
};
|
|
474
|
+
const all = [
|
|
475
|
+
...new Set(`${diff.stdout}${untracked.stdout}`.split('\0').filter(Boolean)),
|
|
476
|
+
]
|
|
477
|
+
.filter((rel) => !inSkippedDir(rel))
|
|
478
|
+
.map((rel) => join(cwd, rel))
|
|
479
|
+
// A deleted file is a change with nothing left to check.
|
|
480
|
+
.filter((path) => existsSync(path) && statSync(path).isFile())
|
|
481
|
+
.sort();
|
|
482
|
+
return {
|
|
483
|
+
files: all.filter((path) =>
|
|
484
|
+
CHECK_EXTENSIONS.some((ext) => path.endsWith(ext))
|
|
485
|
+
),
|
|
486
|
+
all,
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* `4 .vue + 8 .md` — a plain file count on its own ("715 file(s)") reads as
|
|
492
|
+
* "715 files carefully checked" when a test run showed it can just as easily be
|
|
493
|
+
* "701 vendored READMEs + 14 real files"; splitting by extension makes the
|
|
494
|
+
* number honest about what was actually covered. `.vue`/`.md` sort first
|
|
495
|
+
* (the extensions `check` targets by default); any other extension a literal
|
|
496
|
+
* path argument pulled in — see `resolveCheckFiles` — sorts after, A-Z.
|
|
497
|
+
*/
|
|
498
|
+
function summarizeFileCounts(files) {
|
|
499
|
+
const counts = new Map();
|
|
500
|
+
for (const file of files) {
|
|
501
|
+
const base = file.split(/[\\/]/).pop() ?? file;
|
|
502
|
+
const dot = base.lastIndexOf('.');
|
|
503
|
+
const ext = dot === -1 ? '(no extension)' : base.slice(dot);
|
|
504
|
+
counts.set(ext, (counts.get(ext) ?? 0) + 1);
|
|
505
|
+
}
|
|
506
|
+
const priority = ['.vue', '.md'];
|
|
507
|
+
const exts = [...counts.keys()].sort((a, b) => {
|
|
508
|
+
const pa = priority.indexOf(a);
|
|
509
|
+
const pb = priority.indexOf(b);
|
|
510
|
+
if (pa !== -1 || pb !== -1) {
|
|
511
|
+
return (
|
|
512
|
+
(pa === -1 ? priority.length : pa) - (pb === -1 ? priority.length : pb)
|
|
513
|
+
);
|
|
514
|
+
}
|
|
515
|
+
return a.localeCompare(b);
|
|
516
|
+
});
|
|
517
|
+
return exts.map((ext) => `${counts.get(ext)} ${ext}`).join(' + ');
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* Component names the PROJECT owns despite the `Bb` prefix, read from disk so
|
|
522
|
+
* CI, the editor and a local run agree without repeating a flag.
|
|
523
|
+
*
|
|
524
|
+
* Two sources, merged: `bitboss-ui.check.json`'s `allowComponents`, and
|
|
525
|
+
* package.json's `bitboss-ui.allowComponents`. The package.json key is the one
|
|
526
|
+
* to reach for — it sits next to the `eslint.config.js` that already carries
|
|
527
|
+
* the same list for `no-unknown-attributes`, so the two gates stay in sync.
|
|
528
|
+
* Unreadable/malformed files are ignored: a broken config must not turn into a
|
|
529
|
+
* check failure about markup.
|
|
530
|
+
* @returns {string[]}
|
|
531
|
+
*/
|
|
532
|
+
function configuredAllowComponents(projectRoot) {
|
|
533
|
+
// One place for settings: the plugin options.
|
|
534
|
+
const options = readToolingOptions(projectRoot);
|
|
535
|
+
if (options.allowComponents.from === 'unreadable') {
|
|
536
|
+
const notice = toolingNotice(options);
|
|
537
|
+
if (notice) console.warn(notice);
|
|
538
|
+
}
|
|
539
|
+
return options.allowComponents.value;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* CHK-SINCE-V2 — the two unknown-prop message shapes mean OPPOSITE things and
|
|
544
|
+
* nothing in the output said so. One migrating fleet filed two non-findings
|
|
545
|
+
* against the library, and the other told the categories apart only by
|
|
546
|
+
* installing v2 alongside and diffing by hand. Printed once per failing run,
|
|
547
|
+
* and only for the kinds actually present.
|
|
548
|
+
*
|
|
549
|
+
* `check` is honest about its limits here: it validates against the INSTALLED
|
|
550
|
+
* v3 manifest and holds no record of v2, so "is not in X's API" is a statement
|
|
551
|
+
* about v3 alone. Deciding whether such a prop ever worked is the reader's job,
|
|
552
|
+
* and the greps in the migration guide are how it is done.
|
|
553
|
+
*/
|
|
554
|
+
function printFindingLegend(findings) {
|
|
555
|
+
const kinds = new Set(findings.map((f) => f.kind));
|
|
556
|
+
const rows = [];
|
|
557
|
+
if (kinds.has('removed-prop'))
|
|
558
|
+
rows.push(
|
|
559
|
+
' "was removed from X" a recorded break (v2→v3, or a v3 beta rename). X really\n' +
|
|
560
|
+
' / "was renamed on X" had this prop or pt key; `check --fix` rewrites the renames.'
|
|
561
|
+
);
|
|
562
|
+
if (kinds.has('renamed-slot'))
|
|
563
|
+
rows.push(
|
|
564
|
+
' "slot … was renamed" a recorded slot rename; `check --fix` rewrites it.'
|
|
565
|
+
);
|
|
566
|
+
if (kinds.has('unknown-prop'))
|
|
567
|
+
rows.push(
|
|
568
|
+
' "is not in X\'s API" X does not declare this prop in v3 — and `check` cannot\n' +
|
|
569
|
+
' say whether it ever did. It may be a v3 removal that\n' +
|
|
570
|
+
' predates the removal register, or a name that was never\n' +
|
|
571
|
+
' a prop at all and has always fallen through to the DOM\n' +
|
|
572
|
+
' as an inert attribute. Check the v2 source before\n' +
|
|
573
|
+
' "restoring" anything: the second case needs deleting,\n' +
|
|
574
|
+
' not porting.'
|
|
575
|
+
);
|
|
576
|
+
// A type written as a tag is its own category: the name IS ours, so neither
|
|
577
|
+
// "check the spelling" nor the allowlist applies, and a reader who skims the
|
|
578
|
+
// message alone would reach for one of them.
|
|
579
|
+
if (
|
|
580
|
+
findings.some((f) => / is a type export, not a component$/.test(f.message))
|
|
581
|
+
)
|
|
582
|
+
rows.push(
|
|
583
|
+
' "is a type export" a real export, but a TYPE — it types a prop, it does not\n' +
|
|
584
|
+
' render. Import it (`import type { … }`) and pass the\n' +
|
|
585
|
+
' value; never allowlist it, which would only silence\n' +
|
|
586
|
+
' every other check on that tag.'
|
|
587
|
+
);
|
|
588
|
+
if (findings.some((f) => f.fallthrough))
|
|
589
|
+
rows.push(
|
|
590
|
+
' ⚠ (vs ✗) markup that is not a typo and may work today: an\n' +
|
|
591
|
+
' undeclared listener Vue binds to the root ELEMENT,\n' +
|
|
592
|
+
' so whether it fires depends on what that root is —\n' +
|
|
593
|
+
" an internal detail, on the component's schedule or\n" +
|
|
594
|
+
" the element's. `<BbDialog @close>` runs (that root is\n" +
|
|
595
|
+
' a native <dialog>); `<BbAlert @close>` does not.\n' +
|
|
596
|
+
' Still reported, because neither is the contract. In\n' +
|
|
597
|
+
' ESLint this is `no-unknown-event`, a warning.'
|
|
598
|
+
);
|
|
599
|
+
if (rows.length === 0) return;
|
|
600
|
+
console.error('\nReading these findings:');
|
|
601
|
+
for (const row of rows) console.error(row);
|
|
602
|
+
console.error(
|
|
603
|
+
' `check` reads the installed v3 manifest only; the package carries no v2 API.'
|
|
604
|
+
);
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* `npx bitboss-ui check [glob…] [--json]` — validate `Bb*` markup (props,
|
|
609
|
+
* v-models, and `<template #slot>` names) in `.vue` and `.md` files against
|
|
610
|
+
* the installed components.json manifest.
|
|
611
|
+
*/
|
|
612
|
+
/**
|
|
613
|
+
* The version a components.json describes. `loadManifest` returns the indexed
|
|
614
|
+
* component map, not the envelope, so read the field straight off the file.
|
|
615
|
+
*/
|
|
616
|
+
/**
|
|
617
|
+
* `changelog [--since <v>] [--until <v>] [--json]` — what breaks between two
|
|
618
|
+
* releases, then what they added (one line per feature), for anyone not driving the MCP server (a human at a terminal, CI,
|
|
619
|
+
* or an agent whose harness has no MCP). Same data and same range rules as the
|
|
620
|
+
* `list_changes` tool; this is the transport-free path to it.
|
|
621
|
+
*/
|
|
622
|
+
function changelogCommand({ since, until, json: jsonMode }) {
|
|
623
|
+
const path = join(PACKAGE_ROOT, 'dist', 'ai', 'changelog.json');
|
|
624
|
+
if (!existsSync(path)) {
|
|
625
|
+
console.error(
|
|
626
|
+
`[bitboss-ui] changelog: not found at ${path} — reinstall bitboss-ui (or run \`npm run build\` when working in the library repo).`
|
|
627
|
+
);
|
|
628
|
+
process.exit(1);
|
|
629
|
+
}
|
|
630
|
+
const doc = JSON.parse(readFileSync(path, 'utf-8'));
|
|
631
|
+
const releases = doc.releases ?? [];
|
|
632
|
+
|
|
633
|
+
for (const [label, value] of [
|
|
634
|
+
['--since', since],
|
|
635
|
+
['--until', until],
|
|
636
|
+
]) {
|
|
637
|
+
if (value != null && !releases.includes(value)) {
|
|
638
|
+
// A tagged-but-never-published version (beta.34): say where its
|
|
639
|
+
// changes went instead of "unknown", which reads like a typo.
|
|
640
|
+
const unpublished = (doc.unpublished ?? []).includes(value);
|
|
641
|
+
const next = releases.find((r) => compareReleaseVersions(r, value) > 0);
|
|
642
|
+
console.error(
|
|
643
|
+
(unpublished
|
|
644
|
+
? `[bitboss-ui] changelog: ${label} ${value} was never published to npm; its changes shipped in ${next ?? 'the next release'}.\n`
|
|
645
|
+
: `[bitboss-ui] changelog: unknown ${label} version '${value}'.\n`) +
|
|
646
|
+
`Known releases: ${releases.join(', ')}`
|
|
647
|
+
);
|
|
648
|
+
process.exit(1);
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
const ranged = since != null || until != null;
|
|
653
|
+
const rows = (doc.breaking ?? []).filter((entry) => {
|
|
654
|
+
if (!ranged) return true;
|
|
655
|
+
const at = entry.firstReleasedIn;
|
|
656
|
+
if (at == null) return until == null;
|
|
657
|
+
if (since != null && compareReleaseVersions(at, since) <= 0) return false;
|
|
658
|
+
if (until != null && compareReleaseVersions(at, until) > 0) return false;
|
|
659
|
+
return true;
|
|
660
|
+
});
|
|
661
|
+
// what the range ADDED (feat commits, one line each), oldest first.
|
|
662
|
+
const inRange = (at) => {
|
|
663
|
+
if (!ranged) return true;
|
|
664
|
+
if (at === 'unreleased') return until == null;
|
|
665
|
+
if (since != null && compareReleaseVersions(at, since) <= 0) return false;
|
|
666
|
+
if (until != null && compareReleaseVersions(at, until) > 0) return false;
|
|
667
|
+
return true;
|
|
668
|
+
};
|
|
669
|
+
const added = Object.entries(doc.added ?? {})
|
|
670
|
+
.filter(([at]) => inRange(at))
|
|
671
|
+
.flatMap(([at, entries]) =>
|
|
672
|
+
entries.map((entry) => ({
|
|
673
|
+
at,
|
|
674
|
+
line: typeof entry === 'string' ? entry : entry.text,
|
|
675
|
+
}))
|
|
676
|
+
);
|
|
677
|
+
|
|
678
|
+
if (jsonMode) {
|
|
679
|
+
console.log(
|
|
680
|
+
JSON.stringify(
|
|
681
|
+
{
|
|
682
|
+
version: doc.version,
|
|
683
|
+
since: since ?? null,
|
|
684
|
+
until: until ?? doc.version,
|
|
685
|
+
count: rows.length,
|
|
686
|
+
breaking: rows,
|
|
687
|
+
added: added.map(({ at, line }) => `[${at}] ${line}`),
|
|
688
|
+
guide: doc.guide,
|
|
689
|
+
},
|
|
690
|
+
null,
|
|
691
|
+
2
|
|
692
|
+
)
|
|
693
|
+
);
|
|
694
|
+
return;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
const range = ranged
|
|
698
|
+
? `${since ?? 'the start of v3'} → ${until ?? doc.version}`
|
|
699
|
+
: `the whole v2 → v3 upgrade`;
|
|
700
|
+
const printAdded = () => {
|
|
701
|
+
if (!added.length) return;
|
|
702
|
+
// Compact by default: the whole v3 line is hundreds of lines.
|
|
703
|
+
if (!ranged) {
|
|
704
|
+
console.log(
|
|
705
|
+
`\n${added.length} addition(s) over ${range}: list one hop with --since <your version>.`
|
|
706
|
+
);
|
|
707
|
+
return;
|
|
708
|
+
}
|
|
709
|
+
console.log(`\n${added.length} addition(s), ${range}:\n`);
|
|
710
|
+
for (const { at, line } of added) console.log(` [${at}] ${line}`);
|
|
711
|
+
};
|
|
712
|
+
if (rows.length === 0) {
|
|
713
|
+
// "Nothing breaks" and "I could not tell you" must not look alike.
|
|
714
|
+
console.log(
|
|
715
|
+
`[bitboss-ui] changelog: no BREAKING changes in ${range}.\n` +
|
|
716
|
+
' Fixes are not tracked here, so this means nothing\n' +
|
|
717
|
+
' breaks — not that nothing changed.'
|
|
718
|
+
);
|
|
719
|
+
printAdded();
|
|
720
|
+
return;
|
|
721
|
+
}
|
|
722
|
+
console.log(
|
|
723
|
+
`[bitboss-ui] changelog: ${rows.length} breaking change(s), ${range}\n`
|
|
724
|
+
);
|
|
725
|
+
for (const entry of rows) {
|
|
726
|
+
const at = entry.firstReleasedIn ?? 'unreleased';
|
|
727
|
+
if (entry.kind === 'rename') {
|
|
728
|
+
// `surface` says what kind of name it is; a slot reads `#…`.
|
|
729
|
+
const spell = (name) => (entry.surface === 'slot' ? `#${name}` : name);
|
|
730
|
+
const surface =
|
|
731
|
+
entry.surface && entry.surface !== 'prop' ? `${entry.surface} ` : '';
|
|
732
|
+
console.log(
|
|
733
|
+
` [${at}] ${entry.components.join(', ')}: ${surface}\`${spell(entry.from)}\` → ` +
|
|
734
|
+
(entry.to == null ? 'removed' : `\`${spell(entry.to)}\``) +
|
|
735
|
+
(entry.note ? ` (${entry.note})` : '')
|
|
736
|
+
);
|
|
737
|
+
} else {
|
|
738
|
+
console.log(` [${at}] ${entry.description}`);
|
|
739
|
+
}
|
|
740
|
+
if (entry.guide) console.log(` ${entry.guide}`);
|
|
741
|
+
}
|
|
742
|
+
printAdded();
|
|
743
|
+
console.log(`\nFull migration guide: ${doc.guide}`);
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
/** Numeric, prerelease-aware ordering; the twin of the MCP server's copy. */
|
|
747
|
+
function compareReleaseVersions(a, b) {
|
|
748
|
+
const parse = (v) => {
|
|
749
|
+
const [core, pre = ''] = String(v).split('-');
|
|
750
|
+
const nums = core.split('.').map((n) => Number.parseInt(n, 10) || 0);
|
|
751
|
+
const [tag = '', n = ''] = pre.split('.');
|
|
752
|
+
return { nums, tag, n: Number.parseInt(n, 10) || 0 };
|
|
753
|
+
};
|
|
754
|
+
const x = parse(a);
|
|
755
|
+
const y = parse(b);
|
|
756
|
+
for (let i = 0; i < 3; i += 1) {
|
|
757
|
+
if ((x.nums[i] ?? 0) !== (y.nums[i] ?? 0))
|
|
758
|
+
return (x.nums[i] ?? 0) - (y.nums[i] ?? 0);
|
|
759
|
+
}
|
|
760
|
+
if (!x.tag && y.tag) return 1;
|
|
761
|
+
if (x.tag && !y.tag) return -1;
|
|
762
|
+
if (x.tag !== y.tag) return x.tag < y.tag ? -1 : 1;
|
|
763
|
+
return x.n - y.n;
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
function manifestVersionOf(manifestPath) {
|
|
767
|
+
try {
|
|
768
|
+
return JSON.parse(readFileSync(manifestPath, 'utf-8')).version ?? 'unknown';
|
|
769
|
+
} catch {
|
|
770
|
+
return 'unknown';
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
async function checkCommand(
|
|
775
|
+
globs,
|
|
776
|
+
{
|
|
777
|
+
json: jsonMode,
|
|
778
|
+
allowEmpty,
|
|
779
|
+
allowComponents,
|
|
780
|
+
manifest: manifestOverride,
|
|
781
|
+
fix,
|
|
782
|
+
changed: changedOnly,
|
|
783
|
+
idioms: wantIdioms,
|
|
784
|
+
}
|
|
785
|
+
) {
|
|
786
|
+
const projectRoot = process.cwd();
|
|
787
|
+
const kitError = await loadGitignoreKit();
|
|
788
|
+
if (kitError) {
|
|
789
|
+
console.error(`[bitboss-ui] check: ${kitError}`);
|
|
790
|
+
process.exit(1);
|
|
791
|
+
}
|
|
792
|
+
if (changedOnly && globs.length) {
|
|
793
|
+
console.error('[bitboss-ui] check: pass paths or `--changed`, not both.');
|
|
794
|
+
process.exit(1);
|
|
795
|
+
}
|
|
796
|
+
const changed = changedOnly ? changedCheckFiles(projectRoot) : null;
|
|
797
|
+
if (changed && 'error' in changed) {
|
|
798
|
+
console.error(`[bitboss-ui] ${changed.error}`);
|
|
799
|
+
process.exit(1);
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
/*
|
|
803
|
+
* `--manifest` answers the question `check` could not: "which of my files
|
|
804
|
+
* break in the version I am about to move to?". By
|
|
805
|
+
* default the manifest is the INSTALLED one, so the only way to see an
|
|
806
|
+
* upgrade's damage was to perform the upgrade first — exactly backwards for
|
|
807
|
+
* the one moment the answer is worth having.
|
|
808
|
+
*
|
|
809
|
+
* Deliberately a PATH, not a version: fetching a version would put a network
|
|
810
|
+
* call inside a validator that consumers run in CI, with a registry outage
|
|
811
|
+
* as a new failure mode. Getting the file is one documented command
|
|
812
|
+
* (`npm pack bitboss-ui@<version>`, or the public CDN copy), and pointing at
|
|
813
|
+
* it keeps this offline and reproducible.
|
|
814
|
+
*/
|
|
815
|
+
const installedManifest = join(PACKAGE_ROOT, 'dist', 'ai', 'components.json');
|
|
816
|
+
const manifestPath = manifestOverride
|
|
817
|
+
? resolve(projectRoot, manifestOverride)
|
|
818
|
+
: installedManifest;
|
|
819
|
+
if (!existsSync(manifestPath)) {
|
|
820
|
+
console.error(
|
|
821
|
+
manifestOverride
|
|
822
|
+
? `[bitboss-ui] --manifest: no file at ${manifestPath}.\n` +
|
|
823
|
+
'Point it at a components.json from the version you are moving to:\n' +
|
|
824
|
+
' npm pack bitboss-ui@<version> && tar -xzf bitboss-ui-<version>.tgz\n' +
|
|
825
|
+
' npx bitboss-ui check --manifest package/dist/ai/components.json'
|
|
826
|
+
: `[bitboss-ui] Manifest not found at ${manifestPath} — reinstall bitboss-ui (or run \`npm run build\` when working in the library repo).`
|
|
827
|
+
);
|
|
828
|
+
process.exit(1);
|
|
829
|
+
}
|
|
830
|
+
const manifest = loadManifest(manifestPath);
|
|
831
|
+
|
|
832
|
+
/*
|
|
833
|
+
* write the project's `bitboss-ui.d.ts` from the build config, the
|
|
834
|
+
* file the Vite plugin writes when Vite starts. Agents run `vue-tsc` before
|
|
835
|
+
* any dev start, so a name registered in `badgeVariants` was a type error
|
|
836
|
+
* (and an `as any`) until then. Same generator as the plugin; a config it
|
|
837
|
+
* cannot read is left alone. Not under `--manifest` (an upgrade preview
|
|
838
|
+
* must not touch the project).
|
|
839
|
+
*/
|
|
840
|
+
if (!manifestOverride) {
|
|
841
|
+
try {
|
|
842
|
+
const projectDts = await import(
|
|
843
|
+
pathToFileURL(join(PACKAGE_ROOT, 'dist', 'project-dts.js')).href
|
|
844
|
+
);
|
|
845
|
+
const i18n = await loadI18n(
|
|
846
|
+
pathToFileURL(join(PACKAGE_ROOT, 'dist') + '/')
|
|
847
|
+
);
|
|
848
|
+
const synced = syncProjectVariantDts(projectRoot, projectDts, i18n);
|
|
849
|
+
const notice = syncNotice(synced);
|
|
850
|
+
// a skip is said too (stderr under `--json`, like `--fix`'s lines).
|
|
851
|
+
if (notice && !(jsonMode && synced.status === 'written'))
|
|
852
|
+
(jsonMode ? console.error : console.log)(notice);
|
|
853
|
+
} catch {
|
|
854
|
+
// No built `dist/project-dts.js` (the library repo before a build):
|
|
855
|
+
// nothing to write with, and nothing for `check` to fail over.
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
/*
|
|
860
|
+
* Every `--bb-*` the INSTALLED package declares, read from the stylesheet
|
|
861
|
+
* the consumer actually ships. Read from disk rather than hardcoded so this
|
|
862
|
+
* can never claim a token is invented when their version does declare it.
|
|
863
|
+
* Absent stylesheet → an empty set → the unknown-token hint stays silent,
|
|
864
|
+
* which is the right failure: no data, no accusation.
|
|
865
|
+
*/
|
|
866
|
+
// Under `--manifest`, take the sheet from beside THAT manifest
|
|
867
|
+
// (`<pkg>/dist/ai/components.json` → `<pkg>/dist/styles.css`). Reading the
|
|
868
|
+
// installed sheet while judging props against another version would mix two
|
|
869
|
+
// releases in one verdict — the exact confusion this flag exists to end.
|
|
870
|
+
const stylesPath = manifestOverride
|
|
871
|
+
? join(dirname(dirname(manifestPath)), 'styles.css')
|
|
872
|
+
: join(PACKAGE_ROOT, 'dist', 'styles.css');
|
|
873
|
+
const knownTokens = loadKnownTokens(stylesPath);
|
|
874
|
+
const files = changed ? changed.files : resolveCheckFiles(projectRoot, globs);
|
|
875
|
+
|
|
876
|
+
// CHK-ALLOWCOMPONENTS: `Bb` is a naming convention, not proof of ownership.
|
|
877
|
+
// An app component called `BbRichEditor` is not invalid library markup, and
|
|
878
|
+
// before this the only way to silence it was to rename the component.
|
|
879
|
+
const explicitlyAllowed = new Set([
|
|
880
|
+
...configuredAllowComponents(projectRoot),
|
|
881
|
+
...allowComponents,
|
|
882
|
+
]);
|
|
883
|
+
// the app's own `Bb*` components (`.vue` files in its `components`
|
|
884
|
+
// dirs, Nuxt path-prefix names included) are skipped with zero config;
|
|
885
|
+
// imports from the app's own paths are handled per file by the validator.
|
|
886
|
+
const projectLocal = projectLocalBbComponents(projectRoot);
|
|
887
|
+
const allowedComponents = [...explicitlyAllowed, ...projectLocal.keys()];
|
|
888
|
+
|
|
889
|
+
// `--fix` applies the ESLint plugin's fixes (the registered v2→v3
|
|
890
|
+
// migrations) with ONLY the bitboss rules, then the check below reports
|
|
891
|
+
// what is left, so one command migrates and verifies.
|
|
892
|
+
if (fix) {
|
|
893
|
+
const outcome = await applyBitbossFixes({
|
|
894
|
+
projectRoot,
|
|
895
|
+
files,
|
|
896
|
+
manifestPath: manifestOverride ? manifestPath : undefined,
|
|
897
|
+
allowComponents: allowedComponents,
|
|
898
|
+
});
|
|
899
|
+
if ('error' in outcome) {
|
|
900
|
+
console.error(`[bitboss-ui] ${outcome.error}`);
|
|
901
|
+
process.exit(1);
|
|
902
|
+
}
|
|
903
|
+
const log = jsonMode ? console.error : console.log;
|
|
904
|
+
log(
|
|
905
|
+
outcome.fixed.length
|
|
906
|
+
? `[bitboss-ui] check --fix: fixed ${outcome.fixed.length} file(s):\n${outcome.fixed
|
|
907
|
+
.map((file) => ` ${relative(projectRoot, file)}`)
|
|
908
|
+
.join('\n')}`
|
|
909
|
+
: '[bitboss-ui] check --fix: nothing to fix.'
|
|
910
|
+
);
|
|
911
|
+
if (outcome.skipped?.length)
|
|
912
|
+
log(
|
|
913
|
+
`[bitboss-ui] check --fix: ESLint ignored ${outcome.skipped.length} file(s), not fixed:\n${outcome.skipped
|
|
914
|
+
.map((file) => ` ${relative(projectRoot, file)}`)
|
|
915
|
+
.join('\n')}`
|
|
916
|
+
);
|
|
917
|
+
}
|
|
918
|
+
// every `var(--x)` the project reads, from a whole-project sweep
|
|
919
|
+
// (explicit paths included): a local or token the app reads itself is its
|
|
920
|
+
// own, never "set and unread".
|
|
921
|
+
// one walk and one read per file serve every project-wide sweep
|
|
922
|
+
// below (reads, registered rules, the style scan) and the per-file loop.
|
|
923
|
+
const projectSources = collectCheckFiles(
|
|
924
|
+
projectRoot,
|
|
925
|
+
projectRoot,
|
|
926
|
+
HAND_IMPORTED_STYLES_EXTENSIONS,
|
|
927
|
+
gitignoreKit?.ancestorGitignores(projectRoot) ?? []
|
|
928
|
+
);
|
|
929
|
+
const texts = new Map();
|
|
930
|
+
const readText = (path) => {
|
|
931
|
+
if (!texts.has(path)) texts.set(path, readFileSync(path, 'utf-8'));
|
|
932
|
+
return texts.get(path);
|
|
933
|
+
};
|
|
934
|
+
const projectReads = new Set();
|
|
935
|
+
for (const path of projectSources)
|
|
936
|
+
try {
|
|
937
|
+
for (const name of localReads(readText(path))) projectReads.add(name);
|
|
938
|
+
} catch {
|
|
939
|
+
/* unreadable: its reads are unknown, which only means fewer passes */
|
|
940
|
+
}
|
|
941
|
+
// The tokens of the sheet `check` judges against (the installed one, or
|
|
942
|
+
// the one beside `--manifest`) — read AND declared names both count.
|
|
943
|
+
if (manifest.localSurface && existsSync(stylesPath))
|
|
944
|
+
manifest.localSurface.knownTokens = libraryTokens([
|
|
945
|
+
readFileSync(stylesPath, 'utf-8'),
|
|
946
|
+
...[join(dirname(stylesPath), 'reset.css')]
|
|
947
|
+
.filter((path) => existsSync(path))
|
|
948
|
+
.map((path) => readFileSync(path, 'utf-8')),
|
|
949
|
+
]);
|
|
950
|
+
// the rules the project registers with `defineRule`, from the same
|
|
951
|
+
// whole-project sweep, so a string rule nobody registered is caught:
|
|
952
|
+
// a call the sweep cannot read is kept by its place, never a silence.
|
|
953
|
+
const registeredRules = {
|
|
954
|
+
names: new Set(configuredRegisteredRules(projectRoot)),
|
|
955
|
+
unreadable: [],
|
|
956
|
+
stock: packageRuleNames(projectRoot),
|
|
957
|
+
};
|
|
958
|
+
const packageRules = registeredRules.stock;
|
|
959
|
+
const ownedRuleSource = ownedBy(projectRoot);
|
|
960
|
+
const presets = new Map();
|
|
961
|
+
const RULE_EXTENSIONS = ['.ts', '.js', '.mjs', '.cjs', '.vue'];
|
|
962
|
+
for (const path of projectSources.filter((file) =>
|
|
963
|
+
RULE_EXTENSIONS.some((ext) => file.endsWith(ext))
|
|
964
|
+
))
|
|
965
|
+
try {
|
|
966
|
+
const text = readText(path);
|
|
967
|
+
// the project's `definePreset` wrappers, by name.
|
|
968
|
+
for (const [name, preset] of presetDefinitions(text))
|
|
969
|
+
presets.set(name, preset);
|
|
970
|
+
// A nested app (its own package.json) registers nothing for this one.
|
|
971
|
+
if (ownedRuleSource(path))
|
|
972
|
+
addRegistrations(
|
|
973
|
+
registeredRules,
|
|
974
|
+
text,
|
|
975
|
+
relative(projectRoot, path),
|
|
976
|
+
packageRules
|
|
977
|
+
);
|
|
978
|
+
} catch {
|
|
979
|
+
/* unreadable: its registrations are unknown, said where they would be */
|
|
980
|
+
if (ownedRuleSource(path))
|
|
981
|
+
registeredRules.unreadable.push(relative(projectRoot, path));
|
|
982
|
+
}
|
|
983
|
+
const validateOptions = {
|
|
984
|
+
allowComponents: allowedComponents,
|
|
985
|
+
projectReads,
|
|
986
|
+
registeredRules,
|
|
987
|
+
presets,
|
|
988
|
+
// A variant the build plugin registers is the project's own name.
|
|
989
|
+
registeredVariants: readRegisteredVariants(
|
|
990
|
+
projectRoot,
|
|
991
|
+
REGISTERED_VARIANT_OPTIONS
|
|
992
|
+
),
|
|
993
|
+
optionsApiOff: readOptionsApiOff(projectRoot),
|
|
994
|
+
};
|
|
995
|
+
|
|
996
|
+
const findings = [];
|
|
997
|
+
let suppressed = 0;
|
|
998
|
+
/** One warning per local `Bb*` component, unless allowlisted. */
|
|
999
|
+
const warnedLocal = new Set();
|
|
1000
|
+
const warnLocal = (name, file, line) => {
|
|
1001
|
+
if (explicitlyAllowed.has(name) || warnedLocal.has(name)) return;
|
|
1002
|
+
warnedLocal.add(name);
|
|
1003
|
+
warnings.push(localBbWarning(name, file, line));
|
|
1004
|
+
};
|
|
1005
|
+
/*
|
|
1006
|
+
* Advisory only — see scripts/lib/hand-roll-hints.mjs. Hints never touch the
|
|
1007
|
+
* exit code, so a guess can never fail a consumer's build. `--no-hints`
|
|
1008
|
+
* silences them for anyone who finds them noisy.
|
|
1009
|
+
*/
|
|
1010
|
+
const hints = [];
|
|
1011
|
+
/** Findings graded `severity: 'warning'` — printed, never fatal. */
|
|
1012
|
+
const warnings = [];
|
|
1013
|
+
const wantHints = !process.argv.includes('--no-hints');
|
|
1014
|
+
for (const file of files) {
|
|
1015
|
+
const relPath = relative(projectRoot, file);
|
|
1016
|
+
const content = readText(file);
|
|
1017
|
+
const { findings: fileFindings } = file.endsWith('.md')
|
|
1018
|
+
? validateMarkdown(content, manifest, validateOptions)
|
|
1019
|
+
: validateVueSnippet(content, manifest, {
|
|
1020
|
+
...validateOptions,
|
|
1021
|
+
// The app's null-value policy, from the project bitboss-ui.d.ts.
|
|
1022
|
+
stringControls: stringControlsFor(file),
|
|
1023
|
+
// what the project registers globally.
|
|
1024
|
+
unimported: { project: projectResolution(projectRoot) },
|
|
1025
|
+
});
|
|
1026
|
+
// a finding the author silenced for ESLint (`eslint-disable*`,
|
|
1027
|
+
// usually with a reason) is silenced here too, or `check` cannot gate
|
|
1028
|
+
// CI next to a lint step that passes. `.md` lines are fence-relative,
|
|
1029
|
+
// and docs carry no directives, so only `.vue` files are filtered.
|
|
1030
|
+
const isDisabled = file.endsWith('.vue')
|
|
1031
|
+
? disabledChecker(content)
|
|
1032
|
+
: () => false;
|
|
1033
|
+
if (file.endsWith('.vue'))
|
|
1034
|
+
for (const [name, line] of localBbImports(content))
|
|
1035
|
+
warnLocal(name, relPath, line);
|
|
1036
|
+
for (const finding of fileFindings) {
|
|
1037
|
+
if (isDisabled(finding.line, ruleForFinding(finding))) {
|
|
1038
|
+
suppressed++;
|
|
1039
|
+
continue;
|
|
1040
|
+
}
|
|
1041
|
+
// A `severity: 'warning'` finding (a slot spelled the
|
|
1042
|
+
// pre-reset way) is shown and suppressible, but never fails the run.
|
|
1043
|
+
if (finding.severity === 'warning')
|
|
1044
|
+
warnings.push({ file: relPath, ...finding });
|
|
1045
|
+
else findings.push({ file: relPath, ...finding });
|
|
1046
|
+
}
|
|
1047
|
+
// .md files are documentation ABOUT components; a round <img> in a doc
|
|
1048
|
+
// example is illustrative, not a hand-roll.
|
|
1049
|
+
if (wantHints && !file.endsWith('.md')) {
|
|
1050
|
+
for (const hint of findHandRollHints(content, knownTokens)) {
|
|
1051
|
+
hints.push({ file: relPath, ...hint });
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
// a variant the build plugin registers that nothing paints
|
|
1057
|
+
// renders as the base plate (a solid primary badge). Read across the whole
|
|
1058
|
+
// project whatever the file scope: the paint can live in any stylesheet.
|
|
1059
|
+
{
|
|
1060
|
+
const config = readPluginConfig(projectRoot)?.config ?? 'vite.config';
|
|
1061
|
+
const sources = projectSources.flatMap((path) => {
|
|
1062
|
+
try {
|
|
1063
|
+
return [readText(path)];
|
|
1064
|
+
} catch {
|
|
1065
|
+
return [];
|
|
1066
|
+
}
|
|
1067
|
+
});
|
|
1068
|
+
for (const { option, name, className } of unstyledVariants(
|
|
1069
|
+
validateOptions.registeredVariants,
|
|
1070
|
+
sources
|
|
1071
|
+
))
|
|
1072
|
+
warnings.push({
|
|
1073
|
+
file: config,
|
|
1074
|
+
message: `\`${variantOptionLabel(option)}\` registers "${name}", but no project file paints \`.${className}\` (or a \`pt\` state for it): it renders as the default variant. Style it in a stylesheet loaded after bitboss-ui/styles.css (design-language guide § Getting soft semantic badges).`,
|
|
1075
|
+
});
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
// portal names, judged against the whole project's declarations
|
|
1079
|
+
// and call sites (scripts too: `confirm({ portal })` lives there). A full
|
|
1080
|
+
// run reads every source file; explicit paths / `--changed`, only those.
|
|
1081
|
+
// Markdown fences are never read: a doc names portals it never declares.
|
|
1082
|
+
{
|
|
1083
|
+
const portalIndex = projectPortalIndex(projectRoot);
|
|
1084
|
+
const PORTAL_SOURCE = /\.(?:vue|[cm]?[jt]sx?)$/;
|
|
1085
|
+
const TEST_FILE = /\.(?:test|spec)(?:-d)?\.[cm]?[jt]sx?$/;
|
|
1086
|
+
const portalScope = (
|
|
1087
|
+
changed ? changed.all : globs.length ? files : projectSources
|
|
1088
|
+
).filter(
|
|
1089
|
+
(path) =>
|
|
1090
|
+
PORTAL_SOURCE.test(path) &&
|
|
1091
|
+
!path.endsWith('.d.ts') &&
|
|
1092
|
+
!TEST_FILE.test(path)
|
|
1093
|
+
);
|
|
1094
|
+
for (const path of portalScope) {
|
|
1095
|
+
let content;
|
|
1096
|
+
try {
|
|
1097
|
+
content = readText(path);
|
|
1098
|
+
} catch {
|
|
1099
|
+
continue;
|
|
1100
|
+
}
|
|
1101
|
+
if (!MAY_HAVE_PORTALS.test(content)) continue;
|
|
1102
|
+
const isDisabled = disabledChecker(content);
|
|
1103
|
+
for (const finding of portalFindings(content, path, portalIndex)) {
|
|
1104
|
+
if (isDisabled(finding.line, ruleForFinding(finding))) {
|
|
1105
|
+
suppressed++;
|
|
1106
|
+
continue;
|
|
1107
|
+
}
|
|
1108
|
+
const entry = { file: relative(projectRoot, path), ...finding };
|
|
1109
|
+
if (finding.severity === 'warning') warnings.push(entry);
|
|
1110
|
+
else findings.push(entry);
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
// `--idioms`, the adoption checklist's patterns. Opt-in and
|
|
1116
|
+
// report-only (scripts/lib/idiom-scan.mjs): never a finding, never the exit
|
|
1117
|
+
// code. Same file scope as the portal names: scripts hold confirms and
|
|
1118
|
+
// mobile checks too.
|
|
1119
|
+
const idioms = [];
|
|
1120
|
+
if (wantIdioms) {
|
|
1121
|
+
const rows = loadAdoptionRows();
|
|
1122
|
+
const exts = new Set(rows.flatMap((row) => row.ext));
|
|
1123
|
+
const TEST_FILE = /\.(?:test|spec)(?:-d)?\.[cm]?[jt]sx?$/;
|
|
1124
|
+
const scope = changed ? changed.all : globs.length ? files : projectSources;
|
|
1125
|
+
// the repeats count across files, so they are judged at the end.
|
|
1126
|
+
const repeats = [];
|
|
1127
|
+
for (const path of scope) {
|
|
1128
|
+
const ext = path.slice(path.lastIndexOf('.') + 1);
|
|
1129
|
+
if (!exts.has(ext) || path.endsWith('.d.ts') || TEST_FILE.test(path))
|
|
1130
|
+
continue;
|
|
1131
|
+
let content;
|
|
1132
|
+
try {
|
|
1133
|
+
content = readText(path);
|
|
1134
|
+
} catch {
|
|
1135
|
+
continue;
|
|
1136
|
+
}
|
|
1137
|
+
const file = relative(projectRoot, path);
|
|
1138
|
+
for (const hit of scanIdioms(content, ext, rows))
|
|
1139
|
+
idioms.push({ file, ...hit });
|
|
1140
|
+
for (const occurrence of repeatOccurrences(content, ext))
|
|
1141
|
+
repeats.push({ file, ...occurrence });
|
|
1142
|
+
}
|
|
1143
|
+
idioms.push(...repeatedIdioms(repeats));
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
for (const [name, file] of projectLocal) warnLocal(name, file);
|
|
1147
|
+
// a `vue-tsc` below 3, read from package.json. One line, never
|
|
1148
|
+
// fatal. (A missing `checkUnknownComponents` is no longer warned about:
|
|
1149
|
+
// `unimported-component` covers it.)
|
|
1150
|
+
warnings.push(...toolchainWarnings(projectRoot));
|
|
1151
|
+
|
|
1152
|
+
// a hand import of `bitboss-ui/styles.css` while the runtime plugin
|
|
1153
|
+
// injects it. Project-level — the answer needs the build config — so it
|
|
1154
|
+
// reads the style and script files too; with explicit paths, only those.
|
|
1155
|
+
// `--changed`: every changed file, stylesheets and scripts included.
|
|
1156
|
+
const styleScan = changed
|
|
1157
|
+
? changed.all
|
|
1158
|
+
: globs.length
|
|
1159
|
+
? files
|
|
1160
|
+
: projectSources;
|
|
1161
|
+
findings.push(
|
|
1162
|
+
...handImportedStylesFindings(
|
|
1163
|
+
projectRoot,
|
|
1164
|
+
styleScan.map((path) => ({ path, relPath: relative(projectRoot, path) })),
|
|
1165
|
+
readText
|
|
1166
|
+
)
|
|
1167
|
+
);
|
|
1168
|
+
// A locale the library does not ship, in the build config and in
|
|
1169
|
+
// `setConfig({ locale })` (`en-UK` → `en-GB`).
|
|
1170
|
+
findings.push(
|
|
1171
|
+
...unknownLocaleFindings(
|
|
1172
|
+
projectRoot,
|
|
1173
|
+
styleScan.map((path) => ({ path, relPath: relative(projectRoot, path) })),
|
|
1174
|
+
manifest,
|
|
1175
|
+
readText,
|
|
1176
|
+
// The installed plugin's own locale-tag rules and messages.
|
|
1177
|
+
await loadLocaleTags(join(dirname(manifestPath), '..', 'locale-tags.js'))
|
|
1178
|
+
)
|
|
1179
|
+
);
|
|
1180
|
+
// A top-level build-plugin option the installed plugin does not take: the
|
|
1181
|
+
// build fails on it, so say so first. The key list is the plugin's own,
|
|
1182
|
+
// from the dist beside the manifest judged against.
|
|
1183
|
+
findings.push(
|
|
1184
|
+
...unknownPluginOptionFindings(
|
|
1185
|
+
projectRoot,
|
|
1186
|
+
await loadPluginOptionKeys(
|
|
1187
|
+
join(dirname(manifestPath), '..', 'utils', 'configDefaults.js')
|
|
1188
|
+
)
|
|
1189
|
+
)
|
|
1190
|
+
);
|
|
1191
|
+
// a project copy of the definePreset recipe older than the one
|
|
1192
|
+
// shipped beside the manifest judged against (`<dist>/ai/helpers/`), or
|
|
1193
|
+
// unstamped. Reads the stamp only: an edited copy is the app's own.
|
|
1194
|
+
findings.push(
|
|
1195
|
+
...staleDefinePresetFindings(
|
|
1196
|
+
styleScan.map((path) => ({ path, relPath: relative(projectRoot, path) })),
|
|
1197
|
+
readText,
|
|
1198
|
+
readShippedDefinePreset(dirname(manifestPath))
|
|
1199
|
+
)
|
|
1200
|
+
);
|
|
1201
|
+
// `.bb-*` selectors in the app's stylesheets (the `.vue` `<style>`
|
|
1202
|
+
// blocks are read by the validator above).
|
|
1203
|
+
for (const path of styleScan) {
|
|
1204
|
+
if (!/\.(?:css|scss|sass|less|pcss|postcss|styl)$/.test(path)) continue;
|
|
1205
|
+
const relPath = relative(projectRoot, path);
|
|
1206
|
+
const content = readText(path);
|
|
1207
|
+
for (const finding of [
|
|
1208
|
+
...cssClassFindings(content, manifest.cssSurface, {
|
|
1209
|
+
stylesheet: true,
|
|
1210
|
+
ownedBlocks: ownedClassBlocks(allowedComponents, manifest.cssSurface),
|
|
1211
|
+
}),
|
|
1212
|
+
// custom properties set where nothing reads them.
|
|
1213
|
+
...cssLocalFindings(content, manifest.cssSurface, manifest.localSurface, {
|
|
1214
|
+
stylesheet: true,
|
|
1215
|
+
projectReads,
|
|
1216
|
+
}),
|
|
1217
|
+
])
|
|
1218
|
+
findings.push({ file: relPath, ...finding });
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
/** One line, so a silenced finding is never invisible. */
|
|
1222
|
+
const printSuppressed = () => {
|
|
1223
|
+
if (suppressed === 0) return;
|
|
1224
|
+
console.log(
|
|
1225
|
+
`[bitboss-ui] ${suppressed} finding(s) silenced by eslint-disable comments.`
|
|
1226
|
+
);
|
|
1227
|
+
};
|
|
1228
|
+
|
|
1229
|
+
/** Warning block, printed on success and on failure alike. Never fatal. */
|
|
1230
|
+
const printWarnings = () => {
|
|
1231
|
+
if (warnings.length === 0) return;
|
|
1232
|
+
console.log(
|
|
1233
|
+
`\n[bitboss-ui] ${warnings.length} warning(s) — not fatal, but likely wrong:`
|
|
1234
|
+
);
|
|
1235
|
+
for (const warning of warnings) {
|
|
1236
|
+
const at = warning.line != null ? `:${warning.line}` : '';
|
|
1237
|
+
console.log(` ⚠ ${warning.file}${at} ${warning.message}`);
|
|
1238
|
+
}
|
|
1239
|
+
};
|
|
1240
|
+
|
|
1241
|
+
/** Advisory block, printed on success and on failure alike. Never fatal. */
|
|
1242
|
+
const printHints = () => {
|
|
1243
|
+
if (hints.length === 0) return;
|
|
1244
|
+
console.log(
|
|
1245
|
+
`\n[bitboss-ui] ${hints.length} hint(s) — advisory, not errors:`
|
|
1246
|
+
);
|
|
1247
|
+
for (const hint of hints) {
|
|
1248
|
+
console.log(` ${hint.file}:${hint.line}`);
|
|
1249
|
+
console.log(` → ${hint.message}`);
|
|
1250
|
+
}
|
|
1251
|
+
console.log(
|
|
1252
|
+
' Deliberate? Ignore these, record them in a HANDROLLED note, or pass --no-hints.'
|
|
1253
|
+
);
|
|
1254
|
+
};
|
|
1255
|
+
|
|
1256
|
+
/** The adoption checklist's report (`--idioms`). Never fatal. */
|
|
1257
|
+
const printIdioms = () => {
|
|
1258
|
+
if (!wantIdioms) return;
|
|
1259
|
+
if (idioms.length === 0) {
|
|
1260
|
+
console.log(
|
|
1261
|
+
'\n[bitboss-ui] idioms: no hand-rolled pattern from the adoption checklist found.'
|
|
1262
|
+
);
|
|
1263
|
+
return;
|
|
1264
|
+
}
|
|
1265
|
+
console.log(
|
|
1266
|
+
`\n[bitboss-ui] ${idioms.length} idiom(s) — hand-rolled patterns the library ships, report-only:`
|
|
1267
|
+
);
|
|
1268
|
+
for (const idiom of idioms)
|
|
1269
|
+
console.log(` ${idiom.file}:${idiom.line} [${idiom.id}] → ${idiom.use}`);
|
|
1270
|
+
console.log(
|
|
1271
|
+
' Rows, replacements and the scope rule: node_modules/bitboss-ui/dist/ai/guides/migration/adoption-checklist.md.\n' +
|
|
1272
|
+
' Kept on purpose? Say why in one line of a HANDROLLED note.'
|
|
1273
|
+
);
|
|
1274
|
+
};
|
|
1275
|
+
|
|
1276
|
+
/*
|
|
1277
|
+
* Which API the verdict is against. Silent when it is the installed one —
|
|
1278
|
+
* that is the assumption, and a banner on every run trains people to skip
|
|
1279
|
+
* it. Loud under `--manifest`, because "12 findings" means something
|
|
1280
|
+
* completely different when it describes a version you have not installed
|
|
1281
|
+
* yet, and a scrollback with no marker is indistinguishable from a normal
|
|
1282
|
+
* run.
|
|
1283
|
+
*/
|
|
1284
|
+
const judgedAgainst = manifestOverride
|
|
1285
|
+
? manifestVersionOf(manifestPath)
|
|
1286
|
+
: packageVersion();
|
|
1287
|
+
if (changed && !jsonMode) {
|
|
1288
|
+
console.log(
|
|
1289
|
+
`[bitboss-ui] check --changed: ${files.length} .vue/.md file(s) changed vs HEAD (untracked included).\n` +
|
|
1290
|
+
' Unchanged files are not validated, and the styles-import scan reads only the\n' +
|
|
1291
|
+
' changed files; the project-wide context (var() reads, defineRule names, local\n' +
|
|
1292
|
+
' Bb* components) still comes from the whole project. Run a full `check` before merging.'
|
|
1293
|
+
);
|
|
1294
|
+
}
|
|
1295
|
+
if (manifestOverride && !jsonMode) {
|
|
1296
|
+
console.log(
|
|
1297
|
+
`[bitboss-ui] check: judging against bitboss-ui ${judgedAgainst} (--manifest), NOT the installed ${packageVersion()}.\n` +
|
|
1298
|
+
' Findings describe the version you are moving TO.'
|
|
1299
|
+
);
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
if (jsonMode) {
|
|
1303
|
+
console.log(
|
|
1304
|
+
JSON.stringify(
|
|
1305
|
+
{
|
|
1306
|
+
findings,
|
|
1307
|
+
warnings,
|
|
1308
|
+
hints,
|
|
1309
|
+
...(wantIdioms ? { idioms } : {}),
|
|
1310
|
+
suppressed,
|
|
1311
|
+
files: files.length,
|
|
1312
|
+
...(changed ? { changed: true } : {}),
|
|
1313
|
+
manifestVersion: judgedAgainst,
|
|
1314
|
+
installedVersion: packageVersion(),
|
|
1315
|
+
},
|
|
1316
|
+
null,
|
|
1317
|
+
2
|
|
1318
|
+
)
|
|
1319
|
+
);
|
|
1320
|
+
if (findings.length > 0) process.exit(1);
|
|
1321
|
+
if (files.length === 0 && globs.length > 0 && !allowEmpty) process.exit(1);
|
|
1322
|
+
return;
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
|
+
if (files.length === 0) {
|
|
1326
|
+
// An EXPLICIT pattern that matched nothing is almost always a typo'd or
|
|
1327
|
+
// stale CI path, and answering it with exit 0 means the step goes green
|
|
1328
|
+
// having validated nothing — the check that was meant to catch bad
|
|
1329
|
+
// markup is itself the thing that broke, silently. A bare
|
|
1330
|
+
// sweep finding nothing is a different, legitimate case (a package with
|
|
1331
|
+
// no .vue files yet), so it still passes.
|
|
1332
|
+
if (changed) {
|
|
1333
|
+
console.log(
|
|
1334
|
+
'[bitboss-ui] check --changed: no changed .vue/.md files — nothing to validate.'
|
|
1335
|
+
);
|
|
1336
|
+
return;
|
|
1337
|
+
}
|
|
1338
|
+
if (globs.length > 0 && !allowEmpty) {
|
|
1339
|
+
console.error(
|
|
1340
|
+
`[bitboss-ui] check: no .vue/.md files matched ${globs.map((g) => `\`${g}\``).join(', ')} — nothing was validated. ` +
|
|
1341
|
+
'Fix the path, or pass `--allow-empty` if an empty match is expected.'
|
|
1342
|
+
);
|
|
1343
|
+
process.exit(1);
|
|
1344
|
+
}
|
|
1345
|
+
console.log(
|
|
1346
|
+
'[bitboss-ui] check: no .vue/.md files matched — nothing to do.'
|
|
1347
|
+
);
|
|
1348
|
+
printIdioms();
|
|
1349
|
+
return;
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
if (findings.length === 0) {
|
|
1353
|
+
console.log(
|
|
1354
|
+
`[bitboss-ui] check OK — ${summarizeFileCounts(files)} file(s), zero unknown Bb* props/v-models/slots/nav-attrs.`
|
|
1355
|
+
);
|
|
1356
|
+
printSuppressed();
|
|
1357
|
+
printWarnings();
|
|
1358
|
+
printHints();
|
|
1359
|
+
printIdioms();
|
|
1360
|
+
return;
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
printSuppressed();
|
|
1364
|
+
printWarnings();
|
|
1365
|
+
const fileCount = new Set(findings.map((f) => f.file)).size;
|
|
1366
|
+
console.error(
|
|
1367
|
+
`[bitboss-ui] check FAILED — ${findings.length} finding(s) across ${fileCount} file(s):`
|
|
1368
|
+
);
|
|
1369
|
+
let lastFile = null;
|
|
1370
|
+
for (const finding of findings) {
|
|
1371
|
+
if (finding.file !== lastFile) {
|
|
1372
|
+
console.error(`\n ${finding.file}`);
|
|
1373
|
+
lastFile = finding.file;
|
|
1374
|
+
}
|
|
1375
|
+
const where =
|
|
1376
|
+
finding.fenceInfo != null
|
|
1377
|
+
? `fence#${finding.fenceIndex}${finding.fenceInfo ? ` (${finding.fenceInfo})` : ''} `
|
|
1378
|
+
: '';
|
|
1379
|
+
// CHK-LINE: three identical `full-screen` findings under one filename
|
|
1380
|
+
// were indistinguishable, so every automated fix had to re-parse the
|
|
1381
|
+
// file to place them. The line comes straight off the template AST.
|
|
1382
|
+
const at = finding.line != null ? `line ${finding.line}: ` : '';
|
|
1383
|
+
// A `fallthrough` finding is not a typo and may be doing something
|
|
1384
|
+
// today — a native listener reaching the root element. It still counts,
|
|
1385
|
+
// but marking it `✗` alongside a genuinely broken prop is what let one
|
|
1386
|
+
// migration report read a live `<BbDialog @close>` as dead code.
|
|
1387
|
+
const mark = finding.fallthrough ? '⚠' : '✗';
|
|
1388
|
+
console.error(
|
|
1389
|
+
` ${mark} ${at}${where ? `[${where.trim()}] ` : ''}${finding.message}`
|
|
1390
|
+
);
|
|
1391
|
+
if (finding.hint) console.error(` hint: ${finding.hint}`);
|
|
1392
|
+
}
|
|
1393
|
+
console.error(
|
|
1394
|
+
'\nFix the markup (or the component API) so it stays copy-safe for agents.'
|
|
1395
|
+
);
|
|
1396
|
+
printFindingLegend(findings);
|
|
1397
|
+
printHints();
|
|
1398
|
+
printIdioms();
|
|
1399
|
+
process.exit(1);
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
function printHelp() {
|
|
1403
|
+
console.log(`bitboss-ui CLI
|
|
1404
|
+
|
|
1405
|
+
Usage:
|
|
1406
|
+
npx bitboss-ui <command>
|
|
1407
|
+
|
|
1408
|
+
Commands:
|
|
1409
|
+
setup [--yes] [--manual] [--no-ai] [--validation <lib>] [--[no-]eslint]
|
|
1410
|
+
One-time onboarding: installs bitboss-ui (and vee-validate
|
|
1411
|
+
+ the chosen schema library, @iconify-json/lucide), adds
|
|
1412
|
+
\`bitbossUi()\` to the Vite/Nuxt config and
|
|
1413
|
+
\`app.use(bitbossUiPlugin)\` to the entry (or prints the
|
|
1414
|
+
snippet when the file is too unusual to edit), sets
|
|
1415
|
+
\`cssLayers\` for Tailwind 4, \`resetCss\` and a detected
|
|
1416
|
+
\`locale\`, adds \`"postinstall": "bitboss-ui update --no-install || exit 0"\`
|
|
1417
|
+
and sets up coding agents. Auto by default (and without a
|
|
1418
|
+
terminal); --manual asks about validation, ESLint and
|
|
1419
|
+
agents. --validation: zod | yup | valibot | vee-validate |
|
|
1420
|
+
none. Idempotent; never commits.
|
|
1421
|
+
update [--no-install] [--all] [--since <version>]
|
|
1422
|
+
Installs the newest release on your channel, refreshes
|
|
1423
|
+
the agent setup and lists the breaking changes since the
|
|
1424
|
+
old version. Inside an install (the app's postinstall)
|
|
1425
|
+
it only refreshes the agent files, quietly, and never
|
|
1426
|
+
fails the install; skipped in CI, outside git and under
|
|
1427
|
+
BITBOSS_UI_AI=0. The agent setup: a marked block in
|
|
1428
|
+
AGENTS.md, an @AGENTS.md import in CLAUDE.md, and for
|
|
1429
|
+
each agent harness found in the repo or the home folder
|
|
1430
|
+
its MCP file and skill folder (--all: every harness).
|
|
1431
|
+
\`ai: false\` in the plugin options removes it.
|
|
1432
|
+
add <id…> | --all [--dir <path>] [--dry-run] [--json]
|
|
1433
|
+
Copy Inertia helpers (\`helpers list\`; --all for every
|
|
1434
|
+
one) into the app as
|
|
1435
|
+
files it owns, with every file they import, and record
|
|
1436
|
+
them in bitboss-ui.lock.json. Creates missing files and
|
|
1437
|
+
adopts identical ones; never changes an existing file.
|
|
1438
|
+
Prints the install line for missing npm packages; never
|
|
1439
|
+
runs it. First run: --dir, else
|
|
1440
|
+
resources/js/composables/inertia-helpers (Laravel) or
|
|
1441
|
+
src/composables/inertia-helpers.
|
|
1442
|
+
helpers [list] [--json]
|
|
1443
|
+
Every helper id, what it does, its files and packages,
|
|
1444
|
+
and its state in this app.
|
|
1445
|
+
helpers diff [id…] [--json]
|
|
1446
|
+
The state of every installed helper file; with ids, the
|
|
1447
|
+
difference between your copy and this bitboss-ui's.
|
|
1448
|
+
Exit 1 when something differs. Comments never count as
|
|
1449
|
+
edits: a stale file's comments are replaced by update.
|
|
1450
|
+
helpers update [id…] [--dry-run] [--json]
|
|
1451
|
+
Replace helper files that hold an older bitboss-ui
|
|
1452
|
+
version (formatting does not matter); keep the files
|
|
1453
|
+
you edited; keep a file you edited that bitboss-ui also
|
|
1454
|
+
changed, and the files that import it (exit 2), and
|
|
1455
|
+
update the rest of its group. \`npm update bitboss-ui\`
|
|
1456
|
+
does not touch your copies: run this after upgrading.
|
|
1457
|
+
add/helpers exit codes: 0 done or nothing to do; 1 usage
|
|
1458
|
+
error or diff found a difference; 2 refused (add wrote
|
|
1459
|
+
nothing); 3 a precondition failed, nothing written; 4 a
|
|
1460
|
+
write failed and was rolled back. No --force: to take
|
|
1461
|
+
bitboss-ui's copy over your edit, delete the file and
|
|
1462
|
+
run add again. --yes is accepted and does nothing (the
|
|
1463
|
+
commands never prompt).
|
|
1464
|
+
check [glob…] [--changed] [--json] [--allow-empty] [--allow-component <Name>]
|
|
1465
|
+
[--no-hints] [--manifest <path>] [--fix] [--idioms]
|
|
1466
|
+
Validate \`Bb*\` markup in .vue/.md files against the
|
|
1467
|
+
installed components.json manifest (unknown/removed props,
|
|
1468
|
+
bad v-models, unknown \`<template #slot>\` names,
|
|
1469
|
+
\`href\`/\`to\`/\`method\` on a component that doesn't declare
|
|
1470
|
+
them). Defaults to every .vue/.md file under the current directory
|
|
1471
|
+
(node_modules, dist, .git, vendor,
|
|
1472
|
+
storage, public, .output, .nuxt, bootstrap/cache
|
|
1473
|
+
excluded — pass an explicit glob/path to widen the scan).
|
|
1474
|
+
Exits 1 on findings, and on an explicit glob that matched
|
|
1475
|
+
nothing (a typo'd CI path validates zero files silently) —
|
|
1476
|
+
pass \`--allow-empty\` when an empty match is expected.
|
|
1477
|
+
|
|
1478
|
+
\`--changed\` validates only the .vue/.md files git reports
|
|
1479
|
+
changed against HEAD (staged or not) plus untracked ones —
|
|
1480
|
+
the fast loop after an edit. Unchanged files are not
|
|
1481
|
+
validated and the styles-import scan reads only the
|
|
1482
|
+
changed files; what a finding depends on elsewhere (the
|
|
1483
|
+
project's var() reads, defineRule names, local Bb*
|
|
1484
|
+
components) is still read from the whole project. Nothing
|
|
1485
|
+
changed → exit 0. Not with paths. Run a full \`check\`
|
|
1486
|
+
before merging.
|
|
1487
|
+
|
|
1488
|
+
It also writes your project's \`bitboss-ui.d.ts\` (the
|
|
1489
|
+
file the Vite plugin writes on start) from the variant
|
|
1490
|
+
options in vite.config / nuxt.config, so a newly
|
|
1491
|
+
registered variant name type-checks before Vite runs.
|
|
1492
|
+
Left alone when the options are not inline literals, and
|
|
1493
|
+
under \`--manifest\`.
|
|
1494
|
+
|
|
1495
|
+
\`--fix\` first applies the ESLint plugin's fixes (the
|
|
1496
|
+
registered renames — v2→v3 and between 3.0 betas, item
|
|
1497
|
+
fields included — polarity flips and value remaps) to the matched .vue files with ONLY the
|
|
1498
|
+
bitboss-ui rules — your own ESLint config is not used —
|
|
1499
|
+
then reports what is left. Needs \`eslint\` and
|
|
1500
|
+
\`vue-eslint-parser\` in the project.
|
|
1501
|
+
|
|
1502
|
+
\`--idioms\` also lists the hand-rolled controls still in
|
|
1503
|
+
the app that the library ships (radio cards, segmented
|
|
1504
|
+
controls, sortable headers, steppers, app sheets, app
|
|
1505
|
+
confirms, …) with file:line and the replacement: the
|
|
1506
|
+
adoption checklist's own rows, run over .vue and script
|
|
1507
|
+
files, and two repeats across files: one \`icon\` literal
|
|
1508
|
+
on 3+ BbAlert / toasts (→ a variant) and one \`pt:<part>\`
|
|
1509
|
+
literal on 3+ instances of a component (→ the global
|
|
1510
|
+
\`pt\` map). Report-only and opt-in: it never changes the
|
|
1511
|
+
exit code, and plain \`check\` never runs it. Guide:
|
|
1512
|
+
dist/ai/guides/migration/adoption-checklist.md.
|
|
1513
|
+
|
|
1514
|
+
Honours ESLint disable comments in .vue files: a finding
|
|
1515
|
+
silenced for the matching \`bitboss-ui/*\` rule (or by a
|
|
1516
|
+
bare \`eslint-disable\`) is not reported, only counted:
|
|
1517
|
+
<!-- eslint-disable-next-line bitboss-ui/require-table-slot-prop -- why -->
|
|
1518
|
+
|
|
1519
|
+
\`--manifest <path>\` judges against another version's
|
|
1520
|
+
components.json instead of the installed one — the answer
|
|
1521
|
+
to "which of my files break if I upgrade", BEFORE you
|
|
1522
|
+
upgrade. The banner names both versions so a findings list
|
|
1523
|
+
is never mistaken for one about your current install.
|
|
1524
|
+
npm pack bitboss-ui@3.0.0-beta.21
|
|
1525
|
+
tar -xzf bitboss-ui-3.0.0-beta.21.tgz
|
|
1526
|
+
npx bitboss-ui check --manifest package/dist/ai/components.json
|
|
1527
|
+
A path, not a version, on purpose: fetching one would put
|
|
1528
|
+
a registry call inside a validator people run in CI.
|
|
1529
|
+
|
|
1530
|
+
\`--allow-component <Name>\` (repeatable) exempts a
|
|
1531
|
+
component your APP owns whose name starts with \`Bb\` —
|
|
1532
|
+
the prefix is a convention, not proof of provenance.
|
|
1533
|
+
Persist the list instead of repeating the flag:
|
|
1534
|
+
package.json { "bitboss-ui": { "allowComponents": ["BbRichEditor"] } }
|
|
1535
|
+
or \`bitboss-ui.check.json\` \`{ "allowComponents": [...] }\`.
|
|
1536
|
+
Same option name as the ESLint rules' \`allowComponents\`,
|
|
1537
|
+
so both gates configure alike. An allowed or
|
|
1538
|
+
project-local component owns its \`bb-<kebab>\` class
|
|
1539
|
+
block, so CSS styling it is never \`unknown-class\`.
|
|
1540
|
+
|
|
1541
|
+
\`--json\` prints \`{ findings: [...], warnings: [...], hints: [...],
|
|
1542
|
+
suppressed, files, manifestVersion, installedVersion }\`
|
|
1543
|
+
(plus \`changed: true\` under \`--changed\`, and
|
|
1544
|
+
\`idioms: [{ file, line, id, use, count? }]\` under \`--idioms\`).
|
|
1545
|
+
Each finding: \`{ file, line, component, attr, kind,
|
|
1546
|
+
message, hint?, to? }\` (plus \`fenceIndex\`/\`fenceInfo\`
|
|
1547
|
+
inside a markdown fence; \`line\` is absolute in the file).
|
|
1548
|
+
\`kind\` is one of: \`removed-prop\` (a recorded break on a
|
|
1549
|
+
prop or a \`pt\` key, v2→v3 or a v3 beta; \`to\` is the new
|
|
1550
|
+
name when there is one and \`--fix\` writes it, else the
|
|
1551
|
+
message says what to do), \`unknown-prop\` (not a v3 prop of that component;
|
|
1552
|
+
may never have been one — see the legend the text output
|
|
1553
|
+
prints), \`unknown-component\` (a \`Bb*\` tag the
|
|
1554
|
+
manifest doesn't have; \`attr\` is the tag),
|
|
1555
|
+
\`unknown-model\`, \`unknown-event\`, \`removed-event\`
|
|
1556
|
+
(a listener for an event the component no longer emits,
|
|
1557
|
+
e.g. BbColorPalette \`@update:open\`), \`unknown-slot\`,
|
|
1558
|
+
\`unknown-pt-key\` (a key of the \`pt\` object form that
|
|
1559
|
+
matches no part / state; \`to\` when the part was renamed),
|
|
1560
|
+
\`no-default-slot\`, \`empty-dropzone\` (a warning: a
|
|
1561
|
+
BbDropzone with nothing in its slot, the only surface
|
|
1562
|
+
it has, renders 0px tall), \`inert-nav-attr\`,
|
|
1563
|
+
\`nameless-control\` (an icon-only BbButton or BbBadge,
|
|
1564
|
+
or a BbProgress, with no accessible name),
|
|
1565
|
+
\`removed-css-local\` (a component CSS local the
|
|
1566
|
+
library removed, e.g. \`--day-slot-allowance\`),
|
|
1567
|
+
\`renamed-export\` (an import of a name bitboss-ui
|
|
1568
|
+
renamed, e.g. \`useBbFormContext\` → \`useBbForm\`),
|
|
1569
|
+
\`private-import\` (an import from inside the package's
|
|
1570
|
+
\`dist/\`), \`not-exported-type\` (a \`Pt*\` pt type
|
|
1571
|
+
imported from bitboss-ui: type pt through
|
|
1572
|
+
\`<Component>Props['pt']\` instead),
|
|
1573
|
+
\`missing-value\` / \`missing-id\` /
|
|
1574
|
+
\`duplicate-row-label\` (a BbDropdown row in a
|
|
1575
|
+
selectable group without a \`value\`, a selectable
|
|
1576
|
+
group without an \`id\`, or two value-less rows with
|
|
1577
|
+
the same \`label\` in one group; before
|
|
1578
|
+
3.0.0-beta.49 \`missing-key\` / \`duplicate-row-text\`),
|
|
1579
|
+
\`renamed-item-field\` (a dropdown row \`key\` /
|
|
1580
|
+
\`text\`, a dropdown group \`key\`, a tab \`key\` or a
|
|
1581
|
+
crumb \`key\` / \`text\` in an inline or same-file
|
|
1582
|
+
items array: rows and crumbs take \`value\` /
|
|
1583
|
+
\`label\`, tabs \`value\`, groups \`id\`; \`--fix\`
|
|
1584
|
+
rewrites it),
|
|
1585
|
+
\`renamed-slot-prop\` (a BbTabs
|
|
1586
|
+
\`#wrapper:prepend\` / \`#wrapper:append\` scope
|
|
1587
|
+
spelling \`canScrollLeft\` / \`canScrollRight\` or
|
|
1588
|
+
\`scroll('left' | 'right')\`: they read
|
|
1589
|
+
\`canScrollStart\` / \`canScrollEnd\` and
|
|
1590
|
+
\`scroll('start' | 'end')\`; \`--fix\` rewrites it),
|
|
1591
|
+
\`tab-link-navigation\` / \`tab-link-missing\` (a
|
|
1592
|
+
BbTabs whose items have \`href\` / \`to\` is a nav of
|
|
1593
|
+
links: \`navigation\` on it does nothing, and an item
|
|
1594
|
+
with neither renders as a disabled link),
|
|
1595
|
+
\`unknown-variant\` (a variant name from another
|
|
1596
|
+
library, e.g. \`danger\` on BbAlert / BbBadge; the
|
|
1597
|
+
message names ours),
|
|
1598
|
+
\`duplicate-field-identity\` (two validated fields in
|
|
1599
|
+
one \`BbForm\` on the same path: the same \`name\`,
|
|
1600
|
+
or the same label with no \`name\`),
|
|
1601
|
+
\`unimported-component\` (a \`.vue\` file uses a
|
|
1602
|
+
bitboss-ui tag it never imports and the project never
|
|
1603
|
+
registers globally: it renders as an empty element),
|
|
1604
|
+
\`reactive-v-model\` (a \`v-model\` on a \`<script
|
|
1605
|
+
setup>\` \`const x = reactive(…)\`: a production build
|
|
1606
|
+
rejects the write-back; hold it in a \`ref()\`),
|
|
1607
|
+
\`text-null-value\` (a \`v-model\` on BbTextInput /
|
|
1608
|
+
BbTextarea bound to a ref typed \`string\` while the
|
|
1609
|
+
field writes \`null\` once emptied: widen it to
|
|
1610
|
+
\`ref<string | null>\`, or \`null-value="string"\`),
|
|
1611
|
+
\`dropdown-default-slot\` (a trigger in a BbDropdown's
|
|
1612
|
+
default slot, which holds BbDropdownGroup companions:
|
|
1613
|
+
it opens nothing; use \`#activator="{ props }"\` with
|
|
1614
|
+
\`v-bind="props"\`, or \`v-bb-dropdown\`),
|
|
1615
|
+
\`collapsible-trigger-aria\` (an element whose
|
|
1616
|
+
\`@click="open = !open"\` flips a BbCollapsible's
|
|
1617
|
+
ref, with no \`aria-expanded\`: add
|
|
1618
|
+
\`:aria-expanded="open"\` + \`aria-controls\`),
|
|
1619
|
+
\`carousel-prop-or-local\` (a BbCarousel that sets
|
|
1620
|
+
\`per-view\` / \`bleed\` and the \`--per-view\` /
|
|
1621
|
+
\`--bleed\` local it stands for: use one; the
|
|
1622
|
+
prop for one value, the local per breakpoint),
|
|
1623
|
+
\`carousel-items-without-slide\` (a BbCarousel with
|
|
1624
|
+
no \`#slide\` whose \`items\` hold objects with
|
|
1625
|
+
neither \`src\` nor \`srcset\`: each renders an
|
|
1626
|
+
empty slide; add \`src\` or render them with
|
|
1627
|
+
\`#slide\`),
|
|
1628
|
+
\`form-v-model\` (\`v-model\`, \`:model-value\` or an
|
|
1629
|
+
\`@update:model-value\` listener on a \`BbForm\`: it
|
|
1630
|
+
takes its object one way, \`:model="draft"\`),
|
|
1631
|
+
\`bare-portal-name\` (\`v-bb-popover="user-card"\` /
|
|
1632
|
+
\`v-bb-hover-card="user-card"\` without the inner
|
|
1633
|
+
quotes: an expression, not a portal name; write
|
|
1634
|
+
\`"'user-card'"\`),
|
|
1635
|
+
\`unknown-portal\` (\`v-bb-hover-card\` /
|
|
1636
|
+
\`v-bb-popover\` / \`confirm()\` names a portal no
|
|
1637
|
+
\`<…Portal name>\` in the project declares; did-you-mean
|
|
1638
|
+
in the message), \`portal-family-mismatch\` (a
|
|
1639
|
+
hover-card portal opened by \`v-bb-popover\`, or the
|
|
1640
|
+
other way round; literal names only, a \`:name\`
|
|
1641
|
+
binding or a non-literal call site is never judged),
|
|
1642
|
+
\`unknown-dialog\` (\`v-bb-dialog\` /
|
|
1643
|
+
\`v-bb-off-canvas\` / \`useBbDialog()\` /
|
|
1644
|
+
\`useBbOffCanvas()\` names an id no
|
|
1645
|
+
\`<BbDialog | BbOffCanvas id>\` declares, or one of
|
|
1646
|
+
the other family; literal ids only),
|
|
1647
|
+
\`positional-provider\` (an \`items\` provider with
|
|
1648
|
+
positional arguments: it receives one object,
|
|
1649
|
+
\`({ query, reason, modelValue, signal })\`),
|
|
1650
|
+
\`rules-ignored-by-schema\` (a validated field's
|
|
1651
|
+
\`rules\` inside a \`BbForm\` that has a \`schema\`:
|
|
1652
|
+
vee-validate reads only the schema),
|
|
1653
|
+
\`row-without-name\` (a form control in a \`v-for\`
|
|
1654
|
+
inside a \`BbForm\` with a bound label and no \`name\`),
|
|
1655
|
+
\`field-without-name\` (a field with its own
|
|
1656
|
+
\`v-model\` and no \`name\` in a \`BbForm\` with
|
|
1657
|
+
\`field-errors\`: its errors never reach it; your
|
|
1658
|
+
\`definePreset\` wrappers count as their Bb* control),
|
|
1659
|
+
\`retired-entrypoint\` (an import from
|
|
1660
|
+
\`bitboss-ui/validated\`, retired: everything is in
|
|
1661
|
+
\`bitboss-ui\`; \`--fix\` rewrites it in .vue files),
|
|
1662
|
+
\`unregistered-rule\` (a string or object rule no
|
|
1663
|
+
\`defineRule\` in the project registers (in a .md
|
|
1664
|
+
page, also one the page's own fences show); a
|
|
1665
|
+
registration it cannot read is named, never skipped:
|
|
1666
|
+
list such names under \`registeredRules\` in
|
|
1667
|
+
bitboss-ui.check.json),
|
|
1668
|
+
\`invalid-value\` (a static value outside a closed
|
|
1669
|
+
union, e.g. \`placement="bottom-centre"\`; variants
|
|
1670
|
+
and other registry-backed unions are not checked),
|
|
1671
|
+
\`stale-define-preset\` (a copy of the definePreset
|
|
1672
|
+
recipe whose \`// bitboss-ui definePreset rev N\` stamp
|
|
1673
|
+
is older than the shipped one, or missing; update it
|
|
1674
|
+
with \`cp node_modules/bitboss-ui/dist/ai/helpers/definePreset.ts <file>\`),
|
|
1675
|
+
\`wrapper-drops-props\` (a wrapper whose
|
|
1676
|
+
\`defineProps\` declares a \`Bb*Props\` type, bare,
|
|
1677
|
+
\`Omit\` or \`Pick\`, and never binds or reads some
|
|
1678
|
+
of those props: a caller's value is dropped),
|
|
1679
|
+
\`renamed-slot\` (a slot the library renamed;
|
|
1680
|
+
\`--fix\` rewrites it), \`missing-partner-prop\`,
|
|
1681
|
+
\`conflicting-props\` (props that replace each
|
|
1682
|
+
other set together, e.g. BbSlider \`items\` beside
|
|
1683
|
+
\`step\` / \`min\` / \`max\`),
|
|
1684
|
+
\`partner-prop\`,
|
|
1685
|
+
\`validated-only-prop\`, \`object-items-without-text\`
|
|
1686
|
+
(object \`items\` with neither a \`label\` nor a
|
|
1687
|
+
\`text\` field and no \`item-text\`; reads only
|
|
1688
|
+
an inline array, or a \`const\` array, \`ref([…])\` or
|
|
1689
|
+
\`reactive([…])\` in the same file's
|
|
1690
|
+
\`<script setup>\`), \`reserved-key\` (a column
|
|
1691
|
+
\`key\` or item \`value\` whose slot name is one of
|
|
1692
|
+
the component's own slots, e.g. a BbTable column keyed
|
|
1693
|
+
\`actions\`; read from the manifest, same-file items
|
|
1694
|
+
only), \`hand-imported-styles\`
|
|
1695
|
+
(\`bitboss-ui/styles.css\` imported in CSS, a script or
|
|
1696
|
+
Nuxt's \`css\` while \`injectStyles\` is on: delete it;
|
|
1697
|
+
read only when vite.config / nuxt.config says so),
|
|
1698
|
+
\`unknown-locale\` (a \`locale\` / \`enabledLocales\`
|
|
1699
|
+
literal in vite.config / nuxt.config, or a
|
|
1700
|
+
\`setConfig({ locale })\`, that bitboss-ui does not
|
|
1701
|
+
ship; \`suggestion\` is the nearest one: en-UK →
|
|
1702
|
+
en-GB), \`unknown-class\` (a selector on a \`.bb-*\` class the
|
|
1703
|
+
library does not render, in a stylesheet or a
|
|
1704
|
+
\`<style>\` block; \`suggestion\` is the nearest real
|
|
1705
|
+
one), \`renamed-class\` (a class the library renamed;
|
|
1706
|
+
\`to\` is its successor). Your own classes are never
|
|
1707
|
+
read, nor a \`bb-*\` class the same file adds itself
|
|
1708
|
+
(\`class\`, \`:class\`, \`pt:*\`), \`inert-token\` (a
|
|
1709
|
+
\`--bb-*\` SET that the library neither declares nor
|
|
1710
|
+
reads; \`suggestion\` = the nearest token),
|
|
1711
|
+
\`inert-local\` (a local set on a \`.bb-*\` block, nested
|
|
1712
|
+
rules included, or on a Bb* tag's \`style\` / \`:style\` /
|
|
1713
|
+
\`[--x:…]\` class, whose component, and what it mounts,
|
|
1714
|
+
never reads it; \`to\` when it was renamed). A local on your own ancestor
|
|
1715
|
+
element, or one your CSS reads, is never judged.
|
|
1716
|
+
\`warnings[]\` (never fail the run) use the same shape with
|
|
1717
|
+
\`severity: "warning"\`: \`likely-squashed-slot\` (a slot
|
|
1718
|
+
name that looks like a camelCase key squashed, e.g.
|
|
1719
|
+
\`#createdat\`), \`computed-slot-key\` (a computed slot
|
|
1720
|
+
name over keys \`check\` cannot see, not spelled
|
|
1721
|
+
through \`slotKey(…)\`), \`local-bb-component\` (your own
|
|
1722
|
+
component uses the \`Bb\` prefix; rename it),
|
|
1723
|
+
\`single-reason\` (an \`items\` provider that tests
|
|
1724
|
+
\`reason\` against one cause other than \`'search'\`;
|
|
1725
|
+
check \`reason !== 'search'\`), \`unused-portal\` (a
|
|
1726
|
+
\`<…Portal name>\` nothing opens: no call site and the
|
|
1727
|
+
name in no string of the project), \`vue-tsc-major\`
|
|
1728
|
+
(\`vue-tsc\` below 3 in package.json: the generic
|
|
1729
|
+
components' props go unchecked), \`prefer-v-bb-dialog\`
|
|
1730
|
+
(a \`ref(false)\` only a BbDialog / BbOffCanvas
|
|
1731
|
+
\`v-model\` and \`@click="x = true"\` use: give the
|
|
1732
|
+
dialog an \`id\` and put \`v-bb-dialog\` on the
|
|
1733
|
+
trigger; ESLint's \`--fix\` rewrites it when nothing
|
|
1734
|
+
else uses the ref), \`hidden-label-placeholder\` (a
|
|
1735
|
+
field or select with \`hide-label\` and no
|
|
1736
|
+
\`placeholder\`: an empty unlabelled box to a sighted
|
|
1737
|
+
user; add a \`placeholder\`).
|
|
1738
|
+
changelog [--since <version>] [--until <version>] [--json]
|
|
1739
|
+
Breaking changes between two releases — "what breaks if I
|
|
1740
|
+
bump". \`--since\` is the version you are ON, and is
|
|
1741
|
+
exclusive. With no range, every break in the v2 → v3
|
|
1742
|
+
upgrade. Then what the range added, one line per feature
|
|
1743
|
+
(with no range, only their count). Fixes are not tracked,
|
|
1744
|
+
so no breaking changes means nothing breaks, not that
|
|
1745
|
+
nothing changed.
|
|
1746
|
+
npx bitboss-ui changelog --since 3.0.0-beta.20
|
|
1747
|
+
Pair it with \`check --manifest\` to turn the list into the
|
|
1748
|
+
files in YOUR app that break.
|
|
1749
|
+
|
|
1750
|
+
mcp Start a stdio MCP server exposing the dist/ai knowledge
|
|
1751
|
+
base (search_docs, search_components, get_component,
|
|
1752
|
+
get_composable, get_css_surface, list_tokens,
|
|
1753
|
+
list_guides, get_guide, list_changes, list_recipes,
|
|
1754
|
+
get_recipe, validate) to MCP-capable agent harnesses.
|
|
1755
|
+
help Show this help.
|
|
1756
|
+
`);
|
|
1757
|
+
}
|
|
1758
|
+
|
|
1759
|
+
/**
|
|
1760
|
+
* Strict `node:util` parseArgs wrapper: unknown flags/positionals become an
|
|
1761
|
+
* actionable `[bitboss-ui] <command>: …` error + help + exit 1.
|
|
1762
|
+
*/
|
|
1763
|
+
function parseCommandArgs(
|
|
1764
|
+
command,
|
|
1765
|
+
args,
|
|
1766
|
+
options,
|
|
1767
|
+
{ allowPositionals = false } = {}
|
|
1768
|
+
) {
|
|
1769
|
+
try {
|
|
1770
|
+
return parseArgs({ args, options, allowPositionals, strict: true });
|
|
1771
|
+
} catch (error) {
|
|
1772
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
1773
|
+
console.error(`[bitboss-ui] ${command}: ${message}`);
|
|
1774
|
+
printHelp();
|
|
1775
|
+
process.exit(1);
|
|
1776
|
+
}
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1779
|
+
const [command, ...commandArgs] = process.argv.slice(2);
|
|
1780
|
+
|
|
1781
|
+
switch (command) {
|
|
1782
|
+
case 'ai-init': {
|
|
1783
|
+
// Retired for `update`; agent files written before
|
|
1784
|
+
// still tell agents to run it, so name the replacement.
|
|
1785
|
+
console.error(
|
|
1786
|
+
"[bitboss-ui] `ai-init` is now `npx bitboss-ui update --no-install` (the app's postinstall runs it on every install). Run `npx bitboss-ui setup` once to wire that up."
|
|
1787
|
+
);
|
|
1788
|
+
process.exitCode = 1;
|
|
1789
|
+
break;
|
|
1790
|
+
}
|
|
1791
|
+
case 'update': {
|
|
1792
|
+
const { values } = parseCommandArgs(command, commandArgs, {
|
|
1793
|
+
'no-install': { type: 'boolean' },
|
|
1794
|
+
since: { type: 'string' },
|
|
1795
|
+
all: { type: 'boolean' },
|
|
1796
|
+
});
|
|
1797
|
+
await updateCommand({
|
|
1798
|
+
install: !values['no-install'],
|
|
1799
|
+
since: values.since,
|
|
1800
|
+
all: values.all ?? false,
|
|
1801
|
+
});
|
|
1802
|
+
break;
|
|
1803
|
+
}
|
|
1804
|
+
case 'check': {
|
|
1805
|
+
const { values, positionals } = parseCommandArgs(
|
|
1806
|
+
command,
|
|
1807
|
+
commandArgs,
|
|
1808
|
+
{
|
|
1809
|
+
json: { type: 'boolean' },
|
|
1810
|
+
'allow-empty': { type: 'boolean' },
|
|
1811
|
+
'allow-component': { type: 'string', multiple: true },
|
|
1812
|
+
fix: { type: 'boolean' },
|
|
1813
|
+
manifest: { type: 'string' },
|
|
1814
|
+
changed: { type: 'boolean' },
|
|
1815
|
+
idioms: { type: 'boolean' },
|
|
1816
|
+
// Accepted and ignored here — read straight off argv inside
|
|
1817
|
+
// checkCommand, but parseArgs is strict, so it must be declared.
|
|
1818
|
+
'no-hints': { type: 'boolean' },
|
|
1819
|
+
},
|
|
1820
|
+
{ allowPositionals: true }
|
|
1821
|
+
);
|
|
1822
|
+
await checkCommand(positionals, {
|
|
1823
|
+
fix: values.fix ?? false,
|
|
1824
|
+
json: values.json ?? false,
|
|
1825
|
+
allowEmpty: values['allow-empty'] ?? false,
|
|
1826
|
+
allowComponents: values['allow-component'] ?? [],
|
|
1827
|
+
manifest: values.manifest,
|
|
1828
|
+
changed: values.changed ?? false,
|
|
1829
|
+
idioms: values.idioms ?? false,
|
|
1830
|
+
});
|
|
1831
|
+
break;
|
|
1832
|
+
}
|
|
1833
|
+
case 'changelog': {
|
|
1834
|
+
const { values } = parseCommandArgs(command, commandArgs, {
|
|
1835
|
+
since: { type: 'string' },
|
|
1836
|
+
until: { type: 'string' },
|
|
1837
|
+
json: { type: 'boolean' },
|
|
1838
|
+
});
|
|
1839
|
+
changelogCommand({
|
|
1840
|
+
since: values.since,
|
|
1841
|
+
until: values.until,
|
|
1842
|
+
json: values.json ?? false,
|
|
1843
|
+
});
|
|
1844
|
+
break;
|
|
1845
|
+
}
|
|
1846
|
+
case 'mcp': {
|
|
1847
|
+
// The SDK + zod pair ships bundled (dist/mcp-sdk.mjs), so the server
|
|
1848
|
+
// starts with nothing else installed; an app's own pair in range wins
|
|
1849
|
+
// (scripts/lib/mcp-sdk.mjs). The one failure left is a
|
|
1850
|
+
// package with no dist/ and no SDK installed: say so.
|
|
1851
|
+
let main;
|
|
1852
|
+
try {
|
|
1853
|
+
({ main } = await import('./bitboss-ui-mcp.mjs'));
|
|
1854
|
+
} catch (error) {
|
|
1855
|
+
if (
|
|
1856
|
+
error?.code !== 'ERR_MODULE_NOT_FOUND' ||
|
|
1857
|
+
!/dist[/\\]mcp-sdk\.mjs|@modelcontextprotocol\/sdk/.test(
|
|
1858
|
+
String(error.message)
|
|
1859
|
+
)
|
|
1860
|
+
)
|
|
1861
|
+
throw error;
|
|
1862
|
+
console.error(
|
|
1863
|
+
'bitboss-ui mcp: dist/mcp-sdk.mjs is missing — reinstall bitboss-ui (in the library repo: `npm run build`).'
|
|
1864
|
+
);
|
|
1865
|
+
process.exitCode = 1;
|
|
1866
|
+
break;
|
|
1867
|
+
}
|
|
1868
|
+
await main();
|
|
1869
|
+
break;
|
|
1870
|
+
}
|
|
1871
|
+
case 'add':
|
|
1872
|
+
case 'helpers': {
|
|
1873
|
+
const { values, positionals } = parseCommandArgs(
|
|
1874
|
+
command,
|
|
1875
|
+
commandArgs,
|
|
1876
|
+
{
|
|
1877
|
+
json: { type: 'boolean' },
|
|
1878
|
+
'dry-run': { type: 'boolean' },
|
|
1879
|
+
yes: { type: 'boolean', short: 'y' },
|
|
1880
|
+
...(command === 'add'
|
|
1881
|
+
? { dir: { type: 'string' }, all: { type: 'boolean' } }
|
|
1882
|
+
: {}),
|
|
1883
|
+
},
|
|
1884
|
+
{ allowPositionals: true }
|
|
1885
|
+
);
|
|
1886
|
+
const [sub, ...rest] =
|
|
1887
|
+
command === 'add' ? ['add', ...positionals] : positionals;
|
|
1888
|
+
const subcommand = command === 'add' ? 'add' : (sub ?? 'list');
|
|
1889
|
+
if (subcommand === 'list' && values['dry-run']) {
|
|
1890
|
+
console.error(
|
|
1891
|
+
'[bitboss-ui] helpers list: --dry-run applies to add and update'
|
|
1892
|
+
);
|
|
1893
|
+
process.exit(1);
|
|
1894
|
+
}
|
|
1895
|
+
const { runHelpers } = await import('../scripts/lib/helpers-add.mjs');
|
|
1896
|
+
const result = await runHelpers({
|
|
1897
|
+
command: subcommand,
|
|
1898
|
+
ids: command === 'add' ? positionals : rest,
|
|
1899
|
+
options: {
|
|
1900
|
+
dir: values.dir,
|
|
1901
|
+
dryRun: values['dry-run'] ?? false,
|
|
1902
|
+
all: values.all ?? false,
|
|
1903
|
+
},
|
|
1904
|
+
cwd: process.cwd(),
|
|
1905
|
+
packageRoot: PACKAGE_ROOT,
|
|
1906
|
+
});
|
|
1907
|
+
if (values.json) console.log(JSON.stringify(result.report));
|
|
1908
|
+
else (result.stderr ? console.error : console.log)(result.lines.join('\n'));
|
|
1909
|
+
process.exitCode = result.code;
|
|
1910
|
+
break;
|
|
1911
|
+
}
|
|
1912
|
+
case 'help':
|
|
1913
|
+
case '--help':
|
|
1914
|
+
case '-h':
|
|
1915
|
+
case undefined:
|
|
1916
|
+
printHelp();
|
|
1917
|
+
break;
|
|
1918
|
+
default:
|
|
1919
|
+
console.error(`[bitboss-ui] Unknown command: ${command}`);
|
|
1920
|
+
printHelp();
|
|
1921
|
+
process.exit(1);
|
|
1922
|
+
}
|