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/dist/icon-scan.js
CHANGED
|
@@ -3,20 +3,20 @@ import { existsSync as t, readFileSync as n } from "node:fs";
|
|
|
3
3
|
import { dirname as r, isAbsolute as i, join as a, relative as o, resolve as s, sep as c } from "node:path";
|
|
4
4
|
import l from "ignore";
|
|
5
5
|
import * as u from "node:crypto";
|
|
6
|
-
import { mkdir as d, readdir as f,
|
|
7
|
-
import { availableParallelism as
|
|
8
|
-
import { Worker as
|
|
6
|
+
import { mkdir as d, readdir as f, rename as p, rm as m, stat as h, writeFile as g } from "node:fs/promises";
|
|
7
|
+
import { availableParallelism as _ } from "node:os";
|
|
8
|
+
import { Worker as v } from "node:worker_threads";
|
|
9
9
|
// src/icon-scan.ts
|
|
10
|
-
var
|
|
10
|
+
var y = /* @__PURE__ */ new Set([
|
|
11
11
|
"node_modules",
|
|
12
12
|
"vendor",
|
|
13
13
|
"storage"
|
|
14
|
-
]),
|
|
15
|
-
function
|
|
16
|
-
let t = [...e].sort((e, t) => t.length - e.length).map(
|
|
14
|
+
]), b = 268435456, x = 8192, S = 48, C = 1500, w = 64, T = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
15
|
+
function E(e) {
|
|
16
|
+
let t = [...e].sort((e, t) => t.length - e.length).map(T).join("|");
|
|
17
17
|
return RegExp(`(?<![A-Za-z0-9_-])(${t}):([a-z0-9][a-z0-9-]*)`, "g");
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function D(e, t) {
|
|
20
20
|
let n = e.toString("latin1"), r = /* @__PURE__ */ new Set();
|
|
21
21
|
t.lastIndex = 0;
|
|
22
22
|
for (let e of n.matchAll(t)) {
|
|
@@ -25,8 +25,8 @@ function T(e, t) {
|
|
|
25
25
|
}
|
|
26
26
|
return [...r];
|
|
27
27
|
}
|
|
28
|
-
var
|
|
29
|
-
function
|
|
28
|
+
var O = /[*?[{]/, k = (e) => O.test(e);
|
|
29
|
+
function A(e) {
|
|
30
30
|
let t = "^";
|
|
31
31
|
for (let n = 0; n < e.length; n++) {
|
|
32
32
|
let r = e[n];
|
|
@@ -37,17 +37,17 @@ function O(e) {
|
|
|
37
37
|
r === -1 ? t += "\\[" : (t += `[${e.slice(n + 1, r).replace(/\\/g, "\\\\")}]`, n = r);
|
|
38
38
|
} else if (r === "{") {
|
|
39
39
|
let r = e.indexOf("}", n + 1);
|
|
40
|
-
r === -1 ? t += "\\{" : (t += `(?:${e.slice(n + 1, r).split(",").map(
|
|
41
|
-
} else t +=
|
|
40
|
+
r === -1 ? t += "\\{" : (t += `(?:${e.slice(n + 1, r).split(",").map(T).join("|")})`, n = r);
|
|
41
|
+
} else t += T(r);
|
|
42
42
|
}
|
|
43
43
|
return RegExp(t + "$");
|
|
44
44
|
}
|
|
45
|
-
var
|
|
46
|
-
function
|
|
45
|
+
var j = (e) => c === "/" ? e : e.split(c).join("/");
|
|
46
|
+
function M(e, t) {
|
|
47
47
|
let n = o(e, t);
|
|
48
48
|
return n === "" || !n.startsWith("..") && !i(n);
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function N(e) {
|
|
51
51
|
let n = [], i = r(e), o = -1;
|
|
52
52
|
for (;;) {
|
|
53
53
|
if (n.push(i), t(a(i, ".git"))) {
|
|
@@ -59,14 +59,14 @@ function j(e) {
|
|
|
59
59
|
i = e;
|
|
60
60
|
}
|
|
61
61
|
return o === -1 ? [] : n.slice(0, o).reverse().flatMap((e) => {
|
|
62
|
-
let t =
|
|
62
|
+
let t = P(e);
|
|
63
63
|
return t ? [{
|
|
64
64
|
dir: e,
|
|
65
65
|
ig: t
|
|
66
66
|
}] : [];
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function P(e) {
|
|
70
70
|
let r = a(e, ".gitignore");
|
|
71
71
|
try {
|
|
72
72
|
return t(r) ? l().add(n(r, "utf-8")) : null;
|
|
@@ -74,10 +74,10 @@ function M(e) {
|
|
|
74
74
|
return null;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function F(e, t, n) {
|
|
78
78
|
let r = !1;
|
|
79
79
|
for (let { dir: i, ig: a } of e) {
|
|
80
|
-
let e =
|
|
80
|
+
let e = j(o(i, t));
|
|
81
81
|
if (!e || e.startsWith("..")) continue;
|
|
82
82
|
n && (e += "/");
|
|
83
83
|
let s = a.test(e);
|
|
@@ -85,7 +85,7 @@ function N(e, t, n) {
|
|
|
85
85
|
}
|
|
86
86
|
return r;
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function I(e, t, n) {
|
|
89
89
|
let r = n.needles.map((e) => Buffer.from(e, "latin1")), i = new RegExp(n.regexSource, "g"), a = t.hash ? (e) => t.hash("sha1", e, "hex") : (e) => t.createHash("sha1").update(e).digest("hex"), o = (t, r) => {
|
|
90
90
|
let i = Math.min(r, n.probeBytes), a = Buffer.allocUnsafe(i), o = e.readSync(t, a, 0, i, 0);
|
|
91
91
|
if (a.subarray(0, o).indexOf(0) !== -1) return null;
|
|
@@ -169,23 +169,23 @@ function P(e, t, n) {
|
|
|
169
169
|
}
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
|
-
var
|
|
172
|
+
var L = `
|
|
173
173
|
const { parentPort, workerData } = require('node:worker_threads');
|
|
174
|
-
const scan = (${
|
|
174
|
+
const scan = (${I.toString()})(require('node:fs'), require('node:crypto'), workerData);
|
|
175
175
|
parentPort.on('message', (jobs) => parentPort.postMessage(jobs.map(scan)));
|
|
176
176
|
`;
|
|
177
|
-
function
|
|
177
|
+
function R(e) {
|
|
178
178
|
return Math.max(2, Math.min(4, e - 1));
|
|
179
179
|
}
|
|
180
|
-
function
|
|
181
|
-
return Array.from({ length: e }, () => new
|
|
180
|
+
function z(e, t) {
|
|
181
|
+
return Array.from({ length: e }, () => new v(L, {
|
|
182
182
|
eval: !0,
|
|
183
183
|
workerData: t
|
|
184
184
|
}));
|
|
185
185
|
}
|
|
186
|
-
async function
|
|
186
|
+
async function B(e, t) {
|
|
187
187
|
let n = [], r = [];
|
|
188
|
-
for (let t = 0; t < e.length; t +=
|
|
188
|
+
for (let t = 0; t < e.length; t += w) r.push(e.slice(t, t + w));
|
|
189
189
|
let i = 0;
|
|
190
190
|
try {
|
|
191
191
|
await Promise.all(t.map((e) => new Promise((t, a) => {
|
|
@@ -205,7 +205,7 @@ async function R(e, t) {
|
|
|
205
205
|
}
|
|
206
206
|
return n;
|
|
207
207
|
}
|
|
208
|
-
async function
|
|
208
|
+
async function V(e, t, n) {
|
|
209
209
|
let r = Array(e.length), i = 0;
|
|
210
210
|
return await Promise.all(Array.from({ length: Math.min(t, e.length) }, async () => {
|
|
211
211
|
for (;;) {
|
|
@@ -215,23 +215,23 @@ async function z(e, t, n) {
|
|
|
215
215
|
}
|
|
216
216
|
})), r;
|
|
217
217
|
}
|
|
218
|
-
var
|
|
218
|
+
var H = class {
|
|
219
219
|
constructor(t) {
|
|
220
220
|
this.resolveMemo = /* @__PURE__ */ new Map(), this.gitignoreMemo = /* @__PURE__ */ new Map(), this.entries = /* @__PURE__ */ new Map(), this.cold = !0, this.dirty = !1, this.lastWorkers = 0, this.cfg = t, this.fileOptions = t.prefixes.length ? {
|
|
221
221
|
needles: t.prefixes.map((e) => `${e}:`),
|
|
222
|
-
regexSource:
|
|
222
|
+
regexSource: E(t.prefixes).source,
|
|
223
223
|
maxFileSize: t.scanner.maxFileSize ?? 268435456,
|
|
224
|
-
probeBytes:
|
|
225
|
-
} : null, this.scanOne = this.fileOptions ?
|
|
224
|
+
probeBytes: x
|
|
225
|
+
} : null, this.scanOne = this.fileOptions ? I(e, u, this.fileOptions) : null, this.workerThreshold = t.workerThreshold ?? 1500;
|
|
226
226
|
let n = t.scanner.exclude ?? [];
|
|
227
227
|
this.excludes = n.length ? l().add(n) : null, this.bases = [{
|
|
228
228
|
dir: t.root,
|
|
229
229
|
match: null,
|
|
230
|
-
ancestors:
|
|
230
|
+
ancestors: N(t.root)
|
|
231
231
|
}, ...(t.scanner.include ?? []).map((e) => this.includeBase(e))];
|
|
232
232
|
}
|
|
233
233
|
get includeDirs() {
|
|
234
|
-
return this.bases.slice(1).map((e) => e.dir).filter((e) => !
|
|
234
|
+
return this.bases.slice(1).map((e) => e.dir).filter((e) => !M(this.cfg.root, e));
|
|
235
235
|
}
|
|
236
236
|
get icons() {
|
|
237
237
|
let e = /* @__PURE__ */ new Set();
|
|
@@ -239,7 +239,7 @@ var B = class {
|
|
|
239
239
|
return e;
|
|
240
240
|
}
|
|
241
241
|
includeBase(e) {
|
|
242
|
-
let t =
|
|
242
|
+
let t = j(e).split("/"), n = t.findIndex((e) => k(e));
|
|
243
243
|
if (n === -1) return {
|
|
244
244
|
dir: s(this.cfg.root, e),
|
|
245
245
|
match: null,
|
|
@@ -248,36 +248,36 @@ var B = class {
|
|
|
248
248
|
let r = t.slice(0, n).join("/"), i = t.slice(n).join("/");
|
|
249
249
|
return {
|
|
250
250
|
dir: s(this.cfg.root, r || "."),
|
|
251
|
-
match:
|
|
251
|
+
match: A(i),
|
|
252
252
|
ancestors: []
|
|
253
253
|
};
|
|
254
254
|
}
|
|
255
255
|
gitignoreFor(e) {
|
|
256
256
|
let t = this.gitignoreMemo.get(e);
|
|
257
|
-
return t === void 0 && (t =
|
|
257
|
+
return t === void 0 && (t = P(e), this.gitignoreMemo.set(e, t)), t;
|
|
258
258
|
}
|
|
259
259
|
resetGitignores() {
|
|
260
|
-
this.gitignoreMemo.clear(), this.bases[0].ancestors =
|
|
260
|
+
this.gitignoreMemo.clear(), this.bases[0].ancestors = N(this.cfg.root);
|
|
261
261
|
}
|
|
262
262
|
isGitignored(e, t, n) {
|
|
263
|
-
return
|
|
263
|
+
return F(e, t, n);
|
|
264
264
|
}
|
|
265
265
|
isExcluded(e, t, n) {
|
|
266
266
|
if (!this.excludes) return !1;
|
|
267
|
-
let r =
|
|
267
|
+
let r = M(this.cfg.root, t) ? this.cfg.root : e.dir, i = j(o(r, t));
|
|
268
268
|
return !i || i.startsWith("..") ? !1 : (n && (i += "/"), this.excludes.ignores(i));
|
|
269
269
|
}
|
|
270
270
|
admits(e, t, n, r, i) {
|
|
271
|
-
if (n.startsWith(".") || r && (
|
|
271
|
+
if (n.startsWith(".") || r && (y.has(n) || t === this.cfg.outDir) || this.isGitignored(i, t, r) || this.isExcluded(e, t, r)) return !1;
|
|
272
272
|
if (!r && e.match) {
|
|
273
|
-
let n =
|
|
273
|
+
let n = j(o(e.dir, t));
|
|
274
274
|
if (!e.match.test(n)) return !1;
|
|
275
275
|
}
|
|
276
276
|
return !0;
|
|
277
277
|
}
|
|
278
278
|
isCandidate(e) {
|
|
279
279
|
e = s(e);
|
|
280
|
-
let t = this.bases.find((t) =>
|
|
280
|
+
let t = this.bases.find((t) => M(t.dir, e));
|
|
281
281
|
if (!t) return !1;
|
|
282
282
|
if (e === t.dir) return t.match === null;
|
|
283
283
|
let n = [...t.ancestors], r = this.gitignoreFor(t.dir);
|
|
@@ -285,7 +285,7 @@ var B = class {
|
|
|
285
285
|
dir: t.dir,
|
|
286
286
|
ig: r
|
|
287
287
|
});
|
|
288
|
-
let i =
|
|
288
|
+
let i = j(o(t.dir, e)).split("/"), c = t.dir;
|
|
289
289
|
for (let e = 0; e < i.length; e++) {
|
|
290
290
|
let r = i[e], o = a(c, r), s = e < i.length - 1;
|
|
291
291
|
if (!this.admits(t, o, r, s, n)) return !1;
|
|
@@ -322,7 +322,7 @@ var B = class {
|
|
|
322
322
|
for (let t of this.bases) {
|
|
323
323
|
let n;
|
|
324
324
|
try {
|
|
325
|
-
n = await
|
|
325
|
+
n = await h(t.dir);
|
|
326
326
|
} catch {
|
|
327
327
|
continue;
|
|
328
328
|
}
|
|
@@ -373,7 +373,7 @@ var B = class {
|
|
|
373
373
|
}
|
|
374
374
|
async statOnly(e) {
|
|
375
375
|
try {
|
|
376
|
-
let t = await
|
|
376
|
+
let t = await h(e);
|
|
377
377
|
return t.isFile() ? {
|
|
378
378
|
size: t.size,
|
|
379
379
|
mtime: t.mtimeMs,
|
|
@@ -403,32 +403,32 @@ var B = class {
|
|
|
403
403
|
prev: t.get(e) ?? null
|
|
404
404
|
}));
|
|
405
405
|
if (n && this.useWorkers(r.length)) try {
|
|
406
|
-
let e = await
|
|
406
|
+
let e = await B(r, n);
|
|
407
407
|
return this.lastWorkers = n.length, e;
|
|
408
408
|
} catch {}
|
|
409
409
|
else n && Promise.all(n.map((e) => e.terminate()));
|
|
410
410
|
this.lastWorkers = 0;
|
|
411
411
|
let i = [];
|
|
412
|
-
for (let e = 0; e < r.length; e +=
|
|
413
|
-
for (let t of r.slice(e, e +
|
|
414
|
-
e +
|
|
412
|
+
for (let e = 0; e < r.length; e += w) {
|
|
413
|
+
for (let t of r.slice(e, e + w)) i.push(this.scanOne(t));
|
|
414
|
+
e + w < r.length && await new Promise((e) => setImmediate(e));
|
|
415
415
|
}
|
|
416
416
|
return i;
|
|
417
417
|
}
|
|
418
418
|
loadCache() {
|
|
419
419
|
try {
|
|
420
420
|
let e = JSON.parse(n(this.cfg.cacheFile, "utf-8"));
|
|
421
|
-
if (e.version === 4 && e.key === this.cfg.cacheKey && e.entries && typeof e.entries == "object") return this.cold = !1, new Map(Object.entries(e.entries));
|
|
421
|
+
if (e.version === 4 && e.key === this.cfg.cacheKey && e.entries && typeof e.entries == "object") return this.cold = !1, new Map(Object.entries(e.entries).filter(([, e]) => U(e)));
|
|
422
422
|
} catch {}
|
|
423
423
|
return this.cold = !0, /* @__PURE__ */ new Map();
|
|
424
424
|
}
|
|
425
425
|
async scan() {
|
|
426
|
-
let e = performance.now(), t = this.loadCache(), n = this.cold ? 2 ** 53 - 1 : t.size, r = this.fileOptions && this.useWorkers(n) ?
|
|
426
|
+
let e = performance.now(), t = this.loadCache(), n = this.cold ? 2 ** 53 - 1 : t.size, r = this.fileOptions && this.useWorkers(n) ? z(R(_()), this.fileOptions) : null, i = await this.collectFiles(), a = /* @__PURE__ */ new Map(), o = 0, s = 0, c = 0;
|
|
427
427
|
if (this.scanOne) for (let e of await this.scanAll(i, t, r)) {
|
|
428
428
|
let n = this.fold(e, t.get(e.path));
|
|
429
429
|
n.read && o++, n.extracted && s++, n.entry ? a.set(e.path, n.entry) : c++;
|
|
430
430
|
}
|
|
431
|
-
else await
|
|
431
|
+
else await V(i, S, async (e) => {
|
|
432
432
|
let t = await this.statOnly(e);
|
|
433
433
|
t ? a.set(e, t) : c++;
|
|
434
434
|
});
|
|
@@ -445,12 +445,12 @@ var B = class {
|
|
|
445
445
|
async updateFile(e) {
|
|
446
446
|
if (e = s(e), !this.isCandidate(e)) return this.removeFile(e);
|
|
447
447
|
let t = this.icons, n = await this.scanFile(e, this.entries.get(e));
|
|
448
|
-
return n.entry ? this.entries.set(e, n.entry) : this.entries.delete(e), this.dirty = !0, !
|
|
448
|
+
return n.entry ? this.entries.set(e, n.entry) : this.entries.delete(e), this.dirty = !0, !W(t, this.icons);
|
|
449
449
|
}
|
|
450
450
|
removeFile(e) {
|
|
451
451
|
if (e = s(e), !this.entries.has(e)) return !1;
|
|
452
452
|
let t = this.icons;
|
|
453
|
-
return this.entries.delete(e), this.dirty = !0, !
|
|
453
|
+
return this.entries.delete(e), this.dirty = !0, !W(t, this.icons);
|
|
454
454
|
}
|
|
455
455
|
async persist() {
|
|
456
456
|
if (!this.dirty) return;
|
|
@@ -459,18 +459,25 @@ var B = class {
|
|
|
459
459
|
version: 4,
|
|
460
460
|
key: this.cfg.cacheKey,
|
|
461
461
|
entries: Object.fromEntries(this.entries)
|
|
462
|
-
}
|
|
462
|
+
}, t = `${this.cfg.cacheFile}.${process.pid}-${u.randomUUID()}.tmp`;
|
|
463
463
|
try {
|
|
464
|
-
await d(r(this.cfg.cacheFile), { recursive: !0 }), await
|
|
465
|
-
} catch {
|
|
464
|
+
await d(r(this.cfg.cacheFile), { recursive: !0 }), await g(t, JSON.stringify(e), "utf-8"), await p(t, this.cfg.cacheFile);
|
|
465
|
+
} catch {
|
|
466
|
+
await m(t, { force: !0 }).catch(() => {});
|
|
467
|
+
}
|
|
466
468
|
}
|
|
467
469
|
};
|
|
468
|
-
function
|
|
470
|
+
function U(e) {
|
|
471
|
+
if (!e || typeof e != "object") return !1;
|
|
472
|
+
let t = e;
|
|
473
|
+
return typeof t.size == "number" && typeof t.mtime == "number" && typeof t.hash == "string" && Array.isArray(t.icons) && t.icons.every((e) => typeof e == "string");
|
|
474
|
+
}
|
|
475
|
+
function W(e, t) {
|
|
469
476
|
if (e.size !== t.size) return !1;
|
|
470
477
|
for (let n of e) if (!t.has(n)) return !1;
|
|
471
478
|
return !0;
|
|
472
479
|
}
|
|
473
|
-
function
|
|
480
|
+
function G(e) {
|
|
474
481
|
let n = s(e);
|
|
475
482
|
for (;;) {
|
|
476
483
|
if (t(a(n, "node_modules"))) return a(n, "node_modules", ".cache", "bitboss-ui", "icon-scan.json");
|
|
@@ -480,4 +487,4 @@ function H(e) {
|
|
|
480
487
|
}
|
|
481
488
|
return a(e, "node_modules", ".cache", "bitboss-ui", "icon-scan.json");
|
|
482
489
|
}
|
|
483
|
-
export {
|
|
490
|
+
export { y as ALWAYS_SKIPPED_DIRS, b as DEFAULT_MAX_FILE_SIZE, C as DEFAULT_WORKER_THRESHOLD, H as IconScanner, N as ancestorGitignores, I as createFileScanner, D as extractIconCandidates, A as globToRegExp, k as hasGlobMagic, E as iconLiteralRegExp, G as iconScanCacheFile, F as isGitignored, P as readGitignore, R as workerCountFor };
|
package/dist/index.d.ts
CHANGED
|
@@ -184,14 +184,14 @@ export type { BbColorPaletteProps, BbColorPaletteEvents, BbColorPaletteSlots, }
|
|
|
184
184
|
export type { BbCheckboxProps, BbCheckboxEvents, } from './components/BbCheckbox/BbCheckbox.vue.js';
|
|
185
185
|
export type { BbCollapsibleProps, BbCollapsibleSlots, } from './components/BbCollapsible/types.js';
|
|
186
186
|
export type { BbCalendarProps, BbCalendarEvents, BbDateValue, BbCalendarSlots, BbCalendarSegment, } from './components/BbCalendar/types.js';
|
|
187
|
-
export type { BbCarouselImage, BbCarouselProps, BbCarouselEvents, BbCarouselSlots,
|
|
187
|
+
export type { BbCarouselImage, BbCarouselProps, BbCarouselEvents, BbCarouselSlots, } from './components/BbCarousel/types.js';
|
|
188
188
|
export type { BbDatePickerProps, BbDatePickerEvents, BbDatePickerSlots, BbDatePickerSegment, } from './components/BbDatePicker/types.js';
|
|
189
189
|
export type { BbDatePickerInputProps, BbDatePickerInputEvents, DatePickerInputError, BbDatePickerInputSlots, } from './components/BbDatePickerInput/types.js';
|
|
190
190
|
export type { BbTimePickerInputProps, BbTimePickerInputEvents, BbTimePickerInputSlots, TimePickerInputError, } from './components/BbTimePickerInput/types.js';
|
|
191
191
|
export type { BbTimePickerProps, BbTimePickerEvents, BbTimeValue, BbTimePickerSlots, BbTimePickerSegment, } from './components/BbTimePicker/types.js';
|
|
192
192
|
export type { Sizes as BbDialogSizes } from './components/BbDialog/types.js';
|
|
193
193
|
export type { BbDropdownButtonEvents, BbDropdownButtonProps, BbDropdownButtonSlots, } from './components/BbDropdownButton/types.js';
|
|
194
|
-
export type { BbDropdownGroupModel, BbDropdownGroupProps, BbDropdownProps, BbDropdownEvents, DropdownGroupItemsGetter, Item as BbDropdownItem, BbDropdownItemProps,
|
|
194
|
+
export type { BbDropdownGroupModel, BbDropdownGroupProps, BbDropdownProps, BbDropdownEvents, DropdownGroupItemsGetter, Item as BbDropdownItem, BbDropdownItemProps, BbDropdownSlotGroup, BbDropdownSlots, } from './components/BbDropdown/types.js';
|
|
195
195
|
export type { BbDropzoneProps, DropZoneError, BbDropzoneEvents, BbDropzoneValue, BbDropzoneSlots, } from './components/BbDropzone/types.js';
|
|
196
196
|
export type { BbIconProps, BbIconSize } from './components/BbIcon/types.js';
|
|
197
197
|
export type { BbNumberInputProps, BbNumberInputEvents, BbNumberSimpleUnit, BbNumberUnit, BbNumberInputSlots, } from './components/BbNumberInput/types.js';
|