zudoku 0.65.3 → 0.66.0
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/app/sentry.js +1 -1
- package/dist/config/validators/BuildSchema.js +18 -3
- package/dist/config/validators/BuildSchema.js.map +1 -1
- package/dist/config/validators/validate.d.ts +45 -3
- package/dist/config/validators/validate.js +7 -1
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/flat-config.d.ts +9 -2
- package/dist/lib/components/Mermaid.d.ts +7 -0
- package/dist/lib/components/Mermaid.js +42 -0
- package/dist/lib/components/Mermaid.js.map +1 -0
- package/dist/lib/components/PagefindSearchMeta.d.ts +8 -0
- package/dist/lib/components/PagefindSearchMeta.js +7 -0
- package/dist/lib/components/PagefindSearchMeta.js.map +1 -0
- package/dist/lib/components/Zudoku.js +2 -5
- package/dist/lib/components/Zudoku.js.map +1 -1
- package/dist/lib/core/RouteGuard.js +1 -1
- package/dist/lib/core/RouteGuard.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +3 -3
- package/dist/lib/oas/parser/index.d.ts +1 -0
- package/dist/lib/oas/parser/index.js.map +1 -1
- package/dist/lib/plugins/openapi/DownloadSchemaButton.d.ts +3 -0
- package/dist/lib/plugins/openapi/DownloadSchemaButton.js +47 -0
- package/dist/lib/plugins/openapi/DownloadSchemaButton.js.map +1 -0
- package/dist/lib/plugins/openapi/Endpoint.js +3 -6
- package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
- package/dist/lib/plugins/openapi/OasProvider.js +22 -13
- package/dist/lib/plugins/openapi/OasProvider.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +12 -6
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +2 -2
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaList.js +2 -1
- package/dist/lib/plugins/openapi/SchemaList.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +11 -5
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +16 -13
- package/dist/lib/plugins/openapi/playground/Playground.js +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js +14 -6
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/utils.d.ts +2 -2
- package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
- package/dist/lib/plugins/openapi/util/getRoutes.d.ts +6 -1
- package/dist/lib/plugins/openapi/util/getRoutes.js +29 -2
- package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/IndexingDialog.d.ts +3 -0
- package/dist/lib/plugins/search-pagefind/IndexingDialog.js +64 -0
- package/dist/lib/plugins/search-pagefind/IndexingDialog.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js +22 -5
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/ResultList.js +5 -4
- package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
- package/dist/lib/shiki.d.ts +1 -1
- package/dist/lib/shiki.js +18 -12
- package/dist/lib/shiki.js.map +1 -1
- package/dist/lib/ui/Button.d.ts +2 -2
- package/dist/lib/ui/Button.js +9 -8
- package/dist/lib/ui/Button.js.map +1 -1
- package/dist/lib/ui/ButtonGroup.d.ts +11 -0
- package/dist/lib/ui/ButtonGroup.js +28 -0
- package/dist/lib/ui/ButtonGroup.js.map +1 -0
- package/dist/lib/ui/Command.js +2 -2
- package/dist/lib/ui/Command.js.map +1 -1
- package/dist/lib/ui/DropdownMenu.d.ts +21 -23
- package/dist/lib/ui/DropdownMenu.js +47 -32
- package/dist/lib/ui/DropdownMenu.js.map +1 -1
- package/dist/lib/ui/Kbd.d.ts +3 -0
- package/dist/lib/ui/Kbd.js +10 -0
- package/dist/lib/ui/Kbd.js.map +1 -0
- package/dist/lib/util/MdxComponents.d.ts +1 -0
- package/dist/lib/util/MdxComponents.js +2 -0
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/flattenAllOf.js +27 -4
- package/dist/lib/util/flattenAllOf.js.map +1 -1
- package/dist/lib/util/flattenAllOf.test.js +67 -12
- package/dist/lib/util/flattenAllOf.test.js.map +1 -1
- package/dist/vite/api/SchemaManager.d.ts +5 -0
- package/dist/vite/api/SchemaManager.js +24 -0
- package/dist/vite/api/SchemaManager.js.map +1 -1
- package/dist/vite/api/SchemaManager.test.js +67 -0
- package/dist/vite/api/SchemaManager.test.js.map +1 -1
- package/dist/vite/config.js +8 -2
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/dev-server.js +25 -0
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/pagefind-dev-index.d.ts +16 -0
- package/dist/vite/pagefind-dev-index.js +68 -0
- package/dist/vite/pagefind-dev-index.js.map +1 -0
- package/dist/vite/plugin-api.js +41 -3
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/prerender/prerender.js +1 -19
- package/dist/vite/prerender/prerender.js.map +1 -1
- package/dist/vite/prerender/utils.d.ts +2 -0
- package/dist/vite/prerender/utils.js +24 -0
- package/dist/vite/prerender/utils.js.map +1 -0
- package/lib/Button-CynVW1JV.js +53 -0
- package/lib/Button-CynVW1JV.js.map +1 -0
- package/lib/ClaudeLogo-PxFjou9w.js +69 -0
- package/lib/ClaudeLogo-PxFjou9w.js.map +1 -0
- package/lib/{Command-CUcrW3qs.js → Command-BpT1iBE6.js} +25 -25
- package/lib/Command-BpT1iBE6.js.map +1 -0
- package/lib/Drawer-Ci7XwhqT.js.map +1 -1
- package/lib/DropdownMenu-C8SX_-S_.js +104 -0
- package/lib/DropdownMenu-C8SX_-S_.js.map +1 -0
- package/lib/{ErrorAlert-D5LKLFOd.js → ErrorAlert-BqjbNHIn.js} +1017 -1015
- package/lib/{ErrorAlert-D5LKLFOd.js.map → ErrorAlert-BqjbNHIn.js.map} +1 -1
- package/lib/IndexingDialog-B5zCiUKr.js +100 -0
- package/lib/IndexingDialog-B5zCiUKr.js.map +1 -0
- package/lib/MdxPage-CVFatbHw.js +210 -0
- package/lib/MdxPage-CVFatbHw.js.map +1 -0
- package/lib/Mermaid-CIFixY6C.js +102 -0
- package/lib/Mermaid-CIFixY6C.js.map +1 -0
- package/lib/{OAuthErrorPage-oXnxcJg4.js → OAuthErrorPage-Dup79DJk.js} +7 -7
- package/lib/{OAuthErrorPage-oXnxcJg4.js.map → OAuthErrorPage-Dup79DJk.js.map} +1 -1
- package/lib/OasProvider-BJeMq29o.js +40 -0
- package/lib/OasProvider-BJeMq29o.js.map +1 -0
- package/lib/{OperationList-CmMoKpGu.js → OperationList-ff3ZvQsO.js} +1701 -1585
- package/lib/OperationList-ff3ZvQsO.js.map +1 -0
- package/lib/{RouteGuard-Brz95MSt.js → RouteGuard-BXy13JSz.js} +19 -19
- package/lib/{RouteGuard-Brz95MSt.js.map → RouteGuard-BXy13JSz.js.map} +1 -1
- package/lib/{RouterError-VGZB_wg4.js → RouterError-CKOZTsDD.js} +3 -3
- package/lib/{RouterError-VGZB_wg4.js.map → RouterError-CKOZTsDD.js.map} +1 -1
- package/lib/{SchemaList-BykD27ga.js → SchemaList-BSC1KM3v.js} +28 -27
- package/lib/SchemaList-BSC1KM3v.js.map +1 -0
- package/lib/{SchemaView-Dt6hbCAt.js → SchemaView-CgwJ9gtb.js} +198 -187
- package/lib/SchemaView-CgwJ9gtb.js.map +1 -0
- package/lib/Select-VmDZ-nKe.js +337 -0
- package/lib/Select-VmDZ-nKe.js.map +1 -0
- package/lib/{SignUp-D2mmQOkg.js → SignUp-Pm_LGm6T.js} +13 -13
- package/lib/{SignUp-D2mmQOkg.js.map → SignUp-Pm_LGm6T.js.map} +1 -1
- package/lib/{SyntaxHighlight-C19vH0V_.js → SyntaxHighlight-bkmst3oV.js} +654 -622
- package/lib/SyntaxHighlight-bkmst3oV.js.map +1 -0
- package/lib/{Toc-CBWfFCVf.js → Toc-TUXNFbKl.js} +2 -2
- package/lib/{Toc-CBWfFCVf.js.map → Toc-TUXNFbKl.js.map} +1 -1
- package/lib/{ZudokuContext-BUZ5hkWB.js → ZudokuContext-np1wheDl.js} +8 -8
- package/lib/{ZudokuContext-BUZ5hkWB.js.map → ZudokuContext-np1wheDl.js.map} +1 -1
- package/lib/___vite-browser-external_commonjs-proxy-Cga3HsWk.js +9 -0
- package/lib/___vite-browser-external_commonjs-proxy-Cga3HsWk.js.map +1 -0
- package/lib/{chunk-PVWAREVJ-BMhpCH5D.js → chunk-PVWAREVJ-dLIqswPy.js} +5 -5
- package/lib/{chunk-PVWAREVJ-BMhpCH5D.js.map → chunk-PVWAREVJ-dLIqswPy.js.map} +1 -1
- package/lib/{circular-CNHs4gAz.js → circular-XPj_dwqA.js} +2 -2
- package/lib/{circular-CNHs4gAz.js.map → circular-XPj_dwqA.js.map} +1 -1
- package/lib/createServer-D01nCTNp.js +16693 -0
- package/lib/createServer-D01nCTNp.js.map +1 -0
- package/lib/{errors-D7xzOd8X.js → errors-B0hNTPFO.js} +3 -3
- package/lib/{errors-D7xzOd8X.js.map → errors-B0hNTPFO.js.map} +1 -1
- package/lib/{hook-CMeoxziF.js → hook-CvSwcbk6.js} +3 -3
- package/lib/{hook-CMeoxziF.js.map → hook-CvSwcbk6.js.map} +1 -1
- package/lib/{index-unv8c40u.js → index-Bjc_QsUR.js} +754 -738
- package/lib/{index-unv8c40u.js.map → index-Bjc_QsUR.js.map} +1 -1
- package/lib/index-CrcNWbel.js.map +1 -1
- package/lib/index-DnMgJWrI.js +133 -0
- package/lib/index-DnMgJWrI.js.map +1 -0
- package/lib/{index-CF7_erXq.js → index-DscsS121.js} +2 -2
- package/lib/{index-CF7_erXq.js.map → index-DscsS121.js.map} +1 -1
- package/lib/{index-CPws05Tb.js → index-mfkNWYG-.js} +10 -10
- package/lib/{index-CPws05Tb.js.map → index-mfkNWYG-.js.map} +1 -1
- package/lib/{index.esm-BnYHxCYC.js → index.esm-DtzT_KoE.js} +20 -20
- package/lib/{index.esm-BnYHxCYC.js.map → index.esm-DtzT_KoE.js.map} +1 -1
- package/lib/{invariant-Bm-FVUQE.js → invariant-CGOLuIIz.js} +3 -3
- package/lib/{invariant-Bm-FVUQE.js.map → invariant-CGOLuIIz.js.map} +1 -1
- package/lib/{mutation-BSU0xu4m.js → mutation-BlmnL5qL.js} +2 -2
- package/lib/{mutation-BSU0xu4m.js.map → mutation-BlmnL5qL.js.map} +1 -1
- package/lib/ui/ActionButton.js +1 -1
- package/lib/ui/Button.js +25 -24
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/ButtonGroup.js +77 -0
- package/lib/ui/ButtonGroup.js.map +1 -0
- package/lib/ui/Command.js +3 -3
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/DropdownMenu.js +227 -140
- package/lib/ui/DropdownMenu.js.map +1 -1
- package/lib/ui/Kbd.js +32 -0
- package/lib/ui/Kbd.js.map +1 -0
- package/lib/ui/SyntaxHighlight.js +3 -3
- package/lib/zudoku.__internal.js +8 -8
- 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-openid.js +5 -5
- package/lib/zudoku.auth-supabase.js +5 -5
- package/lib/zudoku.components.js +7 -7
- package/lib/zudoku.hooks.js +11 -24
- package/lib/zudoku.hooks.js.map +1 -1
- package/lib/zudoku.mermaid.js +10 -0
- package/lib/zudoku.mermaid.js.map +1 -0
- package/lib/zudoku.plugin-api-catalog.js +6 -6
- package/lib/zudoku.plugin-api-keys.js +223 -198
- 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 +184 -226
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/lib/zudoku.plugins.js.map +1 -1
- package/lib/zudoku.router.js +2 -2
- package/package.json +29 -21
- package/src/app/sentry.ts +1 -1
- package/src/lib/components/Mermaid.tsx +68 -0
- package/src/lib/components/PagefindSearchMeta.tsx +14 -0
- package/src/lib/components/Zudoku.tsx +4 -7
- package/src/lib/core/RouteGuard.tsx +1 -1
- package/src/lib/core/plugins.ts +2 -2
- package/src/lib/oas/parser/index.ts +2 -0
- package/src/lib/plugins/openapi/DownloadSchemaButton.tsx +115 -0
- package/src/lib/plugins/openapi/Endpoint.tsx +20 -27
- package/src/lib/plugins/openapi/OasProvider.tsx +30 -17
- package/src/lib/plugins/openapi/OperationList.tsx +39 -21
- package/src/lib/plugins/openapi/OperationListItem.tsx +5 -5
- package/src/lib/plugins/openapi/SchemaList.tsx +4 -0
- package/src/lib/plugins/openapi/index.tsx +16 -7
- package/src/lib/plugins/openapi/interfaces.ts +16 -7
- package/src/lib/plugins/openapi/playground/Playground.tsx +1 -1
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +36 -27
- package/src/lib/plugins/openapi/schema/utils.ts +5 -2
- package/src/lib/plugins/openapi/util/getRoutes.tsx +35 -3
- package/src/lib/plugins/search-pagefind/IndexingDialog.tsx +163 -0
- package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +61 -22
- package/src/lib/plugins/search-pagefind/ResultList.tsx +8 -3
- package/src/lib/shiki.ts +21 -12
- package/src/lib/ui/Button.tsx +10 -10
- package/src/lib/ui/ButtonGroup.tsx +82 -0
- package/src/lib/ui/Command.tsx +3 -3
- package/src/lib/ui/DropdownMenu.tsx +226 -170
- package/src/lib/ui/Kbd.tsx +28 -0
- package/src/lib/util/MdxComponents.tsx +2 -0
- package/src/lib/util/flattenAllOf.test.ts +71 -19
- package/src/lib/util/flattenAllOf.ts +29 -8
- package/src/shiki/langs/markdown-nix.js +1 -0
- package/src/shiki/langs/openscad.js +1 -0
- package/dist/vite/create-pagefind-index.d.ts +0 -4
- package/dist/vite/create-pagefind-index.js +0 -12
- package/dist/vite/create-pagefind-index.js.map +0 -1
- package/lib/Button-B3ucvvQw.js +0 -52
- package/lib/Button-B3ucvvQw.js.map +0 -1
- package/lib/Command-CUcrW3qs.js.map +0 -1
- package/lib/DropdownMenu-BZ2NKQ3K.js +0 -126
- package/lib/DropdownMenu-BZ2NKQ3K.js.map +0 -1
- package/lib/MdxPage-hOCN-u-L.js +0 -240
- package/lib/MdxPage-hOCN-u-L.js.map +0 -1
- package/lib/OasProvider-CpniNNrW.js +0 -36
- package/lib/OasProvider-CpniNNrW.js.map +0 -1
- package/lib/OperationList-CmMoKpGu.js.map +0 -1
- package/lib/Pagination-lLSoHnxa.js +0 -37
- package/lib/Pagination-lLSoHnxa.js.map +0 -1
- package/lib/SchemaList-BykD27ga.js.map +0 -1
- package/lib/SchemaView-Dt6hbCAt.js.map +0 -1
- package/lib/Select-DFRCS31-.js +0 -399
- package/lib/Select-DFRCS31-.js.map +0 -1
- package/lib/SyntaxHighlight-C19vH0V_.js.map +0 -1
- package/lib/createServer-BmcVQAOQ.js +0 -13018
- package/lib/createServer-BmcVQAOQ.js.map +0 -1
- package/lib/useExposedProps-U3pmsHaG.js +0 -113
- package/lib/useExposedProps-U3pmsHaG.js.map +0 -1
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-BzflLqGi.js";
|
|
2
|
-
import { ChevronUpIcon as
|
|
3
|
-
import { useState as
|
|
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
4
|
import { c as a } from "./cn-dYga0KKN.js";
|
|
5
|
-
import { Slot as
|
|
6
|
-
import { c as
|
|
7
|
-
import { Separator as
|
|
8
|
-
import { S as m, I as
|
|
9
|
-
import { B as
|
|
10
|
-
import * as
|
|
11
|
-
import { Button as
|
|
12
|
-
import { Badge as
|
|
13
|
-
import { Frame as
|
|
14
|
-
import { C as
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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-BqjbNHIn.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-XPj_dwqA.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;
|
|
19
22
|
},
|
|
20
23
|
{}
|
|
21
24
|
);
|
|
22
|
-
function
|
|
25
|
+
function N({ className: e, ...r }) {
|
|
23
26
|
return /* @__PURE__ */ t.jsx(
|
|
24
27
|
"div",
|
|
25
28
|
{
|
|
@@ -32,7 +35,7 @@ function g({ className: e, ...r }) {
|
|
|
32
35
|
}
|
|
33
36
|
);
|
|
34
37
|
}
|
|
35
|
-
function
|
|
38
|
+
function b({ className: e, ...r }) {
|
|
36
39
|
return /* @__PURE__ */ t.jsx(
|
|
37
40
|
"div",
|
|
38
41
|
{
|
|
@@ -46,7 +49,7 @@ function N({ className: e, ...r }) {
|
|
|
46
49
|
}
|
|
47
50
|
);
|
|
48
51
|
}
|
|
49
|
-
function
|
|
52
|
+
function oe({ className: e, ...r }) {
|
|
50
53
|
return /* @__PURE__ */ t.jsx(
|
|
51
54
|
"header",
|
|
52
55
|
{
|
|
@@ -56,7 +59,7 @@ function se({ className: e, ...r }) {
|
|
|
56
59
|
}
|
|
57
60
|
);
|
|
58
61
|
}
|
|
59
|
-
function
|
|
62
|
+
function le({
|
|
60
63
|
className: e,
|
|
61
64
|
...r
|
|
62
65
|
}) {
|
|
@@ -69,7 +72,7 @@ function ie({
|
|
|
69
72
|
}
|
|
70
73
|
);
|
|
71
74
|
}
|
|
72
|
-
function
|
|
75
|
+
function ae({ className: e, ...r }) {
|
|
73
76
|
return /* @__PURE__ */ t.jsx(
|
|
74
77
|
"footer",
|
|
75
78
|
{
|
|
@@ -79,7 +82,7 @@ function oe({ className: e, ...r }) {
|
|
|
79
82
|
}
|
|
80
83
|
);
|
|
81
84
|
}
|
|
82
|
-
function
|
|
85
|
+
function de({ className: e, ...r }) {
|
|
83
86
|
return /* @__PURE__ */ t.jsx(
|
|
84
87
|
"div",
|
|
85
88
|
{
|
|
@@ -90,12 +93,12 @@ function le({ className: e, ...r }) {
|
|
|
90
93
|
}
|
|
91
94
|
);
|
|
92
95
|
}
|
|
93
|
-
function
|
|
96
|
+
function S({
|
|
94
97
|
className: e,
|
|
95
98
|
...r
|
|
96
99
|
}) {
|
|
97
100
|
return /* @__PURE__ */ t.jsx(
|
|
98
|
-
|
|
101
|
+
Z,
|
|
99
102
|
{
|
|
100
103
|
"data-slot": "item-separator",
|
|
101
104
|
orientation: "horizontal",
|
|
@@ -104,7 +107,7 @@ function P({
|
|
|
104
107
|
}
|
|
105
108
|
);
|
|
106
109
|
}
|
|
107
|
-
const
|
|
110
|
+
const ce = Y(
|
|
108
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]",
|
|
109
112
|
{
|
|
110
113
|
variants: {
|
|
@@ -128,22 +131,22 @@ function $({
|
|
|
128
131
|
className: e,
|
|
129
132
|
variant: r = "default",
|
|
130
133
|
size: n = "default",
|
|
131
|
-
asChild:
|
|
134
|
+
asChild: i = !1,
|
|
132
135
|
...o
|
|
133
136
|
}) {
|
|
134
|
-
const
|
|
137
|
+
const s = i ? X : "div";
|
|
135
138
|
return /* @__PURE__ */ t.jsx(
|
|
136
|
-
|
|
139
|
+
s,
|
|
137
140
|
{
|
|
138
141
|
"data-slot": "item",
|
|
139
142
|
"data-variant": r,
|
|
140
143
|
"data-size": n,
|
|
141
|
-
className: a(
|
|
144
|
+
className: a(ce({ variant: r, size: n, className: e })),
|
|
142
145
|
...o
|
|
143
146
|
}
|
|
144
147
|
);
|
|
145
148
|
}
|
|
146
|
-
function
|
|
149
|
+
function g({ className: e, ...r }) {
|
|
147
150
|
return /* @__PURE__ */ t.jsx(
|
|
148
151
|
"div",
|
|
149
152
|
{
|
|
@@ -156,7 +159,7 @@ function y({ className: e, ...r }) {
|
|
|
156
159
|
}
|
|
157
160
|
);
|
|
158
161
|
}
|
|
159
|
-
function
|
|
162
|
+
function w({ className: e, ...r }) {
|
|
160
163
|
return /* @__PURE__ */ t.jsx(
|
|
161
164
|
"div",
|
|
162
165
|
{
|
|
@@ -169,7 +172,7 @@ function S({ className: e, ...r }) {
|
|
|
169
172
|
}
|
|
170
173
|
);
|
|
171
174
|
}
|
|
172
|
-
function
|
|
175
|
+
function pe({ className: e, ...r }) {
|
|
173
176
|
return /* @__PURE__ */ t.jsx(
|
|
174
177
|
"div",
|
|
175
178
|
{
|
|
@@ -179,36 +182,36 @@ function de({ className: e, ...r }) {
|
|
|
179
182
|
}
|
|
180
183
|
);
|
|
181
184
|
}
|
|
182
|
-
const
|
|
185
|
+
const z = ({
|
|
183
186
|
schema: e,
|
|
184
187
|
hideDescription: r = !1
|
|
185
188
|
}) => /* @__PURE__ */ t.jsx("div", { className: "flex flex-col gap-1", children: /* @__PURE__ */ t.jsxs("div", { children: [
|
|
186
189
|
/* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "Const value: " }),
|
|
187
190
|
/* @__PURE__ */ t.jsx(m, { className: "border rounded px-1 font-mono", children: e.const }),
|
|
188
191
|
!r && e.description && /* @__PURE__ */ t.jsx("div", { className: "text-muted-foreground", children: e.description })
|
|
189
|
-
] }) }),
|
|
192
|
+
] }) }), v = ({
|
|
190
193
|
values: e,
|
|
191
194
|
className: r,
|
|
192
195
|
maxVisibleValues: n = 8
|
|
193
196
|
}) => {
|
|
194
|
-
const [
|
|
197
|
+
const [i, o] = j(!1);
|
|
195
198
|
if (!e.length) return null;
|
|
196
|
-
const
|
|
199
|
+
const s = e.length > n, l = s && !i ? e.slice(0, n) : e;
|
|
197
200
|
return /* @__PURE__ */ t.jsxs("div", { className: a("flex flex-wrap gap-1.5", r), children: [
|
|
198
201
|
/* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "Enum values:" }),
|
|
199
|
-
l.map((
|
|
200
|
-
|
|
201
|
-
|
|
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,
|
|
202
205
|
{
|
|
203
206
|
variant: "ghost",
|
|
204
207
|
size: "sm",
|
|
205
208
|
className: "h-fit px-0",
|
|
206
|
-
onClick: () => o(!
|
|
207
|
-
children:
|
|
208
|
-
/* @__PURE__ */ t.jsx(
|
|
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 }),
|
|
209
212
|
/* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "show less" })
|
|
210
213
|
] }) : /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
211
|
-
/* @__PURE__ */ t.jsx(
|
|
214
|
+
/* @__PURE__ */ t.jsx(_, { size: 12 }),
|
|
212
215
|
/* @__PURE__ */ t.jsxs("span", { className: "text-muted-foreground", children: [
|
|
213
216
|
"show ",
|
|
214
217
|
e.length - n,
|
|
@@ -218,21 +221,21 @@ const E = ({
|
|
|
218
221
|
}
|
|
219
222
|
)
|
|
220
223
|
] });
|
|
221
|
-
},
|
|
222
|
-
const [r, n] =
|
|
224
|
+
}, xe = ({ pattern: e }) => {
|
|
225
|
+
const [r, n] = j(!1), i = e.length > 20, o = i ? `${e.slice(0, 20)}…` : e;
|
|
223
226
|
return /* @__PURE__ */ t.jsxs(
|
|
224
|
-
|
|
227
|
+
q,
|
|
225
228
|
{
|
|
226
|
-
className: a("text-xs",
|
|
229
|
+
className: a("text-xs", i && "cursor-pointer"),
|
|
227
230
|
onClick: () => n(!r),
|
|
228
231
|
selectOnClick: !1,
|
|
229
232
|
children: [
|
|
230
233
|
r ? e : o,
|
|
231
|
-
|
|
234
|
+
i && /* @__PURE__ */ t.jsx("button", { type: "button", className: "p-1 translate-y-[2px]", children: !r && /* @__PURE__ */ t.jsx(J, { size: 12 }) })
|
|
232
235
|
]
|
|
233
236
|
}
|
|
234
237
|
);
|
|
235
|
-
},
|
|
238
|
+
}, ue = (e) => e ? [
|
|
236
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,
|
|
237
240
|
e.enum && "enum",
|
|
238
241
|
e.const && "const",
|
|
@@ -251,24 +254,24 @@ const E = ({
|
|
|
251
254
|
e.deprecated && "deprecated",
|
|
252
255
|
e.pattern && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
253
256
|
"pattern: ",
|
|
254
|
-
/* @__PURE__ */ t.jsx(
|
|
257
|
+
/* @__PURE__ */ t.jsx(xe, { pattern: e.pattern })
|
|
255
258
|
] })
|
|
256
|
-
] : [],
|
|
259
|
+
] : [], h = ({
|
|
257
260
|
schema: e,
|
|
258
261
|
extraItems: r = [],
|
|
259
262
|
className: n
|
|
260
263
|
}) => {
|
|
261
|
-
const
|
|
262
|
-
(o) => typeof o == "string" ||
|
|
264
|
+
const i = [...ue(e), ...r].flatMap(
|
|
265
|
+
(o) => typeof o == "string" || Q(o) ? o : []
|
|
263
266
|
);
|
|
264
|
-
return /* @__PURE__ */ t.jsx("span", { className: n, children:
|
|
267
|
+
return /* @__PURE__ */ t.jsx("span", { className: n, children: i.map((o, s) => (
|
|
265
268
|
// biome-ignore lint/suspicious/noArrayIndexKey: index should be stable
|
|
266
269
|
/* @__PURE__ */ t.jsxs("span", { className: "text-muted-foreground", children: [
|
|
267
270
|
o,
|
|
268
|
-
|
|
269
|
-
] },
|
|
271
|
+
s < i.length - 1 && /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground/50", children: " · " })
|
|
272
|
+
] }, s)
|
|
270
273
|
)) });
|
|
271
|
-
},
|
|
274
|
+
}, I = ({
|
|
272
275
|
schema: e
|
|
273
276
|
}) => {
|
|
274
277
|
const r = e.examples?.at(0), n = e.default;
|
|
@@ -282,104 +285,104 @@ const E = ({
|
|
|
282
285
|
/* @__PURE__ */ t.jsx(m, { className: "border rounded-sm px-1 font-mono", children: typeof n == "object" || typeof n == "boolean" ? JSON.stringify(n) : n })
|
|
283
286
|
] })
|
|
284
287
|
] });
|
|
285
|
-
},
|
|
286
|
-
Array.isArray(e.type) && e.type.includes("array"),
|
|
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,
|
|
288
291
|
{
|
|
289
292
|
className: "inline-flex items-center gap-1.5 text-xs translate-y-0.5",
|
|
290
293
|
selectOnClick: !1,
|
|
291
294
|
children: [
|
|
292
|
-
/* @__PURE__ */ t.jsx(
|
|
295
|
+
/* @__PURE__ */ t.jsx(K, { size: 13 }),
|
|
293
296
|
/* @__PURE__ */ t.jsx("span", { children: e ? `${e} (circular)` : "circular" })
|
|
294
297
|
]
|
|
295
298
|
}
|
|
296
|
-
),
|
|
299
|
+
), fe = ({
|
|
297
300
|
name: e,
|
|
298
301
|
schema: r,
|
|
299
302
|
group: n,
|
|
300
|
-
defaultOpen:
|
|
303
|
+
defaultOpen: i = !1,
|
|
301
304
|
showCollapseButton: o = !0
|
|
302
305
|
}) => {
|
|
303
|
-
const [
|
|
304
|
-
if (
|
|
305
|
-
return /* @__PURE__ */ t.jsx($, { children: /* @__PURE__ */ t.jsxs(
|
|
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: [
|
|
306
309
|
/* @__PURE__ */ t.jsxs("div", { children: [
|
|
307
|
-
/* @__PURE__ */ t.jsx(
|
|
310
|
+
/* @__PURE__ */ t.jsx(w, { className: "inline me-2", children: /* @__PURE__ */ t.jsx("code", { children: e }) }),
|
|
308
311
|
/* @__PURE__ */ t.jsx(
|
|
309
|
-
|
|
312
|
+
h,
|
|
310
313
|
{
|
|
311
314
|
className: "inline",
|
|
312
315
|
schema: r,
|
|
313
316
|
extraItems: [
|
|
314
317
|
n !== "optional" && /* @__PURE__ */ t.jsx("span", { className: "text-primary", children: "required" }),
|
|
315
|
-
/* @__PURE__ */ t.jsx(
|
|
318
|
+
/* @__PURE__ */ t.jsx(V, {}, "circular-ref")
|
|
316
319
|
]
|
|
317
320
|
}
|
|
318
321
|
)
|
|
319
322
|
] }),
|
|
320
|
-
/* @__PURE__ */ t.jsx(
|
|
323
|
+
/* @__PURE__ */ t.jsx(I, { schema: r })
|
|
321
324
|
] }) });
|
|
322
|
-
const
|
|
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);
|
|
323
326
|
return /* @__PURE__ */ t.jsxs($, { children: [
|
|
324
|
-
/* @__PURE__ */ t.jsxs(
|
|
327
|
+
/* @__PURE__ */ t.jsxs(g, { className: "gap-y-2", children: [
|
|
325
328
|
/* @__PURE__ */ t.jsxs("div", { children: [
|
|
326
|
-
/* @__PURE__ */ t.jsx(
|
|
329
|
+
/* @__PURE__ */ t.jsx(w, { className: "inline me-2", children: c ? /* @__PURE__ */ t.jsx(
|
|
327
330
|
"button",
|
|
328
331
|
{
|
|
329
|
-
onClick: () => l(!
|
|
332
|
+
onClick: () => l(!s),
|
|
330
333
|
type: "button",
|
|
331
334
|
className: "hover:underline",
|
|
332
335
|
children: /* @__PURE__ */ t.jsx("code", { children: e })
|
|
333
336
|
}
|
|
334
337
|
) : /* @__PURE__ */ t.jsx("code", { children: e }) }),
|
|
335
338
|
/* @__PURE__ */ t.jsx(
|
|
336
|
-
|
|
339
|
+
h,
|
|
337
340
|
{
|
|
338
341
|
className: "inline",
|
|
339
342
|
schema: r,
|
|
340
343
|
extraItems: [
|
|
341
344
|
n !== "optional" && /* @__PURE__ */ t.jsx("span", { className: "text-primary", children: "required" }),
|
|
342
|
-
|
|
343
|
-
|
|
345
|
+
F(r) && /* @__PURE__ */ t.jsx(
|
|
346
|
+
V,
|
|
344
347
|
{
|
|
345
|
-
circularProp:
|
|
348
|
+
circularProp: me(r.items)
|
|
346
349
|
}
|
|
347
350
|
)
|
|
348
351
|
]
|
|
349
352
|
}
|
|
350
353
|
)
|
|
351
354
|
] }),
|
|
352
|
-
|
|
353
|
-
r.description && /* @__PURE__ */ t.jsx(
|
|
354
|
-
"items" in r && r.items?.enum && /* @__PURE__ */ t.jsx(
|
|
355
|
-
r.const && /* @__PURE__ */ t.jsx(
|
|
356
|
-
r.enum && /* @__PURE__ */ t.jsx(
|
|
357
|
-
/* @__PURE__ */ t.jsx(
|
|
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 })
|
|
358
361
|
] })
|
|
359
362
|
] }),
|
|
360
|
-
|
|
361
|
-
|
|
363
|
+
c && o && /* @__PURE__ */ t.jsx(pe, { className: "self-start", children: /* @__PURE__ */ t.jsx(
|
|
364
|
+
ee,
|
|
362
365
|
{
|
|
363
366
|
variant: "ghost",
|
|
364
367
|
size: "icon",
|
|
365
368
|
className: "rounded-full",
|
|
366
|
-
onClick: () => l(!
|
|
369
|
+
onClick: () => l(!s),
|
|
367
370
|
"aria-label": "Toggle properties",
|
|
368
|
-
children:
|
|
371
|
+
children: s ? /* @__PURE__ */ t.jsx(U, { size: 16 }) : /* @__PURE__ */ t.jsx(G, { size: 16 })
|
|
369
372
|
}
|
|
370
373
|
) }),
|
|
371
|
-
|
|
372
|
-
|
|
374
|
+
c && /* @__PURE__ */ t.jsx(
|
|
375
|
+
P.Root,
|
|
373
376
|
{
|
|
374
|
-
defaultOpen:
|
|
375
|
-
open:
|
|
377
|
+
defaultOpen: i,
|
|
378
|
+
open: s,
|
|
376
379
|
onOpenChange: l,
|
|
377
|
-
className: a("w-full", !
|
|
378
|
-
children: /* @__PURE__ */ t.jsx(
|
|
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 }) })
|
|
379
382
|
}
|
|
380
383
|
)
|
|
381
384
|
] });
|
|
382
|
-
},
|
|
385
|
+
}, M = (e) => {
|
|
383
386
|
const r = e.oneOf ?? e.anyOf ?? [];
|
|
384
387
|
return e.properties && Object.keys(e.properties).length > 0 ? r.map((n) => !n.properties && !n.type && !n.oneOf && !n.anyOf ? {
|
|
385
388
|
...n,
|
|
@@ -387,42 +390,42 @@ Array.isArray(e.type) && e.type.includes("array"), w = (e) => e && (e.type === "
|
|
|
387
390
|
properties: e.properties,
|
|
388
391
|
required: n.required ?? e.required
|
|
389
392
|
} : n) : r;
|
|
390
|
-
},
|
|
393
|
+
}, je = (e) => {
|
|
391
394
|
if (Array.isArray(e.oneOf)) return "exactly-one";
|
|
392
395
|
const r = e.discriminator?.propertyName;
|
|
393
396
|
if (!r) return "at-least-one";
|
|
394
|
-
const n =
|
|
397
|
+
const n = M(e), i = /* @__PURE__ */ new Set();
|
|
395
398
|
for (const o of n) {
|
|
396
|
-
const
|
|
397
|
-
if (l == null ||
|
|
398
|
-
|
|
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));
|
|
399
402
|
}
|
|
400
403
|
return "exactly-one";
|
|
401
|
-
}, O = (e, r) => r.title?.trim() || `Variant ${e + 1}`,
|
|
404
|
+
}, O = (e, r) => r.title?.trim() || `Variant ${e + 1}`, ye = (e, r) => {
|
|
402
405
|
const n = [];
|
|
403
406
|
e.type && n.push(
|
|
404
407
|
`type = ${Array.isArray(e.type) ? e.type.join("|") : e.type}`
|
|
405
408
|
);
|
|
406
|
-
const
|
|
407
|
-
if (
|
|
408
|
-
const
|
|
409
|
-
l !== void 0 && n.push(`${
|
|
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)}`);
|
|
410
413
|
}
|
|
411
|
-
const o = (e.required ?? []).filter((
|
|
414
|
+
const o = (e.required ?? []).filter((s) => s !== i);
|
|
412
415
|
if (o.length) {
|
|
413
|
-
const
|
|
414
|
-
n.push(`requires: ${
|
|
416
|
+
const s = o.slice(0, 3).join(", "), l = o.length > 3 ? ` +${o.length - 3} more` : "";
|
|
417
|
+
n.push(`requires: ${s}${l}`);
|
|
415
418
|
}
|
|
416
419
|
return n;
|
|
417
|
-
},
|
|
420
|
+
}, ge = ({
|
|
418
421
|
variants: e,
|
|
419
422
|
schema: r,
|
|
420
423
|
selectedVariant: n,
|
|
421
|
-
onSelectVariant:
|
|
424
|
+
onSelectVariant: i
|
|
422
425
|
}) => {
|
|
423
|
-
const o = e.map((
|
|
424
|
-
label: O(l,
|
|
425
|
-
guards:
|
|
426
|
+
const o = e.map((s, l) => ({
|
|
427
|
+
label: O(l, s),
|
|
428
|
+
guards: ye(s, r)
|
|
426
429
|
}));
|
|
427
430
|
return /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-2 text-sm", children: [
|
|
428
431
|
/* @__PURE__ */ t.jsx("h4", { className: "font-medium", children: "Decision Table" }),
|
|
@@ -431,32 +434,32 @@ Array.isArray(e.type) && e.type.includes("array"), w = (e) => e && (e.type === "
|
|
|
431
434
|
/* @__PURE__ */ t.jsx("th", { className: "text-left p-2 font-medium", children: "Variant" }),
|
|
432
435
|
/* @__PURE__ */ t.jsx("th", { className: "text-left p-2 font-medium", children: "Matching Criteria" })
|
|
433
436
|
] }) }),
|
|
434
|
-
/* @__PURE__ */ t.jsx("tbody", { className: "divide-y", children: o.map((
|
|
437
|
+
/* @__PURE__ */ t.jsx("tbody", { className: "divide-y", children: o.map((s) => /* @__PURE__ */ t.jsxs("tr", { className: "hover:bg-muted/30", children: [
|
|
435
438
|
/* @__PURE__ */ t.jsx("td", { className: "p-2 font-medium", children: /* @__PURE__ */ t.jsx(
|
|
436
439
|
"button",
|
|
437
440
|
{
|
|
438
441
|
type: "button",
|
|
439
442
|
className: a(
|
|
440
443
|
"hover:underline",
|
|
441
|
-
n ===
|
|
444
|
+
n === s.label && "text-primary"
|
|
442
445
|
),
|
|
443
|
-
onClick: () => s
|
|
444
|
-
children:
|
|
446
|
+
onClick: () => i(s.label),
|
|
447
|
+
children: s.label
|
|
445
448
|
}
|
|
446
449
|
) }),
|
|
447
|
-
/* @__PURE__ */ t.jsx("td", { className: "p-2 text-muted-foreground text-xs", children:
|
|
448
|
-
] },
|
|
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)) })
|
|
449
452
|
] }) })
|
|
450
453
|
] });
|
|
451
|
-
},
|
|
454
|
+
}, Ne = ({
|
|
452
455
|
schema: e,
|
|
453
456
|
cardHeader: r
|
|
454
457
|
}) => {
|
|
455
|
-
const n = Array.isArray(e.oneOf) ? "oneOf" : Array.isArray(e.anyOf) ? "anyOf" : void 0,
|
|
456
|
-
() =>
|
|
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]) : ""
|
|
457
460
|
);
|
|
458
461
|
if (!n) return null;
|
|
459
|
-
const
|
|
462
|
+
const c = je(e) === "exactly-one" ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
460
463
|
"Exactly one variant ",
|
|
461
464
|
/* @__PURE__ */ t.jsx("b", { children: "must match" }),
|
|
462
465
|
"."
|
|
@@ -467,23 +470,23 @@ Array.isArray(e.type) && e.type.includes("array"), w = (e) => e && (e.type === "
|
|
|
467
470
|
" ",
|
|
468
471
|
/* @__PURE__ */ t.jsx("i", { children: "may match" }),
|
|
469
472
|
" simultaneously."
|
|
470
|
-
] }),
|
|
471
|
-
(
|
|
472
|
-
),
|
|
473
|
-
return /* @__PURE__ */ t.jsxs(
|
|
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: [
|
|
474
477
|
r,
|
|
475
|
-
/* @__PURE__ */ t.jsxs(
|
|
478
|
+
/* @__PURE__ */ t.jsxs(ne, { className: "text-sm flex flex-col gap-4", children: [
|
|
476
479
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
477
|
-
/* @__PURE__ */ t.jsx(
|
|
478
|
-
/* @__PURE__ */ t.jsx("div", { className: "flex-1 p-2", children: /* @__PURE__ */ t.jsx("span", { className: "text-sm", 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 }) })
|
|
479
482
|
] }),
|
|
480
483
|
/* @__PURE__ */ t.jsx(
|
|
481
|
-
|
|
484
|
+
ge,
|
|
482
485
|
{
|
|
483
|
-
variants:
|
|
486
|
+
variants: i,
|
|
484
487
|
schema: e,
|
|
485
488
|
selectedVariant: o,
|
|
486
|
-
onSelectVariant:
|
|
489
|
+
onSelectVariant: s
|
|
487
490
|
}
|
|
488
491
|
),
|
|
489
492
|
/* @__PURE__ */ t.jsxs("strong", { children: [
|
|
@@ -491,74 +494,81 @@ Array.isArray(e.type) && e.type.includes("array"), w = (e) => e && (e.type === "
|
|
|
491
494
|
o,
|
|
492
495
|
":"
|
|
493
496
|
] }),
|
|
494
|
-
|
|
497
|
+
d && /* @__PURE__ */ t.jsx(u, { schema: d })
|
|
495
498
|
] })
|
|
496
499
|
] });
|
|
497
|
-
},
|
|
498
|
-
|
|
500
|
+
}, be = (e) => e && /* @__PURE__ */ t.jsx(
|
|
501
|
+
E,
|
|
499
502
|
{
|
|
500
503
|
className: "text-sm leading-normal line-clamp-4",
|
|
501
504
|
content: e
|
|
502
505
|
}
|
|
503
|
-
),
|
|
504
|
-
const
|
|
505
|
-
/* @__PURE__ */ t.jsx("span", { className: "text-sm text-muted-foreground", children: /* @__PURE__ */ t.jsx(
|
|
506
|
-
e.enum && /* @__PURE__ */ t.jsx(
|
|
507
|
-
|
|
508
|
-
/* @__PURE__ */ t.jsx(
|
|
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 })
|
|
509
512
|
] });
|
|
510
|
-
return n ? /* @__PURE__ */ t.jsx("div", { className: "space-y-2 p-4", children:
|
|
513
|
+
return n ? /* @__PURE__ */ t.jsx("div", { className: "space-y-2 p-4", children: i }) : /* @__PURE__ */ t.jsxs(N, { children: [
|
|
511
514
|
r,
|
|
512
|
-
/* @__PURE__ */ t.jsx(
|
|
515
|
+
/* @__PURE__ */ t.jsx(b, { className: "space-y-2", children: i })
|
|
513
516
|
] });
|
|
514
|
-
},
|
|
517
|
+
}, u = ({
|
|
515
518
|
schema: e,
|
|
516
519
|
defaultOpen: r = !1,
|
|
517
520
|
cardHeader: n,
|
|
518
|
-
embedded:
|
|
521
|
+
embedded: i
|
|
519
522
|
}) => {
|
|
520
523
|
if (!e || Object.keys(e).length === 0)
|
|
521
|
-
return /* @__PURE__ */ t.jsxs(
|
|
524
|
+
return /* @__PURE__ */ t.jsxs(N, { children: [
|
|
522
525
|
n,
|
|
523
|
-
/* @__PURE__ */ t.jsx(
|
|
526
|
+
/* @__PURE__ */ t.jsx(b, { children: /* @__PURE__ */ t.jsx("div", { className: "text-sm text-muted-foreground italic", children: "No data returned" }) })
|
|
524
527
|
] });
|
|
525
528
|
if (e.const)
|
|
526
|
-
return /* @__PURE__ */ t.jsx(
|
|
529
|
+
return /* @__PURE__ */ t.jsx(z, { schema: e });
|
|
527
530
|
if (Array.isArray(e.oneOf) || Array.isArray(e.anyOf))
|
|
528
|
-
return /* @__PURE__ */ t.jsx(
|
|
529
|
-
if (
|
|
530
|
-
return
|
|
531
|
-
if (e
|
|
532
|
-
|
|
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 });
|
|
533
542
|
if (e.type === "object") {
|
|
534
|
-
const
|
|
543
|
+
const s = ie(
|
|
535
544
|
Object.entries(e.properties ?? {}),
|
|
536
|
-
([
|
|
537
|
-
),
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
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: [
|
|
555
565
|
n,
|
|
556
|
-
e.description && /* @__PURE__ */ t.jsx(
|
|
557
|
-
/* @__PURE__ */ t.jsxs(
|
|
558
|
-
|
|
559
|
-
|
|
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
|
|
560
570
|
] }),
|
|
561
|
-
e.additionalProperties === !0 && /* @__PURE__ */ t.jsx(
|
|
571
|
+
e.additionalProperties === !0 && /* @__PURE__ */ t.jsx(ae, { children: /* @__PURE__ */ t.jsxs(
|
|
562
572
|
"a",
|
|
563
573
|
{
|
|
564
574
|
className: "text-sm flex items-center gap-1 hover:underline",
|
|
@@ -567,7 +577,7 @@ Array.isArray(e.type) && e.type.includes("array"), w = (e) => e && (e.type === "
|
|
|
567
577
|
target: "_blank",
|
|
568
578
|
children: [
|
|
569
579
|
"Additional properties are allowed",
|
|
570
|
-
/* @__PURE__ */ t.jsx(
|
|
580
|
+
/* @__PURE__ */ t.jsx(W, { size: 14 })
|
|
571
581
|
]
|
|
572
582
|
}
|
|
573
583
|
) })
|
|
@@ -575,12 +585,13 @@ Array.isArray(e.type) && e.type.includes("array"), w = (e) => e && (e.type === "
|
|
|
575
585
|
}
|
|
576
586
|
};
|
|
577
587
|
export {
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
588
|
+
v as E,
|
|
589
|
+
Ee as P,
|
|
590
|
+
u as S,
|
|
581
591
|
h as a,
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
592
|
+
I as b,
|
|
593
|
+
B as c,
|
|
594
|
+
ie as g,
|
|
595
|
+
f as i
|
|
585
596
|
};
|
|
586
|
-
//# sourceMappingURL=SchemaView-
|
|
597
|
+
//# sourceMappingURL=SchemaView-CgwJ9gtb.js.map
|