zudoku 0.32.6 → 0.33.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 (186) hide show
  1. package/cli.js +3 -0
  2. package/dist/app/main.js +1 -1
  3. package/dist/app/main.js.map +1 -1
  4. package/dist/cli/build/handler.d.ts +1 -3
  5. package/dist/cli/build/handler.js +7 -0
  6. package/dist/cli/build/handler.js.map +1 -1
  7. package/dist/cli/cli.js +5 -0
  8. package/dist/cli/cli.js.map +1 -1
  9. package/dist/cli/cmds/build.d.ts +11 -3
  10. package/dist/cli/cmds/build.js +20 -13
  11. package/dist/cli/cmds/build.js.map +1 -1
  12. package/dist/cli/cmds/preview.d.ts +16 -0
  13. package/dist/cli/cmds/preview.js +25 -0
  14. package/dist/cli/cmds/preview.js.map +1 -0
  15. package/dist/cli/preview/handler.d.ts +3 -0
  16. package/dist/cli/preview/handler.js +37 -0
  17. package/dist/cli/preview/handler.js.map +1 -0
  18. package/dist/config/common.d.ts +5 -2
  19. package/dist/config/config.d.ts +2 -7
  20. package/dist/config/loader.d.ts +4 -4
  21. package/dist/config/loader.js +7 -4
  22. package/dist/config/loader.js.map +1 -1
  23. package/dist/config/validators/validate.d.ts +1 -1
  24. package/dist/index.d.ts +1 -0
  25. package/dist/index.js +1 -0
  26. package/dist/index.js.map +1 -1
  27. package/dist/lib/authentication/providers/auth0.d.ts +2 -2
  28. package/dist/lib/authentication/providers/auth0.js +1 -0
  29. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  30. package/dist/lib/authentication/providers/openid.d.ts +4 -3
  31. package/dist/lib/authentication/providers/openid.js +4 -2
  32. package/dist/lib/authentication/providers/openid.js.map +1 -1
  33. package/dist/lib/components/ThemeSwitch.js +1 -1
  34. package/dist/lib/components/ThemeSwitch.js.map +1 -1
  35. package/dist/lib/components/Zudoku.d.ts +1 -1
  36. package/dist/lib/components/Zudoku.js +7 -6
  37. package/dist/lib/components/Zudoku.js.map +1 -1
  38. package/dist/lib/components/context/RouterEventsEmitter.d.ts +1 -0
  39. package/dist/lib/components/context/RouterEventsEmitter.js +17 -0
  40. package/dist/lib/components/context/RouterEventsEmitter.js.map +1 -0
  41. package/dist/lib/core/ZudokuContext.d.ts +10 -0
  42. package/dist/lib/core/ZudokuContext.js +17 -1
  43. package/dist/lib/core/ZudokuContext.js.map +1 -1
  44. package/dist/lib/core/plugins.d.ts +8 -2
  45. package/dist/lib/core/plugins.js +1 -0
  46. package/dist/lib/core/plugins.js.map +1 -1
  47. package/dist/lib/hooks/index.d.ts +3 -0
  48. package/dist/lib/hooks/index.js +5 -0
  49. package/dist/lib/hooks/index.js.map +1 -0
  50. package/dist/lib/hooks/useEvent.d.ts +11 -0
  51. package/dist/lib/hooks/useEvent.js +19 -0
  52. package/dist/lib/hooks/useEvent.js.map +1 -0
  53. package/dist/lib/hooks/useEvent.test.d.ts +1 -0
  54. package/dist/lib/hooks/useEvent.test.js +100 -0
  55. package/dist/lib/hooks/useEvent.test.js.map +1 -0
  56. package/dist/lib/ui/Stepper.d.ts +4 -0
  57. package/dist/lib/ui/Stepper.js +7 -0
  58. package/dist/lib/ui/Stepper.js.map +1 -0
  59. package/dist/lib/util/MdxComponents.d.ts +3 -1
  60. package/dist/lib/util/MdxComponents.js +3 -0
  61. package/dist/lib/util/MdxComponents.js.map +1 -1
  62. package/dist/vite/config.d.ts +2 -5
  63. package/dist/vite/config.js +21 -28
  64. package/dist/vite/config.js.map +1 -1
  65. package/dist/vite/config.test.js +1 -1
  66. package/dist/vite/config.test.js.map +1 -1
  67. package/dist/vite/css/plugin.d.ts +2 -2
  68. package/dist/vite/css/plugin.js.map +1 -1
  69. package/dist/vite/dev-server.js.map +1 -1
  70. package/dist/vite/plugin-api-keys.d.ts +2 -2
  71. package/dist/vite/plugin-api-keys.js +3 -3
  72. package/dist/vite/plugin-api-keys.js.map +1 -1
  73. package/dist/vite/plugin-api.d.ts +2 -2
  74. package/dist/vite/plugin-api.js +5 -5
  75. package/dist/vite/plugin-api.js.map +1 -1
  76. package/dist/vite/plugin-auth.d.ts +2 -2
  77. package/dist/vite/plugin-auth.js +3 -3
  78. package/dist/vite/plugin-auth.js.map +1 -1
  79. package/dist/vite/plugin-component.d.ts +2 -2
  80. package/dist/vite/plugin-component.js +3 -2
  81. package/dist/vite/plugin-component.js.map +1 -1
  82. package/dist/vite/plugin-config-reload.d.ts +4 -3
  83. package/dist/vite/plugin-config-reload.js +11 -8
  84. package/dist/vite/plugin-config-reload.js.map +1 -1
  85. package/dist/vite/plugin-config.d.ts +2 -2
  86. package/dist/vite/plugin-config.js +2 -2
  87. package/dist/vite/plugin-config.js.map +1 -1
  88. package/dist/vite/plugin-custom-pages.d.ts +2 -2
  89. package/dist/vite/plugin-custom-pages.js +3 -3
  90. package/dist/vite/plugin-custom-pages.js.map +1 -1
  91. package/dist/vite/plugin-docs.d.ts +2 -2
  92. package/dist/vite/plugin-docs.js +5 -5
  93. package/dist/vite/plugin-docs.js.map +1 -1
  94. package/dist/vite/plugin-frontmatter.d.ts +2 -2
  95. package/dist/vite/plugin-frontmatter.js +5 -4
  96. package/dist/vite/plugin-frontmatter.js.map +1 -1
  97. package/dist/vite/plugin-mdx.d.ts +2 -2
  98. package/dist/vite/plugin-mdx.js +1 -1
  99. package/dist/vite/plugin-mdx.js.map +1 -1
  100. package/dist/vite/plugin-redirect.d.ts +2 -2
  101. package/dist/vite/plugin-redirect.js +3 -3
  102. package/dist/vite/plugin-redirect.js.map +1 -1
  103. package/dist/vite/plugin-search.d.ts +2 -2
  104. package/dist/vite/plugin-search.js +1 -1
  105. package/dist/vite/plugin-search.js.map +1 -1
  106. package/dist/vite/plugin-sidebar.d.ts +2 -2
  107. package/dist/vite/plugin-sidebar.js +2 -2
  108. package/dist/vite/plugin-sidebar.js.map +1 -1
  109. package/dist/vite/plugin-theme-css.d.ts +2 -2
  110. package/dist/vite/plugin-theme-css.js.map +1 -1
  111. package/dist/vite/plugin.d.ts +2 -2
  112. package/dist/vite/plugin.js.map +1 -1
  113. package/dist/vite/prerender/FileWritingResponse.d.ts +2 -1
  114. package/dist/vite/prerender/FileWritingResponse.js +4 -1
  115. package/dist/vite/prerender/FileWritingResponse.js.map +1 -1
  116. package/dist/vite/prerender/worker.d.ts +1 -1
  117. package/dist/vite/prerender/worker.js +3 -0
  118. package/dist/vite/prerender/worker.js.map +1 -1
  119. package/lib/{AuthenticationPlugin-BlxA4Mbn.js → AuthenticationPlugin-_gUMnGxb.js} +2 -2
  120. package/lib/{AuthenticationPlugin-BlxA4Mbn.js.map → AuthenticationPlugin-_gUMnGxb.js.map} +1 -1
  121. package/lib/{Markdown-Cr9sYpR_.js → Markdown-DePfm7oQ.js} +1384 -1381
  122. package/lib/{Markdown-Cr9sYpR_.js.map → Markdown-DePfm7oQ.js.map} +1 -1
  123. package/lib/{MdxPage-Dt-UEQl8.js → MdxPage-DM9mE-G-.js} +4 -4
  124. package/lib/{MdxPage-Dt-UEQl8.js.map → MdxPage-DM9mE-G-.js.map} +1 -1
  125. package/lib/{OasProvider-WVtvHP5H.js → OasProvider-Bvu4dDpX.js} +3 -3
  126. package/lib/{OasProvider-WVtvHP5H.js.map → OasProvider-Bvu4dDpX.js.map} +1 -1
  127. package/lib/{OperationList-DhOwupvv.js → OperationList-DWnNbwVg.js} +241 -240
  128. package/lib/OperationList-DWnNbwVg.js.map +1 -0
  129. package/lib/{Select-D9hI1G-y.js → Select-BmoX1iTH.js} +36 -36
  130. package/lib/{Select-D9hI1G-y.js.map → Select-BmoX1iTH.js.map} +1 -1
  131. package/lib/{SlotletProvider-CEfNOA8i.js → SlotletProvider-DdtIOUi6.js} +2 -2
  132. package/lib/{SlotletProvider-CEfNOA8i.js.map → SlotletProvider-DdtIOUi6.js.map} +1 -1
  133. package/lib/{createServer-DMf6O2Rz.js → createServer-DmusVVsi.js} +987 -967
  134. package/lib/createServer-DmusVVsi.js.map +1 -0
  135. package/lib/{hook-CWwSAAlH.js → hook-4_6pQSo4.js} +29 -29
  136. package/lib/{hook-CWwSAAlH.js.map → hook-4_6pQSo4.js.map} +1 -1
  137. package/lib/{index-Do_30Hpk.js → index-DVBlM15k.js} +83 -82
  138. package/lib/{index-Do_30Hpk.js.map → index-DVBlM15k.js.map} +1 -1
  139. package/lib/index-DwT-v3zK.js +86 -0
  140. package/lib/index-DwT-v3zK.js.map +1 -0
  141. package/lib/{mutation-B0wxqzSN.js → mutation-DTunCQKB.js} +2 -2
  142. package/lib/{mutation-B0wxqzSN.js.map → mutation-DTunCQKB.js.map} +1 -1
  143. package/lib/objectEntries-yMIkr2mI.js +5 -0
  144. package/lib/objectEntries-yMIkr2mI.js.map +1 -0
  145. package/lib/ui/Stepper.js +6 -0
  146. package/lib/ui/Stepper.js.map +1 -0
  147. package/lib/ui/SyntaxHighlight.js +2902 -7
  148. package/lib/ui/SyntaxHighlight.js.map +1 -1
  149. package/lib/{useScrollToAnchor-C-sRxs9o.js → useScrollToAnchor-BW8y_cwU.js} +3 -3
  150. package/lib/{useScrollToAnchor-C-sRxs9o.js.map → useScrollToAnchor-BW8y_cwU.js.map} +1 -1
  151. package/lib/zudoku.auth-auth0.js +15 -14
  152. package/lib/zudoku.auth-auth0.js.map +1 -1
  153. package/lib/zudoku.auth-clerk.js +2 -2
  154. package/lib/zudoku.auth-openid.js +126 -124
  155. package/lib/zudoku.auth-openid.js.map +1 -1
  156. package/lib/zudoku.components.js +489 -454
  157. package/lib/zudoku.components.js.map +1 -1
  158. package/lib/zudoku.css +1 -0
  159. package/lib/zudoku.hooks.js +19 -0
  160. package/lib/zudoku.hooks.js.map +1 -0
  161. package/lib/zudoku.plugin-api-catalog.js +2 -2
  162. package/lib/zudoku.plugin-api-keys.js +5 -5
  163. package/lib/zudoku.plugin-custom-pages.js +1 -1
  164. package/lib/zudoku.plugin-markdown.js +1 -1
  165. package/lib/zudoku.plugin-openapi.js +2 -2
  166. package/lib/zudoku.plugins.js +9 -8
  167. package/lib/zudoku.plugins.js.map +1 -1
  168. package/package.json +12 -4
  169. package/src/app/main.tsx +1 -1
  170. package/src/lib/authentication/providers/auth0.tsx +3 -2
  171. package/src/lib/authentication/providers/openid.tsx +8 -5
  172. package/src/lib/components/ThemeSwitch.tsx +1 -1
  173. package/src/lib/components/Zudoku.tsx +9 -5
  174. package/src/lib/components/context/RouterEventsEmitter.tsx +19 -0
  175. package/src/lib/core/ZudokuContext.ts +31 -0
  176. package/src/lib/core/plugins.ts +16 -2
  177. package/src/lib/hooks/index.ts +5 -0
  178. package/src/lib/hooks/useEvent.test.tsx +149 -0
  179. package/src/lib/hooks/useEvent.ts +41 -0
  180. package/src/lib/ui/Stepper.css +43 -0
  181. package/src/lib/ui/Stepper.tsx +8 -0
  182. package/src/lib/util/MdxComponents.tsx +4 -1
  183. package/lib/OperationList-DhOwupvv.js.map +0 -1
  184. package/lib/SyntaxHighlight-CcnUjERD.js +0 -2986
  185. package/lib/SyntaxHighlight-CcnUjERD.js.map +0 -1
  186. package/lib/createServer-DMf6O2Rz.js.map +0 -1
@@ -9,33 +9,34 @@ import { j as e } from "./jsx-runtime-CYK1ROHF.js";
9
9
  import { s as W } from "./index-LNp6rxyU.js";
10
10
  import { Circle as bt, ChevronRightIcon as B, CheckIcon as Nt, DotIcon as wt, Check as Ct, Search as Tt, XIcon as $t, ChevronDownIcon as St, InfoIcon as Le, LogInIcon as Pt, CirclePlayIcon as Rt } from "lucide-react";
11
11
  import { r as kt, m as Ve } from "./chunk-IR6S3I6Y-D_3UmFIn.js";
12
- import { H as It, I as Ot, J as Et, k as At } from "./hook-CWwSAAlH.js";
12
+ import { m as It, o as Ot, p as Et, k as At } from "./hook-4_6pQSo4.js";
13
13
  import { Button as K } from "./ui/Button.js";
14
14
  import { j as O } from "./joinUrl-10po2Jdj.js";
15
15
  import { Z as qt } from "./invariant-Caa8-XvF.js";
16
16
  import { VisuallyHidden as Dt } from "@radix-ui/react-visually-hidden";
17
17
  import * as x from "react";
18
- import { Fragment as k, useRef as q, useEffect as ge, useState as U, useCallback as Lt, useTransition as Vt } from "react";
18
+ import { Fragment as k, useRef as q, useEffect as fe, useState as U, useCallback as Lt, useTransition as Vt } from "react";
19
19
  import { V as $, T as Ft, D as zt, b as Ht, a as Gt, c as Bt } from "./index-Du5aNddU.js";
20
- import { S as Qe, a as Ze, b as We, c as Ke, e as Q, u as Ut } from "./Select-D9hI1G-y.js";
21
- import { b as fe, u as ye, C as I, a as Mt, F as _t } from "./index.esm--gIChbWs.js";
20
+ import { S as Qe, a as Ze, b as We, c as Ke, e as Q, u as Ut } from "./Select-BmoX1iTH.js";
21
+ import { b as ge, u as ye, C as I, a as Mt, F as _t } from "./index.esm--gIChbWs.js";
22
22
  import { c as ve } from "./index-CPNSgwSb.js";
23
23
  import { c as m } from "./cn-qaFjX9_3.js";
24
24
  import * as Xe from "@radix-ui/react-label";
25
25
  import * as M from "@radix-ui/react-radio-group";
26
26
  import { Card as je, CardHeader as Jt, CardTitle as Qt, CardContent as Zt } from "./ui/Card.js";
27
27
  import { Tabs as Ye, TabsList as et, TabsTrigger as E, TabsContent as A } from "./ui/Tabs.js";
28
- import { z as Wt, S as Kt } from "./SyntaxHighlight-CcnUjERD.js";
29
- import { B as Z, S as Xt } from "./Spinner-1KrEmx1V.js";
28
+ import { z as Wt } from "./index-DwT-v3zK.js";
29
+ import { B as Z, S as Kt } from "./Spinner-1KrEmx1V.js";
30
30
  import * as j from "@radix-ui/react-dropdown-menu";
31
31
  import * as me from "@radix-ui/react-checkbox";
32
32
  import * as X from "@radix-ui/react-popover";
33
- import { PopoverAnchor as Yt } from "@radix-ui/react-popover";
33
+ import { PopoverAnchor as Xt } from "@radix-ui/react-popover";
34
34
  import { Input as be } from "./ui/Input.js";
35
- import { Slot as ea } from "@radix-ui/react-slot";
36
- import { Callout as ta } from "./ui/Callout.js";
35
+ import { Slot as Yt } from "@radix-ui/react-slot";
36
+ import { Callout as ea } from "./ui/Callout.js";
37
37
  import { Collapsible as Fe, CollapsibleTrigger as ze, CollapsibleContent as He } from "./ui/Collapsible.js";
38
38
  import * as Ne from "@radix-ui/react-collapsible";
39
+ import { SyntaxHighlight as ta } from "./ui/SyntaxHighlight.js";
39
40
  let ie;
40
41
  const aa = (t) => {
41
42
  var a;
@@ -47,7 +48,7 @@ const aa = (t) => {
47
48
  var te, ae;
48
49
  class sa {
49
50
  constructor(a) {
50
- oe(this, te, async () => (ie || (ie = import("./createServer-DMf6O2Rz.js").then(
51
+ oe(this, te, async () => (ie || (ie = import("./createServer-DmusVVsi.js").then(
51
52
  (a) => a.createServer(this.config)
52
53
  )), ie));
53
54
  oe(this, ae, async (a) => this.config.server ? fetch(this.config.server, a) : (await re(this, te).call(this)).fetch("http://localhost/graphql", a));
@@ -335,14 +336,14 @@ const ua = ({
335
336
  const l = Array.from(n.matchAll(/{([^}]+)}/g)), c = [];
336
337
  let d = 0;
337
338
  return l.forEach((u) => {
338
- const [f, C] = u;
339
+ const [g, C] = u;
339
340
  if (!C) return;
340
341
  const b = u.index;
341
342
  b > d && c.push(
342
343
  /* @__PURE__ */ e.jsx(k, { children: n.slice(d, b) }, `text-${d}-${b}`)
343
344
  ), c.push(
344
- /* @__PURE__ */ e.jsx(k, { children: a({ name: C, originalValue: f, index: s++ }) }, `param-${C}`)
345
- ), d = b + f.length;
345
+ /* @__PURE__ */ e.jsx(k, { children: a({ name: C, originalValue: g, index: s++ }) }, `param-${C}`)
346
+ ), d = b + g.length;
346
347
  }), d < n.length && c.push(
347
348
  /* @__PURE__ */ e.jsx(k, { children: n.slice(d) }, `text-${d}-${n.length}`)
348
349
  ), // eslint-disable-next-line react/no-array-index-key
@@ -424,10 +425,10 @@ const le = (t) => Math.abs(
424
425
  children: r,
425
426
  onClick: i
426
427
  }) => {
427
- const l = q(null), c = s == null ? void 0 : s.replace(/[{}]/g, ""), d = t.replace(/[{}]/g, ""), { text: u, background: f } = ha(d), C = `hsl(${u} / 100%)`, b = `hsl(${f} / 10%)`, p = `hsl(${f} / 50%)`;
428
- return ge(() => {
428
+ const l = q(null), c = s == null ? void 0 : s.replace(/[{}]/g, ""), d = t.replace(/[{}]/g, ""), { text: u, background: g } = ha(d), C = `hsl(${u} / 100%)`, b = `hsl(${g} / 10%)`, p = `hsl(${g} / 50%)`;
429
+ return fe(() => {
429
430
  if (!c || !l.current) return;
430
- const g = () => {
431
+ const f = () => {
431
432
  document.querySelectorAll(`[${ce}="${c}"]`).forEach((y) => {
432
433
  y instanceof HTMLElement && (y.dataset.active = "true");
433
434
  });
@@ -436,8 +437,8 @@ const le = (t) => Math.abs(
436
437
  y instanceof HTMLElement && (y.dataset.active = "false");
437
438
  });
438
439
  }, v = l.current;
439
- return v.addEventListener("mouseenter", g), v.addEventListener("mouseleave", h), () => {
440
- v.removeEventListener("mouseenter", g), v.removeEventListener("mouseleave", h);
440
+ return v.addEventListener("mouseenter", f), v.addEventListener("mouseleave", h), () => {
441
+ v.removeEventListener("mouseenter", f), v.removeEventListener("mouseleave", h);
441
442
  };
442
443
  }, [c]), /* @__PURE__ */ e.jsx(
443
444
  "span",
@@ -474,7 +475,7 @@ const le = (t) => Math.abs(
474
475
  return s.queryParams.filter((i) => i.active).forEach((i) => {
475
476
  r.searchParams.set(i.name, i.value);
476
477
  }), r;
477
- }, nt = j.Root, rt = j.Trigger, ga = j.Group, fa = x.forwardRef(({ className: t, inset: a, children: s, ...n }, r) => /* @__PURE__ */ e.jsxs(
478
+ }, nt = j.Root, rt = j.Trigger, fa = j.Group, ga = x.forwardRef(({ className: t, inset: a, children: s, ...n }, r) => /* @__PURE__ */ e.jsxs(
478
479
  j.SubTrigger,
479
480
  {
480
481
  ref: r,
@@ -490,7 +491,7 @@ const le = (t) => Math.abs(
490
491
  ]
491
492
  }
492
493
  ));
493
- fa.displayName = j.SubTrigger.displayName;
494
+ ga.displayName = j.SubTrigger.displayName;
494
495
  const ya = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
495
496
  j.SubContent,
496
497
  {
@@ -595,7 +596,7 @@ const ba = ({
595
596
  return /* @__PURE__ */ e.jsxs("div", { children: [
596
597
  /* @__PURE__ */ e.jsx(ot, { children: s.mediaType }),
597
598
  /* @__PURE__ */ e.jsx(it, {}),
598
- /* @__PURE__ */ e.jsx(ga, { children: (n = s.examples) == null ? void 0 : n.map((r) => /* @__PURE__ */ e.jsx(
599
+ /* @__PURE__ */ e.jsx(fa, { children: (n = s.examples) == null ? void 0 : n.map((r) => /* @__PURE__ */ e.jsx(
599
600
  Te,
600
601
  {
601
602
  onSelect: () => a(r),
@@ -805,9 +806,9 @@ const Ea = ({
805
806
  onEnterPress: i,
806
807
  ref: l
807
808
  }) => {
808
- const [c, d] = U(!1), [u, f] = U(!1), C = Ft((p) => p.filtered.count), b = q(null);
809
+ const [c, d] = U(!1), [u, g] = U(!1), C = Ft((p) => p.filtered.count), b = q(null);
809
810
  return /* @__PURE__ */ e.jsxs(Oa, { open: c, children: [
810
- /* @__PURE__ */ e.jsx(Yt, { children: /* @__PURE__ */ e.jsx(
811
+ /* @__PURE__ */ e.jsx(Xt, { children: /* @__PURE__ */ e.jsx(
811
812
  dt,
812
813
  {
813
814
  ref: (p) => {
@@ -821,8 +822,8 @@ const Ea = ({
821
822
  u || d(!1);
822
823
  },
823
824
  onKeyDown: (p) => {
824
- var g;
825
- p.key === "Enter" && (d(!1), (g = b.current) == null || g.blur(), i == null || i(p));
825
+ var f;
826
+ p.key === "Enter" && (d(!1), (f = b.current) == null || f.blur(), i == null || i(p));
826
827
  },
827
828
  onValueChange: (p) => s(p)
828
829
  }
@@ -830,8 +831,8 @@ const Ea = ({
830
831
  /* @__PURE__ */ e.jsx(
831
832
  ut,
832
833
  {
833
- onMouseEnter: () => f(!0),
834
- onMouseLeave: () => f(!1),
834
+ onMouseEnter: () => g(!0),
835
+ onMouseLeave: () => g(!1),
835
836
  onOpenAutoFocus: (p) => p.preventDefault(),
836
837
  className: m("p-0 w-[--radix-popover-trigger-width]", {
837
838
  "border-0": C === 0
@@ -848,8 +849,8 @@ const Ea = ({
848
849
  mt,
849
850
  {
850
851
  value: p,
851
- onSelect: (g) => {
852
- s(g), d(!1);
852
+ onSelect: (f) => {
853
+ s(f), d(!1);
853
854
  },
854
855
  className: "cursor-pointer",
855
856
  children: p
@@ -861,7 +862,7 @@ const Ea = ({
861
862
  ] });
862
863
  }, ee = ({ shouldFilter: t, ...a }) => /* @__PURE__ */ e.jsx(lt, { className: "bg-transparent", shouldFilter: t, children: /* @__PURE__ */ e.jsx(Ea, { ...a }) }), Se = (t, a) => {
863
864
  const s = x.forwardRef(({ className: n, asChild: r, ...i }, l) => {
864
- const c = r ? ea : t;
865
+ const c = r ? Yt : t;
865
866
  return x.createElement(c, {
866
867
  ...i,
867
868
  ref: l,
@@ -906,26 +907,26 @@ const Ea = ({
906
907
  control: t,
907
908
  headers: a
908
909
  }) => {
909
- const { fields: s, append: n, remove: r } = fe({
910
+ const { fields: s, append: n, remove: r } = ge({
910
911
  control: t,
911
912
  name: "headers"
912
- }), { setValue: i, watch: l } = ye(), c = q([]), d = q([]), u = l("headers"), f = Lt(() => {
913
+ }), { setValue: i, watch: l } = ye(), c = q([]), d = q([]), u = l("headers"), g = Lt(() => {
913
914
  n({ name: "", value: "", active: !1 });
914
915
  }, [n]);
915
- ge(() => {
916
- u.length === 0 && f();
917
- }, [u, f]);
918
- const C = (g) => {
916
+ fe(() => {
917
+ u.length === 0 && g();
918
+ }, [u, g]);
919
+ const C = (f) => {
919
920
  var h;
920
- (h = c.current[g]) == null || h.focus();
921
- }, b = (g) => {
922
- f(), requestAnimationFrame(() => {
921
+ (h = c.current[f]) == null || h.focus();
922
+ }, b = (f) => {
923
+ g(), requestAnimationFrame(() => {
923
924
  var h;
924
- return (h = d.current[g + 1]) == null ? void 0 : h.focus();
925
+ return (h = d.current[f + 1]) == null ? void 0 : h.focus();
925
926
  });
926
- }, p = a.filter((g) => !u.some((h) => h.name === g.name)).map(({ name: g }) => g);
927
+ }, p = a.filter((f) => !u.some((h) => h.name === f.name)).map(({ name: f }) => f);
927
928
  return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
928
- /* @__PURE__ */ e.jsx(se, { className: "overflow-hidden", children: /* @__PURE__ */ e.jsx(Pe, { children: s.map((g, h) => {
929
+ /* @__PURE__ */ e.jsx(se, { className: "overflow-hidden", children: /* @__PURE__ */ e.jsx(Pe, { children: s.map((f, h) => {
929
930
  const v = a.find(
930
931
  (y) => y.name === l(`headers.${h}.name`)
931
932
  );
@@ -1019,13 +1020,13 @@ const Ea = ({
1019
1020
  }
1020
1021
  )
1021
1022
  ] })
1022
- ] }, g.id);
1023
+ ] }, f.id);
1023
1024
  }) }) }),
1024
1025
  /* @__PURE__ */ e.jsx("div", { className: "text-end", children: /* @__PURE__ */ e.jsx(
1025
1026
  K,
1026
1027
  {
1027
1028
  className: "",
1028
- onClick: f,
1029
+ onClick: g,
1029
1030
  type: "button",
1030
1031
  variant: "secondary",
1031
1032
  children: "Add header"
@@ -1035,7 +1036,7 @@ const Ea = ({
1035
1036
  }, Da = ({
1036
1037
  control: t
1037
1038
  }) => {
1038
- const { fields: a } = fe({
1039
+ const { fields: a } = ge({
1039
1040
  control: t,
1040
1041
  name: "pathParams"
1041
1042
  });
@@ -1079,7 +1080,7 @@ const Ea = ({
1079
1080
  control: t,
1080
1081
  queryParams: a
1081
1082
  }) => {
1082
- const { fields: s } = fe({
1083
+ const { fields: s } = ge({
1083
1084
  control: t,
1084
1085
  name: "queryParams"
1085
1086
  }), n = ye(), r = a.map((i) => !!i.isRequired);
@@ -1145,8 +1146,8 @@ const Ea = ({
1145
1146
  {
1146
1147
  value: d.value,
1147
1148
  options: c.enum ?? [],
1148
- onChange: (f) => {
1149
- d.onChange(f), n.setValue(`queryParams.${l}.active`, !0);
1149
+ onChange: (g) => {
1150
+ d.onChange(g), n.setValue(`queryParams.${l}.active`, !0);
1150
1151
  },
1151
1152
  className: "font-mono text-xs border-0 ring-1 ring-ring"
1152
1153
  }
@@ -1154,8 +1155,8 @@ const Ea = ({
1154
1155
  be,
1155
1156
  {
1156
1157
  ...d,
1157
- onChange: (f) => {
1158
- d.onChange(f.target.value), f.target.value.length > 0 && n.setValue(`queryParams.${l}.active`, !0);
1158
+ onChange: (g) => {
1159
+ d.onChange(g.target.value), g.target.value.length > 0 && n.setValue(`queryParams.${l}.active`, !0);
1159
1160
  },
1160
1161
  placeholder: "Enter value",
1161
1162
  className: "w-full border-0 shadow-none focus-visible:ring-0 text-xs font-mono"
@@ -1303,7 +1304,7 @@ const Ua = {
1303
1304
  url: i
1304
1305
  }) => {
1305
1306
  var p;
1306
- const l = _a(a), c = Ja(t), d = c || t, [u, f] = U(
1307
+ const l = _a(a), c = Ja(t), d = c || t, [u, g] = U(
1307
1308
  c ? "formatted" : "raw"
1308
1309
  ), C = It({
1309
1310
  queryKey: ["types", d],
@@ -1317,10 +1318,10 @@ const Ua = {
1317
1318
  /* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Headers" })
1318
1319
  ] }),
1319
1320
  /* @__PURE__ */ e.jsx(Me, { children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-[auto,1fr] gap-x-8 gap-y-1 pl-1.5 pt-2 font-mono text-xs", children: [
1320
- b.slice(0, 5).map(([g, h]) => /* @__PURE__ */ e.jsxs(k, { children: [
1321
- /* @__PURE__ */ e.jsx("div", { className: "text-primary whitespace-pre", children: g }),
1321
+ b.slice(0, 5).map(([f, h]) => /* @__PURE__ */ e.jsxs(k, { children: [
1322
+ /* @__PURE__ */ e.jsx("div", { className: "text-primary whitespace-pre", children: f }),
1322
1323
  /* @__PURE__ */ e.jsx("div", { className: "break-all", children: h })
1323
- ] }, g)),
1324
+ ] }, f)),
1324
1325
  b.length > 5 && /* @__PURE__ */ e.jsxs(Be, { className: "col-span-full grid-cols-subgrid grid", children: [
1325
1326
  /* @__PURE__ */ e.jsxs(Ue, { className: "col-span-2 text-xs text-muted-foreground hover:text-primary flex items-center gap-1 py-1", children: [
1326
1327
  /* @__PURE__ */ e.jsx(B, { className: "h-3 w-3 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
@@ -1328,15 +1329,15 @@ const Ua = {
1328
1329
  b.length - 5,
1329
1330
  " more headers"
1330
1331
  ] }),
1331
- /* @__PURE__ */ e.jsx(Me, { className: "col-span-full grid grid-cols-subgrid gap-x-8 gap-y-1 ", children: b.slice(5).map(([g, h]) => /* @__PURE__ */ e.jsxs(k, { children: [
1332
- /* @__PURE__ */ e.jsx("div", { className: "text-primary whitespace-pre", children: g }),
1332
+ /* @__PURE__ */ e.jsx(Me, { className: "col-span-full grid grid-cols-subgrid gap-x-8 gap-y-1 ", children: b.slice(5).map(([f, h]) => /* @__PURE__ */ e.jsxs(k, { children: [
1333
+ /* @__PURE__ */ e.jsx("div", { className: "text-primary whitespace-pre", children: f }),
1333
1334
  /* @__PURE__ */ e.jsx("div", { className: "break-all", children: h })
1334
- ] }, g)) })
1335
+ ] }, f)) })
1335
1336
  ] })
1336
1337
  ] }) })
1337
1338
  ] }),
1338
1339
  /* @__PURE__ */ e.jsx(je, { className: "shadow-none", children: /* @__PURE__ */ e.jsx(
1339
- Kt,
1340
+ ta,
1340
1341
  {
1341
1342
  language: u === "types" ? "typescript" : u === "raw" ? c ? "plain" : l : "json",
1342
1343
  noBackground: !0,
@@ -1371,7 +1372,7 @@ const Ua = {
1371
1372
  Qe,
1372
1373
  {
1373
1374
  value: u,
1374
- onValueChange: (g) => f(g),
1375
+ onValueChange: (f) => g(f),
1375
1376
  children: [
1376
1377
  /* @__PURE__ */ e.jsx(Ze, { className: "min-w-32", children: /* @__PURE__ */ e.jsx(We, { placeholder: "View" }) }),
1377
1378
  /* @__PURE__ */ e.jsxs(Ke, { children: [
@@ -1391,7 +1392,7 @@ const Ua = {
1391
1392
  var n;
1392
1393
  const s = ((((n = t.data) == null ? void 0 : n.status) ?? 0) / 100).toFixed(0);
1393
1394
  return /* @__PURE__ */ e.jsx("div", { className: "min-w-0 p-8 bg-muted/70 overflow-y-auto", children: t.error ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
1394
- a && /* @__PURE__ */ e.jsx(ta, { type: "caution", children: "Some path parameters are missing values. Please fill them in to ensure the request is sent correctly." }),
1395
+ a && /* @__PURE__ */ e.jsx(ea, { type: "caution", children: "Some path parameters are missing values. Please fill them in to ensure the request is sent correctly." }),
1395
1396
  /* @__PURE__ */ e.jsxs(je, { children: [
1396
1397
  /* @__PURE__ */ e.jsx(Jt, { children: /* @__PURE__ */ e.jsx(Qt, { children: "Request failed" }) }),
1397
1398
  /* @__PURE__ */ e.jsxs(Zt, { children: [
@@ -1436,7 +1437,7 @@ const Ua = {
1436
1437
  url: t.data.request.url
1437
1438
  }
1438
1439
  ) })
1439
- ] }) }) : /* @__PURE__ */ e.jsx("div", { className: "grid place-items-center h-full", children: /* @__PURE__ */ e.jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children: t.isPending ? /* @__PURE__ */ e.jsx(Xt, {}) : "Send a request first to see the response here" }) }) });
1440
+ ] }) }) : /* @__PURE__ */ e.jsx("div", { className: "grid place-items-center h-full", children: /* @__PURE__ */ e.jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children: t.isPending ? /* @__PURE__ */ e.jsx(Kt, {}) : "Send a request first to see the response here" }) }) });
1440
1441
  }, Ka = ({
1441
1442
  identities: t,
1442
1443
  formRef: a,
@@ -1498,9 +1499,9 @@ const Ua = {
1498
1499
  examples: d
1499
1500
  }) => {
1500
1501
  var Oe, Ee, Ae;
1501
- const { selectedServer: u, setSelectedServer: f } = Ot(
1502
+ const { selectedServer: u, setSelectedServer: g } = Ot(
1502
1503
  a.map((o) => ({ url: o }))
1503
- ), [, C] = Vt(), { register: b, control: p, handleSubmit: g, watch: h, setValue: v, ...y } = Mt({
1504
+ ), [, C] = Vt(), { register: b, control: p, handleSubmit: f, watch: h, setValue: v, ...y } = Mt({
1504
1505
  defaultValues: {
1505
1506
  body: c,
1506
1507
  queryParams: i.map((o) => ({
@@ -1534,7 +1535,7 @@ const Ua = {
1534
1535
  identity: H
1535
1536
  }
1536
1537
  }), N = h(), w = Et(), L = q(!1);
1537
- ge(() => {
1538
+ fe(() => {
1538
1539
  var R;
1539
1540
  if (L.current) return;
1540
1541
  const o = (R = w.data) == null ? void 0 : R.at(0);
@@ -1557,18 +1558,18 @@ const Ua = {
1557
1558
  try {
1558
1559
  const T = await fetch(S, {
1559
1560
  signal: AbortSignal.timeout(5e3)
1560
- }), gt = performance.now() - R, qe = await T.text(), ft = new URL(S.url);
1561
+ }), ft = performance.now() - R, qe = await T.text(), gt = new URL(S.url);
1561
1562
  return {
1562
1563
  status: T.status,
1563
1564
  headers: Array.from(T.headers.entries()),
1564
1565
  size: qe.length,
1565
1566
  body: qe,
1566
- time: gt,
1567
+ time: ft,
1567
1568
  request: {
1568
1569
  method: S.method.toUpperCase(),
1569
1570
  url: S.url,
1570
1571
  headers: [
1571
- ["Host", ft.host],
1572
+ ["Host", gt.host],
1572
1573
  ["User-Agent", "Zudoku Playground"],
1573
1574
  ...Array.from(S.headers.entries())
1574
1575
  ],
@@ -1612,7 +1613,7 @@ const Ua = {
1612
1613
  Qe,
1613
1614
  {
1614
1615
  onValueChange: (o) => {
1615
- C(() => f(o));
1616
+ C(() => g(o));
1616
1617
  },
1617
1618
  value: u,
1618
1619
  defaultValue: u,
@@ -1627,14 +1628,14 @@ const Ua = {
1627
1628
  {
1628
1629
  register: b,
1629
1630
  control: p,
1630
- handleSubmit: g,
1631
+ handleSubmit: f,
1631
1632
  watch: h,
1632
1633
  setValue: v,
1633
1634
  ...y,
1634
1635
  children: /* @__PURE__ */ e.jsx(
1635
1636
  "form",
1636
1637
  {
1637
- onSubmit: g((o) => _.mutateAsync(o)),
1638
+ onSubmit: f((o) => _.mutateAsync(o)),
1638
1639
  ref: V,
1639
1640
  children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-2 text-sm h-full", children: [
1640
1641
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 p-4 after:bg-muted-foreground/20 relative after:absolute after:w-px after:inset-0 after:left-auto", children: [
@@ -1868,7 +1869,7 @@ const Ua = {
1868
1869
  }), Je = (t) => ({
1869
1870
  path: t.routePath,
1870
1871
  async lazy() {
1871
- const { OasProvider: a } = await import("./OasProvider-WVtvHP5H.js");
1872
+ const { OasProvider: a } = await import("./OasProvider-Bvu4dDpX.js");
1872
1873
  return {
1873
1874
  element: /* @__PURE__ */ e.jsx(
1874
1875
  a,
@@ -1889,7 +1890,7 @@ const Ua = {
1889
1890
  }) => ({
1890
1891
  path: t,
1891
1892
  async lazy() {
1892
- const { OperationList: n } = await import("./OperationList-DhOwupvv.js");
1893
+ const { OperationList: n } = await import("./OperationList-DWnNbwVg.js");
1893
1894
  return { element: /* @__PURE__ */ e.jsx(n, { tag: a, untagged: s }) };
1894
1895
  }
1895
1896
  }), as = (t, a) => {
@@ -1974,7 +1975,7 @@ const Ua = {
1974
1975
  }
1975
1976
  }
1976
1977
  }
1977
- `), G = "~endpoints", Is = (t) => {
1978
+ `), G = "~endpoints", Os = (t) => {
1978
1979
  const a = O(t.navigationId ?? "/reference"), s = new sa(t);
1979
1980
  return {
1980
1981
  getHead: () => {
@@ -2038,9 +2039,9 @@ const Ua = {
2038
2039
  n
2039
2040
  );
2040
2041
  try {
2041
- const l = r == null ? void 0 : r.params.version, c = l ?? pt(t).at(0), d = t.type, u = t.type === "file" ? t.input[c] : t.input, f = t.loadTags === !0 || t.type === "url", C = !t.loadTags && t.type !== "url", b = (i = t.tagPages) == null ? void 0 : i.find(
2042
+ const l = r == null ? void 0 : r.params.version, c = l ?? pt(t).at(0), d = t.type, u = t.type === "file" ? t.input[c] : t.input, g = t.loadTags === !0 || t.type === "url", C = !t.loadTags && t.type !== "url", b = (i = t.tagPages) == null ? void 0 : i.find(
2042
2043
  (v) => W(v) === (r == null ? void 0 : r.params.tag)
2043
- ), [p, g] = await Promise.all([
2044
+ ), [p, f] = await Promise.all([
2044
2045
  s.fetch(ns, { type: d, input: u }),
2045
2046
  s.fetch(rs, {
2046
2047
  type: d,
@@ -2052,7 +2053,7 @@ const Ua = {
2052
2053
  a,
2053
2054
  l,
2054
2055
  W(v.name)
2055
- ), N = g.schema.operations.filter(
2056
+ ), N = f.schema.operations.filter(
2056
2057
  (w) => {
2057
2058
  var L, V;
2058
2059
  return ((L = w.tags) == null ? void 0 : L.length) !== 0 && ((V = w.tags) == null ? void 0 : V.map((_) => _.name).includes(v.name));
@@ -2062,16 +2063,16 @@ const Ua = {
2062
2063
  label: v.name,
2063
2064
  path: y,
2064
2065
  operations: (r == null ? void 0 : r.params.tag) !== G || t.loadTags ? N : [],
2065
- collapsible: f,
2066
+ collapsible: g,
2066
2067
  collapsed: C
2067
2068
  });
2068
2069
  });
2069
- return g.schema.untagged.length > 0 && h.push(
2070
+ return f.schema.untagged.length > 0 && h.push(
2070
2071
  _e({
2071
2072
  label: "Other endpoints",
2072
2073
  path: O(a, l, G),
2073
- operations: (r == null ? void 0 : r.params.tag) === G || t.loadTags ? g.schema.untagged : [],
2074
- collapsible: f,
2074
+ operations: (r == null ? void 0 : r.params.tag) === G || t.loadTags ? f.schema.untagged : [],
2075
+ collapsible: g,
2075
2076
  collapsed: C
2076
2077
  })
2077
2078
  ), h;
@@ -2093,6 +2094,6 @@ export {
2093
2094
  ua as e,
2094
2095
  pt as g,
2095
2096
  za as m,
2096
- Is as o
2097
+ Os as o
2097
2098
  };
2098
- //# sourceMappingURL=index-Do_30Hpk.js.map
2099
+ //# sourceMappingURL=index-DVBlM15k.js.map