etudes 22.1.0 → 22.2.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/build/etudes.js +100 -87
- package/build/etudes.umd.cjs +7 -7
- package/build/hooks/useSystemColorScheme.d.ts +3 -0
- package/build/index.d.ts +1 -0
- package/package.json +1 -1
package/build/etudes.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Hs, { Fragment as Do, cloneElement as Bs, Children as Cn, isValidElement as An, forwardRef as Te, useRef as we, useEffect as Ee, useLayoutEffect as
|
|
1
|
+
import Hs, { Fragment as Do, cloneElement as Bs, Children as Cn, isValidElement as An, forwardRef as Te, useRef as we, useEffect as Ee, useLayoutEffect as je, useState as Oe, useCallback as me, useMemo as pt, Suspense as Ys } from "react";
|
|
2
2
|
function Ho(e) {
|
|
3
3
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
4
|
}
|
|
@@ -637,7 +637,7 @@ function Ws(e, r) {
|
|
|
637
637
|
return console.error(i), !1;
|
|
638
638
|
}
|
|
639
639
|
}
|
|
640
|
-
var
|
|
640
|
+
var Ce;
|
|
641
641
|
((e) => {
|
|
642
642
|
e.zero = r();
|
|
643
643
|
function r(S = 0, $ = 0) {
|
|
@@ -726,7 +726,7 @@ var je;
|
|
|
726
726
|
return S.width === 0 && S.height === 0;
|
|
727
727
|
}
|
|
728
728
|
e.isZero = A;
|
|
729
|
-
})(
|
|
729
|
+
})(Ce || (Ce = {}));
|
|
730
730
|
var be;
|
|
731
731
|
((e) => {
|
|
732
732
|
e.zero = r();
|
|
@@ -741,7 +741,7 @@ var be;
|
|
|
741
741
|
width: E,
|
|
742
742
|
height: M
|
|
743
743
|
};
|
|
744
|
-
} else if (_e.isPoint(x) &&
|
|
744
|
+
} else if (_e.isPoint(x) && Ce.isSize(P)) {
|
|
745
745
|
const H = x, K = P;
|
|
746
746
|
return {
|
|
747
747
|
top: H.y,
|
|
@@ -773,7 +773,7 @@ var be;
|
|
|
773
773
|
}
|
|
774
774
|
e.center = i;
|
|
775
775
|
function a(x) {
|
|
776
|
-
return
|
|
776
|
+
return Ce.make({
|
|
777
777
|
width: x.width,
|
|
778
778
|
height: x.height
|
|
779
779
|
});
|
|
@@ -931,7 +931,7 @@ function Se(e) {
|
|
|
931
931
|
}
|
|
932
932
|
function Js(e, { onChange: r }) {
|
|
933
933
|
const i = Se(r);
|
|
934
|
-
|
|
934
|
+
je(() => {
|
|
935
935
|
const a = e.current;
|
|
936
936
|
if (!a) return;
|
|
937
937
|
const c = new IntersectionObserver((u) => {
|
|
@@ -948,7 +948,7 @@ function Js(e, { onChange: r }) {
|
|
|
948
948
|
}
|
|
949
949
|
function mr(e, { onResize: r }) {
|
|
950
950
|
const i = Se(r);
|
|
951
|
-
|
|
951
|
+
je(() => {
|
|
952
952
|
const a = e.current;
|
|
953
953
|
if (!a) return;
|
|
954
954
|
const c = new ResizeObserver(() => {
|
|
@@ -960,8 +960,8 @@ function mr(e, { onResize: r }) {
|
|
|
960
960
|
}, [e.current]);
|
|
961
961
|
}
|
|
962
962
|
function Zs() {
|
|
963
|
-
const [e, r] = Oe(
|
|
964
|
-
return
|
|
963
|
+
const [e, r] = Oe(Ce.zero);
|
|
964
|
+
return je(() => {
|
|
965
965
|
const i = () => {
|
|
966
966
|
const a = be.size(be.fromViewport());
|
|
967
967
|
r(a);
|
|
@@ -983,10 +983,10 @@ function nt(e) {
|
|
|
983
983
|
const u = be.from(c);
|
|
984
984
|
u && i(u);
|
|
985
985
|
}
|
|
986
|
-
}),
|
|
986
|
+
}), je(() => {
|
|
987
987
|
const c = e.current, u = be.from(c);
|
|
988
988
|
u && i(u);
|
|
989
|
-
}, [
|
|
989
|
+
}, [Ce.toString(a)]), r;
|
|
990
990
|
}
|
|
991
991
|
var on;
|
|
992
992
|
((e) => {
|
|
@@ -1037,7 +1037,7 @@ var on;
|
|
|
1037
1037
|
})(on || (on = {}));
|
|
1038
1038
|
function Qs({ src: e, srcSet: r, sizes: i }, { onLoadStart: a, onLoadComplete: c, onLoadError: u } = {}) {
|
|
1039
1039
|
const d = we(void 0), g = Se(a), m = Se(c), b = Se(u);
|
|
1040
|
-
|
|
1040
|
+
je(() => {
|
|
1041
1041
|
let T = !1;
|
|
1042
1042
|
const _ = (A) => {
|
|
1043
1043
|
if (T) return;
|
|
@@ -1078,7 +1078,7 @@ function Go({
|
|
|
1078
1078
|
}
|
|
1079
1079
|
function ea(e) {
|
|
1080
1080
|
if (e && typeof e.width == "number" && typeof e.height == "number")
|
|
1081
|
-
return
|
|
1081
|
+
return Ce.make(e.width, e.height);
|
|
1082
1082
|
}
|
|
1083
1083
|
const qo = /* @__PURE__ */ Te(({
|
|
1084
1084
|
alt: e,
|
|
@@ -1166,7 +1166,7 @@ const Jo = /* @__PURE__ */ Te(({
|
|
|
1166
1166
|
}, _) => {
|
|
1167
1167
|
const I = (P) => {
|
|
1168
1168
|
$(P ? P.width / P.height : NaN);
|
|
1169
|
-
}, j = we(null), A = _ ?? j, [S, $] = Oe(NaN), q = isNaN(i) ? S : i, W = nt(A), Y = W.width / W.height, J =
|
|
1169
|
+
}, j = we(null), A = _ ?? j, [S, $] = Oe(NaN), q = isNaN(i) ? S : i, W = nt(A), Y = W.width / W.height, J = Ce.make(
|
|
1170
1170
|
Y > 1 ? Math.max(W.width, W.height * q) : Math.max(W.width, Math.max(W.height, W.width / q) * q),
|
|
1171
1171
|
Y > 1 ? Math.max(W.height, Math.max(W.width, W.height * q) / q) : Math.max(W.height, W.width / q)
|
|
1172
1172
|
), x = ze(e, {
|
|
@@ -1240,7 +1240,7 @@ function na(e, {
|
|
|
1240
1240
|
onLoadError: a
|
|
1241
1241
|
} = {}) {
|
|
1242
1242
|
const c = Se(r), u = Se(i), d = Se(a);
|
|
1243
|
-
|
|
1243
|
+
je(() => {
|
|
1244
1244
|
if (!e) return;
|
|
1245
1245
|
const g = window.document.createElement("video"), m = () => u.current?.(g), b = () => d.current?.(g);
|
|
1246
1246
|
return g.addEventListener("loadedmetadata", m), g.addEventListener("error", b), g.src = e, c.current?.(g), () => {
|
|
@@ -1269,7 +1269,7 @@ function ra(e, {
|
|
|
1269
1269
|
}
|
|
1270
1270
|
function oa(e) {
|
|
1271
1271
|
if (e && typeof e.videoWidth == "number" && typeof e.videoHeight == "number")
|
|
1272
|
-
return
|
|
1272
|
+
return Ce.make(e.videoWidth, e.videoHeight);
|
|
1273
1273
|
}
|
|
1274
1274
|
const Zo = /* @__PURE__ */ Te(({
|
|
1275
1275
|
autoLoop: e = !0,
|
|
@@ -1387,7 +1387,7 @@ const Qo = /* @__PURE__ */ Te(({
|
|
|
1387
1387
|
}, x) => {
|
|
1388
1388
|
const P = (z) => {
|
|
1389
1389
|
K(z ? z.width / z.height : NaN), Y?.(z);
|
|
1390
|
-
}, E = x ?? we(null), M = nt(E), [H, K] = Oe(NaN), oe = isNaN(a) ? H : a, Q = M.width / M.height, X =
|
|
1390
|
+
}, E = x ?? we(null), M = nt(E), [H, K] = Oe(NaN), oe = isNaN(a) ? H : a, Q = M.width / M.height, X = Ce.make(
|
|
1391
1391
|
Q > 1 ? Math.max(M.width, M.height * oe) : Math.max(M.width, Math.max(M.height, M.width / oe) * oe),
|
|
1392
1392
|
Q > 1 ? Math.max(M.height, Math.max(M.width, M.height * oe) / oe) : Math.max(M.height, M.width / oe)
|
|
1393
1393
|
), D = ze(r, {
|
|
@@ -2028,8 +2028,8 @@ function da() {
|
|
|
2028
2028
|
for (var ie, re, le, ve = [], xe = 0; xe < B.length; xe++) {
|
|
2029
2029
|
var de = B[xe], ye = B[ie];
|
|
2030
2030
|
if (de && xe !== ie) if (ye) {
|
|
2031
|
-
var
|
|
2032
|
-
if (
|
|
2031
|
+
var Me = k(de), Pe = k(ye);
|
|
2032
|
+
if (Me !== de.ownerDocument) if (Pe !== de.ownerDocument) if (Me !== Pe) {
|
|
2033
2033
|
ve = ve.length ? ve : U(ye);
|
|
2034
2034
|
var Ve = void 0;
|
|
2035
2035
|
if (ye instanceof D.HTMLElement && de instanceof D.SVGElement && !(de instanceof D.SVGSVGElement)) {
|
|
@@ -2094,8 +2094,8 @@ function da() {
|
|
|
2094
2094
|
if (ve === "pointer") {
|
|
2095
2095
|
var xe = Ye(F, B, "drag"), de = jr(C);
|
|
2096
2096
|
de.x += xe.x, de.y += xe.y;
|
|
2097
|
-
var ye = de.x > re.left && de.x < re.right,
|
|
2098
|
-
le = ye &&
|
|
2097
|
+
var ye = de.x > re.left && de.x < re.right, Me = de.y > re.top && de.y < re.bottom;
|
|
2098
|
+
le = ye && Me;
|
|
2099
2099
|
}
|
|
2100
2100
|
var Pe = F.getRect(B);
|
|
2101
2101
|
if (Pe && ve === "center") {
|
|
@@ -3061,8 +3061,8 @@ function da() {
|
|
|
3061
3061
|
}
|
|
3062
3062
|
function h(y, O, C, V) {
|
|
3063
3063
|
if (y.addEventListener && y.removeEventListener) {
|
|
3064
|
-
var F = mt(o, (function(
|
|
3065
|
-
return
|
|
3064
|
+
var F = mt(o, (function(Me) {
|
|
3065
|
+
return Me.eventTarget === y;
|
|
3066
3066
|
})), B = o[F];
|
|
3067
3067
|
if (B && B.events) if (O !== "all") {
|
|
3068
3068
|
var ie = !1, re = B.events[O];
|
|
@@ -3094,8 +3094,8 @@ function da() {
|
|
|
3094
3094
|
var de = le.listeners;
|
|
3095
3095
|
V.currentTarget = ie;
|
|
3096
3096
|
for (var ye = 0; ye < de.length; ye++) {
|
|
3097
|
-
var
|
|
3098
|
-
Ut(
|
|
3097
|
+
var Me = de[ye];
|
|
3098
|
+
Ut(Me.options, C) && Me.func(V);
|
|
3099
3099
|
}
|
|
3100
3100
|
}
|
|
3101
3101
|
}
|
|
@@ -3487,7 +3487,7 @@ function da() {
|
|
|
3487
3487
|
function fo(n) {
|
|
3488
3488
|
return n && n.replace(/\/.*$/, "");
|
|
3489
3489
|
}
|
|
3490
|
-
var po = new ds(),
|
|
3490
|
+
var po = new ds(), Ae = po.interactStatic, ps = typeof globalThis < "u" ? globalThis : window;
|
|
3491
3491
|
po.init(ps);
|
|
3492
3492
|
var hs = Object.freeze({ __proto__: null, edgeTarget: function() {
|
|
3493
3493
|
}, elements: function() {
|
|
@@ -3616,8 +3616,8 @@ function da() {
|
|
|
3616
3616
|
(re = E.func(ie) ? ie(C, V, t._proxy, O, F) : ie) && v.push({ x: (E.number(re.x) ? re.x : C) + O.x, y: (E.number(re.y) ? re.y : V) + O.y, range: E.number(re.range) ? re.range : l.range, source: ie, index: F, offset: O });
|
|
3617
3617
|
}
|
|
3618
3618
|
for (var le = { target: null, inRange: !1, distance: 0, range: 0, delta: { x: 0, y: 0 } }, ve = 0; ve < v.length; ve++) {
|
|
3619
|
-
var xe = v[ve], de = xe.range, ye = xe.x - h.x,
|
|
3620
|
-
de === 1 / 0 && le.inRange && le.range !== 1 / 0 && (Ve = !1), le.target && !(Ve ? le.inRange && de !== 1 / 0 ? Pe / de < le.distance / le.range : de === 1 / 0 && le.range !== 1 / 0 || Pe < le.distance : !le.inRange && Pe < le.distance) || (le.target = xe, le.distance = Pe, le.range = de, le.inRange = Ve, le.delta.x = ye, le.delta.y =
|
|
3619
|
+
var xe = v[ve], de = xe.range, ye = xe.x - h.x, Me = xe.y - h.y, Pe = ht(ye, Me), Ve = Pe <= de;
|
|
3620
|
+
de === 1 / 0 && le.inRange && le.range !== 1 / 0 && (Ve = !1), le.target && !(Ve ? le.inRange && de !== 1 / 0 ? Pe / de < le.distance / le.range : de === 1 / 0 && le.range !== 1 / 0 || Pe < le.distance : !le.inRange && Pe < le.distance) || (le.target = xe, le.distance = Pe, le.range = de, le.inRange = Ve, le.delta.x = ye, le.delta.y = Me);
|
|
3621
3621
|
}
|
|
3622
3622
|
return le.inRange && (o.x = le.target.x, o.y = le.target.y), s.closest = le, le;
|
|
3623
3623
|
}, defaults: { range: 1 / 0, targets: null, offset: null, offsetWithOrigin: !0, origin: null, relativePoints: null, endOnly: !1, enabled: !1 } }, Ps = Ze(or, "snap"), qt = { start: function(n) {
|
|
@@ -3830,12 +3830,12 @@ function da() {
|
|
|
3830
3830
|
} };
|
|
3831
3831
|
})({ page: { x: B.x, y: B.y }, client: { x: B.x, y: B.y }, timeStamp: f.now() });
|
|
3832
3832
|
V = (function(re, le, ve, xe, de) {
|
|
3833
|
-
var ye = re.interactions.new({ pointerType: "reflow" }),
|
|
3834
|
-
ye.interactable = le, ye.element = ve, ye.prevEvent = de, ye.updatePointer(de, de, ve, !0), kr(ye.coords.delta), Gn(ye.prepared, xe), ye._doPhase(
|
|
3833
|
+
var ye = re.interactions.new({ pointerType: "reflow" }), Me = { interaction: ye, event: de, pointer: de, eventTarget: ve, phase: "reflow" };
|
|
3834
|
+
ye.interactable = le, ye.element = ve, ye.prevEvent = de, ye.updatePointer(de, de, ve, !0), kr(ye.coords.delta), Gn(ye.prepared, xe), ye._doPhase(Me);
|
|
3835
3835
|
var Pe = re.window, Ve = Pe.Promise, De = Ve ? new Ve((function(Ge) {
|
|
3836
3836
|
ye._reflowResolve = Ge;
|
|
3837
3837
|
})) : void 0;
|
|
3838
|
-
return ye._reflowPromise = De, ye.start(xe, le, ve), ye._interacting ? (ye.move(
|
|
3838
|
+
return ye._reflowPromise = De, ye.start(xe, le, ve), ye._interacting ? (ye.move(Me), ye.end(de)) : (ye.stop(), ye._reflowResolve()), ye.removePointer(de, de), De;
|
|
3839
3839
|
})(f, s, O, l, ie);
|
|
3840
3840
|
}
|
|
3841
3841
|
v && v.push(V);
|
|
@@ -3851,11 +3851,11 @@ function da() {
|
|
|
3851
3851
|
s.splice(s.indexOf(l), 1);
|
|
3852
3852
|
})(t.interactions.list, o));
|
|
3853
3853
|
} } }, Ds = Vs;
|
|
3854
|
-
if (
|
|
3855
|
-
e.exports =
|
|
3854
|
+
if (Ae.use(Jr), Ae.use(ro), Ae.use(Ls), Ae.use(os), Ae.use($s), Ae.use(Ui), Ae.use(Mi), Ae.use(zi), Ae.use(Ds), Ae.default = Ae, c(e) === "object" && e) try {
|
|
3855
|
+
e.exports = Ae;
|
|
3856
3856
|
} catch {
|
|
3857
3857
|
}
|
|
3858
|
-
return
|
|
3858
|
+
return Ae.default = Ae, Ae;
|
|
3859
3859
|
}));
|
|
3860
3860
|
})(en)), en.exports;
|
|
3861
3861
|
}
|
|
@@ -3872,7 +3872,7 @@ function ga(e, {
|
|
|
3872
3872
|
...u
|
|
3873
3873
|
}) {
|
|
3874
3874
|
const d = Se(i), g = Se(a), m = Se(c);
|
|
3875
|
-
|
|
3875
|
+
je(() => {
|
|
3876
3876
|
if (!r) return;
|
|
3877
3877
|
const b = e.current;
|
|
3878
3878
|
if (!b) return;
|
|
@@ -3995,9 +3995,9 @@ function ma({ src: e = "", displacement: r = NaN }) {
|
|
|
3995
3995
|
}
|
|
3996
3996
|
function ni(e, r) {
|
|
3997
3997
|
const { width: i, height: a } = e, { height: c } = r;
|
|
3998
|
-
if (a <= 0) return
|
|
3998
|
+
if (a <= 0) return Ce.zero;
|
|
3999
3999
|
const d = c / a * i;
|
|
4000
|
-
return
|
|
4000
|
+
return Ce.make(d, c);
|
|
4001
4001
|
}
|
|
4002
4002
|
function va(e, r, i, a) {
|
|
4003
4003
|
const { width: c } = ni(r, i), { width: u } = i, d = u * a;
|
|
@@ -4266,7 +4266,7 @@ function Na({
|
|
|
4266
4266
|
const T = we(null), _ = we(void 0), I = nt(T), j = me(() => {
|
|
4267
4267
|
const $ = window.document.createElement("span");
|
|
4268
4268
|
$.className = se(r), $.innerHTML = g, $.role = "tooltip";
|
|
4269
|
-
const q = a ?? (T.current ? _a(T.current, b) : "tl"), W = Sa($), Y = Pa({ alignment: q, arrowSize:
|
|
4269
|
+
const q = a ?? (T.current ? _a(T.current, b) : "tl"), W = Sa($), Y = Pa({ alignment: q, arrowSize: Ce.make(u, c), gap: d, maxDialogWidth: m, fullDialogWidth: W.width, targetWidth: I.width }), J = ce(i, Y.dialog);
|
|
4270
4270
|
Object.keys(J).forEach((P) => $.style[P] = J[P]);
|
|
4271
4271
|
const x = window.document.createElement("span");
|
|
4272
4272
|
return Object.keys(Y.arrow).forEach((P) => x.style[P] = Y.arrow[P]), $.appendChild(x), $;
|
|
@@ -4291,11 +4291,11 @@ function Na({
|
|
|
4291
4291
|
);
|
|
4292
4292
|
}
|
|
4293
4293
|
function Sa(e) {
|
|
4294
|
-
if (typeof window > "u") return
|
|
4294
|
+
if (typeof window > "u") return Ce.zero;
|
|
4295
4295
|
const r = e.cloneNode(!1);
|
|
4296
4296
|
r.innerHTML = e.innerHTML, r.style.visibility = "hidden", r.style.whiteSpace = "pre", window.document.body.appendChild(r);
|
|
4297
4297
|
const i = r.getBoundingClientRect();
|
|
4298
|
-
return window.document.body.removeChild(r),
|
|
4298
|
+
return window.document.body.removeChild(r), Ce.make(i.width, i.height);
|
|
4299
4299
|
}
|
|
4300
4300
|
function _a(e, r) {
|
|
4301
4301
|
const i = be.fromViewport(), a = be.intersecting(e);
|
|
@@ -4491,7 +4491,7 @@ function Dl() {
|
|
|
4491
4491
|
}, [e]);
|
|
4492
4492
|
}
|
|
4493
4493
|
function Hl(e, { element: r, isEnabled: i = !0 } = {}) {
|
|
4494
|
-
|
|
4494
|
+
je(() => {
|
|
4495
4495
|
if (!i) return;
|
|
4496
4496
|
const a = r ?? window.document.documentElement, c = a.className;
|
|
4497
4497
|
return a.classList.add(e), () => {
|
|
@@ -4501,7 +4501,7 @@ function Hl(e, { element: r, isEnabled: i = !0 } = {}) {
|
|
|
4501
4501
|
}
|
|
4502
4502
|
function Bl(e, r) {
|
|
4503
4503
|
const i = Se(r);
|
|
4504
|
-
|
|
4504
|
+
je(() => {
|
|
4505
4505
|
const a = (c) => {
|
|
4506
4506
|
if (!(c.target instanceof Node)) return;
|
|
4507
4507
|
let u = !0, d = c.target;
|
|
@@ -4550,14 +4550,14 @@ function ka(e, {
|
|
|
4550
4550
|
const $ = _e.make(A.clientX, A.clientY);
|
|
4551
4551
|
d.current = $, g.current = $, S.addEventListener("mousemove", _), S.addEventListener("mouseup", I, { capture: !0 }), S.addEventListener("mouseleave", I), i && (S.style.cursor = "grabbing"), m.current?.($);
|
|
4552
4552
|
}, [i, _, I]);
|
|
4553
|
-
|
|
4553
|
+
je(() => {
|
|
4554
4554
|
const A = e.current;
|
|
4555
4555
|
if (!A || !r || !i) return;
|
|
4556
4556
|
const S = A.style.cursor;
|
|
4557
4557
|
return A.style.cursor = "grab", () => {
|
|
4558
4558
|
A.style.cursor = S;
|
|
4559
4559
|
};
|
|
4560
|
-
}, [r, i]),
|
|
4560
|
+
}, [r, i]), je(() => {
|
|
4561
4561
|
const A = e.current;
|
|
4562
4562
|
if (!(!A || !r))
|
|
4563
4563
|
return A.addEventListener("mousedown", j), () => {
|
|
@@ -4676,7 +4676,7 @@ function Gl(e) {
|
|
|
4676
4676
|
}
|
|
4677
4677
|
function ql(e, r = []) {
|
|
4678
4678
|
const i = Se(e), a = we(void 0), c = we(!1);
|
|
4679
|
-
|
|
4679
|
+
je(() => {
|
|
4680
4680
|
const u = () => {
|
|
4681
4681
|
const g = Fa();
|
|
4682
4682
|
g && (i.current(g, a.current), a.current = g);
|
|
@@ -4764,7 +4764,7 @@ function To(e, r, { element: i } = {}) {
|
|
|
4764
4764
|
r === void 0 ? a.style.removeProperty(e) : a.style.setProperty(e, r);
|
|
4765
4765
|
}
|
|
4766
4766
|
function Jl(e, r, { element: i, isEnabled: a = !0 } = {}) {
|
|
4767
|
-
|
|
4767
|
+
je(() => {
|
|
4768
4768
|
if (!a) return;
|
|
4769
4769
|
const c = i ?? window.document.documentElement, u = Ya(e, { element: c, computed: !1 });
|
|
4770
4770
|
return To(e, r, { element: c }), () => {
|
|
@@ -4772,7 +4772,19 @@ function Jl(e, r, { element: i, isEnabled: a = !0 } = {}) {
|
|
|
4772
4772
|
};
|
|
4773
4773
|
}, [e, r, i, a]);
|
|
4774
4774
|
}
|
|
4775
|
-
function Zl(
|
|
4775
|
+
function Zl() {
|
|
4776
|
+
const [e, r] = Oe("light");
|
|
4777
|
+
return je(() => {
|
|
4778
|
+
const i = window.matchMedia("(prefers-color-scheme: dark)");
|
|
4779
|
+
function a(c) {
|
|
4780
|
+
r(c.matches ? "dark" : "light");
|
|
4781
|
+
}
|
|
4782
|
+
return r(i.matches ? "dark" : "light"), i.addEventListener("change", a), () => {
|
|
4783
|
+
i.removeEventListener("change", a);
|
|
4784
|
+
};
|
|
4785
|
+
}, []), e;
|
|
4786
|
+
}
|
|
4787
|
+
function Ql(e, {
|
|
4776
4788
|
autoStarts: r = !0,
|
|
4777
4789
|
onTimeout: i
|
|
4778
4790
|
}, a = []) {
|
|
@@ -5146,7 +5158,7 @@ const fi = /* @__PURE__ */ Te(({
|
|
|
5146
5158
|
}
|
|
5147
5159
|
);
|
|
5148
5160
|
} }) });
|
|
5149
|
-
}), ln = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("button", { ...r, children: e }), Sr = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("figure", { ...r, children: e }), _r = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("figure", { ...r, children: e }), dr = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("div", { ...r, children: e }), un = zn.Item,
|
|
5161
|
+
}), ln = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("button", { ...r, children: e }), Sr = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("figure", { ...r, children: e }), _r = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("figure", { ...r, children: e }), dr = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("div", { ...r, children: e }), un = zn.Item, eu = /* @__PURE__ */ Object.assign(fi, {
|
|
5150
5162
|
/**
|
|
5151
5163
|
* Component for each section header of an {@link Accordion}.
|
|
5152
5164
|
*/
|
|
@@ -5316,9 +5328,9 @@ const Za = /* @__PURE__ */ Te(({
|
|
|
5316
5328
|
onDragMove: U
|
|
5317
5329
|
}), $a(K || !X ? -1 : e, {
|
|
5318
5330
|
onInterval: k
|
|
5319
|
-
}, [r]),
|
|
5331
|
+
}, [r]), je(() => {
|
|
5320
5332
|
!X || E || (K ? W.current?.() : Y.current?.());
|
|
5321
|
-
}, [E, K, X]),
|
|
5333
|
+
}, [E, K, X]), je(() => {
|
|
5322
5334
|
const G = j.current;
|
|
5323
5335
|
if (!G) return;
|
|
5324
5336
|
const fe = I.current === void 0, he = I.current === r;
|
|
@@ -5493,7 +5505,7 @@ const pi = /* @__PURE__ */ Te(({
|
|
|
5493
5505
|
autoCorrect: "off",
|
|
5494
5506
|
type: "text"
|
|
5495
5507
|
}
|
|
5496
|
-
),
|
|
5508
|
+
), tu = /* @__PURE__ */ Object.assign(pi, {
|
|
5497
5509
|
/**
|
|
5498
5510
|
* Component for the each field in a {@link CodeInput}.
|
|
5499
5511
|
*/
|
|
@@ -5637,7 +5649,7 @@ const gi = /* @__PURE__ */ Te(({
|
|
|
5637
5649
|
}
|
|
5638
5650
|
)
|
|
5639
5651
|
] });
|
|
5640
|
-
}), pn = ({ ...e }) => /* @__PURE__ */ w.jsx(hi, { ...e }), hn = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("button", { ...r, children: e }), gn = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("button", { ...r, children: e }),
|
|
5652
|
+
}), pn = ({ ...e }) => /* @__PURE__ */ w.jsx(hi, { ...e }), hn = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("button", { ...r, children: e }), gn = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("button", { ...r, children: e }), nu = /* @__PURE__ */ Object.assign(gi, {
|
|
5641
5653
|
/**
|
|
5642
5654
|
* Component for the text field in a {@link Counter}.
|
|
5643
5655
|
*/
|
|
@@ -5903,7 +5915,7 @@ const mi = /* @__PURE__ */ Te(({
|
|
|
5903
5915
|
] })
|
|
5904
5916
|
}
|
|
5905
5917
|
);
|
|
5906
|
-
}), yn = zn, bn = zn.Item, xn = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("button", { ...r, children: e }), Tr = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("figure", { ...r, "aria-hidden": !0, children: e }), Or = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("figure", { ...r, "aria-hidden": !0, children: e }),
|
|
5918
|
+
}), yn = zn, bn = zn.Item, xn = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("button", { ...r, children: e }), Tr = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("figure", { ...r, "aria-hidden": !0, children: e }), Or = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("figure", { ...r, "aria-hidden": !0, children: e }), ru = /* @__PURE__ */ Object.assign(mi, {
|
|
5907
5919
|
/**
|
|
5908
5920
|
* Component containing the items in a {@link Dropdown}.
|
|
5909
5921
|
*/
|
|
@@ -6057,11 +6069,11 @@ function bc(e, r) {
|
|
|
6057
6069
|
m += e[u];
|
|
6058
6070
|
if (m = m.trim(), m[m.length - 1] === "/" && (m = m.substring(0, m.length - 1), u--), !Oc(m)) {
|
|
6059
6071
|
let _;
|
|
6060
|
-
return m.trim().length === 0 ? _ = "Invalid space after '<'." : _ = "Tag '" + m + "' is an invalid name.", ke("InvalidTag", _,
|
|
6072
|
+
return m.trim().length === 0 ? _ = "Invalid space after '<'." : _ = "Tag '" + m + "' is an invalid name.", ke("InvalidTag", _, Re(e, u));
|
|
6061
6073
|
}
|
|
6062
6074
|
const b = Ec(e, u);
|
|
6063
6075
|
if (b === !1)
|
|
6064
|
-
return ke("InvalidAttr", "Attributes for '" + m + "' have open quote.",
|
|
6076
|
+
return ke("InvalidAttr", "Attributes for '" + m + "' have open quote.", Re(e, u));
|
|
6065
6077
|
let T = b.value;
|
|
6066
6078
|
if (u = b.index, T[T.length - 1] === "/") {
|
|
6067
6079
|
const _ = u - T.length;
|
|
@@ -6070,32 +6082,32 @@ function bc(e, r) {
|
|
|
6070
6082
|
if (I === !0)
|
|
6071
6083
|
a = !0;
|
|
6072
6084
|
else
|
|
6073
|
-
return ke(I.err.code, I.err.msg,
|
|
6085
|
+
return ke(I.err.code, I.err.msg, Re(e, _ + I.err.line));
|
|
6074
6086
|
} else if (g)
|
|
6075
6087
|
if (b.tagClosed) {
|
|
6076
6088
|
if (T.trim().length > 0)
|
|
6077
|
-
return ke("InvalidTag", "Closing tag '" + m + "' can't have attributes or invalid starting.",
|
|
6089
|
+
return ke("InvalidTag", "Closing tag '" + m + "' can't have attributes or invalid starting.", Re(e, d));
|
|
6078
6090
|
if (i.length === 0)
|
|
6079
|
-
return ke("InvalidTag", "Closing tag '" + m + "' has not been opened.",
|
|
6091
|
+
return ke("InvalidTag", "Closing tag '" + m + "' has not been opened.", Re(e, d));
|
|
6080
6092
|
{
|
|
6081
6093
|
const _ = i.pop();
|
|
6082
6094
|
if (m !== _.tagName) {
|
|
6083
|
-
let I =
|
|
6095
|
+
let I = Re(e, _.tagStartPos);
|
|
6084
6096
|
return ke(
|
|
6085
6097
|
"InvalidTag",
|
|
6086
6098
|
"Expected closing tag '" + _.tagName + "' (opened in line " + I.line + ", col " + I.col + ") instead of closing tag '" + m + "'.",
|
|
6087
|
-
|
|
6099
|
+
Re(e, d)
|
|
6088
6100
|
);
|
|
6089
6101
|
}
|
|
6090
6102
|
i.length == 0 && (c = !0);
|
|
6091
6103
|
}
|
|
6092
|
-
} else return ke("InvalidTag", "Closing tag '" + m + "' doesn't have proper closing.",
|
|
6104
|
+
} else return ke("InvalidTag", "Closing tag '" + m + "' doesn't have proper closing.", Re(e, u));
|
|
6093
6105
|
else {
|
|
6094
6106
|
const _ = Co(T, r);
|
|
6095
6107
|
if (_ !== !0)
|
|
6096
|
-
return ke(_.err.code, _.err.msg,
|
|
6108
|
+
return ke(_.err.code, _.err.msg, Re(e, u - T.length + _.err.line));
|
|
6097
6109
|
if (c === !0)
|
|
6098
|
-
return ke("InvalidXml", "Multiple possible root nodes found.",
|
|
6110
|
+
return ke("InvalidXml", "Multiple possible root nodes found.", Re(e, u));
|
|
6099
6111
|
r.unpairedTags.indexOf(m) !== -1 || i.push({ tagName: m, tagStartPos: d }), a = !0;
|
|
6100
6112
|
}
|
|
6101
6113
|
for (u++; u < e.length; u++)
|
|
@@ -6110,20 +6122,20 @@ function bc(e, r) {
|
|
|
6110
6122
|
else if (e[u] === "&") {
|
|
6111
6123
|
const _ = _c(e, u);
|
|
6112
6124
|
if (_ == -1)
|
|
6113
|
-
return ke("InvalidChar", "char '&' is not expected.",
|
|
6125
|
+
return ke("InvalidChar", "char '&' is not expected.", Re(e, u));
|
|
6114
6126
|
u = _;
|
|
6115
6127
|
} else if (c === !0 && !ko(e[u]))
|
|
6116
|
-
return ke("InvalidXml", "Extra text at the end",
|
|
6128
|
+
return ke("InvalidXml", "Extra text at the end", Re(e, u));
|
|
6117
6129
|
e[u] === "<" && u--;
|
|
6118
6130
|
}
|
|
6119
6131
|
} else {
|
|
6120
6132
|
if (ko(e[u]))
|
|
6121
6133
|
continue;
|
|
6122
|
-
return ke("InvalidChar", "char '" + e[u] + "' is not expected.",
|
|
6134
|
+
return ke("InvalidChar", "char '" + e[u] + "' is not expected.", Re(e, u));
|
|
6123
6135
|
}
|
|
6124
6136
|
if (a) {
|
|
6125
6137
|
if (i.length == 1)
|
|
6126
|
-
return ke("InvalidTag", "Unclosed tag '" + i[0].tagName + "'.",
|
|
6138
|
+
return ke("InvalidTag", "Unclosed tag '" + i[0].tagName + "'.", Re(e, i[0].tagStartPos));
|
|
6127
6139
|
if (i.length > 0)
|
|
6128
6140
|
return ke("InvalidXml", "Invalid '" + JSON.stringify(i.map((u) => u.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 });
|
|
6129
6141
|
} else return ke("InvalidXml", "Start tag expected.", 1);
|
|
@@ -6139,7 +6151,7 @@ function $o(e, r) {
|
|
|
6139
6151
|
if (e[r] == "?" || e[r] == " ") {
|
|
6140
6152
|
const a = e.substr(i, r - i);
|
|
6141
6153
|
if (r > 5 && a === "xml")
|
|
6142
|
-
return ke("InvalidXml", "XML declaration allowed only at the start of the document.",
|
|
6154
|
+
return ke("InvalidXml", "XML declaration allowed only at the start of the document.", Re(e, r));
|
|
6143
6155
|
if (e[r] == "?" && e[r + 1] == ">") {
|
|
6144
6156
|
r++;
|
|
6145
6157
|
break;
|
|
@@ -6249,7 +6261,7 @@ function Tc(e) {
|
|
|
6249
6261
|
function Oc(e) {
|
|
6250
6262
|
return Fn(e);
|
|
6251
6263
|
}
|
|
6252
|
-
function
|
|
6264
|
+
function Re(e, r) {
|
|
6253
6265
|
const i = e.substring(0, r).split(/\r?\n/);
|
|
6254
6266
|
return {
|
|
6255
6267
|
line: i.length,
|
|
@@ -7464,7 +7476,7 @@ const Ni = /* @__PURE__ */ Te(({
|
|
|
7464
7476
|
] })
|
|
7465
7477
|
}
|
|
7466
7478
|
);
|
|
7467
|
-
}), En = ({ ...e }) => /* @__PURE__ */ w.jsx("div", { ...e }), jt = ({ ...e }) => /* @__PURE__ */ w.jsx("div", { ...e }), Nn = ({ ...e }) => /* @__PURE__ */ w.jsx("div", { ...e }), Ct = ({ ...e }) => /* @__PURE__ */ w.jsx("div", { ...e }), tn = ({ ...e }) => /* @__PURE__ */ w.jsx("button", { ...e }),
|
|
7479
|
+
}), En = ({ ...e }) => /* @__PURE__ */ w.jsx("div", { ...e }), jt = ({ ...e }) => /* @__PURE__ */ w.jsx("div", { ...e }), Nn = ({ ...e }) => /* @__PURE__ */ w.jsx("div", { ...e }), Ct = ({ ...e }) => /* @__PURE__ */ w.jsx("div", { ...e }), tn = ({ ...e }) => /* @__PURE__ */ w.jsx("button", { ...e }), ou = /* @__PURE__ */ Object.assign(Ni, {
|
|
7468
7480
|
/**
|
|
7469
7481
|
* Component for the gutter of a {@link RangeSlider}.
|
|
7470
7482
|
*/
|
|
@@ -7666,7 +7678,7 @@ const Si = /* @__PURE__ */ Te(({
|
|
|
7666
7678
|
),
|
|
7667
7679
|
T.expandIcon && /* @__PURE__ */ w.jsx(ge, { element: T.expandIcon, style: fr.expandIcon })
|
|
7668
7680
|
] });
|
|
7669
|
-
}), Pr = ({ children: e, style: r, ...i }) => /* @__PURE__ */ w.jsx("figure", { ...i, "aria-hidden": !0, style: ce(r, { pointerEvents: "none" }), children: e }), Sn = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("select", { ...r, children: e }), At = ({ ...e }) => /* @__PURE__ */ w.jsx("option", { ...e }),
|
|
7681
|
+
}), Pr = ({ children: e, style: r, ...i }) => /* @__PURE__ */ w.jsx("figure", { ...i, "aria-hidden": !0, style: ce(r, { pointerEvents: "none" }), children: e }), Sn = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("select", { ...r, children: e }), At = ({ ...e }) => /* @__PURE__ */ w.jsx("option", { ...e }), iu = /* @__PURE__ */ Object.assign(Si, {
|
|
7670
7682
|
/**
|
|
7671
7683
|
* Component for the expand icon of a {@link Select}.
|
|
7672
7684
|
*/
|
|
@@ -7829,7 +7841,7 @@ const _i = /* @__PURE__ */ Te(({
|
|
|
7829
7841
|
] })
|
|
7830
7842
|
}
|
|
7831
7843
|
);
|
|
7832
|
-
}), Mt = ({ ...e }) => /* @__PURE__ */ w.jsx("div", { ...e }), _n = ({ ...e }) => /* @__PURE__ */ w.jsx("div", { ...e }), Tn = ({ ...e }) => /* @__PURE__ */ w.jsx("button", { ...e }), On = ({ ...e }) => /* @__PURE__ */ w.jsx("div", { ...e }),
|
|
7844
|
+
}), Mt = ({ ...e }) => /* @__PURE__ */ w.jsx("div", { ...e }), _n = ({ ...e }) => /* @__PURE__ */ w.jsx("div", { ...e }), Tn = ({ ...e }) => /* @__PURE__ */ w.jsx("button", { ...e }), On = ({ ...e }) => /* @__PURE__ */ w.jsx("div", { ...e }), su = /* @__PURE__ */ Object.assign(_i, {
|
|
7833
7845
|
/**
|
|
7834
7846
|
* Component for the slide track on either side of the knob of a
|
|
7835
7847
|
* {@link Slider}.
|
|
@@ -8101,7 +8113,7 @@ function Oi(e) {
|
|
|
8101
8113
|
const r = 1 / (e - 1);
|
|
8102
8114
|
return Array(e).fill(null).map((i, a) => r * a);
|
|
8103
8115
|
}
|
|
8104
|
-
const
|
|
8116
|
+
const au = /* @__PURE__ */ Object.assign(Ti, {
|
|
8105
8117
|
/**
|
|
8106
8118
|
* Component for the knob of a {@link StepSlider}.
|
|
8107
8119
|
*/
|
|
@@ -8320,7 +8332,7 @@ const Pi = /* @__PURE__ */ Te(({
|
|
|
8320
8332
|
/* @__PURE__ */ w.jsx("input", { checked: a, style: j.input, type: "checkbox", onChange: (A) => d?.(A.target.checked) }),
|
|
8321
8333
|
/* @__PURE__ */ w.jsx(ge, { className: I.track, element: _.track ?? /* @__PURE__ */ w.jsx($n, {}), style: j.track, children: /* @__PURE__ */ w.jsx("div", { style: { position: "relative", width: "100%", height: "100%" }, children: /* @__PURE__ */ w.jsx(ge, { ref: b, className: I.knob, element: _.knob ?? /* @__PURE__ */ w.jsx(jn, {}), style: j.knob }) }) })
|
|
8322
8334
|
] });
|
|
8323
|
-
}), $n = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("div", { ...r, children: e }), jn = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("div", { ...r, children: e }),
|
|
8335
|
+
}), $n = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("div", { ...r, children: e }), jn = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("div", { ...r, children: e }), cu = /* @__PURE__ */ Object.assign(Pi, {
|
|
8324
8336
|
/**
|
|
8325
8337
|
* Component for the knob of a {@link Toggle}.
|
|
8326
8338
|
*/
|
|
@@ -8337,7 +8349,7 @@ function kl({ isOn: e = !1 }) {
|
|
|
8337
8349
|
track: se({ active: e })
|
|
8338
8350
|
};
|
|
8339
8351
|
}
|
|
8340
|
-
function $l({ isOn: e = !1, isInverted: r = !1, knobSize: i =
|
|
8352
|
+
function $l({ isOn: e = !1, isInverted: r = !1, knobSize: i = Ce.zero, orientation: a = "horizontal" }) {
|
|
8341
8353
|
return {
|
|
8342
8354
|
root: {
|
|
8343
8355
|
alignItems: "center",
|
|
@@ -8408,7 +8420,7 @@ function jl({
|
|
|
8408
8420
|
return /* @__PURE__ */ w.jsx(w.Fragment, { children: Cn.map(e, (i) => An(i) ? gr(i, { ...r }) : i) });
|
|
8409
8421
|
}
|
|
8410
8422
|
process.env.NODE_ENV === "development" && (jl.displayName = "ExtractChildren");
|
|
8411
|
-
function
|
|
8423
|
+
function lu({
|
|
8412
8424
|
children: e,
|
|
8413
8425
|
fallback: r = void 0
|
|
8414
8426
|
}) {
|
|
@@ -8419,19 +8431,19 @@ function cu({
|
|
|
8419
8431
|
return /* @__PURE__ */ w.jsx(Ys, { fallback: r, children: e });
|
|
8420
8432
|
}
|
|
8421
8433
|
export {
|
|
8422
|
-
|
|
8434
|
+
eu as Accordion,
|
|
8423
8435
|
Xo as Burger,
|
|
8424
8436
|
Rl as BurgerButton,
|
|
8425
8437
|
ei as Button,
|
|
8426
8438
|
Za as Carousel,
|
|
8427
|
-
|
|
8439
|
+
tu as CodeInput,
|
|
8428
8440
|
zn as Collection,
|
|
8429
8441
|
wa as Conditional,
|
|
8430
|
-
|
|
8442
|
+
nu as Counter,
|
|
8431
8443
|
zl as CoverImage,
|
|
8432
8444
|
Fl as CoverVideo,
|
|
8433
8445
|
sc as Dial,
|
|
8434
|
-
|
|
8446
|
+
ru as Dropdown,
|
|
8435
8447
|
Mn as Each,
|
|
8436
8448
|
ii as ExtractChild,
|
|
8437
8449
|
jl as ExtractChildren,
|
|
@@ -8440,23 +8452,23 @@ export {
|
|
|
8440
8452
|
qo as Image,
|
|
8441
8453
|
on as ImageSource,
|
|
8442
8454
|
pl as MasonryGrid,
|
|
8443
|
-
|
|
8455
|
+
lu as NoSSR,
|
|
8444
8456
|
ca as OptionButton,
|
|
8445
8457
|
ti as Panorama,
|
|
8446
8458
|
Ll as PanoramaSlider,
|
|
8447
8459
|
Wo as Picture,
|
|
8448
|
-
|
|
8460
|
+
ou as RangeSlider,
|
|
8449
8461
|
nn as Repeat,
|
|
8450
|
-
|
|
8462
|
+
iu as Select,
|
|
8451
8463
|
xa as SelectableButton,
|
|
8452
|
-
|
|
8453
|
-
|
|
8464
|
+
su as Slider,
|
|
8465
|
+
au as StepSlider,
|
|
8454
8466
|
ge as Styled,
|
|
8455
8467
|
Pl as SwipeRegion,
|
|
8456
8468
|
Vl as Switch,
|
|
8457
8469
|
Il as TextArea,
|
|
8458
8470
|
hi as TextField,
|
|
8459
|
-
|
|
8471
|
+
cu as Toggle,
|
|
8460
8472
|
Zo as Video,
|
|
8461
8473
|
Na as WithTooltip,
|
|
8462
8474
|
vr as _Content,
|
|
@@ -8501,7 +8513,8 @@ export {
|
|
|
8501
8513
|
ci as useSize,
|
|
8502
8514
|
mr as useSizeObserver,
|
|
8503
8515
|
Jl as useStyle,
|
|
8504
|
-
Zl as
|
|
8516
|
+
Zl as useSystemColorScheme,
|
|
8517
|
+
Ql as useTimeout,
|
|
8505
8518
|
na as useVideoMetadataLoader,
|
|
8506
8519
|
ra as useVideoSize,
|
|
8507
8520
|
Zs as useViewportSize
|