zudoku 0.66.3 → 0.66.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/authentication/components/CallbackHandler.js +1 -1
- package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
- package/dist/lib/authentication/components/SignIn.js +4 -2
- package/dist/lib/authentication/components/SignIn.js.map +1 -1
- package/dist/lib/authentication/components/SignUp.js +4 -2
- package/dist/lib/authentication/components/SignUp.js.map +1 -1
- package/dist/lib/core/RouteGuard.js +12 -7
- package/dist/lib/core/RouteGuard.js.map +1 -1
- package/dist/lib/oas/graphql/index.js +7 -3
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.d.ts +9 -5
- package/dist/lib/plugins/api-keys/index.js +20 -11
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/api-keys/settings/ApiKeyList.js +3 -0
- package/dist/lib/plugins/api-keys/settings/ApiKeyList.js.map +1 -1
- package/dist/lib/plugins/openapi/ParamInfos.js +1 -0
- package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +3 -2
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/util/createHttpSnippet.js +24 -1
- package/dist/lib/plugins/openapi/util/createHttpSnippet.js.map +1 -1
- package/dist/lib/ui/Button.js +1 -1
- package/dist/lib/ui/Button.js.map +1 -1
- package/dist/lib/util/invariant.d.ts +1 -1
- package/dist/lib/util/invariant.js +2 -2
- package/dist/lib/util/invariant.js.map +1 -1
- package/dist/vite/mdx/remark-link-rewrite.js +1 -1
- package/dist/vite/plugin-api-keys.js +1 -0
- package/dist/vite/plugin-api-keys.js.map +1 -1
- package/dist/vite/plugin-markdown-export.js +1 -1
- package/dist/vite/plugin-markdown-export.js.map +1 -1
- package/dist/vite/prerender/worker.js +3 -0
- package/dist/vite/prerender/worker.js.map +1 -1
- package/lib/{ActionButton-DUgvSylL.js → ActionButton-B0CXL1Lq.js} +3 -3
- package/lib/{ActionButton-DUgvSylL.js.map → ActionButton-B0CXL1Lq.js.map} +1 -1
- package/lib/{Button-CynVW1JV.js → Button-GUVe7pmt.js} +8 -7
- package/lib/{Button-CynVW1JV.js.map → Button-GUVe7pmt.js.map} +1 -1
- package/lib/{Card-KFniaZn5.js → Card-DCdq37aA.js} +2 -2
- package/lib/{Card-KFniaZn5.js.map → Card-DCdq37aA.js.map} +1 -1
- package/lib/{ClaudeLogo-BZslN9XF.js → ClaudeLogo-ByzA8TYR.js} +3 -3
- package/lib/{ClaudeLogo-BZslN9XF.js.map → ClaudeLogo-ByzA8TYR.js.map} +1 -1
- package/lib/{Command-BpT1iBE6.js → Command-N6VujV30.js} +3 -3
- package/lib/{Command-BpT1iBE6.js.map → Command-N6VujV30.js.map} +1 -1
- package/lib/{Dialog-BQciPiHN.js → Dialog-hlvmmQ_c.js} +2 -2
- package/lib/{Dialog-BQciPiHN.js.map → Dialog-hlvmmQ_c.js.map} +1 -1
- package/lib/{Drawer-BRMcpfuF.js → Drawer-Ch7927PF.js} +2 -2
- package/lib/{Drawer-BRMcpfuF.js.map → Drawer-Ch7927PF.js.map} +1 -1
- package/lib/{DropdownMenu-C8SX_-S_.js → DropdownMenu-DN0jNrjj.js} +2 -2
- package/lib/{DropdownMenu-C8SX_-S_.js.map → DropdownMenu-DN0jNrjj.js.map} +1 -1
- package/lib/{Frame-DxlznfVd.js → Frame-DKlOmSkU.js} +2 -2
- package/lib/{Frame-DxlznfVd.js.map → Frame-DKlOmSkU.js.map} +1 -1
- package/lib/{IndexingDialog-B5zCiUKr.js → IndexingDialog-D0YdGfbn.js} +3 -3
- package/lib/{IndexingDialog-B5zCiUKr.js.map → IndexingDialog-D0YdGfbn.js.map} +1 -1
- package/lib/{Input-D-kqEQ5M.js → Input-nskrp_mj.js} +39 -18
- package/lib/Input-nskrp_mj.js.map +1 -0
- package/lib/{MdxPage-B4zZq5aR.js → MdxPage-Bh5YNRV9.js} +10 -10
- package/lib/{MdxPage-B4zZq5aR.js.map → MdxPage-Bh5YNRV9.js.map} +1 -1
- package/lib/{Mermaid-BjSczjLW.js → Mermaid-CGRoylZf.js} +4 -4
- package/lib/{Mermaid-BjSczjLW.js.map → Mermaid-CGRoylZf.js.map} +1 -1
- package/lib/{OAuthErrorPage-DRY2hlga.js → OAuthErrorPage-CsTKz5hX.js} +8 -8
- package/lib/OAuthErrorPage-CsTKz5hX.js.map +1 -0
- package/lib/{OasProvider-lMwTD76Y.js → OasProvider-BBAbJiYa.js} +3 -3
- package/lib/{OasProvider-lMwTD76Y.js.map → OasProvider-BBAbJiYa.js.map} +1 -1
- package/lib/{OperationList-Bm76b4vl.js → OperationList-DUxrNisd.js} +1104 -1089
- package/lib/{OperationList-Bm76b4vl.js.map → OperationList-DUxrNisd.js.map} +1 -1
- package/lib/RouteGuard-CIN9Ou-r.js +77 -0
- package/lib/RouteGuard-CIN9Ou-r.js.map +1 -0
- package/lib/{SchemaList-DX4FPogg.js → SchemaList-BbnkfjIe.js} +9 -9
- package/lib/{SchemaList-DX4FPogg.js.map → SchemaList-BbnkfjIe.js.map} +1 -1
- package/lib/{SchemaView-CjXvSRxy.js → SchemaView-BrUf6_nP.js} +112 -111
- package/lib/SchemaView-BrUf6_nP.js.map +1 -0
- package/lib/{Secret-BxGpIhDP.js → Secret-BDBqq4p3.js} +2 -2
- package/lib/{Secret-BxGpIhDP.js.map → Secret-BDBqq4p3.js.map} +1 -1
- package/lib/{Separator-CTPSeW1S.js → Separator-BXt1LYnm.js} +2 -2
- package/lib/{Separator-CTPSeW1S.js.map → Separator-BXt1LYnm.js.map} +1 -1
- package/lib/SignUp-AlaaduyY.js +50 -0
- package/lib/SignUp-AlaaduyY.js.map +1 -0
- package/lib/{SyntaxHighlight-Dgd0AaaX.js → SyntaxHighlight-DveJcTOQ.js} +4 -4
- package/lib/{SyntaxHighlight-Dgd0AaaX.js.map → SyntaxHighlight-DveJcTOQ.js.map} +1 -1
- package/lib/{Toc-L1vGGHA1.js → Toc-B4ShtN-I.js} +3 -3
- package/lib/{Toc-L1vGGHA1.js.map → Toc-B4ShtN-I.js.map} +1 -1
- package/lib/{ZudokuContext-DNHMZfcP.js → ZudokuContext-CDJYKqMY.js} +542 -469
- package/lib/ZudokuContext-CDJYKqMY.js.map +1 -0
- package/lib/{___vite-browser-external_commonjs-proxy-Cga3HsWk.js → ___vite-browser-external_commonjs-proxy-BttVsNON.js} +2 -2
- package/lib/___vite-browser-external_commonjs-proxy-BttVsNON.js.map +1 -0
- package/lib/chunk-PVWAREVJ-ClM0m2aJ.js.map +1 -1
- package/lib/{circular-BIN_WQ0c.js → circular-CuSWVYOZ.js} +2 -2
- package/lib/{circular-BIN_WQ0c.js.map → circular-CuSWVYOZ.js.map} +1 -1
- package/lib/{cn-dYga0KKN.js → cn-5-Gd1Dss.js} +531 -498
- package/lib/cn-5-Gd1Dss.js.map +1 -0
- package/lib/{createServer-BEl12QFw.js → createServer-B1_RUTJP.js} +12 -12
- package/lib/{createServer-BEl12QFw.js.map → createServer-B1_RUTJP.js.map} +1 -1
- package/lib/{createVariantComponent-CQVt-H3r.js → createVariantComponent-Dc0vtOvr.js} +2 -2
- package/lib/{createVariantComponent-CQVt-H3r.js.map → createVariantComponent-Dc0vtOvr.js.map} +1 -1
- package/lib/{errors-CtBbD47A.js → errors-iDfQAr_v.js} +3 -3
- package/lib/{errors-CtBbD47A.js.map → errors-iDfQAr_v.js.map} +1 -1
- package/lib/{firebase-CT38ugg4.js → firebase-I54w2ZsH.js} +20 -20
- package/lib/{firebase-CT38ugg4.js.map → firebase-I54w2ZsH.js.map} +1 -1
- package/lib/{hook-CHw_R_xu.js → hook-BxWvqzB0.js} +2 -2
- package/lib/{hook-CHw_R_xu.js.map → hook-BxWvqzB0.js.map} +1 -1
- package/lib/{index-CG2v-T7-.js → index-A5Cre871.js} +11 -11
- package/lib/{index-CG2v-T7-.js.map → index-A5Cre871.js.map} +1 -1
- package/lib/{index-jI2Fjpy-.js → index-B4puReRo.js} +20 -20
- package/lib/{index-jI2Fjpy-.js.map → index-B4puReRo.js.map} +1 -1
- package/lib/{index-DXXZDuSJ.js → index-CjTisMeX.js} +3 -3
- package/lib/{index-DXXZDuSJ.js.map → index-CjTisMeX.js.map} +1 -1
- package/lib/index-CrcNWbel.js.map +1 -1
- package/lib/{index-CISwSpdT.js → index-Dbrv6d94.js} +2 -2
- package/lib/{index-CISwSpdT.js.map → index-Dbrv6d94.js.map} +1 -1
- package/lib/index.esm-BYObtETB.js.map +1 -1
- package/lib/{index.esm-DtzT_KoE.js → index.esm-B_0dvNjB.js} +2 -2
- package/lib/{index.esm-DtzT_KoE.js.map → index.esm-B_0dvNjB.js.map} +1 -1
- package/lib/{index.esm-Bu35TNgg.js → index.esm-BxIXRKtj.js} +2 -2
- package/lib/index.esm-BxIXRKtj.js.map +1 -0
- package/lib/{invariant-CGOLuIIz.js → invariant-BJAl77rw.js} +4 -4
- package/lib/invariant-BJAl77rw.js.map +1 -0
- package/lib/jsx-runtime-BzflLqGi.js.map +1 -1
- package/lib/{mutation-DMHWqmFp.js → mutation-Cq0wKBqW.js} +70 -44
- package/lib/mutation-Cq0wKBqW.js.map +1 -0
- package/lib/ui/Accordion.js +1 -1
- package/lib/ui/ActionButton.js +2 -2
- package/lib/ui/Alert.js +1 -1
- package/lib/ui/AlertDialog.js +1 -1
- package/lib/ui/Badge.js +1 -1
- package/lib/ui/Breadcrumb.js +1 -1
- package/lib/ui/Button.js +7 -6
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/ButtonGroup.js +1 -1
- package/lib/ui/Callout.js +1 -1
- package/lib/ui/Card.js +1 -1
- package/lib/ui/Carousel.js +1 -1
- package/lib/ui/Carousel.js.map +1 -1
- package/lib/ui/Checkbox.js +1 -1
- package/lib/ui/CodeBlock.js +1 -1
- package/lib/ui/Command.js +2 -2
- package/lib/ui/Dialog.js +1 -1
- package/lib/ui/Drawer.js +2 -2
- package/lib/ui/DropdownMenu.js +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +1 -1
- package/lib/ui/Form.js +1 -1
- package/lib/ui/Frame.js +1 -1
- package/lib/ui/HoverCard.js +1 -1
- package/lib/ui/Input.js +1 -1
- package/lib/ui/Item.js +1 -1
- package/lib/ui/Label.js +1 -1
- package/lib/ui/NativeSelect.js +1 -1
- package/lib/ui/Pagination.js +1 -1
- package/lib/ui/Popover.js +1 -1
- package/lib/ui/Progress.js +1 -1
- package/lib/ui/RadioGroup.js +1 -1
- package/lib/ui/ScrollArea.js +1 -1
- package/lib/ui/Secret.js +1 -1
- package/lib/ui/Separator.js +1 -1
- package/lib/ui/Skeleton.js +1 -1
- package/lib/ui/Slider.js +1 -1
- package/lib/ui/Switch.js +1 -1
- package/lib/ui/SyntaxHighlight.js +3 -3
- package/lib/ui/Tabs.js +1 -1
- package/lib/ui/Textarea.js +1 -1
- package/lib/ui/Toggle.js +1 -1
- package/lib/ui/ToggleGroup.js +1 -1
- package/lib/ui/Value.js +1 -1
- package/lib/ui/util.js +1 -1
- package/lib/zudoku.__internal.js +576 -574
- package/lib/zudoku.__internal.js.map +1 -1
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-azureb2c.js +4 -4
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-firebase.js +5 -5
- package/lib/zudoku.auth-openid.js +5 -5
- package/lib/zudoku.auth-supabase.js +4 -4
- package/lib/zudoku.components.js +5 -5
- package/lib/zudoku.hooks.js +3 -3
- package/lib/zudoku.mermaid.js +3 -3
- package/lib/zudoku.plugin-api-catalog.js +4 -4
- package/lib/zudoku.plugin-api-keys.js +258 -242
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +2 -2
- package/lib/zudoku.plugin-search-pagefind.js +6 -6
- package/lib/zudoku.router.js.map +1 -1
- package/package.json +6 -6
- package/src/lib/authentication/components/CallbackHandler.tsx +1 -1
- package/src/lib/authentication/components/SignIn.tsx +5 -2
- package/src/lib/authentication/components/SignUp.tsx +5 -2
- package/src/lib/core/RouteGuard.tsx +30 -24
- package/src/lib/oas/graphql/index.ts +7 -3
- package/src/lib/plugins/api-keys/index.tsx +48 -19
- package/src/lib/plugins/api-keys/settings/ApiKeyList.tsx +3 -0
- package/src/lib/plugins/openapi/ParamInfos.tsx +1 -0
- package/src/lib/plugins/openapi/Sidecar.tsx +3 -2
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +6 -4
- package/src/lib/plugins/openapi/util/createHttpSnippet.ts +29 -1
- package/src/lib/ui/Button.tsx +1 -0
- package/src/lib/util/invariant.ts +2 -1
- package/lib/Input-D-kqEQ5M.js.map +0 -1
- package/lib/OAuthErrorPage-DRY2hlga.js.map +0 -1
- package/lib/RouteGuard-DGc32XJV.js +0 -77
- package/lib/RouteGuard-DGc32XJV.js.map +0 -1
- package/lib/SchemaView-CjXvSRxy.js.map +0 -1
- package/lib/SignUp-CntxjFGS.js +0 -50
- package/lib/SignUp-CntxjFGS.js.map +0 -1
- package/lib/ZudokuContext-DNHMZfcP.js.map +0 -1
- package/lib/___vite-browser-external_commonjs-proxy-Cga3HsWk.js.map +0 -1
- package/lib/cn-dYga0KKN.js.map +0 -1
- package/lib/index.esm-Bu35TNgg.js.map +0 -1
- package/lib/invariant-CGOLuIIz.js.map +0 -1
- package/lib/mutation-DMHWqmFp.js.map +0 -1
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { j as t } from "./jsx-runtime-BzflLqGi.js";
|
|
2
|
+
import { H as f } from "./index.esm-B_0dvNjB.js";
|
|
3
|
+
import { createContext as x, use as g } from "react";
|
|
4
|
+
import { u as j, a as v, m as C, O as h } from "./chunk-PVWAREVJ-ClM0m2aJ.js";
|
|
5
|
+
import { B as a } from "./Button-GUVe7pmt.js";
|
|
6
|
+
import { D as R, a as D, b as w, c as E, d as T, e as b } from "./Dialog-hlvmmQ_c.js";
|
|
7
|
+
import { u as k } from "./hook-BxWvqzB0.js";
|
|
8
|
+
import { a as y } from "./ZudokuContext-CDJYKqMY.js";
|
|
9
|
+
import { Z as P } from "./invariant-BJAl77rw.js";
|
|
10
|
+
import { u as O } from "./useLatest-hmRS46UF.js";
|
|
11
|
+
const A = x(!1), B = "protected", U = () => {
|
|
12
|
+
const n = k(), e = y(), o = j(), r = v(), c = O(r.pathname), m = g(A), { protectedRoutes: u } = e.options, d = u ? Object.entries(u).find(
|
|
13
|
+
([s]) => C({ path: s, end: !0 }, r.pathname)
|
|
14
|
+
) : void 0, i = d !== void 0;
|
|
15
|
+
if (m)
|
|
16
|
+
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
17
|
+
i && /* @__PURE__ */ t.jsx(f, { children: /* @__PURE__ */ t.jsx(
|
|
18
|
+
"meta",
|
|
19
|
+
{
|
|
20
|
+
name: "pagefind",
|
|
21
|
+
"data-pagefind-filter": `section:${B}`,
|
|
22
|
+
content: "true"
|
|
23
|
+
}
|
|
24
|
+
) }),
|
|
25
|
+
/* @__PURE__ */ t.jsx(h, {})
|
|
26
|
+
] });
|
|
27
|
+
if (i && !n.isAuthEnabled)
|
|
28
|
+
throw new P("Authentication is not enabled", {
|
|
29
|
+
title: "Authentication is not enabled",
|
|
30
|
+
developerHint: "To use protectedRoutes you need authentication to be enabled"
|
|
31
|
+
});
|
|
32
|
+
const p = d?.[1], l = i && !p?.({ auth: n, context: e });
|
|
33
|
+
return l && n.isPending && typeof window < "u" ? null : l ? /* @__PURE__ */ t.jsx(
|
|
34
|
+
R,
|
|
35
|
+
{
|
|
36
|
+
open: !0,
|
|
37
|
+
onOpenChange: (s) => {
|
|
38
|
+
s || o(-1);
|
|
39
|
+
},
|
|
40
|
+
children: /* @__PURE__ */ t.jsxs(D, { children: [
|
|
41
|
+
/* @__PURE__ */ t.jsx(w, { children: /* @__PURE__ */ t.jsx(E, { children: "Login to continue" }) }),
|
|
42
|
+
/* @__PURE__ */ t.jsx(T, { children: "Please wait while we log you in." }),
|
|
43
|
+
/* @__PURE__ */ t.jsxs(b, { children: [
|
|
44
|
+
/* @__PURE__ */ t.jsx(a, { variant: "outline", onClick: () => void o(-1), children: "Cancel" }),
|
|
45
|
+
/* @__PURE__ */ t.jsx("div", { className: "w-full" }),
|
|
46
|
+
/* @__PURE__ */ t.jsx(
|
|
47
|
+
a,
|
|
48
|
+
{
|
|
49
|
+
variant: "secondary",
|
|
50
|
+
onClick: () => void e.authentication?.signUp(
|
|
51
|
+
{ navigate: o },
|
|
52
|
+
{ redirectTo: c.current }
|
|
53
|
+
),
|
|
54
|
+
children: "Register"
|
|
55
|
+
}
|
|
56
|
+
),
|
|
57
|
+
/* @__PURE__ */ t.jsx(
|
|
58
|
+
a,
|
|
59
|
+
{
|
|
60
|
+
onClick: () => void e.authentication?.signIn(
|
|
61
|
+
{ navigate: o },
|
|
62
|
+
{ redirectTo: c.current }
|
|
63
|
+
),
|
|
64
|
+
children: "Login"
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
] })
|
|
68
|
+
] })
|
|
69
|
+
}
|
|
70
|
+
) : /* @__PURE__ */ t.jsx(h, {});
|
|
71
|
+
};
|
|
72
|
+
export {
|
|
73
|
+
A as B,
|
|
74
|
+
U as R,
|
|
75
|
+
B as S
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=RouteGuard-CIN9Ou-r.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RouteGuard-CIN9Ou-r.js","sources":["../src/lib/components/context/BypassProtectedRoutesContext.ts","../src/lib/core/RouteGuard.tsx"],"sourcesContent":["import { createContext } from \"react\";\n\nexport const BypassProtectedRoutesContext = createContext(false);\n","import { Helmet } from \"@zudoku/react-helmet-async\";\nimport { use } from \"react\";\nimport { matchPath, Outlet, useLocation, useNavigate } from \"react-router\";\nimport { Button } from \"zudoku/ui/Button.js\";\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n} from \"zudoku/ui/Dialog.js\";\nimport { useAuth } from \"../authentication/hook.js\";\nimport { BypassProtectedRoutesContext } from \"../components/context/BypassProtectedRoutesContext.js\";\nimport { useZudoku } from \"../components/context/ZudokuContext.js\";\nimport { ZudokuError } from \"../util/invariant.js\";\nimport { useLatest } from \"../util/useLatest.js\";\n\nexport const SEARCH_PROTECTED_SECTION = \"protected\";\n\nexport const RouteGuard = () => {\n const auth = useAuth();\n const zudoku = useZudoku();\n const navigate = useNavigate();\n const location = useLocation();\n const latestPath = useLatest(location.pathname);\n const shouldBypass = use(BypassProtectedRoutesContext);\n const { protectedRoutes } = zudoku.options;\n\n const protectedRouteEntry = protectedRoutes\n ? Object.entries(protectedRoutes).find(([path]) =>\n matchPath({ path, end: true }, location.pathname),\n )\n : undefined;\n\n const isProtectedRoute = protectedRouteEntry !== undefined;\n\n // SSR/prerendering mode: render content with search meta tag, skip all auth\n if (shouldBypass) {\n return (\n <>\n {isProtectedRoute && (\n <Helmet>\n <meta\n name=\"pagefind\"\n data-pagefind-filter={`section:${SEARCH_PROTECTED_SECTION}`}\n content=\"true\"\n />\n </Helmet>\n )}\n <Outlet />\n </>\n );\n }\n\n if (isProtectedRoute && !auth.isAuthEnabled) {\n throw new ZudokuError(\"Authentication is not enabled\", {\n title: \"Authentication is not enabled\",\n developerHint:\n \"To use protectedRoutes you need authentication to be enabled\",\n });\n }\n\n const authCheckFn = protectedRouteEntry?.[1];\n const needsToSignIn =\n isProtectedRoute && !authCheckFn?.({ auth, context: zudoku });\n\n if (needsToSignIn && auth.isPending && typeof window !== \"undefined\") {\n return null;\n }\n\n if (needsToSignIn) {\n return (\n <Dialog\n open={true}\n onOpenChange={(open) => {\n if (!open) {\n void navigate(-1);\n }\n }}\n >\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Login to continue</DialogTitle>\n </DialogHeader>\n <DialogDescription>\n Please wait while we log you in.\n </DialogDescription>\n <DialogFooter>\n <Button variant=\"outline\" onClick={() => void navigate(-1)}>\n Cancel\n </Button>\n <div className=\"w-full\"></div>\n <Button\n variant=\"secondary\"\n onClick={() =>\n void zudoku.authentication?.signUp(\n { navigate },\n { redirectTo: latestPath.current },\n )\n }\n >\n Register\n </Button>\n <Button\n onClick={() =>\n void zudoku.authentication?.signIn(\n { navigate },\n { redirectTo: latestPath.current },\n )\n }\n >\n Login\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n );\n }\n\n return <Outlet />;\n};\n"],"names":["BypassProtectedRoutesContext","createContext","SEARCH_PROTECTED_SECTION","RouteGuard","auth","useAuth","zudoku","useZudoku","navigate","useNavigate","location","useLocation","latestPath","useLatest","shouldBypass","use","protectedRoutes","protectedRouteEntry","path","matchPath","isProtectedRoute","jsxs","Fragment","Helmet","jsx","Outlet","ZudokuError","authCheckFn","needsToSignIn","Dialog","open","DialogContent","DialogHeader","DialogTitle","DialogDescription","DialogFooter","Button"],"mappings":";;;;;;;;;;AAEO,MAAMA,IAA+BC,EAAc,EAAK,GCgBlDC,IAA2B,aAE3BC,IAAa,MAAM;AAC9B,QAAMC,IAAOC,EAAA,GACPC,IAASC,EAAA,GACTC,IAAWC,EAAA,GACXC,IAAWC,EAAA,GACXC,IAAaC,EAAUH,EAAS,QAAQ,GACxCI,IAAeC,EAAIf,CAA4B,GAC/C,EAAE,iBAAAgB,MAAoBV,EAAO,SAE7BW,IAAsBD,IACxB,OAAO,QAAQA,CAAe,EAAE;AAAA,IAAK,CAAC,CAACE,CAAI,MACzCC,EAAU,EAAE,MAAAD,GAAM,KAAK,MAAQR,EAAS,QAAQ;AAAA,EAAA,IAElD,QAEEU,IAAmBH,MAAwB;AAGjD,MAAIH;AACF,WACEO,gBAAAA,EAAAA,KAAAC,YAAA,EACG,UAAA;AAAA,MAAAF,2BACEG,GAAA,EACC,UAAAC,gBAAAA,EAAAA;AAAAA,QAAC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,wBAAsB,WAAWtB,CAAwB;AAAA,UACzD,SAAQ;AAAA,QAAA;AAAA,MAAA,GAEZ;AAAA,4BAEDuB,GAAA,CAAA,CAAO;AAAA,IAAA,GACV;AAIJ,MAAIL,KAAoB,CAAChB,EAAK;AAC5B,UAAM,IAAIsB,EAAY,iCAAiC;AAAA,MACrD,OAAO;AAAA,MACP,eACE;AAAA,IAAA,CACH;AAGH,QAAMC,IAAcV,IAAsB,CAAC,GACrCW,IACJR,KAAoB,CAACO,IAAc,EAAE,MAAAvB,GAAM,SAASE,GAAQ;AAE9D,SAAIsB,KAAiBxB,EAAK,aAAa,OAAO,SAAW,MAChD,OAGLwB,IAEAJ,gBAAAA,EAAAA;AAAAA,IAACK;AAAA,IAAA;AAAA,MACC,MAAM;AAAA,MACN,cAAc,CAACC,MAAS;AACtB,QAAKA,KACEtB,EAAS,EAAE;AAAA,MAEpB;AAAA,MAEA,iCAACuB,GAAA,EACC,UAAA;AAAA,QAAAP,gBAAAA,MAACQ,GAAA,EACC,UAAAR,gBAAAA,EAAAA,IAACS,GAAA,EAAY,UAAA,oBAAA,CAAiB,GAChC;AAAA,QACAT,gBAAAA,EAAAA,IAACU,KAAkB,UAAA,mCAAA,CAEnB;AAAA,+BACCC,GAAA,EACC,UAAA;AAAA,UAAAX,gBAAAA,EAAAA,IAACY,GAAA,EAAO,SAAQ,WAAU,SAAS,MAAM,KAAK5B,EAAS,EAAE,GAAG,UAAA,SAAA,CAE5D;AAAA,UACAgB,gBAAAA,EAAAA,IAAC,OAAA,EAAI,WAAU,SAAA,CAAS;AAAA,UACxBA,gBAAAA,EAAAA;AAAAA,YAACY;AAAA,YAAA;AAAA,cACC,SAAQ;AAAA,cACR,SAAS,MACP,KAAK9B,EAAO,gBAAgB;AAAA,gBAC1B,EAAE,UAAAE,EAAA;AAAA,gBACF,EAAE,YAAYI,EAAW,QAAA;AAAA,cAAQ;AAAA,cAGtC,UAAA;AAAA,YAAA;AAAA,UAAA;AAAA,UAGDY,gBAAAA,EAAAA;AAAAA,YAACY;AAAA,YAAA;AAAA,cACC,SAAS,MACP,KAAK9B,EAAO,gBAAgB;AAAA,gBAC1B,EAAE,UAAAE,EAAA;AAAA,gBACF,EAAE,YAAYI,EAAW,QAAA;AAAA,cAAQ;AAAA,cAGtC,UAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QAED,EAAA,CACF;AAAA,MAAA,EAAA,CACF;AAAA,IAAA;AAAA,EAAA,0BAKEa,GAAA,EAAO;AACjB;"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-BzflLqGi.js";
|
|
2
|
-
import { s as o } from "./index-
|
|
3
|
-
import { e as j } from "./ZudokuContext-
|
|
4
|
-
import { H as c } from "./index.esm-
|
|
2
|
+
import { s as o } from "./index-Dbrv6d94.js";
|
|
3
|
+
import { e as j } from "./ZudokuContext-CDJYKqMY.js";
|
|
4
|
+
import { H as c } from "./index.esm-B_0dvNjB.js";
|
|
5
5
|
import { ChevronsUpDownIcon as y, ChevronsDownUpIcon as N, ChevronRightIcon as b } from "lucide-react";
|
|
6
|
-
import { B as v } from "./Button-
|
|
7
|
-
import { u as C, a as w, C as m, b as l, c as d, d as S } from "./index-
|
|
6
|
+
import { B as v } from "./Button-GUVe7pmt.js";
|
|
7
|
+
import { u as C, a as w, C as m, b as l, c as d, d as S } from "./index-B4puReRo.js";
|
|
8
8
|
import { C as A } from "./CategoryHeading-DhmodDcq.js";
|
|
9
|
-
import { H as p, M as H } from "./index-
|
|
10
|
-
import { T as I } from "./Toc-
|
|
11
|
-
import { P as z, S as M } from "./SchemaView-
|
|
9
|
+
import { H as p, M as H } from "./index-A5Cre871.js";
|
|
10
|
+
import { T as I } from "./Toc-B4ShtN-I.js";
|
|
11
|
+
import { P as z, S as M } from "./SchemaView-BrUf6_nP.js";
|
|
12
12
|
const P = S(
|
|
13
13
|
/* GraphQL */
|
|
14
14
|
`
|
|
@@ -148,4 +148,4 @@ function R() {
|
|
|
148
148
|
export {
|
|
149
149
|
R as SchemaList
|
|
150
150
|
};
|
|
151
|
-
//# sourceMappingURL=SchemaList-
|
|
151
|
+
//# sourceMappingURL=SchemaList-BbnkfjIe.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaList-
|
|
1
|
+
{"version":3,"file":"SchemaList-BbnkfjIe.js","sources":["../src/lib/plugins/openapi/SchemaList.tsx"],"sourcesContent":["import slugify from \"@sindresorhus/slugify\";\nimport { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { Helmet } from \"@zudoku/react-helmet-async\";\nimport {\n ChevronRightIcon,\n ChevronsDownUpIcon,\n ChevronsUpDownIcon,\n} from \"lucide-react\";\nimport { Button } from \"zudoku/ui/Button.js\";\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from \"zudoku/ui/Collapsible.js\";\nimport { CategoryHeading } from \"../../components/CategoryHeading.js\";\nimport { Heading } from \"../../components/Heading.js\";\nimport { Markdown } from \"../../components/Markdown.js\";\nimport { Toc } from \"../../components/navigation/Toc.js\";\nimport { PagefindSearchMeta } from \"../../components/PagefindSearchMeta.js\";\nimport { useCreateQuery } from \"./client/useCreateQuery.js\";\nimport { useOasConfig } from \"./context.js\";\nimport { graphql } from \"./graphql/gql.js\";\nimport { SchemaView } from \"./schema/SchemaView.js\";\n\nconst GET_SCHEMAS = graphql(/* GraphQL */ `\n query GetSchemas($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n title\n description\n summary\n components {\n schemas {\n name\n schema\n extensions\n }\n }\n }\n }\n`);\n\nexport function SchemaList() {\n const { input, type, versions, version, options } = useOasConfig();\n const schemasQuery = useCreateQuery(GET_SCHEMAS, {\n input,\n type,\n });\n const { data } = useSuspenseQuery(schemasQuery);\n\n const schemas = data.schema.components?.schemas ?? [];\n const hasMultipleVersions = Object.entries(versions).length > 1;\n const showVersions =\n options?.showVersionSelect === \"always\" ||\n (hasMultipleVersions && options?.showVersionSelect !== \"hide\");\n\n if (!schemas.length) {\n return (\n <div>\n <Helmet>\n <title>Schemas {showVersions ? version : \"\"}</title>\n <meta name=\"description\" content=\"List of schemas used by the API.\" />\n </Helmet>\n No schemas found\n </div>\n );\n }\n\n return (\n <div\n className=\"grid grid-cols-(--sidecar-grid-cols) gap-8 justify-between\"\n data-pagefind-filter=\"section:openapi\"\n data-pagefind-meta=\"section:openapi\"\n >\n <PagefindSearchMeta name=\"category\">\n {data.schema.title}\n </PagefindSearchMeta>\n <Helmet>\n <title>Schemas {showVersions ? version : \"\"}</title>\n <meta name=\"description\" content=\"List of schemas used by the API.\" />\n </Helmet>\n <div className=\"pt-(--padding-content-top) pb-(--padding-content-bottom)\">\n <Collapsible className=\"w-full\">\n <div className=\"flex flex-col gap-y-4 sm:flex-row justify-around items-start sm:items-end\">\n <div className=\"flex-1\">\n <CategoryHeading>{data.schema.title}</CategoryHeading>\n <Heading\n level={1}\n id=\"schemas\"\n registerNavigationAnchor\n className=\"mb-0\"\n >\n Schemas\n {showVersions && (\n <span className=\"text-xl text-muted-foreground ms-1.5\">\n ({version})\n </span>\n )}\n </Heading>\n </div>\n {data.schema.description && (\n <CollapsibleTrigger className=\"flex items-center gap-1 text-sm font-medium text-muted-foreground group\">\n <span>API information</span>\n <ChevronsUpDownIcon\n className=\"group-data-[state=open]:hidden translate-y-px\"\n size={14}\n />\n <ChevronsDownUpIcon\n className=\"group-data-[state=closed]:hidden translate-y-px\"\n size={13}\n />\n </CollapsibleTrigger>\n )}\n </div>\n {data.schema.description && (\n <CollapsibleContent className=\"CollapsibleContent\">\n <div className=\"mt-4 max-w-full border rounded-sm bg-muted/25\">\n <Markdown\n className=\"max-w-full prose-img:max-w-prose border-border p-3 lg:p-5\"\n content={data.schema.description}\n />\n </div>\n </CollapsibleContent>\n )}\n </Collapsible>\n <hr className=\"my-8\" />\n <div className=\"flex flex-col gap-y-5\">\n {schemas.map((schema) => (\n <Collapsible key={schema.name} className=\"group\" defaultOpen>\n <Heading\n registerNavigationAnchor\n level={2}\n className=\"flex items-center gap-1 justify-between w-fit\"\n id={slugify(schema.name)}\n >\n {schema.name}{\" \"}\n <CollapsibleTrigger asChild>\n <Button variant=\"ghost\" size=\"icon\" className=\"size-6\">\n <ChevronRightIcon\n size={16}\n className=\"group-data-[state=open]:rotate-90 transition cursor-pointer\"\n />\n </Button>\n </CollapsibleTrigger>\n </Heading>\n <CollapsibleContent className=\"mt-4 CollapsibleContent\">\n <SchemaView schema={schema.schema} />\n </CollapsibleContent>\n </Collapsible>\n ))}\n </div>\n </div>\n <Toc\n entries={schemas.map((schema) => ({\n id: slugify(schema.name),\n value: schema.name,\n depth: 1,\n }))}\n />\n </div>\n );\n}\n"],"names":["GET_SCHEMAS","graphql","SchemaList","input","type","versions","version","options","useOasConfig","schemasQuery","useCreateQuery","data","useSuspenseQuery","schemas","hasMultipleVersions","showVersions","jsxs","jsx","PagefindSearchMeta","Helmet","Collapsible","CategoryHeading","Heading","CollapsibleTrigger","ChevronsUpDownIcon","ChevronsDownUpIcon","CollapsibleContent","Markdown","schema","slugify","Button","ChevronRightIcon","SchemaView","Toc"],"mappings":";;;;;;;;;;;AAwBA,MAAMA,IAAcC;AAAA;AAAA,EAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAezC;AAEM,SAASC,IAAa;AAC3B,QAAM,EAAE,OAAAC,GAAO,MAAAC,GAAM,UAAAC,GAAU,SAAAC,GAAS,SAAAC,EAAA,IAAYC,EAAA,GAC9CC,IAAeC,EAAeV,GAAa;AAAA,IAC/C,OAAAG;AAAA,IACA,MAAAC;AAAA,EAAA,CACD,GACK,EAAE,MAAAO,EAAA,IAASC,EAAiBH,CAAY,GAExCI,IAAUF,EAAK,OAAO,YAAY,WAAW,CAAA,GAC7CG,IAAsB,OAAO,QAAQT,CAAQ,EAAE,SAAS,GACxDU,IACJR,GAAS,sBAAsB,YAC9BO,KAAuBP,GAAS,sBAAsB;AAEzD,SAAKM,EAAQ,SAaXG,gBAAAA,EAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACV,wBAAqB;AAAA,MACrB,sBAAmB;AAAA,MAEnB,UAAA;AAAA,QAAAC,gBAAAA,MAACC,GAAA,EAAmB,MAAK,YACtB,UAAAP,EAAK,OAAO,OACf;AAAA,+BACCQ,GAAA,EACC,UAAA;AAAA,UAAAH,gBAAAA,OAAC,SAAA,EAAM,UAAA;AAAA,YAAA;AAAA,YAASD,IAAeT,IAAU;AAAA,UAAA,GAAG;AAAA,UAC5CW,gBAAAA,EAAAA,IAAC,QAAA,EAAK,MAAK,eAAc,SAAQ,mCAAA,CAAmC;AAAA,QAAA,GACtE;AAAA,QACAD,gBAAAA,EAAAA,KAAC,OAAA,EAAI,WAAU,4DACb,UAAA;AAAA,UAAAA,gBAAAA,EAAAA,KAACI,GAAA,EAAY,WAAU,UACrB,UAAA;AAAA,YAAAJ,gBAAAA,EAAAA,KAAC,OAAA,EAAI,WAAU,6EACb,UAAA;AAAA,cAAAA,gBAAAA,EAAAA,KAAC,OAAA,EAAI,WAAU,UACb,UAAA;AAAA,gBAAAC,gBAAAA,EAAAA,IAACI,GAAA,EAAiB,UAAAV,EAAK,OAAO,OAAM;AAAA,gBACpCK,gBAAAA,EAAAA;AAAAA,kBAACM;AAAA,kBAAA;AAAA,oBACC,OAAO;AAAA,oBACP,IAAG;AAAA,oBACH,0BAAwB;AAAA,oBACxB,WAAU;AAAA,oBACX,UAAA;AAAA,sBAAA;AAAA,sBAEEP,KACCC,gBAAAA,EAAAA,KAAC,QAAA,EAAK,WAAU,wCAAuC,UAAA;AAAA,wBAAA;AAAA,wBACnDV;AAAA,wBAAQ;AAAA,sBAAA,EAAA,CACZ;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBAAA;AAAA,cAEJ,GACF;AAAA,cACCK,EAAK,OAAO,eACXK,gBAAAA,EAAAA,KAACO,GAAA,EAAmB,WAAU,2EAC5B,UAAA;AAAA,gBAAAN,gBAAAA,EAAAA,IAAC,UAAK,UAAA,kBAAA,CAAe;AAAA,gBACrBA,gBAAAA,EAAAA;AAAAA,kBAACO;AAAA,kBAAA;AAAA,oBACC,WAAU;AAAA,oBACV,MAAM;AAAA,kBAAA;AAAA,gBAAA;AAAA,gBAERP,gBAAAA,EAAAA;AAAAA,kBAACQ;AAAA,kBAAA;AAAA,oBACC,WAAU;AAAA,oBACV,MAAM;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACR,EAAA,CACF;AAAA,YAAA,GAEJ;AAAA,YACCd,EAAK,OAAO,eACXM,gBAAAA,EAAAA,IAACS,GAAA,EAAmB,WAAU,sBAC5B,UAAAT,gBAAAA,EAAAA,IAAC,OAAA,EAAI,WAAU,iDACb,UAAAA,gBAAAA,EAAAA;AAAAA,cAACU;AAAA,cAAA;AAAA,gBACC,WAAU;AAAA,gBACV,SAAShB,EAAK,OAAO;AAAA,cAAA;AAAA,YAAA,GAEzB,EAAA,CACF;AAAA,UAAA,GAEJ;AAAA,UACAM,gBAAAA,EAAAA,IAAC,MAAA,EAAG,WAAU,OAAA,CAAO;AAAA,UACrBA,gBAAAA,EAAAA,IAAC,OAAA,EAAI,WAAU,yBACZ,UAAAJ,EAAQ,IAAI,CAACe,MACZZ,gBAAAA,EAAAA,KAACI,GAAA,EAA8B,WAAU,SAAQ,aAAW,IAC1D,UAAA;AAAA,YAAAJ,gBAAAA,EAAAA;AAAAA,cAACM;AAAA,cAAA;AAAA,gBACC,0BAAwB;AAAA,gBACxB,OAAO;AAAA,gBACP,WAAU;AAAA,gBACV,IAAIO,EAAQD,EAAO,IAAI;AAAA,gBAEtB,UAAA;AAAA,kBAAAA,EAAO;AAAA,kBAAM;AAAA,kBACdX,gBAAAA,EAAAA,IAACM,GAAA,EAAmB,SAAO,IACzB,UAAAN,gBAAAA,EAAAA,IAACa,GAAA,EAAO,SAAQ,SAAQ,MAAK,QAAO,WAAU,UAC5C,UAAAb,gBAAAA,EAAAA;AAAAA,oBAACc;AAAA,oBAAA;AAAA,sBACC,MAAM;AAAA,sBACN,WAAU;AAAA,oBAAA;AAAA,kBAAA,GAEd,EAAA,CACF;AAAA,gBAAA;AAAA,cAAA;AAAA,YAAA;AAAA,YAEFd,gBAAAA,EAAAA,IAACS,KAAmB,WAAU,2BAC5B,gCAACM,GAAA,EAAW,QAAQJ,EAAO,OAAA,CAAQ,EAAA,CACrC;AAAA,UAAA,KAnBgBA,EAAO,IAoBzB,CACD,EAAA,CACH;AAAA,QAAA,GACF;AAAA,QACAX,gBAAAA,EAAAA;AAAAA,UAACgB;AAAA,UAAA;AAAA,YACC,SAASpB,EAAQ,IAAI,CAACe,OAAY;AAAA,cAChC,IAAIC,EAAQD,EAAO,IAAI;AAAA,cACvB,OAAOA,EAAO;AAAA,cACd,OAAO;AAAA,YAAA,EACP;AAAA,UAAA;AAAA,QAAA;AAAA,MACJ;AAAA,IAAA;AAAA,EAAA,2BApGC,OAAA,EACC,UAAA;AAAA,IAAAZ,gBAAAA,OAACG,GAAA,EACC,UAAA;AAAA,MAAAH,gBAAAA,OAAC,SAAA,EAAM,UAAA;AAAA,QAAA;AAAA,QAASD,IAAeT,IAAU;AAAA,MAAA,GAAG;AAAA,MAC5CW,gBAAAA,EAAAA,IAAC,QAAA,EAAK,MAAK,eAAc,SAAQ,mCAAA,CAAmC;AAAA,IAAA,GACtE;AAAA,IAAS;AAAA,EAAA,GAEX;AAiGN;"}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-BzflLqGi.js";
|
|
2
2
|
import { ChevronUpIcon as T, ChevronDownIcon as J, ChevronsLeftRightIcon as U, MinusIcon as _, PlusIcon as G, RefreshCcwDotIcon as K, InfoIcon as W } from "lucide-react";
|
|
3
3
|
import { useState as f, isValidElement as Q, Fragment as C } from "react";
|
|
4
|
-
import { I as P, a as g, b as $, c as X, F as N, d as
|
|
5
|
-
import { b as u, I as E, M as V } from "./index-
|
|
6
|
-
import { B as te } from "./Button-
|
|
7
|
-
import { c as j } from "./cn-
|
|
4
|
+
import { I as P, a as g, b as $, c as X, F as N, d as b, e as S, f as Y, g as Z, h as H, i as ee } from "./Frame-DKlOmSkU.js";
|
|
5
|
+
import { b as u, I as E, M as V } from "./index-A5Cre871.js";
|
|
6
|
+
import { B as te } from "./Button-GUVe7pmt.js";
|
|
7
|
+
import { c as j } from "./cn-5-Gd1Dss.js";
|
|
8
8
|
import * as F from "@radix-ui/react-collapsible";
|
|
9
|
-
import { Button as
|
|
10
|
-
import { Badge as
|
|
9
|
+
import { Button as re } from "./ui/Button.js";
|
|
10
|
+
import { Badge as se } from "./ui/Badge.js";
|
|
11
11
|
import { Frame as ne, FramePanel as ie } from "./ui/Frame.js";
|
|
12
|
-
import { C as oe } from "./circular-
|
|
12
|
+
import { C as oe } from "./circular-CuSWVYOZ.js";
|
|
13
13
|
const Se = ({
|
|
14
14
|
name: e,
|
|
15
|
-
children:
|
|
16
|
-
}) => /* @__PURE__ */ t.jsx("span", { "data-pagefind-meta": e, className: "sr-only", children:
|
|
17
|
-
(
|
|
18
|
-
const o =
|
|
19
|
-
return
|
|
15
|
+
children: r
|
|
16
|
+
}) => /* @__PURE__ */ t.jsx("span", { "data-pagefind-meta": e, className: "sr-only", children: r }), le = (e, r) => e.reduce(
|
|
17
|
+
(s, i) => {
|
|
18
|
+
const o = r(i);
|
|
19
|
+
return s[o] || (s[o] = []), s[o].push(i), s;
|
|
20
20
|
},
|
|
21
21
|
{}
|
|
22
22
|
), R = ({
|
|
23
23
|
schema: e,
|
|
24
|
-
hideDescription:
|
|
24
|
+
hideDescription: r = !1
|
|
25
25
|
}) => /* @__PURE__ */ t.jsx("div", { className: "flex flex-col gap-1", children: /* @__PURE__ */ t.jsxs("div", { children: [
|
|
26
26
|
/* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "Const value: " }),
|
|
27
27
|
/* @__PURE__ */ t.jsx(u, { className: "border rounded px-1 font-mono", children: e.const }),
|
|
28
|
-
!
|
|
29
|
-
] }) }),
|
|
28
|
+
!r && e.description && /* @__PURE__ */ t.jsx("div", { className: "text-muted-foreground", children: e.description })
|
|
29
|
+
] }) }), h = ({
|
|
30
30
|
values: e,
|
|
31
|
-
className:
|
|
32
|
-
maxVisibleValues:
|
|
31
|
+
className: r,
|
|
32
|
+
maxVisibleValues: s = 8
|
|
33
33
|
}) => {
|
|
34
34
|
const [i, o] = f(!1);
|
|
35
35
|
if (!e.length) return null;
|
|
36
|
-
const n = e.length >
|
|
37
|
-
return /* @__PURE__ */ t.jsxs("div", { className: j("flex flex-wrap gap-1.5",
|
|
36
|
+
const n = e.length > s, l = n && !i ? e.slice(0, s) : e;
|
|
37
|
+
return /* @__PURE__ */ t.jsxs("div", { className: j("flex flex-wrap gap-1.5", r), children: [
|
|
38
38
|
/* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "Enum values:" }),
|
|
39
39
|
l.map((d) => /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(u, { className: "border rounded-sm px-1 font-mono", children: d }) }, d)),
|
|
40
40
|
n && /* @__PURE__ */ t.jsx(
|
|
@@ -51,7 +51,7 @@ const Se = ({
|
|
|
51
51
|
/* @__PURE__ */ t.jsx(J, { size: 12 }),
|
|
52
52
|
/* @__PURE__ */ t.jsxs("span", { className: "text-muted-foreground", children: [
|
|
53
53
|
"show ",
|
|
54
|
-
e.length -
|
|
54
|
+
e.length - s,
|
|
55
55
|
" more"
|
|
56
56
|
] })
|
|
57
57
|
] })
|
|
@@ -59,16 +59,16 @@ const Se = ({
|
|
|
59
59
|
)
|
|
60
60
|
] });
|
|
61
61
|
}, ae = ({ pattern: e }) => {
|
|
62
|
-
const [
|
|
62
|
+
const [r, s] = f(!1), i = e.length > 20, o = i ? `${e.slice(0, 20)}…` : e;
|
|
63
63
|
return /* @__PURE__ */ t.jsxs(
|
|
64
64
|
E,
|
|
65
65
|
{
|
|
66
66
|
className: j("text-xs", i && "cursor-pointer"),
|
|
67
|
-
onClick: () =>
|
|
67
|
+
onClick: () => s(!r),
|
|
68
68
|
selectOnClick: !1,
|
|
69
69
|
children: [
|
|
70
|
-
|
|
71
|
-
i && /* @__PURE__ */ t.jsx("button", { type: "button", className: "p-1 translate-y-[2px]", children: !
|
|
70
|
+
r ? e : o,
|
|
71
|
+
i && /* @__PURE__ */ t.jsx("button", { type: "button", className: "p-1 translate-y-[2px]", children: !r && /* @__PURE__ */ t.jsx(U, { size: 12 }) })
|
|
72
72
|
]
|
|
73
73
|
}
|
|
74
74
|
);
|
|
@@ -77,6 +77,7 @@ const Se = ({
|
|
|
77
77
|
e.enum && "enum",
|
|
78
78
|
e.const && "const",
|
|
79
79
|
e.format,
|
|
80
|
+
e.type === "array" && e.items?.contentMediaType,
|
|
80
81
|
e.minimum !== void 0 && `min: ${e.minimum}`,
|
|
81
82
|
e.maximum !== void 0 && `max: ${e.maximum}`,
|
|
82
83
|
e.minLength !== void 0 && `minLength: ${e.minLength}`,
|
|
@@ -95,13 +96,13 @@ const Se = ({
|
|
|
95
96
|
] })
|
|
96
97
|
] : [], v = ({
|
|
97
98
|
schema: e,
|
|
98
|
-
extraItems:
|
|
99
|
-
className:
|
|
99
|
+
extraItems: r = [],
|
|
100
|
+
className: s
|
|
100
101
|
}) => {
|
|
101
|
-
const i = [...de(e), ...
|
|
102
|
+
const i = [...de(e), ...r].flatMap(
|
|
102
103
|
(o) => typeof o == "string" || Q(o) ? o : []
|
|
103
104
|
);
|
|
104
|
-
return /* @__PURE__ */ t.jsx("span", { className:
|
|
105
|
+
return /* @__PURE__ */ t.jsx("span", { className: s, children: i.map((o, n) => (
|
|
105
106
|
// biome-ignore lint/suspicious/noArrayIndexKey: index should be stable
|
|
106
107
|
/* @__PURE__ */ t.jsxs("span", { className: "text-muted-foreground", children: [
|
|
107
108
|
o,
|
|
@@ -111,19 +112,19 @@ const Se = ({
|
|
|
111
112
|
}, I = ({
|
|
112
113
|
schema: e
|
|
113
114
|
}) => {
|
|
114
|
-
const
|
|
115
|
-
return
|
|
116
|
-
|
|
115
|
+
const r = e.examples?.at(0), s = e.default;
|
|
116
|
+
return r === void 0 && s === void 0 ? null : /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
117
|
+
r !== void 0 && /* @__PURE__ */ t.jsxs("div", { children: [
|
|
117
118
|
/* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "Example: " }),
|
|
118
|
-
/* @__PURE__ */ t.jsx(u, { className: "border rounded-sm px-1 font-mono", children: typeof
|
|
119
|
+
/* @__PURE__ */ t.jsx(u, { className: "border rounded-sm px-1 font-mono", children: typeof r == "object" || typeof r == "boolean" ? JSON.stringify(r) : r })
|
|
119
120
|
] }),
|
|
120
|
-
|
|
121
|
+
s !== void 0 && /* @__PURE__ */ t.jsxs("div", { children: [
|
|
121
122
|
/* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "Default: " }),
|
|
122
|
-
/* @__PURE__ */ t.jsx(u, { className: "border rounded-sm px-1 font-mono", children: typeof
|
|
123
|
+
/* @__PURE__ */ t.jsx(u, { className: "border rounded-sm px-1 font-mono", children: typeof s == "object" || typeof s == "boolean" ? JSON.stringify(s) : s })
|
|
123
124
|
] })
|
|
124
125
|
] });
|
|
125
|
-
},
|
|
126
|
-
Array.isArray(e.type) && e.type.includes("array"), k = (e) => e && (e.type === "object" && Object.keys(e.properties ?? {}).length > 0 || e.type === "array" && typeof e.items == "object" && (!e.items.type || e.items.type === "object")),
|
|
126
|
+
}, M = (e) => typeof e == "string" && ["string", "number", "boolean", "integer", "null"].includes(e) || Array.isArray(e) && e.every(M), m = (e) => e.type === "array" || // schema.type might be an array of types, so we need to check if "array" is one of them
|
|
127
|
+
Array.isArray(e.type) && e.type.includes("array"), k = (e) => e && (e.type === "object" && Object.keys(e.properties ?? {}).length > 0 || e.type === "array" && typeof e.items == "object" && (!e.items.type || e.items.type === "object")), B = (e) => typeof e == "string" && e.startsWith(oe), w = (e) => m(e) && "items" in e && B(e.items), ce = (e) => typeof e == "string" ? e.split(":")[1] : void 0, q = ({ circularProp: e }) => /* @__PURE__ */ t.jsxs(
|
|
127
128
|
E,
|
|
128
129
|
{
|
|
129
130
|
className: "inline-flex items-center gap-1.5 text-xs translate-y-0.5",
|
|
@@ -135,13 +136,13 @@ Array.isArray(e.type) && e.type.includes("array"), k = (e) => e && (e.type === "
|
|
|
135
136
|
}
|
|
136
137
|
), pe = ({
|
|
137
138
|
name: e,
|
|
138
|
-
schema:
|
|
139
|
-
group:
|
|
139
|
+
schema: r,
|
|
140
|
+
group: s,
|
|
140
141
|
defaultOpen: i = !1,
|
|
141
142
|
showCollapseButton: o = !0
|
|
142
143
|
}) => {
|
|
143
144
|
const [n, l] = f(i);
|
|
144
|
-
if (
|
|
145
|
+
if (B(r))
|
|
145
146
|
return /* @__PURE__ */ t.jsx(P, { children: /* @__PURE__ */ t.jsxs(g, { className: "gap-y-2", children: [
|
|
146
147
|
/* @__PURE__ */ t.jsxs("div", { children: [
|
|
147
148
|
/* @__PURE__ */ t.jsx($, { className: "inline me-2", children: /* @__PURE__ */ t.jsx("code", { children: e }) }),
|
|
@@ -149,17 +150,17 @@ Array.isArray(e.type) && e.type.includes("array"), k = (e) => e && (e.type === "
|
|
|
149
150
|
v,
|
|
150
151
|
{
|
|
151
152
|
className: "inline",
|
|
152
|
-
schema:
|
|
153
|
+
schema: r,
|
|
153
154
|
extraItems: [
|
|
154
|
-
|
|
155
|
+
s !== "optional" && /* @__PURE__ */ t.jsx("span", { className: "text-primary", children: "required" }),
|
|
155
156
|
/* @__PURE__ */ t.jsx(q, {}, "circular-ref")
|
|
156
157
|
]
|
|
157
158
|
}
|
|
158
159
|
)
|
|
159
160
|
] }),
|
|
160
|
-
/* @__PURE__ */ t.jsx(I, { schema:
|
|
161
|
+
/* @__PURE__ */ t.jsx(I, { schema: r })
|
|
161
162
|
] }) });
|
|
162
|
-
const d = !!((
|
|
163
|
+
const d = !!((r.allOf || r.anyOf || r.oneOf || k(r) || m(r) && "items" in r && k(r.items) || r.additionalProperties) && !w(r)), c = !!(r.description || "items" in r && r.items?.enum || r.const || r.enum || r.example !== void 0 || r.default !== void 0);
|
|
163
164
|
return /* @__PURE__ */ t.jsxs(P, { children: [
|
|
164
165
|
/* @__PURE__ */ t.jsxs(g, { className: "gap-y-2", children: [
|
|
165
166
|
/* @__PURE__ */ t.jsxs("div", { children: [
|
|
@@ -176,29 +177,29 @@ Array.isArray(e.type) && e.type.includes("array"), k = (e) => e && (e.type === "
|
|
|
176
177
|
v,
|
|
177
178
|
{
|
|
178
179
|
className: "inline",
|
|
179
|
-
schema:
|
|
180
|
+
schema: r,
|
|
180
181
|
extraItems: [
|
|
181
|
-
|
|
182
|
-
w(
|
|
182
|
+
s !== "optional" && /* @__PURE__ */ t.jsx("span", { className: "text-primary", children: "required" }),
|
|
183
|
+
w(r) && /* @__PURE__ */ t.jsx(
|
|
183
184
|
q,
|
|
184
185
|
{
|
|
185
|
-
circularProp: ce(
|
|
186
|
+
circularProp: ce(r.items)
|
|
186
187
|
}
|
|
187
188
|
)
|
|
188
189
|
]
|
|
189
190
|
}
|
|
190
191
|
)
|
|
191
192
|
] }),
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
"items" in
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
/* @__PURE__ */ t.jsx(I, { schema:
|
|
193
|
+
c && /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
194
|
+
r.description && /* @__PURE__ */ t.jsx(V, { className: "prose-sm", content: r.description }),
|
|
195
|
+
"items" in r && r.items?.enum && /* @__PURE__ */ t.jsx(h, { values: r.items.enum }),
|
|
196
|
+
r.const && /* @__PURE__ */ t.jsx(R, { schema: r, hideDescription: !0 }),
|
|
197
|
+
r.enum && /* @__PURE__ */ t.jsx(h, { values: r.enum }),
|
|
198
|
+
/* @__PURE__ */ t.jsx(I, { schema: r })
|
|
198
199
|
] })
|
|
199
200
|
] }),
|
|
200
201
|
d && o && /* @__PURE__ */ t.jsx(X, { className: "self-start", children: /* @__PURE__ */ t.jsx(
|
|
201
|
-
|
|
202
|
+
re,
|
|
202
203
|
{
|
|
203
204
|
variant: "ghost",
|
|
204
205
|
size: "icon",
|
|
@@ -215,54 +216,54 @@ Array.isArray(e.type) && e.type.includes("array"), k = (e) => e && (e.type === "
|
|
|
215
216
|
open: n,
|
|
216
217
|
onOpenChange: l,
|
|
217
218
|
className: j("w-full", !n && "contents"),
|
|
218
|
-
children: /* @__PURE__ */ t.jsx(F.Content, { asChild: !0, children: /* @__PURE__ */ t.jsx(g, { children:
|
|
219
|
+
children: /* @__PURE__ */ t.jsx(F.Content, { asChild: !0, children: /* @__PURE__ */ t.jsx(g, { children: r.anyOf || r.oneOf || r.type === "object" ? /* @__PURE__ */ t.jsx(x, { schema: r }) : m(r) && "items" in r ? /* @__PURE__ */ t.jsx(x, { schema: r.items }) : null }) })
|
|
219
220
|
}
|
|
220
221
|
)
|
|
221
222
|
] });
|
|
222
223
|
}, z = (e) => {
|
|
223
|
-
const
|
|
224
|
-
return e.properties && Object.keys(e.properties).length > 0 ?
|
|
225
|
-
...
|
|
224
|
+
const r = e.oneOf ?? e.anyOf ?? [];
|
|
225
|
+
return e.properties && Object.keys(e.properties).length > 0 ? r.map((s) => !s.properties && !s.type && !s.oneOf && !s.anyOf ? {
|
|
226
|
+
...s,
|
|
226
227
|
type: "object",
|
|
227
228
|
properties: e.properties,
|
|
228
|
-
required:
|
|
229
|
-
} :
|
|
229
|
+
required: s.required ?? e.required
|
|
230
|
+
} : s) : r;
|
|
230
231
|
}, xe = (e) => {
|
|
231
232
|
if (Array.isArray(e.oneOf)) return "exactly-one";
|
|
232
|
-
const
|
|
233
|
-
if (!
|
|
234
|
-
const
|
|
235
|
-
for (const o of
|
|
236
|
-
const n = o.properties?.[
|
|
233
|
+
const r = e.discriminator?.propertyName;
|
|
234
|
+
if (!r) return "at-least-one";
|
|
235
|
+
const s = z(e), i = /* @__PURE__ */ new Set();
|
|
236
|
+
for (const o of s) {
|
|
237
|
+
const n = o.properties?.[r], l = n?.const ?? (Array.isArray(n?.enum) && n.enum.length === 1 ? String(n.enum[0]) : void 0);
|
|
237
238
|
if (l == null || i.has(String(l))) return "at-least-one";
|
|
238
239
|
i.add(String(l));
|
|
239
240
|
}
|
|
240
241
|
return "exactly-one";
|
|
241
|
-
}, O = (e,
|
|
242
|
-
const
|
|
243
|
-
e.type &&
|
|
242
|
+
}, O = (e, r) => r.title?.trim() || `Variant ${e + 1}`, ue = (e, r) => {
|
|
243
|
+
const s = [];
|
|
244
|
+
e.type && s.push(
|
|
244
245
|
`type = ${Array.isArray(e.type) ? e.type.join("|") : e.type}`
|
|
245
246
|
);
|
|
246
|
-
const i =
|
|
247
|
+
const i = r?.discriminator?.propertyName;
|
|
247
248
|
if (i) {
|
|
248
249
|
const n = e.properties?.[i], l = n?.const ?? (Array.isArray(n?.enum) && n.enum.length === 1 ? n.enum[0] : void 0);
|
|
249
|
-
l !== void 0 &&
|
|
250
|
+
l !== void 0 && s.push(`${i}=${JSON.stringify(l)}`);
|
|
250
251
|
}
|
|
251
252
|
const o = (e.required ?? []).filter((n) => n !== i);
|
|
252
253
|
if (o.length) {
|
|
253
254
|
const n = o.slice(0, 3).join(", "), l = o.length > 3 ? ` +${o.length - 3} more` : "";
|
|
254
|
-
|
|
255
|
+
s.push(`requires: ${n}${l}`);
|
|
255
256
|
}
|
|
256
|
-
return
|
|
257
|
+
return s;
|
|
257
258
|
}, me = ({
|
|
258
259
|
variants: e,
|
|
259
|
-
schema:
|
|
260
|
-
selectedVariant:
|
|
260
|
+
schema: r,
|
|
261
|
+
selectedVariant: s,
|
|
261
262
|
onSelectVariant: i
|
|
262
263
|
}) => {
|
|
263
264
|
const o = e.map((n, l) => ({
|
|
264
265
|
label: O(l, n),
|
|
265
|
-
guards: ue(n,
|
|
266
|
+
guards: ue(n, r)
|
|
266
267
|
}));
|
|
267
268
|
return /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-2 text-sm", children: [
|
|
268
269
|
/* @__PURE__ */ t.jsx("h4", { className: "font-medium", children: "Decision Table" }),
|
|
@@ -278,7 +279,7 @@ Array.isArray(e.type) && e.type.includes("array"), k = (e) => e && (e.type === "
|
|
|
278
279
|
type: "button",
|
|
279
280
|
className: j(
|
|
280
281
|
"hover:underline",
|
|
281
|
-
|
|
282
|
+
s === n.label && "text-primary"
|
|
282
283
|
),
|
|
283
284
|
onClick: () => i(n.label),
|
|
284
285
|
children: n.label
|
|
@@ -290,12 +291,12 @@ Array.isArray(e.type) && e.type.includes("array"), k = (e) => e && (e.type === "
|
|
|
290
291
|
] });
|
|
291
292
|
}, fe = ({
|
|
292
293
|
schema: e,
|
|
293
|
-
cardHeader:
|
|
294
|
+
cardHeader: r
|
|
294
295
|
}) => {
|
|
295
|
-
const
|
|
296
|
+
const s = Array.isArray(e.oneOf) ? "oneOf" : Array.isArray(e.anyOf) ? "anyOf" : void 0, i = s ? z(e) : [], [o, n] = f(
|
|
296
297
|
() => i[0] ? O(0, i[0]) : ""
|
|
297
298
|
);
|
|
298
|
-
if (!
|
|
299
|
+
if (!s) return null;
|
|
299
300
|
const d = xe(e) === "exactly-one" ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
300
301
|
"Exactly one variant ",
|
|
301
302
|
/* @__PURE__ */ t.jsx("b", { children: "must match" }),
|
|
@@ -307,14 +308,14 @@ Array.isArray(e.type) && e.type.includes("array"), k = (e) => e && (e.type === "
|
|
|
307
308
|
" ",
|
|
308
309
|
/* @__PURE__ */ t.jsx("i", { children: "may match" }),
|
|
309
310
|
" simultaneously."
|
|
310
|
-
] }),
|
|
311
|
-
(
|
|
312
|
-
), a =
|
|
311
|
+
] }), c = i.findIndex(
|
|
312
|
+
(p, y) => O(y, p) === o
|
|
313
|
+
), a = c >= 0 ? i[c] : null;
|
|
313
314
|
return /* @__PURE__ */ t.jsxs(ne, { children: [
|
|
314
|
-
|
|
315
|
+
r,
|
|
315
316
|
/* @__PURE__ */ t.jsxs(ie, { className: "text-sm flex flex-col gap-4", children: [
|
|
316
317
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
317
|
-
/* @__PURE__ */ t.jsx(
|
|
318
|
+
/* @__PURE__ */ t.jsx(se, { variant: "outline", children: s }),
|
|
318
319
|
/* @__PURE__ */ t.jsx("div", { className: "flex-1 p-2", children: /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: d }) })
|
|
319
320
|
] }),
|
|
320
321
|
/* @__PURE__ */ t.jsx(
|
|
@@ -340,52 +341,52 @@ Array.isArray(e.type) && e.type.includes("array"), k = (e) => e && (e.type === "
|
|
|
340
341
|
className: "text-sm leading-normal line-clamp-4",
|
|
341
342
|
content: e
|
|
342
343
|
}
|
|
343
|
-
), ye = (e,
|
|
344
|
+
), ye = (e, r, s) => {
|
|
344
345
|
const i = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
345
346
|
/* @__PURE__ */ t.jsx("span", { className: "text-sm text-muted-foreground", children: /* @__PURE__ */ t.jsx(v, { schema: e }) }),
|
|
346
|
-
e.enum && /* @__PURE__ */ t.jsx(
|
|
347
|
+
e.enum && /* @__PURE__ */ t.jsx(h, { values: e.enum }),
|
|
347
348
|
je(e.description),
|
|
348
349
|
/* @__PURE__ */ t.jsx(I, { schema: e })
|
|
349
350
|
] });
|
|
350
|
-
return
|
|
351
|
-
|
|
352
|
-
/* @__PURE__ */ t.jsx(
|
|
351
|
+
return s ? /* @__PURE__ */ t.jsx("div", { className: "space-y-2 p-4", children: i }) : /* @__PURE__ */ t.jsxs(N, { children: [
|
|
352
|
+
r,
|
|
353
|
+
/* @__PURE__ */ t.jsx(b, { className: "space-y-2", children: i })
|
|
353
354
|
] });
|
|
354
355
|
}, x = ({
|
|
355
356
|
schema: e,
|
|
356
|
-
defaultOpen:
|
|
357
|
-
cardHeader:
|
|
357
|
+
defaultOpen: r = !1,
|
|
358
|
+
cardHeader: s,
|
|
358
359
|
embedded: i
|
|
359
360
|
}) => {
|
|
360
361
|
if (!e || Object.keys(e).length === 0)
|
|
361
362
|
return /* @__PURE__ */ t.jsxs(N, { children: [
|
|
362
|
-
|
|
363
|
-
/* @__PURE__ */ t.jsx(
|
|
363
|
+
s,
|
|
364
|
+
/* @__PURE__ */ t.jsx(b, { children: /* @__PURE__ */ t.jsx("div", { className: "text-sm text-muted-foreground italic", children: "No data returned" }) })
|
|
364
365
|
] });
|
|
365
366
|
if (e.const)
|
|
366
367
|
return /* @__PURE__ */ t.jsx(R, { schema: e });
|
|
367
368
|
if (Array.isArray(e.oneOf) || Array.isArray(e.anyOf))
|
|
368
|
-
return /* @__PURE__ */ t.jsx(fe, { schema: e, cardHeader:
|
|
369
|
-
if (
|
|
370
|
-
return ye(e,
|
|
369
|
+
return /* @__PURE__ */ t.jsx(fe, { schema: e, cardHeader: s });
|
|
370
|
+
if (M(e.type))
|
|
371
|
+
return ye(e, s, i);
|
|
371
372
|
if (m(e) && typeof e.items == "object") {
|
|
372
373
|
const n = {
|
|
373
374
|
type: "object",
|
|
374
375
|
properties: { "": e }
|
|
375
376
|
};
|
|
376
|
-
return /* @__PURE__ */ t.jsx(x, { schema: n, cardHeader:
|
|
377
|
+
return /* @__PURE__ */ t.jsx(x, { schema: n, cardHeader: s, defaultOpen: !0 });
|
|
377
378
|
}
|
|
378
379
|
const o = typeof e.additionalProperties == "object" && /* @__PURE__ */ t.jsx(x, { schema: e.additionalProperties, embedded: !0 });
|
|
379
380
|
if (e.type === "object") {
|
|
380
381
|
const n = le(
|
|
381
382
|
Object.entries(e.properties ?? {}),
|
|
382
|
-
([a,
|
|
383
|
-
),
|
|
384
|
-
const
|
|
385
|
-
return
|
|
386
|
-
}).map(({ group: a, properties:
|
|
383
|
+
([a, p]) => p.deprecated ? "deprecated" : e.required?.includes(a) ? "required" : "optional"
|
|
384
|
+
), c = ["required", "optional", "deprecated"].flatMap((a) => {
|
|
385
|
+
const p = n[a];
|
|
386
|
+
return p ? { group: a, properties: p } : [];
|
|
387
|
+
}).map(({ group: a, properties: p }, y) => /* @__PURE__ */ t.jsxs(C, { children: [
|
|
387
388
|
y > 0 && /* @__PURE__ */ t.jsx(S, {}),
|
|
388
|
-
/* @__PURE__ */ t.jsx(Y, { className: "overflow-clip", children:
|
|
389
|
+
/* @__PURE__ */ t.jsx(Y, { className: "overflow-clip", children: p.map(([A, D], L) => /* @__PURE__ */ t.jsxs(C, { children: [
|
|
389
390
|
L > 0 && /* @__PURE__ */ t.jsx(S, {}),
|
|
390
391
|
/* @__PURE__ */ t.jsx(
|
|
391
392
|
pe,
|
|
@@ -393,16 +394,16 @@ Array.isArray(e.type) && e.type.includes("array"), k = (e) => e && (e.type === "
|
|
|
393
394
|
name: A,
|
|
394
395
|
schema: D,
|
|
395
396
|
group: a,
|
|
396
|
-
defaultOpen:
|
|
397
|
+
defaultOpen: r
|
|
397
398
|
}
|
|
398
399
|
)
|
|
399
400
|
] }, A)) })
|
|
400
401
|
] }, a));
|
|
401
|
-
return i ?
|
|
402
|
-
|
|
402
|
+
return i ? c : /* @__PURE__ */ t.jsxs(N, { children: [
|
|
403
|
+
s,
|
|
403
404
|
e.description && /* @__PURE__ */ t.jsx(Z, { children: /* @__PURE__ */ t.jsx(H, { children: e.description }) }),
|
|
404
|
-
/* @__PURE__ */ t.jsxs(
|
|
405
|
-
|
|
405
|
+
(c.length > 0 || o) && /* @__PURE__ */ t.jsxs(b, { className: "p-0!", children: [
|
|
406
|
+
c,
|
|
406
407
|
o
|
|
407
408
|
] }),
|
|
408
409
|
e.additionalProperties === !0 && /* @__PURE__ */ t.jsx(ee, { children: /* @__PURE__ */ t.jsxs(
|
|
@@ -422,13 +423,13 @@ Array.isArray(e.type) && e.type.includes("array"), k = (e) => e && (e.type === "
|
|
|
422
423
|
}
|
|
423
424
|
};
|
|
424
425
|
export {
|
|
425
|
-
|
|
426
|
+
h as E,
|
|
426
427
|
Se as P,
|
|
427
428
|
x as S,
|
|
428
429
|
v as a,
|
|
429
430
|
I as b,
|
|
430
|
-
|
|
431
|
+
B as c,
|
|
431
432
|
le as g,
|
|
432
433
|
m as i
|
|
433
434
|
};
|
|
434
|
-
//# sourceMappingURL=SchemaView-
|
|
435
|
+
//# sourceMappingURL=SchemaView-BrUf6_nP.js.map
|