@anoki/fse-ui 1.0.648 → 1.0.649
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/ui/AuthorWithImage/AuthorWithImage.css +1 -1
- package/dist/index.cjs215.js +1 -1
- package/dist/index.cjs219.js +1 -1
- package/dist/index.cjs226.js +1 -1
- package/dist/index.cjs236.js +1 -1
- package/dist/index.cjs243.js +1 -1
- package/dist/index.cjs270.js +1 -1
- package/dist/index.cjs309.js +1 -1
- package/dist/index.cjs337.js +1 -1
- package/dist/index.cjs338.js +1 -1
- package/dist/index.cjs345.js +1 -1
- package/dist/index.cjs352.js +1 -1
- package/dist/index.cjs357.js +1 -1
- package/dist/index.cjs358.js +1 -1
- package/dist/index.cjs359.js +2 -0
- package/dist/index.cjs359.js.map +1 -0
- 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 -1
- 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.cjs367.js +1 -1
- package/dist/index.cjs367.js.map +1 -1
- package/dist/index.cjs370.js +1 -1
- package/dist/index.cjs370.js.map +1 -1
- package/dist/index.cjs371.js +1 -1
- package/dist/index.cjs371.js.map +1 -1
- package/dist/index.cjs372.js +2 -0
- package/dist/index.cjs372.js.map +1 -0
- package/dist/index.cjs373.js +2 -0
- package/dist/index.cjs373.js.map +1 -0
- package/dist/index.cjs374.js +2 -0
- package/dist/index.cjs374.js.map +1 -0
- package/dist/index.cjs375.js +2 -0
- package/dist/index.cjs375.js.map +1 -0
- package/dist/index.cjs376.js +2 -0
- package/dist/index.cjs376.js.map +1 -0
- package/dist/index.cjs377.js +1 -1
- package/dist/index.cjs377.js.map +1 -1
- package/dist/index.cjs378.js +1 -1
- package/dist/index.cjs378.js.map +1 -1
- package/dist/index.cjs379.js +1 -1
- package/dist/index.cjs379.js.map +1 -1
- package/dist/index.cjs380.js +1 -1
- package/dist/index.cjs380.js.map +1 -1
- package/dist/index.cjs398.js +1 -1
- package/dist/index.cjs401.js +1 -27
- package/dist/index.cjs401.js.map +1 -1
- package/dist/index.cjs402.js +1 -1
- package/dist/index.cjs403.js +1 -1
- package/dist/index.cjs403.js.map +1 -1
- package/dist/index.cjs404.js +2 -1
- package/dist/index.cjs404.js.map +1 -1
- package/dist/index.cjs405.js +27 -2
- package/dist/index.cjs405.js.map +1 -1
- package/dist/index.cjs406.js +1 -1
- package/dist/index.cjs407.js +1 -1
- package/dist/index.cjs409.js +1 -1
- package/dist/index.cjs411.js +1 -1
- package/dist/index.cjs412.js +1 -1
- package/dist/index.cjs416.js +1 -1
- package/dist/index.cjs416.js.map +1 -1
- package/dist/index.cjs417.js +1 -1
- package/dist/index.cjs418.js +1 -1
- package/dist/index.cjs418.js.map +1 -1
- package/dist/index.cjs419.js +1 -1
- package/dist/index.cjs419.js.map +1 -1
- package/dist/index.cjs421.js +1 -1
- package/dist/index.cjs423.js +1 -1
- package/dist/index.cjs427.js +1 -1
- package/dist/index.cjs434.js +1 -1
- package/dist/index.es215.js +7 -7
- package/dist/index.es219.js +1 -1
- package/dist/index.es226.js +8 -8
- package/dist/index.es236.js +1 -1
- package/dist/index.es243.js +14 -14
- package/dist/index.es270.js +7 -7
- package/dist/index.es309.js +4 -4
- package/dist/index.es337.js +1 -1
- package/dist/index.es338.js +2 -2
- package/dist/index.es345.js +1 -1
- package/dist/index.es352.js +2 -2
- package/dist/index.es357.js +1 -1
- package/dist/index.es358.js +1 -1
- package/dist/index.es359.js +10 -0
- package/dist/index.es359.js.map +1 -0
- package/dist/index.es360.js +25 -5
- package/dist/index.es360.js.map +1 -1
- package/dist/index.es361.js +64 -23
- package/dist/index.es361.js.map +1 -1
- package/dist/index.es362.js +27 -65
- package/dist/index.es362.js.map +1 -1
- package/dist/index.es363.js +32 -29
- package/dist/index.es363.js.map +1 -1
- package/dist/index.es364.js +620 -31
- package/dist/index.es364.js.map +1 -1
- package/dist/index.es365.js +10 -621
- package/dist/index.es365.js.map +1 -1
- package/dist/index.es367.js +15 -15
- package/dist/index.es367.js.map +1 -1
- package/dist/index.es370.js +5 -68
- package/dist/index.es370.js.map +1 -1
- package/dist/index.es371.js +25 -15
- package/dist/index.es371.js.map +1 -1
- package/dist/index.es372.js +72 -0
- package/dist/index.es372.js.map +1 -0
- package/dist/index.es373.js +18 -0
- package/dist/index.es373.js.map +1 -0
- package/dist/index.es374.js +128 -0
- package/dist/index.es374.js.map +1 -0
- package/dist/index.es375.js +138 -0
- package/dist/index.es375.js.map +1 -0
- package/dist/index.es376.js +17 -0
- package/dist/index.es376.js.map +1 -0
- package/dist/index.es377.js +12 -122
- package/dist/index.es377.js.map +1 -1
- package/dist/index.es378.js +8 -134
- package/dist/index.es378.js.map +1 -1
- package/dist/index.es379.js +50 -14
- package/dist/index.es379.js.map +1 -1
- package/dist/index.es380.js +51 -13
- package/dist/index.es380.js.map +1 -1
- package/dist/index.es398.js +1 -1
- package/dist/index.es401.js +2 -3675
- package/dist/index.es401.js.map +1 -1
- package/dist/index.es402.js +2 -6
- package/dist/index.es402.js.map +1 -1
- package/dist/index.es403.js +6 -2
- package/dist/index.es403.js.map +1 -1
- package/dist/index.es404.js +520 -5
- package/dist/index.es404.js.map +1 -1
- package/dist/index.es405.js +3653 -499
- package/dist/index.es405.js.map +1 -1
- package/dist/index.es406.js +6 -2
- package/dist/index.es406.js.map +1 -1
- package/dist/index.es407.js +2 -2
- package/dist/index.es409.js +3 -3
- package/dist/index.es411.js +4 -4
- package/dist/index.es412.js +6 -6
- package/dist/index.es416.js +131 -8
- package/dist/index.es416.js.map +1 -1
- package/dist/index.es417.js +1 -1
- package/dist/index.es418.js +9 -3
- package/dist/index.es418.js.map +1 -1
- package/dist/index.es419.js +2 -131
- package/dist/index.es419.js.map +1 -1
- package/dist/index.es421.js +1 -1
- package/dist/index.es423.js +1 -1
- package/dist/index.es427.js +1 -1
- package/dist/index.es434.js +5 -5
- package/package.json +1 -1
- package/dist/index.cjs366.js +0 -2
- package/dist/index.cjs366.js.map +0 -1
- package/dist/index.cjs368.js +0 -2
- package/dist/index.cjs368.js.map +0 -1
- package/dist/index.cjs369.js +0 -2
- package/dist/index.cjs369.js.map +0 -1
- package/dist/index.cjs381.js +0 -2
- package/dist/index.cjs381.js.map +0 -1
- package/dist/index.cjs382.js +0 -2
- package/dist/index.cjs382.js.map +0 -1
- package/dist/index.cjs383.js +0 -2
- package/dist/index.cjs383.js.map +0 -1
- package/dist/index.es366.js +0 -14
- package/dist/index.es366.js.map +0 -1
- package/dist/index.es368.js +0 -9
- package/dist/index.es368.js.map +0 -1
- package/dist/index.es369.js +0 -28
- package/dist/index.es369.js.map +0 -1
- package/dist/index.es381.js +0 -12
- package/dist/index.es381.js.map +0 -1
- package/dist/index.es382.js +0 -53
- package/dist/index.es382.js.map +0 -1
- package/dist/index.es383.js +0 -56
- package/dist/index.es383.js.map +0 -1
package/dist/index.es361.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.es197.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.es361.js.map
|
package/dist/index.es361.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es361.js","sources":["../node_modules/@radix-ui/react-
|
1
|
+
{"version":3,"file":"index.es361.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":";;AAGA,SAASA,EAAeC,GAAmBC,GAAgB;AACzD,QAAMC,IAAUC,EAAM,cAAcF,CAAc,GAC5CG,IAAW,CAACC,MAAU;AAC1B,UAAM,EAAE,UAAAC,GAAU,GAA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AC3BL;AACT;","x_google_ignoreList":[0]}
|
package/dist/index.es362.js
CHANGED
@@ -1,71 +1,33 @@
|
|
1
|
-
import * as
|
2
|
-
import {
|
3
|
-
function
|
4
|
-
|
5
|
-
|
6
|
-
|
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}\``);
|
1
|
+
import * as l from "react";
|
2
|
+
import { useCallbackRef as f } from "./index.es408.js";
|
3
|
+
function R({
|
4
|
+
prop: t,
|
5
|
+
defaultProp: r,
|
6
|
+
onChange: s = () => {
|
14
7
|
}
|
15
|
-
|
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];
|
16
20
|
}
|
17
|
-
function
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
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;
|
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;
|
66
29
|
}
|
67
30
|
export {
|
68
|
-
|
69
|
-
w as createContextScope
|
31
|
+
R as useControllableState
|
70
32
|
};
|
71
33
|
//# sourceMappingURL=index.es362.js.map
|
package/dist/index.es362.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es362.js","sources":["../node_modules/@radix-ui/react-
|
1
|
+
{"version":3,"file":"index.es362.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.es363.js
CHANGED
@@ -1,33 +1,36 @@
|
|
1
|
-
import * as
|
2
|
-
import
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
}
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
1
|
+
import * as p from "react";
|
2
|
+
import * as f from "react-dom";
|
3
|
+
import { createSlot as c } from "./index.es380.js";
|
4
|
+
import { j as u } from "./index.es197.js";
|
5
|
+
var l = [
|
6
|
+
"a",
|
7
|
+
"button",
|
8
|
+
"div",
|
9
|
+
"form",
|
10
|
+
"h2",
|
11
|
+
"h3",
|
12
|
+
"img",
|
13
|
+
"input",
|
14
|
+
"label",
|
15
|
+
"li",
|
16
|
+
"nav",
|
17
|
+
"ol",
|
18
|
+
"p",
|
19
|
+
"span",
|
20
|
+
"svg",
|
21
|
+
"ul"
|
22
|
+
], h = l.reduce((t, i) => {
|
23
|
+
const o = c(`Primitive.${i}`), r = p.forwardRef((e, s) => {
|
24
|
+
const { asChild: m, ...a } = e, n = m ? o : i;
|
25
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u.jsx(n, { ...a, ref: s });
|
26
|
+
});
|
27
|
+
return r.displayName = `Primitive.${i}`, { ...t, [i]: r };
|
28
|
+
}, {});
|
29
|
+
function w(t, i) {
|
30
|
+
t && f.flushSync(() => t.dispatchEvent(i));
|
29
31
|
}
|
30
32
|
export {
|
31
|
-
|
33
|
+
h as Primitive,
|
34
|
+
w as dispatchDiscreteCustomEvent
|
32
35
|
};
|
33
36
|
//# sourceMappingURL=index.es363.js.map
|
package/dist/index.es363.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es363.js","sources":["../node_modules/@radix-ui/react-
|
1
|
+
{"version":3,"file":"index.es363.js","sources":["../node_modules/@radix-ui/react-primitive/dist/index.mjs"],"sourcesContent":["// packages/react/primitive/src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["NODES","Primitive","primitive","node","Slot","createSlot","Node","React","props","forwardedRef","asChild","primitiveProps","Comp","jsx","dispatchDiscreteCustomEvent","target","event","ReactDOM"],"mappings":";;;;AAKA,IAAIA,IAAQ;AAAA,EACV;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GACIC,IAAYD,EAAM,OAAO,CAACE,GAAWC,MAAS;AAChD,QAAMC,IAAOC,EAAW,aAAaF,CAAI,EAAE,GACrCG,IAAOC,EAAM,WAAW,CAACC,GAAOC,MAAiB;AACrD,UAAM,EAAE,SAAAC,GAAS,GAAGC,EAAc,IAAKH,GACjCI,IAAOF,IAAUN,IAAOD;AAC9B,WAAI,OAAO,SAAW,QACpB,OAAO,OAAO,IAAI,UAAU,CAAC,IAAI,KAEZU,gBAAAA,EAAAA,IAAID,GAAM,EAAE,GAAGD,GAAgB,KAAKF,GAAc;AAAA,EAC7E,CAAG;AACD,SAAAH,EAAK,cAAc,aAAaH,CAAI,IAC7B,EAAE,GAAGD,GAAW,CAACC,CAAI,GAAGG,EAAM;AACvC,GAAG,CAAE,CAAA;AACL,SAASQ,EAA4BC,GAAQC,GAAO;AAClD,EAAID,KAAQE,EAAS,UAAU,MAAMF,EAAO,cAAcC,CAAK,CAAC;AAClE;","x_google_ignoreList":[0]}
|