@glass-sdk/liquid-glass 0.0.2 → 0.0.3-beta.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/CHANGELOG.md +124 -0
- package/README.md +66 -149
- package/dist/core/concentric.js +20 -3
- package/dist/core/corner-options.js +12 -0
- package/dist/core/corner-path.js +118 -0
- package/dist/core/materials.js +264 -32
- package/dist/core/optics.js +1 -2
- package/dist/core/progressive.js +1 -2
- package/dist/core/shape.js +18 -28
- package/dist/core/spring.js +5 -10
- package/dist/core.js +5 -6
- package/dist/dom/backdrop-glass.js +46 -0
- package/dist/dom/compose-layers.js +42 -31
- package/dist/dom/composited.js +136 -0
- package/dist/dom/control-motion.js +58 -47
- package/dist/dom/engine.js +1 -2
- package/dist/dom/escaped-layers.js +179 -0
- package/dist/dom/filter-bounds.js +42 -13
- package/dist/dom/filter-budget.js +1 -2
- package/dist/dom/filter-chain.js +40 -0
- package/dist/dom/filter-groups.js +33 -14
- package/dist/dom/filter-paint-root.js +8 -6
- package/dist/dom/filter-patch.js +94 -55
- package/dist/dom/filter-reach.js +32 -19
- package/dist/dom/filter-stages.js +1 -2
- package/dist/dom/fixed-shape.js +23 -16
- package/dist/dom/foreground.js +16 -17
- package/dist/dom/interaction.js +65 -92
- package/dist/dom/layout-rect.js +42 -0
- package/dist/dom/layout-size.js +28 -0
- package/dist/dom/lens-layers.js +250 -136
- package/dist/dom/map-encoder.js +16 -13
- package/dist/dom/map-encoder.worker.js +2 -3
- package/dist/dom/map-encoding.js +49 -12
- package/dist/dom/map-image.js +29 -7
- package/dist/dom/map-store.js +1 -2
- package/dist/dom/maps.js +133 -83
- package/dist/dom/material-graph.js +108 -29
- package/dist/dom/media-mirror.js +244 -0
- package/dist/dom/page-zoom.js +19 -18
- package/dist/dom/png.js +1 -2
- package/dist/dom/progressive.js +152 -147
- package/dist/dom/renderer.js +1 -2
- package/dist/dom/sampling-bounds.js +1 -2
- package/dist/dom/selection.js +133 -79
- package/dist/dom/shape-attributes.js +9 -0
- package/dist/dom/shape-effects.js +14 -0
- package/dist/dom/shape-geometry.js +3 -0
- package/dist/dom/shape-layout.js +115 -116
- package/dist/dom/shared-backdrop.js +33 -25
- package/dist/dom/specular.js +116 -0
- package/dist/dom/ticker.js +28 -19
- package/dist/dom/tint-color.js +24 -0
- package/dist/dom/warm.js +63 -59
- package/dist/dom.js +591 -505
- package/dist/gpu/geometry.js +2 -3
- package/dist/gpu/maps.js +1109 -7
- package/dist/gpu/planes.js +2 -3
- package/dist/gpu.js +66 -64
- package/dist/index.js +12 -10
- package/dist/react/button.js +12 -11
- package/dist/react/color-picker.js +199 -0
- package/dist/react/control-thumb.js +4 -5
- package/dist/react/menu.js +82 -111
- package/dist/react/merged-ref.js +1 -2
- package/dist/react/progressive.js +1 -2
- package/dist/react/scene.js +71 -55
- package/dist/react/shape.js +67 -47
- package/dist/react/slider.js +81 -0
- package/dist/react/surface.js +90 -56
- package/dist/react/switch.js +101 -0
- package/dist/react/tabs.js +85 -63
- package/dist/react/toolbar.js +38 -123
- package/dist/react/value-control-motion.js +1 -2
- package/dist/styles.css +517 -111
- package/dist/types/core/concentric.d.ts +8 -0
- package/dist/types/core/corner-options.d.ts +4 -0
- package/dist/types/core/corner-path.d.ts +8 -0
- package/dist/types/core/index.d.ts +3 -5
- package/dist/types/core/materials.d.ts +100 -28
- package/dist/types/core/shape.d.ts +4 -6
- package/dist/types/core/spring.d.ts +8 -12
- package/dist/types/dom/backdrop-glass.d.ts +38 -0
- package/dist/types/dom/compose-layers.d.ts +4 -0
- package/dist/types/dom/composited.d.ts +61 -0
- package/dist/types/dom/escaped-layers.d.ts +32 -0
- package/dist/types/dom/filter-bounds.d.ts +4 -0
- package/dist/types/dom/filter-chain.d.ts +6 -0
- package/dist/types/dom/filter-groups.d.ts +1 -1
- package/dist/types/dom/filter-paint-root.d.ts +3 -0
- package/dist/types/dom/filter-patch.d.ts +5 -0
- package/dist/types/dom/filter-reach.d.ts +9 -9
- package/dist/types/dom/foreground.d.ts +2 -1
- package/dist/types/dom/index.d.ts +8 -19
- package/dist/types/dom/interaction.d.ts +8 -8
- package/dist/types/dom/layout-rect.d.ts +17 -0
- package/dist/types/dom/layout-size.d.ts +11 -0
- package/dist/types/dom/lens-layers.d.ts +18 -10
- package/dist/types/dom/map-encoder.d.ts +5 -2
- package/dist/types/dom/map-encoding.d.ts +12 -3
- package/dist/types/dom/map-image.d.ts +7 -1
- package/dist/types/dom/maps.d.ts +25 -7
- package/dist/types/dom/material-graph.d.ts +73 -10
- package/dist/types/dom/media-mirror.d.ts +49 -0
- package/dist/types/dom/progressive.d.ts +2 -5
- package/dist/types/dom/sampling-bounds.d.ts +1 -3
- package/dist/types/dom/selection.d.ts +29 -4
- package/dist/types/dom/shape-attributes.d.ts +6 -0
- package/dist/types/dom/shape-effects.d.ts +10 -0
- package/dist/types/dom/shape-geometry.d.ts +6 -0
- package/dist/types/dom/shape-layout.d.ts +2 -4
- package/dist/types/dom/shared-backdrop.d.ts +7 -3
- package/dist/types/dom/specular.d.ts +50 -0
- package/dist/types/dom/ticker.d.ts +4 -1
- package/dist/types/dom/tint-color.d.ts +11 -0
- package/dist/types/dom/warm.d.ts +8 -2
- package/dist/types/gpu/geometry.d.ts +2 -0
- package/dist/types/gpu/planes.d.ts +3 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/react/button.d.ts +1 -1
- package/dist/types/react/color-picker.d.ts +26 -0
- package/dist/types/react/index.d.ts +14 -10
- package/dist/types/react/menu.d.ts +4 -5
- package/dist/types/react/progressive.d.ts +1 -1
- package/dist/types/react/scene.d.ts +4 -2
- package/dist/types/react/shape.d.ts +11 -1
- package/dist/types/react/slider.d.ts +14 -0
- package/dist/types/react/surface.d.ts +11 -22
- package/dist/types/react/switch.d.ts +9 -0
- package/dist/types/react/tabs.d.ts +3 -3
- package/dist/types/react/toolbar.d.ts +1 -1
- package/package.json +46 -40
- package/dist/core/morph-path.js +0 -206
- package/dist/core/union.js +0 -117
- package/dist/dom/compound-field.js +0 -23
- package/dist/dom/exit-handoff.js +0 -14
- package/dist/dom/map-blend.js +0 -8
- package/dist/dom/morph.js +0 -296
- package/dist/react/value-controls.js +0 -176
- package/dist/types/core/morph-path.d.ts +0 -110
- package/dist/types/core/union.d.ts +0 -20
- package/dist/types/dom/compound-field.d.ts +0 -35
- package/dist/types/dom/exit-handoff.d.ts +0 -7
- package/dist/types/dom/map-blend.d.ts +0 -22
- package/dist/types/dom/morph.d.ts +0 -78
- package/dist/types/react/value-controls.d.ts +0 -20
package/dist/dom/interaction.js
CHANGED
|
@@ -1,129 +1,102 @@
|
|
|
1
|
-
import { Spring as e,
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
function
|
|
5
|
-
return e === "none" || e === "reduced" ? e : typeof matchMedia == "function" ? (
|
|
1
|
+
import { Spring as e, springs as t } from "../core/spring.js";
|
|
2
|
+
// src/dom/interaction.ts
|
|
3
|
+
var n;
|
|
4
|
+
function r(e) {
|
|
5
|
+
return e === "none" || e === "reduced" ? e : typeof matchMedia == "function" ? (n ??= matchMedia("(prefers-reduced-motion: reduce)"), n.matches ? "reduced" : "full") : "full";
|
|
6
6
|
}
|
|
7
|
-
var
|
|
8
|
-
function
|
|
7
|
+
var i = /* @__PURE__ */ new WeakSet(), a = "(hover: hover) and (pointer: fine)";
|
|
8
|
+
function o(e) {
|
|
9
9
|
return e.matches(":disabled, [data-disabled], [aria-disabled='true']");
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
width: r
|
|
19
|
-
height: r.offsetHeight || 1
|
|
20
|
-
}), T = () => {
|
|
21
|
-
let e = r.getBoundingClientRect(), { width: t, height: n } = w();
|
|
11
|
+
function s(n, r) {
|
|
12
|
+
let s = n.ownerDocument.defaultView, c = { scale: n.style.scale }, l = new e(0, t.press), u = new e(0, t.glow), d = null, f = !1, p = !1, m = 0, h = !1, g = 0, _ = 0, v = (e, t) => {
|
|
13
|
+
n.style.getPropertyValue(e) !== t && n.style.setProperty(e, t);
|
|
14
|
+
}, y = () => ({
|
|
15
|
+
width: n.offsetWidth || 1,
|
|
16
|
+
height: n.offsetHeight || 1
|
|
17
|
+
}), b = () => {
|
|
18
|
+
let e = n.getBoundingClientRect(), { width: t, height: r } = y();
|
|
22
19
|
return {
|
|
23
|
-
cx: e.left + e.width / 2
|
|
24
|
-
cy: e.top + e.height / 2
|
|
20
|
+
cx: e.left + e.width / 2,
|
|
21
|
+
cy: e.top + e.height / 2,
|
|
25
22
|
width: t,
|
|
26
|
-
height:
|
|
23
|
+
height: r,
|
|
27
24
|
rect: e,
|
|
28
25
|
ratioX: t / (e.width || 1),
|
|
29
|
-
ratioY:
|
|
26
|
+
ratioY: r / (e.height || 1)
|
|
30
27
|
};
|
|
31
|
-
},
|
|
32
|
-
let { rect: n, ratioX: r, ratioY: i } =
|
|
33
|
-
|
|
34
|
-
},
|
|
28
|
+
}, x = (e, t) => {
|
|
29
|
+
let { rect: n, ratioX: r, ratioY: i } = b();
|
|
30
|
+
g = (e - n.left) * r, _ = (t - n.top) * i;
|
|
31
|
+
}, S = (e, t, n) => {
|
|
35
32
|
e.configure(n).target = t;
|
|
36
33
|
};
|
|
37
|
-
function
|
|
38
|
-
|
|
34
|
+
function C(e) {
|
|
35
|
+
d && e.pointerId === d.id && (d.clientX = e.clientX, d.clientY = e.clientY);
|
|
39
36
|
}
|
|
40
|
-
function
|
|
41
|
-
(!e ||
|
|
37
|
+
function w(e) {
|
|
38
|
+
(!e || d && e.pointerId === d.id) && (d = null, s.removeEventListener("pointermove", C), s.removeEventListener("pointerup", w), s.removeEventListener("pointercancel", w), S(l, 0, t.release), S(u, p ? .35 : 0, t.glow));
|
|
42
39
|
}
|
|
43
|
-
function
|
|
44
|
-
|
|
45
|
-
a.add(e);
|
|
46
|
-
let { cx: t, cy: i } = T();
|
|
47
|
-
m = {
|
|
40
|
+
function T(e) {
|
|
41
|
+
i.has(e) || e.button !== 0 || o(n) || (i.add(e), d = {
|
|
48
42
|
id: e.pointerId,
|
|
49
|
-
x: e.clientX,
|
|
50
|
-
y: e.clientY,
|
|
51
|
-
cx: t,
|
|
52
|
-
cy: i,
|
|
53
43
|
clientX: e.clientX,
|
|
54
|
-
clientY: e.clientY
|
|
55
|
-
|
|
56
|
-
lastY: i
|
|
57
|
-
}, x = S = 0, E(e.clientX, e.clientY), D(f, 1, n.press), D(p, 1, n.press);
|
|
58
|
-
let { width: o, height: l } = w(), h = {
|
|
59
|
-
duration: n.track.duration + 5e-4 * Math.max(o, l),
|
|
60
|
-
bounce: 0
|
|
61
|
-
};
|
|
62
|
-
D(u, 0, h), D(d, 0, h), c.addEventListener("pointermove", O), c.addEventListener("pointerup", k), c.addEventListener("pointercancel", k);
|
|
44
|
+
clientY: e.clientY
|
|
45
|
+
}, x(e.clientX, e.clientY), S(l, 1, t.press), S(u, 1, t.press), s.addEventListener("pointermove", C), s.addEventListener("pointerup", w), s.addEventListener("pointercancel", w));
|
|
63
46
|
}
|
|
64
|
-
function
|
|
65
|
-
e.pointerType !== "touch" &&
|
|
47
|
+
function E(e) {
|
|
48
|
+
e.pointerType !== "touch" && s.matchMedia(a).matches && (p = e.type !== "pointerleave", p && x(e.clientX, e.clientY), !d && !f && S(u, p ? .35 : 0, t.glow));
|
|
66
49
|
}
|
|
67
|
-
function
|
|
50
|
+
function D(e) {
|
|
68
51
|
if (e.key === " " || e.key === "Enter") {
|
|
69
52
|
if (e.type === "keydown") {
|
|
70
|
-
if (e.repeat ||
|
|
71
|
-
|
|
72
|
-
let { width:
|
|
73
|
-
|
|
74
|
-
} else
|
|
53
|
+
if (e.repeat || i.has(e) || o(n) || d) return;
|
|
54
|
+
i.add(e), f = !0;
|
|
55
|
+
let { width: r, height: a } = y();
|
|
56
|
+
g = r / 2, _ = a / 2, S(l, 1, t.press), S(u, 1, t.press);
|
|
57
|
+
} else f && (f = !1, S(l, 0, t.release), S(u, p ? .35 : 0, t.glow));
|
|
75
58
|
}
|
|
76
59
|
}
|
|
77
|
-
|
|
78
|
-
|
|
60
|
+
function O(e) {
|
|
61
|
+
if (!d) return;
|
|
62
|
+
let t = e.target;
|
|
63
|
+
(t?.nodeType === 1 ? t : t?.parentElement)?.closest("[draggable=\"true\"]") || e.preventDefault();
|
|
64
|
+
}
|
|
65
|
+
let k = () => {
|
|
66
|
+
f && (f = !1, S(l, 0, t.release), S(u, 0, t.glow));
|
|
79
67
|
};
|
|
80
|
-
return
|
|
81
|
-
frame(e
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
u,
|
|
92
|
-
d,
|
|
93
|
-
f,
|
|
94
|
-
p
|
|
95
|
-
]) e.step(a);
|
|
96
|
-
let g = o === "full", D = g ? Math.min(.16, 8 / Math.max(s, c)) * f.value : 0, O = Math.max(s, c) <= 72 ? .2 : .12, k = g ? Math.min(O, .5 * Math.abs(u.value) / s + 7e-5 * Math.abs(u.velocity) + 5e-5 * Math.abs(x)) : 0, A = g ? Math.min(O, .5 * Math.abs(d.value) / c + 7e-5 * Math.abs(d.velocity) + 5e-5 * Math.abs(S)) : 0, j = (1 + D) * (1 + k) / Math.sqrt(1 + A), M = (1 + D) * (1 + A) / Math.sqrt(1 + k), N = g && (Math.abs(u.value) > .01 || Math.abs(d.value) > .01), P = Math.abs(j - 1) > 1e-4 || Math.abs(M - 1) > 1e-4, F = p.value > .001;
|
|
97
|
-
if (N || P || F || m || h) v = !0, C("translate", N ? `${u.value.toFixed(3)}px ${d.value.toFixed(3)}px` : l.translate), C("scale", P ? `${j.toFixed(5)} ${M.toFixed(5)}` : l.scale), C("--lg-glow", F ? p.value.toFixed(4) : "0"), C("--lg-glow-x", `${y.toFixed(2)}px`), C("--lg-glow-y", `${b.toFixed(2)}px`), C("--lg-glow-size", `${Math.max(36, Math.min(180, Math.max(s, c) * .9)).toFixed(1)}px`), m || h ? r.dataset.glassPressed !== "" && (r.dataset.glassPressed = "") : r.dataset.glassPressed !== void 0 && delete r.dataset.glassPressed;
|
|
98
|
-
else if (v) {
|
|
99
|
-
v = !1, r.style.translate = l.translate, r.style.scale = l.scale;
|
|
68
|
+
return n.addEventListener("pointerdown", T), n.addEventListener("dragstart", O), n.addEventListener("pointerenter", E), n.addEventListener("pointermove", E), n.addEventListener("pointerleave", E), n.addEventListener("keydown", D), n.addEventListener("keyup", D), n.addEventListener("focusout", k), {
|
|
69
|
+
frame(e) {
|
|
70
|
+
let t = m ? Math.max(0, (e - m) / 1e3) : 1 / 60;
|
|
71
|
+
m = e;
|
|
72
|
+
let i = r(), { width: a } = y();
|
|
73
|
+
d && x(d.clientX, d.clientY);
|
|
74
|
+
for (let e of [l, u]) e.step(t);
|
|
75
|
+
let o = i === "full" ? 2.5 / Math.max(a, 1) * l.value : 0, s = 1 + o, p = 1 + o, b = Math.abs(s - 1) > 1e-4 || Math.abs(p - 1) > 1e-4, S = u.value > .001;
|
|
76
|
+
if (b || S || d || f) h = !0, v("scale", b ? `${s.toFixed(5)} ${p.toFixed(5)}` : c.scale), v("--lg-glow", S ? u.value.toFixed(4) : "0"), v("--lg-glow-x", `${g.toFixed(2)}px`), v("--lg-glow-y", `${_.toFixed(2)}px`), v("--lg-glow-size", "36px"), d || f ? n.dataset.glassPressed !== "" && (n.dataset.glassPressed = "") : n.dataset.glassPressed !== void 0 && delete n.dataset.glassPressed;
|
|
77
|
+
else if (h) {
|
|
78
|
+
h = !1, n.style.scale = c.scale;
|
|
100
79
|
for (let e of [
|
|
101
80
|
"--lg-glow",
|
|
102
81
|
"--lg-glow-x",
|
|
103
82
|
"--lg-glow-y",
|
|
104
83
|
"--lg-glow-size"
|
|
105
|
-
])
|
|
106
|
-
delete
|
|
84
|
+
]) n.style.removeProperty(e);
|
|
85
|
+
delete n.dataset.glassPressed;
|
|
107
86
|
}
|
|
108
|
-
let
|
|
109
|
-
|
|
110
|
-
d,
|
|
111
|
-
f,
|
|
112
|
-
p
|
|
113
|
-
].some((e) => !e.settled);
|
|
114
|
-
return I || (_ = 0), I;
|
|
87
|
+
let C = !!d || [l, u].some((e) => !e.settled);
|
|
88
|
+
return C || (m = 0), C;
|
|
115
89
|
},
|
|
116
90
|
dispose() {
|
|
117
|
-
|
|
91
|
+
w(), n.removeEventListener("pointerdown", T), n.removeEventListener("dragstart", O), n.removeEventListener("pointerenter", E), n.removeEventListener("pointermove", E), n.removeEventListener("pointerleave", E), n.removeEventListener("keydown", D), n.removeEventListener("keyup", D), n.removeEventListener("focusout", k), n.style.scale = c.scale;
|
|
118
92
|
for (let e of [
|
|
119
93
|
"--lg-glow",
|
|
120
94
|
"--lg-glow-x",
|
|
121
95
|
"--lg-glow-y",
|
|
122
96
|
"--lg-glow-size"
|
|
123
|
-
])
|
|
124
|
-
delete
|
|
97
|
+
]) n.style.removeProperty(e);
|
|
98
|
+
delete n.dataset.glassPressed;
|
|
125
99
|
}
|
|
126
100
|
};
|
|
127
101
|
}
|
|
128
|
-
|
|
129
|
-
export { c as attachInteraction, i as resolveMotion };
|
|
102
|
+
export { s as attachInteraction, r as resolveMotion };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// src/dom/layout-rect.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
let t = e.style.scale;
|
|
4
|
+
if (!t || t === "none") return;
|
|
5
|
+
let [n = 1, r = n] = t.split(/\s+/).map(Number);
|
|
6
|
+
if (Number.isFinite(n) && Number.isFinite(r) && (n !== 1 || r !== 1) && n && r) return [n, r];
|
|
7
|
+
}
|
|
8
|
+
function t(t) {
|
|
9
|
+
let n = [];
|
|
10
|
+
for (let r = t; r; r = r.parentElement) {
|
|
11
|
+
let t = e(r);
|
|
12
|
+
t && n.unshift({
|
|
13
|
+
node: r,
|
|
14
|
+
scale: t
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
let r = [], i = (e, t) => {
|
|
18
|
+
for (let { ox: n, oy: i, sx: a, sy: o } of r) e = n + (e - n) / a, t = i + (t - i) / o;
|
|
19
|
+
return [e, t];
|
|
20
|
+
};
|
|
21
|
+
for (let { node: e, scale: t } of n) {
|
|
22
|
+
let n = e.getBoundingClientRect(), [a, o] = i(n.left, n.top), [s = 0, c = 0] = getComputedStyle(e).transformOrigin.split(" ").map(parseFloat);
|
|
23
|
+
r.push({
|
|
24
|
+
ox: a + s * t[0],
|
|
25
|
+
oy: o + c * t[1],
|
|
26
|
+
sx: t[0],
|
|
27
|
+
sy: t[1]
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
let a = t.getBoundingClientRect(), [o, s] = i(a.left, a.top), [c, l] = i(a.right, a.bottom);
|
|
31
|
+
return {
|
|
32
|
+
x: o,
|
|
33
|
+
y: s,
|
|
34
|
+
left: o,
|
|
35
|
+
top: s,
|
|
36
|
+
right: c,
|
|
37
|
+
bottom: l,
|
|
38
|
+
width: c - o,
|
|
39
|
+
height: l - s
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export { t as layoutRect };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// src/dom/layout-size.ts
|
|
2
|
+
function e(e, t = window.getComputedStyle(e)) {
|
|
3
|
+
let n = (e) => e.endsWith("px") ? parseFloat(e) : NaN, r = n(t.width), i = n(t.height);
|
|
4
|
+
if (Number.isNaN(r) || Number.isNaN(i)) return {
|
|
5
|
+
width: e.offsetWidth,
|
|
6
|
+
height: e.offsetHeight
|
|
7
|
+
};
|
|
8
|
+
if (t.boxSizing === "border-box") return {
|
|
9
|
+
width: r,
|
|
10
|
+
height: i
|
|
11
|
+
};
|
|
12
|
+
let a = (...e) => e.reduce((e, t) => e + (parseFloat(t) || 0), 0);
|
|
13
|
+
return {
|
|
14
|
+
width: r + a(t.paddingLeft, t.paddingRight, t.borderLeftWidth, t.borderRightWidth),
|
|
15
|
+
height: i + a(t.paddingTop, t.paddingBottom, t.borderTopWidth, t.borderBottomWidth)
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function t(t, n) {
|
|
19
|
+
let r, i = () => {
|
|
20
|
+
r = void 0, n(e(t));
|
|
21
|
+
}, a = () => {
|
|
22
|
+
r ??= requestAnimationFrame(i);
|
|
23
|
+
}, o = typeof ResizeObserver == "function" ? new ResizeObserver(a) : void 0;
|
|
24
|
+
return o?.observe(t), a(), () => {
|
|
25
|
+
o?.disconnect(), r !== void 0 && cancelAnimationFrame(r);
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export { e as getLayoutSize, t as observeLayoutSize };
|