bitboss-ui 3.0.0-beta.69 → 3.0.0-beta.71
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 +20 -11
- package/bin/bitboss-ui-mcp.mjs +7 -4
- package/bin/bitboss-ui.mjs +0 -0
- package/bin/cli.mjs +47 -28
- package/dist/ai/BbBaseButton.md +4 -4
- package/dist/ai/BbBreadcrumbs.md +3 -0
- package/dist/ai/BbCarousel.md +32 -29
- package/dist/ai/BbCheckbox.md +5 -6
- package/dist/ai/BbCheckboxGroup.md +28 -26
- package/dist/ai/BbColorInput.md +9 -14
- package/dist/ai/BbDatePickerInput.md +3 -4
- package/dist/ai/BbDropdown.md +35 -1
- package/dist/ai/BbDropdownButton.md +4 -3
- package/dist/ai/BbDropzone.md +3 -3
- package/dist/ai/BbGallery.md +2034 -0
- package/dist/ai/BbNumberInput.md +3 -4
- package/dist/ai/BbPopover.md +12 -6
- package/dist/ai/BbRadio.md +5 -6
- package/dist/ai/BbRadioGroup.md +28 -31
- package/dist/ai/BbRating.md +6 -16
- package/dist/ai/BbSelect.md +10 -11
- package/dist/ai/BbSlider.md +3 -9
- package/dist/ai/BbSwitch.md +6 -6
- package/dist/ai/BbSwitchGroup.md +4 -7
- package/dist/ai/BbTag.md +3 -4
- package/dist/ai/BbTextInput.md +19 -19
- package/dist/ai/BbTextarea.md +8 -8
- package/dist/ai/BbTimePickerInput.md +3 -4
- package/dist/ai/BbTooltip.md +17 -13
- package/dist/ai/CommonField.md +2 -10
- package/dist/ai/OptionsContainer.md +7 -12
- package/dist/ai/changelog.json +119 -4
- package/dist/ai/components.json +37 -32
- package/dist/ai/guides/ai-router.md +3 -2
- package/dist/ai/guides/component-picker.md +1 -0
- package/dist/ai/guides/eslint-rules.md +3 -3
- package/dist/ai/guides/installation-and-plugin-setup.md +5 -5
- package/dist/ai/guides/migration/v2-to-v3.md +53 -1
- package/dist/ai/guides/migration/v3-beta-tooling.md +25 -15
- package/dist/ai/guides/passthrough.md +2 -1
- package/dist/ai/guides/preset-components.md +53 -19
- package/dist/ai/helpers/definePreset.json +8 -1
- package/dist/ai/helpers/definePreset.ts +42 -13
- package/dist/ai/helpers/inertia/manifest.json +1 -1
- package/dist/ai/index.md +2 -1
- package/dist/ai/manifest/common.json +2 -2
- package/dist/ai/manifest/components/BbBreadcrumbs.json +1 -1
- package/dist/ai/manifest/components/BbCarousel.json +3 -2
- package/dist/ai/manifest/components/BbCarousel.tree.json +7 -0
- package/dist/ai/manifest/components/BbCheckbox.json +2 -2
- package/dist/ai/manifest/components/BbCheckbox.tree.json +1 -1
- package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +10 -18
- package/dist/ai/manifest/components/BbColorInput.json +2 -2
- package/dist/ai/manifest/components/BbColorInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbConfigScope.json +1 -1
- package/dist/ai/manifest/components/BbDatePickerInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbDropdown.json +2 -2
- package/dist/ai/manifest/components/BbDropdownButton.json +2 -2
- package/dist/ai/manifest/components/BbGallery.json +54 -0
- package/dist/ai/manifest/components/BbGallery.tree.json +139 -0
- package/dist/ai/manifest/components/BbNumberInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbRadio.tree.json +1 -1
- package/dist/ai/manifest/components/BbRadioGroup.tree.json +9 -17
- package/dist/ai/manifest/components/BbRating.removed.json +1 -1
- package/dist/ai/manifest/components/BbRating.tree.json +1 -1
- package/dist/ai/manifest/components/BbSelect.json +15 -15
- package/dist/ai/manifest/components/BbSelect.tree.json +1 -1
- package/dist/ai/manifest/components/BbSlider.json +1 -1
- package/dist/ai/manifest/components/BbSlider.tree.json +1 -1
- package/dist/ai/manifest/components/BbSwitch.tree.json +1 -1
- package/dist/ai/manifest/components/BbSwitchGroup.tree.json +2 -2
- package/dist/ai/manifest/components/BbTabs.removed.json +4 -4
- package/dist/ai/manifest/components/BbTabsList.removed.json +4 -4
- package/dist/ai/manifest/components/BbTag.tree.json +1 -1
- package/dist/ai/manifest/components/BbTextInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbTextarea.tree.json +1 -1
- package/dist/ai/manifest/components/BbTimePickerInput.tree.json +1 -1
- package/dist/ai/manifest/components/BbTooltip.json +1 -1
- package/dist/ai/manifest/components/BbTooltip.tree.json +2 -2
- package/dist/ai/manifest/components/CommonField.tree.json +5 -10
- package/dist/ai/manifest/components/OptionsContainer.tree.json +7 -12
- package/dist/ai/manifest/index.json +4 -3
- package/dist/ai/manifest/meta.json +5 -1
- package/dist/ai/manifest/types.advanced.json +4 -2
- package/dist/ai/manifest/types.api.json +3 -3
- package/dist/ai/manifest/types.wrapper.json +1 -0
- package/dist/ai/recipes/inertia/onboarding.md +5 -8
- package/dist/ai/recipes/inertia/record-form.md +33 -12
- package/dist/ai/recipes/nuxt/onboarding.md +5 -8
- package/dist/ai/recipes/nuxt/record-form.md +27 -11
- package/dist/ai/recipes/vue/onboarding.md +5 -8
- package/dist/ai/recipes/vue/record-form.md +25 -11
- package/dist/ai/source/BbBreadcrumbs.md +31 -12
- package/dist/ai/source/BbCalendar.md +2 -0
- package/dist/ai/source/BbCarousel.md +135 -32
- package/dist/ai/source/BbCheckbox.md +36 -42
- package/dist/ai/source/BbCheckboxGroup.md +2 -4
- package/dist/ai/source/BbColorInput.md +2 -4
- package/dist/ai/source/BbDatePickerInput.md +2 -4
- package/dist/ai/source/BbDropdown.md +13 -2
- package/dist/ai/source/BbDropdownButton.md +4 -1
- package/dist/ai/source/BbDropdownGroup.md +11 -2
- package/dist/ai/source/BbGallery.md +2027 -0
- package/dist/ai/source/BbNumberInput.md +2 -4
- package/dist/ai/source/BbRadio.md +36 -42
- package/dist/ai/source/BbRadioGroup.md +4 -6
- package/dist/ai/source/BbRating.md +2 -14
- package/dist/ai/source/BbSelect.md +30 -13
- package/dist/ai/source/BbSelectPopover.md +1 -0
- package/dist/ai/source/BbSlider.md +2 -4
- package/dist/ai/source/BbSwitch.md +34 -38
- package/dist/ai/source/BbSwitchGroup.md +1 -0
- package/dist/ai/source/BbTable.md +15 -8
- package/dist/ai/source/BbTag.md +2 -4
- package/dist/ai/source/BbTextInput.md +2 -4
- package/dist/ai/source/BbTextarea.md +2 -4
- package/dist/ai/source/BbTimePickerInput.md +2 -4
- package/dist/ai/source/BbTooltip.md +9 -3
- package/dist/ai/source/BbTree.md +7 -3
- package/dist/ai/source/CommonField.md +17 -106
- package/dist/ai/source/CommonPopover.md +13 -3
- package/dist/ai/source/FlatListBox.md +3 -3
- package/dist/ai/source/GroupedListBox.md +3 -3
- package/dist/ai/source/GuidesComponent.md +3 -0
- package/dist/ai/source/ListBox.md +4 -4
- package/dist/ai/source/OptionsContainer.md +4 -4
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +106 -106
- package/dist/components/BbBreadcrumbs/types.d.ts +6 -0
- package/dist/components/BbCalendar/useDayjsLocale.js +5 -3
- package/dist/components/BbCarousel/BbCarousel.vue.d.ts +1 -1
- package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +506 -481
- package/dist/components/BbCarousel/dragRelease.js +14 -0
- package/dist/components/BbCarousel/ptKeys.generated.d.ts +4 -0
- package/dist/components/BbCarousel/types.d.ts +11 -6
- package/dist/components/BbCarousel/types.js +1 -0
- package/dist/components/BbCheckbox/types.d.ts +2 -4
- package/dist/components/BbCheckboxGroup/types.d.ts +2 -4
- package/dist/components/BbColorInput/types.d.ts +2 -4
- package/dist/components/BbDatePickerInput/types.d.ts +2 -4
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +2 -0
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +121 -120
- package/dist/components/BbDropdown/normalizeGroups.js +37 -33
- package/dist/components/BbDropdown/types.d.ts +9 -2
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +95 -94
- package/dist/components/BbGallery/BbGallery.vue.d.ts +50 -0
- package/dist/components/BbGallery/BbGallery.vue.js +5 -0
- package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +587 -0
- package/dist/components/BbGallery/findItem.js +41 -0
- package/dist/components/BbGallery/ptKeys.generated.d.ts +112 -0
- package/dist/components/BbGallery/types.d.ts +177 -0
- package/dist/components/BbGallery/types.js +29 -0
- package/dist/components/BbNumberInput/types.d.ts +2 -4
- package/dist/components/BbOffCanvas/sheetSnap.d.ts +2 -0
- package/dist/components/BbOffCanvas/sheetSnap.js +5 -5
- package/dist/components/BbRadio/types.d.ts +2 -4
- package/dist/components/BbRadioGroup/types.d.ts +4 -6
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +116 -118
- package/dist/components/BbRating/types.d.ts +2 -4
- package/dist/components/BbSelect/BbSelect.vue.d.ts +10 -4
- package/dist/components/BbSelect/types.d.ts +4 -6
- package/dist/components/BbSlider/types.d.ts +2 -4
- package/dist/components/BbTable/types.d.ts +8 -8
- package/dist/components/BbTag/types.d.ts +2 -4
- package/dist/components/BbTextInput/types.d.ts +2 -4
- package/dist/components/BbTextarea/types.d.ts +2 -4
- package/dist/components/BbTimePickerInput/types.d.ts +2 -4
- package/dist/components/BbTooltip/ptKeys.generated.d.ts +4 -4
- package/dist/components/BbTooltip/types.d.ts +3 -1
- package/dist/components/BbTree/types.d.ts +3 -3
- package/dist/components/CommonField/types.d.ts +2 -4
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +28 -26
- package/dist/composables/overlayRegistry.d.ts +17 -0
- package/dist/composables/overlayRegistry.js +16 -9
- package/dist/composables/useChoiceIndicator.js +66 -63
- package/dist/deprecation/ai-deprecations.json.js +1 -1
- package/dist/directives/bbDropdown.js +1 -1
- package/dist/directives/bbGallery.d.ts +64 -0
- package/dist/directives/bbGallery.js +38 -0
- package/dist/i18n/locales/ar.json +3 -1
- package/dist/i18n/locales/cs.json +3 -1
- package/dist/i18n/locales/da.json +3 -1
- package/dist/i18n/locales/de-CH.json +3 -1
- package/dist/i18n/locales/de.json +3 -1
- package/dist/i18n/locales/el.json +3 -1
- package/dist/i18n/locales/en-GB.json +3 -1
- package/dist/i18n/locales/en.json +3 -1
- package/dist/i18n/locales/es-MX.json +3 -1
- package/dist/i18n/locales/es.json +3 -1
- package/dist/i18n/locales/fa.json +3 -1
- package/dist/i18n/locales/fi.json +3 -1
- package/dist/i18n/locales/fr.json +3 -1
- package/dist/i18n/locales/he.json +3 -1
- package/dist/i18n/locales/hu.json +3 -1
- package/dist/i18n/locales/it.json +3 -1
- package/dist/i18n/locales/ja.json +3 -1
- package/dist/i18n/locales/ko.json +3 -1
- package/dist/i18n/locales/nb.json +3 -1
- package/dist/i18n/locales/nl.json +3 -1
- package/dist/i18n/locales/pl.json +3 -1
- package/dist/i18n/locales/pt-BR.json +3 -1
- package/dist/i18n/locales/pt-PT.json +3 -1
- package/dist/i18n/locales/ro.json +3 -1
- package/dist/i18n/locales/ru.json +3 -1
- package/dist/i18n/locales/sv.json +3 -1
- package/dist/i18n/locales/tr.json +3 -1
- package/dist/i18n/locales/uk.json +3 -1
- package/dist/i18n/locales/zh-CN.json +3 -1
- package/dist/i18n/locales/zh-HK.json +3 -1
- package/dist/i18n/locales/zh-TW.json +3 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +38 -36
- package/dist/llms-full.txt +2534 -346
- package/dist/llms-medium.txt +10 -7
- package/dist/llms.txt +1 -1
- package/dist/locale-blueprint.json +3 -1
- package/dist/nuxt-auto-imports.js +1 -1
- package/dist/plugin.js +18 -17
- package/dist/project-dts.js +17 -16
- package/dist/runtime/nuxt-plugin.js +22 -21
- package/dist/scripts/lib/atomic-write.js +42 -0
- package/dist/styles.css +2 -2
- package/dist/types/FieldLayout.d.ts +4 -1
- package/dist/types/ItemAccessor.d.ts +3 -1
- package/dist/types/ItemPath.d.ts +33 -0
- package/dist/types/passthrough.d.ts +2 -2
- package/dist/types/ptComponentMap.d.ts +2 -1
- package/dist/utilities/calendar/canonicalParts.js +10 -2
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite.js +361 -331
- package/llms.txt +2 -2
- package/package.json +7 -4
- package/scripts/README.md +31 -29
- package/scripts/lib/agent-refresh.mjs +15 -9
- package/scripts/lib/agent-setup.mjs +46 -15
- package/scripts/lib/atomic-write.d.mts +6 -0
- package/scripts/lib/atomic-write.mjs +85 -0
- package/scripts/lib/define-preset-copy.mjs +24 -4
- package/scripts/lib/eslint-plugin.mjs +74 -36
- package/scripts/lib/hand-imported-styles.mjs +44 -99
- package/scripts/lib/helpers-add.mjs +3 -1
- package/scripts/lib/linked-target.mjs +1 -1
- package/scripts/lib/locale-check.mjs +41 -25
- package/scripts/lib/mcp-config.mjs +250 -133
- package/scripts/lib/mcp-sdk.mjs +24 -0
- package/scripts/lib/plugin-options-check.mjs +22 -15
- package/scripts/lib/pnp.mjs +1 -1
- package/scripts/lib/project-variant-dts.mjs +80 -136
- package/scripts/lib/release-results.mjs +331 -0
- package/scripts/lib/setup.mjs +61 -3
- package/scripts/lib/toolchain-check.mjs +134 -14
- package/scripts/lib/tooling-options.mjs +357 -38
- package/scripts/lib/validate-bb-markup.mjs +1 -1
- package/dist/components/BbBadge/BadgeBodyContent.vue.d.ts +0 -15
- package/dist/components/BbBadge/badgeButtonContext.d.ts +0 -55
- package/dist/components/BbBaseButton/RouterComponent.vue.d.ts +0 -18
- package/dist/components/BbBaseButton/useLinkState.d.ts +0 -43
- package/dist/components/BbBreadcrumbs/estimateBreadcrumbItemWidth.d.ts +0 -18
- package/dist/components/BbButton/toggleRoving.d.ts +0 -6
- package/dist/components/BbCalendar/CalendarMonthPanel.vue.d.ts +0 -5
- package/dist/components/BbCalendar/CalendarYearPanel.vue.d.ts +0 -5
- package/dist/components/BbCalendar/calendarHost.d.ts +0 -29
- package/dist/components/BbCalendar/calendarMath.d.ts +0 -102
- package/dist/components/BbCalendar/useCalendarContext.d.ts +0 -116
- package/dist/components/BbCalendar/useCalendarGrid.d.ts +0 -411
- package/dist/components/BbCalendar/useDayGrid.d.ts +0 -122
- package/dist/components/BbCalendar/useDayjsLocale.d.ts +0 -93
- package/dist/components/BbCalendar/useToday.d.ts +0 -25
- package/dist/components/BbConfirm/BbConfirm.vue.d.ts +0 -4
- package/dist/components/BbConfirm/BbConfirmHost.d.ts +0 -10
- package/dist/components/BbConfirm/confirmEntry.d.ts +0 -4
- package/dist/components/BbDatePickerInput/calendarFields.d.ts +0 -91
- package/dist/components/BbDatePickerInput/dateFieldLayout.d.ts +0 -29
- package/dist/components/BbDialog/useDialogStack.d.ts +0 -19
- package/dist/components/BbDropdown/AdaptiveDropdown.vue.d.ts +0 -26
- package/dist/components/BbDropdown/BbDropdownList.vue.d.ts +0 -38
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue.d.ts +0 -16
- package/dist/components/BbDropdown/DropdownRow.vue.d.ts +0 -41
- package/dist/components/BbDropdown/normalizeGroups.d.ts +0 -39
- package/dist/components/BbDropdown/pointerTrail.d.ts +0 -5
- package/dist/components/BbDropdown/useDropdownContext.d.ts +0 -131
- package/dist/components/BbDropdown/useDropdownGroupRegistry.d.ts +0 -170
- package/dist/components/BbForm/BbFormCustomField.d.ts +0 -14
- package/dist/components/BbForm/bindFormField.d.ts +0 -56
- package/dist/components/BbForm/formFields.d.ts +0 -77
- package/dist/components/BbHost/BbHostOpening.d.ts +0 -27
- package/dist/components/BbHoverCard/hoverCardFocus.d.ts +0 -29
- package/dist/components/BbIcon/iconCache.d.ts +0 -63
- package/dist/components/BbNumberInput/numberDisplay.d.ts +0 -255
- package/dist/components/BbNumberInput/platform.d.ts +0 -7
- package/dist/components/BbOffCanvas/hostCloseLabel.d.ts +0 -3
- package/dist/components/BbOffCanvas/sheetAttrs.d.ts +0 -9
- package/dist/components/BbOffCanvas/useOffCanvasStack.d.ts +0 -37
- package/dist/components/BbPagination/paginationFit.d.ts +0 -38
- package/dist/components/BbSelectPopover/knownItems.d.ts +0 -65
- package/dist/components/BbSelectPopover/reclickClears.d.ts +0 -17
- package/dist/components/BbSelectPopover/sheetChipAttrs.d.ts +0 -18
- package/dist/components/BbTable/BbTableDataRow.d.ts +0 -204
- package/dist/components/BbTable/BbTableEdgeRow.d.ts +0 -112
- package/dist/components/BbTable/BbTableExpandRow.d.ts +0 -84
- package/dist/components/BbTable/BbTableSelectToggle.d.ts +0 -128
- package/dist/components/BbTable/estimatedFloors.golden.d.ts +0 -25
- package/dist/components/BbTable/gridWidgets.d.ts +0 -30
- package/dist/components/BbTable/measuredFloors.d.ts +0 -46
- package/dist/components/BbTable/measuredFloorsTestKit.d.ts +0 -27
- package/dist/components/BbTable/textRuler.d.ts +0 -73
- package/dist/components/BbTable/useRowReorder.d.ts +0 -60
- package/dist/components/BbTable/utils.d.ts +0 -375
- package/dist/components/BbTabs/tablistName.d.ts +0 -4
- package/dist/components/BbToast/BbToast.vue.d.ts +0 -5
- package/dist/components/BbToast/BbToastMessage.vue.d.ts +0 -22
- package/dist/components/BbToast/BbToastRegion.vue.d.ts +0 -15
- package/dist/components/BbTooltip/tooltipWarmup.d.ts +0 -23
- package/dist/components/BbTree/BbTreeLevel.vue.d.ts +0 -19
- package/dist/components/BbTree/context.d.ts +0 -25
- package/dist/components/ChipsBox/ChipsBox.vue.d.ts +0 -21
- package/dist/components/ChipsBox/types.d.ts +0 -28
- package/dist/components/ClearableButton/ClearableButton.vue.d.ts +0 -6
- package/dist/components/ClearableButton/types.d.ts +0 -9
- package/dist/components/CloseIcon/CloseButton.vue.d.ts +0 -7
- package/dist/components/CloseIcon/types.d.ts +0 -2
- package/dist/components/CommaBox/CommaBox.vue.d.ts +0 -21
- package/dist/components/CommaBox/types.d.ts +0 -20
- package/dist/components/CommonField/CommonField.vue.d.ts +0 -20
- package/dist/components/CommonField/messageHeightMatrix.d.ts +0 -2
- package/dist/components/CommonFieldInput/CommonFieldInput.vue.d.ts +0 -22
- package/dist/components/CommonFieldInput/boxBorderMatrix.d.ts +0 -10
- package/dist/components/CommonFieldInput/types.d.ts +0 -114
- package/dist/components/CommonPopover/CommonPopover.vue.d.ts +0 -42
- package/dist/components/CommonPopover/resolvePlacement.d.ts +0 -9
- package/dist/components/CommonPopover/types.d.ts +0 -120
- package/dist/components/CommonTimeSelector/CommonTimeSelector.vue.d.ts +0 -48
- package/dist/components/CommonTimeSelector/useMeridiem.d.ts +0 -19
- package/dist/components/ErrorIcon/ErrorIcon.vue.d.ts +0 -7
- package/dist/components/ErrorIcon/types.d.ts +0 -3
- package/dist/components/FlatListBox/FlatListBox.vue.d.ts +0 -39
- package/dist/components/FlatListBox/types.d.ts +0 -140
- package/dist/components/GroupedListBox/GroupedListBox.vue.d.ts +0 -39
- package/dist/components/GroupedListBox/types.d.ts +0 -163
- package/dist/components/ListBox/ListBox.vue.d.ts +0 -39
- package/dist/components/ListBox/types.d.ts +0 -180
- package/dist/components/OptionsContainer/OptionsContainer.vue.d.ts +0 -20
- package/dist/components/OptionsContainer/types.d.ts +0 -168
- package/dist/components/Transitions/ScaleFade.vue.d.ts +0 -28
- package/dist/components/Transitions/Slide.vue.d.ts +0 -39
- package/dist/components/WarningIcon/WarningIcon.vue.d.ts +0 -7
- package/dist/components/WarningIcon/types.d.ts +0 -3
- package/dist/composables/__testResets.d.ts +0 -1
- package/dist/composables/autoHost.d.ts +0 -22
- package/dist/composables/formSubmitLock.d.ts +0 -48
- package/dist/composables/hostOpenings.d.ts +0 -88
- package/dist/composables/hostRegistry.d.ts +0 -47
- package/dist/composables/ssrMarker.d.ts +0 -15
- package/dist/composables/useActiveInactiveState.d.ts +0 -4
- package/dist/composables/useArray.d.ts +0 -7
- package/dist/composables/useBaseOptions.d.ts +0 -51
- package/dist/composables/useBodyScrollLock.d.ts +0 -4
- package/dist/composables/useBreakpoint.d.ts +0 -13
- package/dist/composables/useCancelableFunction.d.ts +0 -17
- package/dist/composables/useChoiceIndicator.d.ts +0 -58
- package/dist/composables/useClosingInert.d.ts +0 -28
- package/dist/composables/useCoarsePointer.d.ts +0 -9
- package/dist/composables/useCoherence.d.ts +0 -21
- package/dist/composables/useConfig.d.ts +0 -59
- package/dist/composables/useConfigDefaults.d.ts +0 -54
- package/dist/composables/useDirection.d.ts +0 -43
- package/dist/composables/useEscapeStackEntry.d.ts +0 -13
- package/dist/composables/useFrameworkDetection.d.ts +0 -12
- package/dist/composables/useHashedWatcher.d.ts +0 -19
- package/dist/composables/useHydrated.d.ts +0 -37
- package/dist/composables/useImeDismissBlur.d.ts +0 -103
- package/dist/composables/useIndexById.d.ts +0 -11
- package/dist/composables/useInertiaPage.d.ts +0 -10
- package/dist/composables/useItemText.d.ts +0 -17
- package/dist/composables/useItemValue.d.ts +0 -7
- package/dist/composables/useItemsGetter.d.ts +0 -83
- package/dist/composables/useKeyboardInset.d.ts +0 -28
- package/dist/composables/useListboxFocus.d.ts +0 -21
- package/dist/composables/useLocale.d.ts +0 -5
- package/dist/composables/useLogger.d.ts +0 -5
- package/dist/composables/useMinimalQueue.d.ts +0 -9
- package/dist/composables/useOnFalsy.d.ts +0 -2
- package/dist/composables/useOnTruthy.d.ts +0 -7
- package/dist/composables/useOverlayNavigation.d.ts +0 -37
- package/dist/composables/useOverlayYield.d.ts +0 -23
- package/dist/composables/usePrefill.d.ts +0 -44
- package/dist/composables/useQuery.d.ts +0 -39
- package/dist/composables/useRefusedCloseAnnouncement.d.ts +0 -13
- package/dist/composables/useRoute.d.ts +0 -3
- package/dist/composables/useRouter.d.ts +0 -2
- package/dist/composables/useSegmentedFields.d.ts +0 -129
- package/dist/composables/useServerPrefetch.d.ts +0 -28
- package/dist/composables/useSheetSurface.d.ts +0 -39
- package/dist/composables/useSsrState.d.ts +0 -28
- package/dist/composables/useTableWidthContext.d.ts +0 -73
- package/dist/composables/useToggleInput.d.ts +0 -44
- package/dist/composables/useTopLayer.d.ts +0 -9
- package/dist/composables/useTypeahead.d.ts +0 -112
- package/dist/composables/useUntil.d.ts +0 -7
- package/dist/composables/useUrlQueryParam.d.ts +0 -21
- package/dist/composables/useViewportWidth.d.ts +0 -14
- package/dist/deprecation/ai-deprecations.json.d.ts +0 -2984
- package/dist/deprecation/removedProps.d.ts +0 -3
- package/dist/directives/createPopoverDirective.d.ts +0 -111
- package/dist/directives/renderingInstance.d.ts +0 -2
- package/dist/i18n/eraNames.d.ts +0 -2
- package/dist/i18n/regionHints.d.ts +0 -16
- package/dist/icons-whitelist.d.ts +0 -9
- package/dist/reset.d.ts +0 -0
- package/dist/runtime/nuxt-plugin.d.ts +0 -2
- package/dist/styles.d.ts +0 -0
- package/dist/types/ExtractGenericFromComputedRef.d.ts +0 -2
- package/dist/types/ExtractGenericFromRef.d.ts +0 -2
- package/dist/types/NestedKeyOf.d.ts +0 -3
- package/dist/types/PrefixWith.d.ts +0 -1
- package/dist/types/ShapeErased.d.ts +0 -15
- package/dist/types/Simplify.d.ts +0 -6
- package/dist/utilities/calendar/canonicalParts.d.ts +0 -29
- package/dist/utilities/calendar/digits.d.ts +0 -18
- package/dist/utilities/calendar/gregorian.d.ts +0 -2
- package/dist/utilities/calendar/index.d.ts +0 -3
- package/dist/utilities/calendar/international.d.ts +0 -19
- package/dist/utilities/calendar/resolve.d.ts +0 -32
- package/dist/utilities/calendar/runtime.d.ts +0 -49
- package/dist/utilities/functions/animationsSettled.d.ts +0 -7
- package/dist/utilities/functions/bytesToUnit.d.ts +0 -2
- package/dist/utilities/functions/chunk.d.ts +0 -1
- package/dist/utilities/functions/clamp.d.ts +0 -9
- package/dist/utilities/functions/clampPrecision.d.ts +0 -1
- package/dist/utilities/functions/convertDateValue.d.ts +0 -57
- package/dist/utilities/functions/curry.d.ts +0 -6
- package/dist/utilities/functions/deburr.d.ts +0 -1
- package/dist/utilities/functions/elementLabel.d.ts +0 -8
- package/dist/utilities/functions/empty.d.ts +0 -1
- package/dist/utilities/functions/extractDomContainer.d.ts +0 -20
- package/dist/utilities/functions/findInTree.d.ts +0 -4
- package/dist/utilities/functions/flattenTree.d.ts +0 -1
- package/dist/utilities/functions/get.d.ts +0 -3
- package/dist/utilities/functions/hasVnodeListener.d.ts +0 -16
- package/dist/utilities/functions/hash.d.ts +0 -1
- package/dist/utilities/functions/head.d.ts +0 -2
- package/dist/utilities/functions/identity.d.ts +0 -1
- package/dist/utilities/functions/indexBy.d.ts +0 -11
- package/dist/utilities/functions/isDateDisabled.d.ts +0 -25
- package/dist/utilities/functions/isEqual.d.ts +0 -1
- package/dist/utilities/functions/isHex.d.ts +0 -1
- package/dist/utilities/functions/isImeComposing.d.ts +0 -7
- package/dist/utilities/functions/isNil.d.ts +0 -6
- package/dist/utilities/functions/isNotEmpty.d.ts +0 -1
- package/dist/utilities/functions/isNotNil.d.ts +0 -6
- package/dist/utilities/functions/isTextEntry.d.ts +0 -5
- package/dist/utilities/functions/isoWeek.d.ts +0 -36
- package/dist/utilities/functions/itemProps.d.ts +0 -46
- package/dist/utilities/functions/last.d.ts +0 -2
- package/dist/utilities/functions/negative.d.ts +0 -1
- package/dist/utilities/functions/noop.d.ts +0 -1
- package/dist/utilities/functions/normalizeDateBound.d.ts +0 -69
- package/dist/utilities/functions/parsePaginationNumber.d.ts +0 -22
- package/dist/utilities/functions/parseSize.d.ts +0 -3
- package/dist/utilities/functions/parseWidthString.d.ts +0 -6
- package/dist/utilities/functions/percentage.d.ts +0 -26
- package/dist/utilities/functions/pickBy.d.ts +0 -1
- package/dist/utilities/functions/range.d.ts +0 -1
- package/dist/utilities/functions/readableValue.d.ts +0 -6
- package/dist/utilities/functions/reject.d.ts +0 -25
- package/dist/utilities/functions/resolveEnumProp.d.ts +0 -19
- package/dist/utilities/functions/responsiveDefault.d.ts +0 -7
- package/dist/utilities/functions/searchRank.d.ts +0 -19
- package/dist/utilities/functions/settlesVisible.d.ts +0 -20
- package/dist/utilities/functions/snapToStep.d.ts +0 -1
- package/dist/utilities/functions/sort.d.ts +0 -6
- package/dist/utilities/functions/throttle.d.ts +0 -1
- package/dist/utilities/functions/toggleInput.d.ts +0 -114
- package/dist/utilities/functions/transpose.d.ts +0 -1
- package/dist/utilities/functions/validateDateFormat.d.ts +0 -8
- package/dist/utilities/functions/wait.d.ts +0 -2
- package/dist/utilities/functions/waitFor.d.ts +0 -9
- package/dist/utilities/functions/warnRemovedAttrs.d.ts +0 -49
- package/dist/utilities/functions/when.d.ts +0 -9
- package/dist/utilities/misc/autofocus.d.ts +0 -20
- package/dist/utilities/misc/iconsInjectionKey.d.ts +0 -15
- package/dist/utilities/misc/listboxMetrics.d.ts +0 -47
- package/dist/utilities/misc/maskaDataOptions.d.ts +0 -12
- package/dist/utilities/misc/pageText.d.ts +0 -16
- package/dist/utilities/misc/ssrValue.d.ts +0 -20
- package/dist/utilities/misc/transitions.d.ts +0 -5
- package/dist/utils/configDefaults.d.ts +0 -43
- package/dist/utils/configScope.d.ts +0 -43
- package/dist/utils/copyData.d.ts +0 -13
- package/dist/utils/focusVisibility.d.ts +0 -15
- package/dist/utils/injectLibraryStyles.d.ts +0 -8
- package/dist/utils/overlayEscapeStack.d.ts +0 -52
- package/dist/utils/overlaySurfaceIsolation.d.ts +0 -1
- package/dist/utils/passthroughDeduper.d.ts +0 -16
- package/dist/utils/releasedActivator.d.ts +0 -20
- package/dist/utils/versionCheck.d.ts +0 -19
|
@@ -0,0 +1,587 @@
|
|
|
1
|
+
import e from "../BbIcon/BbIcon.vue.js";
|
|
2
|
+
import t from "../CloseIcon/CloseButton.vue.js";
|
|
3
|
+
import n from "../../assets/svgs/chevron_left.svg_raw.js";
|
|
4
|
+
import r from "../../assets/svgs/chevron_right.svg_raw.js";
|
|
5
|
+
import { returnFocusToOpener as i, rootElementOf as a, useOverlayHost as ee } from "../../composables/overlayRegistry.js";
|
|
6
|
+
import { useBodyScrollLock as te } from "../../composables/useBodyScrollLock.js";
|
|
7
|
+
import { useId as o } from "../../composables/useId.js";
|
|
8
|
+
import { useLocale as ne } from "../../composables/useLocale.js";
|
|
9
|
+
import { useLogger as re } from "../../composables/useLogger.js";
|
|
10
|
+
import { usePassthrough as ie } from "../../composables/usePassthrough.js";
|
|
11
|
+
import { registerTopLayerHost as ae } from "../../composables/useTopLayer.js";
|
|
12
|
+
import { registerGalleryPreload as oe, takeGalleryTrigger as se } from "../../directives/bbGallery.js";
|
|
13
|
+
import { animationsSettled as ce } from "../../utilities/functions/animationsSettled.js";
|
|
14
|
+
import { wait as le } from "../../utilities/functions/wait.js";
|
|
15
|
+
import { pageText as ue } from "../../utilities/misc/pageText.js";
|
|
16
|
+
import { transitions as de } from "../../utilities/misc/transitions.js";
|
|
17
|
+
import { isTopEscapeEntry as fe, pushEscapeEntry as pe, removeEscapeEntry as me } from "../../utils/overlayEscapeStack.js";
|
|
18
|
+
import { overlaySurfaceIsolation as he } from "../../utils/overlaySurfaceIsolation.js";
|
|
19
|
+
import { findGalleryItem as ge, toPhoto as _e } from "./findItem.js";
|
|
20
|
+
import { BB_GALLERY_PT as ve } from "./types.js";
|
|
21
|
+
import { Fragment as ye, computed as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as be, createVNode as xe, defineComponent as d, getCurrentInstance as Se, guardReactiveProps as Ce, mergeModels as f, mergeProps as p, nextTick as m, normalizeClass as we, normalizeProps as Te, onBeforeUnmount as Ee, onMounted as De, openBlock as h, reactive as Oe, ref as g, renderList as ke, renderSlot as Ae, toDisplayString as _, toHandlers as je, unref as v, useAttrs as Me, useModel as Ne, useSlots as Pe, watch as y } from "vue";
|
|
22
|
+
// src/components/BbGallery/BbGallery.vue?vue&type=script&setup=true&lang.ts
|
|
23
|
+
var Fe = ["aria-labelledby", "inert"], Ie = [
|
|
24
|
+
"aria-hidden",
|
|
25
|
+
"aria-label",
|
|
26
|
+
"aria-roledescription",
|
|
27
|
+
"inert",
|
|
28
|
+
"role"
|
|
29
|
+
], Le = { class: "bb-gallery__frame" }, Re = ["aria-hidden"], ze = [
|
|
30
|
+
"alt",
|
|
31
|
+
"fetchpriority",
|
|
32
|
+
"height",
|
|
33
|
+
"loading",
|
|
34
|
+
"sizes",
|
|
35
|
+
"src",
|
|
36
|
+
"srcset",
|
|
37
|
+
"width",
|
|
38
|
+
"onError"
|
|
39
|
+
], Be = ["aria-label", "disabled"], Ve = ["aria-label", "disabled"], He = {
|
|
40
|
+
"aria-live": "polite",
|
|
41
|
+
class: "bb-sr-only"
|
|
42
|
+
}, Ue = {
|
|
43
|
+
key: 0,
|
|
44
|
+
class: "bb-gallery__bar"
|
|
45
|
+
}, We = ["tabindex"], Ge = ["aria-expanded"], b = /*@__PURE__*/ d({
|
|
46
|
+
inheritAttrs: !1,
|
|
47
|
+
__name: "BbGallery",
|
|
48
|
+
props: /*@__PURE__*/ f({
|
|
49
|
+
"pt:root": {},
|
|
50
|
+
"pt:root:zoomed": {},
|
|
51
|
+
"pt:header": {},
|
|
52
|
+
"pt:header:zoomed": {},
|
|
53
|
+
"pt:title": {},
|
|
54
|
+
"pt:title:zoomed": {},
|
|
55
|
+
"pt:close": {},
|
|
56
|
+
"pt:close:zoomed": {},
|
|
57
|
+
"pt:slide": {},
|
|
58
|
+
"pt:slide:active": {},
|
|
59
|
+
"pt:slide:zoomed": {},
|
|
60
|
+
"pt:image": {},
|
|
61
|
+
"pt:image:zoomed": {},
|
|
62
|
+
"pt:caption": {},
|
|
63
|
+
"pt:caption:zoomed": {},
|
|
64
|
+
"pt:prev": {},
|
|
65
|
+
"pt:prev:disabled": {},
|
|
66
|
+
"pt:prev:zoomed": {},
|
|
67
|
+
"pt:next": {},
|
|
68
|
+
"pt:next:disabled": {},
|
|
69
|
+
"pt:next:zoomed": {},
|
|
70
|
+
"pt:footer": {},
|
|
71
|
+
"pt:footer:zoomed": {},
|
|
72
|
+
"pt:counter": {},
|
|
73
|
+
"pt:counter:zoomed": {},
|
|
74
|
+
"pt:more": {},
|
|
75
|
+
"pt:more:zoomed": {},
|
|
76
|
+
pt: {},
|
|
77
|
+
items: {},
|
|
78
|
+
id: {},
|
|
79
|
+
title: {},
|
|
80
|
+
loop: { type: Boolean },
|
|
81
|
+
closeOnBackdropClick: { type: Boolean }
|
|
82
|
+
}, {
|
|
83
|
+
modelValue: { default: null },
|
|
84
|
+
modelModifiers: {}
|
|
85
|
+
}),
|
|
86
|
+
emits: ["update:modelValue"],
|
|
87
|
+
setup(d) {
|
|
88
|
+
let f = Ne(d, "modelValue"), b = d, Ke = Pe(), { t: x } = ne(), S = s(() => b.items.map(_e)), C = s(() => S.value.length), w = s(() => f.value !== null && C.value > 0), T = s(() => f.value === null ? 0 : Math.min(Math.max(Math.trunc(f.value), 0), Math.max(C.value - 1, 0))), E = s(() => !!b.loop && C.value > 1), qe = s(() => !E.value && T.value === 0), Je = s(() => !E.value && T.value === C.value - 1), Ye = s(() => !!b.title || !!Ke.title), Xe = s(() => b.title || x("gallery.label").value), Ze = (e) => x("gallery.position", e + 1, C.value).value, D = Oe({
|
|
89
|
+
scale: 1,
|
|
90
|
+
x: 0,
|
|
91
|
+
y: 0
|
|
92
|
+
}), O = s(() => D.scale > 1.01), k = ie({
|
|
93
|
+
component: "BbGallery",
|
|
94
|
+
attrs: Me(),
|
|
95
|
+
props: b,
|
|
96
|
+
parts: ve.parts,
|
|
97
|
+
states: ve.states,
|
|
98
|
+
active: { zoomed: () => O.value }
|
|
99
|
+
}), Qe = Se(), A = null, j = !1, $e = (e) => {
|
|
100
|
+
process.env.NODE_ENV !== "production" && re().warn(e);
|
|
101
|
+
}, M = ee("gallery", {
|
|
102
|
+
id: () => b.id,
|
|
103
|
+
model: s({
|
|
104
|
+
get: () => w.value,
|
|
105
|
+
set: (e) => {
|
|
106
|
+
if (!e) return void (f.value = null);
|
|
107
|
+
let t = M.data.value, n = ge(S.value, t);
|
|
108
|
+
n < 0 ? $e(`v-bb-gallery="{ id: '${b.id}', item: ${JSON.stringify(t)} }" opens nothing: no photo of <BbGallery id="${b.id}"> has that ${typeof t == "number" ? "index" : "URL (its src or a srcset candidate)"}. Pass the index, or one of the item's URLs.`) : (j = !0, A = se(), f.value = n);
|
|
109
|
+
}
|
|
110
|
+
}),
|
|
111
|
+
element: () => a(Qe)
|
|
112
|
+
}), et = () => {
|
|
113
|
+
let e = a(Qe);
|
|
114
|
+
e && (M.domId.value ? e.id = M.domId.value : e.removeAttribute("id"));
|
|
115
|
+
};
|
|
116
|
+
De(et), y(() => M.domId.value, et);
|
|
117
|
+
let tt = /* @__PURE__ */ new Set(), nt = (e) => {
|
|
118
|
+
if (w.value || typeof Image != "function") return;
|
|
119
|
+
let t = S.value[ge(S.value, e)];
|
|
120
|
+
if (!t || tt.has(t.key)) return;
|
|
121
|
+
tt.add(t.key);
|
|
122
|
+
let n = new Image();
|
|
123
|
+
n.decoding = "async", t.srcset && (n.sizes = t.sizes ?? "100vw", n.srcset = t.srcset), t.src && (n.src = t.src);
|
|
124
|
+
}, rt;
|
|
125
|
+
De(() => {
|
|
126
|
+
let e = a(Qe);
|
|
127
|
+
e && (rt = oe(e, nt));
|
|
128
|
+
}), y(w, (e) => {
|
|
129
|
+
if (e && (Dt.clear(), !j)) {
|
|
130
|
+
let e = document.activeElement;
|
|
131
|
+
A = e instanceof HTMLElement && e !== document.body ? e : null;
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
let N = () => {
|
|
135
|
+
f.value = null;
|
|
136
|
+
}, P = (e) => {
|
|
137
|
+
Number.isInteger(e) && e >= 0 && e < C.value && (f.value = e);
|
|
138
|
+
}, it = s(() => {
|
|
139
|
+
let { key: e, ...t } = S.value[T.value] ?? { key: "" };
|
|
140
|
+
return {
|
|
141
|
+
index: T.value,
|
|
142
|
+
count: C.value,
|
|
143
|
+
item: t,
|
|
144
|
+
go: P,
|
|
145
|
+
close: N
|
|
146
|
+
};
|
|
147
|
+
}), at = s(() => {
|
|
148
|
+
let e = /* @__PURE__ */ new Map(), t = S.value.map((t, n) => {
|
|
149
|
+
let r = e.get(t.key) ?? 0;
|
|
150
|
+
return e.set(t.key, r + 1), {
|
|
151
|
+
item: t,
|
|
152
|
+
real: n,
|
|
153
|
+
clone: !1,
|
|
154
|
+
key: `${t.key}#${r}`
|
|
155
|
+
};
|
|
156
|
+
});
|
|
157
|
+
if (!E.value) return t;
|
|
158
|
+
let n = t[t.length - 1], r = t[0];
|
|
159
|
+
return [
|
|
160
|
+
{
|
|
161
|
+
...n,
|
|
162
|
+
clone: !0,
|
|
163
|
+
key: `clone-start:${n.key}`
|
|
164
|
+
},
|
|
165
|
+
...t,
|
|
166
|
+
{
|
|
167
|
+
...r,
|
|
168
|
+
clone: !0,
|
|
169
|
+
key: `clone-end:${r.key}`
|
|
170
|
+
}
|
|
171
|
+
];
|
|
172
|
+
}), F = (e) => e + +!!E.value, I = (e) => {
|
|
173
|
+
let t = C.value;
|
|
174
|
+
return E.value ? ((e - 1) % t + t) % t : Math.min(Math.max(e, 0), t - 1);
|
|
175
|
+
}, ot = (e) => {
|
|
176
|
+
let t = C.value, n = Math.abs(e.real - T.value);
|
|
177
|
+
return n <= 1 || E.value && t - n <= 1;
|
|
178
|
+
}, st = (e) => {
|
|
179
|
+
let { width: t, height: n } = e.item, r = !e.clone && e.real === T.value, i = {};
|
|
180
|
+
return t && n && (i["--arw"] = String(t), i["--arh"] = String(n), i["--w"] = `${t}px`), r && O.value && (i.transform = `translate(${D.x}px, ${D.y}px) scale(${D.scale})`), i;
|
|
181
|
+
}, L = g(null), ct = !1, R = null, lt = !1, ut = () => !!L.value && getComputedStyle(L.value).direction === "rtl", z = () => L.value?.clientWidth ?? 0, dt = () => {
|
|
182
|
+
let e = z();
|
|
183
|
+
return e ? Math.abs(L.value.scrollLeft) / e : 0;
|
|
184
|
+
}, B = () => Math.round(dt()), ft = () => typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion: reduce)").matches, pt = null, mt = (e) => {
|
|
185
|
+
let t = L.value;
|
|
186
|
+
t && (t.scrollTo({
|
|
187
|
+
left: (ut() ? -1 : 1) * e * z(),
|
|
188
|
+
behavior: "instant"
|
|
189
|
+
}), pt = {
|
|
190
|
+
left: t.scrollLeft,
|
|
191
|
+
width: z()
|
|
192
|
+
});
|
|
193
|
+
}, ht = () => {
|
|
194
|
+
ft() || m(() => {
|
|
195
|
+
L.value?.querySelector(".bb-gallery__slide--active")?.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
196
|
+
duration: 200,
|
|
197
|
+
easing: "ease-out"
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
}, gt = (e) => {
|
|
201
|
+
R = e, mt(e), B() === e && (R = null), ht();
|
|
202
|
+
}, _t = () => {
|
|
203
|
+
L.value && z() && (R = null, mt(F(T.value)));
|
|
204
|
+
}, vt = () => {
|
|
205
|
+
if (!E.value || R !== null || lt) return;
|
|
206
|
+
let e = B();
|
|
207
|
+
e !== 0 && e !== C.value + 1 || Math.abs(dt() - e) > .01 || mt(F(I(e)));
|
|
208
|
+
};
|
|
209
|
+
y(T, (e) => {
|
|
210
|
+
L.value && w.value && (G(), (R === null ? I(B()) === e : I(R) === e) || gt(F(e)));
|
|
211
|
+
});
|
|
212
|
+
let yt = (e) => {
|
|
213
|
+
let t = C.value;
|
|
214
|
+
P(E.value ? ((T.value + e) % t + t) % t : T.value + e);
|
|
215
|
+
}, bt = 0, xt, St = () => {
|
|
216
|
+
clearTimeout(xt), xt = setTimeout(Ct, 150), bt ||= requestAnimationFrame(() => {
|
|
217
|
+
if (bt = 0, !L.value || !w.value || !z() || !ct) return;
|
|
218
|
+
let e = B();
|
|
219
|
+
if (R !== null) {
|
|
220
|
+
if (e === R) R = null;
|
|
221
|
+
else return;
|
|
222
|
+
}
|
|
223
|
+
let t = I(e);
|
|
224
|
+
t !== T.value && (f.value = t), vt();
|
|
225
|
+
});
|
|
226
|
+
}, Ct = () => {
|
|
227
|
+
clearTimeout(xt), R !== null && B() === R && (R = null), vt();
|
|
228
|
+
}, V = null, wt = 0;
|
|
229
|
+
y(L, (e) => {
|
|
230
|
+
V?.disconnect(), V = null, e && (m(_t), typeof ResizeObserver == "function" && (wt = e.clientWidth, V = new ResizeObserver(() => {
|
|
231
|
+
U();
|
|
232
|
+
let t = e.clientWidth;
|
|
233
|
+
if (t === wt || (wt = t, lt)) return;
|
|
234
|
+
let n = R ?? F(T.value);
|
|
235
|
+
R = null, mt(n);
|
|
236
|
+
}), V.observe(e)));
|
|
237
|
+
});
|
|
238
|
+
let Tt = () => {
|
|
239
|
+
ct = !0;
|
|
240
|
+
let e = L.value;
|
|
241
|
+
if (e && pt && z() === pt.width && Math.abs(e.scrollLeft - pt.left) > 1) {
|
|
242
|
+
R = null;
|
|
243
|
+
let e = I(B());
|
|
244
|
+
e !== T.value && (f.value = e), vt();
|
|
245
|
+
} else _t();
|
|
246
|
+
U(), Pt();
|
|
247
|
+
};
|
|
248
|
+
y([qe, Je], ([e, t]) => {
|
|
249
|
+
let n = document.activeElement;
|
|
250
|
+
if (!(n instanceof HTMLElement)) return;
|
|
251
|
+
let r = n.closest(".bb-gallery__stage");
|
|
252
|
+
(e && n.classList.contains("bb-gallery__nav--prev") || t && n.classList.contains("bb-gallery__nav--next")) && r?.querySelector(t ? ".bb-gallery__nav--prev" : ".bb-gallery__nav--next")?.focus({ preventScroll: !0 });
|
|
253
|
+
}, { flush: "pre" });
|
|
254
|
+
let Et = (e) => {
|
|
255
|
+
if (e.defaultPrevented || e.altKey || e.metaKey || e.ctrlKey) return;
|
|
256
|
+
let t = e.key === "ArrowRight" ? 1 : e.key === "ArrowLeft" ? -1 : 0;
|
|
257
|
+
if (t) yt(ut() ? -t : t);
|
|
258
|
+
else if (e.key === "Home") P(0);
|
|
259
|
+
else if (e.key === "End") P(C.value - 1);
|
|
260
|
+
else if (e.key === "+" || e.key === "=") Gt(1.5);
|
|
261
|
+
else if (e.key === "-") Gt(1 / 1.5);
|
|
262
|
+
else if (e.key === "0") G();
|
|
263
|
+
else return;
|
|
264
|
+
e.preventDefault();
|
|
265
|
+
};
|
|
266
|
+
y(S, (e, t) => {
|
|
267
|
+
if (f.value === null) return;
|
|
268
|
+
if (!e.length) return N();
|
|
269
|
+
let n = t?.[T.value]?.key, r = n ? e.findIndex((e) => e.key === n) : -1, i = r >= 0 ? r : Math.min(T.value, e.length - 1);
|
|
270
|
+
i !== f.value && (f.value = i), m(_t);
|
|
271
|
+
}), y(() => [f.value, C.value], ([e]) => {
|
|
272
|
+
e !== null && C.value && e !== T.value && (f.value = T.value);
|
|
273
|
+
});
|
|
274
|
+
let Dt = Oe(/* @__PURE__ */ new Set()), Ot = [], kt = 0, At = (e) => {
|
|
275
|
+
Ot.push(e), kt ||= requestAnimationFrame(() => {
|
|
276
|
+
kt = 0;
|
|
277
|
+
for (let e of Ot) Dt.add(e);
|
|
278
|
+
Ot = [];
|
|
279
|
+
});
|
|
280
|
+
}, jt = (e) => {
|
|
281
|
+
w.value && !ft() && e.target.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
282
|
+
duration: 200,
|
|
283
|
+
easing: "ease-out"
|
|
284
|
+
});
|
|
285
|
+
}, Mt = g(""), Nt, Pt = () => {
|
|
286
|
+
clearTimeout(Nt), Nt = setTimeout(() => {
|
|
287
|
+
let e = S.value[T.value];
|
|
288
|
+
if (!w.value || !e) return;
|
|
289
|
+
let t = Ze(T.value);
|
|
290
|
+
Mt.value = [e.alt ? `${t}: ${e.alt}` : t, e.caption].filter(Boolean).join(". ");
|
|
291
|
+
}, 350);
|
|
292
|
+
};
|
|
293
|
+
y(T, () => ct && Pt());
|
|
294
|
+
let Ft = g(null), It = `bb-gallery-caption-${o().id.value}`, Lt = s(() => S.value[T.value]?.caption), Rt = s(() => S.value.some((e) => !!e.caption)), H = g(!1), zt = g(!1), U = () => {
|
|
295
|
+
if (H.value) return;
|
|
296
|
+
let e = Ft.value;
|
|
297
|
+
zt.value = !!e && e.clientWidth > 0 && e.scrollWidth > e.clientWidth + 1;
|
|
298
|
+
};
|
|
299
|
+
y([
|
|
300
|
+
T,
|
|
301
|
+
w,
|
|
302
|
+
Lt
|
|
303
|
+
], () => {
|
|
304
|
+
H.value = !1, zt.value = !1, m(U);
|
|
305
|
+
}), y(H, (e) => {
|
|
306
|
+
e || m(U);
|
|
307
|
+
});
|
|
308
|
+
let W = null;
|
|
309
|
+
y(Ft, (e) => {
|
|
310
|
+
W?.disconnect(), W = null, m(U), e && typeof ResizeObserver == "function" && (W = new ResizeObserver(U), W.observe(e));
|
|
311
|
+
}), De(() => void document.fonts?.ready.then(U));
|
|
312
|
+
let Bt = (e) => {
|
|
313
|
+
H.value && (e.target.closest(".bb-gallery__caption, .bb-gallery__more") || (H.value = !1));
|
|
314
|
+
}, Vt = () => L.value?.querySelector(".bb-gallery__slide--active .bb-gallery__image") ?? null, Ht = () => {
|
|
315
|
+
let e = Vt();
|
|
316
|
+
if (!e || !e.clientWidth) return 2;
|
|
317
|
+
let t = (e.naturalWidth || e.width) / e.clientWidth;
|
|
318
|
+
return Math.min(Math.max(t, 2), 4);
|
|
319
|
+
}, Ut = () => {
|
|
320
|
+
let e = Vt(), t = e?.parentElement;
|
|
321
|
+
if (!e || !t) return;
|
|
322
|
+
let n = e.clientWidth * D.scale, r = e.clientHeight * D.scale, i = Math.max(0, (n - t.clientWidth) / 2), a = Math.max(0, (r - t.clientHeight) / 2);
|
|
323
|
+
D.x = Math.min(i, Math.max(-i, D.x)), D.y = Math.min(a, Math.max(-a, D.y));
|
|
324
|
+
}, Wt = (e, t, n) => {
|
|
325
|
+
let r = Vt();
|
|
326
|
+
if (!r) return;
|
|
327
|
+
let i = Math.min(Math.max(e, 1), Ht()), a = r.parentElement.getBoundingClientRect(), ee = a.left + a.width / 2, te = a.top + a.height / 2, o = (t ?? ee) - ee, ne = (n ?? te) - te, re = i / D.scale;
|
|
328
|
+
D.x = o - (o - D.x) * re, D.y = ne - (ne - D.y) * re, D.scale = i, i <= 1.01 ? G() : Ut();
|
|
329
|
+
}, Gt = (e) => Wt(D.scale * e), G = () => {
|
|
330
|
+
D.scale = 1, D.x = 0, D.y = 0;
|
|
331
|
+
}, Kt = (e, t) => O.value ? G() : Wt(Ht(), e, t), qt = (e) => {
|
|
332
|
+
if (e.ctrlKey) e.preventDefault(), Wt(D.scale * Math.exp(-e.deltaY * .01), e.clientX, e.clientY);
|
|
333
|
+
else {
|
|
334
|
+
if (!O.value) {
|
|
335
|
+
R = null, Yt(e);
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
e.preventDefault();
|
|
339
|
+
let t = e.deltaMode === 1 ? 16 : e.deltaMode === 2 ? z() : 1, [n, r] = e.shiftKey && !e.deltaX ? [e.deltaY, 0] : [e.deltaX, e.deltaY];
|
|
340
|
+
D.x -= n * t, D.y -= r * t, Ut();
|
|
341
|
+
}
|
|
342
|
+
}, Jt = -Infinity, Yt = (e) => {
|
|
343
|
+
if (!(Math.abs(e.deltaX) > Math.abs(e.deltaY) || e.shiftKey) || e.deltaMode === 0) return;
|
|
344
|
+
e.preventDefault();
|
|
345
|
+
let t = e.timeStamp - Jt < 250;
|
|
346
|
+
Jt = e.timeStamp;
|
|
347
|
+
let n = Math.sign(e.deltaX || e.deltaY);
|
|
348
|
+
!t && n && yt(ut() ? -n : n);
|
|
349
|
+
};
|
|
350
|
+
y(L, (e, t) => {
|
|
351
|
+
t?.removeEventListener("wheel", qt), e?.addEventListener("wheel", qt, { passive: !1 });
|
|
352
|
+
});
|
|
353
|
+
let K = /* @__PURE__ */ new Map(), q = null, J = g(0), Xt = g(!1), Zt = s(() => Math.min(J.value / 320, 1)), Y = {
|
|
354
|
+
t: 0,
|
|
355
|
+
x: 0,
|
|
356
|
+
y: 0
|
|
357
|
+
}, Qt, $t = "", en = () => {
|
|
358
|
+
let [e, t] = [...K.values()];
|
|
359
|
+
return Math.hypot(e.x - t.x, e.y - t.y);
|
|
360
|
+
}, tn = (e) => {
|
|
361
|
+
$t = e.pointerType, lt = !0, R = null, K.set(e.pointerId, {
|
|
362
|
+
x: e.clientX,
|
|
363
|
+
y: e.clientY
|
|
364
|
+
}), K.size === 2 && e.pointerType === "touch" ? q = {
|
|
365
|
+
kind: "pinch",
|
|
366
|
+
startX: 0,
|
|
367
|
+
startY: 0,
|
|
368
|
+
startT: e.timeStamp,
|
|
369
|
+
zoomX: D.x,
|
|
370
|
+
zoomY: D.y,
|
|
371
|
+
pinchDistance: en(),
|
|
372
|
+
pinchScale: D.scale,
|
|
373
|
+
moved: !0
|
|
374
|
+
} : K.size > 1 || (q = {
|
|
375
|
+
kind: O.value ? "pan" : "idle",
|
|
376
|
+
startX: e.clientX,
|
|
377
|
+
startY: e.clientY,
|
|
378
|
+
startT: e.timeStamp,
|
|
379
|
+
zoomX: D.x,
|
|
380
|
+
zoomY: D.y,
|
|
381
|
+
pinchDistance: 0,
|
|
382
|
+
pinchScale: D.scale,
|
|
383
|
+
moved: !1
|
|
384
|
+
}, O.value && e.target.setPointerCapture?.(e.pointerId));
|
|
385
|
+
}, nn = (e) => {
|
|
386
|
+
if (!K.has(e.pointerId) || !q) return;
|
|
387
|
+
K.set(e.pointerId, {
|
|
388
|
+
x: e.clientX,
|
|
389
|
+
y: e.clientY
|
|
390
|
+
});
|
|
391
|
+
let t = e.clientX - q.startX, n = e.clientY - q.startY;
|
|
392
|
+
if (Math.hypot(t, n) > 6 && (q.moved = !0), q.kind !== "idle" && (Xt.value = !0), q.kind === "pinch" && K.size === 2) {
|
|
393
|
+
let [e, t] = [...K.values()];
|
|
394
|
+
Wt(q.pinchScale * en() / q.pinchDistance, (e.x + t.x) / 2, (e.y + t.y) / 2);
|
|
395
|
+
} else q.kind === "pan" ? (D.x = q.zoomX + t, D.y = q.zoomY + n, Ut()) : (q.kind === "idle" && e.pointerType !== "mouse" && n > 10 && n > Math.abs(t) * 1.2 && (q.kind = "dismiss"), q.kind === "dismiss" && (Xt.value = !0, J.value = Math.max(0, n)));
|
|
396
|
+
}, rn = (e) => {
|
|
397
|
+
if (K.delete(e.pointerId), K.size) return;
|
|
398
|
+
lt = !1, Xt.value = !1;
|
|
399
|
+
let t = q;
|
|
400
|
+
if (q = null, !t) return;
|
|
401
|
+
if (t.kind === "dismiss") {
|
|
402
|
+
let n = J.value / Math.max(e.timeStamp - t.startT, 1), r = e.type === "pointerup" && (J.value > 80 || n > .5);
|
|
403
|
+
J.value = 0, r && N();
|
|
404
|
+
return;
|
|
405
|
+
}
|
|
406
|
+
if (e.type !== "pointerup" || t.moved || e.pointerType === "mouse") {
|
|
407
|
+
vt();
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
let n = e.target.closest(".bb-gallery__image"), r = e.timeStamp, i = r - Y.t < 300 && Math.hypot(e.clientX - Y.x, e.clientY - Y.y) < 30;
|
|
411
|
+
if (Y = {
|
|
412
|
+
t: r,
|
|
413
|
+
x: e.clientX,
|
|
414
|
+
y: e.clientY
|
|
415
|
+
}, clearTimeout(Qt), i) {
|
|
416
|
+
Y.t = 0, (n || O.value) && Kt(e.clientX, e.clientY);
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
let a = e.target.closest(".bb-gallery__missing");
|
|
420
|
+
if (!n && !a && !O.value && b.closeOnBackdropClick) return N();
|
|
421
|
+
a || (Qt = setTimeout(() => sn.value = !sn.value, 300));
|
|
422
|
+
}, an = (e) => {
|
|
423
|
+
if (!($t !== "mouse" || e.detail > 1) && !e.target.closest(".bb-gallery__image, .bb-gallery__nav, .bb-gallery__missing")) {
|
|
424
|
+
if (O.value) return G();
|
|
425
|
+
b.closeOnBackdropClick && N();
|
|
426
|
+
}
|
|
427
|
+
}, on = (e) => {
|
|
428
|
+
$t && $t !== "mouse" || e.target.closest(".bb-gallery__image") && Kt(e.clientX, e.clientY);
|
|
429
|
+
};
|
|
430
|
+
y(L, (e, t) => {
|
|
431
|
+
t?.removeEventListener("dblclick", on), e?.addEventListener("dblclick", on);
|
|
432
|
+
});
|
|
433
|
+
let sn = g(!1), X = g(null), cn = `bb-gallery-title-${o().id.value}`, Z = g(!1), ln = s(() => w.value || Z.value), un = g();
|
|
434
|
+
te(Z);
|
|
435
|
+
let Q = Symbol("bb-gallery"), dn = null, $ = 0, fn = async () => {
|
|
436
|
+
let e = ++$;
|
|
437
|
+
un.value = ue(), Z.value || pe(Q, { element: () => X.value }), Z.value = !0, await m();
|
|
438
|
+
let t = X.value;
|
|
439
|
+
t && e === $ && (t.open || t.showModal(), dn ??= ae(t), t.querySelector(".bb-gallery__stage")?.focus({ preventScroll: !0 }), await le(de.medium), await ce(t), e === $ && w.value && Tt());
|
|
440
|
+
}, pn = async () => {
|
|
441
|
+
let e = $;
|
|
442
|
+
await le(de.medium), e !== $ || w.value || mn();
|
|
443
|
+
}, mn = () => {
|
|
444
|
+
me(Q), X.value?.open && X.value.close(), dn?.(), dn = null, Z.value && (Z.value = !1, _n());
|
|
445
|
+
};
|
|
446
|
+
y(w, (e) => void (e ? fn() : pn())), De(() => {
|
|
447
|
+
w.value && fn();
|
|
448
|
+
});
|
|
449
|
+
let hn = (e) => {
|
|
450
|
+
if (e.preventDefault(), H.value) return void (H.value = !1);
|
|
451
|
+
fe(Q) && N();
|
|
452
|
+
}, gn = () => {
|
|
453
|
+
w.value && X.value && ($++, f.value = null, mn());
|
|
454
|
+
}, _n = () => {
|
|
455
|
+
ct = !1, R = null, H.value = !1, sn.value = !1, J.value = 0, G(), Mt.value = "";
|
|
456
|
+
let e = A, t = j;
|
|
457
|
+
if (A = null, j = !1, M.afterHidden(), t || !e) return;
|
|
458
|
+
let n = document.activeElement;
|
|
459
|
+
n && n !== document.body || i(e);
|
|
460
|
+
};
|
|
461
|
+
return Ee(() => {
|
|
462
|
+
$++, me(Q), X.value?.open && X.value.close(), dn?.(), rt?.(), V?.disconnect(), W?.disconnect(), bt && cancelAnimationFrame(bt), clearTimeout(xt), kt && cancelAnimationFrame(kt), clearTimeout(Nt), clearTimeout(Qt);
|
|
463
|
+
}), (i, a) => (h(), l("dialog", p({
|
|
464
|
+
ref_key: "root",
|
|
465
|
+
ref: X,
|
|
466
|
+
"aria-labelledby": ln.value ? cn : void 0,
|
|
467
|
+
class: ["bb-gallery", {
|
|
468
|
+
"bb-gallery--open": w.value,
|
|
469
|
+
"bb-gallery--visible": Z.value,
|
|
470
|
+
"bb-gallery--zoomed": O.value,
|
|
471
|
+
"bb-gallery--quiet": sn.value,
|
|
472
|
+
"bb-gallery--dismissing": J.value > 0,
|
|
473
|
+
"bb-gallery--gesture": Xt.value
|
|
474
|
+
}],
|
|
475
|
+
inert: !w.value || void 0,
|
|
476
|
+
style: [un.value, J.value > 0 ? {
|
|
477
|
+
"--dismiss": Zt.value,
|
|
478
|
+
"--dismiss-y": `${J.value}px`
|
|
479
|
+
} : void 0]
|
|
480
|
+
}, je(v(he), !0), {
|
|
481
|
+
onCancel: hn,
|
|
482
|
+
onClose: gn,
|
|
483
|
+
onKeydown: Et,
|
|
484
|
+
onPointerdown: Bt
|
|
485
|
+
}, v(k).rootAttrs), [ln.value ? (h(), l(ye, { key: 0 }, [
|
|
486
|
+
u("div", p({ class: "bb-gallery__header" }, v(k).header), [Ae(i.$slots, "header", p(it.value, {
|
|
487
|
+
title: d.title,
|
|
488
|
+
titleId: cn
|
|
489
|
+
}), () => [u("p", p({
|
|
490
|
+
id: cn,
|
|
491
|
+
class: ["bb-gallery__title", { "bb-sr-only": !Ye.value }]
|
|
492
|
+
}, v(k).title), [Ae(i.$slots, "title", p(it.value, { text: d.title }), () => [be(_(Xe.value), 1)])], 16), xe(t, p({
|
|
493
|
+
"aria-label": v(x)("dialog.closeLabel").value,
|
|
494
|
+
class: "bb-gallery__close"
|
|
495
|
+
}, v(k).close, { onClick: N }), null, 16, ["aria-label"])])], 16),
|
|
496
|
+
u("div", {
|
|
497
|
+
class: "bb-gallery__stage",
|
|
498
|
+
tabindex: "-1",
|
|
499
|
+
onClick: an
|
|
500
|
+
}, [
|
|
501
|
+
u("div", {
|
|
502
|
+
ref_key: "track",
|
|
503
|
+
ref: L,
|
|
504
|
+
class: "bb-gallery__track",
|
|
505
|
+
tabindex: "-1",
|
|
506
|
+
onPointercancel: rn,
|
|
507
|
+
onPointerdown: tn,
|
|
508
|
+
onPointermove: nn,
|
|
509
|
+
onPointerup: rn,
|
|
510
|
+
onScrollPassive: St,
|
|
511
|
+
onScrollend: Ct
|
|
512
|
+
}, [(h(!0), l(ye, null, ke(at.value, (e) => (h(), l("figure", p({
|
|
513
|
+
key: e.key,
|
|
514
|
+
"aria-hidden": e.clone || e.real !== T.value || void 0,
|
|
515
|
+
"aria-label": e.clone ? void 0 : Ze(e.real),
|
|
516
|
+
"aria-roledescription": e.clone ? void 0 : "slide",
|
|
517
|
+
class: ["bb-gallery__slide", { "bb-gallery__slide--active": !e.clone && e.real === T.value }],
|
|
518
|
+
inert: e.clone || e.real !== T.value || void 0,
|
|
519
|
+
role: e.clone ? void 0 : "group"
|
|
520
|
+
}, { ref_for: !0 }, v(k).part("slide", { active: !e.clone && e.real === T.value }, e.item)), [u("div", Le, [Dt.has(e.item.key) ? (h(), l("p", {
|
|
521
|
+
key: 0,
|
|
522
|
+
"aria-hidden": !e.item.alt || void 0,
|
|
523
|
+
class: we(["bb-gallery__missing", { "bb-gallery__missing--blank": !e.item.alt }])
|
|
524
|
+
}, _(e.item.alt), 11, Re)) : (h(), l("img", p({
|
|
525
|
+
key: 1,
|
|
526
|
+
alt: e.item.alt,
|
|
527
|
+
class: ["bb-gallery__image", { "bb-gallery__image--sized": !!(e.item.width && e.item.height) }],
|
|
528
|
+
decoding: "async",
|
|
529
|
+
draggable: "false",
|
|
530
|
+
fetchpriority: !e.clone && e.real === T.value ? "high" : void 0,
|
|
531
|
+
height: e.item.height,
|
|
532
|
+
loading: ot(e) ? "eager" : "lazy",
|
|
533
|
+
sizes: e.item.srcset ? e.item.sizes ?? "100vw" : void 0,
|
|
534
|
+
src: e.item.src,
|
|
535
|
+
srcset: e.item.srcset,
|
|
536
|
+
style: st(e),
|
|
537
|
+
width: e.item.width
|
|
538
|
+
}, { ref_for: !0 }, v(k).image, {
|
|
539
|
+
onError: (t) => At(e.item.key),
|
|
540
|
+
onLoad: jt
|
|
541
|
+
}), null, 16, ze))])], 16, Ie))), 128))], 544),
|
|
542
|
+
d.items.length > 1 ? (h(), l(ye, { key: 0 }, [u("button", p({
|
|
543
|
+
"aria-label": v(x)("gallery.previous").value,
|
|
544
|
+
class: "bb-gallery__nav bb-gallery__nav--prev",
|
|
545
|
+
disabled: qe.value,
|
|
546
|
+
type: "button"
|
|
547
|
+
}, v(k).part("prev", { disabled: qe.value }), { onClick: a[0] ||= (e) => yt(-1) }), [xe(e, {
|
|
548
|
+
icon: v(n),
|
|
549
|
+
size: "24px"
|
|
550
|
+
}, null, 8, ["icon"])], 16, Be), u("button", p({
|
|
551
|
+
"aria-label": v(x)("gallery.next").value,
|
|
552
|
+
class: "bb-gallery__nav bb-gallery__nav--next",
|
|
553
|
+
disabled: Je.value,
|
|
554
|
+
type: "button"
|
|
555
|
+
}, v(k).part("next", { disabled: Je.value }), { onClick: a[1] ||= (e) => yt(1) }), [xe(e, {
|
|
556
|
+
icon: v(r),
|
|
557
|
+
size: "24px"
|
|
558
|
+
}, null, 8, ["icon"])], 16, Ve)], 64)) : c("", !0),
|
|
559
|
+
u("p", He, _(Mt.value), 1)
|
|
560
|
+
]),
|
|
561
|
+
i.$slots.footer || d.items.length > 1 || Rt.value ? (h(), l("div", p({
|
|
562
|
+
key: 0,
|
|
563
|
+
class: "bb-gallery__footer"
|
|
564
|
+
}, v(k).footer), [!i.$slots.footer || Rt.value ? (h(), l("div", Ue, [Lt.value ? (h(), l("p", p({
|
|
565
|
+
key: 0,
|
|
566
|
+
id: It,
|
|
567
|
+
class: ["bb-gallery__caption", { "bb-gallery__caption--open": H.value }],
|
|
568
|
+
tabindex: H.value ? 0 : void 0
|
|
569
|
+
}, v(k).caption), [u("span", {
|
|
570
|
+
ref_key: "captionEl",
|
|
571
|
+
ref: Ft,
|
|
572
|
+
class: "bb-gallery__caption-text"
|
|
573
|
+
}, _(Lt.value), 513), zt.value || H.value ? (h(), l("button", p({
|
|
574
|
+
key: 0,
|
|
575
|
+
"aria-controls": It,
|
|
576
|
+
"aria-expanded": H.value,
|
|
577
|
+
class: "bb-gallery__more",
|
|
578
|
+
type: "button"
|
|
579
|
+
}, v(k).more, { onClick: a[2] ||= (e) => H.value = !H.value }), _(H.value ? v(x)("gallery.less").value : v(x)("gallery.more").value), 17, Ge)) : c("", !0)], 16, We)) : c("", !0), !i.$slots.footer && d.items.length > 1 ? (h(), l("p", p({
|
|
580
|
+
key: 1,
|
|
581
|
+
"aria-hidden": "true",
|
|
582
|
+
class: "bb-gallery__counter"
|
|
583
|
+
}, v(k).counter), _(T.value + 1) + " / " + _(d.items.length), 17)) : c("", !0)])) : c("", !0), i.$slots.footer ? Ae(i.$slots, "footer", Te(Ce(it.value)), void 0, void 0, 1) : c("", !0)], 16)) : c("", !0)
|
|
584
|
+
], 64)) : c("", !0)], 16, Fe));
|
|
585
|
+
}
|
|
586
|
+
});
|
|
587
|
+
export { b as default };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// src/components/BbGallery/findItem.ts
|
|
2
|
+
var e = (e) => typeof e == "string" ? {
|
|
3
|
+
src: e,
|
|
4
|
+
alt: "",
|
|
5
|
+
key: e
|
|
6
|
+
} : {
|
|
7
|
+
...e,
|
|
8
|
+
alt: e.alt ?? "",
|
|
9
|
+
key: e.src ?? e.srcset ?? ""
|
|
10
|
+
}, t = (e) => {
|
|
11
|
+
let t = [], n = 0, r = e.length, i = (e) => /[\s]/.test(e);
|
|
12
|
+
for (; n < r;) {
|
|
13
|
+
for (; n < r && (i(e[n]) || e[n] === ",");) n++;
|
|
14
|
+
if (n >= r) break;
|
|
15
|
+
let a = "";
|
|
16
|
+
for (; n < r && !i(e[n]);) a += e[n++];
|
|
17
|
+
let o = a.replace(/,+$/, "");
|
|
18
|
+
if (o && t.push(o), a !== o) continue;
|
|
19
|
+
let s = 0;
|
|
20
|
+
for (; n < r;) {
|
|
21
|
+
let t = e[n++];
|
|
22
|
+
if (t === "(") s++;
|
|
23
|
+
else if (t === ")") s--;
|
|
24
|
+
else if (t === "," && s <= 0) break;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return t;
|
|
28
|
+
}, n = (e) => {
|
|
29
|
+
try {
|
|
30
|
+
return new URL(e, document.baseURI).href;
|
|
31
|
+
} catch {
|
|
32
|
+
return e;
|
|
33
|
+
}
|
|
34
|
+
}, r = (e, r) => {
|
|
35
|
+
if (!e.length) return -1;
|
|
36
|
+
if (r == null) return 0;
|
|
37
|
+
if (typeof r == "number") return Number.isInteger(r) && r >= 0 && r < e.length ? r : -1;
|
|
38
|
+
let i = n(r);
|
|
39
|
+
return e.findIndex((e) => !!e.src && n(e.src) === i || !!e.srcset && t(e.srcset).some((e) => n(e) === i));
|
|
40
|
+
};
|
|
41
|
+
export { r as findGalleryItem, t as srcsetUrls, e as toPhoto };
|