@mkbabb/glass-ui 3.7.0 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CardAction-q2qHCJFG.js +157 -0
- package/dist/{CommandShortcut-CY0aQTz5.js → CommandShortcut-SzWRhROC.js} +2 -2
- package/dist/{ContextMenuSubContent-BeDz7G6f.js → ContextMenuSubContent-Do977Cbf.js} +1 -1
- package/dist/{DataTable-gtPOLZvl.js → DataTable-CvlWXz65.js} +3 -3
- package/dist/DeckProgress-AVgbIULY.js +23 -0
- package/dist/{DialogContent-DG1YMR-P.js → DialogContent-DjZWT3lK.js} +2 -2
- package/dist/{DialogFooter-BCIaDP15.js → DialogFooter-Gprw8H_A.js} +1 -1
- package/dist/{DiscoGlyph-ZoBYpoxI.js → DiscoGlyph-CG0F410s.js} +1 -1
- package/dist/{GlyphFace-Ce_oe3tM.js → GlyphFace-DRjDkB0s.js} +1 -1
- package/dist/{HoverPopover-DXpOEw1P.js → HoverPopover-D56O6Ylp.js} +1 -1
- package/dist/{IconTooltip-Cu86JR4e.js → IconTooltip-D2T5nYOM.js} +1 -1
- package/dist/{MetricBadge-D-bRaQUD.js → MetricBadge-lTc002u2.js} +1 -1
- package/dist/{Notification-B5WHP3_1.js → Notification-BxK8LZMw.js} +1 -1
- package/dist/{PopoverContent-F1bWnYoh.js → PopoverContent-BId6ggf_.js} +1 -1
- package/dist/{Progress-c4vo4ALi.js → Progress-iEuD9pxG.js} +4 -4
- package/dist/{ScrollingText-BEp377U5.js → ScrollingText-CVyqxvfv.js} +2 -2
- package/dist/{SelectScrollDownButton-DAo5NmY_.js → SelectScrollDownButton-C7TRe-ep.js} +2 -2
- package/dist/{ToggleGroupItem-C-AIkBUw.js → ToggleGroupItem-CkXUcBlt.js} +1 -1
- package/dist/{UnderlineTabs-D_c1iYo-.js → UnderlineTabs-Uxn-R3MT.js} +2 -2
- package/dist/animated-digit.js +2 -2
- package/dist/api/index.d.ts +4 -2
- package/dist/api.js +1 -1
- package/dist/aurora.js +336 -405
- package/dist/canvas.d.ts +1 -0
- package/dist/canvas.js +3 -0
- package/dist/card.js +1 -1
- package/dist/carousel.js +105 -104
- package/dist/collapsible.js +1 -1
- package/dist/{color-DjJCAQ6f.js → color-DMLTunJK.js} +22 -14
- package/dist/color.js +2 -2
- package/dist/command.js +1 -1
- package/dist/compile-BBTRjvQS.js +158 -0
- package/dist/components/custom/aurora/composables/atoms.d.ts +90 -25
- package/dist/components/custom/aurora/composables/color.d.ts +0 -12
- package/dist/components/custom/aurora/composables/uniformBridge.d.ts +34 -23
- package/dist/components/custom/aurora/constants/presets.d.ts +10 -7
- package/dist/components/custom/aurora/constants/renderMode.d.ts +22 -0
- package/dist/components/custom/aurora/constants/shaders/aurora.wgsl.d.ts +1 -1
- package/dist/components/custom/aurora/constants/shaders/brush.glsl.d.ts +1 -1
- package/dist/components/custom/aurora/constants/shaders/composition.glsl.d.ts +1 -1
- package/dist/components/custom/aurora/constants/shaders/mediums.glsl.d.ts +1 -1
- package/dist/components/custom/aurora/index.d.ts +3 -3
- package/dist/components/custom/constellation/Constellation.vue.d.ts +40 -5
- package/dist/components/custom/constellation/constellationField.d.ts +110 -5
- package/dist/components/custom/constellation/index.d.ts +2 -2
- package/dist/components/custom/dock/GlassDock.vue.d.ts +12 -4
- package/dist/components/custom/dock/composables/dockMorphContext.d.ts +57 -0
- package/dist/components/custom/dock/composables/index.d.ts +3 -0
- package/dist/components/custom/dock/composables/useDockHold.d.ts +61 -0
- package/dist/components/custom/dock/composables/useLayerTransition.d.ts +13 -59
- package/dist/components/custom/dock/index.d.ts +2 -0
- package/dist/components/custom/goo-blob/GooBlob.vue.d.ts +13 -0
- package/dist/components/custom/goo-blob/composables/useBlobMood.d.ts +4 -0
- package/dist/components/custom/goo-blob/composables/useBlobPointer.d.ts +2 -0
- package/dist/components/custom/goo-blob/composables/useBlobSatellites.d.ts +2 -0
- package/dist/components/custom/goo-blob/composables/useMetaballRenderer.d.ts +20 -5
- package/dist/components/custom/goo-blob/index.d.ts +1 -1
- package/dist/components/custom/goo-blob/shaders/sdf-body.glsl.d.ts +1 -1
- package/dist/components/custom/goo-blob/shaders/watercolor-edges.glsl.d.ts +2 -2
- package/dist/components/custom/goo-blob/types.d.ts +8 -0
- package/dist/components/ui/card/Card.vue.d.ts +23 -7
- package/dist/components/ui/card/index.d.ts +1 -1
- package/dist/components/ui/progress/ProgressDefault.vue.d.ts +14 -4
- package/dist/components/ui/slider/Slider.vue.d.ts +3 -1
- package/dist/composables/color/index.d.ts +19 -0
- package/dist/composables/dom/index.d.ts +1 -1
- package/dist/composables/dom/useResolveTokenColor.d.ts +27 -0
- package/dist/composables/glass/canvas2d/index.d.ts +2 -1
- package/dist/composables/glass/canvas2d/resolveCanvasColor.d.ts +20 -0
- package/dist/composables/glass/canvas2d/useCanvas2D.d.ts +15 -1
- package/dist/composables/glass/index.d.ts +3 -1
- package/dist/composables/glass/useSpecularTracking.d.ts +33 -0
- package/dist/composables/glass/webgl/createCanvasLifecycle.d.ts +1 -1
- package/dist/composables/glass/webgl/shaders/procedural-color.glsl.d.ts +4 -0
- package/dist/composables/glass/webgl/useWebGLCanvas.d.ts +1 -1
- package/dist/composables/motion/core/index.d.ts +1 -0
- package/dist/configurator.js +1 -1
- package/dist/confirm-dialog.js +1 -1
- package/dist/constellation.js +144 -75
- package/dist/context-menu.js +2 -2
- package/dist/controls.js +2 -2
- package/dist/dark.js +1 -1
- package/dist/data-table.js +1 -1
- package/dist/deck-progress.d.ts +1 -0
- package/dist/deck-progress.js +2 -0
- package/dist/dialog.js +2 -2
- package/dist/disco-glyph.js +1 -1
- package/dist/dock.js +386 -285
- package/dist/{dockContext-DLgrVWsU.js → dockContext-BKeIMmNk.js} +1 -1
- package/dist/dom.js +6 -6
- package/dist/{dropdown-menu-BWpwutt0.js → dropdown-menu-B_4bWyyG.js} +2 -2
- package/dist/dropdown-menu.js +1 -1
- package/dist/expandable-container.js +1 -1
- package/dist/fonts/README.md +26 -18
- package/dist/forms.js +3 -3
- package/dist/fourier-field.js +37 -37
- package/dist/glass-carousel.js +12 -7
- package/dist/glass-panel.js +7 -7
- package/dist/glass-ui.css +1 -1
- package/dist/glass-ui.js +150 -162
- package/dist/glyph-face.js +2 -2
- package/dist/goo-blob.js +353 -270
- package/dist/header-ribbon.js +1 -1
- package/dist/hover-card.js +1 -1
- package/dist/hover-popover.js +1 -1
- package/dist/icon-tooltip.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/instrument-chassis.js +1 -1
- package/dist/instrument-rail.js +1 -1
- package/dist/keyboard.js +1 -1
- package/dist/{keys-Dyf_uTs5.js → keys-BsYjEFOW.js} +1 -1
- package/dist/label.js +1 -1
- package/dist/labeled-field.js +6 -6
- package/dist/metric-badge.js +1 -1
- package/dist/metric-stack.js +1 -1
- package/dist/motion-core.js +65 -65
- package/dist/motion.js +3 -3
- package/dist/notification.js +1 -1
- package/dist/paper-backdrop.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 +2 -2
- package/dist/resolveCanvasColor-BBiYfp8g.js +11 -0
- package/dist/responsive-tabs.js +2 -2
- package/dist/scrolling-text.js +1 -1
- package/dist/search.js +7 -7
- package/dist/select.js +3 -3
- package/dist/separator.js +1 -1
- package/dist/{sheet-Cv1uO-Gq.js → sheet-VZEtNFvO.js} +2 -2
- package/dist/sheet.js +1 -1
- package/dist/slider-D9puf-Ko.js +142 -0
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +3 -3
- package/dist/styles/components.css +1 -1
- package/dist/styles/dock-controls.css +21 -18
- package/dist/styles/dock.css +415 -224
- package/dist/styles/fonts.css +0 -25
- package/dist/styles/glass.css +100 -41
- package/dist/styles/theme.css +9 -2
- package/dist/styles/tokens.css +139 -32
- package/dist/styles/typography.css +52 -69
- package/dist/styles/utilities.css +2 -1
- package/dist/styles/view-transition.css +12 -40
- package/dist/switch.js +1 -1
- package/dist/tabs.js +5 -5
- package/dist/timeline.js +3 -3
- package/dist/toast.js +1 -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-C_3wZLx4.js} +1 -1
- package/dist/{useCanvas2D-C31yfUGY.js → useCanvas2D-ClrQuZtp.js} +2 -1
- package/dist/{useConfiguratorState-B24TcgIn.js → useConfiguratorState-CMff4GzH.js} +3 -3
- package/dist/useResolveTokenColor-r9pnNjqK.js +24 -0
- package/dist/useSpecularTracking-BVRZsRHA.js +26 -0
- package/dist/{useTextHighlight-aMPdEpkq.js → useTextHighlight-9nMW23Qb.js} +1 -1
- package/dist/{useTouchGate-YQRwyUGU.js → useTouchGate-WFyJYsth.js} +1 -1
- package/dist/vReveal-CqaCz_mC.js +44 -0
- package/dist/watercolor-dot.js +2 -2
- package/package.json +36 -4
- package/src/fonts/README.md +26 -18
- package/src/styles/dock-controls.css +21 -18
- package/src/styles/dock.css +415 -224
- package/src/styles/fonts.css +0 -25
- package/src/styles/glass.css +100 -41
- package/src/styles/theme.css +9 -2
- package/src/styles/tokens.css +139 -32
- package/src/styles/typography.css +52 -69
- package/src/styles/utilities.css +2 -1
- package/src/styles/view-transition.css +12 -40
- package/dist/CardAction-D8nSE62a.js +0 -163
- package/dist/compile-iM4IUB66.js +0 -158
- package/dist/fonts/fraunces/fraunces-latin.woff2 +0 -0
- package/dist/slider-BA9wIs5e.js +0 -130
- package/dist/useViewTransition-DaN5Zrox.js +0 -21
- package/dist/vReveal-BE2TsPoR.js +0 -24
- package/src/fonts/fraunces/fraunces-latin.woff2 +0 -0
- /package/dist/{CollapsibleContent-D7UNsXQr.js → CollapsibleContent-CP9qF1v4.js} +0 -0
- /package/dist/{ContextMenuContent-DGKZX1Du.js → ContextMenuContent-DDa0v27s.js} +0 -0
- /package/dist/{HoverCardContent-Bn0UBMY9.js → HoverCardContent-B6CcQ8He.js} +0 -0
- /package/dist/{Input-DWQQIOC4.js → Input-DVG_J0ne.js} +0 -0
- /package/dist/{InstrumentChassis-BLJBl1BW.js → InstrumentChassis-C2f6cBaQ.js} +0 -0
- /package/dist/{InstrumentRail-BElFwKyt.js → InstrumentRail-CUJ05YVG.js} +0 -0
- /package/dist/{Label-DBc7bKzZ.js → Label-zRfbQdCn.js} +0 -0
- /package/dist/{ModalOverlay-D1VrWyoi.js → ModalOverlay-B1GkAjNb.js} +0 -0
- /package/dist/{PaperBackdrop-DCGoGatv.js → PaperBackdrop-CqwjnfLv.js} +0 -0
- /package/dist/{SelectGroup-BcaFjvP4.js → SelectGroup-BFiod7X2.js} +0 -0
- /package/dist/{SelectSeparator-COFMJGng.js → SelectSeparator-L8pPEn4L.js} +0 -0
- /package/dist/{Separator-DZyqsCum.js → Separator-D7sD7RKj.js} +0 -0
- /package/dist/{Switch-2rsAtDfA.js → Switch-LDKLmmgx.js} +0 -0
- /package/dist/{TabsList-COqIdW7i.js → TabsList-qyHZ2lKY.js} +0 -0
- /package/dist/{Toaster-BMaeziJJ.js → Toaster-CabYEEF_.js} +0 -0
- /package/dist/{TooltipProvider-CD2IXfRv.js → TooltipProvider-CmZzCuaG.js} +0 -0
- /package/dist/{_plugin-vue_export-helper-gLzyemvl.js → _plugin-vue_export-helper-ok8pgSl5.js} +0 -0
- /package/dist/composables/{dom → motion}/useTextHighlight.d.ts +0 -0
- /package/dist/{constants-CS75AWHG.js → constants-BPOqYJAm.js} +0 -0
- /package/dist/{createContext-CvNyBk4o.js → createContext-B44Sah_H.js} +0 -0
- /package/dist/{menuItemVariants-B4eFR5Ix.js → menuItemVariants-DKM85SNE.js} +0 -0
- /package/dist/{presets-BKVyQfbt.js → presets-D1XPuTj-.js} +0 -0
- /package/dist/{prng-wHuHlNHE.js → prng-COGhh02-.js} +0 -0
- /package/dist/{useGlassRenderer-HebgSEgN.js → useGlassRenderer-5I0YkI4t.js} +0 -0
- /package/dist/{useGlobalDark-yhL4Wp-s.js → useGlobalDark-D3EBWzXK.js} +0 -0
- /package/dist/{useIntersectionPause-Cc-H9ees.js → useIntersectionPause-Bj4sPkMh.js} +0 -0
- /package/dist/{useInterval-D3USn0yc.js → useInterval-CcLfq2WU.js} +0 -0
- /package/dist/{useKeyboardShortcuts-Be3w_Rwk.js → useKeyboardShortcuts-BXWXOZ-9.js} +0 -0
- /package/dist/{useResizeObserver-CSyxGxIX.js → useResizeObserver-CWCbk5Px.js} +0 -0
- /package/dist/{useScrollProgress-CAH8Ofwt.js → useScrollProgress-C9ysDic5.js} +0 -0
- /package/dist/{useSortable-C8ReQ50P.js → useSortable-MGAbCGVJ.js} +0 -0
- /package/dist/{useSpringMount-LRZqJTaF.js → useSpringMount-BJSHcLl3.js} +0 -0
- /package/dist/{useTimer-DEJonOZa.js → useTimer-3xqf_54b.js} +0 -0
- /package/dist/{useUserInvalidAria-CQKjEfwP.js → useUserInvalidAria-DoJKMZ3s.js} +0 -0
- /package/dist/{useViewportReady-K96m-Mdv.js → useViewportReady-RIr5Wgkh.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 "./
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { i as
|
|
8
|
-
import {
|
|
9
|
-
import { Fragment as
|
|
10
|
-
import { DropdownMenuTrigger as U, Primitive as W, SelectIcon as G, SelectTrigger as
|
|
11
|
-
import { SpringProgress as
|
|
12
|
-
var
|
|
4
|
+
import { t as r } from "./useSpecularTracking-BVRZsRHA.js";
|
|
5
|
+
import { t as i } from "./useTouchGate-WFyJYsth.js";
|
|
6
|
+
import { n as a, t as o } from "./createContext-B44Sah_H.js";
|
|
7
|
+
import { i as s, n as c, r as l, t as u } from "./dockContext-BKeIMmNk.js";
|
|
8
|
+
import { i as d, n as f, r as p, t as m } from "./TabsList-qyHZ2lKY.js";
|
|
9
|
+
import { Fragment as h, computed as g, createBlock as _, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createVNode as x, defineComponent as S, mergeModels as C, mergeProps as w, nextTick as T, normalizeClass as E, normalizeStyle as D, onBeforeUnmount as O, onMounted as k, onUnmounted as A, openBlock as j, readonly as M, ref as N, renderList as P, renderSlot as F, resolveDynamicComponent as I, toDisplayString as L, unref as R, useAttrs as z, useId as ee, useModel as te, useTemplateRef as B, watch as V, withCtx as H } from "vue";
|
|
10
|
+
import { DropdownMenuTrigger as U, Primitive as W, SelectIcon as G, SelectTrigger as ne, useForwardProps as K } from "reka-ui";
|
|
11
|
+
import { SpringProgress as q } from "@mkbabb/keyframes.js";
|
|
12
|
+
var J = t("pause", [["rect", {
|
|
13
13
|
x: "14",
|
|
14
14
|
y: "3",
|
|
15
15
|
width: "5",
|
|
@@ -23,7 +23,7 @@ var ne = t("pause", [["rect", {
|
|
|
23
23
|
height: "18",
|
|
24
24
|
rx: "1",
|
|
25
25
|
key: "1wsw3u"
|
|
26
|
-
}]]),
|
|
26
|
+
}]]), re = 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
|
}]]);
|
|
@@ -36,8 +36,8 @@ function Y(e, t) {
|
|
|
36
36
|
}
|
|
37
37
|
//#endregion
|
|
38
38
|
//#region src/components/custom/dock/composables/useDockState.ts
|
|
39
|
-
function
|
|
40
|
-
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 =
|
|
39
|
+
function ie(e) {
|
|
40
|
+
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 = N(c ? "pinned" : "collapsed"), u = N(c), d = N(c), f = null, p = N(0), m = g(() => p.value > 0), h = null, _ = null, v = !1, y = l.value;
|
|
41
41
|
function b() {
|
|
42
42
|
s() && (l.value = "pinned"), u.value = l.value !== "collapsed", d.value = l.value === "pinned", o && y !== l.value && o(l.value, y), y = l.value;
|
|
43
43
|
}
|
|
@@ -48,7 +48,7 @@ function re(e) {
|
|
|
48
48
|
_ !== null && (cancelAnimationFrame(_), _ = null);
|
|
49
49
|
}
|
|
50
50
|
function C() {
|
|
51
|
-
S(),
|
|
51
|
+
S(), h?.();
|
|
52
52
|
}
|
|
53
53
|
function w() {
|
|
54
54
|
s() || p.value > 0 || (x(), f = setTimeout(() => {
|
|
@@ -78,7 +78,7 @@ function re(e) {
|
|
|
78
78
|
function O() {
|
|
79
79
|
s() || (x(), l.value === "collapsed" && (l.value = "hover", b()));
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function k(e) {
|
|
82
82
|
if (!s() && l.value === "hover") {
|
|
83
83
|
if (p.value > 0) return;
|
|
84
84
|
if (e) {
|
|
@@ -91,7 +91,7 @@ function re(e) {
|
|
|
91
91
|
function j() {
|
|
92
92
|
s() || (x(), l.value === "collapsed" && (l.value = "hover", b()));
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function M(e) {
|
|
95
95
|
if (s() || l.value !== "hover" || p.value > 0) return;
|
|
96
96
|
let t = e.currentTarget;
|
|
97
97
|
e.relatedTarget && t.contains(e.relatedTarget) || Y(e.relatedTarget, a) || w();
|
|
@@ -118,8 +118,8 @@ function re(e) {
|
|
|
118
118
|
}
|
|
119
119
|
return V(u, (e) => {
|
|
120
120
|
e ? (C(), _ = requestAnimationFrame(() => {
|
|
121
|
-
_ = null, u.value && (document.addEventListener("pointerdown", L, !0),
|
|
122
|
-
document.removeEventListener("pointerdown", L, !0),
|
|
121
|
+
_ = null, u.value && (document.addEventListener("pointerdown", L, !0), h = () => {
|
|
122
|
+
document.removeEventListener("pointerdown", L, !0), h = null;
|
|
123
123
|
});
|
|
124
124
|
})) : C();
|
|
125
125
|
}), typeof r == "boolean" ? r && (l.value = "pinned", b()) : V(r, (e) => {
|
|
@@ -128,7 +128,7 @@ function re(e) {
|
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
130
130
|
l.value = "collapsed", b();
|
|
131
|
-
}, { immediate: !0 }),
|
|
131
|
+
}, { immediate: !0 }), A(() => {
|
|
132
132
|
x(), C();
|
|
133
133
|
}), {
|
|
134
134
|
state: l,
|
|
@@ -136,9 +136,9 @@ function re(e) {
|
|
|
136
136
|
isPinned: d,
|
|
137
137
|
isHeld: m,
|
|
138
138
|
onMouseEnter: O,
|
|
139
|
-
onMouseLeave:
|
|
139
|
+
onMouseLeave: k,
|
|
140
140
|
onFocusIn: j,
|
|
141
|
-
onFocusOut:
|
|
141
|
+
onFocusOut: M,
|
|
142
142
|
onClickCollapsed: P,
|
|
143
143
|
keepOpen: F,
|
|
144
144
|
release: I,
|
|
@@ -147,131 +147,165 @@ function re(e) {
|
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
149
|
//#endregion
|
|
150
|
-
//#region src/components/custom/dock/composables/
|
|
150
|
+
//#region src/components/custom/dock/composables/dockMorphContext.ts
|
|
151
151
|
var X = {
|
|
152
152
|
response: .32,
|
|
153
153
|
dampingFraction: .7
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
function v(e) {
|
|
165
|
-
let t = getComputedStyle(e), n = t.transitionProperty.split(",").map((e) => e.trim()), r = t.transitionDuration.split(",").map(_), i = t.transitionDelay.split(",").map(_), a = r.map((e, t) => {
|
|
166
|
-
let r = n[t] ?? n[0] ?? "all";
|
|
167
|
-
return r !== "all" && r !== o.value ? 0 : e + (i[t] ?? i[0] ?? 0);
|
|
168
|
-
});
|
|
169
|
-
return Math.max(0, ...a) + 50;
|
|
170
|
-
}
|
|
171
|
-
function y() {
|
|
172
|
-
d &&= (clearTimeout(d), null);
|
|
173
|
-
}
|
|
174
|
-
function b(e, t) {
|
|
175
|
-
e.style.setProperty(o.value, t);
|
|
176
|
-
}
|
|
177
|
-
function x(e) {
|
|
178
|
-
e.style.removeProperty(o.value);
|
|
154
|
+
}, Z = o("glass-ui:dock-morph-context");
|
|
155
|
+
Z.KEY;
|
|
156
|
+
function ae(e) {
|
|
157
|
+
Z.provide(e);
|
|
158
|
+
}
|
|
159
|
+
var oe = Z.use;
|
|
160
|
+
function se(e) {
|
|
161
|
+
let { rootEl: t, outerEl: n, outerActiveLayer: r, outerAxis: i } = e, a = null, o = /* @__PURE__ */ new Set();
|
|
162
|
+
function s() {
|
|
163
|
+
return t.value;
|
|
179
164
|
}
|
|
180
|
-
function
|
|
181
|
-
|
|
165
|
+
function c() {
|
|
166
|
+
a &&= (a.dispose(), null);
|
|
182
167
|
}
|
|
183
|
-
function
|
|
184
|
-
e
|
|
168
|
+
function l(e) {
|
|
169
|
+
return e === "vertical" ? "height" : "width";
|
|
185
170
|
}
|
|
186
|
-
function
|
|
187
|
-
return e
|
|
171
|
+
function u(e) {
|
|
172
|
+
return l(e) === "width" ? "inline-size" : "block-size";
|
|
188
173
|
}
|
|
189
|
-
function
|
|
190
|
-
|
|
174
|
+
function d(e, t) {
|
|
175
|
+
return e.getBoundingClientRect()[l(t)];
|
|
191
176
|
}
|
|
192
|
-
function
|
|
193
|
-
|
|
177
|
+
function f(e) {
|
|
178
|
+
e.style.removeProperty("--dock-morph-from"), e.style.removeProperty("--dock-morph-to");
|
|
194
179
|
}
|
|
195
|
-
function
|
|
196
|
-
let
|
|
197
|
-
|
|
180
|
+
function p() {
|
|
181
|
+
for (let e of o) {
|
|
182
|
+
let t = e.containerEl.value;
|
|
183
|
+
if (t && t.style.getPropertyValue("--dock-morph-to")) return !0;
|
|
184
|
+
}
|
|
185
|
+
return !1;
|
|
198
186
|
}
|
|
199
|
-
function
|
|
200
|
-
|
|
187
|
+
function m(e) {
|
|
188
|
+
let t = e.containerEl.value;
|
|
189
|
+
t && f(t), e.leavingLayer.value = null;
|
|
201
190
|
}
|
|
202
|
-
function
|
|
203
|
-
|
|
191
|
+
function h() {
|
|
192
|
+
if (p()) return;
|
|
193
|
+
let e = s();
|
|
194
|
+
e && (e.style.removeProperty("--dock-morph-t"), e.removeAttribute("data-morphing")), c();
|
|
204
195
|
}
|
|
205
|
-
|
|
206
|
-
if (
|
|
207
|
-
let
|
|
208
|
-
if (!
|
|
209
|
-
c
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
let t = ++u;
|
|
215
|
-
E(r);
|
|
216
|
-
let a = i?.(n, e), { finished: o } = p(() => {
|
|
217
|
-
l.value = n, c.value = e;
|
|
218
|
-
}, a && a.length > 0 ? { types: a } : void 0);
|
|
219
|
-
o.finally(() => {
|
|
220
|
-
t === u && (l.value = null, D(r));
|
|
196
|
+
function g() {
|
|
197
|
+
if (!s()) return;
|
|
198
|
+
let e = a !== null && !a.settled ? a.velocity : 0;
|
|
199
|
+
if (!a || a.settled) {
|
|
200
|
+
c(), a = new q({
|
|
201
|
+
response: X.response,
|
|
202
|
+
dampingFraction: X.dampingFraction,
|
|
203
|
+
initial: 0,
|
|
204
|
+
respectReducedMotion: !0
|
|
221
205
|
});
|
|
222
|
-
|
|
206
|
+
let t = a;
|
|
207
|
+
t.reset(0, e), t.target = 1, t.play((e) => {
|
|
208
|
+
let n = s();
|
|
209
|
+
if (n && n.style.setProperty("--dock-morph-t", `${e}`), t.settled) {
|
|
210
|
+
for (let e of o) {
|
|
211
|
+
let t = e.containerEl.value;
|
|
212
|
+
t && t.style.getPropertyValue("--dock-morph-to") && m(e);
|
|
213
|
+
}
|
|
214
|
+
h();
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
} else a.reset(0, e), a.target = 1;
|
|
218
|
+
}
|
|
219
|
+
function _(e, t, n, r) {
|
|
220
|
+
if (t !== e.txId) return;
|
|
221
|
+
let i = e.containerEl.value, a = s();
|
|
222
|
+
if (!(!i || !a)) {
|
|
223
|
+
if (Math.abs(r - n) < .5) {
|
|
224
|
+
m(e), h();
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
i.style.setProperty("--dock-morph-from", `${n}px`), i.style.setProperty("--dock-morph-to", `${r}px`), a.setAttribute("data-morphing", ""), g();
|
|
223
228
|
}
|
|
224
|
-
|
|
225
|
-
|
|
229
|
+
}
|
|
230
|
+
function v(e, t, n) {
|
|
231
|
+
if (t === n) return;
|
|
232
|
+
let r = e.containerEl.value, i = s();
|
|
233
|
+
if (!r || !i) {
|
|
234
|
+
e.currentLayer.value = t, e.leavingLayer.value = null;
|
|
226
235
|
return;
|
|
227
236
|
}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
let
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
let a = f;
|
|
248
|
-
a.target = t, a.play((e) => {
|
|
249
|
-
o === u && (b(r, `${e}px`), Math.abs(i) > .5 ? O(r, (e - _) / i) : O(r, 1), a.settled && (r.style.transition = "", x(r), C(r), D(r), j(r), l.value = null, g()));
|
|
250
|
-
}), d = setTimeout(() => {
|
|
251
|
-
o === u && (r.style.transition = "", x(r), C(r), D(r), j(r), l.value = null, g());
|
|
252
|
-
}, v(r));
|
|
253
|
-
});
|
|
237
|
+
let a = ++e.txId, c = e.axis.value, l = d(r, c);
|
|
238
|
+
e.leavingLayer.value = n, e.currentLayer.value = t;
|
|
239
|
+
for (let t of o) {
|
|
240
|
+
if (t === e) continue;
|
|
241
|
+
let n = t.containerEl.value;
|
|
242
|
+
if (n && n.style.getPropertyValue("--dock-morph-to")) {
|
|
243
|
+
let e = d(n, t.axis.value);
|
|
244
|
+
n.style.setProperty("--dock-morph-from", `${e}px`);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
r.style.setProperty("--dock-morph-from", `${l}px`), r.style.setProperty("--dock-morph-to", `${l}px`), i.style.setProperty("--dock-morph-t", "0"), i.setAttribute("data-morphing", ""), requestAnimationFrame(() => {
|
|
248
|
+
if (a !== e.txId) return;
|
|
249
|
+
let t = e.containerEl.value, n = s();
|
|
250
|
+
if (!t || !n) return;
|
|
251
|
+
f(t);
|
|
252
|
+
let r = u(c);
|
|
253
|
+
t.style.setProperty(r, "max-content");
|
|
254
|
+
let i = d(t, c);
|
|
255
|
+
t.style.removeProperty(r), _(e, a, l, i);
|
|
254
256
|
});
|
|
255
|
-
});
|
|
256
|
-
function N(e) {
|
|
257
|
-
let n = t.value;
|
|
258
|
-
n && e.target === n && e.propertyName === o.value && (y(), g(), n.style.transition = "", x(n), C(n), D(n), j(n), l.value = null);
|
|
259
257
|
}
|
|
260
|
-
|
|
261
|
-
|
|
258
|
+
function y(e) {
|
|
259
|
+
let t = {
|
|
260
|
+
containerEl: e.containerEl,
|
|
261
|
+
activeLayer: e.activeLayer,
|
|
262
|
+
axis: e.axis,
|
|
263
|
+
currentLayer: N(e.activeLayer.value),
|
|
264
|
+
leavingLayer: N(null),
|
|
265
|
+
txId: 0,
|
|
266
|
+
stop: () => {}
|
|
267
|
+
};
|
|
268
|
+
return t.stop = V(e.activeLayer, (e, n) => {
|
|
269
|
+
v(t, e, n);
|
|
270
|
+
}), o.add(t), t;
|
|
271
|
+
}
|
|
272
|
+
function b(e) {
|
|
273
|
+
e.stop(), o.delete(e), h();
|
|
274
|
+
}
|
|
275
|
+
let x = y({
|
|
276
|
+
containerEl: n,
|
|
277
|
+
activeLayer: r,
|
|
278
|
+
axis: i
|
|
279
|
+
}), S = { registerGroup(e) {
|
|
280
|
+
let t = y(e);
|
|
281
|
+
return {
|
|
282
|
+
currentLayer: M(t.currentLayer),
|
|
283
|
+
leavingLayer: M(t.leavingLayer),
|
|
284
|
+
release: () => b(t)
|
|
285
|
+
};
|
|
286
|
+
} };
|
|
287
|
+
function C(e) {
|
|
288
|
+
let t = n.value;
|
|
289
|
+
if (!t || e.target !== t) return;
|
|
290
|
+
let r = u(i.value);
|
|
291
|
+
e.propertyName !== r && e.propertyName !== l(i.value) || a && a.settled && (m(x), h());
|
|
292
|
+
}
|
|
293
|
+
return A(() => {
|
|
294
|
+
for (let e of o) e.stop();
|
|
295
|
+
o.clear(), c();
|
|
262
296
|
}), {
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
297
|
+
context: S,
|
|
298
|
+
outerCurrentLayer: M(x.currentLayer),
|
|
299
|
+
onOuterTransitionEnd: C
|
|
266
300
|
};
|
|
267
301
|
}
|
|
268
302
|
//#endregion
|
|
269
303
|
//#region src/components/custom/dock/GlassDock.vue?vue&type=script&setup=true&lang.ts
|
|
270
|
-
var
|
|
304
|
+
var ce = [
|
|
271
305
|
"data-density",
|
|
272
306
|
"data-held",
|
|
273
307
|
"data-container-name"
|
|
274
|
-
],
|
|
308
|
+
], le = ["inert"], ue = ["inert"], Q = /* @__PURE__ */ S({
|
|
275
309
|
__name: "GlassDock",
|
|
276
310
|
props: {
|
|
277
311
|
collapseDelay: { default: 2e3 },
|
|
@@ -297,154 +331,220 @@ var ae = [
|
|
|
297
331
|
containerName: {}
|
|
298
332
|
},
|
|
299
333
|
setup(e, { expose: t }) {
|
|
300
|
-
let n = e,
|
|
334
|
+
let n = e, r = g(() => {
|
|
301
335
|
if (n.containerName) return {
|
|
302
336
|
"container-type": "inline-size",
|
|
303
337
|
"container-name": n.containerName
|
|
304
338
|
};
|
|
305
|
-
}), a = B("dockEl"),
|
|
339
|
+
}), a = B("dockEl"), o = B("layersEl"), s = g(() => n.variant), l = g(() => n.shape), u = g(() => n.layout), d = g(() => n.variant === "rail" || n.variant === "instrument-strip" ? "vertical" : n.orientation), f = g(() => n.density), p = g(() => n.overflow === "scroll" ? d.value === "vertical" ? "dock-scroll-y" : "dock-scroll-x" : null), m = g(() => n.alwaysExpanded || d.value === "vertical" || n.layout === "grid"), h = g(() => n.fitContent || n.variant === "rail" || n.variant === "instrument-strip"), _ = N(!1), v = i(n.collapseDelay), x = `glass-dock-${ee()}`, S = null, C = 0, { expanded: w, isPinned: T, isHeld: A, onMouseEnter: M, onMouseLeave: P, onFocusIn: I, onFocusOut: L, onClickCollapsed: z, keepOpen: te, release: H, expand: U, collapse: W } = ie({
|
|
306
340
|
collapseDelay: n.collapseDelay,
|
|
307
341
|
rootEl: a,
|
|
308
342
|
alwaysExpanded: m,
|
|
309
343
|
isTransitioning: _,
|
|
310
344
|
dockId: x
|
|
311
345
|
});
|
|
312
|
-
|
|
346
|
+
c({
|
|
313
347
|
id: x,
|
|
314
348
|
orientation: d,
|
|
315
|
-
keepOpen:
|
|
316
|
-
release:
|
|
317
|
-
held:
|
|
349
|
+
keepOpen: te,
|
|
350
|
+
release: H,
|
|
351
|
+
held: A
|
|
318
352
|
});
|
|
319
|
-
let
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
})
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
} : void 0);
|
|
353
|
+
let G = g(() => m.value || w.value), { context: ne, onOuterTransitionEnd: K } = se({
|
|
354
|
+
rootEl: a,
|
|
355
|
+
outerEl: o,
|
|
356
|
+
outerActiveLayer: g(() => G.value ? "full" : "summary"),
|
|
357
|
+
outerAxis: g(() => "horizontal")
|
|
358
|
+
});
|
|
359
|
+
ae(ne);
|
|
360
|
+
let q = g(() => ({ "view-transition-name": x.replace(/[^a-zA-Z0-9_-]/g, "-") }));
|
|
328
361
|
function J(e) {
|
|
329
362
|
let t = e.trim();
|
|
330
363
|
return t ? t.endsWith("ms") ? Number.parseFloat(t) : t.endsWith("s") ? Number.parseFloat(t) * 1e3 : Number.parseFloat(t) || 0 : 0;
|
|
331
364
|
}
|
|
332
|
-
function
|
|
365
|
+
function re(e) {
|
|
333
366
|
let t = getComputedStyle(e), n = t.transitionDuration.split(",").map(J), r = t.transitionDelay.split(",").map(J);
|
|
334
367
|
return Math.max(0, ...n.map((e, t) => e + (r[t] ?? r[0] ?? 0)));
|
|
335
368
|
}
|
|
369
|
+
function Y(e) {
|
|
370
|
+
let t = J(getComputedStyle(e).getPropertyValue("--duration-normal") || "0.3s");
|
|
371
|
+
return Math.max(t > 0 ? t * 2 : 0, 600);
|
|
372
|
+
}
|
|
336
373
|
function X() {
|
|
337
374
|
S &&= (clearTimeout(S), null);
|
|
338
375
|
}
|
|
339
|
-
let
|
|
376
|
+
let Z = new Set([
|
|
340
377
|
"width",
|
|
341
378
|
"height",
|
|
342
379
|
"padding",
|
|
343
380
|
"transform"
|
|
344
381
|
]);
|
|
345
|
-
function
|
|
382
|
+
function oe() {
|
|
346
383
|
let e = a.value;
|
|
347
384
|
if (!e) return;
|
|
348
385
|
let t = ++C;
|
|
349
386
|
X(), _.value = !0, S = setTimeout(() => {
|
|
350
387
|
t === C && (_.value = !1, S = null);
|
|
351
|
-
}, Y(e) + 50);
|
|
388
|
+
}, Math.max(re(e), Y(e)) + 50);
|
|
352
389
|
}
|
|
353
390
|
function Q(e) {
|
|
354
|
-
e.target === a.value &&
|
|
391
|
+
e.target === a.value && Z.has(e.propertyName) && (X(), C++, _.value = !1);
|
|
355
392
|
}
|
|
356
|
-
|
|
357
|
-
(n.alwaysExpanded || !n.startCollapsed) &&
|
|
393
|
+
k(() => {
|
|
394
|
+
(n.alwaysExpanded || !n.startCollapsed) && U();
|
|
358
395
|
});
|
|
359
396
|
function $() {
|
|
360
397
|
return d.value === "horizontal" && !m.value;
|
|
361
398
|
}
|
|
362
|
-
function
|
|
363
|
-
if (!$() ||
|
|
399
|
+
function de(e) {
|
|
400
|
+
if (!$() || G.value) return;
|
|
364
401
|
let t = a.value, n = e.touches[0];
|
|
365
|
-
!t || !n ||
|
|
402
|
+
!t || !n || v.handleTouchStart(t, n.clientY);
|
|
366
403
|
}
|
|
367
|
-
function
|
|
368
|
-
$() &&
|
|
404
|
+
function fe(e) {
|
|
405
|
+
$() && v.handleScrollCheck(e);
|
|
369
406
|
}
|
|
370
|
-
function
|
|
407
|
+
function pe() {
|
|
371
408
|
if (!$()) return;
|
|
372
|
-
let e =
|
|
373
|
-
|
|
409
|
+
let e = v.isActive.value;
|
|
410
|
+
v.handleTouchEnd(), !e && v.isActive.value && !G.value && U();
|
|
374
411
|
}
|
|
375
|
-
return V(
|
|
376
|
-
!e && w.value && !
|
|
377
|
-
}), V(
|
|
378
|
-
|
|
379
|
-
}),
|
|
412
|
+
return V(v.isActive, (e) => {
|
|
413
|
+
!e && w.value && !T.value && !m.value && W();
|
|
414
|
+
}), V(G, (e) => {
|
|
415
|
+
oe(), e || v.deactivate();
|
|
416
|
+
}), O(X), t({
|
|
380
417
|
expanded: w,
|
|
381
|
-
isPinned:
|
|
382
|
-
isHeld:
|
|
418
|
+
isPinned: T,
|
|
419
|
+
isHeld: A,
|
|
383
420
|
isTransitioning: _,
|
|
384
|
-
expand:
|
|
385
|
-
collapse:
|
|
386
|
-
keepOpen:
|
|
387
|
-
release:
|
|
388
|
-
}), (t, n) => (
|
|
421
|
+
expand: U,
|
|
422
|
+
collapse: W,
|
|
423
|
+
keepOpen: te,
|
|
424
|
+
release: H
|
|
425
|
+
}), (t, n) => (j(), y("div", {
|
|
389
426
|
ref_key: "dockEl",
|
|
390
427
|
ref: a,
|
|
391
|
-
class:
|
|
428
|
+
class: E(["glass-dock", [
|
|
392
429
|
d.value,
|
|
393
|
-
`variant-${
|
|
430
|
+
`variant-${s.value}`,
|
|
394
431
|
`shape-${l.value}`,
|
|
395
432
|
`layout-${u.value}`,
|
|
396
433
|
p.value,
|
|
397
434
|
{
|
|
398
|
-
expanded:
|
|
399
|
-
collapsed: !
|
|
400
|
-
pinned:
|
|
401
|
-
"fit-content":
|
|
435
|
+
expanded: G.value,
|
|
436
|
+
collapsed: !G.value,
|
|
437
|
+
pinned: R(T),
|
|
438
|
+
"fit-content": h.value,
|
|
402
439
|
"always-expanded": m.value,
|
|
403
|
-
"dock-overflow-wrap": e.overflow === "wrap"
|
|
440
|
+
"dock-overflow-wrap": e.overflow === "wrap" && d.value !== "vertical"
|
|
404
441
|
},
|
|
405
442
|
e.position === "fixed" ? "fixed bottom-[var(--dock-pos)] left-1/2 -translate-x-1/2" : e.position === "sticky" ? "dock-sticky" : "dock-inline"
|
|
406
443
|
]]),
|
|
407
444
|
"data-density": f.value,
|
|
408
|
-
"data-held":
|
|
445
|
+
"data-held": R(A) || void 0,
|
|
409
446
|
"data-container-name": e.containerName || void 0,
|
|
410
|
-
style:
|
|
411
|
-
onMouseenter: n[2] ||= (...e) =>
|
|
412
|
-
onMouseleave: n[3] ||= (e) =>
|
|
413
|
-
onFocusin: n[4] ||= (...e) =>
|
|
414
|
-
onFocusout: n[5] ||= (...e) => L
|
|
415
|
-
onTouchstart:
|
|
416
|
-
onTouchmove:
|
|
417
|
-
onTouchend:
|
|
447
|
+
style: D([r.value, q.value]),
|
|
448
|
+
onMouseenter: n[2] ||= (...e) => R(M) && R(M)(...e),
|
|
449
|
+
onMouseleave: n[3] ||= (e) => R(P)(e),
|
|
450
|
+
onFocusin: n[4] ||= (...e) => R(I) && R(I)(...e),
|
|
451
|
+
onFocusout: n[5] ||= (...e) => R(L) && R(L)(...e),
|
|
452
|
+
onTouchstart: de,
|
|
453
|
+
onTouchmove: fe,
|
|
454
|
+
onTouchend: pe,
|
|
418
455
|
onTransitionend: Q,
|
|
419
456
|
onTransitioncancel: Q
|
|
420
|
-
}, [d.value === "horizontal" ? (
|
|
457
|
+
}, [d.value === "horizontal" ? (j(), y("div", {
|
|
421
458
|
key: 0,
|
|
422
459
|
ref_key: "layersEl",
|
|
423
|
-
ref:
|
|
460
|
+
ref: o,
|
|
424
461
|
class: "dock-layers",
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
462
|
+
onTransitionend: n[1] ||= (...e) => R(K) && R(K)(...e)
|
|
463
|
+
}, [b("div", {
|
|
464
|
+
class: E(["dock-layer dock-layer--full", { "is-active": G.value }]),
|
|
465
|
+
inert: !R(w) || void 0
|
|
466
|
+
}, [F(t.$slots, "default")], 10, le), b("div", {
|
|
467
|
+
class: E(["dock-layer dock-layer--summary", { "is-active": !G.value }]),
|
|
468
|
+
inert: R(w) || void 0,
|
|
469
|
+
onClick: n[0] ||= (...e) => R(z) && R(z)(...e)
|
|
470
|
+
}, [F(t.$slots, "collapsed")], 10, ue)], 544)) : F(t.$slots, "default", { key: 1 })], 46, ce));
|
|
471
|
+
}
|
|
472
|
+
}), $ = a("glass-ui:dock-layer-group", "[glass-ui:dock] <DockLayer> must be used inside <DockLayerGroup>");
|
|
473
|
+
$.KEY;
|
|
474
|
+
function de(e) {
|
|
475
|
+
$.provide(e);
|
|
476
|
+
}
|
|
477
|
+
var fe = $.use;
|
|
478
|
+
$.useOptional;
|
|
479
|
+
//#endregion
|
|
480
|
+
//#region src/components/custom/dock/composables/useLayerTransition.ts
|
|
481
|
+
var pe = {
|
|
482
|
+
response: .32,
|
|
483
|
+
dampingFraction: .7
|
|
484
|
+
};
|
|
485
|
+
function me(e) {
|
|
486
|
+
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 = N(n.value), c = N(null), l = 0, u = null, d = null;
|
|
487
|
+
function f() {
|
|
488
|
+
u &&= (u.dispose(), null), d = null;
|
|
489
|
+
}
|
|
490
|
+
function p(e) {
|
|
491
|
+
return e.closest(".glass-dock") ?? e;
|
|
492
|
+
}
|
|
493
|
+
function m(e) {
|
|
494
|
+
e.style.removeProperty("--dock-morph-from"), e.style.removeProperty("--dock-morph-to");
|
|
495
|
+
}
|
|
496
|
+
function h(e, t) {
|
|
497
|
+
m(e), t.style.removeProperty("--dock-morph-t"), t.removeAttribute("data-morphing"), c.value = null, f();
|
|
498
|
+
}
|
|
499
|
+
function _(e, t, n, r, i, a, o) {
|
|
500
|
+
if (Math.abs(i - r) < .5) {
|
|
501
|
+
h(e, t);
|
|
502
|
+
return;
|
|
503
|
+
}
|
|
504
|
+
e.style.setProperty("--dock-morph-from", `${r}px`), e.style.setProperty("--dock-morph-to", `${i}px`), t.style.setProperty("--dock-morph-t", "0"), t.setAttribute("data-morphing", ""), o || (f(), u = new q({
|
|
505
|
+
response: pe.response,
|
|
506
|
+
dampingFraction: pe.dampingFraction,
|
|
507
|
+
initial: 0,
|
|
508
|
+
respectReducedMotion: !0
|
|
509
|
+
}), d = e);
|
|
510
|
+
let s = u;
|
|
511
|
+
s.reset(0, a), s.target = 1, s.play((r) => {
|
|
512
|
+
n === l && (t.style.setProperty("--dock-morph-t", `${r}`), s.settled && h(e, t));
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
V(n, (e, n) => {
|
|
516
|
+
if (e === n) return;
|
|
517
|
+
let r = t.value;
|
|
518
|
+
if (!r) {
|
|
519
|
+
s.value = e, c.value = null;
|
|
520
|
+
return;
|
|
521
|
+
}
|
|
522
|
+
let i = p(r), f = ++l, h = u !== null && d === r && !u.settled ? u : null, g = h ? h.velocity : 0, v = o(r);
|
|
523
|
+
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(() => {
|
|
524
|
+
if (f !== l) return;
|
|
525
|
+
let e = t.value;
|
|
526
|
+
if (!e) return;
|
|
527
|
+
let n = p(e);
|
|
528
|
+
m(e), n.style.removeProperty("--dock-morph-t"), e.style.setProperty(a.value, "max-content");
|
|
529
|
+
let r = o(e);
|
|
530
|
+
e.style.removeProperty(a.value), _(e, n, f, v, r, g, h);
|
|
531
|
+
});
|
|
532
|
+
});
|
|
533
|
+
function v(e) {
|
|
534
|
+
let n = t.value;
|
|
535
|
+
n && e.target === n && (e.propertyName !== a.value && e.propertyName !== i.value || u && u.settled && h(n, p(n)));
|
|
536
|
+
}
|
|
537
|
+
return A(f), {
|
|
538
|
+
onTransitionEnd: v,
|
|
539
|
+
currentLayer: s,
|
|
540
|
+
leavingLayer: c
|
|
541
|
+
};
|
|
440
542
|
}
|
|
441
|
-
var $ = Z.use;
|
|
442
|
-
Z.useOptional;
|
|
443
543
|
//#endregion
|
|
444
544
|
//#region src/components/custom/dock/DockLayerGroup.vue?vue&type=script&setup=true&lang.ts
|
|
445
|
-
var
|
|
545
|
+
var he = { key: 1 }, ge = { key: 2 }, _e = /* @__PURE__ */ S({
|
|
446
546
|
__name: "DockLayerGroup",
|
|
447
|
-
props: /* @__PURE__ */
|
|
547
|
+
props: /* @__PURE__ */ C({
|
|
448
548
|
orientation: {},
|
|
449
549
|
showRail: {
|
|
450
550
|
type: Boolean,
|
|
@@ -457,87 +557,99 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
|
|
|
457
557
|
}),
|
|
458
558
|
emits: ["update:active"],
|
|
459
559
|
setup(e) {
|
|
460
|
-
let t = e, n =
|
|
461
|
-
function
|
|
560
|
+
let t = e, n = te(e, "active"), r = s(), i = N([]), a = B("containerEl");
|
|
561
|
+
function o(e) {
|
|
462
562
|
i.value.find((t) => t.id === e.id) || i.value.push(e);
|
|
463
563
|
}
|
|
464
564
|
function c(e) {
|
|
465
565
|
i.value = i.value.filter((t) => t.id !== e);
|
|
466
566
|
}
|
|
467
|
-
let
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
|
|
567
|
+
let l = g(() => t.orientation ?? r?.orientation.value ?? "horizontal"), u = oe(), S, C, w;
|
|
568
|
+
if (u) {
|
|
569
|
+
let e = u.registerGroup({
|
|
570
|
+
containerEl: a,
|
|
571
|
+
activeLayer: n,
|
|
572
|
+
axis: l
|
|
573
|
+
});
|
|
574
|
+
S = e.currentLayer, C = e.leavingLayer, w = () => {}, O(() => e.release());
|
|
575
|
+
} else {
|
|
576
|
+
let e = me({
|
|
577
|
+
containerEl: a,
|
|
578
|
+
activeLayer: n,
|
|
579
|
+
axis: l,
|
|
580
|
+
directionTypes: (e, t) => {
|
|
581
|
+
let n = i.value.findIndex((t) => t.id === e);
|
|
582
|
+
return [i.value.findIndex((e) => e.id === t) < n ? "layer-back" : "layer-forward"];
|
|
583
|
+
}
|
|
584
|
+
});
|
|
585
|
+
S = M(e.currentLayer), C = M(e.leavingLayer), w = e.onTransitionEnd;
|
|
586
|
+
}
|
|
587
|
+
let T = typeof document < "u" && "startViewTransition" in document, k = ee(), A = g(() => T ? {
|
|
588
|
+
"view-transition-name": `gl-dock-stack-${k.replace(/[^a-zA-Z0-9_-]/g, "-")}`,
|
|
477
589
|
"view-transition-class": "gl-dock-layer"
|
|
478
590
|
} : void 0);
|
|
479
|
-
|
|
480
|
-
register:
|
|
591
|
+
de({
|
|
592
|
+
register: o,
|
|
481
593
|
unregister: c,
|
|
482
|
-
currentLayerId:
|
|
483
|
-
leavingLayerId:
|
|
594
|
+
currentLayerId: S,
|
|
595
|
+
leavingLayerId: C
|
|
484
596
|
});
|
|
485
|
-
function
|
|
597
|
+
function z(e) {
|
|
486
598
|
return typeof e == "object" && !!e;
|
|
487
599
|
}
|
|
488
|
-
let
|
|
489
|
-
function
|
|
490
|
-
|
|
600
|
+
let V = N(!1);
|
|
601
|
+
function U() {
|
|
602
|
+
V.value || (V.value = !0, r?.keepOpen());
|
|
491
603
|
}
|
|
492
|
-
function
|
|
604
|
+
function W(e) {
|
|
493
605
|
let t = e.relatedTarget, n = e.currentTarget;
|
|
494
|
-
t && n?.contains(t) ||
|
|
606
|
+
t && n?.contains(t) || V.value && (V.value = !1, r?.release());
|
|
495
607
|
}
|
|
496
|
-
return (t, r) => (
|
|
608
|
+
return (t, r) => (j(), y("div", { class: E(["dock-layer-group", [l.value, `rail-${e.railPosition}`]]) }, [e.showRail && i.value.length > 1 ? (j(), _(R(d), {
|
|
497
609
|
key: 0,
|
|
498
610
|
modelValue: n.value,
|
|
499
611
|
"onUpdate:modelValue": r[0] ||= (e) => n.value = e,
|
|
500
612
|
orientation: "horizontal",
|
|
501
613
|
"as-child": !0
|
|
502
614
|
}, {
|
|
503
|
-
default: H(() => [
|
|
504
|
-
class:
|
|
505
|
-
onFocusin:
|
|
506
|
-
onFocusout:
|
|
615
|
+
default: H(() => [x(R(m), {
|
|
616
|
+
class: E(["dock-layer-rail", e.railPosition]),
|
|
617
|
+
onFocusin: U,
|
|
618
|
+
onFocusout: W
|
|
507
619
|
}, {
|
|
508
|
-
default: H(() => [(
|
|
620
|
+
default: H(() => [(j(!0), y(h, null, P(i.value, (e) => (j(), _(R(p), {
|
|
509
621
|
key: e.id,
|
|
510
622
|
value: e.id,
|
|
511
623
|
class: "dock-layer-tab",
|
|
512
624
|
title: e.label,
|
|
513
625
|
"aria-label": e.label ?? e.id
|
|
514
626
|
}, {
|
|
515
|
-
default: H(() => [
|
|
627
|
+
default: H(() => [z(e.icon) ? (j(), _(I(e.icon), {
|
|
516
628
|
key: 0,
|
|
517
629
|
class: "size-4"
|
|
518
|
-
})) : typeof e.icon == "string" ? (
|
|
630
|
+
})) : typeof e.icon == "string" ? (j(), y("span", he, L(e.icon), 1)) : (j(), y("span", ge, L((e.label ?? e.id).charAt(0)), 1))]),
|
|
519
631
|
_: 2
|
|
520
632
|
}, 1032, [
|
|
521
633
|
"value",
|
|
522
634
|
"title",
|
|
523
635
|
"aria-label"
|
|
524
|
-
]))), 128)),
|
|
636
|
+
]))), 128)), x(R(f), { class: "dock-layer-tab-indicator" })]),
|
|
525
637
|
_: 1
|
|
526
638
|
}, 8, ["class"])]),
|
|
527
639
|
_: 1
|
|
528
|
-
}, 8, ["modelValue"])) :
|
|
640
|
+
}, 8, ["modelValue"])) : v("", !0), b("div", {
|
|
529
641
|
ref_key: "containerEl",
|
|
530
|
-
ref:
|
|
642
|
+
ref: a,
|
|
531
643
|
class: "dock-layer-stack",
|
|
532
|
-
style:
|
|
533
|
-
onTransitionend: r[1] ||= (...e) =>
|
|
534
|
-
}, [
|
|
644
|
+
style: D(A.value),
|
|
645
|
+
onTransitionend: r[1] ||= (...e) => R(w) && R(w)(...e)
|
|
646
|
+
}, [F(t.$slots, "default")], 36)], 2));
|
|
535
647
|
}
|
|
536
|
-
}),
|
|
648
|
+
}), ve = [
|
|
537
649
|
"inert",
|
|
538
650
|
"aria-hidden",
|
|
539
651
|
"tabindex"
|
|
540
|
-
],
|
|
652
|
+
], ye = /* @__PURE__ */ S({
|
|
541
653
|
__name: "DockLayer",
|
|
542
654
|
props: {
|
|
543
655
|
id: {},
|
|
@@ -545,35 +657,35 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
|
|
|
545
657
|
icon: {}
|
|
546
658
|
},
|
|
547
659
|
setup(e) {
|
|
548
|
-
let t = e, n =
|
|
549
|
-
|
|
660
|
+
let t = e, n = fe();
|
|
661
|
+
k(() => {
|
|
550
662
|
n.register({
|
|
551
663
|
id: t.id,
|
|
552
664
|
label: t.label,
|
|
553
665
|
icon: t.icon
|
|
554
666
|
});
|
|
555
|
-
}),
|
|
667
|
+
}), O(() => {
|
|
556
668
|
n.unregister(t.id);
|
|
557
669
|
});
|
|
558
|
-
let r =
|
|
670
|
+
let r = g(() => n.currentLayerId.value === t.id), i = g(() => n.leavingLayerId.value === t.id), a = B("hostEl");
|
|
559
671
|
return V(r, async (e, t) => {
|
|
560
672
|
!e || t || typeof document < "u" && (() => {
|
|
561
673
|
let e = document.activeElement;
|
|
562
674
|
return !e || e === document.body ? !0 : !!e.closest("[inert]");
|
|
563
|
-
})() && (await
|
|
564
|
-
}), (e, t) => (
|
|
675
|
+
})() && (await T(), a.value?.focus());
|
|
676
|
+
}), (e, t) => (j(), y("div", {
|
|
565
677
|
ref_key: "hostEl",
|
|
566
678
|
ref: a,
|
|
567
|
-
class:
|
|
679
|
+
class: E(["dock-layer-item-host", {
|
|
568
680
|
"is-active": r.value,
|
|
569
681
|
"is-leaving": i.value
|
|
570
682
|
}]),
|
|
571
683
|
inert: r.value ? void 0 : !0,
|
|
572
684
|
"aria-hidden": r.value ? void 0 : !0,
|
|
573
685
|
tabindex: r.value ? -1 : void 0
|
|
574
|
-
}, [
|
|
686
|
+
}, [F(e.$slots, "default")], 10, ve));
|
|
575
687
|
}
|
|
576
|
-
}),
|
|
688
|
+
}), be = /* @__PURE__ */ S({
|
|
577
689
|
__name: "DockIconButton",
|
|
578
690
|
props: {
|
|
579
691
|
compact: {
|
|
@@ -595,37 +707,26 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
|
|
|
595
707
|
] }
|
|
596
708
|
},
|
|
597
709
|
setup(t) {
|
|
598
|
-
let n = t,
|
|
599
|
-
|
|
600
|
-
let t = e.currentTarget;
|
|
601
|
-
if (!t) return;
|
|
602
|
-
let n = t.getBoundingClientRect();
|
|
603
|
-
if (n.width === 0 || n.height === 0) return;
|
|
604
|
-
let r = (e.clientX - n.left) / n.width * 100, a = (e.clientY - n.top) / n.height * 100;
|
|
605
|
-
i.value = {
|
|
606
|
-
"--mouse-x": `${r.toFixed(2)}%`,
|
|
607
|
-
"--mouse-y": `${a.toFixed(2)}%`
|
|
608
|
-
};
|
|
609
|
-
}
|
|
610
|
-
let o = h(() => !n.asChild && n.as === "button" ? { type: n.type } : {});
|
|
611
|
-
return (e, n) => (A(), g(L(W), C({
|
|
710
|
+
let n = t, i = g(() => e("dock-icon-button glass-specular-track", { "dock-icon-button--compact": n.compact }, n.class)), { specularStyle: a, onPointerMove: o } = r(), s = g(() => !n.asChild && n.as === "button" ? { type: n.type } : {});
|
|
711
|
+
return (e, n) => (j(), _(R(W), w({
|
|
612
712
|
as: t.as,
|
|
613
713
|
"as-child": t.asChild
|
|
614
|
-
},
|
|
615
|
-
class:
|
|
616
|
-
style:
|
|
617
|
-
onPointermove:
|
|
714
|
+
}, s.value, {
|
|
715
|
+
class: i.value,
|
|
716
|
+
style: R(a),
|
|
717
|
+
onPointermove: R(o)
|
|
618
718
|
}), {
|
|
619
|
-
default: H(() => [
|
|
719
|
+
default: H(() => [F(e.$slots, "default")]),
|
|
620
720
|
_: 3
|
|
621
721
|
}, 16, [
|
|
622
722
|
"as",
|
|
623
723
|
"as-child",
|
|
624
724
|
"class",
|
|
625
|
-
"style"
|
|
725
|
+
"style",
|
|
726
|
+
"onPointermove"
|
|
626
727
|
]));
|
|
627
728
|
}
|
|
628
|
-
}),
|
|
729
|
+
}), xe = /* @__PURE__ */ S({
|
|
629
730
|
__name: "DockBackgroundToggle",
|
|
630
731
|
props: {
|
|
631
732
|
paused: {
|
|
@@ -637,22 +738,22 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
|
|
|
637
738
|
},
|
|
638
739
|
emits: ["update:paused"],
|
|
639
740
|
setup(e, { emit: t }) {
|
|
640
|
-
let n = e, r = t, i =
|
|
741
|
+
let n = e, r = t, i = g(() => n.paused ? n.playLabel : n.pauseLabel);
|
|
641
742
|
function a() {
|
|
642
743
|
r("update:paused", !n.paused);
|
|
643
744
|
}
|
|
644
|
-
return (t, n) => (
|
|
745
|
+
return (t, n) => (j(), _(be, {
|
|
645
746
|
type: "button",
|
|
646
747
|
"aria-pressed": e.paused,
|
|
647
748
|
"aria-label": i.value,
|
|
648
749
|
title: i.value,
|
|
649
750
|
onClick: a
|
|
650
751
|
}, {
|
|
651
|
-
default: H(() => [e.paused ? (
|
|
752
|
+
default: H(() => [e.paused ? (j(), _(R(re), {
|
|
652
753
|
key: 0,
|
|
653
754
|
size: 18,
|
|
654
755
|
"aria-hidden": "true"
|
|
655
|
-
})) : (
|
|
756
|
+
})) : (j(), _(R(J), {
|
|
656
757
|
key: 1,
|
|
657
758
|
size: 18,
|
|
658
759
|
"aria-hidden": "true"
|
|
@@ -664,7 +765,7 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
|
|
|
664
765
|
"title"
|
|
665
766
|
]));
|
|
666
767
|
}
|
|
667
|
-
}),
|
|
768
|
+
}), Se = /* @__PURE__ */ S({
|
|
668
769
|
__name: "DockTabButton",
|
|
669
770
|
props: {
|
|
670
771
|
as: { default: "button" },
|
|
@@ -681,13 +782,13 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
|
|
|
681
782
|
] }
|
|
682
783
|
},
|
|
683
784
|
setup(t) {
|
|
684
|
-
let n = t, r =
|
|
685
|
-
return (e, n) => (
|
|
785
|
+
let n = t, r = z(), i = g(() => r["data-tier"] === "primary"), a = g(() => e("dock-tab-button", i.value && "btn-audacious", n.class));
|
|
786
|
+
return (e, n) => (j(), _(R(W), {
|
|
686
787
|
as: t.as,
|
|
687
788
|
"as-child": t.asChild,
|
|
688
|
-
class:
|
|
789
|
+
class: E(a.value)
|
|
689
790
|
}, {
|
|
690
|
-
default: H(() => [
|
|
791
|
+
default: H(() => [F(e.$slots, "default")]),
|
|
691
792
|
_: 3
|
|
692
793
|
}, 8, [
|
|
693
794
|
"as",
|
|
@@ -695,7 +796,7 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
|
|
|
695
796
|
"class"
|
|
696
797
|
]));
|
|
697
798
|
}
|
|
698
|
-
}),
|
|
799
|
+
}), Ce = /* @__PURE__ */ S({
|
|
699
800
|
__name: "DockSelectTrigger",
|
|
700
801
|
props: {
|
|
701
802
|
disabled: { type: Boolean },
|
|
@@ -711,19 +812,19 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
|
|
|
711
812
|
] }
|
|
712
813
|
},
|
|
713
814
|
setup(t) {
|
|
714
|
-
let r = t, i =
|
|
815
|
+
let r = t, i = K(g(() => {
|
|
715
816
|
let { class: e, ...t } = r;
|
|
716
817
|
return t;
|
|
717
818
|
}));
|
|
718
|
-
return (t, a) => (
|
|
719
|
-
default: H(() => [
|
|
720
|
-
default: H(() => [
|
|
819
|
+
return (t, a) => (j(), _(R(ne), w(R(i), { class: R(e)("dock-select-trigger", r.class) }), {
|
|
820
|
+
default: H(() => [F(t.$slots, "default"), x(R(G), { "as-child": "" }, {
|
|
821
|
+
default: H(() => [F(t.$slots, "icon", {}, () => [x(R(n), { class: "dock-select-trigger__chevron" })])]),
|
|
721
822
|
_: 3
|
|
722
823
|
})]),
|
|
723
824
|
_: 3
|
|
724
825
|
}, 16, ["class"]));
|
|
725
826
|
}
|
|
726
|
-
}),
|
|
827
|
+
}), we = /* @__PURE__ */ S({
|
|
727
828
|
__name: "DockDropdownTrigger",
|
|
728
829
|
props: {
|
|
729
830
|
disabled: { type: Boolean },
|
|
@@ -739,15 +840,15 @@ var le = { key: 1 }, ue = { key: 2 }, de = /* @__PURE__ */ x({
|
|
|
739
840
|
] }
|
|
740
841
|
},
|
|
741
842
|
setup(t) {
|
|
742
|
-
let n = t, r =
|
|
843
|
+
let n = t, r = K(g(() => {
|
|
743
844
|
let { class: e, ...t } = n;
|
|
744
845
|
return t;
|
|
745
846
|
}));
|
|
746
|
-
return (t, i) => (
|
|
747
|
-
default: H(() => [
|
|
847
|
+
return (t, i) => (j(), _(R(U), w(R(r), { class: R(e)("dock-dropdown-trigger", n.class) }), {
|
|
848
|
+
default: H(() => [F(t.$slots, "default")]),
|
|
748
849
|
_: 3
|
|
749
850
|
}, 16, ["class"]));
|
|
750
851
|
}
|
|
751
852
|
});
|
|
752
853
|
//#endregion
|
|
753
|
-
export {
|
|
854
|
+
export { u as DOCK_CONTEXT_KEY, xe as DockBackgroundToggle, we as DockDropdownTrigger, be as DockIconButton, ye as DockLayer, _e as DockLayerGroup, Ce as DockSelectTrigger, Se as DockTabButton, Q as GlassDock, c as provideDockContext, l as useDockContext, me as useLayerTransition, s as useOptionalDockContext };
|