zudoku 0.7.2-dev.0 → 0.7.2-dev.11
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/cli/cli.js +3 -3
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/common/analytics/lib.js +1 -1
- package/dist/cli/common/analytics/lib.js.map +1 -1
- package/dist/cli/common/outdated.js +11 -20
- package/dist/cli/common/outdated.js.map +1 -1
- package/dist/cli/common/xdg/lib.d.ts +3 -3
- package/dist/cli/common/xdg/lib.js +3 -3
- package/dist/cli/common/xdg/lib.js.map +1 -1
- package/dist/cli/dev/handler.js +3 -12
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/config/validators/InputSidebarSchema.d.ts +0 -9
- package/dist/config/validators/InputSidebarSchema.js +0 -2
- package/dist/config/validators/InputSidebarSchema.js.map +1 -1
- package/dist/config/validators/SidebarSchema.d.ts +3 -9
- package/dist/config/validators/SidebarSchema.js +3 -7
- package/dist/config/validators/SidebarSchema.js.map +1 -1
- package/dist/config/validators/validate.d.ts +0 -115
- package/dist/config/validators/validate.js +0 -43
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.js +3 -5
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.js +2 -2
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/ui/Button.d.ts +2 -2
- package/dist/vite/config.d.ts +3 -3
- package/dist/vite/config.js +22 -23
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/config.test.js +4 -1
- package/dist/vite/config.test.js.map +1 -1
- package/dist/vite/dev-server.js +4 -1
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/plugin-sidebar.js +1 -10
- package/dist/vite/plugin-sidebar.js.map +1 -1
- package/dist/vite/plugin.js +0 -2
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender.js +0 -7
- package/dist/vite/prerender.js.map +1 -1
- package/lib/AuthenticationPlugin-DYnkydqa.js +55 -0
- package/lib/{AuthenticationPlugin-BMjOjKqE.js.map → AuthenticationPlugin-DYnkydqa.js.map} +1 -1
- package/lib/CategoryHeading-w2EW676o.js +10 -0
- package/lib/{CategoryHeading-BE8e6QdS.js.map → CategoryHeading-w2EW676o.js.map} +1 -1
- package/lib/DeveloperHint-D87KcpDW.js +16 -0
- package/lib/{DeveloperHint-Bl9gIdNI.js.map → DeveloperHint-D87KcpDW.js.map} +1 -1
- package/lib/ErrorPage-BdHAg3Rg.js +18 -0
- package/lib/{ErrorPage-CPR1XVKW.js.map → ErrorPage-BdHAg3Rg.js.map} +1 -1
- package/lib/Input-BmwltPfA.js +2214 -0
- package/lib/Input-BmwltPfA.js.map +1 -0
- package/lib/{Markdown-CCNihH_N.js → Markdown-BZUoEvL7.js} +3354 -3189
- package/lib/Markdown-BZUoEvL7.js.map +1 -0
- package/lib/MdxPage-E4NFxzHQ.js +183 -0
- package/lib/MdxPage-E4NFxzHQ.js.map +1 -0
- package/lib/OperationList-DVIuzHN7.js +628 -0
- package/lib/OperationList-DVIuzHN7.js.map +1 -0
- package/lib/Route-5sI-urRK.js +14 -0
- package/lib/{Route-xRJ9mJgH.js.map → Route-5sI-urRK.js.map} +1 -1
- package/lib/{SidebarBadge-2JcxswKF.js → SidebarBadge-6EEz-Bwe.js} +47 -47
- package/lib/{SidebarBadge-2JcxswKF.js.map → SidebarBadge-6EEz-Bwe.js.map} +1 -1
- package/lib/SlotletProvider-CNyl5wU0.js +262 -0
- package/lib/SlotletProvider-CNyl5wU0.js.map +1 -0
- package/lib/Spinner-B9eFggre.js +15 -0
- package/lib/Spinner-B9eFggre.js.map +1 -0
- package/lib/{ZudokuContext-JoyeA9dT.js → ZudokuContext-BHNQL3XO.js} +79 -78
- package/lib/{ZudokuContext-JoyeA9dT.js.map → ZudokuContext-BHNQL3XO.js.map} +1 -1
- package/lib/{_commonjsHelpers-BkfeUUK-.js → _commonjsHelpers-BVfed4GL.js} +3 -3
- package/lib/_commonjsHelpers-BVfed4GL.js.map +1 -0
- package/lib/{index-BLvMkqjO.js → index-BGY8VjAV.js} +26 -26
- package/lib/{index-BLvMkqjO.js.map → index-BGY8VjAV.js.map} +1 -1
- package/lib/{index-G1-TGLO1.js → index-CbJpF8Yf.js} +8 -8
- package/lib/{index-G1-TGLO1.js.map → index-CbJpF8Yf.js.map} +1 -1
- package/lib/index-ChhUJhLT.js +1771 -0
- package/lib/index-ChhUJhLT.js.map +1 -0
- package/lib/{index-BF4cn28H.js → index-DdUotMOQ.js} +2196 -1953
- package/lib/index-DdUotMOQ.js.map +1 -0
- package/lib/jsx-runtime-B6kdoens.js +635 -0
- package/lib/jsx-runtime-B6kdoens.js.map +1 -0
- package/lib/{router-D2p7Olpn.js → router-BiRCp01d.js} +22 -22
- package/lib/{router-D2p7Olpn.js.map → router-BiRCp01d.js.map} +1 -1
- package/lib/{slugify-DbLhpSPt.js → slugify-CiPVjteN.js} +2 -2
- package/lib/{slugify-DbLhpSPt.js.map → slugify-CiPVjteN.js.map} +1 -1
- package/lib/{state-lIwt9isb.js → state-DsXXkBLH.js} +15 -15
- package/lib/{state-lIwt9isb.js.map → state-DsXXkBLH.js.map} +1 -1
- package/lib/{utils-B8R4grFM.js → utils-BPHLKjns.js} +153 -152
- package/lib/{utils-B8R4grFM.js.map → utils-BPHLKjns.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +21 -16
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +37 -32
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +505 -485
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +1782 -1574
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.openapi-worker.js +2 -2
- package/lib/zudoku.plugin-api-keys.js +268 -153
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-page.js +6 -5
- package/lib/zudoku.plugin-custom-page.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +13 -12
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +8 -8
- package/lib/zudoku.plugin-redirect.js +3 -3
- package/lib/zudoku.plugin-search-inkeep.js +21 -20
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/package.json +4 -9
- package/src/lib/components/navigation/SidebarCategory.tsx +31 -43
- package/src/lib/components/navigation/SidebarItem.tsx +1 -2
- package/dist/lib/icons.d.ts +0 -1
- package/dist/lib/icons.js +0 -2
- package/dist/lib/icons.js.map +0 -1
- package/dist/vite/plugin-icons.d.ts +0 -3
- package/dist/vite/plugin-icons.js +0 -47
- package/dist/vite/plugin-icons.js.map +0 -1
- package/dist/vite/sitemap.d.ts +0 -19
- package/dist/vite/sitemap.js +0 -40
- package/dist/vite/sitemap.js.map +0 -1
- package/lib/AuthenticationPlugin-BMjOjKqE.js +0 -54
- package/lib/CategoryHeading-BE8e6QdS.js +0 -9
- package/lib/DeveloperHint-Bl9gIdNI.js +0 -12
- package/lib/ErrorPage-CPR1XVKW.js +0 -12
- package/lib/Input-BBlyeDuG.js +0 -2192
- package/lib/Input-BBlyeDuG.js.map +0 -1
- package/lib/Markdown-CCNihH_N.js.map +0 -1
- package/lib/MdxPage-BavkYqzi.js +0 -140
- package/lib/MdxPage-BavkYqzi.js.map +0 -1
- package/lib/OperationList-C6Ps2keZ.js +0 -460
- package/lib/OperationList-C6Ps2keZ.js.map +0 -1
- package/lib/Route-xRJ9mJgH.js +0 -13
- package/lib/SlotletProvider-CuB3Ts8r.js +0 -213
- package/lib/SlotletProvider-CuB3Ts8r.js.map +0 -1
- package/lib/Spinner-BlxzaFFF.js +0 -6
- package/lib/Spinner-BlxzaFFF.js.map +0 -1
- package/lib/_commonjsHelpers-BkfeUUK-.js.map +0 -1
- package/lib/index-BF4cn28H.js.map +0 -1
- package/lib/jsx-runtime-lNnQYwFN.js +0 -2403
- package/lib/jsx-runtime-lNnQYwFN.js.map +0 -1
- package/lib/zudoku.icons.js +0 -2
- package/lib/zudoku.icons.js.map +0 -1
- package/src/lib/icons.ts +0 -1
|
@@ -0,0 +1,628 @@
|
|
|
1
|
+
import { j as e } from "./jsx-runtime-B6kdoens.js";
|
|
2
|
+
import { C as w } from "./CategoryHeading-w2EW676o.js";
|
|
3
|
+
import { D as L } from "./DeveloperHint-D87KcpDW.js";
|
|
4
|
+
import { E as T } from "./ErrorPage-BdHAg3Rg.js";
|
|
5
|
+
import { c as j, I as b, C as z, g as I, h as m, H as y, a as x, P as u, S as R } from "./Markdown-BZUoEvL7.js";
|
|
6
|
+
import { useState as f, useCallback as $ } from "react";
|
|
7
|
+
import { C as E, a as p, b as F, c as H, d as D, T as B, e as G, f as Q, g as V, S as _, h as P, u as J } from "./index-DdUotMOQ.js";
|
|
8
|
+
import { R as C, T as v, C as k, a as K } from "./index-CbJpF8Yf.js";
|
|
9
|
+
import { u as U } from "./urql-YhcsXYy8.js";
|
|
10
|
+
import { B as W } from "./index-BGY8VjAV.js";
|
|
11
|
+
import { i as Z } from "./Input-BmwltPfA.js";
|
|
12
|
+
/**
|
|
13
|
+
* @license lucide-react v0.378.0 - ISC
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the ISC license.
|
|
16
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/
|
|
18
|
+
const X = j("CircleDot", [
|
|
19
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
20
|
+
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }]
|
|
21
|
+
]);
|
|
22
|
+
/**
|
|
23
|
+
* @license lucide-react v0.378.0 - ISC
|
|
24
|
+
*
|
|
25
|
+
* This source code is licensed under the ISC license.
|
|
26
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
+
*/
|
|
28
|
+
const Y = j("CircleFadingPlus", [
|
|
29
|
+
["path", { d: "M12 2a10 10 0 0 1 7.38 16.75", key: "175t95" }],
|
|
30
|
+
["path", { d: "M12 8v8", key: "napkw2" }],
|
|
31
|
+
["path", { d: "M16 12H8", key: "1fr5h0" }],
|
|
32
|
+
["path", { d: "M2.5 8.875a10 10 0 0 0-.5 3", key: "1vce0s" }],
|
|
33
|
+
["path", { d: "M2.83 16a10 10 0 0 0 2.43 3.4", key: "o3fkw4" }],
|
|
34
|
+
["path", { d: "M4.636 5.235a10 10 0 0 1 .891-.857", key: "1szpfk" }],
|
|
35
|
+
["path", { d: "M8.644 21.42a10 10 0 0 0 7.631-.38", key: "9yhvd4" }]
|
|
36
|
+
]);
|
|
37
|
+
/**
|
|
38
|
+
* @license lucide-react v0.378.0 - ISC
|
|
39
|
+
*
|
|
40
|
+
* This source code is licensed under the ISC license.
|
|
41
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
+
*/
|
|
43
|
+
const ee = j("Circle", [
|
|
44
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
|
|
45
|
+
]);
|
|
46
|
+
/**
|
|
47
|
+
* @license lucide-react v0.378.0 - ISC
|
|
48
|
+
*
|
|
49
|
+
* This source code is licensed under the ISC license.
|
|
50
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
+
*/
|
|
52
|
+
const se = j("ListPlus", [
|
|
53
|
+
["path", { d: "M11 12H3", key: "51ecnj" }],
|
|
54
|
+
["path", { d: "M16 6H3", key: "1wxfjs" }],
|
|
55
|
+
["path", { d: "M16 18H3", key: "12xzn7" }],
|
|
56
|
+
["path", { d: "M18 9v6", key: "1twb98" }],
|
|
57
|
+
["path", { d: "M21 12h-6", key: "bt1uis" }]
|
|
58
|
+
]);
|
|
59
|
+
/**
|
|
60
|
+
* @license lucide-react v0.378.0 - ISC
|
|
61
|
+
*
|
|
62
|
+
* This source code is licensed under the ISC license.
|
|
63
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
+
*/
|
|
65
|
+
const te = j("SquareMinus", [
|
|
66
|
+
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
67
|
+
["path", { d: "M8 12h8", key: "1wcyev" }]
|
|
68
|
+
]);
|
|
69
|
+
/**
|
|
70
|
+
* @license lucide-react v0.378.0 - ISC
|
|
71
|
+
*
|
|
72
|
+
* This source code is licensed under the ISC license.
|
|
73
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
+
*/
|
|
75
|
+
const re = j("SquarePlus", [
|
|
76
|
+
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
77
|
+
["path", { d: "M8 12h8", key: "1wcyev" }],
|
|
78
|
+
["path", { d: "M12 8v8", key: "napkw2" }]
|
|
79
|
+
]);
|
|
80
|
+
function ne(t, s) {
|
|
81
|
+
return s;
|
|
82
|
+
}
|
|
83
|
+
const ie = ({ url: t }) => {
|
|
84
|
+
const [s, n] = f(!1);
|
|
85
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "my-4 flex items-center justify-end gap-2 text-sm", children: [
|
|
86
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-medium", children: "Endpoint:" }),
|
|
87
|
+
/* @__PURE__ */ e.jsxs(b, { className: "p-1.5 flex gap-2.5 items-center text-xs", children: [
|
|
88
|
+
t,
|
|
89
|
+
/* @__PURE__ */ e.jsx(
|
|
90
|
+
"button",
|
|
91
|
+
{
|
|
92
|
+
onClick: () => {
|
|
93
|
+
navigator.clipboard.writeText(t).then(() => {
|
|
94
|
+
n(!0), setTimeout(() => n(!1), 2e3);
|
|
95
|
+
});
|
|
96
|
+
},
|
|
97
|
+
type: "button",
|
|
98
|
+
children: s ? /* @__PURE__ */ e.jsx(z, { className: "text-green-600", size: 14 }) : /* @__PURE__ */ e.jsx(I, { size: 14, strokeWidth: 1.3 })
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
] })
|
|
102
|
+
] });
|
|
103
|
+
}, q = (t, s) => t.reduce(
|
|
104
|
+
(n, i) => {
|
|
105
|
+
const r = s(i);
|
|
106
|
+
return n[r] || (n[r] = []), n[r].push(i), n;
|
|
107
|
+
},
|
|
108
|
+
{}
|
|
109
|
+
), ae = (t, s) => t ? s(t) : void 0, S = (t) => t.schema != null && typeof t.schema == "object" ? t.schema : {
|
|
110
|
+
type: "string"
|
|
111
|
+
}, oe = ({
|
|
112
|
+
parameter: t,
|
|
113
|
+
group: s,
|
|
114
|
+
id: n
|
|
115
|
+
}) => /* @__PURE__ */ e.jsxs("li", { className: "p-4 bg-border/20 text-sm flex flex-col gap-1", children: [
|
|
116
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
117
|
+
/* @__PURE__ */ e.jsx("code", { children: s === "path" ? /* @__PURE__ */ e.jsx(
|
|
118
|
+
E,
|
|
119
|
+
{
|
|
120
|
+
name: t.name,
|
|
121
|
+
backgroundOpacity: "15%",
|
|
122
|
+
slug: n + "-" + t.name.toLocaleLowerCase()
|
|
123
|
+
}
|
|
124
|
+
) : t.name }),
|
|
125
|
+
t.required && /* @__PURE__ */ e.jsx("span", { className: "py-px px-1.5 font-medium bg-primary/75 text-muted rounded-lg", children: "required" }),
|
|
126
|
+
S(t).type && /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: S(t).type })
|
|
127
|
+
] }),
|
|
128
|
+
t.description && /* @__PURE__ */ e.jsx(
|
|
129
|
+
m,
|
|
130
|
+
{
|
|
131
|
+
content: t.description,
|
|
132
|
+
className: "text-sm prose-p:my-1 prose-code:whitespace-pre-line"
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
] }), le = ({
|
|
136
|
+
group: t,
|
|
137
|
+
parameters: s,
|
|
138
|
+
id: n
|
|
139
|
+
}) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
140
|
+
/* @__PURE__ */ e.jsx(y, { level: 3, id: `${n}/${t}-parameters`, className: "capitalize", children: t === "header" ? "Headers" : `${t} Parameters` }),
|
|
141
|
+
/* @__PURE__ */ e.jsx(p, { children: /* @__PURE__ */ e.jsx("ul", { className: "list-none m-0 px-0 divide-y ", children: s.sort((i, r) => i.required === r.required ? 0 : i.required ? -1 : 1).map((i) => /* @__PURE__ */ e.jsx(
|
|
142
|
+
oe,
|
|
143
|
+
{
|
|
144
|
+
parameter: i,
|
|
145
|
+
id: n,
|
|
146
|
+
group: t
|
|
147
|
+
},
|
|
148
|
+
`${i.name}-${i.in}`
|
|
149
|
+
)) }) })
|
|
150
|
+
] }), ce = (t) => Object.entries(t), de = {
|
|
151
|
+
AND: /* @__PURE__ */ e.jsx(Y, { size: 16, className: "fill-card" }),
|
|
152
|
+
OR: /* @__PURE__ */ e.jsx(X, { size: 16, className: "fill-card" }),
|
|
153
|
+
ONE: /* @__PURE__ */ e.jsx(ee, { size: 14, className: "fill-card" })
|
|
154
|
+
}, pe = {
|
|
155
|
+
AND: "text-green-500 dark:text-green-300/60",
|
|
156
|
+
OR: "text-blue-400 dark:text-blue-500",
|
|
157
|
+
ONE: "text-purple-500 dark:text-purple-300/60"
|
|
158
|
+
}, me = ({
|
|
159
|
+
type: t,
|
|
160
|
+
isOpen: s,
|
|
161
|
+
className: n
|
|
162
|
+
}) => /* @__PURE__ */ e.jsx(
|
|
163
|
+
"div",
|
|
164
|
+
{
|
|
165
|
+
className: x(
|
|
166
|
+
pe[t],
|
|
167
|
+
"relative text-sm flex py-2",
|
|
168
|
+
"before:border-l before:absolute before:-top-2 before:-bottom-2 before:border-border before:border-dashed before:content-['']",
|
|
169
|
+
n
|
|
170
|
+
),
|
|
171
|
+
children: /* @__PURE__ */ e.jsxs("div", { className: "-translate-x-[7px] flex gap-1 items-center", children: [
|
|
172
|
+
de[t],
|
|
173
|
+
/* @__PURE__ */ e.jsx(
|
|
174
|
+
"div",
|
|
175
|
+
{
|
|
176
|
+
className: x(
|
|
177
|
+
"translate-y-px mx-px opacity-0 group-hover:opacity-100 transition",
|
|
178
|
+
!s && "-rotate-90"
|
|
179
|
+
),
|
|
180
|
+
children: /* @__PURE__ */ e.jsx(Z, { size: 16 })
|
|
181
|
+
}
|
|
182
|
+
)
|
|
183
|
+
] })
|
|
184
|
+
}
|
|
185
|
+
), xe = (t) => {
|
|
186
|
+
const [s, n] = f(!0);
|
|
187
|
+
return /* @__PURE__ */ e.jsxs(
|
|
188
|
+
C,
|
|
189
|
+
{
|
|
190
|
+
open: s,
|
|
191
|
+
onOpenChange: () => n((i) => !i),
|
|
192
|
+
className: "group",
|
|
193
|
+
children: [
|
|
194
|
+
/* @__PURE__ */ e.jsx(v, { children: /* @__PURE__ */ e.jsx(me, { type: t.type, isOpen: s }) }),
|
|
195
|
+
!s && /* @__PURE__ */ e.jsx("div", { className: "wavy-line bg-border translate-y-1" }),
|
|
196
|
+
/* @__PURE__ */ e.jsx(k, { children: /* @__PURE__ */ e.jsx(g, { schema: t.schema, level: t.level + 1 }) })
|
|
197
|
+
]
|
|
198
|
+
}
|
|
199
|
+
);
|
|
200
|
+
}, ue = {
|
|
201
|
+
AND: "All of",
|
|
202
|
+
OR: "Any of",
|
|
203
|
+
ONE: "One of"
|
|
204
|
+
}, he = ({
|
|
205
|
+
schemas: t,
|
|
206
|
+
type: s,
|
|
207
|
+
isOpen: n,
|
|
208
|
+
level: i,
|
|
209
|
+
toggleOpen: r
|
|
210
|
+
}) => /* @__PURE__ */ e.jsx(C, { open: n, onOpenChange: r, asChild: !0, children: /* @__PURE__ */ e.jsxs(p, { className: "px-6", children: [
|
|
211
|
+
/* @__PURE__ */ e.jsxs(v, { className: "flex gap-2 items-center py-2 w-full text-sm text-muted-foreground -translate-x-1.5", children: [
|
|
212
|
+
n ? /* @__PURE__ */ e.jsx(te, { size: 14 }) : /* @__PURE__ */ e.jsx(re, { size: 14 }),
|
|
213
|
+
/* @__PURE__ */ e.jsx("span", { children: ue[s] })
|
|
214
|
+
] }),
|
|
215
|
+
/* @__PURE__ */ e.jsx(k, { className: "pb-4", children: t.map((a, l) => (
|
|
216
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
217
|
+
/* @__PURE__ */ e.jsx(
|
|
218
|
+
xe,
|
|
219
|
+
{
|
|
220
|
+
type: s,
|
|
221
|
+
schema: a,
|
|
222
|
+
level: i
|
|
223
|
+
},
|
|
224
|
+
l
|
|
225
|
+
)
|
|
226
|
+
)) })
|
|
227
|
+
] }) }), je = (t) => t.type === "object" || t.type === "array" && typeof t.items == "object" && (!t.items.type || t.items.type === "object"), N = (t) => !!(t.oneOf ?? t.allOf ?? t.anyOf), ye = {
|
|
228
|
+
allOf: "AND",
|
|
229
|
+
anyOf: "OR",
|
|
230
|
+
oneOf: "ONE"
|
|
231
|
+
}, M = ({
|
|
232
|
+
schema: t,
|
|
233
|
+
level: s
|
|
234
|
+
}) => {
|
|
235
|
+
const [n, i] = f(!0), r = $(() => i((a) => !a), []);
|
|
236
|
+
for (const [a, l] of ce(ye))
|
|
237
|
+
if (t[a])
|
|
238
|
+
return /* @__PURE__ */ e.jsx(
|
|
239
|
+
he,
|
|
240
|
+
{
|
|
241
|
+
schemas: t[a],
|
|
242
|
+
type: l,
|
|
243
|
+
isOpen: n,
|
|
244
|
+
toggleOpen: r,
|
|
245
|
+
level: s
|
|
246
|
+
}
|
|
247
|
+
);
|
|
248
|
+
}, ge = ({
|
|
249
|
+
name: t,
|
|
250
|
+
schema: s,
|
|
251
|
+
group: n,
|
|
252
|
+
level: i,
|
|
253
|
+
defaultOpen: r = !1,
|
|
254
|
+
showCollapseButton: a = !0
|
|
255
|
+
}) => {
|
|
256
|
+
const [l, h] = f(r);
|
|
257
|
+
return /* @__PURE__ */ e.jsx("li", { className: "p-4 bg-border/20 hover:bg-border/30", children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1 justify-between text-sm", children: [
|
|
258
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center", children: [
|
|
259
|
+
/* @__PURE__ */ e.jsx("code", { children: t }),
|
|
260
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: s.type === "array" && s.items.type ? /* @__PURE__ */ e.jsxs("span", { children: [
|
|
261
|
+
s.items.type,
|
|
262
|
+
"[]"
|
|
263
|
+
] }) : Array.isArray(s.type) ? /* @__PURE__ */ e.jsx("span", { children: s.type.join(" | ") }) : /* @__PURE__ */ e.jsx("span", { children: s.type }) }),
|
|
264
|
+
n === "optional" && /* @__PURE__ */ e.jsx("span", { className: "py-px px-1.5 font-medium border rounded-lg", children: "optional" })
|
|
265
|
+
] }),
|
|
266
|
+
s.description && /* @__PURE__ */ e.jsx(
|
|
267
|
+
m,
|
|
268
|
+
{
|
|
269
|
+
className: x(u, "text-sm leading-normal line-clamp-4"),
|
|
270
|
+
content: s.description
|
|
271
|
+
}
|
|
272
|
+
),
|
|
273
|
+
(N(s) || je(s)) && /* @__PURE__ */ e.jsxs(
|
|
274
|
+
C,
|
|
275
|
+
{
|
|
276
|
+
defaultOpen: r,
|
|
277
|
+
open: l,
|
|
278
|
+
onOpenChange: () => h(!l),
|
|
279
|
+
children: [
|
|
280
|
+
a && /* @__PURE__ */ e.jsx(v, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
281
|
+
W,
|
|
282
|
+
{
|
|
283
|
+
variant: "outline",
|
|
284
|
+
size: "sm",
|
|
285
|
+
className: "mt-2 flex gap-1.5",
|
|
286
|
+
children: [
|
|
287
|
+
/* @__PURE__ */ e.jsx(se, { size: 18 }),
|
|
288
|
+
l ? "Hide nested properties" : "Show nested properties"
|
|
289
|
+
]
|
|
290
|
+
}
|
|
291
|
+
) }),
|
|
292
|
+
/* @__PURE__ */ e.jsx(k, { children: /* @__PURE__ */ e.jsx("div", { className: "mt-2", children: N(s) ? /* @__PURE__ */ e.jsx(M, { schema: s, level: i + 1 }) : s.type === "object" ? /* @__PURE__ */ e.jsx(g, { schema: s, level: i + 1 }) : s.type === "array" && typeof s.items == "object" && /* @__PURE__ */ e.jsx(g, { schema: s.items, level: i + 1 }) }) })
|
|
293
|
+
]
|
|
294
|
+
}
|
|
295
|
+
)
|
|
296
|
+
] }) });
|
|
297
|
+
}, g = ({
|
|
298
|
+
schema: t,
|
|
299
|
+
level: s = 0,
|
|
300
|
+
defaultOpen: n = !1
|
|
301
|
+
}) => {
|
|
302
|
+
if (!t || Object.keys(t).length === 0)
|
|
303
|
+
return /* @__PURE__ */ e.jsx(p, { className: "p-4", children: /* @__PURE__ */ e.jsx("span", { className: "text-sm text-muted-foreground italic", children: "No response specified" }) });
|
|
304
|
+
const i = (r, a) => {
|
|
305
|
+
if (N(r))
|
|
306
|
+
return /* @__PURE__ */ e.jsx(M, { schema: r, level: a });
|
|
307
|
+
if (r.type === "array" && r.items) {
|
|
308
|
+
const l = r.items;
|
|
309
|
+
return typeof l.type == "string" && ["string", "number", "boolean", "integer"].includes(l.type) ? /* @__PURE__ */ e.jsxs(p, { className: "p-4", children: [
|
|
310
|
+
/* @__PURE__ */ e.jsxs("span", { className: "text-sm text-muted-foreground", children: [
|
|
311
|
+
l.type,
|
|
312
|
+
"[]"
|
|
313
|
+
] }),
|
|
314
|
+
r.description && /* @__PURE__ */ e.jsx(
|
|
315
|
+
m,
|
|
316
|
+
{
|
|
317
|
+
className: x(
|
|
318
|
+
u,
|
|
319
|
+
"text-sm leading-normal line-clamp-4"
|
|
320
|
+
),
|
|
321
|
+
content: r.description
|
|
322
|
+
}
|
|
323
|
+
)
|
|
324
|
+
] }) : l.type === "object" ? /* @__PURE__ */ e.jsxs(p, { className: "flex flex-col gap-2 bg-border/30 p-4", children: [
|
|
325
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-sm text-muted-foreground", children: "object[]" }),
|
|
326
|
+
i(l, a + 1)
|
|
327
|
+
] }) : i(l, a + 1);
|
|
328
|
+
}
|
|
329
|
+
if (r.type === "object" && !r.properties)
|
|
330
|
+
return /* @__PURE__ */ e.jsxs(p, { className: "p-4 flex gap-2 items-center", children: [
|
|
331
|
+
"name" in r && /* @__PURE__ */ e.jsx(e.Fragment, { children: r.name }),
|
|
332
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-sm text-muted-foreground", children: "object" }),
|
|
333
|
+
r.description && /* @__PURE__ */ e.jsx(
|
|
334
|
+
m,
|
|
335
|
+
{
|
|
336
|
+
className: x(
|
|
337
|
+
u,
|
|
338
|
+
"text-sm leading-normal line-clamp-4"
|
|
339
|
+
),
|
|
340
|
+
content: r.description
|
|
341
|
+
}
|
|
342
|
+
)
|
|
343
|
+
] });
|
|
344
|
+
if (r.properties) {
|
|
345
|
+
const l = q(
|
|
346
|
+
Object.entries(r.properties),
|
|
347
|
+
([d, o]) => {
|
|
348
|
+
var c;
|
|
349
|
+
return o.deprecated ? "deprecated" : (c = r.required) != null && c.includes(d) ? "required" : "optional";
|
|
350
|
+
}
|
|
351
|
+
), h = ["required", "optional", "deprecated"];
|
|
352
|
+
return /* @__PURE__ */ e.jsx(p, { className: "divide-y overflow-hidden", children: h.map(
|
|
353
|
+
(d) => l[d] && /* @__PURE__ */ e.jsx("ul", { className: "divide-y", children: l[d].map(([o, c]) => /* @__PURE__ */ e.jsx(
|
|
354
|
+
ge,
|
|
355
|
+
{
|
|
356
|
+
name: o,
|
|
357
|
+
schema: c,
|
|
358
|
+
group: d,
|
|
359
|
+
level: a,
|
|
360
|
+
defaultOpen: n
|
|
361
|
+
},
|
|
362
|
+
o
|
|
363
|
+
)) }, d)
|
|
364
|
+
) });
|
|
365
|
+
}
|
|
366
|
+
return typeof r.type == "string" && ["string", "number", "boolean", "integer", "null"].includes(r.type) ? /* @__PURE__ */ e.jsxs(p, { className: "p-4", children: [
|
|
367
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-sm text-muted-foreground", children: r.type }),
|
|
368
|
+
r.description && /* @__PURE__ */ e.jsx(
|
|
369
|
+
m,
|
|
370
|
+
{
|
|
371
|
+
className: x(
|
|
372
|
+
u,
|
|
373
|
+
"text-sm leading-normal line-clamp-4"
|
|
374
|
+
),
|
|
375
|
+
content: r.description
|
|
376
|
+
}
|
|
377
|
+
)
|
|
378
|
+
] }) : r.additionalProperties ? /* @__PURE__ */ e.jsxs(p, { className: "my-2", children: [
|
|
379
|
+
/* @__PURE__ */ e.jsx(F, { children: /* @__PURE__ */ e.jsx(H, { children: "Additional Properties:" }) }),
|
|
380
|
+
/* @__PURE__ */ e.jsx(D, { children: i(
|
|
381
|
+
r.additionalProperties,
|
|
382
|
+
a + 1
|
|
383
|
+
) })
|
|
384
|
+
] }) : null;
|
|
385
|
+
};
|
|
386
|
+
return i(t, s);
|
|
387
|
+
}, fe = ["path", "query", "header", "cookie"], be = ({
|
|
388
|
+
operationFragment: t
|
|
389
|
+
}) => {
|
|
390
|
+
var l, h, d;
|
|
391
|
+
const s = ne(Ne, t), n = q(
|
|
392
|
+
s.parameters ?? [],
|
|
393
|
+
(o) => o.in
|
|
394
|
+
), i = s.responses.at(0), [r, a] = f(i == null ? void 0 : i.statusCode);
|
|
395
|
+
return /* @__PURE__ */ e.jsxs(
|
|
396
|
+
"div",
|
|
397
|
+
{
|
|
398
|
+
className: "grid grid-cols-1 lg:grid-cols-[4fr_3fr] gap-8 items-start border-b-2 mb-16 pb-16",
|
|
399
|
+
children: [
|
|
400
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
401
|
+
/* @__PURE__ */ e.jsx(y, { level: 2, id: s.slug, registerSidebarAnchor: !0, children: s.summary }),
|
|
402
|
+
s.description && /* @__PURE__ */ e.jsx(
|
|
403
|
+
m,
|
|
404
|
+
{
|
|
405
|
+
className: `${u} max-w-full prose-img:max-w-prose`,
|
|
406
|
+
content: s.description
|
|
407
|
+
}
|
|
408
|
+
),
|
|
409
|
+
s.parameters && s.parameters.length > 0 && /* @__PURE__ */ e.jsx(e.Fragment, { children: fe.flatMap(
|
|
410
|
+
(o) => {
|
|
411
|
+
var c;
|
|
412
|
+
return (c = n[o]) != null && c.length ? /* @__PURE__ */ e.jsx(
|
|
413
|
+
le,
|
|
414
|
+
{
|
|
415
|
+
id: s.slug,
|
|
416
|
+
parameters: n[o],
|
|
417
|
+
group: o
|
|
418
|
+
},
|
|
419
|
+
o
|
|
420
|
+
) : [];
|
|
421
|
+
}
|
|
422
|
+
) }),
|
|
423
|
+
ae((d = (h = (l = s.requestBody) == null ? void 0 : l.content) == null ? void 0 : h.at(0)) == null ? void 0 : d.schema, (o) => /* @__PURE__ */ e.jsxs("div", { className: "mt-4 flex flex-col gap-4", children: [
|
|
424
|
+
/* @__PURE__ */ e.jsx(
|
|
425
|
+
y,
|
|
426
|
+
{
|
|
427
|
+
level: 3,
|
|
428
|
+
className: "capitalize",
|
|
429
|
+
id: `${s.slug}/request-body`,
|
|
430
|
+
registerSidebarAnchor: !0,
|
|
431
|
+
children: "Request Body"
|
|
432
|
+
}
|
|
433
|
+
),
|
|
434
|
+
/* @__PURE__ */ e.jsx(g, { schema: o })
|
|
435
|
+
] })),
|
|
436
|
+
s.responses.length > 0 && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
437
|
+
/* @__PURE__ */ e.jsx(
|
|
438
|
+
y,
|
|
439
|
+
{
|
|
440
|
+
level: 3,
|
|
441
|
+
className: "capitalize mt-8 pt-8 border-t",
|
|
442
|
+
id: `${s.slug}/responses`,
|
|
443
|
+
registerSidebarAnchor: !0,
|
|
444
|
+
children: "Responses"
|
|
445
|
+
}
|
|
446
|
+
),
|
|
447
|
+
/* @__PURE__ */ e.jsxs(
|
|
448
|
+
B,
|
|
449
|
+
{
|
|
450
|
+
onValueChange: (o) => a(o),
|
|
451
|
+
value: r,
|
|
452
|
+
children: [
|
|
453
|
+
s.responses.length > 1 && /* @__PURE__ */ e.jsx(G, { children: s.responses.map((o) => /* @__PURE__ */ e.jsx(
|
|
454
|
+
Q,
|
|
455
|
+
{
|
|
456
|
+
value: o.statusCode,
|
|
457
|
+
title: o.description,
|
|
458
|
+
children: o.statusCode
|
|
459
|
+
},
|
|
460
|
+
o.statusCode
|
|
461
|
+
)) }),
|
|
462
|
+
/* @__PURE__ */ e.jsx("ul", { className: "list-none m-0 px-0", children: s.responses.map((o) => {
|
|
463
|
+
var c, O;
|
|
464
|
+
return /* @__PURE__ */ e.jsx(
|
|
465
|
+
V,
|
|
466
|
+
{
|
|
467
|
+
value: o.statusCode,
|
|
468
|
+
children: /* @__PURE__ */ e.jsx(
|
|
469
|
+
g,
|
|
470
|
+
{
|
|
471
|
+
schema: (O = (c = o.content) == null ? void 0 : c.find((A) => A.schema)) == null ? void 0 : O.schema
|
|
472
|
+
}
|
|
473
|
+
)
|
|
474
|
+
},
|
|
475
|
+
o.statusCode
|
|
476
|
+
);
|
|
477
|
+
}) })
|
|
478
|
+
]
|
|
479
|
+
}
|
|
480
|
+
)
|
|
481
|
+
] })
|
|
482
|
+
] }),
|
|
483
|
+
/* @__PURE__ */ e.jsx(
|
|
484
|
+
_,
|
|
485
|
+
{
|
|
486
|
+
selectedResponse: r,
|
|
487
|
+
onSelectResponse: a,
|
|
488
|
+
operation: s
|
|
489
|
+
}
|
|
490
|
+
)
|
|
491
|
+
]
|
|
492
|
+
},
|
|
493
|
+
s.operationId
|
|
494
|
+
);
|
|
495
|
+
}, Ne = P(
|
|
496
|
+
/* GraphQL */
|
|
497
|
+
`
|
|
498
|
+
fragment OperationsFragment on OperationItem {
|
|
499
|
+
slug
|
|
500
|
+
summary
|
|
501
|
+
method
|
|
502
|
+
description
|
|
503
|
+
operationId
|
|
504
|
+
contentTypes
|
|
505
|
+
path
|
|
506
|
+
parameters {
|
|
507
|
+
name
|
|
508
|
+
in
|
|
509
|
+
description
|
|
510
|
+
required
|
|
511
|
+
schema
|
|
512
|
+
style
|
|
513
|
+
examples {
|
|
514
|
+
name
|
|
515
|
+
description
|
|
516
|
+
externalValue
|
|
517
|
+
value
|
|
518
|
+
summary
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
requestBody {
|
|
522
|
+
content {
|
|
523
|
+
mediaType
|
|
524
|
+
encoding {
|
|
525
|
+
name
|
|
526
|
+
}
|
|
527
|
+
schema
|
|
528
|
+
}
|
|
529
|
+
description
|
|
530
|
+
required
|
|
531
|
+
}
|
|
532
|
+
responses {
|
|
533
|
+
statusCode
|
|
534
|
+
links
|
|
535
|
+
description
|
|
536
|
+
content {
|
|
537
|
+
mediaType
|
|
538
|
+
encoding {
|
|
539
|
+
name
|
|
540
|
+
}
|
|
541
|
+
schema
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
`
|
|
546
|
+
), Ce = P(
|
|
547
|
+
/* GraphQL */
|
|
548
|
+
`
|
|
549
|
+
query AllOperations($input: JSON!, $type: SchemaType!) {
|
|
550
|
+
schema(input: $input, type: $type) {
|
|
551
|
+
description
|
|
552
|
+
title
|
|
553
|
+
url
|
|
554
|
+
version
|
|
555
|
+
tags {
|
|
556
|
+
name
|
|
557
|
+
description
|
|
558
|
+
operations {
|
|
559
|
+
slug
|
|
560
|
+
...OperationsFragment
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
`
|
|
566
|
+
), ve = { suspense: !0 }, Ie = () => {
|
|
567
|
+
var r;
|
|
568
|
+
const { type: t, input: s } = J(), [n] = U({
|
|
569
|
+
query: Ce,
|
|
570
|
+
variables: { type: t, input: s },
|
|
571
|
+
context: ve
|
|
572
|
+
}), i = (r = n.error) == null ? void 0 : r.graphQLErrors.at(0);
|
|
573
|
+
return i ? /* @__PURE__ */ e.jsx(
|
|
574
|
+
T,
|
|
575
|
+
{
|
|
576
|
+
category: "Error",
|
|
577
|
+
title: "Schema cannot be displayed",
|
|
578
|
+
message: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
579
|
+
/* @__PURE__ */ e.jsxs(L, { className: "mb-4", children: [
|
|
580
|
+
"Check your configuration value ",
|
|
581
|
+
/* @__PURE__ */ e.jsx(b, { children: "apis.type" }),
|
|
582
|
+
" ",
|
|
583
|
+
"and ",
|
|
584
|
+
/* @__PURE__ */ e.jsx(b, { children: "apis.input" }),
|
|
585
|
+
" in the Zudoku config."
|
|
586
|
+
] }),
|
|
587
|
+
"An error occurred while trying to fetch the API reference:",
|
|
588
|
+
/* @__PURE__ */ e.jsx(R, { code: i.toString(), language: "plain" })
|
|
589
|
+
] })
|
|
590
|
+
}
|
|
591
|
+
) : n.data ? /* @__PURE__ */ e.jsxs("div", { className: "pt-[--padding-content-top]", children: [
|
|
592
|
+
/* @__PURE__ */ e.jsxs(
|
|
593
|
+
"div",
|
|
594
|
+
{
|
|
595
|
+
className: x(u, "mb-16 max-w-full prose-img:max-w-prose"),
|
|
596
|
+
children: [
|
|
597
|
+
/* @__PURE__ */ e.jsx(w, { children: "Overview" }),
|
|
598
|
+
/* @__PURE__ */ e.jsx(y, { level: 1, id: "description", registerSidebarAnchor: !0, children: n.data.schema.title }),
|
|
599
|
+
/* @__PURE__ */ e.jsx(m, { content: n.data.schema.description ?? "" })
|
|
600
|
+
]
|
|
601
|
+
}
|
|
602
|
+
),
|
|
603
|
+
/* @__PURE__ */ e.jsx("hr", {}),
|
|
604
|
+
/* @__PURE__ */ e.jsx(ie, { url: n.data.schema.url }),
|
|
605
|
+
n.data.schema.tags.filter((a) => a.operations.length > 0).map((a) => /* @__PURE__ */ e.jsxs("div", { children: [
|
|
606
|
+
a.name && /* @__PURE__ */ e.jsx(w, { children: a.name }),
|
|
607
|
+
a.description && /* @__PURE__ */ e.jsx(
|
|
608
|
+
m,
|
|
609
|
+
{
|
|
610
|
+
className: `${u} max-w-full prose-img:max-w-prose w-full mt-2 mb-12`,
|
|
611
|
+
content: a.description
|
|
612
|
+
}
|
|
613
|
+
),
|
|
614
|
+
/* @__PURE__ */ e.jsx("div", { className: "operation mb-12", children: /* @__PURE__ */ e.jsx(K, { children: a.operations.map((l) => /* @__PURE__ */ e.jsx(
|
|
615
|
+
be,
|
|
616
|
+
{
|
|
617
|
+
operationFragment: l
|
|
618
|
+
},
|
|
619
|
+
l.slug
|
|
620
|
+
)) }) })
|
|
621
|
+
] }, a.name))
|
|
622
|
+
] }) : null;
|
|
623
|
+
};
|
|
624
|
+
export {
|
|
625
|
+
Ie as OperationList,
|
|
626
|
+
Ne as OperationsFragment
|
|
627
|
+
};
|
|
628
|
+
//# sourceMappingURL=OperationList-DVIuzHN7.js.map
|