zudoku 0.3.1-dev.5 → 0.3.1-dev.6

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