zudoku 0.10.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/README.md +121 -0
  2. package/dist/config/config.d.ts +2 -6
  3. package/dist/config/validators/InputSidebarSchema.d.ts +1 -0
  4. package/dist/config/validators/validate.d.ts +151 -37
  5. package/dist/config/validators/validate.js +14 -11
  6. package/dist/config/validators/validate.js.map +1 -1
  7. package/dist/index.d.ts +1 -1
  8. package/dist/lib/authentication/state.d.ts +16 -0
  9. package/dist/lib/authentication/state.js +5 -0
  10. package/dist/lib/authentication/state.js.map +1 -1
  11. package/dist/lib/components/ErrorPage.js +1 -2
  12. package/dist/lib/components/ErrorPage.js.map +1 -1
  13. package/dist/lib/components/InlineCode.d.ts +2 -1
  14. package/dist/lib/components/InlineCode.js +9 -1
  15. package/dist/lib/components/InlineCode.js.map +1 -1
  16. package/dist/lib/components/Layout.js +1 -1
  17. package/dist/lib/components/Layout.js.map +1 -1
  18. package/dist/lib/oas/graphql/index.d.ts +2 -1
  19. package/dist/lib/oas/graphql/index.js +22 -10
  20. package/dist/lib/oas/graphql/index.js.map +1 -1
  21. package/dist/lib/oas/parser/index.d.ts +1 -0
  22. package/dist/lib/oas/parser/index.js.map +1 -1
  23. package/dist/lib/plugins/markdown/MdxPage.js +2 -2
  24. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  25. package/dist/lib/plugins/markdown/generateRoutes.d.ts +1 -1
  26. package/dist/lib/plugins/markdown/generateRoutes.js +8 -6
  27. package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -1
  28. package/dist/lib/plugins/markdown/index.d.ts +2 -1
  29. package/dist/lib/plugins/markdown/index.js +2 -2
  30. package/dist/lib/plugins/markdown/index.js.map +1 -1
  31. package/dist/lib/plugins/openapi/Endpoint.d.ts +1 -3
  32. package/dist/lib/plugins/openapi/Endpoint.js +46 -8
  33. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  34. package/dist/lib/plugins/openapi/OperationList.js +1 -1
  35. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  36. package/dist/lib/plugins/openapi/OperationListItem.js +1 -1
  37. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  38. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +2 -1
  39. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +2 -2
  40. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
  41. package/dist/lib/plugins/openapi/Sidecar.js +14 -3
  42. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  43. package/dist/lib/plugins/openapi/SimpleSelect.d.ts +2 -1
  44. package/dist/lib/plugins/openapi/SimpleSelect.js +1 -1
  45. package/dist/lib/plugins/openapi/SimpleSelect.js.map +1 -1
  46. package/dist/lib/plugins/openapi/graphql/gql.d.ts +10 -2
  47. package/dist/lib/plugins/openapi/graphql/gql.js +2 -1
  48. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  49. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +29 -3
  50. package/dist/lib/plugins/openapi/graphql/graphql.js +87 -0
  51. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  52. package/dist/lib/plugins/openapi/interfaces.d.ts +3 -0
  53. package/dist/lib/plugins/openapi/playground/Playground.d.ts +2 -1
  54. package/dist/lib/plugins/openapi/playground/Playground.js +13 -5
  55. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  56. package/dist/lib/plugins/openapi/playground/ResponseTab.js +1 -1
  57. package/dist/lib/plugins/openapi/playground/ResponseTab.js.map +1 -1
  58. package/dist/lib/plugins/openapi/playground/createUrl.js +3 -1
  59. package/dist/lib/plugins/openapi/playground/createUrl.js.map +1 -1
  60. package/dist/vite/config.d.ts +1 -1
  61. package/dist/vite/config.js +19 -15
  62. package/dist/vite/config.js.map +1 -1
  63. package/dist/vite/dev-server.d.ts +1 -0
  64. package/dist/vite/dev-server.js +7 -13
  65. package/dist/vite/dev-server.js.map +1 -1
  66. package/dist/vite/plugin-api.js +4 -7
  67. package/dist/vite/plugin-api.js.map +1 -1
  68. package/dist/vite/plugin-config-reload.js +9 -4
  69. package/dist/vite/plugin-config-reload.js.map +1 -1
  70. package/dist/vite/plugin-docs.js +7 -5
  71. package/dist/vite/plugin-docs.js.map +1 -1
  72. package/dist/vite/plugin-frontmatter.d.ts +2 -0
  73. package/dist/vite/plugin-frontmatter.js +30 -0
  74. package/dist/vite/plugin-frontmatter.js.map +1 -0
  75. package/dist/vite/plugin-sidebar.js +14 -1
  76. package/dist/vite/plugin-sidebar.js.map +1 -1
  77. package/dist/vite/plugin.js +2 -2
  78. package/dist/vite/plugin.js.map +1 -1
  79. package/lib/{CategoryHeading-XnFqN2lJ.js → CategoryHeading-ovR-zHRq.js} +2 -2
  80. package/lib/{CategoryHeading-XnFqN2lJ.js.map → CategoryHeading-ovR-zHRq.js.map} +1 -1
  81. package/lib/{DeveloperHint-FBb2uXJe.js → DeveloperHint-YeWHKvyr.js} +2 -2
  82. package/lib/{DeveloperHint-FBb2uXJe.js.map → DeveloperHint-YeWHKvyr.js.map} +1 -1
  83. package/lib/ErrorPage-CsZAN_za.js +16 -0
  84. package/lib/ErrorPage-CsZAN_za.js.map +1 -0
  85. package/lib/{Input-BEDZAKw0.js → Input-CtVUl3eT.js} +3 -3
  86. package/lib/{Input-BEDZAKw0.js.map → Input-CtVUl3eT.js.map} +1 -1
  87. package/lib/{Markdown-B4aR03g6.js → Markdown-DapSf3wG.js} +795 -793
  88. package/lib/Markdown-DapSf3wG.js.map +1 -0
  89. package/lib/{MdxPage-BZyQsH8Z.js → MdxPage-BqBWsXZ1.js} +23 -23
  90. package/lib/MdxPage-BqBWsXZ1.js.map +1 -0
  91. package/lib/{OperationList-2NeWEM0u.js → OperationList-CYrmxPa8.js} +151 -109
  92. package/lib/OperationList-CYrmxPa8.js.map +1 -0
  93. package/lib/{Route-BZPewmrN.js → Route-Q5mqNQrv.js} +2 -2
  94. package/lib/{Route-BZPewmrN.js.map → Route-Q5mqNQrv.js.map} +1 -1
  95. package/lib/{SidebarBadge-COz0hgfa.js → SidebarBadge-Dx7jtnoA.js} +3 -3
  96. package/lib/{SidebarBadge-COz0hgfa.js.map → SidebarBadge-Dx7jtnoA.js.map} +1 -1
  97. package/lib/{SlotletProvider-DJMaOUDs.js → SlotletProvider-D3UD5Go3.js} +4 -4
  98. package/lib/{SlotletProvider-DJMaOUDs.js.map → SlotletProvider-D3UD5Go3.js.map} +1 -1
  99. package/lib/assets/{worker-BvD7B6MG.js → worker-Bcj4NA2p.js} +3430 -1351
  100. package/lib/assets/worker-Bcj4NA2p.js.map +1 -0
  101. package/lib/{index-Dv2KZuEw.js → index-BlJ2rj99.js} +1774 -1644
  102. package/lib/index-BlJ2rj99.js.map +1 -0
  103. package/lib/index-Bn6Lc9tq.js +9 -0
  104. package/lib/index-Bn6Lc9tq.js.map +1 -0
  105. package/lib/{index-1EDgIO6b.js → index-BngPzhKn.js} +3 -3
  106. package/lib/{index-1EDgIO6b.js.map → index-BngPzhKn.js.map} +1 -1
  107. package/lib/{index-Zezcv0xb.js → index-Dolisrci.js} +3 -3
  108. package/lib/{index-Zezcv0xb.js.map → index-Dolisrci.js.map} +1 -1
  109. package/lib/index-LNp6rxyU.js +2094 -0
  110. package/lib/index-LNp6rxyU.js.map +1 -0
  111. package/lib/state-hNe1dw4B.js +548 -0
  112. package/lib/state-hNe1dw4B.js.map +1 -0
  113. package/lib/zudoku.auth-auth0.js +1 -1
  114. package/lib/zudoku.auth-clerk.js +1 -1
  115. package/lib/zudoku.auth-openid.js +4 -4
  116. package/lib/zudoku.components.js +6 -6
  117. package/lib/zudoku.components.js.map +1 -1
  118. package/lib/zudoku.openapi-worker.js +497 -489
  119. package/lib/zudoku.openapi-worker.js.map +1 -1
  120. package/lib/zudoku.plugin-api-keys.js +5 -5
  121. package/lib/zudoku.plugin-custom-page.js +1 -1
  122. package/lib/zudoku.plugin-markdown.js +18 -15
  123. package/lib/zudoku.plugin-markdown.js.map +1 -1
  124. package/lib/zudoku.plugin-openapi.js +4 -4
  125. package/package.json +14 -4
  126. package/src/lib/authentication/state.ts +17 -0
  127. package/src/lib/components/ErrorPage.tsx +0 -2
  128. package/src/lib/components/InlineCode.tsx +10 -0
  129. package/src/lib/components/Layout.tsx +1 -1
  130. package/src/lib/oas/graphql/index.ts +33 -13
  131. package/src/lib/oas/parser/index.ts +1 -0
  132. package/src/lib/plugins/markdown/MdxPage.tsx +2 -2
  133. package/src/lib/plugins/markdown/generateRoutes.tsx +8 -5
  134. package/src/lib/plugins/markdown/index.tsx +3 -1
  135. package/src/lib/plugins/openapi/Endpoint.tsx +86 -22
  136. package/src/lib/plugins/openapi/OperationList.tsx +3 -1
  137. package/src/lib/plugins/openapi/OperationListItem.tsx +1 -1
  138. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +3 -0
  139. package/src/lib/plugins/openapi/Sidecar.tsx +17 -2
  140. package/src/lib/plugins/openapi/SimpleSelect.tsx +10 -2
  141. package/src/lib/plugins/openapi/graphql/gql.ts +11 -3
  142. package/src/lib/plugins/openapi/graphql/graphql.ts +116 -4
  143. package/src/lib/plugins/openapi/interfaces.ts +4 -1
  144. package/src/lib/plugins/openapi/playground/Playground.tsx +39 -5
  145. package/src/lib/plugins/openapi/playground/ResponseTab.tsx +0 -1
  146. package/src/lib/plugins/openapi/playground/createUrl.ts +6 -1
  147. package/dist/lib/util/slugify.d.ts +0 -2
  148. package/dist/lib/util/slugify.js +0 -3
  149. package/dist/lib/util/slugify.js.map +0 -1
  150. package/dist/vite/plugin-icons.d.ts +0 -3
  151. package/dist/vite/plugin-icons.js +0 -47
  152. package/dist/vite/plugin-icons.js.map +0 -1
  153. package/lib/ErrorPage-knunPbKI.js +0 -18
  154. package/lib/ErrorPage-knunPbKI.js.map +0 -1
  155. package/lib/Markdown-B4aR03g6.js.map +0 -1
  156. package/lib/MdxPage-BZyQsH8Z.js.map +0 -1
  157. package/lib/OperationList-2NeWEM0u.js.map +0 -1
  158. package/lib/assets/worker-BvD7B6MG.js.map +0 -1
  159. package/lib/index-Dv2KZuEw.js.map +0 -1
  160. package/lib/slugify-DbLhpSPt.js +0 -28
  161. package/lib/slugify-DbLhpSPt.js.map +0 -1
  162. package/lib/state-lIwt9isb.js +0 -288
  163. package/lib/state-lIwt9isb.js.map +0 -1
  164. package/src/lib/util/slugify.ts +0 -3
@@ -1,53 +1,95 @@
1
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) {
2
+ import { C as I } from "./CategoryHeading-ovR-zHRq.js";
3
+ import { D as z } from "./DeveloperHint-YeWHKvyr.js";
4
+ import { E as R } from "./ErrorPage-CsZAN_za.js";
5
+ import { I as y, M as m, H as h, a as x, P as u, S as E } from "./Markdown-DapSf3wG.js";
6
+ import { CheckIcon as F, CopyIcon as B, ChevronDownIcon as D, CircleFadingPlusIcon as H, CircleDotIcon as M, CircleIcon as G, SquareMinusIcon as Q, SquarePlusIcon as V, ListPlusIcon as _ } from "lucide-react";
7
+ import { useTransition as J, useState as f, useCallback as K } from "react";
8
+ import { a as U } from "./state-hNe1dw4B.js";
9
+ import { B as P } from "./index-Dolisrci.js";
10
+ import { g as N, u as T, S as W, C as Z, a as p, b as X, c as Y, d as ee, T as se, e as te, f as re, h as ne, i as ie } from "./index-BlJ2rj99.js";
11
+ import { u as A } from "./urql-YhcsXYy8.js";
12
+ import { R as v, T as C, C as O, S as ae } from "./index-BngPzhKn.js";
13
+ function oe(t, s) {
13
14
  return s;
14
15
  }
15
- const ne = ({ url: t }) => {
16
+ const le = N(
17
+ /* GraphQL */
18
+ `
19
+ query ServersQuery($input: JSON!, $type: SchemaType!) {
20
+ schema(input: $input, type: $type) {
21
+ url
22
+ servers {
23
+ url
24
+ }
25
+ }
26
+ }
27
+ `
28
+ ), w = ({ url: t }) => {
16
29
  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
- ] })
30
+ return /* @__PURE__ */ e.jsx(
31
+ P,
32
+ {
33
+ onClick: () => {
34
+ navigator.clipboard.writeText(t).then(() => {
35
+ n(!0), setTimeout(() => n(!1), 2e3);
36
+ });
37
+ },
38
+ variant: "ghost",
39
+ size: "icon",
40
+ children: s ? /* @__PURE__ */ e.jsx(F, { className: "text-green-600", size: 14 }) : /* @__PURE__ */ e.jsx(B, { size: 14, strokeWidth: 1.3 })
41
+ }
42
+ );
43
+ }, ce = { suspense: !0 }, de = () => {
44
+ const [t] = A({
45
+ query: le,
46
+ variables: T(),
47
+ context: ce
48
+ }), [, s] = J(), { selectedServer: n, setSelectedServer: i } = U();
49
+ if (!t.data) return null;
50
+ const { servers: r } = t.data.schema;
51
+ return r.length === 1 ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
52
+ /* @__PURE__ */ e.jsx("span", { className: "font-medium text-sm", children: "Endpoint:" }),
53
+ /* @__PURE__ */ e.jsx(y, { className: "text-xs px-2 py-1.5", selectOnClick: !0, children: r[0].url }),
54
+ /* @__PURE__ */ e.jsx(w, { url: r[0].url })
55
+ ] }) : /* @__PURE__ */ e.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
56
+ /* @__PURE__ */ e.jsxs("span", { className: "font-medium text-sm", children: [
57
+ r.length > 1 ? "Endpoints" : "Endpoint",
58
+ ":"
59
+ ] }),
60
+ /* @__PURE__ */ e.jsx(
61
+ W,
62
+ {
63
+ className: "font-mono text-xs bg-border/50 dark:bg-border/70 py-1.5 max-w-[450px] truncate",
64
+ onChange: (a) => s(() => {
65
+ i(a.target.value);
66
+ }),
67
+ value: n ?? t.data.schema.url,
68
+ showChevrons: r.length > 1,
69
+ options: r.map((a) => ({
70
+ value: a.url,
71
+ label: a.url
72
+ }))
73
+ }
74
+ ),
75
+ /* @__PURE__ */ e.jsx(w, { url: n ?? t.data.schema.url })
34
76
  ] });
35
- }, w = (t, s) => t.reduce(
77
+ }, k = (t, s) => t.reduce(
36
78
  (n, i) => {
37
79
  const r = s(i);
38
80
  return n[r] || (n[r] = []), n[r].push(i), n;
39
81
  },
40
82
  {}
41
- ), ie = (t, s) => t ? s(t) : void 0, I = (t) => t.schema != null && typeof t.schema == "object" ? t.schema : {
83
+ ), pe = (t, s) => t ? s(t) : void 0, q = (t) => t.schema != null && typeof t.schema == "object" ? t.schema : {
42
84
  type: "string"
43
- }, ae = ({
85
+ }, me = ({
44
86
  parameter: t,
45
87
  group: s,
46
88
  id: n
47
89
  }) => /* @__PURE__ */ e.jsxs("li", { className: "p-4 bg-border/20 text-sm flex flex-col gap-1", children: [
48
90
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
49
91
  /* @__PURE__ */ e.jsx("code", { children: s === "path" ? /* @__PURE__ */ e.jsx(
50
- Q,
92
+ Z,
51
93
  {
52
94
  name: t.name,
53
95
  backgroundOpacity: "15%",
@@ -55,7 +97,7 @@ const ne = ({ url: t }) => {
55
97
  }
56
98
  ) : t.name }),
57
99
  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 })
100
+ q(t).type && /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: q(t).type })
59
101
  ] }),
60
102
  t.description && /* @__PURE__ */ e.jsx(
61
103
  m,
@@ -64,14 +106,14 @@ const ne = ({ url: t }) => {
64
106
  className: "text-sm prose-p:my-1 prose-code:whitespace-pre-line"
65
107
  }
66
108
  )
67
- ] }), oe = ({
109
+ ] }), xe = ({
68
110
  group: t,
69
111
  parameters: s,
70
112
  id: n
71
113
  }) => /* @__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` }),
114
+ /* @__PURE__ */ e.jsx(h, { level: 3, id: `${n}/${t}-parameters`, className: "capitalize", children: t === "header" ? "Headers" : `${t} Parameters` }),
73
115
  /* @__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,
116
+ me,
75
117
  {
76
118
  parameter: i,
77
119
  id: n,
@@ -79,15 +121,15 @@ const ne = ({ url: t }) => {
79
121
  },
80
122
  `${i.name}-${i.in}`
81
123
  )) }) })
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 = {
124
+ ] }), ue = (t) => Object.entries(t), je = {
125
+ AND: /* @__PURE__ */ e.jsx(H, { size: 16, className: "fill-card" }),
126
+ OR: /* @__PURE__ */ e.jsx(M, { size: 16, className: "fill-card" }),
127
+ ONE: /* @__PURE__ */ e.jsx(G, { size: 14, className: "fill-card" })
128
+ }, he = {
87
129
  AND: "text-green-500 dark:text-green-300/60",
88
130
  OR: "text-blue-400 dark:text-blue-500",
89
131
  ONE: "text-purple-500 dark:text-purple-300/60"
90
- }, pe = ({
132
+ }, ge = ({
91
133
  type: t,
92
134
  isOpen: s,
93
135
  className: n
@@ -95,13 +137,13 @@ const ne = ({ url: t }) => {
95
137
  "div",
96
138
  {
97
139
  className: x(
98
- de[t],
140
+ he[t],
99
141
  "relative text-sm flex py-2",
100
142
  "before:border-l before:absolute before:-top-2 before:-bottom-2 before:border-border before:border-dashed before:content-['']",
101
143
  n
102
144
  ),
103
145
  children: /* @__PURE__ */ e.jsxs("div", { className: "-translate-x-[7px] flex gap-1 items-center", children: [
104
- ce[t],
146
+ je[t],
105
147
  /* @__PURE__ */ e.jsx(
106
148
  "div",
107
149
  {
@@ -109,45 +151,45 @@ const ne = ({ url: t }) => {
109
151
  "translate-y-px mx-px opacity-0 group-hover:opacity-100 transition",
110
152
  !s && "-rotate-90"
111
153
  ),
112
- children: /* @__PURE__ */ e.jsx($, { size: 16 })
154
+ children: /* @__PURE__ */ e.jsx(D, { size: 16 })
113
155
  }
114
156
  )
115
157
  ] })
116
158
  }
117
- ), me = (t) => {
159
+ ), fe = (t) => {
118
160
  const [s, n] = f(!0);
119
161
  return /* @__PURE__ */ e.jsxs(
120
- N,
162
+ v,
121
163
  {
122
164
  open: s,
123
165
  onOpenChange: () => n((i) => !i),
124
166
  className: "group",
125
167
  children: [
126
- /* @__PURE__ */ e.jsx(C, { children: /* @__PURE__ */ e.jsx(pe, { type: t.type, isOpen: s }) }),
168
+ /* @__PURE__ */ e.jsx(C, { children: /* @__PURE__ */ e.jsx(ge, { type: t.type, isOpen: s }) }),
127
169
  !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 }) })
170
+ /* @__PURE__ */ e.jsx(O, { children: /* @__PURE__ */ e.jsx(g, { schema: t.schema, level: t.level + 1 }) })
129
171
  ]
130
172
  }
131
173
  );
132
- }, xe = {
174
+ }, ye = {
133
175
  AND: "All of",
134
176
  OR: "Any of",
135
177
  ONE: "One of"
136
- }, ue = ({
178
+ }, be = ({
137
179
  schemas: t,
138
180
  type: s,
139
181
  isOpen: n,
140
182
  level: i,
141
183
  toggleOpen: r
142
- }) => /* @__PURE__ */ e.jsx(N, { open: n, onOpenChange: r, asChild: !0, children: /* @__PURE__ */ e.jsxs(p, { className: "px-6", children: [
184
+ }) => /* @__PURE__ */ e.jsx(v, { open: n, onOpenChange: r, asChild: !0, children: /* @__PURE__ */ e.jsxs(p, { className: "px-6", children: [
143
185
  /* @__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] })
186
+ n ? /* @__PURE__ */ e.jsx(Q, { size: 14 }) : /* @__PURE__ */ e.jsx(V, { size: 14 }),
187
+ /* @__PURE__ */ e.jsx("span", { children: ye[s] })
146
188
  ] }),
147
189
  /* @__PURE__ */ e.jsx(O, { className: "pb-4", children: t.map((a, l) => (
148
190
  // eslint-disable-next-line react/no-array-index-key
149
191
  /* @__PURE__ */ e.jsx(
150
- me,
192
+ fe,
151
193
  {
152
194
  type: s,
153
195
  schema: a,
@@ -156,19 +198,19 @@ const ne = ({ url: t }) => {
156
198
  l
157
199
  )
158
200
  )) })
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 = {
201
+ ] }) }), Ne = (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), ve = {
160
202
  allOf: "AND",
161
203
  anyOf: "OR",
162
204
  oneOf: "ONE"
163
- }, P = ({
205
+ }, $ = ({
164
206
  schema: t,
165
207
  level: s
166
208
  }) => {
167
- const [n, i] = f(!0), r = G(() => i((a) => !a), []);
168
- for (const [a, l] of le(ge))
209
+ const [n, i] = f(!0), r = K(() => i((a) => !a), []);
210
+ for (const [a, l] of ue(ve))
169
211
  if (t[a])
170
212
  return /* @__PURE__ */ e.jsx(
171
- ue,
213
+ be,
172
214
  {
173
215
  schemas: t[a],
174
216
  type: l,
@@ -177,7 +219,7 @@ const ne = ({ url: t }) => {
177
219
  level: s
178
220
  }
179
221
  );
180
- }, he = ({
222
+ }, Ce = ({
181
223
  name: t,
182
224
  schema: s,
183
225
  group: n,
@@ -202,31 +244,31 @@ const ne = ({ url: t }) => {
202
244
  content: s.description
203
245
  }
204
246
  ),
205
- (b(s) || je(s)) && /* @__PURE__ */ e.jsxs(
206
- N,
247
+ (b(s) || Ne(s)) && /* @__PURE__ */ e.jsxs(
248
+ v,
207
249
  {
208
250
  defaultOpen: r,
209
251
  open: l,
210
252
  onOpenChange: () => j(!l),
211
253
  children: [
212
254
  a && /* @__PURE__ */ e.jsx(C, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
213
- te,
255
+ P,
214
256
  {
215
257
  variant: "outline",
216
258
  size: "sm",
217
259
  className: "mt-2 flex gap-1.5",
218
260
  children: [
219
- /* @__PURE__ */ e.jsx(M, { size: 18 }),
261
+ /* @__PURE__ */ e.jsx(_, { size: 18 }),
220
262
  l ? "Hide nested properties" : "Show nested properties"
221
263
  ]
222
264
  }
223
265
  ) }),
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 }) }) })
266
+ /* @__PURE__ */ e.jsx(O, { children: /* @__PURE__ */ e.jsx("div", { className: "mt-2", children: b(s) ? /* @__PURE__ */ e.jsx($, { schema: s, level: i + 1 }) : s.type === "object" ? /* @__PURE__ */ e.jsx(g, { schema: s, level: i + 1 }) : s.type === "array" && typeof s.items == "object" && /* @__PURE__ */ e.jsx(g, { schema: s.items, level: i + 1 }) }) })
225
267
  ]
226
268
  }
227
269
  )
228
270
  ] }) });
229
- }, h = ({
271
+ }, g = ({
230
272
  schema: t,
231
273
  level: s = 0,
232
274
  defaultOpen: n = !1
@@ -235,7 +277,7 @@ const ne = ({ url: t }) => {
235
277
  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
278
  const i = (r, a) => {
237
279
  if (b(r))
238
- return /* @__PURE__ */ e.jsx(P, { schema: r, level: a });
280
+ return /* @__PURE__ */ e.jsx($, { schema: r, level: a });
239
281
  if (r.type === "array" && r.items) {
240
282
  const l = r.items;
241
283
  return typeof l.type == "string" && ["string", "number", "boolean", "integer"].includes(l.type) ? /* @__PURE__ */ e.jsxs(p, { className: "p-4", children: [
@@ -274,7 +316,7 @@ const ne = ({ url: t }) => {
274
316
  )
275
317
  ] });
276
318
  if (r.properties) {
277
- const l = w(
319
+ const l = k(
278
320
  Object.entries(r.properties),
279
321
  ([d, o]) => {
280
322
  var c;
@@ -283,7 +325,7 @@ const ne = ({ url: t }) => {
283
325
  ), j = ["required", "optional", "deprecated"];
284
326
  return /* @__PURE__ */ e.jsx(p, { className: "divide-y overflow-hidden", children: j.map(
285
327
  (d) => l[d] && /* @__PURE__ */ e.jsx("ul", { className: "divide-y", children: l[d].map(([o, c]) => /* @__PURE__ */ e.jsx(
286
- he,
328
+ Ce,
287
329
  {
288
330
  name: o,
289
331
  schema: c,
@@ -308,19 +350,19 @@ const ne = ({ url: t }) => {
308
350
  }
309
351
  )
310
352
  ] }) : 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(
353
+ /* @__PURE__ */ e.jsx(X, { children: /* @__PURE__ */ e.jsx(Y, { children: "Additional Properties:" }) }),
354
+ /* @__PURE__ */ e.jsx(ee, { children: i(
313
355
  r.additionalProperties,
314
356
  a + 1
315
357
  ) })
316
358
  ] }) : null;
317
359
  };
318
360
  return i(t, s);
319
- }, fe = ["path", "query", "header", "cookie"], ye = ({
361
+ }, Oe = ["path", "query", "header", "cookie"], Se = ({
320
362
  operationFragment: t
321
363
  }) => {
322
364
  var l, j, d;
323
- const s = re(be, t), n = w(
365
+ const s = oe(Ie, t), n = k(
324
366
  s.parameters ?? [],
325
367
  (o) => o.in
326
368
  ), i = s.responses.at(0), [r, a] = f(i == null ? void 0 : i.statusCode);
@@ -330,7 +372,7 @@ const ne = ({ url: t }) => {
330
372
  className: "grid grid-cols-1 lg:grid-cols-[4fr_3fr] gap-8 items-start border-b-2 mb-16 pb-16",
331
373
  children: [
332
374
  /* @__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 }),
375
+ /* @__PURE__ */ e.jsx(h, { level: 2, id: s.slug, registerSidebarAnchor: !0, children: s.summary }),
334
376
  s.description && /* @__PURE__ */ e.jsx(
335
377
  m,
336
378
  {
@@ -338,11 +380,11 @@ const ne = ({ url: t }) => {
338
380
  content: s.description
339
381
  }
340
382
  ),
341
- s.parameters && s.parameters.length > 0 && /* @__PURE__ */ e.jsx(e.Fragment, { children: fe.flatMap(
383
+ s.parameters && s.parameters.length > 0 && /* @__PURE__ */ e.jsx(e.Fragment, { children: Oe.flatMap(
342
384
  (o) => {
343
385
  var c;
344
386
  return (c = n[o]) != null && c.length ? /* @__PURE__ */ e.jsx(
345
- oe,
387
+ xe,
346
388
  {
347
389
  id: s.slug,
348
390
  parameters: n[o],
@@ -352,9 +394,9 @@ const ne = ({ url: t }) => {
352
394
  ) : [];
353
395
  }
354
396
  ) }),
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: [
397
+ pe((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
398
  /* @__PURE__ */ e.jsx(
357
- g,
399
+ h,
358
400
  {
359
401
  level: 3,
360
402
  className: "capitalize",
@@ -363,11 +405,11 @@ const ne = ({ url: t }) => {
363
405
  children: "Request Body"
364
406
  }
365
407
  ),
366
- /* @__PURE__ */ e.jsx(h, { schema: o })
408
+ /* @__PURE__ */ e.jsx(g, { schema: o })
367
409
  ] })),
368
410
  s.responses.length > 0 && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
369
411
  /* @__PURE__ */ e.jsx(
370
- g,
412
+ h,
371
413
  {
372
414
  level: 3,
373
415
  className: "capitalize mt-8 pt-8 border-t",
@@ -377,30 +419,30 @@ const ne = ({ url: t }) => {
377
419
  }
378
420
  ),
379
421
  /* @__PURE__ */ e.jsxs(
380
- K,
422
+ se,
381
423
  {
382
424
  onValueChange: (o) => a(o),
383
425
  value: r,
384
426
  children: [
385
- s.responses.length > 1 && /* @__PURE__ */ e.jsx(U, { children: s.responses.map((o) => /* @__PURE__ */ e.jsx(
386
- W,
427
+ s.responses.length > 1 && /* @__PURE__ */ e.jsx(te, { children: s.responses.map((o) => /* @__PURE__ */ e.jsx(
428
+ re,
387
429
  {
388
430
  value: o.statusCode,
389
- title: o.description,
431
+ title: o.description ?? void 0,
390
432
  children: o.statusCode
391
433
  },
392
434
  o.statusCode
393
435
  )) }),
394
436
  /* @__PURE__ */ e.jsx("ul", { className: "list-none m-0 px-0", children: s.responses.map((o) => {
395
- var c, v;
437
+ var c, S;
396
438
  return /* @__PURE__ */ e.jsx(
397
- Z,
439
+ ne,
398
440
  {
399
441
  value: o.statusCode,
400
442
  children: /* @__PURE__ */ e.jsx(
401
- h,
443
+ g,
402
444
  {
403
- schema: (v = (c = o.content) == null ? void 0 : c.find((A) => A.schema)) == null ? void 0 : v.schema
445
+ schema: (S = (c = o.content) == null ? void 0 : c.find((L) => L.schema)) == null ? void 0 : S.schema
404
446
  }
405
447
  )
406
448
  },
@@ -413,7 +455,7 @@ const ne = ({ url: t }) => {
413
455
  ] })
414
456
  ] }),
415
457
  /* @__PURE__ */ e.jsx(
416
- X,
458
+ ie,
417
459
  {
418
460
  selectedResponse: r,
419
461
  onSelectResponse: a,
@@ -424,7 +466,7 @@ const ne = ({ url: t }) => {
424
466
  },
425
467
  s.operationId
426
468
  );
427
- }, be = q(
469
+ }, Ie = N(
428
470
  /* GraphQL */
429
471
  `
430
472
  fragment OperationsFragment on OperationItem {
@@ -475,7 +517,7 @@ const ne = ({ url: t }) => {
475
517
  }
476
518
  }
477
519
  `
478
- ), Ne = q(
520
+ ), we = N(
479
521
  /* GraphQL */
480
522
  `
481
523
  query AllOperations($input: JSON!, $type: SchemaType!) {
@@ -495,20 +537,20 @@ const ne = ({ url: t }) => {
495
537
  }
496
538
  }
497
539
  `
498
- ), Ce = { suspense: !0 }, Re = () => {
540
+ ), qe = { suspense: !0 }, He = () => {
499
541
  var r;
500
- const { type: t, input: s } = Y(), [n] = se({
501
- query: Ne,
542
+ const { type: t, input: s } = T(), [n] = A({
543
+ query: we,
502
544
  variables: { type: t, input: s },
503
- context: Ce
545
+ context: qe
504
546
  }), i = (r = n.error) == null ? void 0 : r.graphQLErrors.at(0);
505
547
  return i ? /* @__PURE__ */ e.jsx(
506
- L,
548
+ R,
507
549
  {
508
550
  category: "Error",
509
551
  title: "Schema cannot be displayed",
510
552
  message: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
511
- /* @__PURE__ */ e.jsxs(T, { className: "mb-4", children: [
553
+ /* @__PURE__ */ e.jsxs(z, { className: "mb-4", children: [
512
554
  "Check your configuration value ",
513
555
  /* @__PURE__ */ e.jsx(y, { children: "apis.type" }),
514
556
  " ",
@@ -517,7 +559,7 @@ const ne = ({ url: t }) => {
517
559
  " in the Zudoku config."
518
560
  ] }),
519
561
  "An error occurred while trying to fetch the API reference:",
520
- /* @__PURE__ */ e.jsx(k, { code: i.toString(), language: "plain" })
562
+ /* @__PURE__ */ e.jsx(E, { code: i.toString(), language: "plain" })
521
563
  ] })
522
564
  }
523
565
  ) : n.data ? /* @__PURE__ */ e.jsxs("div", { className: "pt-[--padding-content-top]", children: [
@@ -526,16 +568,16 @@ const ne = ({ url: t }) => {
526
568
  {
527
569
  className: x(u, "mb-16 max-w-full prose-img:max-w-prose"),
528
570
  children: [
529
- /* @__PURE__ */ e.jsx(S, { children: "Overview" }),
530
- /* @__PURE__ */ e.jsx(g, { level: 1, id: "description", registerSidebarAnchor: !0, children: n.data.schema.title }),
571
+ /* @__PURE__ */ e.jsx(I, { children: "Overview" }),
572
+ /* @__PURE__ */ e.jsx(h, { level: 1, id: "description", registerSidebarAnchor: !0, children: n.data.schema.title }),
531
573
  /* @__PURE__ */ e.jsx(m, { content: n.data.schema.description ?? "" })
532
574
  ]
533
575
  }
534
576
  ),
535
577
  /* @__PURE__ */ e.jsx("hr", {}),
536
- /* @__PURE__ */ e.jsx(ne, { url: n.data.schema.url }),
578
+ /* @__PURE__ */ e.jsx("div", { className: "my-4 flex justify-end", children: /* @__PURE__ */ e.jsx(de, {}) }),
537
579
  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 }),
580
+ a.name && /* @__PURE__ */ e.jsx(I, { children: a.name }),
539
581
  a.description && /* @__PURE__ */ e.jsx(
540
582
  m,
541
583
  {
@@ -543,8 +585,8 @@ const ne = ({ url: t }) => {
543
585
  content: a.description
544
586
  }
545
587
  ),
546
- /* @__PURE__ */ e.jsx("div", { className: "operation mb-12", children: /* @__PURE__ */ e.jsx(ee, { children: a.operations.map((l) => /* @__PURE__ */ e.jsx(
547
- ye,
588
+ /* @__PURE__ */ e.jsx("div", { className: "operation mb-12", children: /* @__PURE__ */ e.jsx(ae, { children: a.operations.map((l) => /* @__PURE__ */ e.jsx(
589
+ Se,
548
590
  {
549
591
  operationFragment: l
550
592
  },
@@ -554,7 +596,7 @@ const ne = ({ url: t }) => {
554
596
  ] }) : null;
555
597
  };
556
598
  export {
557
- Re as OperationList,
558
- be as OperationsFragment
599
+ He as OperationList,
600
+ Ie as OperationsFragment
559
601
  };
560
- //# sourceMappingURL=OperationList-2NeWEM0u.js.map
602
+ //# sourceMappingURL=OperationList-CYrmxPa8.js.map