zudoku 0.66.2 → 0.66.3
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 +32 -3
- package/dist/config/validators/validate.js +1 -1
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/flat-config.d.ts +1 -1
- package/dist/lib/auth/issuer.js +1 -1
- package/dist/lib/auth/issuer.js.map +1 -1
- package/dist/lib/authentication/authentication.d.ts +3 -2
- package/dist/lib/authentication/hook.d.ts +2 -0
- package/dist/lib/authentication/hook.js +10 -0
- package/dist/lib/authentication/hook.js.map +1 -1
- package/dist/lib/authentication/providers/firebase.js +67 -9
- package/dist/lib/authentication/providers/firebase.js.map +1 -1
- package/dist/lib/authentication/ui/EmailVerificationUi.d.ts +4 -0
- package/dist/lib/authentication/ui/EmailVerificationUi.js +34 -0
- package/dist/lib/authentication/ui/EmailVerificationUi.js.map +1 -0
- package/dist/lib/authentication/ui/ZudokuAuthUi.d.ts +7 -2
- package/dist/lib/authentication/ui/ZudokuAuthUi.js +43 -11
- package/dist/lib/authentication/ui/ZudokuAuthUi.js.map +1 -1
- package/dist/lib/authentication/utils/relativeRedirectUrl.d.ts +1 -0
- package/dist/lib/authentication/utils/relativeRedirectUrl.js +8 -0
- package/dist/lib/authentication/utils/relativeRedirectUrl.js.map +1 -0
- package/dist/lib/components/index.d.ts +2 -0
- package/dist/lib/errors/ErrorMessage.d.ts +3 -0
- package/dist/lib/errors/ErrorMessage.js +16 -0
- package/dist/lib/errors/ErrorMessage.js.map +1 -0
- package/dist/lib/hooks/index.d.ts +2 -0
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +9 -172
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.d.ts +4 -1
- package/dist/lib/plugins/api-keys/index.js +19 -14
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/api-keys/settings/ApiKeyItem.d.ts +12 -0
- package/dist/lib/plugins/api-keys/settings/ApiKeyItem.js +133 -0
- package/dist/lib/plugins/api-keys/settings/ApiKeyItem.js.map +1 -0
- package/dist/lib/plugins/api-keys/settings/ApiKeyList.d.ts +4 -0
- package/dist/lib/plugins/api-keys/settings/ApiKeyList.js +30 -0
- package/dist/lib/plugins/api-keys/settings/ApiKeyList.js.map +1 -0
- package/dist/lib/plugins/api-keys/settings/RevealApiKey.d.ts +6 -0
- package/dist/lib/plugins/api-keys/settings/RevealApiKey.js +39 -0
- package/dist/lib/plugins/api-keys/settings/RevealApiKey.js.map +1 -0
- package/dist/vite/config.js +7 -0
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/plugin-api-keys.js +4 -1
- package/dist/vite/plugin-api-keys.js.map +1 -1
- package/dist/vite/zuplo.d.ts +13 -0
- package/dist/vite/zuplo.js +15 -0
- package/dist/vite/zuplo.js.map +1 -0
- package/lib/{ClaudeLogo-CGRfGTk2.js → ClaudeLogo-BZslN9XF.js} +3 -3
- package/lib/{ClaudeLogo-CGRfGTk2.js.map → ClaudeLogo-BZslN9XF.js.map} +1 -1
- package/lib/{Drawer-Ci7XwhqT.js → Drawer-BRMcpfuF.js} +6 -6
- package/lib/{Drawer-Ci7XwhqT.js.map → Drawer-BRMcpfuF.js.map} +1 -1
- package/lib/Frame-DxlznfVd.js +205 -0
- package/lib/Frame-DxlznfVd.js.map +1 -0
- package/lib/{useMutation-C6RqWmTS.js → Input-D-kqEQ5M.js} +41 -23
- package/lib/Input-D-kqEQ5M.js.map +1 -0
- package/lib/{MdxPage-Bjf72BP3.js → MdxPage-B4zZq5aR.js} +8 -8
- package/lib/{MdxPage-Bjf72BP3.js.map → MdxPage-B4zZq5aR.js.map} +1 -1
- package/lib/{Mermaid-D_VSX7_Q.js → Mermaid-BjSczjLW.js} +3 -3
- package/lib/{Mermaid-D_VSX7_Q.js.map → Mermaid-BjSczjLW.js.map} +1 -1
- package/lib/{OAuthErrorPage-1Ekji0PK.js → OAuthErrorPage-DRY2hlga.js} +20 -21
- package/lib/{OAuthErrorPage-1Ekji0PK.js.map → OAuthErrorPage-DRY2hlga.js.map} +1 -1
- package/lib/{OasProvider-BZxmTyMM.js → OasProvider-lMwTD76Y.js} +4 -4
- package/lib/{OasProvider-BZxmTyMM.js.map → OasProvider-lMwTD76Y.js.map} +1 -1
- package/lib/{OperationList-B7nPIFB8.js → OperationList-Bm76b4vl.js} +23 -24
- package/lib/{OperationList-B7nPIFB8.js.map → OperationList-Bm76b4vl.js.map} +1 -1
- package/lib/{RouteGuard-9wjejsKm.js → RouteGuard-DGc32XJV.js} +4 -4
- package/lib/{RouteGuard-9wjejsKm.js.map → RouteGuard-DGc32XJV.js.map} +1 -1
- package/lib/{SchemaList-16_obkku.js → SchemaList-DX4FPogg.js} +7 -7
- package/lib/{SchemaList-16_obkku.js.map → SchemaList-DX4FPogg.js.map} +1 -1
- package/lib/SchemaView-CjXvSRxy.js +434 -0
- package/lib/SchemaView-CjXvSRxy.js.map +1 -0
- package/lib/{Select-CkxXP5I7.js → Secret-BxGpIhDP.js} +121 -121
- package/lib/Secret-BxGpIhDP.js.map +1 -0
- package/lib/{SignUp-D54_QWFy.js → SignUp-CntxjFGS.js} +4 -4
- package/lib/{SignUp-D54_QWFy.js.map → SignUp-CntxjFGS.js.map} +1 -1
- package/lib/{SyntaxHighlight-j_HRSPCU.js → SyntaxHighlight-Dgd0AaaX.js} +2 -2
- package/lib/{SyntaxHighlight-j_HRSPCU.js.map → SyntaxHighlight-Dgd0AaaX.js.map} +1 -1
- package/lib/{Toc-z05x698-.js → Toc-L1vGGHA1.js} +2 -2
- package/lib/{Toc-z05x698-.js.map → Toc-L1vGGHA1.js.map} +1 -1
- package/lib/{ZudokuContext-BXldanA8.js → ZudokuContext-DNHMZfcP.js} +33 -33
- package/lib/{ZudokuContext-BXldanA8.js.map → ZudokuContext-DNHMZfcP.js.map} +1 -1
- package/lib/{chunk-PVWAREVJ-dLIqswPy.js → chunk-PVWAREVJ-ClM0m2aJ.js} +19 -19
- package/lib/{chunk-PVWAREVJ-dLIqswPy.js.map → chunk-PVWAREVJ-ClM0m2aJ.js.map} +1 -1
- package/lib/{circular-D5sYCIWL.js → circular-BIN_WQ0c.js} +2 -2
- package/lib/{circular-D5sYCIWL.js.map → circular-BIN_WQ0c.js.map} +1 -1
- package/lib/{createServer-BlwU7lIr.js → createServer-BEl12QFw.js} +4 -4
- package/lib/{createServer-BlwU7lIr.js.map → createServer-BEl12QFw.js.map} +1 -1
- package/lib/createVariantComponent-CQVt-H3r.js +18 -0
- package/lib/createVariantComponent-CQVt-H3r.js.map +1 -0
- package/lib/{errors-BtC4Kn2j.js → errors-CtBbD47A.js} +2 -2
- package/lib/{errors-BtC4Kn2j.js.map → errors-CtBbD47A.js.map} +1 -1
- package/lib/{firebase-Ibm_tv3G.js → firebase-CT38ugg4.js} +1588 -1342
- package/lib/firebase-CT38ugg4.js.map +1 -0
- package/lib/hook-CHw_R_xu.js +52 -0
- package/lib/hook-CHw_R_xu.js.map +1 -0
- package/lib/{ErrorAlert-BUlG32M9.js → index-CG2v-T7-.js} +5373 -4335
- package/lib/index-CG2v-T7-.js.map +1 -0
- package/lib/{index-eKVhlB94.js → index-CISwSpdT.js} +2 -2
- package/lib/{index-eKVhlB94.js.map → index-CISwSpdT.js.map} +1 -1
- package/lib/{index-Css56y3F.js → index-DXXZDuSJ.js} +4 -4
- package/lib/{index-Css56y3F.js.map → index-DXXZDuSJ.js.map} +1 -1
- package/lib/{index-CeVTNcfF.js → index-jI2Fjpy-.js} +98 -99
- package/lib/{index-CeVTNcfF.js.map → index-jI2Fjpy-.js.map} +1 -1
- package/lib/{index.esm-BoKBnRoT.js → index.esm-Bu35TNgg.js} +16 -14
- package/lib/index.esm-Bu35TNgg.js.map +1 -0
- package/lib/{mutation-BoVlx8yA.js → mutation-DMHWqmFp.js} +2 -2
- package/lib/{mutation-BoVlx8yA.js.map → mutation-DMHWqmFp.js.map} +1 -1
- package/lib/ui/Drawer.js +2 -2
- package/lib/ui/SyntaxHighlight.js +2 -2
- package/lib/zudoku.__internal.js +507 -479
- 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 +6 -5
- package/lib/zudoku.auth-firebase.js.map +1 -1
- package/lib/zudoku.auth-openid.js +4 -4
- package/lib/zudoku.auth-supabase.js +5 -5
- package/lib/zudoku.components.js +20 -21
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +3 -3
- package/lib/zudoku.mermaid.js +3 -3
- package/lib/zudoku.plugin-api-catalog.js +8 -9
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +580 -543
- 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 +3 -3
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +3 -3
- package/lib/zudoku.router.js +2 -2
- package/package.json +4 -2
- package/src/lib/auth/issuer.ts +1 -1
- package/src/lib/authentication/authentication.ts +8 -2
- package/src/lib/authentication/hook.ts +16 -0
- package/src/lib/authentication/providers/firebase.tsx +98 -6
- package/src/lib/authentication/ui/EmailVerificationUi.tsx +129 -0
- package/src/lib/authentication/ui/ZudokuAuthUi.tsx +170 -38
- package/src/lib/authentication/utils/relativeRedirectUrl.ts +12 -0
- package/src/lib/errors/ErrorMessage.tsx +38 -0
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +36 -476
- package/src/lib/plugins/api-keys/index.tsx +33 -18
- package/src/lib/plugins/api-keys/settings/ApiKeyItem.tsx +342 -0
- package/src/lib/plugins/api-keys/settings/ApiKeyList.tsx +64 -0
- package/src/lib/plugins/api-keys/settings/RevealApiKey.tsx +124 -0
- package/lib/ErrorAlert-BUlG32M9.js.map +0 -1
- package/lib/RouterError-DfTZblpv.js +0 -42
- package/lib/RouterError-DfTZblpv.js.map +0 -1
- package/lib/SchemaView-eyvR4bRt.js +0 -597
- package/lib/SchemaView-eyvR4bRt.js.map +0 -1
- package/lib/Select-CkxXP5I7.js.map +0 -1
- package/lib/createVariantComponent-B9_dVBvu.js +0 -35
- package/lib/createVariantComponent-B9_dVBvu.js.map +0 -1
- package/lib/firebase-Ibm_tv3G.js.map +0 -1
- package/lib/hook-BNxidGQq.js +0 -40
- package/lib/hook-BNxidGQq.js.map +0 -1
- package/lib/index-DSOi7zVM.js +0 -1059
- package/lib/index-DSOi7zVM.js.map +0 -1
- package/lib/index.esm-BoKBnRoT.js.map +0 -1
- package/lib/useMutation-C6RqWmTS.js.map +0 -1
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-BzflLqGi.js";
|
|
2
|
-
import { c as s, L as t, d as a, i as n } from "./chunk-PVWAREVJ-dLIqswPy.js";
|
|
3
|
-
import { UnlinkIcon as i } from "lucide-react";
|
|
4
|
-
import { C as c } from "./CategoryHeading-DhmodDcq.js";
|
|
5
|
-
import { T as d, H as m, D as l, E as p } from "./ErrorAlert-BUlG32M9.js";
|
|
6
|
-
import { c as h } from "./cn-dYga0KKN.js";
|
|
7
|
-
const x = () => {
|
|
8
|
-
const r = s();
|
|
9
|
-
return /* @__PURE__ */ e.jsxs(d, { className: "h-full pt-(--padding-content-top)", children: [
|
|
10
|
-
/* @__PURE__ */ e.jsx(c, { children: "404" }),
|
|
11
|
-
/* @__PURE__ */ e.jsxs(m, { level: 1, className: "flex gap-3.5 items-center", children: [
|
|
12
|
-
"Page not found",
|
|
13
|
-
/* @__PURE__ */ e.jsx(i, { size: 24 })
|
|
14
|
-
] }),
|
|
15
|
-
/* @__PURE__ */ e.jsxs(l, { children: [
|
|
16
|
-
"Start by adding a file at",
|
|
17
|
-
" ",
|
|
18
|
-
/* @__PURE__ */ e.jsxs("code", { children: [
|
|
19
|
-
"{DOCUMENT_ROOT}",
|
|
20
|
-
"/",
|
|
21
|
-
r["*"],
|
|
22
|
-
".mdx"
|
|
23
|
-
] }),
|
|
24
|
-
" ",
|
|
25
|
-
"and add some content to make this error go away. By default",
|
|
26
|
-
" ",
|
|
27
|
-
/* @__PURE__ */ e.jsx("code", { children: "DOCUMENT_ROOT" }),
|
|
28
|
-
" is the `pages` directory."
|
|
29
|
-
] }),
|
|
30
|
-
/* @__PURE__ */ e.jsx("p", { children: "It seems that the page you are looking for does not exist or may have been moved. Please check the URL for any typos or use the navigation menu to find the correct page." }),
|
|
31
|
-
/* @__PURE__ */ e.jsx(t, { to: "/", children: "Go back home" })
|
|
32
|
-
] });
|
|
33
|
-
};
|
|
34
|
-
function E({ className: r }) {
|
|
35
|
-
const o = a();
|
|
36
|
-
return n(o) && o.status === 404 ? /* @__PURE__ */ e.jsx(x, {}) : /* @__PURE__ */ e.jsx("div", { className: h("mx-4 max-w-2xl", r), children: /* @__PURE__ */ e.jsx(p, { error: o }) });
|
|
37
|
-
}
|
|
38
|
-
export {
|
|
39
|
-
x as N,
|
|
40
|
-
E as R
|
|
41
|
-
};
|
|
42
|
-
//# sourceMappingURL=RouterError-DfTZblpv.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RouterError-DfTZblpv.js","sources":["../src/lib/components/NotFoundPage.tsx","../src/lib/errors/RouterError.tsx"],"sourcesContent":["import { UnlinkIcon } from \"lucide-react\";\nimport { Link, useParams } from \"react-router\";\nimport { CategoryHeading } from \"./CategoryHeading.js\";\nimport { DeveloperHint } from \"./DeveloperHint.js\";\nimport { Heading } from \"./Heading.js\";\nimport { Typography } from \"./Typography.js\";\n\nexport const NotFoundPage = () => {\n const params = useParams();\n\n return (\n <Typography className=\"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 {\"{DOCUMENT_ROOT}\"}/{params[\"*\"]}.mdx\n </code>{\" \"}\n and add some content to make this error go away. By default{\" \"}\n <code>DOCUMENT_ROOT</code> is the `pages` directory.\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 </Typography>\n );\n};\n","import { isRouteErrorResponse, useRouteError } from \"react-router\";\nimport { NotFoundPage } from \"../components/NotFoundPage.js\";\nimport { cn } from \"../util/cn.js\";\nimport { ErrorAlert } from \"./ErrorAlert.js\";\n\nexport function RouterError({ className }: { className?: string }) {\n const error = useRouteError();\n\n if (isRouteErrorResponse(error) && error.status === 404) {\n return <NotFoundPage />;\n }\n\n return (\n <div className={cn(\"mx-4 max-w-2xl\", className)}>\n <ErrorAlert error={error} />\n </div>\n );\n}\n"],"names":["NotFoundPage","params","useParams","jsxs","Typography","jsx","CategoryHeading","Heading","UnlinkIcon","DeveloperHint","Link","RouterError","className","error","useRouteError","isRouteErrorResponse","cn","ErrorAlert"],"mappings":";;;;;;AAOO,MAAMA,IAAe,MAAM;AAChC,QAAMC,IAASC,EAAA;AAEf,SACEC,gBAAAA,EAAAA,KAACC,GAAA,EAAW,WAAU,qCACpB,UAAA;AAAA,IAAAC,gBAAAA,EAAAA,IAACC,KAAgB,UAAA,MAAA,CAAG;AAAA,IACpBH,gBAAAA,EAAAA,KAACI,GAAA,EAAQ,OAAO,GAAG,WAAU,6BAA4B,UAAA;AAAA,MAAA;AAAA,MAEvDF,gBAAAA,EAAAA,IAACG,GAAA,EAAW,MAAM,GAAA,CAAI;AAAA,IAAA,GACxB;AAAA,2BACCC,GAAA,EAAc,UAAA;AAAA,MAAA;AAAA,MACa;AAAA,6BACzB,QAAA,EACE,UAAA;AAAA,QAAA;AAAA,QAAkB;AAAA,QAAER,EAAO,GAAG;AAAA,QAAE;AAAA,MAAA,GACnC;AAAA,MAAQ;AAAA,MAAI;AAAA,MACgD;AAAA,MAC5DI,gBAAAA,EAAAA,IAAC,UAAK,UAAA,gBAAA,CAAa;AAAA,MAAO;AAAA,IAAA,GAC5B;AAAA,IACAA,gBAAAA,EAAAA,IAAC,OAAE,UAAA,4KAAA,CAIH;AAAA,IACAA,gBAAAA,EAAAA,IAACK,GAAA,EAAK,IAAG,KAAI,UAAA,eAAA,CAAY;AAAA,EAAA,GAC3B;AAEJ;AC5BO,SAASC,EAAY,EAAE,WAAAC,KAAqC;AACjE,QAAMC,IAAQC,EAAA;AAEd,SAAIC,EAAqBF,CAAK,KAAKA,EAAM,WAAW,4BAC1Cb,GAAA,EAAa,IAIrBK,gBAAAA,EAAAA,IAAC,OAAA,EAAI,WAAWW,EAAG,kBAAkBJ,CAAS,GAC5C,UAAAP,gBAAAA,EAAAA,IAACY,GAAA,EAAW,OAAAJ,EAAA,CAAc,EAAA,CAC5B;AAEJ;"}
|
|
@@ -1,597 +0,0 @@
|
|
|
1
|
-
import { j as t } from "./jsx-runtime-BzflLqGi.js";
|
|
2
|
-
import { ChevronUpIcon as T, ChevronDownIcon as _, ChevronsLeftRightIcon as J, MinusIcon as U, PlusIcon as G, RefreshCcwDotIcon as K, InfoIcon as W } from "lucide-react";
|
|
3
|
-
import { useState as j, isValidElement as Q, Fragment as C } from "react";
|
|
4
|
-
import { c as a } from "./cn-dYga0KKN.js";
|
|
5
|
-
import { Slot as X } from "@radix-ui/react-slot";
|
|
6
|
-
import { c as Y } from "./index-DI5SPFK9.js";
|
|
7
|
-
import { Separator as Z } from "./ui/Separator.js";
|
|
8
|
-
import { S as m, I as q, M as E } from "./ErrorAlert-BUlG32M9.js";
|
|
9
|
-
import { B as H } from "./Button-CynVW1JV.js";
|
|
10
|
-
import * as P from "@radix-ui/react-collapsible";
|
|
11
|
-
import { Button as ee } from "./ui/Button.js";
|
|
12
|
-
import { Badge as te } from "./ui/Badge.js";
|
|
13
|
-
import { Frame as re, FramePanel as ne } from "./ui/Frame.js";
|
|
14
|
-
import { C as se } from "./circular-D5sYCIWL.js";
|
|
15
|
-
const Ee = ({
|
|
16
|
-
name: e,
|
|
17
|
-
children: r
|
|
18
|
-
}) => /* @__PURE__ */ t.jsx("span", { "data-pagefind-meta": e, className: "sr-only", children: r }), ie = (e, r) => e.reduce(
|
|
19
|
-
(n, i) => {
|
|
20
|
-
const o = r(i);
|
|
21
|
-
return n[o] || (n[o] = []), n[o].push(i), n;
|
|
22
|
-
},
|
|
23
|
-
{}
|
|
24
|
-
);
|
|
25
|
-
function N({ className: e, ...r }) {
|
|
26
|
-
return /* @__PURE__ */ t.jsx(
|
|
27
|
-
"div",
|
|
28
|
-
{
|
|
29
|
-
"data-slot": "frame",
|
|
30
|
-
className: a(
|
|
31
|
-
"relative flex flex-col rounded-2xl bg-muted p-1",
|
|
32
|
-
e
|
|
33
|
-
),
|
|
34
|
-
...r
|
|
35
|
-
}
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
function b({ className: e, ...r }) {
|
|
39
|
-
return /* @__PURE__ */ t.jsx(
|
|
40
|
-
"div",
|
|
41
|
-
{
|
|
42
|
-
"data-slot": "frame-panel",
|
|
43
|
-
className: a(
|
|
44
|
-
"relative bg-clip-padding rounded-xl border bg-card p-5 shadow-xs",
|
|
45
|
-
"before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-xl)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-clip-border dark:before:shadow-[0_-1px_--theme(--color-white/8%)]",
|
|
46
|
-
e
|
|
47
|
-
),
|
|
48
|
-
...r
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
function oe({ className: e, ...r }) {
|
|
53
|
-
return /* @__PURE__ */ t.jsx(
|
|
54
|
-
"header",
|
|
55
|
-
{
|
|
56
|
-
"data-slot": "frame-panel-header",
|
|
57
|
-
className: a("flex flex-col p-4", e),
|
|
58
|
-
...r
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
function le({
|
|
63
|
-
className: e,
|
|
64
|
-
...r
|
|
65
|
-
}) {
|
|
66
|
-
return /* @__PURE__ */ t.jsx(
|
|
67
|
-
"div",
|
|
68
|
-
{
|
|
69
|
-
"data-slot": "frame-panel-description",
|
|
70
|
-
className: a("text-sm text-muted-foreground", e),
|
|
71
|
-
...r
|
|
72
|
-
}
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
function ae({ className: e, ...r }) {
|
|
76
|
-
return /* @__PURE__ */ t.jsx(
|
|
77
|
-
"footer",
|
|
78
|
-
{
|
|
79
|
-
"data-slot": "frame-panel-footer",
|
|
80
|
-
className: a("flex flex-col gap-1 px-5 py-4", e),
|
|
81
|
-
...r
|
|
82
|
-
}
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
function de({ className: e, ...r }) {
|
|
86
|
-
return /* @__PURE__ */ t.jsx(
|
|
87
|
-
"div",
|
|
88
|
-
{
|
|
89
|
-
role: "list",
|
|
90
|
-
"data-slot": "item-group",
|
|
91
|
-
className: a("group/item-group flex flex-col", e),
|
|
92
|
-
...r
|
|
93
|
-
}
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
function S({
|
|
97
|
-
className: e,
|
|
98
|
-
...r
|
|
99
|
-
}) {
|
|
100
|
-
return /* @__PURE__ */ t.jsx(
|
|
101
|
-
Z,
|
|
102
|
-
{
|
|
103
|
-
"data-slot": "item-separator",
|
|
104
|
-
orientation: "horizontal",
|
|
105
|
-
className: a("my-0", e),
|
|
106
|
-
...r
|
|
107
|
-
}
|
|
108
|
-
);
|
|
109
|
-
}
|
|
110
|
-
const ce = Y(
|
|
111
|
-
"group/item flex items-center border border-transparent text-sm rounded-md transition-colors [a]:hover:bg-accent/50 [a]:transition-colors duration-100 flex-wrap outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
112
|
-
{
|
|
113
|
-
variants: {
|
|
114
|
-
variant: {
|
|
115
|
-
default: "bg-transparent",
|
|
116
|
-
outline: "border-border",
|
|
117
|
-
muted: "bg-muted/50"
|
|
118
|
-
},
|
|
119
|
-
size: {
|
|
120
|
-
default: "p-4 gap-4 ",
|
|
121
|
-
sm: "py-3 px-4 gap-2.5"
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
defaultVariants: {
|
|
125
|
-
variant: "default",
|
|
126
|
-
size: "default"
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
);
|
|
130
|
-
function $({
|
|
131
|
-
className: e,
|
|
132
|
-
variant: r = "default",
|
|
133
|
-
size: n = "default",
|
|
134
|
-
asChild: i = !1,
|
|
135
|
-
...o
|
|
136
|
-
}) {
|
|
137
|
-
const s = i ? X : "div";
|
|
138
|
-
return /* @__PURE__ */ t.jsx(
|
|
139
|
-
s,
|
|
140
|
-
{
|
|
141
|
-
"data-slot": "item",
|
|
142
|
-
"data-variant": r,
|
|
143
|
-
"data-size": n,
|
|
144
|
-
className: a(ce({ variant: r, size: n, className: e })),
|
|
145
|
-
...o
|
|
146
|
-
}
|
|
147
|
-
);
|
|
148
|
-
}
|
|
149
|
-
function g({ className: e, ...r }) {
|
|
150
|
-
return /* @__PURE__ */ t.jsx(
|
|
151
|
-
"div",
|
|
152
|
-
{
|
|
153
|
-
"data-slot": "item-content",
|
|
154
|
-
className: a(
|
|
155
|
-
"flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none",
|
|
156
|
-
e
|
|
157
|
-
),
|
|
158
|
-
...r
|
|
159
|
-
}
|
|
160
|
-
);
|
|
161
|
-
}
|
|
162
|
-
function w({ className: e, ...r }) {
|
|
163
|
-
return /* @__PURE__ */ t.jsx(
|
|
164
|
-
"div",
|
|
165
|
-
{
|
|
166
|
-
"data-slot": "item-title",
|
|
167
|
-
className: a(
|
|
168
|
-
"flex w-fit items-center gap-2 text-sm leading-snug font-medium",
|
|
169
|
-
e
|
|
170
|
-
),
|
|
171
|
-
...r
|
|
172
|
-
}
|
|
173
|
-
);
|
|
174
|
-
}
|
|
175
|
-
function pe({ className: e, ...r }) {
|
|
176
|
-
return /* @__PURE__ */ t.jsx(
|
|
177
|
-
"div",
|
|
178
|
-
{
|
|
179
|
-
"data-slot": "item-actions",
|
|
180
|
-
className: a("flex items-center gap-2", e),
|
|
181
|
-
...r
|
|
182
|
-
}
|
|
183
|
-
);
|
|
184
|
-
}
|
|
185
|
-
const z = ({
|
|
186
|
-
schema: e,
|
|
187
|
-
hideDescription: r = !1
|
|
188
|
-
}) => /* @__PURE__ */ t.jsx("div", { className: "flex flex-col gap-1", children: /* @__PURE__ */ t.jsxs("div", { children: [
|
|
189
|
-
/* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "Const value: " }),
|
|
190
|
-
/* @__PURE__ */ t.jsx(m, { className: "border rounded px-1 font-mono", children: e.const }),
|
|
191
|
-
!r && e.description && /* @__PURE__ */ t.jsx("div", { className: "text-muted-foreground", children: e.description })
|
|
192
|
-
] }) }), v = ({
|
|
193
|
-
values: e,
|
|
194
|
-
className: r,
|
|
195
|
-
maxVisibleValues: n = 8
|
|
196
|
-
}) => {
|
|
197
|
-
const [i, o] = j(!1);
|
|
198
|
-
if (!e.length) return null;
|
|
199
|
-
const s = e.length > n, l = s && !i ? e.slice(0, n) : e;
|
|
200
|
-
return /* @__PURE__ */ t.jsxs("div", { className: a("flex flex-wrap gap-1.5", r), children: [
|
|
201
|
-
/* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "Enum values:" }),
|
|
202
|
-
l.map((c) => /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(m, { className: "border rounded-sm px-1 font-mono", children: c }) }, c)),
|
|
203
|
-
s && /* @__PURE__ */ t.jsx(
|
|
204
|
-
H,
|
|
205
|
-
{
|
|
206
|
-
variant: "ghost",
|
|
207
|
-
size: "sm",
|
|
208
|
-
className: "h-fit px-0",
|
|
209
|
-
onClick: () => o(!i),
|
|
210
|
-
children: i ? /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
211
|
-
/* @__PURE__ */ t.jsx(T, { size: 12 }),
|
|
212
|
-
/* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "show less" })
|
|
213
|
-
] }) : /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
214
|
-
/* @__PURE__ */ t.jsx(_, { size: 12 }),
|
|
215
|
-
/* @__PURE__ */ t.jsxs("span", { className: "text-muted-foreground", children: [
|
|
216
|
-
"show ",
|
|
217
|
-
e.length - n,
|
|
218
|
-
" more"
|
|
219
|
-
] })
|
|
220
|
-
] })
|
|
221
|
-
}
|
|
222
|
-
)
|
|
223
|
-
] });
|
|
224
|
-
}, xe = ({ pattern: e }) => {
|
|
225
|
-
const [r, n] = j(!1), i = e.length > 20, o = i ? `${e.slice(0, 20)}…` : e;
|
|
226
|
-
return /* @__PURE__ */ t.jsxs(
|
|
227
|
-
q,
|
|
228
|
-
{
|
|
229
|
-
className: a("text-xs", i && "cursor-pointer"),
|
|
230
|
-
onClick: () => n(!r),
|
|
231
|
-
selectOnClick: !1,
|
|
232
|
-
children: [
|
|
233
|
-
r ? e : o,
|
|
234
|
-
i && /* @__PURE__ */ t.jsx("button", { type: "button", className: "p-1 translate-y-[2px]", children: !r && /* @__PURE__ */ t.jsx(J, { size: 12 }) })
|
|
235
|
-
]
|
|
236
|
-
}
|
|
237
|
-
);
|
|
238
|
-
}, ue = (e) => e ? [
|
|
239
|
-
e.type === "array" && e.items.type ? Array.isArray(e.items.type) ? `(${e.items.type.join(" | ")})[]` : `${e.items.type}[]` : Array.isArray(e.type) ? e.type.join(" | ") : e.type,
|
|
240
|
-
e.enum && "enum",
|
|
241
|
-
e.const && "const",
|
|
242
|
-
e.format,
|
|
243
|
-
e.minimum !== void 0 && `min: ${e.minimum}`,
|
|
244
|
-
e.maximum !== void 0 && `max: ${e.maximum}`,
|
|
245
|
-
e.minLength !== void 0 && `minLength: ${e.minLength}`,
|
|
246
|
-
e.maxLength !== void 0 && `maxLength: ${e.maxLength}`,
|
|
247
|
-
e.minItems !== void 0 && `minItems: ${e.minItems}`,
|
|
248
|
-
e.maxItems !== void 0 && `maxItems: ${e.maxItems}`,
|
|
249
|
-
e.minProperties !== void 0 && `minProps: ${e.minProperties}`,
|
|
250
|
-
e.maxProperties !== void 0 && `maxProps: ${e.maxProperties}`,
|
|
251
|
-
e.uniqueItems && "unique",
|
|
252
|
-
e.readOnly && "readOnly",
|
|
253
|
-
e.writeOnly && "writeOnly",
|
|
254
|
-
e.deprecated && "deprecated",
|
|
255
|
-
e.pattern && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
256
|
-
"pattern: ",
|
|
257
|
-
/* @__PURE__ */ t.jsx(xe, { pattern: e.pattern })
|
|
258
|
-
] })
|
|
259
|
-
] : [], h = ({
|
|
260
|
-
schema: e,
|
|
261
|
-
extraItems: r = [],
|
|
262
|
-
className: n
|
|
263
|
-
}) => {
|
|
264
|
-
const i = [...ue(e), ...r].flatMap(
|
|
265
|
-
(o) => typeof o == "string" || Q(o) ? o : []
|
|
266
|
-
);
|
|
267
|
-
return /* @__PURE__ */ t.jsx("span", { className: n, children: i.map((o, s) => (
|
|
268
|
-
// biome-ignore lint/suspicious/noArrayIndexKey: index should be stable
|
|
269
|
-
/* @__PURE__ */ t.jsxs("span", { className: "text-muted-foreground", children: [
|
|
270
|
-
o,
|
|
271
|
-
s < i.length - 1 && /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground/50", children: " · " })
|
|
272
|
-
] }, s)
|
|
273
|
-
)) });
|
|
274
|
-
}, I = ({
|
|
275
|
-
schema: e
|
|
276
|
-
}) => {
|
|
277
|
-
const r = e.examples?.at(0), n = e.default;
|
|
278
|
-
return r === void 0 && n === void 0 ? null : /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
279
|
-
r !== void 0 && /* @__PURE__ */ t.jsxs("div", { children: [
|
|
280
|
-
/* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "Example: " }),
|
|
281
|
-
/* @__PURE__ */ t.jsx(m, { className: "border rounded-sm px-1 font-mono", children: typeof r == "object" || typeof r == "boolean" ? JSON.stringify(r) : r })
|
|
282
|
-
] }),
|
|
283
|
-
n !== void 0 && /* @__PURE__ */ t.jsxs("div", { children: [
|
|
284
|
-
/* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "Default: " }),
|
|
285
|
-
/* @__PURE__ */ t.jsx(m, { className: "border rounded-sm px-1 font-mono", children: typeof n == "object" || typeof n == "boolean" ? JSON.stringify(n) : n })
|
|
286
|
-
] })
|
|
287
|
-
] });
|
|
288
|
-
}, R = (e) => typeof e == "string" && ["string", "number", "boolean", "integer", "null"].includes(e) || Array.isArray(e) && e.every(R), f = (e) => e.type === "array" || // schema.type might be an array of types, so we need to check if "array" is one of them
|
|
289
|
-
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(se), F = (e) => f(e) && "items" in e && B(e.items), me = (e) => typeof e == "string" ? e.split(":")[1] : void 0, V = ({ circularProp: e }) => /* @__PURE__ */ t.jsxs(
|
|
290
|
-
q,
|
|
291
|
-
{
|
|
292
|
-
className: "inline-flex items-center gap-1.5 text-xs translate-y-0.5",
|
|
293
|
-
selectOnClick: !1,
|
|
294
|
-
children: [
|
|
295
|
-
/* @__PURE__ */ t.jsx(K, { size: 13 }),
|
|
296
|
-
/* @__PURE__ */ t.jsx("span", { children: e ? `${e} (circular)` : "circular" })
|
|
297
|
-
]
|
|
298
|
-
}
|
|
299
|
-
), fe = ({
|
|
300
|
-
name: e,
|
|
301
|
-
schema: r,
|
|
302
|
-
group: n,
|
|
303
|
-
defaultOpen: i = !1,
|
|
304
|
-
showCollapseButton: o = !0
|
|
305
|
-
}) => {
|
|
306
|
-
const [s, l] = j(i);
|
|
307
|
-
if (B(r))
|
|
308
|
-
return /* @__PURE__ */ t.jsx($, { children: /* @__PURE__ */ t.jsxs(g, { className: "gap-y-2", children: [
|
|
309
|
-
/* @__PURE__ */ t.jsxs("div", { children: [
|
|
310
|
-
/* @__PURE__ */ t.jsx(w, { className: "inline me-2", children: /* @__PURE__ */ t.jsx("code", { children: e }) }),
|
|
311
|
-
/* @__PURE__ */ t.jsx(
|
|
312
|
-
h,
|
|
313
|
-
{
|
|
314
|
-
className: "inline",
|
|
315
|
-
schema: r,
|
|
316
|
-
extraItems: [
|
|
317
|
-
n !== "optional" && /* @__PURE__ */ t.jsx("span", { className: "text-primary", children: "required" }),
|
|
318
|
-
/* @__PURE__ */ t.jsx(V, {}, "circular-ref")
|
|
319
|
-
]
|
|
320
|
-
}
|
|
321
|
-
)
|
|
322
|
-
] }),
|
|
323
|
-
/* @__PURE__ */ t.jsx(I, { schema: r })
|
|
324
|
-
] }) });
|
|
325
|
-
const c = !!((r.allOf || r.anyOf || r.oneOf || k(r) || f(r) && "items" in r && k(r.items) || r.additionalProperties) && !F(r)), x = !!(r.description || "items" in r && r.items?.enum || r.const || r.enum || r.example !== void 0 || r.default !== void 0);
|
|
326
|
-
return /* @__PURE__ */ t.jsxs($, { children: [
|
|
327
|
-
/* @__PURE__ */ t.jsxs(g, { className: "gap-y-2", children: [
|
|
328
|
-
/* @__PURE__ */ t.jsxs("div", { children: [
|
|
329
|
-
/* @__PURE__ */ t.jsx(w, { className: "inline me-2", children: c ? /* @__PURE__ */ t.jsx(
|
|
330
|
-
"button",
|
|
331
|
-
{
|
|
332
|
-
onClick: () => l(!s),
|
|
333
|
-
type: "button",
|
|
334
|
-
className: "hover:underline",
|
|
335
|
-
children: /* @__PURE__ */ t.jsx("code", { children: e })
|
|
336
|
-
}
|
|
337
|
-
) : /* @__PURE__ */ t.jsx("code", { children: e }) }),
|
|
338
|
-
/* @__PURE__ */ t.jsx(
|
|
339
|
-
h,
|
|
340
|
-
{
|
|
341
|
-
className: "inline",
|
|
342
|
-
schema: r,
|
|
343
|
-
extraItems: [
|
|
344
|
-
n !== "optional" && /* @__PURE__ */ t.jsx("span", { className: "text-primary", children: "required" }),
|
|
345
|
-
F(r) && /* @__PURE__ */ t.jsx(
|
|
346
|
-
V,
|
|
347
|
-
{
|
|
348
|
-
circularProp: me(r.items)
|
|
349
|
-
}
|
|
350
|
-
)
|
|
351
|
-
]
|
|
352
|
-
}
|
|
353
|
-
)
|
|
354
|
-
] }),
|
|
355
|
-
x && /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
356
|
-
r.description && /* @__PURE__ */ t.jsx(E, { className: "prose-sm", content: r.description }),
|
|
357
|
-
"items" in r && r.items?.enum && /* @__PURE__ */ t.jsx(v, { values: r.items.enum }),
|
|
358
|
-
r.const && /* @__PURE__ */ t.jsx(z, { schema: r, hideDescription: !0 }),
|
|
359
|
-
r.enum && /* @__PURE__ */ t.jsx(v, { values: r.enum }),
|
|
360
|
-
/* @__PURE__ */ t.jsx(I, { schema: r })
|
|
361
|
-
] })
|
|
362
|
-
] }),
|
|
363
|
-
c && o && /* @__PURE__ */ t.jsx(pe, { className: "self-start", children: /* @__PURE__ */ t.jsx(
|
|
364
|
-
ee,
|
|
365
|
-
{
|
|
366
|
-
variant: "ghost",
|
|
367
|
-
size: "icon",
|
|
368
|
-
className: "rounded-full",
|
|
369
|
-
onClick: () => l(!s),
|
|
370
|
-
"aria-label": "Toggle properties",
|
|
371
|
-
children: s ? /* @__PURE__ */ t.jsx(U, { size: 16 }) : /* @__PURE__ */ t.jsx(G, { size: 16 })
|
|
372
|
-
}
|
|
373
|
-
) }),
|
|
374
|
-
c && /* @__PURE__ */ t.jsx(
|
|
375
|
-
P.Root,
|
|
376
|
-
{
|
|
377
|
-
defaultOpen: i,
|
|
378
|
-
open: s,
|
|
379
|
-
onOpenChange: l,
|
|
380
|
-
className: a("w-full", !s && "contents"),
|
|
381
|
-
children: /* @__PURE__ */ t.jsx(P.Content, { asChild: !0, children: /* @__PURE__ */ t.jsx(g, { children: r.anyOf || r.oneOf || r.type === "object" ? /* @__PURE__ */ t.jsx(u, { schema: r }) : f(r) && "items" in r ? /* @__PURE__ */ t.jsx(u, { schema: r.items }) : null }) })
|
|
382
|
-
}
|
|
383
|
-
)
|
|
384
|
-
] });
|
|
385
|
-
}, M = (e) => {
|
|
386
|
-
const r = e.oneOf ?? e.anyOf ?? [];
|
|
387
|
-
return e.properties && Object.keys(e.properties).length > 0 ? r.map((n) => !n.properties && !n.type && !n.oneOf && !n.anyOf ? {
|
|
388
|
-
...n,
|
|
389
|
-
type: "object",
|
|
390
|
-
properties: e.properties,
|
|
391
|
-
required: n.required ?? e.required
|
|
392
|
-
} : n) : r;
|
|
393
|
-
}, je = (e) => {
|
|
394
|
-
if (Array.isArray(e.oneOf)) return "exactly-one";
|
|
395
|
-
const r = e.discriminator?.propertyName;
|
|
396
|
-
if (!r) return "at-least-one";
|
|
397
|
-
const n = M(e), i = /* @__PURE__ */ new Set();
|
|
398
|
-
for (const o of n) {
|
|
399
|
-
const s = o.properties?.[r], l = s?.const ?? (Array.isArray(s?.enum) && s.enum.length === 1 ? String(s.enum[0]) : void 0);
|
|
400
|
-
if (l == null || i.has(String(l))) return "at-least-one";
|
|
401
|
-
i.add(String(l));
|
|
402
|
-
}
|
|
403
|
-
return "exactly-one";
|
|
404
|
-
}, O = (e, r) => r.title?.trim() || `Variant ${e + 1}`, ye = (e, r) => {
|
|
405
|
-
const n = [];
|
|
406
|
-
e.type && n.push(
|
|
407
|
-
`type = ${Array.isArray(e.type) ? e.type.join("|") : e.type}`
|
|
408
|
-
);
|
|
409
|
-
const i = r?.discriminator?.propertyName;
|
|
410
|
-
if (i) {
|
|
411
|
-
const s = e.properties?.[i], l = s?.const ?? (Array.isArray(s?.enum) && s.enum.length === 1 ? s.enum[0] : void 0);
|
|
412
|
-
l !== void 0 && n.push(`${i}=${JSON.stringify(l)}`);
|
|
413
|
-
}
|
|
414
|
-
const o = (e.required ?? []).filter((s) => s !== i);
|
|
415
|
-
if (o.length) {
|
|
416
|
-
const s = o.slice(0, 3).join(", "), l = o.length > 3 ? ` +${o.length - 3} more` : "";
|
|
417
|
-
n.push(`requires: ${s}${l}`);
|
|
418
|
-
}
|
|
419
|
-
return n;
|
|
420
|
-
}, ge = ({
|
|
421
|
-
variants: e,
|
|
422
|
-
schema: r,
|
|
423
|
-
selectedVariant: n,
|
|
424
|
-
onSelectVariant: i
|
|
425
|
-
}) => {
|
|
426
|
-
const o = e.map((s, l) => ({
|
|
427
|
-
label: O(l, s),
|
|
428
|
-
guards: ye(s, r)
|
|
429
|
-
}));
|
|
430
|
-
return /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-2 text-sm", children: [
|
|
431
|
-
/* @__PURE__ */ t.jsx("h4", { className: "font-medium", children: "Decision Table" }),
|
|
432
|
-
/* @__PURE__ */ t.jsx("div", { className: "border rounded-md overflow-hidden", children: /* @__PURE__ */ t.jsxs("table", { className: "w-full", children: [
|
|
433
|
-
/* @__PURE__ */ t.jsx("thead", { children: /* @__PURE__ */ t.jsxs("tr", { className: "border-b bg-muted/50", children: [
|
|
434
|
-
/* @__PURE__ */ t.jsx("th", { className: "text-left p-2 font-medium", children: "Variant" }),
|
|
435
|
-
/* @__PURE__ */ t.jsx("th", { className: "text-left p-2 font-medium", children: "Matching Criteria" })
|
|
436
|
-
] }) }),
|
|
437
|
-
/* @__PURE__ */ t.jsx("tbody", { className: "divide-y", children: o.map((s) => /* @__PURE__ */ t.jsxs("tr", { className: "hover:bg-muted/30", children: [
|
|
438
|
-
/* @__PURE__ */ t.jsx("td", { className: "p-2 font-medium", children: /* @__PURE__ */ t.jsx(
|
|
439
|
-
"button",
|
|
440
|
-
{
|
|
441
|
-
type: "button",
|
|
442
|
-
className: a(
|
|
443
|
-
"hover:underline",
|
|
444
|
-
n === s.label && "text-primary"
|
|
445
|
-
),
|
|
446
|
-
onClick: () => i(s.label),
|
|
447
|
-
children: s.label
|
|
448
|
-
}
|
|
449
|
-
) }),
|
|
450
|
-
/* @__PURE__ */ t.jsx("td", { className: "p-2 text-muted-foreground text-xs", children: s.guards.length > 0 ? s.guards.join(" · ") : "No specific criteria" })
|
|
451
|
-
] }, s.label)) })
|
|
452
|
-
] }) })
|
|
453
|
-
] });
|
|
454
|
-
}, Ne = ({
|
|
455
|
-
schema: e,
|
|
456
|
-
cardHeader: r
|
|
457
|
-
}) => {
|
|
458
|
-
const n = Array.isArray(e.oneOf) ? "oneOf" : Array.isArray(e.anyOf) ? "anyOf" : void 0, i = n ? M(e) : [], [o, s] = j(
|
|
459
|
-
() => i[0] ? O(0, i[0]) : ""
|
|
460
|
-
);
|
|
461
|
-
if (!n) return null;
|
|
462
|
-
const c = je(e) === "exactly-one" ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
463
|
-
"Exactly one variant ",
|
|
464
|
-
/* @__PURE__ */ t.jsx("b", { children: "must match" }),
|
|
465
|
-
"."
|
|
466
|
-
] }) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
467
|
-
"At least one variant ",
|
|
468
|
-
/* @__PURE__ */ t.jsx("b", { children: "must match" }),
|
|
469
|
-
". Multiple variants",
|
|
470
|
-
" ",
|
|
471
|
-
/* @__PURE__ */ t.jsx("i", { children: "may match" }),
|
|
472
|
-
" simultaneously."
|
|
473
|
-
] }), x = i.findIndex(
|
|
474
|
-
(p, y) => O(y, p) === o
|
|
475
|
-
), d = x >= 0 ? i[x] : null;
|
|
476
|
-
return /* @__PURE__ */ t.jsxs(re, { children: [
|
|
477
|
-
r,
|
|
478
|
-
/* @__PURE__ */ t.jsxs(ne, { className: "text-sm flex flex-col gap-4", children: [
|
|
479
|
-
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
480
|
-
/* @__PURE__ */ t.jsx(te, { variant: "outline", children: n }),
|
|
481
|
-
/* @__PURE__ */ t.jsx("div", { className: "flex-1 p-2", children: /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: c }) })
|
|
482
|
-
] }),
|
|
483
|
-
/* @__PURE__ */ t.jsx(
|
|
484
|
-
ge,
|
|
485
|
-
{
|
|
486
|
-
variants: i,
|
|
487
|
-
schema: e,
|
|
488
|
-
selectedVariant: o,
|
|
489
|
-
onSelectVariant: s
|
|
490
|
-
}
|
|
491
|
-
),
|
|
492
|
-
/* @__PURE__ */ t.jsxs("strong", { children: [
|
|
493
|
-
"Properties for ",
|
|
494
|
-
o,
|
|
495
|
-
":"
|
|
496
|
-
] }),
|
|
497
|
-
d && /* @__PURE__ */ t.jsx(u, { schema: d })
|
|
498
|
-
] })
|
|
499
|
-
] });
|
|
500
|
-
}, be = (e) => e && /* @__PURE__ */ t.jsx(
|
|
501
|
-
E,
|
|
502
|
-
{
|
|
503
|
-
className: "text-sm leading-normal line-clamp-4",
|
|
504
|
-
content: e
|
|
505
|
-
}
|
|
506
|
-
), ve = (e, r, n) => {
|
|
507
|
-
const i = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
508
|
-
/* @__PURE__ */ t.jsx("span", { className: "text-sm text-muted-foreground", children: /* @__PURE__ */ t.jsx(h, { schema: e }) }),
|
|
509
|
-
e.enum && /* @__PURE__ */ t.jsx(v, { values: e.enum }),
|
|
510
|
-
be(e.description),
|
|
511
|
-
/* @__PURE__ */ t.jsx(I, { schema: e })
|
|
512
|
-
] });
|
|
513
|
-
return n ? /* @__PURE__ */ t.jsx("div", { className: "space-y-2 p-4", children: i }) : /* @__PURE__ */ t.jsxs(N, { children: [
|
|
514
|
-
r,
|
|
515
|
-
/* @__PURE__ */ t.jsx(b, { className: "space-y-2", children: i })
|
|
516
|
-
] });
|
|
517
|
-
}, u = ({
|
|
518
|
-
schema: e,
|
|
519
|
-
defaultOpen: r = !1,
|
|
520
|
-
cardHeader: n,
|
|
521
|
-
embedded: i
|
|
522
|
-
}) => {
|
|
523
|
-
if (!e || Object.keys(e).length === 0)
|
|
524
|
-
return /* @__PURE__ */ t.jsxs(N, { children: [
|
|
525
|
-
n,
|
|
526
|
-
/* @__PURE__ */ t.jsx(b, { children: /* @__PURE__ */ t.jsx("div", { className: "text-sm text-muted-foreground italic", children: "No data returned" }) })
|
|
527
|
-
] });
|
|
528
|
-
if (e.const)
|
|
529
|
-
return /* @__PURE__ */ t.jsx(z, { schema: e });
|
|
530
|
-
if (Array.isArray(e.oneOf) || Array.isArray(e.anyOf))
|
|
531
|
-
return /* @__PURE__ */ t.jsx(Ne, { schema: e, cardHeader: n });
|
|
532
|
-
if (R(e.type))
|
|
533
|
-
return ve(e, n, i);
|
|
534
|
-
if (f(e) && typeof e.items == "object") {
|
|
535
|
-
const s = {
|
|
536
|
-
type: "object",
|
|
537
|
-
properties: { "": e }
|
|
538
|
-
};
|
|
539
|
-
return /* @__PURE__ */ t.jsx(u, { schema: s, cardHeader: n, defaultOpen: !0 });
|
|
540
|
-
}
|
|
541
|
-
const o = typeof e.additionalProperties == "object" && /* @__PURE__ */ t.jsx(u, { schema: e.additionalProperties, embedded: !0 });
|
|
542
|
-
if (e.type === "object") {
|
|
543
|
-
const s = ie(
|
|
544
|
-
Object.entries(e.properties ?? {}),
|
|
545
|
-
([d, p]) => p.deprecated ? "deprecated" : e.required?.includes(d) ? "required" : "optional"
|
|
546
|
-
), x = ["required", "optional", "deprecated"].flatMap((d) => {
|
|
547
|
-
const p = s[d];
|
|
548
|
-
return p ? { group: d, properties: p } : [];
|
|
549
|
-
}).map(({ group: d, properties: p }, y) => /* @__PURE__ */ t.jsxs(C, { children: [
|
|
550
|
-
y > 0 && /* @__PURE__ */ t.jsx(S, {}),
|
|
551
|
-
/* @__PURE__ */ t.jsx(de, { className: "overflow-clip", children: p.map(([A, D], L) => /* @__PURE__ */ t.jsxs(C, { children: [
|
|
552
|
-
L > 0 && /* @__PURE__ */ t.jsx(S, {}),
|
|
553
|
-
/* @__PURE__ */ t.jsx(
|
|
554
|
-
fe,
|
|
555
|
-
{
|
|
556
|
-
name: A,
|
|
557
|
-
schema: D,
|
|
558
|
-
group: d,
|
|
559
|
-
defaultOpen: r
|
|
560
|
-
}
|
|
561
|
-
)
|
|
562
|
-
] }, A)) })
|
|
563
|
-
] }, d));
|
|
564
|
-
return i ? x : /* @__PURE__ */ t.jsxs(N, { children: [
|
|
565
|
-
n,
|
|
566
|
-
e.description && /* @__PURE__ */ t.jsx(oe, { children: /* @__PURE__ */ t.jsx(le, { children: e.description }) }),
|
|
567
|
-
/* @__PURE__ */ t.jsxs(b, { className: "p-0!", children: [
|
|
568
|
-
x,
|
|
569
|
-
o
|
|
570
|
-
] }),
|
|
571
|
-
e.additionalProperties === !0 && /* @__PURE__ */ t.jsx(ae, { children: /* @__PURE__ */ t.jsxs(
|
|
572
|
-
"a",
|
|
573
|
-
{
|
|
574
|
-
className: "text-sm flex items-center gap-1 hover:underline",
|
|
575
|
-
href: "https://swagger.io/docs/specification/v3_0/data-models/dictionaries/",
|
|
576
|
-
rel: "noopener noreferrer",
|
|
577
|
-
target: "_blank",
|
|
578
|
-
children: [
|
|
579
|
-
"Additional properties are allowed",
|
|
580
|
-
/* @__PURE__ */ t.jsx(W, { size: 14 })
|
|
581
|
-
]
|
|
582
|
-
}
|
|
583
|
-
) })
|
|
584
|
-
] });
|
|
585
|
-
}
|
|
586
|
-
};
|
|
587
|
-
export {
|
|
588
|
-
v as E,
|
|
589
|
-
Ee as P,
|
|
590
|
-
u as S,
|
|
591
|
-
h as a,
|
|
592
|
-
I as b,
|
|
593
|
-
B as c,
|
|
594
|
-
ie as g,
|
|
595
|
-
f as i
|
|
596
|
-
};
|
|
597
|
-
//# sourceMappingURL=SchemaView-eyvR4bRt.js.map
|