zudoku 0.23.8 → 0.24.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 (61) hide show
  1. package/dist/cli/cmds/dev.js +5 -0
  2. package/dist/cli/cmds/dev.js.map +1 -1
  3. package/dist/cli/dev/handler.d.ts +1 -0
  4. package/dist/cli/dev/handler.js +1 -1
  5. package/dist/cli/dev/handler.js.map +1 -1
  6. package/dist/lib/components/index.d.ts +17 -13
  7. package/dist/lib/components/index.js +6 -2
  8. package/dist/lib/components/index.js.map +1 -1
  9. package/dist/lib/components/navigation/SidebarItem.js +1 -1
  10. package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
  11. package/dist/lib/oas/parser/dereference/index.d.ts +1 -0
  12. package/dist/lib/oas/parser/dereference/index.js +6 -3
  13. package/dist/lib/oas/parser/dereference/index.js.map +1 -1
  14. package/dist/lib/plugins/openapi/index.js +6 -5
  15. package/dist/lib/plugins/openapi/index.js.map +1 -1
  16. package/dist/lib/plugins/openapi/schema/SchemaComponents.js +7 -1
  17. package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +1 -1
  18. package/dist/vite/dev-server.d.ts +1 -0
  19. package/dist/vite/dev-server.js +4 -0
  20. package/dist/vite/dev-server.js.map +1 -1
  21. package/lib/{AuthenticationPlugin-fB7viE7A.js → AuthenticationPlugin-DVLEc6cm.js} +2 -2
  22. package/lib/{AuthenticationPlugin-fB7viE7A.js.map → AuthenticationPlugin-DVLEc6cm.js.map} +1 -1
  23. package/lib/{MdxPage-CPBw4_lf.js → MdxPage-DKMbBROv.js} +2 -2
  24. package/lib/{MdxPage-CPBw4_lf.js.map → MdxPage-DKMbBROv.js.map} +1 -1
  25. package/lib/{OperationList-Cdbaz-V3.js → OperationList-CqLL5P5l.js} +574 -568
  26. package/lib/{OperationList-Cdbaz-V3.js.map → OperationList-CqLL5P5l.js.map} +1 -1
  27. package/lib/{Route-Ag5MH86N.js → Route-DYwKZ_c_.js} +2 -2
  28. package/lib/{Route-Ag5MH86N.js.map → Route-DYwKZ_c_.js.map} +1 -1
  29. package/lib/{Select-D3XuKKuH.js → Select-B_IxRUUC.js} +3 -3
  30. package/lib/{Select-D3XuKKuH.js.map → Select-B_IxRUUC.js.map} +1 -1
  31. package/lib/{utils-B4O1uet5.js → ZudokuContext-hmLMUdf2.js} +37 -37
  32. package/lib/ZudokuContext-hmLMUdf2.js.map +1 -0
  33. package/lib/assets/{worker-D2kRl-cG.js → worker-DV9Ecqy9.js} +348 -346
  34. package/lib/assets/{worker-D2kRl-cG.js.map → worker-DV9Ecqy9.js.map} +1 -1
  35. package/lib/{createServer-69sLlmQA.js → createServer-C4C0OO0m.js} +1250 -1285
  36. package/lib/createServer-C4C0OO0m.js.map +1 -0
  37. package/lib/{hook-DgGeo5iL.js → hook-CHq7pFyz.js} +2 -2
  38. package/lib/{hook-DgGeo5iL.js.map → hook-CHq7pFyz.js.map} +1 -1
  39. package/lib/index-DyBL--Kz.js +826 -0
  40. package/lib/index-DyBL--Kz.js.map +1 -0
  41. package/lib/{index-Bfm--TJU.js → index-DzRORsY1.js} +128 -130
  42. package/lib/{index-Bfm--TJU.js.map → index-DzRORsY1.js.map} +1 -1
  43. package/lib/zudoku.auth-clerk.js +1 -1
  44. package/lib/zudoku.auth-openid.js +2 -2
  45. package/lib/zudoku.components.js +173 -172
  46. package/lib/zudoku.components.js.map +1 -1
  47. package/lib/zudoku.openapi-worker.js +1 -1
  48. package/lib/zudoku.plugin-api-catalog.js +1 -1
  49. package/lib/zudoku.plugin-api-keys.js +3 -3
  50. package/lib/zudoku.plugin-markdown.js +1 -1
  51. package/lib/zudoku.plugin-openapi.js +3 -3
  52. package/package.json +3 -3
  53. package/src/lib/components/index.ts +7 -3
  54. package/src/lib/components/navigation/SidebarItem.tsx +1 -1
  55. package/src/lib/oas/parser/dereference/index.ts +9 -4
  56. package/src/lib/plugins/openapi/index.tsx +7 -5
  57. package/src/lib/plugins/openapi/schema/SchemaComponents.tsx +25 -1
  58. package/lib/createServer-69sLlmQA.js.map +0 -1
  59. package/lib/object_hash-BNWPnMN9.js +0 -787
  60. package/lib/object_hash-BNWPnMN9.js.map +0 -1
  61. package/lib/utils-B4O1uet5.js.map +0 -1
@@ -4,12 +4,12 @@ var me = (e) => {
4
4
  };
5
5
  var qe = (e, n, s) => n in e ? Ie(e, n, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[n] = s;
6
6
  var W = (e, n, s) => qe(e, typeof n != "symbol" ? n + "" : n, s), pe = (e, n, s) => n.has(e) || me("Cannot " + s);
7
- var y = (e, n, s) => (pe(e, n, "read from private field"), s ? s.call(e) : n.get(e)), R = (e, n, s) => n.has(e) ? me("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(e) : n.set(e, s), M = (e, n, s, a) => (pe(e, n, "write to private field"), a ? a.call(e, s) : n.set(e, s), s);
7
+ var y = (e, n, s) => (pe(e, n, "read from private field"), s ? s.call(e) : n.get(e)), R = (e, n, s) => n.has(e) ? me("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(e) : n.set(e, s), M = (e, n, s, r) => (pe(e, n, "write to private field"), r ? r.call(e, s) : n.set(e, s), s);
8
8
  import { j as t } from "./jsx-runtime-Dx-03ztt.js";
9
9
  import { m as Re } from "./chunk-D52XG6IA-Dl7HLe6j.js";
10
- import { i as Me, j as he, k as Ae } from "./utils-B4O1uet5.js";
10
+ import { i as Me, j as he, k as Ae } from "./ZudokuContext-hmLMUdf2.js";
11
11
  import { XIcon as Ve, EraserIcon as Ce, ChevronsUpDownIcon as ze, LogInIcon as Fe, CirclePlayIcon as Le } from "lucide-react";
12
- import { u as De } from "./hook-DgGeo5iL.js";
12
+ import { u as De } from "./hook-CHq7pFyz.js";
13
13
  import { Button as E } from "./ui/Button.js";
14
14
  import { initializeWorker as Ge } from "zudoku/openapi-worker";
15
15
  import { Z as Be } from "./invariant-Caa8-XvF.js";
@@ -17,7 +17,7 @@ import { VisuallyHidden as Je } from "@radix-ui/react-visually-hidden";
17
17
  import * as fe from "react";
18
18
  import { useRef as $e, useEffect as Te, useState as Ee, useTransition as He, Fragment as Z } from "react";
19
19
  import { D as Qe, b as Ue, a as We, c as Ze } from "./Dialog-Bxv1yEIg.js";
20
- import { u as Ke, S as xe, a as ye, b as ge, c as ve, e as K } from "./Select-D3XuKKuH.js";
20
+ import { u as Ke, S as xe, a as ye, b as ge, c as ve, e as K } from "./Select-B_IxRUUC.js";
21
21
  import { b as oe, C as $, u as Xe, a as Ye, F as et } from "./index.esm-BnnBRKJX.js";
22
22
  import { a as tt } from "./state-CFQsUZUP.js";
23
23
  import { S as je } from "./Spinner-DuxJLLNE.js";
@@ -25,14 +25,14 @@ import { Callout as nt } from "./ui/Callout.js";
25
25
  import { Card as ae, CardHeader as st, CardTitle as rt, CardContent as at } from "./ui/Card.js";
26
26
  import { Tabs as be, TabsList as Ne, TabsTrigger as A, TabsContent as V } from "./ui/Tabs.js";
27
27
  import { z as ot, S as it } from "./SyntaxHighlight-Bz-lOJtH.js";
28
- import { c as O } from "./cn-qaFjX9_3.js";
28
+ import { c as P } from "./cn-qaFjX9_3.js";
29
29
  import { Input as H } from "./ui/Input.js";
30
30
  import { Slot as lt } from "@radix-ui/react-slot";
31
31
  class L extends String {
32
- constructor(s, a) {
32
+ constructor(s, r) {
33
33
  super(s);
34
34
  W(this, "__apiType");
35
- this.value = s, this.__meta__ = a;
35
+ this.value = s, this.__meta__ = r;
36
36
  }
37
37
  toString() {
38
38
  return this.value;
@@ -264,10 +264,10 @@ function jt(e) {
264
264
  }
265
265
  class g extends Error {
266
266
  constructor(n, s) {
267
- const a = [...arguments], { options: r, shortMessage: i } = jt(a);
267
+ const r = [...arguments], { options: a, shortMessage: i } = jt(r);
268
268
  let l = i;
269
- if (r.cause && (l = `${l}: ${r.cause.message}`), super(l), this.message = l, r.name && typeof r.name == "string" ? this.name = r.name : this.name = vt(), r.cause && Object.defineProperty(this, "_cause", { value: r.cause }), Object.defineProperty(this, "_info", { value: {} }), r.info && typeof r.info == "object" && Object.assign(this._info, r.info), Error.captureStackTrace) {
270
- const u = r.constructorOpt || this.constructor;
269
+ if (a.cause && (l = `${l}: ${a.cause.message}`), super(l), this.message = l, a.name && typeof a.name == "string" ? this.name = a.name : this.name = vt(), a.cause && Object.defineProperty(this, "_cause", { value: a.cause }), Object.defineProperty(this, "_info", { value: {} }), a.info && typeof a.info == "object" && Object.assign(this._info, a.info), Error.captureStackTrace) {
270
+ const u = a.constructorOpt || this.constructor;
271
271
  Error.captureStackTrace(this, u);
272
272
  }
273
273
  }
@@ -282,23 +282,23 @@ caused by: ${g.fullStack(s)}` : n.stack ?? "";
282
282
  }
283
283
  static info(n) {
284
284
  X(n);
285
- const s = {}, a = g.cause(n);
286
- return a && Object.assign(s, g.info(a)), n._info && Object.assign(s, n._info), s;
285
+ const s = {}, r = g.cause(n);
286
+ return r && Object.assign(s, g.info(r)), n._info && Object.assign(s, n._info), s;
287
287
  }
288
288
  toString() {
289
289
  let n = this.name || this.constructor.name || this.constructor.prototype.name;
290
290
  return this.message && (n = `${n}: ${this.message}`), n;
291
291
  }
292
292
  }
293
- const Oe = "0123456789ABCDEFGHJKMNPQRSTVWXYZ", F = 32, we = 281474976710655, bt = 10, Nt = 16, z = Object.freeze({
293
+ const Pe = "0123456789ABCDEFGHJKMNPQRSTVWXYZ", F = 32, we = 281474976710655, bt = 10, Nt = 16, z = Object.freeze({
294
294
  source: "ulid"
295
295
  });
296
296
  function wt(e) {
297
297
  const n = St(), s = n && (n.crypto || n.msCrypto) || null;
298
298
  if (typeof (s == null ? void 0 : s.getRandomValues) == "function")
299
299
  return () => {
300
- const a = new Uint8Array(1);
301
- return s.getRandomValues(a), a[0] / 255;
300
+ const r = new Uint8Array(1);
301
+ return s.getRandomValues(r), r[0] / 255;
302
302
  };
303
303
  if (typeof (s == null ? void 0 : s.randomBytes) == "function")
304
304
  return () => s.randomBytes(1).readUInt8() / 255;
@@ -347,24 +347,24 @@ function $t(e, n) {
347
347
  ...z
348
348
  }
349
349
  }, `Time must be an integer: ${e}`);
350
- let s, a = "";
351
- for (let r = n; r > 0; r--)
352
- s = e % F, a = Oe.charAt(s) + a, e = (e - s) / F;
353
- return a;
350
+ let s, r = "";
351
+ for (let a = n; a > 0; a--)
352
+ s = e % F, r = Pe.charAt(s) + r, e = (e - s) / F;
353
+ return r;
354
354
  }
355
355
  function Tt() {
356
356
  return typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope;
357
357
  }
358
358
  function Et(e) {
359
359
  let n = Math.floor(e() * F);
360
- return n === F && (n = F - 1), Oe.charAt(n);
360
+ return n === F && (n = F - 1), Pe.charAt(n);
361
361
  }
362
- function Ot(e, n) {
363
- const s = wt(), a = isNaN(e) ? Date.now() : e;
364
- return $t(a, bt) + Ct(Nt, s);
362
+ function Pt(e, n) {
363
+ const s = wt(), r = isNaN(e) ? Date.now() : e;
364
+ return $t(r, bt) + Ct(Nt, s);
365
365
  }
366
366
  let Y, ee;
367
- const Pt = async (e) => {
367
+ const Ot = async (e) => {
368
368
  e && typeof e == "object" && "type" in e && e.type === "file" && "input" in e && typeof e.input == "function" && (e.input = await e.input());
369
369
  }, te = (e) => {
370
370
  var n;
@@ -373,23 +373,23 @@ const Pt = async (e) => {
373
373
  developerHint: "Check your configuration value `apis.type` and `apis.input` in the Zudoku config."
374
374
  });
375
375
  };
376
- var T, P, N, Q;
376
+ var T, O, N, Q;
377
377
  class kt {
378
378
  constructor(n) {
379
379
  R(this, T);
380
- R(this, P, /* @__PURE__ */ new Map());
380
+ R(this, O, /* @__PURE__ */ new Map());
381
381
  R(this, N);
382
- R(this, Q, () => import("./createServer-69sLlmQA.js").then((n) => n.createServer()));
382
+ R(this, Q, () => import("./createServer-C4C0OO0m.js").then((n) => n.createServer()));
383
383
  W(this, "fetch", async (n, ...[s]) => {
384
384
  var i;
385
- const a = (i = n.match(/query (\w+)/)) == null ? void 0 : i[1];
386
- await Pt(s);
387
- const r = JSON.stringify({ query: n, variables: s, operationName: a });
385
+ const r = (i = n.match(/query (\w+)/)) == null ? void 0 : i[1];
386
+ await Ot(s);
387
+ const a = JSON.stringify({ query: n, variables: s, operationName: r });
388
388
  switch (y(this, T)) {
389
389
  case "remote": {
390
390
  const l = await fetch(this.config.server, {
391
391
  method: "POST",
392
- body: r,
392
+ body: a,
393
393
  headers: { "Content-Type": "application/json" }
394
394
  });
395
395
  if (!l.ok)
@@ -404,7 +404,7 @@ class kt {
404
404
  const u = await l.fetch(
405
405
  new Request("http://localhost/graphql", {
406
406
  method: "POST",
407
- body: r,
407
+ body: a,
408
408
  headers: { "Content-Type": "application/json" }
409
409
  })
410
410
  );
@@ -417,17 +417,17 @@ class kt {
417
417
  if (ee || (ee = Ge()), !y(this, N)) {
418
418
  const c = new MessageChannel();
419
419
  ee.port.postMessage({ port: c.port2 }, [c.port2]), M(this, N, c.port1), y(this, N).onmessage = (f) => {
420
- const { id: h, body: j } = f.data, b = y(this, P).get(h);
420
+ const { id: h, body: j } = f.data, b = y(this, O).get(h);
421
421
  if (b) {
422
422
  const w = JSON.parse(j);
423
- b(w), y(this, P).delete(h);
423
+ b(w), y(this, O).delete(h);
424
424
  } else
425
425
  console.error(`No pending request found for id: ${h}`);
426
426
  }, y(this, N).start();
427
427
  }
428
- const l = Ot(), d = await new Promise(
428
+ const l = Pt(), d = await new Promise(
429
429
  (c) => {
430
- y(this, P).set(l, c), y(this, N).postMessage({ id: l, body: r });
430
+ y(this, O).set(l, c), y(this, N).postMessage({ id: l, body: a });
431
431
  }
432
432
  );
433
433
  return te(d), d.data;
@@ -437,28 +437,28 @@ class kt {
437
437
  this.config = n, n.server ? M(this, T, "remote") : n.inMemory || typeof SharedWorker > "u" ? M(this, T, "in-memory") : M(this, T, "worker");
438
438
  }
439
439
  }
440
- T = new WeakMap(), P = new WeakMap(), N = new WeakMap(), Q = new WeakMap();
440
+ T = new WeakMap(), O = new WeakMap(), N = new WeakMap(), Q = new WeakMap();
441
441
  const ne = (e) => Math.abs(
442
442
  isNaN(parseInt(e)) ? e.toLowerCase().charCodeAt(0) - 96 : isNaN(parseInt(e)) ? 0 : parseInt(e)
443
443
  ), se = (e) => e.length > 1 ? parseInt(e.split("").reduce((n, s) => `${ne(n) + ne(s)}`)) : ne(e), _t = (e, n = {}) => {
444
- const s = (3 * se(e) + 2 * se(e) + se(e)) % 360, { saturation: a = 75, lightness: r = 60 } = n;
445
- return `${s}deg ${a}% ${r}%`;
444
+ const s = (3 * se(e) + 2 * se(e) + se(e)) % 360, { saturation: r = 75, lightness: a = 60 } = n;
445
+ return `${s}deg ${r}% ${a}%`;
446
446
  }, re = "data-linked-param", It = (e) => {
447
447
  const { resolvedTheme: n } = ot();
448
448
  return _t(
449
449
  e,
450
450
  n === "light" ? { saturation: 85, lightness: 50 } : void 0
451
451
  );
452
- }, Pe = ({
452
+ }, Oe = ({
453
453
  name: e,
454
454
  className: n,
455
455
  backgroundOpacity: s = "100%",
456
- borderOpacity: a = "100%",
457
- slug: r,
456
+ borderOpacity: r = "100%",
457
+ slug: a,
458
458
  children: i,
459
459
  onClick: l
460
460
  }) => {
461
- const u = $e(null), d = e.replace(/[{}]/g, ""), c = r == null ? void 0 : r.replace(/[{}]/g, ""), f = It(d), h = `hsl(${f} / ${a})`, j = `hsl(${f} / ${s})`;
461
+ const u = $e(null), d = e.replace(/[{}]/g, ""), c = a == null ? void 0 : a.replace(/[{}]/g, ""), f = It(d), h = `hsl(${f} / ${r})`, j = `hsl(${f} / ${s})`;
462
462
  return Te(() => {
463
463
  if (!c || !u.current) return;
464
464
  const b = () => {
@@ -477,7 +477,7 @@ const ne = (e) => Math.abs(
477
477
  "span",
478
478
  {
479
479
  [re]: c,
480
- className: O(
480
+ className: P(
481
481
  "relative after:rounded after:absolute after:inset-0 after:-bottom-0.5 after:border-b-2 after:transition-opacity after:duration-200",
482
482
  "after:pointer-events-none after:border-[--border-color] after:opacity-30 after:data-[active=true]:opacity-100",
483
483
  n
@@ -493,22 +493,22 @@ const ne = (e) => Math.abs(
493
493
  }
494
494
  );
495
495
  }, qt = (e, n, s) => {
496
- const a = n.replace(/(:\w+|\{\w+})/g, (i) => {
496
+ const r = n.replace(/(:\w+|\{\w+})/g, (i) => {
497
497
  var d;
498
498
  const l = i.replace(/[:{}]/g, "");
499
499
  return ((d = s.pathParams.find((c) => c.name === l)) == null ? void 0 : d.value) ?? i;
500
- }), r = new URL(
501
- a.replace(/^\//, ""),
500
+ }), a = new URL(
501
+ r.replace(/^\//, ""),
502
502
  e.endsWith("/") ? e : `${e}/`
503
503
  );
504
504
  return s.queryParams.filter((i) => i.active).forEach((i) => {
505
- r.searchParams.set(i.name, i.value);
506
- }), r;
505
+ a.searchParams.set(i.name, i.value);
506
+ }), a;
507
507
  }, Rt = ({
508
508
  control: e,
509
509
  register: n
510
510
  }) => {
511
- const { fields: s, append: a, remove: r } = oe({
511
+ const { fields: s, append: r, remove: a } = oe({
512
512
  control: e,
513
513
  name: "headers"
514
514
  });
@@ -544,7 +544,7 @@ const ne = (e) => Math.abs(
544
544
  variant: "ghost",
545
545
  className: "text-muted-foreground opacity-0 group-hover:opacity-100",
546
546
  onClick: () => {
547
- r(l);
547
+ a(l);
548
548
  },
549
549
  type: "button",
550
550
  children: /* @__PURE__ */ t.jsx(Ve, { size: 16 })
@@ -559,7 +559,7 @@ const ne = (e) => Math.abs(
559
559
  E,
560
560
  {
561
561
  className: "",
562
- onClick: () => a({ name: "", value: "" }),
562
+ onClick: () => r({ name: "", value: "" }),
563
563
  type: "button",
564
564
  children: "Add header"
565
565
  }
@@ -572,23 +572,23 @@ const ne = (e) => Math.abs(
572
572
  control: e,
573
573
  name: "pathParams"
574
574
  });
575
- return /* @__PURE__ */ t.jsx("table", { className: "w-full table-auto [&_td]:border [&_td]:py-1 [&_td]:px-2", children: /* @__PURE__ */ t.jsx("tbody", { children: n.map((s, a) => /* @__PURE__ */ t.jsxs("tr", { className: "hover:bg-accent/40", children: [
575
+ return /* @__PURE__ */ t.jsx("table", { className: "w-full table-auto [&_td]:border [&_td]:py-1 [&_td]:px-2", children: /* @__PURE__ */ t.jsx("tbody", { children: n.map((s, r) => /* @__PURE__ */ t.jsxs("tr", { className: "hover:bg-accent/40", children: [
576
576
  /* @__PURE__ */ t.jsx("td", { children: /* @__PURE__ */ t.jsx(
577
577
  $,
578
578
  {
579
579
  control: e,
580
- name: `pathParams.${a}.value`,
581
- render: ({ field: r }) => /* @__PURE__ */ t.jsxs("div", { children: [
580
+ name: `pathParams.${r}.value`,
581
+ render: ({ field: a }) => /* @__PURE__ */ t.jsxs("div", { children: [
582
582
  /* @__PURE__ */ t.jsx(
583
- Pe,
583
+ Oe,
584
584
  {
585
585
  slug: s.name,
586
586
  name: s.name,
587
587
  backgroundOpacity: "25%",
588
- borderOpacity: r.value ? "100%" : "0",
589
- className: O(
588
+ borderOpacity: a.value ? "100%" : "0",
589
+ className: P(
590
590
  "font-mono text-xs m-2",
591
- !r.value && "opacity-60"
591
+ !a.value && "opacity-60"
592
592
  )
593
593
  }
594
594
  ),
@@ -601,11 +601,11 @@ const ne = (e) => Math.abs(
601
601
  $,
602
602
  {
603
603
  control: e,
604
- name: `pathParams.${a}.value`,
605
- render: ({ field: r }) => /* @__PURE__ */ t.jsx(
604
+ name: `pathParams.${r}.value`,
605
+ render: ({ field: a }) => /* @__PURE__ */ t.jsx(
606
606
  H,
607
607
  {
608
- ...r,
608
+ ...a,
609
609
  required: !0,
610
610
  placeholder: "Enter value",
611
611
  className: "border-0 shadow-none ring-0 font-mono text-xs"
@@ -617,20 +617,20 @@ const ne = (e) => Math.abs(
617
617
  $,
618
618
  {
619
619
  control: e,
620
- name: `pathParams.${a}.value`,
621
- render: ({ field: r }) => /* @__PURE__ */ t.jsx(
620
+ name: `pathParams.${r}.value`,
621
+ render: ({ field: a }) => /* @__PURE__ */ t.jsx(
622
622
  E,
623
623
  {
624
624
  size: "icon",
625
625
  type: "button",
626
626
  variant: "ghost",
627
627
  "aria-label": "Clear value",
628
- className: O(
628
+ className: P(
629
629
  "ms-2",
630
- r.value.length === 0 ? "opacity-0 pointer-events-none" : "opacity-100"
630
+ a.value.length === 0 ? "opacity-0 pointer-events-none" : "opacity-100"
631
631
  ),
632
632
  title: "Clear value",
633
- onClick: () => r.onChange(""),
633
+ onClick: () => a.onChange(""),
634
634
  children: /* @__PURE__ */ t.jsx(Ce, { size: 16 })
635
635
  }
636
636
  )
@@ -639,12 +639,12 @@ const ne = (e) => Math.abs(
639
639
  ] }) })
640
640
  ] }, s.id)) }) });
641
641
  }, At = (e, n) => {
642
- const s = fe.forwardRef(({ className: a, asChild: r, ...i }, l) => {
643
- const u = r ? lt : e;
642
+ const s = fe.forwardRef(({ className: r, asChild: a, ...i }, l) => {
643
+ const u = a ? lt : e;
644
644
  return fe.createElement(u, {
645
645
  ...i,
646
646
  ref: l,
647
- className: O(n, a)
647
+ className: P(n, r)
648
648
  });
649
649
  });
650
650
  return s.displayName = `VariantComponent(${e})`, s;
@@ -658,7 +658,7 @@ const ne = (e) => Math.abs(
658
658
  const { fields: s } = oe({
659
659
  control: e,
660
660
  name: "queryParams"
661
- }), a = Xe(), r = n.map((u) => !!u.isRequired), l = a.watch("identity") !== J;
661
+ }), r = Xe(), a = n.map((u) => !!u.isRequired), l = r.watch("identity") !== J;
662
662
  return /* @__PURE__ */ t.jsx("div", { className: "", children: /* @__PURE__ */ t.jsx("table", { className: "w-full [&_td]:border [&_td]:p-1.5 [&_td]:px-2", children: /* @__PURE__ */ t.jsx("tbody", { children: s.filter(
663
663
  // TODO remove this hack for Accu or make it more generic
664
664
  (u) => !(l && u.name === "apikey")
@@ -688,10 +688,10 @@ const ne = (e) => Math.abs(
688
688
  {
689
689
  className: "flex items-center cursor-pointer",
690
690
  htmlFor: `queryParams.${d}.active`,
691
- title: r[d] ? "Required field" : void 0,
691
+ title: a[d] ? "Required field" : void 0,
692
692
  children: [
693
693
  c.value,
694
- r[d] && /* @__PURE__ */ t.jsx("sup", { children: " *" })
694
+ a[d] && /* @__PURE__ */ t.jsx("sup", { children: " *" })
695
695
  ]
696
696
  }
697
697
  ) }),
@@ -708,7 +708,7 @@ const ne = (e) => Math.abs(
708
708
  {
709
709
  ...c,
710
710
  onChange: (f) => {
711
- c.onChange(f.target.value), f.target.value.length > 0 && a.setValue(`queryParams.${d}.active`, !0);
711
+ c.onChange(f.target.value), f.target.value.length > 0 && r.setValue(`queryParams.${d}.active`, !0);
712
712
  },
713
713
  placeholder: "Enter value",
714
714
  className: "w-full border-0 shadow-none text-xs font-mono"
@@ -728,7 +728,7 @@ const ne = (e) => Math.abs(
728
728
  type: "button",
729
729
  variant: "ghost",
730
730
  "aria-label": "Clear value",
731
- className: O(
731
+ className: P(
732
732
  "ms-2",
733
733
  c.value.length === 0 ? "opacity-0 pointer-events-none" : "opacity-100"
734
734
  ),
@@ -746,27 +746,27 @@ const ne = (e) => Math.abs(
746
746
  value: e,
747
747
  onChange: n,
748
748
  className: s,
749
- options: a,
750
- showChevrons: r = !0
749
+ options: r,
750
+ showChevrons: a = !0
751
751
  }) => /* @__PURE__ */ t.jsxs("div", { className: "grid", children: [
752
752
  /* @__PURE__ */ t.jsx(
753
753
  "select",
754
754
  {
755
- className: O(
755
+ className: P(
756
756
  "row-start-1 col-start-1 border border-input text-foreground px-2 py-1 pe-6",
757
757
  "rounded-md appearance-none bg-zinc-50 hover:bg-white dark:bg-zinc-800 hover:dark:bg-zinc-800/75",
758
758
  s
759
759
  ),
760
760
  value: e,
761
761
  onChange: n,
762
- children: a.map((i) => /* @__PURE__ */ t.jsx("option", { value: i.value, children: i.label }, i.value))
762
+ children: r.map((i) => /* @__PURE__ */ t.jsx("option", { value: i.value, children: i.label }, i.value))
763
763
  }
764
764
  ),
765
765
  /* @__PURE__ */ t.jsx(
766
766
  "div",
767
767
  {
768
- className: O(
769
- !r && "hidden",
768
+ className: P(
769
+ !a && "hidden",
770
770
  "row-start-1 col-start-1 self-center justify-self-end relative end-2 pointer-events-none"
771
771
  ),
772
772
  children: /* @__PURE__ */ t.jsx(ze, { size: 14 })
@@ -783,7 +783,7 @@ const ne = (e) => Math.abs(
783
783
  "application/xml": "xml",
784
784
  "application/xhtml+xml": "xhtml"
785
785
  }).find(
786
- ([a]) => e.includes(a)
786
+ ([r]) => e.includes(r)
787
787
  )) == null ? void 0 : s[1];
788
788
  }, Dt = (e) => {
789
789
  const n = e.get("Content-Type") || "";
@@ -798,20 +798,20 @@ const ne = (e) => Math.abs(
798
798
  body: e = "",
799
799
  headers: n
800
800
  }) => {
801
- const s = Dt(n), a = Gt(e), r = a || e, [i, l] = Ee(
802
- a ? "formatted" : "raw"
801
+ const s = Dt(n), r = Gt(e), a = r || e, [i, l] = Ee(
802
+ r ? "formatted" : "raw"
803
803
  );
804
804
  return /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-2", children: [
805
805
  /* @__PURE__ */ t.jsx(ae, { className: "shadow-none", children: /* @__PURE__ */ t.jsx(
806
806
  it,
807
807
  {
808
- language: i === "raw" ? a ? "plain" : s : "json",
808
+ language: i === "raw" ? r ? "plain" : s : "json",
809
809
  noBackground: !0,
810
810
  className: "overflow-x-auto p-4 text-xs max-h-[calc(83.333vh-180px)]",
811
- code: i === "raw" ? e : r
811
+ code: i === "raw" ? e : a
812
812
  }
813
813
  ) }),
814
- a && /* @__PURE__ */ t.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ t.jsx(
814
+ r && /* @__PURE__ */ t.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ t.jsx(
815
815
  Ft,
816
816
  {
817
817
  value: i,
@@ -838,8 +838,8 @@ const ne = (e) => Math.abs(
838
838
  server: e,
839
839
  servers: n,
840
840
  url: s,
841
- method: a,
842
- headers: r = [],
841
+ method: r,
842
+ headers: a = [],
843
843
  queryParams: i = [],
844
844
  pathParams: l = [],
845
845
  defaultBody: u = ""
@@ -857,7 +857,7 @@ const ne = (e) => Math.abs(
857
857
  name: o.name,
858
858
  value: o.defaultValue ?? ""
859
859
  })),
860
- headers: r.map((o) => ({
860
+ headers: a.map((o) => ({
861
861
  name: o.name,
862
862
  value: o.defaultValue ?? ""
863
863
  })),
@@ -874,7 +874,7 @@ const ne = (e) => Math.abs(
874
874
  mutationFn: async (o) => {
875
875
  var I, q;
876
876
  const x = qt(d ?? e, s, o), _ = performance.now(), D = new Request(x, {
877
- method: a.toUpperCase(),
877
+ method: r.toUpperCase(),
878
878
  headers: Object.fromEntries(
879
879
  o.headers.filter((m) => m.name).map((m) => [m.name, m.value])
880
880
  ),
@@ -900,7 +900,7 @@ const ne = (e) => Math.abs(
900
900
  }
901
901
  }), ke = s.split("/").map((o, x, _) => {
902
902
  var G;
903
- const D = o.startsWith("{") && o.endsWith("}") || o.startsWith(":"), I = o.replace(/[:{}]/g, ""), q = (G = C.pathParams.find((B) => B.name === I)) == null ? void 0 : G.value, m = q ? /* @__PURE__ */ t.jsx(Pe, { backgroundOpacity: "25%", name: o, slug: o, children: encodeURIComponent(q) }) : /* @__PURE__ */ t.jsx(
903
+ const D = o.startsWith("{") && o.endsWith("}") || o.startsWith(":"), I = o.replace(/[:{}]/g, ""), q = (G = C.pathParams.find((B) => B.name === I)) == null ? void 0 : G.value, m = q ? /* @__PURE__ */ t.jsx(Oe, { backgroundOpacity: "25%", name: o, slug: o, children: encodeURIComponent(q) }) : /* @__PURE__ */ t.jsx(
904
904
  "span",
905
905
  {
906
906
  className: "underline decoration-wavy decoration-red-500",
@@ -950,7 +950,7 @@ const ne = (e) => Math.abs(
950
950
  /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-4 p-8 bg-muted/50 after:bg-muted-foreground/20 relative after:absolute after:w-px after:inset-0 after:left-auto", children: [
951
951
  /* @__PURE__ */ t.jsxs("div", { className: "flex gap-2 items-stretch", children: [
952
952
  /* @__PURE__ */ t.jsxs("div", { className: "flex flex-1 items-center w-full border rounded-md", children: [
953
- /* @__PURE__ */ t.jsx("div", { className: "border-r p-2 bg-muted rounded-l-md self-stretch font-semibold font-mono", children: a.toUpperCase() }),
953
+ /* @__PURE__ */ t.jsx("div", { className: "border-r p-2 bg-muted rounded-l-md self-stretch font-semibold font-mono", children: r.toUpperCase() }),
954
954
  /* @__PURE__ */ t.jsxs("div", { className: "flex items-center flex-wrap p-2 font-mono text-xs", children: [
955
955
  _e,
956
956
  ke,
@@ -978,7 +978,7 @@ const ne = (e) => Math.abs(
978
978
  {
979
979
  value: "body",
980
980
  disabled: !["POST", "PUT", "PATCH", "DELETE"].includes(
981
- a.toUpperCase()
981
+ r.toUpperCase()
982
982
  ),
983
983
  children: "Body"
984
984
  }
@@ -1108,7 +1108,7 @@ const ne = (e) => Math.abs(
1108
1108
  }
1109
1109
  ), Ut = (e) => {
1110
1110
  const [n, s] = Ee(!1);
1111
- return /* @__PURE__ */ t.jsxs(Qe, { onOpenChange: (a) => s(a), children: [
1111
+ return /* @__PURE__ */ t.jsxs(Qe, { onOpenChange: (r) => s(r), children: [
1112
1112
  /* @__PURE__ */ t.jsx(Ue, { asChild: !0, children: e.children ?? /* @__PURE__ */ t.jsxs("button", { className: "flex gap-1 items-center px-2 py-1 rounded-md bg-primary/80 hover:bg-primary transition text-primary-foreground text-xs", children: [
1113
1113
  "Test",
1114
1114
  /* @__PURE__ */ t.jsx(Qt, { className: "", size: 14 })
@@ -1153,7 +1153,7 @@ const ne = (e) => Math.abs(
1153
1153
  options: "gray",
1154
1154
  head: "gray"
1155
1155
  }, jn = (e) => {
1156
- const n = he(e.navigationId ?? "/reference"), s = e.type === "file" ? Object.keys(e.input) : [], a = new kt(e);
1156
+ const n = he(e.navigationId ?? "/reference"), s = e.type === "file" ? Object.keys(e.input) : [], r = new kt(e);
1157
1157
  return {
1158
1158
  getHead: () => {
1159
1159
  if (e.type === "url" && !e.skipPreload)
@@ -1171,7 +1171,7 @@ const ne = (e) => Math.abs(
1171
1171
  },
1172
1172
  getMdxComponents: () => ({
1173
1173
  OpenPlaygroundButton: ({
1174
- requireAuth: r,
1174
+ requireAuth: a,
1175
1175
  server: i,
1176
1176
  method: l,
1177
1177
  url: u,
@@ -1179,14 +1179,14 @@ const ne = (e) => Math.abs(
1179
1179
  }) => {
1180
1180
  var h;
1181
1181
  const c = De(), f = Ae({
1182
- queryFn: () => a.fetch(Se, {
1182
+ queryFn: () => r.fetch(Se, {
1183
1183
  type: e.type,
1184
1184
  input: e.input
1185
1185
  }),
1186
1186
  enabled: !i,
1187
1187
  queryKey: ["playground-server"]
1188
1188
  });
1189
- return r && !c.isAuthenticated ? /* @__PURE__ */ t.jsxs(
1189
+ return a && !c.isAuthenticated ? /* @__PURE__ */ t.jsxs(
1190
1190
  E,
1191
1191
  {
1192
1192
  className: "gap-2 items-center",
@@ -1212,11 +1212,11 @@ const ne = (e) => Math.abs(
1212
1212
  );
1213
1213
  }
1214
1214
  }),
1215
- getSidebar: async (r) => {
1216
- if (!Re({ path: n, end: !1 }, r))
1215
+ getSidebar: async (a) => {
1216
+ if (!Re({ path: n, end: !1 }, a))
1217
1217
  return [];
1218
1218
  try {
1219
- const i = s.find((d) => r === he(n, d)) ?? Object.keys(e.input).at(0), u = (await a.fetch(Se, {
1219
+ const i = s.find((d) => a === he(n, d)) ?? Object.keys(e.input).at(0), u = (await r.fetch(Se, {
1220
1220
  type: e.type,
1221
1221
  input: e.type === "file" ? e.input[i] : e.input,
1222
1222
  version: i
@@ -1244,41 +1244,39 @@ const ne = (e) => Math.abs(
1244
1244
  return [];
1245
1245
  }
1246
1246
  },
1247
- getRoutes: () => [
1248
- {
1249
- path: n + "/:version?",
1250
- async lazy() {
1251
- const { OpenApiRoute: r } = await import("./Route-Ag5MH86N.js");
1252
- return {
1253
- element: /* @__PURE__ */ t.jsx(
1254
- r,
1255
- {
1256
- basePath: n,
1257
- versions: s,
1258
- client: a,
1259
- config: e
1260
- }
1261
- )
1262
- };
1263
- },
1264
- children: [
1265
- {
1266
- index: !0,
1267
- async lazy() {
1268
- const { OperationList: r } = await import("./OperationList-Cdbaz-V3.js");
1269
- return { element: /* @__PURE__ */ t.jsx(r, {}) };
1247
+ getRoutes: () => [null, ...s].map((i) => ({
1248
+ path: n + (i ? `/${i}` : ""),
1249
+ async lazy() {
1250
+ const { OpenApiRoute: l } = await import("./Route-DYwKZ_c_.js");
1251
+ return {
1252
+ element: /* @__PURE__ */ t.jsx(
1253
+ l,
1254
+ {
1255
+ basePath: n,
1256
+ versions: s,
1257
+ client: r,
1258
+ config: e
1270
1259
  }
1260
+ )
1261
+ };
1262
+ },
1263
+ children: [
1264
+ {
1265
+ index: !0,
1266
+ async lazy() {
1267
+ const { OperationList: l } = await import("./OperationList-CqLL5P5l.js");
1268
+ return { element: /* @__PURE__ */ t.jsx(l, {}) };
1271
1269
  }
1272
- ]
1273
- }
1274
- ]
1270
+ }
1271
+ ]
1272
+ }))
1275
1273
  };
1276
1274
  };
1277
1275
  export {
1278
- Pe as C,
1276
+ Oe as C,
1279
1277
  Ut as P,
1280
1278
  Ft as S,
1281
1279
  ft as g,
1282
1280
  jn as o
1283
1281
  };
1284
- //# sourceMappingURL=index-Bfm--TJU.js.map
1282
+ //# sourceMappingURL=index-DzRORsY1.js.map