@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
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { onMounted as e, ref as t } from "vue";
|
|
2
|
-
//#region src/composables/glass/useGlassRenderer.ts
|
|
3
|
-
function n() {
|
|
4
|
-
return window.chrome && CSS.supports("backdrop-filter", "url(#x) blur(1px)") ? "svg-filter" : CSS.supports("backdrop-filter", "blur(1px)") || CSS.supports("-webkit-backdrop-filter", "blur(1px)") ? "css" : "fallback";
|
|
5
|
-
}
|
|
6
|
-
function r(e, t, n, r) {
|
|
7
|
-
e.width = t, e.height = n;
|
|
8
|
-
let i = e.getContext("2d"), a = i.createImageData(t, n), o = a.data, s = t / 2, c = n / 2;
|
|
9
|
-
for (let e = 0; e < n; e++) for (let n = 0; n < t; n++) {
|
|
10
|
-
let i = (n - s) / s, a = (e - c) / c, l = Math.sqrt(i * i + a * a), u = l * (1 - l * .3) * r, d = -i * u, f = -a * u, p = (e * t + n) * 4;
|
|
11
|
-
o[p] = Math.round(128 + d * 127), o[p + 1] = Math.round(128 + f * 127), o[p + 2] = 128, o[p + 3] = 255;
|
|
12
|
-
}
|
|
13
|
-
i.putImageData(a, 0, 0);
|
|
14
|
-
}
|
|
15
|
-
function i(e, t, n) {
|
|
16
|
-
e.width = t, e.height = n;
|
|
17
|
-
let r = e.getContext("2d"), i = t / 2, a = n / 2, o = Math.max(i, a), s = r.createRadialGradient(i, a, 0, i, a, o);
|
|
18
|
-
s.addColorStop(0, "rgba(255,255,255,0)"), s.addColorStop(.5, "rgba(255,255,255,0.02)"), s.addColorStop(.8, "rgba(255,255,255,0.06)"), s.addColorStop(1, "rgba(255,255,255,0.12)"), r.fillStyle = s, r.fillRect(0, 0, t, n);
|
|
19
|
-
let c = r.createLinearGradient(0, 0, t, 0);
|
|
20
|
-
c.addColorStop(0, "rgba(255,255,255,0)"), c.addColorStop(.3, "rgba(255,255,255,0.15)"), c.addColorStop(.5, "rgba(255,255,255,0.25)"), c.addColorStop(.7, "rgba(255,255,255,0.15)"), c.addColorStop(1, "rgba(255,255,255,0)"), r.fillStyle = c, r.fillRect(0, 0, t, 2);
|
|
21
|
-
}
|
|
22
|
-
var a = 0;
|
|
23
|
-
function o(e, t = {}) {
|
|
24
|
-
let n = `glass-refract-${a++}`, o = t.blur ?? 16, s = t.refraction ?? .3, c = document.createElement("canvas");
|
|
25
|
-
c.style.display = "none", document.body.appendChild(c);
|
|
26
|
-
let l = document.createElement("canvas");
|
|
27
|
-
l.style.display = "none", document.body.appendChild(l);
|
|
28
|
-
let u = e.getBoundingClientRect(), d = Math.max(Math.ceil(u.width / 4), 32), f = Math.max(Math.ceil(u.height / 4), 32);
|
|
29
|
-
r(c, d, f, s), i(l, d, f);
|
|
30
|
-
let p = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
31
|
-
p.setAttribute("width", "0"), p.setAttribute("height", "0"), p.style.position = "absolute", p.style.pointerEvents = "none";
|
|
32
|
-
let m = s * 30;
|
|
33
|
-
p.innerHTML = `
|
|
34
|
-
<filter id="${n}" x="0%" y="0%" width="100%" height="100%" color-interpolation-filters="sRGB">
|
|
35
|
-
<feImage href="${c.toDataURL()}" result="dispMap"
|
|
36
|
-
preserveAspectRatio="none" x="0%" y="0%" width="100%" height="100%" />
|
|
37
|
-
<feDisplacementMap in="SourceGraphic" in2="dispMap" result="refracted"
|
|
38
|
-
scale="${m}" xChannelSelector="R" yChannelSelector="G" />
|
|
39
|
-
<feGaussianBlur in="refracted" stdDeviation="${o * .3}" result="blurred" />
|
|
40
|
-
<feImage href="${l.toDataURL()}" result="specular"
|
|
41
|
-
preserveAspectRatio="none" x="0%" y="0%" width="100%" height="100%" />
|
|
42
|
-
<feBlend in="blurred" in2="specular" mode="screen" result="final" />
|
|
43
|
-
</filter>
|
|
44
|
-
`, document.body.appendChild(p), e.style.backdropFilter = `url(#${n}) blur(${o * .15}px) saturate(1.6) brightness(1.05)`, e.style.setProperty("-webkit-backdrop-filter", e.style.backdropFilter), e.style.border = "1px solid rgba(255,255,255,0.25)", e.style.boxShadow = "\n inset 0 0.5px 0 0 rgba(255,255,255,0.3),\n inset 0 -0.5px 0 0 rgba(0,0,0,0.05),\n 0 4px 16px rgba(0,0,0,0.08)\n ";
|
|
45
|
-
let h = new ResizeObserver(() => {
|
|
46
|
-
let t = e.getBoundingClientRect(), n = Math.max(Math.ceil(t.width / 4), 32), a = Math.max(Math.ceil(t.height / 4), 32);
|
|
47
|
-
r(c, n, a, s), i(l, n, a);
|
|
48
|
-
let o = p.querySelectorAll("feImage");
|
|
49
|
-
o[0] && o[0].setAttribute("href", c.toDataURL()), o[1] && o[1].setAttribute("href", l.toDataURL());
|
|
50
|
-
});
|
|
51
|
-
return h.observe(e), {
|
|
52
|
-
filterId: n,
|
|
53
|
-
svgEl: p,
|
|
54
|
-
dispCanvas: c,
|
|
55
|
-
specCanvas: l,
|
|
56
|
-
observer: h
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
function s(e) {
|
|
60
|
-
e.observer?.disconnect(), e.svgEl.remove(), e.dispCanvas.remove(), e.specCanvas.remove();
|
|
61
|
-
}
|
|
62
|
-
function c(r) {
|
|
63
|
-
let i = t(r?.preferredTier ?? "css");
|
|
64
|
-
return e(() => {
|
|
65
|
-
r?.preferredTier || (i.value = n());
|
|
66
|
-
}), { tier: i };
|
|
67
|
-
}
|
|
68
|
-
//#endregion
|
|
69
|
-
export { s as n, c as r, o as t };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ref as e } from "vue";
|
|
2
|
-
//#region src/composables/glass/useSpecularTracking.ts
|
|
3
|
-
function t() {
|
|
4
|
-
return typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
5
|
-
}
|
|
6
|
-
function n() {
|
|
7
|
-
let n = e({});
|
|
8
|
-
function r(e) {
|
|
9
|
-
if (t()) return;
|
|
10
|
-
let r = e.currentTarget;
|
|
11
|
-
if (!r) return;
|
|
12
|
-
let i = r.getBoundingClientRect();
|
|
13
|
-
if (i.width === 0 || i.height === 0) return;
|
|
14
|
-
let a = (e.clientX - i.left) / i.width * 100, o = (e.clientY - i.top) / i.height * 100;
|
|
15
|
-
n.value = {
|
|
16
|
-
"--mouse-x": `${a.toFixed(2)}%`,
|
|
17
|
-
"--mouse-y": `${o.toFixed(2)}%`
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
return {
|
|
21
|
-
specularStyle: n,
|
|
22
|
-
onPointerMove: r
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
//#endregion
|
|
26
|
-
export { n as t };
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { computed as e, getCurrentScope as t, nextTick as n, onMounted as r, onScopeDispose as i, readonly as a, ref as o, shallowRef as s, toValue as c, watch as l } from "vue";
|
|
2
|
-
import { SpringProgress as u } from "@mkbabb/keyframes.js";
|
|
3
|
-
//#region src/composables/motion/useSpring.ts
|
|
4
|
-
function d(e, n = {}) {
|
|
5
|
-
let r = n.initial ?? 0, d = n.initialVelocity ?? 0, f = o(r), p = o(d), m = o(d === 0), h = s(new u({
|
|
6
|
-
response: n.response ?? .5,
|
|
7
|
-
dampingFraction: n.dampingFraction ?? .86,
|
|
8
|
-
initial: r,
|
|
9
|
-
initialVelocity: d,
|
|
10
|
-
settleThreshold: n.settleThreshold ?? .001,
|
|
11
|
-
velocitySettleThreshold: n.velocitySettleThreshold ?? .001,
|
|
12
|
-
respectReducedMotion: n.respectReducedMotion !== !1
|
|
13
|
-
})), g = h.value.subscribe((e, t) => {
|
|
14
|
-
f.value = e, p.value = t, m.value = h.value.settled, n.onValue?.(e, t);
|
|
15
|
-
});
|
|
16
|
-
h.value.play(() => {});
|
|
17
|
-
let _ = l(() => c(e), (e) => {
|
|
18
|
-
e != null && (h.value.target = e);
|
|
19
|
-
}, { immediate: !0 });
|
|
20
|
-
function v() {
|
|
21
|
-
f.value = h.value.value, p.value = h.value.velocity, m.value = h.value.settled;
|
|
22
|
-
}
|
|
23
|
-
function y() {
|
|
24
|
-
_(), g(), h.value.dispose();
|
|
25
|
-
}
|
|
26
|
-
return t() && i(y), {
|
|
27
|
-
value: a(f),
|
|
28
|
-
velocity: a(p),
|
|
29
|
-
isSettled: a(m),
|
|
30
|
-
snap: () => {
|
|
31
|
-
h.value.snap(), v();
|
|
32
|
-
},
|
|
33
|
-
reset: (e, t) => {
|
|
34
|
-
h.value.reset(e ?? 0, t ?? 0), v();
|
|
35
|
-
},
|
|
36
|
-
dispose: y
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
//#endregion
|
|
40
|
-
//#region src/composables/motion/useSpringMount.ts
|
|
41
|
-
var f = {
|
|
42
|
-
smooth: {
|
|
43
|
-
response: .5,
|
|
44
|
-
dampingFraction: .86
|
|
45
|
-
},
|
|
46
|
-
snappy: {
|
|
47
|
-
response: .35,
|
|
48
|
-
dampingFraction: .65
|
|
49
|
-
},
|
|
50
|
-
bouncy: {
|
|
51
|
-
response: .5,
|
|
52
|
-
dampingFraction: .45
|
|
53
|
-
},
|
|
54
|
-
gentle: {
|
|
55
|
-
response: .7,
|
|
56
|
-
dampingFraction: 1
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
function p(t) {
|
|
60
|
-
let a = f[t.preset ?? "smooth"], s = o(1), c = o(!1), u = 0, p = 0, m = null, h = !1, g = d(s, {
|
|
61
|
-
response: a.response,
|
|
62
|
-
dampingFraction: a.dampingFraction,
|
|
63
|
-
initial: 1,
|
|
64
|
-
settleThreshold: .001,
|
|
65
|
-
velocitySettleThreshold: .001,
|
|
66
|
-
respectReducedMotion: t.respectReducedMotion !== !1
|
|
67
|
-
});
|
|
68
|
-
r(() => {
|
|
69
|
-
t.open.value && n(() => {
|
|
70
|
-
s.value = 0;
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
let _ = l(() => t.open.value, (e, t) => {
|
|
74
|
-
e !== t && (c.value || (s.value = +!e));
|
|
75
|
-
}, { immediate: !1 }), v = l(() => g.isSettled.value, (e) => {
|
|
76
|
-
e && h && s.value >= 1 && (h = !1, t.onDismiss?.());
|
|
77
|
-
});
|
|
78
|
-
function y(e) {
|
|
79
|
-
if (e.button !== 0) return;
|
|
80
|
-
let t = e.currentTarget;
|
|
81
|
-
p = t.getBoundingClientRect().height || 1, u = e.clientY, m = e.pointerId, c.value = !0, t.setPointerCapture(e.pointerId);
|
|
82
|
-
}
|
|
83
|
-
function b(e) {
|
|
84
|
-
if (!c.value || e.pointerId !== m) return;
|
|
85
|
-
let t = e.clientY - u;
|
|
86
|
-
if (t <= 0) {
|
|
87
|
-
s.value = 0;
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
s.value = Math.min(1, t / p);
|
|
91
|
-
}
|
|
92
|
-
function x(e) {
|
|
93
|
-
if (!c.value || e.pointerId !== m) return;
|
|
94
|
-
let n = e.currentTarget;
|
|
95
|
-
n.hasPointerCapture(e.pointerId) && n.releasePointerCapture(e.pointerId), c.value = !1, m = null;
|
|
96
|
-
let r = t.dismissThreshold ?? .3;
|
|
97
|
-
s.value >= r ? (h = !0, s.value = 1) : s.value = 0;
|
|
98
|
-
}
|
|
99
|
-
return i(() => {
|
|
100
|
-
_(), v();
|
|
101
|
-
}), {
|
|
102
|
-
position: g.value,
|
|
103
|
-
isDragging: e(() => c.value),
|
|
104
|
-
dragHandlers: {
|
|
105
|
-
onPointerdown: y,
|
|
106
|
-
onPointermove: b,
|
|
107
|
-
onPointerup: x,
|
|
108
|
-
onPointercancel: x
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
//#endregion
|
|
113
|
-
export { d as n, p as t };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{_plugin-vue_export-helper-ok8pgSl5.js → _plugin-vue_export-helper-DWghtRt7.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|