zudoku 0.3.0-dev.77 → 0.3.0-dev.78
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/config/validators/validate.d.ts +130 -130
- package/dist/lib/components/DevPortal.js +11 -2
- package/dist/lib/components/DevPortal.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +1 -1
- package/dist/lib/core/plugins.d.ts +3 -0
- package/dist/lib/core/plugins.js +1 -0
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +2 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +8 -16
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +18 -1
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +6 -6
- package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +15 -15
- package/dist/lib/plugins/openapi/graphql/graphql.js +67 -67
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +8 -0
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.d.ts +2 -3
- package/dist/lib/plugins/openapi/playground/PathParams.js +3 -4
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +22 -10
- package/dist/lib/plugins/openapi/playground/Playground.js +37 -25
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.d.ts +2 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +3 -2
- package/dist/lib/plugins/openapi/playground/QueryParams.js +10 -5
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/util/fetchTimeout.d.ts +1 -0
- package/dist/lib/util/fetchTimeout.js +14 -0
- package/dist/lib/util/fetchTimeout.js.map +1 -0
- package/lib/{CategoryHeading-D0V23fMT.js → CategoryHeading-DCmchnA1.js} +2 -2
- package/lib/{CategoryHeading-D0V23fMT.js.map → CategoryHeading-DCmchnA1.js.map} +1 -1
- package/lib/{Combination-CgxP9BB4.js → Combination-BIdpLnWg.js} +27 -33
- package/lib/Combination-BIdpLnWg.js.map +1 -0
- package/lib/DeveloperHint-DQVwIery.js +10 -0
- package/lib/DeveloperHint-DQVwIery.js.map +1 -0
- package/lib/{Input-BcZoDid4.js → Input-qyZciIJp.js} +3 -3
- package/lib/{Input-BcZoDid4.js.map → Input-qyZciIJp.js.map} +1 -1
- package/lib/{Markdown-IsabnbGN.js → Markdown-QsZ-PHET.js} +3 -3
- package/lib/{Markdown-IsabnbGN.js.map → Markdown-QsZ-PHET.js.map} +1 -1
- package/lib/{MdxPage-B1B2Inj5.js → MdxPage-V4FCB0C_.js} +3 -3
- package/lib/{MdxPage-B1B2Inj5.js.map → MdxPage-V4FCB0C_.js.map} +1 -1
- package/lib/OperationList-qfNEBPAx.js +4397 -0
- package/lib/OperationList-qfNEBPAx.js.map +1 -0
- package/lib/{Route-D0Ub80Oa.js → Route-CogU1ofM.js} +2 -2
- package/lib/{Route-D0Ub80Oa.js.map → Route-CogU1ofM.js.map} +1 -1
- package/lib/{SlotletProvider-CJXWb2gw.js → SlotletProvider-D_Vz-7c_.js} +4 -4
- package/lib/{SlotletProvider-CJXWb2gw.js.map → SlotletProvider-D_Vz-7c_.js.map} +1 -1
- package/lib/Spinner-yPSFgoZ8.js +244 -0
- package/lib/Spinner-yPSFgoZ8.js.map +1 -0
- package/lib/index-BpO_SgPQ.js +124 -0
- package/lib/index-BpO_SgPQ.js.map +1 -0
- package/lib/index-DccqEFTy.js +1878 -0
- package/lib/index-DccqEFTy.js.map +1 -0
- package/lib/{urql-DMlBWUKL.js → urql-DrBfkb92.js} +2 -3
- package/lib/{urql-DMlBWUKL.js.map → urql-DrBfkb92.js.map} +1 -1
- package/lib/zudoku.components.js +352 -348
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.openapi-worker.js +1 -1
- package/lib/zudoku.plugin-api-keys.js +7 -6
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-page.js +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +5 -4
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/components/DevPortal.tsx +14 -5
- package/src/lib/core/plugins.ts +7 -0
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +9 -17
- package/src/lib/plugins/openapi/Sidecar.tsx +23 -1
- package/src/lib/plugins/openapi/graphql/gql.ts +8 -8
- package/src/lib/plugins/openapi/graphql/graphql.ts +80 -80
- package/src/lib/plugins/openapi/index.tsx +15 -0
- package/src/lib/plugins/openapi/playground/PathParams.tsx +14 -20
- package/src/lib/plugins/openapi/playground/Playground.tsx +69 -45
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +8 -6
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +86 -72
- package/src/lib/util/fetchTimeout.tsx +21 -0
- package/lib/Combination-CgxP9BB4.js.map +0 -1
- package/lib/OperationList-B2nsuf1v.js +0 -5471
- package/lib/OperationList-B2nsuf1v.js.map +0 -1
- package/lib/Spinner-BhtSoFka.js +0 -359
- package/lib/Spinner-BhtSoFka.js.map +0 -1
- package/lib/index-BC2Ob2BR.js +0 -727
- package/lib/index-BC2Ob2BR.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as r, O as i } from "./jsx-runtime-CJBdjYYx.js";
|
|
2
2
|
import { O as t } from "./context-_fYfJFgk.js";
|
|
3
|
-
import { P as s } from "./urql-
|
|
3
|
+
import { P as s } from "./urql-DrBfkb92.js";
|
|
4
4
|
function p({
|
|
5
5
|
config: o,
|
|
6
6
|
client: e
|
|
@@ -10,4 +10,4 @@ function p({
|
|
|
10
10
|
export {
|
|
11
11
|
p as OpenApiRoute
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=Route-
|
|
13
|
+
//# sourceMappingURL=Route-CogU1ofM.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Route-
|
|
1
|
+
{"version":3,"file":"Route-CogU1ofM.js","sources":["../src/lib/plugins/openapi/Route.tsx"],"sourcesContent":["import { Outlet } from \"react-router-dom\";\nimport { OasConfigProvider } from \"./context.js\";\nimport { OasPluginConfig } from \"./interfaces.js\";\n\nimport { Provider, Client as UrqlClient } from \"./util/urql.js\";\n\nexport function OpenApiRoute({\n config,\n client,\n}: {\n config: OasPluginConfig;\n client: typeof UrqlClient;\n}) {\n return (\n <Provider value={client}>\n <OasConfigProvider value={{ config }}>\n <Outlet />\n </OasConfigProvider>\n </Provider>\n );\n}\n"],"names":["OpenApiRoute","config","client","jsx","Provider","OasConfigProvider","Outlet"],"mappings":";;;AAMO,SAASA,EAAa;AAAA,EAC3B,QAAAC;AAAA,EACA,QAAAC;AACF,GAGG;AACD,SACGC,gBAAAA,EAAAA,IAAAC,GAAA,EAAS,OAAOF,GACf,UAACC,gBAAAA,EAAA,IAAAE,GAAA,EAAkB,OAAO,EAAE,QAAAJ,EAAO,GACjC,UAACE,gBAAAA,EAAA,IAAAG,GAAA,EAAO,GACV,EACF,CAAA;AAEJ;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c as a, j as t, e as r } from "./jsx-runtime-CJBdjYYx.js";
|
|
2
2
|
import { L as i } from "./index-Dt-pU7Vu.js";
|
|
3
|
-
import { C as l } from "./CategoryHeading-
|
|
4
|
-
import {
|
|
5
|
-
import { c as m, P as d, H as x } from "./Markdown-
|
|
3
|
+
import { C as l } from "./CategoryHeading-DCmchnA1.js";
|
|
4
|
+
import { D as c } from "./DeveloperHint-DQVwIery.js";
|
|
5
|
+
import { c as m, P as d, H as x } from "./Markdown-QsZ-PHET.js";
|
|
6
6
|
import { i as u } from "./router-BiRCp01d.js";
|
|
7
7
|
import { u as h } from "./DevPortalProvider-BTFqdAEL.js";
|
|
8
8
|
import { u as p } from "./state-DsXXkBLH.js";
|
|
@@ -100,4 +100,4 @@ export {
|
|
|
100
100
|
O as a,
|
|
101
101
|
H as u
|
|
102
102
|
};
|
|
103
|
-
//# sourceMappingURL=SlotletProvider-
|
|
103
|
+
//# sourceMappingURL=SlotletProvider-D_Vz-7c_.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlotletProvider-
|
|
1
|
+
{"version":3,"file":"SlotletProvider-D_Vz-7c_.js","sources":["../../../node_modules/.pnpm/lucide-react@0.378.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/unlink.js","../src/lib/components/NotFoundPage.tsx","../src/lib/errors/ErrorAlert.tsx","../src/lib/errors/RouterError.tsx","../src/lib/authentication/hook.ts","../src/lib/components/SlotletProvider.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.378.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Unlink = createLucideIcon(\"Unlink\", [\n [\n \"path\",\n {\n d: \"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71\",\n key: \"yqzxt4\"\n }\n ],\n [\n \"path\",\n {\n d: \"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71\",\n key: \"4qinb0\"\n }\n ],\n [\"line\", { x1: \"8\", x2: \"8\", y1: \"2\", y2: \"5\", key: \"1041cp\" }],\n [\"line\", { x1: \"2\", x2: \"5\", y1: \"8\", y2: \"8\", key: \"14m1p5\" }],\n [\"line\", { x1: \"16\", x2: \"16\", y1: \"19\", y2: \"22\", key: \"rzdirn\" }],\n [\"line\", { x1: \"19\", x2: \"22\", y1: \"16\", y2: \"16\", key: \"ox905f\" }]\n]);\n\nexport { Unlink as default };\n//# sourceMappingURL=unlink.js.map\n","import { UnlinkIcon } from \"lucide-react\";\nimport { Link, useParams } from \"react-router-dom\";\nimport { CategoryHeading } from \"./CategoryHeading.js\";\nimport { DeveloperHint } from \"./DeveloperHint.js\";\nimport { Heading } from \"./Heading.js\";\nimport { ProseClasses } from \"./Markdown.js\";\n\nexport const NotFoundPage = () => {\n const params = useParams();\n\n return (\n <div className={ProseClasses + \" h-full pt-[--padding-content-top]\"}>\n <CategoryHeading>404</CategoryHeading>\n <Heading level={1} className=\"flex gap-3.5 items-center\">\n Page not found\n <UnlinkIcon size={24} />\n </Heading>\n <DeveloperHint>\n Start by adding a file at{\" \"}\n <code>\n {\"{PROJECT_ROOT}\"}/{params[\"*\"]}.mdx\n </code>{\" \"}\n and add some content to make this error go away.\n </DeveloperHint>\n <p>\n It seems that the page you are looking for does not exist or may have\n been moved. Please check the URL for any typos or use the navigation\n menu to find the correct page.\n </p>\n <Link to=\"/\">Go back home</Link>\n </div>\n );\n};\n","// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function ErrorAlert({ error }: { error: any }) {\n const message = error?.message ?? \"Something went wrong\";\n const stack = error?.stack;\n\n return (\n <div className=\"flex h-screen max-h-screen min-h-full items-center justify-center bg-primary-background px-4 py-16 lg:px-8\">\n <div className=\"mx-auto max-w-[85%] sm:max-w-[50%]\">\n <h1 className=\"text-4xl font-bold tracking-tight text-h1-text sm:text-5xl\">\n Something went wrong\n </h1>\n <p className=\"mt-5 text-h1-text\">{message}</p>\n {stack ? (\n <pre className=\"mt-5 max-h-[400px] w-full overflow-scroll rounded-md border border-input-border bg-input-background p-3 text-property-name-text text-red-700\">\n {stack}\n </pre>\n ) : null}\n </div>\n </div>\n );\n}\n","import { isRouteErrorResponse, useRouteError } from \"react-router-dom\";\nimport { NotFoundPage } from \"../components/NotFoundPage.js\";\nimport { ErrorAlert } from \"./ErrorAlert.js\";\n\nexport function RouterError() {\n const error = useRouteError();\n\n if (isRouteErrorResponse(error) && error.status === 404) {\n return <NotFoundPage />;\n }\n\n return <ErrorAlert error={error} />;\n}\n","import { useDevPortal } from \"../components/context/DevPortalProvider.js\";\nimport { useAuthState } from \"./state.js\";\n\nexport const useAuth = () => {\n const { authentication } = useDevPortal();\n const authState = useAuthState();\n const isAuthEnabled = typeof authentication !== \"undefined\";\n\n return {\n isAuthEnabled,\n isPending: authState.isPending,\n profile: authState.profile,\n isAuthenticated: authState.profile,\n\n login: async () => {\n if (!isAuthEnabled) {\n throw new Error(\"Authentication is not enabled.\");\n }\n // TODO: Should handle errors/state\n await authentication.signIn();\n },\n\n logout: async () => {\n if (!isAuthEnabled) {\n throw new Error(\"Authentication is not enabled.\");\n }\n // TODO: Should handle errors/state\n await authentication.signOut();\n\n // Redirect to home\n window.location.href = \"/\";\n },\n };\n};\n","import React, { ReactNode, useContext } from \"react\";\n\nexport type Slotlets = Record<string, ReactNode>;\n\nconst SlotletContext = React.createContext<Slotlets | undefined>({});\n\nexport const SlotletProvider = ({\n slotlets,\n children,\n}: {\n children: ReactNode;\n slotlets?: Slotlets;\n}) => {\n return (\n <SlotletContext.Provider value={slotlets}>\n {children}\n </SlotletContext.Provider>\n );\n};\n\nexport const Slotlet = ({ name }: { name: string }) => {\n const x = useContext(SlotletContext);\n\n return x?.[name];\n};\n"],"names":["Unlink","createLucideIcon","NotFoundPage","params","useParams","jsxs","ProseClasses","jsx","CategoryHeading","Heading","UnlinkIcon","DeveloperHint","Link","ErrorAlert","error","message","stack","RouterError","useRouteError","isRouteErrorResponse","useAuth","authentication","useDevPortal","authState","useAuthState","isAuthEnabled","SlotletContext","React","SlotletProvider","slotlets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AAMJ,EAAe,WAGrB,OAAO,SAAS,OAAO;AAAA,IACzB;AAAA,EAAA;AAEJ,GC7BMK,IAAiBC,EAAM,cAAoC,CAAA,CAAE,GAEtDC,IAAkB,CAAC;AAAA,EAC9B,UAAAC;AAAA,EACA,UAAAC;AACF,4BAKKJ,EAAe,UAAf,EAAwB,OAAOG,GAC7B,UAAAC,EACH,CAAA,GAISC,IAAU,CAAC,EAAE,MAAAC,QAA6B;AAC/C,QAAAC,IAAIC,EAAWR,CAAc;AAEnC,SAAOO,KAAA,gBAAAA,EAAID;AACb;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import * as s from "react";
|
|
2
|
+
import * as V from "react-dom";
|
|
3
|
+
import { u as _, q as x, c as q, a as J, k as Q, o as X, f as Z, P as D, d as A, n as $ } from "./Combination-BIdpLnWg.js";
|
|
4
|
+
import { j as R } from "./jsx-runtime-CJBdjYYx.js";
|
|
5
|
+
import { c as ee } from "./Markdown-QsZ-PHET.js";
|
|
6
|
+
/**
|
|
7
|
+
* @license lucide-react v0.378.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/
|
|
12
|
+
const te = ee("LoaderCircle", [
|
|
13
|
+
["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]
|
|
14
|
+
]);
|
|
15
|
+
function ne(e, t) {
|
|
16
|
+
return s.useReducer((r, n) => t[r][n] ?? r, e);
|
|
17
|
+
}
|
|
18
|
+
var oe = (e) => {
|
|
19
|
+
const { present: t, children: r } = e, n = re(t), i = typeof r == "function" ? r({ present: n.isPresent }) : s.Children.only(r), d = _(n.ref, se(i));
|
|
20
|
+
return typeof r == "function" || n.isPresent ? s.cloneElement(i, { ref: d }) : null;
|
|
21
|
+
};
|
|
22
|
+
oe.displayName = "Presence";
|
|
23
|
+
function re(e) {
|
|
24
|
+
const [t, r] = s.useState(), n = s.useRef({}), i = s.useRef(e), d = s.useRef("none"), b = e ? "mounted" : "unmounted", [N, c] = ne(b, {
|
|
25
|
+
mounted: {
|
|
26
|
+
UNMOUNT: "unmounted",
|
|
27
|
+
ANIMATION_OUT: "unmountSuspended"
|
|
28
|
+
},
|
|
29
|
+
unmountSuspended: {
|
|
30
|
+
MOUNT: "mounted",
|
|
31
|
+
ANIMATION_END: "unmounted"
|
|
32
|
+
},
|
|
33
|
+
unmounted: {
|
|
34
|
+
MOUNT: "mounted"
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
return s.useEffect(() => {
|
|
38
|
+
const o = T(n.current);
|
|
39
|
+
d.current = N === "mounted" ? o : "none";
|
|
40
|
+
}, [N]), x(() => {
|
|
41
|
+
const o = n.current, l = i.current;
|
|
42
|
+
if (l !== e) {
|
|
43
|
+
const g = d.current, p = T(o);
|
|
44
|
+
e ? c("MOUNT") : p === "none" || (o == null ? void 0 : o.display) === "none" ? c("UNMOUNT") : c(l && g !== p ? "ANIMATION_OUT" : "UNMOUNT"), i.current = e;
|
|
45
|
+
}
|
|
46
|
+
}, [e, c]), x(() => {
|
|
47
|
+
if (t) {
|
|
48
|
+
const o = (m) => {
|
|
49
|
+
const p = T(n.current).includes(m.animationName);
|
|
50
|
+
m.target === t && p && V.flushSync(() => c("ANIMATION_END"));
|
|
51
|
+
}, l = (m) => {
|
|
52
|
+
m.target === t && (d.current = T(n.current));
|
|
53
|
+
};
|
|
54
|
+
return t.addEventListener("animationstart", l), t.addEventListener("animationcancel", o), t.addEventListener("animationend", o), () => {
|
|
55
|
+
t.removeEventListener("animationstart", l), t.removeEventListener("animationcancel", o), t.removeEventListener("animationend", o);
|
|
56
|
+
};
|
|
57
|
+
} else
|
|
58
|
+
c("ANIMATION_END");
|
|
59
|
+
}, [t, c]), {
|
|
60
|
+
isPresent: ["mounted", "unmountSuspended"].includes(N),
|
|
61
|
+
ref: s.useCallback((o) => {
|
|
62
|
+
o && (n.current = getComputedStyle(o)), r(o);
|
|
63
|
+
}, [])
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function T(e) {
|
|
67
|
+
return (e == null ? void 0 : e.animationName) || "none";
|
|
68
|
+
}
|
|
69
|
+
function se(e) {
|
|
70
|
+
var n, i;
|
|
71
|
+
let t = (n = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : n.get, r = t && "isReactWarning" in t && t.isReactWarning;
|
|
72
|
+
return r ? e.ref : (t = (i = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : i.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
|
|
73
|
+
}
|
|
74
|
+
var O = "rovingFocusGroup.onEntryFocus", ae = { bubbles: !1, cancelable: !0 }, F = "RovingFocusGroup", [P, U, ce] = q(F), [ie, Ee] = J(
|
|
75
|
+
F,
|
|
76
|
+
[ce]
|
|
77
|
+
), [ue, fe] = ie(F), L = s.forwardRef(
|
|
78
|
+
(e, t) => /* @__PURE__ */ R.jsx(P.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ R.jsx(P.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ R.jsx(de, { ...e, ref: t }) }) })
|
|
79
|
+
);
|
|
80
|
+
L.displayName = F;
|
|
81
|
+
var de = s.forwardRef((e, t) => {
|
|
82
|
+
const {
|
|
83
|
+
__scopeRovingFocusGroup: r,
|
|
84
|
+
orientation: n,
|
|
85
|
+
loop: i = !1,
|
|
86
|
+
dir: d,
|
|
87
|
+
currentTabStopId: b,
|
|
88
|
+
defaultCurrentTabStopId: N,
|
|
89
|
+
onCurrentTabStopIdChange: c,
|
|
90
|
+
onEntryFocus: o,
|
|
91
|
+
preventScrollOnEntryFocus: l = !1,
|
|
92
|
+
...m
|
|
93
|
+
} = e, g = s.useRef(null), p = _(t, g), a = Q(d), [I = null, S] = X({
|
|
94
|
+
prop: b,
|
|
95
|
+
defaultProp: N,
|
|
96
|
+
onChange: c
|
|
97
|
+
}), [f, v] = s.useState(!1), C = Z(o), K = U(r), h = s.useRef(!1), [B, y] = s.useState(0);
|
|
98
|
+
return s.useEffect(() => {
|
|
99
|
+
const u = g.current;
|
|
100
|
+
if (u)
|
|
101
|
+
return u.addEventListener(O, C), () => u.removeEventListener(O, C);
|
|
102
|
+
}, [C]), /* @__PURE__ */ R.jsx(
|
|
103
|
+
ue,
|
|
104
|
+
{
|
|
105
|
+
scope: r,
|
|
106
|
+
orientation: n,
|
|
107
|
+
dir: a,
|
|
108
|
+
loop: i,
|
|
109
|
+
currentTabStopId: I,
|
|
110
|
+
onItemFocus: s.useCallback(
|
|
111
|
+
(u) => S(u),
|
|
112
|
+
[S]
|
|
113
|
+
),
|
|
114
|
+
onItemShiftTab: s.useCallback(() => v(!0), []),
|
|
115
|
+
onFocusableItemAdd: s.useCallback(
|
|
116
|
+
() => y((u) => u + 1),
|
|
117
|
+
[]
|
|
118
|
+
),
|
|
119
|
+
onFocusableItemRemove: s.useCallback(
|
|
120
|
+
() => y((u) => u - 1),
|
|
121
|
+
[]
|
|
122
|
+
),
|
|
123
|
+
children: /* @__PURE__ */ R.jsx(
|
|
124
|
+
D.div,
|
|
125
|
+
{
|
|
126
|
+
tabIndex: f || B === 0 ? -1 : 0,
|
|
127
|
+
"data-orientation": n,
|
|
128
|
+
...m,
|
|
129
|
+
ref: p,
|
|
130
|
+
style: { outline: "none", ...e.style },
|
|
131
|
+
onMouseDown: A(e.onMouseDown, () => {
|
|
132
|
+
h.current = !0;
|
|
133
|
+
}),
|
|
134
|
+
onFocus: A(e.onFocus, (u) => {
|
|
135
|
+
const W = !h.current;
|
|
136
|
+
if (u.target === u.currentTarget && W && !f) {
|
|
137
|
+
const M = new CustomEvent(O, ae);
|
|
138
|
+
if (u.currentTarget.dispatchEvent(M), !M.defaultPrevented) {
|
|
139
|
+
const w = K().filter((E) => E.focusable), Y = w.find((E) => E.active), z = w.find((E) => E.id === I), H = [Y, z, ...w].filter(
|
|
140
|
+
Boolean
|
|
141
|
+
).map((E) => E.ref.current);
|
|
142
|
+
k(H, l);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
h.current = !1;
|
|
146
|
+
}),
|
|
147
|
+
onBlur: A(e.onBlur, () => v(!1))
|
|
148
|
+
}
|
|
149
|
+
)
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
}), G = "RovingFocusGroupItem", j = s.forwardRef(
|
|
153
|
+
(e, t) => {
|
|
154
|
+
const {
|
|
155
|
+
__scopeRovingFocusGroup: r,
|
|
156
|
+
focusable: n = !0,
|
|
157
|
+
active: i = !1,
|
|
158
|
+
tabStopId: d,
|
|
159
|
+
...b
|
|
160
|
+
} = e, N = $(), c = d || N, o = fe(G, r), l = o.currentTabStopId === c, m = U(r), { onFocusableItemAdd: g, onFocusableItemRemove: p } = o;
|
|
161
|
+
return s.useEffect(() => {
|
|
162
|
+
if (n)
|
|
163
|
+
return g(), () => p();
|
|
164
|
+
}, [n, g, p]), /* @__PURE__ */ R.jsx(
|
|
165
|
+
P.ItemSlot,
|
|
166
|
+
{
|
|
167
|
+
scope: r,
|
|
168
|
+
id: c,
|
|
169
|
+
focusable: n,
|
|
170
|
+
active: i,
|
|
171
|
+
children: /* @__PURE__ */ R.jsx(
|
|
172
|
+
D.span,
|
|
173
|
+
{
|
|
174
|
+
tabIndex: l ? 0 : -1,
|
|
175
|
+
"data-orientation": o.orientation,
|
|
176
|
+
...b,
|
|
177
|
+
ref: t,
|
|
178
|
+
onMouseDown: A(e.onMouseDown, (a) => {
|
|
179
|
+
n ? o.onItemFocus(c) : a.preventDefault();
|
|
180
|
+
}),
|
|
181
|
+
onFocus: A(e.onFocus, () => o.onItemFocus(c)),
|
|
182
|
+
onKeyDown: A(e.onKeyDown, (a) => {
|
|
183
|
+
if (a.key === "Tab" && a.shiftKey) {
|
|
184
|
+
o.onItemShiftTab();
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
if (a.target !== a.currentTarget) return;
|
|
188
|
+
const I = pe(a, o.orientation, o.dir);
|
|
189
|
+
if (I !== void 0) {
|
|
190
|
+
if (a.metaKey || a.ctrlKey || a.altKey || a.shiftKey) return;
|
|
191
|
+
a.preventDefault();
|
|
192
|
+
let f = m().filter((v) => v.focusable).map((v) => v.ref.current);
|
|
193
|
+
if (I === "last") f.reverse();
|
|
194
|
+
else if (I === "prev" || I === "next") {
|
|
195
|
+
I === "prev" && f.reverse();
|
|
196
|
+
const v = f.indexOf(a.currentTarget);
|
|
197
|
+
f = o.loop ? ve(f, v + 1) : f.slice(v + 1);
|
|
198
|
+
}
|
|
199
|
+
setTimeout(() => k(f));
|
|
200
|
+
}
|
|
201
|
+
})
|
|
202
|
+
}
|
|
203
|
+
)
|
|
204
|
+
}
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
);
|
|
208
|
+
j.displayName = G;
|
|
209
|
+
var le = {
|
|
210
|
+
ArrowLeft: "prev",
|
|
211
|
+
ArrowUp: "prev",
|
|
212
|
+
ArrowRight: "next",
|
|
213
|
+
ArrowDown: "next",
|
|
214
|
+
PageUp: "first",
|
|
215
|
+
Home: "first",
|
|
216
|
+
PageDown: "last",
|
|
217
|
+
End: "last"
|
|
218
|
+
};
|
|
219
|
+
function me(e, t) {
|
|
220
|
+
return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
|
|
221
|
+
}
|
|
222
|
+
function pe(e, t, r) {
|
|
223
|
+
const n = me(e.key, r);
|
|
224
|
+
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(n)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(n)))
|
|
225
|
+
return le[n];
|
|
226
|
+
}
|
|
227
|
+
function k(e, t = !1) {
|
|
228
|
+
const r = document.activeElement;
|
|
229
|
+
for (const n of e)
|
|
230
|
+
if (n === r || (n.focus({ preventScroll: t }), document.activeElement !== r)) return;
|
|
231
|
+
}
|
|
232
|
+
function ve(e, t) {
|
|
233
|
+
return e.map((r, n) => e[(t + n) % e.length]);
|
|
234
|
+
}
|
|
235
|
+
var be = L, Ae = j;
|
|
236
|
+
const Te = ({ size: e = 16 }) => /* @__PURE__ */ R.jsx(te, { size: e, className: "animate-spin" });
|
|
237
|
+
export {
|
|
238
|
+
Ae as I,
|
|
239
|
+
oe as P,
|
|
240
|
+
be as R,
|
|
241
|
+
Te as S,
|
|
242
|
+
Ee as c
|
|
243
|
+
};
|
|
244
|
+
//# sourceMappingURL=Spinner-yPSFgoZ8.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spinner-yPSFgoZ8.js","sources":["../../../node_modules/.pnpm/lucide-react@0.378.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/loader-circle.js","../../../node_modules/.pnpm/@radix-ui+react-presence@1.1.0_@types+react-dom@18.3.0_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@radix-ui/react-presence/dist/index.mjs","../../../node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.0_@types+react-dom@18.3.0_@types+react@18.3.3_react-dom@18.3_c7p7fyahj7jvpuxrqgc7mv7csa/node_modules/@radix-ui/react-roving-focus/dist/index.mjs","../src/lib/components/Spinner.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.378.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst LoaderCircle = createLucideIcon(\"LoaderCircle\", [\n [\"path\", { d: \"M21 12a9 9 0 1 1-6.219-8.56\", key: \"13zald\" }]\n]);\n\nexport { LoaderCircle as default };\n//# sourceMappingURL=loader-circle.js.map\n","\"use client\";\n\n// packages/react/presence/src/Presence.tsx\nimport * as React2 from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// packages/react/presence/src/useStateMachine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// packages/react/presence/src/Presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef({});\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(event.animationName);\n if (event.target === node && isCurrentAnimation) {\n ReactDOM.flushSync(() => send(\"ANIMATION_END\"));\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n if (node2) stylesRef.current = getComputedStyle(node2);\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Presence\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// packages/react/roving-focus/src/RovingFocusGroup.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId = null, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId,\n onChange: onCurrentTabStopIdChange\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n })\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n","import { LoaderCircle } from \"lucide-react\";\n\nexport const Spinner = ({ size = 16 }: { size?: number }) => (\n <LoaderCircle size={size} className=\"animate-spin\" />\n);\n"],"names":["LoaderCircle","createLucideIcon","useStateMachine","initialState","machine","React","state","event","Presence","props","present","children","presence","usePresence","child","React2","ref","useComposedRefs","getElementRef","node","setNode","stylesRef","prevPresentRef","prevAnimationNameRef","send","currentAnimationName","getAnimationName","useLayoutEffect","styles","wasPresent","prevAnimationName","handleAnimationEnd","isCurrentAnimation","ReactDOM","handleAnimationStart","node2","element","getter","_a","mayWarn","_b","ENTRY_FOCUS","EVENT_OPTIONS","GROUP_NAME","Collection","useCollection","createCollectionScope","createCollection","createRovingFocusGroupContext","createRovingFocusGroupScope","createContextScope","RovingFocusProvider","useRovingFocusContext","RovingFocusGroup","forwardedRef","jsx","RovingFocusGroupImpl","__scopeRovingFocusGroup","orientation","loop","dir","currentTabStopIdProp","defaultCurrentTabStopId","onCurrentTabStopIdChange","onEntryFocus","preventScrollOnEntryFocus","groupProps","composedRefs","direction","useDirection","currentTabStopId","setCurrentTabStopId","useControllableState","isTabbingBackOut","setIsTabbingBackOut","handleEntryFocus","useCallbackRef","getItems","isClickFocusRef","focusableItemsCount","setFocusableItemsCount","tabStopId","prevCount","Primitive","composeEventHandlers","isKeyboardFocus","entryFocusEvent","items","item","activeItem","currentItem","candidateNodes","focusFirst","ITEM_NAME","RovingFocusGroupItem","focusable","active","itemProps","autoId","useId","id","context","isCurrentTabStop","onFocusableItemAdd","onFocusableItemRemove","focusIntent","getFocusIntent","currentIndex","wrapArray","MAP_KEY_TO_FOCUS_INTENT","getDirectionAwareKey","key","candidates","preventScroll","PREVIOUSLY_FOCUSED_ELEMENT","candidate","array","startIndex","_","index","Root","Item","Spinner","size"],"mappings":";;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAeC,GAAiB,gBAAgB;AAAA,EACpD,CAAC,QAAQ,EAAE,GAAG,+BAA+B,KAAK,SAAQ,CAAE;AAC9D,CAAC;ACDD,SAASC,GAAgBC,GAAcC,GAAS;AAC9C,SAAOC,EAAM,WAAW,CAACC,GAAOC,MACZH,EAAQE,CAAK,EAAEC,CAAK,KAClBD,GACnBH,CAAY;AACjB;AAGG,IAACK,KAAW,CAACC,MAAU;AACxB,QAAM,EAAE,SAAAC,GAAS,UAAAC,EAAU,IAAGF,GACxBG,IAAWC,GAAYH,CAAO,GAC9BI,IAAQ,OAAOH,KAAa,aAAaA,EAAS,EAAE,SAASC,EAAS,UAAS,CAAE,IAAIG,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E,gBAAAA,MAAAvD,IAAA,EAAa,MAAA2H,GAAY,WAAU,eAAe,CAAA;","x_google_ignoreList":[0,1,2]}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import * as n from "react";
|
|
2
|
+
import { createContext as j, useContext as w, useState as O, useEffect as k, Children as D } from "react";
|
|
3
|
+
import { a as M, o as L, n as q, P as b, d as F, u as B, q as G } from "./Combination-BIdpLnWg.js";
|
|
4
|
+
import { P as $ } from "./Spinner-yPSFgoZ8.js";
|
|
5
|
+
import { j as c } from "./jsx-runtime-CJBdjYYx.js";
|
|
6
|
+
const H = j({ stagger: !1 }), X = ({ children: e }) => {
|
|
7
|
+
const { stagger: r } = w(H), [o, a] = O(!r);
|
|
8
|
+
return k(() => {
|
|
9
|
+
if (o)
|
|
10
|
+
return;
|
|
11
|
+
const t = requestIdleCallback(() => {
|
|
12
|
+
a(!0);
|
|
13
|
+
});
|
|
14
|
+
return () => cancelIdleCallback(t);
|
|
15
|
+
}, [o]), o ? e : D.toArray(e).slice(0, 3);
|
|
16
|
+
};
|
|
17
|
+
var g = "Collapsible", [z, Y] = M(g), [J, R] = z(g), S = n.forwardRef(
|
|
18
|
+
(e, r) => {
|
|
19
|
+
const {
|
|
20
|
+
__scopeCollapsible: o,
|
|
21
|
+
open: a,
|
|
22
|
+
defaultOpen: t,
|
|
23
|
+
disabled: i,
|
|
24
|
+
onOpenChange: l,
|
|
25
|
+
...f
|
|
26
|
+
} = e, [p = !1, d] = L({
|
|
27
|
+
prop: a,
|
|
28
|
+
defaultProp: t,
|
|
29
|
+
onChange: l
|
|
30
|
+
});
|
|
31
|
+
return /* @__PURE__ */ c.jsx(
|
|
32
|
+
J,
|
|
33
|
+
{
|
|
34
|
+
scope: o,
|
|
35
|
+
disabled: i,
|
|
36
|
+
contentId: q(),
|
|
37
|
+
open: p,
|
|
38
|
+
onOpenToggle: n.useCallback(() => d((C) => !C), [d]),
|
|
39
|
+
children: /* @__PURE__ */ c.jsx(
|
|
40
|
+
b.div,
|
|
41
|
+
{
|
|
42
|
+
"data-state": x(p),
|
|
43
|
+
"data-disabled": i ? "" : void 0,
|
|
44
|
+
...f,
|
|
45
|
+
ref: r
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
S.displayName = g;
|
|
53
|
+
var _ = "CollapsibleTrigger", I = n.forwardRef(
|
|
54
|
+
(e, r) => {
|
|
55
|
+
const { __scopeCollapsible: o, ...a } = e, t = R(_, o);
|
|
56
|
+
return /* @__PURE__ */ c.jsx(
|
|
57
|
+
b.button,
|
|
58
|
+
{
|
|
59
|
+
type: "button",
|
|
60
|
+
"aria-controls": t.contentId,
|
|
61
|
+
"aria-expanded": t.open || !1,
|
|
62
|
+
"data-state": x(t.open),
|
|
63
|
+
"data-disabled": t.disabled ? "" : void 0,
|
|
64
|
+
disabled: t.disabled,
|
|
65
|
+
...a,
|
|
66
|
+
ref: r,
|
|
67
|
+
onClick: F(e.onClick, t.onOpenToggle)
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
I.displayName = _;
|
|
73
|
+
var v = "CollapsibleContent", T = n.forwardRef(
|
|
74
|
+
(e, r) => {
|
|
75
|
+
const { forceMount: o, ...a } = e, t = R(v, e.__scopeCollapsible);
|
|
76
|
+
return /* @__PURE__ */ c.jsx($, { present: o || t.open, children: ({ present: i }) => /* @__PURE__ */ c.jsx(K, { ...a, ref: r, present: i }) });
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
T.displayName = v;
|
|
80
|
+
var K = n.forwardRef((e, r) => {
|
|
81
|
+
const { __scopeCollapsible: o, present: a, children: t, ...i } = e, l = R(v, o), [f, p] = n.useState(a), d = n.useRef(null), C = B(r, d), h = n.useRef(0), y = h.current, P = n.useRef(0), N = P.current, m = l.open || f, A = n.useRef(m), u = n.useRef();
|
|
82
|
+
return n.useEffect(() => {
|
|
83
|
+
const s = requestAnimationFrame(() => A.current = !1);
|
|
84
|
+
return () => cancelAnimationFrame(s);
|
|
85
|
+
}, []), G(() => {
|
|
86
|
+
const s = d.current;
|
|
87
|
+
if (s) {
|
|
88
|
+
u.current = u.current || {
|
|
89
|
+
transitionDuration: s.style.transitionDuration,
|
|
90
|
+
animationName: s.style.animationName
|
|
91
|
+
}, s.style.transitionDuration = "0s", s.style.animationName = "none";
|
|
92
|
+
const E = s.getBoundingClientRect();
|
|
93
|
+
h.current = E.height, P.current = E.width, A.current || (s.style.transitionDuration = u.current.transitionDuration, s.style.animationName = u.current.animationName), p(a);
|
|
94
|
+
}
|
|
95
|
+
}, [l.open, a]), /* @__PURE__ */ c.jsx(
|
|
96
|
+
b.div,
|
|
97
|
+
{
|
|
98
|
+
"data-state": x(l.open),
|
|
99
|
+
"data-disabled": l.disabled ? "" : void 0,
|
|
100
|
+
id: l.contentId,
|
|
101
|
+
hidden: !m,
|
|
102
|
+
...i,
|
|
103
|
+
ref: C,
|
|
104
|
+
style: {
|
|
105
|
+
"--radix-collapsible-content-height": y ? `${y}px` : void 0,
|
|
106
|
+
"--radix-collapsible-content-width": N ? `${N}px` : void 0,
|
|
107
|
+
...e.style
|
|
108
|
+
},
|
|
109
|
+
children: m && t
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
});
|
|
113
|
+
function x(e) {
|
|
114
|
+
return e ? "open" : "closed";
|
|
115
|
+
}
|
|
116
|
+
var Z = S, ee = I, te = T;
|
|
117
|
+
export {
|
|
118
|
+
te as C,
|
|
119
|
+
Z as R,
|
|
120
|
+
H as S,
|
|
121
|
+
ee as T,
|
|
122
|
+
X as a
|
|
123
|
+
};
|
|
124
|
+
//# sourceMappingURL=index-BpO_SgPQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-BpO_SgPQ.js","sources":["../src/lib/plugins/openapi/StaggeredRender.tsx","../../../node_modules/.pnpm/@radix-ui+react-collapsible@1.1.0_@types+react-dom@18.3.0_@types+react@18.3.3_react-dom@18.3._qjsk5diswkeszbepgt4ntypuku/node_modules/@radix-ui/react-collapsible/dist/index.mjs"],"sourcesContent":["import {\n Children,\n createContext,\n ReactNode,\n useContext,\n useEffect,\n useState,\n} from \"react\";\n\nexport const StaggeredRenderContext = createContext({ stagger: false });\n\nconst StaggeredRender = ({ children }: { children: ReactNode[] }) => {\n const { stagger } = useContext(StaggeredRenderContext);\n const [renderAll, setRenderAll] = useState(!stagger);\n\n useEffect(() => {\n if (renderAll) {\n return;\n }\n\n const idle = requestIdleCallback(() => {\n setRenderAll(true);\n });\n\n return () => cancelIdleCallback(idle);\n }, [renderAll]);\n\n return !renderAll ? Children.toArray(children).slice(0, 3) : children;\n};\n\nexport default StaggeredRender;\n","\"use client\";\n\n// packages/react/collapsible/src/Collapsible.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { jsx } from \"react/jsx-runtime\";\nvar COLLAPSIBLE_NAME = \"Collapsible\";\nvar [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);\nvar [CollapsibleProvider, useCollapsibleContext] = createCollapsibleContext(COLLAPSIBLE_NAME);\nvar Collapsible = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeCollapsible,\n open: openProp,\n defaultOpen,\n disabled,\n onOpenChange,\n ...collapsibleProps\n } = props;\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /* @__PURE__ */ jsx(\n CollapsibleProvider,\n {\n scope: __scopeCollapsible,\n disabled,\n contentId: useId(),\n open,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(open),\n \"data-disabled\": disabled ? \"\" : void 0,\n ...collapsibleProps,\n ref: forwardedRef\n }\n )\n }\n );\n }\n);\nCollapsible.displayName = COLLAPSIBLE_NAME;\nvar TRIGGER_NAME = \"CollapsibleTrigger\";\nvar CollapsibleTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeCollapsible, ...triggerProps } = props;\n const context = useCollapsibleContext(TRIGGER_NAME, __scopeCollapsible);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-controls\": context.contentId,\n \"aria-expanded\": context.open || false,\n \"data-state\": getState(context.open),\n \"data-disabled\": context.disabled ? \"\" : void 0,\n disabled: context.disabled,\n ...triggerProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n }\n);\nCollapsibleTrigger.displayName = TRIGGER_NAME;\nvar CONTENT_NAME = \"CollapsibleContent\";\nvar CollapsibleContent = React.forwardRef(\n (props, forwardedRef) => {\n const { forceMount, ...contentProps } = props;\n const context = useCollapsibleContext(CONTENT_NAME, props.__scopeCollapsible);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: ({ present }) => /* @__PURE__ */ jsx(CollapsibleContentImpl, { ...contentProps, ref: forwardedRef, present }) });\n }\n);\nCollapsibleContent.displayName = CONTENT_NAME;\nvar CollapsibleContentImpl = React.forwardRef((props, forwardedRef) => {\n const { __scopeCollapsible, present, children, ...contentProps } = props;\n const context = useCollapsibleContext(CONTENT_NAME, __scopeCollapsible);\n const [isPresent, setIsPresent] = React.useState(present);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const heightRef = React.useRef(0);\n const height = heightRef.current;\n const widthRef = React.useRef(0);\n const width = widthRef.current;\n const isOpen = context.open || isPresent;\n const isMountAnimationPreventedRef = React.useRef(isOpen);\n const originalStylesRef = React.useRef();\n React.useEffect(() => {\n const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);\n return () => cancelAnimationFrame(rAF);\n }, []);\n useLayoutEffect(() => {\n const node = ref.current;\n if (node) {\n originalStylesRef.current = originalStylesRef.current || {\n transitionDuration: node.style.transitionDuration,\n animationName: node.style.animationName\n };\n node.style.transitionDuration = \"0s\";\n node.style.animationName = \"none\";\n const rect = node.getBoundingClientRect();\n heightRef.current = rect.height;\n widthRef.current = rect.width;\n if (!isMountAnimationPreventedRef.current) {\n node.style.transitionDuration = originalStylesRef.current.transitionDuration;\n node.style.animationName = originalStylesRef.current.animationName;\n }\n setIsPresent(present);\n }\n }, [context.open, present]);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(context.open),\n \"data-disabled\": context.disabled ? \"\" : void 0,\n id: context.contentId,\n hidden: !isOpen,\n ...contentProps,\n ref: composedRefs,\n style: {\n [`--radix-collapsible-content-height`]: height ? `${height}px` : void 0,\n [`--radix-collapsible-content-width`]: width ? `${width}px` : void 0,\n ...props.style\n },\n children: isOpen && children\n }\n );\n});\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root = Collapsible;\nvar Trigger = CollapsibleTrigger;\nvar Content = CollapsibleContent;\nexport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n Content,\n Root,\n Trigger,\n createCollapsibleScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["StaggeredRenderContext","createContext","StaggeredRender","children","stagger","useContext","renderAll","setRenderAll","useState","useEffect","idle","Children","COLLAPSIBLE_NAME","createCollapsibleContext","createCollapsibleScope","createContextScope","CollapsibleProvider","useCollapsibleContext","Collapsible","React","props","forwardedRef","__scopeCollapsible","openProp","defaultOpen","disabled","onOpenChange","collapsibleProps","open","setOpen","useControllableState","jsx","useId","prevOpen","Primitive","getState","TRIGGER_NAME","CollapsibleTrigger","triggerProps","context","composeEventHandlers","CONTENT_NAME","CollapsibleContent","forceMount","contentProps","Presence","present","CollapsibleContentImpl","isPresent","setIsPresent","ref","composedRefs","useComposedRefs","heightRef","height","widthRef","width","isOpen","isMountAnimationPreventedRef","originalStylesRef","rAF","useLayoutEffect","node","rect","Root","Trigger","Content"],"mappings":";;;;;AASO,MAAMA,IAAyBC,EAAc,EAAE,SAAS,IAAO,GAEhEC,IAAkB,CAAC,EAAE,UAAAC,QAA0C;AACnE,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAWL,CAAsB,GAC/C,CAACM,GAAWC,CAAY,IAAIC,EAAS,CAACJ,CAAO;AAEnD,SAAAK,EAAU,MAAM;AACd,QAAIH;AACF;AAGI,UAAAI,IAAO,oBAAoB,MAAM;AACrC,MAAAH,EAAa,EAAI;AAAA,IAAA,CAClB;AAEM,WAAA,MAAM,mBAAmBG,CAAI;AAAA,EAAA,GACnC,CAACJ,CAAS,CAAC,GAENA,IAAqDH,IAAzCQ,EAAS,QAAQR,CAAQ,EAAE,MAAM,GAAG,CAAC;AAC3D;ACfA,IAAIS,IAAmB,eACnB,CAACC,GAA0BC,CAAsB,IAAIC,EAAmBH,CAAgB,GACxF,CAACI,GAAqBC,CAAqB,IAAIJ,EAAyBD,CAAgB,GACxFM,IAAcC,EAAM;AAAA,EACtB,CAACC,GAAOC,MAAiB;AACvB,UAAM;AAAA,MACJ,oBAAAC;AAAA,MACA,MAAMC;AAAA,MACN,aAAAC;AAAA,MACA,UAAAC;AAAA,MACA,cAAAC;AAAA,MACA,GAAGC;AAAA,IACJ,IAAGP,GACE,CAACQ,IAAO,IAAOC,CAAO,IAAIC,EAAqB;AAAA,MACnD,MAAMP;AAAA,MACN,aAAaC;AAAA,MACb,UAAUE;AAAA,IAChB,CAAK;AACD,WAAuBK,gBAAAA,EAAG;AAAA,MACxBf;AAAA,MACA;AAAA,QACE,OAAOM;AAAA,QACP,UAAAG;AAAA,QACA,WAAWO,EAAO;AAAA,QAClB,M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