zudoku 0.31.3 → 0.32.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.
- package/dist/cli/common/utils/ports.d.ts +1 -1
- package/dist/cli/common/utils/ports.js +16 -15
- package/dist/cli/common/utils/ports.js.map +1 -1
- package/dist/cli/dev/handler.js +9 -12
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/config/validators/common.d.ts +90 -0
- package/dist/config/validators/common.js +8 -0
- package/dist/config/validators/common.js.map +1 -1
- package/dist/config/validators/validate.d.ts +38 -0
- package/dist/lib/MissingIcon.d.ts +2 -0
- package/dist/lib/MissingIcon.js +7 -0
- package/dist/lib/MissingIcon.js.map +1 -0
- package/dist/lib/core/ZudokuContext.d.ts +1 -1
- package/dist/lib/core/plugins.d.ts +2 -0
- package/dist/lib/core/plugins.js +2 -0
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/icons.d.ts +1 -0
- package/dist/lib/icons.js +1 -0
- package/dist/lib/icons.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.d.ts +1 -0
- package/dist/lib/plugins/api-keys/index.js +1 -0
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +3 -3
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +5 -5
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js.map +1 -1
- package/dist/vite/build.js +20 -14
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.js +2 -6
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/dev-server.d.ts +4 -2
- package/dist/vite/dev-server.js +30 -8
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/error-handler.d.ts +1 -1
- package/dist/vite/error-handler.js +1 -1
- package/dist/vite/error-handler.js.map +1 -1
- package/dist/vite/output.d.ts +14 -2
- package/dist/vite/output.js +12 -14
- package/dist/vite/output.js.map +1 -1
- package/dist/vite/plugin-api-keys.js +2 -2
- package/dist/vite/plugin-api-keys.js.map +1 -1
- package/dist/vite/plugin-sidebar.js +17 -2
- package/dist/vite/plugin-sidebar.js.map +1 -1
- package/dist/vite/prerender/FileWritingResponse.d.ts +7 -3
- package/dist/vite/prerender/FileWritingResponse.js +15 -9
- package/dist/vite/prerender/FileWritingResponse.js.map +1 -1
- package/dist/vite/prerender/prerender.d.ts +10 -2
- package/dist/vite/prerender/prerender.js +4 -3
- package/dist/vite/prerender/prerender.js.map +1 -1
- package/dist/vite/prerender/worker.d.ts +3 -1
- package/dist/vite/prerender/worker.js +11 -4
- package/dist/vite/prerender/worker.js.map +1 -1
- package/lib/{AuthenticationPlugin-DjnQ5hs7.js → AuthenticationPlugin-_YVa673u.js} +2 -2
- package/lib/{AuthenticationPlugin-DjnQ5hs7.js.map → AuthenticationPlugin-_YVa673u.js.map} +1 -1
- package/lib/{MdxPage-ZX2oquWw.js → MdxPage-GM1T5jmO.js} +3 -3
- package/lib/{MdxPage-ZX2oquWw.js.map → MdxPage-GM1T5jmO.js.map} +1 -1
- package/lib/{OasProvider-DGKSXGQm.js → OasProvider-IS9wBrb7.js} +3 -3
- package/lib/{OasProvider-DGKSXGQm.js.map → OasProvider-IS9wBrb7.js.map} +1 -1
- package/lib/{OperationList-BBE1QsAN.js → OperationList-BTmRbbXk.js} +4 -5
- package/lib/{OperationList-BBE1QsAN.js.map → OperationList-BTmRbbXk.js.map} +1 -1
- package/lib/{Select-NSz0gku6.js → Select-D9CKL33X.js} +3 -3
- package/lib/{Select-NSz0gku6.js.map → Select-D9CKL33X.js.map} +1 -1
- package/lib/{hook-Dnj3SwPC.js → hook-C_t2ISLC.js} +22 -22
- package/lib/{hook-Dnj3SwPC.js.map → hook-C_t2ISLC.js.map} +1 -1
- package/lib/{index-DzaciJI0.js → index-BANyVRgL.js} +145 -144
- package/lib/index-BANyVRgL.js.map +1 -0
- package/lib/{mutation-ByGtmi0-.js → mutation-Cm3O9f3X.js} +2 -2
- package/lib/{mutation-ByGtmi0-.js.map → mutation-Cm3O9f3X.js.map} +1 -1
- package/lib/{useScrollToAnchor-DkVfWsxe.js → useScrollToAnchor-BGEcH3HM.js} +2 -2
- package/lib/{useScrollToAnchor-DkVfWsxe.js.map → useScrollToAnchor-BGEcH3HM.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-openid.js +2 -2
- package/lib/zudoku.components.js +141 -140
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.icons.js +10 -0
- package/lib/zudoku.icons.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +1 -1
- package/lib/zudoku.plugin-api-keys.js +10 -9
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +2 -2
- package/lib/zudoku.plugins.js +13 -0
- package/lib/zudoku.plugins.js.map +1 -0
- package/package.json +5 -1
- package/src/lib/MissingIcon.tsx +22 -0
- package/src/lib/core/ZudokuContext.ts +1 -1
- package/src/lib/core/plugins.ts +8 -0
- package/src/lib/icons.ts +1 -0
- package/src/lib/plugins/api-keys/index.tsx +3 -0
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +1 -1
- package/src/lib/plugins/openapi/Sidecar.tsx +0 -1
- package/src/lib/plugins/openapi/index.tsx +11 -3
- package/src/lib/plugins/openapi/playground/Playground.tsx +26 -24
- package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +1 -1
- package/lib/index-DzaciJI0.js.map +0 -1
|
@@ -9,15 +9,15 @@ import { j as e } from "./jsx-runtime-Bdg6XQ1m.js";
|
|
|
9
9
|
import { s as W } from "./index-CjJS0l4l.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-SYFQ2XB5-QijJrSf0.js";
|
|
12
|
-
import {
|
|
12
|
+
import { H as It, I as Ot, J as Et, k as At } from "./hook-C_t2ISLC.js";
|
|
13
13
|
import { Button as K } from "./ui/Button.js";
|
|
14
14
|
import { j as O } from "./joinUrl-nLx9pD-Z.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
|
-
import * as
|
|
17
|
+
import * as x from "react";
|
|
18
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-B7mqiOei.js";
|
|
20
|
-
import { S as Qe, a as Ze, b as We, c as Ke, e as Q, u as Ut } from "./Select-
|
|
20
|
+
import { S as Qe, a as Ze, b as We, c as Ke, e as Q, u as Ut } from "./Select-D9CKL33X.js";
|
|
21
21
|
import { b as ge, u as ye, C as I, a as Mt, F as _t } from "./index.esm-CrSoEshU.js";
|
|
22
22
|
import { c as ve } from "./index-Djenk2Hj.js";
|
|
23
23
|
import { c as m } from "./cn-qaFjX9_3.js";
|
|
@@ -298,7 +298,7 @@ const ma = ve(
|
|
|
298
298
|
variant: "default"
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
|
-
), ue =
|
|
301
|
+
), ue = x.forwardRef(({ className: t, variant: a, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
302
302
|
"div",
|
|
303
303
|
{
|
|
304
304
|
ref: n,
|
|
@@ -308,7 +308,7 @@ const ma = ve(
|
|
|
308
308
|
}
|
|
309
309
|
));
|
|
310
310
|
ue.displayName = "Alert";
|
|
311
|
-
const pe =
|
|
311
|
+
const pe = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
312
312
|
"h5",
|
|
313
313
|
{
|
|
314
314
|
ref: s,
|
|
@@ -317,7 +317,7 @@ const pe = h.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
317
317
|
}
|
|
318
318
|
));
|
|
319
319
|
pe.displayName = "AlertTitle";
|
|
320
|
-
const he =
|
|
320
|
+
const he = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
321
321
|
"div",
|
|
322
322
|
{
|
|
323
323
|
ref: s,
|
|
@@ -334,10 +334,10 @@ const ua = ({
|
|
|
334
334
|
return t.split("/").map((n, r, i) => {
|
|
335
335
|
const l = Array.from(n.matchAll(/{([^}]+)}/g)), c = [];
|
|
336
336
|
let d = 0;
|
|
337
|
-
return l.forEach((
|
|
338
|
-
const [g, C] =
|
|
337
|
+
return l.forEach((u) => {
|
|
338
|
+
const [g, C] = u;
|
|
339
339
|
if (!C) return;
|
|
340
|
-
const b =
|
|
340
|
+
const b = u.index;
|
|
341
341
|
b > d && c.push(
|
|
342
342
|
/* @__PURE__ */ e.jsx(k, { children: n.slice(d, b) }, `text-${d}-${b}`)
|
|
343
343
|
), c.push(
|
|
@@ -354,7 +354,7 @@ const ua = ({
|
|
|
354
354
|
});
|
|
355
355
|
}, pa = ve(
|
|
356
356
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
357
|
-
), z =
|
|
357
|
+
), z = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
358
358
|
Xe.Root,
|
|
359
359
|
{
|
|
360
360
|
ref: s,
|
|
@@ -363,7 +363,7 @@ const ua = ({
|
|
|
363
363
|
}
|
|
364
364
|
));
|
|
365
365
|
z.displayName = Xe.Root.displayName;
|
|
366
|
-
const we =
|
|
366
|
+
const we = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
367
367
|
M.Root,
|
|
368
368
|
{
|
|
369
369
|
className: m("grid gap-2", t),
|
|
@@ -372,7 +372,7 @@ const we = h.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
372
372
|
}
|
|
373
373
|
));
|
|
374
374
|
we.displayName = M.Root.displayName;
|
|
375
|
-
const Y =
|
|
375
|
+
const Y = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
376
376
|
M.Item,
|
|
377
377
|
{
|
|
378
378
|
ref: s,
|
|
@@ -385,7 +385,7 @@ const Y = h.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
385
385
|
}
|
|
386
386
|
));
|
|
387
387
|
Y.displayName = M.Item.displayName;
|
|
388
|
-
const at =
|
|
388
|
+
const at = x.forwardRef(
|
|
389
389
|
({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
390
390
|
"textarea",
|
|
391
391
|
{
|
|
@@ -424,20 +424,20 @@ const le = (t) => Math.abs(
|
|
|
424
424
|
children: r,
|
|
425
425
|
onClick: i
|
|
426
426
|
}) => {
|
|
427
|
-
const l = q(null), c = s == null ? void 0 : s.replace(/[{}]/g, ""), d = t.replace(/[{}]/g, ""), { text:
|
|
427
|
+
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%)`;
|
|
428
428
|
return fe(() => {
|
|
429
429
|
if (!c || !l.current) return;
|
|
430
|
-
const
|
|
430
|
+
const f = () => {
|
|
431
431
|
document.querySelectorAll(`[${ce}="${c}"]`).forEach((y) => {
|
|
432
432
|
y instanceof HTMLElement && (y.dataset.active = "true");
|
|
433
433
|
});
|
|
434
|
-
},
|
|
434
|
+
}, h = () => {
|
|
435
435
|
document.querySelectorAll(`[${ce}="${c}"]`).forEach((y) => {
|
|
436
436
|
y instanceof HTMLElement && (y.dataset.active = "false");
|
|
437
437
|
});
|
|
438
438
|
}, v = l.current;
|
|
439
|
-
return v.addEventListener("mouseenter",
|
|
440
|
-
v.removeEventListener("mouseenter",
|
|
439
|
+
return v.addEventListener("mouseenter", f), v.addEventListener("mouseleave", h), () => {
|
|
440
|
+
v.removeEventListener("mouseenter", f), v.removeEventListener("mouseleave", h);
|
|
441
441
|
};
|
|
442
442
|
}, [c]), /* @__PURE__ */ e.jsx(
|
|
443
443
|
"span",
|
|
@@ -456,7 +456,7 @@ const le = (t) => Math.abs(
|
|
|
456
456
|
onClick: i,
|
|
457
457
|
style: {
|
|
458
458
|
"--param-color": C,
|
|
459
|
-
"--border-color":
|
|
459
|
+
"--border-color": p,
|
|
460
460
|
"--background-color": b
|
|
461
461
|
},
|
|
462
462
|
children: r ?? t
|
|
@@ -466,7 +466,7 @@ const le = (t) => Math.abs(
|
|
|
466
466
|
const n = a.replace(/(:\w+|\{\w+})/g, (i) => {
|
|
467
467
|
var d;
|
|
468
468
|
const l = i.replace(/[:{}]/g, "");
|
|
469
|
-
return ((d = s.pathParams.find((
|
|
469
|
+
return ((d = s.pathParams.find((u) => u.name === l)) == null ? void 0 : d.value) ?? i;
|
|
470
470
|
}), r = new URL(
|
|
471
471
|
n.replace(/^\//, ""),
|
|
472
472
|
t.endsWith("/") ? t : `${t}/`
|
|
@@ -474,7 +474,7 @@ const le = (t) => Math.abs(
|
|
|
474
474
|
return s.queryParams.filter((i) => i.active).forEach((i) => {
|
|
475
475
|
r.searchParams.set(i.name, i.value);
|
|
476
476
|
}), r;
|
|
477
|
-
}, nt = j.Root, rt = j.Trigger, fa = j.Group, ga =
|
|
477
|
+
}, nt = j.Root, rt = j.Trigger, fa = j.Group, ga = x.forwardRef(({ className: t, inset: a, children: s, ...n }, r) => /* @__PURE__ */ e.jsxs(
|
|
478
478
|
j.SubTrigger,
|
|
479
479
|
{
|
|
480
480
|
ref: r,
|
|
@@ -491,7 +491,7 @@ const le = (t) => Math.abs(
|
|
|
491
491
|
}
|
|
492
492
|
));
|
|
493
493
|
ga.displayName = j.SubTrigger.displayName;
|
|
494
|
-
const ya =
|
|
494
|
+
const ya = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
495
495
|
j.SubContent,
|
|
496
496
|
{
|
|
497
497
|
ref: s,
|
|
@@ -503,7 +503,7 @@ const ya = h.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
503
503
|
}
|
|
504
504
|
));
|
|
505
505
|
ya.displayName = j.SubContent.displayName;
|
|
506
|
-
const Ce =
|
|
506
|
+
const Ce = x.forwardRef(({ className: t, sideOffset: a = 4, ...s }, n) => /* @__PURE__ */ e.jsx(j.Portal, { children: /* @__PURE__ */ e.jsx(
|
|
507
507
|
j.Content,
|
|
508
508
|
{
|
|
509
509
|
ref: n,
|
|
@@ -517,7 +517,7 @@ const Ce = h.forwardRef(({ className: t, sideOffset: a = 4, ...s }, n) => /* @__
|
|
|
517
517
|
}
|
|
518
518
|
) }));
|
|
519
519
|
Ce.displayName = j.Content.displayName;
|
|
520
|
-
const Te =
|
|
520
|
+
const Te = x.forwardRef(({ className: t, inset: a, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
521
521
|
j.Item,
|
|
522
522
|
{
|
|
523
523
|
ref: n,
|
|
@@ -530,7 +530,7 @@ const Te = h.forwardRef(({ className: t, inset: a, ...s }, n) => /* @__PURE__ */
|
|
|
530
530
|
}
|
|
531
531
|
));
|
|
532
532
|
Te.displayName = j.Item.displayName;
|
|
533
|
-
const va =
|
|
533
|
+
const va = x.forwardRef(({ className: t, children: a, checked: s, ...n }, r) => /* @__PURE__ */ e.jsxs(
|
|
534
534
|
j.CheckboxItem,
|
|
535
535
|
{
|
|
536
536
|
ref: r,
|
|
@@ -547,7 +547,7 @@ const va = h.forwardRef(({ className: t, children: a, checked: s, ...n }, r) =>
|
|
|
547
547
|
}
|
|
548
548
|
));
|
|
549
549
|
va.displayName = j.CheckboxItem.displayName;
|
|
550
|
-
const ja =
|
|
550
|
+
const ja = x.forwardRef(({ className: t, children: a, ...s }, n) => /* @__PURE__ */ e.jsxs(
|
|
551
551
|
j.RadioItem,
|
|
552
552
|
{
|
|
553
553
|
ref: n,
|
|
@@ -563,7 +563,7 @@ const ja = h.forwardRef(({ className: t, children: a, ...s }, n) => /* @__PURE__
|
|
|
563
563
|
}
|
|
564
564
|
));
|
|
565
565
|
ja.displayName = j.RadioItem.displayName;
|
|
566
|
-
const ot =
|
|
566
|
+
const ot = x.forwardRef(({ className: t, inset: a, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
567
567
|
j.Label,
|
|
568
568
|
{
|
|
569
569
|
ref: n,
|
|
@@ -576,7 +576,7 @@ const ot = h.forwardRef(({ className: t, inset: a, ...s }, n) => /* @__PURE__ */
|
|
|
576
576
|
}
|
|
577
577
|
));
|
|
578
578
|
ot.displayName = j.Label.displayName;
|
|
579
|
-
const it =
|
|
579
|
+
const it = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
580
580
|
j.Separator,
|
|
581
581
|
{
|
|
582
582
|
ref: s,
|
|
@@ -606,7 +606,7 @@ const ba = ({
|
|
|
606
606
|
)) })
|
|
607
607
|
] }, s.mediaType);
|
|
608
608
|
}) })
|
|
609
|
-
] }) }), se =
|
|
609
|
+
] }) }), se = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
610
610
|
"div",
|
|
611
611
|
{
|
|
612
612
|
ref: s,
|
|
@@ -618,7 +618,7 @@ const ba = ({
|
|
|
618
618
|
}
|
|
619
619
|
));
|
|
620
620
|
se.displayName = "Card";
|
|
621
|
-
const Na =
|
|
621
|
+
const Na = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
622
622
|
"div",
|
|
623
623
|
{
|
|
624
624
|
ref: s,
|
|
@@ -627,7 +627,7 @@ const Na = h.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
627
627
|
}
|
|
628
628
|
));
|
|
629
629
|
Na.displayName = "CardHeader";
|
|
630
|
-
const wa =
|
|
630
|
+
const wa = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
631
631
|
"h3",
|
|
632
632
|
{
|
|
633
633
|
ref: s,
|
|
@@ -636,7 +636,7 @@ const wa = h.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
636
636
|
}
|
|
637
637
|
));
|
|
638
638
|
wa.displayName = "CardTitle";
|
|
639
|
-
const Ca =
|
|
639
|
+
const Ca = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
640
640
|
"p",
|
|
641
641
|
{
|
|
642
642
|
ref: s,
|
|
@@ -645,9 +645,9 @@ const Ca = h.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
645
645
|
}
|
|
646
646
|
));
|
|
647
647
|
Ca.displayName = "CardDescription";
|
|
648
|
-
const Ta =
|
|
648
|
+
const Ta = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx("div", { ref: s, className: m("p-6 pt-0", t), ...a }));
|
|
649
649
|
Ta.displayName = "CardContent";
|
|
650
|
-
const $a =
|
|
650
|
+
const $a = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
651
651
|
"div",
|
|
652
652
|
{
|
|
653
653
|
ref: s,
|
|
@@ -669,7 +669,7 @@ const Sa = ve(
|
|
|
669
669
|
variant: "default"
|
|
670
670
|
}
|
|
671
671
|
}
|
|
672
|
-
), $e =
|
|
672
|
+
), $e = x.forwardRef(({ className: t, variant: a, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
673
673
|
me.Root,
|
|
674
674
|
{
|
|
675
675
|
ref: n,
|
|
@@ -685,7 +685,7 @@ const Sa = ve(
|
|
|
685
685
|
}
|
|
686
686
|
));
|
|
687
687
|
$e.displayName = me.Root.displayName;
|
|
688
|
-
const lt =
|
|
688
|
+
const lt = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
689
689
|
$,
|
|
690
690
|
{
|
|
691
691
|
ref: s,
|
|
@@ -697,7 +697,7 @@ const lt = h.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
697
697
|
}
|
|
698
698
|
));
|
|
699
699
|
lt.displayName = $.displayName;
|
|
700
|
-
const Pa =
|
|
700
|
+
const Pa = x.forwardRef(({ className: t, ...a }, s) => (
|
|
701
701
|
// eslint-disable-next-line react/no-unknown-property
|
|
702
702
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
703
703
|
/* @__PURE__ */ e.jsx(Tt, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
@@ -715,7 +715,7 @@ const Pa = h.forwardRef(({ className: t, ...a }, s) => (
|
|
|
715
715
|
] })
|
|
716
716
|
));
|
|
717
717
|
Pa.displayName = $.Input.displayName;
|
|
718
|
-
const dt =
|
|
718
|
+
const dt = x.forwardRef(({ className: t, ...a }, s) => (
|
|
719
719
|
// eslint-disable-next-line react/no-unknown-property
|
|
720
720
|
/* @__PURE__ */ e.jsx("div", { className: "flex items-center", "cmdk-input-wrapper": "", children: /* @__PURE__ */ e.jsx(
|
|
721
721
|
$.Input,
|
|
@@ -731,7 +731,7 @@ const dt = h.forwardRef(({ className: t, ...a }, s) => (
|
|
|
731
731
|
) })
|
|
732
732
|
));
|
|
733
733
|
dt.displayName = $.Input.displayName;
|
|
734
|
-
const ct =
|
|
734
|
+
const ct = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
735
735
|
$.List,
|
|
736
736
|
{
|
|
737
737
|
ref: s,
|
|
@@ -740,7 +740,7 @@ const ct = h.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
740
740
|
}
|
|
741
741
|
));
|
|
742
742
|
ct.displayName = $.List.displayName;
|
|
743
|
-
const Ra =
|
|
743
|
+
const Ra = x.forwardRef((t, a) => /* @__PURE__ */ e.jsx(
|
|
744
744
|
$.Empty,
|
|
745
745
|
{
|
|
746
746
|
ref: a,
|
|
@@ -749,7 +749,7 @@ const Ra = h.forwardRef((t, a) => /* @__PURE__ */ e.jsx(
|
|
|
749
749
|
}
|
|
750
750
|
));
|
|
751
751
|
Ra.displayName = $.Empty.displayName;
|
|
752
|
-
const ka =
|
|
752
|
+
const ka = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
753
753
|
$.Group,
|
|
754
754
|
{
|
|
755
755
|
ref: s,
|
|
@@ -761,7 +761,7 @@ const ka = h.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
761
761
|
}
|
|
762
762
|
));
|
|
763
763
|
ka.displayName = $.Group.displayName;
|
|
764
|
-
const Ia =
|
|
764
|
+
const Ia = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
765
765
|
$.Separator,
|
|
766
766
|
{
|
|
767
767
|
ref: s,
|
|
@@ -770,7 +770,7 @@ const Ia = h.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
770
770
|
}
|
|
771
771
|
));
|
|
772
772
|
Ia.displayName = $.Separator.displayName;
|
|
773
|
-
const mt =
|
|
773
|
+
const mt = x.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
774
774
|
$.Item,
|
|
775
775
|
{
|
|
776
776
|
ref: s,
|
|
@@ -782,7 +782,7 @@ const mt = h.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
782
782
|
}
|
|
783
783
|
));
|
|
784
784
|
mt.displayName = $.Item.displayName;
|
|
785
|
-
const Oa = X.Root, ut =
|
|
785
|
+
const Oa = X.Root, ut = x.forwardRef(({ className: t, align: a = "center", sideOffset: s = 4, ...n }, r) => /* @__PURE__ */ e.jsx(X.Portal, { children: /* @__PURE__ */ e.jsx(
|
|
786
786
|
X.Content,
|
|
787
787
|
{
|
|
788
788
|
ref: r,
|
|
@@ -805,26 +805,26 @@ const Ea = ({
|
|
|
805
805
|
onEnterPress: i,
|
|
806
806
|
ref: l
|
|
807
807
|
}) => {
|
|
808
|
-
const [c, d] = U(!1), [
|
|
808
|
+
const [c, d] = U(!1), [u, g] = U(!1), C = Ft((p) => p.filtered.count), b = q(null);
|
|
809
809
|
return /* @__PURE__ */ e.jsxs(Oa, { open: c, children: [
|
|
810
810
|
/* @__PURE__ */ e.jsx(Yt, { children: /* @__PURE__ */ e.jsx(
|
|
811
811
|
dt,
|
|
812
812
|
{
|
|
813
|
-
ref: (
|
|
814
|
-
b.current =
|
|
813
|
+
ref: (p) => {
|
|
814
|
+
b.current = p, typeof l == "function" ? l(p) : l && (l.current = p);
|
|
815
815
|
},
|
|
816
816
|
value: t,
|
|
817
817
|
placeholder: r,
|
|
818
818
|
className: m("h-9 bg-transparent", n),
|
|
819
819
|
onFocus: () => d(!0),
|
|
820
820
|
onBlur: () => {
|
|
821
|
-
|
|
821
|
+
u || d(!1);
|
|
822
822
|
},
|
|
823
|
-
onKeyDown: (
|
|
824
|
-
var
|
|
825
|
-
|
|
823
|
+
onKeyDown: (p) => {
|
|
824
|
+
var f;
|
|
825
|
+
p.key === "Enter" && (d(!1), (f = b.current) == null || f.blur(), i == null || i(p));
|
|
826
826
|
},
|
|
827
|
-
onValueChange: (
|
|
827
|
+
onValueChange: (p) => s(p)
|
|
828
828
|
}
|
|
829
829
|
) }),
|
|
830
830
|
/* @__PURE__ */ e.jsx(
|
|
@@ -832,37 +832,37 @@ const Ea = ({
|
|
|
832
832
|
{
|
|
833
833
|
onMouseEnter: () => g(!0),
|
|
834
834
|
onMouseLeave: () => g(!1),
|
|
835
|
-
onOpenAutoFocus: (
|
|
835
|
+
onOpenAutoFocus: (p) => p.preventDefault(),
|
|
836
836
|
className: m("p-0 w-[--radix-popover-trigger-width]", {
|
|
837
837
|
"border-0": C === 0
|
|
838
838
|
}),
|
|
839
839
|
align: "start",
|
|
840
840
|
side: "bottom",
|
|
841
|
-
onWheel: (
|
|
842
|
-
|
|
841
|
+
onWheel: (p) => {
|
|
842
|
+
p.stopPropagation();
|
|
843
843
|
},
|
|
844
|
-
onTouchMove: (
|
|
845
|
-
|
|
844
|
+
onTouchMove: (p) => {
|
|
845
|
+
p.stopPropagation();
|
|
846
846
|
},
|
|
847
|
-
children: /* @__PURE__ */ e.jsx(ct, { className: "max-h-[140px]", children: a.map((
|
|
847
|
+
children: /* @__PURE__ */ e.jsx(ct, { className: "max-h-[140px]", children: a.map((p) => /* @__PURE__ */ e.jsx(
|
|
848
848
|
mt,
|
|
849
849
|
{
|
|
850
|
-
value:
|
|
851
|
-
onSelect: (
|
|
852
|
-
s(
|
|
850
|
+
value: p,
|
|
851
|
+
onSelect: (f) => {
|
|
852
|
+
s(f), d(!1);
|
|
853
853
|
},
|
|
854
854
|
className: "cursor-pointer",
|
|
855
|
-
children:
|
|
855
|
+
children: p
|
|
856
856
|
},
|
|
857
|
-
|
|
857
|
+
p
|
|
858
858
|
)) })
|
|
859
859
|
}
|
|
860
860
|
)
|
|
861
861
|
] });
|
|
862
862
|
}, ee = ({ shouldFilter: t, ...a }) => /* @__PURE__ */ e.jsx(lt, { className: "bg-transparent", shouldFilter: t, children: /* @__PURE__ */ e.jsx(Ea, { ...a }) }), Se = (t, a) => {
|
|
863
|
-
const s =
|
|
863
|
+
const s = x.forwardRef(({ className: n, asChild: r, ...i }, l) => {
|
|
864
864
|
const c = r ? ea : t;
|
|
865
|
-
return
|
|
865
|
+
return x.createElement(c, {
|
|
866
866
|
...i,
|
|
867
867
|
ref: l,
|
|
868
868
|
className: typeof a == "function" ? a({ className: n }) : m(a, n)
|
|
@@ -909,25 +909,25 @@ const Ea = ({
|
|
|
909
909
|
const { fields: s, append: n, remove: r } = ge({
|
|
910
910
|
control: t,
|
|
911
911
|
name: "headers"
|
|
912
|
-
}), { setValue: i, watch: l } = ye(), c = q([]), d = q([]),
|
|
912
|
+
}), { setValue: i, watch: l } = ye(), c = q([]), d = q([]), u = l("headers"), g = Lt(() => {
|
|
913
913
|
n({ name: "", value: "", active: !1 });
|
|
914
914
|
}, [n]);
|
|
915
915
|
fe(() => {
|
|
916
|
-
|
|
917
|
-
}, [
|
|
918
|
-
const C = (
|
|
919
|
-
var
|
|
920
|
-
(
|
|
921
|
-
}, b = (
|
|
916
|
+
u.length === 0 && g();
|
|
917
|
+
}, [u, g]);
|
|
918
|
+
const C = (f) => {
|
|
919
|
+
var h;
|
|
920
|
+
(h = c.current[f]) == null || h.focus();
|
|
921
|
+
}, b = (f) => {
|
|
922
922
|
g(), requestAnimationFrame(() => {
|
|
923
|
-
var
|
|
924
|
-
return (
|
|
923
|
+
var h;
|
|
924
|
+
return (h = d.current[f + 1]) == null ? void 0 : h.focus();
|
|
925
925
|
});
|
|
926
|
-
},
|
|
926
|
+
}, p = a.filter((f) => !u.some((h) => h.name === f.name)).map(({ name: f }) => f);
|
|
927
927
|
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((
|
|
928
|
+
/* @__PURE__ */ e.jsx(se, { className: "overflow-hidden", children: /* @__PURE__ */ e.jsx(Pe, { children: s.map((f, h) => {
|
|
929
929
|
const v = a.find(
|
|
930
|
-
(y) => y.name === l(`headers.${
|
|
930
|
+
(y) => y.name === l(`headers.${h}.name`)
|
|
931
931
|
);
|
|
932
932
|
return /* @__PURE__ */ e.jsxs(Re, { children: [
|
|
933
933
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 ", children: [
|
|
@@ -935,12 +935,12 @@ const Ea = ({
|
|
|
935
935
|
I,
|
|
936
936
|
{
|
|
937
937
|
control: t,
|
|
938
|
-
name: `headers.${
|
|
938
|
+
name: `headers.${h}.active`,
|
|
939
939
|
render: ({ field: y }) => /* @__PURE__ */ e.jsx(
|
|
940
940
|
$e,
|
|
941
941
|
{
|
|
942
942
|
variant: "outline",
|
|
943
|
-
id: `headers.${
|
|
943
|
+
id: `headers.${h}.active`,
|
|
944
944
|
checked: y.value,
|
|
945
945
|
onCheckedChange: (N) => {
|
|
946
946
|
y.onChange(N);
|
|
@@ -953,20 +953,20 @@ const Ea = ({
|
|
|
953
953
|
I,
|
|
954
954
|
{
|
|
955
955
|
control: t,
|
|
956
|
-
name: `headers.${
|
|
956
|
+
name: `headers.${h}.name`,
|
|
957
957
|
render: ({ field: y }) => /* @__PURE__ */ e.jsx(
|
|
958
958
|
ee,
|
|
959
959
|
{
|
|
960
960
|
...y,
|
|
961
961
|
placeholder: "Name",
|
|
962
962
|
className: "border-0 shadow-none bg-transparent text-xs font-mono",
|
|
963
|
-
options: [...
|
|
964
|
-
onEnterPress: () => C(
|
|
963
|
+
options: [...p, ...Aa],
|
|
964
|
+
onEnterPress: () => C(h),
|
|
965
965
|
onChange: (N) => {
|
|
966
|
-
y.onChange(N), i(`headers.${
|
|
966
|
+
y.onChange(N), i(`headers.${h}.active`, !0);
|
|
967
967
|
},
|
|
968
968
|
ref: (N) => {
|
|
969
|
-
d.current[
|
|
969
|
+
d.current[h] = N;
|
|
970
970
|
}
|
|
971
971
|
}
|
|
972
972
|
)
|
|
@@ -978,7 +978,7 @@ const Ea = ({
|
|
|
978
978
|
I,
|
|
979
979
|
{
|
|
980
980
|
control: t,
|
|
981
|
-
name: `headers.${
|
|
981
|
+
name: `headers.${h}.value`,
|
|
982
982
|
render: ({ field: y }) => (v == null ? void 0 : v.enum) && v.enum.length > 0 ? /* @__PURE__ */ e.jsx(
|
|
983
983
|
ee,
|
|
984
984
|
{
|
|
@@ -986,7 +986,7 @@ const Ea = ({
|
|
|
986
986
|
value: y.value,
|
|
987
987
|
options: v.enum ?? [],
|
|
988
988
|
onChange: (w) => {
|
|
989
|
-
y.onChange(w), i(`headers.${
|
|
989
|
+
y.onChange(w), i(`headers.${h}.active`, !0);
|
|
990
990
|
},
|
|
991
991
|
className: "font-mono text-xs border-0"
|
|
992
992
|
}
|
|
@@ -997,10 +997,10 @@ const Ea = ({
|
|
|
997
997
|
className: "w-full border-0 shadow-none text-xs font-mono focus-visible:ring-0",
|
|
998
998
|
...y,
|
|
999
999
|
ref: (w) => {
|
|
1000
|
-
c.current[
|
|
1000
|
+
c.current[h] = w;
|
|
1001
1001
|
},
|
|
1002
1002
|
onKeyDown: (w) => {
|
|
1003
|
-
w.key === "Enter" && w.currentTarget.value.trim() && b(
|
|
1003
|
+
w.key === "Enter" && w.currentTarget.value.trim() && b(h);
|
|
1004
1004
|
},
|
|
1005
1005
|
autoComplete: "off"
|
|
1006
1006
|
}
|
|
@@ -1013,13 +1013,13 @@ const Ea = ({
|
|
|
1013
1013
|
size: "icon",
|
|
1014
1014
|
variant: "ghost",
|
|
1015
1015
|
className: "text-muted-foreground opacity-0 group-hover:opacity-100 rounded-full w-8 h-7",
|
|
1016
|
-
onClick: () => r(
|
|
1016
|
+
onClick: () => r(h),
|
|
1017
1017
|
type: "button",
|
|
1018
1018
|
children: /* @__PURE__ */ e.jsx($t, { size: 16 })
|
|
1019
1019
|
}
|
|
1020
1020
|
)
|
|
1021
1021
|
] })
|
|
1022
|
-
] },
|
|
1022
|
+
] }, f.id);
|
|
1023
1023
|
}) }) }),
|
|
1024
1024
|
/* @__PURE__ */ e.jsx("div", { className: "text-end", children: /* @__PURE__ */ e.jsx(
|
|
1025
1025
|
K,
|
|
@@ -1125,9 +1125,9 @@ const Ea = ({
|
|
|
1125
1125
|
ee,
|
|
1126
1126
|
{
|
|
1127
1127
|
value: d.value,
|
|
1128
|
-
options: a.map((
|
|
1129
|
-
onChange: (
|
|
1130
|
-
d.onChange(
|
|
1128
|
+
options: a.map((u) => u.name),
|
|
1129
|
+
onChange: (u) => {
|
|
1130
|
+
d.onChange(u);
|
|
1131
1131
|
},
|
|
1132
1132
|
className: "border-0 font-mono text-xs bg-transparent hover:bg-transparent"
|
|
1133
1133
|
}
|
|
@@ -1204,7 +1204,7 @@ const Ea = ({
|
|
|
1204
1204
|
] }),
|
|
1205
1205
|
/* @__PURE__ */ e.jsx(He, { children: /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-[auto,1fr] gap-x-8 gap-y-1 pl-1.5 pt-2", children: s.map(([r, i]) => /* @__PURE__ */ e.jsxs(k, { children: [
|
|
1206
1206
|
/* @__PURE__ */ e.jsx("div", { className: "text-primary", children: r }),
|
|
1207
|
-
/* @__PURE__ */ e.jsx("div", { className: "break-
|
|
1207
|
+
/* @__PURE__ */ e.jsx("div", { className: "break-all", children: i })
|
|
1208
1208
|
] }, r)) }) })
|
|
1209
1209
|
] }),
|
|
1210
1210
|
/* @__PURE__ */ e.jsxs(Fe, { defaultOpen: !0, children: [
|
|
@@ -1302,13 +1302,13 @@ const Ua = {
|
|
|
1302
1302
|
size: r,
|
|
1303
1303
|
url: i
|
|
1304
1304
|
}) => {
|
|
1305
|
-
var
|
|
1306
|
-
const l = _a(a), c = Ja(t), d = c || t, [
|
|
1305
|
+
var p;
|
|
1306
|
+
const l = _a(a), c = Ja(t), d = c || t, [u, g] = U(
|
|
1307
1307
|
c ? "formatted" : "raw"
|
|
1308
1308
|
), C = It({
|
|
1309
1309
|
queryKey: ["types", d],
|
|
1310
1310
|
queryFn: async () => Ba(JSON.parse(d)),
|
|
1311
|
-
enabled:
|
|
1311
|
+
enabled: u === "types"
|
|
1312
1312
|
}), b = Qa([...a]);
|
|
1313
1313
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 h-full overflow-y-scroll max-h-[calc(100vh-220px)] py-4", children: [
|
|
1314
1314
|
/* @__PURE__ */ e.jsxs(Be, { defaultOpen: !0, children: [
|
|
@@ -1317,10 +1317,10 @@ const Ua = {
|
|
|
1317
1317
|
/* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Headers" })
|
|
1318
1318
|
] }),
|
|
1319
1319
|
/* @__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(([
|
|
1321
|
-
/* @__PURE__ */ e.jsx("div", { className: "text-primary whitespace-pre", children:
|
|
1322
|
-
/* @__PURE__ */ e.jsx("div", { className: "break-all", children:
|
|
1323
|
-
] },
|
|
1320
|
+
b.slice(0, 5).map(([f, h]) => /* @__PURE__ */ e.jsxs(k, { children: [
|
|
1321
|
+
/* @__PURE__ */ e.jsx("div", { className: "text-primary whitespace-pre", children: f }),
|
|
1322
|
+
/* @__PURE__ */ e.jsx("div", { className: "break-all", children: h })
|
|
1323
|
+
] }, f)),
|
|
1324
1324
|
b.length > 5 && /* @__PURE__ */ e.jsxs(Be, { className: "col-span-full grid-cols-subgrid grid", children: [
|
|
1325
1325
|
/* @__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
1326
|
/* @__PURE__ */ e.jsx(B, { className: "h-3 w-3 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
|
|
@@ -1328,20 +1328,20 @@ const Ua = {
|
|
|
1328
1328
|
b.length - 5,
|
|
1329
1329
|
" more headers"
|
|
1330
1330
|
] }),
|
|
1331
|
-
/* @__PURE__ */ e.jsx(Me, { className: "col-span-full grid grid-cols-subgrid gap-x-8 gap-y-1 ", children: b.slice(5).map(([
|
|
1332
|
-
/* @__PURE__ */ e.jsx("div", { className: "text-primary whitespace-pre", children:
|
|
1333
|
-
/* @__PURE__ */ e.jsx("div", { className: "break-all", children:
|
|
1334
|
-
] },
|
|
1331
|
+
/* @__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: [
|
|
1332
|
+
/* @__PURE__ */ e.jsx("div", { className: "text-primary whitespace-pre", children: f }),
|
|
1333
|
+
/* @__PURE__ */ e.jsx("div", { className: "break-all", children: h })
|
|
1334
|
+
] }, f)) })
|
|
1335
1335
|
] })
|
|
1336
1336
|
] }) })
|
|
1337
1337
|
] }),
|
|
1338
1338
|
/* @__PURE__ */ e.jsx(je, { className: "shadow-none", children: /* @__PURE__ */ e.jsx(
|
|
1339
1339
|
Kt,
|
|
1340
1340
|
{
|
|
1341
|
-
language:
|
|
1341
|
+
language: u === "types" ? "typescript" : u === "raw" ? c ? "plain" : l : "json",
|
|
1342
1342
|
noBackground: !0,
|
|
1343
1343
|
className: "overflow-x-auto p-4 text-xs max-h-[calc(83.333vh-180px)]",
|
|
1344
|
-
code: (
|
|
1344
|
+
code: (u === "raw" ? t : u === "types" ? (p = C.data) == null ? void 0 : p.lines.join(`
|
|
1345
1345
|
`) : d) ?? ""
|
|
1346
1346
|
}
|
|
1347
1347
|
) }),
|
|
@@ -1370,8 +1370,8 @@ const Ua = {
|
|
|
1370
1370
|
c && /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs(
|
|
1371
1371
|
Qe,
|
|
1372
1372
|
{
|
|
1373
|
-
value:
|
|
1374
|
-
onValueChange: (
|
|
1373
|
+
value: u,
|
|
1374
|
+
onValueChange: (f) => g(f),
|
|
1375
1375
|
children: [
|
|
1376
1376
|
/* @__PURE__ */ e.jsx(Ze, { className: "min-w-32", children: /* @__PURE__ */ e.jsx(We, { placeholder: "View" }) }),
|
|
1377
1377
|
/* @__PURE__ */ e.jsxs(Ke, { children: [
|
|
@@ -1498,9 +1498,9 @@ const Ua = {
|
|
|
1498
1498
|
examples: d
|
|
1499
1499
|
}) => {
|
|
1500
1500
|
var Oe, Ee, Ae;
|
|
1501
|
-
const { selectedServer:
|
|
1501
|
+
const { selectedServer: u, setSelectedServer: g } = Ot(
|
|
1502
1502
|
a.map((o) => ({ url: o }))
|
|
1503
|
-
), [, C] = Vt(), { register: b, control:
|
|
1503
|
+
), [, C] = Vt(), { register: b, control: p, handleSubmit: f, watch: h, setValue: v, ...y } = Mt({
|
|
1504
1504
|
defaultValues: {
|
|
1505
1505
|
body: c,
|
|
1506
1506
|
queryParams: i.map((o) => ({
|
|
@@ -1533,7 +1533,7 @@ const Ua = {
|
|
|
1533
1533
|
]),
|
|
1534
1534
|
identity: H
|
|
1535
1535
|
}
|
|
1536
|
-
}), N =
|
|
1536
|
+
}), N = h(), w = Et(), L = q(!1);
|
|
1537
1537
|
fe(() => {
|
|
1538
1538
|
var R;
|
|
1539
1539
|
if (L.current) return;
|
|
@@ -1544,7 +1544,7 @@ const Ua = {
|
|
|
1544
1544
|
mutationFn: async (o) => {
|
|
1545
1545
|
var J, F;
|
|
1546
1546
|
const R = performance.now(), S = new Request(
|
|
1547
|
-
xa(
|
|
1547
|
+
xa(t ?? u, s, o),
|
|
1548
1548
|
{
|
|
1549
1549
|
method: n.toUpperCase(),
|
|
1550
1550
|
headers: Object.fromEntries(
|
|
@@ -1553,7 +1553,7 @@ const Ua = {
|
|
|
1553
1553
|
body: o.body ? o.body : void 0
|
|
1554
1554
|
}
|
|
1555
1555
|
);
|
|
1556
|
-
o.identity !== H && ((F = (J = w.data) == null ? void 0 : J.find((T) => T.id === o.identity)) == null
|
|
1556
|
+
o.identity !== H && await ((F = (J = w.data) == null ? void 0 : J.find((T) => T.id === o.identity)) == null ? void 0 : F.authorizeRequest(S));
|
|
1557
1557
|
try {
|
|
1558
1558
|
const T = await fetch(S, {
|
|
1559
1559
|
signal: AbortSignal.timeout(5e3)
|
|
@@ -1608,33 +1608,33 @@ const Ua = {
|
|
|
1608
1608
|
encodeURIComponent(o.value).replaceAll("%20", "+"),
|
|
1609
1609
|
R < S.length - 1 && "&",
|
|
1610
1610
|
/* @__PURE__ */ e.jsx("wbr", {})
|
|
1611
|
-
] }, o.name)), xt = /* @__PURE__ */ e.jsx("div", { className: "inline-block opacity-50 hover:opacity-100 transition", children:
|
|
1611
|
+
] }, o.name)), xt = /* @__PURE__ */ e.jsx("div", { className: "inline-block opacity-50 hover:opacity-100 transition", children: t ? /* @__PURE__ */ e.jsx("span", { children: t.replace(/^https?:\/\//, "") }) : a.length > 1 && /* @__PURE__ */ e.jsxs(
|
|
1612
1612
|
Qe,
|
|
1613
1613
|
{
|
|
1614
1614
|
onValueChange: (o) => {
|
|
1615
1615
|
C(() => g(o));
|
|
1616
1616
|
},
|
|
1617
|
-
value:
|
|
1618
|
-
defaultValue:
|
|
1617
|
+
value: u,
|
|
1618
|
+
defaultValue: u,
|
|
1619
1619
|
children: [
|
|
1620
1620
|
/* @__PURE__ */ e.jsx(Ze, { className: "p-0 border-none flex-row-reverse bg-transparent text-xs gap-0.5 h-auto", children: /* @__PURE__ */ e.jsx(We, {}) }),
|
|
1621
1621
|
/* @__PURE__ */ e.jsx(Ke, { children: a.map((o) => /* @__PURE__ */ e.jsx(Q, { value: o, children: o.replace(/^https?:\/\//, "") }, o)) })
|
|
1622
1622
|
]
|
|
1623
1623
|
}
|
|
1624
|
-
)
|
|
1624
|
+
) });
|
|
1625
1625
|
return /* @__PURE__ */ e.jsx(
|
|
1626
1626
|
_t,
|
|
1627
1627
|
{
|
|
1628
1628
|
register: b,
|
|
1629
|
-
control:
|
|
1630
|
-
handleSubmit:
|
|
1631
|
-
watch:
|
|
1629
|
+
control: p,
|
|
1630
|
+
handleSubmit: f,
|
|
1631
|
+
watch: h,
|
|
1632
1632
|
setValue: v,
|
|
1633
1633
|
...y,
|
|
1634
1634
|
children: /* @__PURE__ */ e.jsx(
|
|
1635
1635
|
"form",
|
|
1636
1636
|
{
|
|
1637
|
-
onSubmit:
|
|
1637
|
+
onSubmit: f((o) => _.mutateAsync(o)),
|
|
1638
1638
|
ref: V,
|
|
1639
1639
|
children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-2 text-sm h-full", children: [
|
|
1640
1640
|
/* @__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: [
|
|
@@ -1673,15 +1673,15 @@ const Ua = {
|
|
|
1673
1673
|
] }),
|
|
1674
1674
|
/* @__PURE__ */ e.jsx(E, { value: "body", children: "Body" })
|
|
1675
1675
|
] }) }),
|
|
1676
|
-
/* @__PURE__ */ e.jsx(A, { value: "headers", children: /* @__PURE__ */ e.jsx(qa, { control:
|
|
1676
|
+
/* @__PURE__ */ e.jsx(A, { value: "headers", children: /* @__PURE__ */ e.jsx(qa, { control: p, headers: r }) }),
|
|
1677
1677
|
/* @__PURE__ */ e.jsxs(A, { value: "parameters", children: [
|
|
1678
1678
|
l.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
|
|
1679
1679
|
/* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Path Parameters" }),
|
|
1680
|
-
/* @__PURE__ */ e.jsx(Da, { control:
|
|
1680
|
+
/* @__PURE__ */ e.jsx(Da, { control: p })
|
|
1681
1681
|
] }),
|
|
1682
1682
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
|
|
1683
1683
|
/* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Query Parameters" }),
|
|
1684
|
-
/* @__PURE__ */ e.jsx(Va, { control:
|
|
1684
|
+
/* @__PURE__ */ e.jsx(Va, { control: p, queryParams: i })
|
|
1685
1685
|
] })
|
|
1686
1686
|
] }),
|
|
1687
1687
|
/* @__PURE__ */ e.jsxs(A, { value: "body", children: [
|
|
@@ -1868,7 +1868,7 @@ const Ua = {
|
|
|
1868
1868
|
}), Je = (t) => ({
|
|
1869
1869
|
path: t.routePath,
|
|
1870
1870
|
async lazy() {
|
|
1871
|
-
const { OasProvider: a } = await import("./OasProvider-
|
|
1871
|
+
const { OasProvider: a } = await import("./OasProvider-IS9wBrb7.js");
|
|
1872
1872
|
return {
|
|
1873
1873
|
element: /* @__PURE__ */ e.jsx(
|
|
1874
1874
|
a,
|
|
@@ -1889,7 +1889,7 @@ const Ua = {
|
|
|
1889
1889
|
}) => ({
|
|
1890
1890
|
path: t,
|
|
1891
1891
|
async lazy() {
|
|
1892
|
-
const { OperationList: n } = await import("./OperationList-
|
|
1892
|
+
const { OperationList: n } = await import("./OperationList-BTmRbbXk.js");
|
|
1893
1893
|
return { element: /* @__PURE__ */ e.jsx(n, { tag: a, untagged: s }) };
|
|
1894
1894
|
}
|
|
1895
1895
|
}), as = (t, a) => {
|
|
@@ -1997,17 +1997,18 @@ const Ua = {
|
|
|
1997
1997
|
server: r,
|
|
1998
1998
|
method: i,
|
|
1999
1999
|
url: l,
|
|
2000
|
-
|
|
2000
|
+
children: c,
|
|
2001
|
+
...d
|
|
2001
2002
|
}) => {
|
|
2002
|
-
const
|
|
2003
|
+
const u = At();
|
|
2003
2004
|
if (!r)
|
|
2004
2005
|
throw new Error("Server is required");
|
|
2005
|
-
return n && !
|
|
2006
|
+
return n && !u.isAuthenticated ? /* @__PURE__ */ e.jsxs(
|
|
2006
2007
|
K,
|
|
2007
2008
|
{
|
|
2008
2009
|
className: "gap-2 items-center",
|
|
2009
2010
|
variant: "outline",
|
|
2010
|
-
onClick:
|
|
2011
|
+
onClick: u.login,
|
|
2011
2012
|
children: [
|
|
2012
2013
|
"Login to open in Playground ",
|
|
2013
2014
|
/* @__PURE__ */ e.jsx(Pt, { size: 16 })
|
|
@@ -2019,11 +2020,11 @@ const Ua = {
|
|
|
2019
2020
|
url: l ?? "/",
|
|
2020
2021
|
method: i ?? "get",
|
|
2021
2022
|
server: r,
|
|
2022
|
-
...
|
|
2023
|
-
children: /* @__PURE__ */ e.
|
|
2023
|
+
...d,
|
|
2024
|
+
children: /* @__PURE__ */ e.jsx(K, { className: "gap-2 items-center", variant: "outline", children: c ?? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2024
2025
|
"Open in Playground ",
|
|
2025
2026
|
/* @__PURE__ */ e.jsx(Rt, { size: 16 })
|
|
2026
|
-
] })
|
|
2027
|
+
] }) })
|
|
2027
2028
|
}
|
|
2028
2029
|
);
|
|
2029
2030
|
}
|
|
@@ -2037,21 +2038,21 @@ const Ua = {
|
|
|
2037
2038
|
n
|
|
2038
2039
|
);
|
|
2039
2040
|
try {
|
|
2040
|
-
const l = r == null ? void 0 : r.params.version, c = l ?? pt(t).at(0), d = t.type,
|
|
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, g = t.loadTags === !0 || t.type === "url", C = !t.loadTags && t.type !== "url", b = (i = t.tagPages) == null ? void 0 : i.find(
|
|
2041
2042
|
(v) => W(v) === (r == null ? void 0 : r.params.tag)
|
|
2042
|
-
), [
|
|
2043
|
-
s.fetch(ns, { type: d, input:
|
|
2043
|
+
), [p, f] = await Promise.all([
|
|
2044
|
+
s.fetch(ns, { type: d, input: u }),
|
|
2044
2045
|
s.fetch(rs, {
|
|
2045
2046
|
type: d,
|
|
2046
|
-
input:
|
|
2047
|
+
input: u,
|
|
2047
2048
|
tag: t.loadTags ? void 0 : b
|
|
2048
2049
|
})
|
|
2049
|
-
]),
|
|
2050
|
+
]), h = p.schema.tags.flatMap((v) => {
|
|
2050
2051
|
const y = O(
|
|
2051
2052
|
a,
|
|
2052
2053
|
l,
|
|
2053
2054
|
W(v.name)
|
|
2054
|
-
), N =
|
|
2055
|
+
), N = f.schema.operations.filter(
|
|
2055
2056
|
(w) => {
|
|
2056
2057
|
var L, V;
|
|
2057
2058
|
return ((L = w.tags) == null ? void 0 : L.length) !== 0 && ((V = w.tags) == null ? void 0 : V.map((_) => _.name).includes(v.name));
|
|
@@ -2065,15 +2066,15 @@ const Ua = {
|
|
|
2065
2066
|
collapsed: C
|
|
2066
2067
|
});
|
|
2067
2068
|
});
|
|
2068
|
-
return
|
|
2069
|
+
return f.schema.untagged.length > 0 && h.push(
|
|
2069
2070
|
_e({
|
|
2070
2071
|
label: "Other endpoints",
|
|
2071
2072
|
path: O(a, l, G),
|
|
2072
|
-
operations: (r == null ? void 0 : r.params.tag) === G || t.loadTags ?
|
|
2073
|
+
operations: (r == null ? void 0 : r.params.tag) === G || t.loadTags ? f.schema.untagged : [],
|
|
2073
2074
|
collapsible: g,
|
|
2074
2075
|
collapsed: C
|
|
2075
2076
|
})
|
|
2076
|
-
),
|
|
2077
|
+
), h;
|
|
2077
2078
|
} catch {
|
|
2078
2079
|
return [];
|
|
2079
2080
|
}
|
|
@@ -2094,4 +2095,4 @@ export {
|
|
|
2094
2095
|
za as m,
|
|
2095
2096
|
Is as o
|
|
2096
2097
|
};
|
|
2097
|
-
//# sourceMappingURL=index-
|
|
2098
|
+
//# sourceMappingURL=index-BANyVRgL.js.map
|