@mkbabb/glass-ui 10.1.5 → 11.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MIGRATION.md +1024 -1461
- package/README.md +2 -2
- package/dist/DialogContent-DG5kseRQ.js +159 -0
- package/dist/DropdownMenuTrigger-uhSXgEfK.js +76 -0
- package/dist/{Surface-1nPoabc3.js → Surface-C7wq2j0A.js} +3 -0
- package/dist/aurora.css +1 -0
- package/dist/aurora.js +246 -2472
- package/dist/auroraImageSource-xNLDUjcy.js +30 -0
- package/dist/axes.js +8 -8
- package/dist/blob.css +1 -0
- package/dist/blob.js +57 -54
- package/dist/budget-CJfhLIIV.js +13 -0
- package/dist/button-CAKhiOZy.js +113 -0
- package/dist/button.js +1 -1
- package/dist/{card-ByyqRBvK.js → card-D_uXphvL.js} +4 -1
- package/dist/card.js +1 -1
- package/dist/carousel.js +3 -2
- package/dist/{checkbox-B1qn65se.js → checkbox-COLnvULu.js} +1 -0
- package/dist/checkbox.css +1 -0
- package/dist/checkbox.js +1 -1
- package/dist/{collapsible-DFzK29Oh.js → collapsible-Bd4Et730.js} +1 -0
- package/dist/collapsible.css +1 -0
- package/dist/collapsible.js +1 -1
- package/dist/color-HkUaTAJj.js +270 -0
- package/dist/{color.glsl-DTJhdekG.js → color.glsl-bFJm8k5R.js} +4 -16
- package/dist/color.wgsl-B-qDJ_OM.js +4 -0
- package/dist/{command-CatrAsrl.js → command-BsFOGZwB.js} +3 -2
- package/dist/command.css +1 -0
- package/dist/command.js +1 -1
- package/dist/component-styles.css +0 -1
- package/dist/components/_shared/axes.d.ts +7 -0
- package/dist/components/_shared/feedback/dot-ring.css +1 -1
- package/dist/components/_shared/overlay/focus-return.d.ts +9 -0
- package/dist/components/_shared/overlay/index.d.ts +3 -0
- package/dist/components/_shared/overlay/root-scroll-lock.d.ts +4 -0
- package/dist/components/_shared/overlay/sheet-width.d.ts +2 -0
- package/dist/components/_shared/shape/useBarShape.d.ts +4 -0
- package/dist/components/aurora/composables/auroraFallbackGround.d.ts +12 -0
- package/dist/components/aurora/constants/presets.d.ts +21 -0
- package/dist/components/aurora/index.d.ts +2 -2
- package/dist/components/button/styles.css +1 -1
- package/dist/components/dark-mode-toggle/dark-mode-toggle.css +1 -1
- package/dist/components/dialog/DialogContent.vue.d.ts +2 -2
- package/dist/components/dialog/ModalOverlay.vue.d.ts +2 -2
- package/dist/components/dialog/ModalScrim.vue.d.ts +26 -0
- package/dist/components/dialog/styles.css +1 -1
- package/dist/components/dock/GlassDock.vue.d.ts +4 -1
- package/dist/components/dock/composables/useDockShellProps.d.ts +34 -2
- package/dist/components/dock/composables/useDockState.d.ts +5 -0
- package/dist/components/dock/index.d.ts +1 -2
- package/dist/components/dock/styles/controls/icon-button.css +1 -1
- package/dist/components/dock/styles/controls/tab-button.css +1 -1
- package/dist/components/dock/styles/morph.css +1 -1
- package/dist/components/dock/styles/run.css +1 -1
- package/dist/components/dock/styles/shell.css +1 -1
- package/dist/components/dock/trigger.d.ts +1 -0
- package/dist/components/expandable-container/ExpandableContainer.vue.d.ts +30 -29
- package/dist/components/menu/ContextMenu.vue.d.ts +27 -0
- package/dist/components/menu/DropdownMenu.vue.d.ts +5 -23
- package/dist/components/menu/context.d.ts +18 -5
- package/dist/components/menu/family-click.d.ts +2 -0
- package/dist/components/menu/family-context.d.ts +2 -0
- package/dist/components/menu/index.d.ts +1 -1
- package/dist/components/sheet/SheetContent.vue.d.ts +2 -2
- package/dist/components/sortable-list/styles.css +1 -0
- package/dist/components/surface/Surface.vue.d.ts +4 -1
- package/dist/components/tabs/composables/useTabDragMorph.d.ts +4 -7
- package/dist/components/tabs/styles/segmented.css +1 -1
- package/dist/components/tabs/types.d.ts +7 -8
- package/dist/composables/glass/fieldPaint.d.ts +4 -0
- package/dist/composables/glass/useGlassBackdropLuminance.d.ts +7 -6
- package/dist/composables/glass/webgpu/useGpuSubstrate.d.ts +8 -0
- package/dist/composables/motion/core/motionTempo.d.ts +2 -1
- package/dist/composables/motion/morph/useDragMorph.d.ts +2 -2
- package/dist/composables/motion/morph/useSelectionGroup.d.ts +6 -25
- package/dist/composables/motion/morph/useSelectionIndicator.d.ts +8 -54
- package/dist/composables/motion/spring/useLiquidFlex.d.ts +3 -5
- package/dist/composables/motion/spring/useSpringMount.d.ts +0 -9
- package/dist/{configurator-Dl10mc3L.js → configurator-C1ZKEf1b.js} +7 -5
- package/dist/configurator.css +1 -0
- package/dist/configurator.js +1 -1
- package/dist/constants-DfrO-IaH.js +8 -0
- package/dist/constellation.css +1 -0
- package/dist/constellation.js +2 -1
- package/dist/control.css +1 -0
- package/dist/{control.css_vue_type_style_index_0_src_true_lang-BIdufaDG.js → control.css_vue_type_style_index_0_src_true_lang-D2hdtjs4.js} +1 -0
- package/dist/{createCanvasLifecycle-hJHobVTn.js → createCanvasLifecycle-DS0vEs_G.js} +76 -75
- package/dist/dark-mode-toggle.js +1 -1
- package/dist/{data-table-8y6fbyOB.js → data-table-CunuMkZ3.js} +1 -0
- package/dist/data-table.css +1 -0
- package/dist/data-table.js +1 -1
- package/dist/{deck-Cm_VmyNL.js → deck-Bc-2mEKE.js} +1 -0
- package/dist/deck.js +1 -1
- package/dist/dialog.js +1 -1
- package/dist/dock-trigger.d.ts +1 -0
- package/dist/dock-trigger.js +88 -0
- package/dist/dock.js +685 -729
- package/dist/easing.js +4 -4
- package/dist/expandable-container-wS1awXGd.js +135 -0
- package/dist/expandable-container.css +1 -0
- package/dist/expandable-container.js +1 -1
- package/dist/{fading-scroll-ClCPooXb.js → fading-scroll-D3Y20ibL.js} +1 -1
- package/dist/fading-scroll.js +1 -1
- package/dist/fieldPaint-Ci77oajZ.js +7 -0
- package/dist/fourier-field.css +1 -0
- package/dist/fourier-field.js +15 -13
- package/dist/glSetup-DMaDgrEj.js +577 -0
- package/dist/glass-ui.js +66 -65
- package/dist/handmark.css +1 -0
- package/dist/handmark.js +82 -71
- package/dist/index.css +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/{input-eLZ_AU7l.js → input-BLF2pMHE.js} +1 -1
- package/dist/input.js +1 -1
- package/dist/{label-CE03H1KL.js → label-ryNPL7e6.js} +1 -0
- package/dist/label.css +1 -0
- package/dist/label.js +1 -1
- package/dist/labeled-field.css +1 -0
- package/dist/labeled-field.js +5 -4
- package/dist/{menu-DaYAZiVW.js → menu-C_l2Sslf.js} +162 -112
- package/dist/menu.js +3 -3
- package/dist/metric.js +1 -0
- package/dist/motion-core.js +138 -44
- package/dist/motion-lHDAQHEE.js +91 -0
- package/dist/motion.js +5 -5
- package/dist/motionTempo-DXdVbCWr.js +13 -0
- package/dist/music-staff.js +1 -0
- package/dist/{number-field-RP89046a.js → number-field-BXFUP49Z.js} +3 -2
- package/dist/number-field.css +1 -0
- package/dist/number-field.js +1 -1
- package/dist/pager-dots.css +1 -0
- package/dist/pager-dots.js +3 -2
- package/dist/participation-C5y5VZTN.js +52 -0
- package/dist/{popover-BdpoE4Ar.js → popover-DQUmwuAa.js} +3 -2
- package/dist/popover.js +1 -1
- package/dist/{progress-eVa-mc7J.js → progress-BUn0Bw7Z.js} +1 -0
- package/dist/progress.css +1 -0
- package/dist/progress.js +1 -1
- package/dist/{radio-group-B58Bz16F.js → radio-group-xdEy2tdi.js} +1 -0
- package/dist/radio-group.css +1 -0
- package/dist/radio-group.js +1 -1
- package/dist/root-scroll-lock-DJFrQhMa.js +22 -0
- package/dist/select-Dt5dXm87.js +309 -0
- package/dist/select.js +1 -1
- package/dist/{separator-D4EZM10u.js → separator-C4y9p_ky.js} +1 -0
- package/dist/separator.css +1 -0
- package/dist/separator.js +1 -1
- package/dist/sheet-DLqNUIZl.js +347 -0
- package/dist/sheet-width-DgXgJNa5.js +18 -0
- package/dist/sheet.js +2 -2
- package/dist/{slider-Dg3Qqdyo.js → slider-B4w12E_u.js} +8 -8
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +2 -1
- package/dist/{status-dot-W4LFiJps.js → status-dot-BDZKcRxy.js} +2 -1
- package/dist/status-dot.css +1 -0
- package/dist/status-dot.js +1 -1
- package/dist/styles/components.css +1 -1
- package/dist/styles/glass/glass-capsule.css +1 -1
- package/dist/styles/glass/glass-chip.css +1 -1
- package/dist/styles/glass/mark.css +1 -1
- package/dist/styles/glass/overlay-plate.css +1 -1
- package/dist/styles/glass/surface-axis.css +1 -1
- package/dist/styles/index.css +1 -1
- package/dist/styles/theme/radius.css +1 -1
- package/dist/styles/tokens/color-radius.css +1 -1
- package/dist/styles/tokens/manifest.d.ts +1 -1
- package/dist/styles/tokens/scale-paper.css +1 -1
- package/dist/styles/utilities/base-misc.css +1 -1
- package/dist/surface.js +1 -1
- package/dist/{switch-BYUZ6g9G.js → switch-DLfGYU35.js} +1 -0
- package/dist/switch.css +1 -0
- package/dist/switch.js +1 -1
- package/dist/tabs-NgTRPGZx.js +229 -0
- package/dist/tabs.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.css +1 -0
- package/dist/timeline.js +4 -3
- package/dist/toggle-group-DgXcJGD6.js +129 -0
- package/dist/toggle-group.css +1 -0
- package/dist/toggle-group.js +1 -1
- package/dist/tokens.js +2 -0
- package/dist/{tooltip-CZVubnJf.js → tooltip-Do3qCw0r.js} +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/typewriter.css +1 -0
- package/dist/typewriter.js +1 -0
- package/dist/uniformBridge-CJyy7NOn.js +150 -0
- package/dist/useBarShape-CmP35Z8o.js +24 -0
- package/dist/{useCanvas2D-CQRElMyE.js → useCanvas2D-Bhpwua98.js} +1 -1
- package/dist/{useDockCtaReceive-BSSgD6mu.js → useDockCtaReceive-Dn_-paqP.js} +1 -1
- package/dist/{useDragMorph-B363RUbF.js → useDragMorph-BEI74U0t.js} +51 -40
- package/dist/{color.wgsl-BTszLY39.js → useGpuSubstrate-Y5XAdU8d.js} +7 -7
- package/dist/{useLiquidPress-h1scrPtP.js → useLiquidPress-D5mjZC6U.js} +2 -2
- package/dist/useScrollChrome-DMP6kDI9.js +67 -0
- package/dist/useSelectionGroup-DAQv5Lb5.js +186 -0
- package/dist/{useSpring-9u2_shxV.js → useSpring-Aof0nTRt.js} +1 -1
- package/dist/useSpringMount-jgNkymRl.js +73 -0
- package/dist/wgpuSetup-CFuqd_RP.js +1278 -0
- package/package.json +8 -1
- package/dist/DialogContent-CwIBvou_.js +0 -157
- package/dist/DropdownMenuTrigger-CKRnhDSQ.js +0 -93
- package/dist/button-BOFTUPyU.js +0 -110
- package/dist/composables/motion/morph/eyeglass.d.ts +0 -141
- package/dist/expandable-container-CZUj9BzY.js +0 -142
- package/dist/glass-ui.css +0 -2
- package/dist/motion-BvV1_24p.js +0 -61
- package/dist/motionTempo-tscp92Nm.js +0 -7
- package/dist/participation-B7UFdgXB.js +0 -55
- package/dist/select-BiF0FCZf.js +0 -292
- package/dist/sheet-DmJxgAHc.js +0 -345
- package/dist/tabs-C5sC0fBE.js +0 -269
- package/dist/toggle-group-CC5b3o1R.js +0 -125
- package/dist/useScrollChrome-BJbWV32F.js +0 -162
- package/dist/useSelectionGroup-zsEwitF6.js +0 -291
- package/dist/useSpringMount-OA-0mTNv.js +0 -73
package/dist/dock.js
CHANGED
|
@@ -1,49 +1,50 @@
|
|
|
1
1
|
import { t as e } from "./class-names-FlXcvRRT.js";
|
|
2
2
|
import { n as t } from "./useReducedMotion-vCXA_vyM.js";
|
|
3
3
|
import { t as n } from "./vSpecular-DMJo8pfD.js";
|
|
4
|
-
import { t as r } from "./
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { t as o } from "./
|
|
4
|
+
import { t as r } from "./fieldPaint-Ci77oajZ.js";
|
|
5
|
+
import { t as i } from "./motionTempo-DXdVbCWr.js";
|
|
6
|
+
import { n as a } from "./springPresets-Cbe0Voqg.js";
|
|
7
|
+
import { t as o } from "./useLiquidPress-D5mjZC6U.js";
|
|
8
8
|
import { n as s, t as c } from "./createContext-BhkE9mLH.js";
|
|
9
|
-
import { a as l,
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { t as
|
|
13
|
-
import {
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as
|
|
16
|
-
import { t as
|
|
17
|
-
import {
|
|
18
|
-
import { n as
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
9
|
+
import { a as l, i as u, o as d, r as f, t as p } from "./constants-DfrO-IaH.js";
|
|
10
|
+
import { a as m, i as h, n as g, o as _, r as v, s as y } from "./participation-C5y5VZTN.js";
|
|
11
|
+
import { t as b } from "./useMotionAxis-D-rtIhca.js";
|
|
12
|
+
import { t as x } from "./useResizeObserver-Bv3nN46q.js";
|
|
13
|
+
import { n as S } from "./useResolveTokenColor-B2FfJnd9.js";
|
|
14
|
+
import { t as C } from "./useIntersectionPause-CzKR3EyP.js";
|
|
15
|
+
import { t as w } from "./focus-Duf7EpUu.js";
|
|
16
|
+
import { t as T } from "./useSelectionGroup-DAQv5Lb5.js";
|
|
17
|
+
import { t as E } from "./useDragMorph-BEI74U0t.js";
|
|
18
|
+
import { n as D } from "./useDockCtaReceive-Dn_-paqP.js";
|
|
19
|
+
import { t as O } from "./useScrollChrome-DMP6kDI9.js";
|
|
20
|
+
import { Fragment as k, computed as A, createBlock as j, createCommentVNode as M, createElementBlock as N, createElementVNode as P, createVNode as F, defineComponent as I, mergeModels as L, mergeProps as R, nextTick as z, normalizeClass as B, normalizeStyle as V, onBeforeUnmount as H, onMounted as ee, onScopeDispose as U, onUnmounted as te, openBlock as W, readonly as G, ref as K, renderList as ne, renderSlot as q, resolveDynamicComponent as re, toDisplayString as J, unref as Y, useId as ie, useModel as ae, useTemplateRef as X, watch as Z, withCtx as oe, withDirectives as se } from "vue";
|
|
21
|
+
import { Primitive as ce } from "reka-ui";
|
|
22
|
+
import { Pause as le, Play as ue } from "@lucide/vue";
|
|
23
|
+
import { SpringProgress as de } from "@mkbabb/keyframes.js";
|
|
24
|
+
import { useMediaQuery as fe } from "@vueuse/core";
|
|
24
25
|
//#region src/components/_shared/overlay/isTeleportedTarget.ts
|
|
25
|
-
function
|
|
26
|
+
function Q(e, t) {
|
|
26
27
|
if (!(e instanceof Element)) return !1;
|
|
27
28
|
let n = e.closest("[data-glass-dock-portal]");
|
|
28
29
|
return n ? !t || n.getAttribute("data-glass-dock-owner") === t : !1;
|
|
29
30
|
}
|
|
30
31
|
//#endregion
|
|
31
32
|
//#region src/composables/glass/backdropSampleMath.ts
|
|
32
|
-
function
|
|
33
|
+
function pe(e) {
|
|
33
34
|
let t = e / 255;
|
|
34
35
|
return t <= .03928 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
|
|
35
36
|
}
|
|
36
|
-
function
|
|
37
|
-
return .2126 *
|
|
37
|
+
function me(e, t, n) {
|
|
38
|
+
return .2126 * pe(e) + .7152 * pe(t) + .0722 * pe(n);
|
|
38
39
|
}
|
|
39
|
-
function
|
|
40
|
+
function he(e, t, n, r, i) {
|
|
40
41
|
return [
|
|
41
42
|
e * r + i[0] * (1 - r),
|
|
42
43
|
t * r + i[1] * (1 - r),
|
|
43
44
|
n * r + i[2] * (1 - r)
|
|
44
45
|
];
|
|
45
46
|
}
|
|
46
|
-
function
|
|
47
|
+
function ge(e) {
|
|
47
48
|
let t = e.match(/rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:[,\s/]+([\d.]+))?/i);
|
|
48
49
|
return t ? [
|
|
49
50
|
Number(t[1]),
|
|
@@ -52,31 +53,31 @@ function Se(e) {
|
|
|
52
53
|
t[4] === void 0 ? 1 : Number(t[4])
|
|
53
54
|
] : null;
|
|
54
55
|
}
|
|
55
|
-
function
|
|
56
|
+
function _e(e) {
|
|
56
57
|
return typeof HTMLCanvasElement < "u" && e instanceof HTMLCanvasElement;
|
|
57
58
|
}
|
|
58
|
-
var
|
|
59
|
-
function
|
|
59
|
+
var ve = "[data-glass-field-canvas] canvas, canvas[data-glass-field-canvas]";
|
|
60
|
+
function ye(e) {
|
|
60
61
|
if (!e) {
|
|
61
62
|
if (typeof document < "u") {
|
|
62
|
-
let e = document.querySelector(
|
|
63
|
-
if (
|
|
63
|
+
let e = document.querySelector(ve);
|
|
64
|
+
if (_e(e)) return e;
|
|
64
65
|
}
|
|
65
66
|
return null;
|
|
66
67
|
}
|
|
67
|
-
if (
|
|
68
|
+
if (_e(e)) return e;
|
|
68
69
|
if (typeof e == "function") {
|
|
69
70
|
let t = e();
|
|
70
|
-
return
|
|
71
|
+
return _e(t) ? t : null;
|
|
71
72
|
}
|
|
72
73
|
if (typeof e == "string" && typeof document < "u") {
|
|
73
74
|
let t = document.querySelector(e);
|
|
74
|
-
return
|
|
75
|
+
return _e(t) ? t : null;
|
|
75
76
|
}
|
|
76
77
|
return null;
|
|
77
78
|
}
|
|
78
|
-
function
|
|
79
|
-
let n =
|
|
79
|
+
function be(e, t) {
|
|
80
|
+
let n = ge(e);
|
|
80
81
|
if (n) return n;
|
|
81
82
|
if (!t) return null;
|
|
82
83
|
try {
|
|
@@ -92,7 +93,7 @@ function Ee(e, t) {
|
|
|
92
93
|
return null;
|
|
93
94
|
}
|
|
94
95
|
}
|
|
95
|
-
function
|
|
96
|
+
function xe(e, t, n, r) {
|
|
96
97
|
if (!t || t.width === 0 || t.height === 0 || !n) return null;
|
|
97
98
|
let i = e.getBoundingClientRect(), a = t.getBoundingClientRect();
|
|
98
99
|
if (a.width === 0 || a.height === 0) return null;
|
|
@@ -102,71 +103,71 @@ function De(e, t, n, r) {
|
|
|
102
103
|
n.clearRect(0, 0, 32, 32), n.drawImage(t, c, l, u, d, 0, 0, 32, 32);
|
|
103
104
|
let e = n.getImageData(0, 0, 32, 32).data, i = 0, a = 0, o = 0;
|
|
104
105
|
for (let t = 0; t < e.length; t += 4) {
|
|
105
|
-
let n = e[t + 3] / 255, [s, c, l] =
|
|
106
|
-
i +=
|
|
106
|
+
let n = e[t + 3] / 255, [s, c, l] = he(e[t], e[t + 1], e[t + 2], n, r);
|
|
107
|
+
i += me(s, c, l), a += n, o++;
|
|
107
108
|
}
|
|
108
109
|
return o === 0 || a / o < .02 ? null : { luma: i / o };
|
|
109
110
|
} catch {
|
|
110
111
|
return null;
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
|
-
function
|
|
114
|
+
function Se(e, t) {
|
|
114
115
|
let n = e.getBoundingClientRect(), r = n.left + n.width / 2, i = n.top + n.height / 2, a = document.elementsFromPoint(r, i);
|
|
115
116
|
for (let n of a) {
|
|
116
117
|
if (!(n instanceof HTMLElement) || n === e || e.contains(n)) continue;
|
|
117
|
-
let r = getComputedStyle(n).backgroundColor, i =
|
|
118
|
+
let r = getComputedStyle(n).backgroundColor, i = be(S(r, e), t);
|
|
118
119
|
if (i && !(i[3] < .5)) return i;
|
|
119
120
|
}
|
|
120
|
-
return
|
|
121
|
+
return be(S(getComputedStyle(document.body).backgroundColor, e), t);
|
|
121
122
|
}
|
|
122
|
-
var
|
|
123
|
+
var Ce = [
|
|
123
124
|
255,
|
|
124
125
|
255,
|
|
125
126
|
255
|
|
126
127
|
];
|
|
127
|
-
function
|
|
128
|
-
let n =
|
|
128
|
+
function we(e, t) {
|
|
129
|
+
let n = Se(e, t);
|
|
129
130
|
return n && n[3] >= .5 ? [
|
|
130
131
|
n[0],
|
|
131
132
|
n[1],
|
|
132
133
|
n[2]
|
|
133
|
-
] : [...
|
|
134
|
+
] : [...Ce];
|
|
134
135
|
}
|
|
135
|
-
function
|
|
136
|
-
let n =
|
|
137
|
-
return n ?
|
|
136
|
+
function Te(e, t) {
|
|
137
|
+
let n = Se(e, t);
|
|
138
|
+
return n ? Ee(n) : null;
|
|
138
139
|
}
|
|
139
|
-
function
|
|
140
|
-
return { luma:
|
|
140
|
+
function Ee(e) {
|
|
141
|
+
return { luma: me(e[0], e[1], e[2]) };
|
|
141
142
|
}
|
|
142
143
|
//#endregion
|
|
143
144
|
//#region src/composables/glass/useGlassBackdropLuminance.ts
|
|
144
|
-
var
|
|
145
|
-
function
|
|
146
|
-
let { lightThreshold:
|
|
147
|
-
function
|
|
148
|
-
return !
|
|
145
|
+
var De = "data-glass-backdrop-shared";
|
|
146
|
+
function Oe(e, n = {}) {
|
|
147
|
+
let { lightThreshold: i = .6, minSampleIntervalMs: a = 250, writeBucket: o = !0 } = n, s = Math.max(250, a), c = n.shared === !0;
|
|
148
|
+
function l(e) {
|
|
149
|
+
return !c && e.closest(`[${De}]`) !== null;
|
|
149
150
|
}
|
|
150
|
-
let
|
|
151
|
+
let u = K(null), d = K(null), f = K({
|
|
151
152
|
state: "pending",
|
|
152
153
|
mode: n.live === !0 ? "live" : "static",
|
|
153
154
|
source: n.live === !0 ? "canvas" : "elements"
|
|
154
155
|
});
|
|
155
156
|
if (typeof window > "u") return {
|
|
156
|
-
luma:
|
|
157
|
-
bucket:
|
|
158
|
-
sample:
|
|
157
|
+
luma: G(u),
|
|
158
|
+
bucket: G(d),
|
|
159
|
+
sample: G(f),
|
|
159
160
|
sampleNow: () => {},
|
|
160
161
|
dispose: () => {}
|
|
161
162
|
};
|
|
162
|
-
let
|
|
163
|
-
function h() {
|
|
164
|
-
return p || (p = document.createElement("canvas"), p.width = 32, p.height = 32), m ||= p.getContext("2d", { willReadFrequently: !0 }), m;
|
|
165
|
-
}
|
|
163
|
+
let p = t(), m = null, h = null;
|
|
166
164
|
function g() {
|
|
167
|
-
return
|
|
165
|
+
return m || (m = document.createElement("canvas"), m.width = 32, m.height = 32), h ||= m.getContext("2d", { willReadFrequently: !0 }), h;
|
|
168
166
|
}
|
|
169
|
-
function _(
|
|
167
|
+
function _() {
|
|
168
|
+
return n.live === void 0 ? e.value?.dataset.glassSample === "live" || n.backgroundCanvas != null || ye(void 0) !== null : n.live;
|
|
169
|
+
}
|
|
170
|
+
function v(e) {
|
|
170
171
|
let t = e.getBoundingClientRect();
|
|
171
172
|
return {
|
|
172
173
|
x: t.x,
|
|
@@ -175,262 +176,298 @@ function Pe(e, n = {}) {
|
|
|
175
176
|
height: t.height
|
|
176
177
|
};
|
|
177
178
|
}
|
|
178
|
-
function
|
|
179
|
-
let
|
|
180
|
-
|
|
181
|
-
let s =
|
|
182
|
-
|
|
179
|
+
function y(e, t, n, r) {
|
|
180
|
+
let a = e.luma;
|
|
181
|
+
u.value = a;
|
|
182
|
+
let s = a >= i ? "light" : "dark";
|
|
183
|
+
d.value = s, f.value = {
|
|
183
184
|
state: "sampled",
|
|
184
185
|
mode: n,
|
|
185
186
|
source: n === "live" ? "canvas" : "elements",
|
|
186
|
-
luma:
|
|
187
|
-
sampledAt:
|
|
188
|
-
targetRect:
|
|
189
|
-
}, t.style.setProperty("--glass-backdrop-luma",
|
|
187
|
+
luma: a,
|
|
188
|
+
sampledAt: r,
|
|
189
|
+
targetRect: v(t)
|
|
190
|
+
}, t.style.setProperty("--glass-backdrop-luma", a.toFixed(3)), t.setAttribute("data-backdrop-sampled", ""), t.setAttribute("data-backdrop-sample-state", "sampled"), t.setAttribute("data-backdrop-sample-source", n === "live" ? "canvas" : "elements"), t.removeAttribute("data-backdrop-sample-reason"), t.style.setProperty("--glass-backdrop-sampled", "1"), o && t.style.setProperty("--glass-backdrop", s);
|
|
190
191
|
}
|
|
191
|
-
function
|
|
192
|
-
|
|
192
|
+
function b(e, t, n, r) {
|
|
193
|
+
u.value = null, d.value = null, f.value = {
|
|
193
194
|
state: "unavailable",
|
|
194
195
|
mode: t,
|
|
195
196
|
source: t === "live" ? "canvas" : "elements",
|
|
196
197
|
reason: n,
|
|
197
198
|
sampledAt: r,
|
|
198
|
-
targetRect:
|
|
199
|
-
}, e.style.removeProperty("--glass-backdrop-luma"), e.style.removeProperty("--glass-backdrop-sampled"),
|
|
199
|
+
targetRect: v(e)
|
|
200
|
+
}, e.style.removeProperty("--glass-backdrop-luma"), e.style.removeProperty("--glass-backdrop-sampled"), o && e.style.removeProperty("--glass-backdrop"), e.removeAttribute("data-backdrop-sampled"), e.setAttribute("data-backdrop-sample-state", "unavailable"), e.setAttribute("data-backdrop-sample-source", t === "live" ? "canvas" : "elements"), e.setAttribute("data-backdrop-sample-reason", n);
|
|
200
201
|
}
|
|
201
|
-
let
|
|
202
|
-
function
|
|
202
|
+
let S = 0;
|
|
203
|
+
function w() {
|
|
203
204
|
let t = e.value;
|
|
204
|
-
if (!t ||
|
|
205
|
-
let r =
|
|
206
|
-
o ?
|
|
205
|
+
if (!t || l(t)) return;
|
|
206
|
+
let r = g(), i = _() ? "live" : "static", a = i === "live" ? ye(n.backgroundCanvas) : null, o = i === "live" ? xe(t, a, r, we(t, r)) : Te(t, r), s = Date.now();
|
|
207
|
+
o ? y(o, t, i, s) : b(t, i, i === "live" && !a ? "source-unavailable" : "sample-unavailable", s), S = typeof performance < "u" ? performance.now() : s;
|
|
207
208
|
}
|
|
208
|
-
let
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
209
|
+
let T = !1, E = !1, D = null;
|
|
210
|
+
function O() {
|
|
211
|
+
D !== null && clearTimeout(D), D = null;
|
|
212
|
+
}
|
|
213
|
+
function k() {
|
|
214
|
+
if (!T || E || D !== null) return;
|
|
215
|
+
let e = performance.now(), t = Math.max(0, S + s - e);
|
|
216
|
+
D = setTimeout(() => {
|
|
217
|
+
D = null, T && !E && w();
|
|
218
|
+
}, t);
|
|
219
|
+
}
|
|
220
|
+
function A(e) {
|
|
221
|
+
!T || D !== null || e.target === ye(n.backgroundCanvas) && k();
|
|
222
|
+
}
|
|
223
|
+
function j(e) {
|
|
224
|
+
if (!T || D !== null) return;
|
|
225
|
+
let t = ye(n.backgroundCanvas), r = e.target;
|
|
226
|
+
t && r instanceof Node && r.contains(t) && k();
|
|
227
|
+
}
|
|
228
|
+
let M = null, N = null;
|
|
229
|
+
function P() {
|
|
230
|
+
T || (T = !0, document.addEventListener(r, A, !0), document.addEventListener("scroll", k, {
|
|
231
|
+
capture: !0,
|
|
232
|
+
passive: !0
|
|
233
|
+
}), document.addEventListener("transitionend", j, !0), document.addEventListener("animationend", j, !0), typeof MutationObserver < "u" && (M = new MutationObserver(k), M.observe(document.documentElement, {
|
|
234
|
+
attributes: !0,
|
|
235
|
+
attributeFilter: [
|
|
236
|
+
"class",
|
|
237
|
+
"data-theme",
|
|
238
|
+
"data-color-scheme"
|
|
239
|
+
]
|
|
240
|
+
})), typeof matchMedia == "function" && (N = matchMedia("(prefers-color-scheme: dark)"), N.addEventListener("change", k)));
|
|
241
|
+
}
|
|
242
|
+
function F() {
|
|
243
|
+
T && (T = !1, O(), document.removeEventListener(r, A, !0), document.removeEventListener("scroll", k, !0), document.removeEventListener("transitionend", j, !0), document.removeEventListener("animationend", j, !0), M?.disconnect(), M = null, N?.removeEventListener("change", k), N = null);
|
|
244
|
+
}
|
|
245
|
+
let I = C(() => e.value, {
|
|
246
|
+
pause: () => {
|
|
247
|
+
E = !0, O();
|
|
248
|
+
},
|
|
216
249
|
resume: () => {
|
|
217
|
-
|
|
218
|
-
t && c(t) || g() && !f.value && w.resume();
|
|
250
|
+
E = !1, k();
|
|
219
251
|
}
|
|
220
|
-
}, { rootMargin: "200px" }),
|
|
221
|
-
function
|
|
252
|
+
}, { rootMargin: "200px" }), L = x(e, () => w());
|
|
253
|
+
function R() {
|
|
222
254
|
let t = e.value;
|
|
223
|
-
if (t &&
|
|
224
|
-
|
|
255
|
+
if (t && l(t)) {
|
|
256
|
+
F();
|
|
225
257
|
return;
|
|
226
258
|
}
|
|
227
|
-
|
|
259
|
+
p.value ? (F(), w()) : _() && P();
|
|
228
260
|
}
|
|
229
|
-
let
|
|
261
|
+
let z = Z(p, R, { flush: "sync" }), B = Z(() => e.value, (e) => {
|
|
230
262
|
if (e) {
|
|
231
|
-
if (
|
|
232
|
-
else if (
|
|
233
|
-
|
|
263
|
+
if (c) e.setAttribute(De, "");
|
|
264
|
+
else if (l(e)) return;
|
|
265
|
+
w(), R();
|
|
234
266
|
}
|
|
235
267
|
}, {
|
|
236
268
|
immediate: !0,
|
|
237
269
|
flush: "post"
|
|
238
270
|
});
|
|
239
|
-
function
|
|
240
|
-
|
|
241
|
-
}
|
|
242
|
-
return
|
|
243
|
-
luma:
|
|
244
|
-
bucket:
|
|
245
|
-
sample:
|
|
246
|
-
sampleNow:
|
|
247
|
-
dispose:
|
|
271
|
+
function V() {
|
|
272
|
+
B(), z(), F(), I.dispose(), L.stop(), m = null, h = null;
|
|
273
|
+
}
|
|
274
|
+
return U(V), {
|
|
275
|
+
luma: G(u),
|
|
276
|
+
bucket: G(d),
|
|
277
|
+
sample: G(f),
|
|
278
|
+
sampleNow: w,
|
|
279
|
+
dispose: V
|
|
248
280
|
};
|
|
249
281
|
}
|
|
250
282
|
//#endregion
|
|
251
283
|
//#region src/components/dock/composables/useDockState.ts
|
|
252
|
-
function
|
|
253
|
-
let { collapseDelay: t =
|
|
254
|
-
function
|
|
255
|
-
|
|
284
|
+
function ke(e) {
|
|
285
|
+
let { collapseDelay: t = p, rootEl: n, alwaysExpanded: r = !1, expandOn: i = "hover", initialExpanded: a = !1, isTransitioning: o, dockId: s, onStateChange: c } = e, l = () => typeof r == "boolean" ? r : r.value, u = () => l(), d = () => (typeof i == "string" ? i : i.value) === "press", f = K(l() ? "pinned" : a ? "hover" : "collapsed"), m = A(() => f.value !== "collapsed"), h = A(() => f.value === "pinned"), g = null, _ = K(0), v = K(0), y = A(() => _.value > 0), b = A(() => v.value > 0), x = null, S = null, C = !1, w = null;
|
|
286
|
+
function T() {
|
|
287
|
+
w &&= (clearTimeout(w), null);
|
|
256
288
|
}
|
|
257
|
-
let
|
|
258
|
-
function
|
|
259
|
-
if (!
|
|
260
|
-
|
|
261
|
-
for (let [e, t] of
|
|
262
|
-
let e =
|
|
263
|
-
|
|
289
|
+
let E = null, D = null, O = null, k = () => E === "down" || E === "compat";
|
|
290
|
+
function j() {
|
|
291
|
+
if (!E) return;
|
|
292
|
+
E = null, O &&= (clearTimeout(O), null);
|
|
293
|
+
for (let [e, t] of P) window.removeEventListener(e, t, !0);
|
|
294
|
+
let e = D;
|
|
295
|
+
D = null, e && !u() && f.value === "collapsed" && (R(), f.value = "hover", L());
|
|
264
296
|
}
|
|
265
|
-
function
|
|
266
|
-
|
|
297
|
+
function M() {
|
|
298
|
+
O ??= setTimeout(j, 0);
|
|
267
299
|
}
|
|
268
|
-
function
|
|
269
|
-
|
|
300
|
+
function N() {
|
|
301
|
+
D = null, j();
|
|
270
302
|
}
|
|
271
|
-
let
|
|
272
|
-
["click", () =>
|
|
273
|
-
["pointercancel", () =>
|
|
274
|
-
["dragstart", () =>
|
|
275
|
-
["contextmenu", () =>
|
|
303
|
+
let P = [
|
|
304
|
+
["click", () => j()],
|
|
305
|
+
["pointercancel", () => j()],
|
|
306
|
+
["dragstart", () => j()],
|
|
307
|
+
["contextmenu", () => j()],
|
|
276
308
|
["pointerup", (e) => {
|
|
277
|
-
|
|
309
|
+
E === "down" && (e.pointerType === "touch" ? E = "tap" : M());
|
|
278
310
|
}],
|
|
279
311
|
["mousedown", () => {
|
|
280
|
-
|
|
312
|
+
E === "tap" && (E = "compat");
|
|
281
313
|
}],
|
|
282
314
|
["mouseup", () => {
|
|
283
|
-
|
|
315
|
+
E === "compat" && M();
|
|
284
316
|
}],
|
|
285
317
|
["pointerdown", (e) => {
|
|
286
|
-
(
|
|
318
|
+
(E === "tap" || e.isPrimary) && N();
|
|
287
319
|
}]
|
|
288
320
|
];
|
|
289
|
-
function
|
|
290
|
-
|
|
291
|
-
for (let [e, t] of
|
|
321
|
+
function F() {
|
|
322
|
+
E && N(), E = "down", g && V();
|
|
323
|
+
for (let [e, t] of P) window.addEventListener(e, t, !0);
|
|
292
324
|
}
|
|
293
325
|
Z(n, (e, t, n) => {
|
|
294
|
-
e && (e.addEventListener("pointerdown",
|
|
326
|
+
e && (e.addEventListener("pointerdown", F, !0), n(() => e.removeEventListener("pointerdown", F, !0)));
|
|
295
327
|
}, {
|
|
296
328
|
immediate: !0,
|
|
297
329
|
flush: "sync"
|
|
298
330
|
});
|
|
299
|
-
let
|
|
300
|
-
function F() {
|
|
301
|
-
c() && (d.value = "pinned"), s && P !== d.value && s(d.value, P), P = d.value;
|
|
302
|
-
}
|
|
303
|
-
function I() {
|
|
304
|
-
m &&= (clearTimeout(m), null);
|
|
305
|
-
}
|
|
331
|
+
let I = f.value;
|
|
306
332
|
function L() {
|
|
307
|
-
|
|
333
|
+
l() && (f.value = "pinned"), c && I !== f.value && c(f.value, I), I = f.value;
|
|
308
334
|
}
|
|
309
335
|
function R() {
|
|
310
|
-
|
|
336
|
+
g &&= (clearTimeout(g), null);
|
|
311
337
|
}
|
|
312
338
|
function z() {
|
|
313
|
-
|
|
314
|
-
d.value = "collapsed", F();
|
|
315
|
-
}, t));
|
|
339
|
+
S !== null && (cancelAnimationFrame(S), S = null);
|
|
316
340
|
}
|
|
317
341
|
function B() {
|
|
318
|
-
|
|
319
|
-
|
|
342
|
+
z(), x?.();
|
|
343
|
+
}
|
|
344
|
+
function V() {
|
|
345
|
+
u() || _.value > 0 || (R(), g = setTimeout(() => {
|
|
346
|
+
f.value = "collapsed", L();
|
|
347
|
+
}, t));
|
|
348
|
+
}
|
|
349
|
+
function H() {
|
|
350
|
+
if (l()) {
|
|
351
|
+
f.value = "pinned", L();
|
|
320
352
|
return;
|
|
321
353
|
}
|
|
322
|
-
|
|
354
|
+
C ||= (C = !0, R(), T(), f.value = "collapsed", L(), !1);
|
|
323
355
|
}
|
|
324
|
-
function
|
|
325
|
-
if (
|
|
326
|
-
|
|
356
|
+
function ee() {
|
|
357
|
+
if (l()) {
|
|
358
|
+
f.value = "pinned", L();
|
|
327
359
|
return;
|
|
328
360
|
}
|
|
329
|
-
|
|
361
|
+
R(), T(), f.value = "hover", L();
|
|
330
362
|
}
|
|
331
|
-
function
|
|
332
|
-
|
|
333
|
-
if (
|
|
334
|
-
if (
|
|
335
|
-
|
|
363
|
+
function U() {
|
|
364
|
+
u() || d() || (R(), f.value === "collapsed" && (T(), w = setTimeout(() => {
|
|
365
|
+
if (w = null, !u() && f.value === "collapsed") {
|
|
366
|
+
if (k()) {
|
|
367
|
+
D ??= "hover";
|
|
336
368
|
return;
|
|
337
369
|
}
|
|
338
|
-
|
|
370
|
+
f.value = "hover", L();
|
|
339
371
|
}
|
|
340
372
|
}, 60)));
|
|
341
373
|
}
|
|
342
|
-
function
|
|
343
|
-
if (!
|
|
344
|
-
if (
|
|
374
|
+
function W(e) {
|
|
375
|
+
if (!(u() || d()) && (T(), D === "hover" && (D = null), f.value === "hover")) {
|
|
376
|
+
if (_.value > 0) return;
|
|
345
377
|
if (e) {
|
|
346
378
|
let t = n.value;
|
|
347
|
-
if (t && e.relatedTarget instanceof Node && t.contains(e.relatedTarget) ||
|
|
379
|
+
if (t && e.relatedTarget instanceof Node && t.contains(e.relatedTarget) || Q(e.relatedTarget, s)) return;
|
|
348
380
|
}
|
|
349
|
-
|
|
381
|
+
V();
|
|
350
382
|
}
|
|
351
383
|
}
|
|
352
|
-
function
|
|
353
|
-
if (!
|
|
354
|
-
if (
|
|
355
|
-
|
|
384
|
+
function G() {
|
|
385
|
+
if (!(u() || d()) && (R(), f.value === "collapsed")) {
|
|
386
|
+
if (k()) {
|
|
387
|
+
D = "focus";
|
|
356
388
|
return;
|
|
357
389
|
}
|
|
358
|
-
|
|
390
|
+
f.value = "hover", L();
|
|
359
391
|
}
|
|
360
392
|
}
|
|
361
|
-
function
|
|
362
|
-
if (
|
|
363
|
-
let t = e.currentTarget, n = !!e.relatedTarget && t.contains(e.relatedTarget) ||
|
|
364
|
-
!n &&
|
|
393
|
+
function ne(e) {
|
|
394
|
+
if (u()) return;
|
|
395
|
+
let t = e.currentTarget, n = !!e.relatedTarget && t.contains(e.relatedTarget) || Q(e.relatedTarget, s);
|
|
396
|
+
if (!n && D === "focus" && (D = null), d()) {
|
|
397
|
+
if (!m.value || _.value > 0 || n || !e.relatedTarget) return;
|
|
398
|
+
H();
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
f.value === "hover" && (_.value > 0 || n || V());
|
|
365
402
|
}
|
|
366
|
-
function
|
|
367
|
-
|
|
403
|
+
function q() {
|
|
404
|
+
u() || (R(), T(), f.value = "pinned", L());
|
|
368
405
|
}
|
|
369
|
-
function
|
|
370
|
-
|
|
406
|
+
function re(e = "morph") {
|
|
407
|
+
_.value++, e === "grasp" && v.value++, R();
|
|
371
408
|
}
|
|
372
|
-
function
|
|
373
|
-
e === "grasp" && (
|
|
374
|
-
|
|
409
|
+
function J(e = "morph") {
|
|
410
|
+
e === "grasp" && (v.value = Math.max(0, v.value - 1)), _.value = Math.max(0, _.value - 1), _.value === 0 && f.value === "hover" && (R(), g = setTimeout(() => {
|
|
411
|
+
_.value === 0 && f.value === "hover" && V();
|
|
375
412
|
}, Math.min(t, 800)));
|
|
376
413
|
}
|
|
377
|
-
function
|
|
378
|
-
if (
|
|
414
|
+
function Y(e) {
|
|
415
|
+
if (u() || _.value > 0 || o?.value) return;
|
|
379
416
|
let t = n.value;
|
|
380
|
-
!t || t.contains(e.target) ||
|
|
417
|
+
!t || t.contains(e.target) || Q(e.target, s) || H();
|
|
381
418
|
}
|
|
382
|
-
return Z(
|
|
419
|
+
return Z(m, (e) => {
|
|
383
420
|
if (e) {
|
|
384
421
|
if (typeof document > "u") return;
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
document.removeEventListener("pointerdown",
|
|
422
|
+
B(), S = requestAnimationFrame(() => {
|
|
423
|
+
S = null, m.value && (document.addEventListener("pointerdown", Y, !0), x = () => {
|
|
424
|
+
document.removeEventListener("pointerdown", Y, !0), x = null;
|
|
388
425
|
});
|
|
389
426
|
});
|
|
390
|
-
} else
|
|
391
|
-
}, { immediate: !0 }), typeof r == "boolean" ? r && (
|
|
427
|
+
} else B();
|
|
428
|
+
}, { immediate: !0 }), typeof r == "boolean" ? r && (f.value = "pinned", L()) : Z(r, (e) => {
|
|
392
429
|
if (e) {
|
|
393
|
-
|
|
430
|
+
R(), f.value = "pinned", L();
|
|
394
431
|
return;
|
|
395
432
|
}
|
|
396
|
-
|
|
397
|
-
}),
|
|
398
|
-
|
|
433
|
+
f.value = "collapsed", L();
|
|
434
|
+
}), f.value === "hover" && V(), te(() => {
|
|
435
|
+
R(), T(), B(), N();
|
|
399
436
|
}), {
|
|
400
|
-
state:
|
|
401
|
-
expanded:
|
|
402
|
-
isPinned:
|
|
403
|
-
isHeld:
|
|
404
|
-
graspHeld:
|
|
405
|
-
onMouseEnter:
|
|
406
|
-
onMouseLeave:
|
|
407
|
-
onFocusIn:
|
|
408
|
-
onFocusOut:
|
|
409
|
-
onClickCollapsed:
|
|
410
|
-
keepOpen:
|
|
411
|
-
release:
|
|
412
|
-
expand:
|
|
413
|
-
collapse:
|
|
437
|
+
state: f,
|
|
438
|
+
expanded: m,
|
|
439
|
+
isPinned: h,
|
|
440
|
+
isHeld: y,
|
|
441
|
+
graspHeld: b,
|
|
442
|
+
onMouseEnter: U,
|
|
443
|
+
onMouseLeave: W,
|
|
444
|
+
onFocusIn: G,
|
|
445
|
+
onFocusOut: ne,
|
|
446
|
+
onClickCollapsed: q,
|
|
447
|
+
keepOpen: re,
|
|
448
|
+
release: J,
|
|
449
|
+
expand: ee,
|
|
450
|
+
collapse: H
|
|
414
451
|
};
|
|
415
452
|
}
|
|
416
453
|
//#endregion
|
|
417
454
|
//#region src/components/dock/composables/useDockSpring.ts
|
|
418
|
-
function
|
|
455
|
+
function Ae(e) {
|
|
419
456
|
let t = null, n = () => t !== null && !t.settled;
|
|
420
|
-
function
|
|
457
|
+
function r() {
|
|
421
458
|
t &&= (t.dispose(), null);
|
|
422
459
|
}
|
|
423
460
|
function a(a, o, s) {
|
|
424
461
|
let c = n() ? t.velocity * (s.inheritVelocityScale ?? 1) : 0;
|
|
425
|
-
|
|
426
|
-
let l = new
|
|
427
|
-
response: e.response *
|
|
462
|
+
r();
|
|
463
|
+
let l = new de({
|
|
464
|
+
response: e.response * i(),
|
|
428
465
|
dampingFraction: e.dampingFraction,
|
|
429
466
|
initial: a,
|
|
430
467
|
respectReducedMotion: !0
|
|
431
468
|
});
|
|
432
469
|
t = l, l.reset(a, c), l.target = o, l.play((e, n) => {
|
|
433
|
-
s.onFrame(e, n), l.settled && (s.onSettle?.(), t === l &&
|
|
470
|
+
s.onFrame(e, n), l.settled && (s.onSettle?.(), t === l && r());
|
|
434
471
|
});
|
|
435
472
|
}
|
|
436
473
|
function o(e) {
|
|
@@ -445,28 +482,28 @@ function Ie(e) {
|
|
|
445
482
|
get velocity() {
|
|
446
483
|
return n() ? t.velocity : 0;
|
|
447
484
|
},
|
|
448
|
-
dispose:
|
|
485
|
+
dispose: r
|
|
449
486
|
};
|
|
450
487
|
}
|
|
451
488
|
//#endregion
|
|
452
489
|
//#region src/components/dock/composables/useDockMorph.ts
|
|
453
|
-
function
|
|
454
|
-
let { rootEl: t, outerActiveLayer: n, geometry: r } = e, i =
|
|
455
|
-
response:
|
|
456
|
-
dampingFraction:
|
|
457
|
-
}), s =
|
|
490
|
+
function je(e) {
|
|
491
|
+
let { rootEl: t, outerActiveLayer: n, geometry: r } = e, i = K(n.value), a = K(null), o = Ae({
|
|
492
|
+
response: l.response,
|
|
493
|
+
dampingFraction: l.dampingFraction
|
|
494
|
+
}), s = fe("(prefers-reduced-motion: reduce)");
|
|
458
495
|
function c() {
|
|
459
496
|
return t.value;
|
|
460
497
|
}
|
|
461
|
-
function
|
|
498
|
+
function u() {
|
|
462
499
|
a.value = null;
|
|
463
500
|
let t = c();
|
|
464
501
|
t && (t.removeAttribute("data-morphing"), t.style.removeProperty("--dock-morph-t"), r.release()), e.onMorphActiveChange?.(!1), o.dispose();
|
|
465
502
|
}
|
|
466
503
|
Z(s, (e) => {
|
|
467
|
-
e && c()?.hasAttribute("data-morphing") &&
|
|
504
|
+
e && c()?.hasAttribute("data-morphing") && u();
|
|
468
505
|
});
|
|
469
|
-
function
|
|
506
|
+
function d() {
|
|
470
507
|
let t = c();
|
|
471
508
|
if (!t) return;
|
|
472
509
|
e.onMorphActiveChange?.(!0), t.setAttribute("data-morphing", "");
|
|
@@ -476,19 +513,19 @@ function Le(e) {
|
|
|
476
513
|
onFrame: (e) => {
|
|
477
514
|
c()?.style.setProperty("--dock-morph-t", `${e}`);
|
|
478
515
|
},
|
|
479
|
-
onSettle:
|
|
516
|
+
onSettle: u
|
|
480
517
|
});
|
|
481
518
|
}
|
|
482
519
|
let f = Z(n, (e, t) => {
|
|
483
520
|
e !== t && (c() && r.first(), i.value = e, a.value = c() ? t : null);
|
|
484
521
|
}), p = Z(n, (e, t) => {
|
|
485
|
-
e === t || !c() || (r.measure(),
|
|
522
|
+
e === t || !c() || (r.measure(), d());
|
|
486
523
|
}, { flush: "post" });
|
|
487
|
-
return
|
|
524
|
+
return te(() => {
|
|
488
525
|
f(), p(), o.dispose();
|
|
489
526
|
}), {
|
|
490
|
-
outerCurrentLayer:
|
|
491
|
-
outerLeavingLayer:
|
|
527
|
+
outerCurrentLayer: G(i),
|
|
528
|
+
outerLeavingLayer: G(a)
|
|
492
529
|
};
|
|
493
530
|
}
|
|
494
531
|
//#endregion
|
|
@@ -496,7 +533,7 @@ function Le(e) {
|
|
|
496
533
|
function $(e, t) {
|
|
497
534
|
return t === "vertical" ? e.offsetHeight : e.offsetWidth;
|
|
498
535
|
}
|
|
499
|
-
function
|
|
536
|
+
function Me(e, t) {
|
|
500
537
|
let n = e.map(([e, t]) => [
|
|
501
538
|
e,
|
|
502
539
|
t,
|
|
@@ -510,7 +547,7 @@ function Re(e, t) {
|
|
|
510
547
|
for (let [e, t, r, i] of n.reverse()) r ? e.style.setProperty(t, r, i) : e.style.removeProperty(t);
|
|
511
548
|
}
|
|
512
549
|
}
|
|
513
|
-
function
|
|
550
|
+
function Ne(e, t) {
|
|
514
551
|
let n = e.scrollLeft, r = e.scrollTop;
|
|
515
552
|
try {
|
|
516
553
|
return t();
|
|
@@ -522,9 +559,9 @@ function ze(e, t) {
|
|
|
522
559
|
});
|
|
523
560
|
}
|
|
524
561
|
}
|
|
525
|
-
function
|
|
562
|
+
function Pe(e, t, n, r, i, a) {
|
|
526
563
|
let o = i === "vertical" ? "margin-block-end" : "margin-inline-end";
|
|
527
|
-
return
|
|
564
|
+
return Me([
|
|
528
565
|
[
|
|
529
566
|
e,
|
|
530
567
|
"--dock-expanded-px",
|
|
@@ -551,14 +588,14 @@ function Be(e, t, n, r, i, a) {
|
|
|
551
588
|
let s = a - (r - $(t, i));
|
|
552
589
|
if (Math.abs(s) < .5) return r;
|
|
553
590
|
let c = Number.parseFloat(getComputedStyle(n).getPropertyValue(o)) || 0;
|
|
554
|
-
return
|
|
591
|
+
return Me([[
|
|
555
592
|
n,
|
|
556
593
|
o,
|
|
557
594
|
`${c + s}px`
|
|
558
595
|
]], () => $(e, i));
|
|
559
596
|
});
|
|
560
597
|
}
|
|
561
|
-
function
|
|
598
|
+
function Fe(e, t) {
|
|
562
599
|
let n = e.getBoundingClientRect();
|
|
563
600
|
return t === "vertical" ? {
|
|
564
601
|
start: n.top,
|
|
@@ -568,33 +605,33 @@ function Ve(e, t) {
|
|
|
568
605
|
size: n.width
|
|
569
606
|
};
|
|
570
607
|
}
|
|
571
|
-
var
|
|
572
|
-
function
|
|
608
|
+
var Ie = "--dock-morph-origin", Le = "--dock-pane-shift", Re = 2;
|
|
609
|
+
function ze(e, t) {
|
|
573
610
|
let n = getComputedStyle(e), r = e.parentElement;
|
|
574
611
|
if (!r) return "";
|
|
575
612
|
let i = getComputedStyle(r);
|
|
576
613
|
return t === "vertical" ? `${r.clientHeight - parseFloat(i.paddingTop) - parseFloat(i.paddingBottom)} ${n.minHeight} ${n.maxHeight} ${window.innerHeight}` : `${r.clientWidth - parseFloat(i.paddingLeft) - parseFloat(i.paddingRight)} ${n.minWidth} ${n.maxWidth} ${window.innerWidth}`;
|
|
577
614
|
}
|
|
578
|
-
function
|
|
579
|
-
let { rootEl: t, contentEl: n, expandedEl: r, collapsedEl: i, axis: a } = e, o = null, s = null, c = null, l =
|
|
580
|
-
function
|
|
615
|
+
function Be(e) {
|
|
616
|
+
let { rootEl: t, contentEl: n, expandedEl: r, collapsedEl: i, axis: a } = e, o = null, s = null, c = null, l = null, u = null, d = null, f = null, p = null, m = "", h = !1, g = !1;
|
|
617
|
+
function _() {
|
|
581
618
|
let e = t.value, o = n.value, s = r.value, c = i.value;
|
|
582
619
|
if (!e || !o || !s || !c) return;
|
|
583
|
-
let l = a.value,
|
|
584
|
-
if (!
|
|
585
|
-
let
|
|
586
|
-
|
|
620
|
+
let l = a.value, g = s.classList.contains("is-active"), _ = e.hasAttribute("data-morphing"), v = _ ? 0 : $(e, l);
|
|
621
|
+
if (!_) {
|
|
622
|
+
let e = v - $(o, l);
|
|
623
|
+
g ? u = e : d = e;
|
|
587
624
|
}
|
|
588
|
-
let
|
|
589
|
-
if (!
|
|
625
|
+
let x = !_ && g ? v : Ne(s, () => Pe(e, o, s, c, l, u));
|
|
626
|
+
if (!_) p = x, m = "", h = !1;
|
|
590
627
|
else {
|
|
591
|
-
let t =
|
|
592
|
-
|
|
628
|
+
let t = ze(e, l);
|
|
629
|
+
m ||= t, h ||= t !== m, !h && p !== null && Math.abs(x - p) <= Re && (x = p);
|
|
593
630
|
}
|
|
594
|
-
|
|
631
|
+
b(e, s, _ && x !== p && u !== null && y !== null ? x - u - y : void 0), g || (f = _ ? Ne(s, () => Pe(e, o, c, s, l, d)) : v), !(x <= 0) && (f !== null && f > 0 && e.style.setProperty("--dock-collapsed-px", `${f}px`), e.style.setProperty("--dock-expanded-px", `${Math.max(x, f ?? 0)}px`));
|
|
595
632
|
}
|
|
596
|
-
let
|
|
597
|
-
function
|
|
633
|
+
let v = "", y = null;
|
|
634
|
+
function b(e, t, r) {
|
|
598
635
|
if (!t.classList.contains("is-active")) return;
|
|
599
636
|
let i = e.hasAttribute("data-morphing");
|
|
600
637
|
if (i && r === void 0) return;
|
|
@@ -605,11 +642,11 @@ function Ke(e) {
|
|
|
605
642
|
s = Math.min(s, n), c = Math.max(c, n + (o ? e.offsetWidth : e.offsetHeight));
|
|
606
643
|
}
|
|
607
644
|
let l = o ? t.clientWidth : t.clientHeight, u = n.value;
|
|
608
|
-
!i && u && (
|
|
645
|
+
!i && u && (y = $(u, a.value) - l);
|
|
609
646
|
let d = r ?? l, f = c > s && c - s <= d, p = !o && f ? `${Math.floor((d - (c - s)) / 2 * 100) / 100}px` : "", m = `${f ? "1" : "0"} ${p}`;
|
|
610
|
-
m !==
|
|
647
|
+
m !== v && (v = m, p ? e.style.setProperty("--dock-run-room-block", p) : e.style.removeProperty("--dock-run-room-block"), e.toggleAttribute("data-run-fits", f));
|
|
611
648
|
}
|
|
612
|
-
function
|
|
649
|
+
function x() {
|
|
613
650
|
if (!o) return;
|
|
614
651
|
o.disconnect();
|
|
615
652
|
let e = [r.value, i.value], a = t.value;
|
|
@@ -621,66 +658,44 @@ function Ke(e) {
|
|
|
621
658
|
]) t && o.observe(t);
|
|
622
659
|
for (let t of e) for (let e of t?.children ?? []) o.observe(e);
|
|
623
660
|
}
|
|
624
|
-
function
|
|
661
|
+
function S(e, t, n) {
|
|
625
662
|
let r = a.value === "vertical" ? t : n;
|
|
626
663
|
e.style.setProperty("--dock-plate-cross-px", `${r}px`);
|
|
627
664
|
}
|
|
628
|
-
function
|
|
665
|
+
function C(e) {
|
|
629
666
|
let t = e.querySelector(":scope > .dock-plate");
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
}
|
|
635
|
-
let D = `[${y}]:not(.dock-trigger)`, O = "";
|
|
636
|
-
function k(e) {
|
|
637
|
-
let t = 0, n = 0;
|
|
638
|
-
for (let e of l.values()) t = Math.max(t, e.inline), n = Math.max(n, e.block);
|
|
639
|
-
let r = `${t} ${n}`;
|
|
640
|
-
r !== O && (O = r, e.style.setProperty("--dock-seat-max-inline-px", `${t}px`), e.style.setProperty("--dock-seat-max-block-px", `${n}px`));
|
|
641
|
-
}
|
|
642
|
-
function A() {
|
|
643
|
-
let e = t.value, n = r.value;
|
|
644
|
-
if (!e || !n) return;
|
|
645
|
-
let i = new Set(n.querySelectorAll(D));
|
|
646
|
-
i.size > 0 && !c && typeof ResizeObserver < "u" && (c = new ResizeObserver((t) => {
|
|
647
|
-
for (let e of t) {
|
|
648
|
-
let t = e.borderBoxSize?.[0];
|
|
649
|
-
t && l.has(e.target) && l.set(e.target, {
|
|
650
|
-
inline: t.inlineSize,
|
|
651
|
-
block: t.blockSize
|
|
652
|
-
});
|
|
667
|
+
if (t) {
|
|
668
|
+
if (typeof ResizeObserver > "u") {
|
|
669
|
+
S(e, t.offsetWidth, t.offsetHeight);
|
|
670
|
+
return;
|
|
653
671
|
}
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
block: e.offsetHeight
|
|
660
|
-
}), c?.observe(e));
|
|
661
|
-
k(e);
|
|
672
|
+
s = new ResizeObserver(([t]) => {
|
|
673
|
+
let n = t?.borderBoxSize?.[0];
|
|
674
|
+
n && S(e, n.inlineSize, n.blockSize);
|
|
675
|
+
}), s.observe(t);
|
|
676
|
+
}
|
|
662
677
|
}
|
|
663
|
-
function
|
|
664
|
-
o?.disconnect(), o = null, s?.disconnect(), s = null, c?.disconnect(), c = null,
|
|
678
|
+
function w() {
|
|
679
|
+
o?.disconnect(), o = null, s?.disconnect(), s = null, c?.disconnect(), c = null, l?.disconnect(), l = null, v = "", y = null, p = null, m = "", h = !1;
|
|
665
680
|
let e = t.value;
|
|
666
681
|
if (e) {
|
|
667
|
-
if (typeof ResizeObserver < "u" && (o = new ResizeObserver(() =>
|
|
668
|
-
|
|
669
|
-
|
|
682
|
+
if (typeof ResizeObserver < "u" && (o = new ResizeObserver(() => _()), x()), C(e), typeof MutationObserver < "u") {
|
|
683
|
+
c = new MutationObserver(() => {
|
|
684
|
+
x(), o || _();
|
|
670
685
|
});
|
|
671
|
-
for (let e of [r.value, i.value]) e &&
|
|
686
|
+
for (let e of [r.value, i.value]) e && c.observe(e, {
|
|
672
687
|
childList: !0,
|
|
673
688
|
subtree: !0,
|
|
674
689
|
characterData: !0
|
|
675
690
|
});
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
}),
|
|
691
|
+
l = new MutationObserver(() => {
|
|
692
|
+
h || !m || !e.hasAttribute("data-morphing") || ze(e, a.value) !== m && _();
|
|
693
|
+
}), l.observe(e, {
|
|
679
694
|
attributes: !0,
|
|
680
695
|
attributeFilter: ["style", "class"]
|
|
681
696
|
});
|
|
682
697
|
}
|
|
683
|
-
|
|
698
|
+
o || _();
|
|
684
699
|
}
|
|
685
700
|
}
|
|
686
701
|
Z([
|
|
@@ -689,52 +704,52 @@ function Ke(e) {
|
|
|
689
704
|
r,
|
|
690
705
|
i,
|
|
691
706
|
a
|
|
692
|
-
],
|
|
693
|
-
let
|
|
694
|
-
typeof window < "u" && window.addEventListener("resize",
|
|
695
|
-
let
|
|
696
|
-
|
|
697
|
-
|
|
707
|
+
], w, { immediate: !0 });
|
|
708
|
+
let T = () => _();
|
|
709
|
+
typeof window < "u" && window.addEventListener("resize", T);
|
|
710
|
+
let E = typeof document < "u" ? document.fonts : void 0;
|
|
711
|
+
E && E.ready.then(() => !g && _()), U(() => {
|
|
712
|
+
g = !0, o?.disconnect(), o = null, s?.disconnect(), s = null, c?.disconnect(), c = null, l?.disconnect(), l = null, typeof window < "u" && window.removeEventListener("resize", T);
|
|
698
713
|
});
|
|
699
|
-
let
|
|
700
|
-
function
|
|
714
|
+
let D = null, O = null;
|
|
715
|
+
function k(e) {
|
|
701
716
|
return [...e.querySelectorAll(":scope > .dock-controls > .dock-persistent")];
|
|
702
717
|
}
|
|
703
|
-
function
|
|
718
|
+
function A() {
|
|
704
719
|
return [r.value, i.value].filter((e) => !!e);
|
|
705
720
|
}
|
|
706
|
-
function
|
|
721
|
+
function j() {
|
|
707
722
|
let e = t.value;
|
|
708
723
|
if (!e) return;
|
|
709
724
|
let n = a.value;
|
|
710
|
-
|
|
725
|
+
D = new Map([
|
|
711
726
|
e,
|
|
712
|
-
...
|
|
713
|
-
...
|
|
714
|
-
].map((e) => [e,
|
|
727
|
+
...k(e),
|
|
728
|
+
...A()
|
|
729
|
+
].map((e) => [e, Fe(e, n)]));
|
|
715
730
|
let i = r.value;
|
|
716
|
-
|
|
731
|
+
O = i ? {
|
|
717
732
|
left: i.scrollLeft,
|
|
718
733
|
top: i.scrollTop
|
|
719
734
|
} : null;
|
|
720
735
|
}
|
|
721
|
-
function
|
|
736
|
+
function M() {
|
|
722
737
|
let e = t.value;
|
|
723
738
|
if (e) {
|
|
724
739
|
for (let t of [
|
|
725
740
|
e,
|
|
726
|
-
...
|
|
741
|
+
...k(e),
|
|
727
742
|
n.value
|
|
728
|
-
]) t?.style.removeProperty(
|
|
729
|
-
for (let e of
|
|
730
|
-
r.value &&
|
|
743
|
+
]) t?.style.removeProperty(Ie);
|
|
744
|
+
for (let e of A()) e.style.removeProperty(Le);
|
|
745
|
+
r.value && b(e, r.value);
|
|
731
746
|
}
|
|
732
747
|
}
|
|
733
|
-
function
|
|
734
|
-
let e = r.value, t =
|
|
735
|
-
|
|
748
|
+
function N() {
|
|
749
|
+
let e = r.value, t = O;
|
|
750
|
+
O = null;
|
|
736
751
|
try {
|
|
737
|
-
|
|
752
|
+
P();
|
|
738
753
|
} finally {
|
|
739
754
|
e?.classList.contains("is-leaving") && t && (e.scrollLeft !== t.left || e.scrollTop !== t.top) && e.scrollTo({
|
|
740
755
|
left: t.left,
|
|
@@ -743,10 +758,10 @@ function Ke(e) {
|
|
|
743
758
|
});
|
|
744
759
|
}
|
|
745
760
|
}
|
|
746
|
-
function
|
|
747
|
-
let e = t.value, i = n.value, o =
|
|
748
|
-
if (
|
|
749
|
-
let s = a.value, c =
|
|
761
|
+
function P() {
|
|
762
|
+
let e = t.value, i = n.value, o = D;
|
|
763
|
+
if (D = null, M(), !e || !i || !o || !o.get(e)) return;
|
|
764
|
+
let s = a.value, c = k(e), l = Fe(e, s), u = [
|
|
750
765
|
e,
|
|
751
766
|
...c,
|
|
752
767
|
i
|
|
@@ -758,10 +773,10 @@ function Ke(e) {
|
|
|
758
773
|
e,
|
|
759
774
|
...c,
|
|
760
775
|
i,
|
|
761
|
-
...
|
|
762
|
-
].map((e) => [e,
|
|
776
|
+
...A()
|
|
777
|
+
].map((e) => [e, Fe(e, s)])), f = Me(u, d), p = f.get(e), m = $(e, s), h = p.size / m;
|
|
763
778
|
if (!(h > 0)) return;
|
|
764
|
-
let g = (e) => Math.abs(1 - e) < 1e-4, _ = l.size / p.size, v = !r.value?.classList.contains("is-active") || g(_) ?
|
|
779
|
+
let g = (e) => Math.abs(1 - e) < 1e-4, _ = l.size / p.size, v = !r.value?.classList.contains("is-active") || g(_) ? Me([
|
|
765
780
|
...u,
|
|
766
781
|
[
|
|
767
782
|
e,
|
|
@@ -776,50 +791,50 @@ function Ke(e) {
|
|
|
776
791
|
], d) : null, y = o;
|
|
777
792
|
if (v && g(_) && (y = v, _ = v.get(e).size / p.size), !Number.isFinite(_)) return;
|
|
778
793
|
let b = (e) => (e - p.start) / h, x = (e, t) => g(_) ? null : (e - t) / (1 - _), S = (e) => b(e.start + e.size / 2), C = x(b(y.get(e).start), 0) ?? m / 2, w = (e, t) => `${e / t * 100}%`;
|
|
779
|
-
e.style.setProperty(
|
|
794
|
+
e.style.setProperty(Ie, w(C, m));
|
|
780
795
|
for (let e of c) {
|
|
781
796
|
let t = y.get(e), n = f.get(e), r = $(e, s);
|
|
782
797
|
if (!t || !(r > 0)) continue;
|
|
783
798
|
let i = x(S(t), S(n));
|
|
784
|
-
e.style.setProperty(
|
|
799
|
+
e.style.setProperty(Ie, w((i === null ? C : C - i) - b(n.start), r));
|
|
785
800
|
}
|
|
786
801
|
let T = $(i, s);
|
|
787
|
-
T > 0 && i.style.setProperty(
|
|
788
|
-
for (let t of
|
|
802
|
+
T > 0 && i.style.setProperty(Ie, w(C - b(f.get(i).start), T));
|
|
803
|
+
for (let t of A()) {
|
|
789
804
|
let n = t.classList.contains("is-leaving"), r = n ? o.get(t) : v?.get(t), i = $(t, s);
|
|
790
805
|
if (!r || !(i > 0)) continue;
|
|
791
|
-
let a = n ? f.get(t) :
|
|
806
|
+
let a = n ? f.get(t) : Me([[
|
|
792
807
|
e,
|
|
793
808
|
"--dock-morph-t",
|
|
794
809
|
"1"
|
|
795
|
-
]], () =>
|
|
796
|
-
a && t.style.setProperty(
|
|
810
|
+
]], () => Fe(t, s));
|
|
811
|
+
a && t.style.setProperty(Le, w((r.start - a.start) / h, i));
|
|
797
812
|
}
|
|
798
813
|
}
|
|
799
814
|
return {
|
|
800
|
-
measure:
|
|
801
|
-
first:
|
|
802
|
-
anchor:
|
|
803
|
-
release:
|
|
815
|
+
measure: _,
|
|
816
|
+
first: j,
|
|
817
|
+
anchor: N,
|
|
818
|
+
release: M
|
|
804
819
|
};
|
|
805
820
|
}
|
|
806
821
|
//#endregion
|
|
807
822
|
//#region src/components/dock/composables/useDockShellProps.ts
|
|
808
|
-
function
|
|
809
|
-
let t =
|
|
823
|
+
function Ve(e) {
|
|
824
|
+
let t = A(() => e.shape ?? "pill"), n = A(() => e.orientation ?? "horizontal"), r = A(() => e.collapse === !1);
|
|
810
825
|
return {
|
|
811
|
-
startCollapsed:
|
|
826
|
+
startCollapsed: A(() => !r.value && (e.collapse ?? "closed") === "closed"),
|
|
812
827
|
shape: t,
|
|
813
828
|
orientation: n,
|
|
814
829
|
alwaysExpanded: r,
|
|
815
|
-
fitContent:
|
|
830
|
+
fitContent: A(() => e.fitContent ?? !1)
|
|
816
831
|
};
|
|
817
832
|
}
|
|
818
833
|
//#endregion
|
|
819
834
|
//#region src/components/dock/composables/useDockClickIntegrity.ts
|
|
820
|
-
var
|
|
821
|
-
function
|
|
822
|
-
let { rootEl: t, visualExpanded: n } = e, r = null, i = !1, a = 0, o = null, s =
|
|
835
|
+
var He = 6;
|
|
836
|
+
function Ue(e) {
|
|
837
|
+
let { rootEl: t, visualExpanded: n } = e, r = null, i = !1, a = 0, o = null, s = K(null), c = null, l = null, u = -Infinity, d = !1, f = !1;
|
|
823
838
|
function p(e) {
|
|
824
839
|
c = {
|
|
825
840
|
x: e.clientX,
|
|
@@ -836,7 +851,7 @@ function Ye(e) {
|
|
|
836
851
|
flush: "sync"
|
|
837
852
|
});
|
|
838
853
|
function m(e) {
|
|
839
|
-
return f ? d || !l ? !0 : Math.hypot(e.clientX - l.x, e.clientY - l.y) >
|
|
854
|
+
return f ? d || !l ? !0 : Math.hypot(e.clientX - l.x, e.clientY - l.y) > He : !1;
|
|
840
855
|
}
|
|
841
856
|
let h = null, g = [];
|
|
842
857
|
function _() {
|
|
@@ -911,42 +926,42 @@ function Ye(e) {
|
|
|
911
926
|
}
|
|
912
927
|
e.stopPropagation(), e.preventDefault(), r = null;
|
|
913
928
|
}
|
|
914
|
-
return
|
|
929
|
+
return H(() => {
|
|
915
930
|
y(), _();
|
|
916
931
|
}), {
|
|
917
932
|
onPointerDownCapture: w,
|
|
918
933
|
onPointerCancelCapture: T,
|
|
919
934
|
onClickCapture: D,
|
|
920
935
|
markExpandFlip: b,
|
|
921
|
-
pressKeepaliveLayer:
|
|
936
|
+
pressKeepaliveLayer: G(s)
|
|
922
937
|
};
|
|
923
938
|
}
|
|
924
939
|
//#endregion
|
|
925
940
|
//#region src/components/dock/composables/useDockRun.ts
|
|
926
|
-
function
|
|
941
|
+
function We(e) {
|
|
927
942
|
return Array.from(e.children).filter((e) => e instanceof HTMLElement);
|
|
928
943
|
}
|
|
929
|
-
function
|
|
944
|
+
function Ge(e) {
|
|
930
945
|
return e.findIndex((e) => {
|
|
931
946
|
let t = (e.matches("[aria-current]") ? e : e.querySelector("[aria-current]"))?.getAttribute("aria-current");
|
|
932
947
|
return t != null && t !== "false";
|
|
933
948
|
});
|
|
934
949
|
}
|
|
935
|
-
function
|
|
936
|
-
return e.hasAttribute(
|
|
950
|
+
function Ke(e) {
|
|
951
|
+
return e.hasAttribute(u);
|
|
937
952
|
}
|
|
938
|
-
function
|
|
939
|
-
return
|
|
953
|
+
function qe(e) {
|
|
954
|
+
return We(e).filter(Ke);
|
|
940
955
|
}
|
|
941
|
-
var
|
|
942
|
-
function
|
|
943
|
-
let t =
|
|
944
|
-
return t.length > 0 && t.every(
|
|
956
|
+
var Je = ".dock-separator", Ye = "select[aria-hidden=\"true\"][tabindex=\"-1\"]";
|
|
957
|
+
function Xe(e) {
|
|
958
|
+
let t = We(e).filter((e) => !e.matches(Je) && !e.matches(Ye));
|
|
959
|
+
return t.length > 0 && t.every(Ke);
|
|
945
960
|
}
|
|
946
|
-
function
|
|
947
|
-
let { runEl: t, statusEl: n, orientation: r } = e, i =
|
|
948
|
-
response:
|
|
949
|
-
dampingFraction:
|
|
961
|
+
function Ze(e) {
|
|
962
|
+
let { runEl: t, statusEl: n, orientation: r } = e, i = K(!1), a = Ae({
|
|
963
|
+
response: l.response,
|
|
964
|
+
dampingFraction: l.dampingFraction
|
|
950
965
|
});
|
|
951
966
|
function o() {
|
|
952
967
|
return r.value === "vertical";
|
|
@@ -957,10 +972,10 @@ function rt(e) {
|
|
|
957
972
|
function c(e, t) {
|
|
958
973
|
o() ? e.scrollTop = t : e.scrollLeft = t;
|
|
959
974
|
}
|
|
960
|
-
function
|
|
975
|
+
function d(e) {
|
|
961
976
|
return o() ? e.scrollHeight - e.clientHeight : e.scrollWidth - e.clientWidth;
|
|
962
977
|
}
|
|
963
|
-
function
|
|
978
|
+
function f(e, t) {
|
|
964
979
|
let n = 0;
|
|
965
980
|
for (let r = t; r && r !== e;) {
|
|
966
981
|
n += o() ? r.offsetTop : r.offsetLeft;
|
|
@@ -969,32 +984,32 @@ function rt(e) {
|
|
|
969
984
|
}
|
|
970
985
|
return [n, n + (o() ? t.offsetHeight : t.offsetWidth)];
|
|
971
986
|
}
|
|
972
|
-
function
|
|
987
|
+
function p(e) {
|
|
973
988
|
let t = getComputedStyle(e);
|
|
974
989
|
return Number.parseFloat(o() ? t.paddingBlockStart : t.paddingInlineStart) || 0;
|
|
975
990
|
}
|
|
976
|
-
function p(e, t) {
|
|
977
|
-
let n = getComputedStyle(e), r = Number.parseFloat(o() ? n.scrollPaddingBlockStart : n.scrollPaddingInlineStart) || 0, [i] = u(e, t);
|
|
978
|
-
return Math.min(Math.max(i - r, 0), l(e));
|
|
979
|
-
}
|
|
980
991
|
function m(e, t) {
|
|
981
|
-
let n =
|
|
982
|
-
return
|
|
992
|
+
let n = getComputedStyle(e), r = Number.parseFloat(o() ? n.scrollPaddingBlockStart : n.scrollPaddingInlineStart) || 0, [i] = f(e, t);
|
|
993
|
+
return Math.min(Math.max(i - r, 0), d(e));
|
|
994
|
+
}
|
|
995
|
+
function h(e, t) {
|
|
996
|
+
let n = s(e), r = o() ? e.clientHeight : e.clientWidth, i = p(e), [a, c] = f(e, t), l = .5;
|
|
997
|
+
return a < n + i - l || c > n + r - i + l;
|
|
983
998
|
}
|
|
984
|
-
function
|
|
999
|
+
function g(e) {
|
|
985
1000
|
let t = n.value;
|
|
986
1001
|
if (!t) return;
|
|
987
|
-
let r =
|
|
1002
|
+
let r = Ke(e) ? e : e.querySelector(w) ?? e, i = r.getAttribute("aria-label") ?? r.getAttribute("title") ?? r.textContent?.trim();
|
|
988
1003
|
i && (t.textContent = i);
|
|
989
1004
|
}
|
|
990
|
-
function
|
|
1005
|
+
function _(e) {
|
|
991
1006
|
let n = t.value;
|
|
992
1007
|
if (!n) return;
|
|
993
|
-
if (
|
|
1008
|
+
if (g(e), !h(n, e)) {
|
|
994
1009
|
a.dispose();
|
|
995
1010
|
return;
|
|
996
1011
|
}
|
|
997
|
-
let r = s(n), i =
|
|
1012
|
+
let r = s(n), i = m(n, e);
|
|
998
1013
|
if (Math.abs(i - r) < 1) {
|
|
999
1014
|
a.dispose();
|
|
1000
1015
|
return;
|
|
@@ -1004,35 +1019,35 @@ function rt(e) {
|
|
|
1004
1019
|
n && c(n, r + (i - r) * e);
|
|
1005
1020
|
} });
|
|
1006
1021
|
}
|
|
1007
|
-
let
|
|
1008
|
-
function
|
|
1009
|
-
|
|
1022
|
+
let v = /* @__PURE__ */ new WeakMap();
|
|
1023
|
+
function y(e, t) {
|
|
1024
|
+
v.has(e) || v.set(e, e.getAttribute("tabindex")), e.tabIndex = t;
|
|
1010
1025
|
}
|
|
1011
1026
|
function b(e) {
|
|
1012
|
-
if (!
|
|
1013
|
-
let t =
|
|
1014
|
-
|
|
1027
|
+
if (!v.has(e)) return;
|
|
1028
|
+
let t = v.get(e) ?? null;
|
|
1029
|
+
v.delete(e), t === null ? e.removeAttribute("tabindex") : e.setAttribute("tabindex", t);
|
|
1015
1030
|
}
|
|
1016
1031
|
function x() {
|
|
1017
1032
|
let e = t.value;
|
|
1018
1033
|
if (!e) return;
|
|
1019
|
-
i.value =
|
|
1020
|
-
for (let t of
|
|
1021
|
-
let n =
|
|
1034
|
+
i.value = Xe(e);
|
|
1035
|
+
for (let t of We(e)) Ke(t) || b(t);
|
|
1036
|
+
let n = qe(e);
|
|
1022
1037
|
if (n.length === 0) return;
|
|
1023
|
-
let r =
|
|
1038
|
+
let r = Ge(n), a = n.findIndex((e) => e.contains(document.activeElement)), o = a >= 0 ? a : r >= 0 ? r : 0;
|
|
1024
1039
|
n.forEach((e, t) => {
|
|
1025
|
-
|
|
1040
|
+
y(e, t === o ? 0 : -1);
|
|
1026
1041
|
});
|
|
1027
1042
|
}
|
|
1028
1043
|
function S(e, t) {
|
|
1029
1044
|
let n = e[t];
|
|
1030
|
-
n && (
|
|
1045
|
+
n && (_(n), y(n, 0), n.focus({ preventScroll: !0 }), x());
|
|
1031
1046
|
}
|
|
1032
|
-
function
|
|
1047
|
+
function C(e) {
|
|
1033
1048
|
let n = t.value;
|
|
1034
1049
|
if (!n) return;
|
|
1035
|
-
let r =
|
|
1050
|
+
let r = qe(n);
|
|
1036
1051
|
if (r.length === 0) return;
|
|
1037
1052
|
let i = r.findIndex((t) => t.contains(e.target));
|
|
1038
1053
|
if (i < 0) return;
|
|
@@ -1055,56 +1070,68 @@ function rt(e) {
|
|
|
1055
1070
|
c < 0 || c >= r.length || (e.preventDefault(), S(r, c));
|
|
1056
1071
|
}
|
|
1057
1072
|
function T(e, t) {
|
|
1058
|
-
let n = (t instanceof Element ? t : t.parentElement)?.closest(`[${
|
|
1059
|
-
return n && n !== e && e.contains(n) ? n :
|
|
1073
|
+
let n = (t instanceof Element ? t : t.parentElement)?.closest(`[${u}]`);
|
|
1074
|
+
return n && n !== e && e.contains(n) ? n : We(e).find((e) => e.contains(t));
|
|
1060
1075
|
}
|
|
1061
1076
|
function E(e) {
|
|
1062
1077
|
let n = t.value;
|
|
1063
1078
|
if (!n) return;
|
|
1064
1079
|
let r = T(n, e.target);
|
|
1065
|
-
r &&
|
|
1080
|
+
r && _(r);
|
|
1066
1081
|
}
|
|
1067
|
-
|
|
1068
|
-
|
|
1082
|
+
function D(e) {
|
|
1083
|
+
let n = t.value;
|
|
1084
|
+
if (!n || e.ctrlKey) return;
|
|
1085
|
+
let i = r.value === "vertical", a = i ? e.deltaY : e.deltaX;
|
|
1086
|
+
if (a === 0) return;
|
|
1087
|
+
let o = i ? n.scrollTop : n.scrollLeft, s = i ? n.scrollHeight - n.clientHeight : n.scrollWidth - n.clientWidth;
|
|
1088
|
+
s <= 0 || (a > 0 && o >= s - .5 || a < 0 && o <= .5) && e.preventDefault();
|
|
1089
|
+
}
|
|
1090
|
+
let O = null;
|
|
1091
|
+
function k(e, t) {
|
|
1069
1092
|
if (t.type !== "attributes" || t.attributeName === "aria-current" || t.attributeName === "data-glass-dock-seat") return !0;
|
|
1070
1093
|
let n = t.target;
|
|
1071
|
-
return n.parentElement === e && !
|
|
1094
|
+
return n.parentElement === e && !Ke(n);
|
|
1072
1095
|
}
|
|
1073
|
-
return
|
|
1096
|
+
return ee(() => {
|
|
1074
1097
|
let e = t.value;
|
|
1075
|
-
e && (e.addEventListener("keydown",
|
|
1076
|
-
t.some((t) =>
|
|
1077
|
-
}),
|
|
1098
|
+
e && (e.addEventListener("keydown", C), e.addEventListener("wheel", D, { passive: !1 }), e.addEventListener("click", E, { capture: !0 }), e.addEventListener("focusin", E, { capture: !0 }), x(), O = new MutationObserver((t) => {
|
|
1099
|
+
t.some((t) => k(e, t)) && x();
|
|
1100
|
+
}), O.observe(e, {
|
|
1078
1101
|
childList: !0,
|
|
1079
1102
|
subtree: !0,
|
|
1080
1103
|
attributes: !0,
|
|
1081
1104
|
attributeFilter: [
|
|
1082
1105
|
"aria-current",
|
|
1083
|
-
|
|
1106
|
+
u,
|
|
1084
1107
|
"aria-hidden",
|
|
1085
1108
|
"tabindex"
|
|
1086
1109
|
]
|
|
1087
1110
|
}));
|
|
1088
|
-
}),
|
|
1111
|
+
}), te(() => {
|
|
1089
1112
|
let e = t.value;
|
|
1090
|
-
e?.removeEventListener("keydown",
|
|
1113
|
+
e?.removeEventListener("keydown", C), e?.removeEventListener("wheel", D), e?.removeEventListener("click", E, { capture: !0 }), e?.removeEventListener("focusin", E, { capture: !0 }), O?.disconnect(), a.dispose();
|
|
1091
1114
|
}), Z(r, () => x()), {
|
|
1092
|
-
reach:
|
|
1115
|
+
reach: _,
|
|
1093
1116
|
syncRoving: x,
|
|
1094
1117
|
toolbar: i
|
|
1095
1118
|
};
|
|
1096
1119
|
}
|
|
1097
1120
|
//#endregion
|
|
1098
1121
|
//#region src/components/dock/GlassDock.vue?vue&type=script&setup=true&lang.ts
|
|
1099
|
-
var
|
|
1122
|
+
var Qe = [
|
|
1123
|
+
"data-backdrop-mode",
|
|
1124
|
+
"data-anchor",
|
|
1125
|
+
"data-held"
|
|
1126
|
+
], $e = ["data-held"], et = { class: "dock-controls" }, tt = {
|
|
1100
1127
|
key: 0,
|
|
1101
1128
|
class: "dock-persistent"
|
|
1102
|
-
},
|
|
1129
|
+
}, nt = [
|
|
1103
1130
|
"id",
|
|
1104
1131
|
"role",
|
|
1105
1132
|
"aria-orientation",
|
|
1106
1133
|
"inert"
|
|
1107
|
-
],
|
|
1134
|
+
], rt = [
|
|
1108
1135
|
"id",
|
|
1109
1136
|
"inert",
|
|
1110
1137
|
"role",
|
|
@@ -1112,13 +1139,13 @@ var it = ["data-backdrop-mode", "data-held"], at = ["data-held"], ot = { class:
|
|
|
1112
1139
|
"aria-label",
|
|
1113
1140
|
"aria-expanded",
|
|
1114
1141
|
"aria-controls"
|
|
1115
|
-
],
|
|
1142
|
+
], it = {
|
|
1116
1143
|
key: 0,
|
|
1117
1144
|
class: "dock-search-field"
|
|
1118
|
-
},
|
|
1145
|
+
}, at = {
|
|
1119
1146
|
key: 1,
|
|
1120
1147
|
class: "dock-persistent dock-persistent-end"
|
|
1121
|
-
},
|
|
1148
|
+
}, ot = /* @__PURE__ */ I({
|
|
1122
1149
|
inheritAttrs: !1,
|
|
1123
1150
|
__name: "GlassDock",
|
|
1124
1151
|
props: {
|
|
@@ -1130,84 +1157,88 @@ var it = ["data-backdrop-mode", "data-held"], at = ["data-held"], ot = { class:
|
|
|
1130
1157
|
type: [Boolean, String],
|
|
1131
1158
|
default: "closed"
|
|
1132
1159
|
},
|
|
1160
|
+
expandOn: { default: "hover" },
|
|
1161
|
+
anchor: { default: "center" },
|
|
1162
|
+
collapsedLabel: { default: "Expand dock" },
|
|
1133
1163
|
backgroundCanvas: {}
|
|
1134
1164
|
},
|
|
1135
1165
|
setup(e, { expose: t }) {
|
|
1136
|
-
let n = e, { startCollapsed: r, shape: i, orientation: a, alwaysExpanded: o, fitContent: s } =
|
|
1137
|
-
runEl:
|
|
1138
|
-
statusEl:
|
|
1166
|
+
let n = e, { startCollapsed: r, shape: i, orientation: a, alwaysExpanded: o, fitContent: s } = Ve(n), c = X("dockEl"), l = X("layersEl"), u = X("fullEl"), f = X("summaryEl"), p = X("statusEl"), { toolbar: g } = Ze({
|
|
1167
|
+
runEl: u,
|
|
1168
|
+
statusEl: p,
|
|
1139
1169
|
orientation: a
|
|
1140
1170
|
});
|
|
1141
|
-
n.backdropMode === "live" &&
|
|
1171
|
+
n.backdropMode === "live" && Oe(c, { backgroundCanvas: () => {
|
|
1142
1172
|
let e = n.backgroundCanvas;
|
|
1143
1173
|
return typeof e == "function" ? e() : e instanceof HTMLCanvasElement ? e : null;
|
|
1144
1174
|
} });
|
|
1145
|
-
let _ =
|
|
1175
|
+
let _ = K(!1), v = `glass-dock-${ie()}`, { expanded: y, isPinned: b, isHeld: x, graspHeld: S, onMouseEnter: C, onMouseLeave: T, onFocusIn: E, onFocusOut: D, onClickCollapsed: O, keepOpen: j, release: I, expand: L, collapse: V } = ke({
|
|
1146
1176
|
rootEl: c,
|
|
1147
1177
|
alwaysExpanded: o,
|
|
1178
|
+
expandOn: A(() => n.expandOn),
|
|
1148
1179
|
initialExpanded: !r.value,
|
|
1149
1180
|
isTransitioning: _,
|
|
1150
1181
|
dockId: v
|
|
1151
|
-
}),
|
|
1152
|
-
|
|
1182
|
+
}), H = A(() => o.value || y.value);
|
|
1183
|
+
m({
|
|
1153
1184
|
id: v,
|
|
1154
1185
|
orientation: a,
|
|
1155
|
-
keepOpen:
|
|
1156
|
-
release:
|
|
1186
|
+
keepOpen: j,
|
|
1187
|
+
release: I,
|
|
1157
1188
|
held: S,
|
|
1158
|
-
expanded:
|
|
1189
|
+
expanded: H
|
|
1159
1190
|
});
|
|
1160
|
-
let ee =
|
|
1191
|
+
let ee = Be({
|
|
1161
1192
|
rootEl: c,
|
|
1162
|
-
contentEl:
|
|
1163
|
-
expandedEl:
|
|
1164
|
-
collapsedEl:
|
|
1193
|
+
contentEl: l,
|
|
1194
|
+
expandedEl: u,
|
|
1195
|
+
collapsedEl: f,
|
|
1165
1196
|
axis: a
|
|
1166
|
-
}), { outerCurrentLayer: U, outerLeavingLayer: te } =
|
|
1197
|
+
}), { outerCurrentLayer: U, outerLeavingLayer: te } = je({
|
|
1167
1198
|
rootEl: c,
|
|
1168
|
-
outerActiveLayer:
|
|
1199
|
+
outerActiveLayer: A(() => H.value ? "full" : "summary"),
|
|
1169
1200
|
onMorphActiveChange: (e) => {
|
|
1170
1201
|
_.value = e;
|
|
1171
1202
|
},
|
|
1172
1203
|
geometry: ee
|
|
1173
|
-
}),
|
|
1204
|
+
}), G = A(() => U.value === "summary");
|
|
1174
1205
|
async function ne() {
|
|
1175
|
-
await
|
|
1206
|
+
await z(), (u.value?.querySelector(w) ?? u.value)?.focus({ preventScroll: !0 });
|
|
1176
1207
|
}
|
|
1177
|
-
async function
|
|
1178
|
-
!
|
|
1208
|
+
async function re(e) {
|
|
1209
|
+
!G.value || !["Enter", " "].includes(e.key) || (e.preventDefault(), O(), await ne());
|
|
1179
1210
|
}
|
|
1180
|
-
let
|
|
1181
|
-
function
|
|
1182
|
-
let t = !
|
|
1211
|
+
let J = !1;
|
|
1212
|
+
function ae(e) {
|
|
1213
|
+
let t = !J && G.value && !!f.value?.matches(":focus-visible");
|
|
1183
1214
|
e.stopPropagation(), t && (E(), ne());
|
|
1184
1215
|
}
|
|
1185
|
-
function
|
|
1216
|
+
function se(e) {
|
|
1186
1217
|
if (e.key !== "Escape") return;
|
|
1187
|
-
let t = e.target?.closest?.(
|
|
1188
|
-
t &&
|
|
1218
|
+
let t = e.target?.closest?.(d);
|
|
1219
|
+
t && u.value?.contains(t) || V();
|
|
1189
1220
|
}
|
|
1190
|
-
Z(
|
|
1221
|
+
Z(H, async (e, t) => {
|
|
1191
1222
|
if (!t || e) return;
|
|
1192
1223
|
let n = document.activeElement;
|
|
1193
|
-
if (!(n &&
|
|
1194
|
-
await
|
|
1195
|
-
let r =
|
|
1196
|
-
!r || r.hasAttribute("inert") || (
|
|
1224
|
+
if (!(n && u.value?.contains(n) || n?.closest("[data-glass-dock-face]")?.getAttribute("data-glass-dock-owner") === v)) return;
|
|
1225
|
+
await z();
|
|
1226
|
+
let r = f.value;
|
|
1227
|
+
!r || r.hasAttribute("inert") || (J = !0, r.focus({ preventScroll: !0 }), J = !1);
|
|
1197
1228
|
});
|
|
1198
|
-
let { onPointerDownCapture:
|
|
1229
|
+
let { onPointerDownCapture: ce, onPointerCancelCapture: le, onClickCapture: ue, markExpandFlip: de, pressKeepaliveLayer: fe } = Ue({
|
|
1199
1230
|
rootEl: c,
|
|
1200
|
-
visualExpanded:
|
|
1231
|
+
visualExpanded: H
|
|
1201
1232
|
});
|
|
1202
|
-
Z(
|
|
1203
|
-
e &&
|
|
1233
|
+
Z(H, (e) => {
|
|
1234
|
+
e && de();
|
|
1204
1235
|
});
|
|
1205
|
-
let
|
|
1236
|
+
let Q = K(!1);
|
|
1206
1237
|
Z(S, (e) => {
|
|
1207
|
-
e && (
|
|
1238
|
+
e && (Q.value = !0);
|
|
1208
1239
|
});
|
|
1209
1240
|
function pe(e) {
|
|
1210
|
-
e.propertyName === "opacity" && !S.value && (
|
|
1241
|
+
e.propertyName === "opacity" && !S.value && (Q.value = !1);
|
|
1211
1242
|
}
|
|
1212
1243
|
return t({
|
|
1213
1244
|
expanded: y,
|
|
@@ -1216,10 +1247,10 @@ var it = ["data-backdrop-mode", "data-held"], at = ["data-held"], ot = { class:
|
|
|
1216
1247
|
graspHeld: S,
|
|
1217
1248
|
isTransitioning: _,
|
|
1218
1249
|
expand: L,
|
|
1219
|
-
collapse:
|
|
1220
|
-
keepOpen:
|
|
1221
|
-
release:
|
|
1222
|
-
}), (e, t) => (
|
|
1250
|
+
collapse: V,
|
|
1251
|
+
keepOpen: j,
|
|
1252
|
+
release: I
|
|
1253
|
+
}), (e, t) => (W(), N("div", R({
|
|
1223
1254
|
ref_key: "dockEl",
|
|
1224
1255
|
ref: c
|
|
1225
1256
|
}, e.$attrs, {
|
|
@@ -1227,107 +1258,108 @@ var it = ["data-backdrop-mode", "data-held"], at = ["data-held"], ot = { class:
|
|
|
1227
1258
|
Y(a),
|
|
1228
1259
|
`shape-${Y(i)}`,
|
|
1229
1260
|
{
|
|
1230
|
-
expanded:
|
|
1231
|
-
collapsed: !
|
|
1261
|
+
expanded: H.value,
|
|
1262
|
+
collapsed: !H.value,
|
|
1232
1263
|
pinned: Y(b),
|
|
1233
1264
|
"fit-content": Y(s),
|
|
1234
1265
|
"always-expanded": Y(o)
|
|
1235
1266
|
}
|
|
1236
1267
|
]],
|
|
1237
1268
|
"data-backdrop-mode": n.backdropMode,
|
|
1269
|
+
"data-anchor": n.anchor === "center" ? void 0 : n.anchor,
|
|
1238
1270
|
"data-held": Y(S) || void 0,
|
|
1239
|
-
onMouseenter: t[1] ||= (...e) => Y(
|
|
1271
|
+
onMouseenter: t[1] ||= (...e) => Y(C) && Y(C)(...e),
|
|
1240
1272
|
onMouseleave: t[2] ||= (e) => Y(T)(e),
|
|
1241
1273
|
onFocusin: t[3] ||= (...e) => Y(E) && Y(E)(...e),
|
|
1242
1274
|
onFocusout: t[4] ||= (...e) => Y(D) && Y(D)(...e),
|
|
1243
|
-
onPointerdownCapture: t[5] ||= (...e) => Y(
|
|
1244
|
-
onPointercancelCapture: t[6] ||= (...e) => Y(
|
|
1245
|
-
onClickCapture: t[7] ||= (...e) => Y(
|
|
1275
|
+
onPointerdownCapture: t[5] ||= (...e) => Y(ce) && Y(ce)(...e),
|
|
1276
|
+
onPointercancelCapture: t[6] ||= (...e) => Y(le) && Y(le)(...e),
|
|
1277
|
+
onClickCapture: t[7] ||= (...e) => Y(ue) && Y(ue)(...e)
|
|
1246
1278
|
}), [
|
|
1247
|
-
|
|
1279
|
+
P("div", {
|
|
1248
1280
|
class: "dock-plate",
|
|
1249
1281
|
"aria-hidden": "true",
|
|
1250
1282
|
"data-held": Y(S) || void 0
|
|
1251
|
-
}, [
|
|
1283
|
+
}, [Q.value ? (W(), N(k, { key: 0 }, [t[8] ||= P("span", {
|
|
1252
1284
|
class: "glass-grasp-carrier",
|
|
1253
1285
|
"data-grasp": "rest"
|
|
1254
|
-
}, null, -1),
|
|
1286
|
+
}, null, -1), P("span", {
|
|
1255
1287
|
class: "glass-grasp-carrier",
|
|
1256
1288
|
"data-grasp": "grasp",
|
|
1257
1289
|
onTransitionend: pe
|
|
1258
|
-
}, null, 32)], 64)) :
|
|
1259
|
-
|
|
1260
|
-
e.$slots.persistent ? (
|
|
1261
|
-
|
|
1290
|
+
}, null, 32)], 64)) : M("", !0)], 8, $e),
|
|
1291
|
+
P("div", et, [
|
|
1292
|
+
e.$slots.persistent ? (W(), N("div", tt, [q(e.$slots, "persistent")])) : M("", !0),
|
|
1293
|
+
P("div", {
|
|
1262
1294
|
ref_key: "layersEl",
|
|
1263
|
-
ref:
|
|
1295
|
+
ref: l,
|
|
1264
1296
|
class: "dock-layers"
|
|
1265
1297
|
}, [
|
|
1266
|
-
|
|
1298
|
+
P("div", {
|
|
1267
1299
|
ref_key: "fullEl",
|
|
1268
|
-
ref:
|
|
1300
|
+
ref: u,
|
|
1269
1301
|
id: `${v}-full`,
|
|
1270
1302
|
role: Y(g) ? "toolbar" : void 0,
|
|
1271
1303
|
"aria-orientation": Y(g) ? Y(a) : void 0,
|
|
1272
|
-
class:
|
|
1304
|
+
class: B(["dock-layer dock-layer--full dock-run", {
|
|
1273
1305
|
"is-active": Y(U) === "full",
|
|
1274
|
-
"is-leaving": Y(te) === "full" || Y(
|
|
1275
|
-
"is-press-keepalive": Y(
|
|
1306
|
+
"is-leaving": Y(te) === "full" || Y(fe) === "full" && Y(U) !== "full",
|
|
1307
|
+
"is-press-keepalive": Y(fe) === "full"
|
|
1276
1308
|
}]),
|
|
1277
|
-
inert: Y(U) !== "full" && Y(
|
|
1309
|
+
inert: Y(U) !== "full" && Y(fe) !== "full" || void 0,
|
|
1278
1310
|
tabindex: "-1",
|
|
1279
|
-
onKeydown:
|
|
1280
|
-
}, [
|
|
1281
|
-
default:
|
|
1311
|
+
onKeydown: se
|
|
1312
|
+
}, [F(Y(h), null, {
|
|
1313
|
+
default: oe(() => [q(e.$slots, "default")]),
|
|
1282
1314
|
_: 3
|
|
1283
|
-
})], 42,
|
|
1284
|
-
|
|
1315
|
+
})], 42, nt),
|
|
1316
|
+
P("div", {
|
|
1285
1317
|
ref_key: "summaryEl",
|
|
1286
|
-
ref:
|
|
1318
|
+
ref: f,
|
|
1287
1319
|
id: `${v}-summary`,
|
|
1288
|
-
class:
|
|
1320
|
+
class: B(["dock-layer dock-layer--summary", {
|
|
1289
1321
|
"is-active": Y(U) === "summary",
|
|
1290
1322
|
"is-leaving": Y(te) === "summary"
|
|
1291
1323
|
}]),
|
|
1292
1324
|
inert: Y(U) !== "summary" || void 0,
|
|
1293
|
-
role:
|
|
1294
|
-
tabindex:
|
|
1295
|
-
"aria-label":
|
|
1296
|
-
"aria-expanded":
|
|
1297
|
-
"aria-controls":
|
|
1298
|
-
onFocusin:
|
|
1299
|
-
onKeydown:
|
|
1325
|
+
role: G.value ? "button" : void 0,
|
|
1326
|
+
tabindex: G.value ? 0 : void 0,
|
|
1327
|
+
"aria-label": G.value ? n.collapsedLabel : void 0,
|
|
1328
|
+
"aria-expanded": G.value ? "false" : void 0,
|
|
1329
|
+
"aria-controls": G.value ? `${v}-full` : void 0,
|
|
1330
|
+
onFocusin: ae,
|
|
1331
|
+
onKeydown: re,
|
|
1300
1332
|
onClick: t[0] ||= (...e) => Y(O) && Y(O)(...e)
|
|
1301
|
-
}, [
|
|
1302
|
-
e.$slots.search ? (
|
|
1333
|
+
}, [q(e.$slots, "collapsed")], 42, rt),
|
|
1334
|
+
e.$slots.search ? (W(), N("div", it, [q(e.$slots, "search")])) : M("", !0)
|
|
1303
1335
|
], 512),
|
|
1304
|
-
e.$slots["persistent-end"] ? (
|
|
1336
|
+
e.$slots["persistent-end"] ? (W(), N("div", at, [q(e.$slots, "persistent-end")])) : M("", !0)
|
|
1305
1337
|
]),
|
|
1306
|
-
|
|
1338
|
+
P("div", {
|
|
1307
1339
|
ref_key: "statusEl",
|
|
1308
|
-
ref:
|
|
1340
|
+
ref: p,
|
|
1309
1341
|
class: "dock-run-status",
|
|
1310
1342
|
role: "status",
|
|
1311
1343
|
"aria-live": "polite"
|
|
1312
1344
|
}, null, 512)
|
|
1313
|
-
], 16,
|
|
1345
|
+
], 16, Qe));
|
|
1314
1346
|
}
|
|
1315
|
-
}),
|
|
1316
|
-
function
|
|
1317
|
-
|
|
1347
|
+
}), st = c("glass-ui:dock-switcher-tablist"), { KEY: ct } = st;
|
|
1348
|
+
function lt(e) {
|
|
1349
|
+
st.provide(e);
|
|
1318
1350
|
}
|
|
1319
|
-
var
|
|
1320
|
-
function
|
|
1321
|
-
|
|
1351
|
+
var ut = st.use, dt = s(f, "[glass-ui:dock] <DockLayer> must be used inside <DockCrossfade> (or <DockLayerGroup>)"), { KEY: ft } = dt;
|
|
1352
|
+
function pt(e) {
|
|
1353
|
+
dt.provide(e);
|
|
1322
1354
|
}
|
|
1323
|
-
var
|
|
1355
|
+
var mt = dt.use, ht = /* @__PURE__ */ I({
|
|
1324
1356
|
__name: "DockCrossfade",
|
|
1325
1357
|
props: {
|
|
1326
1358
|
active: {},
|
|
1327
1359
|
reserve: { default: "block" }
|
|
1328
1360
|
},
|
|
1329
1361
|
setup(e, { expose: t }) {
|
|
1330
|
-
let n = e, r =
|
|
1362
|
+
let n = e, r = K(null), i = K(/* @__PURE__ */ new Map()), a = A(() => [...i.value.values()].map(({ id: e, label: t, icon: n }) => ({
|
|
1331
1363
|
id: e,
|
|
1332
1364
|
label: t,
|
|
1333
1365
|
icon: n
|
|
@@ -1341,31 +1373,31 @@ var bt = _t.use, xt = /* @__PURE__ */ L({
|
|
|
1341
1373
|
let t = new Map(i.value);
|
|
1342
1374
|
t.delete(e), i.value = t, p();
|
|
1343
1375
|
}
|
|
1344
|
-
let c =
|
|
1345
|
-
|
|
1376
|
+
let c = A(() => n.active), u = K(null);
|
|
1377
|
+
pt({
|
|
1346
1378
|
register: o,
|
|
1347
1379
|
unregister: s,
|
|
1348
1380
|
activeId: c,
|
|
1349
|
-
leavingId:
|
|
1381
|
+
leavingId: u,
|
|
1350
1382
|
faces: a
|
|
1351
1383
|
});
|
|
1352
|
-
let
|
|
1384
|
+
let d = K(0), f = A(() => n.reserve === "inline" ? "min-inline-size" : "min-block-size");
|
|
1353
1385
|
function p() {
|
|
1354
1386
|
let e = 0;
|
|
1355
1387
|
for (let { el: t } of i.value.values()) {
|
|
1356
1388
|
let r = n.reserve === "inline" ? t.scrollWidth : t.scrollHeight;
|
|
1357
1389
|
r > e && (e = r);
|
|
1358
1390
|
}
|
|
1359
|
-
e >
|
|
1391
|
+
e > d.value && (d.value = e);
|
|
1360
1392
|
}
|
|
1361
|
-
let m =
|
|
1362
|
-
[f.value]: `${
|
|
1363
|
-
"--dock-crossfade-peak": `${
|
|
1393
|
+
let m = A(() => d.value > 0 ? {
|
|
1394
|
+
[f.value]: `${d.value}px`,
|
|
1395
|
+
"--dock-crossfade-peak": `${d.value}px`
|
|
1364
1396
|
} : void 0);
|
|
1365
|
-
|
|
1366
|
-
let h =
|
|
1367
|
-
response:
|
|
1368
|
-
dampingFraction:
|
|
1397
|
+
x(r, () => p());
|
|
1398
|
+
let h = Ae({
|
|
1399
|
+
response: l.response,
|
|
1400
|
+
dampingFraction: l.dampingFraction
|
|
1369
1401
|
});
|
|
1370
1402
|
function g(e) {
|
|
1371
1403
|
return e ? i.value.get(e)?.el : void 0;
|
|
@@ -1379,58 +1411,58 @@ var bt = _t.use, xt = /* @__PURE__ */ L({
|
|
|
1379
1411
|
function y(e) {
|
|
1380
1412
|
return e < 0 ? 0 : e > 1 ? 1 : e;
|
|
1381
1413
|
}
|
|
1382
|
-
let
|
|
1383
|
-
Z(
|
|
1414
|
+
let b = fe("(prefers-reduced-motion: reduce)"), S = null, C = 1;
|
|
1415
|
+
Z(b, (e) => {
|
|
1384
1416
|
e && (h.dispose(), S?.());
|
|
1385
1417
|
});
|
|
1386
1418
|
async function w(e, t) {
|
|
1387
1419
|
if (typeof document > "u") return;
|
|
1388
1420
|
let n = g(e), r = document.activeElement;
|
|
1389
|
-
!n || !r || !n.contains(r) || (await
|
|
1421
|
+
!n || !r || !n.contains(r) || (await z(), (g(t) ?? document.body).focus?.());
|
|
1390
1422
|
}
|
|
1391
1423
|
return Z(c, (e, t) => {
|
|
1392
1424
|
if (e === t) return;
|
|
1393
1425
|
p();
|
|
1394
1426
|
let n = g(e), i = g(t);
|
|
1395
1427
|
if (!n || !i) {
|
|
1396
|
-
|
|
1428
|
+
u.value = null, v(e), C = 1;
|
|
1397
1429
|
return;
|
|
1398
1430
|
}
|
|
1399
|
-
let a =
|
|
1400
|
-
a && a !== e && a !== t && v(a),
|
|
1431
|
+
let a = u.value, o = Number.parseFloat(n.style.getPropertyValue("--dock-t")), s = Number.parseFloat(i.style.getPropertyValue("--dock-t")), c = a === e && Number.isFinite(o) ? 1 - y(o) : 0, l = Number.isFinite(s) ? y(s) : 1;
|
|
1432
|
+
a && a !== e && a !== t && v(a), u.value = t, _(e, c), _(t, 1 - l), w(t, e), r.value?.setAttribute("data-crossfading", "");
|
|
1401
1433
|
let d = () => {
|
|
1402
|
-
v(e), v(t), r.value?.removeAttribute("data-crossfading"),
|
|
1434
|
+
v(e), v(t), r.value?.removeAttribute("data-crossfading"), u.value = null, C = 1, S === d && (S = null);
|
|
1403
1435
|
};
|
|
1404
|
-
if (S = d,
|
|
1436
|
+
if (S = d, b.value) {
|
|
1405
1437
|
d();
|
|
1406
1438
|
return;
|
|
1407
1439
|
}
|
|
1408
|
-
let f =
|
|
1440
|
+
let f = l > .001 ? -C / l : 0;
|
|
1409
1441
|
C = 1 - c, h.playTo(0, 1, {
|
|
1410
1442
|
inheritVelocityScale: f,
|
|
1411
1443
|
onFrame: (n) => {
|
|
1412
|
-
_(e, y(c + (1 - c) * n)), _(t, y(1 -
|
|
1444
|
+
_(e, y(c + (1 - c) * n)), _(t, y(1 - l * (1 - n)));
|
|
1413
1445
|
},
|
|
1414
1446
|
onSettle: d
|
|
1415
1447
|
});
|
|
1416
|
-
}),
|
|
1448
|
+
}), H(() => {
|
|
1417
1449
|
h.dispose(), S = null;
|
|
1418
|
-
}), t({ faces: a }), (e, t) => (
|
|
1450
|
+
}), t({ faces: a }), (e, t) => (W(), N("div", {
|
|
1419
1451
|
ref_key: "rootEl",
|
|
1420
1452
|
ref: r,
|
|
1421
1453
|
class: "dock-crossfade",
|
|
1422
|
-
style:
|
|
1423
|
-
}, [
|
|
1454
|
+
style: V(m.value)
|
|
1455
|
+
}, [q(e.$slots, "default")], 4));
|
|
1424
1456
|
}
|
|
1425
|
-
}),
|
|
1457
|
+
}), gt = ["data-motion"], _t = ["aria-orientation"], vt = [
|
|
1426
1458
|
"id",
|
|
1427
1459
|
"tabindex",
|
|
1428
1460
|
"aria-controls",
|
|
1429
1461
|
"aria-label",
|
|
1430
1462
|
"onClick"
|
|
1431
|
-
],
|
|
1463
|
+
], yt = { key: 1 }, bt = { key: 2 }, xt = /* @__PURE__ */ I({
|
|
1432
1464
|
__name: "DockLayerGroup",
|
|
1433
|
-
props: /*@__PURE__*/
|
|
1465
|
+
props: /*@__PURE__*/ L({
|
|
1434
1466
|
orientation: {},
|
|
1435
1467
|
showSwitcher: {
|
|
1436
1468
|
type: Boolean,
|
|
@@ -1444,27 +1476,27 @@ var bt = _t.use, xt = /* @__PURE__ */ L({
|
|
|
1444
1476
|
}),
|
|
1445
1477
|
emits: ["update:active"],
|
|
1446
1478
|
setup(e) {
|
|
1447
|
-
let t = e, n =
|
|
1448
|
-
options:
|
|
1479
|
+
let t = e, n = b(() => t.motion), r = ae(e, "active"), i = y(), a = A(() => t.orientation ?? i?.orientation.value ?? "horizontal"), o = X("crossfade"), s = A(() => o.value?.faces ?? []), c = A(() => a.value === "vertical" ? "horizontal" : "vertical"), l = A(() => c.value === "vertical"), u = K(null), d = K(null), f = K([]), p = T({
|
|
1480
|
+
options: A(() => s.value.map((e) => ({ value: e.id }))),
|
|
1449
1481
|
model: r,
|
|
1450
1482
|
mode: "single",
|
|
1451
1483
|
role: "tablist",
|
|
1452
|
-
vertical:
|
|
1453
|
-
containerRef:
|
|
1454
|
-
indicatorRef:
|
|
1455
|
-
buttonRefs:
|
|
1456
|
-
}),
|
|
1457
|
-
|
|
1458
|
-
isTablist:
|
|
1459
|
-
tabId:
|
|
1484
|
+
vertical: l,
|
|
1485
|
+
containerRef: u,
|
|
1486
|
+
indicatorRef: d,
|
|
1487
|
+
buttonRefs: f
|
|
1488
|
+
}), m = A(() => t.showSwitcher && s.value.length > 1), h = ie(), _ = (e) => e.replace(/[^a-zA-Z0-9_-]/g, ""), v = (e) => `dock-tab-${h}-${_(e)}`, x = (e) => `dock-panel-${h}-${_(e)}`;
|
|
1489
|
+
lt({
|
|
1490
|
+
isTablist: m,
|
|
1491
|
+
tabId: v,
|
|
1460
1492
|
panelId: x
|
|
1461
1493
|
});
|
|
1462
|
-
let S =
|
|
1494
|
+
let S = A(() => l.value ? "y" : "x");
|
|
1463
1495
|
function C() {
|
|
1464
|
-
let e =
|
|
1496
|
+
let e = u.value;
|
|
1465
1497
|
if (!e) return [];
|
|
1466
1498
|
let t = Array.from(e.querySelectorAll(".dock-layer-tab"));
|
|
1467
|
-
return
|
|
1499
|
+
return s.value.map((e, n) => {
|
|
1468
1500
|
let r = t[n]?.getBoundingClientRect(), i = r ? S.value === "y" ? r.top + r.height / 2 : r.left + r.width / 2 : 0;
|
|
1469
1501
|
return {
|
|
1470
1502
|
value: e.id,
|
|
@@ -1473,8 +1505,8 @@ var bt = _t.use, xt = /* @__PURE__ */ L({
|
|
|
1473
1505
|
});
|
|
1474
1506
|
}
|
|
1475
1507
|
let w = E({
|
|
1476
|
-
handle:
|
|
1477
|
-
surface:
|
|
1508
|
+
handle: u,
|
|
1509
|
+
surface: d,
|
|
1478
1510
|
axis: () => S.value,
|
|
1479
1511
|
snapTargets: C,
|
|
1480
1512
|
onSnap: (e) => {
|
|
@@ -1482,79 +1514,79 @@ var bt = _t.use, xt = /* @__PURE__ */ L({
|
|
|
1482
1514
|
}
|
|
1483
1515
|
});
|
|
1484
1516
|
Z(() => [
|
|
1485
|
-
|
|
1486
|
-
|
|
1517
|
+
s.value.length,
|
|
1518
|
+
c.value,
|
|
1487
1519
|
n.armed.value
|
|
1488
1520
|
], () => {
|
|
1489
|
-
n.armed.value &&
|
|
1490
|
-
}),
|
|
1491
|
-
n.armed.value &&
|
|
1521
|
+
n.armed.value && z(() => w.refresh());
|
|
1522
|
+
}), ee(() => {
|
|
1523
|
+
n.armed.value && z(() => w.refresh());
|
|
1492
1524
|
});
|
|
1493
1525
|
function D(e) {
|
|
1494
1526
|
return typeof e == "object" && !!e || typeof e == "function";
|
|
1495
1527
|
}
|
|
1496
|
-
let O =
|
|
1497
|
-
function
|
|
1528
|
+
let O = g(() => i);
|
|
1529
|
+
function I() {
|
|
1498
1530
|
O.acquire();
|
|
1499
1531
|
}
|
|
1500
1532
|
function L(e) {
|
|
1501
1533
|
let t = e.relatedTarget, n = e.currentTarget;
|
|
1502
1534
|
t && n?.contains(t) || O.release();
|
|
1503
1535
|
}
|
|
1504
|
-
return (t, i) => (
|
|
1505
|
-
class:
|
|
1536
|
+
return (t, i) => (W(), N("div", {
|
|
1537
|
+
class: B(["dock-layer-group", [a.value, `switcher-${e.switcherPosition}`]]),
|
|
1506
1538
|
"data-motion": Y(n).dataMotion.value,
|
|
1507
|
-
style:
|
|
1508
|
-
}, [
|
|
1539
|
+
style: V(Y(n).hostStyle.value)
|
|
1540
|
+
}, [m.value ? (W(), N("div", {
|
|
1509
1541
|
key: 0,
|
|
1510
1542
|
ref_key: "switcherListEl",
|
|
1511
|
-
ref:
|
|
1543
|
+
ref: u,
|
|
1512
1544
|
role: "tablist",
|
|
1513
|
-
class:
|
|
1514
|
-
"aria-orientation":
|
|
1515
|
-
onKeydown: i[0] ||= (...e) => Y(
|
|
1516
|
-
onFocusin:
|
|
1545
|
+
class: B(["dock-layer-switcher", [e.switcherPosition, Y(n).armed.value && "glass-drag-grabbable"]]),
|
|
1546
|
+
"aria-orientation": c.value,
|
|
1547
|
+
onKeydown: i[0] ||= (...e) => Y(p).onKeydown && Y(p).onKeydown(...e),
|
|
1548
|
+
onFocusin: I,
|
|
1517
1549
|
onFocusout: L
|
|
1518
|
-
}, [(
|
|
1550
|
+
}, [(W(!0), N(k, null, ne(s.value, (e, t) => (W(), N("button", R({
|
|
1519
1551
|
key: e.id,
|
|
1520
1552
|
ref_for: !0,
|
|
1521
1553
|
ref: (e) => {
|
|
1522
|
-
e && (
|
|
1554
|
+
e && (f.value[t] = e);
|
|
1523
1555
|
},
|
|
1524
1556
|
type: "button",
|
|
1525
1557
|
class: "dock-layer-tab",
|
|
1526
|
-
id:
|
|
1527
|
-
tabindex: Y(
|
|
1528
|
-
}, { ref_for: !0 }, Y(
|
|
1558
|
+
id: v(e.id),
|
|
1559
|
+
tabindex: Y(p).rovingTabindex(t)
|
|
1560
|
+
}, { ref_for: !0 }, Y(p).itemAttrs(e.id), {
|
|
1529
1561
|
"aria-controls": x(e.id),
|
|
1530
1562
|
"aria-label": e.label ?? e.id,
|
|
1531
|
-
onClick: (n) => Y(
|
|
1532
|
-
}), [D(e.icon) ? (
|
|
1563
|
+
onClick: (n) => Y(p).select(e.id, t)
|
|
1564
|
+
}), [D(e.icon) ? (W(), j(re(e.icon), {
|
|
1533
1565
|
key: 0,
|
|
1534
1566
|
class: "size-4"
|
|
1535
|
-
})) : typeof e.icon == "string" ? (
|
|
1567
|
+
})) : typeof e.icon == "string" ? (W(), N("span", yt, J(e.icon), 1)) : (W(), N("span", bt, J((e.label ?? e.id).charAt(0)), 1))], 16, vt))), 128)), P("div", {
|
|
1536
1568
|
ref_key: "switcherIndicatorEl",
|
|
1537
|
-
ref:
|
|
1538
|
-
class:
|
|
1539
|
-
style:
|
|
1569
|
+
ref: d,
|
|
1570
|
+
class: B(["dock-layer-tab-indicator", Y(n).armed.value && Y(w).dragging.value && "glass-drag-lift"]),
|
|
1571
|
+
style: V(Y(p).singleSliderStyle.value),
|
|
1540
1572
|
"aria-hidden": "true"
|
|
1541
|
-
}, null, 6)], 42,
|
|
1573
|
+
}, null, 6)], 42, _t)) : M("", !0), F(ht, {
|
|
1542
1574
|
ref_key: "crossfade",
|
|
1543
|
-
ref:
|
|
1575
|
+
ref: o,
|
|
1544
1576
|
active: r.value
|
|
1545
1577
|
}, {
|
|
1546
|
-
default:
|
|
1578
|
+
default: oe(() => [q(t.$slots, "default")]),
|
|
1547
1579
|
_: 3
|
|
1548
|
-
}, 8, ["active"])], 14,
|
|
1580
|
+
}, 8, ["active"])], 14, gt));
|
|
1549
1581
|
}
|
|
1550
|
-
}),
|
|
1582
|
+
}), St = [
|
|
1551
1583
|
"role",
|
|
1552
1584
|
"id",
|
|
1553
1585
|
"aria-labelledby",
|
|
1554
1586
|
"inert",
|
|
1555
1587
|
"aria-hidden",
|
|
1556
1588
|
"tabindex"
|
|
1557
|
-
],
|
|
1589
|
+
], Ct = { class: "dock-face-content" }, wt = /* @__PURE__ */ I({
|
|
1558
1590
|
__name: "DockLayer",
|
|
1559
1591
|
props: {
|
|
1560
1592
|
id: {},
|
|
@@ -1562,8 +1594,8 @@ var bt = _t.use, xt = /* @__PURE__ */ L({
|
|
|
1562
1594
|
icon: {}
|
|
1563
1595
|
},
|
|
1564
1596
|
setup(e) {
|
|
1565
|
-
let t = e, n =
|
|
1566
|
-
|
|
1597
|
+
let t = e, n = mt(), r = X("hostEl");
|
|
1598
|
+
ee(() => {
|
|
1567
1599
|
r.value && n.register({
|
|
1568
1600
|
id: t.id,
|
|
1569
1601
|
label: t.label,
|
|
@@ -1581,12 +1613,12 @@ var bt = _t.use, xt = /* @__PURE__ */ L({
|
|
|
1581
1613
|
icon: t.icon,
|
|
1582
1614
|
el: r.value
|
|
1583
1615
|
});
|
|
1584
|
-
}),
|
|
1585
|
-
let i =
|
|
1586
|
-
return (e, t) => (
|
|
1616
|
+
}), H(() => n.unregister(t.id));
|
|
1617
|
+
let i = A(() => n.activeId.value === t.id), a = A(() => n.leavingId.value === t.id), o = ut(), s = A(() => o?.isTablist.value ?? !1), c = A(() => s.value ? o.panelId(t.id) : void 0), l = A(() => s.value ? o.tabId(t.id) : void 0);
|
|
1618
|
+
return (e, t) => (W(), N("div", {
|
|
1587
1619
|
ref_key: "hostEl",
|
|
1588
1620
|
ref: r,
|
|
1589
|
-
class:
|
|
1621
|
+
class: B(["dock-face", {
|
|
1590
1622
|
"is-active": i.value,
|
|
1591
1623
|
"is-leaving": a.value
|
|
1592
1624
|
}]),
|
|
@@ -1596,9 +1628,9 @@ var bt = _t.use, xt = /* @__PURE__ */ L({
|
|
|
1596
1628
|
inert: !i.value || void 0,
|
|
1597
1629
|
"aria-hidden": !i.value || void 0,
|
|
1598
1630
|
tabindex: i.value ? -1 : void 0
|
|
1599
|
-
}, [
|
|
1631
|
+
}, [P("div", Ct, [q(e.$slots, "default")])], 10, St));
|
|
1600
1632
|
}
|
|
1601
|
-
}),
|
|
1633
|
+
}), Tt = /* @__PURE__ */ I({
|
|
1602
1634
|
__name: "DockControl",
|
|
1603
1635
|
props: {
|
|
1604
1636
|
shape: { default: "icon" },
|
|
@@ -1629,26 +1661,26 @@ var bt = _t.use, xt = /* @__PURE__ */ L({
|
|
|
1629
1661
|
] }
|
|
1630
1662
|
},
|
|
1631
1663
|
setup(t) {
|
|
1632
|
-
let r = t,
|
|
1633
|
-
[
|
|
1664
|
+
let r = t, i = A(() => r.shape === "tab"), s = A(() => i.value ? e("dock-tab-button glass-specular-track", r.class) : e("dock-icon-button glass-specular-track glass-capsule-hover", { "glass-capsule": r.active }, { "dock-icon-button--compact": r.compact }, r.class)), c = A(() => ({
|
|
1665
|
+
[u]: "",
|
|
1634
1666
|
...r.active === void 0 ? {} : {
|
|
1635
1667
|
"aria-pressed": String(r.active),
|
|
1636
1668
|
...r.active ? { "data-active": "" } : {}
|
|
1637
1669
|
},
|
|
1638
1670
|
...r.disabled ? { "aria-disabled": "true" } : {}
|
|
1639
|
-
})), l =
|
|
1640
|
-
disabled: () => r.disabled ||
|
|
1671
|
+
})), l = A(() => !r.asChild && r.as === "button" ? { type: r.type } : {}), d = a("press"), f = o({
|
|
1672
|
+
disabled: () => r.disabled || i.value,
|
|
1641
1673
|
squish: !0,
|
|
1642
|
-
response:
|
|
1643
|
-
dampingFraction:
|
|
1674
|
+
response: d.response,
|
|
1675
|
+
dampingFraction: d.dampingFraction,
|
|
1644
1676
|
pressVar: "--dock-press-t",
|
|
1645
1677
|
shrinkDepth: .04,
|
|
1646
1678
|
maxStretch: 1.03
|
|
1647
|
-
}),
|
|
1648
|
-
function
|
|
1679
|
+
}), p = A(() => i.value ? {} : { ...f.pressStyle.value });
|
|
1680
|
+
function m(e) {
|
|
1649
1681
|
r.disabled && (e.preventDefault(), e.stopImmediatePropagation());
|
|
1650
1682
|
}
|
|
1651
|
-
return (e, r) =>
|
|
1683
|
+
return (e, r) => se((W(), j(Y(ce), R({
|
|
1652
1684
|
as: t.as,
|
|
1653
1685
|
"as-child": t.asChild
|
|
1654
1686
|
}, {
|
|
@@ -1656,19 +1688,19 @@ var bt = _t.use, xt = /* @__PURE__ */ L({
|
|
|
1656
1688
|
...c.value
|
|
1657
1689
|
}, {
|
|
1658
1690
|
class: s.value,
|
|
1659
|
-
style:
|
|
1660
|
-
"data-press-armed": !
|
|
1661
|
-
onPointerdown: Y(
|
|
1662
|
-
onPointerup: Y(
|
|
1663
|
-
onPointercancel: Y(
|
|
1664
|
-
onPointerleave: Y(
|
|
1665
|
-
onPointerenter: Y(
|
|
1666
|
-
onKeydown: Y(
|
|
1667
|
-
onKeyup: Y(
|
|
1668
|
-
onBlur: Y(
|
|
1669
|
-
onClickCapture:
|
|
1691
|
+
style: p.value,
|
|
1692
|
+
"data-press-armed": !i.value && Y(f).armed ? "" : void 0,
|
|
1693
|
+
onPointerdown: Y(f).handlers.onPointerdown,
|
|
1694
|
+
onPointerup: Y(f).handlers.onPointerup,
|
|
1695
|
+
onPointercancel: Y(f).handlers.onPointercancel,
|
|
1696
|
+
onPointerleave: Y(f).handlers.onPointerleave,
|
|
1697
|
+
onPointerenter: Y(f).handlers.onPointerenter,
|
|
1698
|
+
onKeydown: Y(f).handlers.onKeydown,
|
|
1699
|
+
onKeyup: Y(f).handlers.onKeyup,
|
|
1700
|
+
onBlur: Y(f).handlers.onBlur,
|
|
1701
|
+
onClickCapture: m
|
|
1670
1702
|
}), {
|
|
1671
|
-
default:
|
|
1703
|
+
default: oe(() => [q(e.$slots, "default")]),
|
|
1672
1704
|
_: 3
|
|
1673
1705
|
}, 16, [
|
|
1674
1706
|
"as",
|
|
@@ -1686,83 +1718,7 @@ var bt = _t.use, xt = /* @__PURE__ */ L({
|
|
|
1686
1718
|
"onBlur"
|
|
1687
1719
|
])), [[Y(n)]]);
|
|
1688
1720
|
}
|
|
1689
|
-
}),
|
|
1690
|
-
inheritAttrs: !1,
|
|
1691
|
-
__name: "DockTrigger",
|
|
1692
|
-
props: {
|
|
1693
|
-
for: { default: "select" },
|
|
1694
|
-
class: { type: [
|
|
1695
|
-
Boolean,
|
|
1696
|
-
null,
|
|
1697
|
-
String,
|
|
1698
|
-
Object,
|
|
1699
|
-
Array
|
|
1700
|
-
] }
|
|
1701
|
-
},
|
|
1702
|
-
setup(t) {
|
|
1703
|
-
let r = t, i = { [y]: "" };
|
|
1704
|
-
function a(e) {
|
|
1705
|
-
e.preventDefault(), e.stopImmediatePropagation();
|
|
1706
|
-
}
|
|
1707
|
-
let o = (e, { attrs: t, slots: n }) => {
|
|
1708
|
-
let { disabled: r, ...i } = t, o = r != null && r !== !1;
|
|
1709
|
-
return R("button", {
|
|
1710
|
-
...i,
|
|
1711
|
-
type: i.type ?? "button",
|
|
1712
|
-
...o ? {
|
|
1713
|
-
"aria-disabled": "true",
|
|
1714
|
-
onClickCapture: a
|
|
1715
|
-
} : {}
|
|
1716
|
-
}, n.default?.());
|
|
1717
|
-
};
|
|
1718
|
-
o.inheritAttrs = !1;
|
|
1719
|
-
let s = j(() => e("dock-trigger", r.for === "select" && "dock-select-trigger", r.for !== "select" && "dock-dropdown-trigger", r.class));
|
|
1720
|
-
return (e, t) => r.for === "select" ? ce((G(), M(Y(fe), B({ key: 0 }, {
|
|
1721
|
-
...e.$attrs,
|
|
1722
|
-
...i
|
|
1723
|
-
}, {
|
|
1724
|
-
"as-child": "",
|
|
1725
|
-
class: s.value
|
|
1726
|
-
}), {
|
|
1727
|
-
default: Q(() => [I(o, null, {
|
|
1728
|
-
default: Q(() => [J(e.$slots, "default"), I(Y(de), { "as-child": "" }, {
|
|
1729
|
-
default: Q(() => [J(e.$slots, "icon", {}, () => [I(Y(pe), {
|
|
1730
|
-
class: "dock-select-trigger__chevron",
|
|
1731
|
-
"aria-hidden": "true"
|
|
1732
|
-
})])]),
|
|
1733
|
-
_: 3
|
|
1734
|
-
})]),
|
|
1735
|
-
_: 3
|
|
1736
|
-
})]),
|
|
1737
|
-
_: 3
|
|
1738
|
-
}, 16, ["class"])), [[Y(n)]]) : r.for === "dropdown" ? ce((G(), M(w, B({ key: 1 }, {
|
|
1739
|
-
...e.$attrs,
|
|
1740
|
-
...i
|
|
1741
|
-
}, {
|
|
1742
|
-
"as-child": "",
|
|
1743
|
-
action: "pointerdown",
|
|
1744
|
-
class: s.value
|
|
1745
|
-
}), {
|
|
1746
|
-
default: Q(() => [I(o, null, {
|
|
1747
|
-
default: Q(() => [J(e.$slots, "default")]),
|
|
1748
|
-
_: 3
|
|
1749
|
-
})]),
|
|
1750
|
-
_: 3
|
|
1751
|
-
}, 16, ["class"])), [[Y(n)]]) : ce((G(), M(Y(le), B({ key: 2 }, {
|
|
1752
|
-
...e.$attrs,
|
|
1753
|
-
...i
|
|
1754
|
-
}, {
|
|
1755
|
-
"as-child": "",
|
|
1756
|
-
class: s.value
|
|
1757
|
-
}), {
|
|
1758
|
-
default: Q(() => [I(o, null, {
|
|
1759
|
-
default: Q(() => [J(e.$slots, "default")]),
|
|
1760
|
-
_: 3
|
|
1761
|
-
})]),
|
|
1762
|
-
_: 3
|
|
1763
|
-
}, 16, ["class"])), [[Y(n)]]);
|
|
1764
|
-
}
|
|
1765
|
-
}), Nt = /* @__PURE__ */ L({
|
|
1721
|
+
}), Et = /* @__PURE__ */ I({
|
|
1766
1722
|
__name: "DockBackgroundToggle",
|
|
1767
1723
|
props: {
|
|
1768
1724
|
paused: {
|
|
@@ -1774,22 +1730,22 @@ var bt = _t.use, xt = /* @__PURE__ */ L({
|
|
|
1774
1730
|
},
|
|
1775
1731
|
emits: ["update:paused"],
|
|
1776
1732
|
setup(e, { emit: t }) {
|
|
1777
|
-
let n = e, r = t, i =
|
|
1733
|
+
let n = e, r = t, i = A(() => n.paused ? n.playLabel : n.pauseLabel);
|
|
1778
1734
|
function a() {
|
|
1779
1735
|
r("update:paused", !n.paused);
|
|
1780
1736
|
}
|
|
1781
|
-
return (t, n) => (
|
|
1737
|
+
return (t, n) => (W(), j(Tt, {
|
|
1782
1738
|
type: "button",
|
|
1783
1739
|
active: e.paused,
|
|
1784
1740
|
"aria-pressed": e.paused,
|
|
1785
1741
|
"aria-label": i.value,
|
|
1786
1742
|
onClick: a
|
|
1787
1743
|
}, {
|
|
1788
|
-
default:
|
|
1744
|
+
default: oe(() => [e.paused ? (W(), j(Y(ue), {
|
|
1789
1745
|
key: 0,
|
|
1790
1746
|
size: 18,
|
|
1791
1747
|
"aria-hidden": "true"
|
|
1792
|
-
})) : (
|
|
1748
|
+
})) : (W(), j(Y(le), {
|
|
1793
1749
|
key: 1,
|
|
1794
1750
|
size: 18,
|
|
1795
1751
|
"aria-hidden": "true"
|
|
@@ -1801,30 +1757,30 @@ var bt = _t.use, xt = /* @__PURE__ */ L({
|
|
|
1801
1757
|
"aria-label"
|
|
1802
1758
|
]));
|
|
1803
1759
|
}
|
|
1804
|
-
}),
|
|
1760
|
+
}), Dt = [
|
|
1805
1761
|
"data-orientation",
|
|
1806
1762
|
"data-dock-hairline",
|
|
1807
1763
|
"aria-orientation"
|
|
1808
|
-
],
|
|
1764
|
+
], Ot = /* @__PURE__ */ I({
|
|
1809
1765
|
__name: "DockSeparator",
|
|
1810
1766
|
props: { anchor: {
|
|
1811
1767
|
type: Boolean,
|
|
1812
1768
|
default: !1
|
|
1813
1769
|
} },
|
|
1814
1770
|
setup(e) {
|
|
1815
|
-
let t =
|
|
1816
|
-
return (t, n) => (
|
|
1817
|
-
class:
|
|
1771
|
+
let t = y(), n = A(() => t?.orientation.value ?? "horizontal"), r = A(() => n.value), i = A(() => n.value === "vertical" ? "horizontal" : "vertical");
|
|
1772
|
+
return (t, n) => (W(), N("div", {
|
|
1773
|
+
class: B(["dock-separator", { "dock-hairline": e.anchor }]),
|
|
1818
1774
|
role: "separator",
|
|
1819
1775
|
"data-orientation": r.value,
|
|
1820
1776
|
"data-dock-hairline": e.anchor || void 0,
|
|
1821
1777
|
"aria-orientation": i.value
|
|
1822
|
-
}, null, 10,
|
|
1778
|
+
}, null, 10, Dt));
|
|
1823
1779
|
}
|
|
1824
1780
|
});
|
|
1825
1781
|
//#endregion
|
|
1826
1782
|
//#region src/composables/search/match.ts
|
|
1827
|
-
function
|
|
1783
|
+
function kt(e, t) {
|
|
1828
1784
|
let n = e.length, r = t.length;
|
|
1829
1785
|
if (n === 0) return {
|
|
1830
1786
|
score: 0,
|
|
@@ -1848,11 +1804,11 @@ function It(e, t) {
|
|
|
1848
1804
|
matches: i
|
|
1849
1805
|
});
|
|
1850
1806
|
}
|
|
1851
|
-
function
|
|
1807
|
+
function At(e, t) {
|
|
1852
1808
|
if (!t) return null;
|
|
1853
1809
|
let n = 0, r = [];
|
|
1854
1810
|
for (let i of e) {
|
|
1855
|
-
let e =
|
|
1811
|
+
let e = kt(i, t);
|
|
1856
1812
|
if (!e) return null;
|
|
1857
1813
|
n += e.score;
|
|
1858
1814
|
for (let t of e.matches) r.push(t);
|
|
@@ -1862,7 +1818,7 @@ function Lt(e, t) {
|
|
|
1862
1818
|
matches: r
|
|
1863
1819
|
};
|
|
1864
1820
|
}
|
|
1865
|
-
function
|
|
1821
|
+
function jt(e, t) {
|
|
1866
1822
|
let n = null, r = [], i = [
|
|
1867
1823
|
[t._lc.label, 12],
|
|
1868
1824
|
[t._lc.type, 10],
|
|
@@ -1870,7 +1826,7 @@ function Rt(e, t) {
|
|
|
1870
1826
|
];
|
|
1871
1827
|
for (let [a, o] of i) {
|
|
1872
1828
|
if (!a) continue;
|
|
1873
|
-
let i =
|
|
1829
|
+
let i = At(e, a);
|
|
1874
1830
|
if (!i) continue;
|
|
1875
1831
|
let s = i.score * o;
|
|
1876
1832
|
(n === null || s > n) && (n = s, r = a === t._lc.label ? i.matches : []);
|
|
@@ -1880,7 +1836,7 @@ function Rt(e, t) {
|
|
|
1880
1836
|
matches: r
|
|
1881
1837
|
};
|
|
1882
1838
|
}
|
|
1883
|
-
function
|
|
1839
|
+
function Mt(e) {
|
|
1884
1840
|
return e.map((e) => ({
|
|
1885
1841
|
item: e,
|
|
1886
1842
|
_lc: {
|
|
@@ -1890,15 +1846,15 @@ function zt(e) {
|
|
|
1890
1846
|
}
|
|
1891
1847
|
}));
|
|
1892
1848
|
}
|
|
1893
|
-
var
|
|
1894
|
-
function
|
|
1895
|
-
let t =
|
|
1896
|
-
return t || (t = /* @__PURE__ */ new Map(),
|
|
1849
|
+
var Nt = /* @__PURE__ */ new WeakMap();
|
|
1850
|
+
function Pt(e) {
|
|
1851
|
+
let t = Nt.get(e);
|
|
1852
|
+
return t || (t = /* @__PURE__ */ new Map(), Nt.set(e, t)), t;
|
|
1897
1853
|
}
|
|
1898
|
-
function
|
|
1854
|
+
function Ft(e, t, n = 30) {
|
|
1899
1855
|
let r = t.toLowerCase().trim();
|
|
1900
1856
|
if (!r) return [];
|
|
1901
|
-
let i =
|
|
1857
|
+
let i = Pt(e), a = i.get(r);
|
|
1902
1858
|
if (a) return a.slice(0, n);
|
|
1903
1859
|
i.size > 200 && i.clear();
|
|
1904
1860
|
let o = r.split(/\s+/).filter(Boolean);
|
|
@@ -1917,7 +1873,7 @@ function Ht(e, t, n = 30) {
|
|
|
1917
1873
|
}
|
|
1918
1874
|
let c = [];
|
|
1919
1875
|
for (let e of s) {
|
|
1920
|
-
let t =
|
|
1876
|
+
let t = jt(o, e);
|
|
1921
1877
|
t && c.push({
|
|
1922
1878
|
item: e.item,
|
|
1923
1879
|
score: t.score,
|
|
@@ -1926,17 +1882,17 @@ function Ht(e, t, n = 30) {
|
|
|
1926
1882
|
}
|
|
1927
1883
|
return c.sort((e, t) => t.score - e.score), i.set(r, c), c.slice(0, n);
|
|
1928
1884
|
}
|
|
1929
|
-
function
|
|
1885
|
+
function It(e) {
|
|
1930
1886
|
if (e) {
|
|
1931
|
-
|
|
1887
|
+
Nt.delete(e);
|
|
1932
1888
|
return;
|
|
1933
1889
|
}
|
|
1934
|
-
|
|
1890
|
+
Nt = /* @__PURE__ */ new WeakMap();
|
|
1935
1891
|
}
|
|
1936
1892
|
//#endregion
|
|
1937
1893
|
//#region src/composables/search/useFuzzySearch.ts
|
|
1938
|
-
function
|
|
1939
|
-
let t = typeof e.items == "function" ? e.items : () => e.items, n = e.debounceMs ?? 120, r = e.maxResults ?? 30, i =
|
|
1894
|
+
function Lt(e) {
|
|
1895
|
+
let t = typeof e.items == "function" ? e.items : () => e.items, n = e.debounceMs ?? 120, r = e.maxResults ?? 30, i = K(""), a = K(!1), o = K(!1), s = K(0), c = K(""), l = A(() => t()), u = A(() => Mt(l.value)), d;
|
|
1940
1896
|
function f(e = d) {
|
|
1941
1897
|
e !== void 0 && (clearTimeout(e), d === e && (d = void 0));
|
|
1942
1898
|
}
|
|
@@ -1952,7 +1908,7 @@ function Wt(e) {
|
|
|
1952
1908
|
}), Z(l, () => {
|
|
1953
1909
|
f(), c.value = i.value, s.value = 0;
|
|
1954
1910
|
}, { deep: !0 });
|
|
1955
|
-
let p =
|
|
1911
|
+
let p = A(() => Ft(u.value, c.value, r));
|
|
1956
1912
|
Z(p, () => {
|
|
1957
1913
|
s.value = 0;
|
|
1958
1914
|
});
|
|
@@ -1960,7 +1916,7 @@ function Wt(e) {
|
|
|
1960
1916
|
e.onSelect?.(t), h();
|
|
1961
1917
|
}
|
|
1962
1918
|
function h() {
|
|
1963
|
-
a.value = !1, o.value = !1, f(), i.value = "", c.value = "", s.value = 0,
|
|
1919
|
+
a.value = !1, o.value = !1, f(), i.value = "", c.value = "", s.value = 0, It(u.value);
|
|
1964
1920
|
}
|
|
1965
1921
|
function g() {
|
|
1966
1922
|
a.value = !0;
|
|
@@ -1984,8 +1940,8 @@ function Wt(e) {
|
|
|
1984
1940
|
break;
|
|
1985
1941
|
}
|
|
1986
1942
|
}
|
|
1987
|
-
return
|
|
1988
|
-
f(),
|
|
1943
|
+
return U(() => {
|
|
1944
|
+
f(), It(u.value);
|
|
1989
1945
|
}, !0), {
|
|
1990
1946
|
query: i,
|
|
1991
1947
|
results: p,
|
|
@@ -2001,13 +1957,13 @@ function Wt(e) {
|
|
|
2001
1957
|
}
|
|
2002
1958
|
//#endregion
|
|
2003
1959
|
//#region src/components/dock/composables/useDockSearch.ts
|
|
2004
|
-
function
|
|
2005
|
-
let { dockState: t } = e, n = e.debounceMs ?? 120, r = e.maxResults ?? 30, i =
|
|
1960
|
+
function Rt(e) {
|
|
1961
|
+
let { dockState: t } = e, n = e.debounceMs ?? 120, r = e.maxResults ?? 30, i = K([]), a = null, o = e.items ? e.items : () => i.value;
|
|
2006
1962
|
function s(t) {
|
|
2007
1963
|
let n = t.item.id;
|
|
2008
1964
|
e.ensureTargetWindow?.(n), e.scrollTo?.(n), e.onResultSelect?.(t);
|
|
2009
1965
|
}
|
|
2010
|
-
let c =
|
|
1966
|
+
let c = Lt({
|
|
2011
1967
|
items: o,
|
|
2012
1968
|
debounceMs: n,
|
|
2013
1969
|
maxResults: r,
|
|
@@ -2028,7 +1984,7 @@ function Gt(e) {
|
|
|
2028
1984
|
});
|
|
2029
1985
|
});
|
|
2030
1986
|
}
|
|
2031
|
-
let l =
|
|
1987
|
+
let l = A(() => {
|
|
2032
1988
|
let e = c.query.value;
|
|
2033
1989
|
if (!e) return "";
|
|
2034
1990
|
let t = c.results.value[0];
|
|
@@ -2040,23 +1996,23 @@ function Gt(e) {
|
|
|
2040
1996
|
let e = l.value;
|
|
2041
1997
|
e && (c.query.value = c.query.value + e);
|
|
2042
1998
|
}
|
|
2043
|
-
let d =
|
|
1999
|
+
let d = g(() => t), f = d.isHeld;
|
|
2044
2000
|
function p() {
|
|
2045
2001
|
f.value || (t.expand(), d.acquire(), c.open());
|
|
2046
2002
|
}
|
|
2047
2003
|
function m() {
|
|
2048
2004
|
f.value && (c.close(), d.release());
|
|
2049
2005
|
}
|
|
2050
|
-
let
|
|
2051
|
-
return e.collapseOnScroll && e.scrollContainer && (
|
|
2006
|
+
let h = null;
|
|
2007
|
+
return e.collapseOnScroll && e.scrollContainer && (h = O(e.scrollContainer, {
|
|
2052
2008
|
collapseOnScroll: !0,
|
|
2053
2009
|
chromeRef: e.chromeRef
|
|
2054
|
-
})),
|
|
2010
|
+
})), U(() => {
|
|
2055
2011
|
a?.abort(), a = null;
|
|
2056
2012
|
}), {
|
|
2057
2013
|
fuzzy: c,
|
|
2058
2014
|
autocompleteText: l,
|
|
2059
|
-
scrollChrome:
|
|
2015
|
+
scrollChrome: h,
|
|
2060
2016
|
armSearch: p,
|
|
2061
2017
|
disarmSearch: m,
|
|
2062
2018
|
acceptAutocomplete: u,
|
|
@@ -2064,4 +2020,4 @@ function Gt(e) {
|
|
|
2064
2020
|
};
|
|
2065
2021
|
}
|
|
2066
2022
|
//#endregion
|
|
2067
|
-
export {
|
|
2023
|
+
export { v as DOCK_CONTEXT_KEY, Et as DockBackgroundToggle, Tt as DockControl, ht as DockCrossfade, wt as DockLayer, xt as DockLayerGroup, Ot as DockSeparator, ot as GlassDock, m as provideDockContext, _ as useDockContext, D as useDockCtaReceive, Rt as useDockSearch, y as useOptionalDockContext };
|