@mkbabb/glass-ui 3.13.0 → 4.0.1
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 +3 -1
- package/dist/CardAction-CW7a0m8M.js +253 -0
- package/dist/{CommandShortcut-RowNEO6i.js → CommandShortcut-DvZNQ_HF.js} +58 -53
- package/dist/ConfiguratorRow-BR4l-ixA.js +143 -0
- package/dist/{ContextMenuContent-CT3AS1WX.js → ContextMenuContent-uWnVxDab.js} +1 -1
- package/dist/{ContextMenuSubContent-BQmxTAdw.js → ContextMenuSubContent-xol4sD2q.js} +32 -37
- package/dist/{DataTable-BCddn3T3.js → DataTable-CuKwF7wr.js} +99 -97
- package/dist/DialogContent-DcKK8k9i.js +103 -0
- package/dist/{DialogFooter-Blu4t7tJ.js → DialogFooter-BZNX5aVr.js} +3 -3
- package/dist/FadingScroll-DI6hQhT9.js +76 -0
- package/dist/{HoverCardContent-Csywg3YF.js → HoverCardContent-b2uaAMRR.js} +1 -1
- package/dist/{HoverPopover-CISOJQuZ.js → HoverPopover-CbqbNwgU.js} +2 -2
- package/dist/IconChip-BTD-nay5.js +55 -0
- package/dist/{IconTooltip-DPzE09X9.js → IconTooltip-Bl8gFZ8d.js} +1 -1
- package/dist/{Input-DWQQIOC4.js → Input-h9v5LeXf.js} +1 -1
- package/dist/{MetricBadge-C9QMz1KT.js → MetricBadge-RHdBP72w.js} +1 -1
- package/dist/Notification-VUwexFUf.js +43 -0
- package/dist/NumberFieldContent-Cq7EzX-U.js +138 -0
- package/dist/PopoverContent-DL7E6vJP.js +127 -0
- package/dist/{Progress-DwlUKGbr.js → Progress-DctG61iZ.js} +98 -78
- package/dist/{ScrollingText-DfFrwSph.js → ScrollingText-yOpBzFYq.js} +2 -2
- package/dist/{SelectScrollDownButton-CiDUxfEj.js → SelectScrollDownButton-CrA8F0iV.js} +35 -20
- package/dist/{Switch-CsIuYP_e.js → Switch-CwYNf8bo.js} +1 -1
- package/dist/Toaster-Bw4xR8xV.js +274 -0
- package/dist/{ToggleGroupItem-D_AHlRw9.js → ToggleGroupItem-pEM9vIhs.js} +50 -37
- package/dist/{TooltipProvider-B3MkB_8P.js → TooltipProvider-rzvnXz60.js} +1 -1
- package/dist/animated-digit.js +2 -2
- package/dist/api/index.d.ts +16 -8
- package/dist/api/types-extra.d.ts +6 -0
- package/dist/api.js +2 -2
- package/dist/aurora.js +888 -230
- package/dist/badge.js +1 -1
- package/dist/border-progress.d.ts +1 -0
- package/dist/border-progress.js +106 -0
- package/dist/button-DYCUa-tH.js +126 -0
- package/dist/button.js +1 -1
- package/dist/canvas.js +2 -2
- package/dist/card.js +2 -2
- package/dist/carousel.d.ts +1 -1
- package/dist/carousel.js +90 -151
- package/dist/collapsible.js +1 -1
- package/dist/color-swatch.d.ts +1 -0
- package/dist/color-swatch.js +47 -0
- package/dist/color.js +1 -1
- package/dist/command.js +1 -1
- package/dist/compile-CQEFRTmx.js +19 -0
- package/dist/components/custom/aurora/composables/atoms-fields.d.ts +39 -0
- package/dist/components/custom/aurora/composables/auroraFallbackGround.d.ts +108 -0
- package/dist/components/custom/aurora/composables/runtime.d.ts +19 -0
- package/dist/components/custom/aurora/composables/uniformBridge.d.ts +5 -1
- package/dist/components/custom/aurora/composables/uniformBridgeWGPU.d.ts +51 -0
- package/dist/components/custom/aurora/composables/wgpuSetup.d.ts +29 -0
- package/dist/components/custom/aurora/constants/budget.d.ts +21 -0
- package/dist/components/custom/aurora/constants/presets.d.ts +30 -2
- package/dist/components/custom/aurora/constants/renderMode.d.ts +63 -10
- package/dist/components/custom/aurora/constants/shaders/aurora.wgsl.d.ts +1 -0
- package/dist/components/custom/aurora/constants/shaders/oil-modes.glsl.d.ts +1 -0
- package/dist/components/custom/aurora/constants/shaders/procedural-color.wgsl.d.ts +4 -0
- package/dist/components/custom/aurora/index.d.ts +3 -2
- package/dist/components/custom/border-progress/BorderProgress.vue.d.ts +46 -0
- package/dist/components/custom/border-progress/composables/useBorderSpectrum.d.ts +22 -0
- package/dist/components/custom/border-progress/constants.d.ts +59 -0
- package/dist/components/custom/border-progress/index.d.ts +4 -0
- package/dist/components/custom/color-swatch/ColorSwatch.vue.d.ts +22 -0
- package/dist/components/custom/color-swatch/index.d.ts +1 -0
- package/dist/components/custom/concentric/Concentric.vue.d.ts +39 -0
- package/dist/components/custom/concentric/composables/concentricGLSetup.d.ts +11 -0
- package/dist/components/custom/concentric/composables/concentricWGPUSetup.d.ts +13 -0
- package/dist/components/custom/concentric/composables/ringField.d.ts +44 -0
- package/dist/components/custom/concentric/composables/uniformBridgeWGPU.d.ts +13 -0
- package/dist/components/custom/concentric/composables/useConcentric.d.ts +35 -0
- package/dist/components/custom/concentric/constants.d.ts +43 -0
- package/dist/components/custom/concentric/index.d.ts +5 -0
- package/dist/components/custom/concentric/shaders/concentric.glsl.d.ts +4 -0
- package/dist/components/custom/concentric/shaders/concentric.wgsl.d.ts +1 -0
- package/dist/components/custom/configurator/Configurator.vue.d.ts +19 -8
- package/dist/components/custom/constellation/Constellation.vue.d.ts +18 -206
- package/dist/components/custom/constellation/composables/useConstellation.d.ts +26 -0
- package/dist/components/custom/constellation/constellationField.d.ts +2 -369
- package/dist/components/custom/constellation/constellationTypes.d.ts +369 -0
- package/dist/components/custom/constellation/index.d.ts +1 -1
- package/dist/components/custom/dock/DockIconButton.vue.d.ts +13 -4
- package/dist/components/custom/dock/DockLayerGroup.vue.d.ts +10 -2
- package/dist/components/custom/dock/DockRail.vue.d.ts +17 -16
- package/dist/components/custom/dock/DockSection.vue.d.ts +69 -0
- package/dist/components/custom/dock/DockSeparator.vue.d.ts +49 -1
- package/dist/components/custom/dock/DockTabButton.vue.d.ts +5 -5
- package/dist/components/custom/dock/composables/dockMorphMeasure.d.ts +75 -0
- package/dist/components/custom/dock/composables/useLayerTransition.d.ts +13 -0
- package/dist/components/custom/dock/constants.d.ts +35 -0
- package/dist/components/custom/dock/index.d.ts +2 -0
- package/dist/components/custom/dot-flow-field/DotFlowField.vue.d.ts +38 -0
- package/dist/components/custom/dot-flow-field/composables/flowField.d.ts +41 -0
- package/dist/components/custom/dot-flow-field/composables/uniformBridgeWGPU.d.ts +24 -0
- package/dist/components/custom/dot-flow-field/composables/useDotFlowField.d.ts +34 -0
- package/dist/components/custom/dot-flow-field/composables/useFlowParticles.d.ts +18 -0
- package/dist/components/custom/dot-flow-field/constants.d.ts +48 -0
- package/dist/components/custom/dot-flow-field/index.d.ts +5 -0
- package/dist/components/custom/dot-flow-field/shaders/flow-field.compute.wgsl.d.ts +1 -0
- package/dist/components/custom/dot-flow-field/shaders/flow-field.glsl.d.ts +20 -0
- package/dist/components/custom/dot-flow-field/shaders/flow-field.render.wgsl.d.ts +1 -0
- package/dist/components/custom/easing/EasingConfigurator.vue.d.ts +33 -0
- package/dist/components/custom/easing/EasingPicker.vue.d.ts +49 -0
- package/dist/components/custom/easing/composables/useEasingPicker.d.ts +75 -0
- package/dist/components/custom/easing/constants.d.ts +28 -0
- package/dist/components/custom/easing/index.d.ts +3 -0
- package/dist/components/custom/expandable-container/ExpandableContainer.vue.d.ts +10 -0
- package/dist/components/custom/fading-scroll/FadingScroll.vue.d.ts +25 -0
- package/dist/components/custom/fading-scroll/composables/useFadingScroll.d.ts +31 -0
- package/dist/components/custom/fading-scroll/constants.d.ts +19 -0
- package/dist/components/custom/fading-scroll/index.d.ts +2 -0
- package/dist/components/custom/fourier-field/FourierField.vue.d.ts +19 -2
- package/dist/components/custom/fourier-field/composables/useFourierField.d.ts +39 -0
- package/dist/components/custom/fourier-field/constants.d.ts +7 -0
- 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/glass-panel/GlassPanel.vue.d.ts +9 -1
- package/dist/components/custom/goo-blob/GooBlob.vue.d.ts +4 -2
- package/dist/components/custom/goo-blob/composables/uniformBridgeWGPU.d.ts +24 -0
- package/dist/components/custom/goo-blob/composables/useMetaballRenderer.d.ts +29 -12
- package/dist/components/custom/goo-blob/composables/wgpuSetup.d.ts +23 -0
- package/dist/components/custom/goo-blob/constants.d.ts +6 -1
- package/dist/components/custom/goo-blob/shaders/metaball.wgsl.d.ts +1 -0
- package/dist/components/custom/handmark/HandMark.vue.d.ts +29 -0
- package/dist/components/custom/handmark/brush.d.ts +269 -0
- package/dist/components/custom/handmark/composables/useHandMark.d.ts +89 -0
- package/dist/components/custom/handmark/constants.d.ts +39 -0
- package/dist/components/custom/handmark/freehand.d.ts +69 -0
- package/dist/components/custom/handmark/geometry.d.ts +52 -0
- package/dist/components/custom/handmark/index.d.ts +27 -0
- package/dist/components/custom/handmark/ink.d.ts +11 -0
- package/dist/components/custom/handmark/texture.d.ts +39 -0
- package/dist/components/custom/handmark/types.d.ts +62 -0
- package/dist/components/custom/icon-chip/IconChip.vue.d.ts +4 -0
- package/dist/components/custom/icon-chip/index.d.ts +2 -0
- package/dist/components/custom/icon-chip/types.d.ts +82 -0
- package/dist/components/custom/instrument-chassis/InstrumentChassis.vue.d.ts +17 -2
- package/dist/components/custom/metric-stack/MetricStack.vue.d.ts +1 -1
- package/dist/components/custom/pager-dots/PagerDots.vue.d.ts +39 -0
- package/dist/components/custom/pager-dots/index.d.ts +2 -0
- package/dist/components/custom/spa-view/SpaView.vue.d.ts +50 -0
- package/dist/components/custom/spa-view/index.d.ts +2 -0
- package/dist/components/custom/tabs/SegmentedTabs.vue.d.ts +29 -24
- package/dist/components/custom/tabs/composables/useTabDragMorph.d.ts +42 -0
- package/dist/components/custom/tabs/composables/useTabIndicator.d.ts +30 -21
- package/dist/components/custom/tabs/constants.d.ts +9 -3
- package/dist/components/custom/tabs/index.d.ts +1 -1
- package/dist/components/custom/watercolor-dot/WatercolorDot.vue.d.ts +15 -1
- package/dist/components/ui/_shared/index.d.ts +2 -0
- package/dist/components/ui/_shared/menuItemVariants.d.ts +19 -0
- package/dist/components/ui/_shared/useSurfaceAxis.d.ts +41 -0
- package/dist/components/ui/badge/index.d.ts +1 -1
- package/dist/components/ui/button/Button.vue.d.ts +5 -2
- package/dist/components/ui/button/index.d.ts +2 -2
- package/dist/components/ui/card/Card.vue.d.ts +34 -4
- package/dist/components/ui/card/CardHeader.vue.d.ts +42 -16
- package/dist/components/ui/card/ScrollCard.vue.d.ts +33 -0
- package/dist/components/ui/card/ScrollCardHeader.vue.d.ts +17 -0
- package/dist/components/ui/card/index.d.ts +2 -0
- package/dist/components/ui/carousel/CarouselNext.vue.d.ts +2 -2
- package/dist/components/ui/carousel/CarouselPrevious.vue.d.ts +2 -2
- package/dist/components/ui/carousel/GlassCarouselPager.vue.d.ts +2 -2
- package/dist/components/ui/carousel/index.d.ts +0 -1
- package/dist/components/ui/command/Command.vue.d.ts +4 -1
- package/dist/components/ui/dialog/DialogContent.vue.d.ts +8 -3
- package/dist/components/ui/drawer/Drawer.vue.d.ts +46 -33
- package/dist/components/ui/drawer/DrawerContent.vue.d.ts +12 -8
- package/dist/components/ui/drawer/DrawerDescription.vue.d.ts +2 -2
- package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts +1 -1
- package/dist/components/ui/drawer/DrawerTitle.vue.d.ts +2 -2
- package/dist/components/ui/drawer/composables/drawerSnapContext.d.ts +26 -0
- package/dist/components/ui/drawer/composables/useDrawerSnap.d.ts +17 -0
- package/dist/components/ui/drawer/constants.d.ts +45 -0
- package/dist/components/ui/drawer/index.d.ts +23 -15
- package/dist/components/ui/focus-scope/FocusScope.vue.d.ts +20 -0
- package/dist/components/ui/focus-scope/index.d.ts +2 -0
- package/dist/components/ui/index.d.ts +1 -1
- package/dist/components/ui/popover/PopoverContent.vue.d.ts +3 -0
- package/dist/components/ui/progress/ProgressDefault.vue.d.ts +3 -2
- package/dist/components/ui/progress/ProgressSectioned.vue.d.ts +14 -3
- package/dist/components/ui/select/SelectContent.vue.d.ts +1 -1
- package/dist/components/ui/select/SelectTrigger.vue.d.ts +27 -4
- package/dist/components/ui/sheet/SheetContent.vue.d.ts +6 -0
- package/dist/components/ui/sheet/index.d.ts +1 -1
- package/dist/components/ui/skeleton/Skeleton.vue.d.ts +3 -0
- package/dist/components/ui/tags-input/TagsInput.vue.d.ts +2 -2
- package/dist/components/ui/toast/Toast.vue.d.ts +5 -2
- package/dist/components/ui/toast/use-toast.d.ts +14 -0
- package/dist/components/ui/toggle/Toggle.vue.d.ts +1 -1
- package/dist/composables/dark/index.d.ts +1 -1
- package/dist/composables/dark/useGlobalDark.d.ts +23 -1
- package/dist/composables/glass/canvas2d/useCanvas2D.d.ts +13 -6
- package/dist/composables/glass/index.d.ts +5 -2
- package/dist/composables/glass/useSpecularPointer.d.ts +33 -0
- package/dist/composables/glass/useSpecularTracking.d.ts +20 -0
- package/dist/composables/glass/vSpecular.d.ts +2 -0
- package/dist/composables/glass/webgl/shaders/flow.glsl.d.ts +1 -0
- package/dist/composables/glass/webgl/useWebGLCanvas.d.ts +16 -0
- package/dist/composables/glass/webgpu/index.d.ts +2 -0
- package/dist/composables/glass/webgpu/useGpuSubstrate.d.ts +54 -0
- package/dist/composables/glass/webgpu/useWebGPUCanvas.d.ts +84 -0
- package/dist/composables/motion/core/index.d.ts +1 -0
- package/dist/composables/motion/index.d.ts +4 -0
- package/dist/composables/motion/useDockCtaReceive.d.ts +59 -0
- package/dist/composables/motion/useDragMorph.d.ts +77 -0
- package/dist/composables/motion/useLiquidFlex.d.ts +11 -0
- package/dist/composables/motion/useLiquidPress.d.ts +71 -0
- package/dist/composables/motion/useLiquidReveal.d.ts +51 -0
- package/dist/composables/motion/useNumericTransition.d.ts +3 -3
- package/dist/composables/motion/usePointerVelocityField.d.ts +98 -0
- package/dist/composables/motion/useViewTransition.d.ts +36 -1
- package/dist/concentric.d.ts +1 -0
- package/dist/concentric.js +562 -0
- package/dist/configurator.js +3 -2
- package/dist/confirm-dialog.js +22 -24
- package/dist/constellation.js +93 -95
- package/dist/context-menu.js +3 -3
- package/dist/controls.js +10 -4
- package/dist/createCanvasLifecycle-CHD5XrDW.js +82 -0
- 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 +738 -442
- package/dist/{dockContext-BegmJVmx.js → dockContext-BNfyPLe9.js} +1 -1
- package/dist/dom.js +5 -5
- package/dist/dot-flow-field.d.ts +1 -0
- package/dist/dot-flow-field.js +604 -0
- package/dist/drawer.d.ts +1 -0
- package/dist/drawer.js +380 -0
- package/dist/{dropdown-menu-DzkkyBwX.js → dropdown-menu-CofSZuk8.js} +14 -15
- package/dist/dropdown-menu.js +1 -1
- package/dist/easing.d.ts +1 -0
- package/dist/easing.js +463 -0
- package/dist/expandable-container.js +45 -38
- package/dist/fading-scroll.d.ts +1 -0
- package/dist/fading-scroll.js +2 -0
- package/dist/focus-scope.d.ts +1 -0
- package/dist/focus-scope.js +23 -0
- package/dist/forms.js +7 -7
- package/dist/fourier-field.js +135 -122
- package/dist/fourier-math.js +2 -2
- package/dist/glass-panel.js +39 -36
- package/dist/glass-ui.css +1 -1
- package/dist/glass-ui.js +154 -362
- package/dist/goo-blob.js +838 -227
- package/dist/handmark.d.ts +1 -0
- package/dist/handmark.js +707 -0
- package/dist/header-ribbon.js +1 -1
- package/dist/hover-card.js +1 -1
- package/dist/hover-popover.js +1 -1
- package/dist/icon-chip.d.ts +1 -0
- package/dist/icon-chip.js +2 -0
- package/dist/icon-tooltip.js +1 -1
- package/dist/index.d.ts +3 -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 +6 -6
- package/dist/{math-U6-RrLmV.js → math-BINYmg5z.js} +11 -3
- package/dist/{menuItemVariants-DPiEarb0.js → menuItemVariants-D8VNHq22.js} +10 -4
- package/dist/metric-badge.js +1 -1
- package/dist/metric-cell.js +25 -22
- package/dist/metric-stack.js +4 -8
- package/dist/motion-core.js +36 -35
- package/dist/motion-curves.js +1 -1
- package/dist/motion.js +157 -55
- package/dist/notification.js +1 -1
- package/dist/number-field.js +1 -1
- package/dist/pager-dots.d.ts +1 -0
- package/dist/pager-dots.js +91 -0
- package/dist/paper-backdrop.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/{presets-BKVyQfbt.js → presets-BW2b-fr1.js} +14 -1
- package/dist/{compile-B7NGOBcP.js → procedural-color.glsl-CIFsJhwI.js} +1 -155
- package/dist/procedural-color.wgsl-CToRHugY.js +224 -0
- package/dist/progress.js +1 -1
- package/dist/pulse.js +1 -1
- package/dist/reactive.js +2 -2
- package/dist/scrolling-text.js +1 -1
- package/dist/search.js +10 -12
- package/dist/select.js +3 -3
- package/dist/separator.js +1 -1
- package/dist/sheet-tZMg0E0w.js +218 -0
- package/dist/sheet.js +1 -1
- package/dist/{slider-B-JP2JlI.js → slider-DVb4HXU-.js} +7 -7
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +3 -3
- package/dist/spa-view.d.ts +1 -0
- package/dist/spa-view.js +46 -0
- package/dist/styles/animations.css +40 -31
- package/dist/styles/border-progress.css +109 -0
- package/dist/styles/cards.css +76 -0
- package/dist/styles/components.css +1 -1
- package/dist/styles/configurator.css +35 -0
- package/dist/styles/critical-partition.mjs +140 -0
- package/dist/styles/critical.css +12 -0
- package/dist/styles/deferred.css +31 -0
- package/dist/styles/dock/density.css +64 -0
- package/dist/styles/dock/layers.css +54 -30
- package/dist/styles/dock/morph.css +124 -7
- package/dist/styles/dock/overflow.css +31 -2
- package/dist/styles/dock/rail-extend.css +168 -71
- package/dist/styles/dock/section.css +59 -0
- package/dist/styles/dock/shell.css +83 -16
- package/dist/styles/dock-controls/icon-button.css +11 -1
- package/dist/styles/dock-controls/tab-button.css +24 -83
- package/dist/styles/dock-controls/triggers.css +7 -0
- package/dist/styles/dock.css +38 -3
- package/dist/styles/drawer.css +127 -35
- package/dist/styles/feedback-tone.css +104 -0
- package/dist/styles/glass/deep.css +44 -0
- package/dist/styles/glass/ladder.css +154 -52
- package/dist/styles/glass/material.css +78 -15
- package/dist/styles/glass/reveal.css +136 -0
- package/dist/styles/glass/rim.css +100 -0
- package/dist/styles/glass/surface-axis.css +113 -0
- package/dist/styles/glass/surfaces.css +189 -15
- package/dist/styles/glass-refract.css +96 -44
- package/dist/styles/glass-specular-track.css +7 -0
- package/dist/styles/glass.css +8 -2
- package/dist/styles/hover-popover.css +7 -6
- package/dist/styles/icon-chip.css +211 -0
- package/dist/styles/index.css +78 -4
- package/dist/styles/instrument-chassis.css +107 -2
- package/dist/styles/menu.css +127 -0
- package/dist/styles/scroll-choreography.css +300 -0
- package/dist/styles/segmented-tabs.css +188 -86
- package/dist/styles/select.css +50 -0
- package/dist/styles/theme/bridges.css +22 -1
- package/dist/styles/theme/literals.css +11 -2
- package/dist/styles/theme/radius.css +6 -1
- package/dist/styles/tokens/color-radius.css +40 -13
- package/dist/styles/tokens/dark-arm.css +200 -20
- package/dist/styles/tokens/glass-deep.css +75 -0
- package/dist/styles/tokens/glass-fx.css +333 -0
- package/dist/styles/tokens/glass.css +95 -315
- package/dist/styles/tokens/light-dark.css +64 -22
- package/dist/styles/tokens/offsets.css +116 -0
- package/dist/styles/tokens/on-glass-fg.css +39 -0
- package/dist/styles/tokens/property-regs.css +130 -10
- package/dist/styles/tokens/scale-paper.css +155 -84
- package/dist/styles/tokens/scheme-motion.css +102 -46
- package/dist/styles/tokens/scroll-tokens.css +123 -0
- package/dist/styles/tokens/{offsets-sizing.css → sizing.css} +88 -89
- package/dist/styles/tokens.css +9 -3
- package/dist/styles/transitions.css +7 -7
- package/dist/styles/typography/scale.css +153 -0
- package/dist/styles/typography/semantic.css +220 -0
- package/dist/styles/typography/utilities.css +174 -0
- package/dist/styles/typography.css +23 -507
- package/dist/styles/utilities/a11y-overrides.css +33 -4
- package/dist/styles/utilities/animate.css +27 -24
- package/dist/styles/utilities/base-misc.css +255 -0
- package/dist/styles/utilities/base.css +100 -138
- package/dist/styles/utilities/btn.css +21 -202
- package/dist/styles/utilities/metal.css +189 -0
- package/dist/styles/utilities.css +14 -7
- package/dist/styles/view-transition.css +4 -1
- package/dist/switch.js +1 -1
- package/dist/tabs.js +275 -191
- package/dist/timeline.js +2 -2
- package/dist/toast.js +1 -1
- package/dist/toggle-chip.js +3 -1
- package/dist/toggle-group.js +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{useAnimatedNumber-C5I3wWd8.js → useAnimatedNumber-BfUq2bUM.js} +1 -1
- package/dist/useCanvas2D-B8w_E3Rr.js +83 -0
- package/dist/useConfiguratorState-DNlOh6c8.js +161 -0
- package/dist/useDragMorph-DgxnsVJz.js +102 -0
- package/dist/{useGlobalDark-yhL4Wp-s.js → useGlobalDark-C28t0VWJ.js} +22 -3
- package/dist/useLiquidPress-kfb4KX79.js +39 -0
- package/dist/usePointerVelocityField-JbRd5CrM.js +137 -0
- package/dist/{useRAFLoop-Bxv0o6L5.js → useRAFLoop-UYa4zoiN.js} +1 -1
- package/dist/useSpring-C0jyvEJB.js +40 -0
- package/dist/useSpringMount-q1amq1SJ.js +71 -0
- package/dist/useSpringPress-BsqPr7FJ.js +34 -0
- package/dist/useSurfaceAxis-g0NloYEF.js +7 -0
- package/dist/{useTouchGate-Dg7MQI1G.js → useTouchGate-CBZTD4SD.js} +1 -1
- package/dist/vReveal-Czsb7zQC.js +10 -0
- package/dist/vSpecular-CQFmLNzA.js +68 -0
- package/dist/vendor-CKmzio-i.js +226 -0
- package/dist/watercolor-dot.js +12 -5
- package/package.json +193 -25
- package/src/styles/animations.css +40 -31
- package/src/styles/border-progress.css +109 -0
- package/src/styles/cards.css +76 -0
- package/src/styles/configurator.css +35 -0
- package/src/styles/critical-partition.mjs +140 -0
- package/src/styles/dock/density.css +64 -0
- package/src/styles/dock/layers.css +54 -30
- package/src/styles/dock/morph.css +124 -7
- package/src/styles/dock/overflow.css +31 -2
- package/src/styles/dock/rail-extend.css +168 -71
- package/src/styles/dock/section.css +59 -0
- package/src/styles/dock/shell.css +83 -16
- package/src/styles/dock-controls/icon-button.css +11 -1
- package/src/styles/dock-controls/tab-button.css +24 -83
- package/src/styles/dock-controls/triggers.css +7 -0
- package/src/styles/dock.css +38 -3
- package/src/styles/drawer.css +123 -35
- package/src/styles/feedback-tone.css +104 -0
- package/src/styles/glass/deep.css +44 -0
- package/src/styles/glass/ladder.css +154 -52
- package/src/styles/glass/material.css +78 -15
- package/src/styles/glass/reveal.css +136 -0
- package/src/styles/glass/rim.css +100 -0
- package/src/styles/glass/surface-axis.css +113 -0
- package/src/styles/glass/surfaces.css +189 -15
- package/src/styles/glass-refract.css +96 -44
- package/src/styles/glass-specular-track.css +7 -0
- package/src/styles/glass.css +8 -2
- package/src/styles/hover-popover.css +7 -6
- package/src/styles/icon-chip.css +211 -0
- package/src/styles/index.css +78 -4
- package/src/styles/instrument-chassis.css +107 -2
- package/src/styles/menu.css +127 -0
- package/src/styles/scroll-choreography.css +300 -0
- package/src/styles/segmented-tabs.css +184 -84
- package/src/styles/select.css +50 -0
- package/src/styles/theme/bridges.css +22 -1
- package/src/styles/theme/literals.css +11 -2
- package/src/styles/theme/radius.css +6 -1
- package/src/styles/tokens/color-radius.css +40 -13
- package/src/styles/tokens/dark-arm.css +200 -20
- package/src/styles/tokens/glass-deep.css +75 -0
- package/src/styles/tokens/glass-fx.css +333 -0
- package/src/styles/tokens/glass.css +95 -315
- package/src/styles/tokens/light-dark.css +64 -22
- package/src/styles/tokens/offsets.css +116 -0
- package/src/styles/tokens/on-glass-fg.css +39 -0
- package/src/styles/tokens/property-regs.css +130 -10
- package/src/styles/tokens/scale-paper.css +155 -84
- package/src/styles/tokens/scheme-motion.css +102 -46
- package/src/styles/tokens/scroll-tokens.css +123 -0
- package/src/styles/tokens/{offsets-sizing.css → sizing.css} +88 -89
- package/src/styles/tokens.css +9 -3
- package/src/styles/transitions.css +7 -7
- package/src/styles/typography/scale.css +153 -0
- package/src/styles/typography/semantic.css +220 -0
- package/src/styles/typography/utilities.css +174 -0
- package/src/styles/typography.css +23 -507
- package/src/styles/utilities/a11y-overrides.css +33 -4
- package/src/styles/utilities/animate.css +27 -24
- package/src/styles/utilities/base-misc.css +255 -0
- package/src/styles/utilities/base.css +100 -138
- package/src/styles/utilities/btn.css +21 -202
- package/src/styles/utilities/metal.css +189 -0
- package/src/styles/utilities.css +14 -7
- package/src/styles/view-transition.css +4 -1
- package/dist/CardAction-Cj2eycQ2.js +0 -157
- package/dist/DialogContent-Dl9WkAoS.js +0 -100
- package/dist/Notification-DdwNxIrI.js +0 -100
- package/dist/NumberFieldContent-CqaN-SvN.js +0 -145
- package/dist/PopoverContent-BYwt2-4x.js +0 -121
- package/dist/TabsList-Dttss653.js +0 -105
- package/dist/Toaster-D6q4HtXu.js +0 -263
- package/dist/button-ChXMfsud.js +0 -81
- package/dist/check-njhk-vfu.js +0 -7
- package/dist/chevron-down-DKkxb4VV.js +0 -7
- package/dist/chevron-right-CPXbqQQz.js +0 -7
- package/dist/chevron-up-n_24SqI-.js +0 -7
- package/dist/components/custom/underline/GlassUnderline.vue.d.ts +0 -84
- package/dist/components/custom/underline/index.d.ts +0 -2
- package/dist/components/custom/underline/types.d.ts +0 -56
- package/dist/components/ui/carousel/CarouselDots.vue.d.ts +0 -4
- package/dist/createLucideIcon-DydS2qgk.js +0 -43
- package/dist/minimize-2-BV31Ob_h.js +0 -38
- package/dist/search-BSGrf2Sk.js +0 -12
- package/dist/sheet-1fChZjtw.js +0 -214
- package/dist/underline.d.ts +0 -1
- package/dist/underline.js +0 -85
- package/dist/useCanvas2D-ClrQuZtp.js +0 -96
- package/dist/useConfiguratorState-DAoeHVue.js +0 -287
- package/dist/useSpecularTracking-Bo5su68i.js +0 -32
- package/dist/useSpringMount-CI2jOstM.js +0 -108
- package/dist/vReveal-CqaCz_mC.js +0 -44
- package/dist/x-BUwTKe50.js +0 -10
- /package/dist/{CollapsibleContent-CP9qF1v4.js → CollapsibleContent-68dEXIAl.js} +0 -0
- /package/dist/{InstrumentChassis-UUJX0-mW.js → InstrumentChassis-Bx0F_q5g.js} +0 -0
- /package/dist/{Label-r3WzWrsj.js → Label-C2ejNWeC.js} +0 -0
- /package/dist/{ModalOverlay-DVLI2VRr.js → ModalOverlay-D1VrWyoi.js} +0 -0
- /package/dist/{PaperBackdrop-DIXTtVq6.js → PaperBackdrop-Vf3tlpvd.js} +0 -0
- /package/dist/{SelectGroup-aumMgWLs.js → SelectGroup-DwwjicPY.js} +0 -0
- /package/dist/{SelectSeparator-BQ_1Fcbp.js → SelectSeparator-DXswVdRz.js} +0 -0
- /package/dist/{Separator-0JE6LtNu.js → Separator-pKF0oA4M.js} +0 -0
- /package/dist/{_plugin-vue_export-helper-ok8pgSl5.js → _plugin-vue_export-helper-C1je1s0u.js} +0 -0
- /package/dist/{badge-UILT_3pZ.js → badge-D9XWW4GT.js} +0 -0
- /package/dist/{color-CUYeFbgd.js → color-DweYl7pE.js} +0 -0
- /package/dist/{constants-CS75AWHG.js → constants-BPOqYJAm.js} +0 -0
- /package/dist/{createContext-BM46COQ-.js → createContext-CpBNTRMI.js} +0 -0
- /package/dist/{prng-D27-B3tK.js → prng-Za0Rmgag.js} +0 -0
- /package/dist/{resolveCanvasColor-BBiYfp8g.js → resolveCanvasColor-CUyHr5Uu.js} +0 -0
- /package/dist/{springPresets--YdWTHtm.js → springPresets-CFQGQfdl.js} +0 -0
- /package/dist/{useIntersectionPause-Cc-H9ees.js → useIntersectionPause-Bj4sPkMh.js} +0 -0
- /package/dist/{useInterval-iHludrxk.js → useInterval-CvK1mL92.js} +0 -0
- /package/dist/{useKeyboardShortcuts-Be3w_Rwk.js → useKeyboardShortcuts-BXWXOZ-9.js} +0 -0
- /package/dist/{useLiquidFlex-BL0lLLN2.js → useLiquidFlex-mZPMiNXh.js} +0 -0
- /package/dist/{useResizeObserver-BhgdhOIj.js → useResizeObserver-Bpoi7tRE.js} +0 -0
- /package/dist/{useResolveTokenColor-Dvn2RZJW.js → useResolveTokenColor-vAylyR0x.js} +0 -0
- /package/dist/{useScrollProgress-Dlvx-L3v.js → useScrollProgress-D7bYU2RK.js} +0 -0
- /package/dist/{useSortable-muI29agz.js → useSortable-DHjtZSEd.js} +0 -0
- /package/dist/{useTextHighlight-DmRYkOBx.js → useTextHighlight-CWEi25hf.js} +0 -0
- /package/dist/{useTimer-Dzarvzuk.js → useTimer-BHJOKr35.js} +0 -0
- /package/dist/{useUserInvalidAria-B2h6jAM_.js → useUserInvalidAria-y5namzeE.js} +0 -0
- /package/dist/{useViewportReady-B40FK4Pa.js → useViewportReady-anbac3m6.js} +0 -0
package/dist/dock.js
CHANGED
|
@@ -1,49 +1,32 @@
|
|
|
1
1
|
import { t as e } from "./cn-DJXf4yaB.js";
|
|
2
|
-
import { t } from "./
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import {
|
|
8
|
-
import { n as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { t as S } from "./
|
|
13
|
-
import { t as C } from "./
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
y: "3",
|
|
21
|
-
width: "5",
|
|
22
|
-
height: "18",
|
|
23
|
-
rx: "1",
|
|
24
|
-
key: "kaeet6"
|
|
25
|
-
}], ["rect", {
|
|
26
|
-
x: "5",
|
|
27
|
-
y: "3",
|
|
28
|
-
width: "5",
|
|
29
|
-
height: "18",
|
|
30
|
-
rx: "1",
|
|
31
|
-
key: "1wsw3u"
|
|
32
|
-
}]]), de = t("play", [["path", {
|
|
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",
|
|
34
|
-
key: "10ikf1"
|
|
35
|
-
}]]), fe = "(prefers-reduced-motion: reduce)", $ = 32;
|
|
36
|
-
function pe(e) {
|
|
2
|
+
import { a as t, b as n, o as r, v as i } from "./vendor-CKmzio-i.js";
|
|
3
|
+
import { t as a } from "./useLiquidFlex-mZPMiNXh.js";
|
|
4
|
+
import { t as o } from "./vSpecular-CQFmLNzA.js";
|
|
5
|
+
import { t as s } from "./useResizeObserver-Bpoi7tRE.js";
|
|
6
|
+
import { t as c } from "./useTouchGate-CBZTD4SD.js";
|
|
7
|
+
import { n as l } from "./useResolveTokenColor-vAylyR0x.js";
|
|
8
|
+
import { n as u, t as d } from "./createContext-CpBNTRMI.js";
|
|
9
|
+
import { a as f, c as p, i as m, n as h, o as g, r as _, s as v, t as y } from "./dockContext-BNfyPLe9.js";
|
|
10
|
+
import { t as b } from "./FadingScroll-DI6hQhT9.js";
|
|
11
|
+
import { t as x } from "./useIntersectionPause-Bj4sPkMh.js";
|
|
12
|
+
import { t as S } from "./useDragMorph-DgxnsVJz.js";
|
|
13
|
+
import { t as C } from "./useRAFLoop-UYa4zoiN.js";
|
|
14
|
+
import { Fragment as w, computed as T, createBlock as E, createCommentVNode as D, createElementBlock as O, createElementVNode as k, createVNode as A, defineComponent as j, mergeModels as M, mergeProps as N, nextTick as P, normalizeClass as F, normalizeStyle as I, onBeforeUnmount as L, onMounted as R, onScopeDispose as z, onUnmounted as B, openBlock as V, readonly as H, ref as U, renderList as ee, renderSlot as W, resolveDynamicComponent as G, toDisplayString as te, unref as K, useId as ne, useModel as re, useSlots as ie, useTemplateRef as q, watch as J, withCtx as Y, withDirectives as X } from "vue";
|
|
15
|
+
import { DropdownMenuTrigger as Z, Primitive as ae, SelectIcon as Q, SelectTrigger as oe, TabsIndicator as se, TabsList as ce, TabsRoot as le, TabsTrigger as ue, useForwardProps as de, useForwardPropsEmits as fe } from "reka-ui";
|
|
16
|
+
import { SpringProgress as pe } from "@mkbabb/keyframes.js";
|
|
17
|
+
//#region src/composables/glass/useGlassBackdropLuminance.ts
|
|
18
|
+
var me = "(prefers-reduced-motion: reduce)", $ = 32;
|
|
19
|
+
function he(e) {
|
|
37
20
|
return typeof HTMLCanvasElement < "u" && e instanceof HTMLCanvasElement;
|
|
38
21
|
}
|
|
39
|
-
function
|
|
22
|
+
function ge(e) {
|
|
40
23
|
let t = e / 255;
|
|
41
24
|
return t <= .03928 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
|
|
42
25
|
}
|
|
43
|
-
function
|
|
44
|
-
return .2126 *
|
|
26
|
+
function _e(e, t, n) {
|
|
27
|
+
return .2126 * ge(e) + .7152 * ge(t) + .0722 * ge(n);
|
|
45
28
|
}
|
|
46
|
-
function
|
|
29
|
+
function ve(e) {
|
|
47
30
|
let t = e.match(/rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:[,\s/]+([\d.]+))?/i);
|
|
48
31
|
return t ? [
|
|
49
32
|
Number(t[1]),
|
|
@@ -52,28 +35,28 @@ function ge(e) {
|
|
|
52
35
|
t[4] === void 0 ? 1 : Number(t[4])
|
|
53
36
|
] : null;
|
|
54
37
|
}
|
|
55
|
-
function
|
|
38
|
+
function ye(e) {
|
|
56
39
|
if (!e) return null;
|
|
57
|
-
if (
|
|
40
|
+
if (he(e)) return e;
|
|
58
41
|
if (typeof e == "function") {
|
|
59
42
|
let t = e();
|
|
60
|
-
return
|
|
43
|
+
return he(t) ? t : null;
|
|
61
44
|
}
|
|
62
45
|
if (typeof e == "string" && typeof document < "u") {
|
|
63
46
|
let t = document.querySelector(e);
|
|
64
|
-
return
|
|
47
|
+
return he(t) ? t : null;
|
|
65
48
|
}
|
|
66
49
|
return null;
|
|
67
50
|
}
|
|
68
|
-
function
|
|
69
|
-
let { lightThreshold: n = .6, minSampleIntervalMs: r = 250, writeBucket: i = !0 } = t,
|
|
51
|
+
function be(e, t = {}) {
|
|
52
|
+
let { lightThreshold: n = .6, minSampleIntervalMs: r = 250, writeBucket: i = !0 } = t, a = Math.max(250, r), o = U(null), c = U(null);
|
|
70
53
|
if (typeof window > "u") return {
|
|
71
|
-
luma: H(
|
|
72
|
-
bucket: H(
|
|
54
|
+
luma: H(o),
|
|
55
|
+
bucket: H(c),
|
|
73
56
|
sampleNow: () => {},
|
|
74
57
|
dispose: () => {}
|
|
75
58
|
};
|
|
76
|
-
let u = window.matchMedia(
|
|
59
|
+
let u = window.matchMedia(me), d = u.matches, f = null, p = null;
|
|
77
60
|
function m() {
|
|
78
61
|
return f || (f = document.createElement("canvas"), f.width = $, f.height = $), p ||= f.getContext("2d", { willReadFrequently: !0 }), p;
|
|
79
62
|
}
|
|
@@ -81,7 +64,7 @@ function ve(e, t = {}) {
|
|
|
81
64
|
return t.live === void 0 ? e.value?.dataset.glassSample === "live" : t.live;
|
|
82
65
|
}
|
|
83
66
|
function g(e) {
|
|
84
|
-
let n =
|
|
67
|
+
let n = ye(t.backgroundCanvas);
|
|
85
68
|
if (!n || n.width === 0 || n.height === 0) return null;
|
|
86
69
|
let r = m();
|
|
87
70
|
if (!r) return null;
|
|
@@ -94,7 +77,7 @@ function ve(e, t = {}) {
|
|
|
94
77
|
let e = r.getImageData(0, 0, $, $).data, t = 0, i = 0;
|
|
95
78
|
for (let n = 0; n < e.length; n += 4) {
|
|
96
79
|
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 +=
|
|
80
|
+
t += _e(a, o, s), i++;
|
|
98
81
|
}
|
|
99
82
|
return i > 0 ? t / i : null;
|
|
100
83
|
} catch {
|
|
@@ -105,18 +88,18 @@ function ve(e, t = {}) {
|
|
|
105
88
|
let t = e.getBoundingClientRect(), n = t.left + t.width / 2, r = t.top + t.height / 2, i = document.elementsFromPoint(n, r);
|
|
106
89
|
for (let t of i) {
|
|
107
90
|
if (!(t instanceof HTMLElement) || t === e || e.contains(t)) continue;
|
|
108
|
-
let n = getComputedStyle(t).backgroundColor, r =
|
|
109
|
-
if (r && !(r[3] < .5)) return
|
|
91
|
+
let n = getComputedStyle(t).backgroundColor, r = ve(l(n, e));
|
|
92
|
+
if (r && !(r[3] < .5)) return _e(r[0], r[1], r[2]);
|
|
110
93
|
}
|
|
111
|
-
let a =
|
|
112
|
-
return a ?
|
|
94
|
+
let a = ve(l(getComputedStyle(document.body).backgroundColor, e));
|
|
95
|
+
return a ? _e(a[0], a[1], a[2]) : null;
|
|
113
96
|
}
|
|
114
97
|
function v(t) {
|
|
115
|
-
|
|
98
|
+
o.value = t;
|
|
116
99
|
let r = e.value;
|
|
117
100
|
if (r && (r.style.setProperty("--glass-backdrop-luma", t.toFixed(3)), i)) {
|
|
118
101
|
let e = t >= n ? "light" : "dark";
|
|
119
|
-
|
|
102
|
+
c.value = e, r.style.setProperty("--glass-backdrop", e);
|
|
120
103
|
}
|
|
121
104
|
}
|
|
122
105
|
let y = 0;
|
|
@@ -126,50 +109,50 @@ function ve(e, t = {}) {
|
|
|
126
109
|
let n = h() ? g(t) ?? _(t) : _(t);
|
|
127
110
|
n !== null && v(n), y = typeof performance < "u" ? performance.now() : Date.now();
|
|
128
111
|
}
|
|
129
|
-
let
|
|
130
|
-
d || e - y <
|
|
112
|
+
let S = C(({ now: e }) => {
|
|
113
|
+
d || e - y < a || b();
|
|
131
114
|
}, {
|
|
132
115
|
immediate: !1,
|
|
133
116
|
pauseWhenHidden: !0,
|
|
134
117
|
respectReducedMotion: !0
|
|
135
|
-
}),
|
|
136
|
-
pause: () =>
|
|
118
|
+
}), w = x(() => e.value, {
|
|
119
|
+
pause: () => S.pause(),
|
|
137
120
|
resume: () => {
|
|
138
|
-
h() && !d &&
|
|
121
|
+
h() && !d && S.resume();
|
|
139
122
|
}
|
|
140
|
-
}, { rootMargin: "200px" }), T =
|
|
123
|
+
}, { rootMargin: "200px" }), T = s(e, () => b());
|
|
141
124
|
function E() {
|
|
142
|
-
d = u.matches, d ? (
|
|
125
|
+
d = u.matches, d ? (S.stop(), b()) : h() && S.start();
|
|
143
126
|
}
|
|
144
127
|
let D = () => E();
|
|
145
128
|
typeof u.addEventListener == "function" && u.addEventListener("change", D);
|
|
146
|
-
let O =
|
|
129
|
+
let O = J(() => e.value, (e) => {
|
|
147
130
|
e && (b(), E());
|
|
148
131
|
}, {
|
|
149
132
|
immediate: !0,
|
|
150
133
|
flush: "post"
|
|
151
134
|
});
|
|
152
135
|
function k() {
|
|
153
|
-
O(),
|
|
136
|
+
O(), S.dispose(), w.dispose(), T.stop(), typeof u.removeEventListener == "function" && u.removeEventListener("change", D), f = null, p = null;
|
|
154
137
|
}
|
|
155
138
|
return z(k), {
|
|
156
|
-
luma: H(
|
|
157
|
-
bucket: H(
|
|
139
|
+
luma: H(o),
|
|
140
|
+
bucket: H(c),
|
|
158
141
|
sampleNow: b,
|
|
159
142
|
dispose: k
|
|
160
143
|
};
|
|
161
144
|
}
|
|
162
145
|
//#endregion
|
|
163
146
|
//#region src/components/custom/dock/composables/isTeleportedTarget.ts
|
|
164
|
-
function
|
|
147
|
+
function xe(e, t) {
|
|
165
148
|
if (!(e instanceof Element)) return !1;
|
|
166
149
|
let n = e.closest("[data-glass-dock-portal]");
|
|
167
150
|
return n ? t ? n.getAttribute("data-glass-dock-owner") === t : !0 : !1;
|
|
168
151
|
}
|
|
169
152
|
//#endregion
|
|
170
153
|
//#region src/components/custom/dock/composables/useDockState.ts
|
|
171
|
-
function
|
|
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 =
|
|
154
|
+
function Se(e) {
|
|
155
|
+
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 = T(() => p.value > 0), h = null, g = null, _ = !1, v = null;
|
|
173
156
|
function y() {
|
|
174
157
|
v &&= (clearTimeout(v), null);
|
|
175
158
|
}
|
|
@@ -190,7 +173,7 @@ function be(e) {
|
|
|
190
173
|
function w() {
|
|
191
174
|
g !== null && (cancelAnimationFrame(g), g = null);
|
|
192
175
|
}
|
|
193
|
-
function
|
|
176
|
+
function E() {
|
|
194
177
|
w(), h?.();
|
|
195
178
|
}
|
|
196
179
|
function D() {
|
|
@@ -228,7 +211,7 @@ function be(e) {
|
|
|
228
211
|
if (p.value > 0) return;
|
|
229
212
|
if (e) {
|
|
230
213
|
let t = n.value;
|
|
231
|
-
if (t && e.relatedTarget instanceof Node && t.contains(e.relatedTarget) ||
|
|
214
|
+
if (t && e.relatedTarget instanceof Node && t.contains(e.relatedTarget) || xe(e.relatedTarget, a) || b(e)) return;
|
|
232
215
|
}
|
|
233
216
|
D();
|
|
234
217
|
}
|
|
@@ -239,7 +222,7 @@ function be(e) {
|
|
|
239
222
|
function P(e) {
|
|
240
223
|
if (s() || l.value !== "hover" || p.value > 0) return;
|
|
241
224
|
let t = e.currentTarget;
|
|
242
|
-
e.relatedTarget && t.contains(e.relatedTarget) ||
|
|
225
|
+
e.relatedTarget && t.contains(e.relatedTarget) || xe(e.relatedTarget, a) || D();
|
|
243
226
|
}
|
|
244
227
|
function F() {
|
|
245
228
|
if (s()) {
|
|
@@ -259,22 +242,22 @@ function be(e) {
|
|
|
259
242
|
function R(e) {
|
|
260
243
|
if (s() || i?.value) return;
|
|
261
244
|
let t = n.value;
|
|
262
|
-
!t || t.contains(e.target) ||
|
|
245
|
+
!t || t.contains(e.target) || xe(e.target, a) || k();
|
|
263
246
|
}
|
|
264
|
-
return
|
|
265
|
-
e ? (
|
|
247
|
+
return J(u, (e) => {
|
|
248
|
+
e ? (E(), g = requestAnimationFrame(() => {
|
|
266
249
|
g = null, u.value && (document.addEventListener("pointerdown", R, !0), h = () => {
|
|
267
250
|
document.removeEventListener("pointerdown", R, !0), h = null;
|
|
268
251
|
});
|
|
269
|
-
})) :
|
|
270
|
-
}), typeof r == "boolean" ? r && (l.value = "pinned", S()) :
|
|
252
|
+
})) : E();
|
|
253
|
+
}), typeof r == "boolean" ? r && (l.value = "pinned", S()) : J(r, (e) => {
|
|
271
254
|
if (e) {
|
|
272
255
|
C(), l.value = "pinned", S();
|
|
273
256
|
return;
|
|
274
257
|
}
|
|
275
258
|
l.value = "collapsed", S();
|
|
276
259
|
}, { immediate: !0 }), B(() => {
|
|
277
|
-
C(), y(),
|
|
260
|
+
C(), y(), E();
|
|
278
261
|
}), {
|
|
279
262
|
state: l,
|
|
280
263
|
expanded: u,
|
|
@@ -292,13 +275,61 @@ function be(e) {
|
|
|
292
275
|
};
|
|
293
276
|
}
|
|
294
277
|
//#endregion
|
|
295
|
-
//#region src/components/custom/dock/composables/
|
|
296
|
-
var xe = l(m), { KEY: Se } = xe;
|
|
278
|
+
//#region src/components/custom/dock/composables/dockMorphMeasure.ts
|
|
297
279
|
function Ce(e) {
|
|
298
|
-
|
|
280
|
+
return e === "vertical" ? "height" : "width";
|
|
281
|
+
}
|
|
282
|
+
function we(e) {
|
|
283
|
+
return Ce(e) === "width" ? "inline-size" : "block-size";
|
|
284
|
+
}
|
|
285
|
+
function Te(e, t) {
|
|
286
|
+
return e.getBoundingClientRect()[Ce(t)];
|
|
287
|
+
}
|
|
288
|
+
function Ee(e) {
|
|
289
|
+
e.style.removeProperty("--dock-morph-from"), e.style.removeProperty("--dock-morph-to");
|
|
290
|
+
}
|
|
291
|
+
function De(e, t, n) {
|
|
292
|
+
let r = [];
|
|
293
|
+
for (let i of n) {
|
|
294
|
+
if (i === e) continue;
|
|
295
|
+
let n = i.containerEl.value;
|
|
296
|
+
n && n !== t && t.contains(n) && r.push(i);
|
|
297
|
+
}
|
|
298
|
+
return r;
|
|
299
|
+
}
|
|
300
|
+
function Oe(e) {
|
|
301
|
+
let t = e.containerEl.value;
|
|
302
|
+
if (!t) return () => {};
|
|
303
|
+
let n = we(e.axis.value), r = t.style.getPropertyValue(n);
|
|
304
|
+
return t.style.setProperty(n, "max-content"), () => {
|
|
305
|
+
r ? t.style.setProperty(n, r) : t.style.removeProperty(n);
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
function ke(e, t, n) {
|
|
309
|
+
let r = e.axis.value, i = we(r);
|
|
310
|
+
Ee(t);
|
|
311
|
+
let a = De(e, t, n).map((e) => Oe(e)), o = t.style.getPropertyValue(i);
|
|
312
|
+
t.style.setProperty(i, "max-content");
|
|
313
|
+
let s = Te(t, r);
|
|
314
|
+
o ? t.style.setProperty(i, o) : t.style.removeProperty(i);
|
|
315
|
+
for (let e of a) e();
|
|
316
|
+
return s;
|
|
317
|
+
}
|
|
318
|
+
function Ae(e, t, n, r, i) {
|
|
319
|
+
if (t !== e.txId) return;
|
|
320
|
+
let a = e.containerEl.value, o = n;
|
|
321
|
+
if (!a || !o) return;
|
|
322
|
+
let s = e.axis.value, c = ke(e, a, r);
|
|
323
|
+
a.style.setProperty("--dock-morph-from", `${c}px`), a.style.setProperty("--dock-morph-to", `${c}px`), o.style.setProperty("--dock-morph-t", "1"), a.getBoundingClientRect()[Ce(s)], i.settleTarget(e), i.maybeSettleRoot();
|
|
324
|
+
}
|
|
325
|
+
//#endregion
|
|
326
|
+
//#region src/components/custom/dock/composables/dockMorphContext.ts
|
|
327
|
+
var je = d(g), { KEY: Me } = je;
|
|
328
|
+
function Ne(e) {
|
|
329
|
+
je.provide(e);
|
|
299
330
|
}
|
|
300
|
-
var
|
|
301
|
-
function
|
|
331
|
+
var Pe = je.use;
|
|
332
|
+
function Fe(e) {
|
|
302
333
|
let { rootEl: t, outerEl: n, outerActiveLayer: r, outerAxis: i } = e, a = null, o = /* @__PURE__ */ new Set();
|
|
303
334
|
function s() {
|
|
304
335
|
return t.value;
|
|
@@ -306,41 +337,32 @@ function Te(e) {
|
|
|
306
337
|
function c() {
|
|
307
338
|
a &&= (a.dispose(), null);
|
|
308
339
|
}
|
|
309
|
-
function l(
|
|
310
|
-
return
|
|
311
|
-
}
|
|
312
|
-
function u(e) {
|
|
313
|
-
return l(e) === "width" ? "inline-size" : "block-size";
|
|
314
|
-
}
|
|
315
|
-
function d(e, t) {
|
|
316
|
-
return e.getBoundingClientRect()[l(t)];
|
|
317
|
-
}
|
|
318
|
-
function f(e) {
|
|
319
|
-
e.style.removeProperty("--dock-morph-from"), e.style.removeProperty("--dock-morph-to");
|
|
340
|
+
function l() {
|
|
341
|
+
return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
320
342
|
}
|
|
321
|
-
function
|
|
343
|
+
function u() {
|
|
322
344
|
for (let e of o) {
|
|
323
345
|
let t = e.containerEl.value;
|
|
324
346
|
if (t && t.style.getPropertyValue("--dock-morph-to")) return !0;
|
|
325
347
|
}
|
|
326
348
|
return !1;
|
|
327
349
|
}
|
|
328
|
-
function
|
|
350
|
+
function d(e) {
|
|
329
351
|
let t = e.containerEl.value;
|
|
330
|
-
t &&
|
|
352
|
+
t && Ee(t), e.leavingLayer.value = null;
|
|
331
353
|
}
|
|
332
|
-
function
|
|
333
|
-
if (
|
|
354
|
+
function f() {
|
|
355
|
+
if (u()) return;
|
|
334
356
|
let e = s();
|
|
335
357
|
e && (e.style.removeProperty("--dock-morph-t"), e.removeAttribute("data-morphing")), c();
|
|
336
358
|
}
|
|
337
|
-
function
|
|
359
|
+
function p() {
|
|
338
360
|
if (!s()) return;
|
|
339
361
|
let e = a !== null && !a.settled ? a.velocity : 0;
|
|
340
362
|
if (!a || a.settled) {
|
|
341
|
-
c(), a = new
|
|
342
|
-
response:
|
|
343
|
-
dampingFraction:
|
|
363
|
+
c(), a = new pe({
|
|
364
|
+
response: v.response,
|
|
365
|
+
dampingFraction: v.dampingFraction,
|
|
344
366
|
initial: 0,
|
|
345
367
|
respectReducedMotion: !0
|
|
346
368
|
});
|
|
@@ -350,53 +372,63 @@ function Te(e) {
|
|
|
350
372
|
if (n && n.style.setProperty("--dock-morph-t", `${e}`), t.settled) {
|
|
351
373
|
for (let e of o) {
|
|
352
374
|
let t = e.containerEl.value;
|
|
353
|
-
t && t.style.getPropertyValue("--dock-morph-to") &&
|
|
375
|
+
t && t.style.getPropertyValue("--dock-morph-to") && d(e);
|
|
354
376
|
}
|
|
355
|
-
|
|
377
|
+
f();
|
|
356
378
|
}
|
|
357
379
|
});
|
|
358
380
|
} else a.reset(0, e), a.target = 1;
|
|
359
381
|
}
|
|
360
|
-
function
|
|
382
|
+
function m(e, t, n, r) {
|
|
361
383
|
if (t !== e.txId) return;
|
|
362
384
|
let i = e.containerEl.value, a = s();
|
|
363
385
|
if (!(!i || !a)) {
|
|
364
386
|
if (Math.abs(r - n) < .5) {
|
|
365
|
-
|
|
387
|
+
d(e), f();
|
|
366
388
|
return;
|
|
367
389
|
}
|
|
368
|
-
i.style.setProperty("--dock-morph-from", `${n}px`), i.style.setProperty("--dock-morph-to", `${r}px`), a.setAttribute("data-morphing", ""),
|
|
390
|
+
i.style.setProperty("--dock-morph-from", `${n}px`), i.style.setProperty("--dock-morph-to", `${r}px`), a.setAttribute("data-morphing", ""), p();
|
|
369
391
|
}
|
|
370
392
|
}
|
|
371
|
-
|
|
393
|
+
let h = {
|
|
394
|
+
settleTarget: d,
|
|
395
|
+
maybeSettleRoot: f
|
|
396
|
+
};
|
|
397
|
+
function g(e, t, n) {
|
|
372
398
|
if (t === n) return;
|
|
373
399
|
let r = e.containerEl.value, i = s();
|
|
374
400
|
if (!r || !i) {
|
|
375
401
|
e.currentLayer.value = t, e.leavingLayer.value = null;
|
|
376
402
|
return;
|
|
377
403
|
}
|
|
378
|
-
let a = ++e.txId, c = e.axis.value,
|
|
404
|
+
let a = ++e.txId, c = e.axis.value, u = Te(r, c);
|
|
379
405
|
e.leavingLayer.value = n, e.currentLayer.value = t;
|
|
380
406
|
for (let t of o) {
|
|
381
407
|
if (t === e) continue;
|
|
382
408
|
let n = t.containerEl.value;
|
|
383
409
|
if (n && n.style.getPropertyValue("--dock-morph-to")) {
|
|
384
|
-
let e =
|
|
410
|
+
let e = Te(n, t.axis.value);
|
|
385
411
|
n.style.setProperty("--dock-morph-from", `${e}px`);
|
|
386
412
|
}
|
|
387
413
|
}
|
|
388
|
-
r.style.setProperty("--dock-morph-from", `${
|
|
414
|
+
if (r.style.setProperty("--dock-morph-from", `${u}px`), r.style.setProperty("--dock-morph-to", `${u}px`), i.style.setProperty("--dock-morph-t", "0"), i.setAttribute("data-morphing", ""), l()) {
|
|
415
|
+
P(() => Ae(e, a, s(), o, h));
|
|
416
|
+
return;
|
|
417
|
+
}
|
|
418
|
+
requestAnimationFrame(() => {
|
|
389
419
|
if (a !== e.txId) return;
|
|
390
420
|
let t = e.containerEl.value, n = s();
|
|
391
421
|
if (!t || !n) return;
|
|
392
|
-
|
|
393
|
-
let r =
|
|
422
|
+
Ee(t);
|
|
423
|
+
let r = we(c), i = De(e, t, o).map((e) => Oe(e));
|
|
394
424
|
t.style.setProperty(r, "max-content");
|
|
395
|
-
let
|
|
396
|
-
t.style.removeProperty(r)
|
|
425
|
+
let l = Te(t, c);
|
|
426
|
+
t.style.removeProperty(r);
|
|
427
|
+
for (let e of i) e();
|
|
428
|
+
m(e, a, u, l);
|
|
397
429
|
});
|
|
398
430
|
}
|
|
399
|
-
function
|
|
431
|
+
function _(e) {
|
|
400
432
|
let t = {
|
|
401
433
|
containerEl: e.containerEl,
|
|
402
434
|
activeLayer: e.activeLayer,
|
|
@@ -406,77 +438,77 @@ function Te(e) {
|
|
|
406
438
|
txId: 0,
|
|
407
439
|
stop: () => {}
|
|
408
440
|
};
|
|
409
|
-
return t.stop =
|
|
410
|
-
|
|
441
|
+
return t.stop = J(e.activeLayer, (e, n) => {
|
|
442
|
+
g(t, e, n);
|
|
411
443
|
}), o.add(t), t;
|
|
412
444
|
}
|
|
413
|
-
function
|
|
414
|
-
e.stop(), o.delete(e),
|
|
445
|
+
function y(e) {
|
|
446
|
+
e.stop(), o.delete(e), f();
|
|
415
447
|
}
|
|
416
|
-
let
|
|
448
|
+
let b = _({
|
|
417
449
|
containerEl: n,
|
|
418
450
|
activeLayer: r,
|
|
419
451
|
axis: i
|
|
420
|
-
}),
|
|
421
|
-
let t =
|
|
452
|
+
}), x = { registerGroup(e) {
|
|
453
|
+
let t = _(e);
|
|
422
454
|
return {
|
|
423
455
|
currentLayer: H(t.currentLayer),
|
|
424
456
|
leavingLayer: H(t.leavingLayer),
|
|
425
|
-
release: () =>
|
|
457
|
+
release: () => y(t)
|
|
426
458
|
};
|
|
427
459
|
} };
|
|
428
|
-
function
|
|
460
|
+
function S(e) {
|
|
429
461
|
let t = n.value;
|
|
430
462
|
if (!t || e.target !== t) return;
|
|
431
|
-
let r =
|
|
432
|
-
e.propertyName !== r && e.propertyName !==
|
|
463
|
+
let r = we(i.value);
|
|
464
|
+
e.propertyName !== r && e.propertyName !== Ce(i.value) || a && a.settled && (d(b), f());
|
|
433
465
|
}
|
|
434
466
|
return B(() => {
|
|
435
467
|
for (let e of o) e.stop();
|
|
436
468
|
o.clear(), c();
|
|
437
469
|
}), {
|
|
438
|
-
context:
|
|
439
|
-
outerCurrentLayer: H(
|
|
440
|
-
onOuterTransitionEnd:
|
|
470
|
+
context: x,
|
|
471
|
+
outerCurrentLayer: H(b.currentLayer),
|
|
472
|
+
onOuterTransitionEnd: S
|
|
441
473
|
};
|
|
442
474
|
}
|
|
443
475
|
//#endregion
|
|
444
476
|
//#region src/components/custom/dock/composables/useDockShellProps.ts
|
|
445
|
-
function
|
|
446
|
-
let t =
|
|
477
|
+
function Ie(e) {
|
|
478
|
+
let t = T(() => {
|
|
447
479
|
if (e.containerName) return {
|
|
448
480
|
"container-type": "inline-size",
|
|
449
481
|
"container-name": e.containerName
|
|
450
482
|
};
|
|
451
|
-
}), n =
|
|
483
|
+
}), n = T(() => e.collapseDelay ?? 2e3), r = T(() => e.layout ?? "linear"), i = T(() => e.shape ?? "pill"), a = T(() => e.orientation ?? "horizontal"), o = T(() => e.density ?? "comfortable"), s = T(() => e.overflow === "scroll" ? a.value === "vertical" ? "dock-scroll-y" : "dock-scroll-x" : null), c = T(() => e.alwaysExpanded || r.value === "grid");
|
|
452
484
|
return {
|
|
453
485
|
containerStyle: t,
|
|
454
486
|
collapseDelay: n,
|
|
455
|
-
startCollapsed:
|
|
487
|
+
startCollapsed: T(() => c.value ? !1 : e.startCollapsed ?? !0),
|
|
456
488
|
layoutValue: r,
|
|
457
489
|
shape: i,
|
|
458
490
|
orientation: a,
|
|
459
491
|
density: o,
|
|
460
492
|
scrollClass: s,
|
|
461
493
|
alwaysExpanded: c,
|
|
462
|
-
fitContent:
|
|
494
|
+
fitContent: T(() => e.fitContent ?? !1)
|
|
463
495
|
};
|
|
464
496
|
}
|
|
465
497
|
//#endregion
|
|
466
498
|
//#region src/components/custom/dock/composables/useDockMorphWindow.ts
|
|
467
|
-
function
|
|
499
|
+
function Le(e) {
|
|
468
500
|
let t = e.trim();
|
|
469
501
|
return t ? t.endsWith("ms") ? Number.parseFloat(t) : t.endsWith("s") ? Number.parseFloat(t) * 1e3 : Number.parseFloat(t) || 0 : 0;
|
|
470
502
|
}
|
|
471
|
-
function
|
|
472
|
-
let t = getComputedStyle(e), n = t.transitionDuration.split(",").map(
|
|
503
|
+
function Re(e) {
|
|
504
|
+
let t = getComputedStyle(e), n = t.transitionDuration.split(",").map(Le), r = t.transitionDelay.split(",").map(Le);
|
|
473
505
|
return Math.max(0, ...n.map((e, t) => e + (r[t] ?? r[0] ?? 0)));
|
|
474
506
|
}
|
|
475
|
-
function
|
|
476
|
-
let t =
|
|
507
|
+
function ze(e) {
|
|
508
|
+
let t = Le(getComputedStyle(e).getPropertyValue("--duration-normal") || "0.3s");
|
|
477
509
|
return Math.max(t > 0 ? t * 2 : 0, 600);
|
|
478
510
|
}
|
|
479
|
-
function
|
|
511
|
+
function Be(e, t) {
|
|
480
512
|
let n = null, r = 0;
|
|
481
513
|
function i() {
|
|
482
514
|
n &&= (clearTimeout(n), null);
|
|
@@ -487,12 +519,12 @@ function Ae(e, t) {
|
|
|
487
519
|
let o = ++r;
|
|
488
520
|
i(), t.value = !0, n = setTimeout(() => {
|
|
489
521
|
o === r && (t.value = !1, n = null);
|
|
490
|
-
}, Math.max(
|
|
522
|
+
}, Math.max(Re(a), ze(a)) + 50);
|
|
491
523
|
}
|
|
492
524
|
function o(n) {
|
|
493
|
-
n.target === e.value &&
|
|
525
|
+
n.target === e.value && p.has(n.propertyName) && (i(), r++, t.value = !1);
|
|
494
526
|
}
|
|
495
|
-
return
|
|
527
|
+
return L(i), {
|
|
496
528
|
markTransitioning: a,
|
|
497
529
|
onDockTransitionDone: o,
|
|
498
530
|
clearTransitionTimer: i
|
|
@@ -500,7 +532,7 @@ function Ae(e, t) {
|
|
|
500
532
|
}
|
|
501
533
|
//#endregion
|
|
502
534
|
//#region src/components/custom/dock/composables/useDockClickIntegrity.ts
|
|
503
|
-
function
|
|
535
|
+
function Ve(e) {
|
|
504
536
|
let { rootEl: t, visualExpanded: n } = e, r = null, i = !1, a = 0, o = null;
|
|
505
537
|
function s() {
|
|
506
538
|
o !== null && (clearTimeout(o), o = null);
|
|
@@ -544,7 +576,7 @@ function je(e) {
|
|
|
544
576
|
e.stopPropagation(), e.preventDefault(), r = null;
|
|
545
577
|
}
|
|
546
578
|
}
|
|
547
|
-
return
|
|
579
|
+
return L(s), {
|
|
548
580
|
onPointerDownCapture: f,
|
|
549
581
|
onClickCapture: m,
|
|
550
582
|
markExpandFlip: c
|
|
@@ -552,14 +584,14 @@ function je(e) {
|
|
|
552
584
|
}
|
|
553
585
|
//#endregion
|
|
554
586
|
//#region src/components/custom/dock/GlassDock.vue?vue&type=script&setup=true&lang.ts
|
|
555
|
-
var
|
|
587
|
+
var He = ["data-has-rail"], Ue = [
|
|
556
588
|
"data-density",
|
|
557
589
|
"data-held",
|
|
558
590
|
"data-container-name"
|
|
559
|
-
],
|
|
591
|
+
], We = {
|
|
560
592
|
key: 0,
|
|
561
593
|
class: "dock-persistent"
|
|
562
|
-
},
|
|
594
|
+
}, Ge = ["inert"], Ke = ["inert"], qe = /* @__PURE__ */ j({
|
|
563
595
|
inheritAttrs: !1,
|
|
564
596
|
__name: "GlassDock",
|
|
565
597
|
props: {
|
|
@@ -582,300 +614,512 @@ var Me = ["data-has-rail"], Ne = [
|
|
|
582
614
|
] }
|
|
583
615
|
},
|
|
584
616
|
setup(e, { expose: t }) {
|
|
585
|
-
let n = e, { containerStyle: r, collapseDelay: i, startCollapsed: a, layoutValue:
|
|
586
|
-
n.autoLuminance !== !1 &&
|
|
587
|
-
let
|
|
617
|
+
let n = e, { containerStyle: r, collapseDelay: i, startCollapsed: a, layoutValue: o, shape: l, orientation: u, density: d, scrollClass: f, alwaysExpanded: p, fitContent: m } = Ie(n), g = o, _ = q("dockEl"), v = q("layersEl");
|
|
618
|
+
n.autoLuminance !== !1 && be(_, { backgroundCanvas: n.backgroundCanvas ?? null });
|
|
619
|
+
let y = U(!1), b = c(i.value), x = `glass-dock-${ne()}`, { expanded: S, isPinned: C, isHeld: w, onMouseEnter: E, onMouseLeave: A, onFocusIn: j, onFocusOut: M, onClickCollapsed: P, keepOpen: I, release: L, expand: z, collapse: B } = Se({
|
|
588
620
|
collapseDelay: i.value,
|
|
589
|
-
rootEl:
|
|
590
|
-
alwaysExpanded:
|
|
591
|
-
isTransitioning:
|
|
592
|
-
dockId:
|
|
621
|
+
rootEl: _,
|
|
622
|
+
alwaysExpanded: p,
|
|
623
|
+
isTransitioning: y,
|
|
624
|
+
dockId: x
|
|
593
625
|
});
|
|
594
|
-
|
|
595
|
-
id:
|
|
596
|
-
orientation:
|
|
597
|
-
layout:
|
|
598
|
-
keepOpen:
|
|
599
|
-
release:
|
|
600
|
-
held:
|
|
626
|
+
h({
|
|
627
|
+
id: x,
|
|
628
|
+
orientation: u,
|
|
629
|
+
layout: g,
|
|
630
|
+
keepOpen: I,
|
|
631
|
+
release: L,
|
|
632
|
+
held: w
|
|
601
633
|
});
|
|
602
|
-
let
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
634
|
+
let H = T(() => p.value || S.value), ee = ie(), G = T(() => !!ee.rail), te = q("frameEl");
|
|
635
|
+
function re() {
|
|
636
|
+
let e = te.value;
|
|
637
|
+
if (!e || !G.value) return;
|
|
638
|
+
let t = _.value?.querySelector("[data-rail-anchor]");
|
|
639
|
+
if (!t) {
|
|
640
|
+
e.style.removeProperty("--dock-rail-seam-offset");
|
|
641
|
+
return;
|
|
642
|
+
}
|
|
643
|
+
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = u.value === "vertical" ? r.top + r.height / 2 - n.top : r.left + r.width / 2 - n.left;
|
|
644
|
+
e.style.setProperty("--dock-rail-seam-offset", `${Math.round(i)}px`);
|
|
645
|
+
}
|
|
646
|
+
s(_, () => re()), R(() => re()), J([u, G], () => re(), { flush: "post" });
|
|
647
|
+
let { context: Y, onOuterTransitionEnd: X } = Fe({
|
|
648
|
+
rootEl: _,
|
|
649
|
+
outerEl: v,
|
|
650
|
+
outerActiveLayer: T(() => H.value ? "full" : "summary"),
|
|
651
|
+
outerAxis: T(() => u.value)
|
|
607
652
|
});
|
|
608
|
-
|
|
609
|
-
let
|
|
610
|
-
rootEl:
|
|
611
|
-
visualExpanded:
|
|
653
|
+
Ne(Y);
|
|
654
|
+
let Z = T(() => ({ "view-transition-name": x.replace(/[^a-zA-Z0-9_-]/g, "-") })), { markTransitioning: ae, onDockTransitionDone: Q } = Be(_, y), { onPointerDownCapture: oe, onClickCapture: se, markExpandFlip: ce } = Ve({
|
|
655
|
+
rootEl: _,
|
|
656
|
+
visualExpanded: H
|
|
612
657
|
});
|
|
613
|
-
|
|
614
|
-
(n.alwaysExpanded || !a.value) &&
|
|
658
|
+
R(() => {
|
|
659
|
+
(n.alwaysExpanded || !a.value) && z();
|
|
615
660
|
});
|
|
616
|
-
function
|
|
617
|
-
return !
|
|
661
|
+
function le() {
|
|
662
|
+
return !p.value;
|
|
618
663
|
}
|
|
619
|
-
function
|
|
620
|
-
if (!
|
|
621
|
-
let t =
|
|
622
|
-
!t || !n ||
|
|
664
|
+
function ue(e) {
|
|
665
|
+
if (!le() || H.value) return;
|
|
666
|
+
let t = _.value, n = e.touches[0];
|
|
667
|
+
!t || !n || b.handleTouchStart(t, n.clientY);
|
|
623
668
|
}
|
|
624
|
-
function
|
|
625
|
-
|
|
669
|
+
function de(e) {
|
|
670
|
+
le() && b.handleScrollCheck(e);
|
|
626
671
|
}
|
|
627
|
-
function
|
|
628
|
-
if (!
|
|
629
|
-
let e =
|
|
630
|
-
|
|
672
|
+
function fe() {
|
|
673
|
+
if (!le()) return;
|
|
674
|
+
let e = b.isActive.value;
|
|
675
|
+
b.handleTouchEnd(), !e && b.isActive.value && !H.value && z();
|
|
631
676
|
}
|
|
632
|
-
return
|
|
633
|
-
!e &&
|
|
634
|
-
}),
|
|
635
|
-
|
|
677
|
+
return J(b.isActive, (e) => {
|
|
678
|
+
!e && S.value && !C.value && !p.value && B();
|
|
679
|
+
}), J(H, (e) => {
|
|
680
|
+
ae(), e ? ce() : b.deactivate();
|
|
636
681
|
}), t({
|
|
637
|
-
expanded:
|
|
638
|
-
isPinned:
|
|
639
|
-
isHeld:
|
|
640
|
-
isTransitioning:
|
|
641
|
-
expand:
|
|
642
|
-
collapse:
|
|
643
|
-
keepOpen:
|
|
644
|
-
release:
|
|
645
|
-
}), (t, n) => (V(),
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
682
|
+
expanded: S,
|
|
683
|
+
isPinned: C,
|
|
684
|
+
isHeld: w,
|
|
685
|
+
isTransitioning: y,
|
|
686
|
+
expand: z,
|
|
687
|
+
collapse: B,
|
|
688
|
+
keepOpen: I,
|
|
689
|
+
release: L
|
|
690
|
+
}), (t, n) => (V(), O("div", {
|
|
691
|
+
ref_key: "frameEl",
|
|
692
|
+
ref: te,
|
|
693
|
+
class: F(["glass-dock-frame", K(u)]),
|
|
694
|
+
"data-has-rail": G.value || void 0
|
|
695
|
+
}, [k("div", N({
|
|
649
696
|
ref_key: "dockEl",
|
|
650
|
-
ref:
|
|
697
|
+
ref: _
|
|
651
698
|
}, t.$attrs, {
|
|
652
699
|
class: ["glass-dock", [
|
|
653
|
-
K(
|
|
654
|
-
`shape-${K(
|
|
655
|
-
`layout-${K(
|
|
656
|
-
K(
|
|
700
|
+
K(u),
|
|
701
|
+
`shape-${K(l)}`,
|
|
702
|
+
`layout-${K(g)}`,
|
|
703
|
+
K(f),
|
|
657
704
|
{
|
|
658
|
-
expanded:
|
|
659
|
-
collapsed: !
|
|
660
|
-
pinned: K(
|
|
705
|
+
expanded: H.value,
|
|
706
|
+
collapsed: !H.value,
|
|
707
|
+
pinned: K(C),
|
|
661
708
|
"fit-content": K(m),
|
|
662
|
-
"always-expanded": K(
|
|
663
|
-
"dock-overflow-wrap": e.overflow === "wrap" && K(
|
|
709
|
+
"always-expanded": K(p),
|
|
710
|
+
"dock-overflow-wrap": e.overflow === "wrap" && K(u) !== "vertical"
|
|
664
711
|
},
|
|
665
712
|
e.position === "fixed" ? "fixed bottom-(--dock-pos) left-1/2 -translate-x-1/2" : e.position === "sticky" ? "dock-sticky" : "dock-inline"
|
|
666
713
|
]],
|
|
667
|
-
"data-density": K(
|
|
668
|
-
"data-held": K(
|
|
714
|
+
"data-density": K(d),
|
|
715
|
+
"data-held": K(w) || void 0,
|
|
669
716
|
"data-container-name": e.containerName || void 0,
|
|
670
|
-
style: [K(r),
|
|
671
|
-
onMouseenter: n[2] ||= (...e) => K(
|
|
672
|
-
onMouseleave: n[3] ||= (e) => K(
|
|
673
|
-
onFocusin: n[4] ||= (...e) => K(
|
|
674
|
-
onFocusout: n[5] ||= (...e) => K(
|
|
675
|
-
onTouchstart:
|
|
676
|
-
onTouchmove:
|
|
677
|
-
onTouchend:
|
|
678
|
-
onPointerdownCapture: n[6] ||= (...e) => K(
|
|
679
|
-
onClickCapture: n[7] ||= (...e) => K(
|
|
680
|
-
onTransitionend: n[8] ||= (...e) => K(
|
|
681
|
-
onTransitioncancel: n[9] ||= (...e) => K(
|
|
682
|
-
}), [t.$slots.persistent ? (V(),
|
|
717
|
+
style: [K(r), Z.value],
|
|
718
|
+
onMouseenter: n[2] ||= (...e) => K(E) && K(E)(...e),
|
|
719
|
+
onMouseleave: n[3] ||= (e) => K(A)(e),
|
|
720
|
+
onFocusin: n[4] ||= (...e) => K(j) && K(j)(...e),
|
|
721
|
+
onFocusout: n[5] ||= (...e) => K(M) && K(M)(...e),
|
|
722
|
+
onTouchstart: ue,
|
|
723
|
+
onTouchmove: de,
|
|
724
|
+
onTouchend: fe,
|
|
725
|
+
onPointerdownCapture: n[6] ||= (...e) => K(oe) && K(oe)(...e),
|
|
726
|
+
onClickCapture: n[7] ||= (...e) => K(se) && K(se)(...e),
|
|
727
|
+
onTransitionend: n[8] ||= (...e) => K(Q) && K(Q)(...e),
|
|
728
|
+
onTransitioncancel: n[9] ||= (...e) => K(Q) && K(Q)(...e)
|
|
729
|
+
}), [t.$slots.persistent ? (V(), O("div", We, [W(t.$slots, "persistent")])) : D("", !0), k("div", {
|
|
683
730
|
ref_key: "layersEl",
|
|
684
|
-
ref:
|
|
731
|
+
ref: v,
|
|
685
732
|
class: "dock-layers",
|
|
686
|
-
onTransitionend: n[1] ||= (...e) => K(
|
|
687
|
-
}, [
|
|
688
|
-
class:
|
|
689
|
-
inert: !K(
|
|
690
|
-
}, [W(t.$slots, "default")], 10,
|
|
691
|
-
class:
|
|
692
|
-
inert: K(
|
|
693
|
-
onClick: n[0] ||= (...e) => K(
|
|
694
|
-
}, [W(t.$slots, "collapsed")], 10,
|
|
733
|
+
onTransitionend: n[1] ||= (...e) => K(X) && K(X)(...e)
|
|
734
|
+
}, [k("div", {
|
|
735
|
+
class: F(["dock-layer dock-layer--full", { "is-active": H.value }]),
|
|
736
|
+
inert: !K(S) || void 0
|
|
737
|
+
}, [W(t.$slots, "default")], 10, Ge), k("div", {
|
|
738
|
+
class: F(["dock-layer dock-layer--summary", { "is-active": !H.value }]),
|
|
739
|
+
inert: K(S) || void 0,
|
|
740
|
+
onClick: n[0] ||= (...e) => K(P) && K(P)(...e)
|
|
741
|
+
}, [W(t.$slots, "collapsed")], 10, Ke)], 544)], 16, Ue), G.value ? (V(), O("div", {
|
|
695
742
|
key: 0,
|
|
696
|
-
class:
|
|
697
|
-
}, [W(t.$slots, "rail")], 2)) :
|
|
743
|
+
class: F(["dock-hairline-slot", K(u)])
|
|
744
|
+
}, [W(t.$slots, "rail")], 2)) : D("", !0)], 10, He));
|
|
698
745
|
}
|
|
699
|
-
}),
|
|
700
|
-
|
|
701
|
-
|
|
746
|
+
}), Je = /* @__PURE__ */ j({
|
|
747
|
+
__name: "Tabs",
|
|
748
|
+
props: {
|
|
749
|
+
defaultValue: {},
|
|
750
|
+
orientation: {},
|
|
751
|
+
dir: {},
|
|
752
|
+
activationMode: {},
|
|
753
|
+
modelValue: {},
|
|
754
|
+
unmountOnHide: { type: Boolean },
|
|
755
|
+
asChild: { type: Boolean },
|
|
756
|
+
as: {}
|
|
757
|
+
},
|
|
758
|
+
emits: ["update:modelValue"],
|
|
759
|
+
setup(e, { emit: t }) {
|
|
760
|
+
let n = fe(e, t);
|
|
761
|
+
return (e, t) => (V(), E(K(le), N({ "data-slot": "tabs" }, K(n)), {
|
|
762
|
+
default: Y(() => [W(e.$slots, "default")]),
|
|
763
|
+
_: 3
|
|
764
|
+
}, 16));
|
|
765
|
+
}
|
|
766
|
+
}), Ye = /* @__PURE__ */ j({
|
|
767
|
+
__name: "TabsTrigger",
|
|
768
|
+
props: {
|
|
769
|
+
value: {},
|
|
770
|
+
disabled: { type: Boolean },
|
|
771
|
+
asChild: { type: Boolean },
|
|
772
|
+
as: {},
|
|
773
|
+
class: { type: [
|
|
774
|
+
Boolean,
|
|
775
|
+
null,
|
|
776
|
+
String,
|
|
777
|
+
Object,
|
|
778
|
+
Array
|
|
779
|
+
] }
|
|
780
|
+
},
|
|
781
|
+
setup(t) {
|
|
782
|
+
let n = t, r = de(T(() => {
|
|
783
|
+
let { class: e, ...t } = n;
|
|
784
|
+
return t;
|
|
785
|
+
}));
|
|
786
|
+
return (t, i) => (V(), E(K(ue), N({ "data-slot": "tabs-trigger" }, K(r), { class: K(e)("tap-squish focus-ring relative z-[1] inline-flex items-center justify-center whitespace-nowrap rounded-control p-1 px-3 text-sm font-medium transition-control disabled:pointer-events-none disabled:opacity-disabled data-[state=active]:text-[var(--active-tab-color,var(--foreground))] hover:text-foreground/70", n.class) }), {
|
|
787
|
+
default: Y(() => [W(t.$slots, "default")]),
|
|
788
|
+
_: 3
|
|
789
|
+
}, 16, ["class"]));
|
|
790
|
+
}
|
|
791
|
+
}), Xe = /* @__PURE__ */ j({
|
|
792
|
+
__name: "TabsIndicator",
|
|
793
|
+
props: {
|
|
794
|
+
asChild: { type: Boolean },
|
|
795
|
+
as: {},
|
|
796
|
+
class: { type: [
|
|
797
|
+
Boolean,
|
|
798
|
+
null,
|
|
799
|
+
String,
|
|
800
|
+
Object,
|
|
801
|
+
Array
|
|
802
|
+
] },
|
|
803
|
+
surface: {
|
|
804
|
+
type: Boolean,
|
|
805
|
+
default: !0
|
|
806
|
+
}
|
|
807
|
+
},
|
|
808
|
+
setup(t) {
|
|
809
|
+
let n = t, r = T(() => {
|
|
810
|
+
let { class: e, surface: t, ...r } = n;
|
|
811
|
+
return r;
|
|
812
|
+
});
|
|
813
|
+
return (t, i) => (V(), E(K(se), N({ "data-slot": "tabs-indicator" }, r.value, { class: K(e)("pointer-events-none absolute left-0 bottom-1 top-1 z-0 w-(--reka-tabs-indicator-size) translate-x-(--reka-tabs-indicator-position) rounded-pill transition-[width,translate] duration-normal ease-spring-snappy", n.surface && "bg-(--glass-bg-quiet) [backdrop-filter:var(--glass-blur-quiet)]", n.class) }), null, 16, ["class"]));
|
|
814
|
+
}
|
|
815
|
+
}), Ze = /* @__PURE__ */ j({
|
|
816
|
+
__name: "TabsList",
|
|
817
|
+
props: {
|
|
818
|
+
loop: { type: Boolean },
|
|
819
|
+
asChild: { type: Boolean },
|
|
820
|
+
as: {},
|
|
821
|
+
class: { type: [
|
|
822
|
+
Boolean,
|
|
823
|
+
null,
|
|
824
|
+
String,
|
|
825
|
+
Object,
|
|
826
|
+
Array
|
|
827
|
+
] },
|
|
828
|
+
indicator: {
|
|
829
|
+
type: Boolean,
|
|
830
|
+
default: !0
|
|
831
|
+
}
|
|
832
|
+
},
|
|
833
|
+
setup(t) {
|
|
834
|
+
let n = t, r = T(() => {
|
|
835
|
+
let { class: e, indicator: t, ...r } = n;
|
|
836
|
+
return r;
|
|
837
|
+
});
|
|
838
|
+
return (i, a) => (V(), E(K(ce), N({ "data-slot": "tabs-list" }, r.value, { class: K(e)("relative inline-flex h-(--control-h-md) items-center justify-center rounded-input p-1 text-muted-foreground", n.class) }), {
|
|
839
|
+
default: Y(() => [t.indicator ? (V(), E(Xe, { key: 0 })) : D("", !0), W(i.$slots, "default")]),
|
|
840
|
+
_: 3
|
|
841
|
+
}, 16, ["class"]));
|
|
842
|
+
}
|
|
843
|
+
}), Qe = u(f, "[glass-ui:dock] <DockLayer> must be used inside <DockLayerGroup>"), { KEY: $e } = Qe;
|
|
844
|
+
function et(e) {
|
|
845
|
+
Qe.provide(e);
|
|
702
846
|
}
|
|
703
|
-
var
|
|
704
|
-
|
|
847
|
+
var tt = Qe.use;
|
|
848
|
+
Qe.useOptional;
|
|
705
849
|
//#endregion
|
|
706
850
|
//#region src/components/custom/dock/composables/useLayerTransition.ts
|
|
707
|
-
function
|
|
708
|
-
let { containerEl: t, activeLayer: n, axis: r } = e, i =
|
|
851
|
+
function nt(e) {
|
|
852
|
+
let { containerEl: t, activeLayer: n, axis: r } = e, i = T(() => r?.value === "vertical" ? "height" : "width"), a = T(() => i.value === "width" ? "inline-size" : "block-size"), o = (e) => e.getBoundingClientRect()[i.value], s = U(n.value), c = U(null), l = 0, u = U(!1), d = [];
|
|
709
853
|
function f() {
|
|
710
|
-
|
|
854
|
+
if (d.length === 0) return;
|
|
855
|
+
let e = d.splice(0, d.length);
|
|
856
|
+
for (let t of e) t();
|
|
711
857
|
}
|
|
712
|
-
|
|
858
|
+
let p = null, m = null;
|
|
859
|
+
function h() {
|
|
860
|
+
p &&= (p.dispose(), null), m = null;
|
|
861
|
+
}
|
|
862
|
+
function g(e) {
|
|
713
863
|
return e.closest(".glass-dock") ?? e;
|
|
714
864
|
}
|
|
715
|
-
function
|
|
865
|
+
function _(e) {
|
|
866
|
+
if (u.value) {
|
|
867
|
+
d.push(e);
|
|
868
|
+
return;
|
|
869
|
+
}
|
|
870
|
+
requestAnimationFrame(e);
|
|
871
|
+
}
|
|
872
|
+
function y(e) {
|
|
716
873
|
e.style.removeProperty("--dock-morph-from"), e.style.removeProperty("--dock-morph-to");
|
|
717
874
|
}
|
|
718
|
-
function
|
|
719
|
-
|
|
875
|
+
function b() {
|
|
876
|
+
return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
720
877
|
}
|
|
721
|
-
function
|
|
878
|
+
function x(e, t, n) {
|
|
879
|
+
if (n !== l) return;
|
|
880
|
+
let r = a.value;
|
|
881
|
+
y(e);
|
|
882
|
+
let s = e.style.getPropertyValue(r);
|
|
883
|
+
e.style.setProperty(r, "max-content");
|
|
884
|
+
let c = o(e);
|
|
885
|
+
s ? e.style.setProperty(r, s) : e.style.removeProperty(r), e.style.setProperty("--dock-morph-from", `${c}px`), e.style.setProperty("--dock-morph-to", `${c}px`), t.style.setProperty("--dock-morph-t", "1"), e.getBoundingClientRect()[i.value], S(e, t);
|
|
886
|
+
}
|
|
887
|
+
function S(e, t) {
|
|
888
|
+
y(e), t.style.removeProperty("--dock-morph-t"), t.removeAttribute("data-morphing"), c.value = null, h(), u.value = !1, f();
|
|
889
|
+
}
|
|
890
|
+
function C(e, t, n, r, i, a, o) {
|
|
722
891
|
if (Math.abs(i - r) < .5) {
|
|
723
|
-
|
|
892
|
+
S(e, t);
|
|
724
893
|
return;
|
|
725
894
|
}
|
|
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 || (
|
|
727
|
-
response:
|
|
728
|
-
dampingFraction:
|
|
895
|
+
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", ""), u.value = !0, o || (h(), p = new pe({
|
|
896
|
+
response: v.response,
|
|
897
|
+
dampingFraction: v.dampingFraction,
|
|
729
898
|
initial: 0,
|
|
730
899
|
respectReducedMotion: !0
|
|
731
|
-
}),
|
|
732
|
-
let s =
|
|
900
|
+
}), m = e);
|
|
901
|
+
let s = p;
|
|
733
902
|
s.reset(0, a), s.target = 1, s.play((r) => {
|
|
734
|
-
n === l && (t.style.setProperty("--dock-morph-t", `${r}`), s.settled &&
|
|
903
|
+
n === l && (t.style.setProperty("--dock-morph-t", `${r}`), s.settled && S(e, t));
|
|
735
904
|
});
|
|
736
905
|
}
|
|
737
|
-
|
|
906
|
+
J(n, (e, n) => {
|
|
738
907
|
if (e === n) return;
|
|
739
908
|
let r = t.value;
|
|
740
909
|
if (!r) {
|
|
741
910
|
s.value = e, c.value = null;
|
|
742
911
|
return;
|
|
743
912
|
}
|
|
744
|
-
let i =
|
|
745
|
-
c.value = n, s.value = e, r.style.setProperty("--dock-morph-from", `${
|
|
746
|
-
|
|
913
|
+
let i = g(r), d = ++l, f = p !== null && m === r && !p.settled ? p : null, h = f ? f.velocity : 0, _ = o(r);
|
|
914
|
+
if (c.value = n, s.value = e, r.style.setProperty("--dock-morph-from", `${_}px`), r.style.setProperty("--dock-morph-to", `${_}px`), i.style.setProperty("--dock-morph-t", "0"), i.setAttribute("data-morphing", ""), u.value = !0, b()) {
|
|
915
|
+
P(() => x(r, i, d));
|
|
916
|
+
return;
|
|
917
|
+
}
|
|
918
|
+
requestAnimationFrame(() => {
|
|
919
|
+
if (d !== l) return;
|
|
747
920
|
let e = t.value;
|
|
748
921
|
if (!e) return;
|
|
749
|
-
let n =
|
|
750
|
-
|
|
922
|
+
let n = g(e);
|
|
923
|
+
y(e), n.style.removeProperty("--dock-morph-t"), e.style.setProperty(a.value, "max-content");
|
|
751
924
|
let r = o(e);
|
|
752
|
-
e.style.removeProperty(a.value),
|
|
925
|
+
e.style.removeProperty(a.value), C(e, n, d, _, r, h, f);
|
|
753
926
|
});
|
|
754
927
|
});
|
|
755
|
-
function
|
|
928
|
+
function w(e) {
|
|
756
929
|
let n = t.value;
|
|
757
|
-
n && e.target === n && (e.propertyName !== a.value && e.propertyName !== i.value ||
|
|
930
|
+
n && e.target === n && (e.propertyName !== a.value && e.propertyName !== i.value || p && p.settled && S(n, g(n)));
|
|
758
931
|
}
|
|
759
|
-
return B(
|
|
760
|
-
|
|
932
|
+
return B(() => {
|
|
933
|
+
h(), d.length = 0;
|
|
934
|
+
}), {
|
|
935
|
+
onTransitionEnd: w,
|
|
761
936
|
currentLayer: s,
|
|
762
|
-
leavingLayer: c
|
|
937
|
+
leavingLayer: c,
|
|
938
|
+
morphing: u,
|
|
939
|
+
deferReposition: _
|
|
763
940
|
};
|
|
764
941
|
}
|
|
765
942
|
//#endregion
|
|
766
943
|
//#region src/components/custom/dock/DockLayerGroup.vue?vue&type=script&setup=true&lang.ts
|
|
767
|
-
var
|
|
944
|
+
var rt = { key: 1 }, it = { key: 2 }, at = /* @__PURE__ */ j({
|
|
768
945
|
__name: "DockLayerGroup",
|
|
769
|
-
props: /* @__PURE__ */
|
|
946
|
+
props: /* @__PURE__ */ M({
|
|
770
947
|
orientation: {},
|
|
771
948
|
showRail: {
|
|
772
949
|
type: Boolean,
|
|
773
950
|
default: !0
|
|
774
951
|
},
|
|
775
|
-
railPosition: { default: "start" }
|
|
952
|
+
railPosition: { default: "start" },
|
|
953
|
+
draggable: {
|
|
954
|
+
type: Boolean,
|
|
955
|
+
default: !1
|
|
956
|
+
}
|
|
776
957
|
}, {
|
|
777
958
|
active: { required: !0 },
|
|
778
959
|
activeModifiers: {}
|
|
779
960
|
}),
|
|
780
961
|
emits: ["update:active"],
|
|
781
962
|
setup(e) {
|
|
782
|
-
let t = e, n =
|
|
783
|
-
function
|
|
784
|
-
i.value.find((t) => t.id === e.id) || i.value.push(e);
|
|
963
|
+
let t = e, n = re(e, "active"), r = m(), i = U([]), a = q("containerEl"), o = q("groupEl");
|
|
964
|
+
function c(e) {
|
|
965
|
+
i.value.find((t) => t.id === e.id) || i.value.push(e), d();
|
|
785
966
|
}
|
|
786
|
-
function
|
|
787
|
-
i.value = i.value.filter((t) => t.id !== e);
|
|
967
|
+
function l(e) {
|
|
968
|
+
i.value = i.value.filter((t) => t.id !== e), d();
|
|
788
969
|
}
|
|
789
|
-
let
|
|
790
|
-
|
|
791
|
-
let e =
|
|
970
|
+
let u = U(0);
|
|
971
|
+
function d() {
|
|
972
|
+
let e = a.value, t = o.value;
|
|
973
|
+
if (!e || !t) return;
|
|
974
|
+
let n = 0, r = e.querySelectorAll(".dock-layer-item-host");
|
|
975
|
+
for (let e of r) {
|
|
976
|
+
let t = e.scrollHeight;
|
|
977
|
+
t > n && (n = t);
|
|
978
|
+
}
|
|
979
|
+
n > u.value && (u.value = n);
|
|
980
|
+
}
|
|
981
|
+
let f = T(() => u.value > 0 ? {
|
|
982
|
+
"min-block-size": `${u.value}px`,
|
|
983
|
+
"--dock-layer-peak-block-size": `${u.value}px`
|
|
984
|
+
} : void 0);
|
|
985
|
+
s(a, () => d()), J(() => i.value.length, () => d());
|
|
986
|
+
let p = T(() => t.orientation ?? r?.orientation.value ?? "horizontal"), h = T(() => p.value === "vertical" ? "horizontal" : "vertical"), g = q("railListEl"), _ = U(null);
|
|
987
|
+
function v() {
|
|
988
|
+
let e = g.value;
|
|
989
|
+
_.value = e ? e.$el ?? e : null;
|
|
990
|
+
}
|
|
991
|
+
let y = T(() => h.value === "vertical" ? "y" : "x");
|
|
992
|
+
function b() {
|
|
993
|
+
let e = _.value;
|
|
994
|
+
if (!e) return [];
|
|
995
|
+
let t = Array.from(e.querySelectorAll(".dock-layer-tab"));
|
|
996
|
+
return i.value.map((e, n) => {
|
|
997
|
+
let r = t[n]?.getBoundingClientRect(), i = r ? y.value === "y" ? r.top + r.height / 2 : r.left + r.width / 2 : 0;
|
|
998
|
+
return {
|
|
999
|
+
value: e.id,
|
|
1000
|
+
center: i
|
|
1001
|
+
};
|
|
1002
|
+
});
|
|
1003
|
+
}
|
|
1004
|
+
let x = S({
|
|
1005
|
+
el: _,
|
|
1006
|
+
axis: () => y.value,
|
|
1007
|
+
snapTargets: b,
|
|
1008
|
+
onSnap: (e) => {
|
|
1009
|
+
t.draggable && n.value !== e && (n.value = e);
|
|
1010
|
+
}
|
|
1011
|
+
});
|
|
1012
|
+
J(() => [
|
|
1013
|
+
i.value.length,
|
|
1014
|
+
h.value,
|
|
1015
|
+
t.draggable
|
|
1016
|
+
], () => {
|
|
1017
|
+
v(), t.draggable && P(() => x.refresh());
|
|
1018
|
+
}), R(() => {
|
|
1019
|
+
v(), t.draggable && P(() => x.refresh());
|
|
1020
|
+
});
|
|
1021
|
+
let C = Pe(), j, M, N;
|
|
1022
|
+
if (C) {
|
|
1023
|
+
let e = C.registerGroup({
|
|
792
1024
|
containerEl: a,
|
|
793
1025
|
activeLayer: n,
|
|
794
|
-
axis:
|
|
1026
|
+
axis: p
|
|
795
1027
|
});
|
|
796
|
-
|
|
1028
|
+
j = e.currentLayer, M = e.leavingLayer, N = () => {}, L(() => e.release());
|
|
797
1029
|
} else {
|
|
798
|
-
let e =
|
|
1030
|
+
let e = nt({
|
|
799
1031
|
containerEl: a,
|
|
800
1032
|
activeLayer: n,
|
|
801
|
-
axis:
|
|
1033
|
+
axis: p,
|
|
802
1034
|
directionTypes: (e, t) => {
|
|
803
1035
|
let n = i.value.findIndex((t) => t.id === e);
|
|
804
1036
|
return [i.value.findIndex((e) => e.id === t) < n ? "layer-back" : "layer-forward"];
|
|
805
1037
|
}
|
|
806
1038
|
});
|
|
807
|
-
|
|
1039
|
+
j = H(e.currentLayer), M = H(e.leavingLayer), N = e.onTransitionEnd;
|
|
808
1040
|
}
|
|
809
|
-
let
|
|
810
|
-
"view-transition-name": `gl-dock-stack-${
|
|
1041
|
+
let z = typeof document < "u" && "startViewTransition" in document, B = ne(), ie = T(() => z ? {
|
|
1042
|
+
"view-transition-name": `gl-dock-stack-${B.replace(/[^a-zA-Z0-9_-]/g, "-")}`,
|
|
811
1043
|
"view-transition-class": "gl-dock-layer"
|
|
812
1044
|
} : void 0);
|
|
813
|
-
|
|
814
|
-
register:
|
|
815
|
-
unregister:
|
|
816
|
-
currentLayerId:
|
|
817
|
-
leavingLayerId:
|
|
1045
|
+
et({
|
|
1046
|
+
register: c,
|
|
1047
|
+
unregister: l,
|
|
1048
|
+
currentLayerId: j,
|
|
1049
|
+
leavingLayerId: M
|
|
818
1050
|
});
|
|
819
|
-
function
|
|
1051
|
+
function X(e) {
|
|
820
1052
|
return typeof e == "object" && !!e || typeof e == "function";
|
|
821
1053
|
}
|
|
822
|
-
let
|
|
823
|
-
function
|
|
824
|
-
|
|
1054
|
+
let Z = U(!1);
|
|
1055
|
+
function ae() {
|
|
1056
|
+
Z.value || (Z.value = !0, r?.keepOpen());
|
|
825
1057
|
}
|
|
826
|
-
function
|
|
1058
|
+
function Q(e) {
|
|
827
1059
|
let t = e.relatedTarget, n = e.currentTarget;
|
|
828
|
-
t && n?.contains(t) ||
|
|
1060
|
+
t && n?.contains(t) || Z.value && (Z.value = !1, r?.release());
|
|
829
1061
|
}
|
|
830
|
-
return (
|
|
1062
|
+
return (r, s) => (V(), O("div", {
|
|
1063
|
+
ref_key: "groupEl",
|
|
1064
|
+
ref: o,
|
|
1065
|
+
class: F(["dock-layer-group", [p.value, `rail-${e.railPosition}`]]),
|
|
1066
|
+
style: I(f.value)
|
|
1067
|
+
}, [e.showRail && i.value.length > 1 ? (V(), E(K(Je), {
|
|
831
1068
|
key: 0,
|
|
832
1069
|
modelValue: n.value,
|
|
833
|
-
"onUpdate:modelValue":
|
|
834
|
-
orientation:
|
|
1070
|
+
"onUpdate:modelValue": s[0] ||= (e) => n.value = e,
|
|
1071
|
+
orientation: h.value,
|
|
835
1072
|
"as-child": !0
|
|
836
1073
|
}, {
|
|
837
|
-
default:
|
|
838
|
-
|
|
1074
|
+
default: Y(() => [A(K(Ze), {
|
|
1075
|
+
ref_key: "railListEl",
|
|
1076
|
+
ref: g,
|
|
1077
|
+
class: F(["dock-layer-rail", [
|
|
1078
|
+
e.railPosition,
|
|
1079
|
+
t.draggable && "glass-drag-grabbable",
|
|
1080
|
+
t.draggable && K(x).dragging.value && "glass-drag-lift"
|
|
1081
|
+
]]),
|
|
1082
|
+
style: I(t.draggable ? K(x).dragStyle.value : void 0),
|
|
839
1083
|
indicator: !1,
|
|
840
|
-
onFocusin:
|
|
841
|
-
onFocusout:
|
|
1084
|
+
onFocusin: ae,
|
|
1085
|
+
onFocusout: Q
|
|
842
1086
|
}, {
|
|
843
|
-
default:
|
|
1087
|
+
default: Y(() => [(V(!0), O(w, null, ee(i.value, (e) => (V(), E(K(Ye), {
|
|
844
1088
|
key: e.id,
|
|
845
1089
|
value: e.id,
|
|
846
1090
|
class: "dock-layer-tab",
|
|
847
1091
|
title: e.label,
|
|
848
1092
|
"aria-label": e.label ?? e.id
|
|
849
1093
|
}, {
|
|
850
|
-
default:
|
|
1094
|
+
default: Y(() => [X(e.icon) ? (V(), E(G(e.icon), {
|
|
851
1095
|
key: 0,
|
|
852
1096
|
class: "size-4"
|
|
853
|
-
})) : typeof e.icon == "string" ? (V(),
|
|
1097
|
+
})) : typeof e.icon == "string" ? (V(), O("span", rt, te(e.icon), 1)) : (V(), O("span", it, te((e.label ?? e.id).charAt(0)), 1))]),
|
|
854
1098
|
_: 2
|
|
855
1099
|
}, 1032, [
|
|
856
1100
|
"value",
|
|
857
1101
|
"title",
|
|
858
1102
|
"aria-label"
|
|
859
|
-
]))), 128)),
|
|
1103
|
+
]))), 128)), A(K(Xe), {
|
|
860
1104
|
class: "dock-layer-tab-indicator",
|
|
861
1105
|
surface: !1
|
|
862
1106
|
})]),
|
|
863
1107
|
_: 1
|
|
864
|
-
}, 8, ["class"])]),
|
|
1108
|
+
}, 8, ["class", "style"])]),
|
|
865
1109
|
_: 1
|
|
866
|
-
}, 8, ["modelValue", "orientation"])) :
|
|
1110
|
+
}, 8, ["modelValue", "orientation"])) : D("", !0), k("div", {
|
|
867
1111
|
ref_key: "containerEl",
|
|
868
1112
|
ref: a,
|
|
869
1113
|
class: "dock-layer-stack",
|
|
870
|
-
style:
|
|
871
|
-
onTransitionend:
|
|
872
|
-
}, [W(
|
|
1114
|
+
style: I(ie.value),
|
|
1115
|
+
onTransitionend: s[1] ||= (...e) => K(N) && K(N)(...e)
|
|
1116
|
+
}, [W(r.$slots, "default")], 36)], 6));
|
|
873
1117
|
}
|
|
874
|
-
}),
|
|
1118
|
+
}), ot = [
|
|
875
1119
|
"inert",
|
|
876
1120
|
"aria-hidden",
|
|
877
1121
|
"tabindex"
|
|
878
|
-
],
|
|
1122
|
+
], st = /* @__PURE__ */ j({
|
|
879
1123
|
__name: "DockLayer",
|
|
880
1124
|
props: {
|
|
881
1125
|
id: {},
|
|
@@ -883,35 +1127,35 @@ var Ue = { key: 1 }, We = { key: 2 }, Ge = /* @__PURE__ */ M({
|
|
|
883
1127
|
icon: {}
|
|
884
1128
|
},
|
|
885
1129
|
setup(e) {
|
|
886
|
-
let t = e, n =
|
|
887
|
-
|
|
1130
|
+
let t = e, n = tt();
|
|
1131
|
+
R(() => {
|
|
888
1132
|
n.register({
|
|
889
1133
|
id: t.id,
|
|
890
1134
|
label: t.label,
|
|
891
1135
|
icon: t.icon
|
|
892
1136
|
});
|
|
893
|
-
}),
|
|
1137
|
+
}), L(() => {
|
|
894
1138
|
n.unregister(t.id);
|
|
895
1139
|
});
|
|
896
|
-
let r =
|
|
897
|
-
return
|
|
1140
|
+
let r = T(() => n.currentLayerId.value === t.id), i = T(() => n.leavingLayerId.value === t.id), a = q("hostEl");
|
|
1141
|
+
return J(r, async (e, t) => {
|
|
898
1142
|
!e || t || typeof document < "u" && (() => {
|
|
899
1143
|
let e = document.activeElement;
|
|
900
1144
|
return !e || e === document.body ? !0 : !!e.closest("[inert]");
|
|
901
|
-
})() && (await
|
|
902
|
-
}), (e, t) => (V(),
|
|
1145
|
+
})() && (await P(), a.value?.focus());
|
|
1146
|
+
}), (e, t) => (V(), O("div", {
|
|
903
1147
|
ref_key: "hostEl",
|
|
904
1148
|
ref: a,
|
|
905
|
-
class:
|
|
1149
|
+
class: F(["dock-layer-item-host", {
|
|
906
1150
|
"is-active": r.value,
|
|
907
1151
|
"is-leaving": i.value
|
|
908
1152
|
}]),
|
|
909
1153
|
inert: r.value ? void 0 : !0,
|
|
910
1154
|
"aria-hidden": r.value ? void 0 : !0,
|
|
911
1155
|
tabindex: r.value ? -1 : void 0
|
|
912
|
-
}, [W(e.$slots, "default")], 10,
|
|
1156
|
+
}, [W(e.$slots, "default")], 10, ot));
|
|
913
1157
|
}
|
|
914
|
-
}),
|
|
1158
|
+
}), ct = /* @__PURE__ */ j({
|
|
915
1159
|
__name: "DockIconButton",
|
|
916
1160
|
props: {
|
|
917
1161
|
compact: {
|
|
@@ -933,26 +1177,20 @@ var Ue = { key: 1 }, We = { key: 2 }, Ge = /* @__PURE__ */ M({
|
|
|
933
1177
|
] }
|
|
934
1178
|
},
|
|
935
1179
|
setup(t) {
|
|
936
|
-
let n = t, r =
|
|
937
|
-
return (e, n) => (V(),
|
|
1180
|
+
let n = t, r = T(() => e("dock-icon-button glass-specular-track", { "dock-icon-button--compact": n.compact }, n.class)), i = T(() => !n.asChild && n.as === "button" ? { type: n.type } : {});
|
|
1181
|
+
return (e, n) => X((V(), E(K(ae), N({
|
|
938
1182
|
as: t.as,
|
|
939
1183
|
"as-child": t.asChild
|
|
940
|
-
},
|
|
941
|
-
|
|
942
|
-
style: K(a),
|
|
943
|
-
onPointermove: K(o)
|
|
944
|
-
}), {
|
|
945
|
-
default: X(() => [W(e.$slots, "default")]),
|
|
1184
|
+
}, i.value, { class: r.value }), {
|
|
1185
|
+
default: Y(() => [W(e.$slots, "default")]),
|
|
946
1186
|
_: 3
|
|
947
1187
|
}, 16, [
|
|
948
1188
|
"as",
|
|
949
1189
|
"as-child",
|
|
950
|
-
"class"
|
|
951
|
-
|
|
952
|
-
"onPointermove"
|
|
953
|
-
]));
|
|
1190
|
+
"class"
|
|
1191
|
+
])), [[K(o)]]);
|
|
954
1192
|
}
|
|
955
|
-
}),
|
|
1193
|
+
}), lt = /* @__PURE__ */ j({
|
|
956
1194
|
__name: "DockBackgroundToggle",
|
|
957
1195
|
props: {
|
|
958
1196
|
paused: {
|
|
@@ -963,23 +1201,23 @@ var Ue = { key: 1 }, We = { key: 2 }, Ge = /* @__PURE__ */ M({
|
|
|
963
1201
|
playLabel: { default: "Resume background animation" }
|
|
964
1202
|
},
|
|
965
1203
|
emits: ["update:paused"],
|
|
966
|
-
setup(e, { emit:
|
|
967
|
-
let
|
|
968
|
-
function
|
|
969
|
-
|
|
1204
|
+
setup(e, { emit: n }) {
|
|
1205
|
+
let i = e, a = n, o = T(() => i.paused ? i.playLabel : i.pauseLabel);
|
|
1206
|
+
function s() {
|
|
1207
|
+
a("update:paused", !i.paused);
|
|
970
1208
|
}
|
|
971
|
-
return (
|
|
1209
|
+
return (n, i) => (V(), E(ct, {
|
|
972
1210
|
type: "button",
|
|
973
1211
|
"aria-pressed": e.paused,
|
|
974
|
-
"aria-label":
|
|
975
|
-
title:
|
|
976
|
-
onClick:
|
|
1212
|
+
"aria-label": o.value,
|
|
1213
|
+
title: o.value,
|
|
1214
|
+
onClick: s
|
|
977
1215
|
}, {
|
|
978
|
-
default:
|
|
1216
|
+
default: Y(() => [e.paused ? (V(), E(K(t), {
|
|
979
1217
|
key: 0,
|
|
980
1218
|
size: 18,
|
|
981
1219
|
"aria-hidden": "true"
|
|
982
|
-
})) : (V(),
|
|
1220
|
+
})) : (V(), E(K(r), {
|
|
983
1221
|
key: 1,
|
|
984
1222
|
size: 18,
|
|
985
1223
|
"aria-hidden": "true"
|
|
@@ -991,7 +1229,7 @@ var Ue = { key: 1 }, We = { key: 2 }, Ge = /* @__PURE__ */ M({
|
|
|
991
1229
|
"title"
|
|
992
1230
|
]));
|
|
993
1231
|
}
|
|
994
|
-
}),
|
|
1232
|
+
}), ut = /* @__PURE__ */ j({
|
|
995
1233
|
__name: "DockTabButton",
|
|
996
1234
|
props: {
|
|
997
1235
|
as: { default: "button" },
|
|
@@ -1008,21 +1246,21 @@ var Ue = { key: 1 }, We = { key: 2 }, Ge = /* @__PURE__ */ M({
|
|
|
1008
1246
|
] }
|
|
1009
1247
|
},
|
|
1010
1248
|
setup(t) {
|
|
1011
|
-
let n = t, r =
|
|
1012
|
-
return (e, n) => (V(),
|
|
1249
|
+
let n = t, r = T(() => e("dock-tab-button", n.class));
|
|
1250
|
+
return (e, n) => X((V(), E(K(ae), {
|
|
1013
1251
|
as: t.as,
|
|
1014
1252
|
"as-child": t.asChild,
|
|
1015
|
-
class:
|
|
1253
|
+
class: F(r.value)
|
|
1016
1254
|
}, {
|
|
1017
|
-
default:
|
|
1255
|
+
default: Y(() => [W(e.$slots, "default")]),
|
|
1018
1256
|
_: 3
|
|
1019
1257
|
}, 8, [
|
|
1020
1258
|
"as",
|
|
1021
1259
|
"as-child",
|
|
1022
1260
|
"class"
|
|
1023
|
-
]));
|
|
1261
|
+
])), [[K(o)]]);
|
|
1024
1262
|
}
|
|
1025
|
-
}),
|
|
1263
|
+
}), dt = /* @__PURE__ */ j({
|
|
1026
1264
|
__name: "DockSelectTrigger",
|
|
1027
1265
|
props: {
|
|
1028
1266
|
disabled: { type: Boolean },
|
|
@@ -1038,19 +1276,19 @@ var Ue = { key: 1 }, We = { key: 2 }, Ge = /* @__PURE__ */ M({
|
|
|
1038
1276
|
] }
|
|
1039
1277
|
},
|
|
1040
1278
|
setup(t) {
|
|
1041
|
-
let r = t, i =
|
|
1279
|
+
let r = t, i = de(T(() => {
|
|
1042
1280
|
let { class: e, ...t } = r;
|
|
1043
1281
|
return t;
|
|
1044
1282
|
}));
|
|
1045
|
-
return (t, a) => (V(),
|
|
1046
|
-
default:
|
|
1047
|
-
default:
|
|
1283
|
+
return (t, a) => X((V(), E(K(oe), N(K(i), { class: K(e)("dock-select-trigger", r.class) }), {
|
|
1284
|
+
default: Y(() => [W(t.$slots, "default"), A(K(Q), { "as-child": "" }, {
|
|
1285
|
+
default: Y(() => [W(t.$slots, "icon", {}, () => [A(K(n), { class: "dock-select-trigger__chevron" })])]),
|
|
1048
1286
|
_: 3
|
|
1049
1287
|
})]),
|
|
1050
1288
|
_: 3
|
|
1051
|
-
}, 16, ["class"]));
|
|
1289
|
+
}, 16, ["class"])), [[K(o)]]);
|
|
1052
1290
|
}
|
|
1053
|
-
}),
|
|
1291
|
+
}), ft = /* @__PURE__ */ j({
|
|
1054
1292
|
__name: "DockDropdownTrigger",
|
|
1055
1293
|
props: {
|
|
1056
1294
|
disabled: { type: Boolean },
|
|
@@ -1066,29 +1304,38 @@ var Ue = { key: 1 }, We = { key: 2 }, Ge = /* @__PURE__ */ M({
|
|
|
1066
1304
|
] }
|
|
1067
1305
|
},
|
|
1068
1306
|
setup(t) {
|
|
1069
|
-
let n = t, r =
|
|
1307
|
+
let n = t, r = de(T(() => {
|
|
1070
1308
|
let { class: e, ...t } = n;
|
|
1071
1309
|
return t;
|
|
1072
1310
|
}));
|
|
1073
|
-
return (t, i) => (V(),
|
|
1074
|
-
default:
|
|
1311
|
+
return (t, i) => X((V(), E(K(Z), N(K(r), { class: K(e)("dock-dropdown-trigger", n.class) }), {
|
|
1312
|
+
default: Y(() => [W(t.$slots, "default")]),
|
|
1075
1313
|
_: 3
|
|
1076
|
-
}, 16, ["class"]));
|
|
1314
|
+
}, 16, ["class"])), [[K(o)]]);
|
|
1077
1315
|
}
|
|
1078
|
-
}),
|
|
1316
|
+
}), pt = [
|
|
1317
|
+
"data-orientation",
|
|
1318
|
+
"data-rail-anchor",
|
|
1319
|
+
"aria-orientation"
|
|
1320
|
+
], mt = /* @__PURE__ */ j({
|
|
1079
1321
|
__name: "DockSeparator",
|
|
1322
|
+
props: { anchor: {
|
|
1323
|
+
type: Boolean,
|
|
1324
|
+
default: !1
|
|
1325
|
+
} },
|
|
1080
1326
|
setup(e) {
|
|
1081
|
-
let t =
|
|
1082
|
-
return (
|
|
1083
|
-
class: "dock-separator",
|
|
1327
|
+
let t = m(), n = T(() => t?.orientation.value ?? "horizontal"), r = T(() => n.value), i = T(() => n.value === "vertical" ? "horizontal" : "vertical");
|
|
1328
|
+
return (t, n) => (V(), O("div", {
|
|
1329
|
+
class: F(["dock-separator", { "dock-separator--anchor": e.anchor }]),
|
|
1084
1330
|
role: "separator",
|
|
1085
1331
|
"data-orientation": r.value,
|
|
1332
|
+
"data-rail-anchor": e.anchor || void 0,
|
|
1086
1333
|
"aria-orientation": i.value
|
|
1087
|
-
}, null,
|
|
1334
|
+
}, null, 10, pt));
|
|
1088
1335
|
}
|
|
1089
|
-
}),
|
|
1336
|
+
}), ht = ["data-orientation", "aria-label"], gt = ["aria-label"], _t = { class: "dock-hairline-extend-chip-label" }, vt = /* @__PURE__ */ j({
|
|
1090
1337
|
__name: "DockRail",
|
|
1091
|
-
props: /* @__PURE__ */
|
|
1338
|
+
props: /* @__PURE__ */ M({
|
|
1092
1339
|
extent: { default: "beyond" },
|
|
1093
1340
|
position: { default: "end" },
|
|
1094
1341
|
items: {},
|
|
@@ -1098,14 +1345,14 @@ var Ue = { key: 1 }, We = { key: 2 }, Ge = /* @__PURE__ */ M({
|
|
|
1098
1345
|
context: {},
|
|
1099
1346
|
contextModifiers: {}
|
|
1100
1347
|
}),
|
|
1101
|
-
emits: /* @__PURE__ */
|
|
1348
|
+
emits: /* @__PURE__ */ M(["advance"], ["update:context"]),
|
|
1102
1349
|
setup(e, { emit: t }) {
|
|
1103
|
-
let n = e,
|
|
1350
|
+
let n = e, r = re(e, "context"), a = t, o = m(), s = T(() => o?.orientation.value ?? "horizontal"), c = T(() => n.icon ?? i), l = T(() => n.items && n.items.length > 0 ? [...n.items] : []);
|
|
1104
1351
|
function u(e) {
|
|
1105
|
-
|
|
1352
|
+
r.value = e, a("advance", e);
|
|
1106
1353
|
}
|
|
1107
|
-
return (t, n) => (V(),
|
|
1108
|
-
class:
|
|
1354
|
+
return (t, n) => (V(), O("div", {
|
|
1355
|
+
class: F(["dock-hairline-extend", [
|
|
1109
1356
|
s.value,
|
|
1110
1357
|
`extent-${e.extent}`,
|
|
1111
1358
|
`at-${e.position}`
|
|
@@ -1113,90 +1360,139 @@ var Ue = { key: 1 }, We = { key: 2 }, Ge = /* @__PURE__ */ M({
|
|
|
1113
1360
|
"data-orientation": s.value,
|
|
1114
1361
|
role: "group",
|
|
1115
1362
|
"aria-label": e.iconLabel
|
|
1116
|
-
}, [A(
|
|
1117
|
-
|
|
1118
|
-
|
|
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)
|
|
1363
|
+
}, [A(b, {
|
|
1364
|
+
axis: "x",
|
|
1365
|
+
class: "dock-hairline-fade"
|
|
1129
1366
|
}, {
|
|
1130
|
-
default:
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1367
|
+
default: Y(() => [k("div", {
|
|
1368
|
+
class: "dock-hairline-strip",
|
|
1369
|
+
role: "tablist",
|
|
1370
|
+
"aria-label": e.iconLabel
|
|
1371
|
+
}, [(V(!0), O(w, null, ee(l.value, (e) => (V(), E(ct, {
|
|
1372
|
+
key: e.id,
|
|
1373
|
+
type: "button",
|
|
1374
|
+
class: F(["dock-hairline-extend-chip", { "is-active": r.value === e.id }]),
|
|
1375
|
+
role: "tab",
|
|
1376
|
+
"aria-selected": r.value === e.id,
|
|
1377
|
+
"aria-label": e.label,
|
|
1378
|
+
title: e.label,
|
|
1379
|
+
onClick: (t) => u(e.id)
|
|
1380
|
+
}, {
|
|
1381
|
+
default: Y(() => [(V(), E(G(e.icon ?? c.value), { class: "size-4" })), k("span", _t, te(e.label), 1)]),
|
|
1382
|
+
_: 2
|
|
1383
|
+
}, 1032, [
|
|
1384
|
+
"class",
|
|
1385
|
+
"aria-selected",
|
|
1386
|
+
"aria-label",
|
|
1387
|
+
"title",
|
|
1388
|
+
"onClick"
|
|
1389
|
+
]))), 128))], 8, gt)]),
|
|
1390
|
+
_: 1
|
|
1391
|
+
})], 10, ht));
|
|
1392
|
+
}
|
|
1393
|
+
}), yt = ["aria-label"], bt = [
|
|
1394
|
+
"data-kind",
|
|
1395
|
+
"data-section-id",
|
|
1396
|
+
"aria-label"
|
|
1397
|
+
], xt = /* @__PURE__ */ j({
|
|
1398
|
+
__name: "DockSection",
|
|
1399
|
+
props: {
|
|
1400
|
+
sections: {},
|
|
1401
|
+
anchorId: {},
|
|
1402
|
+
ariaLabel: { default: "Dock sections" }
|
|
1403
|
+
},
|
|
1404
|
+
setup(e) {
|
|
1405
|
+
let t = e, n = T(() => {
|
|
1406
|
+
if (t.anchorId) return t.anchorId;
|
|
1407
|
+
let e = t.sections.find((e) => e.kind === "nav");
|
|
1408
|
+
return e ? e.id : t.sections.find((e) => e.kind !== "rail-core")?.id;
|
|
1409
|
+
});
|
|
1410
|
+
function r(e) {
|
|
1411
|
+
return e > 0;
|
|
1412
|
+
}
|
|
1413
|
+
function i(e) {
|
|
1414
|
+
return e.id === n.value;
|
|
1415
|
+
}
|
|
1416
|
+
function a(e) {
|
|
1417
|
+
return `dock-section-zone--${e === "rail-core" ? "core" : e}`;
|
|
1418
|
+
}
|
|
1419
|
+
return (t, n) => (V(), O("div", {
|
|
1420
|
+
class: "dock-section",
|
|
1421
|
+
role: "group",
|
|
1422
|
+
"aria-label": e.ariaLabel
|
|
1423
|
+
}, [(V(!0), O(w, null, ee(e.sections, (e, n) => (V(), O(w, { key: e.id }, [r(n) ? (V(), E(mt, {
|
|
1424
|
+
key: 0,
|
|
1425
|
+
anchor: i(e)
|
|
1426
|
+
}, null, 8, ["anchor"])) : D("", !0), k("div", {
|
|
1427
|
+
class: F(["dock-section-zone", a(e.kind)]),
|
|
1428
|
+
"data-kind": e.kind,
|
|
1429
|
+
"data-section-id": e.id,
|
|
1430
|
+
"aria-label": e.label || void 0
|
|
1431
|
+
}, [W(t.$slots, e.id, {
|
|
1432
|
+
section: e,
|
|
1433
|
+
kind: e.kind
|
|
1434
|
+
})], 10, bt)], 64))), 128))], 8, yt));
|
|
1139
1435
|
}
|
|
1140
1436
|
});
|
|
1141
1437
|
//#endregion
|
|
1142
1438
|
//#region src/components/custom/dock/composables/useDockOrientationMorph.ts
|
|
1143
|
-
function
|
|
1144
|
-
let { rootEl: t } = e, n = U("vertical"), r = U(0), i = U(!1),
|
|
1439
|
+
function St(e) {
|
|
1440
|
+
let { rootEl: t } = e, n = U("vertical"), r = U(0), i = U(!1), o = a({
|
|
1145
1441
|
from: e.verticalSize,
|
|
1146
1442
|
to: 0,
|
|
1147
1443
|
axis: "height"
|
|
1148
|
-
}),
|
|
1444
|
+
}), s = a({
|
|
1149
1445
|
from: 0,
|
|
1150
1446
|
to: e.horizontalSize,
|
|
1151
1447
|
axis: "width"
|
|
1152
|
-
}),
|
|
1153
|
-
function
|
|
1154
|
-
r.value = e,
|
|
1448
|
+
}), c = null;
|
|
1449
|
+
function l(e) {
|
|
1450
|
+
r.value = e, o.drive(e), s.drive(e);
|
|
1155
1451
|
let n = t.value;
|
|
1156
1452
|
n && n.style.setProperty("--dock-morph-t", `${e}`);
|
|
1157
1453
|
}
|
|
1158
|
-
function l() {
|
|
1159
|
-
s &&= (s.dispose(), null);
|
|
1160
|
-
}
|
|
1161
1454
|
function u() {
|
|
1455
|
+
c &&= (c.dispose(), null);
|
|
1456
|
+
}
|
|
1457
|
+
function d() {
|
|
1162
1458
|
return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
1163
1459
|
}
|
|
1164
|
-
function
|
|
1165
|
-
if (
|
|
1166
|
-
|
|
1460
|
+
function f(e) {
|
|
1461
|
+
if (d()) {
|
|
1462
|
+
h(e);
|
|
1167
1463
|
return;
|
|
1168
1464
|
}
|
|
1169
|
-
let n = t.value, a =
|
|
1170
|
-
if (!
|
|
1171
|
-
|
|
1172
|
-
response:
|
|
1173
|
-
dampingFraction:
|
|
1465
|
+
let n = t.value, a = c !== null && !c.settled ? c.velocity : 0;
|
|
1466
|
+
if (!c || c.settled) {
|
|
1467
|
+
u(), c = new pe({
|
|
1468
|
+
response: v.response,
|
|
1469
|
+
dampingFraction: v.dampingFraction,
|
|
1174
1470
|
initial: r.value,
|
|
1175
1471
|
respectReducedMotion: !0
|
|
1176
1472
|
});
|
|
1177
|
-
let o =
|
|
1473
|
+
let o = c;
|
|
1178
1474
|
o.reset(r.value, a), o.target = e, i.value = !0, n && n.setAttribute("data-morphing", ""), o.play((e) => {
|
|
1179
|
-
if (
|
|
1475
|
+
if (l(e), o.settled) {
|
|
1180
1476
|
i.value = !1;
|
|
1181
1477
|
let e = t.value;
|
|
1182
1478
|
e && e.removeAttribute("data-morphing");
|
|
1183
1479
|
}
|
|
1184
1480
|
});
|
|
1185
|
-
} else
|
|
1481
|
+
} else c.reset(r.value, a), c.target = e;
|
|
1186
1482
|
}
|
|
1187
|
-
function
|
|
1188
|
-
e === n.value && !i.value || (n.value = e,
|
|
1483
|
+
function p(e) {
|
|
1484
|
+
e === n.value && !i.value || (n.value = e, f(+(e === "horizontal")));
|
|
1189
1485
|
}
|
|
1190
|
-
function
|
|
1191
|
-
|
|
1486
|
+
function m() {
|
|
1487
|
+
p(n.value === "vertical" ? "horizontal" : "vertical");
|
|
1192
1488
|
}
|
|
1193
|
-
function
|
|
1489
|
+
function h(e) {
|
|
1194
1490
|
let r = e < 0 ? 0 : e > 1 ? 1 : e;
|
|
1195
|
-
|
|
1491
|
+
u(), i.value = !1, n.value = r >= .5 ? "horizontal" : "vertical", l(r), l(r);
|
|
1196
1492
|
let a = t.value;
|
|
1197
1493
|
a && a.removeAttribute("data-morphing");
|
|
1198
1494
|
}
|
|
1199
|
-
function
|
|
1495
|
+
function g(e) {
|
|
1200
1496
|
let t = Math.min(Math.max(e / .5, 0), 1);
|
|
1201
1497
|
return 1 - t * t * (3 - 2 * t);
|
|
1202
1498
|
}
|
|
@@ -1204,22 +1500,22 @@ function at(e) {
|
|
|
1204
1500
|
let t = Math.min(Math.max((e - .5) / .5, 0), 1);
|
|
1205
1501
|
return t * t * (3 - 2 * t);
|
|
1206
1502
|
}
|
|
1207
|
-
let
|
|
1208
|
-
return
|
|
1503
|
+
let y = T(() => o.sizeStyle.value), b = T(() => s.sizeStyle.value), x = T(() => ({ opacity: String(g(r.value)) })), S = T(() => ({ opacity: String(_(r.value)) })), C = T(() => Math.max(o.stretch.value, s.stretch.value));
|
|
1504
|
+
return J(t, (e) => {
|
|
1209
1505
|
e && e.style.setProperty("--dock-morph-t", `${r.value}`);
|
|
1210
|
-
}, { immediate: !0 }), z(
|
|
1506
|
+
}, { immediate: !0 }), z(u), {
|
|
1211
1507
|
orientation: n,
|
|
1212
1508
|
t: r,
|
|
1213
1509
|
morphing: i,
|
|
1214
|
-
verticalStyle:
|
|
1215
|
-
horizontalStyle:
|
|
1216
|
-
verticalOpacity:
|
|
1217
|
-
horizontalOpacity:
|
|
1510
|
+
verticalStyle: y,
|
|
1511
|
+
horizontalStyle: b,
|
|
1512
|
+
verticalOpacity: x,
|
|
1513
|
+
horizontalOpacity: S,
|
|
1218
1514
|
stretch: C,
|
|
1219
|
-
morphTo:
|
|
1220
|
-
toggle:
|
|
1221
|
-
pin:
|
|
1515
|
+
morphTo: p,
|
|
1516
|
+
toggle: m,
|
|
1517
|
+
pin: h
|
|
1222
1518
|
};
|
|
1223
1519
|
}
|
|
1224
1520
|
//#endregion
|
|
1225
|
-
export {
|
|
1521
|
+
export { y as DOCK_CONTEXT_KEY, lt as DockBackgroundToggle, ft as DockDropdownTrigger, ct as DockIconButton, st as DockLayer, at as DockLayerGroup, vt as DockRail, xt as DockSection, dt as DockSelectTrigger, mt as DockSeparator, ut as DockTabButton, qe as GlassDock, h as provideDockContext, _ as useDockContext, St as useDockOrientationMorph, nt as useLayerTransition, m as useOptionalDockContext };
|