bitboss-ui 3.0.0-beta.42 → 3.0.0-beta.44
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 +14 -9
- package/bin/bitboss-ui-mcp.mjs +188 -70
- package/bin/bitboss-ui.mjs +164 -33
- package/dist/ai/BbAccordion.md +1 -1
- package/dist/ai/BbAlert.md +9 -3
- package/dist/ai/BbAvatar.md +9 -4
- package/dist/ai/BbBadge.md +5 -2
- package/dist/ai/BbBadgeButton.md +1 -1
- package/dist/ai/BbBaseButton.md +1 -1
- package/dist/ai/BbBreadcrumbs.md +2 -2
- package/dist/ai/BbButton.md +41 -9
- package/dist/ai/BbCalendar.md +10 -10
- package/dist/ai/BbCheckbox.md +10 -2
- package/dist/ai/BbCheckboxGroup.md +27 -15
- package/dist/ai/BbColorInput.md +6 -2
- package/dist/ai/BbColorPalette.md +1 -1
- package/dist/ai/BbConfirm.md +1 -1
- package/dist/ai/BbDatePicker.md +9 -9
- package/dist/ai/BbDatePickerInput.md +26 -19
- package/dist/ai/BbDialog.md +7 -5
- package/dist/ai/BbDropdown.md +63 -39
- package/dist/ai/BbDropdownButton.md +5 -5
- package/dist/ai/BbDropdownGroup.md +3 -3
- package/dist/ai/BbDropzone.md +233 -29
- package/dist/ai/BbForm.md +81 -5
- package/dist/ai/BbIcon.md +25 -9
- package/dist/ai/BbNumberInput.md +6 -2
- package/dist/ai/BbOffCanvas.md +7 -5
- package/dist/ai/BbPagination.md +3 -3
- package/dist/ai/BbPopover.md +2 -2
- package/dist/ai/BbRadio.md +10 -2
- package/dist/ai/BbRadioGroup.md +27 -20
- package/dist/ai/BbRating.md +13 -4
- package/dist/ai/BbSelect.md +423 -155
- package/dist/ai/BbSelectPopover.md +240 -58
- package/dist/ai/BbSlider.md +11 -2
- package/dist/ai/BbSpinner.md +2 -2
- package/dist/ai/BbSwitch.md +23 -2
- package/dist/ai/BbSwitchGroup.md +33 -21
- package/dist/ai/BbTable.md +260 -130
- package/dist/ai/BbTabs.md +9 -9
- package/dist/ai/BbTabsList.md +3 -3
- package/dist/ai/BbTag.md +8 -3
- package/dist/ai/BbTextInput.md +51 -5
- package/dist/ai/BbTextarea.md +105 -48
- package/dist/ai/BbTimePicker.md +4 -3
- package/dist/ai/BbTimePickerInput.md +10 -4
- package/dist/ai/BbToast.md +3 -2
- package/dist/ai/BbTooltip.md +2 -2
- package/dist/ai/BbTree.md +2 -2
- package/dist/ai/ChipsBox.md +1 -1
- package/dist/ai/ClearableButton.md +1 -1
- package/dist/ai/CommonField.md +14 -3
- package/dist/ai/CommonFieldInput.md +1 -1
- package/dist/ai/CommonPopover.md +1 -1
- package/dist/ai/CommonTimeSelector.md +2 -2
- package/dist/ai/ErrorIcon.md +1 -1
- package/dist/ai/FlatListBox.md +3 -2
- package/dist/ai/GroupedListBox.md +3 -2
- package/dist/ai/ListBox.md +4 -3
- package/dist/ai/OptionsContainer.md +5 -1
- package/dist/ai/WarningIcon.md +1 -1
- package/dist/ai/changelog.json +334 -8
- package/dist/ai/components.json +303 -58336
- package/dist/ai/composables/useBbFormContext.md +19 -19
- package/dist/ai/design-tokens.json +26 -6
- package/dist/ai/guides/agent-contract.md +31 -28
- package/dist/ai/guides/ai-router.md +29 -25
- package/dist/ai/guides/coherence-playbook.md +24 -20
- package/dist/ai/guides/component-picker.md +4 -4
- package/dist/ai/guides/design-language.md +2 -1
- package/dist/ai/guides/design-tokens.md +108 -23
- package/dist/ai/guides/fetch-items-playbook.md +127 -87
- package/dist/ai/guides/icons-policy.md +2 -2
- package/dist/ai/guides/inertia-helpers.md +88 -25
- package/dist/ai/guides/installation-and-plugin-setup.md +16 -3
- package/dist/ai/guides/migration/components/bb-checkbox-group.md +1 -1
- package/dist/ai/guides/migration/components/bb-date-picker-input.md +10 -10
- package/dist/ai/guides/migration/components/bb-select-popover.md +5 -0
- package/dist/ai/guides/migration/components/bb-select.md +8 -2
- package/dist/ai/guides/migration/components/bb-table.md +31 -19
- package/dist/ai/guides/migration/components/bb-tabs.md +17 -17
- package/dist/ai/guides/migration/v2-to-v3.md +223 -69
- package/dist/ai/guides/migration/v3-beta-tooling.md +49 -1
- package/dist/ai/guides/page-shell.md +12 -6
- package/dist/ai/guides/passthrough.md +8 -7
- package/dist/ai/guides/preset-components.md +10 -2
- package/dist/ai/guides/validation-providers.md +36 -23
- package/dist/ai/index.md +12 -13
- package/dist/ai/manifest/components/BbAccordion.json +41 -0
- package/dist/ai/manifest/components/BbAccordion.tree.json +25 -0
- package/dist/ai/manifest/components/BbAlert.json +56 -0
- package/dist/ai/manifest/components/BbAlert.tree.json +80 -0
- package/dist/ai/manifest/components/BbAsterisk.json +26 -0
- package/dist/ai/manifest/components/BbAsterisk.tree.json +13 -0
- package/dist/ai/manifest/components/BbAvatar.json +38 -0
- package/dist/ai/manifest/components/BbAvatar.tree.json +39 -0
- package/dist/ai/manifest/components/BbBadge.json +50 -0
- package/dist/ai/manifest/components/BbBadge.tree.json +86 -0
- package/dist/ai/manifest/components/BbBadgeButton.json +67 -0
- package/dist/ai/manifest/components/BbBadgeButton.tree.json +32 -0
- package/dist/ai/manifest/components/BbBaseButton.json +69 -0
- package/dist/ai/manifest/components/BbBaseButton.tree.json +25 -0
- package/dist/ai/manifest/components/BbBaseCheckboxIcon.json +46 -0
- package/dist/ai/manifest/components/BbBaseCheckboxIcon.tree.json +41 -0
- package/dist/ai/manifest/components/BbBaseRadioIcon.json +44 -0
- package/dist/ai/manifest/components/BbBaseRadioIcon.tree.json +36 -0
- package/dist/ai/manifest/components/BbBaseSwitchIcon.json +46 -0
- package/dist/ai/manifest/components/BbBaseSwitchIcon.tree.json +44 -0
- package/dist/ai/manifest/components/BbBreadcrumbs.json +52 -0
- package/dist/ai/manifest/components/BbBreadcrumbs.tree.json +45 -0
- package/dist/ai/manifest/components/BbButton.json +101 -0
- package/dist/ai/manifest/components/BbButton.tree.json +206 -0
- package/dist/ai/manifest/components/BbCalendar.json +86 -0
- package/dist/ai/manifest/components/BbCalendar.tree.json +99 -0
- package/dist/ai/manifest/components/BbCheckbox.json +99 -0
- package/dist/ai/manifest/components/BbCheckbox.tree.json +22 -0
- package/dist/ai/manifest/components/BbCheckboxGroup.json +133 -0
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +61 -0
- package/dist/ai/manifest/components/BbCollapsible.json +32 -0
- package/dist/ai/manifest/components/BbCollapsible.tree.json +17 -0
- package/dist/ai/manifest/components/BbColorInput.json +133 -0
- package/dist/ai/manifest/components/BbColorInput.tree.json +37 -0
- package/dist/ai/manifest/components/BbColorPalette.json +73 -0
- package/dist/ai/manifest/components/BbColorPalette.tree.json +55 -0
- package/dist/ai/manifest/components/BbConfirm.json +34 -0
- package/dist/ai/manifest/components/BbConfirm.tree.json +30 -0
- package/dist/ai/manifest/components/BbConfirmPortal.json +18 -0
- package/dist/ai/manifest/components/BbDatePicker.json +108 -0
- package/dist/ai/manifest/components/BbDatePicker.tree.json +54 -0
- package/dist/ai/manifest/components/BbDatePickerInput.json +167 -0
- package/dist/ai/manifest/components/BbDatePickerInput.tree.json +50 -0
- package/dist/ai/manifest/components/BbDialog.json +76 -0
- package/dist/ai/manifest/components/BbDialog.tree.json +74 -0
- package/dist/ai/manifest/components/BbDropdown.json +99 -0
- package/dist/ai/manifest/components/BbDropdown.tree.json +122 -0
- package/dist/ai/manifest/components/BbDropdownButton.json +104 -0
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +28 -0
- package/dist/ai/manifest/components/BbDropdownGroup.json +25 -0
- package/dist/ai/manifest/components/BbDropzone.json +68 -0
- package/dist/ai/manifest/components/BbDropzone.tree.json +36 -0
- package/dist/ai/manifest/components/BbForm.json +41 -0
- package/dist/ai/manifest/components/BbIcon.json +33 -0
- package/dist/ai/manifest/components/BbIcon.tree.json +19 -0
- package/dist/ai/manifest/components/BbIndicator.json +39 -0
- package/dist/ai/manifest/components/BbIndicator.tree.json +67 -0
- package/dist/ai/manifest/components/BbNumberInput.json +123 -0
- package/dist/ai/manifest/components/BbNumberInput.tree.json +27 -0
- package/dist/ai/manifest/components/BbOffCanvas.json +72 -0
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +115 -0
- package/dist/ai/manifest/components/BbPagination.json +61 -0
- package/dist/ai/manifest/components/BbPagination.tree.json +69 -0
- package/dist/ai/manifest/components/BbPopover.json +81 -0
- package/dist/ai/manifest/components/BbPopover.tree.json +36 -0
- package/dist/ai/manifest/components/BbProgress.json +31 -0
- package/dist/ai/manifest/components/BbProgress.tree.json +25 -0
- package/dist/ai/manifest/components/BbPtScope.json +21 -0
- package/dist/ai/manifest/components/BbRadio.json +88 -0
- package/dist/ai/manifest/components/BbRadio.tree.json +22 -0
- package/dist/ai/manifest/components/BbRadioGroup.json +132 -0
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +61 -0
- package/dist/ai/manifest/components/BbRating.json +100 -0
- package/dist/ai/manifest/components/BbRating.tree.json +55 -0
- package/dist/ai/manifest/components/BbSelect.json +174 -0
- package/dist/ai/manifest/components/BbSelect.tree.json +53 -0
- package/dist/ai/manifest/components/BbSelectPopover.json +124 -0
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +112 -0
- package/dist/ai/manifest/components/BbSlider.json +109 -0
- package/dist/ai/manifest/components/BbSlider.tree.json +89 -0
- package/dist/ai/manifest/components/BbSmoothHeight.json +31 -0
- package/dist/ai/manifest/components/BbSmoothHeight.tree.json +16 -0
- package/dist/ai/manifest/components/BbSpinner.json +31 -0
- package/dist/ai/manifest/components/BbSpinner.tree.json +31 -0
- package/dist/ai/manifest/components/BbSwitch.json +99 -0
- package/dist/ai/manifest/components/BbSwitch.tree.json +22 -0
- package/dist/ai/manifest/components/BbSwitchGroup.json +133 -0
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +61 -0
- package/dist/ai/manifest/components/BbTable.json +163 -0
- package/dist/ai/manifest/components/BbTable.tree.json +204 -0
- package/dist/ai/manifest/components/BbTabs.json +84 -0
- package/dist/ai/manifest/components/BbTabs.tree.json +88 -0
- package/dist/ai/manifest/components/BbTabsList.json +48 -0
- package/dist/ai/manifest/components/BbTabsList.tree.json +94 -0
- package/dist/ai/manifest/components/BbTabsPanels.json +32 -0
- package/dist/ai/manifest/components/BbTabsPanels.tree.json +69 -0
- package/dist/ai/manifest/components/BbTabsRoot.json +61 -0
- package/dist/ai/manifest/components/BbTag.json +130 -0
- package/dist/ai/manifest/components/BbTag.tree.json +40 -0
- package/dist/ai/manifest/components/BbTextInput.json +128 -0
- package/dist/ai/manifest/components/BbTextInput.tree.json +27 -0
- package/dist/ai/manifest/components/BbTextarea.json +123 -0
- package/dist/ai/manifest/components/BbTextarea.tree.json +37 -0
- package/dist/ai/manifest/components/BbTimePicker.json +76 -0
- package/dist/ai/manifest/components/BbTimePicker.tree.json +37 -0
- package/dist/ai/manifest/components/BbTimePickerInput.json +133 -0
- package/dist/ai/manifest/components/BbTimePickerInput.tree.json +44 -0
- package/dist/ai/manifest/components/BbToast.json +43 -0
- package/dist/ai/manifest/components/BbToast.tree.json +91 -0
- package/dist/ai/manifest/components/BbToastPortal.json +18 -0
- package/dist/ai/manifest/components/BbTooltip.json +60 -0
- package/dist/ai/manifest/components/BbTooltip.tree.json +41 -0
- package/dist/ai/manifest/components/BbTree.json +51 -0
- package/dist/ai/manifest/components/BbTree.tree.json +31 -0
- package/dist/ai/manifest/components/ChipsBox.json +32 -0
- package/dist/ai/manifest/components/ChipsBox.tree.json +11 -0
- package/dist/ai/manifest/components/ClearableButton.json +19 -0
- package/dist/ai/manifest/components/ClearableButton.tree.json +19 -0
- package/dist/ai/manifest/components/CommaBox.json +30 -0
- package/dist/ai/manifest/components/CommonField.json +56 -0
- package/dist/ai/manifest/components/CommonField.tree.json +110 -0
- package/dist/ai/manifest/components/CommonFieldInput.json +47 -0
- package/dist/ai/manifest/components/CommonFieldInput.tree.json +95 -0
- package/dist/ai/manifest/components/CommonPopover.json +44 -0
- package/dist/ai/manifest/components/CommonPopover.tree.json +26 -0
- package/dist/ai/manifest/components/CommonTimeSelector.json +31 -0
- package/dist/ai/manifest/components/CommonTimeSelector.tree.json +43 -0
- package/dist/ai/manifest/components/ErrorIcon.json +17 -0
- package/dist/ai/manifest/components/ErrorIcon.tree.json +22 -0
- package/dist/ai/manifest/components/FlatListBox.json +43 -0
- package/dist/ai/manifest/components/FlatListBox.tree.json +16 -0
- package/dist/ai/manifest/components/GroupedListBox.json +45 -0
- package/dist/ai/manifest/components/GroupedListBox.tree.json +16 -0
- package/dist/ai/manifest/components/GuidesComponent.json +17 -0
- package/dist/ai/manifest/components/ListBox.json +43 -0
- package/dist/ai/manifest/components/ListBox.tree.json +9 -0
- package/dist/ai/manifest/components/OptionsContainer.json +45 -0
- package/dist/ai/manifest/components/WarningIcon.json +17 -0
- package/dist/ai/manifest/components/WarningIcon.tree.json +22 -0
- package/dist/ai/manifest/index.json +118 -0
- package/dist/ai/manifest/meta.json +439 -0
- package/dist/ai/manifest/types.advanced.json +61 -0
- package/dist/ai/manifest/types.api.json +46 -0
- package/dist/ai/manifest/types.wrapper.json +115 -0
- package/dist/ai/recipes/inertia/approvals-inbox.md +160 -109
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +151 -82
- package/dist/ai/recipes/inertia/layout-scaffold.md +71 -40
- package/dist/ai/recipes/inertia/onboarding.md +80 -71
- package/dist/ai/recipes/inertia/ownership-atlas.md +251 -271
- package/dist/ai/recipes/inertia/record-form.md +357 -202
- package/dist/ai/recipes/inertia/records-workspace.md +466 -234
- package/dist/ai/recipes/inertia/settings-workspace.md +408 -1113
- package/dist/ai/recipes/inertia/upload-center.md +115 -106
- package/dist/ai/recipes/inertia/wizard-form.md +144 -86
- package/dist/ai/recipes/nuxt/approvals-inbox.md +237 -140
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +218 -92
- package/dist/ai/recipes/nuxt/layout-scaffold.md +72 -41
- package/dist/ai/recipes/nuxt/onboarding.md +148 -105
- package/dist/ai/recipes/nuxt/ownership-atlas.md +1408 -0
- package/dist/ai/recipes/nuxt/record-form.md +447 -208
- package/dist/ai/recipes/nuxt/records-workspace.md +532 -234
- package/dist/ai/recipes/nuxt/settings-workspace.md +426 -1129
- package/dist/ai/recipes/nuxt/upload-center.md +254 -166
- package/dist/ai/recipes/nuxt/wizard-form.md +168 -95
- package/dist/ai/recipes/vue/approvals-inbox.md +211 -126
- package/dist/ai/recipes/vue/inline-edit-workspace.md +197 -82
- package/dist/ai/recipes/vue/layout-scaffold.md +71 -40
- package/dist/ai/recipes/vue/onboarding.md +80 -71
- package/dist/ai/recipes/vue/ownership-atlas.md +1362 -0
- package/dist/ai/recipes/vue/record-form.md +176 -82
- package/dist/ai/recipes/vue/records-workspace.md +486 -215
- package/dist/ai/recipes/vue/settings-workspace.md +406 -1106
- package/dist/ai/recipes/vue/upload-center.md +200 -151
- package/dist/ai/recipes/vue/wizard-form.md +108 -78
- package/dist/ai/source/BbButton.md +68 -11
- package/dist/ai/source/BbCalendar.md +43 -18
- package/dist/ai/source/BbCheckbox.md +21 -2
- package/dist/ai/source/BbCheckboxGroup.md +153 -15
- package/dist/ai/source/BbCollapsible.md +1 -1
- package/dist/ai/source/BbColorInput.md +17 -1
- package/dist/ai/source/BbDatePicker.md +11 -9
- package/dist/ai/source/BbDatePickerInput.md +101 -48
- package/dist/ai/source/BbDialog.md +21 -4
- package/dist/ai/source/BbDropdown.md +230 -51
- package/dist/ai/source/BbDropdownGroup.md +268 -73
- package/dist/ai/source/BbDropzone.md +80 -9
- package/dist/ai/source/BbForm.md +107 -6
- package/dist/ai/source/BbIcon.md +5 -0
- package/dist/ai/source/BbNumberInput.md +23 -3
- package/dist/ai/source/BbOffCanvas.md +24 -6
- package/dist/ai/source/BbPagination.md +7 -1
- package/dist/ai/source/BbPopover.md +1 -1
- package/dist/ai/source/BbRadio.md +21 -2
- package/dist/ai/source/BbRadioGroup.md +133 -15
- package/dist/ai/source/BbRating.md +33 -4
- package/dist/ai/source/BbSelect.md +72 -9
- package/dist/ai/source/BbSelectPopover.md +327 -100
- package/dist/ai/source/BbSlider.md +21 -2
- package/dist/ai/source/BbSwitch.md +6 -1
- package/dist/ai/source/BbSwitchGroup.md +73 -12
- package/dist/ai/source/BbTable.md +431 -166
- package/dist/ai/source/BbTabs.md +5 -5
- package/dist/ai/source/BbTabsList.md +3 -3
- package/dist/ai/source/BbTabsPanels.md +3 -3
- package/dist/ai/source/BbTabsRoot.md +3 -3
- package/dist/ai/source/BbTag.md +26 -3
- package/dist/ai/source/BbTextInput.md +56 -7
- package/dist/ai/source/BbTextarea.md +69 -12
- package/dist/ai/source/BbTimePickerInput.md +55 -12
- package/dist/ai/source/BbTooltip.md +1 -1
- package/dist/ai/source/BbTree.md +2 -2
- package/dist/ai/source/CommonField.md +253 -5
- package/dist/ai/source/CommonFieldInput.md +6 -0
- package/dist/ai/source/CommonPopover.md +1 -1
- package/dist/ai/source/CommonTimeSelector.md +12 -5
- package/dist/ai/source/FlatListBox.md +27 -2
- package/dist/ai/source/GroupedListBox.md +27 -2
- package/dist/ai/source/ListBox.md +7 -0
- package/dist/ai/source/OptionsContainer.md +62 -5
- package/dist/components/BbAlert/BbAlert.vue.d.ts +1 -3
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -3
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +143 -140
- package/dist/components/BbCalendar/types.d.ts +5 -5
- package/dist/components/BbCalendar/useCalendarGrid.js +143 -137
- package/dist/components/BbCalendar/useDayGrid.js +164 -122
- package/dist/components/BbCalendar/useDayjsLocale.d.ts +31 -0
- package/dist/components/BbCalendar/useDayjsLocale.js +34 -0
- package/dist/components/BbCheckbox/BbCheckbox.vue_vue_type_script_setup_true_lang.js +6 -0
- package/dist/components/BbCheckbox/types.d.ts +13 -1
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +41 -51
- package/dist/components/BbCheckboxGroup/types.d.ts +59 -5
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +6 -0
- package/dist/components/BbColorInput/types.d.ts +13 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +96 -93
- package/dist/components/BbDatePicker/types.d.ts +4 -4
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +328 -306
- package/dist/components/BbDatePickerInput/dateFieldLayout.d.ts +23 -0
- package/dist/components/BbDatePickerInput/dateFieldLayout.js +38 -0
- package/dist/components/BbDatePickerInput/types.d.ts +16 -4
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +126 -121
- package/dist/components/BbDialog/types.d.ts +6 -1
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +76 -68
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +249 -216
- package/dist/components/BbDropdown/BbDropdownGroup.vue.d.ts +11 -4
- package/dist/components/BbDropdown/BbDropdownGroup.vue_vue_type_script_setup_true_lang.js +48 -19
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +245 -239
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +120 -103
- package/dist/components/BbDropdown/types.d.ts +84 -39
- package/dist/components/BbDropdown/useDropdownContext.d.ts +2 -0
- package/dist/components/BbDropdown/useDropdownGroupRegistry.d.ts +61 -0
- package/dist/components/BbDropzone/BbDropzone.vue_vue_type_script_setup_true_lang.js +149 -123
- package/dist/components/BbDropzone/types.d.ts +18 -3
- package/dist/components/BbDropzone/types.js +1 -0
- package/dist/components/BbForm/BbForm.vue.d.ts +18 -2
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +130 -96
- package/dist/components/BbForm/BbFormCustomField.js +33 -27
- package/dist/components/BbForm/bindFormField.js +1 -0
- package/dist/components/BbForm/formFields.d.ts +9 -1
- package/dist/components/BbIcon/BbIcon.vue.d.ts +1 -3
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/BbNumberInput/types.d.ts +13 -1
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +1 -3
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +197 -192
- package/dist/components/BbOffCanvas/hostCloseLabel.d.ts +3 -0
- package/dist/components/BbOffCanvas/hostCloseLabel.js +8 -0
- package/dist/components/BbOffCanvas/types.d.ts +6 -1
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +101 -100
- package/dist/components/BbRadio/BbRadio.vue_vue_type_script_setup_true_lang.js +6 -0
- package/dist/components/BbRadio/types.d.ts +13 -1
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +38 -48
- package/dist/components/BbRadioGroup/types.d.ts +58 -5
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +10 -2
- package/dist/components/BbRating/types.d.ts +17 -3
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +196 -215
- package/dist/components/BbSelect/types.d.ts +58 -4
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +404 -352
- package/dist/components/BbSelectPopover/types.d.ts +46 -6
- package/dist/components/BbSlider/BbSlider.vue_vue_type_script_setup_true_lang.js +7 -0
- package/dist/components/BbSlider/types.d.ts +13 -1
- package/dist/components/BbSpinner/BbSpinner.vue.d.ts +1 -3
- package/dist/components/BbSwitch/BbSwitch.vue_vue_type_script_setup_true_lang.js +6 -0
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +138 -148
- package/dist/components/BbSwitchGroup/types.d.ts +7 -2
- package/dist/components/BbTable/BbTable.vue.d.ts +10 -50
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1187 -1087
- package/dist/components/BbTable/BbTableEdgeRow.d.ts +110 -0
- package/dist/components/BbTable/BbTableEdgeRow.js +65 -0
- package/dist/components/BbTable/types.d.ts +125 -55
- package/dist/components/BbTable/types.js +2 -0
- package/dist/components/BbTabs/types.d.ts +3 -3
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +140 -134
- package/dist/components/BbTag/types.d.ts +13 -1
- package/dist/components/BbTextInput/BbTextInput.vue_vue_type_script_setup_true_lang.js +129 -106
- package/dist/components/BbTextInput/types.d.ts +29 -7
- package/dist/components/BbTextInput/types.js +9 -5
- package/dist/components/BbTextarea/BbTextarea.vue_vue_type_script_setup_true_lang.js +125 -101
- package/dist/components/BbTextarea/types.d.ts +29 -7
- package/dist/components/BbTextarea/types.js +9 -5
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +245 -239
- package/dist/components/BbTimePickerInput/types.d.ts +13 -1
- package/dist/components/BbTree/types.d.ts +1 -1
- package/dist/components/CommonField/CommonField.vue.d.ts +1 -1
- package/dist/components/CommonField/CommonField.vue_vue_type_script_setup_true_lang.js +114 -78
- package/dist/components/CommonField/types.d.ts +22 -3
- package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/CommonTimeSelector/CommonTimeSelector.vue.d.ts +1 -1
- package/dist/components/CommonTimeSelector/CommonTimeSelector.vue_vue_type_script_setup_true_lang.js +97 -92
- package/dist/components/CommonTimeSelector/useMeridiem.d.ts +19 -0
- package/dist/components/CommonTimeSelector/useMeridiem.js +41 -0
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +70 -62
- package/dist/components/FlatListBox/types.d.ts +5 -0
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +142 -134
- package/dist/components/GroupedListBox/types.d.ts +5 -0
- package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +5 -0
- package/dist/components/ListBox/types.d.ts +5 -0
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +73 -65
- package/dist/components/OptionsContainer/types.d.ts +28 -3
- package/dist/composables/useBbFormContext.d.ts +15 -4
- package/dist/composables/useBbFormContext.js +18 -5
- package/dist/composables/useBbTabsContext.d.ts +1 -1
- package/dist/composables/useBbTabsContext.js +1 -1
- package/dist/composables/useCharacterCounter.d.ts +33 -0
- package/dist/composables/useCharacterCounter.js +29 -0
- package/dist/composables/useHydrated.d.ts +16 -4
- package/dist/composables/useHydrated.js +27 -9
- package/dist/composables/useItemsGetter.d.ts +41 -9
- package/dist/composables/useItemsGetter.js +67 -45
- package/dist/composables/usePrefill.d.ts +4 -3
- package/dist/composables/usePrefill.js +2 -2
- package/dist/deprecation/ai-deprecations.json.d.ts +143 -0
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/directives/createPopoverDirective.js +17 -7
- package/dist/i18n/locales/cs.json +12 -3
- package/dist/i18n/locales/da.json +12 -3
- package/dist/i18n/locales/de.json +12 -3
- package/dist/i18n/locales/el.json +12 -3
- package/dist/i18n/locales/en.json +10 -1
- package/dist/i18n/locales/es.json +10 -1
- package/dist/i18n/locales/fi.json +12 -3
- package/dist/i18n/locales/fr.json +10 -1
- package/dist/i18n/locales/hu.json +12 -3
- package/dist/i18n/locales/it.json +10 -1
- package/dist/i18n/locales/ja.json +12 -3
- package/dist/i18n/locales/ko.json +12 -3
- package/dist/i18n/locales/nb.json +12 -3
- package/dist/i18n/locales/nl.json +12 -3
- package/dist/i18n/locales/pl.json +12 -3
- package/dist/i18n/locales/pt.json +10 -1
- package/dist/i18n/locales/ro.json +12 -3
- package/dist/i18n/locales/ru.json +12 -3
- package/dist/i18n/locales/sv.json +12 -3
- package/dist/i18n/locales/tr.json +12 -3
- package/dist/i18n/locales/uk.json +12 -3
- package/dist/i18n/locales/zh-cn.json +12 -3
- package/dist/index.d.ts +9 -0
- package/dist/llms-full.txt +23714 -20038
- package/dist/llms-medium.txt +83 -62
- package/dist/llms.txt +7 -8
- package/dist/locale-blueprint.json +10 -1
- package/dist/plugin.js +6 -4
- package/dist/runtime/nuxt-plugin.js +2 -2
- package/dist/styles.css +2 -2
- package/dist/types/CommonProps.d.ts +13 -3
- package/dist/types/FieldLayout.d.ts +7 -0
- package/dist/types/FieldLayout.js +8 -0
- package/dist/types/ItemsProvider.d.ts +91 -0
- package/dist/types/passthrough.d.ts +17 -1
- package/dist/types/passthrough.js +8 -8
- package/dist/types/ptComponentMap.d.ts +4 -4
- package/dist/utilities/functions/animationsSettled.d.ts +7 -0
- package/dist/utilities/functions/animationsSettled.js +6 -0
- package/dist/utilities/functions/elementLabel.d.ts +8 -0
- package/dist/utilities/functions/elementLabel.js +6 -0
- package/dist/utilities/functions/parseSize.d.ts +2 -1
- package/dist/utilities/functions/readableValue.d.ts +6 -0
- package/dist/utilities/functions/readableValue.js +4 -0
- package/dist/utilities/functions/settlesVisible.d.ts +20 -0
- package/dist/utilities/functions/settlesVisible.js +18 -0
- package/dist/utilities/functions/throttle.d.ts +1 -4
- package/dist/utilities/functions/throttle.js +1 -4
- package/dist/utilities/functions/warnRemovedAttrs.d.ts +12 -0
- package/dist/utilities/functions/warnRemovedAttrs.js +12 -12
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite.js +1 -1
- package/llms.txt +7 -8
- package/package.json +28 -17
- package/scripts/README.md +35 -33
- package/scripts/lib/agent-manifest.mjs +509 -0
- package/scripts/lib/css-class-check.mjs +4 -1
- package/scripts/lib/css-color-resolve.mjs +128 -4
- package/scripts/lib/css-local-check.mjs +198 -33
- package/scripts/lib/design-token-manifest.mjs +11 -4
- package/scripts/lib/ensure-manifest.mjs +80 -7
- package/scripts/lib/eslint-disable.mjs +4 -0
- package/scripts/lib/eslint-plugin.d.ts +5 -1
- package/scripts/lib/eslint-plugin.mjs +180 -2
- package/scripts/lib/example-checks.mjs +337 -0
- package/scripts/lib/guide-claims.mjs +452 -0
- package/scripts/lib/hand-imported-styles.mjs +7 -2
- package/scripts/lib/items-provider-context.mjs +842 -0
- package/scripts/lib/linked-target.mjs +30 -0
- package/scripts/lib/manifest-pointers.mjs +71 -0
- package/scripts/lib/mcp-config.mjs +6 -0
- package/scripts/lib/slot-renames.mjs +5 -6
- package/scripts/lib/toolchain-check.mjs +224 -0
- package/scripts/lib/validate-bb-markup.mjs +452 -25
- package/dist/ai/recipes/inertia/command-palette.md +0 -311
- package/dist/ai/recipes/nuxt/command-palette.md +0 -300
- package/dist/ai/recipes/vue/command-palette.md +0 -297
package/README.md
CHANGED
|
@@ -127,7 +127,7 @@ magnitude, not a contract.
|
|
|
127
127
|
|
|
128
128
|
- [Core knowledge base](https://llms-bitboss-ui.bitboss.it/dist/llms-medium.txt) (about 200 KB) — **start here if you can only fetch one file.** Hard rules, setup, component picker, design language, and the full component catalogue.
|
|
129
129
|
- [Index](https://llms-bitboss-ui.bitboss.it/llms.txt) (about 20 KB) — link index into every document.
|
|
130
|
-
- [
|
|
130
|
+
- [Component API files](https://llms-bitboss-ui.bitboss.it/dist/ai/manifest/index.json) — machine-readable API, one file per component (`manifest/components/<Name>.json`), each one read. The same data in one file for tools: [components.json](https://llms-bitboss-ui.bitboss.it/dist/ai/components.json) (about 1.2 MB).
|
|
131
131
|
- [Complete knowledge base](https://llms-bitboss-ui.bitboss.it/dist/llms-full.txt) (about 5 MB) — everything concatenated. Bulk ingestion only; too large to prompt with.
|
|
132
132
|
|
|
133
133
|
Already installed? Prefer the local copy under `node_modules/bitboss-ui/dist/ai/`,
|
|
@@ -327,13 +327,13 @@ part you need.
|
|
|
327
327
|
|
|
328
328
|
### CLI commands
|
|
329
329
|
|
|
330
|
-
| Command | What it does
|
|
331
|
-
| ------------------------------------------------------------------------- |
|
|
332
|
-
| `npx bitboss-ui ai-init [--update] [--no-mcp]` | Writes the agent pointer files and registers the MCP server (installs its optional peers).
|
|
333
|
-
| `npx bitboss-ui check [paths…] [--fix] [--json]`
|
|
334
|
-
| `npx bitboss-ui changelog --since <version> [--until <version>] [--json]` | Lists the **breaking** changes between the version you are on and the installed one — what breaks if you bump.
|
|
335
|
-
| `npx bitboss-ui mcp` | Starts the MCP server on stdio (harnesses launch it for you after `ai-init`).
|
|
336
|
-
| `npx bitboss-ui --help` | Every command and flag.
|
|
330
|
+
| Command | What it does |
|
|
331
|
+
| ------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
332
|
+
| `npx bitboss-ui ai-init [--update] [--no-mcp]` | Writes the agent pointer files and registers the MCP server (installs its optional peers). |
|
|
333
|
+
| `npx bitboss-ui check [paths… \| --changed] [--fix] [--json]` | Validates `Bb*` markup in `.vue` / `.md` files against the installed version; `--fix` applies the v2 → v3 renames first; `--changed` checks only the files git sees changed vs HEAD (plus untracked). |
|
|
334
|
+
| `npx bitboss-ui changelog --since <version> [--until <version>] [--json]` | Lists the **breaking** changes between the version you are on and the installed one — what breaks if you bump. |
|
|
335
|
+
| `npx bitboss-ui mcp` | Starts the MCP server on stdio (harnesses launch it for you after `ai-init`). |
|
|
336
|
+
| `npx bitboss-ui --help` | Every command and flag. |
|
|
337
337
|
|
|
338
338
|
### ESLint plugin
|
|
339
339
|
|
|
@@ -482,6 +482,9 @@ still name the button:
|
|
|
482
482
|
```
|
|
483
483
|
|
|
484
484
|
`BbSpinner` is not covered: without `label` it is decorative, which is correct.
|
|
485
|
+
A `BbBadge` or `BbProgress` marked `aria-hidden="true"` (or `:aria-hidden="true"`)
|
|
486
|
+
is decorative too and is skipped (a `BbButton` is not: it stays focusable); a dynamic `:aria-hidden="flag"` is still checked, since it
|
|
487
|
+
needs a name whenever it is `false`.
|
|
485
488
|
For raw HTML controls, use `eslint-plugin-vuejs-accessibility`.
|
|
486
489
|
|
|
487
490
|
#### v-model on a const reactive(): `no-reactive-v-model`
|
|
@@ -617,7 +620,8 @@ A standard `llms.txt` discovery file is also published at:
|
|
|
617
620
|
| ------------------------------------- | ------------------------------------------------------------------------------------ |
|
|
618
621
|
| `dist/ai/guides/ai-router.md` | **Start here** — which file to open next |
|
|
619
622
|
| `dist/ai/index.md` | Full catalogue + agent rules |
|
|
620
|
-
| `dist/ai/
|
|
623
|
+
| `dist/ai/manifest/index.json` | Machine-readable API for agents: the component list → `components/<Name>.json` |
|
|
624
|
+
| `dist/ai/components.json` | The same API in one file, for tools (`check`, ESLint, MCP) |
|
|
621
625
|
| `dist/ai/<ComponentName>.md` | Guide-first contract per component |
|
|
622
626
|
| `dist/ai/composables/<name>.md` | Composable docs |
|
|
623
627
|
| `dist/ai/guides/agent-contract.md` | Mandatory agent rules |
|
|
@@ -636,6 +640,7 @@ files directly:
|
|
|
636
640
|
| ----------------------------------- | ------------------------------ |
|
|
637
641
|
| `bitboss-ui/ai` | `dist/ai/index.md` (catalogue) |
|
|
638
642
|
| `bitboss-ui/ai/components.json` | `dist/ai/components.json` |
|
|
643
|
+
| `bitboss-ui/ai/manifest/index.json` | `dist/ai/manifest/index.json` |
|
|
639
644
|
| `bitboss-ui/ai/guides/ai-router.md` | `dist/ai/guides/ai-router.md` |
|
|
640
645
|
|
|
641
646
|
Agents can also read paths under `node_modules/bitboss-ui/dist/ai/` directly.
|
package/bin/bitboss-ui-mcp.mjs
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
|
|
32
32
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
33
33
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
34
|
-
import { existsSync, readFileSync, readdirSync } from 'node:fs';
|
|
34
|
+
import { existsSync, readFileSync, readdirSync, statSync } from 'node:fs';
|
|
35
35
|
import { dirname, join, sep } from 'node:path';
|
|
36
36
|
import { fileURLToPath } from 'node:url';
|
|
37
37
|
import { z } from 'zod';
|
|
@@ -48,6 +48,10 @@ import {
|
|
|
48
48
|
possessive,
|
|
49
49
|
validateVueSnippet,
|
|
50
50
|
} from '../scripts/lib/validate-bb-markup.mjs';
|
|
51
|
+
import {
|
|
52
|
+
agentComponent,
|
|
53
|
+
firstSentence,
|
|
54
|
+
} from '../scripts/lib/agent-manifest.mjs';
|
|
51
55
|
|
|
52
56
|
const PACKAGE_ROOT = join(dirname(fileURLToPath(import.meta.url)), '..');
|
|
53
57
|
const AI_ROOT = join(PACKAGE_ROOT, 'dist', 'ai');
|
|
@@ -65,19 +69,38 @@ function packageVersion() {
|
|
|
65
69
|
}
|
|
66
70
|
}
|
|
67
71
|
|
|
72
|
+
/*
|
|
73
|
+
* Parsed once per build of components.json (Q56.46): the 1.2 MB file was
|
|
74
|
+
* re-read and re-parsed on every tool call. Both caches below (the raw
|
|
75
|
+
* manifest for the lookup tools, the validator's map for `validate`) are
|
|
76
|
+
* keyed on the file's mtime, so a rebuild under a running server (library
|
|
77
|
+
* repo, `npm run build`) is picked up by every tool.
|
|
78
|
+
*/
|
|
79
|
+
let cachedManifest = null;
|
|
68
80
|
function loadComponentsManifest() {
|
|
69
81
|
if (!existsSync(MANIFEST_PATH)) {
|
|
70
82
|
throw new Error(
|
|
71
83
|
`components.json not found at ${MANIFEST_PATH} — reinstall bitboss-ui (or run \`npm run build\` when working in the library repo).`
|
|
72
84
|
);
|
|
73
85
|
}
|
|
74
|
-
|
|
86
|
+
const mtime = statSync(MANIFEST_PATH).mtimeMs;
|
|
87
|
+
if (cachedManifest?.mtime !== mtime)
|
|
88
|
+
cachedManifest = {
|
|
89
|
+
mtime,
|
|
90
|
+
value: JSON.parse(readFileSync(MANIFEST_PATH, 'utf-8')),
|
|
91
|
+
};
|
|
92
|
+
return cachedManifest.value;
|
|
75
93
|
}
|
|
76
94
|
|
|
77
95
|
let cachedManifestMap = null;
|
|
78
96
|
function getManifestMap() {
|
|
79
|
-
|
|
80
|
-
|
|
97
|
+
// Missing file: loadManifest throws the install hint.
|
|
98
|
+
const mtime = existsSync(MANIFEST_PATH)
|
|
99
|
+
? statSync(MANIFEST_PATH).mtimeMs
|
|
100
|
+
: null;
|
|
101
|
+
if (cachedManifestMap?.mtime !== mtime || mtime === null)
|
|
102
|
+
cachedManifestMap = { mtime, value: loadManifest(MANIFEST_PATH) };
|
|
103
|
+
return cachedManifestMap.value;
|
|
81
104
|
}
|
|
82
105
|
|
|
83
106
|
/** `search_components({ query })` — token match over name/description. */
|
|
@@ -745,43 +768,9 @@ const SUMMARY_SECTIONS = [/^gotchas/i];
|
|
|
745
768
|
* keeps EVERY name (a partial prop list is what makes agents invent API) as one
|
|
746
769
|
* line — name, type, default, the description's first sentence — and marks a
|
|
747
770
|
* cut sentence with " …": `members: ['name']` returns the full row.
|
|
771
|
+
* `firstSentence` lives in scripts/lib/agent-manifest.mjs: the manifest
|
|
772
|
+
* index (Q56.46) cuts descriptions the same way.
|
|
748
773
|
*/
|
|
749
|
-
function firstSentence(text, cap = 160) {
|
|
750
|
-
const flat = String(text ?? '')
|
|
751
|
-
.replace(/\s+/g, ' ')
|
|
752
|
-
.trim();
|
|
753
|
-
if (!flat) return '';
|
|
754
|
-
// A sentence ends at ". " before a capital, a backtick or a bracket — not
|
|
755
|
-
// inside "1.234,56", "v3.0.0" or after "e.g." / "i.e." / "etc.".
|
|
756
|
-
const ends = [...flat.matchAll(/[.!?](?=\s+[A-Z`([]|$)/g)]
|
|
757
|
-
.map((m) => m.index)
|
|
758
|
-
.filter((i) => !/\b(e\.g|i\.e|etc|vs|approx)$/i.test(flat.slice(0, i)));
|
|
759
|
-
let stop = ends[0] ?? flat.length - 1;
|
|
760
|
-
// A second sentence that limits the first ("Only …", "Ignored with …",
|
|
761
|
-
// "Not called in …") changes what the first one means: keep it.
|
|
762
|
-
const next = flat.slice(stop + 1).trim();
|
|
763
|
-
if (
|
|
764
|
-
ends[1] != null &&
|
|
765
|
-
/^(Only|Not|Never|Ignored|Mutually|Takes precedence|Requires|Must|Has no effect|Without|Unless|Deprecated|Wins over|Overrides)\b/.test(
|
|
766
|
-
next
|
|
767
|
-
)
|
|
768
|
-
)
|
|
769
|
-
stop = ends[1];
|
|
770
|
-
// A short, generic first sentence ("The id.") says little: add the next.
|
|
771
|
-
if (stop + 1 < 60 && ends[ends.indexOf(stop) + 1] != null)
|
|
772
|
-
stop = ends[ends.indexOf(stop) + 1];
|
|
773
|
-
let out = flat.slice(0, stop + 1);
|
|
774
|
-
if (out.length > cap) {
|
|
775
|
-
let cut = out.lastIndexOf(' ', cap);
|
|
776
|
-
if (cut < 40) cut = cap;
|
|
777
|
-
let head = out.slice(0, cut);
|
|
778
|
-
// Never end inside a code span: an unpaired backtick reads as code.
|
|
779
|
-
if ((head.match(/`/g) ?? []).length % 2)
|
|
780
|
-
head = head.slice(0, head.lastIndexOf('`')).trimEnd();
|
|
781
|
-
out = `${head} …`;
|
|
782
|
-
} else if (out.length < flat.length) out += ' …';
|
|
783
|
-
return out;
|
|
784
|
-
}
|
|
785
774
|
|
|
786
775
|
/** A type as the summary prints it: no ` | undefined` tail, long ones cut. */
|
|
787
776
|
function shortType(type, cap = 180) {
|
|
@@ -902,6 +891,96 @@ function historyLines(entry) {
|
|
|
902
891
|
];
|
|
903
892
|
}
|
|
904
893
|
|
|
894
|
+
/**
|
|
895
|
+
* Q57.6: the `css.classes` of the internal parts a component mounts
|
|
896
|
+
* (`CommonPopover`, `CommonField`, the listboxes), by part. The class surface
|
|
897
|
+
* lists a block once, on its owner, and an internal owner is no component a
|
|
898
|
+
* consumer asks about: `.bb-common-popover__bubble` was on no BbDropdown or
|
|
899
|
+
* BbPopover answer. A public child (BbBaseButton) answers for its own.
|
|
900
|
+
*/
|
|
901
|
+
function internalClasses(entry, manifest) {
|
|
902
|
+
const byName = new Map(manifest.components.map((c) => [c.name, c]));
|
|
903
|
+
const out = {};
|
|
904
|
+
const walk = (nodes = []) => {
|
|
905
|
+
for (const node of nodes) {
|
|
906
|
+
if (node.kind !== 'internal') continue;
|
|
907
|
+
const classes = byName.get(node.name)?.css?.classes;
|
|
908
|
+
if (classes && !out[node.name]) out[node.name] = classes;
|
|
909
|
+
walk(node.children);
|
|
910
|
+
}
|
|
911
|
+
};
|
|
912
|
+
walk(entry.tree?.nodes);
|
|
913
|
+
return out;
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
/** `css` of a get_component answer: its own classes, plus `shared` (Q57.6). */
|
|
917
|
+
function cssAnswer(entry, manifest) {
|
|
918
|
+
const shared = internalClasses(entry, manifest);
|
|
919
|
+
return Object.keys(shared).length ? { ...entry.css, shared } : entry.css;
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
/** Every `.bb-*` block a component renders, its own and its internal parts'. */
|
|
923
|
+
function renderedBlocks(entry, manifest) {
|
|
924
|
+
return new Set([
|
|
925
|
+
...Object.keys(entry.css?.classes ?? {}),
|
|
926
|
+
...Object.values(internalClasses(entry, manifest)).flatMap(Object.keys),
|
|
927
|
+
]);
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
/**
|
|
931
|
+
* Q57.7: does a changelog row reach this component? By name, or — for a CSS
|
|
932
|
+
* rename (`surface: cssVar | class`), whose Component cell is a selector
|
|
933
|
+
* (`.bb-table`) or prose ("every form control") — by a `.bb-*` block of the
|
|
934
|
+
* row the component renders: `--padding-y → --py` on `.bb-table` never
|
|
935
|
+
* reached BbTable's history or `list_changes({ component: 'BbTable' })`.
|
|
936
|
+
*/
|
|
937
|
+
function rowReaches(row, name, blocks) {
|
|
938
|
+
if (
|
|
939
|
+
(row.components ?? []).some((c) => c.toLowerCase() === name.toLowerCase())
|
|
940
|
+
)
|
|
941
|
+
return true;
|
|
942
|
+
if (!blocks || (row.surface !== 'cssVar' && row.surface !== 'class'))
|
|
943
|
+
return false;
|
|
944
|
+
const text = [...(row.components ?? []), row.from, row.to].join(' ');
|
|
945
|
+
return [...text.matchAll(/\.(bb-[a-z0-9]+(?:-[a-z0-9]+)*)/g)].some((m) =>
|
|
946
|
+
blocks.has(m[1])
|
|
947
|
+
);
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
/** The CSS renames (cssVar, class) that reach a component, one line each. */
|
|
951
|
+
function cssRenameLines(entry, manifest) {
|
|
952
|
+
if (!existsSync(CHANGELOG_PATH)) return [];
|
|
953
|
+
const doc = JSON.parse(readFileSync(CHANGELOG_PATH, 'utf-8'));
|
|
954
|
+
const blocks = renderedBlocks(entry, manifest);
|
|
955
|
+
return (doc.breaking ?? [])
|
|
956
|
+
.filter(
|
|
957
|
+
(row) =>
|
|
958
|
+
(row.surface === 'cssVar' || row.surface === 'class') &&
|
|
959
|
+
rowReaches(row, entry.name, blocks)
|
|
960
|
+
)
|
|
961
|
+
.map(
|
|
962
|
+
(row) =>
|
|
963
|
+
`${/^f\d/.test(row.id) ? `${row.id} ` : ''}${row.surface} ${row.from} → ${row.to ?? 'removed'}${row.firstReleasedIn ? ` (${row.firstReleasedIn})` : ''}`
|
|
964
|
+
);
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
/**
|
|
968
|
+
* The history lines, plus the CSS locals renamed on the component's blocks;
|
|
969
|
+
* the class renames only as a count (include: ['history'] lists them).
|
|
970
|
+
*/
|
|
971
|
+
function historyWithCss(entry, manifest) {
|
|
972
|
+
const css = cssRenameLines(entry, manifest);
|
|
973
|
+
const vars = css.filter((line) => / cssVar |^cssVar /.test(line));
|
|
974
|
+
const classes = css.length - vars.length;
|
|
975
|
+
return [
|
|
976
|
+
...historyLines(entry),
|
|
977
|
+
...vars,
|
|
978
|
+
...(classes
|
|
979
|
+
? [`${classes} .bb-* class rename(s) on its blocks: include: ['history']`]
|
|
980
|
+
: []),
|
|
981
|
+
];
|
|
982
|
+
}
|
|
983
|
+
|
|
905
984
|
/** The compact `component` of the summary answer. */
|
|
906
985
|
function summarizeComponent(entry, manifest) {
|
|
907
986
|
const shared = sharedProps(manifest);
|
|
@@ -943,9 +1022,10 @@ function summarizeComponent(entry, manifest) {
|
|
|
943
1022
|
...(entry.cssProps?.length
|
|
944
1023
|
? { cssProps: entry.cssProps.map((c) => c.name ?? c) }
|
|
945
1024
|
: {}),
|
|
946
|
-
...(
|
|
947
|
-
|
|
948
|
-
: {}
|
|
1025
|
+
...(() => {
|
|
1026
|
+
const history = historyWithCss(entry, manifest);
|
|
1027
|
+
return history.length ? { history } : {};
|
|
1028
|
+
})(),
|
|
949
1029
|
...(entry.attrTargets ? { attrTargets: entry.attrTargets } : {}),
|
|
950
1030
|
...(entry.referenceOnly ? { referenceOnly: true } : {}),
|
|
951
1031
|
};
|
|
@@ -1244,7 +1324,9 @@ function getComponent({
|
|
|
1244
1324
|
...(wanted.has('cssProps') && entry.cssProps
|
|
1245
1325
|
? { cssProps: entry.cssProps }
|
|
1246
1326
|
: {}),
|
|
1247
|
-
...(wanted.has('css') && entry.css
|
|
1327
|
+
...(wanted.has('css') && entry.css
|
|
1328
|
+
? { css: cssAnswer(entry, manifest) }
|
|
1329
|
+
: {}),
|
|
1248
1330
|
...(wanted.has('ptProps')
|
|
1249
1331
|
? (() => {
|
|
1250
1332
|
const { kept, ...rest } = capParts(ptRows, 'PtProps');
|
|
@@ -1252,7 +1334,11 @@ function getComponent({
|
|
|
1252
1334
|
})()
|
|
1253
1335
|
: {}),
|
|
1254
1336
|
...(wanted.has('history')
|
|
1255
|
-
? {
|
|
1337
|
+
? {
|
|
1338
|
+
removed: entry.removed ?? [],
|
|
1339
|
+
renamed: entry.renamed ?? [],
|
|
1340
|
+
cssRenames: cssRenameLines(entry, manifest),
|
|
1341
|
+
}
|
|
1256
1342
|
: {}),
|
|
1257
1343
|
...(wanted.has('contract')
|
|
1258
1344
|
? (() => {
|
|
@@ -1293,30 +1379,46 @@ function getComponent({
|
|
|
1293
1379
|
};
|
|
1294
1380
|
}
|
|
1295
1381
|
|
|
1382
|
+
/*
|
|
1383
|
+
* The whole entry is the shipped agent file, dist/ai/manifest/components/
|
|
1384
|
+
* <Name>.json (Q56.46: one builder), with the MCP's own compaction on top:
|
|
1385
|
+
* the types go in the answer's `types` (with import lines), the cssProps
|
|
1386
|
+
* as names, the register as one history line per old name.
|
|
1387
|
+
*/
|
|
1388
|
+
const { types: _agentTypes, ...agent } = agentComponent(entry, manifest);
|
|
1296
1389
|
const component = {
|
|
1297
|
-
...
|
|
1298
|
-
|
|
1299
|
-
?
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1390
|
+
...agent,
|
|
1391
|
+
...(wanted.has('ptProps')
|
|
1392
|
+
? {
|
|
1393
|
+
props: entry.props.map(({ required, ...prop }) =>
|
|
1394
|
+
required ? { ...prop, required } : prop
|
|
1395
|
+
),
|
|
1396
|
+
}
|
|
1397
|
+
: {}),
|
|
1398
|
+
...(entry.cssProps
|
|
1399
|
+
? {
|
|
1400
|
+
cssProps: wanted.has('cssProps')
|
|
1401
|
+
? entry.cssProps
|
|
1402
|
+
: entry.cssProps.map((c) => c.name ?? c),
|
|
1403
|
+
}
|
|
1404
|
+
: {}),
|
|
1405
|
+
...(wanted.has('tree') && entry.tree ? { tree: entry.tree } : {}),
|
|
1406
|
+
// The rendered `.bb-*` classes (Q46.5) are for tools (`check`,
|
|
1407
|
+
// `validate`); an agent restyles through pt and the locals.
|
|
1408
|
+
...(wanted.has('css') && entry.css
|
|
1409
|
+
? { css: cssAnswer(entry, manifest) }
|
|
1304
1410
|
: {}),
|
|
1305
1411
|
};
|
|
1306
|
-
if (!wanted.has('tree')) delete component.tree;
|
|
1307
|
-
// The rendered `.bb-*` classes (Q46.5) are for tools (`check`, `validate`);
|
|
1308
|
-
// an agent restyles through pt and the locals. include: ['css'] lists them.
|
|
1309
|
-
if (!wanted.has('css')) delete component.css;
|
|
1310
1412
|
// `removed` and `renamed` repeat each other with migration metadata; one
|
|
1311
1413
|
// line per old name answers "what happened to X" (include 'history' for
|
|
1312
1414
|
// the records the fixers use).
|
|
1313
|
-
if (
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1415
|
+
if (wanted.has('history')) {
|
|
1416
|
+
if (entry.renamed) component.renamed = entry.renamed;
|
|
1417
|
+
component.cssRenames = cssRenameLines(entry, manifest);
|
|
1418
|
+
} else {
|
|
1419
|
+
const history = historyWithCss(entry, manifest);
|
|
1420
|
+
if (history.length) component.history = history;
|
|
1318
1421
|
delete component.removed;
|
|
1319
|
-
delete component.renamed;
|
|
1320
1422
|
}
|
|
1321
1423
|
|
|
1322
1424
|
const always = guide.filter(
|
|
@@ -1372,7 +1474,7 @@ function getComponent({
|
|
|
1372
1474
|
: {}),
|
|
1373
1475
|
}
|
|
1374
1476
|
: {}),
|
|
1375
|
-
hint: `Structured API above is complete. Read guide sections with get_component({ name: '${entry.name}', sections: ['<title from guide.sections>'] }); add include: ['tree' | 'cssProps' | 'css' | 'ptProps' | 'history' | 'contract'] for the component tree, CSS variables with descriptions, the .bb-* classes it renders, every pt:* row, the full v2/beta rename records, or the whole contract. search_docs finds a topic across all docs.`,
|
|
1477
|
+
hint: `Structured API above is complete. Read guide sections with get_component({ name: '${entry.name}', sections: ['<title from guide.sections>'] }); add include: ['tree' | 'cssProps' | 'css' | 'ptProps' | 'history' | 'contract'] for the component tree, CSS variables with descriptions, the .bb-* classes it renders (css.shared: the ones its internal parts render), every pt:* row, the full v2/beta rename records (cssRenames: the CSS local and class renames on its blocks), or the whole contract. search_docs finds a topic across all docs.`,
|
|
1376
1478
|
};
|
|
1377
1479
|
}
|
|
1378
1480
|
|
|
@@ -1451,8 +1553,16 @@ function* eachTokenDeclaration(css) {
|
|
|
1451
1553
|
const stack = [];
|
|
1452
1554
|
let buffer = '';
|
|
1453
1555
|
let quote = null;
|
|
1556
|
+
// Parenthesis depth: CSS `if()` separates its branches with `;`, and a
|
|
1557
|
+
// branch may read `style(--bb-x: …)`. Only a top-level `;` ends a
|
|
1558
|
+
// declaration, and only a name at its START is the property it sets
|
|
1559
|
+
// (Q56.48: `--fg-hover: if(style(--bb-primary-fg: …)…)` was served as a
|
|
1560
|
+
// local rebind of --bb-primary-fg).
|
|
1561
|
+
let depth = 0;
|
|
1454
1562
|
const declaration = () => {
|
|
1455
|
-
const m = buffer
|
|
1563
|
+
const m = buffer
|
|
1564
|
+
.replace(/\/\*[\s\S]*?\*\//g, '')
|
|
1565
|
+
.match(/^\s*(--bb-[a-z0-9-]+)\s*:\s*([\s\S]+)/);
|
|
1456
1566
|
buffer = '';
|
|
1457
1567
|
return m ? { name: m[1], value: m[2].trim() } : null;
|
|
1458
1568
|
};
|
|
@@ -1465,6 +1575,11 @@ function* eachTokenDeclaration(css) {
|
|
|
1465
1575
|
if (char === '"' || char === "'") {
|
|
1466
1576
|
quote = char;
|
|
1467
1577
|
buffer += char;
|
|
1578
|
+
} else if (char === '(' || char === ')') {
|
|
1579
|
+
depth = Math.max(0, depth + (char === '(' ? 1 : -1));
|
|
1580
|
+
buffer += char;
|
|
1581
|
+
} else if (depth > 0) {
|
|
1582
|
+
buffer += char;
|
|
1468
1583
|
} else if (char === '{') {
|
|
1469
1584
|
// A comment before a rule would otherwise prefix its selector or
|
|
1470
1585
|
// hide the `@supports` it opens.
|
|
@@ -1576,7 +1691,7 @@ function listTokens({ filter } = {}) {
|
|
|
1576
1691
|
needle && tokens.length === 0
|
|
1577
1692
|
? `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. ${FONT_NOTE}`
|
|
1578
1693
|
: FONT_NOTE +
|
|
1579
|
-
' 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. `conditional` is a value that applies only under an @supports condition (`when`) — e.g. an auto-contrast formula with literal fallbacks for older browsers; pinning a fallback literal defeats the formula. `kind` says what you may set: "knob" is yours; "derived" is a formula recomputed at every theme boundary,
|
|
1694
|
+
' 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. `conditional` is a value that applies only under an @supports condition (`when`) — e.g. an auto-contrast formula with literal fallbacks for older browsers; pinning a fallback literal defeats the formula. `kind` says what you may set: "knob" is yours; "derived" is a formula recomputed at every theme boundary: theme-wide, set the knob it came from (a derived value you set stops tracking it); a scoped override (one `.bb-table`) is fine, but stops at a nested .dark / .bb-theme; "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.',
|
|
1580
1695
|
};
|
|
1581
1696
|
}
|
|
1582
1697
|
|
|
@@ -2543,6 +2658,7 @@ function listChanges({
|
|
|
2543
2658
|
// Resolve the component the way get_component does ('bb-select',
|
|
2544
2659
|
// 'Select'), and say so when it is no component at all — an empty list
|
|
2545
2660
|
// would read as "nothing breaks".
|
|
2661
|
+
let blocks = null;
|
|
2546
2662
|
if (component) {
|
|
2547
2663
|
const resolved = resolveComponent(loadComponentsManifest(), component);
|
|
2548
2664
|
// A retired name (BbTabsPanes) is still a key in the rows it renamed.
|
|
@@ -2554,15 +2670,17 @@ function listChanges({
|
|
|
2554
2670
|
didYouMean: nearestComponents(loadComponentsManifest(), component),
|
|
2555
2671
|
};
|
|
2556
2672
|
}
|
|
2557
|
-
if (resolved?.entry)
|
|
2673
|
+
if (resolved?.entry) {
|
|
2674
|
+
component = resolved.entry.name;
|
|
2675
|
+
// Q57.7: a CSS rename reaches it through the blocks it renders.
|
|
2676
|
+
blocks = renderedBlocks(resolved.entry, loadComponentsManifest());
|
|
2677
|
+
}
|
|
2558
2678
|
}
|
|
2679
|
+
|
|
2559
2680
|
const rows = detail === 'rows';
|
|
2560
2681
|
const filtered = (doc.breaking ?? []).filter(
|
|
2561
2682
|
(row) =>
|
|
2562
|
-
(!component ||
|
|
2563
|
-
(row.components ?? []).some(
|
|
2564
|
-
(c) => c.toLowerCase() === String(component).toLowerCase()
|
|
2565
|
-
)) &&
|
|
2683
|
+
(!component || rowReaches(row, String(component), blocks)) &&
|
|
2566
2684
|
(!surface ||
|
|
2567
2685
|
(row.surface ?? (row.kind === 'rename' ? 'prop' : null)) === surface) &&
|
|
2568
2686
|
(!kind || row.kind === kind)
|