@mkbabb/glass-ui 3.9.0 → 3.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{CardAction-DuArVky-.js → CardAction-DrAcAV4d.js} +2 -2
- package/dist/{CommandShortcut-CefCj5mt.js → CommandShortcut-mV2e1aG6.js} +2 -2
- package/dist/{DataTable-CUHMukiQ.js → DataTable-C3E6jZ5B.js} +2 -2
- package/dist/{DialogContent-BRkT1cjP.js → DialogContent-BxaaafFi.js} +1 -1
- package/dist/{HoverPopover-2LOIW34a.js → HoverPopover-CDA_SaCe.js} +1 -1
- package/dist/{MetricBadge-lTc002u2.js → MetricBadge-idgrkqoP.js} +1 -1
- package/dist/{Notification-BxK8LZMw.js → Notification-Cu0nN17_.js} +3 -3
- package/dist/{NumberFieldContent-BbLOh8RU.js → NumberFieldContent-CHEWghnY.js} +2 -2
- package/dist/{PopoverContent-BId6ggf_.js → PopoverContent-DpUvdYY-.js} +1 -1
- package/dist/{Progress-iEuD9pxG.js → Progress-BW-StFw2.js} +1 -1
- package/dist/{ScrollingText-BPP84wKo.js → ScrollingText-DruYCni_.js} +1 -1
- package/dist/{SelectScrollDownButton-T32cVFeM.js → SelectScrollDownButton-pirzjm--.js} +3 -3
- package/dist/{Switch-LDKLmmgx.js → Switch-DeAqg6pi.js} +1 -1
- package/dist/{TabsList-B8CVOQPC.js → TabsList-BAVzOZpg.js} +2 -2
- package/dist/{Toaster-1rYWrmAm.js → Toaster-CvuuW_y9.js} +49 -46
- package/dist/{ToggleGroupItem-Cev4pOVK.js → ToggleGroupItem-DtD37b4G.js} +4 -4
- package/dist/animated-digit.js +2 -2
- package/dist/api/index.d.ts +4 -4
- package/dist/api.js +1 -1
- package/dist/aurora.js +238 -547
- package/dist/{badge-BvwvT50i.js → badge-NdCQMvvB.js} +2 -2
- package/dist/badge.js +1 -1
- package/dist/{button-DN39cGqL.js → button-DyiWFAOE.js} +12 -12
- package/dist/button.js +1 -1
- package/dist/canvas.js +2 -2
- package/dist/card.js +1 -1
- package/dist/carousel.js +5 -5
- package/dist/collapsible.js +1 -1
- package/dist/{color-8jBjWiJ6.js → color-B65wWyQz.js} +9 -7
- package/dist/color.js +1 -1
- package/dist/command.js +1 -1
- package/dist/{compile-DAjIoEy2.js → compile-Ce_V55zi.js} +23 -23
- package/dist/components/custom/aurora/composables/atoms.d.ts +21 -4
- package/dist/components/custom/aurora/composables/runtime.d.ts +0 -9
- package/dist/components/custom/aurora/composables/uniformBridge.d.ts +0 -11
- package/dist/components/custom/aurora/constants/renderMode.d.ts +0 -32
- package/dist/components/custom/aurora/constants/shaders/brush.glsl.d.ts +1 -1
- package/dist/components/custom/aurora/constants/shaders/mediums.glsl.d.ts +2 -2
- package/dist/components/custom/aurora/constants/shaders/tonemap.glsl.d.ts +1 -1
- package/dist/components/custom/aurora/constants/shaders/vangogh-medium.glsl.d.ts +1 -0
- package/dist/components/custom/aurora/index.d.ts +1 -1
- package/dist/components/custom/constellation/Constellation.vue.d.ts +85 -1
- package/dist/components/custom/constellation/composables/createConstellationField.d.ts +35 -0
- package/dist/components/custom/constellation/composables/useConstellationPointer.d.ts +35 -0
- package/dist/components/custom/constellation/constants.d.ts +36 -0
- package/dist/components/custom/constellation/constellationDraw.d.ts +18 -0
- package/dist/components/custom/constellation/constellationField.d.ts +174 -63
- package/dist/components/custom/constellation/constellationInteraction.d.ts +102 -0
- package/dist/components/custom/constellation/index.d.ts +4 -2
- package/dist/components/custom/controls/DarkModeToggle.vue.d.ts +11 -0
- package/dist/components/custom/dock/GlassDock.vue.d.ts +2 -110
- package/dist/components/custom/dock/composables/dockMorphContext.d.ts +36 -0
- package/dist/components/custom/dock/composables/useDockMorphWindow.d.ts +15 -0
- package/dist/components/custom/dock/composables/useDockShellProps.d.ts +131 -0
- package/dist/components/custom/dock/composables/useLayerTransition.d.ts +44 -0
- package/dist/components/custom/dock/constants.d.ts +23 -0
- package/dist/components/custom/fourier-field/FourierField.vue.d.ts +6 -0
- package/dist/components/custom/fourier-field/index.d.ts +25 -1
- package/dist/components/custom/fourier-field/math.d.ts +20 -8
- package/dist/components/custom/fourier-field/presets.d.ts +54 -0
- package/dist/components/custom/goo-blob/GooBlob.vue.d.ts +8 -10
- package/dist/components/custom/goo-blob/composables/buildMetaballProgram.d.ts +18 -0
- package/dist/components/custom/goo-blob/composables/uploadBlobUniforms.d.ts +41 -0
- package/dist/components/custom/goo-blob/composables/useBlobPointer.d.ts +4 -3
- package/dist/components/custom/goo-blob/composables/useMetaballRenderer.d.ts +16 -21
- package/dist/components/custom/goo-blob/constants.d.ts +52 -0
- package/dist/components/custom/goo-blob/index.d.ts +1 -1
- package/dist/components/custom/goo-blob/shaders/metaball-uniforms.glsl.d.ts +1 -0
- package/dist/components/custom/goo-blob/types.d.ts +59 -25
- package/dist/components/custom/instrument-chassis/InstrumentChassis.vue.d.ts +2 -2
- package/dist/components/custom/tabs/constants.d.ts +12 -0
- package/dist/components/custom/underline/GlassUnderline.vue.d.ts +84 -0
- package/dist/components/custom/underline/index.d.ts +2 -0
- package/dist/components/custom/underline/types.d.ts +56 -0
- package/dist/components/ui/drawer/Drawer.vue.d.ts +1 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +2 -2
- package/dist/components/ui/slider/index.d.ts +25 -18
- package/dist/components/ui/toast/use-toast.d.ts +2 -2
- package/dist/composables/color/index.d.ts +24 -7
- package/dist/composables/glass/useSpecularTracking.d.ts +12 -3
- package/dist/composables/glass/webgl/shaders/procedural-color.glsl.d.ts +1 -6
- package/dist/composables/motion/curves.d.ts +48 -0
- package/dist/composables/motion/index.d.ts +2 -0
- package/dist/composables/motion/springPresets.d.ts +33 -0
- package/dist/composables/motion/suite.d.ts +2 -0
- package/dist/composables/motion/useSpringMount.d.ts +1 -1
- package/dist/configurator.js +1 -1
- package/dist/confirm-dialog.js +2 -2
- package/dist/constellation.js +322 -147
- package/dist/controls.js +48 -14
- package/dist/dark.js +1 -1
- package/dist/data-table.js +1 -1
- package/dist/dialog.js +2 -2
- package/dist/dock.js +340 -327
- package/dist/dockContext-bho8B1A4.js +17 -0
- package/dist/{dropdown-menu-D77jX6Df.js → dropdown-menu-DVnQcA0E.js} +7 -4
- package/dist/dropdown-menu.js +1 -1
- package/dist/expandable-container.js +1 -1
- package/dist/forms.js +2 -2
- package/dist/fourier-field.js +147 -120
- package/dist/fourier-math.d.ts +1 -0
- package/dist/fourier-math.js +2 -0
- package/dist/glass-ui.css +1 -1
- package/dist/glass-ui.js +286 -207
- package/dist/goo-blob.js +368 -322
- package/dist/hover-popover.js +1 -1
- package/dist/icon-tooltip.js +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/keyboard.js +1 -1
- package/dist/labeled-field.js +5 -5
- package/dist/math-BUU9hHID.js +43 -0
- package/dist/metric-badge.js +1 -1
- package/dist/metric-stack.js +2 -2
- package/dist/motion-core.js +4 -4
- package/dist/motion-curves.d.ts +1 -0
- package/dist/motion-curves.js +130 -0
- package/dist/motion.js +38 -37
- package/dist/notification.js +1 -1
- package/dist/number-field.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/progress.js +1 -1
- package/dist/pulse.js +1 -1
- package/dist/reactive.js +1 -1
- package/dist/scrolling-text.js +1 -1
- package/dist/search.js +6 -6
- package/dist/select.js +1 -1
- package/dist/{sheet-VZEtNFvO.js → sheet-ChSXcJpU.js} +1 -1
- package/dist/sheet.js +1 -1
- package/dist/{slider-DC2mwuoe.js → slider-sfl8gFDD.js} +8 -8
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +2 -2
- package/dist/springPresets-aRSm-4_k.js +40 -0
- package/dist/stacked-icons.js +6 -6
- package/dist/styles/cards.css +2 -2
- package/dist/styles/components.css +1 -1
- package/dist/styles/dock/layer-group.css +38 -4
- package/dist/styles/dock/layers.css +11 -1
- package/dist/styles/dock/morph.css +95 -19
- package/dist/styles/dock/shell.css +12 -0
- package/dist/styles/dock-controls.css +25 -12
- package/dist/styles/drawer.css +14 -4
- package/dist/styles/floating-panel.css +2 -0
- package/dist/styles/glass/a11y-fallback.css +245 -0
- package/dist/styles/glass/ladder.css +304 -0
- package/dist/styles/glass/material.css +238 -0
- package/dist/styles/glass/progress-rail.css +78 -0
- package/dist/styles/glass/squircle.css +66 -0
- package/dist/styles/glass/surfaces.css +306 -0
- package/dist/styles/glass-refract.css +2 -0
- package/dist/styles/glass.css +31 -1052
- package/dist/styles/hover-popover.css +2 -0
- package/dist/styles/index.css +24 -6
- package/dist/styles/instrument-chassis.css +4 -0
- package/dist/styles/theme.css +14 -14
- package/dist/styles/tokens/color-radius.css +250 -0
- package/dist/styles/tokens/dark-arm.css +194 -0
- package/dist/styles/tokens/glass.css +413 -0
- package/dist/styles/tokens/light-dark.css +158 -0
- package/dist/styles/tokens/offsets-sizing.css +406 -0
- package/dist/styles/tokens/property-regs.css +169 -0
- package/dist/styles/tokens/scale-paper.css +361 -0
- package/dist/styles/tokens/scheme-motion.css +334 -0
- package/dist/styles/tokens/shadow.css +132 -0
- package/dist/styles/tokens.css +22 -2269
- package/dist/styles/transitions.css +20 -2
- package/dist/styles/typography.css +18 -6
- package/dist/styles/utilities/a11y-overrides.css +140 -0
- package/dist/styles/utilities/animate.css +26 -0
- package/dist/styles/utilities/base.css +365 -0
- package/dist/styles/utilities/btn.css +399 -0
- package/dist/styles/utilities/components.css +317 -0
- package/dist/styles/utilities.css +19 -1170
- package/dist/switch.js +1 -1
- package/dist/tabs.js +98 -98
- package/dist/timeline.js +2 -2
- package/dist/toast.js +1 -1
- package/dist/toggle-group.js +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/underline.d.ts +1 -0
- package/dist/underline.js +85 -0
- package/dist/{useAnimatedNumber-C5I3wWd8.js → useAnimatedNumber-DfVgP4te.js} +1 -1
- package/dist/{useConfiguratorState-DxAqksK6.js → useConfiguratorState-BdQXh9ie.js} +1 -1
- package/dist/useSpecularTracking-DFK_fhpG.js +32 -0
- package/dist/useSpringMount-DXUzxBjV.js +108 -0
- package/dist/watercolor-dot.js +2 -2
- package/package.json +62 -38
- package/src/styles/cards.css +2 -2
- package/src/styles/dock/layer-group.css +38 -4
- package/src/styles/dock/layers.css +11 -1
- package/src/styles/dock/morph.css +95 -19
- package/src/styles/dock/shell.css +12 -0
- package/src/styles/dock-controls.css +25 -12
- package/src/styles/drawer.css +12 -4
- package/src/styles/glass/a11y-fallback.css +245 -0
- package/src/styles/glass/ladder.css +304 -0
- package/src/styles/glass/material.css +238 -0
- package/src/styles/glass/progress-rail.css +78 -0
- package/src/styles/glass/squircle.css +66 -0
- package/src/styles/glass/surfaces.css +306 -0
- package/src/styles/glass.css +31 -1052
- package/src/styles/index.css +24 -6
- package/src/styles/theme.css +14 -14
- package/src/styles/tokens/color-radius.css +250 -0
- package/src/styles/tokens/dark-arm.css +194 -0
- package/src/styles/tokens/glass.css +413 -0
- package/src/styles/tokens/light-dark.css +158 -0
- package/src/styles/tokens/offsets-sizing.css +406 -0
- package/src/styles/tokens/property-regs.css +169 -0
- package/src/styles/tokens/scale-paper.css +361 -0
- package/src/styles/tokens/scheme-motion.css +334 -0
- package/src/styles/tokens/shadow.css +132 -0
- package/src/styles/tokens.css +22 -2269
- package/src/styles/transitions.css +20 -2
- package/src/styles/typography.css +18 -6
- package/src/styles/utilities/a11y-overrides.css +140 -0
- package/src/styles/utilities/animate.css +26 -0
- package/src/styles/utilities/base.css +365 -0
- package/src/styles/utilities/btn.css +399 -0
- package/src/styles/utilities/components.css +317 -0
- package/src/styles/utilities.css +19 -1170
- package/dist/DeckProgress-Dmk4_AKN.js +0 -23
- package/dist/InstrumentRail-CUJ05YVG.js +0 -44
- package/dist/components/custom/aurora/composables/gpuRuntime.d.ts +0 -16
- package/dist/components/custom/aurora/constants/shaders/aurora.wgsl.d.ts +0 -7
- package/dist/components/custom/deck-progress/DeckProgress.vue.d.ts +0 -27
- package/dist/components/custom/deck-progress/index.d.ts +0 -2
- package/dist/components/custom/dialog-native/GlassDialogNative.vue.d.ts +0 -57
- package/dist/components/custom/dialog-native/index.d.ts +0 -1
- package/dist/components/custom/glass-panel/GlassPanel.vue.d.ts +0 -41
- package/dist/components/custom/glass-panel/index.d.ts +0 -2
- package/dist/components/custom/header-ribbon/HeaderRibbon.vue.d.ts +0 -31
- package/dist/components/custom/header-ribbon/index.d.ts +0 -2
- package/dist/components/custom/header-ribbon/types.d.ts +0 -7
- package/dist/components/custom/instrument-rail/InstrumentRail.vue.d.ts +0 -91
- package/dist/components/custom/instrument-rail/index.d.ts +0 -2
- package/dist/composables/glass/createGPUCanvas.d.ts +0 -40
- package/dist/deck-progress.d.ts +0 -1
- package/dist/deck-progress.js +0 -2
- package/dist/dockContext-BKeIMmNk.js +0 -9
- package/dist/glass-panel.d.ts +0 -1
- package/dist/glass-panel.js +0 -44
- package/dist/header-ribbon.d.ts +0 -1
- package/dist/header-ribbon.js +0 -63
- package/dist/instrument-rail.d.ts +0 -1
- package/dist/instrument-rail.js +0 -2
- package/dist/useGlassRenderer-5I0YkI4t.js +0 -69
- package/dist/useSpecularTracking-BVRZsRHA.js +0 -26
- package/dist/useSpringMount-BJSHcLl3.js +0 -113
- /package/dist/{CollapsibleContent-CP9qF1v4.js → CollapsibleContent-Drow5WkV.js} +0 -0
- /package/dist/{DialogFooter-Gprw8H_A.js → DialogFooter-DufLHi0y.js} +0 -0
- /package/dist/{IconTooltip-yefK7cJc.js → IconTooltip-BrQ5p181.js} +0 -0
- /package/dist/{Input-DWQQIOC4.js → Input-B-F818RU.js} +0 -0
- /package/dist/{_plugin-vue_export-helper-ok8pgSl5.js → _plugin-vue_export-helper-DWghtRt7.js} +0 -0
- /package/dist/{constants-CS75AWHG.js → constants-C8NMonuo.js} +0 -0
- /package/dist/{presets-BKVyQfbt.js → presets-1OhFpaIC.js} +0 -0
- /package/dist/{prng-wHuHlNHE.js → prng-CjVgzjQT.js} +0 -0
- /package/dist/{resolveCanvasColor-BBiYfp8g.js → resolveCanvasColor-CRvVzOvP.js} +0 -0
- /package/dist/{useCanvas2D-ClrQuZtp.js → useCanvas2D-CSeH8h16.js} +0 -0
- /package/dist/{useGlobalDark-yhL4Wp-s.js → useGlobalDark-D7R9OypB.js} +0 -0
- /package/dist/{useIntersectionPause-Cc-H9ees.js → useIntersectionPause-DAdVPVp4.js} +0 -0
- /package/dist/{useInterval-Dsmqwi03.js → useInterval-D3USn0yc.js} +0 -0
- /package/dist/{useKeyboardShortcuts-Be3w_Rwk.js → useKeyboardShortcuts-i8tHd5WO.js} +0 -0
- /package/dist/{useScrollProgress-CAH8Ofwt.js → useScrollProgress-CcgmgMQt.js} +0 -0
- /package/dist/{useSortable-C8ReQ50P.js → useSortable-DnyGXKKY.js} +0 -0
- /package/dist/{useTextHighlight-DON84L8w.js → useTextHighlight-B3b10W6r.js} +0 -0
package/dist/switch.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./Switch-
|
|
1
|
+
import { t as e } from "./Switch-DeAqg6pi.js";
|
|
2
2
|
export { e as Switch };
|
package/dist/tabs.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as e } from "./cn-DJXf4yaB.js";
|
|
2
|
-
import { t } from "./
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
2
|
+
import { a as t, i as n, o as r, r as i, s as a } from "./SelectScrollDownButton-pirzjm--.js";
|
|
3
|
+
import { i as o, n as s, r as c, t as l } from "./TooltipProvider-CmZzCuaG.js";
|
|
4
|
+
import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, createVNode as _, defineComponent as v, mergeModels as y, mergeProps as b, nextTick as x, normalizeClass as S, normalizeStyle as C, onBeforeUnmount as ee, onMounted as w, onUnmounted as T, openBlock as E, ref as D, renderList as O, renderSlot as k, toDisplayString as A, unref as j, useModel as te, watch as M, withCtx as N } from "vue";
|
|
5
|
+
//#endregion
|
|
6
6
|
//#region src/components/custom/tabs/composables/useTabIndicator.ts
|
|
7
|
-
function
|
|
8
|
-
let { containerRef: t, indicatorRef: n, buttonRefs: r, options: i, model: a, multiSelect: o, anchorSupported: s, jsSliderActive: c, activeValues: l } = e, u =
|
|
7
|
+
function ne(e) {
|
|
8
|
+
let { containerRef: t, indicatorRef: n, buttonRefs: r, options: i, model: a, multiSelect: o, anchorSupported: s, jsSliderActive: c, activeValues: l } = e, u = D({
|
|
9
9
|
width: "0px",
|
|
10
10
|
transform: "translateX(0px)",
|
|
11
11
|
opacity: "0"
|
|
@@ -21,7 +21,7 @@ function te(e) {
|
|
|
21
21
|
opacity: "1"
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
let f =
|
|
24
|
+
let f = D({});
|
|
25
25
|
function p() {
|
|
26
26
|
if (!o.value) return;
|
|
27
27
|
let e = {};
|
|
@@ -59,15 +59,15 @@ function te(e) {
|
|
|
59
59
|
i.style.setProperty("--stretch", "1"), g = null;
|
|
60
60
|
}, 60);
|
|
61
61
|
}
|
|
62
|
-
|
|
63
|
-
c.value &&
|
|
64
|
-
}, { deep: !0 }),
|
|
65
|
-
c.value &&
|
|
62
|
+
M(() => a.value, () => {
|
|
63
|
+
c.value && x(m);
|
|
64
|
+
}, { deep: !0 }), M(() => i.value, () => {
|
|
65
|
+
c.value && x(m);
|
|
66
66
|
}, { deep: !0 });
|
|
67
67
|
let y = null;
|
|
68
|
-
return
|
|
69
|
-
h = i.value.findIndex((e) => l.value.includes(e.value)), c.value && (
|
|
70
|
-
}),
|
|
68
|
+
return w(() => {
|
|
69
|
+
h = i.value.findIndex((e) => l.value.includes(e.value)), c.value && (x(m), t.value && (y = new ResizeObserver(() => m()), y.observe(t.value)));
|
|
70
|
+
}), T(() => {
|
|
71
71
|
y?.disconnect(), g && clearTimeout(g);
|
|
72
72
|
}), {
|
|
73
73
|
singleSliderStyle: u,
|
|
@@ -77,17 +77,17 @@ function te(e) {
|
|
|
77
77
|
}
|
|
78
78
|
//#endregion
|
|
79
79
|
//#region src/components/custom/tabs/SegmentedTabs.vue?vue&type=script&setup=true&lang.ts
|
|
80
|
-
var
|
|
80
|
+
var re = ["role"], ie = [
|
|
81
81
|
"role",
|
|
82
82
|
"disabled",
|
|
83
83
|
"onClick"
|
|
84
|
-
],
|
|
84
|
+
], ae = [
|
|
85
85
|
"role",
|
|
86
86
|
"disabled",
|
|
87
87
|
"onClick"
|
|
88
|
-
],
|
|
88
|
+
], P = /* @__PURE__ */ v({
|
|
89
89
|
__name: "SegmentedTabs",
|
|
90
|
-
props: /* @__PURE__ */
|
|
90
|
+
props: /* @__PURE__ */ y({
|
|
91
91
|
options: {},
|
|
92
92
|
variant: { default: "segmented" },
|
|
93
93
|
multiSelect: {
|
|
@@ -111,33 +111,33 @@ var ne = ["role"], re = [
|
|
|
111
111
|
modelModifiers: {}
|
|
112
112
|
}),
|
|
113
113
|
emits: ["update:modelValue"],
|
|
114
|
-
setup(
|
|
114
|
+
setup(v) {
|
|
115
115
|
function y(e, t) {
|
|
116
116
|
return typeof document > "u" ? t : getComputedStyle(document.documentElement).getPropertyValue(e).trim() || t;
|
|
117
117
|
}
|
|
118
|
-
let
|
|
119
|
-
|
|
120
|
-
let
|
|
121
|
-
let e =
|
|
122
|
-
return
|
|
123
|
-
}),
|
|
124
|
-
function
|
|
125
|
-
|
|
118
|
+
let T = v, M = te(v, "modelValue"), P = D(null), F = D(null), I = D([]), L = typeof CSS < "u" && typeof CSS.supports == "function" && CSS.supports("position-anchor", "--x"), R = d(() => T.variant === "underline");
|
|
119
|
+
d(() => T.variant === "pill"), d(() => T.variant === "segmented");
|
|
120
|
+
let z = d(() => T.overflow === "scroll"), B = d(() => T.overflow === "auto"), V = d(() => T.multiSelect && !R.value), H = d(() => {
|
|
121
|
+
let e = M.value;
|
|
122
|
+
return V.value && Array.isArray(e) ? e : e == null ? [] : [e];
|
|
123
|
+
}), U = (e) => H.value.includes(e), oe = d(() => (V.value || !L) && !R.value), W = d(() => !V.value && !L && !R.value), G = d(() => T.responsive === !1 ? null : T.responsive === !0 ? {} : T.responsive), se = d(() => G.value?.breakpoint ?? "640px"), K = d(() => G.value?.desktopOptions ?? T.options), q = D(!0), J = null;
|
|
124
|
+
function Y(e) {
|
|
125
|
+
q.value = e.matches;
|
|
126
126
|
}
|
|
127
|
-
let
|
|
128
|
-
if (!
|
|
129
|
-
let e =
|
|
130
|
-
return e.some((e) => e.value ===
|
|
131
|
-
}),
|
|
127
|
+
let ce = d(() => {
|
|
128
|
+
if (!G.value) return M.value;
|
|
129
|
+
let e = K.value;
|
|
130
|
+
return e.some((e) => e.value === M.value) ? M.value : e[0]?.value ?? M.value;
|
|
131
|
+
}), X = d(() => G.value ? K.value : T.options), le = d(() => G.value?.ariaLabel ?? T.options.find((e) => e.value === M.value)?.label ?? "Select"), ue = d(() => !!G.value && !q.value), { singleSliderStyle: de, multiSliderStyles: Z, squishOnTravel: fe } = ne({
|
|
132
132
|
containerRef: P,
|
|
133
|
-
indicatorRef:
|
|
134
|
-
buttonRefs:
|
|
135
|
-
options:
|
|
136
|
-
model:
|
|
137
|
-
multiSelect:
|
|
138
|
-
anchorSupported:
|
|
139
|
-
jsSliderActive:
|
|
140
|
-
activeValues:
|
|
133
|
+
indicatorRef: F,
|
|
134
|
+
buttonRefs: I,
|
|
135
|
+
options: X,
|
|
136
|
+
model: d(() => ce.value),
|
|
137
|
+
multiSelect: V,
|
|
138
|
+
anchorSupported: L,
|
|
139
|
+
jsSliderActive: oe,
|
|
140
|
+
activeValues: H
|
|
141
141
|
});
|
|
142
142
|
function pe(e) {
|
|
143
143
|
if (typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
|
|
@@ -156,8 +156,8 @@ var ne = ["role"], re = [
|
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
158
|
function Q(e) {
|
|
159
|
-
if (!
|
|
160
|
-
let t =
|
|
159
|
+
if (!z.value && !B.value) return;
|
|
160
|
+
let t = I.value[e];
|
|
161
161
|
if (!t) return;
|
|
162
162
|
let n = typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
163
163
|
t.scrollIntoView({
|
|
@@ -167,117 +167,117 @@ var ne = ["role"], re = [
|
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
169
|
function $(e, t) {
|
|
170
|
-
if (
|
|
171
|
-
let n =
|
|
172
|
-
if (n && pe(n), fe(t),
|
|
173
|
-
let t = [...
|
|
174
|
-
n > -1 ? t.length > 1 && t.splice(n, 1) : t.push(e),
|
|
175
|
-
} else
|
|
170
|
+
if (X.value[t]?.disabled) return;
|
|
171
|
+
let n = I.value[t];
|
|
172
|
+
if (n && pe(n), fe(t), V.value) {
|
|
173
|
+
let t = [...H.value], n = t.indexOf(e);
|
|
174
|
+
n > -1 ? t.length > 1 && t.splice(n, 1) : t.push(e), M.value = t;
|
|
175
|
+
} else M.value = e;
|
|
176
176
|
Q(t);
|
|
177
177
|
}
|
|
178
178
|
function me(e) {
|
|
179
|
-
typeof e == "string" && (
|
|
179
|
+
typeof e == "string" && (M.value = e);
|
|
180
180
|
}
|
|
181
|
-
return
|
|
182
|
-
|
|
183
|
-
let e =
|
|
181
|
+
return w(() => {
|
|
182
|
+
G.value && typeof window < "u" && window.matchMedia && (J = window.matchMedia(`(min-width: ${se.value})`), q.value = J.matches, J.addEventListener("change", Y)), x(() => {
|
|
183
|
+
let e = X.value.findIndex((e) => U(e.value));
|
|
184
184
|
e >= 0 && Q(e);
|
|
185
185
|
});
|
|
186
|
-
}),
|
|
187
|
-
|
|
188
|
-
}), (
|
|
186
|
+
}), ee(() => {
|
|
187
|
+
J?.removeEventListener("change", Y), J = null;
|
|
188
|
+
}), (d, y) => ue.value ? (E(), m("div", {
|
|
189
189
|
key: 0,
|
|
190
|
-
class:
|
|
191
|
-
}, [
|
|
192
|
-
"model-value":
|
|
190
|
+
class: S(j(e)("segmented-tabs__mobile w-fit", T.class))
|
|
191
|
+
}, [_(j(a), {
|
|
192
|
+
"model-value": M.value,
|
|
193
193
|
"onUpdate:modelValue": me
|
|
194
194
|
}, {
|
|
195
|
-
default:
|
|
196
|
-
"aria-label":
|
|
197
|
-
class:
|
|
195
|
+
default: N(() => [_(j(t), {
|
|
196
|
+
"aria-label": le.value,
|
|
197
|
+
class: S(j(e)("segmented-tabs__trigger text-small w-auto min-w-input-sm", G.value?.triggerClass))
|
|
198
198
|
}, {
|
|
199
|
-
default:
|
|
199
|
+
default: N(() => [_(j(r))]),
|
|
200
200
|
_: 1
|
|
201
|
-
}, 8, ["aria-label", "class"]),
|
|
202
|
-
default:
|
|
201
|
+
}, 8, ["aria-label", "class"]), _(j(n), null, {
|
|
202
|
+
default: N(() => [(E(!0), m(u, null, O(v.options, (e) => (E(), f(j(i), {
|
|
203
203
|
key: e.value,
|
|
204
204
|
value: e.value
|
|
205
205
|
}, {
|
|
206
|
-
default:
|
|
206
|
+
default: N(() => [g(A(e.label), 1)]),
|
|
207
207
|
_: 2
|
|
208
208
|
}, 1032, ["value"]))), 128))]),
|
|
209
209
|
_: 1
|
|
210
210
|
})]),
|
|
211
211
|
_: 1
|
|
212
|
-
}, 8, ["model-value"])], 2)) : (
|
|
212
|
+
}, 8, ["model-value"])], 2)) : (E(), m("div", {
|
|
213
213
|
key: 1,
|
|
214
214
|
ref_key: "containerRef",
|
|
215
215
|
ref: P,
|
|
216
|
-
role:
|
|
217
|
-
class:
|
|
216
|
+
role: R.value ? "tablist" : "group",
|
|
217
|
+
class: S(j(e)("segmented-tabs", `segmented-tabs--${v.variant}`, z.value && "segmented-tabs--scroll scroll-fade-mask scrollbar-hidden", B.value && "segmented-tabs--auto scrollbar-hidden", T.class))
|
|
218
218
|
}, [
|
|
219
|
-
!
|
|
219
|
+
!R.value && !V.value ? (E(), m("div", {
|
|
220
220
|
key: 0,
|
|
221
221
|
ref_key: "indicatorRef",
|
|
222
|
-
ref:
|
|
223
|
-
class:
|
|
224
|
-
style:
|
|
225
|
-
}, null, 6)) :
|
|
226
|
-
!
|
|
222
|
+
ref: F,
|
|
223
|
+
class: S(["segmented-indicator", W.value ? "segmented-indicator--js" : "segmented-indicator--anchor"]),
|
|
224
|
+
style: C(W.value ? j(de) : void 0)
|
|
225
|
+
}, null, 6)) : p("", !0),
|
|
226
|
+
!R.value && V.value ? (E(!0), m(u, { key: 1 }, O(H.value, (e) => (E(), m("div", {
|
|
227
227
|
key: "indicator-" + e,
|
|
228
228
|
class: "segmented-indicator segmented-indicator--js",
|
|
229
|
-
style:
|
|
230
|
-
}, null, 4))), 128)) :
|
|
231
|
-
(
|
|
229
|
+
style: C(j(Z)[e] ?? { opacity: "0" })
|
|
230
|
+
}, null, 4))), 128)) : p("", !0),
|
|
231
|
+
(E(!0), m(u, null, O(X.value, (e, t) => (E(), m(u, { key: e.value }, [e.tooltip ? (E(), f(j(l), {
|
|
232
232
|
key: 0,
|
|
233
233
|
"delay-duration": 200
|
|
234
234
|
}, {
|
|
235
|
-
default:
|
|
236
|
-
default:
|
|
237
|
-
default:
|
|
235
|
+
default: N(() => [_(j(o), null, {
|
|
236
|
+
default: N(() => [_(j(s), { "as-child": "" }, {
|
|
237
|
+
default: N(() => [h("button", b({
|
|
238
238
|
ref_for: !0,
|
|
239
239
|
ref: (e) => {
|
|
240
|
-
e && (
|
|
240
|
+
e && (I.value[t] = e);
|
|
241
241
|
},
|
|
242
242
|
class: "segmented-tab",
|
|
243
|
-
role:
|
|
244
|
-
}, { ref_for: !0 },
|
|
243
|
+
role: R.value ? "tab" : void 0
|
|
244
|
+
}, { ref_for: !0 }, R.value ? { "aria-selected": U(e.value) ? "true" : "false" } : { "aria-pressed": U(e.value) ? "true" : "false" }, {
|
|
245
245
|
disabled: e.disabled,
|
|
246
246
|
class: e.disabled && "is-disabled",
|
|
247
247
|
onClick: (n) => $(e.value, t)
|
|
248
|
-
}), [
|
|
248
|
+
}), [k(d.$slots, "option", {
|
|
249
249
|
option: e,
|
|
250
|
-
active:
|
|
251
|
-
}, () => [
|
|
250
|
+
active: U(e.value)
|
|
251
|
+
}, () => [g(A(e.label), 1)])], 16, ie)]),
|
|
252
252
|
_: 2
|
|
253
|
-
}, 1024),
|
|
253
|
+
}, 1024), _(j(c), {
|
|
254
254
|
side: "bottom",
|
|
255
255
|
"side-offset": 8
|
|
256
256
|
}, {
|
|
257
|
-
default:
|
|
257
|
+
default: N(() => [g(A(e.tooltip), 1)]),
|
|
258
258
|
_: 2
|
|
259
259
|
}, 1024)]),
|
|
260
260
|
_: 2
|
|
261
261
|
}, 1024)]),
|
|
262
262
|
_: 2
|
|
263
|
-
}, 1024)) : (
|
|
263
|
+
}, 1024)) : (E(), m("button", b({
|
|
264
264
|
key: 1,
|
|
265
265
|
ref_for: !0,
|
|
266
266
|
ref: (e) => {
|
|
267
|
-
e && (
|
|
267
|
+
e && (I.value[t] = e);
|
|
268
268
|
},
|
|
269
269
|
class: "segmented-tab",
|
|
270
|
-
role:
|
|
271
|
-
}, { ref_for: !0 },
|
|
270
|
+
role: R.value ? "tab" : void 0
|
|
271
|
+
}, { ref_for: !0 }, R.value ? { "aria-selected": U(e.value) ? "true" : "false" } : { "aria-pressed": U(e.value) ? "true" : "false" }, {
|
|
272
272
|
disabled: e.disabled,
|
|
273
273
|
class: e.disabled && "is-disabled",
|
|
274
274
|
onClick: (n) => $(e.value, t)
|
|
275
|
-
}), [
|
|
275
|
+
}), [k(d.$slots, "option", {
|
|
276
276
|
option: e,
|
|
277
|
-
active:
|
|
278
|
-
}, () => [
|
|
279
|
-
], 10,
|
|
277
|
+
active: U(e.value)
|
|
278
|
+
}, () => [g(A(e.label), 1)])], 16, ae))], 64))), 128))
|
|
279
|
+
], 10, re));
|
|
280
280
|
}
|
|
281
|
-
})
|
|
281
|
+
});
|
|
282
282
|
//#endregion
|
|
283
|
-
export {
|
|
283
|
+
export { P as SegmentedTabs };
|
package/dist/timeline.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./_plugin-vue_export-helper-
|
|
2
|
-
import { t } from "./HoverPopover-
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-DWghtRt7.js";
|
|
2
|
+
import { t } from "./HoverPopover-CDA_SaCe.js";
|
|
3
3
|
import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createSlots as c, createVNode as l, defineComponent as u, guardReactiveProps as d, normalizeClass as f, normalizeProps as p, normalizeStyle as m, openBlock as h, ref as g, renderList as _, renderSlot as v, toDisplayString as y, unref as b, withCtx as x } from "vue";
|
|
4
4
|
//#region src/components/custom/timeline/geometry.ts
|
|
5
5
|
function S(e) {
|
package/dist/toast.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./Toaster-
|
|
1
|
+
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./Toaster-CvuuW_y9.js";
|
|
2
2
|
export { t as Toast, o as ToastAction, i as ToastClose, e as ToastDescription, n as ToastTitle, s as Toaster, r as toast, a as useToast };
|
package/dist/toggle-group.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./ToggleGroupItem-
|
|
1
|
+
import { n as e, t } from "./ToggleGroupItem-DtD37b4G.js";
|
|
2
2
|
export { e as ToggleGroup, t as ToggleGroupItem };
|
package/dist/typewriter.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./_plugin-vue_export-helper-
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-DWghtRt7.js";
|
|
2
2
|
import { Fragment as t, computed as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, defineComponent as o, normalizeClass as s, onMounted as c, onUnmounted as l, openBlock as u, ref as d, renderList as f, toDisplayString as p, unref as m, watch as h } from "vue";
|
|
3
3
|
//#region src/components/custom/typewriter/types.ts
|
|
4
4
|
var g = {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./components/custom/underline";
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-DWghtRt7.js";
|
|
2
|
+
import { computed as t, createElementBlock as n, createElementVNode as r, defineComponent as i, normalizeStyle as a, onMounted as o, openBlock as s, ref as c, renderSlot as l, unref as u, useCssVars as d, useId as f, watch as p } from "vue";
|
|
3
|
+
import { NumericAnimation as m } from "@mkbabb/keyframes.js";
|
|
4
|
+
import { easeOutCubic as h } from "@mkbabb/value.js";
|
|
5
|
+
//#region src/components/custom/underline/GlassUnderline.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var g = ["data-gu-clock", "data-gu-variant"], _ = ["viewBox"], v = ["id", "d"], y = ["d"], b = 120, x = "M1,6 C18,3 30,8 48,5 S78,3 99,6", S = "M1,7.1 C20,5 32,9 50,6.2 S80,5 99,7", C = /* @__PURE__ */ e(/* @__PURE__ */ i({
|
|
7
|
+
__name: "GlassUnderline",
|
|
8
|
+
props: {
|
|
9
|
+
clock: { default: "load" },
|
|
10
|
+
variant: { default: "pen" },
|
|
11
|
+
color: { default: void 0 },
|
|
12
|
+
drawMs: { default: 700 },
|
|
13
|
+
easing: {
|
|
14
|
+
type: Function,
|
|
15
|
+
default: void 0
|
|
16
|
+
},
|
|
17
|
+
timeline: { default: void 0 },
|
|
18
|
+
active: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: void 0
|
|
21
|
+
},
|
|
22
|
+
paths: { default: void 0 }
|
|
23
|
+
},
|
|
24
|
+
setup(e, { expose: i }) {
|
|
25
|
+
d((e) => ({ v237e7abc: C.color ?? "var(--primary)" }));
|
|
26
|
+
let C = e;
|
|
27
|
+
function w() {
|
|
28
|
+
return typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
29
|
+
}
|
|
30
|
+
let T = w(), E = t(() => C.paths?.stroke ?? x), D = t(() => C.paths?.ghost ?? S), O = t(() => C.paths?.viewBox ?? "0 0 100 10"), k = t(() => C.paths?.len ?? b), A = f(), j = t(() => C.clock === "scroll" ? T ? "static" : "scroll" : C.clock === "static" ? "static" : "load"), M = c(C.clock === "load" && !T && C.active !== !0 ? k.value : 0), N = null;
|
|
31
|
+
async function P() {
|
|
32
|
+
if (C.clock === "load") {
|
|
33
|
+
if (T) {
|
|
34
|
+
M.value = 0;
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
N?.stop(), M.value = k.value, N = new m([{ off: k.value }, { off: 0 }], {
|
|
38
|
+
duration: C.drawMs,
|
|
39
|
+
timingFunction: C.easing ?? h,
|
|
40
|
+
respectReducedMotion: !0
|
|
41
|
+
}), await N.play((e) => {
|
|
42
|
+
M.value = e.off;
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function F() {
|
|
47
|
+
N?.stop(), M.value = 0;
|
|
48
|
+
}
|
|
49
|
+
function I() {
|
|
50
|
+
N?.stop(), M.value = C.clock === "load" && !T ? k.value : 0;
|
|
51
|
+
}
|
|
52
|
+
return p(() => C.active, (e, t) => {
|
|
53
|
+
C.clock === "load" && (e === !0 && t !== !0 ? T ? F() : P() : e === !1 && t === !0 && I());
|
|
54
|
+
}), o(() => {
|
|
55
|
+
C.clock === "load" && C.active === !0 && (T ? F() : P());
|
|
56
|
+
}), i({
|
|
57
|
+
play: P,
|
|
58
|
+
snap: F
|
|
59
|
+
}), (t, i) => (s(), n("span", {
|
|
60
|
+
class: "glass-underline",
|
|
61
|
+
"data-gu-clock": j.value,
|
|
62
|
+
"data-gu-variant": e.variant,
|
|
63
|
+
style: a(e.timeline ? { "--gu-timeline": e.timeline } : void 0)
|
|
64
|
+
}, [l(t.$slots, "default", {}, void 0, !0), (s(), n("svg", {
|
|
65
|
+
class: "glass-underline__ink",
|
|
66
|
+
viewBox: O.value,
|
|
67
|
+
preserveAspectRatio: "none",
|
|
68
|
+
"aria-hidden": "true",
|
|
69
|
+
focusable: "false",
|
|
70
|
+
style: a({
|
|
71
|
+
"--gu-off": String(M.value),
|
|
72
|
+
"--gu-len": String(k.value)
|
|
73
|
+
})
|
|
74
|
+
}, [r("path", {
|
|
75
|
+
id: `gu-stroke-${u(A)}`,
|
|
76
|
+
class: "glass-underline__stroke",
|
|
77
|
+
d: E.value
|
|
78
|
+
}, null, 8, v), r("path", {
|
|
79
|
+
class: "glass-underline__stroke glass-underline__stroke--ghost",
|
|
80
|
+
d: D.value
|
|
81
|
+
}, null, 8, y)], 12, _))], 12, g));
|
|
82
|
+
}
|
|
83
|
+
}), [["__scopeId", "data-v-20b5d619"]]);
|
|
84
|
+
//#endregion
|
|
85
|
+
export { C as GlassUnderline };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e, t } from "./constants-
|
|
1
|
+
import { n as e, t } from "./constants-C8NMonuo.js";
|
|
2
2
|
import { getCurrentScope as n, onScopeDispose as r, readonly as i, ref as a, shallowRef as o, toValue as s, watch as c } from "vue";
|
|
3
3
|
import { SmoothProgress as l } from "@mkbabb/keyframes.js";
|
|
4
4
|
//#region src/composables/motion/useAnimatedNumber.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
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 "./_plugin-vue_export-helper-
|
|
4
|
+
import { t as r } from "./_plugin-vue_export-helper-DWghtRt7.js";
|
|
5
5
|
import { t as i } from "./createContext-B44Sah_H.js";
|
|
6
6
|
import { t as a } from "./Label-zRfbQdCn.js";
|
|
7
7
|
import { Fragment as o, computed as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, mergeModels as m, normalizeClass as h, normalizeStyle as g, openBlock as _, reactive as v, ref as y, renderList as b, renderSlot as x, toDisplayString as S, toRaw as C, unref as w, useId as T, useModel as E, withCtx as D } from "vue";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { onScopeDispose as e, ref as t } from "vue";
|
|
2
|
+
//#region src/composables/glass/useSpecularTracking.ts
|
|
3
|
+
function n() {
|
|
4
|
+
let n = t({}), r = typeof window < "u" && typeof window.matchMedia == "function" ? window.matchMedia("(prefers-reduced-motion: reduce)") : null, i = r?.matches ?? !1, a = (e) => {
|
|
5
|
+
i = e.matches;
|
|
6
|
+
};
|
|
7
|
+
r?.addEventListener("change", a);
|
|
8
|
+
let o = null, s = 0, c = 0, l = 0;
|
|
9
|
+
function u() {
|
|
10
|
+
l = 0;
|
|
11
|
+
let e = o;
|
|
12
|
+
if (o = null, !e) return;
|
|
13
|
+
let t = e.getBoundingClientRect();
|
|
14
|
+
if (t.width === 0 || t.height === 0) return;
|
|
15
|
+
let r = (s - t.left) / t.width * 100, i = (c - t.top) / t.height * 100;
|
|
16
|
+
n.value = {
|
|
17
|
+
"--mouse-x": `${r.toFixed(2)}%`,
|
|
18
|
+
"--mouse-y": `${i.toFixed(2)}%`
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function d(e) {
|
|
22
|
+
i || (o = e.currentTarget, s = e.clientX, c = e.clientY, l === 0 && (typeof requestAnimationFrame == "function" ? l = requestAnimationFrame(u) : u()));
|
|
23
|
+
}
|
|
24
|
+
return e(() => {
|
|
25
|
+
l !== 0 && typeof cancelAnimationFrame == "function" && cancelAnimationFrame(l), l = 0, o = null, r?.removeEventListener("change", a);
|
|
26
|
+
}), {
|
|
27
|
+
specularStyle: n,
|
|
28
|
+
onPointerMove: d
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { n as t };
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { n as e } from "./springPresets-aRSm-4_k.js";
|
|
2
|
+
import { computed as t, getCurrentScope as n, nextTick as r, onMounted as i, onScopeDispose as a, readonly as o, ref as s, shallowRef as c, toValue as l, watch as u } from "vue";
|
|
3
|
+
import { SpringProgress as d } from "@mkbabb/keyframes.js";
|
|
4
|
+
//#region src/composables/motion/useSpring.ts
|
|
5
|
+
function f(e, t = {}) {
|
|
6
|
+
let r = t.initial ?? 0, i = t.initialVelocity ?? 0, f = s(r), p = s(i), m = s(i === 0), h = c(new d({
|
|
7
|
+
response: t.response ?? .5,
|
|
8
|
+
dampingFraction: t.dampingFraction ?? .86,
|
|
9
|
+
initial: r,
|
|
10
|
+
initialVelocity: i,
|
|
11
|
+
settleThreshold: t.settleThreshold ?? .001,
|
|
12
|
+
velocitySettleThreshold: t.velocitySettleThreshold ?? .001,
|
|
13
|
+
respectReducedMotion: t.respectReducedMotion !== !1
|
|
14
|
+
})), g = h.value.subscribe((e, n) => {
|
|
15
|
+
f.value = e, p.value = n, m.value = h.value.settled, t.onValue?.(e, n);
|
|
16
|
+
});
|
|
17
|
+
h.value.play(() => {});
|
|
18
|
+
let _ = u(() => l(e), (e) => {
|
|
19
|
+
e != null && (h.value.target = e);
|
|
20
|
+
}, { immediate: !0 });
|
|
21
|
+
function v() {
|
|
22
|
+
f.value = h.value.value, p.value = h.value.velocity, m.value = h.value.settled;
|
|
23
|
+
}
|
|
24
|
+
function y() {
|
|
25
|
+
_(), g(), h.value.dispose();
|
|
26
|
+
}
|
|
27
|
+
return n() && a(y), {
|
|
28
|
+
value: o(f),
|
|
29
|
+
velocity: o(p),
|
|
30
|
+
isSettled: o(m),
|
|
31
|
+
snap: () => {
|
|
32
|
+
h.value.snap(), v();
|
|
33
|
+
},
|
|
34
|
+
reset: (e, t) => {
|
|
35
|
+
h.value.reset(e ?? 0, t ?? 0), v();
|
|
36
|
+
},
|
|
37
|
+
dispose: y
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region src/composables/motion/useSpringMount.ts
|
|
42
|
+
var p = Object.fromEntries([
|
|
43
|
+
"smooth",
|
|
44
|
+
"snappy",
|
|
45
|
+
"bouncy",
|
|
46
|
+
"gentle"
|
|
47
|
+
].map((t) => {
|
|
48
|
+
let { response: n, dampingFraction: r } = e(t);
|
|
49
|
+
return [t, {
|
|
50
|
+
response: n,
|
|
51
|
+
dampingFraction: r
|
|
52
|
+
}];
|
|
53
|
+
}));
|
|
54
|
+
function m(e) {
|
|
55
|
+
let n = p[e.preset ?? "smooth"], o = s(1), c = s(!1), l = 0, d = 0, m = null, h = !1, g = f(o, {
|
|
56
|
+
response: n.response,
|
|
57
|
+
dampingFraction: n.dampingFraction,
|
|
58
|
+
initial: 1,
|
|
59
|
+
settleThreshold: .001,
|
|
60
|
+
velocitySettleThreshold: .001,
|
|
61
|
+
respectReducedMotion: e.respectReducedMotion !== !1
|
|
62
|
+
});
|
|
63
|
+
i(() => {
|
|
64
|
+
e.open.value && r(() => {
|
|
65
|
+
o.value = 0;
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
let _ = u(() => e.open.value, (e, t) => {
|
|
69
|
+
e !== t && (c.value || (o.value = +!e));
|
|
70
|
+
}, { immediate: !1 }), v = u(() => g.isSettled.value, (t) => {
|
|
71
|
+
t && h && o.value >= 1 && (h = !1, e.onDismiss?.());
|
|
72
|
+
});
|
|
73
|
+
function y(e) {
|
|
74
|
+
if (e.button !== 0) return;
|
|
75
|
+
let t = e.currentTarget;
|
|
76
|
+
d = t.getBoundingClientRect().height || 1, l = e.clientY, m = e.pointerId, c.value = !0, t.setPointerCapture(e.pointerId);
|
|
77
|
+
}
|
|
78
|
+
function b(e) {
|
|
79
|
+
if (!c.value || e.pointerId !== m) return;
|
|
80
|
+
let t = e.clientY - l;
|
|
81
|
+
if (t <= 0) {
|
|
82
|
+
o.value = 0;
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
o.value = Math.min(1, t / d);
|
|
86
|
+
}
|
|
87
|
+
function x(t) {
|
|
88
|
+
if (!c.value || t.pointerId !== m) return;
|
|
89
|
+
let n = t.currentTarget;
|
|
90
|
+
n.hasPointerCapture(t.pointerId) && n.releasePointerCapture(t.pointerId), c.value = !1, m = null;
|
|
91
|
+
let r = e.dismissThreshold ?? .3;
|
|
92
|
+
o.value >= r ? (h = !0, o.value = 1) : o.value = 0;
|
|
93
|
+
}
|
|
94
|
+
return a(() => {
|
|
95
|
+
_(), v();
|
|
96
|
+
}), {
|
|
97
|
+
position: g.value,
|
|
98
|
+
isDragging: t(() => c.value),
|
|
99
|
+
dragHandlers: {
|
|
100
|
+
onPointerdown: y,
|
|
101
|
+
onPointermove: b,
|
|
102
|
+
onPointerup: x,
|
|
103
|
+
onPointercancel: x
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
//#endregion
|
|
108
|
+
export { f as n, m as t };
|
package/dist/watercolor-dot.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./_plugin-vue_export-helper-
|
|
2
|
-
import { n as t, t as n } from "./prng-
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-DWghtRt7.js";
|
|
2
|
+
import { n as t, t as n } from "./prng-CjVgzjQT.js";
|
|
3
3
|
import { computed as r, createBlock as i, createElementVNode as a, defineComponent as o, normalizeClass as s, normalizeStyle as c, onUnmounted as l, openBlock as u, ref as d, renderSlot as f, resolveDynamicComponent as p, toRef as m, useId as h, watch as g, withCtx as _ } from "vue";
|
|
4
4
|
//#region src/components/custom/watercolor-dot/prng.ts
|
|
5
5
|
function v(e, t, n) {
|