bitboss-ui 3.0.0-beta.74 → 3.0.0-beta.76
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 +5 -5
- package/bin/cli.mjs +16 -10
- package/dist/ai/BbAlert.md +1 -1
- package/dist/ai/BbAvatar.md +86 -58
- package/dist/ai/BbBadge.md +1 -1
- package/dist/ai/BbBreadcrumbs.md +3 -3
- package/dist/ai/BbButton.md +4 -4
- package/dist/ai/BbCalendar.md +5 -2
- package/dist/ai/BbCheckboxGroup.md +5 -4
- package/dist/ai/BbColorInput.md +13 -1
- package/dist/ai/BbColorPalette.md +12 -7
- package/dist/ai/BbConfirm.md +1 -1
- package/dist/ai/BbDatePicker.md +13 -1
- package/dist/ai/BbDatePickerInput.md +18 -2
- package/dist/ai/BbDialog.md +6 -3
- package/dist/ai/BbDropdown.md +174 -77
- package/dist/ai/BbDropdownButton.md +37 -16
- package/dist/ai/BbGallery.md +3 -2
- package/dist/ai/BbIcon.md +10 -10
- package/dist/ai/BbNumberInput.md +3 -1
- package/dist/ai/BbOffCanvas.md +3 -2
- package/dist/ai/BbPopover.md +1 -1
- package/dist/ai/BbRadioGroup.md +4 -4
- package/dist/ai/BbSelect.md +227 -105
- package/dist/ai/BbSelectPopover.md +139 -14
- package/dist/ai/BbSwitchGroup.md +5 -4
- package/dist/ai/BbTable.md +18 -17
- package/dist/ai/BbTimePicker.md +13 -1
- package/dist/ai/BbTimePickerInput.md +16 -2
- package/dist/ai/BbToast.md +3 -2
- package/dist/ai/BbTree.md +5 -1
- package/dist/ai/CommonPopover.md +1 -0
- package/dist/ai/FlatListBox.md +1 -0
- package/dist/ai/GroupedListBox.md +3 -2
- package/dist/ai/ListBox.md +4 -2
- package/dist/ai/OptionsContainer.md +4 -4
- package/dist/ai/changelog.json +310 -7
- package/dist/ai/components.json +33 -35
- package/dist/ai/composables/useToast.md +2 -2
- package/dist/ai/design-tokens.json +60 -0
- package/dist/ai/guides/agent-contract.md +9 -5
- package/dist/ai/guides/calendars-and-digits.md +1 -1
- package/dist/ai/guides/design-tokens.md +13 -0
- package/dist/ai/guides/eslint-rules.md +1 -1
- package/dist/ai/guides/fetch-items-playbook.md +7 -11
- package/dist/ai/guides/icons-policy.md +32 -11
- package/dist/ai/guides/installation-and-plugin-setup.md +24 -23
- package/dist/ai/guides/migration/adoption-checklist.md +1 -1
- package/dist/ai/guides/migration/components/bb-color-palette.md +11 -11
- package/dist/ai/guides/migration/components/bb-dropdown-button.md +1 -0
- package/dist/ai/guides/migration/components/bb-dropdown.md +1 -0
- package/dist/ai/guides/migration/components/bb-icon.md +4 -4
- package/dist/ai/guides/migration/components/bb-table.md +2 -1
- package/dist/ai/guides/migration/components/bb-toast.md +2 -2
- package/dist/ai/guides/migration/v2-to-v3.md +70 -24
- package/dist/ai/guides/migration/v3-beta-css-classes.md +18 -3
- package/dist/ai/guides/migration/v3-beta-tooling.md +1 -0
- package/dist/ai/guides/passthrough.md +58 -58
- package/dist/ai/helpers/inertia/manifest.json +1 -1
- package/dist/ai/index.md +1 -1
- package/dist/ai/manifest/common.json +1 -0
- package/dist/ai/manifest/components/BbAvatar.json +5 -2
- package/dist/ai/manifest/components/BbAvatar.tree.json +32 -2
- package/dist/ai/manifest/components/BbCarousel.json +0 -3
- package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbColorInput.json +5 -2
- package/dist/ai/manifest/components/BbColorPalette.json +5 -2
- package/dist/ai/manifest/components/BbColorPalette.removed.json +1 -2
- package/dist/ai/manifest/components/BbDatePicker.json +3 -0
- package/dist/ai/manifest/components/BbDatePickerInput.json +3 -0
- package/dist/ai/manifest/components/BbDialog.tree.json +3 -1
- package/dist/ai/manifest/components/BbDropdown.json +36 -28
- package/dist/ai/manifest/components/BbDropdown.removed.json +2 -1
- package/dist/ai/manifest/components/BbDropdown.tree.json +21 -11
- package/dist/ai/manifest/components/BbDropdownButton.json +24 -16
- package/dist/ai/manifest/components/BbDropdownButton.removed.json +2 -1
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +4 -0
- package/dist/ai/manifest/components/BbGallery.tree.json +1 -1
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +3 -1
- package/dist/ai/manifest/components/BbRadioGroup.json +2 -2
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbSelect.json +47 -40
- package/dist/ai/manifest/components/BbSelect.tree.json +2 -1
- package/dist/ai/manifest/components/BbSelectPopover.json +14 -7
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +9 -2
- package/dist/ai/manifest/components/BbSwitchGroup.json +2 -2
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +2 -0
- package/dist/ai/manifest/components/BbTable.json +6 -6
- package/dist/ai/manifest/components/BbTable.tree.json +9 -1
- package/dist/ai/manifest/components/BbTimePicker.json +5 -2
- package/dist/ai/manifest/components/BbTimePickerInput.json +5 -2
- package/dist/ai/manifest/components/BbTree.json +1 -1
- package/dist/ai/manifest/components/CommonPopover.json +1 -0
- package/dist/ai/manifest/components/FlatListBox.json +2 -1
- package/dist/ai/manifest/components/GroupedListBox.json +3 -2
- package/dist/ai/manifest/components/GroupedListBox.tree.json +1 -0
- package/dist/ai/manifest/components/ListBox.json +3 -2
- package/dist/ai/manifest/components/ListBox.tree.json +1 -1
- package/dist/ai/manifest/components/OptionsContainer.json +6 -4
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/manifest/meta.json +0 -3
- package/dist/ai/manifest/types.advanced.json +6 -6
- package/dist/ai/manifest/types.api.json +1 -3
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/inertia/onboarding.md +1 -1
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/nuxt/onboarding.md +1 -1
- package/dist/ai/recipes/vue/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/vue/onboarding.md +2 -2
- package/dist/ai/source/BbAccordion.md +4 -5
- package/dist/ai/source/BbAvatar.md +128 -11
- package/dist/ai/source/BbBadge.md +18 -7
- package/dist/ai/source/BbBreadcrumbs.md +57 -56
- package/dist/ai/source/BbButton.md +41 -25
- package/dist/ai/source/BbCalendar.md +8 -6
- package/dist/ai/source/BbCarousel.md +41 -34
- package/dist/ai/source/BbCheckboxGroup.md +15 -9
- package/dist/ai/source/BbColorInput.md +19 -0
- package/dist/ai/source/BbColorPalette.md +23 -2
- package/dist/ai/source/BbDatePicker.md +18 -0
- package/dist/ai/source/BbDatePickerInput.md +47 -3
- package/dist/ai/source/BbDialog.md +14 -1
- package/dist/ai/source/BbDropdown.md +296 -99
- package/dist/ai/source/BbDropdownButton.md +61 -19
- package/dist/ai/source/BbDropdownGroup.md +189 -98
- package/dist/ai/source/BbGallery.md +82 -60
- package/dist/ai/source/BbHost.md +12 -0
- package/dist/ai/source/BbNumberInput.md +17 -10
- package/dist/ai/source/BbOffCanvas.md +14 -1
- package/dist/ai/source/BbPagination.md +12 -28
- package/dist/ai/source/BbRadioGroup.md +12 -5
- package/dist/ai/source/BbRating.md +4 -4
- package/dist/ai/source/BbSelect.md +151 -112
- package/dist/ai/source/BbSelectPopover.md +244 -29
- package/dist/ai/source/BbSwitchGroup.md +11 -4
- package/dist/ai/source/BbTable.md +114 -35
- package/dist/ai/source/BbTimePicker.md +19 -0
- package/dist/ai/source/BbTimePickerInput.md +21 -2
- package/dist/ai/source/BbToast.md +2 -2
- package/dist/ai/source/BbToastPortal.md +2 -2
- package/dist/ai/source/BbTree.md +1 -1
- package/dist/ai/source/ClearableButton.md +4 -2
- package/dist/ai/source/CommonPopover.md +24 -1
- package/dist/ai/source/ErrorIcon.md +4 -3
- package/dist/ai/source/FlatListBox.md +33 -7
- package/dist/ai/source/GroupedListBox.md +85 -14
- package/dist/ai/source/ListBox.md +11 -1
- package/dist/ai/source/OptionsContainer.md +29 -11
- package/dist/ai/source/WarningIcon.md +4 -3
- package/dist/assets/svgs/close.svg_raw.js +1 -1
- package/dist/components/BbAccordion/BbAccordion.vue.d.ts +1 -1
- package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +35 -34
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -0
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +62 -43
- package/dist/components/BbAvatar/avatarIdentity.js +25 -0
- package/dist/components/BbAvatar/ptKeys.generated.d.ts +5 -1
- package/dist/components/BbAvatar/types.d.ts +24 -5
- package/dist/components/BbAvatar/types.js +5 -1
- package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +24 -23
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +66 -64
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +141 -146
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +100 -85
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +1 -1
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +240 -239
- package/dist/components/BbCalendar/useDayGrid.js +120 -123
- package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +503 -502
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +4 -4
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +126 -122
- package/dist/components/BbCheckboxGroup/types.d.ts +7 -11
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +2 -0
- package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +148 -141
- package/dist/components/BbColorInput/types.d.ts +7 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +2 -0
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +208 -196
- package/dist/components/BbColorPalette/types.d.ts +7 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +3 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +84 -73
- package/dist/components/BbDatePicker/types.d.ts +7 -0
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +4 -2
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +496 -510
- package/dist/components/BbDatePickerInput/types.d.ts +7 -0
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +219 -211
- package/dist/components/BbDialog/leaveGhost.js +22 -17
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +106 -100
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +3 -0
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +416 -369
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +404 -354
- package/dist/components/BbDropdown/DropdownFailures.vue.js +4 -0
- package/dist/components/BbDropdown/DropdownFailures.vue_vue_type_script_setup_true_lang.js +24 -0
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +117 -102
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +67 -38
- package/dist/components/BbDropdown/normalizeGroups.js +6 -2
- package/dist/components/BbDropdown/ptKeys.generated.d.ts +44 -20
- package/dist/components/BbDropdown/types.d.ts +109 -87
- package/dist/components/BbDropdown/types.js +3 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +3 -1
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +101 -65
- package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +153 -57
- package/dist/components/BbDropdownButton/types.d.ts +23 -10
- package/dist/components/BbDropdownButton/types.js +4 -0
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +1 -1
- package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +335 -312
- package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/BbIcon/iconCache.js +1 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +1 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +9 -5
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +152 -144
- package/dist/components/BbPagination/BbPagination.vue.d.ts +2 -2
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +138 -136
- package/dist/components/BbProgress/BbProgress.vue.d.ts +1 -1
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +4 -4
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +108 -104
- package/dist/components/BbRadioGroup/types.d.ts +4 -7
- package/dist/components/BbRating/BbRating.vue.d.ts +1 -1
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +100 -99
- package/dist/components/BbSelect/BbSelect.vue.d.ts +32 -20
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +217 -196
- package/dist/components/BbSelect/ptKeys.generated.d.ts +128 -96
- package/dist/components/BbSelect/types.d.ts +110 -111
- package/dist/components/BbSelect/types.js +1 -27
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +8 -3
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +728 -653
- package/dist/components/BbSelectPopover/ptKeys.generated.d.ts +22 -10
- package/dist/components/BbSelectPopover/types.d.ts +32 -17
- package/dist/components/BbSelectPopover/types.js +3 -1
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +1 -1
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +159 -155
- package/dist/components/BbSwitchGroup/types.d.ts +3 -6
- package/dist/components/BbTable/BbTable.vue.d.ts +2 -4
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1171 -1152
- package/dist/components/BbTable/BbTableDataRow.js +97 -90
- package/dist/components/BbTable/types.d.ts +11 -10
- package/dist/components/BbTabs/BbTabs.vue.d.ts +3 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +4 -2
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +145 -134
- package/dist/components/BbTimePicker/types.d.ts +7 -0
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +4 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +290 -280
- package/dist/components/BbTimePickerInput/types.d.ts +7 -0
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +79 -78
- package/dist/components/BbToast/types.d.ts +2 -2
- package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +56 -46
- package/dist/components/BbTree/types.d.ts +1 -1
- package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +9 -8
- package/dist/components/CloseIcon/CloseButton.vue.js +1 -1
- package/dist/components/CloseIcon/CloseButton.vue_vue_type_script_setup_true_lang.js +9 -7
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +13 -1
- package/dist/components/ErrorIcon/ErrorIcon.vue_vue_type_script_setup_true_lang.js +8 -6
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +122 -102
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +182 -153
- package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +7 -4
- package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +86 -77
- package/dist/components/WarningIcon/WarningIcon.vue_vue_type_script_setup_true_lang.js +8 -6
- package/dist/composables/useInternalIcon.js +25 -0
- package/dist/composables/useItemsGetter.js +34 -32
- package/dist/composables/useOpenModel.js +20 -0
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/i18n/locales/ar.json +2 -0
- package/dist/i18n/locales/cs.json +2 -0
- package/dist/i18n/locales/da.json +2 -0
- package/dist/i18n/locales/de-CH.json +2 -0
- package/dist/i18n/locales/de.json +2 -0
- package/dist/i18n/locales/el.json +2 -0
- package/dist/i18n/locales/en-GB.json +2 -0
- package/dist/i18n/locales/en.json +2 -0
- package/dist/i18n/locales/es-MX.json +2 -0
- package/dist/i18n/locales/es.json +2 -0
- package/dist/i18n/locales/fa.json +2 -0
- package/dist/i18n/locales/fi.json +2 -0
- package/dist/i18n/locales/fr.json +2 -0
- package/dist/i18n/locales/he.json +2 -0
- package/dist/i18n/locales/hu.json +2 -0
- package/dist/i18n/locales/it.json +2 -0
- package/dist/i18n/locales/ja.json +2 -0
- package/dist/i18n/locales/ko.json +2 -0
- package/dist/i18n/locales/nb.json +2 -0
- package/dist/i18n/locales/nl.json +2 -0
- package/dist/i18n/locales/pl.json +2 -0
- package/dist/i18n/locales/pt-BR.json +2 -0
- package/dist/i18n/locales/pt-PT.json +2 -0
- package/dist/i18n/locales/ro.json +2 -0
- package/dist/i18n/locales/ru.json +2 -0
- package/dist/i18n/locales/sv.json +2 -0
- package/dist/i18n/locales/tr.json +2 -0
- package/dist/i18n/locales/uk.json +2 -0
- package/dist/i18n/locales/zh-CN.json +2 -0
- package/dist/i18n/locales/zh-HK.json +2 -0
- package/dist/i18n/locales/zh-TW.json +2 -0
- package/dist/icon-scan.d.ts +1 -1
- package/dist/icon-scan.js +68 -61
- package/dist/index.d.ts +2 -2
- package/dist/llms-full.txt +1038 -451
- package/dist/llms-medium.txt +33 -28
- package/dist/llms.txt +2 -2
- package/dist/locale-blueprint.json +2 -0
- package/dist/nuxt.js +1 -1
- package/dist/styles.css +2 -2
- package/dist/types/ActionButton.d.ts +2 -3
- package/dist/types/Config.d.ts +8 -1
- package/dist/types/ConfigDefaults.d.ts +10 -2
- package/dist/types/Option.d.ts +10 -0
- package/dist/types/internalIcons.d.ts +89 -0
- package/dist/types/internalIcons.js +158 -0
- package/dist/types/ptComponentMap.d.ts +5 -5
- package/dist/utilities/functions/slotContent.js +19 -0
- package/dist/utils/configDefaults.js +75 -64
- package/dist/utils/iconsOption.js +48 -0
- package/dist/utils/loadRetry.js +8 -0
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +10 -16
- package/dist/vite.js +323 -307
- package/llms.txt +2 -2
- package/package.json +3 -1
- package/scripts/README.md +2 -0
- package/scripts/lib/adoption-checklist.json +1 -1
- package/scripts/lib/agent-setup.mjs +44 -26
- package/scripts/lib/update-install.mjs +48 -0
- package/scripts/lib/validate-bb-markup.mjs +93 -12
- package/dist/ai/manifest/components/BbAvatar.removed.json +0 -6
- package/dist/assets/svgs/caret_down.svg_raw.js +0 -3
package/llms.txt
CHANGED
|
@@ -7,7 +7,7 @@ Note: the `dist/` paths below resolve inside the installed `bitboss-ui` package
|
|
|
7
7
|
## AI Knowledge Base
|
|
8
8
|
|
|
9
9
|
- [Core knowledge base](https://llms-bitboss-ui.bitboss.it/dist/llms-medium.txt): **Fetch this if you can only fetch one file** — hard rules, setup, component picker, design language, and the full component catalogue in ~240 KB.
|
|
10
|
-
- [Complete knowledge base](https://llms-bitboss-ui.bitboss.it/dist/llms-full.txt): Everything concatenated (~6.
|
|
10
|
+
- [Complete knowledge base](https://llms-bitboss-ui.bitboss.it/dist/llms-full.txt): Everything concatenated (~6.3 MB). Bulk ingestion only — too large to prompt with.
|
|
11
11
|
- [AI Router](dist/ai/guides/ai-router.md): **Start here** — tiny hop map for any coding agent (which file to open next).
|
|
12
12
|
- [Component index](dist/ai/index.md): Full component catalogue with agent rules, grouped by category. Each entry links a typed contract (props/events/slots/v-model).
|
|
13
13
|
- [Component API files](dist/ai/manifest/index.json): Machine-readable API, one JSON file per component (`manifest/components/<Name>.json`: every prop, event, slot, v-model and pt part, one per line, plus the public types it uses; a row marked `common: true` is whole in `manifest/common.json`) — open the index, then the one component. The same data in one ~1.2 MB file for tools is [components.json](dist/ai/components.json); its `types` array lists the public TYPE exports with a `usage` tier (`api` = the ones you reach for) and, on the `api` ones, a `usedBy` array naming the component and prop or event each is the type OF — `BbTableColumn` is `usedBy` `BbTable.columns`, a value you pass, not a tag you write. This file is props and events, not paint.
|
|
@@ -46,7 +46,7 @@ Note: the `dist/` paths below resolve inside the installed `bitboss-ui` package
|
|
|
46
46
|
- [Migration v2→v3: BbChip (removed)](dist/ai/guides/migration/components/bb-chip.md): BbChip is gone — BbBadge with clearable is the replacement; non-clearable chips were badges all along.
|
|
47
47
|
- [Migration v2→v3: BbCollapsible](dist/ai/guides/migration/components/bb-collapsible.md): `tag` narrows to `'span' | 'div'` and still defaults to `div`; the inner element mirrors it.
|
|
48
48
|
- [Migration v2→v3: BbColorInput](dist/ai/guides/migration/components/bb-color-input.md): picker renamed to eyeDropper.
|
|
49
|
-
- [Migration v2→v3: BbColorPalette](dist/ai/guides/migration/components/bb-color-palette.md): flip inverted to disableFlip, showArrow removed, picker renamed eyeDropper, update:open
|
|
49
|
+
- [Migration v2→v3: BbColorPalette](dist/ai/guides/migration/components/bb-color-palette.md): flip inverted to disableFlip, showArrow removed, picker renamed eyeDropper, update:open is v-model:open, model updates never emit null.
|
|
50
50
|
- [Migration v2→v3: BbConfirm + BbToast → BbHost](dist/ai/guides/migration/components/bb-host.md): Delete the <BbConfirm /> and <BbToast /> tags — the plugin renders the <BbHost /> that replaces them; their size, position and pt props move to the plugin config; a second host renders nothing; confirm() with no host resolves false after 1s.
|
|
51
51
|
- [Migration v2→v3: BbDatePickerInput](dist/ai/guides/migration/components/bb-date-picker-input.md): allowWriting inverted to disableWriting and hidePopover renamed to disableCalendar, both with a changed token set; the width prop is removed; adaptive mobile sheet by default; non-floating output carries the local offset instead of UTC `Z` (new `utc` prop restores v2 output).
|
|
52
52
|
- [Migration v2→v3: BbDialog](dist/ai/guides/migration/components/bb-dialog.md): showClose inverted to hideClose, #close removed (description restored in beta.19), default widths changed, adaptive bottom sheet on mobile by default, --bb-dialog-* tokens replaced by --bb-panel-p plus locals.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bitboss-ui",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.76",
|
|
4
4
|
"description": "Vue 3 component library by BitBoss: forms, selects, layout, overlays, and more.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
"release:local": "node scripts/release-local.mjs",
|
|
62
62
|
"gate": "node scripts/gate.mjs",
|
|
63
63
|
"land": "node scripts/land.mjs",
|
|
64
|
+
"train": "node scripts/train.mjs",
|
|
64
65
|
"push:check": "node scripts/hooks-install.mjs --repair && node scripts/pre-push-gate.mjs --sha HEAD",
|
|
65
66
|
"hooks:install": "node scripts/hooks-install.mjs",
|
|
66
67
|
"hooks:check": "node scripts/hooks-install.mjs --check",
|
|
@@ -253,6 +254,7 @@
|
|
|
253
254
|
"!scripts/lib/boilerplate-census.mjs",
|
|
254
255
|
"!scripts/lib/fixture-library.mjs",
|
|
255
256
|
"!scripts/lib/gate.mjs",
|
|
257
|
+
"!scripts/lib/train.mjs",
|
|
256
258
|
"!scripts/lib/wall-steps.mjs",
|
|
257
259
|
"!scripts/lib/wall-stats.mjs",
|
|
258
260
|
"!scripts/lib/step-pool.mjs",
|
package/scripts/README.md
CHANGED
|
@@ -34,7 +34,9 @@ several of them exist because the thing they now catch already shipped once.
|
|
|
34
34
|
| `gate` | `gate.mjs` | The lane gate (Q96.3): build + every static check of the wall (one list, `lib/wall-steps.mjs`) and the node/types/ssr projects, then the browser tiers SCOPED to the change since the last full pass (Q96.1, `scope.mjs`; anything the module graph cannot see runs them in full). `-- --all` for the full suite as the wall runs it, `-- --tests=none` for static only, `-- --shadow` to also run the full tiers and log the comparison, `-- --shadow-report` to sum the log up, `-- --stats [--days N]` for what the walls spend their time on (Q96.6, `lib/wall-stats.mjs`). Every step runs; one table of exit codes + durations. Every run also logs the selector (Q96.17, `lib/selector-log.mjs`): the HEAD module graph's pick from the fork point with v3 and the rules that would widen it, as `selector` on the gate record; log only, no verdict reads it. Runs in your checkout before reporting; `push:check` stays the commit-exact gate. |
|
|
35
35
|
| — | `spotlight.mjs` | The wall step before the browser chunks (Q96.2): a component or directive this change publishes (new runtime exports in `src/index.ts` since the last full pass) runs its own tests on Chromium, Firefox and WebKit first; red stops the queue. `--list` prints what it would run. |
|
|
36
36
|
| — | `self-tests.mjs` | The wall step `gate self-tests`: runs `test:land`, `test:pre-push-gate` and `test:release-yml` when the change since the last full pass touches the gate code they cover (map: `lib/self-tests.mjs`; an unmapped gate path runs all three). `--list` prints the plan. |
|
|
37
|
+
| — | `helpers-strict.mjs` | The wall step `helpers in a strict app (test-add, npm)`: runs `test-add.mjs --only npm` (install the Inertia helpers into a strict TypeScript app, vue-tsc, build) when the change since the last full pass touches the helper sources, `ai/helpers/`, the add/record tooling or `fixtures/add-app` (`helpersStrictHits` in `lib/scope-plan.mjs`). Never widens the browser tiers. `--list` prints the decision. |
|
|
37
38
|
| `land` | `land.mjs` | Lands a lane branch on local `v3` (Q96.4): merge in a clean worktree of `v3` (reinstalling deps there when the merge changes `package.json`/the lockfile), `npm run gate` there (scoped from the last full pass below the merge, so it covers what either side changed), verify the gated tree is still exactly the merge commit, then fast-forward the main checkout only on green. Prints the browser files the scoped gate selected. Uncommitted work in main never blocks unless it overlaps the merge. Every refusal (wrong branch in main, an edit to a path the merge changes or an untracked file at a path it adds, missing or landed branch, conflict, red or tree-dirtying gate) says why and leaves `v3` untouched. Never pushes. Tested end-to-end by `test-land.sh` (`npm run test:land`). |
|
|
39
|
+
| `train` | `train.mjs` | The landing train (Q96.17 S2; rules in `lib/train.mjs`): a lane enqueues its branch at its FINAL sha (`npm run train -- <branch> <sha>`); the conductor merges every queued lane onto `v3` in a clean worktree, runs ONE `gate --all`, re-pins only a calendar budget that two green lanes overflow together, ejects a red's culprit by touched files (an unexplained red: the newest half back, then singles), fast-forwards `v3` on green, and writes a ledger proving each lane on `v3` (ancestor + `git cherry`) with every resolution diff. `land` stays the single-branch path. |
|
|
38
40
|
| `push:check` | `pre-push-gate.mjs --sha HEAD` | Runs the pre-push gate for HEAD without pushing, in a clean worktree, and records the pass, so the push that follows is instant. |
|
|
39
41
|
| `release:local` | `release-local.mjs` | Everything owed before a tag, in a clean short-path worktree of HEAD: the static half of release:check, fixtures:install, eval:prepare and the consumer checks, then the browser tiers, test:fixtures and test:engines. Writes a results record too and prints the tag commands on green. Red? Fix, commit, `-- --rerun-failed`: measured from the last full run, it reruns the static phase whole, the browser scope plus the run's failed files, carries only what passed there (dist consumers on an identical `dist/`), and green writes a `scoped` pass on a `release-run` base and a `rerun+…` tag line; when it cannot (first line says why) it reruns only what is owed, no pass — or `-- --scoped` (Q96.1): a fix on top of a full release pass reruns the static phase whole, the browser tiers on the scope, and carries the fixture/consumer/eval results when the rebuilt `dist/` is byte-identical; it writes a `scoped` pass and a `scoped+…` tag line. |
|
|
40
42
|
| `scope` | `scope.mjs` | The scoped rule (Q96.1, `lib/scope-plan.mjs`): what the browser tiers must rerun since the last full pass — the Vitest module graph at the base (a throwaway snapshot) and at HEAD (`lib/scope-graph.mjs`), the code the build plugin generates for its virtual modules, guide tests naming a changed component or one whose graph reaches the change (the guide machinery's string-resolution edges dropped), widened to whole chunks (`lib/browser-chunks.mjs`, packed by component folder). Fails closed to the full tiers on CSS, global files, virtual-module reach, unclassifiable files, mocking tests, an empty scope with `src/` changed, too many files, an old base. `--verify <rev>` recomputes a `scoped` pass record's scope. |
|
|
@@ -307,7 +307,7 @@
|
|
|
307
307
|
}
|
|
308
308
|
],
|
|
309
309
|
"use": "Remove it in the adaptive phase (below)",
|
|
310
|
-
"example": "bitbossUi({
|
|
310
|
+
"example": "bitbossUi({ icons: { dir: 'resources/icons' } })",
|
|
311
311
|
"note": "Keep it only on a surface that must never become a sheet, and say why in a comment."
|
|
312
312
|
}
|
|
313
313
|
]
|
|
@@ -572,9 +572,18 @@ export function skipReason(root, { env = process.env, automatic = true } = {}) {
|
|
|
572
572
|
|
|
573
573
|
/**
|
|
574
574
|
* Bring the project's agent setup in line with `ai`.
|
|
575
|
+
*
|
|
576
|
+
* `cleanup: false` is the dev server's run (the Vite plugin, on dev, build and
|
|
577
|
+
* test starts): it only creates or updates our own marked blocks and files.
|
|
578
|
+
* Everything that deletes or edits a file the team owns — the legacy
|
|
579
|
+
* `ai-init` files, the Copilot block, CLAUDE.md (its `@AGENTS.md` import, or
|
|
580
|
+
* our block when AGENTS.md links to it), and the `ai: false` teardown — runs
|
|
581
|
+
* only on install (the app's postinstall) and `bitboss-ui update` / `setup`.
|
|
582
|
+
*
|
|
575
583
|
* @param {string} root project root
|
|
576
|
-
* @param {{ ai?: boolean, env?: NodeJS.ProcessEnv, home?: string, automatic?: boolean, all?: boolean }} [options]
|
|
577
|
-
* `ai: false` removes what we own; `all` sets up every harness, detected or
|
|
584
|
+
* @param {{ ai?: boolean, env?: NodeJS.ProcessEnv, home?: string, automatic?: boolean, all?: boolean, cleanup?: boolean }} [options]
|
|
585
|
+
* `ai: false` removes what we own; `all` sets up every harness, detected or
|
|
586
|
+
* not; `cleanup: false` skips every destructive step (default `true`).
|
|
578
587
|
* @returns {{ skipped?: string, results: { path: string, action: string, reason?: string }[], notes: string[], harnesses: string[] }}
|
|
579
588
|
*/
|
|
580
589
|
export function syncAgentSetup(root, options = {}) {
|
|
@@ -584,6 +593,7 @@ export function syncAgentSetup(root, options = {}) {
|
|
|
584
593
|
home = homedir(),
|
|
585
594
|
automatic = true,
|
|
586
595
|
all = false,
|
|
596
|
+
cleanup = true,
|
|
587
597
|
} = options;
|
|
588
598
|
const skipped = skipReason(root, { env, automatic });
|
|
589
599
|
if (skipped) return { skipped, results: [], notes: [], harnesses: [] };
|
|
@@ -606,28 +616,34 @@ export function syncAgentSetup(root, options = {}) {
|
|
|
606
616
|
};
|
|
607
617
|
const at = (p) => join(root, p);
|
|
608
618
|
|
|
609
|
-
// Legacy files are dropped either way
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
return
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
619
|
+
// Legacy files are dropped either way (AGENTS.md covers them), but only by
|
|
620
|
+
// an install or an explicit command, never by a dev server start.
|
|
621
|
+
if (cleanup)
|
|
622
|
+
for (const { path, ours } of LEGACY_FILES)
|
|
623
|
+
if (existsSync(at(path)))
|
|
624
|
+
record(path, () => {
|
|
625
|
+
refuseLinkedTarget(at(path), root);
|
|
626
|
+
const text = readFileSync(at(path), 'utf-8');
|
|
627
|
+
if (!ours.test(text)) return 'unchanged';
|
|
628
|
+
if (!isUneditedLegacy(path, text))
|
|
629
|
+
return {
|
|
630
|
+
action: 'kept',
|
|
631
|
+
reason:
|
|
632
|
+
'edited since bitboss-ui wrote it; AGENTS.md now carries these rules, so delete the bitboss-ui part yourself',
|
|
633
|
+
};
|
|
634
|
+
rmSync(at(path));
|
|
635
|
+
return 'deleted';
|
|
636
|
+
});
|
|
637
|
+
if (cleanup)
|
|
638
|
+
for (const { path, header } of LEGACY_BLOCKS)
|
|
639
|
+
if (existsSync(at(path)))
|
|
640
|
+
record(path, () => removeBlock(at(path), header));
|
|
627
641
|
|
|
628
642
|
// AGENTS.md is a link to CLAUDE.md: the rules live in CLAUDE.md itself.
|
|
629
643
|
const agentsInClaude = linksTo(root, 'AGENTS.md', 'CLAUDE.md');
|
|
630
644
|
|
|
645
|
+
// The `ai: false` teardown deletes and edits files: install and `update` only.
|
|
646
|
+
if (!ai && !cleanup) return { results, notes: [], harnesses: [] };
|
|
631
647
|
if (!ai) {
|
|
632
648
|
if (agentsInClaude)
|
|
633
649
|
record('AGENTS.md', () => ({
|
|
@@ -682,14 +698,15 @@ export function syncAgentSetup(root, options = {}) {
|
|
|
682
698
|
};
|
|
683
699
|
if (agentsInClaude) {
|
|
684
700
|
// One file, two names: the whole block goes in it, never an import of
|
|
685
|
-
// itself.
|
|
701
|
+
// itself. It is CLAUDE.md, so a dev server start leaves it alone.
|
|
686
702
|
record('AGENTS.md', () => ({
|
|
687
703
|
action: 'unchanged',
|
|
688
704
|
reason: 'links to CLAUDE.md',
|
|
689
705
|
}));
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
706
|
+
if (cleanup)
|
|
707
|
+
record('CLAUDE.md', () =>
|
|
708
|
+
upsertBlock(at('CLAUDE.md'), agentsFragment(paths))
|
|
709
|
+
);
|
|
693
710
|
} else
|
|
694
711
|
record('AGENTS.md', () =>
|
|
695
712
|
upsertBlock(
|
|
@@ -698,8 +715,9 @@ export function syncAgentSetup(root, options = {}) {
|
|
|
698
715
|
'# Agent Instructions'
|
|
699
716
|
)
|
|
700
717
|
);
|
|
701
|
-
// CLAUDE.md that imports AGENTS.md itself keeps its own import.
|
|
702
|
-
|
|
718
|
+
// CLAUDE.md that imports AGENTS.md itself keeps its own import. Adding the
|
|
719
|
+
// import edits the team's CLAUDE.md: install and `update` only.
|
|
720
|
+
if (!agentsInClaude && cleanup)
|
|
703
721
|
record('CLAUDE.md', () => {
|
|
704
722
|
const path = at('CLAUDE.md');
|
|
705
723
|
// `CLAUDE.md -> AGENTS.md`: Claude Code already reads our block.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How `bitboss-ui update` installs the newest release: in the app's own pin
|
|
3
|
+
* style. The package manager writes its default range (`^`) on a plain
|
|
4
|
+
* install, so an exact pin (`"3.0.0-beta.75"`, installed with `npm i -E`)
|
|
5
|
+
* would turn into a caret, and a local tarball or a link (`file:`, `link:`,
|
|
6
|
+
* a path) into a registry version, an older one than the tarball when a
|
|
7
|
+
* release candidate is being tried. Exact stays exact; a range is the
|
|
8
|
+
* manager's default; a local spec is not reinstalled at all.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/** The style of the app's declared `bitboss-ui` spec. */
|
|
12
|
+
export function pinStyle(declared) {
|
|
13
|
+
const spec = String(declared ?? '').trim();
|
|
14
|
+
if (!spec) return 'range';
|
|
15
|
+
if (
|
|
16
|
+
/^(file:|link:|portal:|workspace:|git\+|git:|github:|https?:|\.{0,2}\/|~\/)/.test(
|
|
17
|
+
spec
|
|
18
|
+
) ||
|
|
19
|
+
/\.(tgz|tar\.gz)$/.test(spec)
|
|
20
|
+
)
|
|
21
|
+
return 'local';
|
|
22
|
+
// A bare version, `=` allowed: what `npm i -E` and `--save-exact` write.
|
|
23
|
+
if (/^=?\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/.test(spec))
|
|
24
|
+
return 'exact';
|
|
25
|
+
return 'range';
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** Each manager's save-exact flag. */
|
|
29
|
+
const EXACT_FLAG = {
|
|
30
|
+
npm: '--save-exact',
|
|
31
|
+
pnpm: '--save-exact',
|
|
32
|
+
yarn: '--exact',
|
|
33
|
+
bun: '--exact',
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The install argv for `update`, or `null` when the app's spec is local and
|
|
38
|
+
* must not be replaced (the caller then only refreshes the agent setup).
|
|
39
|
+
*/
|
|
40
|
+
export function updateInstallCommand(pm, { declared, dev, channel }) {
|
|
41
|
+
const style = pinStyle(declared);
|
|
42
|
+
if (style === 'local') return null;
|
|
43
|
+
const verb = pm === 'npm' ? 'install' : 'add';
|
|
44
|
+
const flags = [];
|
|
45
|
+
if (dev) flags.push(pm === 'npm' ? '--save-dev' : '-D');
|
|
46
|
+
if (style === 'exact') flags.push(EXACT_FLAG[pm] ?? '--save-exact');
|
|
47
|
+
return [pm, verb, ...flags, `bitboss-ui@${channel}`];
|
|
48
|
+
}
|
|
@@ -2597,6 +2597,9 @@ export function scriptSetupArrayConsts(code) {
|
|
|
2597
2597
|
map.mutated = new Set();
|
|
2598
2598
|
map.sealed = new Set();
|
|
2599
2599
|
map.slotKeyed = new Set();
|
|
2600
|
+
// Top-level `const id = 'x'` strings: what a computed slot name like
|
|
2601
|
+
// `#[slotKey(id)]` resolves to (`staticSlotNameOf`).
|
|
2602
|
+
map.strings = new Map();
|
|
2600
2603
|
const match = /<script\b[^>]*\bsetup\b[^>]*>([\s\S]*?)<\/script>/i.exec(code);
|
|
2601
2604
|
if (!match) return map;
|
|
2602
2605
|
let program;
|
|
@@ -2639,6 +2642,10 @@ export function scriptSetupArrayConsts(code) {
|
|
|
2639
2642
|
init: declarator.init,
|
|
2640
2643
|
});
|
|
2641
2644
|
let init = unwrapTsExpression(declarator.init);
|
|
2645
|
+
if (init?.type === 'StringLiteral')
|
|
2646
|
+
map.strings.set(declarator.id.name, init.value);
|
|
2647
|
+
else if (init?.type === 'TemplateLiteral' && !init.expressions.length)
|
|
2648
|
+
map.strings.set(declarator.id.name, init.quasis[0].value.cooked);
|
|
2642
2649
|
if (
|
|
2643
2650
|
init?.type === 'CallExpression' &&
|
|
2644
2651
|
init.callee.type === 'Identifier' &&
|
|
@@ -3337,6 +3344,47 @@ const parseTemplateExpression = (source) => {
|
|
|
3337
3344
|
}
|
|
3338
3345
|
};
|
|
3339
3346
|
|
|
3347
|
+
/**
|
|
3348
|
+
* The one name a computed slot `#[…]` always produces, when every part of it
|
|
3349
|
+
* is in sight: a top-level `const` string, `slotKey(…)` of one (or of a
|
|
3350
|
+
* literal), and a template literal joining them (`` `${slotKey(id)}:label` ``).
|
|
3351
|
+
* Null for anything that varies (a prop, a loop alias, a call).
|
|
3352
|
+
*
|
|
3353
|
+
* @param {string} slotText the `#[…]` expression
|
|
3354
|
+
* @param {Map<string, string> | undefined} strings from `scriptSetupArrayConsts`
|
|
3355
|
+
* @returns {string | null}
|
|
3356
|
+
*/
|
|
3357
|
+
const staticSlotNameOf = (slotText, strings) => {
|
|
3358
|
+
if (!strings?.size && !/['"`]/.test(slotText)) return null;
|
|
3359
|
+
const valueOf = (node) => {
|
|
3360
|
+
const expr = unwrapTsExpression(node);
|
|
3361
|
+
if (!expr) return null;
|
|
3362
|
+
if (expr.type === 'StringLiteral') return expr.value;
|
|
3363
|
+
if (expr.type === 'NumericLiteral') return String(expr.value);
|
|
3364
|
+
if (expr.type === 'Identifier') return strings?.get(expr.name) ?? null;
|
|
3365
|
+
if (
|
|
3366
|
+
expr.type === 'CallExpression' &&
|
|
3367
|
+
expr.callee.type === 'Identifier' &&
|
|
3368
|
+
expr.callee.name === 'slotKey' &&
|
|
3369
|
+
expr.arguments.length === 1
|
|
3370
|
+
) {
|
|
3371
|
+
const inner = valueOf(expr.arguments[0]);
|
|
3372
|
+
return inner === null ? null : runtimeSlotKey(inner);
|
|
3373
|
+
}
|
|
3374
|
+
if (expr.type === 'TemplateLiteral') {
|
|
3375
|
+
let out = expr.quasis[0].value.cooked;
|
|
3376
|
+
for (let i = 0; i < expr.expressions.length; i++) {
|
|
3377
|
+
const part = valueOf(expr.expressions[i]);
|
|
3378
|
+
if (part === null) return null;
|
|
3379
|
+
out += part + expr.quasis[i + 1].value.cooked;
|
|
3380
|
+
}
|
|
3381
|
+
return out;
|
|
3382
|
+
}
|
|
3383
|
+
return null;
|
|
3384
|
+
};
|
|
3385
|
+
return valueOf(parseTemplateExpression(slotText));
|
|
3386
|
+
};
|
|
3387
|
+
|
|
3340
3388
|
/** What `slotKey()` (src/utilities/functions/slotKey.ts) makes of a key. */
|
|
3341
3389
|
/** What `slotKey()` makes of a key: the library's rule, via its JS twin. */
|
|
3342
3390
|
const runtimeSlotKey = slotKey;
|
|
@@ -3345,7 +3393,7 @@ const runtimeSlotKey = slotKey;
|
|
|
3345
3393
|
* The static string a v-for element yields for `alias` / `alias.field`, or
|
|
3346
3394
|
* null when it is not a literal.
|
|
3347
3395
|
*/
|
|
3348
|
-
const literalKeyOf = (element, field) => {
|
|
3396
|
+
const literalKeyOf = (element, field, strings) => {
|
|
3349
3397
|
const node = unwrapTsExpression(element);
|
|
3350
3398
|
const value = field
|
|
3351
3399
|
? node?.type === 'ObjectExpression'
|
|
@@ -3354,6 +3402,9 @@ const literalKeyOf = (element, field) => {
|
|
|
3354
3402
|
: node;
|
|
3355
3403
|
if (value?.type === 'StringLiteral') return value.value;
|
|
3356
3404
|
if (value?.type === 'NumericLiteral') return String(value.value);
|
|
3405
|
+
// A top-level `const id = 'x'` (`{ id }`, `id: groupId`).
|
|
3406
|
+
if (value?.type === 'Identifier' && strings?.has(value.name))
|
|
3407
|
+
return strings.get(value.name);
|
|
3357
3408
|
return null;
|
|
3358
3409
|
};
|
|
3359
3410
|
|
|
@@ -3672,7 +3723,7 @@ const OLD_IDENTITY_FIELD = 'key';
|
|
|
3672
3723
|
* any other entry's `field` (a stale `key` still counts, so a slot check
|
|
3673
3724
|
* agrees with the rename `renamed-item-field` asks for).
|
|
3674
3725
|
*/
|
|
3675
|
-
const identityOf = (source, element) => {
|
|
3726
|
+
const identityOf = (source, element, strings) => {
|
|
3676
3727
|
const entry = unwrapTsExpression(element);
|
|
3677
3728
|
const isGroup =
|
|
3678
3729
|
source.nested &&
|
|
@@ -3681,9 +3732,9 @@ const identityOf = (source, element) => {
|
|
|
3681
3732
|
objectKeyNode(entry, 'selectable') ||
|
|
3682
3733
|
objectKeyNode(entry, 'multiple'));
|
|
3683
3734
|
const field = isGroup ? 'id' : source.field;
|
|
3684
|
-
const now = literalKeyOf(element, field);
|
|
3735
|
+
const now = literalKeyOf(element, field, strings);
|
|
3685
3736
|
if (now !== null || field === OLD_IDENTITY_FIELD) return now;
|
|
3686
|
-
return literalKeyOf(element, OLD_IDENTITY_FIELD);
|
|
3737
|
+
return literalKeyOf(element, OLD_IDENTITY_FIELD, strings);
|
|
3687
3738
|
};
|
|
3688
3739
|
|
|
3689
3740
|
/**
|
|
@@ -3824,6 +3875,11 @@ export function keyedSlotLookup(name, surface, propSource, arrays) {
|
|
|
3824
3875
|
const list = resolveWrittenArray(expression, arrays);
|
|
3825
3876
|
if (!list) return null;
|
|
3826
3877
|
const keys = [];
|
|
3878
|
+
// A dropdown group's id and a row's value, apart: the bare `#<groupId>`
|
|
3879
|
+
// title slot became `#<groupId>:label`, and only a name
|
|
3880
|
+
// that is a group's and no row's can say so.
|
|
3881
|
+
const groupIds = new Set();
|
|
3882
|
+
const rowValues = new Set();
|
|
3827
3883
|
// every key must be in sight: an inline
|
|
3828
3884
|
// literal, or a sealed same-file array — a `ref` seed a fetch replaces, a
|
|
3829
3885
|
// typed array with rows from elsewhere, or one the file changes or hands
|
|
@@ -3832,10 +3888,18 @@ export function keyedSlotLookup(name, surface, propSource, arrays) {
|
|
|
3832
3888
|
let complete = resolveVisibleArray(expression, arrays) !== null;
|
|
3833
3889
|
const walk = (array) => {
|
|
3834
3890
|
for (const element of array.elements) {
|
|
3835
|
-
const key = identityOf(source, element);
|
|
3891
|
+
const key = identityOf(source, element, arrays?.strings);
|
|
3836
3892
|
if (key === null) complete = false;
|
|
3837
3893
|
else keys.push(key);
|
|
3838
3894
|
const entry = unwrapTsExpression(element);
|
|
3895
|
+
if (key !== null && source.nested) {
|
|
3896
|
+
const isGroup =
|
|
3897
|
+
entry?.type === 'ObjectExpression' &&
|
|
3898
|
+
(objectKeyNode(entry, 'group') ||
|
|
3899
|
+
objectKeyNode(entry, 'selectable') ||
|
|
3900
|
+
objectKeyNode(entry, 'multiple'));
|
|
3901
|
+
(isGroup ? groupIds : rowValues).add(slotKey(key));
|
|
3902
|
+
}
|
|
3839
3903
|
const children =
|
|
3840
3904
|
source.nested && entry?.type === 'ObjectExpression'
|
|
3841
3905
|
? objectKeyNode(entry, 'items')
|
|
@@ -3876,6 +3940,13 @@ export function keyedSlotLookup(name, surface, propSource, arrays) {
|
|
|
3876
3940
|
);
|
|
3877
3941
|
const fitsPattern = (slot) => Boolean(patternOf(slot));
|
|
3878
3942
|
const lookup = (slot) => {
|
|
3943
|
+
if (groupIds.has(slot) && !rowValues.has(slot))
|
|
3944
|
+
return {
|
|
3945
|
+
attr: `#${slot}`,
|
|
3946
|
+
kind: 'renamed-slot',
|
|
3947
|
+
message: `slot \`#${slot}\` was the title slot of the group \`${slot}\`, renamed to \`#${slot}:label\` on ${name} (3.0.0-beta.75)`,
|
|
3948
|
+
to: `${slot}:label`,
|
|
3949
|
+
};
|
|
3879
3950
|
if (fixed.has(slot) || expected.has(slot)) return null;
|
|
3880
3951
|
const old = legacy.get(slot);
|
|
3881
3952
|
if (old && !expected.has(slot))
|
|
@@ -4920,24 +4991,34 @@ function validateElement(node, manifest, findings, options = {}) {
|
|
|
4920
4991
|
// start tag (`<BbAlert><template #actions>…</template></BbAlert>`).
|
|
4921
4992
|
for (const child of node.children ?? []) {
|
|
4922
4993
|
if (child.type !== NODE_ELEMENT || child.tag !== 'template') continue;
|
|
4994
|
+
const inLoop = (child.props ?? []).some(
|
|
4995
|
+
(p) => p.type === PROP_DIRECTIVE && p.name === 'for'
|
|
4996
|
+
);
|
|
4923
4997
|
for (const prop of child.props ?? []) {
|
|
4924
4998
|
if (prop.type !== PROP_DIRECTIVE || prop.name !== 'slot') continue;
|
|
4925
4999
|
const arg = prop.arg;
|
|
4926
|
-
// Bare `v-slot="…"` (default slot, no name)
|
|
4927
|
-
//
|
|
4928
|
-
|
|
5000
|
+
// Bare `v-slot="…"` (default slot, no name) can't be checked; a
|
|
5001
|
+
// dynamic `#[expr]` only when it always yields one name in sight
|
|
5002
|
+
// (`#[slotKey(id)]` with `const id = 'x'`); loops are checked below.
|
|
5003
|
+
if (!arg) continue;
|
|
5004
|
+
const slotName = arg.isStatic
|
|
5005
|
+
? arg.content
|
|
5006
|
+
: inLoop
|
|
5007
|
+
? null
|
|
5008
|
+
: staticSlotNameOf(arg.content, options.arrays?.strings);
|
|
5009
|
+
if (slotName === null) continue;
|
|
4929
5010
|
// Keys in sight decide first; without them, the
|
|
4930
5011
|
// manifest rules, then the squashed-spelling warning (C9b).
|
|
4931
|
-
const keyed = keyedLookup ? keyedLookup(
|
|
5012
|
+
const keyed = keyedLookup ? keyedLookup(slotName) : undefined;
|
|
4932
5013
|
const finding =
|
|
4933
5014
|
keyed !== undefined && keyed !== null
|
|
4934
5015
|
? keyed
|
|
4935
|
-
: keyedLookup?.expects(
|
|
5016
|
+
: keyedLookup?.expects(slotName)
|
|
4936
5017
|
? null
|
|
4937
|
-
: (checker.checkSlot(
|
|
5018
|
+
: (checker.checkSlot(slotName) ??
|
|
4938
5019
|
(keyedLookup
|
|
4939
5020
|
? null
|
|
4940
|
-
: squashedSlotWarning(name, surface,
|
|
5021
|
+
: squashedSlotWarning(name, surface, slotName)));
|
|
4941
5022
|
if (finding)
|
|
4942
5023
|
findings.push({ component: name, ...finding, line: propLine(prop) });
|
|
4943
5024
|
}
|