zudoku 0.3.1-dev.8 → 0.4.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/LICENSE.md +21 -0
- package/dist/config/config.d.ts +0 -3
- package/dist/lib/authentication/authentication.d.ts +1 -0
- package/dist/lib/authentication/components/CallbackHandler.d.ts +3 -0
- package/dist/lib/authentication/components/CallbackHandler.js +34 -0
- package/dist/lib/authentication/components/CallbackHandler.js.map +1 -0
- package/dist/lib/authentication/providers/auth0.js +11 -6
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +4 -13
- package/dist/lib/authentication/providers/openid.js +50 -49
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/components/Header.js +2 -4
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Layout.js +5 -1
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/context/ZudokuProvider.js +1 -3
- package/dist/lib/components/context/ZudokuProvider.js.map +1 -1
- package/dist/lib/core/DevPortalContext.d.ts +1 -4
- package/dist/lib/core/DevPortalContext.js +2 -2
- package/dist/lib/core/DevPortalContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +2 -4
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +3 -4
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +2 -3
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +2 -2
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
- package/lib/{AuthenticationPlugin-CH5NSVOu.js → AuthenticationPlugin-owbEUimP.js} +3 -3
- package/lib/{AuthenticationPlugin-CH5NSVOu.js.map → AuthenticationPlugin-owbEUimP.js.map} +1 -1
- package/lib/{CategoryHeading-z15xh7Jb.js → CategoryHeading-DnPprxtD.js} +2 -2
- package/lib/{CategoryHeading-z15xh7Jb.js.map → CategoryHeading-DnPprxtD.js.map} +1 -1
- package/lib/{Combination-DTfV-c98.js → Combination-DruV0zX_.js} +3 -3
- package/lib/{Combination-DTfV-c98.js.map → Combination-DruV0zX_.js.map} +1 -1
- package/lib/ErrorPage-PUg985n_.js +18 -0
- package/lib/ErrorPage-PUg985n_.js.map +1 -0
- package/lib/{Input-CzXNm7xb.js → Input-CBfi9Yjc.js} +4 -4
- package/lib/{Input-CzXNm7xb.js.map → Input-CBfi9Yjc.js.map} +1 -1
- package/lib/{Markdown-CEccPMI_.js → Markdown-Chb9VIBv.js} +2 -2
- package/lib/{Markdown-CEccPMI_.js.map → Markdown-Chb9VIBv.js.map} +1 -1
- package/lib/{MdxPage-CnqOoqvp.js → MdxPage-CIBHMwTd.js} +5 -5
- package/lib/{MdxPage-CnqOoqvp.js.map → MdxPage-CIBHMwTd.js.map} +1 -1
- package/lib/{OperationList-CJajXSzC.js → OperationList-CZiSz5JH.js} +115 -120
- package/lib/OperationList-CZiSz5JH.js.map +1 -0
- package/lib/{Route-BpMrPUVN.js → Route-Cle-r-bq.js} +4 -4
- package/lib/{Route-BpMrPUVN.js.map → Route-Cle-r-bq.js.map} +1 -1
- package/lib/{Spinner-BT_AYFrA.js → SidebarBadge-Ba0PhibA.js} +66 -76
- package/lib/SidebarBadge-Ba0PhibA.js.map +1 -0
- package/lib/{SlotletProvider-ByLSCZQa.js → SlotletProvider-Dq80og6-.js} +4 -4
- package/lib/{SlotletProvider-ByLSCZQa.js.map → SlotletProvider-Dq80og6-.js.map} +1 -1
- package/lib/Spinner-CvXZ7QK4.js +15 -0
- package/lib/Spinner-CvXZ7QK4.js.map +1 -0
- package/lib/{ZudokuContext-BIZ8zHbZ.js → ZudokuContext-BQ45UjcB.js} +2 -2
- package/lib/{ZudokuContext-BIZ8zHbZ.js.map → ZudokuContext-BQ45UjcB.js.map} +1 -1
- package/lib/{index-B6zugCnN.js → index-Br1MQPxy.js} +595 -587
- package/lib/index-Br1MQPxy.js.map +1 -0
- package/lib/{index-Dz4LyXZI.js → index-DCJ9wEIV.js} +3 -3
- package/lib/{index-Dz4LyXZI.js.map → index-DCJ9wEIV.js.map} +1 -1
- package/lib/{index-7kcHaXD6.js → index-Yjb2PyPF.js} +4 -4
- package/lib/{index-7kcHaXD6.js.map → index-Yjb2PyPF.js.map} +1 -1
- package/lib/{urql-DrBfkb92.js → urql-YhcsXYy8.js} +2 -2
- package/lib/urql-YhcsXYy8.js.map +1 -0
- package/lib/{utils-Bh4upQ0e.js → utils-pDHePxa0.js} +3 -3
- package/lib/{utils-Bh4upQ0e.js.map → utils-pDHePxa0.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +24 -22
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +1 -1
- package/lib/zudoku.auth-openid.js +527 -469
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +434 -443
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.openapi-worker.js +1 -1
- package/lib/zudoku.plugin-api-keys.js +6 -6
- package/lib/zudoku.plugin-custom-page.js +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +8 -7
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/package.json +80 -100
- package/src/app/main.css +1 -1
- package/src/lib/authentication/authentication.ts +1 -0
- package/src/lib/authentication/components/CallbackHandler.tsx +59 -0
- package/src/lib/authentication/providers/auth0.tsx +13 -7
- package/src/lib/authentication/providers/openid.tsx +56 -58
- package/src/lib/components/Header.tsx +3 -10
- package/src/lib/components/Layout.tsx +6 -1
- package/src/lib/components/context/ZudokuProvider.tsx +1 -4
- package/src/lib/core/DevPortalContext.ts +2 -7
- package/src/lib/core/plugins.ts +1 -2
- package/src/lib/plugins/openapi/OperationList.tsx +3 -7
- package/src/lib/plugins/openapi/OperationListItem.tsx +2 -3
- package/src/lib/plugins/openapi/ParameterListItem.tsx +1 -1
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +27 -5
- package/dist/lib/plugins/openapi/util/prose.d.ts +0 -1
- package/dist/lib/plugins/openapi/util/prose.js +0 -4
- package/dist/lib/plugins/openapi/util/prose.js.map +0 -1
- package/lib/OperationList-CJajXSzC.js.map +0 -1
- package/lib/Spinner-BT_AYFrA.js.map +0 -1
- package/lib/index-B6zugCnN.js.map +0 -1
- package/lib/urql-DrBfkb92.js.map +0 -1
- package/src/lib/plugins/openapi/util/prose.ts +0 -7
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-B6kdoens.js";
|
|
2
|
-
import { C as
|
|
3
|
-
import { D as
|
|
4
|
-
import {
|
|
5
|
-
import { c as
|
|
6
|
-
import { useState as b, useCallback as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
2
|
+
import { C as k } from "./CategoryHeading-DnPprxtD.js";
|
|
3
|
+
import { D as A } from "./DeveloperHint-BQSFXH01.js";
|
|
4
|
+
import { E as I } from "./ErrorPage-PUg985n_.js";
|
|
5
|
+
import { c as y, h as p, H as g, a as h, P as j, I as w, S as T } from "./Markdown-Chb9VIBv.js";
|
|
6
|
+
import { useState as b, useCallback as R } from "react";
|
|
7
|
+
import { C as z, a as d, b as F, c as H, d as $, T as E, e as D, f as B, g as G, S as Q, h as P, u as V } from "./index-Br1MQPxy.js";
|
|
8
|
+
import { R as O, T as v, C, a as _ } from "./index-DCJ9wEIV.js";
|
|
9
|
+
import { u as J } from "./urql-YhcsXYy8.js";
|
|
10
|
+
import { B as K } from "./Combination-DruV0zX_.js";
|
|
11
|
+
import { j as U } from "./Input-CBfi9Yjc.js";
|
|
11
12
|
/**
|
|
12
13
|
* @license lucide-react v0.378.0 - ISC
|
|
13
14
|
*
|
|
14
15
|
* This source code is licensed under the ISC license.
|
|
15
16
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
17
|
*/
|
|
17
|
-
const
|
|
18
|
+
const Z = y("CircleDot", [
|
|
18
19
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
19
20
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }]
|
|
20
21
|
]);
|
|
@@ -24,7 +25,7 @@ const W = j("CircleDot", [
|
|
|
24
25
|
* This source code is licensed under the ISC license.
|
|
25
26
|
* See the LICENSE file in the root directory of this source tree.
|
|
26
27
|
*/
|
|
27
|
-
const
|
|
28
|
+
const W = y("CircleFadingPlus", [
|
|
28
29
|
["path", { d: "M12 2a10 10 0 0 1 7.38 16.75", key: "175t95" }],
|
|
29
30
|
["path", { d: "M12 8v8", key: "napkw2" }],
|
|
30
31
|
["path", { d: "M16 12H8", key: "1fr5h0" }],
|
|
@@ -39,7 +40,7 @@ const X = j("CircleFadingPlus", [
|
|
|
39
40
|
* This source code is licensed under the ISC license.
|
|
40
41
|
* See the LICENSE file in the root directory of this source tree.
|
|
41
42
|
*/
|
|
42
|
-
const
|
|
43
|
+
const X = y("Circle", [
|
|
43
44
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
|
|
44
45
|
]);
|
|
45
46
|
/**
|
|
@@ -48,7 +49,7 @@ const Y = j("Circle", [
|
|
|
48
49
|
* This source code is licensed under the ISC license.
|
|
49
50
|
* See the LICENSE file in the root directory of this source tree.
|
|
50
51
|
*/
|
|
51
|
-
const
|
|
52
|
+
const Y = y("ListPlus", [
|
|
52
53
|
["path", { d: "M11 12H3", key: "51ecnj" }],
|
|
53
54
|
["path", { d: "M16 6H3", key: "1wxfjs" }],
|
|
54
55
|
["path", { d: "M16 18H3", key: "12xzn7" }],
|
|
@@ -61,7 +62,7 @@ const ee = j("ListPlus", [
|
|
|
61
62
|
* This source code is licensed under the ISC license.
|
|
62
63
|
* See the LICENSE file in the root directory of this source tree.
|
|
63
64
|
*/
|
|
64
|
-
const
|
|
65
|
+
const ee = y("SquareMinus", [
|
|
65
66
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
66
67
|
["path", { d: "M8 12h8", key: "1wcyev" }]
|
|
67
68
|
]);
|
|
@@ -71,30 +72,30 @@ const se = j("SquareMinus", [
|
|
|
71
72
|
* This source code is licensed under the ISC license.
|
|
72
73
|
* See the LICENSE file in the root directory of this source tree.
|
|
73
74
|
*/
|
|
74
|
-
const
|
|
75
|
+
const se = y("SquarePlus", [
|
|
75
76
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
76
77
|
["path", { d: "M8 12h8", key: "1wcyev" }],
|
|
77
78
|
["path", { d: "M12 8v8", key: "napkw2" }]
|
|
78
79
|
]);
|
|
79
|
-
function
|
|
80
|
+
function te(t, s) {
|
|
80
81
|
return s;
|
|
81
82
|
}
|
|
82
|
-
const
|
|
83
|
+
const M = (t, s) => t.reduce(
|
|
83
84
|
(n, a) => {
|
|
84
85
|
const r = s(a);
|
|
85
86
|
return n[r] || (n[r] = []), n[r].push(a), n;
|
|
86
87
|
},
|
|
87
88
|
{}
|
|
88
|
-
),
|
|
89
|
+
), re = (t, s) => t ? s(t) : void 0, S = (t) => t.schema != null && typeof t.schema == "object" ? t.schema : {
|
|
89
90
|
type: "string"
|
|
90
|
-
},
|
|
91
|
+
}, ne = ({
|
|
91
92
|
parameter: t,
|
|
92
93
|
group: s,
|
|
93
94
|
id: n
|
|
94
95
|
}) => /* @__PURE__ */ e.jsxs("li", { className: "p-4 bg-border/20 text-sm flex flex-col gap-1", children: [
|
|
95
96
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
96
97
|
/* @__PURE__ */ e.jsx("code", { children: s === "path" ? /* @__PURE__ */ e.jsx(
|
|
97
|
-
|
|
98
|
+
z,
|
|
98
99
|
{
|
|
99
100
|
name: t.name,
|
|
100
101
|
backgroundOpacity: "15%",
|
|
@@ -102,23 +103,23 @@ const q = (t, s) => t.reduce(
|
|
|
102
103
|
}
|
|
103
104
|
) : t.name }),
|
|
104
105
|
t.required && /* @__PURE__ */ e.jsx("span", { className: "py-px px-1.5 font-medium bg-primary/75 text-muted rounded-lg", children: "required" }),
|
|
105
|
-
|
|
106
|
+
S(t).type && /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: S(t).type })
|
|
106
107
|
] }),
|
|
107
108
|
t.description && /* @__PURE__ */ e.jsx(
|
|
108
109
|
p,
|
|
109
110
|
{
|
|
110
111
|
content: t.description,
|
|
111
|
-
className: "text-sm prose-p:my-1"
|
|
112
|
+
className: "text-sm prose-p:my-1 prose-code:whitespace-pre-line"
|
|
112
113
|
}
|
|
113
114
|
)
|
|
114
|
-
] }),
|
|
115
|
+
] }), ae = ({
|
|
115
116
|
group: t,
|
|
116
117
|
parameters: s,
|
|
117
118
|
id: n
|
|
118
119
|
}) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
119
|
-
/* @__PURE__ */ e.jsx(
|
|
120
|
+
/* @__PURE__ */ e.jsx(g, { level: 3, id: `${n}/${t}-parameters`, className: "capitalize", children: t === "header" ? "Headers" : `${t} Parameters` }),
|
|
120
121
|
/* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx("ul", { className: "list-none m-0 px-0 divide-y ", children: s.sort((a, r) => a.required === r.required ? 0 : a.required ? -1 : 1).map((a) => /* @__PURE__ */ e.jsx(
|
|
121
|
-
|
|
122
|
+
ne,
|
|
122
123
|
{
|
|
123
124
|
parameter: a,
|
|
124
125
|
id: n,
|
|
@@ -126,42 +127,42 @@ const q = (t, s) => t.reduce(
|
|
|
126
127
|
},
|
|
127
128
|
`${a.name}-${a.in}`
|
|
128
129
|
)) }) })
|
|
129
|
-
] }),
|
|
130
|
-
AND: /* @__PURE__ */ e.jsx(
|
|
131
|
-
OR: /* @__PURE__ */ e.jsx(
|
|
132
|
-
ONE: /* @__PURE__ */ e.jsx(
|
|
133
|
-
},
|
|
130
|
+
] }), ie = (t) => Object.entries(t), oe = {
|
|
131
|
+
AND: /* @__PURE__ */ e.jsx(W, { size: 16, className: "fill-card" }),
|
|
132
|
+
OR: /* @__PURE__ */ e.jsx(Z, { size: 16, className: "fill-card" }),
|
|
133
|
+
ONE: /* @__PURE__ */ e.jsx(X, { size: 14, className: "fill-card" })
|
|
134
|
+
}, le = {
|
|
134
135
|
AND: "text-green-500 dark:text-green-300/60",
|
|
135
136
|
OR: "text-blue-400 dark:text-blue-500",
|
|
136
137
|
ONE: "text-purple-500 dark:text-purple-300/60"
|
|
137
|
-
},
|
|
138
|
+
}, ce = ({
|
|
138
139
|
type: t,
|
|
139
140
|
isOpen: s,
|
|
140
141
|
className: n
|
|
141
142
|
}) => /* @__PURE__ */ e.jsx(
|
|
142
143
|
"div",
|
|
143
144
|
{
|
|
144
|
-
className:
|
|
145
|
-
|
|
145
|
+
className: h(
|
|
146
|
+
le[t],
|
|
146
147
|
"relative text-sm flex py-2",
|
|
147
148
|
"before:border-l before:absolute before:-top-2 before:-bottom-2 before:border-border before:border-dashed before:content-['']",
|
|
148
149
|
n
|
|
149
150
|
),
|
|
150
151
|
children: /* @__PURE__ */ e.jsxs("div", { className: "-translate-x-[7px] flex gap-1 items-center", children: [
|
|
151
|
-
|
|
152
|
+
oe[t],
|
|
152
153
|
/* @__PURE__ */ e.jsx(
|
|
153
154
|
"div",
|
|
154
155
|
{
|
|
155
|
-
className:
|
|
156
|
+
className: h(
|
|
156
157
|
"translate-y-px mx-px opacity-0 group-hover:opacity-100 transition",
|
|
157
158
|
!s && "-rotate-90"
|
|
158
159
|
),
|
|
159
|
-
children: /* @__PURE__ */ e.jsx(
|
|
160
|
+
children: /* @__PURE__ */ e.jsx(U, { size: 16 })
|
|
160
161
|
}
|
|
161
162
|
)
|
|
162
163
|
] })
|
|
163
164
|
}
|
|
164
|
-
),
|
|
165
|
+
), de = (t) => {
|
|
165
166
|
const [s, n] = b(!0);
|
|
166
167
|
return /* @__PURE__ */ e.jsxs(
|
|
167
168
|
O,
|
|
@@ -170,17 +171,17 @@ const q = (t, s) => t.reduce(
|
|
|
170
171
|
onOpenChange: () => n((a) => !a),
|
|
171
172
|
className: "group",
|
|
172
173
|
children: [
|
|
173
|
-
/* @__PURE__ */ e.jsx(v, { children: /* @__PURE__ */ e.jsx(
|
|
174
|
+
/* @__PURE__ */ e.jsx(v, { children: /* @__PURE__ */ e.jsx(ce, { type: t.type, isOpen: s }) }),
|
|
174
175
|
!s && /* @__PURE__ */ e.jsx("div", { className: "wavy-line bg-border translate-y-1" }),
|
|
175
|
-
/* @__PURE__ */ e.jsx(
|
|
176
|
+
/* @__PURE__ */ e.jsx(C, { children: /* @__PURE__ */ e.jsx(f, { schema: t.schema, level: t.level + 1 }) })
|
|
176
177
|
]
|
|
177
178
|
}
|
|
178
179
|
);
|
|
179
|
-
},
|
|
180
|
+
}, pe = {
|
|
180
181
|
AND: "All of",
|
|
181
182
|
OR: "Any of",
|
|
182
183
|
ONE: "One of"
|
|
183
|
-
},
|
|
184
|
+
}, me = ({
|
|
184
185
|
schemas: t,
|
|
185
186
|
type: s,
|
|
186
187
|
isOpen: n,
|
|
@@ -188,13 +189,13 @@ const q = (t, s) => t.reduce(
|
|
|
188
189
|
toggleOpen: r
|
|
189
190
|
}) => /* @__PURE__ */ e.jsx(O, { open: n, onOpenChange: r, asChild: !0, children: /* @__PURE__ */ e.jsxs(d, { className: "px-6", children: [
|
|
190
191
|
/* @__PURE__ */ e.jsxs(v, { className: "flex gap-2 items-center py-2 w-full text-sm text-muted-foreground -translate-x-1.5", children: [
|
|
191
|
-
n ? /* @__PURE__ */ e.jsx(
|
|
192
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
192
|
+
n ? /* @__PURE__ */ e.jsx(ee, { size: 14 }) : /* @__PURE__ */ e.jsx(se, { size: 14 }),
|
|
193
|
+
/* @__PURE__ */ e.jsx("span", { children: pe[s] })
|
|
193
194
|
] }),
|
|
194
|
-
/* @__PURE__ */ e.jsx(
|
|
195
|
+
/* @__PURE__ */ e.jsx(C, { className: "pb-4", children: t.map((i, l) => (
|
|
195
196
|
// eslint-disable-next-line react/no-array-index-key
|
|
196
197
|
/* @__PURE__ */ e.jsx(
|
|
197
|
-
|
|
198
|
+
de,
|
|
198
199
|
{
|
|
199
200
|
type: s,
|
|
200
201
|
schema: i,
|
|
@@ -203,19 +204,19 @@ const q = (t, s) => t.reduce(
|
|
|
203
204
|
l
|
|
204
205
|
)
|
|
205
206
|
)) })
|
|
206
|
-
] }) }),
|
|
207
|
+
] }) }), xe = (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), ue = {
|
|
207
208
|
allOf: "AND",
|
|
208
209
|
anyOf: "OR",
|
|
209
210
|
oneOf: "ONE"
|
|
210
|
-
},
|
|
211
|
+
}, q = ({
|
|
211
212
|
schema: t,
|
|
212
213
|
level: s
|
|
213
214
|
}) => {
|
|
214
|
-
const [n, a] = b(!0), r =
|
|
215
|
-
for (const [i, l] of
|
|
215
|
+
const [n, a] = b(!0), r = R(() => a((i) => !i), []);
|
|
216
|
+
for (const [i, l] of ie(ue))
|
|
216
217
|
if (t[i])
|
|
217
218
|
return /* @__PURE__ */ e.jsx(
|
|
218
|
-
|
|
219
|
+
me,
|
|
219
220
|
{
|
|
220
221
|
schemas: t[i],
|
|
221
222
|
type: l,
|
|
@@ -224,7 +225,7 @@ const q = (t, s) => t.reduce(
|
|
|
224
225
|
level: s
|
|
225
226
|
}
|
|
226
227
|
);
|
|
227
|
-
},
|
|
228
|
+
}, he = ({
|
|
228
229
|
name: t,
|
|
229
230
|
schema: s,
|
|
230
231
|
group: n,
|
|
@@ -232,12 +233,12 @@ const q = (t, s) => t.reduce(
|
|
|
232
233
|
defaultOpen: r = !1,
|
|
233
234
|
showCollapseButton: i = !0
|
|
234
235
|
}) => {
|
|
235
|
-
var
|
|
236
|
-
const [l,
|
|
236
|
+
var x;
|
|
237
|
+
const [l, m] = b(r);
|
|
237
238
|
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: [
|
|
238
239
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center", children: [
|
|
239
240
|
/* @__PURE__ */ e.jsx("code", { children: t }),
|
|
240
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: s.type === "array" && ((
|
|
241
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: s.type === "array" && ((x = s.items) != null && x.type) ? /* @__PURE__ */ e.jsxs("span", { children: [
|
|
241
242
|
s.items.type,
|
|
242
243
|
"[]"
|
|
243
244
|
] }) : Array.isArray(s.type) ? /* @__PURE__ */ e.jsx("span", { children: s.type.join(" | ") }) : /* @__PURE__ */ e.jsx("span", { children: s.type }) }),
|
|
@@ -246,30 +247,30 @@ const q = (t, s) => t.reduce(
|
|
|
246
247
|
s.description && /* @__PURE__ */ e.jsx(
|
|
247
248
|
p,
|
|
248
249
|
{
|
|
249
|
-
className:
|
|
250
|
+
className: h(j, "text-sm leading-normal line-clamp-4"),
|
|
250
251
|
content: s.description
|
|
251
252
|
}
|
|
252
253
|
),
|
|
253
|
-
(N(s) ||
|
|
254
|
+
(N(s) || xe(s)) && /* @__PURE__ */ e.jsxs(
|
|
254
255
|
O,
|
|
255
256
|
{
|
|
256
257
|
defaultOpen: r,
|
|
257
258
|
open: l,
|
|
258
|
-
onOpenChange: () =>
|
|
259
|
+
onOpenChange: () => m(!l),
|
|
259
260
|
children: [
|
|
260
261
|
i && /* @__PURE__ */ e.jsx(v, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
261
|
-
|
|
262
|
+
K,
|
|
262
263
|
{
|
|
263
264
|
variant: "outline",
|
|
264
265
|
size: "sm",
|
|
265
266
|
className: "mt-2 flex gap-1.5",
|
|
266
267
|
children: [
|
|
267
|
-
/* @__PURE__ */ e.jsx(
|
|
268
|
+
/* @__PURE__ */ e.jsx(Y, { size: 18 }),
|
|
268
269
|
l ? "Hide nested properties" : "Show nested properties"
|
|
269
270
|
]
|
|
270
271
|
}
|
|
271
272
|
) }),
|
|
272
|
-
/* @__PURE__ */ e.jsx(
|
|
273
|
+
/* @__PURE__ */ e.jsx(C, { children: /* @__PURE__ */ e.jsx("div", { className: "mt-2", children: N(s) ? /* @__PURE__ */ e.jsx(q, { schema: s, level: a + 1 }) : s.type === "object" ? /* @__PURE__ */ e.jsx(f, { schema: s, level: a + 1 }) : s.type === "array" && typeof s.items == "object" && /* @__PURE__ */ e.jsx(f, { schema: s.items, level: a + 1 }) }) })
|
|
273
274
|
]
|
|
274
275
|
}
|
|
275
276
|
)
|
|
@@ -283,7 +284,7 @@ const q = (t, s) => t.reduce(
|
|
|
283
284
|
return /* @__PURE__ */ e.jsx(d, { className: "p-4", children: /* @__PURE__ */ e.jsx("span", { className: "text-sm text-muted-foreground italic", children: "No response specified" }) });
|
|
284
285
|
const a = (r, i) => {
|
|
285
286
|
if (r.oneOf || r.allOf || r.anyOf)
|
|
286
|
-
return /* @__PURE__ */ e.jsx(
|
|
287
|
+
return /* @__PURE__ */ e.jsx(q, { schema: r, level: i });
|
|
287
288
|
if (r.type === "array" && r.items) {
|
|
288
289
|
const l = r.items;
|
|
289
290
|
return typeof l.type == "string" && ["string", "number", "boolean", "integer"].includes(l.type) ? /* @__PURE__ */ e.jsxs(d, { className: "p-4", children: [
|
|
@@ -294,8 +295,8 @@ const q = (t, s) => t.reduce(
|
|
|
294
295
|
r.description && /* @__PURE__ */ e.jsx(
|
|
295
296
|
p,
|
|
296
297
|
{
|
|
297
|
-
className:
|
|
298
|
-
|
|
298
|
+
className: h(
|
|
299
|
+
j,
|
|
299
300
|
"text-sm leading-normal line-clamp-4"
|
|
300
301
|
),
|
|
301
302
|
content: r.description
|
|
@@ -313,8 +314,8 @@ const q = (t, s) => t.reduce(
|
|
|
313
314
|
r.description && /* @__PURE__ */ e.jsx(
|
|
314
315
|
p,
|
|
315
316
|
{
|
|
316
|
-
className:
|
|
317
|
-
|
|
317
|
+
className: h(
|
|
318
|
+
j,
|
|
318
319
|
"text-sm leading-normal line-clamp-4"
|
|
319
320
|
),
|
|
320
321
|
content: r.description
|
|
@@ -322,23 +323,23 @@ const q = (t, s) => t.reduce(
|
|
|
322
323
|
)
|
|
323
324
|
] });
|
|
324
325
|
if (r.properties) {
|
|
325
|
-
const l =
|
|
326
|
+
const l = M(
|
|
326
327
|
Object.entries(r.properties),
|
|
327
328
|
([o, c]) => {
|
|
328
|
-
var
|
|
329
|
-
return c.deprecated ? "deprecated" : (
|
|
329
|
+
var u;
|
|
330
|
+
return c.deprecated ? "deprecated" : (u = r.required) != null && u.includes(o) ? "required" : "optional";
|
|
330
331
|
}
|
|
331
|
-
),
|
|
332
|
-
return /* @__PURE__ */ e.jsx(d, { className: "divide-y overflow-hidden", children:
|
|
333
|
-
(o) => l[o] && /* @__PURE__ */ e.jsx("ul", { className: "divide-y", children: l[o].map(([c,
|
|
334
|
-
|
|
332
|
+
), m = i === 0 && Object.keys(l).length === 1, x = ["required", "optional", "deprecated"];
|
|
333
|
+
return /* @__PURE__ */ e.jsx(d, { className: "divide-y overflow-hidden", children: x.map(
|
|
334
|
+
(o) => l[o] && /* @__PURE__ */ e.jsx("ul", { className: "divide-y", children: l[o].map(([c, u]) => /* @__PURE__ */ e.jsx(
|
|
335
|
+
he,
|
|
335
336
|
{
|
|
336
337
|
name: c,
|
|
337
|
-
schema:
|
|
338
|
+
schema: u,
|
|
338
339
|
group: o,
|
|
339
340
|
level: i,
|
|
340
|
-
defaultOpen:
|
|
341
|
-
showCollapseButton: !
|
|
341
|
+
defaultOpen: m || n,
|
|
342
|
+
showCollapseButton: !m
|
|
342
343
|
},
|
|
343
344
|
c
|
|
344
345
|
)) }, o)
|
|
@@ -349,30 +350,27 @@ const q = (t, s) => t.reduce(
|
|
|
349
350
|
r.description && /* @__PURE__ */ e.jsx(
|
|
350
351
|
p,
|
|
351
352
|
{
|
|
352
|
-
className:
|
|
353
|
-
|
|
353
|
+
className: h(
|
|
354
|
+
j,
|
|
354
355
|
"text-sm leading-normal line-clamp-4"
|
|
355
356
|
),
|
|
356
357
|
content: r.description
|
|
357
358
|
}
|
|
358
359
|
)
|
|
359
360
|
] }) : r.additionalProperties ? /* @__PURE__ */ e.jsxs(d, { className: "my-2", children: [
|
|
360
|
-
/* @__PURE__ */ e.jsx(
|
|
361
|
-
/* @__PURE__ */ e.jsx(
|
|
361
|
+
/* @__PURE__ */ e.jsx(F, { children: /* @__PURE__ */ e.jsx(H, { children: "Additional Properties:" }) }),
|
|
362
|
+
/* @__PURE__ */ e.jsx($, { children: a(
|
|
362
363
|
r.additionalProperties,
|
|
363
364
|
i + 1
|
|
364
365
|
) })
|
|
365
366
|
] }) : null;
|
|
366
367
|
};
|
|
367
368
|
return a(t, s);
|
|
368
|
-
},
|
|
369
|
-
g,
|
|
370
|
-
"max-w-full prose-img:max-w-prose"
|
|
371
|
-
), ye = ["path", "query", "header", "cookie"], ge = ({
|
|
369
|
+
}, je = ["path", "query", "header", "cookie"], ye = ({
|
|
372
370
|
operationFragment: t
|
|
373
371
|
}) => {
|
|
374
|
-
var l,
|
|
375
|
-
const s =
|
|
372
|
+
var l, m, x;
|
|
373
|
+
const s = te(ge, t), n = M(
|
|
376
374
|
s.parameters ?? [],
|
|
377
375
|
(o) => o.in
|
|
378
376
|
), a = s.responses.at(0), [r, i] = b(a == null ? void 0 : a.statusCode);
|
|
@@ -382,19 +380,19 @@ const q = (t, s) => t.reduce(
|
|
|
382
380
|
className: "grid grid-cols-1 lg:grid-cols-[4fr_3fr] gap-8 items-start border-b-2 mb-16 pb-16",
|
|
383
381
|
children: [
|
|
384
382
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
385
|
-
/* @__PURE__ */ e.jsx(
|
|
383
|
+
/* @__PURE__ */ e.jsx(g, { level: 2, id: s.slug, registerSidebarAnchor: !0, children: s.summary }),
|
|
386
384
|
s.description && /* @__PURE__ */ e.jsx(
|
|
387
385
|
p,
|
|
388
386
|
{
|
|
389
|
-
className:
|
|
387
|
+
className: `${j} max-w-full prose-img:max-w-prose`,
|
|
390
388
|
content: s.description
|
|
391
389
|
}
|
|
392
390
|
),
|
|
393
|
-
s.parameters && s.parameters.length > 0 && /* @__PURE__ */ e.jsx(e.Fragment, { children:
|
|
391
|
+
s.parameters && s.parameters.length > 0 && /* @__PURE__ */ e.jsx(e.Fragment, { children: je.flatMap(
|
|
394
392
|
(o) => {
|
|
395
393
|
var c;
|
|
396
394
|
return (c = n[o]) != null && c.length ? /* @__PURE__ */ e.jsx(
|
|
397
|
-
|
|
395
|
+
ae,
|
|
398
396
|
{
|
|
399
397
|
id: s.slug,
|
|
400
398
|
parameters: n[o],
|
|
@@ -404,20 +402,20 @@ const q = (t, s) => t.reduce(
|
|
|
404
402
|
) : [];
|
|
405
403
|
}
|
|
406
404
|
) }),
|
|
407
|
-
|
|
408
|
-
/* @__PURE__ */ e.jsx(
|
|
405
|
+
re((x = (m = (l = s.requestBody) == null ? void 0 : l.content) == null ? void 0 : m.at(0)) == null ? void 0 : x.schema, (o) => /* @__PURE__ */ e.jsxs("div", { className: "mt-4 flex flex-col gap-4", children: [
|
|
406
|
+
/* @__PURE__ */ e.jsx(g, { level: 3, className: "capitalize", children: "Request Body" }),
|
|
409
407
|
/* @__PURE__ */ e.jsx(f, { schema: o })
|
|
410
408
|
] })),
|
|
411
409
|
s.responses.length > 0 && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
412
|
-
/* @__PURE__ */ e.jsx(
|
|
410
|
+
/* @__PURE__ */ e.jsx(g, { level: 3, className: "capitalize mt-8 pt-8 border-t", children: "Responses" }),
|
|
413
411
|
/* @__PURE__ */ e.jsxs(
|
|
414
|
-
|
|
412
|
+
E,
|
|
415
413
|
{
|
|
416
414
|
onValueChange: (o) => i(o),
|
|
417
415
|
value: r,
|
|
418
416
|
children: [
|
|
419
|
-
s.responses.length > 1 && /* @__PURE__ */ e.jsx(
|
|
420
|
-
|
|
417
|
+
s.responses.length > 1 && /* @__PURE__ */ e.jsx(D, { children: s.responses.map((o) => /* @__PURE__ */ e.jsx(
|
|
418
|
+
B,
|
|
421
419
|
{
|
|
422
420
|
value: o.statusCode,
|
|
423
421
|
title: o.description,
|
|
@@ -426,15 +424,15 @@ const q = (t, s) => t.reduce(
|
|
|
426
424
|
o.statusCode
|
|
427
425
|
)) }),
|
|
428
426
|
/* @__PURE__ */ e.jsx("ul", { className: "list-none m-0 px-0", children: s.responses.map((o) => {
|
|
429
|
-
var c,
|
|
427
|
+
var c, u;
|
|
430
428
|
return /* @__PURE__ */ e.jsx(
|
|
431
|
-
|
|
429
|
+
G,
|
|
432
430
|
{
|
|
433
431
|
value: o.statusCode,
|
|
434
432
|
children: /* @__PURE__ */ e.jsx(
|
|
435
433
|
f,
|
|
436
434
|
{
|
|
437
|
-
schema: (
|
|
435
|
+
schema: (u = (c = o.content) == null ? void 0 : c.find((L) => L.schema)) == null ? void 0 : u.schema
|
|
438
436
|
}
|
|
439
437
|
)
|
|
440
438
|
},
|
|
@@ -447,7 +445,7 @@ const q = (t, s) => t.reduce(
|
|
|
447
445
|
] })
|
|
448
446
|
] }),
|
|
449
447
|
/* @__PURE__ */ e.jsx(
|
|
450
|
-
|
|
448
|
+
Q,
|
|
451
449
|
{
|
|
452
450
|
selectedResponse: r,
|
|
453
451
|
onSelectResponse: i,
|
|
@@ -458,7 +456,7 @@ const q = (t, s) => t.reduce(
|
|
|
458
456
|
},
|
|
459
457
|
s.operationId
|
|
460
458
|
);
|
|
461
|
-
},
|
|
459
|
+
}, ge = P(
|
|
462
460
|
/* GraphQL */
|
|
463
461
|
`
|
|
464
462
|
fragment OperationsFragment on OperationItem {
|
|
@@ -509,7 +507,7 @@ const q = (t, s) => t.reduce(
|
|
|
509
507
|
}
|
|
510
508
|
}
|
|
511
509
|
`
|
|
512
|
-
),
|
|
510
|
+
), fe = P(
|
|
513
511
|
/* GraphQL */
|
|
514
512
|
`
|
|
515
513
|
query AllOperations($input: JSON!, $type: SchemaType!) {
|
|
@@ -529,20 +527,20 @@ const q = (t, s) => t.reduce(
|
|
|
529
527
|
}
|
|
530
528
|
}
|
|
531
529
|
`
|
|
532
|
-
),
|
|
530
|
+
), be = { suspense: !0 }, Ae = () => {
|
|
533
531
|
var r;
|
|
534
|
-
const { type: t, input: s } =
|
|
535
|
-
query:
|
|
532
|
+
const { type: t, input: s } = V(), [n] = J({
|
|
533
|
+
query: fe,
|
|
536
534
|
variables: { type: t, input: s },
|
|
537
|
-
context:
|
|
535
|
+
context: be
|
|
538
536
|
}), a = (r = n.error) == null ? void 0 : r.graphQLErrors.at(0);
|
|
539
537
|
return a ? /* @__PURE__ */ e.jsx(
|
|
540
|
-
|
|
538
|
+
I,
|
|
541
539
|
{
|
|
542
540
|
category: "Error",
|
|
543
541
|
title: "Schema cannot be displayed",
|
|
544
542
|
message: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
545
|
-
/* @__PURE__ */ e.jsxs(
|
|
543
|
+
/* @__PURE__ */ e.jsxs(A, { className: "mb-4", children: [
|
|
546
544
|
"Check your configuration value ",
|
|
547
545
|
/* @__PURE__ */ e.jsx(w, { children: "apis.type" }),
|
|
548
546
|
" ",
|
|
@@ -551,35 +549,32 @@ const q = (t, s) => t.reduce(
|
|
|
551
549
|
" in the Zudoku config."
|
|
552
550
|
] }),
|
|
553
551
|
"An error occurred while trying to fetch the API reference:",
|
|
554
|
-
/* @__PURE__ */ e.jsx(
|
|
552
|
+
/* @__PURE__ */ e.jsx(T, { code: a.toString(), language: "plain" })
|
|
555
553
|
] })
|
|
556
554
|
}
|
|
557
555
|
) : n.data ? /* @__PURE__ */ e.jsxs("div", { className: "pt-[--padding-content-top]", children: [
|
|
558
556
|
/* @__PURE__ */ e.jsxs(
|
|
559
557
|
"div",
|
|
560
558
|
{
|
|
561
|
-
className:
|
|
562
|
-
C,
|
|
563
|
-
"mb-16 max-w-full prose-img:max-w-prose"
|
|
564
|
-
),
|
|
559
|
+
className: h(j, "mb-16 max-w-full prose-img:max-w-prose"),
|
|
565
560
|
children: [
|
|
566
|
-
/* @__PURE__ */ e.jsx(
|
|
567
|
-
/* @__PURE__ */ e.jsx(
|
|
561
|
+
/* @__PURE__ */ e.jsx(k, { children: "Overview" }),
|
|
562
|
+
/* @__PURE__ */ e.jsx(g, { level: 1, id: "description", registerSidebarAnchor: !0, children: n.data.schema.title }),
|
|
568
563
|
/* @__PURE__ */ e.jsx(p, { content: n.data.schema.description ?? "" })
|
|
569
564
|
]
|
|
570
565
|
}
|
|
571
566
|
),
|
|
572
567
|
n.data.schema.tags.filter((i) => i.operations.length > 0).map((i) => /* @__PURE__ */ e.jsxs("div", { children: [
|
|
573
|
-
i.name && /* @__PURE__ */ e.jsx(
|
|
568
|
+
i.name && /* @__PURE__ */ e.jsx(k, { children: i.name }),
|
|
574
569
|
i.description && /* @__PURE__ */ e.jsx(
|
|
575
570
|
p,
|
|
576
571
|
{
|
|
577
|
-
className: `${
|
|
572
|
+
className: `${j} max-w-full prose-img:max-w-prose w-full mt-2 mb-12`,
|
|
578
573
|
content: i.description
|
|
579
574
|
}
|
|
580
575
|
),
|
|
581
|
-
/* @__PURE__ */ e.jsx("div", { className: "operation mb-12", children: /* @__PURE__ */ e.jsx(
|
|
582
|
-
|
|
576
|
+
/* @__PURE__ */ e.jsx("div", { className: "operation mb-12", children: /* @__PURE__ */ e.jsx(_, { children: i.operations.map((l) => /* @__PURE__ */ e.jsx(
|
|
577
|
+
ye,
|
|
583
578
|
{
|
|
584
579
|
operationFragment: l
|
|
585
580
|
},
|
|
@@ -590,6 +585,6 @@ const q = (t, s) => t.reduce(
|
|
|
590
585
|
};
|
|
591
586
|
export {
|
|
592
587
|
Ae as OperationList,
|
|
593
|
-
|
|
588
|
+
ge as OperationsFragment
|
|
594
589
|
};
|
|
595
|
-
//# sourceMappingURL=OperationList-
|
|
590
|
+
//# sourceMappingURL=OperationList-CZiSz5JH.js.map
|