@anoki/fse-ui 1.0.533 → 1.0.535
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/components/navigations/Footer/Footer.css +1 -1
- package/dist/components/ui/filters/CheckboxFilter/CheckboxFilter.css +1 -1
- package/dist/index.cjs210.js +1 -1
- package/dist/index.cjs214.js +1 -1
- package/dist/index.cjs221.js +1 -1
- package/dist/index.cjs232.js +1 -1
- package/dist/index.cjs259.js +1 -1
- package/dist/index.cjs298.js +1 -1
- package/dist/index.cjs329.js +2 -0
- package/dist/index.cjs329.js.map +1 -0
- package/dist/index.cjs330.js +1 -1
- package/dist/index.cjs330.js.map +1 -1
- package/dist/index.cjs331.js +1 -1
- package/dist/index.cjs331.js.map +1 -1
- package/dist/index.cjs332.js +1 -1
- package/dist/index.cjs332.js.map +1 -1
- package/dist/index.cjs333.js +1 -1
- package/dist/index.cjs333.js.map +1 -1
- package/dist/index.cjs334.js +1 -1
- package/dist/index.cjs334.js.map +1 -1
- package/dist/index.cjs335.js +1 -1
- package/dist/index.cjs335.js.map +1 -1
- package/dist/index.cjs336.js +1 -1
- package/dist/index.cjs336.js.map +1 -1
- package/dist/index.cjs337.js +1 -1
- package/dist/index.cjs337.js.map +1 -1
- package/dist/index.cjs338.js +1 -1
- package/dist/index.cjs338.js.map +1 -1
- package/dist/index.cjs339.js +1 -1
- package/dist/index.cjs339.js.map +1 -1
- package/dist/index.cjs341.js +1 -1
- package/dist/index.cjs341.js.map +1 -1
- package/dist/index.cjs344.js +1 -1
- package/dist/index.cjs344.js.map +1 -1
- package/dist/index.cjs345.js +1 -1
- package/dist/index.cjs345.js.map +1 -1
- package/dist/index.cjs346.js +1 -1
- package/dist/index.cjs346.js.map +1 -1
- package/dist/index.cjs347.js +1 -1
- package/dist/index.cjs347.js.map +1 -1
- package/dist/index.cjs348.js +1 -1
- package/dist/index.cjs348.js.map +1 -1
- package/dist/index.cjs349.js +1 -1
- package/dist/index.cjs349.js.map +1 -1
- package/dist/index.cjs350.js +1 -1
- package/dist/index.cjs350.js.map +1 -1
- package/dist/index.cjs351.js +1 -1
- package/dist/index.cjs351.js.map +1 -1
- package/dist/index.cjs352.js +1 -1
- package/dist/index.cjs352.js.map +1 -1
- package/dist/index.cjs353.js +1 -1
- package/dist/index.cjs353.js.map +1 -1
- package/dist/index.cjs354.js +1 -1
- package/dist/index.cjs354.js.map +1 -1
- package/dist/index.cjs355.js +1 -1
- package/dist/index.cjs355.js.map +1 -1
- package/dist/index.cjs356.js +1 -1
- package/dist/index.cjs356.js.map +1 -1
- package/dist/index.cjs357.js +2 -0
- package/dist/index.cjs357.js.map +1 -0
- package/dist/index.cjs358.js +1 -1
- package/dist/index.cjs358.js.map +1 -1
- package/dist/index.cjs359.js +1 -1
- package/dist/index.cjs359.js.map +1 -1
- package/dist/index.cjs360.js +1 -1
- package/dist/index.cjs360.js.map +1 -1
- package/dist/index.cjs361.js +1 -1
- package/dist/index.cjs361.js.map +1 -1
- package/dist/index.cjs362.js +1 -1
- package/dist/index.cjs362.js.map +1 -1
- package/dist/index.cjs363.js +1 -1
- package/dist/index.cjs363.js.map +1 -1
- package/dist/index.cjs364.js +1 -4
- package/dist/index.cjs364.js.map +1 -1
- package/dist/index.cjs365.js +1 -1
- package/dist/index.cjs365.js.map +1 -1
- package/dist/index.cjs366.js +1 -1
- package/dist/index.cjs366.js.map +1 -1
- package/dist/index.cjs367.js +1 -1
- package/dist/index.cjs367.js.map +1 -1
- package/dist/index.cjs368.js +1 -1
- package/dist/index.cjs368.js.map +1 -1
- package/dist/index.cjs369.js +5 -0
- package/dist/index.cjs369.js.map +1 -0
- package/dist/index.cjs370.js +2 -0
- package/dist/index.cjs370.js.map +1 -0
- package/dist/index.cjs379.js +38 -1
- package/dist/index.cjs379.js.map +1 -1
- package/dist/{index.cjs376.js → index.cjs380.js} +2 -2
- package/dist/{index.cjs376.js.map → index.cjs380.js.map} +1 -1
- package/dist/{index.cjs377.js → index.cjs381.js} +1 -1
- package/dist/{index.cjs377.js.map → index.cjs381.js.map} +1 -1
- package/dist/{index.cjs378.js → index.cjs382.js} +1 -1
- package/dist/{index.cjs378.js.map → index.cjs382.js.map} +1 -1
- package/dist/index.cjs383.js +1 -1
- package/dist/index.cjs383.js.map +1 -1
- package/dist/index.cjs393.js +1 -1
- package/dist/index.cjs393.js.map +1 -1
- package/dist/index.cjs394.js +1 -1
- package/dist/index.cjs394.js.map +1 -1
- package/dist/index.cjs395.js +1 -1
- package/dist/index.cjs395.js.map +1 -1
- package/dist/index.cjs396.js +1 -1
- package/dist/index.cjs396.js.map +1 -1
- package/dist/index.cjs406.js +1 -1
- package/dist/index.cjs61.js +1 -1
- package/dist/index.cjs61.js.map +1 -1
- package/dist/index.es210.js +7 -7
- package/dist/index.es214.js +1 -1
- package/dist/index.es221.js +8 -8
- package/dist/index.es232.js +14 -14
- package/dist/index.es259.js +7 -7
- package/dist/index.es298.js +4 -4
- package/dist/index.es329.js +30 -0
- package/dist/index.es329.js.map +1 -0
- package/dist/index.es330.js +64 -23
- package/dist/index.es330.js.map +1 -1
- package/dist/index.es331.js +5 -66
- package/dist/index.es331.js.map +1 -1
- package/dist/index.es332.js +29 -6
- package/dist/index.es332.js.map +1 -1
- package/dist/index.es333.js +5 -29
- package/dist/index.es333.js.map +1 -1
- package/dist/index.es334.js +24 -5
- package/dist/index.es334.js.map +1 -1
- package/dist/index.es335.js +67 -23
- package/dist/index.es335.js.map +1 -1
- package/dist/index.es336.js +31 -67
- package/dist/index.es336.js.map +1 -1
- package/dist/index.es337.js +10 -32
- package/dist/index.es337.js.map +1 -1
- package/dist/index.es338.js +3 -621
- package/dist/index.es338.js.map +1 -1
- package/dist/index.es339.js +52 -10
- package/dist/index.es339.js.map +1 -1
- package/dist/index.es341.js +14 -3
- package/dist/index.es341.js.map +1 -1
- package/dist/index.es344.js +621 -7
- package/dist/index.es344.js.map +1 -1
- package/dist/index.es345.js +10 -124
- package/dist/index.es345.js.map +1 -1
- package/dist/index.es346.js +45 -14
- package/dist/index.es346.js.map +1 -1
- package/dist/index.es347.js +7 -134
- package/dist/index.es347.js.map +1 -1
- package/dist/index.es348.js +113 -206
- package/dist/index.es348.js.map +1 -1
- package/dist/index.es349.js +14 -13
- package/dist/index.es349.js.map +1 -1
- package/dist/index.es350.js +127 -170
- package/dist/index.es350.js.map +1 -1
- package/dist/index.es351.js +217 -49
- package/dist/index.es351.js.map +1 -1
- package/dist/index.es352.js +12 -7
- package/dist/index.es352.js.map +1 -1
- package/dist/index.es353.js +177 -11
- package/dist/index.es353.js.map +1 -1
- package/dist/index.es354.js +48 -203
- package/dist/index.es354.js.map +1 -1
- package/dist/index.es355.js +8 -21
- package/dist/index.es355.js.map +1 -1
- package/dist/index.es356.js +10 -391
- package/dist/index.es356.js.map +1 -1
- package/dist/index.es357.js +208 -0
- package/dist/index.es357.js.map +1 -0
- package/dist/index.es358.js +21 -24
- package/dist/index.es358.js.map +1 -1
- package/dist/index.es359.js +391 -27
- package/dist/index.es359.js.map +1 -1
- package/dist/index.es360.js +25 -5
- package/dist/index.es360.js.map +1 -1
- package/dist/index.es361.js +29 -5
- package/dist/index.es361.js.map +1 -1
- package/dist/index.es362.js +5 -3
- package/dist/index.es362.js.map +1 -1
- package/dist/index.es363.js +520 -21
- package/dist/index.es363.js.map +1 -1
- package/dist/index.es364.js +126 -109
- package/dist/index.es364.js.map +1 -1
- package/dist/index.es365.js +128 -15
- package/dist/index.es365.js.map +1 -1
- package/dist/index.es366.js +5 -523
- package/dist/index.es366.js.map +1 -1
- package/dist/index.es367.js +3 -127
- package/dist/index.es367.js.map +1 -1
- package/dist/index.es368.js +22 -127
- package/dist/index.es368.js.map +1 -1
- package/dist/index.es369.js +113 -0
- package/dist/index.es369.js.map +1 -0
- package/dist/index.es370.js +19 -0
- package/dist/index.es370.js.map +1 -0
- package/dist/index.es379.js +69 -65
- package/dist/index.es379.js.map +1 -1
- package/dist/{index.es376.js → index.es380.js} +2 -2
- package/dist/{index.es376.js.map → index.es380.js.map} +1 -1
- package/dist/{index.es377.js → index.es381.js} +1 -1
- package/dist/{index.es377.js.map → index.es381.js.map} +1 -1
- package/dist/{index.es378.js → index.es382.js} +1 -1
- package/dist/{index.es378.js.map → index.es382.js.map} +1 -1
- package/dist/index.es383.js +65 -15
- package/dist/index.es383.js.map +1 -1
- package/dist/index.es393.js +21 -11
- package/dist/index.es393.js.map +1 -1
- package/dist/index.es394.js +11 -26
- package/dist/index.es394.js.map +1 -1
- package/dist/index.es395.js +27 -4
- package/dist/index.es395.js.map +1 -1
- package/dist/index.es396.js +4 -22
- package/dist/index.es396.js.map +1 -1
- package/dist/index.es406.js +8 -8
- package/dist/index.es61.js +1 -1
- package/dist/index.es61.js.map +1 -1
- package/package.json +1 -1
- package/dist/index.cjs340.js +0 -2
- package/dist/index.cjs340.js.map +0 -1
- package/dist/index.cjs342.js +0 -2
- package/dist/index.cjs342.js.map +0 -1
- package/dist/index.cjs343.js +0 -2
- package/dist/index.cjs343.js.map +0 -1
- package/dist/index.cjs375.js +0 -39
- package/dist/index.cjs375.js.map +0 -1
- package/dist/index.es340.js +0 -14
- package/dist/index.es340.js.map +0 -1
- package/dist/index.es342.js +0 -56
- package/dist/index.es342.js.map +0 -1
- package/dist/index.es343.js +0 -49
- package/dist/index.es343.js.map +0 -1
- package/dist/index.es375.js +0 -72
- package/dist/index.es375.js.map +0 -1
package/dist/index.es210.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
import * as p from "react";
|
2
|
-
import { composeEventHandlers as m } from "./index.
|
3
|
-
import { composeRefs as E } from "./index.
|
4
|
-
import { createContextScope as S } from "./index.
|
5
|
-
import { useControllableState as P } from "./index.
|
6
|
-
import { Primitive as y } from "./index.
|
7
|
-
import { createMenuScope as D, Root as O, Anchor as T, Portal as j, Content as G, Group as k, Item as L, Label as K, CheckboxItem as U, RadioGroup as B, RadioItem as F, ItemIndicator as H, Separator as W, Arrow as $, SubTrigger as X, SubContent as q } from "./index.
|
8
|
-
import { useId as g } from "./index.
|
2
|
+
import { composeEventHandlers as m } from "./index.es331.js";
|
3
|
+
import { composeRefs as E } from "./index.es329.js";
|
4
|
+
import { createContextScope as S } from "./index.es330.js";
|
5
|
+
import { useControllableState as P } from "./index.es332.js";
|
6
|
+
import { Primitive as y } from "./index.es336.js";
|
7
|
+
import { createMenuScope as D, Root as O, Anchor as T, Portal as j, Content as G, Group as k, Item as L, Label as K, CheckboxItem as U, RadioGroup as B, RadioItem as F, ItemIndicator as H, Separator as W, Arrow as $, SubTrigger as X, SubContent as q } from "./index.es344.js";
|
8
|
+
import { useId as g } from "./index.es345.js";
|
9
9
|
import { j as a } from "./index.es182.js";
|
10
10
|
var M = "DropdownMenu", [z, bo] = S(
|
11
11
|
M,
|
package/dist/index.es214.js
CHANGED
@@ -3,7 +3,7 @@ import { Button as m } from "./index.es25.js";
|
|
3
3
|
import { HeaderTopBanner as y } from "./index.es21.js";
|
4
4
|
import { useState as g, useRef as w, useCallback as C, useEffect as u } from "react";
|
5
5
|
import { clsx as r } from "./index.es184.js";
|
6
|
-
import { useFocusTrap as N } from "./index.
|
6
|
+
import { useFocusTrap as N } from "./index.es341.js";
|
7
7
|
import { Container as k } from "./index.es6.js";
|
8
8
|
import './components/navigations/HeaderMobile/HeaderMobile.css';/* empty css */
|
9
9
|
import { Col as L } from "./index.es10.js";
|
package/dist/index.es221.js
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
import * as n from "react";
|
2
|
-
import { useComposedRefs as N } from "./index.
|
3
|
-
import { createContextScope as M } from "./index.
|
4
|
-
import { composeEventHandlers as S } from "./index.
|
5
|
-
import { useControllableState as O } from "./index.
|
6
|
-
import { usePrevious as A } from "./index.
|
7
|
-
import { useSize as B } from "./index.
|
8
|
-
import { Presence as H } from "./index.
|
9
|
-
import { Primitive as j } from "./index.
|
2
|
+
import { useComposedRefs as N } from "./index.es329.js";
|
3
|
+
import { createContextScope as M } from "./index.es330.js";
|
4
|
+
import { composeEventHandlers as S } from "./index.es331.js";
|
5
|
+
import { useControllableState as O } from "./index.es332.js";
|
6
|
+
import { usePrevious as A } from "./index.es333.js";
|
7
|
+
import { useSize as B } from "./index.es334.js";
|
8
|
+
import { Presence as H } from "./index.es335.js";
|
9
|
+
import { Primitive as j } from "./index.es336.js";
|
10
10
|
import { j as f } from "./index.es182.js";
|
11
11
|
var R = "Checkbox", [K, Y] = M(R), [L, q] = K(R), I = n.forwardRef(
|
12
12
|
(e, l) => {
|
package/dist/index.es232.js
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
import * as s from "react";
|
2
|
-
import { composeEventHandlers as p } from "./index.
|
3
|
-
import { useComposedRefs as C } from "./index.
|
4
|
-
import { createContextScope as B, createContext as H } from "./index.
|
5
|
-
import { useId as x } from "./index.
|
6
|
-
import { useControllableState as V } from "./index.
|
7
|
-
import { DismissableLayer as q } from "./index.
|
8
|
-
import { FocusScope as K } from "./index.
|
9
|
-
import { Portal as U } from "./index.
|
10
|
-
import { Presence as R } from "./index.
|
11
|
-
import { Primitive as m } from "./index.
|
12
|
-
import { useFocusGuards as Y } from "./index.
|
13
|
-
import Z from "./index.
|
14
|
-
import { hideOthers as z } from "./index.
|
15
|
-
import { createSlot as J } from "./index.
|
2
|
+
import { composeEventHandlers as p } from "./index.es331.js";
|
3
|
+
import { useComposedRefs as C } from "./index.es329.js";
|
4
|
+
import { createContextScope as B, createContext as H } from "./index.es330.js";
|
5
|
+
import { useId as x } from "./index.es345.js";
|
6
|
+
import { useControllableState as V } from "./index.es332.js";
|
7
|
+
import { DismissableLayer as q } from "./index.es348.js";
|
8
|
+
import { FocusScope as K } from "./index.es350.js";
|
9
|
+
import { Portal as U } from "./index.es352.js";
|
10
|
+
import { Presence as R } from "./index.es335.js";
|
11
|
+
import { Primitive as m } from "./index.es336.js";
|
12
|
+
import { useFocusGuards as Y } from "./index.es349.js";
|
13
|
+
import Z from "./index.es355.js";
|
14
|
+
import { hideOthers as z } from "./index.es354.js";
|
15
|
+
import { createSlot as J } from "./index.es339.js";
|
16
16
|
import { j as i } from "./index.es182.js";
|
17
17
|
var _ = "Dialog", [N, he] = B(_), [Q, u] = N(_), P = (e) => {
|
18
18
|
const {
|
package/dist/index.es259.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
import * as s from "react";
|
2
|
-
import { composeEventHandlers as T } from "./index.
|
3
|
-
import { useComposedRefs as _ } from "./index.
|
4
|
-
import { createContextScope as H } from "./index.
|
5
|
-
import { useControllableState as I } from "./index.
|
6
|
-
import { usePrevious as M } from "./index.
|
7
|
-
import { useSize as N } from "./index.
|
8
|
-
import { Primitive as w } from "./index.
|
2
|
+
import { composeEventHandlers as T } from "./index.es331.js";
|
3
|
+
import { useComposedRefs as _ } from "./index.es329.js";
|
4
|
+
import { createContextScope as H } from "./index.es330.js";
|
5
|
+
import { useControllableState as I } from "./index.es332.js";
|
6
|
+
import { usePrevious as M } from "./index.es333.js";
|
7
|
+
import { useSize as N } from "./index.es334.js";
|
8
|
+
import { Primitive as w } from "./index.es336.js";
|
9
9
|
import { j as p } from "./index.es182.js";
|
10
10
|
var S = "Switch", [B, J] = H(S), [q, z] = B(S), C = s.forwardRef(
|
11
11
|
(e, n) => {
|
package/dist/index.es298.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
import * as l from "react";
|
2
|
-
import { createContextScope as T } from "./index.
|
3
|
-
import { useComposedRefs as A } from "./index.
|
2
|
+
import { createContextScope as T } from "./index.es330.js";
|
3
|
+
import { useComposedRefs as A } from "./index.es329.js";
|
4
4
|
import { createDialogScope as v, Root as O, Portal as j, Overlay as b, WarningProvider as w, Content as M, Title as I, Description as L, Close as f, Trigger as $ } from "./index.es232.js";
|
5
|
-
import { composeEventHandlers as F } from "./index.
|
6
|
-
import { createSlottable as G } from "./index.
|
5
|
+
import { composeEventHandlers as F } from "./index.es331.js";
|
6
|
+
import { createSlottable as G } from "./index.es339.js";
|
7
7
|
import { j as i } from "./index.es182.js";
|
8
8
|
var D = "AlertDialog", [W, te] = T(D, [
|
9
9
|
v
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import * as f from "react";
|
2
|
+
function l(n, o) {
|
3
|
+
if (typeof n == "function")
|
4
|
+
return n(o);
|
5
|
+
n != null && (n.current = o);
|
6
|
+
}
|
7
|
+
function i(...n) {
|
8
|
+
return (o) => {
|
9
|
+
let u = !1;
|
10
|
+
const c = n.map((t) => {
|
11
|
+
const e = l(t, o);
|
12
|
+
return !u && typeof e == "function" && (u = !0), e;
|
13
|
+
});
|
14
|
+
if (u)
|
15
|
+
return () => {
|
16
|
+
for (let t = 0; t < c.length; t++) {
|
17
|
+
const e = c[t];
|
18
|
+
typeof e == "function" ? e() : l(n[t], null);
|
19
|
+
}
|
20
|
+
};
|
21
|
+
};
|
22
|
+
}
|
23
|
+
function s(...n) {
|
24
|
+
return f.useCallback(i(...n), n);
|
25
|
+
}
|
26
|
+
export {
|
27
|
+
i as composeRefs,
|
28
|
+
s as useComposedRefs
|
29
|
+
};
|
30
|
+
//# sourceMappingURL=index.es329.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.es329.js","sources":["../node_modules/@radix-ui/react-compose-refs/dist/index.mjs"],"sourcesContent":["// packages/react/compose-refs/src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["setRef","ref","value","composeRefs","refs","node","hasCleanup","cleanups","cleanup","i","useComposedRefs","React"],"mappings":";AAEA,SAASA,EAAOC,GAAKC,GAAO;AAC1B,MAAI,OAAOD,KAAQ;AACjB,WAAOA,EAAIC,CAAK;AACX,EAAID,KAAQ,SACjBA,EAAI,UAAUC;AAElB;AACA,SAASC,KAAeC,GAAM;AAC5B,SAAO,CAACC,MAAS;AACf,QAAIC,IAAa;AACjB,UAAMC,IAAWH,EAAK,IAAI,CAACH,MAAQ;AACjC,YAAMO,IAAUR,EAAOC,GAAKI,CAAI;AAChC,aAAI,CAACC,KAAc,OAAOE,KAAW,eACnCF,IAAa,KAERE;AAAA,IACb,CAAK;AACD,QAAIF;AACF,aAAO,MAAM;AACX,iBAASG,IAAI,GAAGA,IAAIF,EAAS,QAAQE,KAAK;AACxC,gBAAMD,IAAUD,EAASE,CAAC;AAC1B,UAAI,OAAOD,KAAW,aACpBA,EAAS,IAETR,EAAOI,EAAKK,CAAC,GAAG,IAAI;AAAA,QAEhC;AAAA,MACO;AAAA,EAEJ;AACH;AACA,SAASC,KAAmBN,GAAM;AAChC,SAAOO,EAAM,YAAYR,EAAY,GAAGC,CAAI,GAAGA,CAAI;AACrD;","x_google_ignoreList":[0]}
|
package/dist/index.es330.js
CHANGED
@@ -1,30 +1,71 @@
|
|
1
|
-
import * as
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
import * as u from "react";
|
2
|
+
import { j as h } from "./index.es182.js";
|
3
|
+
function j(e, c) {
|
4
|
+
const o = u.createContext(c), a = (r) => {
|
5
|
+
const { children: t, ...n } = r, s = u.useMemo(() => n, Object.values(n));
|
6
|
+
return /* @__PURE__ */ h.jsx(o.Provider, { value: s, children: t });
|
7
|
+
};
|
8
|
+
a.displayName = e + "Provider";
|
9
|
+
function i(r) {
|
10
|
+
const t = u.useContext(o);
|
11
|
+
if (t) return t;
|
12
|
+
if (c !== void 0) return c;
|
13
|
+
throw new Error(`\`${r}\` must be used within \`${e}\``);
|
14
|
+
}
|
15
|
+
return [a, i];
|
6
16
|
}
|
7
|
-
function
|
8
|
-
|
9
|
-
|
10
|
-
const
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
return (
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
function w(e, c = []) {
|
18
|
+
let o = [];
|
19
|
+
function a(r, t) {
|
20
|
+
const n = u.createContext(t), s = o.length;
|
21
|
+
o = [...o, t];
|
22
|
+
const d = (m) => {
|
23
|
+
var S;
|
24
|
+
const { scope: x, children: C, ...p } = m, v = ((S = x == null ? void 0 : x[e]) == null ? void 0 : S[s]) || n, P = u.useMemo(() => p, Object.values(p));
|
25
|
+
return /* @__PURE__ */ h.jsx(v.Provider, { value: P, children: C });
|
26
|
+
};
|
27
|
+
d.displayName = r + "Provider";
|
28
|
+
function f(m, x) {
|
29
|
+
var v;
|
30
|
+
const C = ((v = x == null ? void 0 : x[e]) == null ? void 0 : v[s]) || n, p = u.useContext(C);
|
31
|
+
if (p) return p;
|
32
|
+
if (t !== void 0) return t;
|
33
|
+
throw new Error(`\`${m}\` must be used within \`${r}\``);
|
34
|
+
}
|
35
|
+
return [d, f];
|
36
|
+
}
|
37
|
+
const i = () => {
|
38
|
+
const r = o.map((t) => u.createContext(t));
|
39
|
+
return function(n) {
|
40
|
+
const s = (n == null ? void 0 : n[e]) || r;
|
41
|
+
return u.useMemo(
|
42
|
+
() => ({ [`__scope${e}`]: { ...n, [e]: s } }),
|
43
|
+
[n, s]
|
44
|
+
);
|
45
|
+
};
|
21
46
|
};
|
47
|
+
return i.scopeName = e, [a, l(i, ...c)];
|
22
48
|
}
|
23
|
-
function
|
24
|
-
|
49
|
+
function l(...e) {
|
50
|
+
const c = e[0];
|
51
|
+
if (e.length === 1) return c;
|
52
|
+
const o = () => {
|
53
|
+
const a = e.map((i) => ({
|
54
|
+
useScope: i(),
|
55
|
+
scopeName: i.scopeName
|
56
|
+
}));
|
57
|
+
return function(r) {
|
58
|
+
const t = a.reduce((n, { useScope: s, scopeName: d }) => {
|
59
|
+
const m = s(r)[`__scope${d}`];
|
60
|
+
return { ...n, ...m };
|
61
|
+
}, {});
|
62
|
+
return u.useMemo(() => ({ [`__scope${c.scopeName}`]: t }), [t]);
|
63
|
+
};
|
64
|
+
};
|
65
|
+
return o.scopeName = c.scopeName, o;
|
25
66
|
}
|
26
67
|
export {
|
27
|
-
|
28
|
-
|
68
|
+
j as createContext,
|
69
|
+
w as createContextScope
|
29
70
|
};
|
30
71
|
//# sourceMappingURL=index.es330.js.map
|
package/dist/index.es330.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es330.js","sources":["../node_modules/@radix-ui/react-
|
1
|
+
{"version":3,"file":"index.es330.js","sources":["../node_modules/@radix-ui/react-context/dist/index.mjs"],"sourcesContent":["// packages/react/context/src/create-context.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = React.createContext(defaultContext);\n const Provider = (props) => {\n const { children, ...context } = props;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName) {\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = React.createContext(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n const Provider = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName, scope) {\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\nexport {\n createContext2 as createContext,\n createContextScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createContext2","rootComponentName","defaultContext","Context","React","Provider","props","children","context","value","jsx","useContext2","consumerName","createContextScope","scopeName","createContextScopeDeps","defaultContexts","createContext3","BaseContext","index","scope","_a","createScope","scopeContexts","contexts","composeContextScopes","scopes","baseScope","scopeHooks","createScope2","overrideScopes","nextScopes","nextScopes2","useScope","currentScope"],"mappings":"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","x_google_ignoreList":[0]}
|
package/dist/index.es331.js
CHANGED
@@ -1,71 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
const { children: t, ...n } = r, s = u.useMemo(() => n, Object.values(n));
|
6
|
-
return /* @__PURE__ */ h.jsx(o.Provider, { value: s, children: t });
|
1
|
+
function h(f, c, { checkForDefaultPrevented: p = !0 } = {}) {
|
2
|
+
return function(s) {
|
3
|
+
if (f == null || f(s), p === !1 || !s.defaultPrevented)
|
4
|
+
return c == null ? void 0 : c(s);
|
7
5
|
};
|
8
|
-
a.displayName = e + "Provider";
|
9
|
-
function i(r) {
|
10
|
-
const t = u.useContext(o);
|
11
|
-
if (t) return t;
|
12
|
-
if (c !== void 0) return c;
|
13
|
-
throw new Error(`\`${r}\` must be used within \`${e}\``);
|
14
|
-
}
|
15
|
-
return [a, i];
|
16
|
-
}
|
17
|
-
function w(e, c = []) {
|
18
|
-
let o = [];
|
19
|
-
function a(r, t) {
|
20
|
-
const n = u.createContext(t), s = o.length;
|
21
|
-
o = [...o, t];
|
22
|
-
const d = (m) => {
|
23
|
-
var S;
|
24
|
-
const { scope: x, children: C, ...p } = m, v = ((S = x == null ? void 0 : x[e]) == null ? void 0 : S[s]) || n, P = u.useMemo(() => p, Object.values(p));
|
25
|
-
return /* @__PURE__ */ h.jsx(v.Provider, { value: P, children: C });
|
26
|
-
};
|
27
|
-
d.displayName = r + "Provider";
|
28
|
-
function f(m, x) {
|
29
|
-
var v;
|
30
|
-
const C = ((v = x == null ? void 0 : x[e]) == null ? void 0 : v[s]) || n, p = u.useContext(C);
|
31
|
-
if (p) return p;
|
32
|
-
if (t !== void 0) return t;
|
33
|
-
throw new Error(`\`${m}\` must be used within \`${r}\``);
|
34
|
-
}
|
35
|
-
return [d, f];
|
36
|
-
}
|
37
|
-
const i = () => {
|
38
|
-
const r = o.map((t) => u.createContext(t));
|
39
|
-
return function(n) {
|
40
|
-
const s = (n == null ? void 0 : n[e]) || r;
|
41
|
-
return u.useMemo(
|
42
|
-
() => ({ [`__scope${e}`]: { ...n, [e]: s } }),
|
43
|
-
[n, s]
|
44
|
-
);
|
45
|
-
};
|
46
|
-
};
|
47
|
-
return i.scopeName = e, [a, l(i, ...c)];
|
48
|
-
}
|
49
|
-
function l(...e) {
|
50
|
-
const c = e[0];
|
51
|
-
if (e.length === 1) return c;
|
52
|
-
const o = () => {
|
53
|
-
const a = e.map((i) => ({
|
54
|
-
useScope: i(),
|
55
|
-
scopeName: i.scopeName
|
56
|
-
}));
|
57
|
-
return function(r) {
|
58
|
-
const t = a.reduce((n, { useScope: s, scopeName: d }) => {
|
59
|
-
const m = s(r)[`__scope${d}`];
|
60
|
-
return { ...n, ...m };
|
61
|
-
}, {});
|
62
|
-
return u.useMemo(() => ({ [`__scope${c.scopeName}`]: t }), [t]);
|
63
|
-
};
|
64
|
-
};
|
65
|
-
return o.scopeName = c.scopeName, o;
|
66
6
|
}
|
67
7
|
export {
|
68
|
-
|
69
|
-
w as createContextScope
|
8
|
+
h as composeEventHandlers
|
70
9
|
};
|
71
10
|
//# sourceMappingURL=index.es331.js.map
|
package/dist/index.es331.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es331.js","sources":["../node_modules/@radix-ui/
|
1
|
+
{"version":3,"file":"index.es331.js","sources":["../node_modules/@radix-ui/primitive/dist/index.mjs"],"sourcesContent":["// packages/core/primitive/src/primitive.tsx\nfunction composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler?.(event);\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\nexport {\n composeEventHandlers\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["composeEventHandlers","originalEventHandler","ourEventHandler","checkForDefaultPrevented","event"],"mappings":"AACA,SAASA,EAAqBC,GAAsBC,GAAiB,EAAE,0BAAAC,IAA2B,GAAM,IAAG,IAAI;AAC7G,SAAO,SAAqBC,GAAO;AAEjC,QADAH,KAAA,QAAAA,EAAuBG,IACnBD,MAA6B,MAAS,CAACC,EAAM;AAC/C,aAAOF,KAAA,gBAAAA,EAAkBE;AAAA,EAE5B;AACH;","x_google_ignoreList":[0]}
|
package/dist/index.es332.js
CHANGED
@@ -1,10 +1,33 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
import * as l from "react";
|
2
|
+
import { useCallbackRef as f } from "./index.es337.js";
|
3
|
+
function R({
|
4
|
+
prop: t,
|
5
|
+
defaultProp: r,
|
6
|
+
onChange: s = () => {
|
7
|
+
}
|
8
|
+
}) {
|
9
|
+
const [e, n] = v({ defaultProp: r, onChange: s }), o = t !== void 0, i = o ? t : e, u = f(s), d = l.useCallback(
|
10
|
+
(c) => {
|
11
|
+
if (o) {
|
12
|
+
const a = typeof c == "function" ? c(t) : c;
|
13
|
+
a !== t && u(a);
|
14
|
+
} else
|
15
|
+
n(c);
|
16
|
+
},
|
17
|
+
[o, t, n, u]
|
18
|
+
);
|
19
|
+
return [i, d];
|
20
|
+
}
|
21
|
+
function v({
|
22
|
+
defaultProp: t,
|
23
|
+
onChange: r
|
24
|
+
}) {
|
25
|
+
const s = l.useState(t), [e] = s, n = l.useRef(e), o = f(r);
|
26
|
+
return l.useEffect(() => {
|
27
|
+
n.current !== e && (o(e), n.current = e);
|
28
|
+
}, [e, n, o]), s;
|
6
29
|
}
|
7
30
|
export {
|
8
|
-
|
31
|
+
R as useControllableState
|
9
32
|
};
|
10
33
|
//# sourceMappingURL=index.es332.js.map
|
package/dist/index.es332.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es332.js","sources":["../node_modules/@radix-ui/
|
1
|
+
{"version":3,"file":"index.es332.js","sources":["../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs"],"sourcesContent":["// packages/react/use-controllable-state/src/use-controllable-state.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useControllableState({\n prop,\n defaultProp,\n onChange = () => {\n }\n}) {\n const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });\n const isControlled = prop !== void 0;\n const value = isControlled ? prop : uncontrolledProp;\n const handleChange = useCallbackRef(onChange);\n const setValue = React.useCallback(\n (nextValue) => {\n if (isControlled) {\n const setter = nextValue;\n const value2 = typeof nextValue === \"function\" ? setter(prop) : nextValue;\n if (value2 !== prop) handleChange(value2);\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, handleChange]\n );\n return [value, setValue];\n}\nfunction useUncontrolledState({\n defaultProp,\n onChange\n}) {\n const uncontrolledState = React.useState(defaultProp);\n const [value] = uncontrolledState;\n const prevValueRef = React.useRef(value);\n const handleChange = useCallbackRef(onChange);\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n handleChange(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef, handleChange]);\n return uncontrolledState;\n}\nexport {\n useControllableState\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useControllableState","prop","defaultProp","onChange","uncontrolledProp","setUncontrolledProp","useUncontrolledState","isControlled","value","handleChange","useCallbackRef","setValue","React","nextValue","value2","uncontrolledState","prevValueRef"],"mappings":";;AAGA,SAASA,EAAqB;AAAA,EAC5B,MAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC,IAAW,MAAM;AAAA,EACnB;AACA,GAAG;AACD,QAAM,CAACC,GAAkBC,CAAmB,IAAIC,EAAqB,EAAE,aAAAJ,GAAa,UAAAC,GAAU,GACxFI,IAAeN,MAAS,QACxBO,IAAQD,IAAeN,IAAOG,GAC9BK,IAAeC,EAAeP,CAAQ,GACtCQ,IAAWC,EAAM;AAAA,IACrB,CAACC,MAAc;AACb,UAAIN,GAAc;AAEhB,cAAMO,IAAS,OAAOD,KAAc,aADrBA,EACyCZ,CAAI,IAAIY;AAChE,QAAIC,MAAWb,KAAMQ,EAAaK,CAAM;AAAA,MAChD;AACQ,QAAAT,EAAoBQ,CAAS;AAAA,IAEhC;AAAA,IACD,CAACN,GAAcN,GAAMI,GAAqBI,CAAY;AAAA,EACvD;AACD,SAAO,CAACD,GAAOG,CAAQ;AACzB;AACA,SAASL,EAAqB;AAAA,EAC5B,aAAAJ;AAAA,EACA,UAAAC;AACF,GAAG;AACD,QAAMY,IAAoBH,EAAM,SAASV,CAAW,GAC9C,CAACM,CAAK,IAAIO,GACVC,IAAeJ,EAAM,OAAOJ,CAAK,GACjCC,IAAeC,EAAeP,CAAQ;AAC5C,SAAAS,EAAM,UAAU,MAAM;AACpB,IAAII,EAAa,YAAYR,MAC3BC,EAAaD,CAAK,GAClBQ,EAAa,UAAUR;AAAA,EAE1B,GAAE,CAACA,GAAOQ,GAAcP,CAAY,CAAC,GAC/BM;AACT;","x_google_ignoreList":[0]}
|
package/dist/index.es333.js
CHANGED
@@ -1,33 +1,9 @@
|
|
1
|
-
import * as
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
defaultProp: r,
|
6
|
-
onChange: s = () => {
|
7
|
-
}
|
8
|
-
}) {
|
9
|
-
const [e, n] = v({ defaultProp: r, onChange: s }), o = t !== void 0, i = o ? t : e, u = f(s), d = l.useCallback(
|
10
|
-
(c) => {
|
11
|
-
if (o) {
|
12
|
-
const a = typeof c == "function" ? c(t) : c;
|
13
|
-
a !== t && u(a);
|
14
|
-
} else
|
15
|
-
n(c);
|
16
|
-
},
|
17
|
-
[o, t, n, u]
|
18
|
-
);
|
19
|
-
return [i, d];
|
20
|
-
}
|
21
|
-
function v({
|
22
|
-
defaultProp: t,
|
23
|
-
onChange: r
|
24
|
-
}) {
|
25
|
-
const s = l.useState(t), [e] = s, n = l.useRef(e), o = f(r);
|
26
|
-
return l.useEffect(() => {
|
27
|
-
n.current !== e && (o(e), n.current = e);
|
28
|
-
}, [e, n, o]), s;
|
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]);
|
29
5
|
}
|
30
6
|
export {
|
31
|
-
|
7
|
+
t as usePrevious
|
32
8
|
};
|
33
9
|
//# sourceMappingURL=index.es333.js.map
|
package/dist/index.es333.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es333.js","sources":["../node_modules/@radix-ui/react-use-
|
1
|
+
{"version":3,"file":"index.es333.js","sources":["../node_modules/@radix-ui/react-use-previous/dist/index.mjs"],"sourcesContent":["// packages/react/use-previous/src/use-previous.tsx\nimport * as React from \"react\";\nfunction usePrevious(value) {\n const ref = React.useRef({ value, previous: value });\n return React.useMemo(() => {\n if (ref.current.value !== value) {\n ref.current.previous = ref.current.value;\n ref.current.value = value;\n }\n return ref.current.previous;\n }, [value]);\n}\nexport {\n usePrevious\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["usePrevious","value","ref","React"],"mappings":";AAEA,SAASA,EAAYC,GAAO;AAC1B,QAAMC,IAAMC,EAAM,OAAO,EAAE,OAAAF,GAAO,UAAUA,GAAO;AACnD,SAAOE,EAAM,QAAQ,OACfD,EAAI,QAAQ,UAAUD,MACxBC,EAAI,QAAQ,WAAWA,EAAI,QAAQ,OACnCA,EAAI,QAAQ,QAAQD,IAEfC,EAAI,QAAQ,WAClB,CAACD,CAAK,CAAC;AACZ;","x_google_ignoreList":[0]}
|
package/dist/index.es334.js
CHANGED
@@ -1,9 +1,28 @@
|
|
1
|
-
import * as
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
import * as h from "react";
|
2
|
+
import { useLayoutEffect as z } from "./index.es338.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;
|
5
24
|
}
|
6
25
|
export {
|
7
|
-
|
26
|
+
c as useSize
|
8
27
|
};
|
9
28
|
//# sourceMappingURL=index.es334.js.map
|
package/dist/index.es334.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es334.js","sources":["../node_modules/@radix-ui/react-use-
|
1
|
+
{"version":3,"file":"index.es334.js","sources":["../node_modules/@radix-ui/react-use-size/dist/index.mjs"],"sourcesContent":["// packages/react/use-size/src/use-size.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nfunction useSize(element) {\n const [size, setSize] = React.useState(void 0);\n useLayoutEffect(() => {\n if (element) {\n setSize({ width: element.offsetWidth, height: element.offsetHeight });\n const resizeObserver = new ResizeObserver((entries) => {\n if (!Array.isArray(entries)) {\n return;\n }\n if (!entries.length) {\n return;\n }\n const entry = entries[0];\n let width;\n let height;\n if (\"borderBoxSize\" in entry) {\n const borderSizeEntry = entry[\"borderBoxSize\"];\n const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;\n width = borderSize[\"inlineSize\"];\n height = borderSize[\"blockSize\"];\n } else {\n width = element.offsetWidth;\n height = element.offsetHeight;\n }\n setSize({ width, height });\n });\n resizeObserver.observe(element, { box: \"border-box\" });\n return () => resizeObserver.unobserve(element);\n } else {\n setSize(void 0);\n }\n }, [element]);\n return size;\n}\nexport {\n useSize\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useSize","element","size","setSize","React","useLayoutEffect","resizeObserver","entries","entry","width","height","borderSizeEntry","borderSize"],"mappings":";;AAGA,SAASA,EAAQC,GAAS;AACxB,QAAM,CAACC,GAAMC,CAAO,IAAIC,EAAM,SAAS,MAAM;AAC7CC,SAAAA,EAAgB,MAAM;AACpB,QAAIJ,GAAS;AACX,MAAAE,EAAQ,EAAE,OAAOF,EAAQ,aAAa,QAAQA,EAAQ,cAAc;AACpE,YAAMK,IAAiB,IAAI,eAAe,CAACC,MAAY;AAIrD,YAHI,CAAC,MAAM,QAAQA,CAAO,KAGtB,CAACA,EAAQ;AACX;AAEF,cAAMC,IAAQD,EAAQ,CAAC;AACvB,YAAIE,GACAC;AACJ,YAAI,mBAAmBF,GAAO;AAC5B,gBAAMG,IAAkBH,EAAM,eACxBI,IAAa,MAAM,QAAQD,CAAe,IAAIA,EAAgB,CAAC,IAAIA;AACzE,UAAAF,IAAQG,EAAW,YACnBF,IAASE,EAAW;AAAA,QAC9B;AACU,UAAAH,IAAQR,EAAQ,aAChBS,IAAST,EAAQ;AAEnB,QAAAE,EAAQ,EAAE,OAAAM,GAAO,QAAAC,GAAQ;AAAA,MACjC,CAAO;AACD,aAAAJ,EAAe,QAAQL,GAAS,EAAE,KAAK,aAAY,CAAE,GAC9C,MAAMK,EAAe,UAAUL,CAAO;AAAA,IACnD;AACM,MAAAE,EAAQ,MAAM;AAAA,EAEpB,GAAK,CAACF,CAAO,CAAC,GACLC;AACT;","x_google_ignoreList":[0]}
|