zudoku 0.28.0 → 0.28.2
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/app/main.js +1 -3
- package/dist/app/main.js.map +1 -1
- package/dist/config/validators/InputSidebarSchema.d.ts +2 -2
- package/dist/lib/components/PathRenderer.d.ts +11 -0
- package/dist/lib/components/PathRenderer.js +25 -0
- package/dist/lib/components/PathRenderer.js.map +1 -0
- package/dist/lib/components/ThemeSwitch.js +4 -4
- package/dist/lib/components/ThemeSwitch.js.map +1 -1
- package/dist/lib/components/index.d.ts +5 -0
- package/dist/lib/components/index.js +6 -2
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/Sidebar.js +6 -1
- package/dist/lib/components/navigation/Sidebar.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.js +16 -14
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/oas/graphql/circular.js +17 -6
- package/dist/lib/oas/graphql/circular.js.map +1 -1
- package/dist/lib/oas/graphql/index.js +11 -10
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js +3 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.d.ts +2 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +2 -2
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +6 -2
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +5 -10
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.d.ts +2 -3
- package/dist/lib/plugins/openapi/playground/Headers.js +2 -2
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +3 -0
- package/dist/lib/plugins/openapi/playground/Playground.js +8 -16
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/{SchemaComponents.js → SchemaPropertyItem.js} +10 -8
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/SchemaView.js +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/utils.d.ts +1 -0
- package/dist/lib/plugins/openapi/schema/utils.js +2 -0
- package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
- package/dist/lib/util/scrollIntoViewIfNeeded.d.ts +1 -0
- package/dist/lib/util/scrollIntoViewIfNeeded.js +14 -0
- package/dist/lib/util/scrollIntoViewIfNeeded.js.map +1 -0
- package/dist/lib/util/useScrollToAnchor.js +1 -13
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/vite/plugin-api.js +97 -95
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-theme-css.js +7 -4
- package/dist/vite/plugin-theme-css.js.map +1 -1
- package/dist/vite/prerender.js +0 -1
- package/dist/vite/prerender.js.map +1 -1
- package/lib/{AuthenticationPlugin-Du8cLBSr.js → AuthenticationPlugin-DeEA69mE.js} +3 -3
- package/lib/{AuthenticationPlugin-Du8cLBSr.js.map → AuthenticationPlugin-DeEA69mE.js.map} +1 -1
- package/lib/{Markdown-Cyrx_JrO.js → Markdown-LcMEZ0Sn.js} +2 -2
- package/lib/{Markdown-Cyrx_JrO.js.map → Markdown-LcMEZ0Sn.js.map} +1 -1
- package/lib/{MdxPage-DewragjB.js → MdxPage-DkH3V4hV.js} +5 -5
- package/lib/{MdxPage-DewragjB.js.map → MdxPage-DkH3V4hV.js.map} +1 -1
- package/lib/{OpenApiRoute-UrC_t0e5.js → OpenApiRoute-ULLXjfro.js} +3 -3
- package/lib/{OpenApiRoute-UrC_t0e5.js.map → OpenApiRoute-ULLXjfro.js.map} +1 -1
- package/lib/{OperationList-D_ejrepA.js → OperationList-wzZNceUl.js} +738 -727
- package/lib/OperationList-wzZNceUl.js.map +1 -0
- package/lib/{Select-CnCZ4WhS.js → Select-DJkXPPD0.js} +3 -3
- package/lib/{Select-CnCZ4WhS.js.map → Select-DJkXPPD0.js.map} +1 -1
- package/lib/{SlotletProvider-mQiPDQIH.js → SlotletProvider-D1t2ePCI.js} +4 -4
- package/lib/{SlotletProvider-mQiPDQIH.js.map → SlotletProvider-D1t2ePCI.js.map} +1 -1
- package/lib/{ZudokuContext-BTUJPpQl.js → ZudokuContext-dUyBGMap.js} +2 -2
- package/lib/{ZudokuContext-BTUJPpQl.js.map → ZudokuContext-dUyBGMap.js.map} +1 -1
- package/lib/{chunk-SYFQ2XB5-BPvC-soB.js → chunk-SYFQ2XB5-QijJrSf0.js} +3 -3
- package/lib/{chunk-SYFQ2XB5-BPvC-soB.js.map → chunk-SYFQ2XB5-QijJrSf0.js.map} +1 -1
- package/lib/{circular-Dgpd6AN-.js → circular-DxaIIlWD.js} +251 -239
- package/lib/{circular-Dgpd6AN-.js.map → circular-DxaIIlWD.js.map} +1 -1
- package/lib/{createServer-BydbkTsd.js → createServer-DIztAu7i.js} +12 -9
- package/lib/{createServer-BydbkTsd.js.map → createServer-DIztAu7i.js.map} +1 -1
- package/lib/{hook-FT3SJLe_.js → hook-CiX69UZ6.js} +2 -2
- package/lib/{hook-FT3SJLe_.js.map → hook-CiX69UZ6.js.map} +1 -1
- package/lib/{index-DGugJOLc.js → index-DrR58fsJ.js} +663 -629
- package/lib/index-DrR58fsJ.js.map +1 -0
- package/lib/{useExposedProps-BLKFBylA.js → useExposedProps-Bbf99zic.js} +2 -2
- package/lib/{useExposedProps-BLKFBylA.js.map → useExposedProps-Bbf99zic.js.map} +1 -1
- package/lib/{useScrollToAnchor-eRM9tVvD.js → useScrollToAnchor-DYGn1MT9.js} +86 -90
- package/lib/useScrollToAnchor-DYGn1MT9.js.map +1 -0
- package/lib/zudoku.auth-clerk.js +1 -1
- package/lib/zudoku.auth-openid.js +3 -3
- package/lib/zudoku.components.js +596 -492
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +3 -3
- package/lib/zudoku.plugin-api-keys.js +5 -5
- package/lib/zudoku.plugin-custom-pages.js +2 -2
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +3 -3
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/package.json +2 -2
- package/src/app/main.tsx +7 -3
- package/src/lib/components/PathRenderer.tsx +59 -0
- package/src/lib/components/ThemeSwitch.tsx +15 -14
- package/src/lib/components/index.ts +9 -5
- package/src/lib/components/navigation/Sidebar.tsx +7 -1
- package/src/lib/components/navigation/SidebarCategory.tsx +43 -41
- package/src/lib/oas/graphql/circular.ts +27 -6
- package/src/lib/oas/graphql/index.ts +14 -17
- package/src/lib/plugins/openapi/ColorizedParam.tsx +3 -3
- package/src/lib/plugins/openapi/OperationListItem.tsx +7 -2
- package/src/lib/plugins/openapi/ParameterListItem.tsx +1 -1
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +7 -2
- package/src/lib/plugins/openapi/Sidecar.tsx +17 -26
- package/src/lib/plugins/openapi/playground/Headers.tsx +5 -9
- package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -1
- package/src/lib/plugins/openapi/playground/Playground.tsx +27 -34
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +5 -2
- package/src/lib/plugins/openapi/schema/{SchemaComponents.tsx → SchemaPropertyItem.tsx} +10 -6
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +4 -1
- package/src/lib/plugins/openapi/schema/utils.ts +4 -0
- package/src/lib/util/scrollIntoViewIfNeeded.ts +18 -0
- package/src/lib/util/useScrollToAnchor.ts +1 -19
- package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +0 -1
- package/lib/OperationList-D_ejrepA.js.map +0 -1
- package/lib/index-DGugJOLc.js.map +0 -1
- package/lib/useScrollToAnchor-eRM9tVvD.js.map +0 -1
- /package/dist/lib/plugins/openapi/schema/{SchemaComponents.d.ts → SchemaPropertyItem.d.ts} +0 -0
|
@@ -1,85 +1,85 @@
|
|
|
1
1
|
var ut = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var Ie = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
5
|
var pt = (t, a, s) => a in t ? ut(t, a, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[a] = s;
|
|
6
|
-
var
|
|
7
|
-
var
|
|
6
|
+
var X = (t, a, s) => pt(t, typeof a != "symbol" ? a + "" : a, s), ht = (t, a, s) => a.has(t) || Ie("Cannot " + s);
|
|
7
|
+
var Y = (t, a, s) => (ht(t, a, "read from private field"), s ? s.call(t) : a.get(t)), ee = (t, a, s) => a.has(t) ? Ie("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(t) : a.set(t, s);
|
|
8
8
|
import { j as e } from "./jsx-runtime-Bdg6XQ1m.js";
|
|
9
|
-
import { s as
|
|
10
|
-
import { Circle as xt, ChevronRightIcon as z, CheckIcon as ft, DotIcon as gt, Check as yt, Search as vt, XIcon as jt, ChevronDownIcon as bt, InfoIcon as
|
|
11
|
-
import { m as Ct, r as
|
|
12
|
-
import { u as
|
|
13
|
-
import { Button as
|
|
14
|
-
import { j as
|
|
15
|
-
import { Z as
|
|
9
|
+
import { s as te } from "./index-CjJS0l4l.js";
|
|
10
|
+
import { Circle as xt, ChevronRightIcon as z, CheckIcon as ft, DotIcon as gt, Check as yt, Search as vt, XIcon as jt, ChevronDownIcon as bt, InfoIcon as Ee, LogInIcon as Nt, CirclePlayIcon as wt } from "lucide-react";
|
|
11
|
+
import { m as Ct, r as $t } from "./chunk-SYFQ2XB5-QijJrSf0.js";
|
|
12
|
+
import { u as St } from "./hook-CiX69UZ6.js";
|
|
13
|
+
import { Button as _ } from "./ui/Button.js";
|
|
14
|
+
import { j as I } from "./joinUrl-nLx9pD-Z.js";
|
|
15
|
+
import { Z as Tt } from "./invariant-Caa8-XvF.js";
|
|
16
16
|
import { VisuallyHidden as Pt } from "@radix-ui/react-visually-hidden";
|
|
17
|
-
import * as
|
|
18
|
-
import {
|
|
19
|
-
import { V as
|
|
20
|
-
import { S as
|
|
21
|
-
import { b as
|
|
22
|
-
import { c as
|
|
17
|
+
import * as h from "react";
|
|
18
|
+
import { Fragment as k, useRef as q, useEffect as He, useState as H, useTransition as kt } from "react";
|
|
19
|
+
import { V as b, T as Rt, D as Ot, b as It, a as Et, c as At } from "./index-B7mqiOei.js";
|
|
20
|
+
import { S as Be, a as Ge, b as Ue, c as Me, e as U, u as qt } from "./Select-DJkXPPD0.js";
|
|
21
|
+
import { b as ue, u as pe, C as R, a as Dt, F as Lt } from "./index.esm-CrSoEshU.js";
|
|
22
|
+
import { c as he } from "./index-Djenk2Hj.js";
|
|
23
23
|
import { c as u } from "./cn-qaFjX9_3.js";
|
|
24
|
-
import * as
|
|
25
|
-
import * as
|
|
24
|
+
import * as _e from "@radix-ui/react-label";
|
|
25
|
+
import * as B from "@radix-ui/react-radio-group";
|
|
26
26
|
import { a as Vt } from "./state-mM7uaXTW.js";
|
|
27
|
-
import { k as Ft, l as zt } from "./ZudokuContext-
|
|
28
|
-
import { Card as
|
|
29
|
-
import { Tabs as
|
|
27
|
+
import { k as Ft, l as zt } from "./ZudokuContext-dUyBGMap.js";
|
|
28
|
+
import { Card as xe, CardHeader as Ht, CardTitle as Bt, CardContent as Gt } from "./ui/Card.js";
|
|
29
|
+
import { Tabs as Je, TabsList as Qe, TabsTrigger as E, TabsContent as A } from "./ui/Tabs.js";
|
|
30
30
|
import { z as Ut, S as Mt } from "./SyntaxHighlight-B0L4SC_N.js";
|
|
31
|
-
import { B as
|
|
32
|
-
import * as
|
|
33
|
-
import * as
|
|
34
|
-
import * as
|
|
31
|
+
import { B as M, S as _t } from "./Spinner-BlzrEEk1.js";
|
|
32
|
+
import * as y from "@radix-ui/react-dropdown-menu";
|
|
33
|
+
import * as ie from "@radix-ui/react-checkbox";
|
|
34
|
+
import * as J from "@radix-ui/react-popover";
|
|
35
35
|
import { PopoverAnchor as Jt } from "@radix-ui/react-popover";
|
|
36
|
-
import { Input as
|
|
36
|
+
import { Input as fe } from "./ui/Input.js";
|
|
37
37
|
import { Slot as Qt } from "@radix-ui/react-slot";
|
|
38
38
|
import { Callout as Wt } from "./ui/Callout.js";
|
|
39
|
-
import { Collapsible as
|
|
40
|
-
import * as
|
|
41
|
-
let
|
|
39
|
+
import { Collapsible as Ae, CollapsibleTrigger as qe, CollapsibleContent as De } from "./ui/Collapsible.js";
|
|
40
|
+
import * as ge from "@radix-ui/react-collapsible";
|
|
41
|
+
let ae;
|
|
42
42
|
const Zt = (t) => {
|
|
43
43
|
var a;
|
|
44
44
|
if ((a = t.errors) != null && a[0])
|
|
45
|
-
throw new
|
|
45
|
+
throw new Tt(t.errors[0].message, {
|
|
46
46
|
developerHint: "Check your configuration value `apis.type` and `apis.input` in the Zudoku config."
|
|
47
47
|
});
|
|
48
48
|
};
|
|
49
|
-
var
|
|
49
|
+
var W, Z;
|
|
50
50
|
class Kt {
|
|
51
51
|
constructor(a) {
|
|
52
|
-
|
|
52
|
+
ee(this, W, async () => (ae || (ae = import("./createServer-DIztAu7i.js").then(
|
|
53
53
|
(a) => a.createServer(this.config)
|
|
54
|
-
)),
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
var
|
|
58
|
-
const n = (
|
|
54
|
+
)), ae));
|
|
55
|
+
ee(this, Z, async (a) => this.config.server ? fetch(this.config.server, a) : (await Y(this, W).call(this)).fetch("http://localhost/graphql", a));
|
|
56
|
+
X(this, "fetch", async (a, ...[s]) => {
|
|
57
|
+
var r;
|
|
58
|
+
const n = (r = a.match(/query (\w+)/)) == null ? void 0 : r[1], i = await Y(this, Z).call(this, {
|
|
59
59
|
method: "POST",
|
|
60
60
|
body: JSON.stringify({ query: a, variables: s, operationName: n }),
|
|
61
61
|
headers: { "Content-Type": "application/json" }
|
|
62
62
|
});
|
|
63
|
-
if (!
|
|
63
|
+
if (!i.ok)
|
|
64
64
|
throw new Error("Network response was not ok");
|
|
65
|
-
const d = await
|
|
65
|
+
const d = await i.json();
|
|
66
66
|
return Zt(d), d.data;
|
|
67
67
|
});
|
|
68
68
|
this.config = a;
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
|
|
72
|
-
class
|
|
71
|
+
W = new WeakMap(), Z = new WeakMap();
|
|
72
|
+
class D extends String {
|
|
73
73
|
constructor(s, n) {
|
|
74
74
|
super(s);
|
|
75
|
-
|
|
75
|
+
X(this, "__apiType");
|
|
76
76
|
this.value = s, this.__meta__ = n;
|
|
77
77
|
}
|
|
78
78
|
toString() {
|
|
79
79
|
return this.value;
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
const Xt = new
|
|
82
|
+
const Xt = new D(
|
|
83
83
|
`
|
|
84
84
|
fragment OperationsFragment on OperationItem {
|
|
85
85
|
slug
|
|
@@ -144,7 +144,7 @@ const Xt = new q(
|
|
|
144
144
|
}
|
|
145
145
|
`,
|
|
146
146
|
{ fragmentName: "OperationsFragment" }
|
|
147
|
-
), Yt = new
|
|
147
|
+
), Yt = new D(`
|
|
148
148
|
query ServersQuery($input: JSON!, $type: SchemaType!) {
|
|
149
149
|
schema(input: $input, type: $type) {
|
|
150
150
|
url
|
|
@@ -153,7 +153,7 @@ const Xt = new q(
|
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
-
`), ea = new
|
|
156
|
+
`), ea = new D(`
|
|
157
157
|
query AllOperations($input: JSON!, $type: SchemaType!, $tag: String, $untagged: Boolean) {
|
|
158
158
|
schema(input: $input, type: $type) {
|
|
159
159
|
description
|
|
@@ -231,7 +231,7 @@ const Xt = new q(
|
|
|
231
231
|
schema
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
|
-
}`), ta = new
|
|
234
|
+
}`), ta = new D(`
|
|
235
235
|
query getServerQuery($input: JSON!, $type: SchemaType!) {
|
|
236
236
|
schema(input: $input, type: $type) {
|
|
237
237
|
url
|
|
@@ -240,7 +240,7 @@ const Xt = new q(
|
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
-
`), aa = new
|
|
243
|
+
`), aa = new D(`
|
|
244
244
|
query GetCategories($input: JSON!, $type: SchemaType!) {
|
|
245
245
|
schema(input: $input, type: $type) {
|
|
246
246
|
url
|
|
@@ -249,7 +249,7 @@ const Xt = new q(
|
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
|
-
`), sa = new
|
|
252
|
+
`), sa = new D(`
|
|
253
253
|
query GetOperations($input: JSON!, $type: SchemaType!, $tag: String, $untagged: Boolean) {
|
|
254
254
|
schema(input: $input, type: $type) {
|
|
255
255
|
operations(tag: $tag, untagged: $untagged) {
|
|
@@ -270,10 +270,10 @@ const Xt = new q(
|
|
|
270
270
|
"\n query GetCategories($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n tags {\n name\n }\n }\n }\n": aa,
|
|
271
271
|
"\n query GetOperations(\n $input: JSON!\n $type: SchemaType!\n $tag: String\n $untagged: Boolean\n ) {\n schema(input: $input, type: $type) {\n operations(tag: $tag, untagged: $untagged) {\n slug\n deprecated\n method\n summary\n operationId\n path\n }\n }\n }\n": sa
|
|
272
272
|
};
|
|
273
|
-
function
|
|
273
|
+
function We(t) {
|
|
274
274
|
return na[t] ?? {};
|
|
275
275
|
}
|
|
276
|
-
const ra =
|
|
276
|
+
const ra = he(
|
|
277
277
|
"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
|
|
278
278
|
{
|
|
279
279
|
variants: {
|
|
@@ -286,7 +286,7 @@ const ra = ge(
|
|
|
286
286
|
variant: "default"
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
|
-
),
|
|
289
|
+
), le = h.forwardRef(({ className: t, variant: a, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
290
290
|
"div",
|
|
291
291
|
{
|
|
292
292
|
ref: n,
|
|
@@ -295,8 +295,8 @@ const ra = ge(
|
|
|
295
295
|
...s
|
|
296
296
|
}
|
|
297
297
|
));
|
|
298
|
-
|
|
299
|
-
const
|
|
298
|
+
le.displayName = "Alert";
|
|
299
|
+
const de = h.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
300
300
|
"h5",
|
|
301
301
|
{
|
|
302
302
|
ref: s,
|
|
@@ -304,8 +304,8 @@ const ue = p.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
304
304
|
...a
|
|
305
305
|
}
|
|
306
306
|
));
|
|
307
|
-
|
|
308
|
-
const
|
|
307
|
+
de.displayName = "AlertTitle";
|
|
308
|
+
const ce = h.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
309
309
|
"div",
|
|
310
310
|
{
|
|
311
311
|
ref: s,
|
|
@@ -313,29 +313,52 @@ const pe = p.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
313
313
|
...a
|
|
314
314
|
}
|
|
315
315
|
));
|
|
316
|
-
|
|
317
|
-
const oa =
|
|
316
|
+
ce.displayName = "AlertDescription";
|
|
317
|
+
const oa = ({
|
|
318
|
+
path: t,
|
|
319
|
+
renderParam: a
|
|
320
|
+
}) => t.split("/").map((s, n, i) => {
|
|
321
|
+
const d = Array.from(s.matchAll(/{([^}]+)}/g)), r = [];
|
|
322
|
+
let m = 0;
|
|
323
|
+
return d.forEach((c, p) => {
|
|
324
|
+
const [g, x] = c;
|
|
325
|
+
if (!x) return;
|
|
326
|
+
const f = c.index;
|
|
327
|
+
f > m && r.push(
|
|
328
|
+
/* @__PURE__ */ e.jsx(k, { children: s.slice(m, f) }, `text-${m}-${f}`)
|
|
329
|
+
), r.push(
|
|
330
|
+
/* @__PURE__ */ e.jsx(k, { children: a({ name: x, originalValue: g, index: p }) }, `param-${x}`)
|
|
331
|
+
), m = f + g.length;
|
|
332
|
+
}), m < s.length && r.push(
|
|
333
|
+
/* @__PURE__ */ e.jsx(k, { children: s.slice(m) }, `text-${m}-${s.length}`)
|
|
334
|
+
), // eslint-disable-next-line react/no-array-index-key
|
|
335
|
+
/* @__PURE__ */ e.jsxs(k, { children: [
|
|
336
|
+
r,
|
|
337
|
+
n < i.length - 1 && "/",
|
|
338
|
+
/* @__PURE__ */ e.jsx("wbr", {})
|
|
339
|
+
] }, `${s}-${n}`);
|
|
340
|
+
}), ia = he(
|
|
318
341
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
319
|
-
), V =
|
|
320
|
-
|
|
342
|
+
), V = h.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
343
|
+
_e.Root,
|
|
321
344
|
{
|
|
322
345
|
ref: s,
|
|
323
|
-
className: u(
|
|
346
|
+
className: u(ia(), t),
|
|
324
347
|
...a
|
|
325
348
|
}
|
|
326
349
|
));
|
|
327
|
-
V.displayName =
|
|
328
|
-
const
|
|
329
|
-
|
|
350
|
+
V.displayName = _e.Root.displayName;
|
|
351
|
+
const ye = h.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
352
|
+
B.Root,
|
|
330
353
|
{
|
|
331
354
|
className: u("grid gap-2", t),
|
|
332
355
|
...a,
|
|
333
356
|
ref: s
|
|
334
357
|
}
|
|
335
358
|
));
|
|
336
|
-
|
|
337
|
-
const
|
|
338
|
-
|
|
359
|
+
ye.displayName = B.Root.displayName;
|
|
360
|
+
const Q = h.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
361
|
+
B.Item,
|
|
339
362
|
{
|
|
340
363
|
ref: s,
|
|
341
364
|
className: u(
|
|
@@ -343,11 +366,11 @@ const W = p.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
343
366
|
t
|
|
344
367
|
),
|
|
345
368
|
...a,
|
|
346
|
-
children: /* @__PURE__ */ e.jsx(
|
|
369
|
+
children: /* @__PURE__ */ e.jsx(B.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(xt, { className: "h-2.5 w-2.5 fill-current text-current" }) })
|
|
347
370
|
}
|
|
348
371
|
));
|
|
349
|
-
|
|
350
|
-
const
|
|
372
|
+
Q.displayName = B.Item.displayName;
|
|
373
|
+
const Ze = h.forwardRef(
|
|
351
374
|
({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
352
375
|
"textarea",
|
|
353
376
|
{
|
|
@@ -360,86 +383,86 @@ const Xe = p.forwardRef(
|
|
|
360
383
|
}
|
|
361
384
|
)
|
|
362
385
|
);
|
|
363
|
-
|
|
364
|
-
const
|
|
386
|
+
Ze.displayName = "Textarea";
|
|
387
|
+
const se = (t) => Math.abs(
|
|
365
388
|
isNaN(parseInt(t)) ? t.toLowerCase().charCodeAt(0) - 96 : isNaN(parseInt(t)) ? 0 : parseInt(t)
|
|
366
|
-
),
|
|
367
|
-
const s = (3 *
|
|
368
|
-
return `${s}deg ${n}% ${
|
|
369
|
-
},
|
|
389
|
+
), ne = (t) => t.length > 1 ? parseInt(t.split("").reduce((a, s) => `${se(a) + se(s)}`)) : se(t), Le = (t, a = {}) => {
|
|
390
|
+
const s = (3 * ne(t) + 2 * ne(t) + ne(t)) % 360, { saturation: n = 75, lightness: i = 60 } = a;
|
|
391
|
+
return `${s}deg ${n}% ${i}%`;
|
|
392
|
+
}, re = "data-linked-param", la = (t) => {
|
|
370
393
|
const { resolvedTheme: a } = Ut();
|
|
371
394
|
return {
|
|
372
|
-
text:
|
|
395
|
+
text: Le(
|
|
373
396
|
t,
|
|
374
397
|
a === "light" ? { saturation: 95, lightness: 38 } : {}
|
|
375
398
|
),
|
|
376
|
-
background:
|
|
399
|
+
background: Le(
|
|
377
400
|
t,
|
|
378
401
|
a === "light" ? { saturation: 85, lightness: 40 } : {}
|
|
379
402
|
)
|
|
380
403
|
};
|
|
381
|
-
},
|
|
404
|
+
}, Ke = ({
|
|
382
405
|
name: t,
|
|
383
406
|
className: a,
|
|
384
407
|
slug: s,
|
|
385
408
|
title: n,
|
|
386
|
-
children:
|
|
409
|
+
children: i,
|
|
387
410
|
onClick: d
|
|
388
411
|
}) => {
|
|
389
|
-
const
|
|
390
|
-
return
|
|
391
|
-
if (!m || !
|
|
392
|
-
const
|
|
393
|
-
document.querySelectorAll(`[${
|
|
394
|
-
|
|
412
|
+
const r = q(null), m = s == null ? void 0 : s.replace(/[{}]/g, ""), c = t.replace(/[{}]/g, ""), { text: p, background: g } = la(c), x = `hsl(${p} / 100%)`, f = `hsl(${g} / 10%)`, l = `hsl(${g} / 50%)`;
|
|
413
|
+
return He(() => {
|
|
414
|
+
if (!m || !r.current) return;
|
|
415
|
+
const v = () => {
|
|
416
|
+
document.querySelectorAll(`[${re}="${m}"]`).forEach(($) => {
|
|
417
|
+
$ instanceof HTMLElement && ($.dataset.active = "true");
|
|
395
418
|
});
|
|
396
419
|
}, C = () => {
|
|
397
|
-
document.querySelectorAll(`[${
|
|
398
|
-
|
|
420
|
+
document.querySelectorAll(`[${re}="${m}"]`).forEach(($) => {
|
|
421
|
+
$ instanceof HTMLElement && ($.dataset.active = "false");
|
|
399
422
|
});
|
|
400
|
-
}, N =
|
|
401
|
-
return N.addEventListener("mouseenter",
|
|
402
|
-
N.removeEventListener("mouseenter",
|
|
423
|
+
}, N = r.current;
|
|
424
|
+
return N.addEventListener("mouseenter", v), N.addEventListener("mouseleave", C), () => {
|
|
425
|
+
N.removeEventListener("mouseenter", v), N.removeEventListener("mouseleave", C);
|
|
403
426
|
};
|
|
404
427
|
}, [m]), /* @__PURE__ */ e.jsx(
|
|
405
428
|
"span",
|
|
406
429
|
{
|
|
407
|
-
[
|
|
430
|
+
[re]: m,
|
|
408
431
|
className: u(
|
|
409
|
-
|
|
410
|
-
"rounded-lg",
|
|
432
|
+
// This may not contain (inline-)flex or (inline-)block otherwise it breaks the browser's full text search
|
|
433
|
+
"relative rounded transition-all duration-100 rounded-lg",
|
|
411
434
|
"border border-[--border-color] p-0.5 text-[--param-color] bg-[--background-color]",
|
|
412
|
-
"data-[active=true]:border-[--param-color] data-[active=true]:shadow data-[active=true]
|
|
435
|
+
"data-[active=true]:border-[--param-color] data-[active=true]:shadow data-[active=true]:bottom-px",
|
|
413
436
|
a
|
|
414
437
|
),
|
|
415
438
|
title: n,
|
|
416
439
|
suppressHydrationWarning: !0,
|
|
417
|
-
ref:
|
|
440
|
+
ref: r,
|
|
418
441
|
onClick: d,
|
|
419
442
|
style: {
|
|
420
|
-
"--param-color":
|
|
443
|
+
"--param-color": x,
|
|
421
444
|
"--border-color": l,
|
|
422
|
-
"--background-color":
|
|
445
|
+
"--background-color": f
|
|
423
446
|
},
|
|
424
|
-
children:
|
|
447
|
+
children: i ?? t
|
|
425
448
|
}
|
|
426
449
|
);
|
|
427
|
-
},
|
|
450
|
+
}, da = (t, a, s) => {
|
|
428
451
|
const n = a.replace(/(:\w+|\{\w+})/g, (d) => {
|
|
429
452
|
var c;
|
|
430
|
-
const
|
|
431
|
-
return ((c = s.pathParams.find((
|
|
432
|
-
}),
|
|
453
|
+
const r = d.replace(/[:{}]/g, "");
|
|
454
|
+
return ((c = s.pathParams.find((p) => p.name === r)) == null ? void 0 : c.value) ?? d;
|
|
455
|
+
}), i = new URL(
|
|
433
456
|
n.replace(/^\//, ""),
|
|
434
457
|
t.endsWith("/") ? t : `${t}/`
|
|
435
458
|
);
|
|
436
459
|
return s.queryParams.filter((d) => d.active).forEach((d) => {
|
|
437
|
-
|
|
438
|
-
}),
|
|
439
|
-
},
|
|
440
|
-
|
|
460
|
+
i.searchParams.set(d.name, d.value);
|
|
461
|
+
}), i;
|
|
462
|
+
}, Xe = y.Root, Ye = y.Trigger, ca = y.Group, ma = h.forwardRef(({ className: t, inset: a, children: s, ...n }, i) => /* @__PURE__ */ e.jsxs(
|
|
463
|
+
y.SubTrigger,
|
|
441
464
|
{
|
|
442
|
-
ref:
|
|
465
|
+
ref: i,
|
|
443
466
|
className: u(
|
|
444
467
|
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
|
|
445
468
|
a && "pl-8",
|
|
@@ -452,9 +475,9 @@ const oe = (t) => Math.abs(
|
|
|
452
475
|
]
|
|
453
476
|
}
|
|
454
477
|
));
|
|
455
|
-
|
|
456
|
-
const
|
|
457
|
-
|
|
478
|
+
ma.displayName = y.SubTrigger.displayName;
|
|
479
|
+
const ua = h.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
480
|
+
y.SubContent,
|
|
458
481
|
{
|
|
459
482
|
ref: s,
|
|
460
483
|
className: u(
|
|
@@ -464,9 +487,9 @@ const ma = p.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
464
487
|
...a
|
|
465
488
|
}
|
|
466
489
|
));
|
|
467
|
-
|
|
468
|
-
const
|
|
469
|
-
|
|
490
|
+
ua.displayName = y.SubContent.displayName;
|
|
491
|
+
const ve = h.forwardRef(({ className: t, sideOffset: a = 4, ...s }, n) => /* @__PURE__ */ e.jsx(y.Portal, { children: /* @__PURE__ */ e.jsx(
|
|
492
|
+
y.Content,
|
|
470
493
|
{
|
|
471
494
|
ref: n,
|
|
472
495
|
sideOffset: a,
|
|
@@ -478,9 +501,9 @@ const Ne = p.forwardRef(({ className: t, sideOffset: a = 4, ...s }, n) => /* @__
|
|
|
478
501
|
...s
|
|
479
502
|
}
|
|
480
503
|
) }));
|
|
481
|
-
|
|
482
|
-
const
|
|
483
|
-
|
|
504
|
+
ve.displayName = y.Content.displayName;
|
|
505
|
+
const je = h.forwardRef(({ className: t, inset: a, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
506
|
+
y.Item,
|
|
484
507
|
{
|
|
485
508
|
ref: n,
|
|
486
509
|
className: u(
|
|
@@ -491,11 +514,11 @@ const we = p.forwardRef(({ className: t, inset: a, ...s }, n) => /* @__PURE__ */
|
|
|
491
514
|
...s
|
|
492
515
|
}
|
|
493
516
|
));
|
|
494
|
-
|
|
495
|
-
const
|
|
496
|
-
|
|
517
|
+
je.displayName = y.Item.displayName;
|
|
518
|
+
const pa = h.forwardRef(({ className: t, children: a, checked: s, ...n }, i) => /* @__PURE__ */ e.jsxs(
|
|
519
|
+
y.CheckboxItem,
|
|
497
520
|
{
|
|
498
|
-
ref:
|
|
521
|
+
ref: i,
|
|
499
522
|
className: u(
|
|
500
523
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
501
524
|
t
|
|
@@ -503,14 +526,14 @@ const ua = p.forwardRef(({ className: t, children: a, checked: s, ...n }, o) =>
|
|
|
503
526
|
checked: s,
|
|
504
527
|
...n,
|
|
505
528
|
children: [
|
|
506
|
-
/* @__PURE__ */ e.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e.jsx(
|
|
529
|
+
/* @__PURE__ */ e.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e.jsx(y.ItemIndicator, { children: /* @__PURE__ */ e.jsx(ft, { className: "h-4 w-4" }) }) }),
|
|
507
530
|
a
|
|
508
531
|
]
|
|
509
532
|
}
|
|
510
533
|
));
|
|
511
|
-
|
|
512
|
-
const
|
|
513
|
-
|
|
534
|
+
pa.displayName = y.CheckboxItem.displayName;
|
|
535
|
+
const ha = h.forwardRef(({ className: t, children: a, ...s }, n) => /* @__PURE__ */ e.jsxs(
|
|
536
|
+
y.RadioItem,
|
|
514
537
|
{
|
|
515
538
|
ref: n,
|
|
516
539
|
className: u(
|
|
@@ -519,14 +542,14 @@ const pa = p.forwardRef(({ className: t, children: a, ...s }, n) => /* @__PURE__
|
|
|
519
542
|
),
|
|
520
543
|
...s,
|
|
521
544
|
children: [
|
|
522
|
-
/* @__PURE__ */ e.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e.jsx(
|
|
545
|
+
/* @__PURE__ */ e.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e.jsx(y.ItemIndicator, { children: /* @__PURE__ */ e.jsx(gt, { className: "h-4 w-4 fill-current" }) }) }),
|
|
523
546
|
a
|
|
524
547
|
]
|
|
525
548
|
}
|
|
526
549
|
));
|
|
527
|
-
|
|
528
|
-
const
|
|
529
|
-
|
|
550
|
+
ha.displayName = y.RadioItem.displayName;
|
|
551
|
+
const et = h.forwardRef(({ className: t, inset: a, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
552
|
+
y.Label,
|
|
530
553
|
{
|
|
531
554
|
ref: n,
|
|
532
555
|
className: u(
|
|
@@ -537,38 +560,38 @@ const at = p.forwardRef(({ className: t, inset: a, ...s }, n) => /* @__PURE__ */
|
|
|
537
560
|
...s
|
|
538
561
|
}
|
|
539
562
|
));
|
|
540
|
-
|
|
541
|
-
const
|
|
542
|
-
|
|
563
|
+
et.displayName = y.Label.displayName;
|
|
564
|
+
const tt = h.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
565
|
+
y.Separator,
|
|
543
566
|
{
|
|
544
567
|
ref: s,
|
|
545
568
|
className: u("-mx-1 my-1 h-px bg-muted", t),
|
|
546
569
|
...a
|
|
547
570
|
}
|
|
548
571
|
));
|
|
549
|
-
|
|
550
|
-
const
|
|
572
|
+
tt.displayName = y.Separator.displayName;
|
|
573
|
+
const xa = ({
|
|
551
574
|
examples: t,
|
|
552
575
|
onSelect: a
|
|
553
|
-
}) => /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2 mt-2 items-end", children: /* @__PURE__ */ e.jsxs(
|
|
554
|
-
/* @__PURE__ */ e.jsx(
|
|
555
|
-
/* @__PURE__ */ e.jsx(
|
|
576
|
+
}) => /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2 mt-2 items-end", children: /* @__PURE__ */ e.jsxs(Xe, { children: [
|
|
577
|
+
/* @__PURE__ */ e.jsx(Ye, { asChild: !0, children: /* @__PURE__ */ e.jsx(M, { variant: "outline", children: "Use Example" }) }),
|
|
578
|
+
/* @__PURE__ */ e.jsx(ve, { className: "w-56", children: t.map((s) => {
|
|
556
579
|
var n;
|
|
557
580
|
return /* @__PURE__ */ e.jsxs("div", { children: [
|
|
558
|
-
/* @__PURE__ */ e.jsx(
|
|
559
|
-
/* @__PURE__ */ e.jsx(
|
|
560
|
-
/* @__PURE__ */ e.jsx(
|
|
561
|
-
|
|
581
|
+
/* @__PURE__ */ e.jsx(et, { children: s.mediaType }),
|
|
582
|
+
/* @__PURE__ */ e.jsx(tt, {}),
|
|
583
|
+
/* @__PURE__ */ e.jsx(ca, { children: (n = s.examples) == null ? void 0 : n.map((i) => /* @__PURE__ */ e.jsx(
|
|
584
|
+
je,
|
|
562
585
|
{
|
|
563
|
-
onSelect: () => a(
|
|
586
|
+
onSelect: () => a(i),
|
|
564
587
|
className: "line-clamp-1",
|
|
565
|
-
children:
|
|
588
|
+
children: i.summary ?? i.name
|
|
566
589
|
},
|
|
567
|
-
|
|
590
|
+
i.name
|
|
568
591
|
)) })
|
|
569
592
|
] }, s.mediaType);
|
|
570
593
|
}) })
|
|
571
|
-
] }) }),
|
|
594
|
+
] }) }), K = h.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
572
595
|
"div",
|
|
573
596
|
{
|
|
574
597
|
ref: s,
|
|
@@ -579,8 +602,8 @@ const ha = ({
|
|
|
579
602
|
...a
|
|
580
603
|
}
|
|
581
604
|
));
|
|
582
|
-
|
|
583
|
-
const
|
|
605
|
+
K.displayName = "Card";
|
|
606
|
+
const fa = h.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
584
607
|
"div",
|
|
585
608
|
{
|
|
586
609
|
ref: s,
|
|
@@ -588,8 +611,8 @@ const xa = p.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
588
611
|
...a
|
|
589
612
|
}
|
|
590
613
|
));
|
|
591
|
-
|
|
592
|
-
const
|
|
614
|
+
fa.displayName = "CardHeader";
|
|
615
|
+
const ga = h.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
593
616
|
"h3",
|
|
594
617
|
{
|
|
595
618
|
ref: s,
|
|
@@ -597,8 +620,8 @@ const fa = p.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
597
620
|
...a
|
|
598
621
|
}
|
|
599
622
|
));
|
|
600
|
-
|
|
601
|
-
const
|
|
623
|
+
ga.displayName = "CardTitle";
|
|
624
|
+
const ya = h.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
602
625
|
"p",
|
|
603
626
|
{
|
|
604
627
|
ref: s,
|
|
@@ -606,10 +629,10 @@ const ga = p.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
606
629
|
...a
|
|
607
630
|
}
|
|
608
631
|
));
|
|
609
|
-
|
|
610
|
-
const
|
|
611
|
-
|
|
612
|
-
const
|
|
632
|
+
ya.displayName = "CardDescription";
|
|
633
|
+
const va = h.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx("div", { ref: s, className: u("p-6 pt-0", t), ...a }));
|
|
634
|
+
va.displayName = "CardContent";
|
|
635
|
+
const ja = h.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
613
636
|
"div",
|
|
614
637
|
{
|
|
615
638
|
ref: s,
|
|
@@ -617,8 +640,8 @@ const va = p.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
617
640
|
...a
|
|
618
641
|
}
|
|
619
642
|
));
|
|
620
|
-
|
|
621
|
-
const
|
|
643
|
+
ja.displayName = "CardFooter";
|
|
644
|
+
const ba = he(
|
|
622
645
|
"peer h-4 w-4 shrink-0 rounded-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:text-primary",
|
|
623
646
|
{
|
|
624
647
|
variants: {
|
|
@@ -631,14 +654,14 @@ const ja = ge(
|
|
|
631
654
|
variant: "default"
|
|
632
655
|
}
|
|
633
656
|
}
|
|
634
|
-
),
|
|
635
|
-
|
|
657
|
+
), be = h.forwardRef(({ className: t, variant: a, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
658
|
+
ie.Root,
|
|
636
659
|
{
|
|
637
660
|
ref: n,
|
|
638
|
-
className: u(
|
|
661
|
+
className: u(ba({ variant: a, className: t })),
|
|
639
662
|
...s,
|
|
640
663
|
children: /* @__PURE__ */ e.jsx(
|
|
641
|
-
|
|
664
|
+
ie.Indicator,
|
|
642
665
|
{
|
|
643
666
|
className: u("flex items-center justify-center text-current"),
|
|
644
667
|
children: /* @__PURE__ */ e.jsx(yt, { className: "h-4 w-4" })
|
|
@@ -646,9 +669,9 @@ const ja = ge(
|
|
|
646
669
|
)
|
|
647
670
|
}
|
|
648
671
|
));
|
|
649
|
-
|
|
650
|
-
const
|
|
651
|
-
|
|
672
|
+
be.displayName = ie.Root.displayName;
|
|
673
|
+
const at = h.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
674
|
+
b,
|
|
652
675
|
{
|
|
653
676
|
ref: s,
|
|
654
677
|
className: u(
|
|
@@ -658,13 +681,13 @@ const nt = p.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
658
681
|
...a
|
|
659
682
|
}
|
|
660
683
|
));
|
|
661
|
-
|
|
662
|
-
const
|
|
684
|
+
at.displayName = b.displayName;
|
|
685
|
+
const Na = h.forwardRef(({ className: t, ...a }, s) => (
|
|
663
686
|
// eslint-disable-next-line react/no-unknown-property
|
|
664
687
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
665
688
|
/* @__PURE__ */ e.jsx(vt, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
666
689
|
/* @__PURE__ */ e.jsx(
|
|
667
|
-
|
|
690
|
+
b.Input,
|
|
668
691
|
{
|
|
669
692
|
ref: s,
|
|
670
693
|
className: u(
|
|
@@ -676,11 +699,11 @@ const ba = p.forwardRef(({ className: t, ...a }, s) => (
|
|
|
676
699
|
)
|
|
677
700
|
] })
|
|
678
701
|
));
|
|
679
|
-
|
|
680
|
-
const
|
|
702
|
+
Na.displayName = b.Input.displayName;
|
|
703
|
+
const st = h.forwardRef(({ className: t, ...a }, s) => (
|
|
681
704
|
// eslint-disable-next-line react/no-unknown-property
|
|
682
705
|
/* @__PURE__ */ e.jsx("div", { className: "flex items-center", "cmdk-input-wrapper": "", children: /* @__PURE__ */ e.jsx(
|
|
683
|
-
|
|
706
|
+
b.Input,
|
|
684
707
|
{
|
|
685
708
|
ref: s,
|
|
686
709
|
className: u(
|
|
@@ -692,27 +715,27 @@ const rt = p.forwardRef(({ className: t, ...a }, s) => (
|
|
|
692
715
|
}
|
|
693
716
|
) })
|
|
694
717
|
));
|
|
695
|
-
|
|
696
|
-
const
|
|
697
|
-
|
|
718
|
+
st.displayName = b.Input.displayName;
|
|
719
|
+
const nt = h.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
720
|
+
b.List,
|
|
698
721
|
{
|
|
699
722
|
ref: s,
|
|
700
723
|
className: u("max-h-[300px] overflow-y-auto overflow-x-hidden", t),
|
|
701
724
|
...a
|
|
702
725
|
}
|
|
703
726
|
));
|
|
704
|
-
|
|
705
|
-
const
|
|
706
|
-
|
|
727
|
+
nt.displayName = b.List.displayName;
|
|
728
|
+
const wa = h.forwardRef((t, a) => /* @__PURE__ */ e.jsx(
|
|
729
|
+
b.Empty,
|
|
707
730
|
{
|
|
708
731
|
ref: a,
|
|
709
732
|
className: "py-6 text-center text-sm",
|
|
710
733
|
...t
|
|
711
734
|
}
|
|
712
735
|
));
|
|
713
|
-
|
|
714
|
-
const
|
|
715
|
-
|
|
736
|
+
wa.displayName = b.Empty.displayName;
|
|
737
|
+
const Ca = h.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
738
|
+
b.Group,
|
|
716
739
|
{
|
|
717
740
|
ref: s,
|
|
718
741
|
className: u(
|
|
@@ -722,18 +745,18 @@ const wa = p.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
722
745
|
...a
|
|
723
746
|
}
|
|
724
747
|
));
|
|
725
|
-
|
|
726
|
-
const
|
|
727
|
-
|
|
748
|
+
Ca.displayName = b.Group.displayName;
|
|
749
|
+
const $a = h.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
750
|
+
b.Separator,
|
|
728
751
|
{
|
|
729
752
|
ref: s,
|
|
730
753
|
className: u("-mx-1 h-px bg-border", t),
|
|
731
754
|
...a
|
|
732
755
|
}
|
|
733
756
|
));
|
|
734
|
-
|
|
735
|
-
const
|
|
736
|
-
|
|
757
|
+
$a.displayName = b.Separator.displayName;
|
|
758
|
+
const rt = h.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
759
|
+
b.Item,
|
|
737
760
|
{
|
|
738
761
|
ref: s,
|
|
739
762
|
className: u(
|
|
@@ -743,11 +766,11 @@ const it = p.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
|
743
766
|
...a
|
|
744
767
|
}
|
|
745
768
|
));
|
|
746
|
-
|
|
747
|
-
const Sa =
|
|
748
|
-
|
|
769
|
+
rt.displayName = b.Item.displayName;
|
|
770
|
+
const Sa = J.Root, ot = h.forwardRef(({ className: t, align: a = "center", sideOffset: s = 4, ...n }, i) => /* @__PURE__ */ e.jsx(J.Portal, { children: /* @__PURE__ */ e.jsx(
|
|
771
|
+
J.Content,
|
|
749
772
|
{
|
|
750
|
-
ref:
|
|
773
|
+
ref: i,
|
|
751
774
|
align: a,
|
|
752
775
|
sideOffset: s,
|
|
753
776
|
className: u(
|
|
@@ -757,46 +780,46 @@ const Sa = Q.Root, lt = p.forwardRef(({ className: t, align: a = "center", sideO
|
|
|
757
780
|
...n
|
|
758
781
|
}
|
|
759
782
|
) }));
|
|
760
|
-
|
|
783
|
+
ot.displayName = J.Content.displayName;
|
|
761
784
|
const Ta = ({
|
|
762
785
|
value: t,
|
|
763
786
|
options: a,
|
|
764
787
|
onChange: s,
|
|
765
788
|
className: n,
|
|
766
|
-
placeholder:
|
|
789
|
+
placeholder: i = "Enter value",
|
|
767
790
|
onEnterPress: d,
|
|
768
|
-
ref:
|
|
791
|
+
ref: r
|
|
769
792
|
}) => {
|
|
770
|
-
const [m, c] = H(!1), [
|
|
793
|
+
const [m, c] = H(!1), [p, g] = H(!1), x = Rt((l) => l.filtered.count), f = q(null);
|
|
771
794
|
return /* @__PURE__ */ e.jsxs(Sa, { open: m, children: [
|
|
772
795
|
/* @__PURE__ */ e.jsx(Jt, { children: /* @__PURE__ */ e.jsx(
|
|
773
|
-
|
|
796
|
+
st,
|
|
774
797
|
{
|
|
775
798
|
ref: (l) => {
|
|
776
|
-
|
|
799
|
+
f.current = l, typeof r == "function" ? r(l) : r && (r.current = l);
|
|
777
800
|
},
|
|
778
801
|
value: t,
|
|
779
|
-
placeholder:
|
|
802
|
+
placeholder: i,
|
|
780
803
|
className: u("h-9 bg-transparent", n),
|
|
781
804
|
onFocus: () => c(!0),
|
|
782
805
|
onBlur: () => {
|
|
783
|
-
|
|
806
|
+
p || c(!1);
|
|
784
807
|
},
|
|
785
808
|
onKeyDown: (l) => {
|
|
786
|
-
var
|
|
787
|
-
l.key === "Enter" && (c(!1), (
|
|
809
|
+
var v;
|
|
810
|
+
l.key === "Enter" && (c(!1), (v = f.current) == null || v.blur(), d == null || d(l));
|
|
788
811
|
},
|
|
789
812
|
onValueChange: (l) => s(l)
|
|
790
813
|
}
|
|
791
814
|
) }),
|
|
792
815
|
/* @__PURE__ */ e.jsx(
|
|
793
|
-
|
|
816
|
+
ot,
|
|
794
817
|
{
|
|
795
|
-
onMouseEnter: () =>
|
|
796
|
-
onMouseLeave: () =>
|
|
818
|
+
onMouseEnter: () => g(!0),
|
|
819
|
+
onMouseLeave: () => g(!1),
|
|
797
820
|
onOpenAutoFocus: (l) => l.preventDefault(),
|
|
798
821
|
className: u("p-0 w-[--radix-popover-trigger-width]", {
|
|
799
|
-
"border-0":
|
|
822
|
+
"border-0": x === 0
|
|
800
823
|
}),
|
|
801
824
|
align: "start",
|
|
802
825
|
side: "bottom",
|
|
@@ -806,12 +829,12 @@ const Ta = ({
|
|
|
806
829
|
onTouchMove: (l) => {
|
|
807
830
|
l.stopPropagation();
|
|
808
831
|
},
|
|
809
|
-
children: /* @__PURE__ */ e.jsx(
|
|
810
|
-
|
|
832
|
+
children: /* @__PURE__ */ e.jsx(nt, { className: "max-h-[140px]", children: a.map((l) => /* @__PURE__ */ e.jsx(
|
|
833
|
+
rt,
|
|
811
834
|
{
|
|
812
835
|
value: l,
|
|
813
|
-
onSelect: (
|
|
814
|
-
s(
|
|
836
|
+
onSelect: (v) => {
|
|
837
|
+
s(v), c(!1);
|
|
815
838
|
},
|
|
816
839
|
className: "cursor-pointer",
|
|
817
840
|
children: l
|
|
@@ -821,20 +844,20 @@ const Ta = ({
|
|
|
821
844
|
}
|
|
822
845
|
)
|
|
823
846
|
] });
|
|
824
|
-
},
|
|
825
|
-
const s =
|
|
826
|
-
const m =
|
|
827
|
-
return
|
|
847
|
+
}, me = (t) => /* @__PURE__ */ e.jsx(at, { className: "bg-transparent", children: /* @__PURE__ */ e.jsx(Ta, { ...t }) }), it = (t, a) => {
|
|
848
|
+
const s = h.forwardRef(({ className: n, asChild: i, ...d }, r) => {
|
|
849
|
+
const m = i ? Qt : t;
|
|
850
|
+
return h.createElement(m, {
|
|
828
851
|
...d,
|
|
829
|
-
ref:
|
|
852
|
+
ref: r,
|
|
830
853
|
className: typeof a == "function" ? a({ className: n }) : u(a, n)
|
|
831
854
|
});
|
|
832
855
|
});
|
|
833
856
|
return s.displayName = `VariantComponent(${t})`, s;
|
|
834
|
-
},
|
|
857
|
+
}, Ne = it(
|
|
835
858
|
"div",
|
|
836
859
|
"hover:bg-accent/40 grid grid-cols-[2fr_3fr] gap-2 items-center px-3"
|
|
837
|
-
),
|
|
860
|
+
), Pa = Object.freeze([
|
|
838
861
|
"Accept",
|
|
839
862
|
"Accept-Encoding",
|
|
840
863
|
"Accept-Language",
|
|
@@ -861,137 +884,141 @@ const Ta = ({
|
|
|
861
884
|
"Set-Cookie",
|
|
862
885
|
"User-Agent",
|
|
863
886
|
"X-Requested-With"
|
|
864
|
-
]),
|
|
865
|
-
|
|
866
|
-
register: a
|
|
867
|
-
}) => {
|
|
868
|
-
const { fields: s, append: n, remove: o } = xe({
|
|
887
|
+
]), ka = ({ control: t }) => {
|
|
888
|
+
const { fields: a, append: s, remove: n } = ue({
|
|
869
889
|
control: t,
|
|
870
890
|
name: "headers"
|
|
871
|
-
}), { setValue:
|
|
872
|
-
|
|
891
|
+
}), { setValue: i } = pe(), d = q([]), r = q([]), m = () => {
|
|
892
|
+
s({
|
|
873
893
|
name: "",
|
|
874
894
|
value: "",
|
|
875
895
|
active: !1
|
|
876
896
|
});
|
|
877
|
-
},
|
|
878
|
-
var
|
|
879
|
-
(
|
|
880
|
-
},
|
|
881
|
-
|
|
882
|
-
var
|
|
883
|
-
return (
|
|
897
|
+
}, c = (g) => {
|
|
898
|
+
var x;
|
|
899
|
+
(x = d.current[g]) == null || x.focus();
|
|
900
|
+
}, p = (g) => {
|
|
901
|
+
m(), requestAnimationFrame(() => {
|
|
902
|
+
var x;
|
|
903
|
+
return (x = r.current[g + 1]) == null ? void 0 : x.focus();
|
|
884
904
|
});
|
|
885
905
|
};
|
|
886
906
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
887
|
-
/* @__PURE__ */ e.jsx(
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
Ce,
|
|
907
|
+
/* @__PURE__ */ e.jsx(K, { className: "overflow-hidden", children: /* @__PURE__ */ e.jsx(Ne, { children: a.map((g, x) => /* @__PURE__ */ e.jsxs(
|
|
908
|
+
"div",
|
|
909
|
+
{
|
|
910
|
+
className: "group grid col-span-full grid-cols-subgrid",
|
|
911
|
+
children: [
|
|
912
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 ", children: [
|
|
913
|
+
/* @__PURE__ */ e.jsx(
|
|
914
|
+
R,
|
|
896
915
|
{
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
916
|
+
control: t,
|
|
917
|
+
name: `headers.${x}.active`,
|
|
918
|
+
render: ({ field: f }) => /* @__PURE__ */ e.jsx(
|
|
919
|
+
be,
|
|
920
|
+
{
|
|
921
|
+
variant: "outline",
|
|
922
|
+
id: `headers.${x}.active`,
|
|
923
|
+
checked: f.value,
|
|
924
|
+
onCheckedChange: (l) => {
|
|
925
|
+
f.onChange(l);
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
)
|
|
903
929
|
}
|
|
904
|
-
)
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
/* @__PURE__ */ e.jsx(
|
|
908
|
-
k,
|
|
909
|
-
{
|
|
910
|
-
control: t,
|
|
911
|
-
name: `headers.${h}.name`,
|
|
912
|
-
render: ({ field: l }) => /* @__PURE__ */ e.jsx(
|
|
913
|
-
he,
|
|
930
|
+
),
|
|
931
|
+
/* @__PURE__ */ e.jsx(
|
|
932
|
+
R,
|
|
914
933
|
{
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
934
|
+
control: t,
|
|
935
|
+
name: `headers.${x}.name`,
|
|
936
|
+
render: ({ field: f }) => /* @__PURE__ */ e.jsx(
|
|
937
|
+
me,
|
|
938
|
+
{
|
|
939
|
+
...f,
|
|
940
|
+
placeholder: "Name",
|
|
941
|
+
className: "border-0 shadow-none bg-transparent text-xs font-mono",
|
|
942
|
+
options: Pa,
|
|
943
|
+
onEnterPress: () => c(x),
|
|
944
|
+
onChange: (l) => {
|
|
945
|
+
f.onChange(l), i(`headers.${x}.active`, !0);
|
|
946
|
+
},
|
|
947
|
+
ref: (l) => {
|
|
948
|
+
r.current[x] = l;
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
)
|
|
926
952
|
}
|
|
927
953
|
)
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
/* @__PURE__ */ e.jsx(
|
|
933
|
-
k,
|
|
934
|
-
{
|
|
935
|
-
control: t,
|
|
936
|
-
name: `headers.${h}.value`,
|
|
937
|
-
render: ({ field: l }) => /* @__PURE__ */ e.jsx(
|
|
938
|
-
ve,
|
|
954
|
+
] }),
|
|
955
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
956
|
+
/* @__PURE__ */ e.jsx(
|
|
957
|
+
R,
|
|
939
958
|
{
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
959
|
+
control: t,
|
|
960
|
+
name: `headers.${x}.value`,
|
|
961
|
+
render: ({ field: f }) => /* @__PURE__ */ e.jsx(
|
|
962
|
+
fe,
|
|
963
|
+
{
|
|
964
|
+
placeholder: "Value",
|
|
965
|
+
className: "w-full border-0 shadow-none text-xs font-mono focus-visible:ring-0",
|
|
966
|
+
...f,
|
|
967
|
+
ref: (l) => {
|
|
968
|
+
d.current[x] = l;
|
|
969
|
+
},
|
|
970
|
+
onKeyDown: (l) => {
|
|
971
|
+
l.key === "Enter" && l.currentTarget.value.trim() && p(x);
|
|
972
|
+
},
|
|
973
|
+
autoComplete: "off"
|
|
974
|
+
}
|
|
975
|
+
)
|
|
976
|
+
}
|
|
977
|
+
),
|
|
978
|
+
/* @__PURE__ */ e.jsx(
|
|
979
|
+
_,
|
|
980
|
+
{
|
|
981
|
+
size: "icon",
|
|
982
|
+
variant: "ghost",
|
|
983
|
+
className: "text-muted-foreground opacity-0 group-hover:opacity-100 rounded-full w-8 h-7",
|
|
984
|
+
onClick: () => {
|
|
985
|
+
n(x);
|
|
948
986
|
},
|
|
949
|
-
|
|
987
|
+
type: "button",
|
|
988
|
+
children: /* @__PURE__ */ e.jsx(jt, { size: 16 })
|
|
950
989
|
}
|
|
951
990
|
)
|
|
952
|
-
}
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
size: "icon",
|
|
958
|
-
variant: "ghost",
|
|
959
|
-
className: "text-muted-foreground opacity-0 group-hover:opacity-100 rounded-full w-8 h-7",
|
|
960
|
-
onClick: () => {
|
|
961
|
-
o(h);
|
|
962
|
-
},
|
|
963
|
-
type: "button",
|
|
964
|
-
children: /* @__PURE__ */ e.jsx(jt, { size: 16 })
|
|
965
|
-
}
|
|
966
|
-
)
|
|
967
|
-
] })
|
|
968
|
-
] }, h)) }) }),
|
|
991
|
+
] })
|
|
992
|
+
]
|
|
993
|
+
},
|
|
994
|
+
g.name
|
|
995
|
+
)) }) }),
|
|
969
996
|
/* @__PURE__ */ e.jsx("div", { className: "text-end", children: /* @__PURE__ */ e.jsx(
|
|
970
|
-
|
|
997
|
+
_,
|
|
971
998
|
{
|
|
972
999
|
className: "",
|
|
973
|
-
onClick:
|
|
1000
|
+
onClick: m,
|
|
974
1001
|
type: "button",
|
|
975
1002
|
variant: "secondary",
|
|
976
1003
|
children: "Add header"
|
|
977
1004
|
}
|
|
978
1005
|
) })
|
|
979
1006
|
] });
|
|
980
|
-
},
|
|
1007
|
+
}, Ra = ({
|
|
981
1008
|
control: t
|
|
982
1009
|
}) => {
|
|
983
|
-
const { fields: a } =
|
|
1010
|
+
const { fields: a } = ue({
|
|
984
1011
|
control: t,
|
|
985
1012
|
name: "pathParams"
|
|
986
1013
|
});
|
|
987
|
-
return /* @__PURE__ */ e.jsx(
|
|
1014
|
+
return /* @__PURE__ */ e.jsx(K, { className: "rounded-lg", children: /* @__PURE__ */ e.jsx(Ne, { children: a.map((s, n) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
988
1015
|
/* @__PURE__ */ e.jsx(
|
|
989
|
-
|
|
1016
|
+
R,
|
|
990
1017
|
{
|
|
991
1018
|
control: t,
|
|
992
|
-
name: `pathParams.${n}.
|
|
1019
|
+
name: `pathParams.${n}.name`,
|
|
993
1020
|
render: () => /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(
|
|
994
|
-
|
|
1021
|
+
Ke,
|
|
995
1022
|
{
|
|
996
1023
|
slug: s.name,
|
|
997
1024
|
name: s.name,
|
|
@@ -1001,14 +1028,14 @@ const Ta = ({
|
|
|
1001
1028
|
}
|
|
1002
1029
|
),
|
|
1003
1030
|
/* @__PURE__ */ e.jsx("div", { className: "flex justify-between items-center", children: /* @__PURE__ */ e.jsx(
|
|
1004
|
-
|
|
1031
|
+
R,
|
|
1005
1032
|
{
|
|
1006
1033
|
control: t,
|
|
1007
1034
|
name: `pathParams.${n}.value`,
|
|
1008
|
-
render: ({ field:
|
|
1009
|
-
|
|
1035
|
+
render: ({ field: i }) => /* @__PURE__ */ e.jsx(
|
|
1036
|
+
fe,
|
|
1010
1037
|
{
|
|
1011
|
-
...
|
|
1038
|
+
...i,
|
|
1012
1039
|
required: !0,
|
|
1013
1040
|
placeholder: "Enter value",
|
|
1014
1041
|
className: "w-full border-0 shadow-none text-xs font-mono hover:bg-accent"
|
|
@@ -1017,33 +1044,33 @@ const Ta = ({
|
|
|
1017
1044
|
}
|
|
1018
1045
|
) })
|
|
1019
1046
|
] })) }) });
|
|
1020
|
-
},
|
|
1047
|
+
}, Oa = it(
|
|
1021
1048
|
"input",
|
|
1022
1049
|
"px-2 bg-transparent h-6 font-mono text-xs m-2"
|
|
1023
|
-
),
|
|
1050
|
+
), Ia = ({
|
|
1024
1051
|
control: t,
|
|
1025
1052
|
queryParams: a
|
|
1026
1053
|
}) => {
|
|
1027
|
-
const { fields: s } =
|
|
1054
|
+
const { fields: s } = ue({
|
|
1028
1055
|
control: t,
|
|
1029
1056
|
name: "queryParams"
|
|
1030
|
-
}), n =
|
|
1031
|
-
return /* @__PURE__ */ e.jsx(
|
|
1057
|
+
}), n = pe(), i = a.map((d) => !!d.isRequired);
|
|
1058
|
+
return /* @__PURE__ */ e.jsx(K, { className: "rounded-lg", children: /* @__PURE__ */ e.jsx("div", { className: "w-full ", children: s.map((d, r) => {
|
|
1032
1059
|
const m = a.find(
|
|
1033
1060
|
(c) => c.name === d.name
|
|
1034
1061
|
);
|
|
1035
|
-
return /* @__PURE__ */ e.jsxs(
|
|
1062
|
+
return /* @__PURE__ */ e.jsxs(Ne, { children: [
|
|
1036
1063
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
|
|
1037
1064
|
/* @__PURE__ */ e.jsx(
|
|
1038
|
-
|
|
1065
|
+
R,
|
|
1039
1066
|
{
|
|
1040
1067
|
control: t,
|
|
1041
|
-
name: `queryParams.${
|
|
1068
|
+
name: `queryParams.${r}.active`,
|
|
1042
1069
|
render: ({ field: c }) => /* @__PURE__ */ e.jsx(
|
|
1043
|
-
|
|
1070
|
+
be,
|
|
1044
1071
|
{
|
|
1045
1072
|
variant: "outline",
|
|
1046
|
-
id: `queryParams.${
|
|
1073
|
+
id: `queryParams.${r}.active`,
|
|
1047
1074
|
className: "mr-2",
|
|
1048
1075
|
checked: c.value,
|
|
1049
1076
|
onCheckedChange: c.onChange
|
|
@@ -1052,66 +1079,66 @@ const Ta = ({
|
|
|
1052
1079
|
}
|
|
1053
1080
|
),
|
|
1054
1081
|
/* @__PURE__ */ e.jsx(
|
|
1055
|
-
|
|
1082
|
+
R,
|
|
1056
1083
|
{
|
|
1057
1084
|
control: t,
|
|
1058
|
-
render: ({ field: c }) =>
|
|
1085
|
+
render: ({ field: c }) => i[r] ? /* @__PURE__ */ e.jsx(Oa, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
1059
1086
|
"label",
|
|
1060
1087
|
{
|
|
1061
1088
|
className: "flex items-center cursor-pointer gap-1",
|
|
1062
|
-
htmlFor: `queryParams.${
|
|
1063
|
-
title:
|
|
1089
|
+
htmlFor: `queryParams.${r}.active`,
|
|
1090
|
+
title: i[r] ? "Required field" : void 0,
|
|
1064
1091
|
children: [
|
|
1065
1092
|
c.value,
|
|
1066
|
-
|
|
1093
|
+
i[r] && /* @__PURE__ */ e.jsx("sup", { children: " *" })
|
|
1067
1094
|
]
|
|
1068
1095
|
}
|
|
1069
1096
|
) }) : /* @__PURE__ */ e.jsx(
|
|
1070
|
-
|
|
1097
|
+
me,
|
|
1071
1098
|
{
|
|
1072
1099
|
value: c.value,
|
|
1073
|
-
options: a.map((
|
|
1074
|
-
onChange: (
|
|
1075
|
-
c.onChange(
|
|
1100
|
+
options: a.map((p) => p.name),
|
|
1101
|
+
onChange: (p) => {
|
|
1102
|
+
c.onChange(p);
|
|
1076
1103
|
},
|
|
1077
1104
|
className: "border-0 font-mono text-xs bg-transparent hover:bg-transparent"
|
|
1078
1105
|
}
|
|
1079
1106
|
),
|
|
1080
|
-
name: `queryParams.${
|
|
1107
|
+
name: `queryParams.${r}.name`
|
|
1081
1108
|
}
|
|
1082
1109
|
)
|
|
1083
1110
|
] }),
|
|
1084
1111
|
/* @__PURE__ */ e.jsx("div", { className: "flex justify-between items-center", children: /* @__PURE__ */ e.jsx(
|
|
1085
|
-
|
|
1112
|
+
R,
|
|
1086
1113
|
{
|
|
1087
1114
|
control: t,
|
|
1088
1115
|
render: ({ field: c }) => (m == null ? void 0 : m.enum) && m.enum.length > 0 ? /* @__PURE__ */ e.jsx(
|
|
1089
|
-
|
|
1116
|
+
me,
|
|
1090
1117
|
{
|
|
1091
1118
|
value: c.value,
|
|
1092
1119
|
options: m.enum ?? [],
|
|
1093
|
-
onChange: (
|
|
1094
|
-
c.onChange(
|
|
1120
|
+
onChange: (g) => {
|
|
1121
|
+
c.onChange(g), n.setValue(`queryParams.${r}.active`, !0);
|
|
1095
1122
|
},
|
|
1096
1123
|
className: "font-mono text-xs border-0 ring-1 ring-ring"
|
|
1097
1124
|
}
|
|
1098
1125
|
) : /* @__PURE__ */ e.jsx(
|
|
1099
|
-
|
|
1126
|
+
fe,
|
|
1100
1127
|
{
|
|
1101
1128
|
...c,
|
|
1102
|
-
onChange: (
|
|
1103
|
-
c.onChange(
|
|
1129
|
+
onChange: (g) => {
|
|
1130
|
+
c.onChange(g.target.value), g.target.value.length > 0 && n.setValue(`queryParams.${r}.active`, !0);
|
|
1104
1131
|
},
|
|
1105
1132
|
placeholder: "Enter value",
|
|
1106
1133
|
className: "w-full border-0 shadow-none text-xs font-mono"
|
|
1107
1134
|
}
|
|
1108
1135
|
),
|
|
1109
|
-
name: `queryParams.${
|
|
1136
|
+
name: `queryParams.${r}.value`
|
|
1110
1137
|
}
|
|
1111
1138
|
) })
|
|
1112
1139
|
] }, d.id);
|
|
1113
1140
|
}) }) });
|
|
1114
|
-
},
|
|
1141
|
+
}, T = {
|
|
1115
1142
|
green: "text-green-600",
|
|
1116
1143
|
blue: "text-sky-600",
|
|
1117
1144
|
yellow: "text-yellow-600",
|
|
@@ -1119,45 +1146,45 @@ const Ta = ({
|
|
|
1119
1146
|
purple: "text-purple-600",
|
|
1120
1147
|
indigo: "text-indigo-600",
|
|
1121
1148
|
gray: "text-gray-600"
|
|
1122
|
-
},
|
|
1123
|
-
get:
|
|
1124
|
-
post:
|
|
1125
|
-
put:
|
|
1126
|
-
delete:
|
|
1127
|
-
patch:
|
|
1128
|
-
options:
|
|
1129
|
-
head:
|
|
1130
|
-
trace:
|
|
1131
|
-
},
|
|
1149
|
+
}, Ea = {
|
|
1150
|
+
get: T.green,
|
|
1151
|
+
post: T.blue,
|
|
1152
|
+
put: T.yellow,
|
|
1153
|
+
delete: T.red,
|
|
1154
|
+
patch: T.purple,
|
|
1155
|
+
options: T.indigo,
|
|
1156
|
+
head: T.gray,
|
|
1157
|
+
trace: T.gray
|
|
1158
|
+
}, Aa = (t) => Ea[t.toLocaleLowerCase()] ?? T.gray, qa = ({
|
|
1132
1159
|
method: t,
|
|
1133
1160
|
url: a,
|
|
1134
1161
|
headers: s,
|
|
1135
1162
|
body: n
|
|
1136
1163
|
}) => /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 font-mono text-xs", children: [
|
|
1137
1164
|
/* @__PURE__ */ e.jsxs("div", { className: "gap-2 p-2 bg-muted rounded-md", children: [
|
|
1138
|
-
/* @__PURE__ */ e.jsx("span", { className: u(
|
|
1165
|
+
/* @__PURE__ */ e.jsx("span", { className: u(Aa(t), "font-semibold"), children: t }),
|
|
1139
1166
|
" ",
|
|
1140
1167
|
/* @__PURE__ */ e.jsx("span", { className: "break-all", children: a }),
|
|
1141
1168
|
" ",
|
|
1142
1169
|
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "HTTP/1.1" })
|
|
1143
1170
|
] }),
|
|
1144
1171
|
/* @__PURE__ */ e.jsxs("div", { className: "mx-1.5 flex flex-col gap-3", children: [
|
|
1145
|
-
/* @__PURE__ */ e.jsxs(
|
|
1146
|
-
/* @__PURE__ */ e.jsxs(
|
|
1172
|
+
/* @__PURE__ */ e.jsxs(Ae, { defaultOpen: !0, children: [
|
|
1173
|
+
/* @__PURE__ */ e.jsxs(qe, { className: "flex items-center gap-2 hover:text-primary group", children: [
|
|
1147
1174
|
/* @__PURE__ */ e.jsx(z, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
|
|
1148
1175
|
/* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Headers" })
|
|
1149
1176
|
] }),
|
|
1150
|
-
/* @__PURE__ */ e.jsx(
|
|
1151
|
-
/* @__PURE__ */ e.jsx("div", { className: "text-primary", children:
|
|
1177
|
+
/* @__PURE__ */ e.jsx(De, { 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(([i, d]) => /* @__PURE__ */ e.jsxs(k, { children: [
|
|
1178
|
+
/* @__PURE__ */ e.jsx("div", { className: "text-primary", children: i }),
|
|
1152
1179
|
/* @__PURE__ */ e.jsx("div", { className: "break-words", children: d })
|
|
1153
|
-
] },
|
|
1180
|
+
] }, i)) }) })
|
|
1154
1181
|
] }),
|
|
1155
|
-
/* @__PURE__ */ e.jsxs(
|
|
1156
|
-
/* @__PURE__ */ e.jsxs(
|
|
1182
|
+
/* @__PURE__ */ e.jsxs(Ae, { defaultOpen: !0, children: [
|
|
1183
|
+
/* @__PURE__ */ e.jsxs(qe, { className: "flex items-center gap-2 hover:text-primary group", children: [
|
|
1157
1184
|
/* @__PURE__ */ e.jsx(z, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
|
|
1158
1185
|
/* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Body" })
|
|
1159
1186
|
] }),
|
|
1160
|
-
/* @__PURE__ */ e.jsx(
|
|
1187
|
+
/* @__PURE__ */ e.jsx(De, { children: /* @__PURE__ */ e.jsx("div", { className: "pl-0 pt-2", children: /* @__PURE__ */ e.jsx(
|
|
1161
1188
|
"div",
|
|
1162
1189
|
{
|
|
1163
1190
|
className: u(
|
|
@@ -1169,29 +1196,29 @@ const Ta = ({
|
|
|
1169
1196
|
) }) })
|
|
1170
1197
|
] })
|
|
1171
1198
|
] })
|
|
1172
|
-
] }),
|
|
1173
|
-
function
|
|
1199
|
+
] }), Ve = ge.Root, Fe = ge.CollapsibleTrigger, ze = ge.CollapsibleContent;
|
|
1200
|
+
function we(t) {
|
|
1174
1201
|
if (t === null) return "null";
|
|
1175
1202
|
if (Array.isArray(t)) {
|
|
1176
1203
|
if (t.length === 0) return "any[]";
|
|
1177
1204
|
const a = t[0];
|
|
1178
|
-
return a === void 0 ? "any[]" : `${
|
|
1205
|
+
return a === void 0 ? "any[]" : `${we(a)}[]`;
|
|
1179
1206
|
}
|
|
1180
|
-
return typeof t == "object" ?
|
|
1207
|
+
return typeof t == "object" ? Da(t) : typeof t;
|
|
1181
1208
|
}
|
|
1182
|
-
function
|
|
1209
|
+
function Da(t, a = "") {
|
|
1183
1210
|
const s = ["{"];
|
|
1184
|
-
for (const [n,
|
|
1185
|
-
const d =
|
|
1211
|
+
for (const [n, i] of Object.entries(t)) {
|
|
1212
|
+
const d = we(i);
|
|
1186
1213
|
s.push(` ${n}: ${d};`);
|
|
1187
1214
|
}
|
|
1188
1215
|
return s.push("}"), s.join(`
|
|
1189
1216
|
`);
|
|
1190
1217
|
}
|
|
1191
|
-
function
|
|
1192
|
-
return { lines: [`type GeneratedType = ${
|
|
1218
|
+
function La(t) {
|
|
1219
|
+
return { lines: [`type GeneratedType = ${we(t)};`] };
|
|
1193
1220
|
}
|
|
1194
|
-
const
|
|
1221
|
+
const Va = {
|
|
1195
1222
|
200: "OK",
|
|
1196
1223
|
201: "Created",
|
|
1197
1224
|
202: "Accepted",
|
|
@@ -1202,7 +1229,7 @@ const La = {
|
|
|
1202
1229
|
404: "Not Found",
|
|
1203
1230
|
405: "Method Not Allowed",
|
|
1204
1231
|
500: "Internal Server Error"
|
|
1205
|
-
},
|
|
1232
|
+
}, Fa = (t) => {
|
|
1206
1233
|
var s;
|
|
1207
1234
|
return (s = Object.entries({
|
|
1208
1235
|
"application/json": "json",
|
|
@@ -1215,17 +1242,17 @@ const La = {
|
|
|
1215
1242
|
}).find(
|
|
1216
1243
|
([n]) => t.includes(n)
|
|
1217
1244
|
)) == null ? void 0 : s[1];
|
|
1218
|
-
}, Fa = (t) => {
|
|
1219
|
-
var s;
|
|
1220
|
-
const a = ((s = t.find(([n, o]) => n === "Content-Type")) == null ? void 0 : s[1]) || "";
|
|
1221
|
-
return Va(a);
|
|
1222
1245
|
}, za = (t) => {
|
|
1246
|
+
var s;
|
|
1247
|
+
const a = ((s = t.find(([n, i]) => n === "Content-Type")) == null ? void 0 : s[1]) || "";
|
|
1248
|
+
return Fa(a);
|
|
1249
|
+
}, Ha = (t) => {
|
|
1223
1250
|
try {
|
|
1224
1251
|
return JSON.stringify(JSON.parse(t), null, 2);
|
|
1225
1252
|
} catch {
|
|
1226
1253
|
return null;
|
|
1227
1254
|
}
|
|
1228
|
-
},
|
|
1255
|
+
}, Ba = (t) => {
|
|
1229
1256
|
const a = [
|
|
1230
1257
|
"Content-Type",
|
|
1231
1258
|
"Content-Length",
|
|
@@ -1236,57 +1263,57 @@ const La = {
|
|
|
1236
1263
|
"ETag"
|
|
1237
1264
|
].map((s) => s.toLowerCase());
|
|
1238
1265
|
return [...t].sort(([s], [n]) => {
|
|
1239
|
-
const
|
|
1240
|
-
return
|
|
1266
|
+
const i = a.indexOf(s.toLowerCase()), d = a.indexOf(n.toLowerCase());
|
|
1267
|
+
return i === d ? 0 : i === -1 ? 1 : d === -1 ? -1 : i - d;
|
|
1241
1268
|
});
|
|
1242
|
-
},
|
|
1269
|
+
}, Ga = ({
|
|
1243
1270
|
body: t = "",
|
|
1244
1271
|
headers: a,
|
|
1245
1272
|
status: s,
|
|
1246
1273
|
time: n,
|
|
1247
|
-
size:
|
|
1274
|
+
size: i,
|
|
1248
1275
|
url: d
|
|
1249
1276
|
}) => {
|
|
1250
1277
|
var l;
|
|
1251
|
-
const
|
|
1278
|
+
const r = za(a), m = Ha(t), c = m || t, [p, g] = H(
|
|
1252
1279
|
m ? "formatted" : "raw"
|
|
1253
|
-
),
|
|
1280
|
+
), x = Ft({
|
|
1254
1281
|
queryKey: ["types", c],
|
|
1255
|
-
queryFn: async () =>
|
|
1256
|
-
enabled:
|
|
1257
|
-
}),
|
|
1282
|
+
queryFn: async () => La(JSON.parse(c)),
|
|
1283
|
+
enabled: p === "types"
|
|
1284
|
+
}), f = Ba([...a]);
|
|
1258
1285
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 h-full overflow-y-scroll max-h-[calc(100vh-220px)] py-4", children: [
|
|
1259
|
-
/* @__PURE__ */ e.jsxs(
|
|
1260
|
-
/* @__PURE__ */ e.jsxs(
|
|
1286
|
+
/* @__PURE__ */ e.jsxs(Ve, { defaultOpen: !0, children: [
|
|
1287
|
+
/* @__PURE__ */ e.jsxs(Fe, { className: "flex items-center gap-2 hover:text-primary group", children: [
|
|
1261
1288
|
/* @__PURE__ */ e.jsx(z, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
|
|
1262
1289
|
/* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Headers" })
|
|
1263
1290
|
] }),
|
|
1264
|
-
/* @__PURE__ */ e.jsx(
|
|
1265
|
-
|
|
1266
|
-
/* @__PURE__ */ e.jsx("div", { className: "text-primary whitespace-pre", children:
|
|
1291
|
+
/* @__PURE__ */ e.jsx(ze, { 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: [
|
|
1292
|
+
f.slice(0, 5).map(([v, C]) => /* @__PURE__ */ e.jsxs(k, { children: [
|
|
1293
|
+
/* @__PURE__ */ e.jsx("div", { className: "text-primary whitespace-pre", children: v }),
|
|
1267
1294
|
/* @__PURE__ */ e.jsx("div", { className: "break-all", children: C })
|
|
1268
|
-
] },
|
|
1269
|
-
|
|
1270
|
-
/* @__PURE__ */ e.jsxs(
|
|
1295
|
+
] }, v)),
|
|
1296
|
+
f.length > 5 && /* @__PURE__ */ e.jsxs(Ve, { className: "col-span-full grid-cols-subgrid grid", children: [
|
|
1297
|
+
/* @__PURE__ */ e.jsxs(Fe, { className: "col-span-2 text-xs text-muted-foreground hover:text-primary flex items-center gap-1 py-1", children: [
|
|
1271
1298
|
/* @__PURE__ */ e.jsx(z, { className: "h-3 w-3 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
|
|
1272
1299
|
"Show ",
|
|
1273
|
-
|
|
1300
|
+
f.length - 5,
|
|
1274
1301
|
" more headers"
|
|
1275
1302
|
] }),
|
|
1276
|
-
/* @__PURE__ */ e.jsx(
|
|
1277
|
-
/* @__PURE__ */ e.jsx("div", { className: "text-primary whitespace-pre", children:
|
|
1303
|
+
/* @__PURE__ */ e.jsx(ze, { className: "col-span-full grid grid-cols-subgrid gap-x-8 gap-y-1 ", children: f.slice(5).map(([v, C]) => /* @__PURE__ */ e.jsxs(k, { children: [
|
|
1304
|
+
/* @__PURE__ */ e.jsx("div", { className: "text-primary whitespace-pre", children: v }),
|
|
1278
1305
|
/* @__PURE__ */ e.jsx("div", { className: "break-all", children: C })
|
|
1279
|
-
] },
|
|
1306
|
+
] }, v)) })
|
|
1280
1307
|
] })
|
|
1281
1308
|
] }) })
|
|
1282
1309
|
] }),
|
|
1283
|
-
/* @__PURE__ */ e.jsx(
|
|
1310
|
+
/* @__PURE__ */ e.jsx(xe, { className: "shadow-none", children: /* @__PURE__ */ e.jsx(
|
|
1284
1311
|
Mt,
|
|
1285
1312
|
{
|
|
1286
|
-
language:
|
|
1313
|
+
language: p === "types" ? "typescript" : p === "raw" ? m ? "plain" : r : "json",
|
|
1287
1314
|
noBackground: !0,
|
|
1288
1315
|
className: "overflow-x-auto p-4 text-xs max-h-[calc(83.333vh-180px)]",
|
|
1289
|
-
code: (
|
|
1316
|
+
code: (p === "raw" ? t : p === "types" ? (l = x.data) == null ? void 0 : l.lines.join(`
|
|
1290
1317
|
`) : c) ?? ""
|
|
1291
1318
|
}
|
|
1292
1319
|
) }),
|
|
@@ -1297,7 +1324,7 @@ const La = {
|
|
|
1297
1324
|
" ",
|
|
1298
1325
|
s,
|
|
1299
1326
|
" ",
|
|
1300
|
-
|
|
1327
|
+
Va[s] ?? ""
|
|
1301
1328
|
] }),
|
|
1302
1329
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1303
1330
|
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "Time" }),
|
|
@@ -1308,28 +1335,28 @@ const La = {
|
|
|
1308
1335
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1309
1336
|
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "Size" }),
|
|
1310
1337
|
" ",
|
|
1311
|
-
|
|
1338
|
+
i,
|
|
1312
1339
|
"B"
|
|
1313
1340
|
] })
|
|
1314
1341
|
] }),
|
|
1315
1342
|
m && /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs(
|
|
1316
|
-
|
|
1343
|
+
Be,
|
|
1317
1344
|
{
|
|
1318
|
-
value:
|
|
1319
|
-
onValueChange: (
|
|
1345
|
+
value: p,
|
|
1346
|
+
onValueChange: (v) => g(v),
|
|
1320
1347
|
children: [
|
|
1321
|
-
/* @__PURE__ */ e.jsx(
|
|
1322
|
-
/* @__PURE__ */ e.jsxs(
|
|
1323
|
-
/* @__PURE__ */ e.jsx(
|
|
1324
|
-
/* @__PURE__ */ e.jsx(
|
|
1325
|
-
/* @__PURE__ */ e.jsx(
|
|
1348
|
+
/* @__PURE__ */ e.jsx(Ge, { className: "min-w-32", children: /* @__PURE__ */ e.jsx(Ue, { placeholder: "View" }) }),
|
|
1349
|
+
/* @__PURE__ */ e.jsxs(Me, { children: [
|
|
1350
|
+
/* @__PURE__ */ e.jsx(U, { value: "formatted", children: "Formatted" }),
|
|
1351
|
+
/* @__PURE__ */ e.jsx(U, { value: "raw", children: "Raw" }),
|
|
1352
|
+
/* @__PURE__ */ e.jsx(U, { value: "types", children: "Types" })
|
|
1326
1353
|
] })
|
|
1327
1354
|
]
|
|
1328
1355
|
}
|
|
1329
1356
|
) })
|
|
1330
1357
|
] })
|
|
1331
1358
|
] });
|
|
1332
|
-
},
|
|
1359
|
+
}, Ua = ({
|
|
1333
1360
|
queryMutation: t,
|
|
1334
1361
|
showPathParamsWarning: a
|
|
1335
1362
|
}) => {
|
|
@@ -1337,7 +1364,7 @@ const La = {
|
|
|
1337
1364
|
const s = ((((n = t.data) == null ? void 0 : n.status) ?? 0) / 100).toFixed(0);
|
|
1338
1365
|
return /* @__PURE__ */ e.jsx("div", { className: "min-w-0 p-8 bg-muted/70 overflow-y-auto", children: t.error ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
1339
1366
|
a && /* @__PURE__ */ e.jsx(Wt, { type: "caution", children: "Some path parameters are missing values. Please fill them in to ensure the request is sent correctly." }),
|
|
1340
|
-
/* @__PURE__ */ e.jsxs(
|
|
1367
|
+
/* @__PURE__ */ e.jsxs(xe, { children: [
|
|
1341
1368
|
/* @__PURE__ */ e.jsx(Ht, { children: /* @__PURE__ */ e.jsx(Bt, { children: "Request failed" }) }),
|
|
1342
1369
|
/* @__PURE__ */ e.jsxs(Gt, { children: [
|
|
1343
1370
|
"Error:",
|
|
@@ -1345,10 +1372,10 @@ const La = {
|
|
|
1345
1372
|
t.error.message || String(t.error) || "Unexpected error"
|
|
1346
1373
|
] })
|
|
1347
1374
|
] })
|
|
1348
|
-
] }) : t.data ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ e.jsxs(
|
|
1349
|
-
/* @__PURE__ */ e.jsxs(
|
|
1350
|
-
/* @__PURE__ */ e.jsx(
|
|
1351
|
-
/* @__PURE__ */ e.jsxs(
|
|
1375
|
+
] }) : t.data ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ e.jsxs(Je, { defaultValue: "response", children: [
|
|
1376
|
+
/* @__PURE__ */ e.jsxs(Qe, { children: [
|
|
1377
|
+
/* @__PURE__ */ e.jsx(E, { value: "request", children: "Request" }),
|
|
1378
|
+
/* @__PURE__ */ e.jsxs(E, { value: "response", children: [
|
|
1352
1379
|
"Response",
|
|
1353
1380
|
/* @__PURE__ */ e.jsxs(
|
|
1354
1381
|
"span",
|
|
@@ -1369,9 +1396,9 @@ const La = {
|
|
|
1369
1396
|
)
|
|
1370
1397
|
] })
|
|
1371
1398
|
] }),
|
|
1372
|
-
/* @__PURE__ */ e.jsx(
|
|
1373
|
-
/* @__PURE__ */ e.jsx(
|
|
1374
|
-
|
|
1399
|
+
/* @__PURE__ */ e.jsx(A, { value: "request", children: /* @__PURE__ */ e.jsx(qa, { ...t.data.request }) }),
|
|
1400
|
+
/* @__PURE__ */ e.jsx(A, { value: "response", children: /* @__PURE__ */ e.jsx(
|
|
1401
|
+
Ga,
|
|
1375
1402
|
{
|
|
1376
1403
|
status: t.data.status,
|
|
1377
1404
|
time: t.data.time,
|
|
@@ -1382,28 +1409,28 @@ const La = {
|
|
|
1382
1409
|
}
|
|
1383
1410
|
) })
|
|
1384
1411
|
] }) }) : /* @__PURE__ */ e.jsx("div", { className: "grid place-items-center h-full", children: /* @__PURE__ */ e.jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children: t.isPending ? /* @__PURE__ */ e.jsx(_t, {}) : "Send a request first to see the response here" }) }) });
|
|
1385
|
-
},
|
|
1412
|
+
}, Ma = ({
|
|
1386
1413
|
identities: t,
|
|
1387
1414
|
formRef: a,
|
|
1388
1415
|
disabled: s
|
|
1389
1416
|
}) => {
|
|
1390
|
-
const { setValue: n } =
|
|
1391
|
-
return t.length === 0 ? /* @__PURE__ */ e.jsx(
|
|
1417
|
+
const { setValue: n } = pe(), [i, d] = H();
|
|
1418
|
+
return t.length === 0 ? /* @__PURE__ */ e.jsx(M, { disabled: s, children: "Send" }) : /* @__PURE__ */ e.jsxs("div", { className: "flex", children: [
|
|
1392
1419
|
/* @__PURE__ */ e.jsx(
|
|
1393
|
-
|
|
1420
|
+
M,
|
|
1394
1421
|
{
|
|
1395
1422
|
className: "rounded-r-none inset-shadow-sm",
|
|
1396
1423
|
disabled: s,
|
|
1397
1424
|
onClick: () => {
|
|
1398
|
-
var
|
|
1399
|
-
return (
|
|
1425
|
+
var r;
|
|
1426
|
+
return (r = a == null ? void 0 : a.current) == null ? void 0 : r.requestSubmit();
|
|
1400
1427
|
},
|
|
1401
1428
|
children: "Send"
|
|
1402
1429
|
}
|
|
1403
1430
|
),
|
|
1404
|
-
/* @__PURE__ */ e.jsxs(
|
|
1405
|
-
/* @__PURE__ */ e.jsx(
|
|
1406
|
-
|
|
1431
|
+
/* @__PURE__ */ e.jsxs(Xe, { children: [
|
|
1432
|
+
/* @__PURE__ */ e.jsx(Ye, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
1433
|
+
M,
|
|
1407
1434
|
{
|
|
1408
1435
|
disabled: s,
|
|
1409
1436
|
className: "rounded-l-none border-l border-border/40 inset-shadow-sm w-6",
|
|
@@ -1411,46 +1438,46 @@ const La = {
|
|
|
1411
1438
|
children: /* @__PURE__ */ e.jsx(bt, { className: "w-4 h-4" })
|
|
1412
1439
|
}
|
|
1413
1440
|
) }),
|
|
1414
|
-
/* @__PURE__ */ e.jsx(
|
|
1415
|
-
(
|
|
1416
|
-
|
|
1441
|
+
/* @__PURE__ */ e.jsx(ye, { value: i, children: /* @__PURE__ */ e.jsx(ve, { className: "w-56", align: "end", alignOffset: -150, children: [{ id: F, label: "None" }, ...t].map(
|
|
1442
|
+
(r) => /* @__PURE__ */ e.jsxs(
|
|
1443
|
+
je,
|
|
1417
1444
|
{
|
|
1418
1445
|
onClick: () => {
|
|
1419
1446
|
var m;
|
|
1420
|
-
d(
|
|
1447
|
+
d(r.id), n("identity", r.id), (m = a == null ? void 0 : a.current) == null || m.requestSubmit();
|
|
1421
1448
|
},
|
|
1422
|
-
onMouseEnter: () => d(
|
|
1449
|
+
onMouseEnter: () => d(r.id),
|
|
1423
1450
|
onMouseLeave: () => d(void 0),
|
|
1424
1451
|
children: [
|
|
1425
|
-
/* @__PURE__ */ e.jsx(
|
|
1426
|
-
|
|
1452
|
+
/* @__PURE__ */ e.jsx(Q, { value: r.id, className: "mr-2" }),
|
|
1453
|
+
r.label
|
|
1427
1454
|
]
|
|
1428
1455
|
},
|
|
1429
|
-
|
|
1456
|
+
r.id
|
|
1430
1457
|
)
|
|
1431
1458
|
) }) })
|
|
1432
1459
|
] })
|
|
1433
1460
|
] });
|
|
1434
|
-
}, F = "__none",
|
|
1461
|
+
}, F = "__none", _a = ({
|
|
1435
1462
|
server: t,
|
|
1436
1463
|
servers: a,
|
|
1437
1464
|
url: s,
|
|
1438
1465
|
method: n,
|
|
1439
|
-
headers:
|
|
1466
|
+
headers: i = [],
|
|
1440
1467
|
queryParams: d = [],
|
|
1441
|
-
pathParams:
|
|
1468
|
+
pathParams: r = [],
|
|
1442
1469
|
defaultBody: m = "",
|
|
1443
1470
|
examples: c
|
|
1444
1471
|
}) => {
|
|
1445
|
-
var
|
|
1446
|
-
const { selectedServer:
|
|
1472
|
+
var Pe, ke, Re;
|
|
1473
|
+
const { selectedServer: p, setSelectedServer: g } = Vt(), [, x] = kt(), { register: f, control: l, handleSubmit: v, watch: C, setValue: N, ...$ } = Dt({
|
|
1447
1474
|
defaultValues: {
|
|
1448
1475
|
body: m,
|
|
1449
|
-
queryParams: d.map((
|
|
1450
|
-
name:
|
|
1451
|
-
value:
|
|
1452
|
-
active:
|
|
1453
|
-
enum:
|
|
1476
|
+
queryParams: d.map((o) => ({
|
|
1477
|
+
name: o.name,
|
|
1478
|
+
value: o.defaultValue ?? "",
|
|
1479
|
+
active: o.defaultActive ?? !1,
|
|
1480
|
+
enum: o.enum ?? []
|
|
1454
1481
|
})).concat([
|
|
1455
1482
|
{
|
|
1456
1483
|
name: "",
|
|
@@ -1459,14 +1486,14 @@ const La = {
|
|
|
1459
1486
|
enum: []
|
|
1460
1487
|
}
|
|
1461
1488
|
]),
|
|
1462
|
-
pathParams:
|
|
1463
|
-
name:
|
|
1464
|
-
value:
|
|
1489
|
+
pathParams: r.map((o) => ({
|
|
1490
|
+
name: o.name,
|
|
1491
|
+
value: o.defaultValue ?? ""
|
|
1465
1492
|
})),
|
|
1466
|
-
headers:
|
|
1467
|
-
name:
|
|
1468
|
-
value:
|
|
1469
|
-
active:
|
|
1493
|
+
headers: i.map((o) => ({
|
|
1494
|
+
name: o.name,
|
|
1495
|
+
value: o.defaultValue ?? "",
|
|
1496
|
+
active: o.defaultActive ?? !1
|
|
1470
1497
|
})).concat([
|
|
1471
1498
|
{
|
|
1472
1499
|
name: "",
|
|
@@ -1476,170 +1503,169 @@ const La = {
|
|
|
1476
1503
|
]),
|
|
1477
1504
|
identity: F
|
|
1478
1505
|
}
|
|
1479
|
-
}), S = C(),
|
|
1480
|
-
|
|
1481
|
-
var
|
|
1482
|
-
if (
|
|
1483
|
-
const
|
|
1484
|
-
|
|
1485
|
-
}, [N,
|
|
1486
|
-
const
|
|
1487
|
-
mutationFn: async (
|
|
1488
|
-
var
|
|
1489
|
-
const
|
|
1490
|
-
|
|
1506
|
+
}), S = C(), O = zt(), Ce = q(!1);
|
|
1507
|
+
He(() => {
|
|
1508
|
+
var P;
|
|
1509
|
+
if (Ce.current) return;
|
|
1510
|
+
const o = (P = O.data) == null ? void 0 : P.at(0);
|
|
1511
|
+
o && (N("identity", o.id), Ce.current = !0);
|
|
1512
|
+
}, [N, O.data]);
|
|
1513
|
+
const $e = q(null), Se = qt({
|
|
1514
|
+
mutationFn: async (o) => {
|
|
1515
|
+
var G, L;
|
|
1516
|
+
const P = performance.now(), w = new Request(
|
|
1517
|
+
da(p ?? t, s, o),
|
|
1491
1518
|
{
|
|
1492
1519
|
method: n.toUpperCase(),
|
|
1493
1520
|
headers: Object.fromEntries(
|
|
1494
|
-
|
|
1521
|
+
o.headers.filter((j) => j.name && j.active).map((j) => [j.name, j.value])
|
|
1495
1522
|
),
|
|
1496
|
-
body:
|
|
1523
|
+
body: o.body ? o.body : void 0
|
|
1497
1524
|
}
|
|
1498
1525
|
);
|
|
1499
|
-
|
|
1526
|
+
o.identity !== F && ((L = (G = O.data) == null ? void 0 : G.find((j) => j.id === o.identity)) == null || L.authorizeRequest(w));
|
|
1500
1527
|
try {
|
|
1501
|
-
const
|
|
1528
|
+
const j = await fetch(w, {
|
|
1502
1529
|
signal: AbortSignal.timeout(5e3)
|
|
1503
|
-
}),
|
|
1530
|
+
}), ct = performance.now() - P, Oe = await j.text(), mt = new URL(w.url);
|
|
1504
1531
|
return {
|
|
1505
|
-
status:
|
|
1506
|
-
headers: Array.from(
|
|
1507
|
-
size:
|
|
1508
|
-
body:
|
|
1509
|
-
time:
|
|
1532
|
+
status: j.status,
|
|
1533
|
+
headers: Array.from(j.headers.entries()),
|
|
1534
|
+
size: Oe.length,
|
|
1535
|
+
body: Oe,
|
|
1536
|
+
time: ct,
|
|
1510
1537
|
request: {
|
|
1511
1538
|
method: w.method.toUpperCase(),
|
|
1512
1539
|
url: w.url,
|
|
1513
1540
|
headers: [
|
|
1514
|
-
["Host",
|
|
1541
|
+
["Host", mt.host],
|
|
1515
1542
|
["User-Agent", "Zudoku Playground"],
|
|
1516
1543
|
...Array.from(w.headers.entries())
|
|
1517
1544
|
],
|
|
1518
|
-
body:
|
|
1545
|
+
body: o.body ? o.body : void 0
|
|
1519
1546
|
}
|
|
1520
1547
|
};
|
|
1521
|
-
} catch (
|
|
1522
|
-
throw
|
|
1548
|
+
} catch (j) {
|
|
1549
|
+
throw j instanceof TypeError ? new Error(
|
|
1523
1550
|
"The request failed, possibly due to network issues or CORS policy."
|
|
1524
|
-
) :
|
|
1551
|
+
) : j;
|
|
1525
1552
|
}
|
|
1526
1553
|
}
|
|
1527
|
-
}),
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
{
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1554
|
+
}), lt = /* @__PURE__ */ e.jsx(
|
|
1555
|
+
oa,
|
|
1556
|
+
{
|
|
1557
|
+
path: s,
|
|
1558
|
+
renderParam: ({ name: o, originalValue: P, index: w }) => {
|
|
1559
|
+
var L;
|
|
1560
|
+
const G = (L = S.pathParams.find(
|
|
1561
|
+
(j) => j.name === o
|
|
1562
|
+
)) == null ? void 0 : L.value;
|
|
1563
|
+
return /* @__PURE__ */ e.jsx(
|
|
1564
|
+
Ke,
|
|
1565
|
+
{
|
|
1566
|
+
name: o,
|
|
1567
|
+
backgroundOpacity: "0",
|
|
1568
|
+
slug: o,
|
|
1569
|
+
onClick: () => $.setFocus(`pathParams.${w}.value`),
|
|
1570
|
+
children: G || P
|
|
1571
|
+
}
|
|
1572
|
+
);
|
|
1537
1573
|
}
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
/* @__PURE__ */ e.jsxs(B, { children: [
|
|
1542
|
-
U ? Y : r,
|
|
1543
|
-
T < w.length - 1 && "/",
|
|
1544
|
-
/* @__PURE__ */ e.jsx("wbr", {})
|
|
1545
|
-
] }, r + T)
|
|
1546
|
-
);
|
|
1547
|
-
}), Re = S.queryParams.filter((r) => r.active).map((r, T, w) => /* @__PURE__ */ e.jsxs(B, { children: [
|
|
1548
|
-
r.name,
|
|
1574
|
+
}
|
|
1575
|
+
), Te = S.queryParams.filter((o) => o.active).map((o, P, w) => /* @__PURE__ */ e.jsxs(k, { children: [
|
|
1576
|
+
o.name,
|
|
1549
1577
|
"=",
|
|
1550
|
-
encodeURIComponent(
|
|
1551
|
-
|
|
1578
|
+
encodeURIComponent(o.value).replaceAll("%20", "+"),
|
|
1579
|
+
P < w.length - 1 && "&",
|
|
1552
1580
|
/* @__PURE__ */ e.jsx("wbr", {})
|
|
1553
|
-
] },
|
|
1554
|
-
|
|
1581
|
+
] }, o.name)), dt = /* @__PURE__ */ e.jsx("div", { className: "inline-block opacity-50 hover:opacity-100 transition", children: a && a.length > 1 ? /* @__PURE__ */ e.jsxs(
|
|
1582
|
+
Be,
|
|
1555
1583
|
{
|
|
1556
|
-
onValueChange: (
|
|
1557
|
-
|
|
1558
|
-
v(r);
|
|
1559
|
-
});
|
|
1584
|
+
onValueChange: (o) => {
|
|
1585
|
+
x(() => g(o));
|
|
1560
1586
|
},
|
|
1561
|
-
value:
|
|
1562
|
-
defaultValue:
|
|
1587
|
+
value: p,
|
|
1588
|
+
defaultValue: p,
|
|
1563
1589
|
children: [
|
|
1564
|
-
/* @__PURE__ */ e.jsx(
|
|
1565
|
-
/* @__PURE__ */ e.jsx(
|
|
1590
|
+
/* @__PURE__ */ e.jsx(Ge, { className: "p-0 border-none flex-row-reverse bg-transparent text-xs gap-0.5 h-auto", children: /* @__PURE__ */ e.jsx(Ue, {}) }),
|
|
1591
|
+
/* @__PURE__ */ e.jsx(Me, { children: a.map((o) => /* @__PURE__ */ e.jsx(U, { value: o, children: o.replace(/^https?:\/\//, "") }, o)) })
|
|
1566
1592
|
]
|
|
1567
1593
|
}
|
|
1568
1594
|
) : /* @__PURE__ */ e.jsx("span", { children: t.replace(/^https?:\/\//, "") }) });
|
|
1569
1595
|
return /* @__PURE__ */ e.jsx(
|
|
1570
1596
|
Lt,
|
|
1571
1597
|
{
|
|
1572
|
-
register:
|
|
1598
|
+
register: f,
|
|
1573
1599
|
control: l,
|
|
1574
|
-
handleSubmit:
|
|
1600
|
+
handleSubmit: v,
|
|
1575
1601
|
watch: C,
|
|
1576
1602
|
setValue: N,
|
|
1577
|
-
|
|
1603
|
+
...$,
|
|
1578
1604
|
children: /* @__PURE__ */ e.jsx(
|
|
1579
1605
|
"form",
|
|
1580
1606
|
{
|
|
1581
|
-
onSubmit:
|
|
1582
|
-
ref:
|
|
1607
|
+
onSubmit: v((o) => Se.mutateAsync(o)),
|
|
1608
|
+
ref: $e,
|
|
1583
1609
|
children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-2 text-sm h-full", children: [
|
|
1584
1610
|
/* @__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: [
|
|
1585
1611
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-stretch", children: [
|
|
1586
1612
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-1 items-center w-full border rounded-md", children: [
|
|
1587
1613
|
/* @__PURE__ */ e.jsx("div", { className: "border-r p-2 bg-muted rounded-l-md self-stretch font-semibold font-mono flex items-center", children: n.toUpperCase() }),
|
|
1588
|
-
/* @__PURE__ */ e.jsxs("div", { className: "
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1614
|
+
/* @__PURE__ */ e.jsxs("div", { className: "items-center p-2 font-mono text-xs break-words", children: [
|
|
1615
|
+
dt,
|
|
1616
|
+
lt,
|
|
1617
|
+
Te.length > 0 ? "?" : "",
|
|
1618
|
+
Te
|
|
1593
1619
|
] })
|
|
1594
1620
|
] }),
|
|
1595
1621
|
/* @__PURE__ */ e.jsx(
|
|
1596
|
-
|
|
1622
|
+
Ma,
|
|
1597
1623
|
{
|
|
1598
|
-
identities:
|
|
1599
|
-
formRef:
|
|
1600
|
-
disabled:
|
|
1624
|
+
identities: O.data ?? [],
|
|
1625
|
+
formRef: $e,
|
|
1626
|
+
disabled: $.formState.isSubmitting
|
|
1601
1627
|
}
|
|
1602
1628
|
)
|
|
1603
1629
|
] }),
|
|
1604
|
-
/* @__PURE__ */ e.jsxs(
|
|
1605
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-1 justify-between", children: /* @__PURE__ */ e.jsxs(
|
|
1606
|
-
/* @__PURE__ */ e.jsxs(
|
|
1630
|
+
/* @__PURE__ */ e.jsxs(Je, { defaultValue: "parameters", children: [
|
|
1631
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-1 justify-between", children: /* @__PURE__ */ e.jsxs(Qe, { children: [
|
|
1632
|
+
/* @__PURE__ */ e.jsxs(E, { value: "parameters", children: [
|
|
1607
1633
|
"Parameters",
|
|
1608
|
-
(S.pathParams.some((
|
|
1634
|
+
(S.pathParams.some((o) => o.value !== "") || S.queryParams.some((o) => o.active)) && /* @__PURE__ */ e.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ml-2" })
|
|
1609
1635
|
] }),
|
|
1610
|
-
/* @__PURE__ */ e.jsxs(
|
|
1636
|
+
/* @__PURE__ */ e.jsxs(E, { value: "headers", children: [
|
|
1611
1637
|
"Headers",
|
|
1612
|
-
S.headers.filter((
|
|
1638
|
+
S.headers.filter((o) => o.active).length > 0 && /* @__PURE__ */ e.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ml-2" })
|
|
1613
1639
|
] }),
|
|
1614
|
-
/* @__PURE__ */ e.jsxs(
|
|
1640
|
+
/* @__PURE__ */ e.jsxs(E, { value: "auth", children: [
|
|
1615
1641
|
"Auth",
|
|
1616
1642
|
S.identity !== F && /* @__PURE__ */ e.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ml-2" })
|
|
1617
1643
|
] }),
|
|
1618
|
-
/* @__PURE__ */ e.jsx(
|
|
1644
|
+
/* @__PURE__ */ e.jsx(E, { value: "body", children: "Body" })
|
|
1619
1645
|
] }) }),
|
|
1620
|
-
/* @__PURE__ */ e.jsx(
|
|
1621
|
-
/* @__PURE__ */ e.jsxs(
|
|
1622
|
-
|
|
1646
|
+
/* @__PURE__ */ e.jsx(A, { value: "headers", children: /* @__PURE__ */ e.jsx(ka, { control: l }) }),
|
|
1647
|
+
/* @__PURE__ */ e.jsxs(A, { value: "parameters", children: [
|
|
1648
|
+
r.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
|
|
1623
1649
|
/* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Path Parameters" }),
|
|
1624
|
-
/* @__PURE__ */ e.jsx(
|
|
1650
|
+
/* @__PURE__ */ e.jsx(Ra, { control: l })
|
|
1625
1651
|
] }),
|
|
1626
1652
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
|
|
1627
1653
|
/* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Query Parameters" }),
|
|
1628
|
-
/* @__PURE__ */ e.jsx(
|
|
1654
|
+
/* @__PURE__ */ e.jsx(Ia, { control: l, queryParams: d })
|
|
1629
1655
|
] })
|
|
1630
1656
|
] }),
|
|
1631
|
-
/* @__PURE__ */ e.jsxs(
|
|
1657
|
+
/* @__PURE__ */ e.jsxs(A, { value: "body", children: [
|
|
1632
1658
|
!["POST", "PUT", "PATCH", "DELETE"].includes(
|
|
1633
1659
|
n.toUpperCase()
|
|
1634
|
-
) && /* @__PURE__ */ e.jsxs(
|
|
1635
|
-
/* @__PURE__ */ e.jsx(
|
|
1636
|
-
/* @__PURE__ */ e.jsx(
|
|
1637
|
-
/* @__PURE__ */ e.jsx(
|
|
1660
|
+
) && /* @__PURE__ */ e.jsxs(le, { className: "mb-2", children: [
|
|
1661
|
+
/* @__PURE__ */ e.jsx(Ee, { className: "w-4 h-4" }),
|
|
1662
|
+
/* @__PURE__ */ e.jsx(de, { children: "Body" }),
|
|
1663
|
+
/* @__PURE__ */ e.jsx(ce, { children: "Body is only supported for POST, PUT, PATCH, and DELETE requests" })
|
|
1638
1664
|
] }),
|
|
1639
1665
|
/* @__PURE__ */ e.jsx(
|
|
1640
|
-
|
|
1666
|
+
Ze,
|
|
1641
1667
|
{
|
|
1642
|
-
...
|
|
1668
|
+
...f("body"),
|
|
1643
1669
|
className: u(
|
|
1644
1670
|
"border w-full rounded-lg p-2 bg-muted h-40 font-mono",
|
|
1645
1671
|
!["POST", "PUT", "PATCH", "DELETE"].includes(
|
|
@@ -1655,27 +1681,27 @@ const La = {
|
|
|
1655
1681
|
}
|
|
1656
1682
|
),
|
|
1657
1683
|
c && /* @__PURE__ */ e.jsx(
|
|
1658
|
-
|
|
1684
|
+
xa,
|
|
1659
1685
|
{
|
|
1660
1686
|
examples: c,
|
|
1661
|
-
onSelect: (
|
|
1687
|
+
onSelect: (o) => N("body", JSON.stringify(o.value, null, 2))
|
|
1662
1688
|
}
|
|
1663
1689
|
)
|
|
1664
1690
|
] }),
|
|
1665
|
-
/* @__PURE__ */ e.jsx(
|
|
1666
|
-
((
|
|
1667
|
-
/* @__PURE__ */ e.jsx(
|
|
1668
|
-
/* @__PURE__ */ e.jsx(
|
|
1669
|
-
/* @__PURE__ */ e.jsx(
|
|
1691
|
+
/* @__PURE__ */ e.jsx(A, { value: "auth", children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
|
|
1692
|
+
((Pe = O.data) == null ? void 0 : Pe.length) === 0 && /* @__PURE__ */ e.jsxs(le, { children: [
|
|
1693
|
+
/* @__PURE__ */ e.jsx(Ee, { className: "w-4 h-4" }),
|
|
1694
|
+
/* @__PURE__ */ e.jsx(de, { children: "Authentication" }),
|
|
1695
|
+
/* @__PURE__ */ e.jsx(ce, { children: "No identities found. Please create an identity first." })
|
|
1670
1696
|
] }),
|
|
1671
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center gap-2", children: /* @__PURE__ */ e.jsx(
|
|
1672
|
-
|
|
1697
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center gap-2", children: /* @__PURE__ */ e.jsx(xe, { className: "w-full overflow-hidden", children: /* @__PURE__ */ e.jsxs(
|
|
1698
|
+
ye,
|
|
1673
1699
|
{
|
|
1674
|
-
onValueChange: (
|
|
1700
|
+
onValueChange: (o) => N("identity", o),
|
|
1675
1701
|
value: S.identity,
|
|
1676
1702
|
defaultValue: S.identity,
|
|
1677
1703
|
className: "gap-0",
|
|
1678
|
-
disabled: ((
|
|
1704
|
+
disabled: ((ke = O.data) == null ? void 0 : ke.length) === 0,
|
|
1679
1705
|
children: [
|
|
1680
1706
|
/* @__PURE__ */ e.jsxs(
|
|
1681
1707
|
V,
|
|
@@ -1683,28 +1709,28 @@ const La = {
|
|
|
1683
1709
|
className: "h-12 border-b items-center flex p-4 cursor-pointer hover:bg-accent",
|
|
1684
1710
|
htmlFor: "none",
|
|
1685
1711
|
children: [
|
|
1686
|
-
/* @__PURE__ */ e.jsx(
|
|
1712
|
+
/* @__PURE__ */ e.jsx(Q, { value: F, id: "none", children: "None" }),
|
|
1687
1713
|
/* @__PURE__ */ e.jsx(V, { htmlFor: "none", className: "ml-2", children: "None" })
|
|
1688
1714
|
]
|
|
1689
1715
|
}
|
|
1690
1716
|
),
|
|
1691
|
-
(
|
|
1717
|
+
(Re = O.data) == null ? void 0 : Re.map((o) => /* @__PURE__ */ e.jsxs(
|
|
1692
1718
|
V,
|
|
1693
1719
|
{
|
|
1694
1720
|
className: "h-12 border-b items-center flex p-4 cursor-pointer hover:bg-accent",
|
|
1695
1721
|
children: [
|
|
1696
1722
|
/* @__PURE__ */ e.jsx(
|
|
1697
|
-
|
|
1723
|
+
Q,
|
|
1698
1724
|
{
|
|
1699
|
-
value:
|
|
1700
|
-
id:
|
|
1701
|
-
children:
|
|
1725
|
+
value: o.id,
|
|
1726
|
+
id: o.id,
|
|
1727
|
+
children: o.label
|
|
1702
1728
|
}
|
|
1703
1729
|
),
|
|
1704
|
-
/* @__PURE__ */ e.jsx(V, { htmlFor:
|
|
1730
|
+
/* @__PURE__ */ e.jsx(V, { htmlFor: o.id, className: "ml-2", children: o.label })
|
|
1705
1731
|
]
|
|
1706
1732
|
},
|
|
1707
|
-
|
|
1733
|
+
o.id
|
|
1708
1734
|
))
|
|
1709
1735
|
]
|
|
1710
1736
|
}
|
|
@@ -1713,11 +1739,11 @@ const La = {
|
|
|
1713
1739
|
] })
|
|
1714
1740
|
] }),
|
|
1715
1741
|
/* @__PURE__ */ e.jsx(
|
|
1716
|
-
|
|
1742
|
+
Ua,
|
|
1717
1743
|
{
|
|
1718
|
-
queryMutation:
|
|
1744
|
+
queryMutation: Se,
|
|
1719
1745
|
showPathParamsWarning: S.pathParams.some(
|
|
1720
|
-
(
|
|
1746
|
+
(o) => o.value === ""
|
|
1721
1747
|
)
|
|
1722
1748
|
}
|
|
1723
1749
|
)
|
|
@@ -1726,7 +1752,7 @@ const La = {
|
|
|
1726
1752
|
)
|
|
1727
1753
|
}
|
|
1728
1754
|
);
|
|
1729
|
-
},
|
|
1755
|
+
}, Ja = ({
|
|
1730
1756
|
className: t,
|
|
1731
1757
|
size: a = 16
|
|
1732
1758
|
}) => /* @__PURE__ */ e.jsx(
|
|
@@ -1747,13 +1773,20 @@ const La = {
|
|
|
1747
1773
|
}
|
|
1748
1774
|
)
|
|
1749
1775
|
}
|
|
1750
|
-
),
|
|
1776
|
+
), Qa = (t) => {
|
|
1751
1777
|
const [a, s] = H(!1);
|
|
1752
1778
|
return /* @__PURE__ */ e.jsxs(Ot, { onOpenChange: (n) => s(n), children: [
|
|
1753
|
-
/* @__PURE__ */ e.jsx(It, { asChild: !0, children: t.children ?? /* @__PURE__ */ e.jsxs(
|
|
1754
|
-
"
|
|
1755
|
-
|
|
1756
|
-
|
|
1779
|
+
/* @__PURE__ */ e.jsx(It, { asChild: !0, children: t.children ?? /* @__PURE__ */ e.jsxs(
|
|
1780
|
+
"button",
|
|
1781
|
+
{
|
|
1782
|
+
type: "button",
|
|
1783
|
+
className: "flex gap-1 items-center px-2 py-1 rounded-md transition text-xs bg-primary text-primary-foreground shadow-sm hover:bg-primary/80",
|
|
1784
|
+
children: [
|
|
1785
|
+
"Test",
|
|
1786
|
+
/* @__PURE__ */ e.jsx(Ja, { size: 14 })
|
|
1787
|
+
]
|
|
1788
|
+
}
|
|
1789
|
+
) }),
|
|
1757
1790
|
/* @__PURE__ */ e.jsxs(
|
|
1758
1791
|
Et,
|
|
1759
1792
|
{
|
|
@@ -1761,12 +1794,12 @@ const La = {
|
|
|
1761
1794
|
"aria-describedby": void 0,
|
|
1762
1795
|
children: [
|
|
1763
1796
|
/* @__PURE__ */ e.jsx(Pt, { children: /* @__PURE__ */ e.jsx(At, { children: "Playground" }) }),
|
|
1764
|
-
a && /* @__PURE__ */ e.jsx(
|
|
1797
|
+
a && /* @__PURE__ */ e.jsx(_a, { ...t })
|
|
1765
1798
|
]
|
|
1766
1799
|
}
|
|
1767
1800
|
)
|
|
1768
1801
|
] });
|
|
1769
|
-
},
|
|
1802
|
+
}, Wa = We(`
|
|
1770
1803
|
query GetCategories($input: JSON!, $type: SchemaType!) {
|
|
1771
1804
|
schema(input: $input, type: $type) {
|
|
1772
1805
|
url
|
|
@@ -1775,7 +1808,7 @@ const La = {
|
|
|
1775
1808
|
}
|
|
1776
1809
|
}
|
|
1777
1810
|
}
|
|
1778
|
-
`),
|
|
1811
|
+
`), Za = We(`
|
|
1779
1812
|
query GetOperations(
|
|
1780
1813
|
$input: JSON!
|
|
1781
1814
|
$type: SchemaType!
|
|
@@ -1793,7 +1826,7 @@ const La = {
|
|
|
1793
1826
|
}
|
|
1794
1827
|
}
|
|
1795
1828
|
}
|
|
1796
|
-
`),
|
|
1829
|
+
`), Ka = {
|
|
1797
1830
|
get: "green",
|
|
1798
1831
|
post: "blue",
|
|
1799
1832
|
put: "yellow",
|
|
@@ -1801,8 +1834,8 @@ const La = {
|
|
|
1801
1834
|
patch: "purple",
|
|
1802
1835
|
options: "gray",
|
|
1803
1836
|
head: "gray"
|
|
1804
|
-
},
|
|
1805
|
-
const a =
|
|
1837
|
+
}, oe = "~endpoints", $s = (t) => {
|
|
1838
|
+
const a = I(t.navigationId ?? "/reference"), s = t.type === "file" ? Object.keys(t.input) : [], n = new Kt(t);
|
|
1806
1839
|
return {
|
|
1807
1840
|
getHead: () => {
|
|
1808
1841
|
if (t.type === "url" && !t.skipPreload)
|
|
@@ -1820,34 +1853,34 @@ const La = {
|
|
|
1820
1853
|
},
|
|
1821
1854
|
getMdxComponents: () => ({
|
|
1822
1855
|
OpenPlaygroundButton: ({
|
|
1823
|
-
requireAuth:
|
|
1856
|
+
requireAuth: i,
|
|
1824
1857
|
server: d,
|
|
1825
|
-
method:
|
|
1858
|
+
method: r,
|
|
1826
1859
|
url: m,
|
|
1827
1860
|
...c
|
|
1828
1861
|
}) => {
|
|
1829
|
-
const
|
|
1862
|
+
const p = St();
|
|
1830
1863
|
if (!d)
|
|
1831
1864
|
throw new Error("Server is required");
|
|
1832
|
-
return
|
|
1833
|
-
|
|
1865
|
+
return i && !p.isAuthenticated ? /* @__PURE__ */ e.jsxs(
|
|
1866
|
+
_,
|
|
1834
1867
|
{
|
|
1835
1868
|
className: "gap-2 items-center",
|
|
1836
1869
|
variant: "outline",
|
|
1837
|
-
onClick:
|
|
1870
|
+
onClick: p.login,
|
|
1838
1871
|
children: [
|
|
1839
1872
|
"Login to open in Playground ",
|
|
1840
1873
|
/* @__PURE__ */ e.jsx(Nt, { size: 16 })
|
|
1841
1874
|
]
|
|
1842
1875
|
}
|
|
1843
1876
|
) : /* @__PURE__ */ e.jsx(
|
|
1844
|
-
|
|
1877
|
+
Qa,
|
|
1845
1878
|
{
|
|
1846
1879
|
url: m ?? "/",
|
|
1847
|
-
method:
|
|
1880
|
+
method: r ?? "get",
|
|
1848
1881
|
server: d,
|
|
1849
1882
|
...c,
|
|
1850
|
-
children: /* @__PURE__ */ e.jsxs(
|
|
1883
|
+
children: /* @__PURE__ */ e.jsxs(_, { className: "gap-2 items-center", variant: "outline", children: [
|
|
1851
1884
|
"Open in Playground ",
|
|
1852
1885
|
/* @__PURE__ */ e.jsx(wt, { size: 16 })
|
|
1853
1886
|
] })
|
|
@@ -1855,50 +1888,50 @@ const La = {
|
|
|
1855
1888
|
);
|
|
1856
1889
|
}
|
|
1857
1890
|
}),
|
|
1858
|
-
getSidebar: async (
|
|
1891
|
+
getSidebar: async (i) => {
|
|
1859
1892
|
var d;
|
|
1860
|
-
if (!Ct({ path: a, end: !1 },
|
|
1893
|
+
if (!Ct({ path: a, end: !1 }, i))
|
|
1861
1894
|
return [];
|
|
1862
1895
|
try {
|
|
1863
|
-
const
|
|
1864
|
-
(l) =>
|
|
1865
|
-
), m =
|
|
1896
|
+
const r = s.find(
|
|
1897
|
+
(l) => i.startsWith(I(a, l))
|
|
1898
|
+
), m = r ?? Object.keys(t.input).at(0), c = await n.fetch(Wa, {
|
|
1866
1899
|
type: t.type,
|
|
1867
1900
|
input: t.type === "file" ? t.input[m] : t.input
|
|
1868
|
-
}),
|
|
1869
|
-
(l) =>
|
|
1870
|
-
),
|
|
1901
|
+
}), p = (d = t.tagPages) == null ? void 0 : d.find(
|
|
1902
|
+
(l) => i.split("/").at(-1) === te(l)
|
|
1903
|
+
), x = (await n.fetch(Za, {
|
|
1871
1904
|
type: t.type,
|
|
1872
1905
|
input: t.type === "file" ? t.input[m] : t.input,
|
|
1873
|
-
tag:
|
|
1874
|
-
untagged:
|
|
1906
|
+
tag: p,
|
|
1907
|
+
untagged: p === void 0
|
|
1875
1908
|
})).schema.operations.map((l) => ({
|
|
1876
1909
|
type: "link",
|
|
1877
1910
|
label: l.summary ?? l.path,
|
|
1878
1911
|
href: `#${l.slug}`,
|
|
1879
1912
|
badge: {
|
|
1880
1913
|
label: l.method,
|
|
1881
|
-
color:
|
|
1914
|
+
color: Ka[l.method.toLowerCase()],
|
|
1882
1915
|
invert: !0
|
|
1883
1916
|
}
|
|
1884
1917
|
}));
|
|
1885
1918
|
return c.schema.tags.map((l) => {
|
|
1886
|
-
const
|
|
1919
|
+
const v = I(
|
|
1887
1920
|
a,
|
|
1888
|
-
|
|
1889
|
-
l.name ?
|
|
1921
|
+
r,
|
|
1922
|
+
l.name ? te(l.name) : oe
|
|
1890
1923
|
);
|
|
1891
1924
|
return {
|
|
1892
1925
|
type: "category",
|
|
1893
1926
|
label: l.name || "Other endpoints",
|
|
1894
1927
|
link: {
|
|
1895
1928
|
type: "doc",
|
|
1896
|
-
id:
|
|
1929
|
+
id: v,
|
|
1897
1930
|
label: l.name
|
|
1898
1931
|
},
|
|
1899
1932
|
collapsible: !1,
|
|
1900
1933
|
collapsed: !0,
|
|
1901
|
-
items:
|
|
1934
|
+
items: i === v ? x : []
|
|
1902
1935
|
};
|
|
1903
1936
|
});
|
|
1904
1937
|
} catch {
|
|
@@ -1906,21 +1939,21 @@ const La = {
|
|
|
1906
1939
|
}
|
|
1907
1940
|
},
|
|
1908
1941
|
getRoutes: () => {
|
|
1909
|
-
const
|
|
1910
|
-
tag:
|
|
1911
|
-
path:
|
|
1942
|
+
const i = [null, ...s], d = (t.tagPages ?? []).map((r) => ({
|
|
1943
|
+
tag: r,
|
|
1944
|
+
path: te(r)
|
|
1912
1945
|
}));
|
|
1913
|
-
return
|
|
1914
|
-
const m =
|
|
1946
|
+
return i.map((r) => {
|
|
1947
|
+
const m = I(a, r ? `/${r}` : "");
|
|
1915
1948
|
return {
|
|
1916
1949
|
path: m,
|
|
1917
1950
|
async lazy() {
|
|
1918
|
-
const { OpenApiRoute: c } = await import("./OpenApiRoute-
|
|
1951
|
+
const { OpenApiRoute: c } = await import("./OpenApiRoute-ULLXjfro.js");
|
|
1919
1952
|
return {
|
|
1920
1953
|
element: /* @__PURE__ */ e.jsx(
|
|
1921
1954
|
c,
|
|
1922
1955
|
{
|
|
1923
|
-
version:
|
|
1956
|
+
version: r ?? void 0,
|
|
1924
1957
|
basePath: a,
|
|
1925
1958
|
versions: s,
|
|
1926
1959
|
client: n,
|
|
@@ -1934,24 +1967,24 @@ const La = {
|
|
|
1934
1967
|
index: !0,
|
|
1935
1968
|
loader: () => {
|
|
1936
1969
|
var c;
|
|
1937
|
-
return
|
|
1938
|
-
|
|
1970
|
+
return $t(
|
|
1971
|
+
I(m, ((c = d.at(0)) == null ? void 0 : c.path) ?? oe)
|
|
1939
1972
|
);
|
|
1940
1973
|
}
|
|
1941
1974
|
},
|
|
1942
1975
|
{
|
|
1943
|
-
path:
|
|
1976
|
+
path: I(m, oe),
|
|
1944
1977
|
async lazy() {
|
|
1945
|
-
const { OperationList: c } = await import("./OperationList-
|
|
1978
|
+
const { OperationList: c } = await import("./OperationList-wzZNceUl.js");
|
|
1946
1979
|
return { element: /* @__PURE__ */ e.jsx(c, { untagged: !0 }) };
|
|
1947
1980
|
}
|
|
1948
1981
|
},
|
|
1949
1982
|
...d.map((c) => ({
|
|
1950
|
-
path:
|
|
1983
|
+
path: I(m, c.path),
|
|
1951
1984
|
async lazy() {
|
|
1952
|
-
const { OperationList:
|
|
1985
|
+
const { OperationList: p } = await import("./OperationList-wzZNceUl.js");
|
|
1953
1986
|
return {
|
|
1954
|
-
element: /* @__PURE__ */ e.jsx(
|
|
1987
|
+
element: /* @__PURE__ */ e.jsx(p, { tag: c.tag })
|
|
1955
1988
|
};
|
|
1956
1989
|
}
|
|
1957
1990
|
}))
|
|
@@ -1962,13 +1995,14 @@ const La = {
|
|
|
1962
1995
|
};
|
|
1963
1996
|
};
|
|
1964
1997
|
export {
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1998
|
+
Ke as C,
|
|
1999
|
+
Qa as P,
|
|
2000
|
+
Ve as a,
|
|
2001
|
+
ze as b,
|
|
2002
|
+
Fe as c,
|
|
2003
|
+
oa as d,
|
|
2004
|
+
We as g,
|
|
2005
|
+
Aa as m,
|
|
2006
|
+
$s as o
|
|
1973
2007
|
};
|
|
1974
|
-
//# sourceMappingURL=index-
|
|
2008
|
+
//# sourceMappingURL=index-DrR58fsJ.js.map
|