@mkbabb/glass-ui 3.10.0 → 3.10.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/dist/{CardAction-DuArVky-.js → CardAction-DrAcAV4d.js} +2 -2
- package/dist/{CommandShortcut-CefCj5mt.js → CommandShortcut-mV2e1aG6.js} +2 -2
- package/dist/{DataTable-CUHMukiQ.js → DataTable-C3E6jZ5B.js} +2 -2
- package/dist/{DialogContent-BRkT1cjP.js → DialogContent-BxaaafFi.js} +1 -1
- package/dist/{HoverPopover-2LOIW34a.js → HoverPopover-CDA_SaCe.js} +1 -1
- package/dist/{MetricBadge-BZVWIxNy.js → MetricBadge-idgrkqoP.js} +5 -7
- package/dist/{Notification-DLMhblXR.js → Notification-Cu0nN17_.js} +1 -1
- package/dist/{NumberFieldContent-BbLOh8RU.js → NumberFieldContent-CHEWghnY.js} +2 -2
- package/dist/{PopoverContent-BId6ggf_.js → PopoverContent-DpUvdYY-.js} +1 -1
- package/dist/{Progress-iEuD9pxG.js → Progress-BW-StFw2.js} +1 -1
- package/dist/{ScrollingText-BPP84wKo.js → ScrollingText-DruYCni_.js} +1 -1
- package/dist/{SelectScrollDownButton-T32cVFeM.js → SelectScrollDownButton-pirzjm--.js} +3 -3
- package/dist/{Switch-Ch-k3Rv-.js → Switch-DeAqg6pi.js} +1 -1
- package/dist/{TabsList-B8CVOQPC.js → TabsList-BAVzOZpg.js} +2 -2
- package/dist/{Toaster-1rYWrmAm.js → Toaster-CvuuW_y9.js} +49 -46
- package/dist/{ToggleGroupItem-Cev4pOVK.js → ToggleGroupItem-DtD37b4G.js} +4 -4
- package/dist/animated-digit.js +2 -2
- package/dist/api/index.d.ts +3 -4
- package/dist/api.js +1 -1
- package/dist/aurora.js +66 -66
- package/dist/{badge-CaoFJzRb.js → badge-NdCQMvvB.js} +1 -1
- package/dist/badge.js +1 -1
- package/dist/{button-DN39cGqL.js → button-DyiWFAOE.js} +12 -12
- package/dist/button.js +1 -1
- package/dist/canvas.js +2 -2
- package/dist/card.js +1 -1
- package/dist/carousel.js +5 -5
- package/dist/collapsible.js +1 -1
- package/dist/{color-C5ls_QF7.js → color-B65wWyQz.js} +9 -7
- package/dist/color.js +1 -1
- package/dist/command.js +1 -1
- package/dist/components/custom/aurora/constants/shaders/mediums.glsl.d.ts +1 -1
- package/dist/components/custom/aurora/constants/shaders/vangogh-medium.glsl.d.ts +1 -0
- package/dist/components/custom/constellation/Constellation.vue.d.ts +12 -0
- package/dist/components/custom/constellation/composables/createConstellationField.d.ts +35 -0
- package/dist/components/custom/constellation/composables/useConstellationPointer.d.ts +35 -0
- package/dist/components/custom/constellation/constants.d.ts +36 -0
- package/dist/components/custom/constellation/constellationDraw.d.ts +18 -0
- package/dist/components/custom/constellation/constellationField.d.ts +10 -151
- package/dist/components/custom/constellation/constellationInteraction.d.ts +102 -0
- package/dist/components/custom/constellation/index.d.ts +3 -1
- package/dist/components/custom/controls/DarkModeToggle.vue.d.ts +11 -0
- package/dist/components/custom/dock/DockTabButton.vue.d.ts +3 -4
- package/dist/components/custom/dock/GlassDock.vue.d.ts +2 -110
- package/dist/components/custom/dock/composables/dockMorphContext.d.ts +36 -0
- package/dist/components/custom/dock/composables/useDockMorphWindow.d.ts +15 -0
- package/dist/components/custom/dock/composables/useDockShellProps.d.ts +131 -0
- package/dist/components/custom/dock/composables/useLayerTransition.d.ts +44 -0
- package/dist/components/custom/dock/constants.d.ts +23 -0
- package/dist/components/custom/expandable-container/ExpandableContainer.vue.d.ts +0 -29
- package/dist/components/custom/fourier-field/index.d.ts +1 -1
- package/dist/components/custom/fourier-field/math.d.ts +17 -0
- package/dist/components/custom/fourier-field/presets.d.ts +54 -0
- package/dist/components/custom/goo-blob/composables/buildMetaballProgram.d.ts +18 -0
- package/dist/components/custom/goo-blob/composables/uploadBlobUniforms.d.ts +41 -0
- package/dist/components/custom/goo-blob/composables/useBlobPointer.d.ts +4 -3
- package/dist/components/custom/goo-blob/composables/useMetaballRenderer.d.ts +11 -8
- package/dist/components/custom/goo-blob/constants.d.ts +52 -0
- package/dist/components/custom/goo-blob/shaders/metaball-uniforms.glsl.d.ts +1 -0
- package/dist/components/custom/instrument-chassis/InstrumentChassis.vue.d.ts +2 -2
- package/dist/components/custom/metric-badge/MetricBadge.vue.d.ts +0 -8
- package/dist/components/custom/tabs/constants.d.ts +12 -0
- package/dist/components/custom/underline/GlassUnderline.vue.d.ts +84 -0
- package/dist/components/custom/underline/index.d.ts +2 -0
- package/dist/components/custom/underline/types.d.ts +56 -0
- package/dist/components/ui/drawer/Drawer.vue.d.ts +1 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +2 -2
- package/dist/components/ui/slider/index.d.ts +22 -19
- package/dist/components/ui/toast/use-toast.d.ts +2 -2
- package/dist/composables/color/index.d.ts +12 -0
- package/dist/composables/glass/useSpecularTracking.d.ts +12 -3
- package/dist/composables/motion/core/index.d.ts +0 -1
- package/dist/composables/motion/curves.d.ts +48 -0
- package/dist/composables/motion/index.d.ts +2 -0
- package/dist/composables/motion/springPresets.d.ts +33 -0
- package/dist/composables/motion/suite.d.ts +2 -0
- package/dist/composables/motion/useSpringMount.d.ts +1 -1
- package/dist/configurator.js +1 -1
- package/dist/confirm-dialog.js +2 -2
- package/dist/constellation.js +260 -225
- package/dist/controls.js +48 -14
- package/dist/dark.js +1 -1
- package/dist/data-table.js +1 -1
- package/dist/dialog.js +2 -2
- package/dist/dock.js +339 -327
- package/dist/dockContext-bho8B1A4.js +17 -0
- package/dist/{dropdown-menu-D77jX6Df.js → dropdown-menu-DVnQcA0E.js} +7 -4
- package/dist/dropdown-menu.js +1 -1
- package/dist/expandable-container.js +38 -61
- package/dist/forms.js +2 -2
- package/dist/fourier-field.js +137 -102
- package/dist/fourier-math.js +2 -2
- package/dist/glass-ui.css +1 -1
- package/dist/glass-ui.js +287 -209
- package/dist/goo-blob.js +243 -212
- package/dist/hover-popover.js +1 -1
- package/dist/icon-tooltip.js +1 -1
- package/dist/index.d.ts +0 -3
- package/dist/keyboard.js +1 -1
- package/dist/labeled-field.js +5 -5
- package/dist/{math-DTpRVC0e.js → math-BUU9hHID.js} +18 -2
- package/dist/metric-badge.js +1 -1
- package/dist/metric-stack.js +1 -1
- package/dist/motion-core.js +69 -70
- package/dist/motion-curves.d.ts +1 -0
- package/dist/motion-curves.js +130 -0
- package/dist/motion.js +38 -37
- package/dist/notification.js +1 -1
- package/dist/number-field.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/progress.js +1 -1
- package/dist/pulse.js +1 -1
- package/dist/reactive.js +1 -1
- package/dist/scrolling-text.js +1 -1
- package/dist/search.js +6 -6
- package/dist/select.js +1 -1
- package/dist/{sheet-VZEtNFvO.js → sheet-ChSXcJpU.js} +1 -1
- package/dist/sheet.js +1 -1
- package/dist/{slider-CyzcxBoh.js → slider-sfl8gFDD.js} +4 -4
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +2 -2
- package/dist/springPresets-aRSm-4_k.js +40 -0
- package/dist/stacked-icons.js +6 -6
- package/dist/styles/animations.css +18 -74
- package/dist/styles/components.css +1 -1
- package/dist/styles/dock/layer-group.css +22 -0
- package/dist/styles/dock/layers.css +11 -1
- package/dist/styles/dock/morph.css +95 -19
- package/dist/styles/dock/shell.css +12 -0
- package/dist/styles/dock-controls.css +28 -31
- package/dist/styles/drawer.css +2 -0
- package/dist/styles/floating-panel.css +2 -0
- package/dist/styles/glass/a11y-fallback.css +245 -0
- package/dist/styles/glass/ladder.css +304 -0
- package/dist/styles/glass/material.css +238 -0
- package/dist/styles/glass/progress-rail.css +78 -0
- package/dist/styles/glass/squircle.css +66 -0
- package/dist/styles/glass/surfaces.css +306 -0
- package/dist/styles/glass-refract.css +2 -0
- package/dist/styles/glass.css +31 -1188
- package/dist/styles/hover-popover.css +2 -0
- package/dist/styles/index.css +24 -6
- package/dist/styles/instrument-chassis.css +4 -0
- package/dist/styles/paper.css +2 -68
- package/dist/styles/theme.css +13 -20
- package/dist/styles/tokens/color-radius.css +250 -0
- package/dist/styles/tokens/dark-arm.css +194 -0
- package/dist/styles/tokens/glass.css +413 -0
- package/dist/styles/tokens/light-dark.css +158 -0
- package/dist/styles/tokens/offsets-sizing.css +406 -0
- package/dist/styles/tokens/property-regs.css +169 -0
- package/dist/styles/tokens/scale-paper.css +361 -0
- package/dist/styles/tokens/scheme-motion.css +334 -0
- package/dist/styles/tokens/shadow.css +132 -0
- package/dist/styles/tokens.css +22 -2355
- package/dist/styles/typography.css +18 -6
- package/dist/styles/utilities/a11y-overrides.css +140 -0
- package/dist/styles/utilities/animate.css +26 -0
- package/dist/styles/utilities/base.css +365 -0
- package/dist/styles/utilities/btn.css +399 -0
- package/dist/styles/utilities/components.css +317 -0
- package/dist/styles/utilities.css +19 -1260
- package/dist/styles/view-transition.css +0 -51
- package/dist/switch.js +1 -1
- package/dist/tabs.js +98 -98
- package/dist/timeline.js +2 -2
- package/dist/toast.js +1 -1
- package/dist/toggle-group.js +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/underline.d.ts +1 -0
- package/dist/underline.js +85 -0
- package/dist/{useAnimatedNumber-Bcpy5Etf.js → useAnimatedNumber-DfVgP4te.js} +1 -1
- package/dist/{useConfiguratorState-DxAqksK6.js → useConfiguratorState-BdQXh9ie.js} +1 -1
- package/dist/useSpecularTracking-DFK_fhpG.js +32 -0
- package/dist/useSpringMount-DXUzxBjV.js +108 -0
- package/dist/vReveal-CqaCz_mC.js +44 -0
- package/dist/watercolor-dot.js +2 -2
- package/package.json +34 -52
- package/src/styles/animations.css +18 -74
- package/src/styles/dock/layer-group.css +22 -0
- package/src/styles/dock/layers.css +11 -1
- package/src/styles/dock/morph.css +95 -19
- package/src/styles/dock/shell.css +12 -0
- package/src/styles/dock-controls.css +28 -31
- package/src/styles/glass/a11y-fallback.css +245 -0
- package/src/styles/glass/ladder.css +304 -0
- package/src/styles/glass/material.css +238 -0
- package/src/styles/glass/progress-rail.css +78 -0
- package/src/styles/glass/squircle.css +66 -0
- package/src/styles/glass/surfaces.css +306 -0
- package/src/styles/glass.css +31 -1188
- package/src/styles/index.css +24 -6
- package/src/styles/paper.css +2 -68
- package/src/styles/theme.css +13 -20
- package/src/styles/tokens/color-radius.css +250 -0
- package/src/styles/tokens/dark-arm.css +194 -0
- package/src/styles/tokens/glass.css +413 -0
- package/src/styles/tokens/light-dark.css +158 -0
- package/src/styles/tokens/offsets-sizing.css +406 -0
- package/src/styles/tokens/property-regs.css +169 -0
- package/src/styles/tokens/scale-paper.css +361 -0
- package/src/styles/tokens/scheme-motion.css +334 -0
- package/src/styles/tokens/shadow.css +132 -0
- package/src/styles/tokens.css +22 -2355
- package/src/styles/typography.css +18 -6
- package/src/styles/utilities/a11y-overrides.css +140 -0
- package/src/styles/utilities/animate.css +26 -0
- package/src/styles/utilities/base.css +365 -0
- package/src/styles/utilities/btn.css +399 -0
- package/src/styles/utilities/components.css +317 -0
- package/src/styles/utilities.css +19 -1260
- package/src/styles/view-transition.css +0 -51
- package/dist/DeckProgress-Dmk4_AKN.js +0 -23
- package/dist/InstrumentRail-CUJ05YVG.js +0 -44
- package/dist/components/custom/deck-progress/DeckProgress.vue.d.ts +0 -27
- package/dist/components/custom/deck-progress/index.d.ts +0 -2
- package/dist/components/custom/dialog-native/GlassDialogNative.vue.d.ts +0 -57
- package/dist/components/custom/dialog-native/index.d.ts +0 -1
- package/dist/components/custom/glass-panel/GlassPanel.vue.d.ts +0 -41
- package/dist/components/custom/glass-panel/index.d.ts +0 -2
- package/dist/components/custom/handmark/HandMark.vue.d.ts +0 -29
- package/dist/components/custom/handmark/brush.d.ts +0 -219
- package/dist/components/custom/handmark/freehand.d.ts +0 -69
- package/dist/components/custom/handmark/geometry.d.ts +0 -32
- package/dist/components/custom/handmark/index.d.ts +0 -21
- package/dist/components/custom/handmark/ink.d.ts +0 -11
- package/dist/components/custom/handmark/texture.d.ts +0 -39
- package/dist/components/custom/handmark/types.d.ts +0 -53
- package/dist/components/custom/handmark/useHandMark.d.ts +0 -66
- package/dist/components/custom/header-ribbon/HeaderRibbon.vue.d.ts +0 -31
- package/dist/components/custom/header-ribbon/index.d.ts +0 -2
- package/dist/components/custom/header-ribbon/types.d.ts +0 -7
- package/dist/components/custom/instrument-rail/InstrumentRail.vue.d.ts +0 -91
- package/dist/components/custom/instrument-rail/index.d.ts +0 -2
- package/dist/composables/motion/useRouteTransition.d.ts +0 -42
- package/dist/deck-progress.d.ts +0 -1
- package/dist/deck-progress.js +0 -2
- package/dist/dockContext-BKeIMmNk.js +0 -9
- package/dist/glass-panel.d.ts +0 -1
- package/dist/glass-panel.js +0 -44
- package/dist/handmark.d.ts +0 -1
- package/dist/handmark.js +0 -609
- package/dist/header-ribbon.d.ts +0 -1
- package/dist/header-ribbon.js +0 -63
- package/dist/instrument-rail.d.ts +0 -1
- package/dist/instrument-rail.js +0 -2
- package/dist/useGlassRenderer-D7YGOYiM.js +0 -69
- package/dist/useSpecularTracking-BVRZsRHA.js +0 -26
- package/dist/useSpringMount-BJSHcLl3.js +0 -113
- package/dist/useViewTransition-DaN5Zrox.js +0 -21
- package/dist/vReveal-zUIQk-rJ.js +0 -53
- /package/dist/{CollapsibleContent-CP9qF1v4.js → CollapsibleContent-Drow5WkV.js} +0 -0
- /package/dist/{DialogFooter-Gprw8H_A.js → DialogFooter-DufLHi0y.js} +0 -0
- /package/dist/{IconTooltip-Cus0fvK0.js → IconTooltip-BrQ5p181.js} +0 -0
- /package/dist/{Input-xuDwALQR.js → Input-B-F818RU.js} +0 -0
- /package/dist/{_plugin-vue_export-helper-ok8pgSl5.js → _plugin-vue_export-helper-DWghtRt7.js} +0 -0
- /package/dist/{compile-BOXjLUxu.js → compile-Ce_V55zi.js} +0 -0
- /package/dist/{constants-yKeKnE84.js → constants-C8NMonuo.js} +0 -0
- /package/dist/{presets-Dkdv55Gt.js → presets-1OhFpaIC.js} +0 -0
- /package/dist/{prng-D27-B3tK.js → prng-CjVgzjQT.js} +0 -0
- /package/dist/{resolveCanvasColor-BBiYfp8g.js → resolveCanvasColor-CRvVzOvP.js} +0 -0
- /package/dist/{useCanvas2D-ClrQuZtp.js → useCanvas2D-CSeH8h16.js} +0 -0
- /package/dist/{useGlobalDark-d6waty-X.js → useGlobalDark-D7R9OypB.js} +0 -0
- /package/dist/{useIntersectionPause-Cck5Uxk8.js → useIntersectionPause-DAdVPVp4.js} +0 -0
- /package/dist/{useInterval-Dsmqwi03.js → useInterval-D3USn0yc.js} +0 -0
- /package/dist/{useKeyboardShortcuts-CyIYrndH.js → useKeyboardShortcuts-i8tHd5WO.js} +0 -0
- /package/dist/{useScrollProgress-CffFGLa5.js → useScrollProgress-CcgmgMQt.js} +0 -0
- /package/dist/{useSortable-C8ReQ50P.js → useSortable-DnyGXKKY.js} +0 -0
- /package/dist/{useTextHighlight-CWEi25hf.js → useTextHighlight-B3b10W6r.js} +0 -0
package/dist/dock.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { t as e } from "./cn-DJXf4yaB.js";
|
|
2
2
|
import { t } from "./createLucideIcon-B6uNAU9G.js";
|
|
3
3
|
import { t as n } from "./chevron-down-BSkTP2aL.js";
|
|
4
|
-
import { t as r } from "./useSpecularTracking-
|
|
4
|
+
import { t as r } from "./useSpecularTracking-DFK_fhpG.js";
|
|
5
5
|
import { t as i } from "./useTouchGate-WFyJYsth.js";
|
|
6
6
|
import { n as a, t as o } from "./createContext-B44Sah_H.js";
|
|
7
|
-
import {
|
|
8
|
-
import { i as
|
|
9
|
-
import { Fragment as
|
|
10
|
-
import { DropdownMenuTrigger as
|
|
11
|
-
import { SpringProgress as
|
|
12
|
-
var
|
|
7
|
+
import { a as s, c, i as l, n as u, o as d, r as f, s as p, t as m } from "./dockContext-bho8B1A4.js";
|
|
8
|
+
import { i as h, n as g, r as _, t as v } from "./TabsList-BAVzOZpg.js";
|
|
9
|
+
import { Fragment as y, computed as b, createBlock as x, createCommentVNode as S, createElementBlock as C, createElementVNode as w, createVNode as T, defineComponent as E, mergeModels as D, mergeProps as O, nextTick as k, normalizeClass as A, normalizeStyle as j, onBeforeUnmount as M, onMounted as N, onUnmounted as P, openBlock as F, readonly as I, ref as L, renderList as ee, renderSlot as R, resolveDynamicComponent as z, toDisplayString as B, unref as V, useAttrs as H, useId as te, useModel as ne, useTemplateRef as U, watch as W, withCtx as G } from "vue";
|
|
10
|
+
import { DropdownMenuTrigger as re, Primitive as K, SelectIcon as ie, SelectTrigger as ae, useForwardProps as q } from "reka-ui";
|
|
11
|
+
import { SpringProgress as J } from "@mkbabb/keyframes.js";
|
|
12
|
+
var Y = t("pause", [["rect", {
|
|
13
13
|
x: "14",
|
|
14
14
|
y: "3",
|
|
15
15
|
width: "5",
|
|
@@ -23,47 +23,47 @@ var ie = t("pause", [["rect", {
|
|
|
23
23
|
height: "18",
|
|
24
24
|
rx: "1",
|
|
25
25
|
key: "1wsw3u"
|
|
26
|
-
}]]),
|
|
26
|
+
}]]), X = t("play", [["path", {
|
|
27
27
|
d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",
|
|
28
28
|
key: "10ikf1"
|
|
29
|
-
}]]),
|
|
29
|
+
}]]), oe = ["data-orientation", "aria-orientation"], se = /* @__PURE__ */ E({
|
|
30
30
|
__name: "DockSeparator",
|
|
31
31
|
setup(e) {
|
|
32
|
-
let t =
|
|
33
|
-
return (e, t) => (
|
|
32
|
+
let t = l(), n = b(() => t?.orientation.value ?? "horizontal"), r = b(() => n.value), i = b(() => n.value === "vertical" ? "horizontal" : "vertical");
|
|
33
|
+
return (e, t) => (F(), C("div", {
|
|
34
34
|
class: "dock-separator",
|
|
35
35
|
role: "separator",
|
|
36
36
|
"data-orientation": r.value,
|
|
37
37
|
"aria-orientation": i.value
|
|
38
|
-
}, null, 8,
|
|
38
|
+
}, null, 8, oe));
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
41
|
//#endregion
|
|
42
42
|
//#region src/components/custom/dock/composables/isTeleportedTarget.ts
|
|
43
|
-
function
|
|
43
|
+
function Z(e, t) {
|
|
44
44
|
if (!(e instanceof Element)) return !1;
|
|
45
45
|
let n = e.closest("[data-glass-dock-portal]");
|
|
46
46
|
return n ? t ? n.getAttribute("data-glass-dock-owner") === t : !0 : !1;
|
|
47
47
|
}
|
|
48
48
|
//#endregion
|
|
49
49
|
//#region src/components/custom/dock/composables/useDockState.ts
|
|
50
|
-
function
|
|
51
|
-
let { collapseDelay: t = 2500, rootEl: n, alwaysExpanded: r = !1, isTransitioning: i, dockId: a, onStateChange: o } = e, s = () => typeof r == "boolean" ? r : r.value, c = s(), l =
|
|
52
|
-
function
|
|
53
|
-
s() && (l.value = "pinned"), u.value = l.value !== "collapsed", d.value = l.value === "pinned", o &&
|
|
50
|
+
function ce(e) {
|
|
51
|
+
let { collapseDelay: t = 2500, rootEl: n, alwaysExpanded: r = !1, isTransitioning: i, dockId: a, onStateChange: o } = e, s = () => typeof r == "boolean" ? r : r.value, c = s(), l = L(c ? "pinned" : "collapsed"), u = L(c), d = L(c), f = null, p = L(0), m = b(() => p.value > 0), h = null, g = null, _ = !1, v = l.value;
|
|
52
|
+
function y() {
|
|
53
|
+
s() && (l.value = "pinned"), u.value = l.value !== "collapsed", d.value = l.value === "pinned", o && v !== l.value && o(l.value, v), v = l.value;
|
|
54
54
|
}
|
|
55
55
|
function x() {
|
|
56
56
|
f &&= (clearTimeout(f), null);
|
|
57
57
|
}
|
|
58
58
|
function S() {
|
|
59
|
-
|
|
59
|
+
g !== null && (cancelAnimationFrame(g), g = null);
|
|
60
60
|
}
|
|
61
61
|
function C() {
|
|
62
62
|
S(), h?.();
|
|
63
63
|
}
|
|
64
64
|
function w() {
|
|
65
65
|
s() || p.value > 0 || (x(), f = setTimeout(() => {
|
|
66
|
-
T(), l.value = "collapsed",
|
|
66
|
+
T(), l.value = "collapsed", y();
|
|
67
67
|
}, t));
|
|
68
68
|
}
|
|
69
69
|
function T() {
|
|
@@ -74,101 +74,97 @@ function se(e) {
|
|
|
74
74
|
}
|
|
75
75
|
function E() {
|
|
76
76
|
if (s()) {
|
|
77
|
-
l.value = "pinned",
|
|
77
|
+
l.value = "pinned", y();
|
|
78
78
|
return;
|
|
79
79
|
}
|
|
80
|
-
|
|
80
|
+
_ ||= (_ = !0, x(), T(), l.value = "collapsed", y(), !1);
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function D() {
|
|
83
83
|
if (s()) {
|
|
84
|
-
l.value = "pinned",
|
|
84
|
+
l.value = "pinned", y();
|
|
85
85
|
return;
|
|
86
86
|
}
|
|
87
|
-
x(), l.value = "hover",
|
|
87
|
+
x(), l.value = "hover", y();
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
s() || (x(), l.value === "collapsed" && (l.value = "hover",
|
|
89
|
+
function O() {
|
|
90
|
+
s() || (x(), l.value === "collapsed" && (l.value = "hover", y()));
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function k(e) {
|
|
93
93
|
if (!s() && l.value === "hover") {
|
|
94
94
|
if (p.value > 0) return;
|
|
95
95
|
if (e) {
|
|
96
96
|
let t = n.value;
|
|
97
|
-
if (t && e.relatedTarget instanceof Node && t.contains(e.relatedTarget) ||
|
|
97
|
+
if (t && e.relatedTarget instanceof Node && t.contains(e.relatedTarget) || Z(e.relatedTarget, a)) return;
|
|
98
98
|
}
|
|
99
99
|
w();
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
function
|
|
103
|
-
s() || (x(), l.value === "collapsed" && (l.value = "hover",
|
|
102
|
+
function A() {
|
|
103
|
+
s() || (x(), l.value === "collapsed" && (l.value = "hover", y()));
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function j(e) {
|
|
106
106
|
if (s() || l.value !== "hover" || p.value > 0) return;
|
|
107
107
|
let t = e.currentTarget;
|
|
108
|
-
e.relatedTarget && t.contains(e.relatedTarget) ||
|
|
108
|
+
e.relatedTarget && t.contains(e.relatedTarget) || Z(e.relatedTarget, a) || w();
|
|
109
109
|
}
|
|
110
110
|
function M() {
|
|
111
111
|
if (s()) {
|
|
112
|
-
l.value = "pinned",
|
|
112
|
+
l.value = "pinned", y();
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
115
|
-
x(), l.value = "pinned",
|
|
115
|
+
x(), l.value = "pinned", y();
|
|
116
116
|
}
|
|
117
117
|
function N() {
|
|
118
118
|
p.value++, x();
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function F() {
|
|
121
121
|
p.value = Math.max(0, p.value - 1), p.value === 0 && l.value === "hover" && (x(), f = setTimeout(() => {
|
|
122
122
|
p.value === 0 && l.value === "hover" && w();
|
|
123
123
|
}, Math.min(t, 800)));
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function I(e) {
|
|
126
126
|
if (s() || i?.value) return;
|
|
127
127
|
let t = n.value;
|
|
128
|
-
!t || t.contains(e.target) ||
|
|
128
|
+
!t || t.contains(e.target) || Z(e.target, a) || E();
|
|
129
129
|
}
|
|
130
|
-
return
|
|
131
|
-
e ? (C(),
|
|
132
|
-
|
|
133
|
-
document.removeEventListener("pointerdown",
|
|
130
|
+
return W(u, (e) => {
|
|
131
|
+
e ? (C(), g = requestAnimationFrame(() => {
|
|
132
|
+
g = null, u.value && (document.addEventListener("pointerdown", I, !0), h = () => {
|
|
133
|
+
document.removeEventListener("pointerdown", I, !0), h = null;
|
|
134
134
|
});
|
|
135
135
|
})) : C();
|
|
136
|
-
}), typeof r == "boolean" ? r && (l.value = "pinned",
|
|
136
|
+
}), typeof r == "boolean" ? r && (l.value = "pinned", y()) : W(r, (e) => {
|
|
137
137
|
if (e) {
|
|
138
|
-
x(), l.value = "pinned",
|
|
138
|
+
x(), l.value = "pinned", y();
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
|
-
l.value = "collapsed",
|
|
142
|
-
}, { immediate: !0 }),
|
|
141
|
+
l.value = "collapsed", y();
|
|
142
|
+
}, { immediate: !0 }), P(() => {
|
|
143
143
|
x(), C();
|
|
144
144
|
}), {
|
|
145
145
|
state: l,
|
|
146
146
|
expanded: u,
|
|
147
147
|
isPinned: d,
|
|
148
148
|
isHeld: m,
|
|
149
|
-
onMouseEnter:
|
|
150
|
-
onMouseLeave:
|
|
151
|
-
onFocusIn:
|
|
152
|
-
onFocusOut:
|
|
149
|
+
onMouseEnter: O,
|
|
150
|
+
onMouseLeave: k,
|
|
151
|
+
onFocusIn: A,
|
|
152
|
+
onFocusOut: j,
|
|
153
153
|
onClickCollapsed: M,
|
|
154
154
|
keepOpen: N,
|
|
155
|
-
release:
|
|
156
|
-
expand:
|
|
155
|
+
release: F,
|
|
156
|
+
expand: D,
|
|
157
157
|
collapse: E
|
|
158
158
|
};
|
|
159
159
|
}
|
|
160
160
|
//#endregion
|
|
161
161
|
//#region src/components/custom/dock/composables/dockMorphContext.ts
|
|
162
|
-
var
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}, Y = o("glass-ui:dock-morph-context");
|
|
166
|
-
Y.KEY;
|
|
167
|
-
function le(e) {
|
|
168
|
-
Y.provide(e);
|
|
162
|
+
var Q = o(d), { KEY: le } = Q;
|
|
163
|
+
function ue(e) {
|
|
164
|
+
Q.provide(e);
|
|
169
165
|
}
|
|
170
|
-
var
|
|
171
|
-
function
|
|
166
|
+
var de = Q.use;
|
|
167
|
+
function fe(e) {
|
|
172
168
|
let { rootEl: t, outerEl: n, outerActiveLayer: r, outerAxis: i } = e, a = null, o = /* @__PURE__ */ new Set();
|
|
173
169
|
function s() {
|
|
174
170
|
return t.value;
|
|
@@ -188,29 +184,29 @@ function de(e) {
|
|
|
188
184
|
function f(e) {
|
|
189
185
|
e.style.removeProperty("--dock-morph-from"), e.style.removeProperty("--dock-morph-to");
|
|
190
186
|
}
|
|
191
|
-
function
|
|
187
|
+
function m() {
|
|
192
188
|
for (let e of o) {
|
|
193
189
|
let t = e.containerEl.value;
|
|
194
190
|
if (t && t.style.getPropertyValue("--dock-morph-to")) return !0;
|
|
195
191
|
}
|
|
196
192
|
return !1;
|
|
197
193
|
}
|
|
198
|
-
function
|
|
194
|
+
function h(e) {
|
|
199
195
|
let t = e.containerEl.value;
|
|
200
196
|
t && f(t), e.leavingLayer.value = null;
|
|
201
197
|
}
|
|
202
|
-
function
|
|
203
|
-
if (
|
|
198
|
+
function g() {
|
|
199
|
+
if (m()) return;
|
|
204
200
|
let e = s();
|
|
205
201
|
e && (e.style.removeProperty("--dock-morph-t"), e.removeAttribute("data-morphing")), c();
|
|
206
202
|
}
|
|
207
|
-
function
|
|
203
|
+
function _() {
|
|
208
204
|
if (!s()) return;
|
|
209
205
|
let e = a !== null && !a.settled ? a.velocity : 0;
|
|
210
206
|
if (!a || a.settled) {
|
|
211
|
-
c(), a = new
|
|
212
|
-
response:
|
|
213
|
-
dampingFraction:
|
|
207
|
+
c(), a = new J({
|
|
208
|
+
response: p.response,
|
|
209
|
+
dampingFraction: p.dampingFraction,
|
|
214
210
|
initial: 0,
|
|
215
211
|
respectReducedMotion: !0
|
|
216
212
|
});
|
|
@@ -220,25 +216,25 @@ function de(e) {
|
|
|
220
216
|
if (n && n.style.setProperty("--dock-morph-t", `${e}`), t.settled) {
|
|
221
217
|
for (let e of o) {
|
|
222
218
|
let t = e.containerEl.value;
|
|
223
|
-
t && t.style.getPropertyValue("--dock-morph-to") &&
|
|
219
|
+
t && t.style.getPropertyValue("--dock-morph-to") && h(e);
|
|
224
220
|
}
|
|
225
|
-
|
|
221
|
+
g();
|
|
226
222
|
}
|
|
227
223
|
});
|
|
228
224
|
} else a.reset(0, e), a.target = 1;
|
|
229
225
|
}
|
|
230
|
-
function
|
|
226
|
+
function v(e, t, n, r) {
|
|
231
227
|
if (t !== e.txId) return;
|
|
232
228
|
let i = e.containerEl.value, a = s();
|
|
233
229
|
if (!(!i || !a)) {
|
|
234
230
|
if (Math.abs(r - n) < .5) {
|
|
235
|
-
|
|
231
|
+
h(e), g();
|
|
236
232
|
return;
|
|
237
233
|
}
|
|
238
|
-
i.style.setProperty("--dock-morph-from", `${n}px`), i.style.setProperty("--dock-morph-to", `${r}px`), a.setAttribute("data-morphing", ""),
|
|
234
|
+
i.style.setProperty("--dock-morph-from", `${n}px`), i.style.setProperty("--dock-morph-to", `${r}px`), a.setAttribute("data-morphing", ""), _();
|
|
239
235
|
}
|
|
240
236
|
}
|
|
241
|
-
function
|
|
237
|
+
function y(e, t, n) {
|
|
242
238
|
if (t === n) return;
|
|
243
239
|
let r = e.containerEl.value, i = s();
|
|
244
240
|
if (!r || !i) {
|
|
@@ -263,66 +259,128 @@ function de(e) {
|
|
|
263
259
|
let r = u(c);
|
|
264
260
|
t.style.setProperty(r, "max-content");
|
|
265
261
|
let i = d(t, c);
|
|
266
|
-
t.style.removeProperty(r),
|
|
262
|
+
t.style.removeProperty(r), v(e, a, l, i);
|
|
267
263
|
});
|
|
268
264
|
}
|
|
269
|
-
function
|
|
265
|
+
function b(e) {
|
|
270
266
|
let t = {
|
|
271
267
|
containerEl: e.containerEl,
|
|
272
268
|
activeLayer: e.activeLayer,
|
|
273
269
|
axis: e.axis,
|
|
274
|
-
currentLayer:
|
|
275
|
-
leavingLayer:
|
|
270
|
+
currentLayer: L(e.activeLayer.value),
|
|
271
|
+
leavingLayer: L(null),
|
|
276
272
|
txId: 0,
|
|
277
273
|
stop: () => {}
|
|
278
274
|
};
|
|
279
|
-
return t.stop =
|
|
280
|
-
|
|
275
|
+
return t.stop = W(e.activeLayer, (e, n) => {
|
|
276
|
+
y(t, e, n);
|
|
281
277
|
}), o.add(t), t;
|
|
282
278
|
}
|
|
283
|
-
function
|
|
284
|
-
e.stop(), o.delete(e),
|
|
279
|
+
function x(e) {
|
|
280
|
+
e.stop(), o.delete(e), g();
|
|
285
281
|
}
|
|
286
|
-
let
|
|
282
|
+
let S = b({
|
|
287
283
|
containerEl: n,
|
|
288
284
|
activeLayer: r,
|
|
289
285
|
axis: i
|
|
290
|
-
}),
|
|
291
|
-
let t =
|
|
286
|
+
}), C = { registerGroup(e) {
|
|
287
|
+
let t = b(e);
|
|
292
288
|
return {
|
|
293
|
-
currentLayer:
|
|
294
|
-
leavingLayer:
|
|
295
|
-
release: () =>
|
|
289
|
+
currentLayer: I(t.currentLayer),
|
|
290
|
+
leavingLayer: I(t.leavingLayer),
|
|
291
|
+
release: () => x(t)
|
|
296
292
|
};
|
|
297
293
|
} };
|
|
298
|
-
function
|
|
294
|
+
function w(e) {
|
|
299
295
|
let t = n.value;
|
|
300
296
|
if (!t || e.target !== t) return;
|
|
301
297
|
let r = u(i.value);
|
|
302
|
-
e.propertyName !== r && e.propertyName !== l(i.value) || a && a.settled && (
|
|
298
|
+
e.propertyName !== r && e.propertyName !== l(i.value) || a && a.settled && (h(S), g());
|
|
303
299
|
}
|
|
304
|
-
return
|
|
300
|
+
return P(() => {
|
|
305
301
|
for (let e of o) e.stop();
|
|
306
302
|
o.clear(), c();
|
|
307
303
|
}), {
|
|
308
|
-
context:
|
|
309
|
-
outerCurrentLayer:
|
|
310
|
-
onOuterTransitionEnd:
|
|
304
|
+
context: C,
|
|
305
|
+
outerCurrentLayer: I(S.currentLayer),
|
|
306
|
+
onOuterTransitionEnd: w
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
//#endregion
|
|
310
|
+
//#region src/components/custom/dock/composables/useDockShellProps.ts
|
|
311
|
+
function pe(e) {
|
|
312
|
+
return e.variant !== "rail" && e.variant !== "instrument-strip";
|
|
313
|
+
}
|
|
314
|
+
function me(e) {
|
|
315
|
+
let t = b(() => {
|
|
316
|
+
if (e.containerName) return {
|
|
317
|
+
"container-type": "inline-size",
|
|
318
|
+
"container-name": e.containerName
|
|
319
|
+
};
|
|
320
|
+
}), n = b(() => pe(e) ? e.collapseDelay ?? 2e3 : 2e3), r = b(() => pe(e) ? e.startCollapsed ?? !0 : !1), i = b(() => pe(e) ? e.layout ?? "linear" : "linear"), a = b(() => e.variant ?? "dock"), o = b(() => e.shape ?? "pill"), s = b(() => e.variant === "rail" || e.variant === "instrument-strip" ? "vertical" : e.orientation ?? "horizontal");
|
|
321
|
+
return {
|
|
322
|
+
containerStyle: t,
|
|
323
|
+
collapseDelay: n,
|
|
324
|
+
startCollapsed: r,
|
|
325
|
+
layoutValue: i,
|
|
326
|
+
variant: a,
|
|
327
|
+
shape: o,
|
|
328
|
+
orientation: s,
|
|
329
|
+
density: b(() => e.density ?? "comfortable"),
|
|
330
|
+
scrollClass: b(() => e.overflow === "scroll" ? s.value === "vertical" ? "dock-scroll-y" : "dock-scroll-x" : null),
|
|
331
|
+
alwaysExpanded: b(() => e.alwaysExpanded || s.value === "vertical" || i.value === "grid"),
|
|
332
|
+
fitContent: b(() => e.fitContent || e.variant === "rail" || e.variant === "instrument-strip")
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
//#endregion
|
|
336
|
+
//#region src/components/custom/dock/composables/useDockMorphWindow.ts
|
|
337
|
+
function he(e) {
|
|
338
|
+
let t = e.trim();
|
|
339
|
+
return t ? t.endsWith("ms") ? Number.parseFloat(t) : t.endsWith("s") ? Number.parseFloat(t) * 1e3 : Number.parseFloat(t) || 0 : 0;
|
|
340
|
+
}
|
|
341
|
+
function ge(e) {
|
|
342
|
+
let t = getComputedStyle(e), n = t.transitionDuration.split(",").map(he), r = t.transitionDelay.split(",").map(he);
|
|
343
|
+
return Math.max(0, ...n.map((e, t) => e + (r[t] ?? r[0] ?? 0)));
|
|
344
|
+
}
|
|
345
|
+
function _e(e) {
|
|
346
|
+
let t = he(getComputedStyle(e).getPropertyValue("--duration-normal") || "0.3s");
|
|
347
|
+
return Math.max(t > 0 ? t * 2 : 0, 600);
|
|
348
|
+
}
|
|
349
|
+
function ve(e, t) {
|
|
350
|
+
let n = null, r = 0;
|
|
351
|
+
function i() {
|
|
352
|
+
n &&= (clearTimeout(n), null);
|
|
353
|
+
}
|
|
354
|
+
function a() {
|
|
355
|
+
let a = e.value;
|
|
356
|
+
if (!a) return;
|
|
357
|
+
let o = ++r;
|
|
358
|
+
i(), t.value = !0, n = setTimeout(() => {
|
|
359
|
+
o === r && (t.value = !1, n = null);
|
|
360
|
+
}, Math.max(ge(a), _e(a)) + 50);
|
|
361
|
+
}
|
|
362
|
+
function o(n) {
|
|
363
|
+
n.target === e.value && c.has(n.propertyName) && (i(), r++, t.value = !1);
|
|
364
|
+
}
|
|
365
|
+
return M(i), {
|
|
366
|
+
markTransitioning: a,
|
|
367
|
+
onDockTransitionDone: o,
|
|
368
|
+
clearTransitionTimer: i
|
|
311
369
|
};
|
|
312
370
|
}
|
|
313
371
|
//#endregion
|
|
314
372
|
//#region src/components/custom/dock/GlassDock.vue?vue&type=script&setup=true&lang.ts
|
|
315
|
-
var
|
|
373
|
+
var ye = [
|
|
316
374
|
"data-density",
|
|
317
375
|
"data-held",
|
|
318
376
|
"data-container-name"
|
|
319
|
-
],
|
|
377
|
+
], be = {
|
|
320
378
|
key: 0,
|
|
321
379
|
class: "dock-persistent"
|
|
322
|
-
},
|
|
380
|
+
}, xe = ["inert"], Se = ["inert"], Ce = {
|
|
323
381
|
key: 2,
|
|
324
382
|
class: "dock-layers dock-layer--vertical-body"
|
|
325
|
-
},
|
|
383
|
+
}, we = { class: "dock-layer--vertical-section" }, Te = /* @__PURE__ */ E({
|
|
326
384
|
__name: "GlassDock",
|
|
327
385
|
props: {
|
|
328
386
|
variant: {},
|
|
@@ -339,215 +397,169 @@ var fe = [
|
|
|
339
397
|
containerName: {}
|
|
340
398
|
},
|
|
341
399
|
setup(e, { expose: t }) {
|
|
342
|
-
let n = e, r = g(()
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
400
|
+
let n = e, { containerStyle: r, collapseDelay: a, startCollapsed: o, layoutValue: s, variant: c, shape: l, orientation: d, density: f, scrollClass: p, alwaysExpanded: m, fitContent: h } = me(n), g = s, _ = U("dockEl"), v = U("layersEl"), x = L(!1), E = i(a.value), D = `glass-dock-${te()}`, { expanded: O, isPinned: k, isHeld: M, onMouseEnter: P, onMouseLeave: I, onFocusIn: ee, onFocusOut: z, onClickCollapsed: B, keepOpen: H, release: ne, expand: G, collapse: re } = ce({
|
|
401
|
+
collapseDelay: a.value,
|
|
402
|
+
rootEl: _,
|
|
403
|
+
alwaysExpanded: m,
|
|
404
|
+
isTransitioning: x,
|
|
405
|
+
dockId: D
|
|
347
406
|
});
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
isTransitioning: O,
|
|
356
|
-
dockId: M
|
|
407
|
+
u({
|
|
408
|
+
id: D,
|
|
409
|
+
orientation: d,
|
|
410
|
+
layout: g,
|
|
411
|
+
keepOpen: H,
|
|
412
|
+
release: ne,
|
|
413
|
+
held: M
|
|
357
414
|
});
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
release: ie,
|
|
364
|
-
held: V
|
|
415
|
+
let K = b(() => m.value || O.value), { context: ie, onOuterTransitionEnd: ae } = fe({
|
|
416
|
+
rootEl: _,
|
|
417
|
+
outerEl: v,
|
|
418
|
+
outerActiveLayer: b(() => K.value ? "full" : "summary"),
|
|
419
|
+
outerAxis: b(() => "horizontal")
|
|
365
420
|
});
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
outerAxis: g(() => "horizontal")
|
|
421
|
+
ue(ie);
|
|
422
|
+
let q = b(() => ({ "view-transition-name": D.replace(/[^a-zA-Z0-9_-]/g, "-") })), { markTransitioning: J, onDockTransitionDone: Y } = ve(_, x);
|
|
423
|
+
N(() => {
|
|
424
|
+
(n.alwaysExpanded || !o.value) && G();
|
|
371
425
|
});
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
function X(e) {
|
|
375
|
-
let t = e.trim();
|
|
376
|
-
return t ? t.endsWith("ms") ? Number.parseFloat(t) : t.endsWith("s") ? Number.parseFloat(t) * 1e3 : Number.parseFloat(t) || 0 : 0;
|
|
426
|
+
function X() {
|
|
427
|
+
return d.value === "horizontal" && !m.value;
|
|
377
428
|
}
|
|
378
|
-
function
|
|
379
|
-
|
|
380
|
-
|
|
429
|
+
function oe(e) {
|
|
430
|
+
if (!X() || K.value) return;
|
|
431
|
+
let t = _.value, n = e.touches[0];
|
|
432
|
+
!t || !n || E.handleTouchStart(t, n.clientY);
|
|
381
433
|
}
|
|
382
|
-
function
|
|
383
|
-
|
|
384
|
-
return Math.max(t > 0 ? t * 2 : 0, 600);
|
|
434
|
+
function Z(e) {
|
|
435
|
+
X() && E.handleScrollCheck(e);
|
|
385
436
|
}
|
|
386
437
|
function Q() {
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
"width",
|
|
391
|
-
"height",
|
|
392
|
-
"padding",
|
|
393
|
-
"transform"
|
|
394
|
-
]);
|
|
395
|
-
function be() {
|
|
396
|
-
let e = u.value;
|
|
397
|
-
if (!e) return;
|
|
398
|
-
let t = ++F;
|
|
399
|
-
Q(), O.value = !0, P = setTimeout(() => {
|
|
400
|
-
t === F && (O.value = !1, P = null);
|
|
401
|
-
}, Math.max(Z(e), ve(e)) + 50);
|
|
402
|
-
}
|
|
403
|
-
function xe(e) {
|
|
404
|
-
e.target === u.value && ye.has(e.propertyName) && (Q(), F++, O.value = !1);
|
|
438
|
+
if (!X()) return;
|
|
439
|
+
let e = E.isActive.value;
|
|
440
|
+
E.handleTouchEnd(), !e && E.isActive.value && !K.value && G();
|
|
405
441
|
}
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
})
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
}
|
|
420
|
-
function we() {
|
|
421
|
-
if (!$()) return;
|
|
422
|
-
let e = A.isActive.value;
|
|
423
|
-
A.handleTouchEnd(), !e && A.isActive.value && !J.value && q();
|
|
424
|
-
}
|
|
425
|
-
return B(A.isActive, (e) => {
|
|
426
|
-
!e && L.value && !R.value && !w.value && ae();
|
|
427
|
-
}), B(J, (e) => {
|
|
428
|
-
be(), e || A.deactivate();
|
|
429
|
-
}), D(Q), t({
|
|
430
|
-
expanded: L,
|
|
431
|
-
isPinned: R,
|
|
432
|
-
isHeld: V,
|
|
433
|
-
isTransitioning: O,
|
|
434
|
-
expand: q,
|
|
435
|
-
collapse: ae,
|
|
436
|
-
keepOpen: K,
|
|
437
|
-
release: ie
|
|
438
|
-
}), (t, n) => (k(), y("div", {
|
|
442
|
+
return W(E.isActive, (e) => {
|
|
443
|
+
!e && O.value && !k.value && !m.value && re();
|
|
444
|
+
}), W(K, (e) => {
|
|
445
|
+
J(), e || E.deactivate();
|
|
446
|
+
}), t({
|
|
447
|
+
expanded: O,
|
|
448
|
+
isPinned: k,
|
|
449
|
+
isHeld: M,
|
|
450
|
+
isTransitioning: x,
|
|
451
|
+
expand: G,
|
|
452
|
+
collapse: re,
|
|
453
|
+
keepOpen: H,
|
|
454
|
+
release: ne
|
|
455
|
+
}), (t, n) => (F(), C("div", {
|
|
439
456
|
ref_key: "dockEl",
|
|
440
|
-
ref:
|
|
441
|
-
class:
|
|
442
|
-
|
|
443
|
-
`variant-${
|
|
444
|
-
`shape-${
|
|
445
|
-
`layout-${
|
|
446
|
-
|
|
457
|
+
ref: _,
|
|
458
|
+
class: A(["glass-dock", [
|
|
459
|
+
V(d),
|
|
460
|
+
`variant-${V(c)}`,
|
|
461
|
+
`shape-${V(l)}`,
|
|
462
|
+
`layout-${V(g)}`,
|
|
463
|
+
V(p),
|
|
447
464
|
{
|
|
448
|
-
expanded:
|
|
449
|
-
collapsed: !
|
|
450
|
-
pinned:
|
|
451
|
-
"fit-content":
|
|
452
|
-
"always-expanded":
|
|
453
|
-
"dock-overflow-wrap": e.overflow === "wrap" &&
|
|
465
|
+
expanded: K.value,
|
|
466
|
+
collapsed: !K.value,
|
|
467
|
+
pinned: V(k),
|
|
468
|
+
"fit-content": V(h),
|
|
469
|
+
"always-expanded": V(m),
|
|
470
|
+
"dock-overflow-wrap": e.overflow === "wrap" && V(d) !== "vertical"
|
|
454
471
|
},
|
|
455
|
-
e.position === "fixed" ? "fixed bottom-
|
|
472
|
+
e.position === "fixed" ? "fixed bottom-(--dock-pos) left-1/2 -translate-x-1/2" : e.position === "sticky" ? "dock-sticky" : "dock-inline"
|
|
456
473
|
]]),
|
|
457
|
-
"data-density":
|
|
458
|
-
"data-held":
|
|
474
|
+
"data-density": V(f),
|
|
475
|
+
"data-held": V(M) || void 0,
|
|
459
476
|
"data-container-name": e.containerName || void 0,
|
|
460
|
-
style:
|
|
461
|
-
onMouseenter: n[2] ||= (...e) =>
|
|
462
|
-
onMouseleave: n[3] ||= (e) => I
|
|
463
|
-
onFocusin: n[4] ||= (...e) =>
|
|
464
|
-
onFocusout: n[5] ||= (...e) =>
|
|
465
|
-
onTouchstart:
|
|
466
|
-
onTouchmove:
|
|
467
|
-
onTouchend:
|
|
468
|
-
onTransitionend:
|
|
469
|
-
onTransitioncancel:
|
|
470
|
-
}, [t.$slots.persistent ? (
|
|
477
|
+
style: j([V(r), q.value]),
|
|
478
|
+
onMouseenter: n[2] ||= (...e) => V(P) && V(P)(...e),
|
|
479
|
+
onMouseleave: n[3] ||= (e) => V(I)(e),
|
|
480
|
+
onFocusin: n[4] ||= (...e) => V(ee) && V(ee)(...e),
|
|
481
|
+
onFocusout: n[5] ||= (...e) => V(z) && V(z)(...e),
|
|
482
|
+
onTouchstart: oe,
|
|
483
|
+
onTouchmove: Z,
|
|
484
|
+
onTouchend: Q,
|
|
485
|
+
onTransitionend: n[6] ||= (...e) => V(Y) && V(Y)(...e),
|
|
486
|
+
onTransitioncancel: n[7] ||= (...e) => V(Y) && V(Y)(...e)
|
|
487
|
+
}, [t.$slots.persistent ? (F(), C("div", be, [R(t.$slots, "persistent")])) : S("", !0), V(d) === "horizontal" ? (F(), C("div", {
|
|
471
488
|
key: 1,
|
|
472
489
|
ref_key: "layersEl",
|
|
473
|
-
ref:
|
|
490
|
+
ref: v,
|
|
474
491
|
class: "dock-layers",
|
|
475
|
-
onTransitionend: n[1] ||= (...e) =>
|
|
476
|
-
}, [
|
|
477
|
-
class:
|
|
478
|
-
inert: !
|
|
479
|
-
}, [
|
|
480
|
-
class:
|
|
481
|
-
inert:
|
|
482
|
-
onClick: n[0] ||= (...e) =>
|
|
483
|
-
}, [
|
|
484
|
-
}
|
|
485
|
-
}),
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
Z.provide(e);
|
|
492
|
+
onTransitionend: n[1] ||= (...e) => V(ae) && V(ae)(...e)
|
|
493
|
+
}, [w("div", {
|
|
494
|
+
class: A(["dock-layer dock-layer--full", { "is-active": K.value }]),
|
|
495
|
+
inert: !V(O) || void 0
|
|
496
|
+
}, [R(t.$slots, "default")], 10, xe), w("div", {
|
|
497
|
+
class: A(["dock-layer dock-layer--summary", { "is-active": !K.value }]),
|
|
498
|
+
inert: V(O) || void 0,
|
|
499
|
+
onClick: n[0] ||= (...e) => V(B) && V(B)(...e)
|
|
500
|
+
}, [R(t.$slots, "collapsed")], 10, Se)], 544)) : (F(), C("div", Ce, [R(t.$slots, "default"), t.$slots.collapsed ? (F(), C(y, { key: 0 }, [T(se), w("div", we, [R(t.$slots, "collapsed")])], 64)) : S("", !0)]))], 46, ye));
|
|
501
|
+
}
|
|
502
|
+
}), $ = a(s, "[glass-ui:dock] <DockLayer> must be used inside <DockLayerGroup>"), { KEY: Ee } = $;
|
|
503
|
+
function De(e) {
|
|
504
|
+
$.provide(e);
|
|
489
505
|
}
|
|
490
|
-
var
|
|
491
|
-
|
|
506
|
+
var Oe = $.use;
|
|
507
|
+
$.useOptional;
|
|
492
508
|
//#endregion
|
|
493
509
|
//#region src/components/custom/dock/composables/useLayerTransition.ts
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
dampingFraction: .7
|
|
497
|
-
};
|
|
498
|
-
function be(e) {
|
|
499
|
-
let { containerEl: t, activeLayer: n, axis: r } = e, i = g(() => r?.value === "vertical" ? "height" : "width"), a = g(() => i.value === "width" ? "inline-size" : "block-size"), o = (e) => e.getBoundingClientRect()[i.value], s = j(n.value), c = j(null), l = 0, u = null, d = null;
|
|
510
|
+
function ke(e) {
|
|
511
|
+
let { containerEl: t, activeLayer: n, axis: r } = e, i = b(() => r?.value === "vertical" ? "height" : "width"), a = b(() => i.value === "width" ? "inline-size" : "block-size"), o = (e) => e.getBoundingClientRect()[i.value], s = L(n.value), c = L(null), l = 0, u = null, d = null;
|
|
500
512
|
function f() {
|
|
501
513
|
u &&= (u.dispose(), null), d = null;
|
|
502
514
|
}
|
|
503
|
-
function
|
|
515
|
+
function m(e) {
|
|
504
516
|
return e.closest(".glass-dock") ?? e;
|
|
505
517
|
}
|
|
506
|
-
function
|
|
518
|
+
function h(e) {
|
|
507
519
|
e.style.removeProperty("--dock-morph-from"), e.style.removeProperty("--dock-morph-to");
|
|
508
520
|
}
|
|
509
|
-
function
|
|
510
|
-
|
|
521
|
+
function g(e, t) {
|
|
522
|
+
h(e), t.style.removeProperty("--dock-morph-t"), t.removeAttribute("data-morphing"), c.value = null, f();
|
|
511
523
|
}
|
|
512
524
|
function _(e, t, n, r, i, a, o) {
|
|
513
525
|
if (Math.abs(i - r) < .5) {
|
|
514
|
-
|
|
526
|
+
g(e, t);
|
|
515
527
|
return;
|
|
516
528
|
}
|
|
517
|
-
e.style.setProperty("--dock-morph-from", `${r}px`), e.style.setProperty("--dock-morph-to", `${i}px`), t.style.setProperty("--dock-morph-t", "0"), t.setAttribute("data-morphing", ""), o || (f(), u = new
|
|
518
|
-
response:
|
|
519
|
-
dampingFraction:
|
|
529
|
+
e.style.setProperty("--dock-morph-from", `${r}px`), e.style.setProperty("--dock-morph-to", `${i}px`), t.style.setProperty("--dock-morph-t", "0"), t.setAttribute("data-morphing", ""), o || (f(), u = new J({
|
|
530
|
+
response: p.response,
|
|
531
|
+
dampingFraction: p.dampingFraction,
|
|
520
532
|
initial: 0,
|
|
521
533
|
respectReducedMotion: !0
|
|
522
534
|
}), d = e);
|
|
523
535
|
let s = u;
|
|
524
536
|
s.reset(0, a), s.target = 1, s.play((r) => {
|
|
525
|
-
n === l && (t.style.setProperty("--dock-morph-t", `${r}`), s.settled &&
|
|
537
|
+
n === l && (t.style.setProperty("--dock-morph-t", `${r}`), s.settled && g(e, t));
|
|
526
538
|
});
|
|
527
539
|
}
|
|
528
|
-
|
|
540
|
+
W(n, (e, n) => {
|
|
529
541
|
if (e === n) return;
|
|
530
542
|
let r = t.value;
|
|
531
543
|
if (!r) {
|
|
532
544
|
s.value = e, c.value = null;
|
|
533
545
|
return;
|
|
534
546
|
}
|
|
535
|
-
let i =
|
|
547
|
+
let i = m(r), f = ++l, p = u !== null && d === r && !u.settled ? u : null, g = p ? p.velocity : 0, v = o(r);
|
|
536
548
|
c.value = n, s.value = e, r.style.setProperty("--dock-morph-from", `${v}px`), r.style.setProperty("--dock-morph-to", `${v}px`), i.style.setProperty("--dock-morph-t", "0"), i.setAttribute("data-morphing", ""), requestAnimationFrame(() => {
|
|
537
549
|
if (f !== l) return;
|
|
538
550
|
let e = t.value;
|
|
539
551
|
if (!e) return;
|
|
540
|
-
let n =
|
|
541
|
-
|
|
552
|
+
let n = m(e);
|
|
553
|
+
h(e), n.style.removeProperty("--dock-morph-t"), e.style.setProperty(a.value, "max-content");
|
|
542
554
|
let r = o(e);
|
|
543
|
-
e.style.removeProperty(a.value), _(e, n, f, v, r, g,
|
|
555
|
+
e.style.removeProperty(a.value), _(e, n, f, v, r, g, p);
|
|
544
556
|
});
|
|
545
557
|
});
|
|
546
558
|
function v(e) {
|
|
547
559
|
let n = t.value;
|
|
548
|
-
n && e.target === n && (e.propertyName !== a.value && e.propertyName !== i.value || u && u.settled &&
|
|
560
|
+
n && e.target === n && (e.propertyName !== a.value && e.propertyName !== i.value || u && u.settled && g(n, m(n)));
|
|
549
561
|
}
|
|
550
|
-
return
|
|
562
|
+
return P(f), {
|
|
551
563
|
onTransitionEnd: v,
|
|
552
564
|
currentLayer: s,
|
|
553
565
|
leavingLayer: c
|
|
@@ -555,9 +567,9 @@ function be(e) {
|
|
|
555
567
|
}
|
|
556
568
|
//#endregion
|
|
557
569
|
//#region src/components/custom/dock/DockLayerGroup.vue?vue&type=script&setup=true&lang.ts
|
|
558
|
-
var
|
|
570
|
+
var Ae = { key: 1 }, je = { key: 2 }, Me = /* @__PURE__ */ E({
|
|
559
571
|
__name: "DockLayerGroup",
|
|
560
|
-
props: /* @__PURE__ */
|
|
572
|
+
props: /* @__PURE__ */ D({
|
|
561
573
|
orientation: {},
|
|
562
574
|
showRail: {
|
|
563
575
|
type: Boolean,
|
|
@@ -570,100 +582,100 @@ var xe = { key: 1 }, $ = { key: 2 }, Se = /* @__PURE__ */ S({
|
|
|
570
582
|
}),
|
|
571
583
|
emits: ["update:active"],
|
|
572
584
|
setup(e) {
|
|
573
|
-
let t = e, n =
|
|
585
|
+
let t = e, n = ne(e, "active"), r = l(), i = L([]), a = U("containerEl");
|
|
574
586
|
function o(e) {
|
|
575
587
|
i.value.find((t) => t.id === e.id) || i.value.push(e);
|
|
576
588
|
}
|
|
577
|
-
function
|
|
589
|
+
function s(e) {
|
|
578
590
|
i.value = i.value.filter((t) => t.id !== e);
|
|
579
591
|
}
|
|
580
|
-
let
|
|
581
|
-
if (
|
|
582
|
-
let e =
|
|
592
|
+
let c = b(() => t.orientation ?? r?.orientation.value ?? "horizontal"), u = b(() => c.value === "vertical" ? "horizontal" : "vertical"), d = de(), f, p, m;
|
|
593
|
+
if (d) {
|
|
594
|
+
let e = d.registerGroup({
|
|
583
595
|
containerEl: a,
|
|
584
596
|
activeLayer: n,
|
|
585
|
-
axis:
|
|
597
|
+
axis: c
|
|
586
598
|
});
|
|
587
|
-
|
|
599
|
+
f = e.currentLayer, p = e.leavingLayer, m = () => {}, M(() => e.release());
|
|
588
600
|
} else {
|
|
589
|
-
let e =
|
|
601
|
+
let e = ke({
|
|
590
602
|
containerEl: a,
|
|
591
603
|
activeLayer: n,
|
|
592
|
-
axis:
|
|
604
|
+
axis: c,
|
|
593
605
|
directionTypes: (e, t) => {
|
|
594
606
|
let n = i.value.findIndex((t) => t.id === e);
|
|
595
607
|
return [i.value.findIndex((e) => e.id === t) < n ? "layer-back" : "layer-forward"];
|
|
596
608
|
}
|
|
597
609
|
});
|
|
598
|
-
|
|
610
|
+
f = I(e.currentLayer), p = I(e.leavingLayer), m = e.onTransitionEnd;
|
|
599
611
|
}
|
|
600
|
-
let
|
|
601
|
-
"view-transition-name": `gl-dock-stack-${
|
|
612
|
+
let E = typeof document < "u" && "startViewTransition" in document, D = te(), O = b(() => E ? {
|
|
613
|
+
"view-transition-name": `gl-dock-stack-${D.replace(/[^a-zA-Z0-9_-]/g, "-")}`,
|
|
602
614
|
"view-transition-class": "gl-dock-layer"
|
|
603
615
|
} : void 0);
|
|
604
|
-
|
|
616
|
+
De({
|
|
605
617
|
register: o,
|
|
606
|
-
unregister:
|
|
607
|
-
currentLayerId:
|
|
608
|
-
leavingLayerId:
|
|
618
|
+
unregister: s,
|
|
619
|
+
currentLayerId: f,
|
|
620
|
+
leavingLayerId: p
|
|
609
621
|
});
|
|
610
|
-
function
|
|
611
|
-
return typeof e == "object" && !!e;
|
|
622
|
+
function k(e) {
|
|
623
|
+
return typeof e == "object" && !!e || typeof e == "function";
|
|
612
624
|
}
|
|
613
|
-
let
|
|
614
|
-
function
|
|
615
|
-
|
|
625
|
+
let N = L(!1);
|
|
626
|
+
function P() {
|
|
627
|
+
N.value || (N.value = !0, r?.keepOpen());
|
|
616
628
|
}
|
|
617
|
-
function
|
|
629
|
+
function H(e) {
|
|
618
630
|
let t = e.relatedTarget, n = e.currentTarget;
|
|
619
|
-
t && n?.contains(t) ||
|
|
631
|
+
t && n?.contains(t) || N.value && (N.value = !1, r?.release());
|
|
620
632
|
}
|
|
621
|
-
return (t, r) => (
|
|
633
|
+
return (t, r) => (F(), C("div", { class: A(["dock-layer-group", [c.value, `rail-${e.railPosition}`]]) }, [e.showRail && i.value.length > 1 ? (F(), x(V(h), {
|
|
622
634
|
key: 0,
|
|
623
635
|
modelValue: n.value,
|
|
624
636
|
"onUpdate:modelValue": r[0] ||= (e) => n.value = e,
|
|
625
637
|
orientation: u.value,
|
|
626
638
|
"as-child": !0
|
|
627
639
|
}, {
|
|
628
|
-
default:
|
|
629
|
-
class:
|
|
640
|
+
default: G(() => [T(V(v), {
|
|
641
|
+
class: A(["dock-layer-rail", e.railPosition]),
|
|
630
642
|
indicator: !1,
|
|
631
|
-
onFocusin:
|
|
632
|
-
onFocusout:
|
|
643
|
+
onFocusin: P,
|
|
644
|
+
onFocusout: H
|
|
633
645
|
}, {
|
|
634
|
-
default:
|
|
646
|
+
default: G(() => [(F(!0), C(y, null, ee(i.value, (e) => (F(), x(V(_), {
|
|
635
647
|
key: e.id,
|
|
636
648
|
value: e.id,
|
|
637
649
|
class: "dock-layer-tab",
|
|
638
650
|
title: e.label,
|
|
639
651
|
"aria-label": e.label ?? e.id
|
|
640
652
|
}, {
|
|
641
|
-
default:
|
|
653
|
+
default: G(() => [k(e.icon) ? (F(), x(z(e.icon), {
|
|
642
654
|
key: 0,
|
|
643
655
|
class: "size-4"
|
|
644
|
-
})) : typeof e.icon == "string" ? (
|
|
656
|
+
})) : typeof e.icon == "string" ? (F(), C("span", Ae, B(e.icon), 1)) : (F(), C("span", je, B((e.label ?? e.id).charAt(0)), 1))]),
|
|
645
657
|
_: 2
|
|
646
658
|
}, 1032, [
|
|
647
659
|
"value",
|
|
648
660
|
"title",
|
|
649
661
|
"aria-label"
|
|
650
|
-
]))), 128)),
|
|
662
|
+
]))), 128)), T(V(g), { class: "dock-layer-tab-indicator" })]),
|
|
651
663
|
_: 1
|
|
652
664
|
}, 8, ["class"])]),
|
|
653
665
|
_: 1
|
|
654
|
-
}, 8, ["modelValue", "orientation"])) :
|
|
666
|
+
}, 8, ["modelValue", "orientation"])) : S("", !0), w("div", {
|
|
655
667
|
ref_key: "containerEl",
|
|
656
668
|
ref: a,
|
|
657
669
|
class: "dock-layer-stack",
|
|
658
|
-
style:
|
|
659
|
-
onTransitionend: r[1] ||= (...e) =>
|
|
660
|
-
}, [
|
|
670
|
+
style: j(O.value),
|
|
671
|
+
onTransitionend: r[1] ||= (...e) => V(m) && V(m)(...e)
|
|
672
|
+
}, [R(t.$slots, "default")], 36)], 2));
|
|
661
673
|
}
|
|
662
|
-
}),
|
|
674
|
+
}), Ne = [
|
|
663
675
|
"inert",
|
|
664
676
|
"aria-hidden",
|
|
665
677
|
"tabindex"
|
|
666
|
-
],
|
|
678
|
+
], Pe = /* @__PURE__ */ E({
|
|
667
679
|
__name: "DockLayer",
|
|
668
680
|
props: {
|
|
669
681
|
id: {},
|
|
@@ -671,35 +683,35 @@ var xe = { key: 1 }, $ = { key: 2 }, Se = /* @__PURE__ */ S({
|
|
|
671
683
|
icon: {}
|
|
672
684
|
},
|
|
673
685
|
setup(e) {
|
|
674
|
-
let t = e, n =
|
|
675
|
-
|
|
686
|
+
let t = e, n = Oe();
|
|
687
|
+
N(() => {
|
|
676
688
|
n.register({
|
|
677
689
|
id: t.id,
|
|
678
690
|
label: t.label,
|
|
679
691
|
icon: t.icon
|
|
680
692
|
});
|
|
681
|
-
}),
|
|
693
|
+
}), M(() => {
|
|
682
694
|
n.unregister(t.id);
|
|
683
695
|
});
|
|
684
|
-
let r =
|
|
685
|
-
return
|
|
696
|
+
let r = b(() => n.currentLayerId.value === t.id), i = b(() => n.leavingLayerId.value === t.id), a = U("hostEl");
|
|
697
|
+
return W(r, async (e, t) => {
|
|
686
698
|
!e || t || typeof document < "u" && (() => {
|
|
687
699
|
let e = document.activeElement;
|
|
688
700
|
return !e || e === document.body ? !0 : !!e.closest("[inert]");
|
|
689
|
-
})() && (await
|
|
690
|
-
}), (e, t) => (
|
|
701
|
+
})() && (await k(), a.value?.focus());
|
|
702
|
+
}), (e, t) => (F(), C("div", {
|
|
691
703
|
ref_key: "hostEl",
|
|
692
704
|
ref: a,
|
|
693
|
-
class:
|
|
705
|
+
class: A(["dock-layer-item-host", {
|
|
694
706
|
"is-active": r.value,
|
|
695
707
|
"is-leaving": i.value
|
|
696
708
|
}]),
|
|
697
709
|
inert: r.value ? void 0 : !0,
|
|
698
710
|
"aria-hidden": r.value ? void 0 : !0,
|
|
699
711
|
tabindex: r.value ? -1 : void 0
|
|
700
|
-
}, [
|
|
712
|
+
}, [R(e.$slots, "default")], 10, Ne));
|
|
701
713
|
}
|
|
702
|
-
}),
|
|
714
|
+
}), Fe = /* @__PURE__ */ E({
|
|
703
715
|
__name: "DockIconButton",
|
|
704
716
|
props: {
|
|
705
717
|
compact: {
|
|
@@ -721,16 +733,16 @@ var xe = { key: 1 }, $ = { key: 2 }, Se = /* @__PURE__ */ S({
|
|
|
721
733
|
] }
|
|
722
734
|
},
|
|
723
735
|
setup(t) {
|
|
724
|
-
let n = t, i =
|
|
725
|
-
return (e, n) => (
|
|
736
|
+
let n = t, i = b(() => e("dock-icon-button glass-specular-track", { "dock-icon-button--compact": n.compact }, n.class)), { specularStyle: a, onPointerMove: o } = r(), s = b(() => !n.asChild && n.as === "button" ? { type: n.type } : {});
|
|
737
|
+
return (e, n) => (F(), x(V(K), O({
|
|
726
738
|
as: t.as,
|
|
727
739
|
"as-child": t.asChild
|
|
728
740
|
}, s.value, {
|
|
729
741
|
class: i.value,
|
|
730
|
-
style:
|
|
731
|
-
onPointermove:
|
|
742
|
+
style: V(a),
|
|
743
|
+
onPointermove: V(o)
|
|
732
744
|
}), {
|
|
733
|
-
default:
|
|
745
|
+
default: G(() => [R(e.$slots, "default")]),
|
|
734
746
|
_: 3
|
|
735
747
|
}, 16, [
|
|
736
748
|
"as",
|
|
@@ -740,7 +752,7 @@ var xe = { key: 1 }, $ = { key: 2 }, Se = /* @__PURE__ */ S({
|
|
|
740
752
|
"onPointermove"
|
|
741
753
|
]));
|
|
742
754
|
}
|
|
743
|
-
}),
|
|
755
|
+
}), Ie = /* @__PURE__ */ E({
|
|
744
756
|
__name: "DockBackgroundToggle",
|
|
745
757
|
props: {
|
|
746
758
|
paused: {
|
|
@@ -752,22 +764,22 @@ var xe = { key: 1 }, $ = { key: 2 }, Se = /* @__PURE__ */ S({
|
|
|
752
764
|
},
|
|
753
765
|
emits: ["update:paused"],
|
|
754
766
|
setup(e, { emit: t }) {
|
|
755
|
-
let n = e, r = t, i =
|
|
767
|
+
let n = e, r = t, i = b(() => n.paused ? n.playLabel : n.pauseLabel);
|
|
756
768
|
function a() {
|
|
757
769
|
r("update:paused", !n.paused);
|
|
758
770
|
}
|
|
759
|
-
return (t, n) => (
|
|
771
|
+
return (t, n) => (F(), x(Fe, {
|
|
760
772
|
type: "button",
|
|
761
773
|
"aria-pressed": e.paused,
|
|
762
774
|
"aria-label": i.value,
|
|
763
775
|
title: i.value,
|
|
764
776
|
onClick: a
|
|
765
777
|
}, {
|
|
766
|
-
default:
|
|
778
|
+
default: G(() => [e.paused ? (F(), x(V(X), {
|
|
767
779
|
key: 0,
|
|
768
780
|
size: 18,
|
|
769
781
|
"aria-hidden": "true"
|
|
770
|
-
})) : (
|
|
782
|
+
})) : (F(), x(V(Y), {
|
|
771
783
|
key: 1,
|
|
772
784
|
size: 18,
|
|
773
785
|
"aria-hidden": "true"
|
|
@@ -779,7 +791,7 @@ var xe = { key: 1 }, $ = { key: 2 }, Se = /* @__PURE__ */ S({
|
|
|
779
791
|
"title"
|
|
780
792
|
]));
|
|
781
793
|
}
|
|
782
|
-
}),
|
|
794
|
+
}), Le = /* @__PURE__ */ E({
|
|
783
795
|
__name: "DockTabButton",
|
|
784
796
|
props: {
|
|
785
797
|
as: { default: "button" },
|
|
@@ -796,13 +808,13 @@ var xe = { key: 1 }, $ = { key: 2 }, Se = /* @__PURE__ */ S({
|
|
|
796
808
|
] }
|
|
797
809
|
},
|
|
798
810
|
setup(t) {
|
|
799
|
-
let n = t, r =
|
|
800
|
-
return (e, n) => (
|
|
811
|
+
let n = t, r = H(), i = b(() => r["data-tier"] === "primary"), a = b(() => e("dock-tab-button", i.value && "btn-audacious", n.class));
|
|
812
|
+
return (e, n) => (F(), x(V(K), {
|
|
801
813
|
as: t.as,
|
|
802
814
|
"as-child": t.asChild,
|
|
803
|
-
class:
|
|
815
|
+
class: A(a.value)
|
|
804
816
|
}, {
|
|
805
|
-
default:
|
|
817
|
+
default: G(() => [R(e.$slots, "default")]),
|
|
806
818
|
_: 3
|
|
807
819
|
}, 8, [
|
|
808
820
|
"as",
|
|
@@ -810,7 +822,7 @@ var xe = { key: 1 }, $ = { key: 2 }, Se = /* @__PURE__ */ S({
|
|
|
810
822
|
"class"
|
|
811
823
|
]));
|
|
812
824
|
}
|
|
813
|
-
}),
|
|
825
|
+
}), Re = /* @__PURE__ */ E({
|
|
814
826
|
__name: "DockSelectTrigger",
|
|
815
827
|
props: {
|
|
816
828
|
disabled: { type: Boolean },
|
|
@@ -826,19 +838,19 @@ var xe = { key: 1 }, $ = { key: 2 }, Se = /* @__PURE__ */ S({
|
|
|
826
838
|
] }
|
|
827
839
|
},
|
|
828
840
|
setup(t) {
|
|
829
|
-
let r = t, i =
|
|
841
|
+
let r = t, i = q(b(() => {
|
|
830
842
|
let { class: e, ...t } = r;
|
|
831
843
|
return t;
|
|
832
844
|
}));
|
|
833
|
-
return (t, a) => (
|
|
834
|
-
default:
|
|
835
|
-
default:
|
|
845
|
+
return (t, a) => (F(), x(V(ae), O(V(i), { class: V(e)("dock-select-trigger", r.class) }), {
|
|
846
|
+
default: G(() => [R(t.$slots, "default"), T(V(ie), { "as-child": "" }, {
|
|
847
|
+
default: G(() => [R(t.$slots, "icon", {}, () => [T(V(n), { class: "dock-select-trigger__chevron" })])]),
|
|
836
848
|
_: 3
|
|
837
849
|
})]),
|
|
838
850
|
_: 3
|
|
839
851
|
}, 16, ["class"]));
|
|
840
852
|
}
|
|
841
|
-
}),
|
|
853
|
+
}), ze = /* @__PURE__ */ E({
|
|
842
854
|
__name: "DockDropdownTrigger",
|
|
843
855
|
props: {
|
|
844
856
|
disabled: { type: Boolean },
|
|
@@ -854,15 +866,15 @@ var xe = { key: 1 }, $ = { key: 2 }, Se = /* @__PURE__ */ S({
|
|
|
854
866
|
] }
|
|
855
867
|
},
|
|
856
868
|
setup(t) {
|
|
857
|
-
let n = t, r =
|
|
869
|
+
let n = t, r = q(b(() => {
|
|
858
870
|
let { class: e, ...t } = n;
|
|
859
871
|
return t;
|
|
860
872
|
}));
|
|
861
|
-
return (t, i) => (
|
|
862
|
-
default:
|
|
873
|
+
return (t, i) => (F(), x(V(re), O(V(r), { class: V(e)("dock-dropdown-trigger", n.class) }), {
|
|
874
|
+
default: G(() => [R(t.$slots, "default")]),
|
|
863
875
|
_: 3
|
|
864
876
|
}, 16, ["class"]));
|
|
865
877
|
}
|
|
866
878
|
});
|
|
867
879
|
//#endregion
|
|
868
|
-
export {
|
|
880
|
+
export { m as DOCK_CONTEXT_KEY, Ie as DockBackgroundToggle, ze as DockDropdownTrigger, Fe as DockIconButton, Pe as DockLayer, Me as DockLayerGroup, Re as DockSelectTrigger, se as DockSeparator, Le as DockTabButton, Te as GlassDock, u as provideDockContext, f as useDockContext, ke as useLayerTransition, l as useOptionalDockContext };
|