bitboss-ui 3.0.0-beta.3 → 3.0.0-beta.31
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 +220 -65
- package/bin/bitboss-ui-mcp.mjs +474 -17
- package/bin/bitboss-ui.mjs +348 -50
- package/dist/ai/BbAccordion.md +150 -32
- package/dist/ai/BbAlert.md +124 -21
- package/dist/ai/BbAsterisk.md +53 -1
- package/dist/ai/BbAvatar.md +179 -27
- package/dist/ai/BbBadge.md +228 -37
- package/dist/ai/BbBadgeButton.md +68 -16
- package/dist/ai/BbBaseButton.md +123 -46
- package/dist/ai/BbBaseCheckboxIcon.md +114 -26
- package/dist/ai/BbBaseRadioIcon.md +111 -26
- package/dist/ai/BbBaseSwitchIcon.md +119 -28
- package/dist/ai/BbBreadcrumbs.md +195 -43
- package/dist/ai/BbButton.md +323 -76
- package/dist/ai/BbCalendar.md +621 -0
- package/dist/ai/BbCheckbox.md +216 -56
- package/dist/ai/BbCheckboxGroup.md +267 -30
- package/dist/ai/BbCollapsible.md +154 -39
- package/dist/ai/BbColorInput.md +280 -44
- package/dist/ai/BbColorPalette.md +228 -45
- package/dist/ai/BbConfirm.md +201 -41
- package/dist/ai/BbDatePicker.md +253 -25
- package/dist/ai/BbDatePickerInput.md +297 -54
- package/dist/ai/BbDialog.md +464 -73
- package/dist/ai/BbDropdown.md +938 -77
- package/dist/ai/BbDropdownButton.md +188 -48
- package/dist/ai/BbDropdownGroup.md +9 -1
- package/dist/ai/BbDropzone.md +122 -16
- package/dist/ai/BbForm.md +49 -14
- package/dist/ai/BbIcon.md +93 -32
- package/dist/ai/BbIndicator.md +73 -10
- package/dist/ai/BbNumberInput.md +211 -45
- package/dist/ai/BbOffCanvas.md +357 -66
- package/dist/ai/BbPagination.md +165 -26
- package/dist/ai/BbPopover.md +189 -34
- package/dist/ai/BbProgress.md +96 -55
- package/dist/ai/BbPtScope.md +136 -0
- package/dist/ai/BbRadio.md +205 -26
- package/dist/ai/BbRadioGroup.md +346 -39
- package/dist/ai/BbRating.md +130 -25
- package/dist/ai/BbSelect.md +583 -77
- package/dist/ai/BbSelectPopover.md +351 -82
- package/dist/ai/BbSlider.md +226 -51
- package/dist/ai/BbSmoothHeight.md +136 -32
- package/dist/ai/BbSpinner.md +166 -74
- package/dist/ai/BbSwitch.md +219 -31
- package/dist/ai/BbSwitchGroup.md +267 -29
- package/dist/ai/BbTable.md +1314 -162
- package/dist/ai/BbTabs.md +586 -114
- package/dist/ai/BbTabsList.md +58 -3
- package/dist/ai/BbTabsPanes.md +34 -2
- package/dist/ai/BbTabsRoot.md +61 -10
- package/dist/ai/BbTag.md +220 -42
- package/dist/ai/BbTextInput.md +429 -55
- package/dist/ai/BbTextarea.md +263 -51
- package/dist/ai/BbTimePicker.md +126 -11
- package/dist/ai/BbTimePickerInput.md +237 -22
- package/dist/ai/BbToast.md +183 -38
- package/dist/ai/BbToastPortal.md +28 -1
- package/dist/ai/BbTooltip.md +170 -30
- package/dist/ai/BbTree.md +236 -74
- package/dist/ai/ChipsBox.md +41 -1
- package/dist/ai/ClearableButton.md +12 -0
- package/dist/ai/CommaBox.md +1 -0
- package/dist/ai/{BbBaseInputContainer.md → CommonField.md} +19 -17
- package/dist/ai/CommonFieldInput.md +90 -0
- package/dist/ai/CommonPopover.md +12 -7
- package/dist/ai/CommonTimeSelector.md +61 -0
- package/dist/ai/ErrorIcon.md +20 -0
- package/dist/ai/FlatListBox.md +33 -5
- package/dist/ai/GroupedListBox.md +33 -5
- package/dist/ai/ListBox.md +37 -4
- package/dist/ai/OptionsContainer.md +6 -5
- package/dist/ai/WarningIcon.md +20 -0
- package/dist/ai/changelog.json +1212 -44
- package/dist/ai/components.json +41488 -9859
- package/dist/ai/composables/useBbConfig.md +72 -11
- package/dist/ai/composables/useConfirm.md +10 -5
- package/dist/ai/composables/useToast.md +4 -2
- package/dist/ai/guides/agent-contract.md +95 -10
- package/dist/ai/guides/ai-router.md +57 -31
- package/dist/ai/guides/app-layout.md +3 -1
- package/dist/ai/guides/component-picker.md +27 -20
- package/dist/ai/guides/design-language.md +217 -61
- package/dist/ai/guides/design-tokens.md +448 -105
- package/dist/ai/guides/fetch-items-playbook.md +1 -1
- package/dist/ai/guides/icons-policy.md +55 -23
- package/dist/ai/guides/inline-edit-playbook.md +1 -1
- package/dist/ai/guides/installation-and-plugin-setup.md +621 -45
- package/dist/ai/guides/migration/components/bb-accordion.md +29 -0
- package/dist/ai/guides/migration/components/bb-alert.md +2 -2
- package/dist/ai/guides/migration/components/bb-avatar.md +13 -14
- package/dist/ai/guides/migration/components/bb-breadcrumbs.md +8 -7
- package/dist/ai/guides/migration/components/bb-button.md +80 -20
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +61 -28
- package/dist/ai/guides/migration/components/bb-checkbox.md +45 -10
- package/dist/ai/guides/migration/components/bb-collapsible.md +5 -5
- package/dist/ai/guides/migration/components/bb-color-palette.md +9 -9
- package/dist/ai/guides/migration/components/bb-date-picker-input.md +39 -29
- package/dist/ai/guides/migration/components/bb-dialog.md +68 -35
- package/dist/ai/guides/migration/components/bb-dropdown.md +30 -8
- package/dist/ai/guides/migration/components/bb-offcanvas.md +29 -13
- package/dist/ai/guides/migration/components/bb-popover.md +12 -11
- package/dist/ai/guides/migration/components/bb-rating.md +52 -17
- package/dist/ai/guides/migration/components/bb-select-popover.md +8 -0
- package/dist/ai/guides/migration/components/bb-select.md +18 -2
- package/dist/ai/guides/migration/components/bb-table.md +560 -28
- package/dist/ai/guides/migration/components/bb-tabs.md +56 -14
- package/dist/ai/guides/migration/components/bb-text-input.md +12 -12
- package/dist/ai/guides/migration/components/bb-tooltip.md +18 -0
- package/dist/ai/guides/migration/v2-to-v3.md +526 -192
- package/dist/ai/guides/options-items-playbook.md +57 -1
- package/dist/ai/guides/passthrough.md +748 -0
- package/dist/ai/guides/ssr-prefill.md +120 -0
- package/dist/ai/guides/validated-forms.md +5 -0
- package/dist/ai/index.md +24 -36
- package/dist/ai/recipes/inertia/approvals-inbox.md +3 -4
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +10 -11
- package/dist/ai/recipes/inertia/layout-scaffold.md +5 -1
- package/dist/ai/recipes/inertia/onboarding.md +2 -2
- package/dist/ai/recipes/inertia/ownership-atlas.md +66 -44
- package/dist/ai/recipes/inertia/record-form.md +5 -6
- package/dist/ai/recipes/inertia/records-workspace.md +133 -12
- package/dist/ai/recipes/inertia/upload-center.md +8 -9
- package/dist/ai/recipes/inertia/wizard-form.md +68 -5
- package/dist/ai/recipes/nuxt/approvals-inbox.md +3 -4
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +10 -11
- package/dist/ai/recipes/nuxt/layout-scaffold.md +5 -1
- package/dist/ai/recipes/nuxt/onboarding.md +2 -2
- package/dist/ai/recipes/nuxt/record-form.md +5 -6
- package/dist/ai/recipes/nuxt/records-workspace.md +135 -12
- package/dist/ai/recipes/nuxt/upload-center.md +8 -9
- package/dist/ai/recipes/nuxt/wizard-form.md +68 -5
- package/dist/ai/recipes/vue/approvals-inbox.md +3 -4
- package/dist/ai/recipes/vue/inline-edit-workspace.md +10 -11
- package/dist/ai/recipes/vue/layout-scaffold.md +5 -1
- package/dist/ai/recipes/vue/onboarding.md +2 -2
- package/dist/ai/recipes/vue/record-form.md +10 -10
- package/dist/ai/recipes/vue/records-workspace.md +129 -12
- package/dist/ai/recipes/vue/upload-center.md +8 -9
- package/dist/ai/recipes/vue/wizard-form.md +65 -5
- package/dist/ai/source/BbAccordion.md +83 -21
- package/dist/ai/source/BbAlert.md +188 -60
- package/dist/ai/source/BbAsterisk.md +54 -4
- package/dist/ai/source/BbAvatar.md +63 -16
- package/dist/ai/source/BbBadge.md +196 -60
- package/dist/ai/source/BbBadgeButton.md +150 -43
- package/dist/ai/source/BbBaseButton.md +103 -9
- package/dist/ai/source/BbBaseCheckboxIcon.md +151 -36
- package/dist/ai/source/BbBaseRadioIcon.md +121 -17
- package/dist/ai/source/BbBaseSwitchIcon.md +138 -28
- package/dist/ai/source/BbBreadcrumbs.md +246 -57
- package/dist/ai/source/BbButton.md +457 -165
- package/dist/ai/source/BbCalendar.md +1621 -0
- package/dist/ai/source/BbCheckbox.md +433 -59
- package/dist/ai/source/BbCheckboxGroup.md +722 -77
- package/dist/ai/source/BbCollapsible.md +90 -8
- package/dist/ai/source/BbColorInput.md +505 -58
- package/dist/ai/source/BbColorPalette.md +1169 -51
- package/dist/ai/source/BbConfirm.md +134 -4
- package/dist/ai/source/BbConfirmPortal.md +83 -0
- package/dist/ai/source/BbDatePicker.md +471 -369
- package/dist/ai/source/BbDatePickerInput.md +1973 -106
- package/dist/ai/source/BbDialog.md +435 -45
- package/dist/ai/source/BbDropdown.md +777 -135
- package/dist/ai/source/BbDropdownButton.md +305 -74
- package/dist/ai/source/BbDropdownGroup.md +605 -68
- package/dist/ai/source/BbDropzone.md +93 -14
- package/dist/ai/source/BbForm.md +95 -7
- package/dist/ai/source/BbIcon.md +114 -48
- package/dist/ai/source/BbIndicator.md +85 -42
- package/dist/ai/source/BbNumberInput.md +574 -73
- package/dist/ai/source/BbOffCanvas.md +789 -249
- package/dist/ai/source/BbPagination.md +124 -19
- package/dist/ai/source/BbPopover.md +227 -79
- package/dist/ai/source/BbProgress.md +53 -5
- package/dist/ai/source/BbPtScope.md +54 -0
- package/dist/ai/source/BbRadio.md +369 -52
- package/dist/ai/source/BbRadioGroup.md +707 -91
- package/dist/ai/source/BbRating.md +645 -73
- package/dist/ai/source/BbSelect.md +939 -76
- package/dist/ai/source/BbSelectPopover.md +614 -66
- package/dist/ai/source/BbSlider.md +1205 -81
- package/dist/ai/source/BbSmoothHeight.md +48 -2
- package/dist/ai/source/BbSpinner.md +62 -6
- package/dist/ai/source/BbSwitch.md +277 -55
- package/dist/ai/source/BbSwitchGroup.md +568 -77
- package/dist/ai/source/BbTable.md +5754 -1777
- package/dist/ai/source/BbTabs.md +189 -90
- package/dist/ai/source/BbTabsList.md +219 -90
- package/dist/ai/source/BbTabsPanes.md +191 -85
- package/dist/ai/source/BbTabsRoot.md +183 -84
- package/dist/ai/source/BbTag.md +670 -76
- package/dist/ai/source/BbTextInput.md +439 -59
- package/dist/ai/source/BbTextarea.md +483 -54
- package/dist/ai/source/BbTimePicker.md +305 -56
- package/dist/ai/source/BbTimePickerInput.md +1145 -91
- package/dist/ai/source/BbToast.md +121 -36
- package/dist/ai/source/BbToastPortal.md +77 -27
- package/dist/ai/source/BbTooltip.md +147 -22
- package/dist/ai/source/BbTree.md +61 -3
- package/dist/ai/source/ChipsBox.md +12 -2
- package/dist/ai/source/CommaBox.md +10 -2
- package/dist/ai/source/{BbBaseInputContainer.md → CommonField.md} +318 -210
- package/dist/ai/source/CommonFieldInput.md +799 -0
- package/dist/ai/source/CommonPopover.md +108 -26
- package/dist/ai/source/CommonTimeSelector.md +642 -0
- package/dist/ai/source/ErrorIcon.md +2 -2
- package/dist/ai/source/FlatListBox.md +172 -11
- package/dist/ai/source/GroupedListBox.md +198 -11
- package/dist/ai/source/GuidesComponent.md +14 -7
- package/dist/ai/source/ListBox.md +29 -2
- package/dist/ai/source/OptionsContainer.md +197 -26
- package/dist/ai/source/WarningIcon.md +2 -2
- package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +49 -32
- package/dist/components/BbAccordion/types.d.ts +32 -1
- package/dist/components/BbAccordion/types.js +11 -0
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +45 -29
- package/dist/components/BbAlert/types.d.ts +35 -1
- package/dist/components/BbAlert/types.js +13 -0
- package/dist/components/BbAsterisk/BbAsterisk.vue.d.ts +3 -1
- package/dist/components/BbAsterisk/BbAsterisk.vue_vue_type_script_setup_true_lang.js +23 -8
- package/dist/components/BbAsterisk/types.d.ts +18 -0
- package/dist/components/BbAsterisk/types.js +7 -0
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -1
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +57 -44
- package/dist/components/BbAvatar/types.d.ts +23 -0
- package/dist/components/BbAvatar/types.js +7 -0
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +22 -16
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +95 -52
- package/dist/components/BbBadge/BbBadgeButton.vue_vue_type_script_setup_true_lang.js +27 -8
- package/dist/components/BbBadge/badgeButtonContext.d.ts +25 -8
- package/dist/components/BbBadge/types.d.ts +46 -3
- package/dist/components/BbBadge/types.js +13 -0
- package/dist/components/BbBaseButton/BbBaseButton.vue_vue_type_script_setup_true_lang.js +110 -97
- package/dist/components/BbBaseButton/RouterComponent.vue_vue_type_script_setup_true_lang.js +11 -11
- package/dist/components/BbBaseButton/types.d.ts +28 -0
- package/dist/components/BbBaseButton/types.js +9 -2
- package/dist/components/BbBaseCheckboxIcon/BbBaseCheckboxIcon.vue_vue_type_script_setup_true_lang.js +50 -18
- package/dist/components/BbBaseCheckboxIcon/types.d.ts +31 -2
- package/dist/components/BbBaseCheckboxIcon/types.js +8 -0
- package/dist/components/BbBaseRadioIcon/BbBaseRadioIcon.vue_vue_type_script_setup_true_lang.js +45 -15
- package/dist/components/BbBaseRadioIcon/types.d.ts +31 -2
- package/dist/components/BbBaseRadioIcon/types.js +8 -0
- package/dist/components/BbBaseSwitchIcon/BbBaseSwitchIcon.vue_vue_type_script_setup_true_lang.js +48 -16
- package/dist/components/BbBaseSwitchIcon/types.d.ts +31 -2
- package/dist/components/BbBaseSwitchIcon/types.js +8 -0
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +151 -110
- package/dist/components/BbBreadcrumbs/types.d.ts +40 -0
- package/dist/components/BbBreadcrumbs/types.js +12 -0
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +104 -77
- package/dist/components/BbButton/types.d.ts +49 -2
- package/dist/components/BbButton/types.js +12 -0
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +34 -0
- package/dist/components/BbCalendar/BbCalendar.vue.js +6 -0
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +576 -0
- package/dist/components/BbCalendar/CalendarMonthPanel.vue.js +5 -0
- package/dist/components/BbCalendar/CalendarMonthPanel.vue_vue_type_script_setup_true_lang.js +124 -0
- package/dist/components/BbCalendar/CalendarYearPanel.vue.js +5 -0
- package/dist/components/BbCalendar/CalendarYearPanel.vue_vue_type_script_setup_true_lang.js +126 -0
- package/dist/components/BbCalendar/calendarHost.d.ts +29 -0
- package/dist/components/BbCalendar/calendarHost.js +10 -0
- package/dist/components/BbCalendar/types.d.ts +215 -0
- package/dist/components/BbCalendar/types.js +28 -0
- package/dist/components/{BbBaseDatePicker/useDatePickerContext.d.ts → BbCalendar/useCalendarContext.d.ts} +10 -7
- package/dist/components/BbCalendar/useCalendarContext.js +11 -0
- package/dist/components/BbCalendar/useCalendarGrid.d.ts +208 -0
- package/dist/components/BbCalendar/useCalendarGrid.js +269 -0
- package/dist/components/BbCalendar/useDayGrid.d.ts +79 -0
- package/dist/components/BbCalendar/useDayGrid.js +203 -0
- package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +1 -1
- package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +194 -67
- package/dist/components/BbCheckbox/types.d.ts +164 -9
- package/dist/components/BbCheckbox/types.js +8 -0
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +3 -3
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +310 -80
- package/dist/components/BbCheckboxGroup/types.d.ts +152 -8
- package/dist/components/BbCheckboxGroup/types.js +10 -0
- package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +2 -1
- package/dist/components/BbCollapsible/BbCollapsible.vue_vue_type_script_setup_true_lang.js +41 -19
- package/dist/components/BbCollapsible/types.d.ts +44 -1
- package/dist/components/BbCollapsible/types.js +7 -0
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +11 -1
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +306 -81
- package/dist/components/BbColorInput/types.d.ts +204 -6
- package/dist/components/BbColorInput/types.js +24 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +10 -2
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +508 -104
- package/dist/components/BbColorPalette/types.d.ts +72 -3
- package/dist/components/BbColorPalette/types.js +12 -0
- package/dist/components/BbConfirm/BbConfirm.vue.d.ts +2 -1
- package/dist/components/BbConfirm/BbConfirm.vue_vue_type_script_setup_true_lang.js +116 -76
- package/dist/components/BbConfirm/types.d.ts +49 -0
- package/dist/components/BbConfirm/types.js +17 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +16 -10
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +294 -218
- package/dist/components/BbDatePicker/types.d.ts +98 -15
- package/dist/components/BbDatePicker/types.js +32 -0
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +14 -2
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +1148 -82
- package/dist/components/BbDatePickerInput/types.d.ts +201 -11
- package/dist/components/BbDatePickerInput/types.js +38 -0
- package/dist/components/BbDialog/BbDialog.vue.d.ts +4 -4
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +218 -136
- package/dist/components/BbDialog/types.d.ts +86 -2
- package/dist/components/BbDialog/types.js +16 -0
- package/dist/components/BbDialog/useDialogStack.d.ts +12 -0
- package/dist/components/BbDialog/useDialogStack.js +9 -2
- package/dist/components/BbDropdown/AdaptiveDropdown.vue.d.ts +2 -0
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +108 -96
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +10 -2
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +354 -290
- package/dist/components/BbDropdown/BbDropdownList.vue.d.ts +6 -0
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +330 -281
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +100 -89
- package/dist/components/BbDropdown/normalizeGroups.js +35 -31
- package/dist/components/BbDropdown/types.d.ts +230 -12
- package/dist/components/BbDropdown/types.js +20 -2
- package/dist/components/BbDropdown/useDropdownContext.d.ts +7 -1
- package/dist/components/BbDropdown/useDropdownGroupRegistry.d.ts +1 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +13 -3
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +123 -37
- package/dist/components/BbDropdownButton/types.d.ts +105 -3
- package/dist/components/BbDropdownButton/types.js +30 -0
- package/dist/components/BbDropzone/BbDropzone.vue_vue_type_script_setup_true_lang.js +169 -138
- package/dist/components/BbDropzone/types.d.ts +32 -1
- package/dist/components/BbDropzone/types.js +16 -0
- package/dist/components/BbIcon/BbIcon.vue_vue_type_script_setup_true_lang.js +58 -48
- package/dist/components/BbIcon/iconCache.d.ts +63 -0
- package/dist/components/BbIcon/iconCache.js +35 -0
- package/dist/components/BbIcon/types.d.ts +22 -2
- package/dist/components/BbIcon/types.js +7 -0
- package/dist/components/BbIndicator/BbIndicator.vue_vue_type_script_setup_true_lang.js +33 -20
- package/dist/components/BbIndicator/types.d.ts +24 -0
- package/dist/components/BbIndicator/types.js +7 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +6 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +272 -80
- package/dist/components/BbNumberInput/types.d.ts +178 -11
- package/dist/components/BbNumberInput/types.js +8 -0
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +4 -4
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +294 -207
- package/dist/components/BbOffCanvas/types.d.ts +73 -5
- package/dist/components/BbOffCanvas/types.js +15 -0
- package/dist/components/BbPagination/BbPagination.vue.d.ts +1 -1
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +119 -96
- package/dist/components/BbPagination/types.d.ts +32 -0
- package/dist/components/BbPagination/types.js +11 -0
- package/dist/components/BbPopover/BbPopover.vue.d.ts +5 -5
- package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +151 -121
- package/dist/components/BbPopover/types.d.ts +47 -2
- package/dist/components/BbPopover/types.js +14 -0
- package/dist/components/BbProgress/BbProgress.vue_vue_type_script_setup_true_lang.js +27 -15
- package/dist/components/BbProgress/types.d.ts +21 -0
- package/dist/components/BbProgress/types.js +7 -0
- package/dist/components/BbPtScope/BbPtScope.vue.d.ts +12 -0
- package/dist/components/BbPtScope/BbPtScope.vue.js +5 -0
- package/dist/components/BbPtScope/BbPtScope.vue_vue_type_script_setup_true_lang.js +13 -0
- package/dist/components/BbPtScope/types.d.ts +15 -0
- package/dist/components/BbRadio/BbRadio.vue.d.ts +1 -1
- package/dist/components/BbRadio/BbRadio.vue_vue_type_script_setup_true_lang.js +166 -56
- package/dist/components/BbRadio/types.d.ts +137 -9
- package/dist/components/BbRadio/types.js +8 -0
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +2 -2
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +292 -82
- package/dist/components/BbRadioGroup/types.d.ts +155 -10
- package/dist/components/BbRadioGroup/types.js +10 -0
- package/dist/components/BbRating/BbRating.vue.d.ts +4 -2
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +244 -73
- package/dist/components/BbRating/types.d.ts +152 -6
- package/dist/components/BbRating/types.js +21 -0
- package/dist/components/BbSelect/BbSelect.vue.d.ts +3 -3
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +474 -75
- package/dist/components/BbSelect/types.d.ts +174 -8
- package/dist/components/BbSelect/types.js +26 -0
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +461 -349
- package/dist/components/BbSelectPopover/types.d.ts +114 -4
- package/dist/components/BbSelectPopover/types.js +24 -0
- package/dist/components/BbSlider/BbSlider.vue.d.ts +10 -4
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +396 -92
- package/dist/components/BbSlider/types.d.ts +175 -6
- package/dist/components/BbSlider/types.js +21 -0
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +1 -1
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue_vue_type_script_setup_true_lang.js +60 -48
- package/dist/components/BbSmoothHeight/types.d.ts +19 -0
- package/dist/components/BbSmoothHeight/types.js +7 -0
- package/dist/components/BbSpinner/BbSpinner.vue_vue_type_script_setup_true_lang.js +27 -14
- package/dist/components/BbSpinner/types.d.ts +22 -1
- package/dist/components/BbSpinner/types.js +7 -0
- package/dist/components/BbSwitch/BbSwitch.vue.d.ts +1 -1
- package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +202 -75
- package/dist/components/BbSwitch/types.d.ts +25 -10
- package/dist/components/BbSwitch/types.js +5 -0
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +2 -2
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +310 -80
- package/dist/components/BbSwitchGroup/types.d.ts +29 -6
- package/dist/components/BbSwitchGroup/types.js +5 -0
- package/dist/components/BbTable/BbTable.vue.d.ts +10 -4
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1583 -655
- package/dist/components/BbTable/BbTableDataRow.d.ts +169 -0
- package/dist/components/BbTable/BbTableDataRow.js +133 -0
- package/dist/components/BbTable/BbTableExpandRow.d.ts +73 -0
- package/dist/components/BbTable/BbTableExpandRow.js +52 -0
- package/dist/components/BbTable/BbTableSelectToggle.d.ts +103 -0
- package/dist/components/BbTable/BbTableSelectToggle.js +114 -0
- package/dist/components/BbTable/types.d.ts +372 -111
- package/dist/components/BbTable/types.js +18 -0
- package/dist/components/BbTable/utils.d.ts +92 -4
- package/dist/components/BbTable/utils.js +72 -37
- package/dist/components/BbTabs/BbTabs.vue_vue_type_script_setup_true_lang.js +32 -20
- package/dist/components/BbTabs/BbTabsList.vue.d.ts +3 -10
- package/dist/components/BbTabs/BbTabsList.vue_vue_type_script_setup_true_lang.js +39 -33
- package/dist/components/BbTabs/BbTabsPanes.vue_vue_type_script_setup_true_lang.js +14 -13
- package/dist/components/BbTabs/BbTabsRoot.vue_vue_type_script_setup_true_lang.js +12 -1
- package/dist/components/BbTabs/types.d.ts +84 -11
- package/dist/components/BbTabs/types.js +11 -0
- package/dist/components/BbTag/BbTag.vue.d.ts +7 -4
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +350 -88
- package/dist/components/BbTag/types.d.ts +90 -5
- package/dist/components/BbTag/types.js +8 -0
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +4 -2
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +245 -80
- package/dist/components/BbTextInput/types.d.ts +147 -6
- package/dist/components/BbTextInput/types.js +8 -0
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +1 -1
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +273 -91
- package/dist/components/BbTextarea/types.d.ts +134 -6
- package/dist/components/BbTextarea/types.js +8 -0
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +10 -2
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +159 -107
- package/dist/components/BbTimePicker/types.d.ts +66 -3
- package/dist/components/BbTimePicker/types.js +12 -0
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +12 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +708 -83
- package/dist/components/BbTimePickerInput/types.d.ts +128 -12
- package/dist/components/BbTimePickerInput/types.js +23 -0
- package/dist/components/BbToast/BbToast.vue_vue_type_script_setup_true_lang.js +51 -25
- package/dist/components/BbToast/BbToastMessage.vue.d.ts +3 -0
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +48 -47
- package/dist/components/BbToast/BbToastRegion.vue.d.ts +3 -0
- package/dist/components/BbToast/BbToastRegion.vue_vue_type_script_setup_true_lang.js +72 -64
- package/dist/components/BbToast/types.d.ts +28 -0
- package/dist/components/BbToast/types.js +13 -0
- package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +100 -84
- package/dist/components/BbTooltip/types.d.ts +40 -2
- package/dist/components/BbTooltip/types.js +7 -0
- package/dist/components/BbTree/BbTree.vue.d.ts +11 -1
- package/dist/components/BbTree/BbTree.vue_vue_type_script_setup_true_lang.js +44 -28
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +13 -12
- package/dist/components/BbTree/context.d.ts +4 -1
- package/dist/components/BbTree/types.d.ts +36 -1
- package/dist/components/BbTree/types.js +7 -0
- package/dist/components/ChipsBox/ChipsBox.vue_vue_type_script_setup_true_lang.js +9 -7
- package/dist/components/ChipsBox/types.d.ts +6 -0
- package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/components/CommaBox/CommaBox.vue_vue_type_script_setup_true_lang.js +11 -7
- package/dist/components/CommaBox/types.d.ts +6 -0
- package/dist/components/{BbBaseInputContainer/BbBaseInputContainer.vue.d.ts → CommonField/CommonField.vue.d.ts} +4 -4
- package/dist/components/{BbBaseRadio/BbBaseRadio.vue.js → CommonField/CommonField.vue.js} +2 -2
- package/dist/components/CommonField/CommonField.vue_vue_type_script_setup_true_lang.js +178 -0
- package/dist/components/CommonField/messageHeightMatrix.d.ts +2 -0
- package/dist/components/{BbBaseInputContainer → CommonField}/types.d.ts +33 -10
- package/dist/components/{CommonInputWrapper/CommonInputWrapper.vue.d.ts → CommonFieldInput/CommonFieldInput.vue.d.ts} +5 -4
- package/dist/components/{BbBaseRadioGroup/BbBaseRadioGroup.vue.js → CommonFieldInput/CommonFieldInput.vue.js} +2 -2
- package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +116 -0
- package/dist/components/CommonFieldInput/boxBorderMatrix.d.ts +10 -0
- package/dist/components/{CommonInputWrapper → CommonFieldInput}/types.d.ts +25 -6
- package/dist/components/CommonPopover/CommonPopover.vue.d.ts +11 -2
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +76 -63
- package/dist/components/CommonPopover/types.d.ts +27 -8
- package/dist/components/{BbBaseDatePickerInput/BbBaseDatePickerTimeSelector.vue.d.ts → CommonTimeSelector/CommonTimeSelector.vue.d.ts} +4 -1
- package/dist/components/{BbBaseColorPalette/BbBaseColorPalette.vue.js → CommonTimeSelector/CommonTimeSelector.vue.js} +2 -2
- package/dist/components/CommonTimeSelector/CommonTimeSelector.vue_vue_type_script_setup_true_lang.js +207 -0
- package/dist/components/CommonTimeSelector/types.d.ts +6 -0
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +163 -100
- package/dist/components/FlatListBox/types.d.ts +15 -0
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +190 -127
- package/dist/components/GroupedListBox/types.d.ts +15 -0
- package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +82 -66
- package/dist/components/ListBox/types.d.ts +15 -0
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +89 -35
- package/dist/components/OptionsContainer/types.d.ts +37 -5
- package/dist/composables/useBaseOptions.d.ts +12 -1
- package/dist/composables/useBaseOptions.js +63 -31
- package/dist/composables/useBbConfig.d.ts +27 -6
- package/dist/composables/useBbConfig.js +8 -2
- package/dist/composables/useBbDropdownContext.d.ts +5 -0
- package/dist/composables/useBbTabsContext.d.ts +16 -2
- package/dist/composables/useBbTabsContext.js +157 -145
- package/dist/composables/useConfig.d.ts +59 -0
- package/dist/composables/useConfig.js +11 -0
- package/dist/composables/useConfirm.d.ts +33 -2
- package/dist/composables/useConfirm.js +43 -40
- package/dist/composables/useItemsGetter.d.ts +11 -0
- package/dist/composables/useItemsGetter.js +44 -18
- package/dist/composables/useLocale.js +10 -7
- package/dist/composables/useMobile.js +5 -5
- package/dist/composables/usePassthrough.d.ts +206 -0
- package/dist/composables/usePassthrough.js +224 -0
- package/dist/composables/usePrefill.d.ts +22 -2
- package/dist/composables/usePrefill.js +35 -19
- package/dist/composables/useSafeAreaInternal.js +1 -1
- package/dist/composables/useSegmentedFields.d.ts +2 -2
- package/dist/composables/useSsrState.d.ts +20 -0
- package/dist/composables/useSsrState.js +13 -0
- package/dist/composables/useTableWidthContext.d.ts +24 -4
- package/dist/composables/useTableWidthContext.js +31 -28
- package/dist/composables/useToast.d.ts +18 -1
- package/dist/composables/useToast.js +22 -18
- package/dist/composables/useToggleInput.d.ts +44 -0
- package/dist/composables/useToggleInput.js +39 -0
- package/dist/composables/useViewportWidth.d.ts +20 -6
- package/dist/composables/useViewportWidth.js +8 -7
- package/dist/deprecation/ai-deprecations.json.d.ts +352 -11
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/directives/bbDropdown.d.ts +15 -4
- package/dist/directives/bbDropdown.js +31 -9
- package/dist/directives/createPopoverDirective.d.ts +62 -0
- package/dist/directives/createPopoverDirective.js +92 -37
- package/dist/i18n/locales/cs.json +6 -3
- package/dist/i18n/locales/da.json +6 -3
- package/dist/i18n/locales/de.json +6 -3
- package/dist/i18n/locales/el.json +6 -3
- package/dist/i18n/locales/en.json +6 -3
- package/dist/i18n/locales/es.json +6 -3
- package/dist/i18n/locales/fi.json +6 -3
- package/dist/i18n/locales/fr.json +6 -3
- package/dist/i18n/locales/hu.json +6 -3
- package/dist/i18n/locales/it.json +6 -3
- package/dist/i18n/locales/ja.json +6 -3
- package/dist/i18n/locales/ko.json +6 -3
- package/dist/i18n/locales/nb.json +6 -3
- package/dist/i18n/locales/nl.json +6 -3
- package/dist/i18n/locales/pl.json +6 -3
- package/dist/i18n/locales/pt.json +6 -3
- package/dist/i18n/locales/ro.json +6 -3
- package/dist/i18n/locales/ru.json +6 -3
- package/dist/i18n/locales/sv.json +6 -3
- package/dist/i18n/locales/tr.json +6 -3
- package/dist/i18n/locales/uk.json +6 -3
- package/dist/i18n/locales/zh-cn.json +6 -3
- package/dist/icon-scan.d.ts +276 -0
- package/dist/icon-scan.js +485 -0
- package/dist/icons-whitelist.d.ts +5 -4
- package/dist/index.d.ts +25 -4
- package/dist/index.js +71 -67
- package/dist/input-variants.d.ts +18 -0
- package/dist/llms-full.txt +19548 -4738
- package/dist/llms-medium.txt +1036 -184
- package/dist/llms.txt +14 -11
- package/dist/locale-blueprint.json +6 -3
- package/dist/nuxt-auto-imports.d.ts +100 -0
- package/dist/nuxt-auto-imports.js +55 -0
- package/dist/nuxt-module.d.ts +26 -1
- package/dist/nuxt.js +26 -9
- package/dist/passthrough-deduper.js +5 -0
- package/dist/plugin.d.ts +10 -1
- package/dist/plugin.js +21 -19
- package/dist/pt-scope-registry.d.ts +15 -0
- package/dist/runtime/nuxt-plugin.js +29 -21
- package/dist/styles.css +1 -1
- package/dist/tabs-variants.d.ts +18 -0
- package/dist/types/BadgeVariant.d.ts +6 -4
- package/dist/types/ColumnName.d.ts +1 -1
- package/dist/types/CommonProps.d.ts +2 -2
- package/dist/types/Config.d.ts +47 -0
- package/dist/types/InputVariant.d.ts +22 -0
- package/dist/types/ItemProps.d.ts +50 -0
- package/dist/types/Option.d.ts +6 -0
- package/dist/types/PtScope.d.ts +13 -0
- package/dist/types/TabsVariant.d.ts +17 -0
- package/dist/types/passthrough.d.ts +332 -0
- package/dist/types/passthrough.js +78 -0
- package/dist/types/ptComponentMap.d.ts +60 -0
- package/dist/utilities/functions/hasVnodeListener.d.ts +16 -0
- package/dist/utilities/functions/hasVnodeListener.js +12 -0
- package/dist/utilities/functions/itemProps.d.ts +46 -0
- package/dist/utilities/functions/itemProps.js +47 -0
- package/dist/utilities/functions/slotKey.d.ts +5 -5
- package/dist/utilities/functions/slotKey.js +1 -1
- package/dist/utilities/functions/toggleInput.d.ts +98 -0
- package/dist/utilities/functions/toggleInput.js +56 -0
- package/dist/utilities/misc/listboxMetrics.d.ts +9 -3
- package/dist/utilities/misc/listboxMetrics.js +5 -2
- package/dist/utilities/misc/ssrStateInjectionKey.d.ts +42 -0
- package/dist/utilities/misc/ssrStateInjectionKey.js +4 -0
- package/dist/utils/cssLayers.d.ts +91 -0
- package/dist/utils/cssLayers.js +43 -0
- package/dist/utils/injectLibraryStyles.d.ts +3 -1
- package/dist/utils/injectLibraryStyles.js +24 -23
- package/dist/utils/passthrough.d.ts +70 -0
- package/dist/utils/passthrough.js +100 -0
- package/dist/utils/passthroughDeduper.d.ts +2 -0
- package/dist/utils/passthroughTestKit.d.ts +54 -0
- package/dist/utils/ptScope.d.ts +8 -0
- package/dist/utils/ptScope.js +4 -0
- package/dist/utils/swipeTestKit.d.ts +9 -0
- package/dist/validated/BbCheckbox.vue.d.ts +3 -1
- package/dist/validated/BbCheckbox.vue_vue_type_script_setup_true_lang.js +82 -23
- package/dist/validated/BbCheckboxGroup.vue.d.ts +125 -2
- package/dist/validated/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +113 -25
- package/dist/validated/BbColorInput.vue.d.ts +9 -7
- package/dist/validated/BbColorInput.vue_vue_type_script_setup_true_lang.js +145 -25
- package/dist/validated/BbDatePickerInput.vue.d.ts +11 -9
- package/dist/validated/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +417 -27
- package/dist/validated/BbDropzone.vue_vue_type_script_setup_true_lang.js +17 -1
- package/dist/validated/BbForm.vue_vue_type_script_setup_true_lang.js +45 -28
- package/dist/validated/BbNumberInput.vue.d.ts +9 -7
- package/dist/validated/BbNumberInput.vue_vue_type_script_setup_true_lang.js +115 -25
- package/dist/validated/BbRadioGroup.vue.d.ts +124 -2
- package/dist/validated/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +113 -25
- package/dist/validated/BbRating.vue.d.ts +6 -4
- package/dist/validated/BbRating.vue_vue_type_script_setup_true_lang.js +69 -22
- package/dist/validated/BbSelect.vue.d.ts +235 -2
- package/dist/validated/BbSelect.vue_vue_type_script_setup_true_lang.js +217 -32
- package/dist/validated/BbSlider.vue.d.ts +9 -7
- package/dist/validated/BbSlider.vue_vue_type_script_setup_true_lang.js +72 -25
- package/dist/validated/BbSwitch.vue.d.ts +3 -1
- package/dist/validated/BbSwitch.vue_vue_type_script_setup_true_lang.js +82 -23
- package/dist/validated/BbSwitchGroup.vue.d.ts +125 -2
- package/dist/validated/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +113 -25
- package/dist/validated/BbTag.vue.d.ts +9 -7
- package/dist/validated/BbTag.vue_vue_type_script_setup_true_lang.js +122 -25
- package/dist/validated/BbTextInput.vue.d.ts +9 -7
- package/dist/validated/BbTextInput.vue_vue_type_script_setup_true_lang.js +115 -25
- package/dist/validated/BbTextarea.vue.d.ts +9 -7
- package/dist/validated/BbTextarea.vue_vue_type_script_setup_true_lang.js +115 -25
- package/dist/validated/BbTimePickerInput.vue.d.ts +9 -7
- package/dist/validated/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +175 -25
- package/dist/validated/index.d.ts +3 -0
- package/dist/validated/useValidatedField.js +25 -23
- package/dist/vite-plugin.d.ts +233 -27
- package/dist/vite.js +517 -303
- package/llms.txt +15 -12
- package/package.json +15 -11
- package/scripts/lib/component-tree.ts +611 -0
- package/scripts/lib/ensure-manifest.mjs +28 -5
- package/scripts/lib/eslint-plugin.d.ts +58 -1
- package/scripts/lib/eslint-plugin.mjs +899 -17
- package/scripts/lib/hand-roll-hints.mjs +50 -6
- package/scripts/lib/html-attributes.mjs +133 -0
- package/scripts/lib/mcp-config.mjs +87 -58
- package/scripts/lib/public-type-exports.mjs +246 -0
- package/scripts/lib/validate-bb-markup.mjs +318 -34
- package/dist/ai/BbBaseCheckbox.md +0 -49
- package/dist/ai/BbBaseCheckboxGroup.md +0 -64
- package/dist/ai/BbBaseColorInput.md +0 -65
- package/dist/ai/BbBaseColorPalette.md +0 -39
- package/dist/ai/BbBaseDatePicker.md +0 -43
- package/dist/ai/BbBaseDatePickerInput.md +0 -73
- package/dist/ai/BbBaseNumberInput.md +0 -71
- package/dist/ai/BbBaseRadio.md +0 -46
- package/dist/ai/BbBaseRadioGroup.md +0 -64
- package/dist/ai/BbBaseRating.md +0 -52
- package/dist/ai/BbBaseSelect.md +0 -88
- package/dist/ai/BbBaseSlider.md +0 -56
- package/dist/ai/BbBaseSwitch.md +0 -49
- package/dist/ai/BbBaseSwitchGroup.md +0 -64
- package/dist/ai/BbBaseTag.md +0 -68
- package/dist/ai/BbBaseTextInput.md +0 -75
- package/dist/ai/BbBaseTextarea.md +0 -62
- package/dist/ai/BbBaseTimePickerInput.md +0 -62
- package/dist/ai/CommonInputWrapper.md +0 -42
- package/dist/ai/source/BbBaseCheckbox.md +0 -461
- package/dist/ai/source/BbBaseCheckboxGroup.md +0 -554
- package/dist/ai/source/BbBaseColorInput.md +0 -431
- package/dist/ai/source/BbBaseColorPalette.md +0 -942
- package/dist/ai/source/BbBaseDatePicker.md +0 -1448
- package/dist/ai/source/BbBaseDatePickerInput.md +0 -1940
- package/dist/ai/source/BbBaseNumberInput.md +0 -617
- package/dist/ai/source/BbBaseRadio.md +0 -381
- package/dist/ai/source/BbBaseRadioGroup.md +0 -539
- package/dist/ai/source/BbBaseRating.md +0 -607
- package/dist/ai/source/BbBaseSelect.md +0 -945
- package/dist/ai/source/BbBaseSlider.md +0 -1144
- package/dist/ai/source/BbBaseSwitch.md +0 -246
- package/dist/ai/source/BbBaseSwitchGroup.md +0 -302
- package/dist/ai/source/BbBaseTag.md +0 -694
- package/dist/ai/source/BbBaseTextInput.md +0 -511
- package/dist/ai/source/BbBaseTextarea.md +0 -504
- package/dist/ai/source/BbBaseTimePickerInput.md +0 -1037
- package/dist/ai/source/CommonInputWrapper.md +0 -584
- package/dist/assets/svgs/sort.svg_raw.js +0 -4
- package/dist/components/BbBadge/BadgeAppendIcon.vue.d.ts +0 -3
- package/dist/components/BbBadge/BadgeAppendIcon.vue.js +0 -5
- package/dist/components/BbBadge/BadgeAppendIcon.vue_vue_type_script_setup_true_lang.js +0 -22
- package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue.d.ts +0 -40
- package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue.js +0 -6
- package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue_vue_type_script_setup_true_lang.js +0 -145
- package/dist/components/BbBaseCheckbox/types.d.ts +0 -224
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue.d.ts +0 -19
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue.js +0 -6
- package/dist/components/BbBaseCheckboxGroup/BbBaseCheckboxGroup.vue_vue_type_script_setup_true_lang.js +0 -190
- package/dist/components/BbBaseCheckboxGroup/types.d.ts +0 -257
- package/dist/components/BbBaseColorInput/BbBaseColorInput.vue.d.ts +0 -43
- package/dist/components/BbBaseColorInput/BbBaseColorInput.vue.js +0 -6
- package/dist/components/BbBaseColorInput/BbBaseColorInput.vue_vue_type_script_setup_true_lang.js +0 -184
- package/dist/components/BbBaseColorInput/types.d.ts +0 -219
- package/dist/components/BbBaseColorPalette/BbBaseColorPalette.vue.d.ts +0 -13
- package/dist/components/BbBaseColorPalette/BbBaseColorPalette.vue_vue_type_script_setup_true_lang.js +0 -395
- package/dist/components/BbBaseColorPalette/types.d.ts +0 -40
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue.d.ts +0 -20
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue.js +0 -6
- package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue_vue_type_script_setup_true_lang.js +0 -407
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue.d.ts +0 -47
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue.js +0 -5
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue_vue_type_script_setup_true_lang.js +0 -318
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue.js +0 -5
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue_vue_type_script_setup_true_lang.js +0 -115
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerYearSelector.vue.js +0 -5
- package/dist/components/BbBaseDatePicker/BbBaseDatePickerYearSelector.vue_vue_type_script_setup_true_lang.js +0 -116
- package/dist/components/BbBaseDatePicker/types.d.ts +0 -108
- package/dist/components/BbBaseDatePicker/useDatePickerContext.js +0 -11
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue.d.ts +0 -31
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue.js +0 -6
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue_vue_type_script_setup_true_lang.js +0 -737
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerTimeSelector.vue.js +0 -6
- package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerTimeSelector.vue_vue_type_script_setup_true_lang.js +0 -204
- package/dist/components/BbBaseDatePickerInput/types.d.ts +0 -325
- package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue.js +0 -6
- package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue_vue_type_script_setup_true_lang.js +0 -190
- package/dist/components/BbBaseNumberInput/BbBaseNumberInput.vue.d.ts +0 -52
- package/dist/components/BbBaseNumberInput/BbBaseNumberInput.vue.js +0 -6
- package/dist/components/BbBaseNumberInput/BbBaseNumberInput.vue_vue_type_script_setup_true_lang.js +0 -215
- package/dist/components/BbBaseNumberInput/types.d.ts +0 -211
- package/dist/components/BbBaseRadio/BbBaseRadio.vue.d.ts +0 -33
- package/dist/components/BbBaseRadio/BbBaseRadio.vue_vue_type_script_setup_true_lang.js +0 -113
- package/dist/components/BbBaseRadio/types.d.ts +0 -179
- package/dist/components/BbBaseRadioGroup/BbBaseRadioGroup.vue.d.ts +0 -19
- package/dist/components/BbBaseRadioGroup/BbBaseRadioGroup.vue_vue_type_script_setup_true_lang.js +0 -179
- package/dist/components/BbBaseRadioGroup/types.d.ts +0 -223
- package/dist/components/BbBaseRating/BbBaseRating.vue.d.ts +0 -38
- package/dist/components/BbBaseRating/BbBaseRating.vue.js +0 -6
- package/dist/components/BbBaseRating/BbBaseRating.vue_vue_type_script_setup_true_lang.js +0 -192
- package/dist/components/BbBaseRating/types.d.ts +0 -176
- package/dist/components/BbBaseSelect/BbBaseSelect.vue.d.ts +0 -19
- package/dist/components/BbBaseSelect/BbBaseSelect.vue.js +0 -6
- package/dist/components/BbBaseSelect/BbBaseSelect.vue_vue_type_script_setup_true_lang.js +0 -311
- package/dist/components/BbBaseSelect/types.d.ts +0 -297
- package/dist/components/BbBaseSlider/BbBaseSlider.vue.d.ts +0 -35
- package/dist/components/BbBaseSlider/BbBaseSlider.vue.js +0 -6
- package/dist/components/BbBaseSlider/BbBaseSlider.vue_vue_type_script_setup_true_lang.js +0 -340
- package/dist/components/BbBaseSlider/types.d.ts +0 -200
- package/dist/components/BbBaseSwitch/BbBaseSwitch.vue.d.ts +0 -35
- package/dist/components/BbBaseSwitch/BbBaseSwitch.vue.js +0 -6
- package/dist/components/BbBaseSwitch/BbBaseSwitch.vue_vue_type_script_setup_true_lang.js +0 -146
- package/dist/components/BbBaseSwitch/types.d.ts +0 -10
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue.d.ts +0 -19
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue.js +0 -6
- package/dist/components/BbBaseSwitchGroup/BbBaseSwitchGroup.vue_vue_type_script_setup_true_lang.js +0 -190
- package/dist/components/BbBaseSwitchGroup/types.d.ts +0 -8
- package/dist/components/BbBaseTag/BbBaseTag.vue.d.ts +0 -50
- package/dist/components/BbBaseTag/BbBaseTag.vue.js +0 -6
- package/dist/components/BbBaseTag/BbBaseTag.vue_vue_type_script_setup_true_lang.js +0 -266
- package/dist/components/BbBaseTag/types.d.ts +0 -160
- package/dist/components/BbBaseTextInput/BbBaseTextInput.vue.d.ts +0 -45
- package/dist/components/BbBaseTextInput/BbBaseTextInput.vue.js +0 -6
- package/dist/components/BbBaseTextInput/BbBaseTextInput.vue_vue_type_script_setup_true_lang.js +0 -200
- package/dist/components/BbBaseTextInput/types.d.ts +0 -209
- package/dist/components/BbBaseTextarea/BbBaseTextarea.vue.d.ts +0 -39
- package/dist/components/BbBaseTextarea/BbBaseTextarea.vue.js +0 -6
- package/dist/components/BbBaseTextarea/BbBaseTextarea.vue_vue_type_script_setup_true_lang.js +0 -187
- package/dist/components/BbBaseTextarea/types.d.ts +0 -170
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue.d.ts +0 -27
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue.js +0 -6
- package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue_vue_type_script_setup_true_lang.js +0 -519
- package/dist/components/BbBaseTimePickerInput/types.d.ts +0 -151
- package/dist/components/CommonInputWrapper/CommonInputWrapper.vue.js +0 -6
- package/dist/components/CommonInputWrapper/CommonInputWrapper.vue_vue_type_script_setup_true_lang.js +0 -107
- /package/dist/components/{BbBaseDatePicker/BbBaseDatePickerMonthSelector.vue.d.ts → BbCalendar/CalendarMonthPanel.vue.d.ts} +0 -0
- /package/dist/components/{BbBaseDatePicker/BbBaseDatePickerYearSelector.vue.d.ts → BbCalendar/CalendarYearPanel.vue.d.ts} +0 -0
- /package/dist/{components/BbBaseDatePicker/typeahead.d.ts → composables/useTypeahead.d.ts} +0 -0
- /package/dist/{components/BbBaseDatePicker/typeahead.js → composables/useTypeahead.js} +0 -0
package/bin/bitboss-ui-mcp.mjs
CHANGED
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
* is stable across zod 3 and 4, so the lower bound costs nothing.
|
|
26
26
|
*
|
|
27
27
|
* Run standalone: `npx bitboss-ui mcp` (delegated from bin/bitboss-ui.mjs).
|
|
28
|
-
*
|
|
28
|
+
* Registered with every MCP-capable harness by `npx bitboss-ui ai-init`
|
|
29
|
+
* (on by default; `--no-mcp` skips it).
|
|
29
30
|
*/
|
|
30
31
|
|
|
31
32
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
@@ -36,6 +37,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
36
37
|
import { z } from 'zod';
|
|
37
38
|
import {
|
|
38
39
|
loadManifest,
|
|
40
|
+
possessive,
|
|
39
41
|
validateVueSnippet,
|
|
40
42
|
} from '../scripts/lib/validate-bb-markup.mjs';
|
|
41
43
|
|
|
@@ -70,26 +72,180 @@ function getManifestMap() {
|
|
|
70
72
|
return cachedManifestMap;
|
|
71
73
|
}
|
|
72
74
|
|
|
73
|
-
/** `search_components({ query })` —
|
|
75
|
+
/** `search_components({ query })` — token match over name/description. */
|
|
74
76
|
const SEARCH_DEFAULT_LIMIT = 20;
|
|
75
77
|
|
|
76
78
|
/**
|
|
77
|
-
*
|
|
79
|
+
* Ranking for the manifest's type tiers. `api` types are the ones an app is
|
|
80
|
+
* expected to reach for — they appear in a component's own props or events —
|
|
81
|
+
* so they lead. `wrapper` (`<Component>Props`) matters only when wrapping one
|
|
82
|
+
* of our components, and `advanced` is registries, contexts and adapters.
|
|
83
|
+
* Publishing 166 exports as a flat list made every one look equally important.
|
|
84
|
+
*/
|
|
85
|
+
const TYPE_USAGE_RANK = { api: 0, wrapper: 1, advanced: 2 };
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* WHY THIS IS NOT A PLAIN SUBSTRING MATCH ANY MORE.
|
|
89
|
+
*
|
|
90
|
+
* It was, and a consumer pilot (2026-09-09) hand-rolled three components the
|
|
91
|
+
* library ships because the whole query string had to appear verbatim in one
|
|
92
|
+
* field. `table` found BbTable; `data table` — the term most of the industry
|
|
93
|
+
* uses — found NOTHING, because no name or description contains that exact
|
|
94
|
+
* pair. Same for `command palette`, `stepper wizard`, `skeleton loading`.
|
|
95
|
+
*
|
|
96
|
+
* An empty result is the worst possible answer for a tool whose stated job is
|
|
97
|
+
* "find the right Bb* component before writing usage code": it is
|
|
98
|
+
* indistinguishable from "nothing here, build it yourself". So two things
|
|
99
|
+
* changed. Multi-word queries are TOKENISED, and every search — hit or miss —
|
|
100
|
+
* consults the component picker's "Not in this library" table, which is where
|
|
101
|
+
* the authoritative answers for the invented names already lived.
|
|
102
|
+
*/
|
|
103
|
+
|
|
104
|
+
/** English filler that would otherwise match half the corpus on its own. */
|
|
105
|
+
const SEARCH_STOPWORDS = new Set([
|
|
106
|
+
'a',
|
|
107
|
+
'an',
|
|
108
|
+
'the',
|
|
109
|
+
'and',
|
|
110
|
+
'or',
|
|
111
|
+
'not',
|
|
112
|
+
'no',
|
|
113
|
+
'is',
|
|
114
|
+
'it',
|
|
115
|
+
'in',
|
|
116
|
+
'on',
|
|
117
|
+
'for',
|
|
118
|
+
'of',
|
|
119
|
+
'to',
|
|
120
|
+
'with',
|
|
121
|
+
'component',
|
|
122
|
+
'components',
|
|
123
|
+
'ui',
|
|
124
|
+
'view',
|
|
125
|
+
'widget',
|
|
126
|
+
'element',
|
|
127
|
+
]);
|
|
128
|
+
|
|
129
|
+
/** `'data table view'` → `['data', 'table']`. Order is not significant. */
|
|
130
|
+
function tokenize(query) {
|
|
131
|
+
const raw = String(query ?? '')
|
|
132
|
+
.toLowerCase()
|
|
133
|
+
.split(/[^a-z0-9]+/)
|
|
134
|
+
.filter(Boolean);
|
|
135
|
+
const meaningful = raw.filter((t) => !SEARCH_STOPWORDS.has(t));
|
|
136
|
+
// An all-stopword query ('the view') still deserves its literal reading
|
|
137
|
+
// rather than an empty token list that matches everything.
|
|
138
|
+
return meaningful.length > 0 ? meaningful : raw;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Relevance score for one component against ONE lowercased token. Higher wins;
|
|
78
143
|
* 0 means "no match". Name hits always outrank description hits so
|
|
79
144
|
* `search_components({ query: 'table' })` leads with BbTable, not with every
|
|
80
145
|
* component whose prose mentions a table.
|
|
81
146
|
*/
|
|
82
|
-
function
|
|
147
|
+
function scoreToken(component, needle) {
|
|
83
148
|
const name = component.name.toLowerCase();
|
|
84
149
|
const description = (component.description ?? '').toLowerCase();
|
|
85
150
|
if (name === needle) return 100;
|
|
86
151
|
if (name === `bb${needle}`) return 95; // 'button' → BbButton
|
|
87
152
|
if (name.startsWith(needle) || name.startsWith(`bb${needle}`)) return 80;
|
|
88
153
|
if (name.includes(needle)) return 60;
|
|
89
|
-
|
|
154
|
+
// Descriptions match at a WORD START, never mid-word: a plain substring made
|
|
155
|
+
// 'not' hit "notification" and returned four components for a nonsense
|
|
156
|
+
// query. Trailing suffixes still count, so 'card' finds "cards".
|
|
157
|
+
if (new RegExp(`\\b${needle}`).test(description)) return 30;
|
|
90
158
|
return 0;
|
|
91
159
|
}
|
|
92
160
|
|
|
161
|
+
/**
|
|
162
|
+
* Score against every token. A component that matches MORE of the query ranks
|
|
163
|
+
* above one that matches a single token harder, so `data table` puts BbTable
|
|
164
|
+
* (both tokens) above a component whose description merely says "data".
|
|
165
|
+
*/
|
|
166
|
+
function scoreComponent(component, tokens) {
|
|
167
|
+
let total = 0;
|
|
168
|
+
let matched = 0;
|
|
169
|
+
for (const token of tokens) {
|
|
170
|
+
const score = scoreToken(component, token);
|
|
171
|
+
if (score > 0) {
|
|
172
|
+
matched += 1;
|
|
173
|
+
total += score;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return matched === 0 ? { matched: 0, score: 0 } : { matched, score: total };
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* The picker's "Not in this library" table, parsed from the shipped guide so
|
|
181
|
+
* there is exactly one source of truth. Rows carry both kinds of answer:
|
|
182
|
+
* redirects (`BbDrawer` → "It is BbOffCanvas") and verdicts (`BbCard` → "Does
|
|
183
|
+
* not exist — a card is a <div> with tokens"). Both are better answers to a
|
|
184
|
+
* miss than an empty array.
|
|
185
|
+
*/
|
|
186
|
+
const PICKER_PATH = join(AI_ROOT, 'guides', 'component-picker.md');
|
|
187
|
+
let cachedNotInLibrary = null;
|
|
188
|
+
|
|
189
|
+
/** `'BbDataTable'` → `['bbdatatable', 'data', 'table']`. */
|
|
190
|
+
function aliasTokens(cell) {
|
|
191
|
+
const words = cell
|
|
192
|
+
.replace(/\[([^\]]*)\]\([^)]*\)/g, '$1') // links → their text
|
|
193
|
+
.replace(/[`*_]/g, '')
|
|
194
|
+
.split(/[^A-Za-z0-9]+/)
|
|
195
|
+
.filter(Boolean);
|
|
196
|
+
const tokens = new Set();
|
|
197
|
+
for (const word of words) {
|
|
198
|
+
tokens.add(word.toLowerCase());
|
|
199
|
+
// Split CamelCase so `BbDataTable` is reachable by 'data' and 'table'.
|
|
200
|
+
for (const part of word.replace(/^Bb/, '').split(/(?=[A-Z])/))
|
|
201
|
+
if (part.length > 1) tokens.add(part.toLowerCase());
|
|
202
|
+
}
|
|
203
|
+
return [...tokens].filter((t) => !SEARCH_STOPWORDS.has(t) && t !== 'bb');
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
function loadNotInLibrary() {
|
|
207
|
+
if (cachedNotInLibrary) return cachedNotInLibrary;
|
|
208
|
+
cachedNotInLibrary = [];
|
|
209
|
+
if (!existsSync(PICKER_PATH)) return cachedNotInLibrary;
|
|
210
|
+
const md = readFileSync(PICKER_PATH, 'utf-8');
|
|
211
|
+
const section = md.split(/^## Not in this library\s*$/m)[1];
|
|
212
|
+
if (!section) return cachedNotInLibrary;
|
|
213
|
+
for (const line of section.split('\n')) {
|
|
214
|
+
if (!line.startsWith('|')) continue;
|
|
215
|
+
// Tolerate a missing trailing `|`: markdown renders such a row fine, so
|
|
216
|
+
// dropping it here would silently lose an answer (it already did once).
|
|
217
|
+
const cells = line
|
|
218
|
+
.replace(/^\|/, '')
|
|
219
|
+
.replace(/\|\s*$/, '')
|
|
220
|
+
.split('|');
|
|
221
|
+
if (cells.length < 2) continue;
|
|
222
|
+
const assumed = cells[0].trim();
|
|
223
|
+
const reality = cells[1].trim();
|
|
224
|
+
// Skip the header and its `---` separator.
|
|
225
|
+
if (!assumed || /^-+$/.test(assumed) || /^Assumed\b/i.test(assumed))
|
|
226
|
+
continue;
|
|
227
|
+
cachedNotInLibrary.push({
|
|
228
|
+
assumed,
|
|
229
|
+
reality,
|
|
230
|
+
tokens: aliasTokens(assumed),
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
return cachedNotInLibrary;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/** Picker rows whose assumed-name cell shares a token with the query. */
|
|
237
|
+
function matchNotInLibrary(tokens) {
|
|
238
|
+
const wanted = new Set(tokens);
|
|
239
|
+
return loadNotInLibrary()
|
|
240
|
+
.map((row) => ({
|
|
241
|
+
row,
|
|
242
|
+
hits: row.tokens.filter((t) => wanted.has(t)).length,
|
|
243
|
+
}))
|
|
244
|
+
.filter(({ hits }) => hits > 0)
|
|
245
|
+
.sort((a, b) => b.hits - a.hits)
|
|
246
|
+
.map(({ row }) => ({ assumed: row.assumed, reality: row.reality }));
|
|
247
|
+
}
|
|
248
|
+
|
|
93
249
|
function searchComponents({ query, limit, includeReferenceOnly } = {}) {
|
|
94
250
|
const manifest = loadComponentsManifest();
|
|
95
251
|
const needle = String(query ?? '')
|
|
@@ -104,13 +260,65 @@ function searchComponents({ query, limit, includeReferenceOnly } = {}) {
|
|
|
104
260
|
? manifest.components
|
|
105
261
|
: manifest.components.filter((c) => !c.referenceOnly);
|
|
106
262
|
|
|
263
|
+
const tokens = tokenize(needle);
|
|
264
|
+
const notInLibrary = matchNotInLibrary(tokens);
|
|
265
|
+
|
|
266
|
+
// A matched picker row NAMES the real component ("`BbDrawer` / `BbSheet` →
|
|
267
|
+
// It is BbOffCanvas"). Rank those first: the picker knows the answer, and
|
|
268
|
+
// returning nothing for `drawer` while BbOffCanvas ships is the whole bug.
|
|
269
|
+
const redirected = new Set();
|
|
270
|
+
for (const { reality } of notInLibrary)
|
|
271
|
+
for (const name of reality.match(/\bBb[A-Z][A-Za-z]+/g) ?? [])
|
|
272
|
+
redirected.add(name);
|
|
273
|
+
|
|
107
274
|
const scored = pool
|
|
108
|
-
.map((c) =>
|
|
275
|
+
.map((c) => {
|
|
276
|
+
const base = scoreComponent(c, tokens);
|
|
277
|
+
const bonus = redirected.has(c.name) ? 90 : 0;
|
|
278
|
+
return bonus > 0
|
|
279
|
+
? { c, matched: base.matched + 1, score: base.score + bonus }
|
|
280
|
+
: { c, ...base };
|
|
281
|
+
})
|
|
109
282
|
.filter(({ score }) => score > 0)
|
|
110
|
-
//
|
|
111
|
-
|
|
283
|
+
// More of the query matched wins first; then strength; then alphabetical
|
|
284
|
+
// so results are stable between calls.
|
|
285
|
+
.sort(
|
|
286
|
+
(a, b) =>
|
|
287
|
+
b.matched - a.matched ||
|
|
288
|
+
b.score - a.score ||
|
|
289
|
+
a.c.name.localeCompare(b.c.name)
|
|
290
|
+
);
|
|
112
291
|
|
|
113
292
|
const shown = scored.slice(0, max);
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Public type exports whose name matches the query. Scored the same way as
|
|
296
|
+
* a component name (exact, prefix, substring) but never mixed into the
|
|
297
|
+
* component list — a type is not something you render, and ranking it
|
|
298
|
+
* beside components is how it gets written as a tag.
|
|
299
|
+
*/
|
|
300
|
+
const matchedTypes = (manifest.types ?? [])
|
|
301
|
+
.filter((type) => {
|
|
302
|
+
const lower = type.name.toLowerCase();
|
|
303
|
+
return tokens.some(
|
|
304
|
+
(token) => lower === token || lower.includes(token.toLowerCase())
|
|
305
|
+
);
|
|
306
|
+
})
|
|
307
|
+
// `api` first: those are the types you meet writing markup. The rest are
|
|
308
|
+
// wrapper props and internals, which rank below anything you would use.
|
|
309
|
+
.sort((a, b) => TYPE_USAGE_RANK[a.usage] - TYPE_USAGE_RANK[b.usage])
|
|
310
|
+
.slice(0, max)
|
|
311
|
+
.map((type) => ({
|
|
312
|
+
name: type.name,
|
|
313
|
+
kind: 'type',
|
|
314
|
+
usage: type.usage,
|
|
315
|
+
component: type.component,
|
|
316
|
+
...(type.deprecated ? { deprecated: true } : {}),
|
|
317
|
+
...(type.replacedBy ? { replacedBy: type.replacedBy } : {}),
|
|
318
|
+
usedBy: type.usedBy ?? [],
|
|
319
|
+
import: `import type { ${type.replacedBy ?? type.name} } from 'bitboss-ui';`,
|
|
320
|
+
}));
|
|
321
|
+
|
|
114
322
|
return {
|
|
115
323
|
query: query ?? '',
|
|
116
324
|
count: shown.length,
|
|
@@ -128,6 +336,23 @@ function searchComponents({ query, limit, includeReferenceOnly } = {}) {
|
|
|
128
336
|
referenceOnly: Boolean(c.referenceOnly),
|
|
129
337
|
contract: c.contract,
|
|
130
338
|
})),
|
|
339
|
+
// Authoritative answers for names agents invent. Present on hits too: a
|
|
340
|
+
// `card` query that ranks BbBaseButton (its description mentions cards)
|
|
341
|
+
// still needs the picker's verdict that there is no BbCard.
|
|
342
|
+
...(notInLibrary.length > 0 ? { notInLibrary } : {}),
|
|
343
|
+
// A query that names a public TYPE gets it back as a type, so the answer
|
|
344
|
+
// to "is BbTableColumn a thing" is never an empty component list. The
|
|
345
|
+
// consumer who hit this concluded the export was undocumented and
|
|
346
|
+
// allowlisted the tag.
|
|
347
|
+
...(matchedTypes.length > 0 ? { types: matchedTypes } : {}),
|
|
348
|
+
guidance:
|
|
349
|
+
notInLibrary.length > 0
|
|
350
|
+
? 'The `notInLibrary` entries are the authoritative answer for this query — prefer them over the ranked components, and do not hand-roll what they redirect you to.'
|
|
351
|
+
: shown.length > 0
|
|
352
|
+
? 'Ranked by relevance. Confirm props with `get_component` before writing usage code.'
|
|
353
|
+
: matchedTypes.length > 0
|
|
354
|
+
? 'No component matches, but `types` does: these are TYPE exports. Import one for the value you pass to the prop named in its `usedBy` — never write it as a tag, and never allowlist it.'
|
|
355
|
+
: 'No manifest match and no picker entry. Zero results does NOT mean "not covered" — search a single plain noun (`table`, not `data table`), then read the guide `component-picker` (its "Not in this library" table is the full list of names that do not exist and what to use instead) before building anything by hand.',
|
|
131
356
|
};
|
|
132
357
|
}
|
|
133
358
|
|
|
@@ -180,6 +405,32 @@ function getComponent({ name, maxChars } = {}) {
|
|
|
180
405
|
const manifest = loadComponentsManifest();
|
|
181
406
|
const entry = manifest.components.find((c) => c.name === name);
|
|
182
407
|
if (!entry) {
|
|
408
|
+
/*
|
|
409
|
+
* A public TYPE asked for as a component. `BbTableColumn`,
|
|
410
|
+
* `BbDropdownItem`, `BbTabsItem` and `BbBreadcrumbsItem` are exports an
|
|
411
|
+
* agent meets in a props table and reasonably looks up here; answering
|
|
412
|
+
* "unknown component — try search_components" sent one consumer to the
|
|
413
|
+
* `allowComponents` allowlist instead, which silences every check on the
|
|
414
|
+
* tag. Answer the real question: what it is, and where it is used.
|
|
415
|
+
*/
|
|
416
|
+
const type = (manifest.types ?? []).find((t) => t.name === name);
|
|
417
|
+
if (type) {
|
|
418
|
+
const use = type.usedBy?.[0];
|
|
419
|
+
return {
|
|
420
|
+
found: true,
|
|
421
|
+
kind: 'type',
|
|
422
|
+
name,
|
|
423
|
+
usage: type.usage,
|
|
424
|
+
...(type.deprecated ? { deprecated: true } : {}),
|
|
425
|
+
...(type.replacedBy ? { replacedBy: type.replacedBy } : {}),
|
|
426
|
+
component: type.component,
|
|
427
|
+
usedBy: type.usedBy ?? [],
|
|
428
|
+
import: `import type { ${type.replacedBy ?? name} } from 'bitboss-ui';`,
|
|
429
|
+
hint: use
|
|
430
|
+
? `A type, not a component: it types ${possessive(use.component)} \`${use.name}\` ${use.surface}. Call get_component('${use.component}') for the contract that documents its fields.`
|
|
431
|
+
: 'A type, not a component — import it for the value you pass, never write it as a tag.',
|
|
432
|
+
};
|
|
433
|
+
}
|
|
183
434
|
return {
|
|
184
435
|
found: false,
|
|
185
436
|
name,
|
|
@@ -199,10 +450,31 @@ function getComponent({ name, maxChars } = {}) {
|
|
|
199
450
|
maxChars,
|
|
200
451
|
`The structured \`component\` field above is COMPLETE (all props/events/slots) — the cut text is guidance prose only.`
|
|
201
452
|
);
|
|
453
|
+
/*
|
|
454
|
+
* The types this component's own API names, so "what do I import to build
|
|
455
|
+
* the value for `columns`?" is answered where the question is asked. Without
|
|
456
|
+
* it an agent reads `BbTableColumn<T>[]` in the props table and has nowhere
|
|
457
|
+
* to go — one consumer concluded the export was undocumented and allowlisted
|
|
458
|
+
* the tag. Only types the component actually uses, never the whole export
|
|
459
|
+
* list: a menu is not an answer.
|
|
460
|
+
*/
|
|
461
|
+
const types = (manifest.types ?? [])
|
|
462
|
+
.filter((type) =>
|
|
463
|
+
(type.usedBy ?? []).some((use) => use.component === entry.name)
|
|
464
|
+
)
|
|
465
|
+
.filter((type) => !type.deprecated)
|
|
466
|
+
.map((type) => ({
|
|
467
|
+
name: type.name,
|
|
468
|
+
usage: type.usage,
|
|
469
|
+
usedBy: (type.usedBy ?? []).filter((use) => use.component === entry.name),
|
|
470
|
+
import: `import type { ${type.name} } from 'bitboss-ui';`,
|
|
471
|
+
}));
|
|
472
|
+
|
|
202
473
|
return {
|
|
203
474
|
found: true,
|
|
204
475
|
// Never truncated: the precision-critical surface.
|
|
205
476
|
component: entry,
|
|
477
|
+
...(types.length > 0 ? { types } : {}),
|
|
206
478
|
contractPath,
|
|
207
479
|
contractContent: content,
|
|
208
480
|
...meta,
|
|
@@ -219,16 +491,53 @@ const STYLES_CSS = join(PACKAGE_ROOT, 'dist', 'styles.css');
|
|
|
219
491
|
* every comma-part is built solely from these — `:root`, `.light`, `:root.dark`
|
|
220
492
|
* and `html.dark` are theme roots; `.bb-tooltip .bb-common-popover__bubble` is
|
|
221
493
|
* not, however many `--bb-*` it redeclares.
|
|
494
|
+
*
|
|
495
|
+
* `.bb-theme` is a theme root too: it is the island boundary the derived block
|
|
496
|
+
* re-specifies its formulas on (design-tokens.md § the CSS mechanic).
|
|
497
|
+
*/
|
|
498
|
+
const THEME_ROOT_PART = /^(?::root|html|body|\.light|\.dark|\.bb-theme)+$/;
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* Unwrap the `:where(…)` / `:is(…)` a selector list may be wrapped in. The
|
|
502
|
+
* derived-token block ships as `:where(:root,.light,.dark,.bb-theme)`, and
|
|
503
|
+
* splitting THAT on commas yields `:where(:root` and `.bb-theme)` — neither of
|
|
504
|
+
* which is a theme root, so without this every derived token is misreported as
|
|
505
|
+
* a component rebind with no value. That is not a cosmetic slip: `localRebinds`
|
|
506
|
+
* is documented to agents as "not something to copy".
|
|
222
507
|
*/
|
|
223
|
-
|
|
508
|
+
function unwrapSelectorList(selector) {
|
|
509
|
+
const trimmed = selector.trim();
|
|
510
|
+
const match = /^:(?:where|is)\((.*)\)$/s.exec(trimmed);
|
|
511
|
+
return match ? match[1] : trimmed;
|
|
512
|
+
}
|
|
513
|
+
|
|
224
514
|
function isThemeSelector(selector) {
|
|
225
|
-
return selector
|
|
515
|
+
return unwrapSelectorList(selector)
|
|
226
516
|
.split(',')
|
|
227
517
|
.every((part) =>
|
|
228
518
|
THEME_ROOT_PART.test(part.replace(/[\s>+~]+/g, '').trim())
|
|
229
519
|
);
|
|
230
520
|
}
|
|
231
521
|
|
|
522
|
+
/**
|
|
523
|
+
* A theme token is a KNOB (the consumer sets it) or DERIVED (a formula the
|
|
524
|
+
* library recomputes at every theme boundary). Setting a derived value is the
|
|
525
|
+
* documented trap — it stops tracking the knob it was computed from.
|
|
526
|
+
*
|
|
527
|
+
* The split is structural in the shipped sheet, so it needs no curated list to
|
|
528
|
+
* drift: knobs are declared on the plain scheme roots, formulas inside the
|
|
529
|
+
* `:where(…)` boundary block. A name in BOTH is a knob that TRACKS another one
|
|
530
|
+
* until pinned — and because the boundary block re-specifies it, a pin has to
|
|
531
|
+
* be repeated at every boundary it is used on, `.dark` included.
|
|
532
|
+
*/
|
|
533
|
+
const isDerivedBlock = (selector) => /^:(?:where|is)\(/.test(selector.trim());
|
|
534
|
+
const tokenKind = (inKnobBlock, inDerivedBlock) =>
|
|
535
|
+
inKnobBlock && inDerivedBlock
|
|
536
|
+
? 'knob-tracking'
|
|
537
|
+
: inDerivedBlock
|
|
538
|
+
? 'derived'
|
|
539
|
+
: 'knob';
|
|
540
|
+
|
|
232
541
|
/**
|
|
233
542
|
* Walk a stylesheet and yield every `--bb-*` declaration WITH the selector that
|
|
234
543
|
* owns it. A flat regex cannot do this: it sees a declaration but not its
|
|
@@ -281,7 +590,8 @@ function* eachTokenDeclaration(css) {
|
|
|
281
590
|
* different components and is only meaningful inside that component's scope.
|
|
282
591
|
* Serving them as one flat list would invite exactly the wrong move — an agent
|
|
283
592
|
* writing `:root { --gap: … }` and wondering why nothing changed. They are
|
|
284
|
-
* documented per component
|
|
593
|
+
* documented per component: `get_component` carries them as `cssProps`, each
|
|
594
|
+
* with the root class to set it on, its default, and what it is.
|
|
285
595
|
*
|
|
286
596
|
* WHY `dist/styles.css` AND NOT `src/assets/css/variables.css`: `src/` is not
|
|
287
597
|
* in the published package, so the source file does not exist for the consumer
|
|
@@ -302,8 +612,15 @@ function listTokens({ filter } = {}) {
|
|
|
302
612
|
const css = readFileSync(STYLES_CSS, 'utf-8');
|
|
303
613
|
const byName = new Map();
|
|
304
614
|
for (const { name, value, selector } of eachTokenDeclaration(css)) {
|
|
305
|
-
const entry = byName.get(name) ?? {
|
|
615
|
+
const entry = byName.get(name) ?? {
|
|
616
|
+
theme: [],
|
|
617
|
+
local: [],
|
|
618
|
+
knobBlock: false,
|
|
619
|
+
derivedBlock: false,
|
|
620
|
+
};
|
|
306
621
|
if (isThemeSelector(selector)) {
|
|
622
|
+
if (isDerivedBlock(selector)) entry.derivedBlock = true;
|
|
623
|
+
else entry.knobBlock = true;
|
|
307
624
|
// Light first, dark after: report both rather than let one win.
|
|
308
625
|
if (!entry.theme.includes(value)) entry.theme.push(value);
|
|
309
626
|
} else if (!entry.local.some((r) => r.selector === selector)) {
|
|
@@ -320,8 +637,9 @@ function listTokens({ filter } = {}) {
|
|
|
320
637
|
const tokens = [...byName.entries()]
|
|
321
638
|
.filter(([name]) => !needle || name.toLowerCase().includes(needle))
|
|
322
639
|
.sort(([a], [b]) => a.localeCompare(b))
|
|
323
|
-
.map(([name, { theme, local }]) => ({
|
|
640
|
+
.map(([name, { theme, local, knobBlock, derivedBlock }]) => ({
|
|
324
641
|
name,
|
|
642
|
+
kind: tokenKind(knobBlock, derivedBlock),
|
|
325
643
|
value: theme[0],
|
|
326
644
|
...(theme.length > 1 ? { themeOverrides: theme.slice(1) } : {}),
|
|
327
645
|
...(local.length > 0 ? { localRebinds: local } : {}),
|
|
@@ -333,7 +651,7 @@ function listTokens({ filter } = {}) {
|
|
|
333
651
|
hint:
|
|
334
652
|
needle && tokens.length === 0
|
|
335
653
|
? `No token name contains '${needle}'. Call list_tokens with no filter for all ${byName.size} — the names are semantic (primary/danger/panel/text/border/radius/…), not literal colours.`
|
|
336
|
-
: 'Theme tokens are set by the consumer app (e.g. on :root / .dark); `themeOverrides` is the dark-theme value. `localRebinds` is a component rebinding the token inside its own subtree — not something to copy. Component-level unprefixed tokens are documented per component; see the design-tokens guide via get_guide.',
|
|
654
|
+
: 'Theme tokens are set by the consumer app (e.g. on :root / .dark); `themeOverrides` is the dark-theme value. `localRebinds` is a component rebinding the token inside its own subtree — not something to copy. `kind` says what you may set: "knob" is yours; "derived" is a formula recomputed at every theme boundary, so setting it stops it tracking the knob it came from — set that knob instead; "knob-tracking" is a knob that follows another until you pin it, and the pin must be repeated at every boundary you use, .dark included. Component-level unprefixed tokens are documented per component; see the design-tokens guide via get_guide.',
|
|
337
655
|
};
|
|
338
656
|
}
|
|
339
657
|
|
|
@@ -469,6 +787,109 @@ function validateCode({ code } = {}) {
|
|
|
469
787
|
* becomes an `isError` result carrying `Error: <message>` — preserving the
|
|
470
788
|
* exact result shape of the previous hand-rolled dispatch.
|
|
471
789
|
*/
|
|
790
|
+
const CHANGELOG_PATH = join(AI_ROOT, 'changelog.json');
|
|
791
|
+
|
|
792
|
+
/**
|
|
793
|
+
* Order two versions on this library's line: `3.0.0-beta.21` after
|
|
794
|
+
* `3.0.0-beta.9` (numeric, not lexical — the bug every hand-rolled compare
|
|
795
|
+
* has), and any prerelease before its own stable release.
|
|
796
|
+
*/
|
|
797
|
+
function compareVersions(a, b) {
|
|
798
|
+
const parse = (v) => {
|
|
799
|
+
const [core, pre = ''] = String(v).split('-');
|
|
800
|
+
const nums = core.split('.').map((n) => Number.parseInt(n, 10) || 0);
|
|
801
|
+
const [tag = '', n = ''] = pre.split('.');
|
|
802
|
+
return { nums, tag, n: Number.parseInt(n, 10) || 0 };
|
|
803
|
+
};
|
|
804
|
+
const x = parse(a);
|
|
805
|
+
const y = parse(b);
|
|
806
|
+
for (let i = 0; i < 3; i += 1) {
|
|
807
|
+
if ((x.nums[i] ?? 0) !== (y.nums[i] ?? 0))
|
|
808
|
+
return (x.nums[i] ?? 0) - (y.nums[i] ?? 0);
|
|
809
|
+
}
|
|
810
|
+
// No prerelease tag outranks any prerelease of the same core version.
|
|
811
|
+
if (!x.tag && y.tag) return 1;
|
|
812
|
+
if (x.tag && !y.tag) return -1;
|
|
813
|
+
if (x.tag !== y.tag) return x.tag < y.tag ? -1 : 1; // alpha < beta < rc
|
|
814
|
+
return x.n - y.n;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
/**
|
|
818
|
+
* `list_changes({ since, until })` — the breaking changes between two releases.
|
|
819
|
+
*
|
|
820
|
+
* WHY THIS TOOL EXISTS. A consumer agent on 2026-09-09 asked "what changed
|
|
821
|
+
* between beta.20 and beta.21?", found nothing in the knowledge base that could
|
|
822
|
+
* answer it, and diffed the two published tarballs by hand. The data existed
|
|
823
|
+
* (`dist/ai/changelog.json`) but no tool served it, and its rows carried no
|
|
824
|
+
* release, so even reading the file could not have answered the question. Both
|
|
825
|
+
* halves are fixed: rows are stamped with `firstReleasedIn` at build time, and
|
|
826
|
+
* this serves the slice.
|
|
827
|
+
*/
|
|
828
|
+
function listChanges({ since, until } = {}) {
|
|
829
|
+
if (!existsSync(CHANGELOG_PATH)) {
|
|
830
|
+
return {
|
|
831
|
+
error: `changelog.json not found at ${CHANGELOG_PATH} — reinstall bitboss-ui (or run \`npm run build\` when working in the library repo).`,
|
|
832
|
+
};
|
|
833
|
+
}
|
|
834
|
+
const doc = JSON.parse(readFileSync(CHANGELOG_PATH, 'utf-8'));
|
|
835
|
+
const releases = doc.releases ?? [];
|
|
836
|
+
const known = new Set(releases);
|
|
837
|
+
|
|
838
|
+
// A typo'd version must not silently return "nothing changed" — that reads
|
|
839
|
+
// as a clean upgrade and is the worst possible wrong answer here.
|
|
840
|
+
for (const [label, value] of [
|
|
841
|
+
['since', since],
|
|
842
|
+
['until', until],
|
|
843
|
+
]) {
|
|
844
|
+
if (value != null && !known.has(String(value))) {
|
|
845
|
+
return {
|
|
846
|
+
error: `Unknown ${label} version '${value}'.`,
|
|
847
|
+
knownReleases: releases,
|
|
848
|
+
hint: 'Pass a version exactly as listed in knownReleases, or omit both to get every break in the v2 → v3 upgrade.',
|
|
849
|
+
};
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
const all = doc.breaking ?? [];
|
|
854
|
+
// No range asked for: the whole v2 → v3 set, which is what the file has
|
|
855
|
+
// always meant.
|
|
856
|
+
if (since == null && until == null) {
|
|
857
|
+
return {
|
|
858
|
+
version: doc.version,
|
|
859
|
+
upgrade: doc.upgrade,
|
|
860
|
+
guide: doc.guide,
|
|
861
|
+
releases,
|
|
862
|
+
summary: doc.summary,
|
|
863
|
+
count: all.length,
|
|
864
|
+
breaking: all,
|
|
865
|
+
hint: 'Narrow to one upgrade hop with list_changes({ since: "<your current version>" }) — that answers "what breaks if I bump".',
|
|
866
|
+
};
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
const inRange = all.filter((entry) => {
|
|
870
|
+
const at = entry.firstReleasedIn;
|
|
871
|
+
// Unreleased rows belong to the future: they ship in whatever comes
|
|
872
|
+
// next, so they count only when the caller left `until` open.
|
|
873
|
+
if (at == null) return until == null;
|
|
874
|
+
if (since != null && compareVersions(at, String(since)) <= 0) return false;
|
|
875
|
+
if (until != null && compareVersions(at, String(until)) > 0) return false;
|
|
876
|
+
return true;
|
|
877
|
+
});
|
|
878
|
+
|
|
879
|
+
return {
|
|
880
|
+
version: doc.version,
|
|
881
|
+
since: since ?? null,
|
|
882
|
+
until: until ?? doc.version,
|
|
883
|
+
count: inRange.length,
|
|
884
|
+
breaking: inRange,
|
|
885
|
+
guide: doc.guide,
|
|
886
|
+
hint:
|
|
887
|
+
inRange.length === 0
|
|
888
|
+
? 'No breaking changes recorded in that range — features and fixes are deliberately not tracked here, so an empty result means nothing BREAKS, not that nothing changed.'
|
|
889
|
+
: 'Each entry names the component and the new spelling; `guide` is the migration page with the full explanation.',
|
|
890
|
+
};
|
|
891
|
+
}
|
|
892
|
+
|
|
472
893
|
function toolCallback(fn) {
|
|
473
894
|
return (args) => {
|
|
474
895
|
try {
|
|
@@ -500,7 +921,7 @@ function buildServer() {
|
|
|
500
921
|
'search_components',
|
|
501
922
|
{
|
|
502
923
|
description:
|
|
503
|
-
'Search the bitboss-ui component manifest by name and description, ranked by relevance (exact/prefix name matches first, description matches last). Returns consumer-API components only by default. Use this to find the right Bb* component before writing usage code.',
|
|
924
|
+
'Search the bitboss-ui component manifest by name and description, ranked by relevance (exact/prefix name matches first, description matches last). Multi-word queries are matched per word, so "data table" finds BbTable. Also returns `notInLibrary`: the component picker\'s authoritative verdicts for names agents commonly invent — either a redirect ("BbDrawer" is BbOffCanvas) or a confirmation that it does not exist and what to do instead. Returns consumer-API components only by default. Use this to find the right Bb* component before writing usage code. An empty result does NOT mean the need is uncovered — read the `component-picker` guide before hand-rolling anything.',
|
|
504
925
|
inputSchema: {
|
|
505
926
|
query: z
|
|
506
927
|
.string()
|
|
@@ -517,7 +938,7 @@ function buildServer() {
|
|
|
517
938
|
.boolean()
|
|
518
939
|
.optional()
|
|
519
940
|
.describe(
|
|
520
|
-
'Include reference-only internal components (
|
|
941
|
+
'Include reference-only internal components (Common*, listbox internals). Default false — these are not consumer API and should not be recommended. BbBaseButton and the BbBase*Icon glyphs are consumer API and are always included.'
|
|
521
942
|
),
|
|
522
943
|
},
|
|
523
944
|
},
|
|
@@ -571,6 +992,29 @@ function buildServer() {
|
|
|
571
992
|
toolCallback(listGuides)
|
|
572
993
|
);
|
|
573
994
|
|
|
995
|
+
server.registerTool(
|
|
996
|
+
'list_changes',
|
|
997
|
+
{
|
|
998
|
+
description:
|
|
999
|
+
'Breaking changes between two bitboss-ui releases — what breaks if you bump. Call with since=<the version you are on> before upgrading. Omit both arguments for every break in the v2 → v3 upgrade. Only BREAKING changes are tracked; features and fixes are not.',
|
|
1000
|
+
inputSchema: {
|
|
1001
|
+
since: z
|
|
1002
|
+
.string()
|
|
1003
|
+
.optional()
|
|
1004
|
+
.describe(
|
|
1005
|
+
"Exclusive lower bound — the version you are currently on, e.g. '3.0.0-beta.20'. Its own breaks are excluded; you already have them."
|
|
1006
|
+
),
|
|
1007
|
+
until: z
|
|
1008
|
+
.string()
|
|
1009
|
+
.optional()
|
|
1010
|
+
.describe(
|
|
1011
|
+
'Inclusive upper bound (default: the installed version). Unreleased breaks are included only when this is omitted.'
|
|
1012
|
+
),
|
|
1013
|
+
},
|
|
1014
|
+
},
|
|
1015
|
+
toolCallback(listChanges)
|
|
1016
|
+
);
|
|
1017
|
+
|
|
574
1018
|
server.registerTool(
|
|
575
1019
|
'get_guide',
|
|
576
1020
|
{
|
|
@@ -659,8 +1103,21 @@ export async function main() {
|
|
|
659
1103
|
const server = buildServer();
|
|
660
1104
|
const transport = new StdioServerTransport();
|
|
661
1105
|
await server.connect(transport);
|
|
1106
|
+
// Settle on stdin's end as well as the transport's close. `onclose` does
|
|
1107
|
+
// not fire when the host simply closes the pipe, so awaiting it alone left
|
|
1108
|
+
// the caller's top-level `await main()` pending at exit and Node printed
|
|
1109
|
+
// "Detected unsettled top-level await" on every clean shutdown (2026-09-09).
|
|
1110
|
+
// `once` on both, and idempotent resolve, so whichever arrives first wins.
|
|
662
1111
|
return new Promise((resolve) => {
|
|
663
|
-
|
|
1112
|
+
let done = false;
|
|
1113
|
+
const settle = () => {
|
|
1114
|
+
if (done) return;
|
|
1115
|
+
done = true;
|
|
1116
|
+
resolve();
|
|
1117
|
+
};
|
|
1118
|
+
transport.onclose = settle;
|
|
1119
|
+
process.stdin.once('end', settle);
|
|
1120
|
+
process.stdin.once('close', settle);
|
|
664
1121
|
});
|
|
665
1122
|
}
|
|
666
1123
|
|