zudoku 0.6.2-dev.4 → 0.6.2-dev.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/dev/handler.js +5 -1
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/config/validators/InputSidebarSchema.d.ts +9 -0
- package/dist/config/validators/InputSidebarSchema.js +2 -0
- package/dist/config/validators/InputSidebarSchema.js.map +1 -1
- package/dist/config/validators/SidebarSchema.d.ts +9 -3
- package/dist/config/validators/SidebarSchema.js +7 -3
- package/dist/config/validators/SidebarSchema.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.js +5 -3
- 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/icons.d.ts +1 -0
- package/dist/lib/icons.js +2 -0
- package/dist/lib/icons.js.map +1 -0
- package/dist/lib/ui/Button.d.ts +2 -2
- package/dist/vite/plugin-icons.d.ts +3 -0
- package/dist/vite/plugin-icons.js +47 -0
- package/dist/vite/plugin-icons.js.map +1 -0
- package/dist/vite/plugin-sidebar.js +10 -1
- package/dist/vite/plugin-sidebar.js.map +1 -1
- package/dist/vite/plugin.js +2 -0
- package/dist/vite/plugin.js.map +1 -1
- package/lib/{AuthenticationPlugin-DYnkydqa.js → AuthenticationPlugin-Bx9FK124.js} +3 -3
- package/lib/{AuthenticationPlugin-DYnkydqa.js.map → AuthenticationPlugin-Bx9FK124.js.map} +1 -1
- package/lib/{CategoryHeading-w2EW676o.js → CategoryHeading-XnFqN2lJ.js} +2 -2
- package/lib/{CategoryHeading-w2EW676o.js.map → CategoryHeading-XnFqN2lJ.js.map} +1 -1
- package/lib/{DeveloperHint-D87KcpDW.js → DeveloperHint-FBb2uXJe.js} +2 -2
- package/lib/{DeveloperHint-D87KcpDW.js.map → DeveloperHint-FBb2uXJe.js.map} +1 -1
- package/lib/{ErrorPage-BdHAg3Rg.js → ErrorPage-knunPbKI.js} +4 -4
- package/lib/{ErrorPage-BdHAg3Rg.js.map → ErrorPage-knunPbKI.js.map} +1 -1
- package/lib/{Input-BmwltPfA.js → Input-BEDZAKw0.js} +350 -366
- package/lib/Input-BEDZAKw0.js.map +1 -0
- package/lib/{Markdown-BZUoEvL7.js → Markdown-B4aR03g6.js} +2494 -2650
- package/lib/Markdown-B4aR03g6.js.map +1 -0
- package/lib/{MdxPage-E4NFxzHQ.js → MdxPage-BZyQsH8Z.js} +44 -55
- package/lib/MdxPage-BZyQsH8Z.js.map +1 -0
- package/lib/{OperationList-DVIuzHN7.js → OperationList-2NeWEM0u.js} +103 -171
- package/lib/OperationList-2NeWEM0u.js.map +1 -0
- package/lib/{Route-5sI-urRK.js → Route-BZPewmrN.js} +3 -3
- package/lib/{Route-5sI-urRK.js.map → Route-BZPewmrN.js.map} +1 -1
- package/lib/{SidebarBadge-6EEz-Bwe.js → SidebarBadge-COz0hgfa.js} +39 -39
- package/lib/{SidebarBadge-6EEz-Bwe.js.map → SidebarBadge-COz0hgfa.js.map} +1 -1
- package/lib/{SlotletProvider-CNyl5wU0.js → SlotletProvider-DJMaOUDs.js} +70 -94
- package/lib/SlotletProvider-DJMaOUDs.js.map +1 -0
- package/lib/Spinner-3cQDBVGr.js +7 -0
- package/lib/Spinner-3cQDBVGr.js.map +1 -0
- package/lib/{ZudokuContext-BHNQL3XO.js → ZudokuContext-cr-pTRY1.js} +25 -25
- package/lib/{ZudokuContext-BHNQL3XO.js.map → ZudokuContext-cr-pTRY1.js.map} +1 -1
- package/lib/{_commonjsHelpers-BVfed4GL.js → _commonjsHelpers-BkfeUUK-.js} +3 -3
- package/lib/_commonjsHelpers-BkfeUUK-.js.map +1 -0
- package/lib/{index-CbJpF8Yf.js → index-1EDgIO6b.js} +7 -7
- package/lib/{index-CbJpF8Yf.js.map → index-1EDgIO6b.js.map} +1 -1
- package/lib/{index-ChhUJhLT.js → index-BG0g4WW0.js} +10 -10
- package/lib/{index-ChhUJhLT.js.map → index-BG0g4WW0.js.map} +1 -1
- package/lib/{index-DdUotMOQ.js → index-Dv2KZuEw.js} +1113 -1169
- package/lib/index-Dv2KZuEw.js.map +1 -0
- package/lib/{index-BGY8VjAV.js → index-Zezcv0xb.js} +24 -24
- package/lib/{index-BGY8VjAV.js.map → index-Zezcv0xb.js.map} +1 -1
- package/lib/{router-BiRCp01d.js → router-D2p7Olpn.js} +22 -22
- package/lib/{router-BiRCp01d.js.map → router-D2p7Olpn.js.map} +1 -1
- package/lib/{slugify-CiPVjteN.js → slugify-DbLhpSPt.js} +2 -2
- package/lib/{slugify-CiPVjteN.js.map → slugify-DbLhpSPt.js.map} +1 -1
- package/lib/{state-DsXXkBLH.js → state-lIwt9isb.js} +15 -15
- package/lib/{state-DsXXkBLH.js.map → state-lIwt9isb.js.map} +1 -1
- package/lib/{utils-BPHLKjns.js → utils-ByIc_KIM.js} +68 -68
- package/lib/{utils-BPHLKjns.js.map → utils-ByIc_KIM.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-openid.js +8 -8
- package/lib/zudoku.components.js +754 -834
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.icons.js +2 -0
- package/lib/zudoku.icons.js.map +1 -0
- package/lib/zudoku.openapi-worker.js +2 -2
- package/lib/zudoku.plugin-api-keys.js +80 -131
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-page.js +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +9 -8
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/lib/zudoku.plugin-redirect.js +3 -3
- package/package.json +6 -2
- package/src/lib/components/navigation/SidebarCategory.tsx +43 -31
- package/src/lib/components/navigation/SidebarItem.tsx +2 -1
- package/src/lib/icons.ts +1 -0
- package/lib/Input-BmwltPfA.js.map +0 -1
- package/lib/Markdown-BZUoEvL7.js.map +0 -1
- package/lib/MdxPage-E4NFxzHQ.js.map +0 -1
- package/lib/OperationList-DVIuzHN7.js.map +0 -1
- package/lib/SlotletProvider-CNyl5wU0.js.map +0 -1
- package/lib/Spinner-B9eFggre.js +0 -15
- package/lib/Spinner-B9eFggre.js.map +0 -1
- package/lib/_commonjsHelpers-BVfed4GL.js.map +0 -1
- package/lib/index-DdUotMOQ.js.map +0 -1
|
@@ -1,90 +1,22 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-B6kdoens.js";
|
|
2
|
-
import { C as
|
|
3
|
-
import { D as
|
|
4
|
-
import { E as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
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) {
|
|
2
|
+
import { C as S } from "./CategoryHeading-XnFqN2lJ.js";
|
|
3
|
+
import { D as T } from "./DeveloperHint-FBb2uXJe.js";
|
|
4
|
+
import { E as L } from "./ErrorPage-knunPbKI.js";
|
|
5
|
+
import { I as y, M as m, H as g, a as x, P as u, S as k } from "./Markdown-B4aR03g6.js";
|
|
6
|
+
import { CheckIcon as R, CopyIcon as z, ChevronDownIcon as $, CircleFadingPlusIcon as E, CircleDotIcon as F, CircleIcon as D, SquareMinusIcon as H, SquarePlusIcon as B, ListPlusIcon as M } from "lucide-react";
|
|
7
|
+
import { useState as f, useCallback as G } from "react";
|
|
8
|
+
import { C as Q, a as p, b as V, c as _, d as J, T as K, e as U, f as W, g as Z, S as X, h as q, u as Y } from "./index-Dv2KZuEw.js";
|
|
9
|
+
import { R as N, T as C, C as O, S as ee } from "./index-1EDgIO6b.js";
|
|
10
|
+
import { u as se } from "./urql-YhcsXYy8.js";
|
|
11
|
+
import { B as te } from "./index-Zezcv0xb.js";
|
|
12
|
+
function re(t, s) {
|
|
81
13
|
return s;
|
|
82
14
|
}
|
|
83
|
-
const
|
|
15
|
+
const ne = ({ url: t }) => {
|
|
84
16
|
const [s, n] = f(!1);
|
|
85
17
|
return /* @__PURE__ */ e.jsxs("div", { className: "my-4 flex items-center justify-end gap-2 text-sm", children: [
|
|
86
18
|
/* @__PURE__ */ e.jsx("span", { className: "font-medium", children: "Endpoint:" }),
|
|
87
|
-
/* @__PURE__ */ e.jsxs(
|
|
19
|
+
/* @__PURE__ */ e.jsxs(y, { className: "p-1.5 flex gap-2.5 items-center text-xs", children: [
|
|
88
20
|
t,
|
|
89
21
|
/* @__PURE__ */ e.jsx(
|
|
90
22
|
"button",
|
|
@@ -95,27 +27,27 @@ const ie = ({ url: t }) => {
|
|
|
95
27
|
});
|
|
96
28
|
},
|
|
97
29
|
type: "button",
|
|
98
|
-
children: s ? /* @__PURE__ */ e.jsx(
|
|
30
|
+
children: s ? /* @__PURE__ */ e.jsx(R, { className: "text-green-600", size: 14 }) : /* @__PURE__ */ e.jsx(z, { size: 14, strokeWidth: 1.3 })
|
|
99
31
|
}
|
|
100
32
|
)
|
|
101
33
|
] })
|
|
102
34
|
] });
|
|
103
|
-
},
|
|
35
|
+
}, w = (t, s) => t.reduce(
|
|
104
36
|
(n, i) => {
|
|
105
37
|
const r = s(i);
|
|
106
38
|
return n[r] || (n[r] = []), n[r].push(i), n;
|
|
107
39
|
},
|
|
108
40
|
{}
|
|
109
|
-
),
|
|
41
|
+
), ie = (t, s) => t ? s(t) : void 0, I = (t) => t.schema != null && typeof t.schema == "object" ? t.schema : {
|
|
110
42
|
type: "string"
|
|
111
|
-
},
|
|
43
|
+
}, ae = ({
|
|
112
44
|
parameter: t,
|
|
113
45
|
group: s,
|
|
114
46
|
id: n
|
|
115
47
|
}) => /* @__PURE__ */ e.jsxs("li", { className: "p-4 bg-border/20 text-sm flex flex-col gap-1", children: [
|
|
116
48
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
117
49
|
/* @__PURE__ */ e.jsx("code", { children: s === "path" ? /* @__PURE__ */ e.jsx(
|
|
118
|
-
|
|
50
|
+
Q,
|
|
119
51
|
{
|
|
120
52
|
name: t.name,
|
|
121
53
|
backgroundOpacity: "15%",
|
|
@@ -123,7 +55,7 @@ const ie = ({ url: t }) => {
|
|
|
123
55
|
}
|
|
124
56
|
) : t.name }),
|
|
125
57
|
t.required && /* @__PURE__ */ e.jsx("span", { className: "py-px px-1.5 font-medium bg-primary/75 text-muted rounded-lg", children: "required" }),
|
|
126
|
-
|
|
58
|
+
I(t).type && /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: I(t).type })
|
|
127
59
|
] }),
|
|
128
60
|
t.description && /* @__PURE__ */ e.jsx(
|
|
129
61
|
m,
|
|
@@ -132,14 +64,14 @@ const ie = ({ url: t }) => {
|
|
|
132
64
|
className: "text-sm prose-p:my-1 prose-code:whitespace-pre-line"
|
|
133
65
|
}
|
|
134
66
|
)
|
|
135
|
-
] }),
|
|
67
|
+
] }), oe = ({
|
|
136
68
|
group: t,
|
|
137
69
|
parameters: s,
|
|
138
70
|
id: n
|
|
139
71
|
}) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
140
|
-
/* @__PURE__ */ e.jsx(
|
|
72
|
+
/* @__PURE__ */ e.jsx(g, { level: 3, id: `${n}/${t}-parameters`, className: "capitalize", children: t === "header" ? "Headers" : `${t} Parameters` }),
|
|
141
73
|
/* @__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
|
-
|
|
74
|
+
ae,
|
|
143
75
|
{
|
|
144
76
|
parameter: i,
|
|
145
77
|
id: n,
|
|
@@ -147,15 +79,15 @@ const ie = ({ url: t }) => {
|
|
|
147
79
|
},
|
|
148
80
|
`${i.name}-${i.in}`
|
|
149
81
|
)) }) })
|
|
150
|
-
] }),
|
|
151
|
-
AND: /* @__PURE__ */ e.jsx(
|
|
152
|
-
OR: /* @__PURE__ */ e.jsx(
|
|
153
|
-
ONE: /* @__PURE__ */ e.jsx(
|
|
154
|
-
},
|
|
82
|
+
] }), le = (t) => Object.entries(t), ce = {
|
|
83
|
+
AND: /* @__PURE__ */ e.jsx(E, { size: 16, className: "fill-card" }),
|
|
84
|
+
OR: /* @__PURE__ */ e.jsx(F, { size: 16, className: "fill-card" }),
|
|
85
|
+
ONE: /* @__PURE__ */ e.jsx(D, { size: 14, className: "fill-card" })
|
|
86
|
+
}, de = {
|
|
155
87
|
AND: "text-green-500 dark:text-green-300/60",
|
|
156
88
|
OR: "text-blue-400 dark:text-blue-500",
|
|
157
89
|
ONE: "text-purple-500 dark:text-purple-300/60"
|
|
158
|
-
},
|
|
90
|
+
}, pe = ({
|
|
159
91
|
type: t,
|
|
160
92
|
isOpen: s,
|
|
161
93
|
className: n
|
|
@@ -163,13 +95,13 @@ const ie = ({ url: t }) => {
|
|
|
163
95
|
"div",
|
|
164
96
|
{
|
|
165
97
|
className: x(
|
|
166
|
-
|
|
98
|
+
de[t],
|
|
167
99
|
"relative text-sm flex py-2",
|
|
168
100
|
"before:border-l before:absolute before:-top-2 before:-bottom-2 before:border-border before:border-dashed before:content-['']",
|
|
169
101
|
n
|
|
170
102
|
),
|
|
171
103
|
children: /* @__PURE__ */ e.jsxs("div", { className: "-translate-x-[7px] flex gap-1 items-center", children: [
|
|
172
|
-
|
|
104
|
+
ce[t],
|
|
173
105
|
/* @__PURE__ */ e.jsx(
|
|
174
106
|
"div",
|
|
175
107
|
{
|
|
@@ -177,45 +109,45 @@ const ie = ({ url: t }) => {
|
|
|
177
109
|
"translate-y-px mx-px opacity-0 group-hover:opacity-100 transition",
|
|
178
110
|
!s && "-rotate-90"
|
|
179
111
|
),
|
|
180
|
-
children: /* @__PURE__ */ e.jsx(
|
|
112
|
+
children: /* @__PURE__ */ e.jsx($, { size: 16 })
|
|
181
113
|
}
|
|
182
114
|
)
|
|
183
115
|
] })
|
|
184
116
|
}
|
|
185
|
-
),
|
|
117
|
+
), me = (t) => {
|
|
186
118
|
const [s, n] = f(!0);
|
|
187
119
|
return /* @__PURE__ */ e.jsxs(
|
|
188
|
-
|
|
120
|
+
N,
|
|
189
121
|
{
|
|
190
122
|
open: s,
|
|
191
123
|
onOpenChange: () => n((i) => !i),
|
|
192
124
|
className: "group",
|
|
193
125
|
children: [
|
|
194
|
-
/* @__PURE__ */ e.jsx(
|
|
126
|
+
/* @__PURE__ */ e.jsx(C, { children: /* @__PURE__ */ e.jsx(pe, { type: t.type, isOpen: s }) }),
|
|
195
127
|
!s && /* @__PURE__ */ e.jsx("div", { className: "wavy-line bg-border translate-y-1" }),
|
|
196
|
-
/* @__PURE__ */ e.jsx(
|
|
128
|
+
/* @__PURE__ */ e.jsx(O, { children: /* @__PURE__ */ e.jsx(h, { schema: t.schema, level: t.level + 1 }) })
|
|
197
129
|
]
|
|
198
130
|
}
|
|
199
131
|
);
|
|
200
|
-
},
|
|
132
|
+
}, xe = {
|
|
201
133
|
AND: "All of",
|
|
202
134
|
OR: "Any of",
|
|
203
135
|
ONE: "One of"
|
|
204
|
-
},
|
|
136
|
+
}, ue = ({
|
|
205
137
|
schemas: t,
|
|
206
138
|
type: s,
|
|
207
139
|
isOpen: n,
|
|
208
140
|
level: i,
|
|
209
141
|
toggleOpen: r
|
|
210
|
-
}) => /* @__PURE__ */ e.jsx(
|
|
211
|
-
/* @__PURE__ */ e.jsxs(
|
|
212
|
-
n ? /* @__PURE__ */ e.jsx(
|
|
213
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
142
|
+
}) => /* @__PURE__ */ e.jsx(N, { open: n, onOpenChange: r, asChild: !0, children: /* @__PURE__ */ e.jsxs(p, { className: "px-6", children: [
|
|
143
|
+
/* @__PURE__ */ e.jsxs(C, { className: "flex gap-2 items-center py-2 w-full text-sm text-muted-foreground -translate-x-1.5", children: [
|
|
144
|
+
n ? /* @__PURE__ */ e.jsx(H, { size: 14 }) : /* @__PURE__ */ e.jsx(B, { size: 14 }),
|
|
145
|
+
/* @__PURE__ */ e.jsx("span", { children: xe[s] })
|
|
214
146
|
] }),
|
|
215
|
-
/* @__PURE__ */ e.jsx(
|
|
147
|
+
/* @__PURE__ */ e.jsx(O, { className: "pb-4", children: t.map((a, l) => (
|
|
216
148
|
// eslint-disable-next-line react/no-array-index-key
|
|
217
149
|
/* @__PURE__ */ e.jsx(
|
|
218
|
-
|
|
150
|
+
me,
|
|
219
151
|
{
|
|
220
152
|
type: s,
|
|
221
153
|
schema: a,
|
|
@@ -224,19 +156,19 @@ const ie = ({ url: t }) => {
|
|
|
224
156
|
l
|
|
225
157
|
)
|
|
226
158
|
)) })
|
|
227
|
-
] }) }), je = (t) => t.type === "object" || t.type === "array" && typeof t.items == "object" && (!t.items.type || t.items.type === "object"),
|
|
159
|
+
] }) }), je = (t) => t.type === "object" || t.type === "array" && typeof t.items == "object" && (!t.items.type || t.items.type === "object"), b = (t) => !!(t.oneOf ?? t.allOf ?? t.anyOf), ge = {
|
|
228
160
|
allOf: "AND",
|
|
229
161
|
anyOf: "OR",
|
|
230
162
|
oneOf: "ONE"
|
|
231
|
-
},
|
|
163
|
+
}, P = ({
|
|
232
164
|
schema: t,
|
|
233
165
|
level: s
|
|
234
166
|
}) => {
|
|
235
|
-
const [n, i] = f(!0), r =
|
|
236
|
-
for (const [a, l] of
|
|
167
|
+
const [n, i] = f(!0), r = G(() => i((a) => !a), []);
|
|
168
|
+
for (const [a, l] of le(ge))
|
|
237
169
|
if (t[a])
|
|
238
170
|
return /* @__PURE__ */ e.jsx(
|
|
239
|
-
|
|
171
|
+
ue,
|
|
240
172
|
{
|
|
241
173
|
schemas: t[a],
|
|
242
174
|
type: l,
|
|
@@ -245,7 +177,7 @@ const ie = ({ url: t }) => {
|
|
|
245
177
|
level: s
|
|
246
178
|
}
|
|
247
179
|
);
|
|
248
|
-
},
|
|
180
|
+
}, he = ({
|
|
249
181
|
name: t,
|
|
250
182
|
schema: s,
|
|
251
183
|
group: n,
|
|
@@ -253,7 +185,7 @@ const ie = ({ url: t }) => {
|
|
|
253
185
|
defaultOpen: r = !1,
|
|
254
186
|
showCollapseButton: a = !0
|
|
255
187
|
}) => {
|
|
256
|
-
const [l,
|
|
188
|
+
const [l, j] = f(r);
|
|
257
189
|
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
190
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center", children: [
|
|
259
191
|
/* @__PURE__ */ e.jsx("code", { children: t }),
|
|
@@ -270,31 +202,31 @@ const ie = ({ url: t }) => {
|
|
|
270
202
|
content: s.description
|
|
271
203
|
}
|
|
272
204
|
),
|
|
273
|
-
(
|
|
274
|
-
|
|
205
|
+
(b(s) || je(s)) && /* @__PURE__ */ e.jsxs(
|
|
206
|
+
N,
|
|
275
207
|
{
|
|
276
208
|
defaultOpen: r,
|
|
277
209
|
open: l,
|
|
278
|
-
onOpenChange: () =>
|
|
210
|
+
onOpenChange: () => j(!l),
|
|
279
211
|
children: [
|
|
280
|
-
a && /* @__PURE__ */ e.jsx(
|
|
281
|
-
|
|
212
|
+
a && /* @__PURE__ */ e.jsx(C, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
213
|
+
te,
|
|
282
214
|
{
|
|
283
215
|
variant: "outline",
|
|
284
216
|
size: "sm",
|
|
285
217
|
className: "mt-2 flex gap-1.5",
|
|
286
218
|
children: [
|
|
287
|
-
/* @__PURE__ */ e.jsx(
|
|
219
|
+
/* @__PURE__ */ e.jsx(M, { size: 18 }),
|
|
288
220
|
l ? "Hide nested properties" : "Show nested properties"
|
|
289
221
|
]
|
|
290
222
|
}
|
|
291
223
|
) }),
|
|
292
|
-
/* @__PURE__ */ e.jsx(
|
|
224
|
+
/* @__PURE__ */ e.jsx(O, { children: /* @__PURE__ */ e.jsx("div", { className: "mt-2", children: b(s) ? /* @__PURE__ */ e.jsx(P, { schema: s, level: i + 1 }) : s.type === "object" ? /* @__PURE__ */ e.jsx(h, { schema: s, level: i + 1 }) : s.type === "array" && typeof s.items == "object" && /* @__PURE__ */ e.jsx(h, { schema: s.items, level: i + 1 }) }) })
|
|
293
225
|
]
|
|
294
226
|
}
|
|
295
227
|
)
|
|
296
228
|
] }) });
|
|
297
|
-
},
|
|
229
|
+
}, h = ({
|
|
298
230
|
schema: t,
|
|
299
231
|
level: s = 0,
|
|
300
232
|
defaultOpen: n = !1
|
|
@@ -302,8 +234,8 @@ const ie = ({ url: t }) => {
|
|
|
302
234
|
if (!t || Object.keys(t).length === 0)
|
|
303
235
|
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
236
|
const i = (r, a) => {
|
|
305
|
-
if (
|
|
306
|
-
return /* @__PURE__ */ e.jsx(
|
|
237
|
+
if (b(r))
|
|
238
|
+
return /* @__PURE__ */ e.jsx(P, { schema: r, level: a });
|
|
307
239
|
if (r.type === "array" && r.items) {
|
|
308
240
|
const l = r.items;
|
|
309
241
|
return typeof l.type == "string" && ["string", "number", "boolean", "integer"].includes(l.type) ? /* @__PURE__ */ e.jsxs(p, { className: "p-4", children: [
|
|
@@ -342,16 +274,16 @@ const ie = ({ url: t }) => {
|
|
|
342
274
|
)
|
|
343
275
|
] });
|
|
344
276
|
if (r.properties) {
|
|
345
|
-
const l =
|
|
277
|
+
const l = w(
|
|
346
278
|
Object.entries(r.properties),
|
|
347
279
|
([d, o]) => {
|
|
348
280
|
var c;
|
|
349
281
|
return o.deprecated ? "deprecated" : (c = r.required) != null && c.includes(d) ? "required" : "optional";
|
|
350
282
|
}
|
|
351
|
-
),
|
|
352
|
-
return /* @__PURE__ */ e.jsx(p, { className: "divide-y overflow-hidden", children:
|
|
283
|
+
), j = ["required", "optional", "deprecated"];
|
|
284
|
+
return /* @__PURE__ */ e.jsx(p, { className: "divide-y overflow-hidden", children: j.map(
|
|
353
285
|
(d) => l[d] && /* @__PURE__ */ e.jsx("ul", { className: "divide-y", children: l[d].map(([o, c]) => /* @__PURE__ */ e.jsx(
|
|
354
|
-
|
|
286
|
+
he,
|
|
355
287
|
{
|
|
356
288
|
name: o,
|
|
357
289
|
schema: c,
|
|
@@ -376,19 +308,19 @@ const ie = ({ url: t }) => {
|
|
|
376
308
|
}
|
|
377
309
|
)
|
|
378
310
|
] }) : r.additionalProperties ? /* @__PURE__ */ e.jsxs(p, { className: "my-2", children: [
|
|
379
|
-
/* @__PURE__ */ e.jsx(
|
|
380
|
-
/* @__PURE__ */ e.jsx(
|
|
311
|
+
/* @__PURE__ */ e.jsx(V, { children: /* @__PURE__ */ e.jsx(_, { children: "Additional Properties:" }) }),
|
|
312
|
+
/* @__PURE__ */ e.jsx(J, { children: i(
|
|
381
313
|
r.additionalProperties,
|
|
382
314
|
a + 1
|
|
383
315
|
) })
|
|
384
316
|
] }) : null;
|
|
385
317
|
};
|
|
386
318
|
return i(t, s);
|
|
387
|
-
}, fe = ["path", "query", "header", "cookie"],
|
|
319
|
+
}, fe = ["path", "query", "header", "cookie"], ye = ({
|
|
388
320
|
operationFragment: t
|
|
389
321
|
}) => {
|
|
390
|
-
var l,
|
|
391
|
-
const s =
|
|
322
|
+
var l, j, d;
|
|
323
|
+
const s = re(be, t), n = w(
|
|
392
324
|
s.parameters ?? [],
|
|
393
325
|
(o) => o.in
|
|
394
326
|
), i = s.responses.at(0), [r, a] = f(i == null ? void 0 : i.statusCode);
|
|
@@ -398,7 +330,7 @@ const ie = ({ url: t }) => {
|
|
|
398
330
|
className: "grid grid-cols-1 lg:grid-cols-[4fr_3fr] gap-8 items-start border-b-2 mb-16 pb-16",
|
|
399
331
|
children: [
|
|
400
332
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
401
|
-
/* @__PURE__ */ e.jsx(
|
|
333
|
+
/* @__PURE__ */ e.jsx(g, { level: 2, id: s.slug, registerSidebarAnchor: !0, children: s.summary }),
|
|
402
334
|
s.description && /* @__PURE__ */ e.jsx(
|
|
403
335
|
m,
|
|
404
336
|
{
|
|
@@ -410,7 +342,7 @@ const ie = ({ url: t }) => {
|
|
|
410
342
|
(o) => {
|
|
411
343
|
var c;
|
|
412
344
|
return (c = n[o]) != null && c.length ? /* @__PURE__ */ e.jsx(
|
|
413
|
-
|
|
345
|
+
oe,
|
|
414
346
|
{
|
|
415
347
|
id: s.slug,
|
|
416
348
|
parameters: n[o],
|
|
@@ -420,9 +352,9 @@ const ie = ({ url: t }) => {
|
|
|
420
352
|
) : [];
|
|
421
353
|
}
|
|
422
354
|
) }),
|
|
423
|
-
|
|
355
|
+
ie((d = (j = (l = s.requestBody) == null ? void 0 : l.content) == null ? void 0 : j.at(0)) == null ? void 0 : d.schema, (o) => /* @__PURE__ */ e.jsxs("div", { className: "mt-4 flex flex-col gap-4", children: [
|
|
424
356
|
/* @__PURE__ */ e.jsx(
|
|
425
|
-
|
|
357
|
+
g,
|
|
426
358
|
{
|
|
427
359
|
level: 3,
|
|
428
360
|
className: "capitalize",
|
|
@@ -431,11 +363,11 @@ const ie = ({ url: t }) => {
|
|
|
431
363
|
children: "Request Body"
|
|
432
364
|
}
|
|
433
365
|
),
|
|
434
|
-
/* @__PURE__ */ e.jsx(
|
|
366
|
+
/* @__PURE__ */ e.jsx(h, { schema: o })
|
|
435
367
|
] })),
|
|
436
368
|
s.responses.length > 0 && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
437
369
|
/* @__PURE__ */ e.jsx(
|
|
438
|
-
|
|
370
|
+
g,
|
|
439
371
|
{
|
|
440
372
|
level: 3,
|
|
441
373
|
className: "capitalize mt-8 pt-8 border-t",
|
|
@@ -445,13 +377,13 @@ const ie = ({ url: t }) => {
|
|
|
445
377
|
}
|
|
446
378
|
),
|
|
447
379
|
/* @__PURE__ */ e.jsxs(
|
|
448
|
-
|
|
380
|
+
K,
|
|
449
381
|
{
|
|
450
382
|
onValueChange: (o) => a(o),
|
|
451
383
|
value: r,
|
|
452
384
|
children: [
|
|
453
|
-
s.responses.length > 1 && /* @__PURE__ */ e.jsx(
|
|
454
|
-
|
|
385
|
+
s.responses.length > 1 && /* @__PURE__ */ e.jsx(U, { children: s.responses.map((o) => /* @__PURE__ */ e.jsx(
|
|
386
|
+
W,
|
|
455
387
|
{
|
|
456
388
|
value: o.statusCode,
|
|
457
389
|
title: o.description,
|
|
@@ -460,15 +392,15 @@ const ie = ({ url: t }) => {
|
|
|
460
392
|
o.statusCode
|
|
461
393
|
)) }),
|
|
462
394
|
/* @__PURE__ */ e.jsx("ul", { className: "list-none m-0 px-0", children: s.responses.map((o) => {
|
|
463
|
-
var c,
|
|
395
|
+
var c, v;
|
|
464
396
|
return /* @__PURE__ */ e.jsx(
|
|
465
|
-
|
|
397
|
+
Z,
|
|
466
398
|
{
|
|
467
399
|
value: o.statusCode,
|
|
468
400
|
children: /* @__PURE__ */ e.jsx(
|
|
469
|
-
|
|
401
|
+
h,
|
|
470
402
|
{
|
|
471
|
-
schema: (
|
|
403
|
+
schema: (v = (c = o.content) == null ? void 0 : c.find((A) => A.schema)) == null ? void 0 : v.schema
|
|
472
404
|
}
|
|
473
405
|
)
|
|
474
406
|
},
|
|
@@ -481,7 +413,7 @@ const ie = ({ url: t }) => {
|
|
|
481
413
|
] })
|
|
482
414
|
] }),
|
|
483
415
|
/* @__PURE__ */ e.jsx(
|
|
484
|
-
|
|
416
|
+
X,
|
|
485
417
|
{
|
|
486
418
|
selectedResponse: r,
|
|
487
419
|
onSelectResponse: a,
|
|
@@ -492,7 +424,7 @@ const ie = ({ url: t }) => {
|
|
|
492
424
|
},
|
|
493
425
|
s.operationId
|
|
494
426
|
);
|
|
495
|
-
},
|
|
427
|
+
}, be = q(
|
|
496
428
|
/* GraphQL */
|
|
497
429
|
`
|
|
498
430
|
fragment OperationsFragment on OperationItem {
|
|
@@ -543,7 +475,7 @@ const ie = ({ url: t }) => {
|
|
|
543
475
|
}
|
|
544
476
|
}
|
|
545
477
|
`
|
|
546
|
-
),
|
|
478
|
+
), Ne = q(
|
|
547
479
|
/* GraphQL */
|
|
548
480
|
`
|
|
549
481
|
query AllOperations($input: JSON!, $type: SchemaType!) {
|
|
@@ -563,29 +495,29 @@ const ie = ({ url: t }) => {
|
|
|
563
495
|
}
|
|
564
496
|
}
|
|
565
497
|
`
|
|
566
|
-
),
|
|
498
|
+
), Ce = { suspense: !0 }, Re = () => {
|
|
567
499
|
var r;
|
|
568
|
-
const { type: t, input: s } =
|
|
569
|
-
query:
|
|
500
|
+
const { type: t, input: s } = Y(), [n] = se({
|
|
501
|
+
query: Ne,
|
|
570
502
|
variables: { type: t, input: s },
|
|
571
|
-
context:
|
|
503
|
+
context: Ce
|
|
572
504
|
}), i = (r = n.error) == null ? void 0 : r.graphQLErrors.at(0);
|
|
573
505
|
return i ? /* @__PURE__ */ e.jsx(
|
|
574
|
-
|
|
506
|
+
L,
|
|
575
507
|
{
|
|
576
508
|
category: "Error",
|
|
577
509
|
title: "Schema cannot be displayed",
|
|
578
510
|
message: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
579
|
-
/* @__PURE__ */ e.jsxs(
|
|
511
|
+
/* @__PURE__ */ e.jsxs(T, { className: "mb-4", children: [
|
|
580
512
|
"Check your configuration value ",
|
|
581
|
-
/* @__PURE__ */ e.jsx(
|
|
513
|
+
/* @__PURE__ */ e.jsx(y, { children: "apis.type" }),
|
|
582
514
|
" ",
|
|
583
515
|
"and ",
|
|
584
|
-
/* @__PURE__ */ e.jsx(
|
|
516
|
+
/* @__PURE__ */ e.jsx(y, { children: "apis.input" }),
|
|
585
517
|
" in the Zudoku config."
|
|
586
518
|
] }),
|
|
587
519
|
"An error occurred while trying to fetch the API reference:",
|
|
588
|
-
/* @__PURE__ */ e.jsx(
|
|
520
|
+
/* @__PURE__ */ e.jsx(k, { code: i.toString(), language: "plain" })
|
|
589
521
|
] })
|
|
590
522
|
}
|
|
591
523
|
) : n.data ? /* @__PURE__ */ e.jsxs("div", { className: "pt-[--padding-content-top]", children: [
|
|
@@ -594,16 +526,16 @@ const ie = ({ url: t }) => {
|
|
|
594
526
|
{
|
|
595
527
|
className: x(u, "mb-16 max-w-full prose-img:max-w-prose"),
|
|
596
528
|
children: [
|
|
597
|
-
/* @__PURE__ */ e.jsx(
|
|
598
|
-
/* @__PURE__ */ e.jsx(
|
|
529
|
+
/* @__PURE__ */ e.jsx(S, { children: "Overview" }),
|
|
530
|
+
/* @__PURE__ */ e.jsx(g, { level: 1, id: "description", registerSidebarAnchor: !0, children: n.data.schema.title }),
|
|
599
531
|
/* @__PURE__ */ e.jsx(m, { content: n.data.schema.description ?? "" })
|
|
600
532
|
]
|
|
601
533
|
}
|
|
602
534
|
),
|
|
603
535
|
/* @__PURE__ */ e.jsx("hr", {}),
|
|
604
|
-
/* @__PURE__ */ e.jsx(
|
|
536
|
+
/* @__PURE__ */ e.jsx(ne, { url: n.data.schema.url }),
|
|
605
537
|
n.data.schema.tags.filter((a) => a.operations.length > 0).map((a) => /* @__PURE__ */ e.jsxs("div", { children: [
|
|
606
|
-
a.name && /* @__PURE__ */ e.jsx(
|
|
538
|
+
a.name && /* @__PURE__ */ e.jsx(S, { children: a.name }),
|
|
607
539
|
a.description && /* @__PURE__ */ e.jsx(
|
|
608
540
|
m,
|
|
609
541
|
{
|
|
@@ -611,8 +543,8 @@ const ie = ({ url: t }) => {
|
|
|
611
543
|
content: a.description
|
|
612
544
|
}
|
|
613
545
|
),
|
|
614
|
-
/* @__PURE__ */ e.jsx("div", { className: "operation mb-12", children: /* @__PURE__ */ e.jsx(
|
|
615
|
-
|
|
546
|
+
/* @__PURE__ */ e.jsx("div", { className: "operation mb-12", children: /* @__PURE__ */ e.jsx(ee, { children: a.operations.map((l) => /* @__PURE__ */ e.jsx(
|
|
547
|
+
ye,
|
|
616
548
|
{
|
|
617
549
|
operationFragment: l
|
|
618
550
|
},
|
|
@@ -622,7 +554,7 @@ const ie = ({ url: t }) => {
|
|
|
622
554
|
] }) : null;
|
|
623
555
|
};
|
|
624
556
|
export {
|
|
625
|
-
|
|
626
|
-
|
|
557
|
+
Re as OperationList,
|
|
558
|
+
be as OperationsFragment
|
|
627
559
|
};
|
|
628
|
-
//# sourceMappingURL=OperationList-
|
|
560
|
+
//# sourceMappingURL=OperationList-2NeWEM0u.js.map
|