@drjoshcsimmons/scl 0.1.4 → 0.1.5
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/index100.js +8 -14
- package/dist/index101.js +50 -9
- package/dist/index102.js +218 -49
- package/dist/index103.js +29 -218
- package/dist/index104.js +178 -27
- package/dist/index11.js +2 -2
- package/dist/index110.js +1 -1
- package/dist/index112.js +1 -1
- package/dist/index13.js +2 -2
- package/dist/index131.js +1 -1
- package/dist/index132.js +1 -1
- package/dist/index137.js +11 -21
- package/dist/index138.js +26 -11
- package/dist/index139.js +4 -27
- package/dist/index14.js +2 -2
- package/dist/index140.js +22 -4
- package/dist/index15.js +2 -2
- package/dist/index17.js +1 -1
- package/dist/index18.js +2 -2
- package/dist/index20.js +2 -2
- package/dist/index21.js +1 -1
- package/dist/index22.js +1 -1
- package/dist/index23.js +1 -1
- package/dist/index24.js +1 -1
- package/dist/index25.js +3 -3
- package/dist/index26.js +1 -1
- package/dist/index27.js +3 -3
- package/dist/index29.js +1 -1
- package/dist/index31.js +1 -1
- package/dist/index33.js +1 -1
- package/dist/index36.js +2 -2
- package/dist/index37.js +1 -1
- package/dist/index45.js +7 -7
- package/dist/index47.js +33 -435
- package/dist/index48.js +111 -147
- package/dist/index49.js +65 -302
- package/dist/index5.js +1 -1
- package/dist/index50.js +60 -12
- package/dist/index51.js +253 -32
- package/dist/index52.js +7 -7
- package/dist/index53.js +302 -65
- package/dist/index54.js +4 -4
- package/dist/index55.js +4 -1
- package/dist/index56.js +9 -249
- package/dist/index57.js +432 -57
- package/dist/index58.js +6 -6
- package/dist/index6.js +1 -1
- package/dist/index61.js +234 -99
- package/dist/index62.js +12 -260
- package/dist/index63.js +860 -12
- package/dist/index64.js +9 -82
- package/dist/index65.js +505 -211
- package/dist/index66.js +138 -507
- package/dist/index67.js +17 -21
- package/dist/index68.js +16 -854
- package/dist/index69.js +336 -9
- package/dist/index7.js +1 -1
- package/dist/index70.js +126 -250
- package/dist/index71.js +82 -31
- package/dist/index72.js +216 -311
- package/dist/index73.js +222 -214
- package/dist/index74.js +30 -17
- package/dist/index75.js +197 -91
- package/dist/index77.js +25 -44
- package/dist/index78.js +5 -25
- package/dist/index79.js +53 -6
- package/dist/index8.js +1 -1
- package/dist/index80.js +52 -49
- package/dist/index81.js +10 -33
- package/dist/index82.js +4 -11
- package/dist/index83.js +30 -8
- package/dist/index84.js +12 -3
- package/dist/index85.js +51 -5
- package/dist/index86.js +33 -24
- package/dist/index87.js +65 -177
- package/dist/index88.js +10 -68
- package/dist/index9.js +2 -2
- package/dist/index90.js +46 -30
- package/dist/index91.js +7 -54
- package/dist/index92.js +3 -10
- package/dist/index93.js +6 -4
- package/dist/index94.js +24 -12
- package/dist/index95.js +647 -51
- package/dist/index96.js +112 -637
- package/dist/index97.js +126 -116
- package/dist/index98.js +13 -134
- package/dist/index99.js +14 -13
- package/package.json +1 -1
package/dist/index91.js
CHANGED
|
@@ -1,57 +1,10 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
t.displayName = r + "Context";
|
|
8
|
-
const c = o.length;
|
|
9
|
-
o = [...o, n];
|
|
10
|
-
const m = (a) => {
|
|
11
|
-
var l;
|
|
12
|
-
const { scope: s, children: C, ...p } = a, d = ((l = s == null ? void 0 : s[e]) == null ? void 0 : l[c]) || t, v = i.useMemo(() => p, Object.values(p));
|
|
13
|
-
return /* @__PURE__ */ _(d.Provider, { value: v, children: C });
|
|
14
|
-
};
|
|
15
|
-
m.displayName = r + "Provider";
|
|
16
|
-
function S(a, s) {
|
|
17
|
-
var d;
|
|
18
|
-
const C = ((d = s == null ? void 0 : s[e]) == null ? void 0 : d[c]) || t, p = i.useContext(C);
|
|
19
|
-
if (p) return p;
|
|
20
|
-
if (n !== void 0) return n;
|
|
21
|
-
throw new Error(`\`${a}\` must be used within \`${r}\``);
|
|
22
|
-
}
|
|
23
|
-
return [m, S];
|
|
24
|
-
}
|
|
25
|
-
const u = () => {
|
|
26
|
-
const r = o.map((n) => i.createContext(n));
|
|
27
|
-
return function(t) {
|
|
28
|
-
const c = (t == null ? void 0 : t[e]) || r;
|
|
29
|
-
return i.useMemo(
|
|
30
|
-
() => ({ [`__scope${e}`]: { ...t, [e]: c } }),
|
|
31
|
-
[t, c]
|
|
32
|
-
);
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
return u.scopeName = e, [f, h(u, ...x)];
|
|
36
|
-
}
|
|
37
|
-
function h(...e) {
|
|
38
|
-
const x = e[0];
|
|
39
|
-
if (e.length === 1) return x;
|
|
40
|
-
const o = () => {
|
|
41
|
-
const f = e.map((u) => ({
|
|
42
|
-
useScope: u(),
|
|
43
|
-
scopeName: u.scopeName
|
|
44
|
-
}));
|
|
45
|
-
return function(r) {
|
|
46
|
-
const n = f.reduce((t, { useScope: c, scopeName: m }) => {
|
|
47
|
-
const a = c(r)[`__scope${m}`];
|
|
48
|
-
return { ...t, ...a };
|
|
49
|
-
}, {});
|
|
50
|
-
return i.useMemo(() => ({ [`__scope${x.scopeName}`]: n }), [n]);
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
return o.scopeName = x.scopeName, o;
|
|
1
|
+
import * as t from "react";
|
|
2
|
+
import "react/jsx-runtime";
|
|
3
|
+
var r = t.createContext(void 0);
|
|
4
|
+
function n(o) {
|
|
5
|
+
const e = t.useContext(r);
|
|
6
|
+
return o || e || "ltr";
|
|
54
7
|
}
|
|
55
8
|
export {
|
|
56
|
-
|
|
9
|
+
n as useDirection
|
|
57
10
|
};
|
package/dist/index92.js
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const e = r.useRef(t);
|
|
4
|
-
return r.useEffect(() => {
|
|
5
|
-
e.current = t;
|
|
6
|
-
}), r.useMemo(() => (...n) => {
|
|
7
|
-
var u;
|
|
8
|
-
return (u = e.current) == null ? void 0 : u.call(e, ...n);
|
|
9
|
-
}, []);
|
|
1
|
+
function m(t, [a, n]) {
|
|
2
|
+
return Math.min(n, Math.max(a, t));
|
|
10
3
|
}
|
|
11
4
|
export {
|
|
12
|
-
|
|
5
|
+
m as clamp
|
|
13
6
|
};
|
package/dist/index93.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
};
|
|
1
|
+
import * as u from "react";
|
|
2
|
+
function t(r) {
|
|
3
|
+
const e = u.useRef({ value: r, previous: r });
|
|
4
|
+
return u.useMemo(() => (e.current.value !== r && (e.current.previous = e.current.value, e.current.value = r), e.current.previous), [r]);
|
|
5
|
+
}
|
|
4
6
|
export {
|
|
5
|
-
|
|
7
|
+
t as usePrevious
|
|
6
8
|
};
|
package/dist/index94.js
CHANGED
|
@@ -1,15 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
()
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import * as h from "react";
|
|
2
|
+
import { useLayoutEffect as z } from "./index82.js";
|
|
3
|
+
function c(r) {
|
|
4
|
+
const [d, e] = h.useState(void 0);
|
|
5
|
+
return z(() => {
|
|
6
|
+
if (r) {
|
|
7
|
+
e({ width: r.offsetWidth, height: r.offsetHeight });
|
|
8
|
+
const f = new ResizeObserver((i) => {
|
|
9
|
+
if (!Array.isArray(i) || !i.length)
|
|
10
|
+
return;
|
|
11
|
+
const b = i[0];
|
|
12
|
+
let o, t;
|
|
13
|
+
if ("borderBoxSize" in b) {
|
|
14
|
+
const s = b.borderBoxSize, u = Array.isArray(s) ? s[0] : s;
|
|
15
|
+
o = u.inlineSize, t = u.blockSize;
|
|
16
|
+
} else
|
|
17
|
+
o = r.offsetWidth, t = r.offsetHeight;
|
|
18
|
+
e({ width: o, height: t });
|
|
19
|
+
});
|
|
20
|
+
return f.observe(r, { box: "border-box" }), () => f.unobserve(r);
|
|
21
|
+
} else
|
|
22
|
+
e(void 0);
|
|
23
|
+
}, [r]), d;
|
|
12
24
|
}
|
|
13
25
|
export {
|
|
14
|
-
|
|
26
|
+
c as useSize
|
|
15
27
|
};
|