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