@mkbabb/glass-ui 3.11.2 → 3.13.0
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/dist/{CardAction-DuArVky-.js → CardAction-Cj2eycQ2.js} +2 -2
- package/dist/{CommandShortcut-CefCj5mt.js → CommandShortcut-RowNEO6i.js} +4 -4
- package/dist/{ContextMenuSubContent-Bhg4f5jX.js → ContextMenuSubContent-BQmxTAdw.js} +4 -4
- package/dist/{DataTable-CUHMukiQ.js → DataTable-BCddn3T3.js} +3 -3
- package/dist/{DialogContent-BRkT1cjP.js → DialogContent-Dl9WkAoS.js} +3 -3
- package/dist/{DialogFooter-Gprw8H_A.js → DialogFooter-Blu4t7tJ.js} +2 -2
- package/dist/{HoverPopover-2LOIW34a.js → HoverPopover-CISOJQuZ.js} +1 -1
- package/dist/{IconTooltip-Cus0fvK0.js → IconTooltip-DPzE09X9.js} +1 -1
- package/dist/MetricBadge-C9QMz1KT.js +79 -0
- package/dist/{Notification-DLMhblXR.js → Notification-DdwNxIrI.js} +2 -2
- package/dist/{NumberFieldContent-BbLOh8RU.js → NumberFieldContent-CqaN-SvN.js} +3 -3
- package/dist/{PopoverContent-BId6ggf_.js → PopoverContent-BYwt2-4x.js} +1 -1
- package/dist/{ScrollingText-BPP84wKo.js → ScrollingText-DfFrwSph.js} +1 -1
- package/dist/{SelectScrollDownButton-T32cVFeM.js → SelectScrollDownButton-CiDUxfEj.js} +6 -6
- package/dist/{Switch-Ch-k3Rv-.js → Switch-CsIuYP_e.js} +1 -1
- package/dist/{TabsList-B8CVOQPC.js → TabsList-Dttss653.js} +9 -5
- package/dist/{Toaster-1rYWrmAm.js → Toaster-D6q4HtXu.js} +50 -47
- package/dist/{ToggleGroupItem-COu_4IW4.js → ToggleGroupItem-D_AHlRw9.js} +18 -22
- package/dist/animated-digit.js +2 -2
- package/dist/api/index.d.ts +5 -2
- package/dist/api.js +2 -2
- package/dist/aurora.js +69 -69
- package/dist/{badge-CaoFJzRb.js → badge-UILT_3pZ.js} +1 -1
- package/dist/badge.js +1 -1
- package/dist/{button-DN39cGqL.js → button-ChXMfsud.js} +12 -12
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/carousel.js +8 -8
- package/dist/{check-BBKKKSTf.js → check-njhk-vfu.js} +1 -1
- package/dist/{chevron-down-BSkTP2aL.js → chevron-down-DKkxb4VV.js} +1 -1
- package/dist/{chevron-right-sDM0Yvrf.js → chevron-right-CPXbqQQz.js} +1 -1
- package/dist/{chevron-up-CCOD_FTz.js → chevron-up-n_24SqI-.js} +1 -1
- package/dist/coalesceMetric-5qIeZnTx.js +13 -0
- package/dist/{color-C5ls_QF7.js → color-CUYeFbgd.js} +9 -7
- package/dist/color.js +1 -1
- package/dist/command.js +1 -1
- package/dist/components/custom/animated-digit/AnimatedDigit.vue.d.ts +8 -0
- package/dist/components/custom/aurora/constants/presets.d.ts +5 -62
- package/dist/components/custom/aurora/constants/shaders/mediums.glsl.d.ts +1 -1
- package/dist/components/custom/aurora/constants/shaders/vangogh-medium.glsl.d.ts +1 -0
- package/dist/components/custom/aurora/index.d.ts +1 -1
- package/dist/components/custom/configurator/ConfiguratorRow.vue.d.ts +16 -0
- package/dist/components/custom/constellation/Constellation.vue.d.ts +74 -6
- package/dist/components/custom/constellation/composables/createConstellationField.d.ts +41 -0
- package/dist/components/custom/constellation/composables/useConstellationPointer.d.ts +35 -0
- package/dist/components/custom/constellation/constants.d.ts +61 -0
- package/dist/components/custom/constellation/constellationDraw.d.ts +30 -0
- package/dist/components/custom/constellation/constellationField.d.ts +116 -149
- package/dist/components/custom/constellation/constellationInteraction.d.ts +132 -0
- package/dist/components/custom/constellation/index.d.ts +5 -2
- package/dist/components/custom/controls/DarkModeToggle.vue.d.ts +11 -0
- package/dist/components/custom/dock/DockRail.vue.d.ts +88 -0
- package/dist/components/custom/dock/DockTabButton.vue.d.ts +3 -4
- package/dist/components/custom/dock/GlassDock.vue.d.ts +5 -118
- package/dist/components/custom/dock/composables/dockMorphContext.d.ts +36 -0
- package/dist/components/custom/dock/composables/index.d.ts +1 -0
- package/dist/components/custom/dock/composables/useDockClickIntegrity.d.ts +23 -0
- package/dist/components/custom/dock/composables/useDockMorphWindow.d.ts +15 -0
- package/dist/components/custom/dock/composables/useDockOrientationMorph.d.ts +44 -0
- package/dist/components/custom/dock/composables/useDockShellProps.d.ts +165 -0
- package/dist/components/custom/dock/composables/useLayerTransition.d.ts +44 -0
- package/dist/components/custom/dock/constants.d.ts +48 -0
- package/dist/components/custom/dock/index.d.ts +3 -0
- package/dist/components/custom/expandable-container/ExpandableContainer.vue.d.ts +5 -37
- package/dist/components/custom/fourier-field/index.d.ts +1 -1
- package/dist/components/custom/fourier-field/math.d.ts +17 -0
- package/dist/components/custom/fourier-field/presets.d.ts +54 -0
- package/dist/components/custom/goo-blob/composables/buildMetaballProgram.d.ts +18 -0
- package/dist/components/custom/goo-blob/composables/uploadBlobUniforms.d.ts +41 -0
- package/dist/components/custom/goo-blob/composables/useBlobPointer.d.ts +4 -3
- package/dist/components/custom/goo-blob/composables/useMetaballRenderer.d.ts +11 -8
- package/dist/components/custom/goo-blob/constants.d.ts +52 -0
- package/dist/components/custom/goo-blob/shaders/metaball-uniforms.glsl.d.ts +1 -0
- package/dist/components/custom/instrument-chassis/InstrumentChassis.vue.d.ts +2 -2
- package/dist/components/custom/labeled-field/LabeledField.vue.d.ts +37 -0
- package/dist/components/custom/labeled-field/LabeledSelect.vue.d.ts +6 -0
- package/dist/components/custom/labeled-field/LabeledSlider.vue.d.ts +6 -0
- package/dist/components/custom/labeled-field/LabeledSwitch.vue.d.ts +6 -0
- package/dist/components/custom/metric-badge/MetricBadge.vue.d.ts +11 -18
- package/dist/components/custom/metric-badge/index.d.ts +1 -0
- package/dist/components/custom/metric-cell/MetricCell.vue.d.ts +15 -4
- package/dist/components/custom/metric-stack/MetricRow.vue.d.ts +6 -4
- package/dist/components/custom/tabs/constants.d.ts +12 -0
- package/dist/components/custom/underline/GlassUnderline.vue.d.ts +84 -0
- package/dist/components/custom/underline/index.d.ts +2 -0
- package/dist/components/custom/underline/types.d.ts +56 -0
- package/dist/components/ui/card/Card.vue.d.ts +15 -3
- package/dist/components/ui/drawer/Drawer.vue.d.ts +1 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +2 -2
- package/dist/components/ui/metric-pill/MetricPill.vue.d.ts +6 -3
- package/dist/components/ui/slider/index.d.ts +22 -19
- package/dist/components/ui/tabs/TabsIndicator.vue.d.ts +4 -1
- package/dist/components/ui/toast/use-toast.d.ts +2 -2
- package/dist/components/ui/toggle/Toggle.vue.d.ts +1 -1
- package/dist/components/ui/toggle/index.d.ts +1 -1
- package/dist/components/ui/toggle-group/ToggleGroup.vue.d.ts +1 -7
- package/dist/components/ui/toggle-group/ToggleGroupItem.vue.d.ts +1 -3
- package/dist/components/ui/toggle-group/toggleGroupContext.d.ts +0 -13
- package/dist/composables/color/index.d.ts +12 -0
- package/dist/composables/dark/index.d.ts +1 -1
- package/dist/composables/dark/useGlobalDark.d.ts +1 -21
- package/dist/composables/glass/index.d.ts +0 -1
- package/dist/composables/glass/useGlassBackdropLuminance.d.ts +59 -0
- package/dist/composables/glass/useSpecularTracking.d.ts +12 -3
- package/dist/composables/motion/core/index.d.ts +1 -1
- package/dist/composables/motion/curves.d.ts +48 -0
- package/dist/composables/motion/index.d.ts +2 -0
- package/dist/composables/motion/springPresets.d.ts +33 -0
- package/dist/composables/motion/suite.d.ts +2 -0
- package/dist/composables/motion/useLiquidFlex.d.ts +85 -0
- package/dist/composables/motion/useSpringMount.d.ts +1 -1
- package/dist/configurator.js +1 -1
- package/dist/confirm-dialog.js +2 -2
- package/dist/constellation.js +336 -222
- package/dist/context-menu.js +2 -2
- package/dist/controls.js +47 -13
- package/dist/dark.d.ts +1 -1
- package/dist/dark.js +1 -1
- package/dist/data-table.js +1 -1
- package/dist/dialog.js +2 -2
- package/dist/dock.js +705 -365
- package/dist/dockContext-BegmJVmx.js +17 -0
- package/dist/dom.js +5 -5
- package/dist/{dropdown-menu-D77jX6Df.js → dropdown-menu-DzkkyBwX.js} +11 -8
- package/dist/dropdown-menu.js +1 -1
- package/dist/expandable-container.js +39 -80
- package/dist/forms.js +5 -5
- package/dist/fourier-field.js +134 -99
- package/dist/fourier-math.js +2 -2
- package/dist/glass-panel.js +86 -20
- package/dist/glass-ui.css +1 -1
- package/dist/glass-ui.js +222 -212
- package/dist/goo-blob.js +243 -212
- package/dist/hover-card.js +1 -1
- package/dist/hover-popover.js +1 -1
- package/dist/icon-tooltip.js +1 -1
- package/dist/index.d.ts +1 -3
- package/dist/instrument-chassis.js +1 -1
- package/dist/keyboard.js +1 -1
- package/dist/label.js +1 -1
- package/dist/labeled-field.js +28 -18
- package/dist/{math-DTpRVC0e.js → math-U6-RrLmV.js} +18 -2
- package/dist/metric-badge.js +1 -1
- package/dist/metric-cell.js +25 -21
- package/dist/metric-stack.js +35 -34
- package/dist/{minimize-2-lcXOuc6V.js → minimize-2-BV31Ob_h.js} +1 -1
- package/dist/motion-core.js +32 -137
- package/dist/motion-curves.d.ts +1 -0
- package/dist/motion-curves.js +130 -0
- package/dist/motion.js +38 -37
- package/dist/notification.js +1 -1
- package/dist/number-field.js +1 -1
- package/dist/paper-backdrop.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/{presets-BP_ALM0m.js → presets-BKVyQfbt.js} +1 -14
- package/dist/progress.js +1 -1
- package/dist/reactive.js +2 -2
- package/dist/scrolling-text.js +1 -1
- package/dist/{search-nbkvr2dC.js → search-BSGrf2Sk.js} +1 -1
- package/dist/search.js +9 -9
- package/dist/select.js +3 -3
- package/dist/separator.js +1 -1
- package/dist/{sheet-VZEtNFvO.js → sheet-1fChZjtw.js} +3 -3
- package/dist/sheet.js +1 -1
- package/dist/{slider-ClgpP7EB.js → slider-B-JP2JlI.js} +4 -4
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +2 -2
- package/dist/springPresets--YdWTHtm.js +40 -0
- package/dist/stacked-icons.js +6 -6
- package/dist/styles/animations.css +29 -114
- package/dist/styles/cards.css +55 -0
- package/dist/styles/components.css +4 -1
- package/dist/styles/configurator.css +42 -0
- package/dist/styles/dock/layer-group.css +83 -25
- package/dist/styles/dock/layers.css +23 -1
- package/dist/styles/dock/morph-bridge.css +123 -0
- package/dist/styles/dock/morph.css +175 -45
- package/dist/styles/dock/overflow.css +51 -1
- package/dist/styles/dock/rail-extend.css +300 -0
- package/dist/styles/dock/shell.css +63 -105
- package/dist/styles/dock-controls/dark-mode-toggle.css +109 -0
- package/dist/styles/dock-controls/icon-button.css +133 -0
- package/dist/styles/dock-controls/tab-button.css +202 -0
- package/dist/styles/dock-controls/touch-floor.css +94 -0
- package/dist/styles/dock-controls/triggers.css +128 -0
- package/dist/styles/dock-controls.css +30 -595
- package/dist/styles/dock.css +2 -0
- package/dist/styles/drawer.css +2 -0
- package/dist/styles/floating-panel.css +17 -0
- package/dist/styles/glass/a11y-fallback.css +245 -0
- package/dist/styles/glass/ladder.css +337 -0
- package/dist/styles/glass/material.css +238 -0
- package/dist/styles/glass/progress-rail.css +78 -0
- package/dist/styles/glass/squircle.css +66 -0
- package/dist/styles/glass/surfaces.css +306 -0
- package/dist/styles/glass-refract.css +2 -0
- package/dist/styles/glass.css +31 -1188
- package/dist/styles/hover-popover.css +2 -0
- package/dist/styles/index.css +28 -14
- package/dist/styles/instrument-chassis.css +4 -0
- package/dist/styles/paper.css +2 -68
- package/dist/styles/segmented-tabs.css +275 -0
- package/dist/styles/theme/bridges.css +337 -0
- package/dist/styles/theme/dark.css +7 -0
- package/dist/styles/theme/literals.css +94 -0
- package/dist/styles/theme/radius.css +95 -0
- package/dist/styles/theme.css +26 -529
- package/dist/styles/tokens/color-radius.css +260 -0
- package/dist/styles/tokens/dark-arm.css +200 -0
- package/dist/styles/tokens/glass.css +440 -0
- package/dist/styles/tokens/light-dark.css +158 -0
- package/dist/styles/tokens/offsets-sizing.css +500 -0
- package/dist/styles/tokens/property-regs.css +169 -0
- package/dist/styles/tokens/scale-paper.css +366 -0
- package/dist/styles/tokens/scheme-motion.css +334 -0
- package/dist/styles/tokens/shadow.css +166 -0
- package/dist/styles/tokens.css +22 -2360
- package/dist/styles/typography.css +75 -21
- package/dist/styles/utilities/a11y-overrides.css +140 -0
- package/dist/styles/utilities/animate.css +26 -0
- package/dist/styles/utilities/base.css +365 -0
- package/dist/styles/utilities/btn.css +401 -0
- package/dist/styles/utilities/components.css +317 -0
- package/dist/styles/utilities.css +19 -1291
- package/dist/styles/view-transition.css +0 -51
- package/dist/switch.js +1 -1
- package/dist/tabs.js +91 -82
- package/dist/timeline.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/toggle-group.js +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/underline.d.ts +1 -0
- package/dist/underline.js +85 -0
- package/dist/{useAnimatedNumber-Bcpy5Etf.js → useAnimatedNumber-C5I3wWd8.js} +1 -1
- package/dist/{useConfiguratorState-DxAqksK6.js → useConfiguratorState-DAoeHVue.js} +8 -8
- package/dist/{useGlobalDark-CAhOXNLO.js → useGlobalDark-yhL4Wp-s.js} +3 -22
- package/dist/useLiquidFlex-BL0lLLN2.js +30 -0
- package/dist/useRAFLoop-Bxv0o6L5.js +109 -0
- package/dist/{useScrollProgress-CffFGLa5.js → useScrollProgress-Dlvx-L3v.js} +1 -1
- package/dist/useSpecularTracking-Bo5su68i.js +32 -0
- package/dist/useSpringMount-CI2jOstM.js +108 -0
- package/dist/{useTouchGate-WFyJYsth.js → useTouchGate-Dg7MQI1G.js} +1 -1
- package/dist/utils/coalesceMetric.d.ts +29 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/vReveal-CqaCz_mC.js +44 -0
- package/dist/watercolor-dot.js +11 -9
- package/dist/{x-Dfsegz9Y.js → x-BUwTKe50.js} +1 -1
- package/package.json +78 -58
- package/src/styles/animations.css +29 -114
- package/src/styles/cards.css +53 -0
- package/src/styles/configurator.css +42 -0
- package/src/styles/dock/layer-group.css +83 -25
- package/src/styles/dock/layers.css +23 -1
- package/src/styles/dock/morph-bridge.css +123 -0
- package/src/styles/dock/morph.css +175 -45
- package/src/styles/dock/overflow.css +51 -1
- package/src/styles/dock/rail-extend.css +300 -0
- package/src/styles/dock/shell.css +63 -105
- package/src/styles/dock-controls/dark-mode-toggle.css +109 -0
- package/src/styles/dock-controls/icon-button.css +133 -0
- package/src/styles/dock-controls/tab-button.css +202 -0
- package/src/styles/dock-controls/touch-floor.css +94 -0
- package/src/styles/dock-controls/triggers.css +128 -0
- package/src/styles/dock-controls.css +30 -595
- package/src/styles/dock.css +2 -0
- package/src/styles/floating-panel.css +15 -0
- package/src/styles/glass/a11y-fallback.css +245 -0
- package/src/styles/glass/ladder.css +337 -0
- package/src/styles/glass/material.css +238 -0
- package/src/styles/glass/progress-rail.css +78 -0
- package/src/styles/glass/squircle.css +66 -0
- package/src/styles/glass/surfaces.css +306 -0
- package/src/styles/glass.css +31 -1188
- package/src/styles/index.css +28 -14
- package/src/styles/paper.css +2 -68
- package/src/styles/segmented-tabs.css +271 -0
- package/src/styles/theme/bridges.css +337 -0
- package/src/styles/theme/dark.css +7 -0
- package/src/styles/theme/literals.css +94 -0
- package/src/styles/theme/radius.css +95 -0
- package/src/styles/theme.css +26 -529
- package/src/styles/tokens/color-radius.css +260 -0
- package/src/styles/tokens/dark-arm.css +200 -0
- package/src/styles/tokens/glass.css +440 -0
- package/src/styles/tokens/light-dark.css +158 -0
- package/src/styles/tokens/offsets-sizing.css +500 -0
- package/src/styles/tokens/property-regs.css +169 -0
- package/src/styles/tokens/scale-paper.css +366 -0
- package/src/styles/tokens/scheme-motion.css +334 -0
- package/src/styles/tokens/shadow.css +166 -0
- package/src/styles/tokens.css +22 -2360
- package/src/styles/typography.css +75 -21
- package/src/styles/utilities/a11y-overrides.css +140 -0
- package/src/styles/utilities/animate.css +26 -0
- package/src/styles/utilities/base.css +365 -0
- package/src/styles/utilities/btn.css +401 -0
- package/src/styles/utilities/components.css +317 -0
- package/src/styles/utilities.css +19 -1291
- package/src/styles/view-transition.css +0 -51
- package/dist/DeckProgress-Dmk4_AKN.js +0 -23
- package/dist/InstrumentRail-CUJ05YVG.js +0 -44
- package/dist/MetricBadge-BZVWIxNy.js +0 -80
- package/dist/components/custom/deck-progress/DeckProgress.vue.d.ts +0 -27
- package/dist/components/custom/deck-progress/index.d.ts +0 -2
- package/dist/components/custom/dialog-native/GlassDialogNative.vue.d.ts +0 -57
- package/dist/components/custom/dialog-native/index.d.ts +0 -1
- package/dist/components/custom/handmark/HandMark.vue.d.ts +0 -29
- package/dist/components/custom/handmark/brush.d.ts +0 -242
- package/dist/components/custom/handmark/freehand.d.ts +0 -69
- package/dist/components/custom/handmark/geometry.d.ts +0 -50
- package/dist/components/custom/handmark/index.d.ts +0 -21
- package/dist/components/custom/handmark/ink.d.ts +0 -11
- package/dist/components/custom/handmark/texture.d.ts +0 -39
- package/dist/components/custom/handmark/types.d.ts +0 -53
- package/dist/components/custom/handmark/useHandMark.d.ts +0 -87
- package/dist/components/custom/instrument-rail/InstrumentRail.vue.d.ts +0 -91
- package/dist/components/custom/instrument-rail/index.d.ts +0 -2
- package/dist/composables/motion/useRouteTransition.d.ts +0 -42
- package/dist/deck-progress.d.ts +0 -1
- package/dist/deck-progress.js +0 -2
- package/dist/dockContext-BKeIMmNk.js +0 -9
- package/dist/handmark.d.ts +0 -1
- package/dist/handmark.js +0 -663
- package/dist/instrument-rail.d.ts +0 -1
- package/dist/instrument-rail.js +0 -2
- package/dist/styles/instrument-rail.css +0 -127
- package/dist/useGlassRenderer-D7YGOYiM.js +0 -69
- package/dist/useSpecularTracking-BVRZsRHA.js +0 -26
- package/dist/useSpringMount-BJSHcLl3.js +0 -113
- package/dist/useViewTransition-DaN5Zrox.js +0 -21
- package/dist/vReveal-zUIQk-rJ.js +0 -53
- package/src/styles/instrument-rail.css +0 -127
- /package/dist/{ContextMenuContent-DDa0v27s.js → ContextMenuContent-CT3AS1WX.js} +0 -0
- /package/dist/{HoverCardContent-B6CcQ8He.js → HoverCardContent-Csywg3YF.js} +0 -0
- /package/dist/{Input-xuDwALQR.js → Input-DWQQIOC4.js} +0 -0
- /package/dist/{InstrumentChassis-C2f6cBaQ.js → InstrumentChassis-UUJX0-mW.js} +0 -0
- /package/dist/{Label-zRfbQdCn.js → Label-r3WzWrsj.js} +0 -0
- /package/dist/{ModalOverlay-B1GkAjNb.js → ModalOverlay-DVLI2VRr.js} +0 -0
- /package/dist/{PaperBackdrop-CqwjnfLv.js → PaperBackdrop-DIXTtVq6.js} +0 -0
- /package/dist/{Progress-iEuD9pxG.js → Progress-DwlUKGbr.js} +0 -0
- /package/dist/{SelectGroup-BFiod7X2.js → SelectGroup-aumMgWLs.js} +0 -0
- /package/dist/{SelectSeparator-C4Ql0gzV.js → SelectSeparator-BQ_1Fcbp.js} +0 -0
- /package/dist/{Separator-D7sD7RKj.js → Separator-0JE6LtNu.js} +0 -0
- /package/dist/{TooltipProvider-CmZzCuaG.js → TooltipProvider-B3MkB_8P.js} +0 -0
- /package/dist/{compile-BOXjLUxu.js → compile-B7NGOBcP.js} +0 -0
- /package/dist/{constants-yKeKnE84.js → constants-CS75AWHG.js} +0 -0
- /package/dist/{createContext-B44Sah_H.js → createContext-BM46COQ-.js} +0 -0
- /package/dist/{createLucideIcon-B6uNAU9G.js → createLucideIcon-DydS2qgk.js} +0 -0
- /package/dist/{menuItemVariants-CCoBNkU5.js → menuItemVariants-DPiEarb0.js} +0 -0
- /package/dist/{supportsCssTimeline-C5oe0lnD.js → supportsCssTimeline-BWenxvHU.js} +0 -0
- /package/dist/{useIntersectionPause-Cck5Uxk8.js → useIntersectionPause-Cc-H9ees.js} +0 -0
- /package/dist/{useInterval-Dsmqwi03.js → useInterval-iHludrxk.js} +0 -0
- /package/dist/{useKeyboardShortcuts-CyIYrndH.js → useKeyboardShortcuts-Be3w_Rwk.js} +0 -0
- /package/dist/{useResizeObserver-CWCbk5Px.js → useResizeObserver-BhgdhOIj.js} +0 -0
- /package/dist/{useResolveTokenColor-r9pnNjqK.js → useResolveTokenColor-Dvn2RZJW.js} +0 -0
- /package/dist/{useSortable-C8ReQ50P.js → useSortable-muI29agz.js} +0 -0
- /package/dist/{useTextHighlight-CWEi25hf.js → useTextHighlight-DmRYkOBx.js} +0 -0
- /package/dist/{useTimer-3xqf_54b.js → useTimer-Dzarvzuk.js} +0 -0
- /package/dist/{useUserInvalidAria-DoJKMZ3s.js → useUserInvalidAria-B2h6jAM_.js} +0 -0
- /package/dist/{useViewportReady-RIr5Wgkh.js → useViewportReady-B40FK4Pa.js} +0 -0
package/dist/dock.js
CHANGED
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
import { t as e } from "./cn-DJXf4yaB.js";
|
|
2
|
-
import { t } from "./createLucideIcon-
|
|
3
|
-
import { t as n } from "./chevron-down-
|
|
4
|
-
import { t as r } from "./
|
|
5
|
-
import { t as i } from "./
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
2
|
+
import { t } from "./createLucideIcon-DydS2qgk.js";
|
|
3
|
+
import { t as n } from "./chevron-down-DKkxb4VV.js";
|
|
4
|
+
import { t as r } from "./chevron-right-CPXbqQQz.js";
|
|
5
|
+
import { t as i } from "./useSpecularTracking-Bo5su68i.js";
|
|
6
|
+
import { t as a } from "./useResizeObserver-BhgdhOIj.js";
|
|
7
|
+
import { t as o } from "./useTouchGate-Dg7MQI1G.js";
|
|
8
|
+
import { n as s } from "./useResolveTokenColor-Dvn2RZJW.js";
|
|
9
|
+
import { n as c, t as l } from "./createContext-BM46COQ-.js";
|
|
10
|
+
import { a as u, c as d, i as f, n as p, o as m, r as h, s as g, t as _ } from "./dockContext-BegmJVmx.js";
|
|
11
|
+
import { i as v, n as y, r as b, t as x } from "./TabsList-Dttss653.js";
|
|
12
|
+
import { t as S } from "./useLiquidFlex-BL0lLLN2.js";
|
|
13
|
+
import { t as C } from "./useIntersectionPause-Cc-H9ees.js";
|
|
14
|
+
import { t as w } from "./useRAFLoop-Bxv0o6L5.js";
|
|
15
|
+
import { Fragment as T, computed as E, createBlock as D, createCommentVNode as O, createElementBlock as k, createElementVNode as A, createVNode as j, defineComponent as M, mergeModels as N, mergeProps as P, nextTick as F, normalizeClass as I, normalizeStyle as L, onBeforeUnmount as R, onMounted as ee, onScopeDispose as z, onUnmounted as B, openBlock as V, readonly as H, ref as U, renderList as te, renderSlot as W, resolveDynamicComponent as G, toDisplayString as ne, unref as K, useAttrs as re, useId as ie, useModel as q, useSlots as ae, useTemplateRef as J, watch as Y, withCtx as X } from "vue";
|
|
16
|
+
import { DropdownMenuTrigger as oe, Primitive as se, SelectIcon as Z, SelectTrigger as ce, useForwardProps as le } from "reka-ui";
|
|
17
|
+
import { SpringProgress as Q } from "@mkbabb/keyframes.js";
|
|
18
|
+
var ue = t("pause", [["rect", {
|
|
13
19
|
x: "14",
|
|
14
20
|
y: "3",
|
|
15
21
|
width: "5",
|
|
@@ -23,152 +29,276 @@ var K = t("pause", [["rect", {
|
|
|
23
29
|
height: "18",
|
|
24
30
|
rx: "1",
|
|
25
31
|
key: "1wsw3u"
|
|
26
|
-
}]]),
|
|
32
|
+
}]]), de = t("play", [["path", {
|
|
27
33
|
d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",
|
|
28
34
|
key: "10ikf1"
|
|
29
|
-
}]]),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
}]]), fe = "(prefers-reduced-motion: reduce)", $ = 32;
|
|
36
|
+
function pe(e) {
|
|
37
|
+
return typeof HTMLCanvasElement < "u" && e instanceof HTMLCanvasElement;
|
|
38
|
+
}
|
|
39
|
+
function me(e) {
|
|
40
|
+
let t = e / 255;
|
|
41
|
+
return t <= .03928 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
|
|
42
|
+
}
|
|
43
|
+
function he(e, t, n) {
|
|
44
|
+
return .2126 * me(e) + .7152 * me(t) + .0722 * me(n);
|
|
45
|
+
}
|
|
46
|
+
function ge(e) {
|
|
47
|
+
let t = e.match(/rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:[,\s/]+([\d.]+))?/i);
|
|
48
|
+
return t ? [
|
|
49
|
+
Number(t[1]),
|
|
50
|
+
Number(t[2]),
|
|
51
|
+
Number(t[3]),
|
|
52
|
+
t[4] === void 0 ? 1 : Number(t[4])
|
|
53
|
+
] : null;
|
|
54
|
+
}
|
|
55
|
+
function _e(e) {
|
|
56
|
+
if (!e) return null;
|
|
57
|
+
if (pe(e)) return e;
|
|
58
|
+
if (typeof e == "function") {
|
|
59
|
+
let t = e();
|
|
60
|
+
return pe(t) ? t : null;
|
|
39
61
|
}
|
|
40
|
-
|
|
62
|
+
if (typeof e == "string" && typeof document < "u") {
|
|
63
|
+
let t = document.querySelector(e);
|
|
64
|
+
return pe(t) ? t : null;
|
|
65
|
+
}
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
function ve(e, t = {}) {
|
|
69
|
+
let { lightThreshold: n = .6, minSampleIntervalMs: r = 250, writeBucket: i = !0 } = t, o = Math.max(250, r), c = U(null), l = U(null);
|
|
70
|
+
if (typeof window > "u") return {
|
|
71
|
+
luma: H(c),
|
|
72
|
+
bucket: H(l),
|
|
73
|
+
sampleNow: () => {},
|
|
74
|
+
dispose: () => {}
|
|
75
|
+
};
|
|
76
|
+
let u = window.matchMedia(fe), d = u.matches, f = null, p = null;
|
|
77
|
+
function m() {
|
|
78
|
+
return f || (f = document.createElement("canvas"), f.width = $, f.height = $), p ||= f.getContext("2d", { willReadFrequently: !0 }), p;
|
|
79
|
+
}
|
|
80
|
+
function h() {
|
|
81
|
+
return t.live === void 0 ? e.value?.dataset.glassSample === "live" : t.live;
|
|
82
|
+
}
|
|
83
|
+
function g(e) {
|
|
84
|
+
let n = _e(t.backgroundCanvas);
|
|
85
|
+
if (!n || n.width === 0 || n.height === 0) return null;
|
|
86
|
+
let r = m();
|
|
87
|
+
if (!r) return null;
|
|
88
|
+
let i = e.getBoundingClientRect(), a = n.getBoundingClientRect();
|
|
89
|
+
if (a.width === 0 || a.height === 0) return null;
|
|
90
|
+
let o = n.width / a.width, s = n.height / a.height, c = Math.max(0, (i.left - a.left) * o), l = Math.max(0, (i.top - a.top) * s), u = Math.min(n.width - c, Math.max(1, i.width * o)), d = Math.min(n.height - l, Math.max(1, i.height * s));
|
|
91
|
+
if (u <= 0 || d <= 0) return null;
|
|
92
|
+
try {
|
|
93
|
+
r.clearRect(0, 0, $, $), r.drawImage(n, c, l, u, d, 0, 0, $, $);
|
|
94
|
+
let e = r.getImageData(0, 0, $, $).data, t = 0, i = 0;
|
|
95
|
+
for (let n = 0; n < e.length; n += 4) {
|
|
96
|
+
let r = e[n + 3] / 255, a = e[n] * r + 255 * (1 - r), o = e[n + 1] * r + 255 * (1 - r), s = e[n + 2] * r + 255 * (1 - r);
|
|
97
|
+
t += he(a, o, s), i++;
|
|
98
|
+
}
|
|
99
|
+
return i > 0 ? t / i : null;
|
|
100
|
+
} catch {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
function _(e) {
|
|
105
|
+
let t = e.getBoundingClientRect(), n = t.left + t.width / 2, r = t.top + t.height / 2, i = document.elementsFromPoint(n, r);
|
|
106
|
+
for (let t of i) {
|
|
107
|
+
if (!(t instanceof HTMLElement) || t === e || e.contains(t)) continue;
|
|
108
|
+
let n = getComputedStyle(t).backgroundColor, r = ge(s(n, e));
|
|
109
|
+
if (r && !(r[3] < .5)) return he(r[0], r[1], r[2]);
|
|
110
|
+
}
|
|
111
|
+
let a = ge(s(getComputedStyle(document.body).backgroundColor, e));
|
|
112
|
+
return a ? he(a[0], a[1], a[2]) : null;
|
|
113
|
+
}
|
|
114
|
+
function v(t) {
|
|
115
|
+
c.value = t;
|
|
116
|
+
let r = e.value;
|
|
117
|
+
if (r && (r.style.setProperty("--glass-backdrop-luma", t.toFixed(3)), i)) {
|
|
118
|
+
let e = t >= n ? "light" : "dark";
|
|
119
|
+
l.value = e, r.style.setProperty("--glass-backdrop", e);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
let y = 0;
|
|
123
|
+
function b() {
|
|
124
|
+
let t = e.value;
|
|
125
|
+
if (!t) return;
|
|
126
|
+
let n = h() ? g(t) ?? _(t) : _(t);
|
|
127
|
+
n !== null && v(n), y = typeof performance < "u" ? performance.now() : Date.now();
|
|
128
|
+
}
|
|
129
|
+
let x = w(({ now: e }) => {
|
|
130
|
+
d || e - y < o || b();
|
|
131
|
+
}, {
|
|
132
|
+
immediate: !1,
|
|
133
|
+
pauseWhenHidden: !0,
|
|
134
|
+
respectReducedMotion: !0
|
|
135
|
+
}), S = C(() => e.value, {
|
|
136
|
+
pause: () => x.pause(),
|
|
137
|
+
resume: () => {
|
|
138
|
+
h() && !d && x.resume();
|
|
139
|
+
}
|
|
140
|
+
}, { rootMargin: "200px" }), T = a(e, () => b());
|
|
141
|
+
function E() {
|
|
142
|
+
d = u.matches, d ? (x.stop(), b()) : h() && x.start();
|
|
143
|
+
}
|
|
144
|
+
let D = () => E();
|
|
145
|
+
typeof u.addEventListener == "function" && u.addEventListener("change", D);
|
|
146
|
+
let O = Y(() => e.value, (e) => {
|
|
147
|
+
e && (b(), E());
|
|
148
|
+
}, {
|
|
149
|
+
immediate: !0,
|
|
150
|
+
flush: "post"
|
|
151
|
+
});
|
|
152
|
+
function k() {
|
|
153
|
+
O(), x.dispose(), S.dispose(), T.stop(), typeof u.removeEventListener == "function" && u.removeEventListener("change", D), f = null, p = null;
|
|
154
|
+
}
|
|
155
|
+
return z(k), {
|
|
156
|
+
luma: H(c),
|
|
157
|
+
bucket: H(l),
|
|
158
|
+
sampleNow: b,
|
|
159
|
+
dispose: k
|
|
160
|
+
};
|
|
161
|
+
}
|
|
41
162
|
//#endregion
|
|
42
163
|
//#region src/components/custom/dock/composables/isTeleportedTarget.ts
|
|
43
|
-
function
|
|
164
|
+
function ye(e, t) {
|
|
44
165
|
if (!(e instanceof Element)) return !1;
|
|
45
166
|
let n = e.closest("[data-glass-dock-portal]");
|
|
46
167
|
return n ? t ? n.getAttribute("data-glass-dock-owner") === t : !0 : !1;
|
|
47
168
|
}
|
|
48
169
|
//#endregion
|
|
49
170
|
//#region src/components/custom/dock/composables/useDockState.ts
|
|
50
|
-
function
|
|
51
|
-
let { collapseDelay: t = 2500, rootEl: n, alwaysExpanded: r = !1, isTransitioning: i, dockId: a, onStateChange: o } = e, s = () => typeof r == "boolean" ? r : r.value, c = s(), l =
|
|
52
|
-
function
|
|
53
|
-
|
|
171
|
+
function be(e) {
|
|
172
|
+
let { collapseDelay: t = 2500, rootEl: n, alwaysExpanded: r = !1, isTransitioning: i, dockId: a, onStateChange: o } = e, s = () => typeof r == "boolean" ? r : r.value, c = s(), l = U(c ? "pinned" : "collapsed"), u = U(c), d = U(c), f = null, p = U(0), m = E(() => p.value > 0), h = null, g = null, _ = !1, v = null;
|
|
173
|
+
function y() {
|
|
174
|
+
v &&= (clearTimeout(v), null);
|
|
54
175
|
}
|
|
55
|
-
function
|
|
56
|
-
|
|
176
|
+
function b(e) {
|
|
177
|
+
if (!e) return !1;
|
|
178
|
+
let t = n.value;
|
|
179
|
+
if (!t || typeof t.getBoundingClientRect != "function" || !t.hasAttribute("data-morphing")) return !1;
|
|
180
|
+
let r = t.getBoundingClientRect();
|
|
181
|
+
return e.clientX >= r.left && e.clientX <= r.right && e.clientY >= r.top && e.clientY <= r.bottom ? e.clientX - r.left <= 24 || r.right - e.clientX <= 24 || e.clientY - r.top <= 24 || r.bottom - e.clientY <= 24 : !1;
|
|
57
182
|
}
|
|
183
|
+
let x = l.value;
|
|
58
184
|
function S() {
|
|
59
|
-
|
|
185
|
+
s() && (l.value = "pinned"), u.value = l.value !== "collapsed", d.value = l.value === "pinned", o && x !== l.value && o(l.value, x), x = l.value;
|
|
60
186
|
}
|
|
61
187
|
function C() {
|
|
62
|
-
|
|
188
|
+
f &&= (clearTimeout(f), null);
|
|
63
189
|
}
|
|
64
190
|
function w() {
|
|
65
|
-
|
|
66
|
-
T(), l.value = "collapsed", b();
|
|
67
|
-
}, t));
|
|
191
|
+
g !== null && (cancelAnimationFrame(g), g = null);
|
|
68
192
|
}
|
|
69
193
|
function T() {
|
|
194
|
+
w(), h?.();
|
|
195
|
+
}
|
|
196
|
+
function D() {
|
|
197
|
+
s() || p.value > 0 || (C(), f = setTimeout(() => {
|
|
198
|
+
O(), l.value = "collapsed", S();
|
|
199
|
+
}, t));
|
|
200
|
+
}
|
|
201
|
+
function O() {
|
|
70
202
|
typeof document > "u" || typeof PointerEvent > "u" || document.body.dispatchEvent(new PointerEvent("pointerdown", {
|
|
71
203
|
bubbles: !0,
|
|
72
204
|
composed: !0
|
|
73
205
|
}));
|
|
74
206
|
}
|
|
75
|
-
function
|
|
207
|
+
function k() {
|
|
76
208
|
if (s()) {
|
|
77
|
-
l.value = "pinned",
|
|
209
|
+
l.value = "pinned", S();
|
|
78
210
|
return;
|
|
79
211
|
}
|
|
80
|
-
|
|
212
|
+
_ ||= (_ = !0, C(), y(), O(), l.value = "collapsed", S(), !1);
|
|
81
213
|
}
|
|
82
|
-
function
|
|
214
|
+
function A() {
|
|
83
215
|
if (s()) {
|
|
84
|
-
l.value = "pinned",
|
|
216
|
+
l.value = "pinned", S();
|
|
85
217
|
return;
|
|
86
218
|
}
|
|
87
|
-
|
|
219
|
+
C(), y(), l.value = "hover", S();
|
|
88
220
|
}
|
|
89
|
-
function
|
|
90
|
-
s() || (
|
|
221
|
+
function j() {
|
|
222
|
+
s() || (C(), l.value === "collapsed" && (y(), v = setTimeout(() => {
|
|
223
|
+
v = null, !s() && l.value === "collapsed" && (l.value = "hover", S());
|
|
224
|
+
}, 60)));
|
|
91
225
|
}
|
|
92
|
-
function
|
|
93
|
-
if (!s() && l.value === "hover") {
|
|
226
|
+
function M(e) {
|
|
227
|
+
if (!s() && (y(), l.value === "hover")) {
|
|
94
228
|
if (p.value > 0) return;
|
|
95
229
|
if (e) {
|
|
96
230
|
let t = n.value;
|
|
97
|
-
if (t && e.relatedTarget instanceof Node && t.contains(e.relatedTarget) ||
|
|
231
|
+
if (t && e.relatedTarget instanceof Node && t.contains(e.relatedTarget) || ye(e.relatedTarget, a) || b(e)) return;
|
|
98
232
|
}
|
|
99
|
-
|
|
233
|
+
D();
|
|
100
234
|
}
|
|
101
235
|
}
|
|
102
|
-
function
|
|
103
|
-
s() || (
|
|
236
|
+
function N() {
|
|
237
|
+
s() || (C(), l.value === "collapsed" && (l.value = "hover", S()));
|
|
104
238
|
}
|
|
105
|
-
function
|
|
239
|
+
function P(e) {
|
|
106
240
|
if (s() || l.value !== "hover" || p.value > 0) return;
|
|
107
241
|
let t = e.currentTarget;
|
|
108
|
-
e.relatedTarget && t.contains(e.relatedTarget) ||
|
|
242
|
+
e.relatedTarget && t.contains(e.relatedTarget) || ye(e.relatedTarget, a) || D();
|
|
109
243
|
}
|
|
110
|
-
function
|
|
244
|
+
function F() {
|
|
111
245
|
if (s()) {
|
|
112
|
-
l.value = "pinned",
|
|
246
|
+
l.value = "pinned", S();
|
|
113
247
|
return;
|
|
114
248
|
}
|
|
115
|
-
|
|
249
|
+
C(), y(), l.value = "pinned", S();
|
|
116
250
|
}
|
|
117
|
-
function
|
|
118
|
-
p.value++,
|
|
251
|
+
function I() {
|
|
252
|
+
p.value++, C();
|
|
119
253
|
}
|
|
120
|
-
function
|
|
121
|
-
p.value = Math.max(0, p.value - 1), p.value === 0 && l.value === "hover" && (
|
|
122
|
-
p.value === 0 && l.value === "hover" &&
|
|
254
|
+
function L() {
|
|
255
|
+
p.value = Math.max(0, p.value - 1), p.value === 0 && l.value === "hover" && (C(), f = setTimeout(() => {
|
|
256
|
+
p.value === 0 && l.value === "hover" && D();
|
|
123
257
|
}, Math.min(t, 800)));
|
|
124
258
|
}
|
|
125
|
-
function
|
|
259
|
+
function R(e) {
|
|
126
260
|
if (s() || i?.value) return;
|
|
127
261
|
let t = n.value;
|
|
128
|
-
!t || t.contains(e.target) ||
|
|
262
|
+
!t || t.contains(e.target) || ye(e.target, a) || k();
|
|
129
263
|
}
|
|
130
|
-
return
|
|
131
|
-
e ? (
|
|
132
|
-
|
|
133
|
-
document.removeEventListener("pointerdown",
|
|
264
|
+
return Y(u, (e) => {
|
|
265
|
+
e ? (T(), g = requestAnimationFrame(() => {
|
|
266
|
+
g = null, u.value && (document.addEventListener("pointerdown", R, !0), h = () => {
|
|
267
|
+
document.removeEventListener("pointerdown", R, !0), h = null;
|
|
134
268
|
});
|
|
135
|
-
})) :
|
|
136
|
-
}), typeof r == "boolean" ? r && (l.value = "pinned",
|
|
269
|
+
})) : T();
|
|
270
|
+
}), typeof r == "boolean" ? r && (l.value = "pinned", S()) : Y(r, (e) => {
|
|
137
271
|
if (e) {
|
|
138
|
-
|
|
272
|
+
C(), l.value = "pinned", S();
|
|
139
273
|
return;
|
|
140
274
|
}
|
|
141
|
-
l.value = "collapsed",
|
|
142
|
-
}, { immediate: !0 }),
|
|
143
|
-
|
|
275
|
+
l.value = "collapsed", S();
|
|
276
|
+
}, { immediate: !0 }), B(() => {
|
|
277
|
+
C(), y(), T();
|
|
144
278
|
}), {
|
|
145
279
|
state: l,
|
|
146
280
|
expanded: u,
|
|
147
281
|
isPinned: d,
|
|
148
282
|
isHeld: m,
|
|
149
|
-
onMouseEnter:
|
|
150
|
-
onMouseLeave:
|
|
151
|
-
onFocusIn:
|
|
152
|
-
onFocusOut:
|
|
153
|
-
onClickCollapsed:
|
|
154
|
-
keepOpen:
|
|
155
|
-
release:
|
|
156
|
-
expand:
|
|
157
|
-
collapse:
|
|
283
|
+
onMouseEnter: j,
|
|
284
|
+
onMouseLeave: M,
|
|
285
|
+
onFocusIn: N,
|
|
286
|
+
onFocusOut: P,
|
|
287
|
+
onClickCollapsed: F,
|
|
288
|
+
keepOpen: I,
|
|
289
|
+
release: L,
|
|
290
|
+
expand: A,
|
|
291
|
+
collapse: k
|
|
158
292
|
};
|
|
159
293
|
}
|
|
160
294
|
//#endregion
|
|
161
295
|
//#region src/components/custom/dock/composables/dockMorphContext.ts
|
|
162
|
-
var
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}, Y = o("glass-ui:dock-morph-context");
|
|
166
|
-
Y.KEY;
|
|
167
|
-
function ue(e) {
|
|
168
|
-
Y.provide(e);
|
|
296
|
+
var xe = l(m), { KEY: Se } = xe;
|
|
297
|
+
function Ce(e) {
|
|
298
|
+
xe.provide(e);
|
|
169
299
|
}
|
|
170
|
-
var
|
|
171
|
-
function
|
|
300
|
+
var we = xe.use;
|
|
301
|
+
function Te(e) {
|
|
172
302
|
let { rootEl: t, outerEl: n, outerActiveLayer: r, outerAxis: i } = e, a = null, o = /* @__PURE__ */ new Set();
|
|
173
303
|
function s() {
|
|
174
304
|
return t.value;
|
|
@@ -204,13 +334,13 @@ function fe(e) {
|
|
|
204
334
|
let e = s();
|
|
205
335
|
e && (e.style.removeProperty("--dock-morph-t"), e.removeAttribute("data-morphing")), c();
|
|
206
336
|
}
|
|
207
|
-
function
|
|
337
|
+
function _() {
|
|
208
338
|
if (!s()) return;
|
|
209
339
|
let e = a !== null && !a.settled ? a.velocity : 0;
|
|
210
340
|
if (!a || a.settled) {
|
|
211
|
-
c(), a = new
|
|
212
|
-
response:
|
|
213
|
-
dampingFraction:
|
|
341
|
+
c(), a = new Q({
|
|
342
|
+
response: g.response,
|
|
343
|
+
dampingFraction: g.dampingFraction,
|
|
214
344
|
initial: 0,
|
|
215
345
|
respectReducedMotion: !0
|
|
216
346
|
});
|
|
@@ -227,7 +357,7 @@ function fe(e) {
|
|
|
227
357
|
});
|
|
228
358
|
} else a.reset(0, e), a.target = 1;
|
|
229
359
|
}
|
|
230
|
-
function
|
|
360
|
+
function v(e, t, n, r) {
|
|
231
361
|
if (t !== e.txId) return;
|
|
232
362
|
let i = e.containerEl.value, a = s();
|
|
233
363
|
if (!(!i || !a)) {
|
|
@@ -235,10 +365,10 @@ function fe(e) {
|
|
|
235
365
|
m(e), h();
|
|
236
366
|
return;
|
|
237
367
|
}
|
|
238
|
-
i.style.setProperty("--dock-morph-from", `${n}px`), i.style.setProperty("--dock-morph-to", `${r}px`), a.setAttribute("data-morphing", ""),
|
|
368
|
+
i.style.setProperty("--dock-morph-from", `${n}px`), i.style.setProperty("--dock-morph-to", `${r}px`), a.setAttribute("data-morphing", ""), _();
|
|
239
369
|
}
|
|
240
370
|
}
|
|
241
|
-
function
|
|
371
|
+
function y(e, t, n) {
|
|
242
372
|
if (t === n) return;
|
|
243
373
|
let r = e.containerEl.value, i = s();
|
|
244
374
|
if (!r || !i) {
|
|
@@ -263,75 +393,176 @@ function fe(e) {
|
|
|
263
393
|
let r = u(c);
|
|
264
394
|
t.style.setProperty(r, "max-content");
|
|
265
395
|
let i = d(t, c);
|
|
266
|
-
t.style.removeProperty(r),
|
|
396
|
+
t.style.removeProperty(r), v(e, a, l, i);
|
|
267
397
|
});
|
|
268
398
|
}
|
|
269
|
-
function
|
|
399
|
+
function b(e) {
|
|
270
400
|
let t = {
|
|
271
401
|
containerEl: e.containerEl,
|
|
272
402
|
activeLayer: e.activeLayer,
|
|
273
403
|
axis: e.axis,
|
|
274
|
-
currentLayer:
|
|
275
|
-
leavingLayer:
|
|
404
|
+
currentLayer: U(e.activeLayer.value),
|
|
405
|
+
leavingLayer: U(null),
|
|
276
406
|
txId: 0,
|
|
277
407
|
stop: () => {}
|
|
278
408
|
};
|
|
279
|
-
return t.stop =
|
|
280
|
-
|
|
409
|
+
return t.stop = Y(e.activeLayer, (e, n) => {
|
|
410
|
+
y(t, e, n);
|
|
281
411
|
}), o.add(t), t;
|
|
282
412
|
}
|
|
283
|
-
function
|
|
413
|
+
function x(e) {
|
|
284
414
|
e.stop(), o.delete(e), h();
|
|
285
415
|
}
|
|
286
|
-
let
|
|
416
|
+
let S = b({
|
|
287
417
|
containerEl: n,
|
|
288
418
|
activeLayer: r,
|
|
289
419
|
axis: i
|
|
290
|
-
}),
|
|
291
|
-
let t =
|
|
420
|
+
}), C = { registerGroup(e) {
|
|
421
|
+
let t = b(e);
|
|
292
422
|
return {
|
|
293
|
-
currentLayer:
|
|
294
|
-
leavingLayer:
|
|
295
|
-
release: () =>
|
|
423
|
+
currentLayer: H(t.currentLayer),
|
|
424
|
+
leavingLayer: H(t.leavingLayer),
|
|
425
|
+
release: () => x(t)
|
|
296
426
|
};
|
|
297
427
|
} };
|
|
298
|
-
function
|
|
428
|
+
function w(e) {
|
|
299
429
|
let t = n.value;
|
|
300
430
|
if (!t || e.target !== t) return;
|
|
301
431
|
let r = u(i.value);
|
|
302
|
-
e.propertyName !== r && e.propertyName !== l(i.value) || a && a.settled && (m(
|
|
432
|
+
e.propertyName !== r && e.propertyName !== l(i.value) || a && a.settled && (m(S), h());
|
|
303
433
|
}
|
|
304
|
-
return
|
|
434
|
+
return B(() => {
|
|
305
435
|
for (let e of o) e.stop();
|
|
306
436
|
o.clear(), c();
|
|
307
437
|
}), {
|
|
308
|
-
context:
|
|
309
|
-
outerCurrentLayer:
|
|
310
|
-
onOuterTransitionEnd:
|
|
438
|
+
context: C,
|
|
439
|
+
outerCurrentLayer: H(S.currentLayer),
|
|
440
|
+
onOuterTransitionEnd: w
|
|
441
|
+
};
|
|
442
|
+
}
|
|
443
|
+
//#endregion
|
|
444
|
+
//#region src/components/custom/dock/composables/useDockShellProps.ts
|
|
445
|
+
function Ee(e) {
|
|
446
|
+
let t = E(() => {
|
|
447
|
+
if (e.containerName) return {
|
|
448
|
+
"container-type": "inline-size",
|
|
449
|
+
"container-name": e.containerName
|
|
450
|
+
};
|
|
451
|
+
}), n = E(() => e.collapseDelay ?? 2e3), r = E(() => e.layout ?? "linear"), i = E(() => e.shape ?? "pill"), a = E(() => e.orientation ?? "horizontal"), o = E(() => e.density ?? "comfortable"), s = E(() => e.overflow === "scroll" ? a.value === "vertical" ? "dock-scroll-y" : "dock-scroll-x" : null), c = E(() => e.alwaysExpanded || r.value === "grid");
|
|
452
|
+
return {
|
|
453
|
+
containerStyle: t,
|
|
454
|
+
collapseDelay: n,
|
|
455
|
+
startCollapsed: E(() => c.value ? !1 : e.startCollapsed ?? !0),
|
|
456
|
+
layoutValue: r,
|
|
457
|
+
shape: i,
|
|
458
|
+
orientation: a,
|
|
459
|
+
density: o,
|
|
460
|
+
scrollClass: s,
|
|
461
|
+
alwaysExpanded: c,
|
|
462
|
+
fitContent: E(() => e.fitContent ?? !1)
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
//#endregion
|
|
466
|
+
//#region src/components/custom/dock/composables/useDockMorphWindow.ts
|
|
467
|
+
function De(e) {
|
|
468
|
+
let t = e.trim();
|
|
469
|
+
return t ? t.endsWith("ms") ? Number.parseFloat(t) : t.endsWith("s") ? Number.parseFloat(t) * 1e3 : Number.parseFloat(t) || 0 : 0;
|
|
470
|
+
}
|
|
471
|
+
function Oe(e) {
|
|
472
|
+
let t = getComputedStyle(e), n = t.transitionDuration.split(",").map(De), r = t.transitionDelay.split(",").map(De);
|
|
473
|
+
return Math.max(0, ...n.map((e, t) => e + (r[t] ?? r[0] ?? 0)));
|
|
474
|
+
}
|
|
475
|
+
function ke(e) {
|
|
476
|
+
let t = De(getComputedStyle(e).getPropertyValue("--duration-normal") || "0.3s");
|
|
477
|
+
return Math.max(t > 0 ? t * 2 : 0, 600);
|
|
478
|
+
}
|
|
479
|
+
function Ae(e, t) {
|
|
480
|
+
let n = null, r = 0;
|
|
481
|
+
function i() {
|
|
482
|
+
n &&= (clearTimeout(n), null);
|
|
483
|
+
}
|
|
484
|
+
function a() {
|
|
485
|
+
let a = e.value;
|
|
486
|
+
if (!a) return;
|
|
487
|
+
let o = ++r;
|
|
488
|
+
i(), t.value = !0, n = setTimeout(() => {
|
|
489
|
+
o === r && (t.value = !1, n = null);
|
|
490
|
+
}, Math.max(Oe(a), ke(a)) + 50);
|
|
491
|
+
}
|
|
492
|
+
function o(n) {
|
|
493
|
+
n.target === e.value && d.has(n.propertyName) && (i(), r++, t.value = !1);
|
|
494
|
+
}
|
|
495
|
+
return R(i), {
|
|
496
|
+
markTransitioning: a,
|
|
497
|
+
onDockTransitionDone: o,
|
|
498
|
+
clearTransitionTimer: i
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
//#endregion
|
|
502
|
+
//#region src/components/custom/dock/composables/useDockClickIntegrity.ts
|
|
503
|
+
function je(e) {
|
|
504
|
+
let { rootEl: t, visualExpanded: n } = e, r = null, i = !1, a = 0, o = null;
|
|
505
|
+
function s() {
|
|
506
|
+
o !== null && (clearTimeout(o), o = null);
|
|
507
|
+
}
|
|
508
|
+
function c() {
|
|
509
|
+
a = l() + 320, s(), o = setTimeout(() => {
|
|
510
|
+
o = null;
|
|
511
|
+
}, 320);
|
|
512
|
+
}
|
|
513
|
+
function l() {
|
|
514
|
+
return typeof performance < "u" && typeof performance.now == "function" ? performance.now() : Date.now();
|
|
515
|
+
}
|
|
516
|
+
function u() {
|
|
517
|
+
let e = t.value;
|
|
518
|
+
return e && e.hasAttribute("data-morphing") ? !0 : l() < a;
|
|
519
|
+
}
|
|
520
|
+
function d() {
|
|
521
|
+
let e = t.value;
|
|
522
|
+
return !!e && e.hasAttribute("data-morphing");
|
|
523
|
+
}
|
|
524
|
+
function f(e) {
|
|
525
|
+
r = e.target, n.value, i = d();
|
|
526
|
+
}
|
|
527
|
+
function p(e) {
|
|
528
|
+
if (!r || !e) return !1;
|
|
529
|
+
if (e === r) return !0;
|
|
530
|
+
let t = r instanceof Node ? r : null, n = e instanceof Node ? e : null;
|
|
531
|
+
return !t || !n ? !1 : t.contains(n) || n.contains(t);
|
|
532
|
+
}
|
|
533
|
+
function m(e) {
|
|
534
|
+
let t = i;
|
|
535
|
+
if (i = !1, !u()) {
|
|
536
|
+
r = null;
|
|
537
|
+
return;
|
|
538
|
+
}
|
|
539
|
+
if (!(!r && !t)) {
|
|
540
|
+
if (!t && p(e.target)) {
|
|
541
|
+
r = null;
|
|
542
|
+
return;
|
|
543
|
+
}
|
|
544
|
+
e.stopPropagation(), e.preventDefault(), r = null;
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
return R(s), {
|
|
548
|
+
onPointerDownCapture: f,
|
|
549
|
+
onClickCapture: m,
|
|
550
|
+
markExpandFlip: c
|
|
311
551
|
};
|
|
312
552
|
}
|
|
313
553
|
//#endregion
|
|
314
554
|
//#region src/components/custom/dock/GlassDock.vue?vue&type=script&setup=true&lang.ts
|
|
315
|
-
var
|
|
555
|
+
var Me = ["data-has-rail"], Ne = [
|
|
316
556
|
"data-density",
|
|
317
557
|
"data-held",
|
|
318
558
|
"data-container-name"
|
|
319
|
-
],
|
|
559
|
+
], Pe = {
|
|
320
560
|
key: 0,
|
|
321
561
|
class: "dock-persistent"
|
|
322
|
-
},
|
|
323
|
-
|
|
324
|
-
class: "dock-layers dock-layer--vertical-body"
|
|
325
|
-
}, ve = { class: "dock-layer--vertical-section" }, ye = {
|
|
326
|
-
key: 1,
|
|
327
|
-
class: "dock-layers dock-layer--vertical-body"
|
|
328
|
-
}, be = ["inert"], xe = ["inert"], Se = /* @__PURE__ */ S({
|
|
562
|
+
}, Fe = ["inert"], Ie = ["inert"], Le = /* @__PURE__ */ M({
|
|
563
|
+
inheritAttrs: !1,
|
|
329
564
|
__name: "GlassDock",
|
|
330
565
|
props: {
|
|
331
|
-
variant: {},
|
|
332
|
-
collapseDelay: {},
|
|
333
|
-
startCollapsed: { type: Boolean },
|
|
334
|
-
layout: {},
|
|
335
566
|
fitContent: { type: Boolean },
|
|
336
567
|
position: {},
|
|
337
568
|
alwaysExpanded: { type: Boolean },
|
|
@@ -339,181 +570,142 @@ var pe = [
|
|
|
339
570
|
orientation: {},
|
|
340
571
|
density: {},
|
|
341
572
|
overflow: {},
|
|
342
|
-
containerName: {}
|
|
573
|
+
containerName: {},
|
|
574
|
+
collapseDelay: {},
|
|
575
|
+
startCollapsed: { type: Boolean },
|
|
576
|
+
layout: {},
|
|
577
|
+
autoLuminance: { type: Boolean },
|
|
578
|
+
backgroundCanvas: { type: [
|
|
579
|
+
Function,
|
|
580
|
+
String,
|
|
581
|
+
null
|
|
582
|
+
] }
|
|
343
583
|
},
|
|
344
584
|
setup(e, { expose: t }) {
|
|
345
|
-
let n = e, r = g(
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
585
|
+
let n = e, { containerStyle: r, collapseDelay: i, startCollapsed: a, layoutValue: s, shape: c, orientation: l, density: u, scrollClass: d, alwaysExpanded: f, fitContent: m } = Ee(n), h = s, g = J("dockEl"), _ = J("layersEl");
|
|
586
|
+
n.autoLuminance !== !1 && ve(g, { backgroundCanvas: n.backgroundCanvas ?? null });
|
|
587
|
+
let v = U(!1), y = o(i.value), b = `glass-dock-${ie()}`, { expanded: x, isPinned: S, isHeld: C, onMouseEnter: w, onMouseLeave: T, onFocusIn: D, onFocusOut: j, onClickCollapsed: M, keepOpen: N, release: F, expand: L, collapse: R } = be({
|
|
588
|
+
collapseDelay: i.value,
|
|
589
|
+
rootEl: g,
|
|
590
|
+
alwaysExpanded: f,
|
|
591
|
+
isTransitioning: v,
|
|
592
|
+
dockId: b
|
|
350
593
|
});
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
collapseDelay: o.value,
|
|
359
|
-
rootEl: u,
|
|
360
|
-
alwaysExpanded: O,
|
|
361
|
-
isTransitioning: M,
|
|
362
|
-
dockId: F
|
|
594
|
+
p({
|
|
595
|
+
id: b,
|
|
596
|
+
orientation: l,
|
|
597
|
+
layout: h,
|
|
598
|
+
keepOpen: N,
|
|
599
|
+
release: F,
|
|
600
|
+
held: C
|
|
363
601
|
});
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
release: se,
|
|
370
|
-
held: U
|
|
602
|
+
let z = E(() => f.value || x.value), B = ae(), H = E(() => !!B.rail), { context: te, onOuterTransitionEnd: G } = Te({
|
|
603
|
+
rootEl: g,
|
|
604
|
+
outerEl: _,
|
|
605
|
+
outerActiveLayer: E(() => z.value ? "full" : "summary"),
|
|
606
|
+
outerAxis: E(() => l.value)
|
|
371
607
|
});
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
outerAxis: g(() => "horizontal")
|
|
608
|
+
Ce(te);
|
|
609
|
+
let ne = E(() => ({ "view-transition-name": b.replace(/[^a-zA-Z0-9_-]/g, "-") })), { markTransitioning: re, onDockTransitionDone: q } = Ae(g, v), { onPointerDownCapture: X, onClickCapture: oe, markExpandFlip: se } = je({
|
|
610
|
+
rootEl: g,
|
|
611
|
+
visualExpanded: z
|
|
377
612
|
});
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
function Z(e) {
|
|
381
|
-
let t = e.trim();
|
|
382
|
-
return t ? t.endsWith("ms") ? Number.parseFloat(t) : t.endsWith("s") ? Number.parseFloat(t) * 1e3 : Number.parseFloat(t) || 0 : 0;
|
|
383
|
-
}
|
|
384
|
-
function Ce(e) {
|
|
385
|
-
let t = getComputedStyle(e), n = t.transitionDuration.split(",").map(Z), r = t.transitionDelay.split(",").map(Z);
|
|
386
|
-
return Math.max(0, ...n.map((e, t) => e + (r[t] ?? r[0] ?? 0)));
|
|
387
|
-
}
|
|
388
|
-
function we(e) {
|
|
389
|
-
let t = Z(getComputedStyle(e).getPropertyValue("--duration-normal") || "0.3s");
|
|
390
|
-
return Math.max(t > 0 ? t * 2 : 0, 600);
|
|
391
|
-
}
|
|
392
|
-
function Q() {
|
|
393
|
-
L &&= (clearTimeout(L), null);
|
|
394
|
-
}
|
|
395
|
-
let Te = new Set([
|
|
396
|
-
"width",
|
|
397
|
-
"height",
|
|
398
|
-
"padding",
|
|
399
|
-
"transform"
|
|
400
|
-
]);
|
|
401
|
-
function Ee() {
|
|
402
|
-
let e = u.value;
|
|
403
|
-
if (!e) return;
|
|
404
|
-
let t = ++R;
|
|
405
|
-
Q(), M.value = !0, L = setTimeout(() => {
|
|
406
|
-
t === R && (M.value = !1, L = null);
|
|
407
|
-
}, Math.max(Ce(e), we(e)) + 50);
|
|
408
|
-
}
|
|
409
|
-
function De(e) {
|
|
410
|
-
e.target === u.value && Te.has(e.propertyName) && (Q(), R++, M.value = !1);
|
|
411
|
-
}
|
|
412
|
-
ne(() => {
|
|
413
|
-
if (O.value) {
|
|
414
|
-
q();
|
|
415
|
-
return;
|
|
416
|
-
}
|
|
417
|
-
_.value === "horizontal" && !s.value && q();
|
|
613
|
+
ee(() => {
|
|
614
|
+
(n.alwaysExpanded || !a.value) && L();
|
|
418
615
|
});
|
|
419
|
-
function
|
|
420
|
-
return
|
|
616
|
+
function Z() {
|
|
617
|
+
return !f.value;
|
|
421
618
|
}
|
|
422
|
-
function
|
|
423
|
-
if (
|
|
424
|
-
let t =
|
|
425
|
-
!t || !n ||
|
|
619
|
+
function ce(e) {
|
|
620
|
+
if (!Z() || z.value) return;
|
|
621
|
+
let t = g.value, n = e.touches[0];
|
|
622
|
+
!t || !n || y.handleTouchStart(t, n.clientY);
|
|
426
623
|
}
|
|
427
|
-
function
|
|
428
|
-
|
|
624
|
+
function le(e) {
|
|
625
|
+
Z() && y.handleScrollCheck(e);
|
|
429
626
|
}
|
|
430
|
-
function
|
|
431
|
-
if (
|
|
432
|
-
let e =
|
|
433
|
-
|
|
627
|
+
function Q() {
|
|
628
|
+
if (!Z()) return;
|
|
629
|
+
let e = y.isActive.value;
|
|
630
|
+
y.handleTouchEnd(), !e && y.isActive.value && !z.value && L();
|
|
434
631
|
}
|
|
435
|
-
return
|
|
436
|
-
!e &&
|
|
437
|
-
}),
|
|
438
|
-
|
|
439
|
-
}),
|
|
440
|
-
expanded:
|
|
441
|
-
isPinned:
|
|
442
|
-
isHeld:
|
|
443
|
-
isTransitioning:
|
|
444
|
-
expand:
|
|
445
|
-
collapse:
|
|
446
|
-
keepOpen:
|
|
447
|
-
release:
|
|
448
|
-
}), (t, n) => (
|
|
632
|
+
return Y(y.isActive, (e) => {
|
|
633
|
+
!e && x.value && !S.value && !f.value && R();
|
|
634
|
+
}), Y(z, (e) => {
|
|
635
|
+
re(), e ? se() : y.deactivate();
|
|
636
|
+
}), t({
|
|
637
|
+
expanded: x,
|
|
638
|
+
isPinned: S,
|
|
639
|
+
isHeld: C,
|
|
640
|
+
isTransitioning: v,
|
|
641
|
+
expand: L,
|
|
642
|
+
collapse: R,
|
|
643
|
+
keepOpen: N,
|
|
644
|
+
release: F
|
|
645
|
+
}), (t, n) => (V(), k("div", {
|
|
646
|
+
class: I(["glass-dock-frame", K(l)]),
|
|
647
|
+
"data-has-rail": H.value || void 0
|
|
648
|
+
}, [A("div", P({
|
|
449
649
|
ref_key: "dockEl",
|
|
450
|
-
ref:
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
`shape-${
|
|
455
|
-
`layout-${
|
|
456
|
-
|
|
650
|
+
ref: g
|
|
651
|
+
}, t.$attrs, {
|
|
652
|
+
class: ["glass-dock", [
|
|
653
|
+
K(l),
|
|
654
|
+
`shape-${K(c)}`,
|
|
655
|
+
`layout-${K(h)}`,
|
|
656
|
+
K(d),
|
|
457
657
|
{
|
|
458
|
-
expanded:
|
|
459
|
-
collapsed: !
|
|
460
|
-
pinned:
|
|
461
|
-
"fit-content":
|
|
462
|
-
"always-expanded":
|
|
463
|
-
"dock-overflow-wrap": e.overflow === "wrap" &&
|
|
658
|
+
expanded: z.value,
|
|
659
|
+
collapsed: !z.value,
|
|
660
|
+
pinned: K(S),
|
|
661
|
+
"fit-content": K(m),
|
|
662
|
+
"always-expanded": K(f),
|
|
663
|
+
"dock-overflow-wrap": e.overflow === "wrap" && K(l) !== "vertical"
|
|
464
664
|
},
|
|
465
|
-
e.position === "fixed" ? "fixed bottom-
|
|
466
|
-
]]
|
|
467
|
-
"data-density":
|
|
468
|
-
"data-held":
|
|
665
|
+
e.position === "fixed" ? "fixed bottom-(--dock-pos) left-1/2 -translate-x-1/2" : e.position === "sticky" ? "dock-sticky" : "dock-inline"
|
|
666
|
+
]],
|
|
667
|
+
"data-density": K(u),
|
|
668
|
+
"data-held": K(C) || void 0,
|
|
469
669
|
"data-container-name": e.containerName || void 0,
|
|
470
|
-
style:
|
|
471
|
-
onMouseenter: n[
|
|
472
|
-
onMouseleave: n[
|
|
473
|
-
onFocusin: n[
|
|
474
|
-
onFocusout: n[
|
|
475
|
-
onTouchstart:
|
|
476
|
-
onTouchmove:
|
|
477
|
-
onTouchend:
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
670
|
+
style: [K(r), ne.value],
|
|
671
|
+
onMouseenter: n[2] ||= (...e) => K(w) && K(w)(...e),
|
|
672
|
+
onMouseleave: n[3] ||= (e) => K(T)(e),
|
|
673
|
+
onFocusin: n[4] ||= (...e) => K(D) && K(D)(...e),
|
|
674
|
+
onFocusout: n[5] ||= (...e) => K(j) && K(j)(...e),
|
|
675
|
+
onTouchstart: ce,
|
|
676
|
+
onTouchmove: le,
|
|
677
|
+
onTouchend: Q,
|
|
678
|
+
onPointerdownCapture: n[6] ||= (...e) => K(X) && K(X)(...e),
|
|
679
|
+
onClickCapture: n[7] ||= (...e) => K(oe) && K(oe)(...e),
|
|
680
|
+
onTransitionend: n[8] ||= (...e) => K(q) && K(q)(...e),
|
|
681
|
+
onTransitioncancel: n[9] ||= (...e) => K(q) && K(q)(...e)
|
|
682
|
+
}), [t.$slots.persistent ? (V(), k("div", Pe, [W(t.$slots, "persistent")])) : O("", !0), A("div", {
|
|
482
683
|
ref_key: "layersEl",
|
|
483
|
-
ref:
|
|
684
|
+
ref: _,
|
|
484
685
|
class: "dock-layers",
|
|
485
|
-
onTransitionend: n[1] ||= (...e) =>
|
|
486
|
-
}, [
|
|
487
|
-
class:
|
|
488
|
-
inert: !
|
|
489
|
-
}, [
|
|
490
|
-
class:
|
|
491
|
-
inert:
|
|
492
|
-
onClick: n[0] ||= (...e) =>
|
|
493
|
-
}, [
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
}, [
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
}
|
|
502
|
-
}), X = a("glass-ui:dock-layer-group", "[glass-ui:dock] <DockLayer> must be used inside <DockLayerGroup>");
|
|
503
|
-
X.KEY;
|
|
504
|
-
function Z(e) {
|
|
505
|
-
X.provide(e);
|
|
686
|
+
onTransitionend: n[1] ||= (...e) => K(G) && K(G)(...e)
|
|
687
|
+
}, [A("div", {
|
|
688
|
+
class: I(["dock-layer dock-layer--full", { "is-active": z.value }]),
|
|
689
|
+
inert: !K(x) || void 0
|
|
690
|
+
}, [W(t.$slots, "default")], 10, Fe), A("div", {
|
|
691
|
+
class: I(["dock-layer dock-layer--summary", { "is-active": !z.value }]),
|
|
692
|
+
inert: K(x) || void 0,
|
|
693
|
+
onClick: n[0] ||= (...e) => K(M) && K(M)(...e)
|
|
694
|
+
}, [W(t.$slots, "collapsed")], 10, Ie)], 544)], 16, Ne), H.value ? (V(), k("div", {
|
|
695
|
+
key: 0,
|
|
696
|
+
class: I(["dock-hairline-slot", K(l)])
|
|
697
|
+
}, [W(t.$slots, "rail")], 2)) : O("", !0)], 10, Me));
|
|
698
|
+
}
|
|
699
|
+
}), Re = c(u, "[glass-ui:dock] <DockLayer> must be used inside <DockLayerGroup>"), { KEY: ze } = Re;
|
|
700
|
+
function Be(e) {
|
|
701
|
+
Re.provide(e);
|
|
506
702
|
}
|
|
507
|
-
var
|
|
508
|
-
|
|
703
|
+
var Ve = Re.use;
|
|
704
|
+
Re.useOptional;
|
|
509
705
|
//#endregion
|
|
510
706
|
//#region src/components/custom/dock/composables/useLayerTransition.ts
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
dampingFraction: .7
|
|
514
|
-
};
|
|
515
|
-
function Q(e) {
|
|
516
|
-
let { containerEl: t, activeLayer: n, axis: r } = e, i = g(() => r?.value === "vertical" ? "height" : "width"), a = g(() => i.value === "width" ? "inline-size" : "block-size"), o = (e) => e.getBoundingClientRect()[i.value], s = j(n.value), c = j(null), l = 0, u = null, d = null;
|
|
707
|
+
function He(e) {
|
|
708
|
+
let { containerEl: t, activeLayer: n, axis: r } = e, i = E(() => r?.value === "vertical" ? "height" : "width"), a = E(() => i.value === "width" ? "inline-size" : "block-size"), o = (e) => e.getBoundingClientRect()[i.value], s = U(n.value), c = U(null), l = 0, u = null, d = null;
|
|
517
709
|
function f() {
|
|
518
710
|
u &&= (u.dispose(), null), d = null;
|
|
519
711
|
}
|
|
@@ -531,9 +723,9 @@ function Q(e) {
|
|
|
531
723
|
h(e, t);
|
|
532
724
|
return;
|
|
533
725
|
}
|
|
534
|
-
e.style.setProperty("--dock-morph-from", `${r}px`), e.style.setProperty("--dock-morph-to", `${i}px`), t.style.setProperty("--dock-morph-t", "0"), t.setAttribute("data-morphing", ""), o || (f(), u = new
|
|
535
|
-
response:
|
|
536
|
-
dampingFraction:
|
|
726
|
+
e.style.setProperty("--dock-morph-from", `${r}px`), e.style.setProperty("--dock-morph-to", `${i}px`), t.style.setProperty("--dock-morph-t", "0"), t.setAttribute("data-morphing", ""), o || (f(), u = new Q({
|
|
727
|
+
response: g.response,
|
|
728
|
+
dampingFraction: g.dampingFraction,
|
|
537
729
|
initial: 0,
|
|
538
730
|
respectReducedMotion: !0
|
|
539
731
|
}), d = e);
|
|
@@ -542,7 +734,7 @@ function Q(e) {
|
|
|
542
734
|
n === l && (t.style.setProperty("--dock-morph-t", `${r}`), s.settled && h(e, t));
|
|
543
735
|
});
|
|
544
736
|
}
|
|
545
|
-
|
|
737
|
+
Y(n, (e, n) => {
|
|
546
738
|
if (e === n) return;
|
|
547
739
|
let r = t.value;
|
|
548
740
|
if (!r) {
|
|
@@ -564,7 +756,7 @@ function Q(e) {
|
|
|
564
756
|
let n = t.value;
|
|
565
757
|
n && e.target === n && (e.propertyName !== a.value && e.propertyName !== i.value || u && u.settled && h(n, p(n)));
|
|
566
758
|
}
|
|
567
|
-
return
|
|
759
|
+
return B(f), {
|
|
568
760
|
onTransitionEnd: v,
|
|
569
761
|
currentLayer: s,
|
|
570
762
|
leavingLayer: c
|
|
@@ -572,9 +764,9 @@ function Q(e) {
|
|
|
572
764
|
}
|
|
573
765
|
//#endregion
|
|
574
766
|
//#region src/components/custom/dock/DockLayerGroup.vue?vue&type=script&setup=true&lang.ts
|
|
575
|
-
var
|
|
767
|
+
var Ue = { key: 1 }, We = { key: 2 }, Ge = /* @__PURE__ */ M({
|
|
576
768
|
__name: "DockLayerGroup",
|
|
577
|
-
props: /* @__PURE__ */
|
|
769
|
+
props: /* @__PURE__ */ N({
|
|
578
770
|
orientation: {},
|
|
579
771
|
showRail: {
|
|
580
772
|
type: Boolean,
|
|
@@ -587,100 +779,103 @@ var Te = { key: 1 }, Ee = { key: 2 }, De = /* @__PURE__ */ S({
|
|
|
587
779
|
}),
|
|
588
780
|
emits: ["update:active"],
|
|
589
781
|
setup(e) {
|
|
590
|
-
let t = e, n =
|
|
782
|
+
let t = e, n = q(e, "active"), r = f(), i = U([]), a = J("containerEl");
|
|
591
783
|
function o(e) {
|
|
592
784
|
i.value.find((t) => t.id === e.id) || i.value.push(e);
|
|
593
785
|
}
|
|
594
|
-
function
|
|
786
|
+
function s(e) {
|
|
595
787
|
i.value = i.value.filter((t) => t.id !== e);
|
|
596
788
|
}
|
|
597
|
-
let
|
|
598
|
-
if (
|
|
599
|
-
let e =
|
|
789
|
+
let c = E(() => t.orientation ?? r?.orientation.value ?? "horizontal"), l = E(() => c.value === "vertical" ? "horizontal" : "vertical"), u = we(), d, p, m;
|
|
790
|
+
if (u) {
|
|
791
|
+
let e = u.registerGroup({
|
|
600
792
|
containerEl: a,
|
|
601
793
|
activeLayer: n,
|
|
602
|
-
axis:
|
|
794
|
+
axis: c
|
|
603
795
|
});
|
|
604
|
-
|
|
796
|
+
d = e.currentLayer, p = e.leavingLayer, m = () => {}, R(() => e.release());
|
|
605
797
|
} else {
|
|
606
|
-
let e =
|
|
798
|
+
let e = He({
|
|
607
799
|
containerEl: a,
|
|
608
800
|
activeLayer: n,
|
|
609
|
-
axis:
|
|
801
|
+
axis: c,
|
|
610
802
|
directionTypes: (e, t) => {
|
|
611
803
|
let n = i.value.findIndex((t) => t.id === e);
|
|
612
804
|
return [i.value.findIndex((e) => e.id === t) < n ? "layer-back" : "layer-forward"];
|
|
613
805
|
}
|
|
614
806
|
});
|
|
615
|
-
|
|
807
|
+
d = H(e.currentLayer), p = H(e.leavingLayer), m = e.onTransitionEnd;
|
|
616
808
|
}
|
|
617
|
-
let
|
|
618
|
-
"view-transition-name": `gl-dock-stack-${
|
|
809
|
+
let h = typeof document < "u" && "startViewTransition" in document, g = ie(), _ = E(() => h ? {
|
|
810
|
+
"view-transition-name": `gl-dock-stack-${g.replace(/[^a-zA-Z0-9_-]/g, "-")}`,
|
|
619
811
|
"view-transition-class": "gl-dock-layer"
|
|
620
812
|
} : void 0);
|
|
621
|
-
|
|
813
|
+
Be({
|
|
622
814
|
register: o,
|
|
623
|
-
unregister:
|
|
624
|
-
currentLayerId:
|
|
625
|
-
leavingLayerId:
|
|
815
|
+
unregister: s,
|
|
816
|
+
currentLayerId: d,
|
|
817
|
+
leavingLayerId: p
|
|
626
818
|
});
|
|
627
|
-
function
|
|
628
|
-
return typeof e == "object" && !!e;
|
|
819
|
+
function S(e) {
|
|
820
|
+
return typeof e == "object" && !!e || typeof e == "function";
|
|
629
821
|
}
|
|
630
|
-
let
|
|
631
|
-
function
|
|
632
|
-
|
|
822
|
+
let C = U(!1);
|
|
823
|
+
function w() {
|
|
824
|
+
C.value || (C.value = !0, r?.keepOpen());
|
|
633
825
|
}
|
|
634
|
-
function
|
|
826
|
+
function M(e) {
|
|
635
827
|
let t = e.relatedTarget, n = e.currentTarget;
|
|
636
|
-
t && n?.contains(t) ||
|
|
828
|
+
t && n?.contains(t) || C.value && (C.value = !1, r?.release());
|
|
637
829
|
}
|
|
638
|
-
return (t, r) => (
|
|
830
|
+
return (t, r) => (V(), k("div", { class: I(["dock-layer-group", [c.value, `rail-${e.railPosition}`]]) }, [e.showRail && i.value.length > 1 ? (V(), D(K(v), {
|
|
639
831
|
key: 0,
|
|
640
832
|
modelValue: n.value,
|
|
641
833
|
"onUpdate:modelValue": r[0] ||= (e) => n.value = e,
|
|
642
|
-
orientation:
|
|
834
|
+
orientation: l.value,
|
|
643
835
|
"as-child": !0
|
|
644
836
|
}, {
|
|
645
|
-
default:
|
|
646
|
-
class:
|
|
837
|
+
default: X(() => [j(K(x), {
|
|
838
|
+
class: I(["dock-layer-rail", e.railPosition]),
|
|
647
839
|
indicator: !1,
|
|
648
|
-
onFocusin:
|
|
649
|
-
onFocusout:
|
|
840
|
+
onFocusin: w,
|
|
841
|
+
onFocusout: M
|
|
650
842
|
}, {
|
|
651
|
-
default:
|
|
843
|
+
default: X(() => [(V(!0), k(T, null, te(i.value, (e) => (V(), D(K(b), {
|
|
652
844
|
key: e.id,
|
|
653
845
|
value: e.id,
|
|
654
846
|
class: "dock-layer-tab",
|
|
655
847
|
title: e.label,
|
|
656
848
|
"aria-label": e.label ?? e.id
|
|
657
849
|
}, {
|
|
658
|
-
default:
|
|
850
|
+
default: X(() => [S(e.icon) ? (V(), D(G(e.icon), {
|
|
659
851
|
key: 0,
|
|
660
852
|
class: "size-4"
|
|
661
|
-
})) : typeof e.icon == "string" ? (
|
|
853
|
+
})) : typeof e.icon == "string" ? (V(), k("span", Ue, ne(e.icon), 1)) : (V(), k("span", We, ne((e.label ?? e.id).charAt(0)), 1))]),
|
|
662
854
|
_: 2
|
|
663
855
|
}, 1032, [
|
|
664
856
|
"value",
|
|
665
857
|
"title",
|
|
666
858
|
"aria-label"
|
|
667
|
-
]))), 128)),
|
|
859
|
+
]))), 128)), j(K(y), {
|
|
860
|
+
class: "dock-layer-tab-indicator",
|
|
861
|
+
surface: !1
|
|
862
|
+
})]),
|
|
668
863
|
_: 1
|
|
669
864
|
}, 8, ["class"])]),
|
|
670
865
|
_: 1
|
|
671
|
-
}, 8, ["modelValue", "orientation"])) :
|
|
866
|
+
}, 8, ["modelValue", "orientation"])) : O("", !0), A("div", {
|
|
672
867
|
ref_key: "containerEl",
|
|
673
868
|
ref: a,
|
|
674
869
|
class: "dock-layer-stack",
|
|
675
|
-
style:
|
|
676
|
-
onTransitionend: r[1] ||= (...e) =>
|
|
677
|
-
}, [
|
|
870
|
+
style: L(_.value),
|
|
871
|
+
onTransitionend: r[1] ||= (...e) => K(m) && K(m)(...e)
|
|
872
|
+
}, [W(t.$slots, "default")], 36)], 2));
|
|
678
873
|
}
|
|
679
|
-
}),
|
|
874
|
+
}), Ke = [
|
|
680
875
|
"inert",
|
|
681
876
|
"aria-hidden",
|
|
682
877
|
"tabindex"
|
|
683
|
-
],
|
|
878
|
+
], qe = /* @__PURE__ */ M({
|
|
684
879
|
__name: "DockLayer",
|
|
685
880
|
props: {
|
|
686
881
|
id: {},
|
|
@@ -688,35 +883,35 @@ var Te = { key: 1 }, Ee = { key: 2 }, De = /* @__PURE__ */ S({
|
|
|
688
883
|
icon: {}
|
|
689
884
|
},
|
|
690
885
|
setup(e) {
|
|
691
|
-
let t = e, n =
|
|
692
|
-
|
|
886
|
+
let t = e, n = Ve();
|
|
887
|
+
ee(() => {
|
|
693
888
|
n.register({
|
|
694
889
|
id: t.id,
|
|
695
890
|
label: t.label,
|
|
696
891
|
icon: t.icon
|
|
697
892
|
});
|
|
698
|
-
}),
|
|
893
|
+
}), R(() => {
|
|
699
894
|
n.unregister(t.id);
|
|
700
895
|
});
|
|
701
|
-
let r =
|
|
702
|
-
return
|
|
896
|
+
let r = E(() => n.currentLayerId.value === t.id), i = E(() => n.leavingLayerId.value === t.id), a = J("hostEl");
|
|
897
|
+
return Y(r, async (e, t) => {
|
|
703
898
|
!e || t || typeof document < "u" && (() => {
|
|
704
899
|
let e = document.activeElement;
|
|
705
900
|
return !e || e === document.body ? !0 : !!e.closest("[inert]");
|
|
706
|
-
})() && (await
|
|
707
|
-
}), (e, t) => (
|
|
901
|
+
})() && (await F(), a.value?.focus());
|
|
902
|
+
}), (e, t) => (V(), k("div", {
|
|
708
903
|
ref_key: "hostEl",
|
|
709
904
|
ref: a,
|
|
710
|
-
class:
|
|
905
|
+
class: I(["dock-layer-item-host", {
|
|
711
906
|
"is-active": r.value,
|
|
712
907
|
"is-leaving": i.value
|
|
713
908
|
}]),
|
|
714
909
|
inert: r.value ? void 0 : !0,
|
|
715
910
|
"aria-hidden": r.value ? void 0 : !0,
|
|
716
911
|
tabindex: r.value ? -1 : void 0
|
|
717
|
-
}, [
|
|
912
|
+
}, [W(e.$slots, "default")], 10, Ke));
|
|
718
913
|
}
|
|
719
|
-
}),
|
|
914
|
+
}), Je = /* @__PURE__ */ M({
|
|
720
915
|
__name: "DockIconButton",
|
|
721
916
|
props: {
|
|
722
917
|
compact: {
|
|
@@ -738,16 +933,16 @@ var Te = { key: 1 }, Ee = { key: 2 }, De = /* @__PURE__ */ S({
|
|
|
738
933
|
] }
|
|
739
934
|
},
|
|
740
935
|
setup(t) {
|
|
741
|
-
let n = t,
|
|
742
|
-
return (e, n) => (
|
|
936
|
+
let n = t, r = E(() => e("dock-icon-button glass-specular-track", { "dock-icon-button--compact": n.compact }, n.class)), { specularStyle: a, onPointerMove: o } = i(), s = E(() => !n.asChild && n.as === "button" ? { type: n.type } : {});
|
|
937
|
+
return (e, n) => (V(), D(K(se), P({
|
|
743
938
|
as: t.as,
|
|
744
939
|
"as-child": t.asChild
|
|
745
940
|
}, s.value, {
|
|
746
|
-
class:
|
|
747
|
-
style:
|
|
748
|
-
onPointermove:
|
|
941
|
+
class: r.value,
|
|
942
|
+
style: K(a),
|
|
943
|
+
onPointermove: K(o)
|
|
749
944
|
}), {
|
|
750
|
-
default:
|
|
945
|
+
default: X(() => [W(e.$slots, "default")]),
|
|
751
946
|
_: 3
|
|
752
947
|
}, 16, [
|
|
753
948
|
"as",
|
|
@@ -757,7 +952,7 @@ var Te = { key: 1 }, Ee = { key: 2 }, De = /* @__PURE__ */ S({
|
|
|
757
952
|
"onPointermove"
|
|
758
953
|
]));
|
|
759
954
|
}
|
|
760
|
-
}),
|
|
955
|
+
}), Ye = /* @__PURE__ */ M({
|
|
761
956
|
__name: "DockBackgroundToggle",
|
|
762
957
|
props: {
|
|
763
958
|
paused: {
|
|
@@ -769,22 +964,22 @@ var Te = { key: 1 }, Ee = { key: 2 }, De = /* @__PURE__ */ S({
|
|
|
769
964
|
},
|
|
770
965
|
emits: ["update:paused"],
|
|
771
966
|
setup(e, { emit: t }) {
|
|
772
|
-
let n = e, r = t, i =
|
|
967
|
+
let n = e, r = t, i = E(() => n.paused ? n.playLabel : n.pauseLabel);
|
|
773
968
|
function a() {
|
|
774
969
|
r("update:paused", !n.paused);
|
|
775
970
|
}
|
|
776
|
-
return (t, n) => (
|
|
971
|
+
return (t, n) => (V(), D(Je, {
|
|
777
972
|
type: "button",
|
|
778
973
|
"aria-pressed": e.paused,
|
|
779
974
|
"aria-label": i.value,
|
|
780
975
|
title: i.value,
|
|
781
976
|
onClick: a
|
|
782
977
|
}, {
|
|
783
|
-
default:
|
|
978
|
+
default: X(() => [e.paused ? (V(), D(K(de), {
|
|
784
979
|
key: 0,
|
|
785
980
|
size: 18,
|
|
786
981
|
"aria-hidden": "true"
|
|
787
|
-
})) : (
|
|
982
|
+
})) : (V(), D(K(ue), {
|
|
788
983
|
key: 1,
|
|
789
984
|
size: 18,
|
|
790
985
|
"aria-hidden": "true"
|
|
@@ -796,7 +991,7 @@ var Te = { key: 1 }, Ee = { key: 2 }, De = /* @__PURE__ */ S({
|
|
|
796
991
|
"title"
|
|
797
992
|
]));
|
|
798
993
|
}
|
|
799
|
-
}),
|
|
994
|
+
}), Xe = /* @__PURE__ */ M({
|
|
800
995
|
__name: "DockTabButton",
|
|
801
996
|
props: {
|
|
802
997
|
as: { default: "button" },
|
|
@@ -813,13 +1008,13 @@ var Te = { key: 1 }, Ee = { key: 2 }, De = /* @__PURE__ */ S({
|
|
|
813
1008
|
] }
|
|
814
1009
|
},
|
|
815
1010
|
setup(t) {
|
|
816
|
-
let n = t, r =
|
|
817
|
-
return (e, n) => (
|
|
1011
|
+
let n = t, r = re(), i = E(() => r["data-tier"] === "primary"), a = E(() => e("dock-tab-button", i.value && "btn-audacious", n.class));
|
|
1012
|
+
return (e, n) => (V(), D(K(se), {
|
|
818
1013
|
as: t.as,
|
|
819
1014
|
"as-child": t.asChild,
|
|
820
|
-
class:
|
|
1015
|
+
class: I(a.value)
|
|
821
1016
|
}, {
|
|
822
|
-
default:
|
|
1017
|
+
default: X(() => [W(e.$slots, "default")]),
|
|
823
1018
|
_: 3
|
|
824
1019
|
}, 8, [
|
|
825
1020
|
"as",
|
|
@@ -827,7 +1022,7 @@ var Te = { key: 1 }, Ee = { key: 2 }, De = /* @__PURE__ */ S({
|
|
|
827
1022
|
"class"
|
|
828
1023
|
]));
|
|
829
1024
|
}
|
|
830
|
-
}),
|
|
1025
|
+
}), Ze = /* @__PURE__ */ M({
|
|
831
1026
|
__name: "DockSelectTrigger",
|
|
832
1027
|
props: {
|
|
833
1028
|
disabled: { type: Boolean },
|
|
@@ -843,19 +1038,19 @@ var Te = { key: 1 }, Ee = { key: 2 }, De = /* @__PURE__ */ S({
|
|
|
843
1038
|
] }
|
|
844
1039
|
},
|
|
845
1040
|
setup(t) {
|
|
846
|
-
let r = t, i =
|
|
1041
|
+
let r = t, i = le(E(() => {
|
|
847
1042
|
let { class: e, ...t } = r;
|
|
848
1043
|
return t;
|
|
849
1044
|
}));
|
|
850
|
-
return (t, a) => (
|
|
851
|
-
default:
|
|
852
|
-
default:
|
|
1045
|
+
return (t, a) => (V(), D(K(ce), P(K(i), { class: K(e)("dock-select-trigger", r.class) }), {
|
|
1046
|
+
default: X(() => [W(t.$slots, "default"), j(K(Z), { "as-child": "" }, {
|
|
1047
|
+
default: X(() => [W(t.$slots, "icon", {}, () => [j(K(n), { class: "dock-select-trigger__chevron" })])]),
|
|
853
1048
|
_: 3
|
|
854
1049
|
})]),
|
|
855
1050
|
_: 3
|
|
856
1051
|
}, 16, ["class"]));
|
|
857
1052
|
}
|
|
858
|
-
}),
|
|
1053
|
+
}), Qe = /* @__PURE__ */ M({
|
|
859
1054
|
__name: "DockDropdownTrigger",
|
|
860
1055
|
props: {
|
|
861
1056
|
disabled: { type: Boolean },
|
|
@@ -871,15 +1066,160 @@ var Te = { key: 1 }, Ee = { key: 2 }, De = /* @__PURE__ */ S({
|
|
|
871
1066
|
] }
|
|
872
1067
|
},
|
|
873
1068
|
setup(t) {
|
|
874
|
-
let n = t, r =
|
|
1069
|
+
let n = t, r = le(E(() => {
|
|
875
1070
|
let { class: e, ...t } = n;
|
|
876
1071
|
return t;
|
|
877
1072
|
}));
|
|
878
|
-
return (t, i) => (
|
|
879
|
-
default:
|
|
1073
|
+
return (t, i) => (V(), D(K(oe), P(K(r), { class: K(e)("dock-dropdown-trigger", n.class) }), {
|
|
1074
|
+
default: X(() => [W(t.$slots, "default")]),
|
|
880
1075
|
_: 3
|
|
881
1076
|
}, 16, ["class"]));
|
|
882
1077
|
}
|
|
1078
|
+
}), $e = ["data-orientation", "aria-orientation"], et = /* @__PURE__ */ M({
|
|
1079
|
+
__name: "DockSeparator",
|
|
1080
|
+
setup(e) {
|
|
1081
|
+
let t = f(), n = E(() => t?.orientation.value ?? "horizontal"), r = E(() => n.value), i = E(() => n.value === "vertical" ? "horizontal" : "vertical");
|
|
1082
|
+
return (e, t) => (V(), k("div", {
|
|
1083
|
+
class: "dock-separator",
|
|
1084
|
+
role: "separator",
|
|
1085
|
+
"data-orientation": r.value,
|
|
1086
|
+
"aria-orientation": i.value
|
|
1087
|
+
}, null, 8, $e));
|
|
1088
|
+
}
|
|
1089
|
+
}), tt = ["data-orientation", "aria-label"], nt = ["aria-label"], rt = { class: "dock-hairline-extend-chip-label" }, it = /* @__PURE__ */ M({
|
|
1090
|
+
__name: "DockRail",
|
|
1091
|
+
props: /* @__PURE__ */ N({
|
|
1092
|
+
extent: { default: "beyond" },
|
|
1093
|
+
position: { default: "end" },
|
|
1094
|
+
items: {},
|
|
1095
|
+
icon: {},
|
|
1096
|
+
iconLabel: { default: "Switch dock context" }
|
|
1097
|
+
}, {
|
|
1098
|
+
context: {},
|
|
1099
|
+
contextModifiers: {}
|
|
1100
|
+
}),
|
|
1101
|
+
emits: /* @__PURE__ */ N(["advance"], ["update:context"]),
|
|
1102
|
+
setup(e, { emit: t }) {
|
|
1103
|
+
let n = e, i = q(e, "context"), a = t, o = f(), s = E(() => o?.orientation.value ?? "horizontal"), c = E(() => n.icon ?? r), l = E(() => n.items && n.items.length > 0 ? [...n.items] : []);
|
|
1104
|
+
function u(e) {
|
|
1105
|
+
i.value = e, a("advance", e);
|
|
1106
|
+
}
|
|
1107
|
+
return (t, n) => (V(), k("div", {
|
|
1108
|
+
class: I(["dock-hairline-extend", [
|
|
1109
|
+
s.value,
|
|
1110
|
+
`extent-${e.extent}`,
|
|
1111
|
+
`at-${e.position}`
|
|
1112
|
+
]]),
|
|
1113
|
+
"data-orientation": s.value,
|
|
1114
|
+
role: "group",
|
|
1115
|
+
"aria-label": e.iconLabel
|
|
1116
|
+
}, [A("div", {
|
|
1117
|
+
class: "dock-hairline-strip",
|
|
1118
|
+
role: "tablist",
|
|
1119
|
+
"aria-label": e.iconLabel
|
|
1120
|
+
}, [(V(!0), k(T, null, te(l.value, (e) => (V(), D(Je, {
|
|
1121
|
+
key: e.id,
|
|
1122
|
+
type: "button",
|
|
1123
|
+
class: I(["dock-hairline-extend-chip", { "is-active": i.value === e.id }]),
|
|
1124
|
+
role: "tab",
|
|
1125
|
+
"aria-selected": i.value === e.id,
|
|
1126
|
+
"aria-label": e.label,
|
|
1127
|
+
title: e.label,
|
|
1128
|
+
onClick: (t) => u(e.id)
|
|
1129
|
+
}, {
|
|
1130
|
+
default: X(() => [(V(), D(G(e.icon ?? c.value), { class: "size-4" })), A("span", rt, ne(e.label), 1)]),
|
|
1131
|
+
_: 2
|
|
1132
|
+
}, 1032, [
|
|
1133
|
+
"class",
|
|
1134
|
+
"aria-selected",
|
|
1135
|
+
"aria-label",
|
|
1136
|
+
"title",
|
|
1137
|
+
"onClick"
|
|
1138
|
+
]))), 128))], 8, nt)], 10, tt));
|
|
1139
|
+
}
|
|
883
1140
|
});
|
|
884
1141
|
//#endregion
|
|
885
|
-
|
|
1142
|
+
//#region src/components/custom/dock/composables/useDockOrientationMorph.ts
|
|
1143
|
+
function at(e) {
|
|
1144
|
+
let { rootEl: t } = e, n = U("vertical"), r = U(0), i = U(!1), a = S({
|
|
1145
|
+
from: e.verticalSize,
|
|
1146
|
+
to: 0,
|
|
1147
|
+
axis: "height"
|
|
1148
|
+
}), o = S({
|
|
1149
|
+
from: 0,
|
|
1150
|
+
to: e.horizontalSize,
|
|
1151
|
+
axis: "width"
|
|
1152
|
+
}), s = null;
|
|
1153
|
+
function c(e) {
|
|
1154
|
+
r.value = e, a.drive(e), o.drive(e);
|
|
1155
|
+
let n = t.value;
|
|
1156
|
+
n && n.style.setProperty("--dock-morph-t", `${e}`);
|
|
1157
|
+
}
|
|
1158
|
+
function l() {
|
|
1159
|
+
s &&= (s.dispose(), null);
|
|
1160
|
+
}
|
|
1161
|
+
function u() {
|
|
1162
|
+
return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
1163
|
+
}
|
|
1164
|
+
function d(e) {
|
|
1165
|
+
if (u()) {
|
|
1166
|
+
m(e);
|
|
1167
|
+
return;
|
|
1168
|
+
}
|
|
1169
|
+
let n = t.value, a = s !== null && !s.settled ? s.velocity : 0;
|
|
1170
|
+
if (!s || s.settled) {
|
|
1171
|
+
l(), s = new Q({
|
|
1172
|
+
response: g.response,
|
|
1173
|
+
dampingFraction: g.dampingFraction,
|
|
1174
|
+
initial: r.value,
|
|
1175
|
+
respectReducedMotion: !0
|
|
1176
|
+
});
|
|
1177
|
+
let o = s;
|
|
1178
|
+
o.reset(r.value, a), o.target = e, i.value = !0, n && n.setAttribute("data-morphing", ""), o.play((e) => {
|
|
1179
|
+
if (c(e), o.settled) {
|
|
1180
|
+
i.value = !1;
|
|
1181
|
+
let e = t.value;
|
|
1182
|
+
e && e.removeAttribute("data-morphing");
|
|
1183
|
+
}
|
|
1184
|
+
});
|
|
1185
|
+
} else s.reset(r.value, a), s.target = e;
|
|
1186
|
+
}
|
|
1187
|
+
function f(e) {
|
|
1188
|
+
e === n.value && !i.value || (n.value = e, d(+(e === "horizontal")));
|
|
1189
|
+
}
|
|
1190
|
+
function p() {
|
|
1191
|
+
f(n.value === "vertical" ? "horizontal" : "vertical");
|
|
1192
|
+
}
|
|
1193
|
+
function m(e) {
|
|
1194
|
+
let r = e < 0 ? 0 : e > 1 ? 1 : e;
|
|
1195
|
+
l(), i.value = !1, n.value = r >= .5 ? "horizontal" : "vertical", c(r), c(r);
|
|
1196
|
+
let a = t.value;
|
|
1197
|
+
a && a.removeAttribute("data-morphing");
|
|
1198
|
+
}
|
|
1199
|
+
function h(e) {
|
|
1200
|
+
let t = Math.min(Math.max(e / .5, 0), 1);
|
|
1201
|
+
return 1 - t * t * (3 - 2 * t);
|
|
1202
|
+
}
|
|
1203
|
+
function _(e) {
|
|
1204
|
+
let t = Math.min(Math.max((e - .5) / .5, 0), 1);
|
|
1205
|
+
return t * t * (3 - 2 * t);
|
|
1206
|
+
}
|
|
1207
|
+
let v = E(() => a.sizeStyle.value), y = E(() => o.sizeStyle.value), b = E(() => ({ opacity: String(h(r.value)) })), x = E(() => ({ opacity: String(_(r.value)) })), C = E(() => Math.max(a.stretch.value, o.stretch.value));
|
|
1208
|
+
return Y(t, (e) => {
|
|
1209
|
+
e && e.style.setProperty("--dock-morph-t", `${r.value}`);
|
|
1210
|
+
}, { immediate: !0 }), z(l), {
|
|
1211
|
+
orientation: n,
|
|
1212
|
+
t: r,
|
|
1213
|
+
morphing: i,
|
|
1214
|
+
verticalStyle: v,
|
|
1215
|
+
horizontalStyle: y,
|
|
1216
|
+
verticalOpacity: b,
|
|
1217
|
+
horizontalOpacity: x,
|
|
1218
|
+
stretch: C,
|
|
1219
|
+
morphTo: f,
|
|
1220
|
+
toggle: p,
|
|
1221
|
+
pin: m
|
|
1222
|
+
};
|
|
1223
|
+
}
|
|
1224
|
+
//#endregion
|
|
1225
|
+
export { _ as DOCK_CONTEXT_KEY, Ye as DockBackgroundToggle, Qe as DockDropdownTrigger, Je as DockIconButton, qe as DockLayer, Ge as DockLayerGroup, it as DockRail, Ze as DockSelectTrigger, et as DockSeparator, Xe as DockTabButton, Le as GlassDock, p as provideDockContext, h as useDockContext, at as useDockOrientationMorph, He as useLayerTransition, f as useOptionalDockContext };
|