zudoku 0.7.2-dev.12 → 0.7.2-dev.13

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