zudoku 0.3.0-dev.84 → 0.3.0-dev.86
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/lib/components/Header.js +5 -4
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +4 -3
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterList.js +2 -1
- package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaListView.js +6 -1
- package/dist/lib/plugins/openapi/SchemaListView.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaListViewItem.d.ts +3 -2
- package/dist/lib/plugins/openapi/SchemaListViewItem.js +6 -3
- package/dist/lib/plugins/openapi/SchemaListViewItem.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/lib/{OperationList-nQ0bd8TU.js → OperationList-CMH3DPpj.js} +144 -128
- package/lib/OperationList-CMH3DPpj.js.map +1 -0
- package/lib/{Route-CNvxEBnR.js → Route-CwXfyIUw.js} +2 -2
- package/lib/{Route-CNvxEBnR.js.map → Route-CwXfyIUw.js.map} +1 -1
- package/lib/{index-CgCPw6Jn.js → index-DUrF63A6.js} +9 -8
- package/lib/index-DUrF63A6.js.map +1 -0
- package/lib/zudoku.components.js +4 -4
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/package.json +1 -1
- package/src/lib/components/Header.tsx +19 -17
- package/src/lib/plugins/openapi/OperationListItem.tsx +5 -6
- package/src/lib/plugins/openapi/ParameterList.tsx +13 -10
- package/src/lib/plugins/openapi/SchemaListView.tsx +18 -2
- package/src/lib/plugins/openapi/SchemaListViewItem.tsx +16 -7
- package/src/lib/plugins/openapi/playground/Headers.tsx +1 -1
- package/src/lib/plugins/openapi/playground/Playground.tsx +1 -1
- package/lib/OperationList-nQ0bd8TU.js.map +0 -1
- package/lib/index-CgCPw6Jn.js.map +0 -1
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-B6kdoens.js";
|
|
2
|
-
import { C as
|
|
3
|
-
import { D as
|
|
4
|
-
import { C as
|
|
5
|
-
import { c as
|
|
6
|
-
import { R as
|
|
7
|
-
import { u as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
2
|
+
import { C as f } from "./CategoryHeading-BWq12Bfa.js";
|
|
3
|
+
import { D as q } from "./DeveloperHint-BQSFXH01.js";
|
|
4
|
+
import { C as L, a as u, T as I, b as R, c as T, d as $, S as k, g as v, u as A, E as F } from "./index-DUrF63A6.js";
|
|
5
|
+
import { c as H, h as m, H as x, a as p, P as M, I as b, S as z } from "./Markdown-B_Gax7at.js";
|
|
6
|
+
import { R as C, T as O, C as P, a as B } from "./index-DkuZvRNP.js";
|
|
7
|
+
import { u as E } from "./urql-DrBfkb92.js";
|
|
8
|
+
import { B as V } from "./Combination-DkycFHkm.js";
|
|
9
|
+
import { useState as D } from "react";
|
|
10
10
|
/**
|
|
11
11
|
* @license lucide-react v0.378.0 - ISC
|
|
12
12
|
*
|
|
13
13
|
* This source code is licensed under the ISC license.
|
|
14
14
|
* See the LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
|
-
const
|
|
16
|
+
const Q = H("ListPlus", [
|
|
17
17
|
["path", { d: "M11 12H3", key: "51ecnj" }],
|
|
18
18
|
["path", { d: "M16 6H3", key: "1wxfjs" }],
|
|
19
19
|
["path", { d: "M16 18H3", key: "12xzn7" }],
|
|
20
20
|
["path", { d: "M18 9v6", key: "1twb98" }],
|
|
21
21
|
["path", { d: "M21 12h-6", key: "bt1uis" }]
|
|
22
22
|
]);
|
|
23
|
-
function
|
|
23
|
+
function _(t, s) {
|
|
24
24
|
return s;
|
|
25
25
|
}
|
|
26
|
-
const
|
|
26
|
+
const w = (t, s) => t.reduce(
|
|
27
27
|
(n, a) => {
|
|
28
28
|
const d = s(a);
|
|
29
29
|
return n[d] || (n[d] = []), n[d].push(a), n;
|
|
30
30
|
},
|
|
31
31
|
{}
|
|
32
|
-
),
|
|
32
|
+
), N = (t, s) => t ? s(t) : void 0, y = (t) => t.schema != null && typeof t.schema == "object" ? t.schema : {
|
|
33
33
|
type: "string"
|
|
34
|
-
},
|
|
34
|
+
}, G = ({
|
|
35
35
|
parameter: t,
|
|
36
36
|
group: s,
|
|
37
37
|
id: n
|
|
38
38
|
}) => /* @__PURE__ */ e.jsxs("li", { className: "p-4 bg-border/20 text-sm flex flex-col gap-1", children: [
|
|
39
39
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
40
40
|
/* @__PURE__ */ e.jsx("code", { children: s === "path" ? /* @__PURE__ */ e.jsx(
|
|
41
|
-
|
|
41
|
+
L,
|
|
42
42
|
{
|
|
43
43
|
name: t.name,
|
|
44
44
|
backgroundOpacity: "15%",
|
|
@@ -46,7 +46,7 @@ const P = (t, s) => t.reduce(
|
|
|
46
46
|
}
|
|
47
47
|
) : t.name }),
|
|
48
48
|
t.required && /* @__PURE__ */ e.jsx("span", { className: "py-px px-1.5 font-medium bg-primary/75 text-muted rounded-lg", children: "required" }),
|
|
49
|
-
|
|
49
|
+
y(t).type && /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: y(t).type })
|
|
50
50
|
] }),
|
|
51
51
|
t.description && /* @__PURE__ */ e.jsx(
|
|
52
52
|
m,
|
|
@@ -55,42 +55,42 @@ const P = (t, s) => t.reduce(
|
|
|
55
55
|
className: "text-sm prose-p:my-1"
|
|
56
56
|
}
|
|
57
57
|
)
|
|
58
|
-
] }),
|
|
58
|
+
] }), J = ({
|
|
59
59
|
group: t,
|
|
60
60
|
parameters: s,
|
|
61
61
|
id: n
|
|
62
62
|
}) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
63
63
|
/* @__PURE__ */ e.jsx(x, { level: 3, id: `${n}/${t}-parameters`, className: "capitalize", children: t === "header" ? "Headers" : `${t} Parameters` }),
|
|
64
|
-
/* @__PURE__ */ e.jsx("ul", { className: "list-none m-0 px-0
|
|
65
|
-
|
|
64
|
+
/* @__PURE__ */ e.jsx(u, { children: /* @__PURE__ */ e.jsx("ul", { className: "list-none m-0 px-0 divide-y ", children: s.map((a) => /* @__PURE__ */ e.jsx(
|
|
65
|
+
G,
|
|
66
66
|
{
|
|
67
67
|
parameter: a,
|
|
68
68
|
id: n,
|
|
69
69
|
group: t
|
|
70
70
|
},
|
|
71
71
|
`${a.name}-${a.in}`
|
|
72
|
-
)) })
|
|
73
|
-
] }),
|
|
72
|
+
)) }) })
|
|
73
|
+
] }), K = (t) => Object.entries(t), S = ({
|
|
74
74
|
propertyName: t,
|
|
75
75
|
property: s,
|
|
76
76
|
nestingLevel: n,
|
|
77
|
-
isRequired: a
|
|
77
|
+
isRequired: a,
|
|
78
|
+
defaultOpen: d = !1
|
|
78
79
|
}) => {
|
|
79
|
-
var
|
|
80
|
-
|
|
80
|
+
var o;
|
|
81
|
+
if (!s)
|
|
82
|
+
return /* @__PURE__ */ e.jsx("div", { children: "no property" });
|
|
83
|
+
const r = t || s.title ? [t, s.title].filter(Boolean).join(" ") : null;
|
|
84
|
+
return /* @__PURE__ */ e.jsxs(
|
|
81
85
|
"div",
|
|
82
86
|
{
|
|
83
|
-
className:
|
|
87
|
+
className: p(
|
|
84
88
|
"p-4 bg-border/20 hover:bg-border/30 flex gap-1 flex-col text-sm",
|
|
85
89
|
s.deprecated && "opacity-50"
|
|
86
90
|
),
|
|
87
91
|
children: [
|
|
88
92
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 relative", children: [
|
|
89
|
-
/* @__PURE__ */ e.
|
|
90
|
-
t,
|
|
91
|
-
" ",
|
|
92
|
-
s.title
|
|
93
|
-
] }),
|
|
93
|
+
r && /* @__PURE__ */ e.jsx("code", { children: r }),
|
|
94
94
|
s.type && /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: s.type }),
|
|
95
95
|
s.deprecated && /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "Deprecated" }),
|
|
96
96
|
!a && /* @__PURE__ */ e.jsxs("span", { className: "py-px px-1.5 font-medium border rounded-lg", children: [
|
|
@@ -117,15 +117,23 @@ const P = (t, s) => t.reduce(
|
|
|
117
117
|
)).slice(0, 4),
|
|
118
118
|
s.enum.length > 4 && /* @__PURE__ */ e.jsx("span", { className: "font-mono text-xs border bg-muted rounded px-1", children: "..." })
|
|
119
119
|
] }),
|
|
120
|
-
s.type === "object" && (((
|
|
121
|
-
typeof s.items < "u" && s.items.type === "object" ? /* @__PURE__ */ e.jsxs(
|
|
122
|
-
/* @__PURE__ */ e.jsx(
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
120
|
+
s.type === "object" && (((o = s.properties) == null ? void 0 : o.length) ?? Object.entries(s.additionalProperties ?? {}).length > 0) || s.type === "array" && // this check is needed because the `items` can be undefined despite the type being defined
|
|
121
|
+
typeof s.items < "u" && s.items.type === "object" ? /* @__PURE__ */ e.jsxs(C, { className: "CollapsibleRoot", defaultOpen: d, children: [
|
|
122
|
+
/* @__PURE__ */ e.jsx(O, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
123
|
+
V,
|
|
124
|
+
{
|
|
125
|
+
variant: "ghost",
|
|
126
|
+
size: "sm",
|
|
127
|
+
className: p(d && "hidden"),
|
|
128
|
+
children: [
|
|
129
|
+
"Show nested fields",
|
|
130
|
+
/* @__PURE__ */ e.jsx(Q, { size: 18, className: "ml-1.5" })
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
) }),
|
|
134
|
+
/* @__PURE__ */ e.jsxs(P, { children: [
|
|
127
135
|
s.type === "object" && /* @__PURE__ */ e.jsx("div", { className: "mt-2.5", children: /* @__PURE__ */ e.jsx(
|
|
128
|
-
|
|
136
|
+
j,
|
|
129
137
|
{
|
|
130
138
|
schema: s,
|
|
131
139
|
level: n + 1,
|
|
@@ -133,7 +141,7 @@ const P = (t, s) => t.reduce(
|
|
|
133
141
|
}
|
|
134
142
|
) }),
|
|
135
143
|
s.type === "array" && s.items.type === "object" && /* @__PURE__ */ e.jsx("div", { className: "mt-2.5", children: /* @__PURE__ */ e.jsx(
|
|
136
|
-
|
|
144
|
+
j,
|
|
137
145
|
{
|
|
138
146
|
schema: s.items,
|
|
139
147
|
defaultOpen: !0,
|
|
@@ -143,29 +151,28 @@ const P = (t, s) => t.reduce(
|
|
|
143
151
|
] })
|
|
144
152
|
] }) : null
|
|
145
153
|
]
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}, K = ({
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
}, U = ({
|
|
150
157
|
group: t,
|
|
151
158
|
properties: s,
|
|
152
159
|
nestingLevel: n,
|
|
153
160
|
required: a,
|
|
154
161
|
defaultOpen: d = !1
|
|
155
162
|
}) => {
|
|
156
|
-
const
|
|
163
|
+
const r = d || t === "required" || s.length === 1 || n === 0, [o, i] = D(r);
|
|
157
164
|
if (s.length !== 0)
|
|
158
165
|
return /* @__PURE__ */ e.jsxs(
|
|
159
|
-
|
|
166
|
+
C,
|
|
160
167
|
{
|
|
161
168
|
className: "CollapsibleRoot",
|
|
162
|
-
open:
|
|
163
|
-
onOpenChange:
|
|
169
|
+
open: o,
|
|
170
|
+
onOpenChange: i,
|
|
164
171
|
children: [
|
|
165
|
-
!
|
|
166
|
-
|
|
172
|
+
!o && /* @__PURE__ */ e.jsxs(
|
|
173
|
+
O,
|
|
167
174
|
{
|
|
168
|
-
className:
|
|
175
|
+
className: p(
|
|
169
176
|
"py-2 hover:bg-muted w-full",
|
|
170
177
|
t === "optional" && "font-semibold",
|
|
171
178
|
t === "deprecated" && "text-muted-foreground"
|
|
@@ -178,124 +185,133 @@ const P = (t, s) => t.reduce(
|
|
|
178
185
|
]
|
|
179
186
|
}
|
|
180
187
|
),
|
|
181
|
-
/* @__PURE__ */ e.jsx(
|
|
182
|
-
|
|
188
|
+
/* @__PURE__ */ e.jsx(P, { className: "divide-y divide-border", children: s.map(([l, c]) => /* @__PURE__ */ e.jsx(
|
|
189
|
+
S,
|
|
183
190
|
{
|
|
184
191
|
property: c,
|
|
185
|
-
propertyName:
|
|
192
|
+
propertyName: l,
|
|
186
193
|
nestingLevel: n,
|
|
187
|
-
isRequired: a.includes(
|
|
194
|
+
isRequired: a.includes(l)
|
|
188
195
|
},
|
|
189
|
-
|
|
196
|
+
l
|
|
190
197
|
)) })
|
|
191
198
|
]
|
|
192
199
|
}
|
|
193
200
|
);
|
|
194
|
-
},
|
|
195
|
-
|
|
201
|
+
}, h = p(
|
|
202
|
+
M,
|
|
196
203
|
"max-w-full prose-img:max-w-prose"
|
|
197
|
-
),
|
|
204
|
+
), j = ({
|
|
198
205
|
name: t,
|
|
199
206
|
schema: s,
|
|
200
207
|
level: n = 0,
|
|
201
208
|
defaultOpen: a = !1
|
|
202
209
|
}) => {
|
|
203
|
-
const d = Object.entries(s.properties ?? {}),
|
|
204
|
-
Array.isArray(
|
|
205
|
-
),
|
|
206
|
-
var
|
|
207
|
-
return c.deprecated ? "deprecated" : (
|
|
210
|
+
const d = Object.entries(s.properties ?? {}), r = typeof s.additionalProperties == "object" ? Object.entries(s.additionalProperties) : [], o = d.concat(
|
|
211
|
+
Array.isArray(r) ? r : []
|
|
212
|
+
), i = w(o, ([l, c]) => {
|
|
213
|
+
var g;
|
|
214
|
+
return c.deprecated ? "deprecated" : (g = s.required) != null && g.includes(l) ? "required" : "optional";
|
|
208
215
|
});
|
|
209
|
-
return /* @__PURE__ */ e.
|
|
216
|
+
return s.type === "array" ? /* @__PURE__ */ e.jsx(u, { className: "overflow-hidden", children: /* @__PURE__ */ e.jsx(
|
|
217
|
+
S,
|
|
218
|
+
{
|
|
219
|
+
propertyName: s.title ?? t,
|
|
220
|
+
isRequired: !0,
|
|
221
|
+
property: s,
|
|
222
|
+
defaultOpen: n === 0,
|
|
223
|
+
nestingLevel: n
|
|
224
|
+
}
|
|
225
|
+
) }) : /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2.5", children: [
|
|
210
226
|
(s.title ?? t) && /* @__PURE__ */ e.jsx("div", { className: "ml-2 my-1 font-bold", children: s.title ?? t }),
|
|
211
|
-
n === 0 && s.description && /* @__PURE__ */ e.jsx(m, { className:
|
|
212
|
-
/* @__PURE__ */ e.jsx(
|
|
213
|
-
|
|
227
|
+
n === 0 && s.description && /* @__PURE__ */ e.jsx(m, { className: h, content: s.description }),
|
|
228
|
+
/* @__PURE__ */ e.jsx(u, { className: "overflow-hidden", children: K(i).map(([l, c]) => /* @__PURE__ */ e.jsx(
|
|
229
|
+
U,
|
|
214
230
|
{
|
|
215
231
|
defaultOpen: a,
|
|
216
|
-
group:
|
|
232
|
+
group: l,
|
|
217
233
|
nestingLevel: n,
|
|
218
234
|
properties: c ?? [],
|
|
219
235
|
required: s.required ?? []
|
|
220
236
|
},
|
|
221
|
-
|
|
237
|
+
l
|
|
222
238
|
)) })
|
|
223
239
|
] });
|
|
224
|
-
},
|
|
240
|
+
}, Z = ["path", "query", "header", "cookie"], W = ({
|
|
225
241
|
operationFragment: t
|
|
226
242
|
}) => {
|
|
227
|
-
var d,
|
|
228
|
-
const s =
|
|
243
|
+
var d, r, o;
|
|
244
|
+
const s = _(X, t), n = w(
|
|
229
245
|
s.parameters ?? [],
|
|
230
|
-
(
|
|
246
|
+
(i) => i.in
|
|
231
247
|
), a = s.responses.at(0);
|
|
232
248
|
return /* @__PURE__ */ e.jsxs(
|
|
233
249
|
"div",
|
|
234
250
|
{
|
|
235
|
-
className: "grid grid-cols-1 lg:grid-cols-[4fr_3fr] gap-8 items-start border-b-2 mb-16 pb-16
|
|
251
|
+
className: "grid grid-cols-1 lg:grid-cols-[4fr_3fr] gap-8 items-start border-b-2 mb-16 pb-16",
|
|
236
252
|
children: [
|
|
237
253
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
238
254
|
/* @__PURE__ */ e.jsx(x, { level: 2, id: s.slug, registerSidebarAnchor: !0, children: s.summary }),
|
|
239
255
|
s.description && /* @__PURE__ */ e.jsx(
|
|
240
256
|
m,
|
|
241
257
|
{
|
|
242
|
-
className:
|
|
258
|
+
className: h,
|
|
243
259
|
content: s.description
|
|
244
260
|
}
|
|
245
261
|
),
|
|
246
|
-
s.parameters && s.parameters.length > 0 && /* @__PURE__ */ e.jsx(e.Fragment, { children:
|
|
247
|
-
(
|
|
248
|
-
var
|
|
249
|
-
return (
|
|
250
|
-
|
|
262
|
+
s.parameters && s.parameters.length > 0 && /* @__PURE__ */ e.jsx(e.Fragment, { children: Z.flatMap(
|
|
263
|
+
(i) => {
|
|
264
|
+
var l;
|
|
265
|
+
return (l = n[i]) != null && l.length ? /* @__PURE__ */ e.jsx(
|
|
266
|
+
J,
|
|
251
267
|
{
|
|
252
268
|
id: s.slug,
|
|
253
|
-
parameters: n[
|
|
254
|
-
group:
|
|
269
|
+
parameters: n[i],
|
|
270
|
+
group: i
|
|
255
271
|
},
|
|
256
|
-
|
|
272
|
+
i
|
|
257
273
|
) : [];
|
|
258
274
|
}
|
|
259
275
|
) }),
|
|
260
|
-
|
|
276
|
+
N((o = (r = (d = s.requestBody) == null ? void 0 : d.content) == null ? void 0 : r.at(0)) == null ? void 0 : o.schema, (i) => /* @__PURE__ */ e.jsxs("div", { className: "mt-4 flex flex-col gap-4", children: [
|
|
261
277
|
/* @__PURE__ */ e.jsx(x, { level: 3, className: "capitalize", children: "Request Body" }),
|
|
262
|
-
/* @__PURE__ */ e.jsx(
|
|
278
|
+
/* @__PURE__ */ e.jsx(j, { schema: i })
|
|
263
279
|
] })),
|
|
264
280
|
s.responses.length > 0 && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
265
281
|
/* @__PURE__ */ e.jsx(x, { level: 3, className: "capitalize mt-8 pt-8 border-t", children: "Responses" }),
|
|
266
|
-
/* @__PURE__ */ e.jsxs(
|
|
267
|
-
s.responses.length > 1 && /* @__PURE__ */ e.jsx(
|
|
268
|
-
|
|
282
|
+
/* @__PURE__ */ e.jsxs(I, { defaultValue: `${a == null ? void 0 : a.statusCode}${a == null ? void 0 : a.description}`, children: [
|
|
283
|
+
s.responses.length > 1 && /* @__PURE__ */ e.jsx(R, { children: s.responses.map((i) => /* @__PURE__ */ e.jsx(
|
|
284
|
+
T,
|
|
269
285
|
{
|
|
270
|
-
value:
|
|
271
|
-
title:
|
|
272
|
-
children:
|
|
286
|
+
value: i.statusCode + i.description,
|
|
287
|
+
title: i.description,
|
|
288
|
+
children: i.statusCode
|
|
273
289
|
},
|
|
274
|
-
|
|
290
|
+
i.statusCode
|
|
275
291
|
)) }),
|
|
276
|
-
/* @__PURE__ */ e.jsx("ul", { className: "list-none m-0 px-0 overflow-hidden", children: s.responses.map((
|
|
277
|
-
var
|
|
292
|
+
/* @__PURE__ */ e.jsx("ul", { className: "list-none m-0 px-0 overflow-hidden", children: s.responses.map((i) => {
|
|
293
|
+
var l;
|
|
278
294
|
return /* @__PURE__ */ e.jsx(
|
|
279
|
-
|
|
295
|
+
$,
|
|
280
296
|
{
|
|
281
|
-
value:
|
|
282
|
-
children:
|
|
283
|
-
(
|
|
284
|
-
(c) => /* @__PURE__ */ e.jsx(
|
|
285
|
-
) ?? /* @__PURE__ */ e.jsx(
|
|
297
|
+
value: i.statusCode + i.description,
|
|
298
|
+
children: N(
|
|
299
|
+
(l = i.content) == null ? void 0 : l.find((c) => c.schema),
|
|
300
|
+
(c) => /* @__PURE__ */ e.jsx(j, { schema: c.schema })
|
|
301
|
+
) ?? /* @__PURE__ */ e.jsx(u, { className: "font-mono text-sm p-4", children: "No response body" })
|
|
286
302
|
},
|
|
287
|
-
|
|
303
|
+
i.statusCode
|
|
288
304
|
);
|
|
289
305
|
}) })
|
|
290
306
|
] })
|
|
291
307
|
] })
|
|
292
308
|
] }),
|
|
293
|
-
/* @__PURE__ */ e.jsx(
|
|
309
|
+
/* @__PURE__ */ e.jsx(k, { operation: s })
|
|
294
310
|
]
|
|
295
311
|
},
|
|
296
312
|
s.operationId
|
|
297
313
|
);
|
|
298
|
-
},
|
|
314
|
+
}, X = v(
|
|
299
315
|
/* GraphQL */
|
|
300
316
|
`
|
|
301
317
|
fragment OperationsFragment on OperationItem {
|
|
@@ -346,7 +362,7 @@ const P = (t, s) => t.reduce(
|
|
|
346
362
|
}
|
|
347
363
|
}
|
|
348
364
|
`
|
|
349
|
-
),
|
|
365
|
+
), Y = v(
|
|
350
366
|
/* GraphQL */
|
|
351
367
|
`
|
|
352
368
|
query AllOperations($input: JSON!, $type: SchemaType!) {
|
|
@@ -366,67 +382,67 @@ const P = (t, s) => t.reduce(
|
|
|
366
382
|
}
|
|
367
383
|
}
|
|
368
384
|
`
|
|
369
|
-
),
|
|
385
|
+
), ee = { suspense: !0 }, ce = () => {
|
|
370
386
|
var d;
|
|
371
|
-
const { type: t, input: s } =
|
|
372
|
-
query:
|
|
387
|
+
const { type: t, input: s } = A(), [n] = E({
|
|
388
|
+
query: Y,
|
|
373
389
|
variables: { type: t, input: s },
|
|
374
|
-
context:
|
|
390
|
+
context: ee
|
|
375
391
|
}), a = (d = n.error) == null ? void 0 : d.graphQLErrors.at(0);
|
|
376
392
|
return a ? /* @__PURE__ */ e.jsx(
|
|
377
|
-
|
|
393
|
+
F,
|
|
378
394
|
{
|
|
379
395
|
category: "Error",
|
|
380
396
|
title: "Schema cannot be displayed",
|
|
381
397
|
message: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
382
|
-
/* @__PURE__ */ e.jsxs(
|
|
398
|
+
/* @__PURE__ */ e.jsxs(q, { className: "mb-4", children: [
|
|
383
399
|
"Check your configuration value ",
|
|
384
|
-
/* @__PURE__ */ e.jsx(
|
|
400
|
+
/* @__PURE__ */ e.jsx(b, { children: "apis.type" }),
|
|
385
401
|
" ",
|
|
386
402
|
"and ",
|
|
387
|
-
/* @__PURE__ */ e.jsx(
|
|
403
|
+
/* @__PURE__ */ e.jsx(b, { children: "apis.input" }),
|
|
388
404
|
" in the Zudoku config."
|
|
389
405
|
] }),
|
|
390
406
|
"An error occurred while trying to fetch the API reference:",
|
|
391
|
-
/* @__PURE__ */ e.jsx(
|
|
407
|
+
/* @__PURE__ */ e.jsx(z, { code: a.toString(), language: "plain" })
|
|
392
408
|
] })
|
|
393
409
|
}
|
|
394
410
|
) : n.data ? /* @__PURE__ */ e.jsxs("div", { className: "pt-[--padding-content-top]", children: [
|
|
395
411
|
/* @__PURE__ */ e.jsxs(
|
|
396
412
|
"div",
|
|
397
413
|
{
|
|
398
|
-
className:
|
|
399
|
-
|
|
414
|
+
className: p(
|
|
415
|
+
h,
|
|
400
416
|
"mb-16 max-w-full prose-img:max-w-prose"
|
|
401
417
|
),
|
|
402
418
|
children: [
|
|
403
|
-
/* @__PURE__ */ e.jsx(
|
|
419
|
+
/* @__PURE__ */ e.jsx(f, { children: "Overview" }),
|
|
404
420
|
/* @__PURE__ */ e.jsx(x, { level: 1, id: "description", registerSidebarAnchor: !0, children: n.data.schema.title }),
|
|
405
421
|
/* @__PURE__ */ e.jsx(m, { content: n.data.schema.description ?? "" })
|
|
406
422
|
]
|
|
407
423
|
}
|
|
408
424
|
),
|
|
409
|
-
n.data.schema.tags.filter((
|
|
410
|
-
|
|
411
|
-
|
|
425
|
+
n.data.schema.tags.filter((r) => r.operations.length > 0).map((r) => /* @__PURE__ */ e.jsxs("div", { children: [
|
|
426
|
+
r.name && /* @__PURE__ */ e.jsx(f, { children: r.name }),
|
|
427
|
+
r.description && /* @__PURE__ */ e.jsx(
|
|
412
428
|
m,
|
|
413
429
|
{
|
|
414
|
-
className: `${
|
|
415
|
-
content:
|
|
430
|
+
className: `${h} mt-2 mb-12`,
|
|
431
|
+
content: r.description
|
|
416
432
|
}
|
|
417
433
|
),
|
|
418
|
-
/* @__PURE__ */ e.jsx("div", { className: "operation mb-12", children: /* @__PURE__ */ e.jsx(
|
|
419
|
-
|
|
434
|
+
/* @__PURE__ */ e.jsx("div", { className: "operation mb-12", children: /* @__PURE__ */ e.jsx(B, { children: r.operations.map((o) => /* @__PURE__ */ e.jsx(
|
|
435
|
+
W,
|
|
420
436
|
{
|
|
421
|
-
operationFragment:
|
|
437
|
+
operationFragment: o
|
|
422
438
|
},
|
|
423
|
-
|
|
439
|
+
o.slug
|
|
424
440
|
)) }) })
|
|
425
|
-
] },
|
|
441
|
+
] }, r.name))
|
|
426
442
|
] }) : null;
|
|
427
443
|
};
|
|
428
444
|
export {
|
|
429
|
-
|
|
430
|
-
|
|
445
|
+
ce as OperationList,
|
|
446
|
+
X as OperationsFragment
|
|
431
447
|
};
|
|
432
|
-
//# sourceMappingURL=OperationList-
|
|
448
|
+
//# sourceMappingURL=OperationList-CMH3DPpj.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OperationList-CMH3DPpj.js","sources":["../../../node_modules/.pnpm/lucide-react@0.378.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/list-plus.js","../src/lib/plugins/openapi/graphql/fragment-masking.ts","../src/lib/util/groupBy.ts","../src/lib/util/renderIf.ts","../src/lib/plugins/openapi/ParameterListItem.tsx","../src/lib/plugins/openapi/ParameterList.tsx","../src/lib/util/objectEntries.ts","../src/lib/plugins/openapi/SchemaListViewItem.tsx","../src/lib/plugins/openapi/SchemaListViewItemGroup.tsx","../src/lib/plugins/openapi/util/prose.ts","../src/lib/plugins/openapi/SchemaListView.tsx","../src/lib/plugins/openapi/OperationListItem.tsx","../src/lib/plugins/openapi/OperationList.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.378.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst ListPlus = createLucideIcon(\"ListPlus\", [\n [\"path\", { d: \"M11 12H3\", key: \"51ecnj\" }],\n [\"path\", { d: \"M16 6H3\", key: \"1wxfjs\" }],\n [\"path\", { d: \"M16 18H3\", key: \"12xzn7\" }],\n [\"path\", { d: \"M18 9v6\", key: \"1twb98\" }],\n [\"path\", { d: \"M21 12h-6\", key: \"bt1uis\" }]\n]);\n\nexport { ListPlus as default };\n//# sourceMappingURL=list-plus.js.map\n","/* eslint-disable */\nimport type {\n DocumentTypeDecoration,\n ResultOf,\n TypedDocumentNode,\n} from \"@graphql-typed-document-node/core\";\nimport type { FragmentDefinitionNode } from \"graphql\";\nimport type { Incremental } from \"./graphql.js\";\n\nexport type FragmentType<\n TDocumentType extends DocumentTypeDecoration<any, any>,\n> =\n TDocumentType extends DocumentTypeDecoration<infer TType, any>\n ? [TType] extends [{ \" $fragmentName\"?: infer TKey }]\n ? TKey extends string\n ? { \" $fragmentRefs\"?: { [key in TKey]: TType } }\n : never\n : never\n : never;\n\n// return non-nullable if `fragmentType` is non-nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: FragmentType<DocumentTypeDecoration<TType, any>>,\n): TType;\n// return nullable if `fragmentType` is undefined\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | undefined,\n): TType | undefined;\n// return nullable if `fragmentType` is nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | null,\n): TType | null;\n// return nullable if `fragmentType` is nullable or undefined\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType:\n | FragmentType<DocumentTypeDecoration<TType, any>>\n | null\n | undefined,\n): TType | null | undefined;\n// return array of non-nullable if `fragmentType` is array of non-nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: Array<FragmentType<DocumentTypeDecoration<TType, any>>>,\n): Array<TType>;\n// return array of nullable if `fragmentType` is array of nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType:\n | Array<FragmentType<DocumentTypeDecoration<TType, any>>>\n | null\n | undefined,\n): Array<TType> | null | undefined;\n// return readonly array of non-nullable if `fragmentType` is array of non-nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>,\n): ReadonlyArray<TType>;\n// return readonly array of nullable if `fragmentType` is array of nullable\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType:\n | ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>\n | null\n | undefined,\n): ReadonlyArray<TType> | null | undefined;\nexport function useFragment<TType>(\n _documentNode: DocumentTypeDecoration<TType, any>,\n fragmentType:\n | FragmentType<DocumentTypeDecoration<TType, any>>\n | Array<FragmentType<DocumentTypeDecoration<TType, any>>>\n | ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>\n | null\n | undefined,\n): TType | Array<TType> | ReadonlyArray<TType> | null | undefined {\n return fragmentType as any;\n}\n\nexport function makeFragmentData<\n F extends DocumentTypeDecoration<any, any>,\n FT extends ResultOf<F>,\n>(data: FT, _fragment: F): FragmentType<F> {\n return data as FragmentType<F>;\n}\nexport function isFragmentReady<TQuery, TFrag>(\n queryNode: DocumentTypeDecoration<TQuery, any>,\n fragmentNode: TypedDocumentNode<TFrag>,\n data:\n | FragmentType<TypedDocumentNode<Incremental<TFrag>, any>>\n | null\n | undefined,\n): data is FragmentType<typeof fragmentNode> {\n const deferredFields = (\n queryNode as {\n __meta__?: { deferredFields: Record<string, (keyof TFrag)[]> };\n }\n ).__meta__?.deferredFields;\n\n if (!deferredFields) return true;\n\n const fragDef = fragmentNode.definitions[0] as\n | FragmentDefinitionNode\n | undefined;\n const fragName = fragDef?.name?.value;\n\n const fields = (fragName && deferredFields[fragName]) || [];\n return fields.length > 0 && fields.every((field) => data && field in data);\n}\n","export const groupBy = <\n T extends Record<PropertyKey, any>,\n KeySelector extends (item: T) => PropertyKey,\n>(\n arr: T[],\n keySelector: KeySelector,\n): Partial<Record<ReturnType<KeySelector>, T[]>> => {\n return arr.reduce(\n (accumulator, val) => {\n const groupedKey = keySelector(val) as ReturnType<KeySelector>;\n if (!accumulator[groupedKey]) {\n accumulator[groupedKey] = [];\n }\n accumulator[groupedKey].push(val);\n return accumulator;\n },\n {} as Record<ReturnType<KeySelector>, T[]>,\n );\n};\n","export const renderIf = <G, R>(\n variable: G | undefined | null,\n callback: (variable: G) => R,\n): R | undefined => (variable ? callback(variable) : undefined);\n","import { Markdown } from \"../../components/Markdown.js\";\nimport { type SchemaObject } from \"../../oas/graphql/index.js\";\nimport { ColorizedParam } from \"./ColorizedParam.js\";\nimport type { OperationListItemResult } from \"./OperationList.js\";\nimport type { ParameterGroup } from \"./OperationListItem.js\";\n\nconst getParameterSchema = (\n parameter: ParameterListItemResult,\n): SchemaObject => {\n if (parameter.schema != null && typeof parameter.schema === \"object\") {\n return parameter.schema;\n }\n return {\n type: \"string\",\n };\n};\n\nexport type ParameterListItemResult = NonNullable<\n OperationListItemResult[\"parameters\"]\n>[number];\n\nexport const ParameterListItem = ({\n parameter,\n group,\n id,\n}: {\n parameter: ParameterListItemResult;\n group: ParameterGroup;\n id: string;\n}) => (\n <li className=\"p-4 bg-border/20 text-sm flex flex-col gap-1\">\n <div className=\"flex items-center gap-2\">\n <code>\n {group === \"path\" ? (\n <ColorizedParam\n name={parameter.name}\n backgroundOpacity=\"15%\"\n slug={id + \"-\" + parameter.name.toLocaleLowerCase()}\n />\n ) : (\n parameter.name\n )}\n </code>\n {parameter.required && (\n <span className=\"py-px px-1.5 font-medium bg-primary/75 text-muted rounded-lg\">\n required\n </span>\n )}\n {getParameterSchema(parameter).type && (\n <span className=\"text-muted-foreground\">\n {getParameterSchema(parameter).type}\n </span>\n )}\n </div>\n {parameter.description && (\n <Markdown\n content={parameter.description}\n className=\"text-sm prose-p:my-1\"\n />\n )}\n </li>\n);\n","import { Heading } from \"../../components/Heading.js\";\nimport { Card } from \"../../ui/Card.js\";\nimport type { ParameterGroup } from \"./OperationListItem.js\";\nimport {\n ParameterListItem,\n type ParameterListItemResult,\n} from \"./ParameterListItem.js\";\n\nexport const ParameterList = ({\n group,\n parameters,\n id,\n}: {\n group: ParameterGroup;\n parameters: ParameterListItemResult[];\n id: string;\n}) => (\n <>\n <Heading level={3} id={`${id}/${group}-parameters`} className=\"capitalize\">\n {group === \"header\" ? \"Headers\" : `${group} Parameters`}\n </Heading>\n <Card>\n <ul className=\"list-none m-0 px-0 divide-y \">\n {parameters.map((parameter) => (\n <ParameterListItem\n key={`${parameter.name}-${parameter.in}`}\n parameter={parameter}\n id={id}\n group={group}\n />\n ))}\n </ul>\n </Card>\n </>\n);\n","type ValueOf<T> = T[keyof T];\ntype Entries<T> = [keyof T, ValueOf<T>][];\n\nexport const objectEntries = <T extends object>(obj: T): Entries<T> =>\n Object.entries(obj) as Entries<T>;\n","import * as Collapsible from \"@radix-ui/react-collapsible\";\nimport { ListPlusIcon } from \"lucide-react\";\nimport { Markdown } from \"../../components/Markdown.js\";\nimport { SchemaObject } from \"../../oas/parser/index.js\";\nimport { Button } from \"../../ui/Button.js\";\nimport { cn } from \"../../util/cn.js\";\nimport { SchemaListView } from \"./SchemaListView.js\";\n\nexport const SchemaListViewItem = ({\n propertyName,\n property,\n nestingLevel,\n isRequired,\n defaultOpen = false,\n}: {\n propertyName?: string;\n isRequired: boolean;\n property: SchemaObject;\n nestingLevel: number;\n defaultOpen?: boolean;\n}) => {\n if (!property) {\n return <div>no property</div>;\n }\n\n const title =\n propertyName || property.title\n ? [propertyName, property.title].filter(Boolean).join(\" \")\n : null;\n\n return (\n <div\n className={cn(\n \"p-4 bg-border/20 hover:bg-border/30 flex gap-1 flex-col text-sm\",\n property.deprecated && \"opacity-50\",\n )}\n >\n <div className=\"flex items-center gap-2 relative\">\n {title && <code>{title}</code>}\n\n {property.type && (\n <span className=\"text-muted-foreground\">{property.type}</span>\n )}\n {property.deprecated && (\n <span className=\"text-muted-foreground\">Deprecated</span>\n )}\n {!isRequired && (\n <span className=\"py-px px-1.5 font-medium border rounded-lg\">\n optional {property.required}\n </span>\n )}\n </div>\n {property.description && (\n <Markdown\n content={property.description}\n className=\"text-sm leading-normal line-clamp-4 \"\n />\n )}\n\n {property.enum && (\n <span className=\"text-sm text-muted-foreground flex gap-1 flex-wrap items-center\">\n <span>Possible values</span>\n {/* Make values unique, some schemas have duplicates */}\n {[...new Set(property.enum.filter((value) => value))]\n .map((value) => (\n <span\n key={value}\n className=\"font-mono text-xs border bg-muted rounded px-1\"\n >\n {value}\n </span>\n ))\n .slice(0, 4)}\n {property.enum.length > 4 && (\n <span className=\"font-mono text-xs border bg-muted rounded px-1\">\n ...\n </span>\n )}\n </span>\n )}\n\n {(property.type === \"object\" &&\n (property.properties?.length ??\n Object.entries(property.additionalProperties ?? {}).length > 0)) ||\n (property.type === \"array\" &&\n // this check is needed because the `items` can be undefined despite the type being defined\n typeof property.items !== \"undefined\" &&\n property.items.type === \"object\") ? (\n <Collapsible.Root className=\"CollapsibleRoot\" defaultOpen={defaultOpen}>\n <Collapsible.Trigger asChild>\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className={cn(defaultOpen && \"hidden\")}\n >\n Show nested fields\n <ListPlusIcon size={18} className=\"ml-1.5\" />\n </Button>\n </Collapsible.Trigger>\n\n <Collapsible.Content>\n {property.type === \"object\" && (\n <div className=\"mt-2.5\">\n <SchemaListView\n schema={property}\n level={nestingLevel + 1}\n defaultOpen\n />\n </div>\n )}\n {property.type === \"array\" && property.items.type === \"object\" && (\n <div className=\"mt-2.5\">\n <SchemaListView\n schema={property.items}\n defaultOpen\n level={nestingLevel + 1}\n />\n </div>\n )}\n </Collapsible.Content>\n </Collapsible.Root>\n ) : null}\n </div>\n );\n};\n","import * as Collapsible from \"@radix-ui/react-collapsible\";\nimport { useState } from \"react\";\nimport { SchemaObject } from \"../../oas/parser/index.js\";\nimport { cn } from \"../../util/cn.js\";\nimport { SchemaListViewItem } from \"./SchemaListViewItem.js\";\n\nexport const SchemaListViewItemGroup = ({\n group,\n properties,\n nestingLevel,\n required,\n defaultOpen = false,\n}: {\n group: \"optional\" | \"required\" | \"deprecated\";\n defaultOpen?: boolean;\n properties: [string, SchemaObject][];\n nestingLevel: number;\n required: string[];\n}) => {\n const notCollapsible =\n defaultOpen ||\n group === \"required\" ||\n properties.length === 1 ||\n nestingLevel === 0;\n\n const [open, setOpen] = useState(notCollapsible);\n\n if (properties.length === 0) {\n return;\n }\n\n return (\n <Collapsible.Root\n className=\"CollapsibleRoot\"\n open={open}\n onOpenChange={setOpen}\n >\n {!open && (\n <Collapsible.Trigger\n className={cn(\n \"py-2 hover:bg-muted w-full\",\n group === \"optional\" && \"font-semibold\",\n group === \"deprecated\" && \"text-muted-foreground\",\n )}\n >\n {properties.length} {group} fields\n </Collapsible.Trigger>\n )}\n\n <Collapsible.Content className=\"divide-y divide-border\">\n {properties.map(([propertyName, property]) => (\n <SchemaListViewItem\n key={propertyName}\n property={property}\n propertyName={propertyName}\n nestingLevel={nestingLevel}\n isRequired={required.includes(propertyName)}\n />\n ))}\n </Collapsible.Content>\n </Collapsible.Root>\n );\n};\n","import { ProseClasses } from \"../../../components/Markdown.js\";\nimport { cn } from \"../../../util/cn.js\";\n\nexport const SchemaProseClasses = cn(\n ProseClasses,\n \"max-w-full prose-img:max-w-prose\",\n);\n","import { Markdown } from \"../../components/Markdown.js\";\nimport { SchemaObject } from \"../../oas/parser/index.js\";\nimport { Card } from \"../../ui/Card.js\";\nimport { groupBy } from \"../../util/groupBy.js\";\nimport { objectEntries } from \"../../util/objectEntries.js\";\nimport { SchemaListViewItem } from \"./SchemaListViewItem.js\";\nimport { SchemaListViewItemGroup } from \"./SchemaListViewItemGroup.js\";\nimport { SchemaProseClasses } from \"./util/prose.js\";\n\nexport const SchemaListView = ({\n name,\n schema,\n level = 0,\n defaultOpen = false,\n}: {\n level?: number;\n defaultOpen?: boolean;\n name?: string;\n schema: SchemaObject;\n}) => {\n const properties = Object.entries(schema.properties ?? {});\n const additionalProperties =\n typeof schema.additionalProperties === \"object\"\n ? Object.entries(schema.additionalProperties)\n : [];\n\n const combinedProperties = properties.concat(\n Array.isArray(additionalProperties) ? additionalProperties : [],\n );\n\n const groups = groupBy(combinedProperties, ([propertyName, property]) => {\n return property.deprecated\n ? \"deprecated\"\n : schema.required?.includes(propertyName)\n ? \"required\"\n : \"optional\";\n });\n\n if (schema.type === \"array\") {\n return (\n <Card className=\"overflow-hidden\">\n <SchemaListViewItem\n propertyName={schema.title ?? name}\n isRequired={true}\n property={schema}\n defaultOpen={level === 0}\n nestingLevel={level}\n />\n </Card>\n );\n }\n\n return (\n <div className=\"flex flex-col gap-2.5\">\n {(schema.title ?? name) && (\n <div className=\"ml-2 my-1 font-bold\">{schema.title ?? name}</div>\n )}\n {level === 0 && schema.description && (\n <Markdown className={SchemaProseClasses} content={schema.description} />\n )}\n <Card className=\"overflow-hidden\">\n {objectEntries(groups).map(([group, properties]) => (\n <SchemaListViewItemGroup\n key={group}\n defaultOpen={defaultOpen}\n group={group}\n nestingLevel={level}\n properties={properties ?? []}\n required={schema.required ?? []}\n />\n ))}\n </Card>\n </div>\n );\n};\n","import { Heading } from \"../../components/Heading.js\";\nimport { Markdown } from \"../../components/Markdown.js\";\nimport { Card } from \"../../ui/Card.js\";\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from \"../../ui/Tabs.js\";\nimport { groupBy } from \"../../util/groupBy.js\";\nimport { renderIf } from \"../../util/renderIf.js\";\nimport { OperationsFragment } from \"./OperationList.js\";\nimport { ParameterList } from \"./ParameterList.js\";\nimport { SchemaListView } from \"./SchemaListView.js\";\nimport { Sidecar } from \"./Sidecar.js\";\nimport { FragmentType, useFragment } from \"./graphql/index.js\";\nimport { SchemaProseClasses } from \"./util/prose.js\";\n\nexport const PARAM_GROUPS = [\"path\", \"query\", \"header\", \"cookie\"] as const;\nexport type ParameterGroup = (typeof PARAM_GROUPS)[number];\n\nexport const OperationListItem = ({\n operationFragment,\n}: {\n operationFragment: FragmentType<typeof OperationsFragment>;\n}) => {\n const operation = useFragment(OperationsFragment, operationFragment);\n const groupedParameters = groupBy(\n operation.parameters ?? [],\n (param) => param.in,\n );\n\n const first = operation.responses.at(0);\n return (\n <div\n key={operation.operationId}\n className=\"grid grid-cols-1 lg:grid-cols-[4fr_3fr] gap-8 items-start border-b-2 mb-16 pb-16\"\n >\n <div className=\"flex flex-col gap-4\">\n <Heading level={2} id={operation.slug} registerSidebarAnchor>\n {operation.summary}\n </Heading>\n {operation.description && (\n <Markdown\n className={SchemaProseClasses}\n content={operation.description}\n />\n )}\n {operation.parameters && operation.parameters.length > 0 && (\n <>\n {PARAM_GROUPS.flatMap((group) =>\n groupedParameters[group]?.length ? (\n <ParameterList\n key={group}\n id={operation.slug}\n parameters={groupedParameters[group]}\n group={group}\n />\n ) : (\n []\n ),\n )}\n </>\n )}\n {renderIf(operation.requestBody?.content?.at(0)?.schema, (schema) => (\n <div className=\"mt-4 flex flex-col gap-4\">\n <Heading level={3} className=\"capitalize\">\n Request Body\n </Heading>\n <SchemaListView schema={schema} />\n </div>\n ))}\n {operation.responses.length > 0 && (\n <>\n <Heading level={3} className=\"capitalize mt-8 pt-8 border-t\">\n Responses\n </Heading>\n <Tabs defaultValue={`${first?.statusCode}${first?.description}`}>\n {operation.responses.length > 1 && (\n <TabsList>\n {operation.responses.map((response) => (\n <TabsTrigger\n value={response.statusCode + response.description}\n key={response.statusCode}\n title={response.description}\n >\n {response.statusCode}\n </TabsTrigger>\n ))}\n </TabsList>\n )}\n <ul className=\"list-none m-0 px-0 overflow-hidden\">\n {operation.responses.map((response) => (\n <TabsContent\n value={response.statusCode + response.description}\n key={response.statusCode}\n >\n {renderIf(\n response.content?.find((content) => content.schema),\n (content) => {\n return <SchemaListView schema={content.schema} />;\n },\n ) ?? (\n <Card className=\"font-mono text-sm p-4\">\n No response body\n </Card>\n )}\n </TabsContent>\n ))}\n </ul>\n </Tabs>\n </>\n )}\n </div>\n\n <Sidecar operation={operation} />\n </div>\n );\n};\n","import { ResultOf } from \"@graphql-typed-document-node/core\";\nimport { CategoryHeading } from \"../../components/CategoryHeading.js\";\nimport { DeveloperHint } from \"../../components/DeveloperHint.js\";\nimport { ErrorPage } from \"../../components/ErrorPage.js\";\nimport { Heading } from \"../../components/Heading.js\";\nimport { InlineCode } from \"../../components/InlineCode.js\";\nimport { Markdown } from \"../../components/Markdown.js\";\nimport { SyntaxHighlight } from \"../../components/SyntaxHighlight.js\";\nimport { cn } from \"../../util/cn.js\";\nimport { OperationListItem } from \"./OperationListItem.js\";\nimport StaggeredRender from \"./StaggeredRender.js\";\nimport { useOasConfig } from \"./context.js\";\nimport { graphql } from \"./graphql/index.js\";\nimport { SchemaProseClasses } from \"./util/prose.js\";\nimport { useQuery } from \"./util/urql.js\";\n\nexport const OperationsFragment = graphql(/* GraphQL */ `\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n`);\n\nexport type OperationListItemResult = ResultOf<typeof OperationsFragment>;\n\nconst AllOperationsQuery = graphql(/* GraphQL */ `\n query AllOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n description\n title\n url\n version\n tags {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n }\n }\n }\n`);\n\nconst suspenseContext = { suspense: true };\n\nexport const OperationList = () => {\n const { type, input } = useOasConfig();\n\n const [result] = useQuery({\n query: AllOperationsQuery,\n variables: { type, input },\n context: suspenseContext,\n });\n\n const error = result.error?.graphQLErrors.at(0);\n\n // Looks like there is no Suspense level error handling (yet)?\n // So we handle the error case in the component directly\n if (error) {\n return (\n <ErrorPage\n category=\"Error\"\n title=\"Schema cannot be displayed\"\n message={\n <>\n <DeveloperHint className=\"mb-4\">\n Check your configuration value <InlineCode>apis.type</InlineCode>{\" \"}\n and <InlineCode>apis.input</InlineCode> in the Zudoku config.\n </DeveloperHint>\n An error occurred while trying to fetch the API reference:\n <SyntaxHighlight code={error.toString()} language=\"plain\" />\n </>\n }\n />\n );\n }\n\n if (!result.data) return null;\n\n return (\n <div className=\"pt-[--padding-content-top]\">\n <div\n className={cn(\n SchemaProseClasses,\n \"mb-16 max-w-full prose-img:max-w-prose\",\n )}\n >\n <CategoryHeading>Overview</CategoryHeading>\n <Heading level={1} id=\"description\" registerSidebarAnchor>\n {result.data.schema.title}\n </Heading>\n <Markdown content={result.data.schema.description ?? \"\"} />\n </div>\n {result.data.schema.tags\n .filter((tag) => tag.operations.length > 0)\n .map((tag) => (\n <div key={tag.name}>\n {tag.name && <CategoryHeading>{tag.name}</CategoryHeading>}\n {tag.description && (\n <Markdown\n className={`${SchemaProseClasses} mt-2 mb-12`}\n content={tag.description}\n />\n )}\n <div className=\"operation mb-12\">\n <StaggeredRender>\n {tag.operations.map((fragment) => (\n <OperationListItem\n key={fragment.slug}\n operationFragment={fragment}\n />\n ))}\n </StaggeredRender>\n </div>\n </div>\n ))}\n </div>\n );\n};\n"],"names":["ListPlus","createLucideIcon","useFragment","_documentNode","fragmentType","groupBy","arr","keySelector","accumulator","val","groupedKey","renderIf","variable","callback","getParameterSchema","parameter","ParameterListItem","group","id","jsxs","jsx","ColorizedParam","Markdown","ParameterList","parameters","Fragment","Heading","Card","objectEntries","obj","SchemaListViewItem","propertyName","property","nestingLevel","isRequired","defaultOpen","title","cn","value","_a","Collapsible.Root","Collapsible.Trigger","Button","ListPlusIcon","Collapsible.Content","SchemaListView","SchemaListViewItemGroup","properties","required","notCollapsible","open","setOpen","useState","SchemaProseClasses","ProseClasses","name","schema","level","additionalProperties","combinedProperties","groups","PARAM_GROUPS","OperationListItem","operationFragment","operation","OperationsFragment","groupedParameters","param","first","_c","_b","Tabs","TabsList","response","TabsTrigger","TabsContent","content","Sidecar","graphql","AllOperationsQuery","suspenseContext","OperationList","type","input","useOasConfig","result","useQuery","error","ErrorPage","DeveloperHint","InlineCode","SyntaxHighlight","CategoryHeading","tag","StaggeredRender","fragment"],"mappings":";;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAWC,EAAiB,YAAY;AAAA,EAC5C,CAAC,QAAQ,EAAE,GAAG,YAAY,KAAK,SAAQ,CAAE;AAAA,EACzC,CAAC,QAAQ,EAAE,GAAG,WAAW,KAAK,SAAQ,CAAE;AAAA,EACxC,CAAC,QAAQ,EAAE,GAAG,YAAY,KAAK,SAAQ,CAAE;AAAA,EACzC,CAAC,QAAQ,EAAE,GAAG,WAAW,KAAK,SAAQ,CAAE;AAAA,EACxC,CAAC,QAAQ,EAAE,GAAG,aAAa,KAAK,SAAQ,CAAE;AAC5C,CAAC;ACsDe,SAAAC,EACdC,GACAC,GAMgE;AACzD,SAAAA;AACT;AC/Ea,MAAAC,IAAU,CAIrBC,GACAC,MAEOD,EAAI;AAAA,EACT,CAACE,GAAaC,MAAQ;AACd,UAAAC,IAAaH,EAAYE,CAAG;AAC9B,WAACD,EAAYE,CAAU,MACbF,EAAAE,CAAU,IAAI,KAEhBF,EAAAE,CAAU,EAAE,KAAKD,CAAG,GACzBD;AAAA,EACT;AAAA,EACA,CAAC;AAAA,GChBQG,IAAW,CACtBC,GACAC,MACmBD,IAAWC,EAASD,CAAQ,IAAI,QCG/CE,IAAqB,CACzBC,MAEIA,EAAU,UAAU,QAAQ,OAAOA,EAAU,UAAW,WACnDA,EAAU,SAEZ;AAAA,EACL,MAAM;AAAA,GAQGC,IAAoB,CAAC;AAAA,EAChC,WAAAD;AAAA,EACA,OAAAE;AAAA,EACA,IAAAC;AACF,MAKEC,gBAAAA,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A,QAAA;AAAA,MAAA;AAAA,IAC3D;AAAA,IACCA,EAAO,KAAK,OAAO,KACjB,OAAO,CAACQ,MAAQA,EAAI,WAAW,SAAS,CAAC,EACzC,IAAI,CAACA,6BACH,OACE,EAAA,UAAA;AAAA,MAAAA,EAAI,QAAQzE,gBAAAA,MAACwE,GAAiB,EAAA,UAAAC,EAAI,MAAK;AAAA,MACvCA,EAAI,eACHzE,gBAAAA,EAAA;AAAA,QAACE;AAAA,QAAA;AAAA,UACC,WAAW,GAAG+B,CAAkB;AAAA,UAChC,SAASwC,EAAI;AAAA,QAAA;AAAA,MACf;AAAA,MAEFzE,gBAAAA,EAAAA,IAAC,OAAI,EAAA,WAAU,mBACb,UAAAA,gBAAAA,EAAA,IAAC0E,KACE,UAAID,EAAA,WAAW,IAAI,CAACE,MACnB3E,gBAAAA,EAAA;AAAA,QAAC0C;AAAA,QAAA;AAAA,UAEC,mBAAmBiC;AAAA,QAAA;AAAA,QADdA,EAAS;AAAA,MAAA,CAGjB,GACH,EACF,CAAA;AAAA,IAAA,KAjBQF,EAAI,IAkBd,CACD;AAAA,EACL,EAAA,CAAA,IAvCuB;AAyC3B;","x_google_ignoreList":[0]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as r } from "./jsx-runtime-B6kdoens.js";
|
|
2
|
-
import { O as i } from "./index-
|
|
2
|
+
import { O as i } from "./index-DUrF63A6.js";
|
|
3
3
|
import { P as t } from "./urql-DrBfkb92.js";
|
|
4
4
|
import { O as s } from "./index-7kcHaXD6.js";
|
|
5
5
|
function u({
|
|
@@ -11,4 +11,4 @@ function u({
|
|
|
11
11
|
export {
|
|
12
12
|
u as OpenApiRoute
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=Route-
|
|
14
|
+
//# sourceMappingURL=Route-CwXfyIUw.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Route-
|
|
1
|
+
{"version":3,"file":"Route-CwXfyIUw.js","sources":["../src/lib/plugins/openapi/Route.tsx"],"sourcesContent":["import { Outlet } from \"react-router-dom\";\nimport { OasConfigProvider } from \"./context.js\";\nimport { OasPluginConfig } from \"./interfaces.js\";\n\nimport { Provider, Client as UrqlClient } from \"./util/urql.js\";\n\nexport function OpenApiRoute({\n config,\n client,\n}: {\n config: OasPluginConfig;\n client: typeof UrqlClient;\n}) {\n return (\n <Provider value={client}>\n <OasConfigProvider value={{ config }}>\n <Outlet />\n </OasConfigProvider>\n </Provider>\n );\n}\n"],"names":["OpenApiRoute","config","client","jsx","Provider","OasConfigProvider","Outlet"],"mappings":";;;;AAMO,SAASA,EAAa;AAAA,EAC3B,QAAAC;AAAA,EACA,QAAAC;AACF,GAGG;AACD,SACGC,gBAAAA,EAAAA,IAAAC,GAAA,EAAS,OAAOF,GACf,UAACC,gBAAAA,EAAA,IAAAE,GAAA,EAAkB,OAAO,EAAE,QAAAJ,EAAO,GACjC,UAACE,gBAAAA,EAAA,IAAAG,GAAA,EAAO,GACV,EACF,CAAA;AAEJ;"}
|