bitboss-ui 3.0.0-beta.73 → 3.0.0-beta.75
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 +4 -2
- package/bin/bitboss-ui-mcp.mjs +101 -3
- package/bin/bitboss-ui.mjs +6 -1
- package/bin/cli.mjs +31 -5
- package/dist/ai/BbAvatar.md +86 -58
- package/dist/ai/BbBadge.md +5 -5
- package/dist/ai/BbBreadcrumbs.md +2 -2
- package/dist/ai/BbButton.md +2 -2
- package/dist/ai/BbCalendar.md +9 -5
- package/dist/ai/BbCheckboxGroup.md +5 -4
- package/dist/ai/BbColorInput.md +12 -0
- package/dist/ai/BbColorPalette.md +19 -15
- package/dist/ai/BbConfirmPortal.md +1 -1
- package/dist/ai/BbDatePicker.md +16 -3
- package/dist/ai/BbDatePickerInput.md +17 -1
- package/dist/ai/BbDialog.md +16 -4
- package/dist/ai/BbDropdown.md +175 -67
- package/dist/ai/BbDropdownButton.md +27 -8
- package/dist/ai/BbForm.md +4 -1
- package/dist/ai/BbHoverCardPortal.md +1 -1
- package/dist/ai/BbNumberInput.md +8 -4
- package/dist/ai/BbPopoverPortal.md +1 -1
- package/dist/ai/BbRadioGroup.md +4 -4
- package/dist/ai/BbSelect.md +79 -67
- package/dist/ai/BbSelectPopover.md +24 -5
- package/dist/ai/BbSwitchGroup.md +5 -4
- package/dist/ai/BbTable.md +59 -34
- package/dist/ai/BbTimePicker.md +16 -3
- package/dist/ai/BbTimePickerInput.md +15 -1
- package/dist/ai/BbToast.md +3 -2
- package/dist/ai/BbToastPortal.md +1 -1
- 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 +1 -0
- package/dist/ai/ListBox.md +1 -0
- package/dist/ai/OptionsContainer.md +4 -4
- package/dist/ai/changelog.json +215 -6
- package/dist/ai/components.json +77 -43
- package/dist/ai/composables/useToast.md +2 -2
- package/dist/ai/design-tokens.json +60 -0
- package/dist/ai/guides/agent-contract.md +8 -4
- package/dist/ai/guides/design-tokens.md +33 -0
- package/dist/ai/guides/eslint-rules.md +1 -1
- package/dist/ai/guides/fetch-items-playbook.md +7 -11
- package/dist/ai/guides/inertia-helpers.md +613 -53
- package/dist/ai/guides/migration/adoption-checklist.md +5 -5
- 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-table.md +2 -1
- package/dist/ai/guides/migration/components/bb-toast.md +2 -2
- package/dist/ai/guides/migration/v2-to-v3.md +46 -5
- package/dist/ai/guides/migration/v3-beta-tooling.md +4 -0
- package/dist/ai/guides/passthrough.md +3 -3
- package/dist/ai/guides/preset-components.md +15 -2
- package/dist/ai/guides/reporting.md +49 -0
- package/dist/ai/helpers/inertia/manifest.json +33 -38
- package/dist/ai/helpers/inertia/useHasChanged.ts +25 -37
- package/dist/ai/helpers/inertia/useQuery.ts +24 -6
- package/dist/ai/helpers/inertia/utils.ts +552 -3
- package/dist/ai/index.md +2 -1
- package/dist/ai/manifest/common.json +1 -0
- package/dist/ai/manifest/components/BbAlert.tree.json +1 -1
- package/dist/ai/manifest/components/BbAvatar.json +5 -2
- package/dist/ai/manifest/components/BbAvatar.tree.json +32 -2
- package/dist/ai/manifest/components/BbCalendar.json +2 -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 +7 -4
- package/dist/ai/manifest/components/BbColorPalette.removed.json +1 -2
- package/dist/ai/manifest/components/BbConfirmPortal.json +1 -1
- package/dist/ai/manifest/components/BbDatePicker.json +6 -3
- package/dist/ai/manifest/components/BbDatePickerInput.json +3 -0
- package/dist/ai/manifest/components/BbDialog.tree.json +7 -1
- package/dist/ai/manifest/components/BbDropdown.json +23 -17
- package/dist/ai/manifest/components/BbDropdown.removed.json +2 -1
- package/dist/ai/manifest/components/BbDropdown.tree.json +16 -5
- package/dist/ai/manifest/components/BbDropdownButton.json +15 -9
- package/dist/ai/manifest/components/BbDropdownButton.removed.json +2 -1
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -0
- package/dist/ai/manifest/components/BbForm.json +1 -1
- package/dist/ai/manifest/components/BbHoverCard.json +1 -1
- package/dist/ai/manifest/components/BbHoverCardPortal.json +1 -1
- package/dist/ai/manifest/components/BbNumberInput.json +1 -1
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +2 -0
- package/dist/ai/manifest/components/BbPopover.json +1 -1
- package/dist/ai/manifest/components/BbPopoverPortal.json +1 -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 +10 -7
- package/dist/ai/manifest/components/BbSelectPopover.json +7 -4
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +5 -1
- 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 +16 -6
- package/dist/ai/manifest/components/BbTimePicker.json +7 -4
- package/dist/ai/manifest/components/BbTimePickerInput.json +5 -2
- package/dist/ai/manifest/components/BbToastPortal.json +1 -1
- package/dist/ai/manifest/components/BbTree.json +1 -1
- package/dist/ai/manifest/components/CommonPopover.json +2 -1
- package/dist/ai/manifest/components/FlatListBox.json +2 -1
- package/dist/ai/manifest/components/GroupedListBox.json +2 -1
- package/dist/ai/manifest/components/ListBox.json +2 -1
- package/dist/ai/manifest/components/OptionsContainer.json +6 -4
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/manifest/meta.json +36 -3
- package/dist/ai/manifest/types.advanced.json +81 -80
- package/dist/ai/manifest/types.api.json +64 -65
- package/dist/ai/manifest/types.wrapper.json +155 -118
- package/dist/ai/recipes/inertia/layout-scaffold.md +3 -1
- package/dist/ai/recipes/nuxt/layout-scaffold.md +3 -1
- package/dist/ai/recipes/vue/layout-scaffold.md +3 -1
- package/dist/ai/source/BbAlert.md +16 -4
- package/dist/ai/source/BbAvatar.md +121 -9
- package/dist/ai/source/BbBadge.md +12 -5
- package/dist/ai/source/BbBreadcrumbs.md +56 -55
- package/dist/ai/source/BbButton.md +41 -25
- package/dist/ai/source/BbCalendar.md +22 -12
- package/dist/ai/source/BbCarousel.md +31 -28
- package/dist/ai/source/BbCheckboxGroup.md +15 -9
- package/dist/ai/source/BbColorInput.md +19 -0
- package/dist/ai/source/BbColorPalette.md +59 -12
- package/dist/ai/source/BbConfirm.md +7 -0
- package/dist/ai/source/BbConfirmPortal.md +9 -4
- package/dist/ai/source/BbDatePicker.md +71 -22
- package/dist/ai/source/BbDatePickerInput.md +72 -9
- package/dist/ai/source/BbDialog.md +45 -2
- package/dist/ai/source/BbDropdown.md +263 -63
- package/dist/ai/source/BbDropdownButton.md +27 -2
- package/dist/ai/source/BbDropdownGroup.md +121 -59
- package/dist/ai/source/BbForm.md +73 -6
- package/dist/ai/source/BbGallery.md +76 -55
- package/dist/ai/source/BbHost.md +12 -0
- package/dist/ai/source/BbHoverCard.md +7 -0
- package/dist/ai/source/BbHoverCardPortal.md +9 -5
- package/dist/ai/source/BbNumberInput.md +22 -16
- package/dist/ai/source/BbOffCanvas.md +48 -2
- package/dist/ai/source/BbPopover.md +7 -0
- package/dist/ai/source/BbPopoverPortal.md +9 -5
- package/dist/ai/source/BbRadio.md +4 -3
- package/dist/ai/source/BbRadioGroup.md +19 -10
- package/dist/ai/source/BbSelect.md +35 -20
- package/dist/ai/source/BbSelectPopover.md +116 -8
- package/dist/ai/source/BbSwitchGroup.md +11 -4
- package/dist/ai/source/BbTable.md +126 -32
- package/dist/ai/source/BbTag.md +10 -3
- package/dist/ai/source/BbTimePicker.md +69 -15
- package/dist/ai/source/BbTimePickerInput.md +45 -7
- package/dist/ai/source/BbToast.md +16 -2
- package/dist/ai/source/BbToastPortal.md +18 -6
- package/dist/ai/source/BbTree.md +1 -1
- package/dist/ai/source/CommonFieldInput.md +11 -5
- package/dist/ai/source/CommonPopover.md +28 -2
- package/dist/ai/source/FlatListBox.md +26 -5
- package/dist/ai/source/GroupedListBox.md +63 -11
- package/dist/ai/source/ListBox.md +4 -0
- package/dist/ai/source/OptionsContainer.md +29 -11
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +31 -26
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -0
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +61 -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 +80 -79
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +152 -158
- 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 +235 -234
- package/dist/components/BbCalendar/types.d.ts +2 -2
- package/dist/components/BbCalendar/useDayGrid.js +120 -123
- package/dist/components/BbCalendar/useDayjsLocale.js +11 -8
- package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +7 -7
- 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 +239 -223
- package/dist/components/BbColorPalette/types.d.ts +8 -1
- package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +2 -4
- package/dist/components/BbConfirm/types.d.ts +5 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +4 -2
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +160 -143
- package/dist/components/BbDatePicker/types.d.ts +9 -2
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +3 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +483 -496
- package/dist/components/BbDatePickerInput/types.d.ts +7 -0
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +252 -236
- package/dist/components/BbDialog/leaveGhost.js +38 -0
- package/dist/components/BbDialog/overlayActions.js +34 -20
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +92 -87
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +3 -0
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +419 -368
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +384 -340
- 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 +133 -119
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +73 -45
- package/dist/components/BbDropdown/normalizeGroups.js +6 -2
- package/dist/components/BbDropdown/ptKeys.generated.d.ts +8 -0
- package/dist/components/BbDropdown/types.d.ts +73 -58
- package/dist/components/BbDropdown/types.js +1 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +2 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +93 -72
- package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +48 -0
- package/dist/components/BbDropdownButton/types.d.ts +13 -2
- package/dist/components/BbDropdownButton/types.js +2 -0
- package/dist/components/BbForm/BbForm.vue.d.ts +2 -21
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +229 -227
- package/dist/components/BbForm/types.d.ts +31 -0
- package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +318 -296
- package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +7 -1
- package/dist/components/BbHoverCard/BbHoverCardPortal.vue.d.ts +2 -5
- package/dist/components/BbHoverCard/types.d.ts +5 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +10 -6
- package/dist/components/BbNumberInput/numberDisplay.js +102 -106
- package/dist/components/BbNumberInput/types.d.ts +4 -3
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +425 -409
- package/dist/components/BbPopover/BbPopoverPortal.vue.d.ts +2 -5
- package/dist/components/BbPopover/types.d.ts +5 -0
- package/dist/components/BbRadio/types.d.ts +4 -3
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +108 -106
- package/dist/components/BbRadioGroup/types.d.ts +4 -7
- package/dist/components/BbSelect/BbSelect.vue.d.ts +3 -1
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +167 -163
- package/dist/components/BbSelect/types.d.ts +23 -20
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +3 -1
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +680 -637
- package/dist/components/BbSelectPopover/types.d.ts +10 -4
- 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 +1 -3
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1182 -1165
- package/dist/components/BbTable/BbTableDataRow.js +96 -96
- package/dist/components/BbTable/types.d.ts +11 -10
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +9 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +4 -2
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +157 -140
- package/dist/components/BbTimePicker/types.d.ts +9 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +3 -1
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +278 -268
- package/dist/components/BbTimePickerInput/types.d.ts +7 -0
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +12 -12
- package/dist/components/BbToast/BbToastPortal.vue.d.ts +2 -4
- package/dist/components/BbToast/types.d.ts +7 -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/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +36 -36
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +14 -2
- package/dist/components/CommonTimeSelector/useMeridiem.js +6 -6
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +115 -96
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +194 -166
- 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/composables/formSubmitLock.js +2 -1
- package/dist/composables/overlayRegistry.js +52 -42
- package/dist/composables/useActiveInactiveState.js +8 -4
- package/dist/composables/useBbDialog.js +5 -5
- package/dist/composables/useItemsGetter.js +34 -32
- package/dist/composables/useOpenModel.js +20 -0
- package/dist/composables/useOwnModel.js +16 -0
- package/dist/composables/useSegmentedFields.js +31 -20
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/i18n/currencyDigits.js +58 -0
- 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/i18n/regionDates.js +250 -0
- package/dist/i18n/regionHints.js +30 -41
- package/dist/icon-scan.js +68 -61
- package/dist/index.d.ts +35 -31
- package/dist/llms-full.txt +1428 -400
- package/dist/llms-medium.txt +8 -4
- package/dist/llms.txt +4 -2
- package/dist/locale-blueprint.json +2 -0
- package/dist/styles.css +2 -2
- package/dist/types/ActionButton.d.ts +2 -1
- package/dist/types/CommonProps.d.ts +8 -0
- package/dist/types/Option.d.ts +10 -0
- package/dist/types/ptComponentMap.d.ts +3 -3
- package/dist/utilities/functions/hash.js +97 -64
- package/dist/utilities/functions/isEqual.js +33 -25
- package/dist/utilities/functions/slotContent.js +19 -0
- package/dist/utils/loadRetry.js +8 -0
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +2 -1
- package/dist/vite.js +11 -4
- package/llms.txt +4 -2
- package/package.json +3 -2
- package/scripts/README.md +3 -1
- package/scripts/lib/adoption-checklist.json +6 -5
- package/scripts/lib/agent-manifest.mjs +33 -6
- package/scripts/lib/agent-setup.mjs +90 -24
- package/scripts/lib/cldr-pins.ts +182 -0
- package/scripts/lib/engines-include.d.mts +5 -0
- package/scripts/lib/engines-include.mjs +40 -0
- package/scripts/lib/eslint-plugin.mjs +8 -2
- package/scripts/lib/hidden-label-placeholder.mjs +25 -5
- package/scripts/lib/idiom-scan.mjs +30 -3
- package/scripts/lib/legacy-agent-files.json +152 -0
- package/scripts/lib/mcp-config.mjs +74 -7
- package/scripts/lib/portal-names.mjs +78 -8
- package/scripts/lib/release-results.mjs +5 -2
- package/scripts/lib/report.mjs +340 -0
- package/scripts/lib/run-beat.mjs +14 -0
- package/scripts/lib/run-records.mjs +313 -0
- package/scripts/lib/selector-log.mjs +98 -0
- package/scripts/lib/ticket-beat.mjs +30 -0
- package/scripts/lib/validate-bb-markup.mjs +37 -2
- package/dist/ai/manifest/components/BbAvatar.removed.json +0 -6
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
{
|
|
2
|
+
".cursor/rules/bitboss-ui.mdc": [
|
|
3
|
+
"0177c933cdbfde7f449bb95f5f008ea9",
|
|
4
|
+
"0269ed679ae31111d53a00836388bcda",
|
|
5
|
+
"02cd2d1be5d3c155b86be0b689e3f6c8",
|
|
6
|
+
"02e9357653359801619709c8a6454b4b",
|
|
7
|
+
"041f36da1d6a4596a69ba864c5aeda4b",
|
|
8
|
+
"05f39484fdba93f0fd93967c18667542",
|
|
9
|
+
"0bacb3fc98806d412979cb0412ce5c38",
|
|
10
|
+
"0cd8a2f6a52ab5602e29347f2ee66925",
|
|
11
|
+
"0d2075540ed90867ebb3722970d577c5",
|
|
12
|
+
"134fb8c5cb04bb7881fb23737cc7d82f",
|
|
13
|
+
"16635cfcebcecf66913c5a14935d46ce",
|
|
14
|
+
"1e29c6e5c5526da19fe417d29f725e8a",
|
|
15
|
+
"1f1532870c30e7ef3cffec3a30104fa4",
|
|
16
|
+
"26bfb29f229c5c0800eebc11bd14b48e",
|
|
17
|
+
"287b6103dc3c7a52d16f3e4a3cd5d57f",
|
|
18
|
+
"2d2a0369108d02ec2fc1fcad4759e9b9",
|
|
19
|
+
"2f45a5596bba256a9b5e8ffcb83c9b6a",
|
|
20
|
+
"3352195f1ab6da13234afe21778030d2",
|
|
21
|
+
"34243dd6e3f9d6b20b30275de8be028d",
|
|
22
|
+
"36181bdd970701c6808052ba8dd3fa21",
|
|
23
|
+
"38a03c237159a6a59730265e0f54e032",
|
|
24
|
+
"3adcd6b8f856e157c8e90f5fb31b0d45",
|
|
25
|
+
"3b0a930bb113e4a7e01241d91ebc5271",
|
|
26
|
+
"3e1b59c2ed6a35fedc31c325a065f6d5",
|
|
27
|
+
"44f9fc95833ca29bb5f98dc61ae454e4",
|
|
28
|
+
"49cf94fe6785e7683c1a324d91914688",
|
|
29
|
+
"4bbf3e3450ebcc9e6567979b7575b608",
|
|
30
|
+
"5815afef780258bf0c830f4e31f0767d",
|
|
31
|
+
"5d7004c4a2b414166eb3429676960f55",
|
|
32
|
+
"6268e7ed461c6f12cb3cd4d7df3374ec",
|
|
33
|
+
"631b89abb71135086fa2370b377f3f7c",
|
|
34
|
+
"64cc2d17598ddb6b9f4680f22a0003f9",
|
|
35
|
+
"6e77e4571467ab105daad1cf8f261220",
|
|
36
|
+
"77a39a95b83aef79cc44e2753b218624",
|
|
37
|
+
"8160bbd83de2395e00bc4645cbbdbeda",
|
|
38
|
+
"8448de091d95ce58eb706447c89daa10",
|
|
39
|
+
"8f435d940eba6d97734227f2aa8e55e8",
|
|
40
|
+
"8f973f6ca72328e65b9715202fb14dfd",
|
|
41
|
+
"9106d584757aceb54274fa33309ff059",
|
|
42
|
+
"99debfd332a6eb04168188092661a8a7",
|
|
43
|
+
"9d723fd2b7fd68c65e24882b0d19c839",
|
|
44
|
+
"a05a61de3942591e7b524bdc884f28ba",
|
|
45
|
+
"a1053e6f891c3fe871cb60bc7f986f95",
|
|
46
|
+
"a88d2f58c790083f8f3b0a6b9b7fba05",
|
|
47
|
+
"af7de1f49f5b94cf2207698d9d5fecfd",
|
|
48
|
+
"b04016d359bf35f5058c8ce00de5dc62",
|
|
49
|
+
"b21aa85e398ab6c4452f21efc7d0cd83",
|
|
50
|
+
"b5f25fb23600b4fd3193c6df266f150e",
|
|
51
|
+
"b9c541b029037bc43a1671ad8b11081a",
|
|
52
|
+
"b9ee3a8d00c5507fe8e5086f2e31a556",
|
|
53
|
+
"c0a6c26d27dc4e8db5fdff3404d7acfb",
|
|
54
|
+
"c0b67d088f8e9aafdb82290260ed3a7d",
|
|
55
|
+
"c1af18d82b0ab45e12c17c686d89e308",
|
|
56
|
+
"ca2dbb23c247e57d416f3421add1a78e",
|
|
57
|
+
"d2ad099ceb4a5b05ae2a3cd362294eaf",
|
|
58
|
+
"d30e786ee2739465c5709ca308e50e39",
|
|
59
|
+
"d4dce4d045286addff82068fdbb13bb0",
|
|
60
|
+
"d5167f7c6d51a37b152c8487b39c6296",
|
|
61
|
+
"d5bc7208c04d30f67b2b622b3ad58c4f",
|
|
62
|
+
"d76bfb74f8b8719e6462bf1b45c89aa2",
|
|
63
|
+
"d8d93aec1563ecf5792fb4ba67201fce",
|
|
64
|
+
"d94c898dff454064e1883a4ca4df27eb",
|
|
65
|
+
"db370d7775a754b1f2822ec698391243",
|
|
66
|
+
"e615ef983790462f20ccd036a6eb72a0",
|
|
67
|
+
"e6d3ca00fa635fb5e085f77cb4f6e1f5",
|
|
68
|
+
"e9975682872583659709bb43579e028b",
|
|
69
|
+
"e9bd885cb28dd6d377d3837bed8aa98a",
|
|
70
|
+
"eaf435b837a6abdb18a31d4b26e9a28c",
|
|
71
|
+
"ee48ffaa932920fa814b3a39138d386b",
|
|
72
|
+
"f467fe146e8e0eda487ef18164dd0e9c",
|
|
73
|
+
"f48d82cf7988e28f0aa06502373ad3a4",
|
|
74
|
+
"fc9e241cc3f3f64b8d028291b46c8012",
|
|
75
|
+
"fcd917bb419fae802b935718b68c89b6"
|
|
76
|
+
],
|
|
77
|
+
".windsurf/rules/bitboss-ui.md": [
|
|
78
|
+
"04eec4c9f4c43e0144a3c0ec475d7a68",
|
|
79
|
+
"06f394653af0313c0186885f3f12a8e8",
|
|
80
|
+
"08de468969ff87dd037375d2fb916652",
|
|
81
|
+
"0d5c4739e60a9c2ea2df5094d8604eee",
|
|
82
|
+
"11a02f433cdcb0af94ef69a18b34aa6b",
|
|
83
|
+
"1331350f890c3b6d7da8aedd245a3a64",
|
|
84
|
+
"14c838633d77dbc3618196b9d3d6a46d",
|
|
85
|
+
"1570cb63917e5a8d3e9bedae095fa58d",
|
|
86
|
+
"15787842cc626f4aabb5e81e74685176",
|
|
87
|
+
"17481ea8828116a6e7d4ab2b518b5de0",
|
|
88
|
+
"1b8567e79ae2cf39fa19d09700cf9362",
|
|
89
|
+
"226e8bb4cc5238ca082c643742106934",
|
|
90
|
+
"227c55dcc5b3268c0c5901a2f9f745d2",
|
|
91
|
+
"22b17cdaa6d7042021d9e877b63d8368",
|
|
92
|
+
"2441019ee6645e9cc70a338ac12a8541",
|
|
93
|
+
"2548a6bcadd4be695e2028e4e3b57620",
|
|
94
|
+
"267b27ab429b525bc082da8255061555",
|
|
95
|
+
"30ed6dd7f454817693bc74568eca39ec",
|
|
96
|
+
"31149c1caa275eaa429d5f972a8e656f",
|
|
97
|
+
"35413335703ac020587c498f34b47207",
|
|
98
|
+
"35c851ef80670fb99dd70240aeff0c5f",
|
|
99
|
+
"397f8db7a5787157d0b186b1ec31ee06",
|
|
100
|
+
"3ceae7cc73824a8ff02da66e29654cb1",
|
|
101
|
+
"401f9ad515334a0958740c7d88eac1fe",
|
|
102
|
+
"48cd644a738c13ce0bef4fcde49dc25e",
|
|
103
|
+
"493b47aa13e8887a76c11dba6e09d98a",
|
|
104
|
+
"515ba8f5277ed570d8a9d2afca7ca23b",
|
|
105
|
+
"53c47519c325c91014006345d923a294",
|
|
106
|
+
"6269ad8181786cd8af292d2a6a8cbcd3",
|
|
107
|
+
"64b72af0733bd48663c52f90ca09de84",
|
|
108
|
+
"68d7980313c3ede4df4352f4780945ec",
|
|
109
|
+
"6b42eea311205f4bba2272435e23a451",
|
|
110
|
+
"738c931c51219a36da4da9f349bb68ac",
|
|
111
|
+
"7baad5190d35cbf168c5aeac7fb49425",
|
|
112
|
+
"7bd541c512d8fdf834d5dd02a8262009",
|
|
113
|
+
"8431533ed91c1dfa238dc611bd47d46d",
|
|
114
|
+
"889f571bd5507a07ffc6c4bdc2caffd9",
|
|
115
|
+
"8b028ca4f3ee29187e724ddec3612e17",
|
|
116
|
+
"8cd81c1503b796284d917f582052f602",
|
|
117
|
+
"8d2d30382c0e3f21ee14c233f5b04037",
|
|
118
|
+
"8d395475769a4bf4d13e6c868cbb527a",
|
|
119
|
+
"8fbaad1a3fab1e65214d51c981421aac",
|
|
120
|
+
"8ff5b3a86e62fee66174ccd8aba7fe12",
|
|
121
|
+
"9357361e5252b9731b01df5f9708a115",
|
|
122
|
+
"9450e2eb7e9b3bceb94b67a3cc7facdc",
|
|
123
|
+
"94a16c117e2ee5e1b4e14b6fcad82db8",
|
|
124
|
+
"9cc403e3fb6bb7257abe402d75da6182",
|
|
125
|
+
"9d7e2e032bc8fa1c6db2719a9a72069d",
|
|
126
|
+
"a5a8541f338bf6d6f2c1f5b348fde36e",
|
|
127
|
+
"bab6bf09af174f423896b4dc4b4f731a",
|
|
128
|
+
"bb2084a9c7e7e864e766bcb5642e3369",
|
|
129
|
+
"bb9658c2146d6e01143ecbccd3fb4f03",
|
|
130
|
+
"bbb1fac6a38ecc7159c441daa0011d57",
|
|
131
|
+
"c08b476e230c159a6e1d49338d68aa00",
|
|
132
|
+
"c16e0487cc53825b124a4936f22c4936",
|
|
133
|
+
"c2a91ecc8ce22cb2d2e8d9b903f1bebb",
|
|
134
|
+
"c33efd6aaf4ee19de004f857cf49c604",
|
|
135
|
+
"c645f65b9fdba6a063fe53f7ab92a79e",
|
|
136
|
+
"cc25631969e35788d25f6e86a634ccbd",
|
|
137
|
+
"cee59cc39b5a87f3a88f4b3b52b01f1e",
|
|
138
|
+
"d04f98c855b6280e6e5187e7e0c4c269",
|
|
139
|
+
"d2a10f9896c95ce18f088af6993f5455",
|
|
140
|
+
"d56cbab2abb36855c50f0076860aaaaf",
|
|
141
|
+
"d7e2b3990e032b03bddeba81e618c225",
|
|
142
|
+
"d9c9f3cd6b3937195a895cf1d954fca3",
|
|
143
|
+
"ddf0037bb4831d9885ba9ad2a9dec155",
|
|
144
|
+
"e0e0b10effbd672b809d2027cec58cd8",
|
|
145
|
+
"e1b1eb6a3b760614c1e1b72392ce12ce",
|
|
146
|
+
"e55e503d0a06b8c8e89d454578b3af29",
|
|
147
|
+
"ec6842466d35b1bd6fb0984ec6cfaa75",
|
|
148
|
+
"f9fd8c2e2bb25159a6f437fb43698386",
|
|
149
|
+
"fb9fe635980dda64c2fde9aa28338c34",
|
|
150
|
+
"fd2238f6e532e0c297ffd5b9471c4402"
|
|
151
|
+
]
|
|
152
|
+
}
|
|
@@ -106,9 +106,70 @@ export const stdioEntry = (root) => {
|
|
|
106
106
|
};
|
|
107
107
|
export const vscodeEntry = (root) => ({ type: 'stdio', ...stdioEntry(root) });
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
/*
|
|
110
|
+
* JSON the way Prettier (and oxfmt, Biome) print it, so a
|
|
111
|
+
* file we write passes the app's `format --check` untouched: objects
|
|
112
|
+
* expanded, an array of scalars on one line when it fits in 80 columns
|
|
113
|
+
* (`"args": ["bitboss-ui", "mcp"]`), the indent unit the app uses.
|
|
114
|
+
*/
|
|
115
|
+
const PRINT_WIDTH = 80;
|
|
116
|
+
const columns = (text) => text.replace(/\t/g, ' ').length;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* @param {unknown} value
|
|
120
|
+
* @param {string} unit one indent step (`'\t'`, `' '`, `' '`)
|
|
121
|
+
* @param {string} [indent] the indent of the line the value starts on
|
|
122
|
+
* @param {number} [column] where on that line the value starts
|
|
123
|
+
* @param {string} [eol]
|
|
124
|
+
*/
|
|
125
|
+
export function formatJson(value, unit, indent = '', column = 0, eol = '\n') {
|
|
126
|
+
if (Array.isArray(value)) {
|
|
127
|
+
if (value.length === 0) return '[]';
|
|
128
|
+
if (value.every((v) => v === null || typeof v !== 'object')) {
|
|
129
|
+
const flat = `[${value.map((v) => JSON.stringify(v ?? null)).join(', ')}]`;
|
|
130
|
+
// + 1: the comma after it.
|
|
131
|
+
if (column + flat.length + 1 <= PRINT_WIDTH) return flat;
|
|
132
|
+
}
|
|
133
|
+
const inner = indent + unit;
|
|
134
|
+
return `[${eol}${value
|
|
135
|
+
.map(
|
|
136
|
+
(v) =>
|
|
137
|
+
`${inner}${formatJson(v ?? null, unit, inner, columns(inner), eol)}`
|
|
138
|
+
)
|
|
139
|
+
.join(`,${eol}`)}${eol}${indent}]`;
|
|
140
|
+
}
|
|
141
|
+
if (value && typeof value === 'object') {
|
|
142
|
+
const entries = Object.entries(value).filter(
|
|
143
|
+
([, v]) => v !== undefined && typeof v !== 'function'
|
|
144
|
+
);
|
|
145
|
+
if (entries.length === 0) return '{}';
|
|
146
|
+
const inner = indent + unit;
|
|
147
|
+
return `{${eol}${entries
|
|
148
|
+
.map(([key, v]) => {
|
|
149
|
+
const head = `${inner}${JSON.stringify(key)}: `;
|
|
150
|
+
return head + formatJson(v, unit, inner, columns(head), eol);
|
|
151
|
+
})
|
|
152
|
+
.join(`,${eol}`)}${eol}${indent}}`;
|
|
153
|
+
}
|
|
154
|
+
return JSON.stringify(value);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/** The app's indent step, read off its package.json; two spaces by default. */
|
|
158
|
+
export function projectIndent(root) {
|
|
159
|
+
try {
|
|
160
|
+
return (
|
|
161
|
+
readFileSync(join(root, 'package.json'), 'utf-8').match(
|
|
162
|
+
/^([ \t]+)\S/m
|
|
163
|
+
)?.[1] ?? ' '
|
|
164
|
+
);
|
|
165
|
+
} catch {
|
|
166
|
+
return ' ';
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function writeJson(path, data, unit) {
|
|
110
171
|
mkdirSync(dirname(path), { recursive: true });
|
|
111
|
-
writeFileAtomicSync(path, `${
|
|
172
|
+
writeFileAtomicSync(path, `${formatJson(data, unit)}\n`, 'utf-8');
|
|
112
173
|
}
|
|
113
174
|
|
|
114
175
|
/**
|
|
@@ -210,11 +271,17 @@ function spliceEntry(raw, containerKey, entry) {
|
|
|
210
271
|
const eol = raw.includes('\r\n') ? '\r\n' : '\n';
|
|
211
272
|
const indentAt = (offset) =>
|
|
212
273
|
raw.slice(raw.lastIndexOf('\n', offset) + 1).match(/^[ \t]*/)[0];
|
|
213
|
-
const
|
|
214
|
-
|
|
274
|
+
const lineBefore = (offset) =>
|
|
275
|
+
raw.slice(raw.lastIndexOf('\n', offset - 1) + 1, offset);
|
|
276
|
+
const format = (value, indent, column) =>
|
|
277
|
+
formatJson(value, unit, indent, column, eol);
|
|
215
278
|
const replace = (member, value) =>
|
|
216
279
|
raw.slice(0, member.valueStart) +
|
|
217
|
-
format(
|
|
280
|
+
format(
|
|
281
|
+
value,
|
|
282
|
+
indentAt(member.valueStart),
|
|
283
|
+
columns(lineBefore(member.valueStart))
|
|
284
|
+
) +
|
|
218
285
|
raw.slice(member.valueEnd);
|
|
219
286
|
// A new first member, right after the object's `{` — unless the rest of
|
|
220
287
|
// that line is only a comment (`{ // header`), in which case after the
|
|
@@ -265,7 +332,7 @@ function spliceEntry(raw, containerKey, entry) {
|
|
|
265
332
|
}
|
|
266
333
|
return (
|
|
267
334
|
raw.slice(0, at) +
|
|
268
|
-
`${eol}${indent}${JSON.stringify(key)}: ${format(value, indent)}${tail}` +
|
|
335
|
+
`${eol}${indent}${JSON.stringify(key)}: ${format(value, indent, columns(`${indent}${JSON.stringify(key)}: `))}${tail}` +
|
|
269
336
|
raw.slice(at)
|
|
270
337
|
);
|
|
271
338
|
};
|
|
@@ -374,7 +441,7 @@ export function ensureEntry(path, containerKey, entry, label, root) {
|
|
|
374
441
|
config[containerKey][MCP_SERVER_NAME] = entry;
|
|
375
442
|
try {
|
|
376
443
|
if (raw === null) {
|
|
377
|
-
writeJson(path, config);
|
|
444
|
+
writeJson(path, config, projectIndent(root ?? dirname(path)));
|
|
378
445
|
} else {
|
|
379
446
|
const next = spliceEntry(raw, containerKey, entry);
|
|
380
447
|
// The splice must read back as exactly the merged config, or the
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
* Dialog ids ride the same scan as two more families: `v-bb-dialog`
|
|
18
18
|
* / `v-bb-off-canvas` with `"'id'"` or `{ id: 'id' }`, and
|
|
19
19
|
* `useBbDialog('id')` / `useBbOffCanvas('id')` in a script,
|
|
20
|
-
* against `<BbDialog | BbOffCanvas id="x"
|
|
20
|
+
* against `<BbDialog | BbOffCanvas id="x">`, or the same on a
|
|
21
|
+
* `definePreset(BbDialog, …)` wrapper. One finding, `unknown-dialog`
|
|
21
22
|
* (error): the id is declared nowhere, or by the other family. Never an
|
|
22
23
|
* unused one: a dialog driven by its `v-model` legitimately has an id
|
|
23
24
|
* nothing opens. A `:id` with a static head (`` `row-${n}` ``, `'row-' + n`)
|
|
@@ -91,6 +92,53 @@ export const PORTAL_FAMILIES = {
|
|
|
91
92
|
const FAMILY_BY_COMPONENT = new Map(
|
|
92
93
|
Object.entries(PORTAL_FAMILIES).map(([family, f]) => [f.component, family])
|
|
93
94
|
);
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* the `definePreset(BbDialog, …)` wrappers a file defines,
|
|
98
|
+
* as tag → base, for the families this scan judges: a named `const X =
|
|
99
|
+
* definePreset(Bb…)`, and an anonymous `export default definePreset(Bb…)`,
|
|
100
|
+
* whose tag is the file's name (`AppSeparatedDialog.ts`), as an import or an
|
|
101
|
+
* auto-import names it.
|
|
102
|
+
* @param {string} code
|
|
103
|
+
* @param {string} path
|
|
104
|
+
*/
|
|
105
|
+
export function familyPresets(code, path) {
|
|
106
|
+
const out = new Map();
|
|
107
|
+
if (!code.includes('definePreset')) return out;
|
|
108
|
+
const keep = (tag, base) => {
|
|
109
|
+
if (FAMILY_BY_COMPONENT.has(base)) out.set(tag, base);
|
|
110
|
+
};
|
|
111
|
+
for (const [, tag, base] of code.matchAll(
|
|
112
|
+
/\b(?:const|let|var)\s+([A-Z][\w$]*)\s*(?::[^=]+)?=\s*definePreset\s*(?:<[^>()]*>)?\s*\(\s*(Bb[A-Za-z]+)\b/g
|
|
113
|
+
))
|
|
114
|
+
keep(tag, base);
|
|
115
|
+
const anonymous =
|
|
116
|
+
/\bexport\s+default\s+definePreset\s*(?:<[^>()]*>)?\s*\(\s*(Bb[A-Za-z]+)\b/.exec(
|
|
117
|
+
code
|
|
118
|
+
);
|
|
119
|
+
if (anonymous) {
|
|
120
|
+
const file = /([^/\\]+?)(?:\.[cm]?[jt]sx?|\.vue)$/.exec(path)?.[1];
|
|
121
|
+
if (file) keep(pascal(file), anonymous[1]);
|
|
122
|
+
}
|
|
123
|
+
return out;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* The preset tags a `.vue` file can use: the project's, plus a default
|
|
128
|
+
* import renamed on the way in (`import Edit from './AppSeparatedDialog'`).
|
|
129
|
+
*/
|
|
130
|
+
const presetsIn = (scripts, presets) => {
|
|
131
|
+
if (!presets?.size) return presets;
|
|
132
|
+
const out = new Map(presets);
|
|
133
|
+
for (const [, local, from] of scripts.matchAll(
|
|
134
|
+
/\bimport\s+([A-Z][\w$]*)\s+from\s+['"]([^'"]+)['"]/g
|
|
135
|
+
)) {
|
|
136
|
+
const file = /([^/\\]+?)(?:\.[cm]?[jt]sx?|\.vue)?$/.exec(from)?.[1];
|
|
137
|
+
const base = file && presets.get(pascal(file));
|
|
138
|
+
if (base) out.set(local, base);
|
|
139
|
+
}
|
|
140
|
+
return out;
|
|
141
|
+
};
|
|
94
142
|
const FAMILY_BY_DIRECTIVE = new Map(
|
|
95
143
|
Object.entries(PORTAL_FAMILIES)
|
|
96
144
|
.filter(([, f]) => f.directive)
|
|
@@ -365,8 +413,9 @@ const declarationName = (node, attr = 'name', optional = false) => {
|
|
|
365
413
|
* The portal sites of one file.
|
|
366
414
|
* @param {string} code
|
|
367
415
|
* @param {string} [path] decides `.vue` vs a script file
|
|
416
|
+
* @param {Map<string, string>} [presets] preset tag → base
|
|
368
417
|
*/
|
|
369
|
-
export function fileSites(code, path = 'x.vue') {
|
|
418
|
+
export function fileSites(code, path = 'x.vue', presets = new Map()) {
|
|
370
419
|
const sites = {
|
|
371
420
|
declarations: [],
|
|
372
421
|
calls: [],
|
|
@@ -388,11 +437,19 @@ export function fileSites(code, path = 'x.vue') {
|
|
|
388
437
|
}
|
|
389
438
|
for (const block of [descriptor.script, descriptor.scriptSetup])
|
|
390
439
|
if (block) scriptSites(block.content, block.loc.start.line, code, sites);
|
|
440
|
+
const tags = presetsIn(
|
|
441
|
+
[descriptor.script, descriptor.scriptSetup]
|
|
442
|
+
.map((block) => block?.content ?? '')
|
|
443
|
+
.join('\n'),
|
|
444
|
+
new Map([...presets, ...familyPresets(code, path)])
|
|
445
|
+
);
|
|
391
446
|
|
|
392
447
|
const walkTemplate = (node) => {
|
|
393
448
|
if (!node || typeof node !== 'object') return;
|
|
394
449
|
if (node.type === NODE_ELEMENT) {
|
|
395
|
-
const
|
|
450
|
+
const tag = pascal(node.tag);
|
|
451
|
+
const family =
|
|
452
|
+
FAMILY_BY_COMPONENT.get(tag) ?? FAMILY_BY_COMPONENT.get(tags.get(tag));
|
|
396
453
|
if (family) {
|
|
397
454
|
const f = PORTAL_FAMILIES[family];
|
|
398
455
|
const declared = declarationName(node, f.attr, !!f.ids);
|
|
@@ -452,22 +509,28 @@ const cache = new Map();
|
|
|
452
509
|
export function projectPortalIndex(projectRoot) {
|
|
453
510
|
if (cache.has(projectRoot)) return cache.get(projectRoot);
|
|
454
511
|
const index = emptyIndex();
|
|
512
|
+
const sources = [];
|
|
455
513
|
for (const path of walk(projectRoot)) {
|
|
456
514
|
if (path.endsWith('.d.ts') || !SOURCE.test(path)) continue;
|
|
457
|
-
let code;
|
|
458
515
|
try {
|
|
459
|
-
|
|
516
|
+
sources.push([path, readFileSync(path, 'utf-8')]);
|
|
460
517
|
} catch {
|
|
461
518
|
continue;
|
|
462
519
|
}
|
|
463
|
-
|
|
520
|
+
}
|
|
521
|
+
// a `definePreset(BbDialog, …)` tag declares ids too.
|
|
522
|
+
for (const [path, code] of sources)
|
|
523
|
+
for (const [tag, base] of familyPresets(code, path))
|
|
524
|
+
index.presets.set(tag, base);
|
|
525
|
+
for (const [path, code] of sources) {
|
|
526
|
+
if (!MAY_HAVE_PORTALS.test(code) && !hasPresetTag(code, index.presets)) {
|
|
464
527
|
// Still a source of string literals for `unused-portal`.
|
|
465
528
|
literalsIn(code, index.literals);
|
|
466
529
|
for (const [, value] of code.matchAll(/`([^`$\\\n]{1,120})`/g))
|
|
467
530
|
index.literals.add(value);
|
|
468
531
|
continue;
|
|
469
532
|
}
|
|
470
|
-
addSites(index, fileSites(code, path), path);
|
|
533
|
+
addSites(index, fileSites(code, path, index.presets), path);
|
|
471
534
|
}
|
|
472
535
|
for (const name of configuredExternalDialogIds(projectRoot))
|
|
473
536
|
for (const family of Object.keys(PORTAL_FAMILIES))
|
|
@@ -519,9 +582,16 @@ function emptyIndex() {
|
|
|
519
582
|
literals: new Set(),
|
|
520
583
|
/** family → id prefixes a template-literal `:id` covers */
|
|
521
584
|
prefixes: new Map(),
|
|
585
|
+
/** preset tag → its Bb* base */
|
|
586
|
+
presets: new Map(),
|
|
522
587
|
};
|
|
523
588
|
}
|
|
524
589
|
|
|
590
|
+
const hasPresetTag = (code, presets) => {
|
|
591
|
+
for (const tag of presets.keys()) if (code.includes(tag)) return true;
|
|
592
|
+
return false;
|
|
593
|
+
};
|
|
594
|
+
|
|
525
595
|
function addSites(index, sites, path) {
|
|
526
596
|
for (const { family, name } of sites.declarations) {
|
|
527
597
|
const byName = index.declared.get(family);
|
|
@@ -561,7 +631,7 @@ const declaration = (family, name) =>
|
|
|
561
631
|
* @param {ReturnType<typeof projectPortalIndex> | null} index
|
|
562
632
|
*/
|
|
563
633
|
export function portalFindings(code, path, index) {
|
|
564
|
-
const sites = fileSites(code, path);
|
|
634
|
+
const sites = fileSites(code, path, index?.presets);
|
|
565
635
|
if (!sites.calls.length && !sites.declarations.length) return [];
|
|
566
636
|
const merged = emptyIndex();
|
|
567
637
|
if (index) {
|
|
@@ -310,17 +310,20 @@ function mergeStep(next) {
|
|
|
310
310
|
* (release:check --plan says so and passes), so they cannot stay owed.
|
|
311
311
|
* `base` keeps the full run the reruns started from, and `warn` is
|
|
312
312
|
* re-derived from the merged steps, not the rerun's alone.
|
|
313
|
+
* A step kept from `previous` is marked `kept: true`: the rerun did not run
|
|
314
|
+
* it, so `gate --stats` (wall-stats.mjs) does not count its seconds again.
|
|
313
315
|
*/
|
|
314
316
|
export function mergeRerun(previous, rerun) {
|
|
315
317
|
const byName = new Map(rerun.steps.map((s) => [s.name, s]));
|
|
318
|
+
const kept = (s) => ({ ...s, kept: true });
|
|
316
319
|
const steps = previous.steps.map((prev) => {
|
|
317
320
|
const next = byName.get(prev.name);
|
|
318
|
-
if (!next) return prev;
|
|
321
|
+
if (!next) return kept(prev);
|
|
319
322
|
if (WALL_RECORD_STEPS.has(prev.name) && next.sub?.length && prev.sub) {
|
|
320
323
|
const subNext = new Map(next.sub.map((s) => [s.name, s]));
|
|
321
324
|
const known = new Set(prev.sub.map((p) => p.name));
|
|
322
325
|
const sub = prev.sub.map((p) =>
|
|
323
|
-
subNext.has(p.name) ? mergeStep(subNext.get(p.name)) : p
|
|
326
|
+
subNext.has(p.name) ? mergeStep(subNext.get(p.name)) : kept(p)
|
|
324
327
|
);
|
|
325
328
|
for (const s of next.sub) if (!known.has(s.name)) sub.push(mergeStep(s));
|
|
326
329
|
const status = sub.some(owed) ? 'FAIL' : 'pass';
|