@mkbabb/glass-ui 8.0.0 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MIGRATION.md +4768 -0
- package/README.md +57 -13
- package/dist/DialogContent-CwIBvou_.js +157 -0
- package/dist/{DropdownMenuTrigger-8UZsBtZ8.js → DropdownMenuTrigger-CKRnhDSQ.js} +1 -1
- package/dist/{Surface-i1tWC-Ga.js → Surface-1nPoabc3.js} +1 -1
- package/dist/{accent-tone-solve-Cw7WkRD9.js → accent-tone-solve-5H6FY2QO.js} +1 -1
- package/dist/aurora.js +386 -355
- package/dist/{badge-owUOaaba.js → badge-BO6BC4G5.js} +1 -1
- package/dist/badge.js +1 -1
- package/dist/blob.js +44 -44
- package/dist/{button-yvGPb0Bx.js → button-BOFTUPyU.js} +1 -1
- package/dist/button.js +1 -1
- package/dist/{card-3HFFpC7_.js → card-ByyqRBvK.js} +2 -2
- package/dist/card.js +1 -1
- package/dist/carousel.js +3 -3
- package/dist/{checkbox-BnXuGgJ3.js → checkbox-B1qn65se.js} +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/chip.js +8 -3
- package/dist/{class-names-q-UGOkHH.js → class-names-FlXcvRRT.js} +65 -18
- package/dist/{collapsible-B7O6m-Ch.js → collapsible-DFzK29Oh.js} +5 -2
- package/dist/collapsible.js +1 -1
- package/dist/color.glsl-DTJhdekG.js +34 -0
- package/dist/color.js +11 -11
- package/dist/color.wgsl-BTszLY39.js +398 -0
- package/dist/{command-BuBnYpxF.js → command-C-5xSEJ2.js} +8 -8
- package/dist/command.js +1 -1
- package/dist/component-styles.css +1 -0
- package/dist/components/_shared/class-names.d.ts +10 -1
- package/dist/components/_shared/control.d.ts +0 -1
- package/dist/components/_shared/index.d.ts +0 -1
- package/dist/components/_shared/menu/menu.css +1 -1
- package/dist/components/_shared/overlay/index.d.ts +1 -0
- package/dist/components/_shared/overlay/shortcuts.d.ts +12 -0
- package/dist/components/aurora/Aurora.vue.d.ts +1 -0
- package/dist/components/aurora/composables/atoms.d.ts +22 -6
- package/dist/components/aurora/composables/frameLoop.d.ts +6 -5
- package/dist/components/aurora/composables/runtime.d.ts +28 -1
- package/dist/components/aurora/composables/useAurora.d.ts +28 -0
- package/dist/components/aurora/composables/wgpuSetup.d.ts +1 -1
- package/dist/components/aurora/constants/presets.d.ts +62 -5
- package/dist/components/aurora/index.d.ts +1 -1
- package/dist/components/blob/Blob.vue.d.ts +3 -3
- package/dist/components/card/Card.vue.d.ts +8 -2
- package/dist/components/chip/Chip.vue.d.ts +1 -7
- package/dist/components/chip/chipVariants.d.ts +1 -0
- package/dist/components/collapsible/Collapsible.vue.d.ts +1 -0
- package/dist/components/command/CommandDialog.vue.d.ts +1 -1
- package/dist/components/configurator/Configurator.vue.d.ts +25 -2
- package/dist/components/configurator/ConfiguratorRow.vue.d.ts +4 -2
- package/dist/components/configurator/styles.css +1 -1
- package/dist/components/dark-mode-toggle/dark-mode-toggle.css +1 -1
- package/dist/components/deck/styles/capture.css +1 -1
- package/dist/components/dialog/styles.css +1 -1
- package/dist/components/dock/DockSeparator.vue.d.ts +2 -3
- package/dist/components/dock/GlassDock.vue.d.ts +1 -0
- package/dist/components/dock/composables/dockContext.d.ts +1 -8
- package/dist/components/dock/composables/dockCrossfadeContext.d.ts +0 -2
- package/dist/components/dock/composables/index.d.ts +1 -1
- package/dist/components/dock/composables/useDockHold.d.ts +16 -12
- package/dist/components/dock/composables/useDockRun.d.ts +20 -0
- package/dist/components/dock/composables/useDockSearch.d.ts +1 -1
- package/dist/components/dock/composables/useDockShellProps.d.ts +18 -101
- package/dist/components/dock/composables/useDockState.d.ts +2 -9
- package/dist/components/dock/constants.d.ts +15 -0
- package/dist/components/dock/index.d.ts +2 -2
- package/dist/components/dock/styles/controls/icon-button.css +1 -1
- package/dist/components/dock/styles/controls/tab-button.css +1 -1
- package/dist/components/dock/styles/controls/triggers.css +1 -1
- package/dist/components/dock/styles/controls.css +1 -1
- package/dist/components/dock/styles/density.css +1 -1
- package/dist/components/dock/styles/index.css +1 -1
- package/dist/components/dock/styles/layer-group.css +1 -1
- package/dist/components/dock/styles/layers.css +1 -1
- package/dist/components/dock/styles/morph.css +1 -1
- package/dist/components/dock/styles/run.css +1 -0
- package/dist/components/dock/styles/search.css +1 -1
- package/dist/components/dock/styles/shape.css +1 -1
- package/dist/components/dock/styles/shell-regions.css +1 -1
- package/dist/components/dock/styles/shell.css +1 -1
- package/dist/components/fourier-field/FourierField.vue.d.ts +29 -26
- package/dist/components/fourier-field/clock.d.ts +35 -0
- package/dist/components/fourier-field/constants.d.ts +80 -104
- package/dist/components/fourier-field/index.d.ts +3 -28
- package/dist/components/fourier-field/math.d.ts +69 -77
- package/dist/components/fourier-field/renderer/mint.d.ts +50 -0
- package/dist/components/fourier-field/renderer/uniforms.d.ts +84 -0
- package/dist/components/fourier-field/renderer/wgpu.d.ts +28 -0
- package/dist/components/fourier-field/shaders/compute.wgsl.d.ts +1 -0
- package/dist/components/fourier-field/shaders/render.wgsl.d.ts +1 -0
- package/dist/components/fourier-field/useFourierField.d.ts +49 -0
- package/dist/components/handmark/HandMark.vue.d.ts +18 -14
- package/dist/components/handmark/index.d.ts +4 -23
- package/dist/components/handmark/stroke.d.ts +92 -0
- package/dist/components/labeled-field/LabeledSwitch.vue.d.ts +3 -1
- package/dist/components/labeled-field/types.d.ts +1 -1
- package/dist/components/menu/DropdownMenu.vue.d.ts +1 -1
- package/dist/components/metric/coalesce-metric.d.ts +6 -1
- package/dist/components/metric/styles.css +1 -1
- package/dist/components/popover/Popover.vue.d.ts +1 -1
- package/dist/components/scroll-progress-rim/styles.css +1 -1
- package/dist/components/sheet/styles.css +1 -1
- package/dist/components/slider/styles.css +1 -1
- package/dist/components/tabs/SegmentedTabs.vue.d.ts +25 -112
- package/dist/components/tabs/composables/useTabDragMorph.d.ts +1 -1
- package/dist/components/tabs/composables/useTabResponsive.d.ts +11 -11
- package/dist/components/tabs/index.d.ts +1 -1
- package/dist/components/tabs/styles/drag.css +1 -1
- package/dist/components/tabs/styles/segmented.css +1 -1
- package/dist/components/tabs/types.d.ts +85 -0
- package/dist/components/timeline/index.d.ts +2 -0
- package/dist/components/toast/Toast.vue.d.ts +2 -2
- package/dist/composables/color/index.d.ts +0 -15
- package/dist/composables/dark/darkModeSyncScript.d.ts +42 -0
- package/dist/composables/dom/useResolveTokenColor.d.ts +1 -1
- package/dist/composables/glass/index.d.ts +2 -0
- package/dist/composables/keyboard/useKeyboardShortcuts.d.ts +47 -1
- package/dist/composables/motion/pointer/pointerFieldMappings.d.ts +0 -41
- package/dist/{components/search/composables → composables/search}/index.d.ts +2 -2
- package/dist/{components/search/composables/fuzzySearchIndex.d.ts → composables/search/match.d.ts} +8 -3
- package/dist/composables/sidebar/types.d.ts +5 -1
- package/dist/configurator-DiwVN573.js +339 -0
- package/dist/configurator.js +1 -1
- package/dist/constellation.js +5 -5
- package/dist/{content-CWO-XL7o.js → content-So3j6SOe.js} +1 -1
- package/dist/control-DJp15L4U.js +7 -0
- package/dist/dark-mode-toggle.js +2 -2
- package/dist/{dark-z_P5QwqI.js → dark-pONY3x93.js} +2 -2
- package/dist/dark.js +1 -1
- package/dist/{data-table-_RrOEdiw.js → data-table-Ba_uTfPc.js} +3 -3
- package/dist/data-table.js +1 -1
- package/dist/{deck-Ci6YjB5e.js → deck-Cm_VmyNL.js} +1 -1
- package/dist/deck.js +1 -1
- package/dist/{dialog-CbRnTRtg.js → dialog-BZoFG0j8.js} +1 -1
- package/dist/dialog.js +2 -2
- package/dist/dock.js +718 -496
- package/dist/dom.js +90 -8
- package/dist/easing.js +5 -5
- package/dist/expandable-container-CZUj9BzY.js +142 -0
- package/dist/expandable-container.js +2 -142
- package/dist/fourier-field.js +638 -855
- package/dist/fourier-math.js +6 -6
- package/dist/glass-ui.css +1 -1
- package/dist/glass-ui.js +88 -75
- package/dist/handmark.js +330 -718
- package/dist/index.d.ts +2 -2
- package/dist/infinite-scroll.js +16 -17
- package/dist/{input-Bls2A4Tt.js → input-eLZ_AU7l.js} +1 -1
- package/dist/input.js +1 -1
- package/dist/keyboard.js +64 -21
- package/dist/{label-BQEZhnK_.js → label-CE03H1KL.js} +2 -2
- package/dist/label.js +1 -1
- package/dist/labeled-field.js +9 -6
- package/dist/{menu-wLu1XGKn.js → menu-BnmCOa3y.js} +93 -90
- package/dist/menu.js +2 -2
- package/dist/metric.js +12 -7
- package/dist/{motion-D4uYE0UM.js → motion-BvV1_24p.js} +1 -1
- package/dist/motion-core.js +35 -35
- package/dist/{number-field-NFAwQ0HK.js → number-field-RP89046a.js} +2 -2
- package/dist/number-field.js +1 -1
- package/dist/pager-dots.js +3 -3
- package/dist/{participation-B0hdsIRo.js → participation-Di4UHbzk.js} +8 -8
- package/dist/{pointerFieldMappings-DP5tla5z.js → pointerFieldMappings-DXwlU5uj.js} +7 -23
- package/dist/popover-DA87hFBx.js +184 -0
- package/dist/popover.js +1 -1
- package/dist/{progress-DF8dWZIX.js → progress-eVa-mc7J.js} +1 -1
- package/dist/progress.js +1 -1
- package/dist/{radio-group-Ci8o-pDx.js → radio-group-B58Bz16F.js} +2 -2
- package/dist/radio-group.js +1 -1
- package/dist/{select-CDgwGH_P.js → select-fy3vtArm.js} +13 -13
- package/dist/select.js +1 -1
- package/dist/{separator-CN11t406.js → separator-D4EZM10u.js} +2 -2
- package/dist/separator.js +1 -1
- package/dist/{sheet-BEFvnO_u.js → sheet-BQJyER59.js} +120 -115
- package/dist/sheet.js +2 -2
- package/dist/shortcuts-DGGWNRNe.js +13 -0
- package/dist/sidebar.js +4 -4
- package/dist/{slider-gsc8jDIo.js → slider-5ChjjWSR.js} +1 -1
- package/dist/slider.js +1 -1
- package/dist/{status-dot-BpnqOP5N.js → status-dot-W4LFiJps.js} +2 -2
- package/dist/status-dot.js +1 -1
- package/dist/styles/accessibility.css +1 -1
- package/dist/styles/animations.css +1 -1
- package/dist/styles/components.css +1 -1
- package/dist/styles/glass/a11y-fallback.css +1 -1
- package/dist/styles/glass/dissolve.css +1 -1
- package/dist/styles/glass/focus-veil.css +1 -1
- package/dist/styles/glass/ladder.css +1 -1
- package/dist/styles/glass/material.css +1 -1
- package/dist/styles/glass/overlay-plate.css +1 -1
- package/dist/styles/glass/reveal.css +1 -1
- package/dist/styles/glass-specular-track.css +1 -1
- package/dist/styles/paper.css +1 -1
- package/dist/styles/scroll-choreography.css +1 -1
- package/dist/styles/scroll-chrome.css +1 -1
- package/dist/styles/scroll-driven.css +1 -1
- package/dist/styles/theme/literals.css +1 -1
- package/dist/styles/tokens/color-radius.css +1 -1
- package/dist/styles/tokens/dark-arm-glass.css +1 -1
- package/dist/styles/tokens/light-dark.css +1 -1
- package/dist/styles/tokens/offsets.css +1 -1
- package/dist/styles/tokens/scheme-motion.css +1 -1
- package/dist/styles/tokens/sizing.css +1 -1
- package/dist/styles/typography/semantic.css +1 -1
- package/dist/styles/typography/utilities.css +1 -1
- package/dist/styles/utilities/a11y-overrides.css +1 -1
- package/dist/styles/utilities/responsive.css +1 -1
- package/dist/styles/view-transition.css +1 -1
- package/dist/styles/viz-reveal.css +1 -1
- package/dist/surface.js +1 -1
- package/dist/{switch-DxZzDrmV.js → switch-BYUZ6g9G.js} +2 -2
- package/dist/switch.js +1 -1
- package/dist/{tabs-CYscnq5H.js → tabs-rdRXKXxd.js} +4 -3
- package/dist/tabs.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +44 -42
- package/dist/{toast-9c6Kp58L.js → toast-DVOwo6GB.js} +1 -1
- package/dist/toast.js +1 -1
- package/dist/{toggle-group-11aPGMfE.js → toggle-group-CC5b3o1R.js} +2 -2
- package/dist/toggle-group.js +1 -1
- package/dist/{tooltip-DqKMZ4dn.js → tooltip-DhTHhtJN.js} +2 -2
- package/dist/tooltip.js +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{useAccentTone-DFAh1osB.js → useAccentTone-DitmKfGL.js} +1 -1
- package/dist/{resolveCanvasColor-6MCrswTB.js → useCanvas2D-CQRElMyE.js} +1 -11
- package/dist/{usePointerVelocityField-DsIf7yyq.js → usePointerVelocityField-Lx26_Yap.js} +1 -1
- package/dist/useResolveTokenColor-B2FfJnd9.js +24 -0
- package/package.json +5 -21
- package/dist/DialogContent-4hzLiaCQ.js +0 -152
- package/dist/canvas.d.ts +0 -1
- package/dist/canvas.js +0 -2
- package/dist/color.wgsl-B0N3mKMb.js +0 -412
- package/dist/compile-D7VYG3gi.js +0 -19
- package/dist/components/dock/composables/useDockOverflowFit.d.ts +0 -20
- package/dist/components/dock/composables/useDockTouchGate.d.ts +0 -42
- package/dist/components/dock/styles/overflow.css +0 -1
- package/dist/components/fourier-field/composables/fourierFieldGLSetup.d.ts +0 -24
- package/dist/components/fourier-field/composables/fourierFieldWGPUSetup.d.ts +0 -31
- package/dist/components/fourier-field/composables/uniformBridgeWGPU.d.ts +0 -39
- package/dist/components/fourier-field/composables/useFourierField.d.ts +0 -56
- package/dist/components/fourier-field/shaders/fourier-field.compute.wgsl.d.ts +0 -1
- package/dist/components/fourier-field/shaders/fourier-field.glsl.d.ts +0 -4
- package/dist/components/fourier-field/shaders/fourier-field.render.wgsl.d.ts +0 -1
- package/dist/components/fourier-field/shaders/fourier-field.ribbon.d.ts +0 -51
- package/dist/components/handmark/brush.d.ts +0 -269
- package/dist/components/handmark/composables/useHandMark.d.ts +0 -99
- package/dist/components/handmark/constants.d.ts +0 -69
- package/dist/components/handmark/freehand.d.ts +0 -69
- package/dist/components/handmark/geometry.d.ts +0 -62
- package/dist/components/handmark/ink.d.ts +0 -11
- package/dist/components/handmark/noise.d.ts +0 -30
- package/dist/components/handmark/texture.d.ts +0 -39
- package/dist/components/handmark/types.d.ts +0 -70
- package/dist/components/search/SearchBar.vue.d.ts +0 -38
- package/dist/components/search/index.d.ts +0 -8
- package/dist/components/search/searchVariants.d.ts +0 -16
- package/dist/configurator-BoeScnDL.js +0 -311
- package/dist/control-Da4XeT43.js +0 -11
- package/dist/popover-DBMKTPkL.js +0 -181
- package/dist/search.d.ts +0 -1
- package/dist/search.js +0 -61
- package/dist/useFuzzySearch-CUnZknpm.js +0 -177
- package/dist/useResolveTokenColor-CspQv_ik.js +0 -107
- /package/dist/{components/search/composables → composables/search}/types.d.ts +0 -0
- /package/dist/{components/search/composables → composables/search}/useFuzzySearch.d.ts +0 -0
package/dist/dom.js
CHANGED
|
@@ -1,10 +1,92 @@
|
|
|
1
1
|
import { t as e } from "./useResizeObserver-CdUlm2QZ.js";
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
2
|
+
import { t } from "./useTimer-C3yfti4C.js";
|
|
3
|
+
import { t as n } from "./useDragVelocity-C5BkKiNf.js";
|
|
4
|
+
import { n as r, t as i } from "./useResolveTokenColor-B2FfJnd9.js";
|
|
4
5
|
import { n as a, t as o } from "./useClipboard-D36OTaeT.js";
|
|
5
6
|
import { getCurrentScope as s, onMounted as c, onScopeDispose as l, readonly as u, ref as d, toValue as f, watch as p } from "vue";
|
|
7
|
+
//#region src/composables/dom/useTouchGate.ts
|
|
8
|
+
var m = /* @__PURE__ */ new Set(), h = !1;
|
|
9
|
+
function g(e) {
|
|
10
|
+
for (let t of m) {
|
|
11
|
+
if (!t.isActive()) continue;
|
|
12
|
+
let n = t.controlEl();
|
|
13
|
+
n && !n.contains(e.target) && t.deactivate();
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function _() {
|
|
17
|
+
h || typeof document > "u" || (document.addEventListener("touchstart", g, { passive: !0 }), h = !0);
|
|
18
|
+
}
|
|
19
|
+
function v() {
|
|
20
|
+
m.size > 0 || !h || typeof document > "u" || (document.removeEventListener("touchstart", g), h = !1);
|
|
21
|
+
}
|
|
22
|
+
function y(e = 3e3) {
|
|
23
|
+
let n = d(!1), r = typeof window < "u" && "ontouchstart" in window, i = null, a = null, o = !1, c = !1, u = t(() => {
|
|
24
|
+
x();
|
|
25
|
+
}, e, { immediate: !1 }), f = t(() => {
|
|
26
|
+
o && i && (o = !1, a = null, y(i));
|
|
27
|
+
}, 150, { immediate: !1 });
|
|
28
|
+
function p() {
|
|
29
|
+
u.stop();
|
|
30
|
+
}
|
|
31
|
+
function h() {
|
|
32
|
+
f.stop(), o = !1, a = null;
|
|
33
|
+
}
|
|
34
|
+
function g() {
|
|
35
|
+
p(), u.start(e);
|
|
36
|
+
}
|
|
37
|
+
function y(e) {
|
|
38
|
+
n.value = !0, e.style.touchAction = "none", g();
|
|
39
|
+
}
|
|
40
|
+
function b(e) {
|
|
41
|
+
if (c = e, e) {
|
|
42
|
+
p();
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
g();
|
|
46
|
+
}
|
|
47
|
+
function x() {
|
|
48
|
+
c || (p(), h(), n.value = !1, i &&= (i.style.touchAction = "", null));
|
|
49
|
+
}
|
|
50
|
+
function S(e, t) {
|
|
51
|
+
return r ? (i = e, n.value ? (g(), !0) : (h(), o = !0, a = t, f.start(150), !1)) : !0;
|
|
52
|
+
}
|
|
53
|
+
function C(e) {
|
|
54
|
+
if (!r || !o || a === null) return;
|
|
55
|
+
let t = e.touches[0]?.clientY ?? 0;
|
|
56
|
+
Math.abs(t - a) > 10 && h();
|
|
57
|
+
}
|
|
58
|
+
function w() {
|
|
59
|
+
if (r) {
|
|
60
|
+
if (o && i) {
|
|
61
|
+
h(), y(i);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
n.value && g();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
let T = {
|
|
68
|
+
isActive: () => n.value,
|
|
69
|
+
controlEl: () => i,
|
|
70
|
+
deactivate: x
|
|
71
|
+
};
|
|
72
|
+
r && (m.add(T), _());
|
|
73
|
+
function E() {
|
|
74
|
+
p(), h(), r && (m.delete(T), v()), i &&= (i.style.touchAction = "", null);
|
|
75
|
+
}
|
|
76
|
+
return s() && l(E), {
|
|
77
|
+
isActive: n,
|
|
78
|
+
isTouchDevice: r,
|
|
79
|
+
handleTouchStart: S,
|
|
80
|
+
handleScrollCheck: C,
|
|
81
|
+
handleTouchEnd: w,
|
|
82
|
+
resetTimer: g,
|
|
83
|
+
deactivate: x,
|
|
84
|
+
suppressDeactivate: b
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
//#endregion
|
|
6
88
|
//#region src/composables/dom/useTokenColor.ts
|
|
7
|
-
function
|
|
89
|
+
function b(e, t = {}) {
|
|
8
90
|
let n = t.fallback ?? "", r = d(n), i = t.resolver ?? ((e, t) => getComputedStyle(t ?? document.documentElement).getPropertyValue(e));
|
|
9
91
|
function a() {
|
|
10
92
|
let r = f(e);
|
|
@@ -33,7 +115,7 @@ function m(e, t = {}) {
|
|
|
33
115
|
}
|
|
34
116
|
//#endregion
|
|
35
117
|
//#region src/composables/dom/useUserInvalidAria.ts
|
|
36
|
-
function
|
|
118
|
+
function x(e = {}) {
|
|
37
119
|
return { bind: (e) => {
|
|
38
120
|
let t = /* @__PURE__ */ new WeakSet(), n = (e) => {
|
|
39
121
|
let t = e;
|
|
@@ -57,7 +139,7 @@ function h(e = {}) {
|
|
|
57
139
|
}
|
|
58
140
|
//#endregion
|
|
59
141
|
//#region src/composables/dom/useBreakpoint.ts
|
|
60
|
-
function
|
|
142
|
+
function S(e) {
|
|
61
143
|
let t = d(!1), n = null;
|
|
62
144
|
function r(e) {
|
|
63
145
|
t.value = e.matches;
|
|
@@ -75,7 +157,7 @@ function g(e) {
|
|
|
75
157
|
}
|
|
76
158
|
//#endregion
|
|
77
159
|
//#region src/composables/dom/useIdleReady.ts
|
|
78
|
-
function
|
|
160
|
+
function C(e = {}) {
|
|
79
161
|
let t = e.timeout ?? 2e3, n = d(!1), r = null, i = null, a = !1;
|
|
80
162
|
function o() {
|
|
81
163
|
a || n.value || (n.value = !0, e.onReady?.(), c());
|
|
@@ -103,7 +185,7 @@ function _(e = {}) {
|
|
|
103
185
|
}
|
|
104
186
|
//#endregion
|
|
105
187
|
//#region src/composables/dom/useViewportReady.ts
|
|
106
|
-
function
|
|
188
|
+
function w(e, t = {}) {
|
|
107
189
|
let n = t.rootMargin ?? "200px", r = t.idleTimeout ?? 1e4, i = t.threshold ?? .01, a = d(!1), o = null, c, u = null, f = null, m = !1;
|
|
108
190
|
function h() {
|
|
109
191
|
m || a.value || (a.value = !0, _());
|
|
@@ -153,4 +235,4 @@ function v(e, t = {}) {
|
|
|
153
235
|
};
|
|
154
236
|
}
|
|
155
237
|
//#endregion
|
|
156
|
-
export {
|
|
238
|
+
export { i as createTokenColorCache, r as resolveTokenColor, S as useBreakpoint, o as useClipboard, n as useDragVelocity, C as useIdleReady, e as useResizeObserver, b as useTokenColor, y as useTouchGate, x as useUserInvalidAria, w as useViewportReady, a as writeClipboard };
|
package/dist/easing.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as e } from "./class-names-
|
|
1
|
+
import { t as e } from "./class-names-FlXcvRRT.js";
|
|
2
2
|
import { t } from "./DotRing-Blh4Mc3Q.js";
|
|
3
3
|
import { n } from "./useReducedMotion-vCXA_vyM.js";
|
|
4
|
-
import { t as r } from "./button-
|
|
4
|
+
import { t as r } from "./button-BOFTUPyU.js";
|
|
5
5
|
import { t as i } from "./useClipboard-D36OTaeT.js";
|
|
6
|
-
import { a, c as o, l as s, r as c, s as l } from "./select-
|
|
7
|
-
import { t as u } from "./slider-
|
|
8
|
-
import { t as d } from "./tabs-
|
|
6
|
+
import { a, c as o, l as s, r as c, s as l } from "./select-fy3vtArm.js";
|
|
7
|
+
import { t as u } from "./slider-5ChjjWSR.js";
|
|
8
|
+
import { t as d } from "./tabs-rdRXKXxd.js";
|
|
9
9
|
import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createTextVNode as v, createVNode as y, defineComponent as b, mergeModels as x, normalizeClass as S, onScopeDispose as C, onUnmounted as ee, openBlock as w, ref as T, renderList as E, toDisplayString as D, unref as O, useId as k, useModel as te, useTemplateRef as A, watch as ne, withCtx as j } from "vue";
|
|
10
10
|
import { Check as re, Copy as ie, Play as ae, RotateCcw as oe, Square as se } from "@lucide/vue";
|
|
11
11
|
import { parseTimingFunction as M } from "@mkbabb/value.js/css";
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { registerShortcut as e } from "./keyboard.js";
|
|
2
|
+
import { t } from "./focus-Duf7EpUu.js";
|
|
3
|
+
import { Teleport as n, createBlock as r, createElementVNode as i, createVNode as a, defineComponent as o, mergeModels as s, mergeProps as c, nextTick as l, onUnmounted as u, openBlock as d, ref as f, renderSlot as p, unref as m, useModel as h, watch as g, withCtx as _ } from "vue";
|
|
4
|
+
import { FocusScope as v } from "reka-ui";
|
|
5
|
+
import { Maximize2 as y, Minimize2 as b } from "@lucide/vue";
|
|
6
|
+
//#region src/components/expandable-container/ExpandableContainer.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
+
var x = [
|
|
8
|
+
"data-state",
|
|
9
|
+
"data-surface",
|
|
10
|
+
"role",
|
|
11
|
+
"aria-label",
|
|
12
|
+
"aria-modal"
|
|
13
|
+
], S = ["hidden"], C = ["data-position", "aria-label"], w = ["hidden"], T = ["data-position", "aria-label"], E = { "data-part": "panel" }, D = 0, O = null;
|
|
14
|
+
function k() {
|
|
15
|
+
return typeof document > "u" ? !1 : (D === 0 && (O = document.body.style.overflow, document.body.style.overflow = "hidden"), D += 1, !0);
|
|
16
|
+
}
|
|
17
|
+
function A() {
|
|
18
|
+
typeof document > "u" || D === 0 || (--D, D === 0 && (document.body.style.overflow = O ?? "", O = null));
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/components/expandable-container/ExpandableContainer.vue
|
|
22
|
+
var j = /* @__PURE__ */ o({
|
|
23
|
+
inheritAttrs: !1,
|
|
24
|
+
__name: "ExpandableContainer",
|
|
25
|
+
props: /*@__PURE__*/ s({
|
|
26
|
+
buttonPosition: { default: "right" },
|
|
27
|
+
expandLabel: { default: "Fullscreen" },
|
|
28
|
+
collapseLabel: { default: "Exit fullscreen" },
|
|
29
|
+
surface: { default: "glass" }
|
|
30
|
+
}, {
|
|
31
|
+
open: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: !1
|
|
34
|
+
},
|
|
35
|
+
openModifiers: {}
|
|
36
|
+
}),
|
|
37
|
+
emits: ["update:open"],
|
|
38
|
+
setup(o) {
|
|
39
|
+
let s = h(o, "open"), D = f(null);
|
|
40
|
+
function O() {
|
|
41
|
+
let e = D.value?.$el;
|
|
42
|
+
return e instanceof HTMLElement ? e : null;
|
|
43
|
+
}
|
|
44
|
+
function j() {
|
|
45
|
+
s.value = !0;
|
|
46
|
+
}
|
|
47
|
+
function M() {
|
|
48
|
+
s.value = !1;
|
|
49
|
+
}
|
|
50
|
+
let N = !1, P = null, F = null;
|
|
51
|
+
function I(e) {
|
|
52
|
+
e && !N ? N = k() : !e && N && (A(), N = !1);
|
|
53
|
+
}
|
|
54
|
+
function L() {
|
|
55
|
+
(O()?.querySelector("[autofocus]") ?? O()?.querySelector("[data-mode=\"collapse\"]") ?? O()?.querySelector(t) ?? O())?.focus();
|
|
56
|
+
}
|
|
57
|
+
async function R() {
|
|
58
|
+
await l(), await l(), L();
|
|
59
|
+
}
|
|
60
|
+
let z = ["[data-mode=\"expand\"]", ...t.split(", ").map((e) => `.expandable-container__chrome:not([hidden]) ${e}`)].join(", ");
|
|
61
|
+
function B() {
|
|
62
|
+
let e = F?.isConnected ? F : O()?.querySelector(z);
|
|
63
|
+
F = null, e?.focus();
|
|
64
|
+
}
|
|
65
|
+
function V(e) {
|
|
66
|
+
e.preventDefault();
|
|
67
|
+
}
|
|
68
|
+
return g(s, (t, n) => {
|
|
69
|
+
if (I(t), t && !n) {
|
|
70
|
+
let t = typeof document < "u" ? document.activeElement : null;
|
|
71
|
+
F = t instanceof HTMLElement ? t : null, P = e("Escape", M, {
|
|
72
|
+
label: "Exit fullscreen",
|
|
73
|
+
group: "UI",
|
|
74
|
+
allowInInput: !0
|
|
75
|
+
}), R();
|
|
76
|
+
} else !t && n && (P?.(), P = null, l(B));
|
|
77
|
+
}, { immediate: !0 }), u(() => {
|
|
78
|
+
P?.(), P = null, I(!1);
|
|
79
|
+
}), (e, t) => (d(), r(n, {
|
|
80
|
+
to: "body",
|
|
81
|
+
disabled: !s.value
|
|
82
|
+
}, [a(m(v), {
|
|
83
|
+
ref_key: "scope",
|
|
84
|
+
ref: D,
|
|
85
|
+
"as-child": "",
|
|
86
|
+
loop: s.value,
|
|
87
|
+
trapped: s.value,
|
|
88
|
+
onMountAutoFocus: V
|
|
89
|
+
}, {
|
|
90
|
+
default: _(() => [i("div", c({
|
|
91
|
+
class: "expandable-container",
|
|
92
|
+
"data-state": s.value ? "expanded" : "collapsed",
|
|
93
|
+
"data-surface": s.value ? o.surface : void 0,
|
|
94
|
+
role: s.value ? "dialog" : void 0,
|
|
95
|
+
"aria-label": s.value ? o.expandLabel : void 0,
|
|
96
|
+
"aria-modal": s.value || void 0
|
|
97
|
+
}, e.$attrs), [
|
|
98
|
+
i("div", {
|
|
99
|
+
class: "expandable-container__chrome",
|
|
100
|
+
hidden: s.value
|
|
101
|
+
}, [p(e.$slots, "expand-trigger", {
|
|
102
|
+
expand: j,
|
|
103
|
+
label: o.expandLabel
|
|
104
|
+
}, () => [i("button", {
|
|
105
|
+
type: "button",
|
|
106
|
+
"data-part": "trigger",
|
|
107
|
+
"data-control-target": "",
|
|
108
|
+
"data-mode": "expand",
|
|
109
|
+
"data-position": o.buttonPosition,
|
|
110
|
+
"aria-label": o.expandLabel,
|
|
111
|
+
onClick: j
|
|
112
|
+
}, [a(m(y), {
|
|
113
|
+
class: "expandable-container__icon",
|
|
114
|
+
"aria-hidden": "true"
|
|
115
|
+
})], 8, C)])], 8, S),
|
|
116
|
+
i("div", {
|
|
117
|
+
class: "expandable-container__chrome",
|
|
118
|
+
hidden: !s.value
|
|
119
|
+
}, [p(e.$slots, "fullscreen-chrome", {
|
|
120
|
+
collapse: M,
|
|
121
|
+
label: o.collapseLabel,
|
|
122
|
+
fullscreen: !0
|
|
123
|
+
}, () => [i("button", {
|
|
124
|
+
type: "button",
|
|
125
|
+
"data-part": "trigger",
|
|
126
|
+
"data-control-target": "",
|
|
127
|
+
"data-mode": "collapse",
|
|
128
|
+
"data-position": o.buttonPosition,
|
|
129
|
+
"aria-label": o.collapseLabel,
|
|
130
|
+
onClick: M
|
|
131
|
+
}, [a(m(b), {
|
|
132
|
+
class: "expandable-container__icon",
|
|
133
|
+
"aria-hidden": "true"
|
|
134
|
+
})], 8, T)])], 8, w),
|
|
135
|
+
i("div", E, [p(e.$slots, "default", { fullscreen: s.value })])
|
|
136
|
+
], 16, x)]),
|
|
137
|
+
_: 3
|
|
138
|
+
}, 8, ["loop", "trapped"])], 8, ["disabled"]));
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
//#endregion
|
|
142
|
+
export { j as t };
|
|
@@ -1,142 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./
|
|
2
|
-
|
|
3
|
-
import { Teleport as n, createBlock as r, createElementVNode as i, createVNode as a, defineComponent as o, mergeModels as s, mergeProps as c, nextTick as l, onUnmounted as u, openBlock as d, ref as f, renderSlot as p, unref as m, useModel as h, watch as g, withCtx as _ } from "vue";
|
|
4
|
-
import { FocusScope as v } from "reka-ui";
|
|
5
|
-
import { Maximize2 as y, Minimize2 as b } from "@lucide/vue";
|
|
6
|
-
//#region src/components/expandable-container/ExpandableContainer.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var x = [
|
|
8
|
-
"data-state",
|
|
9
|
-
"data-surface",
|
|
10
|
-
"role",
|
|
11
|
-
"aria-label",
|
|
12
|
-
"aria-modal"
|
|
13
|
-
], S = ["hidden"], C = ["data-position", "aria-label"], w = ["hidden"], T = ["data-position", "aria-label"], E = { "data-part": "panel" }, D = 0, O = null;
|
|
14
|
-
function k() {
|
|
15
|
-
return typeof document > "u" ? !1 : (D === 0 && (O = document.body.style.overflow, document.body.style.overflow = "hidden"), D += 1, !0);
|
|
16
|
-
}
|
|
17
|
-
function A() {
|
|
18
|
-
typeof document > "u" || D === 0 || (--D, D === 0 && (document.body.style.overflow = O ?? "", O = null));
|
|
19
|
-
}
|
|
20
|
-
//#endregion
|
|
21
|
-
//#region src/components/expandable-container/ExpandableContainer.vue
|
|
22
|
-
var j = /* @__PURE__ */ o({
|
|
23
|
-
inheritAttrs: !1,
|
|
24
|
-
__name: "ExpandableContainer",
|
|
25
|
-
props: /*@__PURE__*/ s({
|
|
26
|
-
buttonPosition: { default: "right" },
|
|
27
|
-
expandLabel: { default: "Fullscreen" },
|
|
28
|
-
collapseLabel: { default: "Exit fullscreen" },
|
|
29
|
-
surface: { default: "glass" }
|
|
30
|
-
}, {
|
|
31
|
-
open: {
|
|
32
|
-
type: Boolean,
|
|
33
|
-
default: !1
|
|
34
|
-
},
|
|
35
|
-
openModifiers: {}
|
|
36
|
-
}),
|
|
37
|
-
emits: ["update:open"],
|
|
38
|
-
setup(o) {
|
|
39
|
-
let s = h(o, "open"), D = f(null);
|
|
40
|
-
function O() {
|
|
41
|
-
let e = D.value?.$el;
|
|
42
|
-
return e instanceof HTMLElement ? e : null;
|
|
43
|
-
}
|
|
44
|
-
function j() {
|
|
45
|
-
s.value = !0;
|
|
46
|
-
}
|
|
47
|
-
function M() {
|
|
48
|
-
s.value = !1;
|
|
49
|
-
}
|
|
50
|
-
let N = !1, P = null, F = null;
|
|
51
|
-
function I(e) {
|
|
52
|
-
e && !N ? N = k() : !e && N && (A(), N = !1);
|
|
53
|
-
}
|
|
54
|
-
function L() {
|
|
55
|
-
(O()?.querySelector("[autofocus]") ?? O()?.querySelector("[data-mode=\"collapse\"]") ?? O()?.querySelector(e) ?? O())?.focus();
|
|
56
|
-
}
|
|
57
|
-
async function R() {
|
|
58
|
-
await l(), await l(), L();
|
|
59
|
-
}
|
|
60
|
-
let z = ["[data-mode=\"expand\"]", ...e.split(", ").map((e) => `.expandable-container__chrome:not([hidden]) ${e}`)].join(", ");
|
|
61
|
-
function B() {
|
|
62
|
-
let e = F?.isConnected ? F : O()?.querySelector(z);
|
|
63
|
-
F = null, e?.focus();
|
|
64
|
-
}
|
|
65
|
-
function V(e) {
|
|
66
|
-
e.preventDefault();
|
|
67
|
-
}
|
|
68
|
-
return g(s, (e, n) => {
|
|
69
|
-
if (I(e), e && !n) {
|
|
70
|
-
let e = typeof document < "u" ? document.activeElement : null;
|
|
71
|
-
F = e instanceof HTMLElement ? e : null, P = t("Escape", M, {
|
|
72
|
-
label: "Exit fullscreen",
|
|
73
|
-
group: "UI",
|
|
74
|
-
allowInInput: !0
|
|
75
|
-
}), R();
|
|
76
|
-
} else !e && n && (P?.(), P = null, l(B));
|
|
77
|
-
}, { immediate: !0 }), u(() => {
|
|
78
|
-
P?.(), P = null, I(!1);
|
|
79
|
-
}), (e, t) => (d(), r(n, {
|
|
80
|
-
to: "body",
|
|
81
|
-
disabled: !s.value
|
|
82
|
-
}, [a(m(v), {
|
|
83
|
-
ref_key: "scope",
|
|
84
|
-
ref: D,
|
|
85
|
-
"as-child": "",
|
|
86
|
-
loop: s.value,
|
|
87
|
-
trapped: s.value,
|
|
88
|
-
onMountAutoFocus: V
|
|
89
|
-
}, {
|
|
90
|
-
default: _(() => [i("div", c({
|
|
91
|
-
class: ["expandable-container", { "glass-overlay": s.value }],
|
|
92
|
-
"data-state": s.value ? "expanded" : "collapsed",
|
|
93
|
-
"data-surface": s.value ? o.surface : void 0,
|
|
94
|
-
role: s.value ? "dialog" : void 0,
|
|
95
|
-
"aria-label": s.value ? o.expandLabel : void 0,
|
|
96
|
-
"aria-modal": s.value || void 0
|
|
97
|
-
}, e.$attrs), [
|
|
98
|
-
i("div", {
|
|
99
|
-
class: "expandable-container__chrome",
|
|
100
|
-
hidden: s.value
|
|
101
|
-
}, [p(e.$slots, "expand-trigger", {
|
|
102
|
-
expand: j,
|
|
103
|
-
label: o.expandLabel
|
|
104
|
-
}, () => [i("button", {
|
|
105
|
-
type: "button",
|
|
106
|
-
"data-part": "trigger",
|
|
107
|
-
"data-control-target": "",
|
|
108
|
-
"data-mode": "expand",
|
|
109
|
-
"data-position": o.buttonPosition,
|
|
110
|
-
"aria-label": o.expandLabel,
|
|
111
|
-
onClick: j
|
|
112
|
-
}, [a(m(y), {
|
|
113
|
-
class: "expandable-container__icon",
|
|
114
|
-
"aria-hidden": "true"
|
|
115
|
-
})], 8, C)])], 8, S),
|
|
116
|
-
i("div", {
|
|
117
|
-
class: "expandable-container__chrome",
|
|
118
|
-
hidden: !s.value
|
|
119
|
-
}, [p(e.$slots, "fullscreen-chrome", {
|
|
120
|
-
collapse: M,
|
|
121
|
-
label: o.collapseLabel,
|
|
122
|
-
fullscreen: !0
|
|
123
|
-
}, () => [i("button", {
|
|
124
|
-
type: "button",
|
|
125
|
-
"data-part": "trigger",
|
|
126
|
-
"data-control-target": "",
|
|
127
|
-
"data-mode": "collapse",
|
|
128
|
-
"data-position": o.buttonPosition,
|
|
129
|
-
"aria-label": o.collapseLabel,
|
|
130
|
-
onClick: M
|
|
131
|
-
}, [a(m(b), {
|
|
132
|
-
class: "expandable-container__icon",
|
|
133
|
-
"aria-hidden": "true"
|
|
134
|
-
})], 8, T)])], 8, w),
|
|
135
|
-
i("div", E, [p(e.$slots, "default", { fullscreen: s.value })])
|
|
136
|
-
], 16, x)]),
|
|
137
|
-
_: 3
|
|
138
|
-
}, 8, ["loop", "trapped"])], 8, ["disabled"]));
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
//#endregion
|
|
142
|
-
export { j as ExpandableContainer };
|
|
1
|
+
import { t as e } from "./expandable-container-CZUj9BzY.js";
|
|
2
|
+
export { e as ExpandableContainer };
|