zudoku 0.23.8 → 0.23.9
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.
- package/dist/lib/plugins/openapi/index.js +6 -5
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/lib/{OperationList-Cdbaz-V3.js → OperationList-ChQR0IcQ.js} +2 -2
- package/lib/{OperationList-Cdbaz-V3.js.map → OperationList-ChQR0IcQ.js.map} +1 -1
- package/lib/{index-Bfm--TJU.js → index-DtJxZrbj.js} +124 -126
- package/lib/{index-Bfm--TJU.js.map → index-DtJxZrbj.js.map} +1 -1
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/package.json +1 -1
- package/src/lib/plugins/openapi/index.tsx +7 -5
|
@@ -4,7 +4,7 @@ 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,
|
|
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
10
|
import { i as Me, j as he, k as Ae } from "./utils-B4O1uet5.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
|
|
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,
|
|
32
|
+
constructor(s, r) {
|
|
33
33
|
super(s);
|
|
34
34
|
W(this, "__apiType");
|
|
35
|
-
this.value = s, this.__meta__ =
|
|
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
|
|
267
|
+
const r = [...arguments], { options: a, shortMessage: i } = jt(r);
|
|
268
268
|
let l = i;
|
|
269
|
-
if (
|
|
270
|
-
const u =
|
|
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 = {},
|
|
286
|
-
return
|
|
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
|
|
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
|
|
301
|
-
return s.getRandomValues(
|
|
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,
|
|
351
|
-
for (let
|
|
352
|
-
s = e % F,
|
|
353
|
-
return
|
|
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),
|
|
360
|
+
return n === F && (n = F - 1), Pe.charAt(n);
|
|
361
361
|
}
|
|
362
|
-
function
|
|
363
|
-
const s = wt(),
|
|
364
|
-
return $t(
|
|
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
|
|
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,
|
|
376
|
+
var T, O, N, Q;
|
|
377
377
|
class kt {
|
|
378
378
|
constructor(n) {
|
|
379
379
|
R(this, T);
|
|
380
|
-
R(this,
|
|
380
|
+
R(this, O, /* @__PURE__ */ new Map());
|
|
381
381
|
R(this, N);
|
|
382
382
|
R(this, Q, () => import("./createServer-69sLlmQA.js").then((n) => n.createServer()));
|
|
383
383
|
W(this, "fetch", async (n, ...[s]) => {
|
|
384
384
|
var i;
|
|
385
|
-
const
|
|
386
|
-
await
|
|
387
|
-
const
|
|
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:
|
|
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:
|
|
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,
|
|
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,
|
|
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 =
|
|
428
|
+
const l = Pt(), d = await new Promise(
|
|
429
429
|
(c) => {
|
|
430
|
-
y(this,
|
|
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(),
|
|
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:
|
|
445
|
-
return `${s}deg ${
|
|
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
|
-
},
|
|
452
|
+
}, Oe = ({
|
|
453
453
|
name: e,
|
|
454
454
|
className: n,
|
|
455
455
|
backgroundOpacity: s = "100%",
|
|
456
|
-
borderOpacity:
|
|
457
|
-
slug:
|
|
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 =
|
|
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:
|
|
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
|
|
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
|
-
}),
|
|
501
|
-
|
|
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
|
-
|
|
506
|
-
}),
|
|
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:
|
|
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
|
-
|
|
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: () =>
|
|
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,
|
|
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.${
|
|
581
|
-
render: ({ field:
|
|
580
|
+
name: `pathParams.${r}.value`,
|
|
581
|
+
render: ({ field: a }) => /* @__PURE__ */ t.jsxs("div", { children: [
|
|
582
582
|
/* @__PURE__ */ t.jsx(
|
|
583
|
-
|
|
583
|
+
Oe,
|
|
584
584
|
{
|
|
585
585
|
slug: s.name,
|
|
586
586
|
name: s.name,
|
|
587
587
|
backgroundOpacity: "25%",
|
|
588
|
-
borderOpacity:
|
|
589
|
-
className:
|
|
588
|
+
borderOpacity: a.value ? "100%" : "0",
|
|
589
|
+
className: P(
|
|
590
590
|
"font-mono text-xs m-2",
|
|
591
|
-
!
|
|
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.${
|
|
605
|
-
render: ({ field:
|
|
604
|
+
name: `pathParams.${r}.value`,
|
|
605
|
+
render: ({ field: a }) => /* @__PURE__ */ t.jsx(
|
|
606
606
|
H,
|
|
607
607
|
{
|
|
608
|
-
...
|
|
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.${
|
|
621
|
-
render: ({ field:
|
|
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:
|
|
628
|
+
className: P(
|
|
629
629
|
"ms-2",
|
|
630
|
-
|
|
630
|
+
a.value.length === 0 ? "opacity-0 pointer-events-none" : "opacity-100"
|
|
631
631
|
),
|
|
632
632
|
title: "Clear value",
|
|
633
|
-
onClick: () =>
|
|
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:
|
|
643
|
-
const u =
|
|
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:
|
|
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
|
-
}),
|
|
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:
|
|
691
|
+
title: a[d] ? "Required field" : void 0,
|
|
692
692
|
children: [
|
|
693
693
|
c.value,
|
|
694
|
-
|
|
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 &&
|
|
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:
|
|
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:
|
|
750
|
-
showChevrons:
|
|
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:
|
|
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:
|
|
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:
|
|
769
|
-
!
|
|
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
|
-
([
|
|
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),
|
|
802
|
-
|
|
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" ?
|
|
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 :
|
|
811
|
+
code: i === "raw" ? e : a
|
|
812
812
|
}
|
|
813
813
|
) }),
|
|
814
|
-
|
|
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:
|
|
842
|
-
headers:
|
|
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:
|
|
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:
|
|
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(
|
|
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:
|
|
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
|
-
|
|
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: (
|
|
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) : [],
|
|
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:
|
|
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: () =>
|
|
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
|
|
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 (
|
|
1216
|
-
if (!Re({ path: n, end: !1 },
|
|
1215
|
+
getSidebar: async (a) => {
|
|
1216
|
+
if (!Re({ path: n, end: !1 }, a))
|
|
1217
1217
|
return [];
|
|
1218
1218
|
try {
|
|
1219
|
-
const i = s.find((d) =>
|
|
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
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
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-Ag5MH86N.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-ChQR0IcQ.js");
|
|
1268
|
+
return { element: /* @__PURE__ */ t.jsx(l, {}) };
|
|
1271
1269
|
}
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1270
|
+
}
|
|
1271
|
+
]
|
|
1272
|
+
}))
|
|
1275
1273
|
};
|
|
1276
1274
|
};
|
|
1277
1275
|
export {
|
|
1278
|
-
|
|
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-
|
|
1282
|
+
//# sourceMappingURL=index-DtJxZrbj.js.map
|