zudoku 0.34.4 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/config.d.ts +13 -8
- package/dist/config/validators/common.d.ts +977 -111
- package/dist/config/validators/common.js +26 -1
- package/dist/config/validators/common.js.map +1 -1
- package/dist/config/validators/validate.d.ts +357 -42
- package/dist/lib/authentication/providers/clerk.d.ts +2 -2
- package/dist/lib/authentication/providers/supabase.d.ts +4 -0
- package/dist/lib/authentication/providers/supabase.js +112 -0
- package/dist/lib/authentication/providers/supabase.js.map +1 -0
- package/dist/lib/components/Header.js +3 -3
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/InlineCode.js +1 -1
- package/dist/lib/components/InlineCode.js.map +1 -1
- package/dist/lib/components/Layout.js +4 -10
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/Main.d.ts +2 -0
- package/dist/lib/components/Main.js +15 -0
- package/dist/lib/components/Main.js.map +1 -0
- package/dist/lib/components/context/ViewportAnchorContext.d.ts +2 -4
- package/dist/lib/components/context/ViewportAnchorContext.js +2 -4
- package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +2 -1
- package/dist/lib/components/navigation/Sidebar.d.ts +3 -1
- package/dist/lib/components/navigation/Sidebar.js +2 -4
- package/dist/lib/components/navigation/Sidebar.js.map +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.d.ts +8 -6
- package/dist/lib/components/navigation/SidebarWrapper.js +1 -2
- package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
- package/dist/lib/core/RouteGuard.js +2 -1
- package/dist/lib/core/RouteGuard.js.map +1 -1
- package/dist/lib/oas/graphql/index.js +34 -0
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.d.ts +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +2 -1
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +9 -4
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SimpleSelect.js +1 -1
- package/dist/lib/plugins/openapi/SimpleSelect.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +6 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js +2 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.d.ts +1 -1
- package/dist/lib/plugins/openapi/index.js +8 -8
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +7 -10
- package/dist/lib/ui/Callout.d.ts +2 -1
- package/dist/lib/ui/Callout.js +3 -2
- package/dist/lib/ui/Callout.js.map +1 -1
- package/dist/lib/util/MdxComponents.d.ts +2 -1
- package/dist/vite/plugin-api.js +5 -9
- package/dist/vite/plugin-api.js.map +1 -1
- package/lib/{Callout-B_sEhkYd.js → Callout-B2vsR09t.js} +70 -52
- package/lib/{Callout-B_sEhkYd.js.map → Callout-B2vsR09t.js.map} +1 -1
- package/lib/Drawer-kDAfOq_2.js +1133 -0
- package/lib/Drawer-kDAfOq_2.js.map +1 -0
- package/lib/{Markdown-DZXjQjpH.js → Markdown-D1Y3cd9l.js} +4471 -3315
- package/lib/Markdown-D1Y3cd9l.js.map +1 -0
- package/lib/{MdxPage-52vRwa_7.js → MdxPage-CUL_SQzW.js} +9 -9
- package/lib/MdxPage-CUL_SQzW.js.map +1 -0
- package/lib/{OasProvider-CDyf845G.js → OasProvider-DEL8ulKm.js} +2 -2
- package/lib/{OasProvider-CDyf845G.js.map → OasProvider-DEL8ulKm.js.map} +1 -1
- package/lib/{OperationList-DdCWaqeE.js → OperationList-D6goKbzX.js} +179 -179
- package/lib/OperationList-D6goKbzX.js.map +1 -0
- package/lib/{SlotletProvider-TydSHROc.js → SlotletProvider-iDmNlxD5.js} +2 -2
- package/lib/{SlotletProvider-TydSHROc.js.map → SlotletProvider-iDmNlxD5.js.map} +1 -1
- package/lib/{createServer-DmusVVsi.js → createServer-BNBGpbLa.js} +1764 -1734
- package/lib/{createServer-DmusVVsi.js.map → createServer-BNBGpbLa.js.map} +1 -1
- package/lib/{index-BO-sA1cw.js → index-PKytqmuw.js} +348 -346
- package/lib/index-PKytqmuw.js.map +1 -0
- package/lib/prism-bash.min-HHIMdNJ_.js.map +1 -1
- package/lib/prism-csharp.min-bQAo2pmx.js.map +1 -1
- package/lib/prism-java.min-BpvsOuIa.js.map +1 -1
- package/lib/prism-javascript.min-CEqHqgbm.js.map +1 -1
- package/lib/prism-json.min-B1GJqK1k.js.map +1 -1
- package/lib/prism-markdown.min-C0Qn0m-5.js.map +1 -1
- package/lib/prism-markup-BNGj0Tvm.js.map +1 -1
- package/lib/prism-objectivec.min-BXSWqpJJ.js.map +1 -1
- package/lib/prism-ruby.min-Dx9KO9ds.js.map +1 -1
- package/lib/prism-typescript.min-CD7H2IYQ.js.map +1 -1
- package/lib/ui/Callout.js +39 -21
- package/lib/ui/Callout.js.map +1 -1
- package/lib/ui/Drawer.js +14 -1129
- package/lib/ui/Drawer.js.map +1 -1
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.components.js +675 -621
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +1 -1
- package/lib/zudoku.plugin-api-keys.js +1 -1
- package/lib/zudoku.plugin-custom-pages.js +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +1 -1
- package/package.json +11 -6
- package/src/app/main.css +5 -3
- package/src/lib/authentication/providers/clerk.tsx +2 -2
- package/src/lib/authentication/providers/supabase.tsx +151 -0
- package/src/lib/components/Header.tsx +10 -6
- package/src/lib/components/InlineCode.tsx +1 -1
- package/src/lib/components/Layout.tsx +5 -40
- package/src/lib/components/Main.tsx +47 -0
- package/src/lib/components/context/ViewportAnchorContext.tsx +3 -9
- package/src/lib/components/navigation/Sidebar.tsx +7 -9
- package/src/lib/components/navigation/SidebarWrapper.tsx +13 -15
- package/src/lib/core/RouteGuard.tsx +2 -1
- package/src/lib/oas/graphql/index.ts +35 -0
- package/src/lib/plugins/markdown/MdxPage.tsx +2 -2
- package/src/lib/plugins/openapi/OperationList.tsx +3 -2
- package/src/lib/plugins/openapi/Sidecar.tsx +11 -4
- package/src/lib/plugins/openapi/SimpleSelect.tsx +1 -1
- package/src/lib/plugins/openapi/graphql/gql.ts +3 -3
- package/src/lib/plugins/openapi/graphql/graphql.ts +8 -0
- package/src/lib/plugins/openapi/index.tsx +10 -11
- package/src/lib/plugins/openapi/interfaces.ts +11 -15
- package/src/lib/ui/Callout.tsx +28 -10
- package/lib/Markdown-DZXjQjpH.js.map +0 -1
- package/lib/MdxPage-52vRwa_7.js.map +0 -1
- package/lib/OperationList-DdCWaqeE.js.map +0 -1
- package/lib/index-BO-sA1cw.js.map +0 -1
|
@@ -6,35 +6,35 @@ var Ft = (t, s, n) => s in t ? Vt(t, s, { enumerable: !0, configurable: !0, writ
|
|
|
6
6
|
var he = (t, s, n) => Ft(t, typeof s != "symbol" ? s + "" : s, n), zt = (t, s, n) => s.has(t) || st("Cannot " + n);
|
|
7
7
|
var xe = (t, s, n) => (zt(t, s, "read from private field"), n ? n.call(t) : s.get(t)), ge = (t, s, n) => s.has(t) ? st("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, n);
|
|
8
8
|
import { j as e } from "./jsx-runtime-CYK1ROHF.js";
|
|
9
|
-
import { s as
|
|
10
|
-
import { ChevronRightIcon as
|
|
9
|
+
import { s as ae } from "./index-LNp6rxyU.js";
|
|
10
|
+
import { ChevronRightIcon as Q, CheckIcon as Ht, DotIcon as Mt, Check as Bt, XIcon as Gt, Circle as Jt, ChevronDownIcon as Ut, InfoIcon as nt, LogInIcon as _t, CirclePlayIcon as Qt } from "lucide-react";
|
|
11
11
|
import { r as Wt, m as at } from "./chunk-HA7DTUK3-ZGg2W6yV.js";
|
|
12
12
|
import { h as Zt, p as Xt, i as Kt, k as Yt, l as es, e as ts } from "./hook-CfCFKZ-2.js";
|
|
13
|
-
import { Button as
|
|
13
|
+
import { Button as W } from "./ui/Button.js";
|
|
14
14
|
import { j as q } from "./joinUrl-10po2Jdj.js";
|
|
15
15
|
import { Z as ss } from "./invariant-Caa8-XvF.js";
|
|
16
16
|
import { VisuallyHidden as ns } from "@radix-ui/react-visually-hidden";
|
|
17
17
|
import * as y from "react";
|
|
18
|
-
import { Fragment as O, useRef as
|
|
18
|
+
import { Fragment as O, useRef as G, useEffect as re, useState as I, useCallback as as, useTransition as rs } from "react";
|
|
19
19
|
import { D as ke, a as Oe, b as Ae, d as gt, e as ft, f as os } from "./Dialog-sbgekbjb.js";
|
|
20
|
-
import { S as Ne, a as we, b as Ce, c as Se, e as
|
|
20
|
+
import { S as Ne, a as we, b as Ce, c as Se, e as U, u as is } from "./Select-FAYHOYTy.js";
|
|
21
21
|
import { b as Le, u as qe, C as A, a as ls, F as ds } from "./index.esm--gIChbWs.js";
|
|
22
22
|
import { c as yt } from "./index-CPNSgwSb.js";
|
|
23
|
-
import { c as
|
|
24
|
-
import { Tabs as jt, TabsList as vt, TabsTrigger as
|
|
23
|
+
import { c as p } from "./cn-qaFjX9_3.js";
|
|
24
|
+
import { Tabs as jt, TabsList as vt, TabsTrigger as z, TabsContent as H } from "./ui/Tabs.js";
|
|
25
25
|
import { u as cs, o as ms } from "./objectEntries-BS7aAgOm.js";
|
|
26
26
|
import { z as us } from "./index-DwT-v3zK.js";
|
|
27
27
|
import { B as L, S as ps } from "./Spinner-1KrEmx1V.js";
|
|
28
|
-
import * as
|
|
28
|
+
import * as b from "@radix-ui/react-dropdown-menu";
|
|
29
29
|
import * as Te from "@radix-ui/react-checkbox";
|
|
30
|
-
import * as
|
|
30
|
+
import * as oe from "@radix-ui/react-popover";
|
|
31
31
|
import { PopoverAnchor as hs } from "@radix-ui/react-popover";
|
|
32
32
|
import { T as xs } from "./index-gQD2h1wX.js";
|
|
33
|
-
import { g as gs, h as fs, C as ys, b as js, f as vs } from "./Callout-
|
|
33
|
+
import { g as gs, h as fs, C as ys, b as js, f as vs } from "./Callout-B2vsR09t.js";
|
|
34
34
|
import { Input as De } from "./ui/Input.js";
|
|
35
35
|
import { Slot as bs } from "@radix-ui/react-slot";
|
|
36
36
|
import * as bt from "@radix-ui/react-label";
|
|
37
|
-
import * as
|
|
37
|
+
import * as Z from "@radix-ui/react-radio-group";
|
|
38
38
|
import { Callout as Ns } from "./ui/Callout.js";
|
|
39
39
|
import { Card as Nt, CardHeader as ws, CardTitle as Cs, CardContent as Ss } from "./ui/Card.js";
|
|
40
40
|
import { Collapsible as rt, CollapsibleTrigger as ot, CollapsibleContent as it } from "./ui/Collapsible.js";
|
|
@@ -49,16 +49,16 @@ const Ps = (t) => {
|
|
|
49
49
|
developerHint: "Check your configuration value `apis.type` and `apis.input` in the Zudoku config."
|
|
50
50
|
});
|
|
51
51
|
};
|
|
52
|
-
var
|
|
52
|
+
var de, ce;
|
|
53
53
|
class Is {
|
|
54
54
|
constructor(s) {
|
|
55
|
-
ge(this,
|
|
55
|
+
ge(this, de, async () => (fe || (fe = import("./createServer-BNBGpbLa.js").then(
|
|
56
56
|
(s) => s.createServer(this.config)
|
|
57
57
|
)), fe));
|
|
58
|
-
ge(this,
|
|
58
|
+
ge(this, ce, async (s) => this.config.server ? fetch(this.config.server, s) : (await xe(this, de).call(this)).fetch("http://localhost/graphql", s));
|
|
59
59
|
he(this, "fetch", async (s, ...[n]) => {
|
|
60
60
|
var l;
|
|
61
|
-
const a = (l = s.match(/query (\w+)/)) == null ? void 0 : l[1], r = await xe(this,
|
|
61
|
+
const a = (l = s.match(/query (\w+)/)) == null ? void 0 : l[1], r = await xe(this, ce).call(this, {
|
|
62
62
|
method: "POST",
|
|
63
63
|
body: JSON.stringify({ query: s, variables: n, operationName: a }),
|
|
64
64
|
headers: { "Content-Type": "application/json" }
|
|
@@ -71,8 +71,8 @@ class Is {
|
|
|
71
71
|
this.config = s;
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
|
|
75
|
-
class
|
|
74
|
+
de = new WeakMap(), ce = new WeakMap();
|
|
75
|
+
class J extends String {
|
|
76
76
|
constructor(n, a) {
|
|
77
77
|
super(n);
|
|
78
78
|
he(this, "__apiType");
|
|
@@ -82,7 +82,7 @@ class G extends String {
|
|
|
82
82
|
return this.value;
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
const Rs = new
|
|
85
|
+
const Rs = new J(
|
|
86
86
|
`
|
|
87
87
|
fragment OperationsFragment on OperationItem {
|
|
88
88
|
slug
|
|
@@ -93,6 +93,7 @@ const Rs = new G(
|
|
|
93
93
|
contentTypes
|
|
94
94
|
path
|
|
95
95
|
deprecated
|
|
96
|
+
extensions
|
|
96
97
|
parameters {
|
|
97
98
|
name
|
|
98
99
|
in
|
|
@@ -148,7 +149,7 @@ const Rs = new G(
|
|
|
148
149
|
}
|
|
149
150
|
`,
|
|
150
151
|
{ fragmentName: "OperationsFragment" }
|
|
151
|
-
), ks = new
|
|
152
|
+
), ks = new J(`
|
|
152
153
|
query ServersQuery($input: JSON!, $type: SchemaType!) {
|
|
153
154
|
schema(input: $input, type: $type) {
|
|
154
155
|
url
|
|
@@ -157,7 +158,7 @@ const Rs = new G(
|
|
|
157
158
|
}
|
|
158
159
|
}
|
|
159
160
|
}
|
|
160
|
-
`), Os = new
|
|
161
|
+
`), Os = new J(`
|
|
161
162
|
query AllOperations($input: JSON!, $type: SchemaType!, $tag: String, $untagged: Boolean) {
|
|
162
163
|
schema(input: $input, type: $type) {
|
|
163
164
|
servers {
|
|
@@ -187,6 +188,7 @@ const Rs = new G(
|
|
|
187
188
|
contentTypes
|
|
188
189
|
path
|
|
189
190
|
deprecated
|
|
191
|
+
extensions
|
|
190
192
|
parameters {
|
|
191
193
|
name
|
|
192
194
|
in
|
|
@@ -239,7 +241,7 @@ const Rs = new G(
|
|
|
239
241
|
schema
|
|
240
242
|
}
|
|
241
243
|
}
|
|
242
|
-
}`), As = new
|
|
244
|
+
}`), As = new J(`
|
|
243
245
|
query getServerQuery($input: JSON!, $type: SchemaType!) {
|
|
244
246
|
schema(input: $input, type: $type) {
|
|
245
247
|
url
|
|
@@ -248,7 +250,7 @@ const Rs = new G(
|
|
|
248
250
|
}
|
|
249
251
|
}
|
|
250
252
|
}
|
|
251
|
-
`), Ls = new
|
|
253
|
+
`), Ls = new J(`
|
|
252
254
|
query GetCategories($input: JSON!, $type: SchemaType!) {
|
|
253
255
|
schema(input: $input, type: $type) {
|
|
254
256
|
url
|
|
@@ -257,7 +259,7 @@ const Rs = new G(
|
|
|
257
259
|
}
|
|
258
260
|
}
|
|
259
261
|
}
|
|
260
|
-
`), qs = new
|
|
262
|
+
`), qs = new J(`
|
|
261
263
|
query GetOperations($input: JSON!, $type: SchemaType!, $tag: String) {
|
|
262
264
|
schema(input: $input, type: $type) {
|
|
263
265
|
operations(tag: $tag) {
|
|
@@ -283,7 +285,7 @@ const Rs = new G(
|
|
|
283
285
|
}
|
|
284
286
|
`), Ds = {
|
|
285
287
|
"\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": ks,
|
|
286
|
-
"\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n deprecated\n parameters {\n name\n in\n description\n required\n schema\n style\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n examples {\n name\n description\n externalValue\n value\n summary\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n examples {\n name\n description\n externalValue\n value\n summary\n }\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n": Rs,
|
|
288
|
+
"\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n deprecated\n extensions\n parameters {\n name\n in\n description\n required\n schema\n style\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n examples {\n name\n description\n externalValue\n value\n summary\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n examples {\n name\n description\n externalValue\n value\n summary\n }\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n": Rs,
|
|
287
289
|
"\n query AllOperations(\n $input: JSON!\n $type: SchemaType!\n $tag: String\n $untagged: Boolean\n ) {\n schema(input: $input, type: $type) {\n servers {\n url\n }\n description\n summary\n title\n url\n version\n tags(name: $tag) {\n name\n description\n }\n operations(tag: $tag, untagged: $untagged) {\n slug\n ...OperationsFragment\n }\n }\n }\n": Os,
|
|
288
290
|
"\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": As,
|
|
289
291
|
"\n query GetCategories($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n tags {\n name\n }\n }\n }\n": Ls,
|
|
@@ -310,7 +312,7 @@ const Es = yt(
|
|
|
310
312
|
{
|
|
311
313
|
ref: a,
|
|
312
314
|
role: "alert",
|
|
313
|
-
className:
|
|
315
|
+
className: p(Es({ variant: s }), t),
|
|
314
316
|
...n
|
|
315
317
|
}
|
|
316
318
|
));
|
|
@@ -319,7 +321,7 @@ const Pe = y.forwardRef(({ className: t, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
|
319
321
|
"h5",
|
|
320
322
|
{
|
|
321
323
|
ref: n,
|
|
322
|
-
className:
|
|
324
|
+
className: p("mb-1 font-medium leading-none tracking-tight", t),
|
|
323
325
|
...s
|
|
324
326
|
}
|
|
325
327
|
));
|
|
@@ -328,7 +330,7 @@ const Ie = y.forwardRef(({ className: t, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
|
328
330
|
"div",
|
|
329
331
|
{
|
|
330
332
|
ref: n,
|
|
331
|
-
className:
|
|
333
|
+
className: p("text-sm [&_p]:leading-relaxed", t),
|
|
332
334
|
...s
|
|
333
335
|
}
|
|
334
336
|
));
|
|
@@ -339,22 +341,22 @@ const Vs = ({
|
|
|
339
341
|
}) => {
|
|
340
342
|
let n = 0;
|
|
341
343
|
return t.split("/").map((a, r, i) => {
|
|
342
|
-
const l = Array.from(a.matchAll(/{([^}]+)}/g)),
|
|
344
|
+
const l = Array.from(a.matchAll(/{([^}]+)}/g)), m = [];
|
|
343
345
|
let d = 0;
|
|
344
|
-
return l.forEach((
|
|
345
|
-
const [
|
|
346
|
+
return l.forEach((c) => {
|
|
347
|
+
const [g, w] = c;
|
|
346
348
|
if (!w) return;
|
|
347
|
-
const
|
|
348
|
-
|
|
349
|
-
/* @__PURE__ */ e.jsx(O, { children: a.slice(d,
|
|
350
|
-
),
|
|
351
|
-
/* @__PURE__ */ e.jsx(O, { children: s({ name: w, originalValue:
|
|
352
|
-
), d =
|
|
353
|
-
}), d < a.length &&
|
|
349
|
+
const v = c.index;
|
|
350
|
+
v > d && m.push(
|
|
351
|
+
/* @__PURE__ */ e.jsx(O, { children: a.slice(d, v) }, `text-${d}-${v}`)
|
|
352
|
+
), m.push(
|
|
353
|
+
/* @__PURE__ */ e.jsx(O, { children: s({ name: w, originalValue: g, index: n++ }) }, `param-${w}`)
|
|
354
|
+
), d = v + g.length;
|
|
355
|
+
}), d < a.length && m.push(
|
|
354
356
|
/* @__PURE__ */ e.jsx(O, { children: a.slice(d) }, `text-${d}-${a.length}`)
|
|
355
357
|
), // eslint-disable-next-line react/no-array-index-key
|
|
356
358
|
/* @__PURE__ */ e.jsxs(O, { children: [
|
|
357
|
-
|
|
359
|
+
m,
|
|
358
360
|
r < i.length - 1 && "/",
|
|
359
361
|
/* @__PURE__ */ e.jsx("wbr", {})
|
|
360
362
|
] }, `${a}-${r}`);
|
|
@@ -363,7 +365,7 @@ const Vs = ({
|
|
|
363
365
|
({ className: t, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
364
366
|
"textarea",
|
|
365
367
|
{
|
|
366
|
-
className:
|
|
368
|
+
className: p(
|
|
367
369
|
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
368
370
|
t
|
|
369
371
|
),
|
|
@@ -398,26 +400,26 @@ const ye = (t) => Math.abs(
|
|
|
398
400
|
children: r,
|
|
399
401
|
onClick: i
|
|
400
402
|
}) => {
|
|
401
|
-
const l =
|
|
402
|
-
return
|
|
403
|
-
if (!
|
|
404
|
-
const
|
|
405
|
-
document.querySelectorAll(`[${ve}="${
|
|
406
|
-
|
|
403
|
+
const l = G(null), m = n == null ? void 0 : n.replace(/[{}]/g, ""), d = t.replace(/[{}]/g, ""), { text: c, background: g } = Fs(d), w = `hsl(${c} / 100%)`, v = `hsl(${g} / 10%)`, h = `hsl(${g} / 50%)`;
|
|
404
|
+
return re(() => {
|
|
405
|
+
if (!m || !l.current) return;
|
|
406
|
+
const j = () => {
|
|
407
|
+
document.querySelectorAll(`[${ve}="${m}"]`).forEach((f) => {
|
|
408
|
+
f instanceof HTMLElement && (f.dataset.active = "true");
|
|
407
409
|
});
|
|
408
|
-
},
|
|
409
|
-
document.querySelectorAll(`[${ve}="${
|
|
410
|
-
|
|
410
|
+
}, u = () => {
|
|
411
|
+
document.querySelectorAll(`[${ve}="${m}"]`).forEach((f) => {
|
|
412
|
+
f instanceof HTMLElement && (f.dataset.active = "false");
|
|
411
413
|
});
|
|
412
414
|
}, x = l.current;
|
|
413
|
-
return x.addEventListener("mouseenter",
|
|
414
|
-
x.removeEventListener("mouseenter",
|
|
415
|
+
return x.addEventListener("mouseenter", j), x.addEventListener("mouseleave", u), () => {
|
|
416
|
+
x.removeEventListener("mouseenter", j), x.removeEventListener("mouseleave", u);
|
|
415
417
|
};
|
|
416
|
-
}, [
|
|
418
|
+
}, [m]), /* @__PURE__ */ e.jsx(
|
|
417
419
|
"span",
|
|
418
420
|
{
|
|
419
|
-
[ve]:
|
|
420
|
-
className:
|
|
421
|
+
[ve]: m,
|
|
422
|
+
className: p(
|
|
421
423
|
// This may not contain (inline-)flex or (inline-)block otherwise it breaks the browser's full text search
|
|
422
424
|
"relative rounded transition-all duration-100 rounded-lg",
|
|
423
425
|
"border border-[--border-color] p-0.5 text-[--param-color] bg-[--background-color]",
|
|
@@ -431,7 +433,7 @@ const ye = (t) => Math.abs(
|
|
|
431
433
|
style: {
|
|
432
434
|
"--param-color": w,
|
|
433
435
|
"--border-color": h,
|
|
434
|
-
"--background-color":
|
|
436
|
+
"--background-color": v
|
|
435
437
|
},
|
|
436
438
|
children: r ?? t
|
|
437
439
|
}
|
|
@@ -440,7 +442,7 @@ const ye = (t) => Math.abs(
|
|
|
440
442
|
const a = s.replace(/(:\w+|\{\w+})/g, (i) => {
|
|
441
443
|
var d;
|
|
442
444
|
const l = i.replace(/[:{}]/g, "");
|
|
443
|
-
return ((d = n.pathParams.find((
|
|
445
|
+
return ((d = n.pathParams.find((c) => c.name === l)) == null ? void 0 : d.value) ?? i;
|
|
444
446
|
}), r = new URL(
|
|
445
447
|
a.replace(/^\//, ""),
|
|
446
448
|
t.endsWith("/") ? t : `${t}/`
|
|
@@ -448,11 +450,11 @@ const ye = (t) => Math.abs(
|
|
|
448
450
|
return n.queryParams.filter((i) => i.active).forEach((i) => {
|
|
449
451
|
r.searchParams.set(i.name, i.value);
|
|
450
452
|
}), r;
|
|
451
|
-
}, Tt =
|
|
452
|
-
|
|
453
|
+
}, Tt = b.Root, $t = b.Trigger, Hs = b.Group, Ms = y.forwardRef(({ className: t, inset: s, children: n, ...a }, r) => /* @__PURE__ */ e.jsxs(
|
|
454
|
+
b.SubTrigger,
|
|
453
455
|
{
|
|
454
456
|
ref: r,
|
|
455
|
-
className:
|
|
457
|
+
className: p(
|
|
456
458
|
"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",
|
|
457
459
|
s && "pl-8",
|
|
458
460
|
t
|
|
@@ -460,29 +462,29 @@ const ye = (t) => Math.abs(
|
|
|
460
462
|
...a,
|
|
461
463
|
children: [
|
|
462
464
|
n,
|
|
463
|
-
/* @__PURE__ */ e.jsx(
|
|
465
|
+
/* @__PURE__ */ e.jsx(Q, { className: "ml-auto h-4 w-4" })
|
|
464
466
|
]
|
|
465
467
|
}
|
|
466
468
|
));
|
|
467
|
-
Ms.displayName =
|
|
469
|
+
Ms.displayName = b.SubTrigger.displayName;
|
|
468
470
|
const Bs = y.forwardRef(({ className: t, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
469
|
-
|
|
471
|
+
b.SubContent,
|
|
470
472
|
{
|
|
471
473
|
ref: n,
|
|
472
|
-
className:
|
|
474
|
+
className: p(
|
|
473
475
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
474
476
|
t
|
|
475
477
|
),
|
|
476
478
|
...s
|
|
477
479
|
}
|
|
478
480
|
));
|
|
479
|
-
Bs.displayName =
|
|
480
|
-
const Ve = y.forwardRef(({ className: t, sideOffset: s = 4, ...n }, a) => /* @__PURE__ */ e.jsx(
|
|
481
|
-
|
|
481
|
+
Bs.displayName = b.SubContent.displayName;
|
|
482
|
+
const Ve = y.forwardRef(({ className: t, sideOffset: s = 4, ...n }, a) => /* @__PURE__ */ e.jsx(b.Portal, { children: /* @__PURE__ */ e.jsx(
|
|
483
|
+
b.Content,
|
|
482
484
|
{
|
|
483
485
|
ref: a,
|
|
484
486
|
sideOffset: s,
|
|
485
|
-
className:
|
|
487
|
+
className: p(
|
|
486
488
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
487
489
|
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
488
490
|
t
|
|
@@ -490,12 +492,12 @@ const Ve = y.forwardRef(({ className: t, sideOffset: s = 4, ...n }, a) => /* @__
|
|
|
490
492
|
...n
|
|
491
493
|
}
|
|
492
494
|
) }));
|
|
493
|
-
Ve.displayName =
|
|
495
|
+
Ve.displayName = b.Content.displayName;
|
|
494
496
|
const Fe = y.forwardRef(({ className: t, inset: s, ...n }, a) => /* @__PURE__ */ e.jsx(
|
|
495
|
-
|
|
497
|
+
b.Item,
|
|
496
498
|
{
|
|
497
499
|
ref: a,
|
|
498
|
-
className:
|
|
500
|
+
className: p(
|
|
499
501
|
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
500
502
|
s && "pl-8",
|
|
501
503
|
t
|
|
@@ -503,45 +505,45 @@ const Fe = y.forwardRef(({ className: t, inset: s, ...n }, a) => /* @__PURE__ */
|
|
|
503
505
|
...n
|
|
504
506
|
}
|
|
505
507
|
));
|
|
506
|
-
Fe.displayName =
|
|
508
|
+
Fe.displayName = b.Item.displayName;
|
|
507
509
|
const Gs = y.forwardRef(({ className: t, children: s, checked: n, ...a }, r) => /* @__PURE__ */ e.jsxs(
|
|
508
|
-
|
|
510
|
+
b.CheckboxItem,
|
|
509
511
|
{
|
|
510
512
|
ref: r,
|
|
511
|
-
className:
|
|
513
|
+
className: p(
|
|
512
514
|
"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",
|
|
513
515
|
t
|
|
514
516
|
),
|
|
515
517
|
checked: n,
|
|
516
518
|
...a,
|
|
517
519
|
children: [
|
|
518
|
-
/* @__PURE__ */ e.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e.jsx(
|
|
520
|
+
/* @__PURE__ */ e.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e.jsx(b.ItemIndicator, { children: /* @__PURE__ */ e.jsx(Ht, { className: "h-4 w-4" }) }) }),
|
|
519
521
|
s
|
|
520
522
|
]
|
|
521
523
|
}
|
|
522
524
|
));
|
|
523
|
-
Gs.displayName =
|
|
525
|
+
Gs.displayName = b.CheckboxItem.displayName;
|
|
524
526
|
const Js = y.forwardRef(({ className: t, children: s, ...n }, a) => /* @__PURE__ */ e.jsxs(
|
|
525
|
-
|
|
527
|
+
b.RadioItem,
|
|
526
528
|
{
|
|
527
529
|
ref: a,
|
|
528
|
-
className:
|
|
530
|
+
className: p(
|
|
529
531
|
"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",
|
|
530
532
|
t
|
|
531
533
|
),
|
|
532
534
|
...n,
|
|
533
535
|
children: [
|
|
534
|
-
/* @__PURE__ */ e.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e.jsx(
|
|
536
|
+
/* @__PURE__ */ e.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e.jsx(b.ItemIndicator, { children: /* @__PURE__ */ e.jsx(Mt, { className: "h-4 w-4 fill-current" }) }) }),
|
|
535
537
|
s
|
|
536
538
|
]
|
|
537
539
|
}
|
|
538
540
|
));
|
|
539
|
-
Js.displayName =
|
|
541
|
+
Js.displayName = b.RadioItem.displayName;
|
|
540
542
|
const Pt = y.forwardRef(({ className: t, inset: s, ...n }, a) => /* @__PURE__ */ e.jsx(
|
|
541
|
-
|
|
543
|
+
b.Label,
|
|
542
544
|
{
|
|
543
545
|
ref: a,
|
|
544
|
-
className:
|
|
546
|
+
className: p(
|
|
545
547
|
"px-2 py-1.5 text-sm font-semibold",
|
|
546
548
|
s && "pl-8",
|
|
547
549
|
t
|
|
@@ -549,16 +551,16 @@ const Pt = y.forwardRef(({ className: t, inset: s, ...n }, a) => /* @__PURE__ */
|
|
|
549
551
|
...n
|
|
550
552
|
}
|
|
551
553
|
));
|
|
552
|
-
Pt.displayName =
|
|
554
|
+
Pt.displayName = b.Label.displayName;
|
|
553
555
|
const It = y.forwardRef(({ className: t, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
554
|
-
|
|
556
|
+
b.Separator,
|
|
555
557
|
{
|
|
556
558
|
ref: n,
|
|
557
|
-
className:
|
|
559
|
+
className: p("-mx-1 my-1 h-px bg-muted", t),
|
|
558
560
|
...s
|
|
559
561
|
}
|
|
560
562
|
));
|
|
561
|
-
It.displayName =
|
|
563
|
+
It.displayName = b.Separator.displayName;
|
|
562
564
|
const Us = ({
|
|
563
565
|
examples: t,
|
|
564
566
|
onSelect: s
|
|
@@ -586,23 +588,23 @@ const Us = ({
|
|
|
586
588
|
)) })
|
|
587
589
|
] }, n.mediaType);
|
|
588
590
|
}) })
|
|
589
|
-
] }),
|
|
591
|
+
] }), X = y.forwardRef(({ className: t, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
590
592
|
"div",
|
|
591
593
|
{
|
|
592
594
|
ref: n,
|
|
593
|
-
className:
|
|
595
|
+
className: p(
|
|
594
596
|
"rounded-xl border bg-card text-card-foreground shadow-sm",
|
|
595
597
|
t
|
|
596
598
|
),
|
|
597
599
|
...s
|
|
598
600
|
}
|
|
599
601
|
));
|
|
600
|
-
|
|
602
|
+
X.displayName = "Card";
|
|
601
603
|
const _s = y.forwardRef(({ className: t, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
602
604
|
"div",
|
|
603
605
|
{
|
|
604
606
|
ref: n,
|
|
605
|
-
className:
|
|
607
|
+
className: p("flex flex-col space-y-1.5 p-6", t),
|
|
606
608
|
...s
|
|
607
609
|
}
|
|
608
610
|
));
|
|
@@ -611,7 +613,7 @@ const Qs = y.forwardRef(({ className: t, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
|
611
613
|
"h3",
|
|
612
614
|
{
|
|
613
615
|
ref: n,
|
|
614
|
-
className:
|
|
616
|
+
className: p("font-semibold leading-none tracking-tight", t),
|
|
615
617
|
...s
|
|
616
618
|
}
|
|
617
619
|
));
|
|
@@ -620,27 +622,27 @@ const Ws = y.forwardRef(({ className: t, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
|
620
622
|
"p",
|
|
621
623
|
{
|
|
622
624
|
ref: n,
|
|
623
|
-
className:
|
|
625
|
+
className: p("text-sm text-muted-foreground", t),
|
|
624
626
|
...s
|
|
625
627
|
}
|
|
626
628
|
));
|
|
627
629
|
Ws.displayName = "CardDescription";
|
|
628
|
-
const Zs = y.forwardRef(({ className: t, ...s }, n) => /* @__PURE__ */ e.jsx("div", { ref: n, className:
|
|
630
|
+
const Zs = y.forwardRef(({ className: t, ...s }, n) => /* @__PURE__ */ e.jsx("div", { ref: n, className: p("p-6 pt-0", t), ...s }));
|
|
629
631
|
Zs.displayName = "CardContent";
|
|
630
632
|
const Xs = y.forwardRef(({ className: t, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
631
633
|
"div",
|
|
632
634
|
{
|
|
633
635
|
ref: n,
|
|
634
|
-
className:
|
|
636
|
+
className: p("flex items-center p-6 pt-0", t),
|
|
635
637
|
...s
|
|
636
638
|
}
|
|
637
639
|
));
|
|
638
640
|
Xs.displayName = "CardFooter";
|
|
639
|
-
const
|
|
641
|
+
const me = y.forwardRef(({ className: t, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
640
642
|
Te.Root,
|
|
641
643
|
{
|
|
642
644
|
ref: n,
|
|
643
|
-
className:
|
|
645
|
+
className: p(
|
|
644
646
|
"peer h-4 w-4 shrink-0 rounded-[min(6px,var(--radius)-4px)] 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",
|
|
645
647
|
"border border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary",
|
|
646
648
|
t
|
|
@@ -649,27 +651,27 @@ const ce = y.forwardRef(({ className: t, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
|
649
651
|
children: /* @__PURE__ */ e.jsx(
|
|
650
652
|
Te.Indicator,
|
|
651
653
|
{
|
|
652
|
-
className:
|
|
654
|
+
className: p("flex items-center justify-center text-current"),
|
|
653
655
|
children: /* @__PURE__ */ e.jsx(Bt, { className: "h-4 w-4" })
|
|
654
656
|
}
|
|
655
657
|
)
|
|
656
658
|
}
|
|
657
659
|
));
|
|
658
|
-
|
|
659
|
-
const Ks =
|
|
660
|
-
|
|
660
|
+
me.displayName = Te.Root.displayName;
|
|
661
|
+
const Ks = oe.Root, Rt = y.forwardRef(({ className: t, align: s = "center", sideOffset: n = 4, ...a }, r) => /* @__PURE__ */ e.jsx(oe.Portal, { children: /* @__PURE__ */ e.jsx(
|
|
662
|
+
oe.Content,
|
|
661
663
|
{
|
|
662
664
|
ref: r,
|
|
663
665
|
align: s,
|
|
664
666
|
sideOffset: n,
|
|
665
|
-
className:
|
|
667
|
+
className: p(
|
|
666
668
|
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
667
669
|
t
|
|
668
670
|
),
|
|
669
671
|
...a
|
|
670
672
|
}
|
|
671
673
|
) }));
|
|
672
|
-
Rt.displayName =
|
|
674
|
+
Rt.displayName = oe.Content.displayName;
|
|
673
675
|
const Ys = ({
|
|
674
676
|
value: t,
|
|
675
677
|
options: s,
|
|
@@ -679,24 +681,24 @@ const Ys = ({
|
|
|
679
681
|
onEnterPress: i,
|
|
680
682
|
ref: l
|
|
681
683
|
}) => {
|
|
682
|
-
const [
|
|
683
|
-
return /* @__PURE__ */ e.jsxs(Ks, { open:
|
|
684
|
+
const [m, d] = I(!1), [c, g] = I(!1), w = xs((h) => h.filtered.count), v = G(null);
|
|
685
|
+
return /* @__PURE__ */ e.jsxs(Ks, { open: m, children: [
|
|
684
686
|
/* @__PURE__ */ e.jsx(hs, { children: /* @__PURE__ */ e.jsx(
|
|
685
687
|
fs,
|
|
686
688
|
{
|
|
687
689
|
ref: (h) => {
|
|
688
|
-
|
|
690
|
+
v.current = h, typeof l == "function" ? l(h) : l && (l.current = h);
|
|
689
691
|
},
|
|
690
692
|
value: t,
|
|
691
693
|
placeholder: r,
|
|
692
|
-
className:
|
|
694
|
+
className: p("h-9 bg-transparent", a),
|
|
693
695
|
onFocus: () => d(!0),
|
|
694
696
|
onBlur: () => {
|
|
695
|
-
|
|
697
|
+
c || d(!1);
|
|
696
698
|
},
|
|
697
699
|
onKeyDown: (h) => {
|
|
698
|
-
var
|
|
699
|
-
h.key === "Enter" && (d(!1), (
|
|
700
|
+
var j;
|
|
701
|
+
h.key === "Enter" && (d(!1), (j = v.current) == null || j.blur(), i == null || i(h));
|
|
700
702
|
},
|
|
701
703
|
onValueChange: (h) => n(h)
|
|
702
704
|
}
|
|
@@ -704,10 +706,10 @@ const Ys = ({
|
|
|
704
706
|
/* @__PURE__ */ e.jsx(
|
|
705
707
|
Rt,
|
|
706
708
|
{
|
|
707
|
-
onMouseEnter: () =>
|
|
708
|
-
onMouseLeave: () =>
|
|
709
|
+
onMouseEnter: () => g(!0),
|
|
710
|
+
onMouseLeave: () => g(!1),
|
|
709
711
|
onOpenAutoFocus: (h) => h.preventDefault(),
|
|
710
|
-
className:
|
|
712
|
+
className: p("p-0 w-[--radix-popover-trigger-width]", {
|
|
711
713
|
"border-0": w === 0
|
|
712
714
|
}),
|
|
713
715
|
align: "start",
|
|
@@ -722,8 +724,8 @@ const Ys = ({
|
|
|
722
724
|
js,
|
|
723
725
|
{
|
|
724
726
|
value: h,
|
|
725
|
-
onSelect: (
|
|
726
|
-
n(
|
|
727
|
+
onSelect: (j) => {
|
|
728
|
+
n(j), d(!1);
|
|
727
729
|
},
|
|
728
730
|
className: "cursor-pointer",
|
|
729
731
|
children: h
|
|
@@ -733,13 +735,13 @@ const Ys = ({
|
|
|
733
735
|
}
|
|
734
736
|
)
|
|
735
737
|
] });
|
|
736
|
-
},
|
|
738
|
+
}, ie = ({ shouldFilter: t, ...s }) => /* @__PURE__ */ e.jsx(gs, { className: "bg-transparent", shouldFilter: t, children: /* @__PURE__ */ e.jsx(Ys, { ...s }) }), ze = (t, s) => {
|
|
737
739
|
const n = y.forwardRef(({ className: a, asChild: r, ...i }, l) => {
|
|
738
|
-
const
|
|
739
|
-
return y.createElement(
|
|
740
|
+
const m = r ? bs : t;
|
|
741
|
+
return y.createElement(m, {
|
|
740
742
|
...i,
|
|
741
743
|
ref: l,
|
|
742
|
-
className: typeof s == "function" ? s({ className: a }) :
|
|
744
|
+
className: typeof s == "function" ? s({ className: a }) : p(s, a)
|
|
743
745
|
});
|
|
744
746
|
});
|
|
745
747
|
return n.displayName = `VariantComponent(${t})`, n;
|
|
@@ -783,25 +785,25 @@ const Ys = ({
|
|
|
783
785
|
const { fields: n, append: a, remove: r } = Le({
|
|
784
786
|
control: t,
|
|
785
787
|
name: "headers"
|
|
786
|
-
}), { setValue: i, watch: l } = qe(),
|
|
788
|
+
}), { setValue: i, watch: l } = qe(), m = G([]), d = G([]), c = l("headers"), g = as(() => {
|
|
787
789
|
a({ name: "", value: "", active: !1 });
|
|
788
790
|
}, [a]);
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
}, [
|
|
792
|
-
const w = (
|
|
793
|
-
var
|
|
794
|
-
(
|
|
795
|
-
},
|
|
796
|
-
|
|
797
|
-
var
|
|
798
|
-
return (
|
|
791
|
+
re(() => {
|
|
792
|
+
c.length === 0 && g();
|
|
793
|
+
}, [c, g]);
|
|
794
|
+
const w = (j) => {
|
|
795
|
+
var u;
|
|
796
|
+
(u = m.current[j]) == null || u.focus();
|
|
797
|
+
}, v = (j) => {
|
|
798
|
+
g(), requestAnimationFrame(() => {
|
|
799
|
+
var u;
|
|
800
|
+
return (u = d.current[j + 1]) == null ? void 0 : u.focus();
|
|
799
801
|
});
|
|
800
|
-
}, h = s.filter((
|
|
802
|
+
}, h = s.filter((j) => !c.some((u) => u.name === j.name)).map(({ name: j }) => j);
|
|
801
803
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
802
|
-
/* @__PURE__ */ e.jsx(
|
|
804
|
+
/* @__PURE__ */ e.jsx(X, { className: "overflow-hidden", children: /* @__PURE__ */ e.jsx(He, { children: n.map((j, u) => {
|
|
803
805
|
const x = s.find(
|
|
804
|
-
(
|
|
806
|
+
(f) => f.name === l(`headers.${u}.name`)
|
|
805
807
|
);
|
|
806
808
|
return /* @__PURE__ */ e.jsxs(Me, { children: [
|
|
807
809
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 ", children: [
|
|
@@ -809,14 +811,14 @@ const Ys = ({
|
|
|
809
811
|
A,
|
|
810
812
|
{
|
|
811
813
|
control: t,
|
|
812
|
-
name: `headers.${
|
|
813
|
-
render: ({ field:
|
|
814
|
-
|
|
814
|
+
name: `headers.${u}.active`,
|
|
815
|
+
render: ({ field: f }) => /* @__PURE__ */ e.jsx(
|
|
816
|
+
me,
|
|
815
817
|
{
|
|
816
|
-
id: `headers.${
|
|
817
|
-
checked:
|
|
818
|
-
onCheckedChange: (
|
|
819
|
-
|
|
818
|
+
id: `headers.${u}.active`,
|
|
819
|
+
checked: f.value,
|
|
820
|
+
onCheckedChange: ($) => {
|
|
821
|
+
f.onChange($);
|
|
820
822
|
}
|
|
821
823
|
}
|
|
822
824
|
)
|
|
@@ -826,20 +828,20 @@ const Ys = ({
|
|
|
826
828
|
A,
|
|
827
829
|
{
|
|
828
830
|
control: t,
|
|
829
|
-
name: `headers.${
|
|
830
|
-
render: ({ field:
|
|
831
|
-
|
|
831
|
+
name: `headers.${u}.name`,
|
|
832
|
+
render: ({ field: f }) => /* @__PURE__ */ e.jsx(
|
|
833
|
+
ie,
|
|
832
834
|
{
|
|
833
|
-
...
|
|
835
|
+
...f,
|
|
834
836
|
placeholder: "Name",
|
|
835
837
|
className: "border-0 shadow-none bg-transparent text-xs font-mono",
|
|
836
838
|
options: [...h, ...en],
|
|
837
|
-
onEnterPress: () => w(
|
|
838
|
-
onChange: (
|
|
839
|
-
|
|
839
|
+
onEnterPress: () => w(u),
|
|
840
|
+
onChange: ($) => {
|
|
841
|
+
f.onChange($), i(`headers.${u}.active`, !0);
|
|
840
842
|
},
|
|
841
|
-
ref: (
|
|
842
|
-
d.current[
|
|
843
|
+
ref: ($) => {
|
|
844
|
+
d.current[u] = $;
|
|
843
845
|
}
|
|
844
846
|
}
|
|
845
847
|
)
|
|
@@ -851,15 +853,15 @@ const Ys = ({
|
|
|
851
853
|
A,
|
|
852
854
|
{
|
|
853
855
|
control: t,
|
|
854
|
-
name: `headers.${
|
|
855
|
-
render: ({ field:
|
|
856
|
-
|
|
856
|
+
name: `headers.${u}.value`,
|
|
857
|
+
render: ({ field: f }) => (x == null ? void 0 : x.enum) && x.enum.length > 0 ? /* @__PURE__ */ e.jsx(
|
|
858
|
+
ie,
|
|
857
859
|
{
|
|
858
860
|
shouldFilter: !1,
|
|
859
|
-
value:
|
|
861
|
+
value: f.value,
|
|
860
862
|
options: x.enum ?? [],
|
|
861
|
-
onChange: (
|
|
862
|
-
|
|
863
|
+
onChange: (T) => {
|
|
864
|
+
f.onChange(T), i(`headers.${u}.active`, !0);
|
|
863
865
|
},
|
|
864
866
|
className: "font-mono text-xs border-0"
|
|
865
867
|
}
|
|
@@ -868,12 +870,12 @@ const Ys = ({
|
|
|
868
870
|
{
|
|
869
871
|
placeholder: "Value",
|
|
870
872
|
className: "w-full border-0 shadow-none text-xs font-mono focus-visible:ring-0",
|
|
871
|
-
...
|
|
872
|
-
ref: (
|
|
873
|
-
|
|
873
|
+
...f,
|
|
874
|
+
ref: (T) => {
|
|
875
|
+
m.current[u] = T;
|
|
874
876
|
},
|
|
875
|
-
onKeyDown: (
|
|
876
|
-
|
|
877
|
+
onKeyDown: (T) => {
|
|
878
|
+
T.key === "Enter" && T.currentTarget.value.trim() && v(u);
|
|
877
879
|
},
|
|
878
880
|
autoComplete: "off"
|
|
879
881
|
}
|
|
@@ -881,24 +883,24 @@ const Ys = ({
|
|
|
881
883
|
}
|
|
882
884
|
),
|
|
883
885
|
/* @__PURE__ */ e.jsx(
|
|
884
|
-
|
|
886
|
+
W,
|
|
885
887
|
{
|
|
886
888
|
size: "icon",
|
|
887
889
|
variant: "ghost",
|
|
888
890
|
className: "text-muted-foreground opacity-0 group-hover:opacity-100 rounded-full w-8 h-7",
|
|
889
|
-
onClick: () => r(
|
|
891
|
+
onClick: () => r(u),
|
|
890
892
|
type: "button",
|
|
891
893
|
children: /* @__PURE__ */ e.jsx(Gt, { size: 16 })
|
|
892
894
|
}
|
|
893
895
|
)
|
|
894
896
|
] })
|
|
895
|
-
] },
|
|
897
|
+
] }, j.id);
|
|
896
898
|
}) }) }),
|
|
897
899
|
/* @__PURE__ */ e.jsx("div", { className: "text-end", children: /* @__PURE__ */ e.jsx(
|
|
898
|
-
|
|
900
|
+
W,
|
|
899
901
|
{
|
|
900
902
|
className: "",
|
|
901
|
-
onClick:
|
|
903
|
+
onClick: g,
|
|
902
904
|
type: "button",
|
|
903
905
|
variant: "secondary",
|
|
904
906
|
children: "Add header"
|
|
@@ -907,68 +909,68 @@ const Ys = ({
|
|
|
907
909
|
] });
|
|
908
910
|
}, sn = yt(
|
|
909
911
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
910
|
-
),
|
|
912
|
+
), M = y.forwardRef(({ className: t, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
911
913
|
bt.Root,
|
|
912
914
|
{
|
|
913
915
|
ref: n,
|
|
914
|
-
className:
|
|
916
|
+
className: p(sn(), t),
|
|
915
917
|
...s
|
|
916
918
|
}
|
|
917
919
|
));
|
|
918
|
-
|
|
920
|
+
M.displayName = bt.Root.displayName;
|
|
919
921
|
const Be = y.forwardRef(({ className: t, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
920
|
-
|
|
922
|
+
Z.Root,
|
|
921
923
|
{
|
|
922
|
-
className:
|
|
924
|
+
className: p("grid gap-2", t),
|
|
923
925
|
...s,
|
|
924
926
|
ref: n
|
|
925
927
|
}
|
|
926
928
|
));
|
|
927
|
-
Be.displayName =
|
|
928
|
-
const
|
|
929
|
-
|
|
929
|
+
Be.displayName = Z.Root.displayName;
|
|
930
|
+
const le = y.forwardRef(({ className: t, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
931
|
+
Z.Item,
|
|
930
932
|
{
|
|
931
933
|
ref: n,
|
|
932
|
-
className:
|
|
934
|
+
className: p(
|
|
933
935
|
"aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
934
936
|
t
|
|
935
937
|
),
|
|
936
938
|
...s,
|
|
937
|
-
children: /* @__PURE__ */ e.jsx(
|
|
939
|
+
children: /* @__PURE__ */ e.jsx(Z.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(Jt, { className: "h-2.5 w-2.5 fill-current text-current" }) })
|
|
938
940
|
}
|
|
939
941
|
));
|
|
940
|
-
|
|
942
|
+
le.displayName = Z.Item.displayName;
|
|
941
943
|
const kt = ({
|
|
942
944
|
identities: t,
|
|
943
945
|
setValue: s,
|
|
944
946
|
value: n
|
|
945
|
-
}) => /* @__PURE__ */ e.jsx(
|
|
947
|
+
}) => /* @__PURE__ */ e.jsx(X, { className: "w-full overflow-hidden", children: /* @__PURE__ */ e.jsxs(
|
|
946
948
|
Be,
|
|
947
949
|
{
|
|
948
950
|
onValueChange: (a) => s(a),
|
|
949
951
|
value: n,
|
|
950
|
-
defaultValue:
|
|
952
|
+
defaultValue: B,
|
|
951
953
|
className: "gap-0",
|
|
952
954
|
disabled: (t == null ? void 0 : t.length) === 0,
|
|
953
955
|
children: [
|
|
954
956
|
/* @__PURE__ */ e.jsxs(
|
|
955
|
-
|
|
957
|
+
M,
|
|
956
958
|
{
|
|
957
959
|
className: "h-12 border-b items-center flex p-4 cursor-pointer hover:bg-accent",
|
|
958
960
|
htmlFor: "none",
|
|
959
961
|
children: [
|
|
960
|
-
/* @__PURE__ */ e.jsx(
|
|
961
|
-
/* @__PURE__ */ e.jsx(
|
|
962
|
+
/* @__PURE__ */ e.jsx(le, { value: B, id: "none", children: "None" }),
|
|
963
|
+
/* @__PURE__ */ e.jsx(M, { htmlFor: "none", className: "ml-2", children: "None" })
|
|
962
964
|
]
|
|
963
965
|
}
|
|
964
966
|
),
|
|
965
967
|
t == null ? void 0 : t.map((a) => /* @__PURE__ */ e.jsxs(
|
|
966
|
-
|
|
968
|
+
M,
|
|
967
969
|
{
|
|
968
970
|
className: "h-12 border-b items-center flex p-4 cursor-pointer hover:bg-accent",
|
|
969
971
|
children: [
|
|
970
|
-
/* @__PURE__ */ e.jsx(
|
|
971
|
-
/* @__PURE__ */ e.jsx(
|
|
972
|
+
/* @__PURE__ */ e.jsx(le, { value: a.id, id: a.id, children: a.label }),
|
|
973
|
+
/* @__PURE__ */ e.jsx(M, { htmlFor: a.id, className: "ml-2", children: a.label })
|
|
972
974
|
]
|
|
973
975
|
},
|
|
974
976
|
a.id
|
|
@@ -981,7 +983,7 @@ const kt = ({
|
|
|
981
983
|
open: n,
|
|
982
984
|
onOpenChange: a
|
|
983
985
|
}) => {
|
|
984
|
-
const [r, i] = I(void 0), [l,
|
|
986
|
+
const [r, i] = I(void 0), [l, m] = I(!1);
|
|
985
987
|
return /* @__PURE__ */ e.jsx(ke, { open: n, onOpenChange: a, children: /* @__PURE__ */ e.jsxs(Oe, { children: [
|
|
986
988
|
/* @__PURE__ */ e.jsx(Ae, { children: "Select an auth identity" }),
|
|
987
989
|
/* @__PURE__ */ e.jsx(gt, { children: "Please select an identity for this request." }),
|
|
@@ -996,16 +998,16 @@ const kt = ({
|
|
|
996
998
|
/* @__PURE__ */ e.jsxs(ft, { className: "flex flex-col gap-2", children: [
|
|
997
999
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
998
1000
|
/* @__PURE__ */ e.jsx(
|
|
999
|
-
|
|
1001
|
+
me,
|
|
1000
1002
|
{
|
|
1001
1003
|
id: "remember",
|
|
1002
1004
|
checked: l,
|
|
1003
|
-
onCheckedChange: (d) =>
|
|
1005
|
+
onCheckedChange: (d) => m(
|
|
1004
1006
|
d === "indeterminate" ? !1 : !!d
|
|
1005
1007
|
)
|
|
1006
1008
|
}
|
|
1007
1009
|
),
|
|
1008
|
-
/* @__PURE__ */ e.jsx(
|
|
1010
|
+
/* @__PURE__ */ e.jsx(M, { htmlFor: "remember", children: "Remember my choice" })
|
|
1009
1011
|
] }),
|
|
1010
1012
|
/* @__PURE__ */ e.jsx(
|
|
1011
1013
|
L,
|
|
@@ -1026,7 +1028,7 @@ const kt = ({
|
|
|
1026
1028
|
}), a = [...n].sort(
|
|
1027
1029
|
(r, i) => s.indexOf(`{${r.name}}`) - s.indexOf(`{${i.name}}`)
|
|
1028
1030
|
);
|
|
1029
|
-
return /* @__PURE__ */ e.jsx(
|
|
1031
|
+
return /* @__PURE__ */ e.jsx(X, { className: "rounded-lg", children: /* @__PURE__ */ e.jsx(He, { children: a.map((r, i) => /* @__PURE__ */ e.jsxs(Me, { children: [
|
|
1030
1032
|
/* @__PURE__ */ e.jsx(
|
|
1031
1033
|
A,
|
|
1032
1034
|
{
|
|
@@ -1070,8 +1072,8 @@ const kt = ({
|
|
|
1070
1072
|
control: t,
|
|
1071
1073
|
name: "queryParams"
|
|
1072
1074
|
}), a = qe(), r = s.map((i) => !!i.isRequired);
|
|
1073
|
-
return /* @__PURE__ */ e.jsx(
|
|
1074
|
-
const
|
|
1075
|
+
return /* @__PURE__ */ e.jsx(X, { className: "rounded-lg", children: /* @__PURE__ */ e.jsx("div", { className: "w-full ", children: /* @__PURE__ */ e.jsx(He, { children: n.map((i, l) => {
|
|
1076
|
+
const m = s.find(
|
|
1075
1077
|
(d) => d.name === a.watch(`queryParams.${l}.name`)
|
|
1076
1078
|
);
|
|
1077
1079
|
return /* @__PURE__ */ e.jsxs(Me, { children: [
|
|
@@ -1082,7 +1084,7 @@ const kt = ({
|
|
|
1082
1084
|
control: t,
|
|
1083
1085
|
name: `queryParams.${l}.active`,
|
|
1084
1086
|
render: ({ field: d }) => /* @__PURE__ */ e.jsx(
|
|
1085
|
-
|
|
1087
|
+
me,
|
|
1086
1088
|
{
|
|
1087
1089
|
id: `queryParams.${l}.active`,
|
|
1088
1090
|
className: "mr-2",
|
|
@@ -1108,12 +1110,12 @@ const kt = ({
|
|
|
1108
1110
|
]
|
|
1109
1111
|
}
|
|
1110
1112
|
) }) : /* @__PURE__ */ e.jsx(
|
|
1111
|
-
|
|
1113
|
+
ie,
|
|
1112
1114
|
{
|
|
1113
1115
|
value: d.value,
|
|
1114
|
-
options: s.map((
|
|
1115
|
-
onChange: (
|
|
1116
|
-
d.onChange(
|
|
1116
|
+
options: s.map((c) => c.name),
|
|
1117
|
+
onChange: (c) => {
|
|
1118
|
+
d.onChange(c);
|
|
1117
1119
|
},
|
|
1118
1120
|
className: "border-0 font-mono text-xs bg-transparent hover:bg-transparent"
|
|
1119
1121
|
}
|
|
@@ -1126,13 +1128,13 @@ const kt = ({
|
|
|
1126
1128
|
A,
|
|
1127
1129
|
{
|
|
1128
1130
|
control: t,
|
|
1129
|
-
render: ({ field: d }) => (
|
|
1130
|
-
|
|
1131
|
+
render: ({ field: d }) => (m == null ? void 0 : m.enum) && m.enum.length > 0 ? /* @__PURE__ */ e.jsx(
|
|
1132
|
+
ie,
|
|
1131
1133
|
{
|
|
1132
1134
|
value: d.value,
|
|
1133
|
-
options:
|
|
1134
|
-
onChange: (
|
|
1135
|
-
d.onChange(
|
|
1135
|
+
options: m.enum ?? [],
|
|
1136
|
+
onChange: (g) => {
|
|
1137
|
+
d.onChange(g), a.setValue(`queryParams.${l}.active`, !0);
|
|
1136
1138
|
},
|
|
1137
1139
|
className: "font-mono text-xs border-0 ring-1 ring-ring"
|
|
1138
1140
|
}
|
|
@@ -1140,8 +1142,8 @@ const kt = ({
|
|
|
1140
1142
|
De,
|
|
1141
1143
|
{
|
|
1142
1144
|
...d,
|
|
1143
|
-
onChange: (
|
|
1144
|
-
d.onChange(
|
|
1145
|
+
onChange: (g) => {
|
|
1146
|
+
d.onChange(g.target.value), g.target.value.length > 0 && a.setValue(`queryParams.${l}.active`, !0);
|
|
1145
1147
|
},
|
|
1146
1148
|
placeholder: "Enter value",
|
|
1147
1149
|
className: "w-full border-0 shadow-none focus-visible:ring-0 text-xs font-mono"
|
|
@@ -1205,7 +1207,7 @@ const kt = ({
|
|
|
1205
1207
|
body: a
|
|
1206
1208
|
}) => /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 font-mono text-xs", children: [
|
|
1207
1209
|
/* @__PURE__ */ e.jsxs("div", { className: "gap-2 p-2 bg-muted rounded-md", children: [
|
|
1208
|
-
/* @__PURE__ */ e.jsx("span", { className:
|
|
1210
|
+
/* @__PURE__ */ e.jsx("span", { className: p(mn(t), "font-semibold"), children: t }),
|
|
1209
1211
|
" ",
|
|
1210
1212
|
/* @__PURE__ */ e.jsx("span", { className: "break-all", children: s }),
|
|
1211
1213
|
" ",
|
|
@@ -1214,7 +1216,7 @@ const kt = ({
|
|
|
1214
1216
|
/* @__PURE__ */ e.jsxs("div", { className: "mx-1.5 flex flex-col gap-3", children: [
|
|
1215
1217
|
/* @__PURE__ */ e.jsxs(rt, { defaultOpen: !0, children: [
|
|
1216
1218
|
/* @__PURE__ */ e.jsxs(ot, { className: "flex items-center gap-2 hover:text-primary group", children: [
|
|
1217
|
-
/* @__PURE__ */ e.jsx(
|
|
1219
|
+
/* @__PURE__ */ e.jsx(Q, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
|
|
1218
1220
|
/* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Headers" })
|
|
1219
1221
|
] }),
|
|
1220
1222
|
/* @__PURE__ */ e.jsx(it, { children: /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-[auto,1fr] gap-x-8 gap-y-1 pl-1.5 pt-2", children: n.map(([r, i]) => /* @__PURE__ */ e.jsxs(O, { children: [
|
|
@@ -1224,13 +1226,13 @@ const kt = ({
|
|
|
1224
1226
|
] }),
|
|
1225
1227
|
/* @__PURE__ */ e.jsxs(rt, { defaultOpen: !0, children: [
|
|
1226
1228
|
/* @__PURE__ */ e.jsxs(ot, { className: "flex items-center gap-2 hover:text-primary group", children: [
|
|
1227
|
-
/* @__PURE__ */ e.jsx(
|
|
1229
|
+
/* @__PURE__ */ e.jsx(Q, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
|
|
1228
1230
|
/* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Body" })
|
|
1229
1231
|
] }),
|
|
1230
1232
|
/* @__PURE__ */ e.jsx(it, { children: /* @__PURE__ */ e.jsx("div", { className: "pl-0 pt-2", children: /* @__PURE__ */ e.jsx(
|
|
1231
1233
|
"div",
|
|
1232
1234
|
{
|
|
1233
|
-
className:
|
|
1235
|
+
className: p(
|
|
1234
1236
|
"whitespace-pre-wrap break-all bg-muted p-2 rounded-md",
|
|
1235
1237
|
!a && "text-muted-foreground"
|
|
1236
1238
|
),
|
|
@@ -1322,36 +1324,36 @@ const xn = {
|
|
|
1322
1324
|
size: r,
|
|
1323
1325
|
url: i
|
|
1324
1326
|
}) => {
|
|
1325
|
-
var
|
|
1326
|
-
const l = fn(s),
|
|
1327
|
-
|
|
1327
|
+
var j;
|
|
1328
|
+
const l = fn(s), m = yn(t), d = m || t, [c, g] = I(
|
|
1329
|
+
m ? "formatted" : "raw"
|
|
1328
1330
|
), w = Ts({
|
|
1329
1331
|
queryKey: ["types", d],
|
|
1330
1332
|
queryFn: async () => hn(JSON.parse(d)),
|
|
1331
|
-
enabled:
|
|
1332
|
-
}),
|
|
1333
|
+
enabled: c === "types"
|
|
1334
|
+
}), v = jn([...s]), h = r > pt;
|
|
1333
1335
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 h-full overflow-auto max-h-[calc(100vh-220px)] ", children: [
|
|
1334
1336
|
/* @__PURE__ */ e.jsxs(dt, { defaultOpen: !0, children: [
|
|
1335
1337
|
/* @__PURE__ */ e.jsxs(ct, { className: "flex items-center gap-2 hover:text-primary group", children: [
|
|
1336
|
-
/* @__PURE__ */ e.jsx(
|
|
1338
|
+
/* @__PURE__ */ e.jsx(Q, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
|
|
1337
1339
|
/* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Headers" })
|
|
1338
1340
|
] }),
|
|
1339
1341
|
/* @__PURE__ */ e.jsx(mt, { 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: [
|
|
1340
|
-
|
|
1341
|
-
/* @__PURE__ */ e.jsx("div", { className: "text-primary whitespace-pre", children:
|
|
1342
|
+
v.slice(0, 5).map(([u, x]) => /* @__PURE__ */ e.jsxs(O, { children: [
|
|
1343
|
+
/* @__PURE__ */ e.jsx("div", { className: "text-primary whitespace-pre", children: u }),
|
|
1342
1344
|
/* @__PURE__ */ e.jsx("div", { className: "break-all", children: x })
|
|
1343
|
-
] },
|
|
1344
|
-
|
|
1345
|
+
] }, u)),
|
|
1346
|
+
v.length > 5 && /* @__PURE__ */ e.jsxs(dt, { className: "col-span-full grid-cols-subgrid grid", children: [
|
|
1345
1347
|
/* @__PURE__ */ e.jsxs(ct, { className: "col-span-2 text-xs text-muted-foreground hover:text-primary flex items-center gap-1 py-1", children: [
|
|
1346
|
-
/* @__PURE__ */ e.jsx(
|
|
1348
|
+
/* @__PURE__ */ e.jsx(Q, { className: "h-3 w-3 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
|
|
1347
1349
|
"Show ",
|
|
1348
|
-
|
|
1350
|
+
v.length - 5,
|
|
1349
1351
|
" more headers"
|
|
1350
1352
|
] }),
|
|
1351
|
-
/* @__PURE__ */ e.jsx(mt, { className: "col-span-full grid grid-cols-subgrid gap-x-8 gap-y-1 ", children:
|
|
1352
|
-
/* @__PURE__ */ e.jsx("div", { className: "text-primary whitespace-pre", children:
|
|
1353
|
+
/* @__PURE__ */ e.jsx(mt, { className: "col-span-full grid grid-cols-subgrid gap-x-8 gap-y-1 ", children: v.slice(5).map(([u, x]) => /* @__PURE__ */ e.jsxs(O, { children: [
|
|
1354
|
+
/* @__PURE__ */ e.jsx("div", { className: "text-primary whitespace-pre", children: u }),
|
|
1353
1355
|
/* @__PURE__ */ e.jsx("div", { className: "break-all", children: x })
|
|
1354
|
-
] },
|
|
1356
|
+
] }, u)) })
|
|
1355
1357
|
] })
|
|
1356
1358
|
] }) })
|
|
1357
1359
|
] }),
|
|
@@ -1364,12 +1366,12 @@ const xn = {
|
|
|
1364
1366
|
/* @__PURE__ */ e.jsx(
|
|
1365
1367
|
$s,
|
|
1366
1368
|
{
|
|
1367
|
-
language:
|
|
1369
|
+
language: c === "types" ? "typescript" : c === "raw" ? m ? "plain" : l : "json",
|
|
1368
1370
|
showCopy: "always",
|
|
1369
1371
|
disabled: h,
|
|
1370
1372
|
noBackground: !0,
|
|
1371
1373
|
className: "overflow-x-auto p-4 text-xs max-h-[calc(83.333vh-180px)]",
|
|
1372
|
-
code: (
|
|
1374
|
+
code: (c === "raw" ? t : c === "types" ? (j = w.data) == null ? void 0 : j.lines.join(`
|
|
1373
1375
|
`) : d) ?? ""
|
|
1374
1376
|
}
|
|
1375
1377
|
)
|
|
@@ -1395,17 +1397,17 @@ const xn = {
|
|
|
1395
1397
|
ut(r)
|
|
1396
1398
|
] })
|
|
1397
1399
|
] }),
|
|
1398
|
-
|
|
1400
|
+
m && /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs(
|
|
1399
1401
|
Ne,
|
|
1400
1402
|
{
|
|
1401
|
-
value:
|
|
1402
|
-
onValueChange: (
|
|
1403
|
+
value: c,
|
|
1404
|
+
onValueChange: (u) => g(u),
|
|
1403
1405
|
children: [
|
|
1404
1406
|
/* @__PURE__ */ e.jsx(we, { className: "min-w-32", children: /* @__PURE__ */ e.jsx(Ce, { placeholder: "View" }) }),
|
|
1405
1407
|
/* @__PURE__ */ e.jsxs(Se, { children: [
|
|
1406
|
-
/* @__PURE__ */ e.jsx(
|
|
1407
|
-
/* @__PURE__ */ e.jsx(
|
|
1408
|
-
/* @__PURE__ */ e.jsx(
|
|
1408
|
+
/* @__PURE__ */ e.jsx(U, { value: "formatted", children: "Formatted" }),
|
|
1409
|
+
/* @__PURE__ */ e.jsx(U, { value: "raw", children: "Raw" }),
|
|
1410
|
+
/* @__PURE__ */ e.jsx(U, { value: "types", children: "Types" })
|
|
1409
1411
|
] })
|
|
1410
1412
|
]
|
|
1411
1413
|
}
|
|
@@ -1432,13 +1434,13 @@ const xn = {
|
|
|
1432
1434
|
] })
|
|
1433
1435
|
] }) : t.data ? /* @__PURE__ */ e.jsxs(jt, { defaultValue: "response", children: [
|
|
1434
1436
|
/* @__PURE__ */ e.jsxs(vt, { children: [
|
|
1435
|
-
/* @__PURE__ */ e.jsx(
|
|
1436
|
-
/* @__PURE__ */ e.jsxs(
|
|
1437
|
+
/* @__PURE__ */ e.jsx(z, { value: "request", children: "Request" }),
|
|
1438
|
+
/* @__PURE__ */ e.jsxs(z, { value: "response", children: [
|
|
1437
1439
|
"Response",
|
|
1438
1440
|
/* @__PURE__ */ e.jsxs(
|
|
1439
1441
|
"span",
|
|
1440
1442
|
{
|
|
1441
|
-
className:
|
|
1443
|
+
className: p(
|
|
1442
1444
|
"text-xs font-mono ml-1",
|
|
1443
1445
|
r === "2" && "text-green-500",
|
|
1444
1446
|
r === "3" && "text-blue-500",
|
|
@@ -1454,8 +1456,8 @@ const xn = {
|
|
|
1454
1456
|
)
|
|
1455
1457
|
] })
|
|
1456
1458
|
] }),
|
|
1457
|
-
/* @__PURE__ */ e.jsx(
|
|
1458
|
-
/* @__PURE__ */ e.jsx(
|
|
1459
|
+
/* @__PURE__ */ e.jsx(H, { value: "request", children: /* @__PURE__ */ e.jsx(un, { ...t.data.request }) }),
|
|
1460
|
+
/* @__PURE__ */ e.jsx(H, { value: "response", children: /* @__PURE__ */ e.jsx(
|
|
1459
1461
|
vn,
|
|
1460
1462
|
{
|
|
1461
1463
|
status: t.data.status,
|
|
@@ -1471,14 +1473,14 @@ const xn = {
|
|
|
1471
1473
|
/* @__PURE__ */ e.jsxs(
|
|
1472
1474
|
"div",
|
|
1473
1475
|
{
|
|
1474
|
-
className:
|
|
1476
|
+
className: p(
|
|
1475
1477
|
"opacity-0 pointer-events-none transition-opacity h-20 text-sm text-muted-foreground duration-300 flex flex-col gap-2 items-center",
|
|
1476
1478
|
n && "opacity-100 pointer-events-auto"
|
|
1477
1479
|
),
|
|
1478
1480
|
children: [
|
|
1479
1481
|
"Looks like the request is taking longer than expected.",
|
|
1480
1482
|
/* @__PURE__ */ e.jsx(
|
|
1481
|
-
|
|
1483
|
+
W,
|
|
1482
1484
|
{
|
|
1483
1485
|
onClick: a,
|
|
1484
1486
|
size: "sm",
|
|
@@ -1520,18 +1522,18 @@ const xn = {
|
|
|
1520
1522
|
children: /* @__PURE__ */ e.jsx(Ut, { className: "w-4 h-4" })
|
|
1521
1523
|
}
|
|
1522
1524
|
) }),
|
|
1523
|
-
/* @__PURE__ */ e.jsx(Be, { value: r, children: /* @__PURE__ */ e.jsx(Ve, { className: "w-56", align: "end", alignOffset: -150, children: [{ id:
|
|
1525
|
+
/* @__PURE__ */ e.jsx(Be, { value: r, children: /* @__PURE__ */ e.jsx(Ve, { className: "w-56", align: "end", alignOffset: -150, children: [{ id: B, label: "None" }, ...t].map(
|
|
1524
1526
|
(l) => /* @__PURE__ */ e.jsxs(
|
|
1525
1527
|
Fe,
|
|
1526
1528
|
{
|
|
1527
1529
|
onClick: () => {
|
|
1528
|
-
var
|
|
1529
|
-
i(l.id), a("identity", l.id), (
|
|
1530
|
+
var m;
|
|
1531
|
+
i(l.id), a("identity", l.id), (m = s == null ? void 0 : s.current) == null || m.requestSubmit();
|
|
1530
1532
|
},
|
|
1531
1533
|
onMouseEnter: () => i(l.id),
|
|
1532
1534
|
onMouseLeave: () => i(void 0),
|
|
1533
1535
|
children: [
|
|
1534
|
-
/* @__PURE__ */ e.jsx(
|
|
1536
|
+
/* @__PURE__ */ e.jsx(le, { value: l.id, className: "mr-2" }),
|
|
1535
1537
|
l.label
|
|
1536
1538
|
]
|
|
1537
1539
|
},
|
|
@@ -1540,7 +1542,7 @@ const xn = {
|
|
|
1540
1542
|
) }) })
|
|
1541
1543
|
] })
|
|
1542
1544
|
] });
|
|
1543
|
-
},
|
|
1545
|
+
}, B = "__none", be = {
|
|
1544
1546
|
Plain: "text/plain",
|
|
1545
1547
|
JSON: "application/json",
|
|
1546
1548
|
XML: "application/xml",
|
|
@@ -1554,18 +1556,18 @@ const xn = {
|
|
|
1554
1556
|
headers: r = [],
|
|
1555
1557
|
queryParams: i = [],
|
|
1556
1558
|
pathParams: l = [],
|
|
1557
|
-
defaultBody:
|
|
1559
|
+
defaultBody: m = "",
|
|
1558
1560
|
examples: d,
|
|
1559
|
-
requiresLogin:
|
|
1560
|
-
onLogin:
|
|
1561
|
+
requiresLogin: c = !1,
|
|
1562
|
+
onLogin: g,
|
|
1561
1563
|
onSignUp: w
|
|
1562
1564
|
}) => {
|
|
1563
1565
|
var Xe, Ke;
|
|
1564
|
-
const { selectedServer:
|
|
1566
|
+
const { selectedServer: v, setSelectedServer: h } = Yt(
|
|
1565
1567
|
s.map((o) => ({ url: o }))
|
|
1566
|
-
), [
|
|
1568
|
+
), [j, u] = I(!1), x = es(), { setRememberedIdentity: f, getRememberedIdentity: $ } = ln(), [, T] = rs(), [K, Y] = I(!1), [ee, D] = I(!1), te = G(void 0), Je = cs(f), { register: Ue, control: se, handleSubmit: _e, watch: Qe, setValue: E, ...ue } = ls({
|
|
1567
1569
|
defaultValues: {
|
|
1568
|
-
body:
|
|
1570
|
+
body: m,
|
|
1569
1571
|
bodyContentType: "JSON",
|
|
1570
1572
|
queryParams: i.map((o) => ({
|
|
1571
1573
|
name: o.name,
|
|
@@ -1595,12 +1597,12 @@ const xn = {
|
|
|
1595
1597
|
active: !1
|
|
1596
1598
|
}
|
|
1597
1599
|
]),
|
|
1598
|
-
identity:
|
|
1600
|
+
identity: $(
|
|
1599
1601
|
((Xe = x.data) == null ? void 0 : Xe.map((o) => o.id)) ?? []
|
|
1600
1602
|
)
|
|
1601
1603
|
}
|
|
1602
|
-
}), C = Qe(), We =
|
|
1603
|
-
|
|
1604
|
+
}), C = Qe(), We = G(null);
|
|
1605
|
+
re(() => {
|
|
1604
1606
|
C.identity && Je.current(C.identity);
|
|
1605
1607
|
}, [Je, C.identity]);
|
|
1606
1608
|
const pe = is({
|
|
@@ -1608,28 +1610,28 @@ const xn = {
|
|
|
1608
1610
|
var Ye, et;
|
|
1609
1611
|
const S = performance.now(), k = !o.headers.some(
|
|
1610
1612
|
(N) => N.active && N.name.toLowerCase() === "content-type"
|
|
1611
|
-
),
|
|
1613
|
+
), V = Object.fromEntries([
|
|
1612
1614
|
...o.headers.filter((N) => N.name && N.active).map((N) => [N.name, N.value]),
|
|
1613
1615
|
...k ? [["content-type", be[o.bodyContentType]]] : []
|
|
1614
1616
|
]), P = new Request(
|
|
1615
|
-
zs(t ??
|
|
1617
|
+
zs(t ?? v, n, o),
|
|
1616
1618
|
{
|
|
1617
1619
|
method: a.toUpperCase(),
|
|
1618
|
-
headers:
|
|
1620
|
+
headers: V,
|
|
1619
1621
|
body: o.body ? o.body : void 0
|
|
1620
1622
|
}
|
|
1621
1623
|
);
|
|
1622
|
-
o.identity !==
|
|
1623
|
-
const
|
|
1624
|
-
() =>
|
|
1624
|
+
o.identity !== B && await ((et = (Ye = x.data) == null ? void 0 : Ye.find((N) => N.id === o.identity)) == null ? void 0 : et.authorizeRequest(P));
|
|
1625
|
+
const F = setTimeout(
|
|
1626
|
+
() => D(!0),
|
|
1625
1627
|
3210
|
|
1626
1628
|
);
|
|
1627
|
-
|
|
1629
|
+
te.current = new AbortController();
|
|
1628
1630
|
try {
|
|
1629
1631
|
const N = await fetch(P, {
|
|
1630
|
-
signal:
|
|
1632
|
+
signal: te.current.signal
|
|
1631
1633
|
});
|
|
1632
|
-
clearTimeout(
|
|
1634
|
+
clearTimeout(F), D(!1);
|
|
1633
1635
|
const Dt = performance.now() - S, tt = await N.text(), Et = new URL(P.url);
|
|
1634
1636
|
return {
|
|
1635
1637
|
status: N.status,
|
|
@@ -1649,15 +1651,15 @@ const xn = {
|
|
|
1649
1651
|
}
|
|
1650
1652
|
};
|
|
1651
1653
|
} catch (N) {
|
|
1652
|
-
throw clearTimeout(
|
|
1654
|
+
throw clearTimeout(F), D(!1), N instanceof TypeError ? new Error(
|
|
1653
1655
|
"The request failed, possibly due to network issues or CORS policy."
|
|
1654
1656
|
) : N;
|
|
1655
1657
|
}
|
|
1656
1658
|
}
|
|
1657
1659
|
});
|
|
1658
|
-
|
|
1660
|
+
re(() => () => {
|
|
1659
1661
|
var o;
|
|
1660
|
-
(o =
|
|
1662
|
+
(o = te.current) == null || o.abort();
|
|
1661
1663
|
}, []);
|
|
1662
1664
|
const At = /* @__PURE__ */ e.jsx(
|
|
1663
1665
|
Vs,
|
|
@@ -1665,8 +1667,8 @@ const xn = {
|
|
|
1665
1667
|
path: n,
|
|
1666
1668
|
renderParam: ({ name: o, originalValue: S, index: k }) => {
|
|
1667
1669
|
var P;
|
|
1668
|
-
const
|
|
1669
|
-
(
|
|
1670
|
+
const V = (P = C.pathParams.find(
|
|
1671
|
+
(F) => F.name === o
|
|
1670
1672
|
)) == null ? void 0 : P.value;
|
|
1671
1673
|
return /* @__PURE__ */ e.jsx(
|
|
1672
1674
|
St,
|
|
@@ -1675,7 +1677,7 @@ const xn = {
|
|
|
1675
1677
|
backgroundOpacity: "0",
|
|
1676
1678
|
slug: o,
|
|
1677
1679
|
onClick: () => ue.setFocus(`pathParams.${k}.value`),
|
|
1678
|
-
children:
|
|
1680
|
+
children: V || S
|
|
1679
1681
|
}
|
|
1680
1682
|
);
|
|
1681
1683
|
}
|
|
@@ -1690,33 +1692,33 @@ const xn = {
|
|
|
1690
1692
|
Ne,
|
|
1691
1693
|
{
|
|
1692
1694
|
onValueChange: (o) => {
|
|
1693
|
-
|
|
1695
|
+
T(() => h(o));
|
|
1694
1696
|
},
|
|
1695
|
-
value:
|
|
1696
|
-
defaultValue:
|
|
1697
|
+
value: v,
|
|
1698
|
+
defaultValue: v,
|
|
1697
1699
|
children: [
|
|
1698
1700
|
/* @__PURE__ */ e.jsx(we, { className: "p-0 border-none flex-row-reverse bg-transparent text-xs gap-0.5 h-auto translate-y-[4px]", children: /* @__PURE__ */ e.jsx(Ce, {}) }),
|
|
1699
|
-
/* @__PURE__ */ e.jsx(Se, { children: s.map((o) => /* @__PURE__ */ e.jsx(
|
|
1701
|
+
/* @__PURE__ */ e.jsx(Se, { children: s.map((o) => /* @__PURE__ */ e.jsx(U, { value: o, children: o.replace(/^https?:\/\//, "").replace(/\/$/, "") }, o)) })
|
|
1700
1702
|
]
|
|
1701
1703
|
}
|
|
1702
|
-
) }), qt =
|
|
1704
|
+
) }), qt = c && !K, ne = ["POST", "PUT", "PATCH", "DELETE"].includes(
|
|
1703
1705
|
a.toUpperCase()
|
|
1704
1706
|
);
|
|
1705
1707
|
return /* @__PURE__ */ e.jsx(
|
|
1706
1708
|
ds,
|
|
1707
1709
|
{
|
|
1708
1710
|
register: Ue,
|
|
1709
|
-
control:
|
|
1711
|
+
control: se,
|
|
1710
1712
|
handleSubmit: _e,
|
|
1711
1713
|
watch: Qe,
|
|
1712
|
-
setValue:
|
|
1714
|
+
setValue: E,
|
|
1713
1715
|
...ue,
|
|
1714
1716
|
children: /* @__PURE__ */ e.jsxs(
|
|
1715
1717
|
"form",
|
|
1716
1718
|
{
|
|
1717
1719
|
onSubmit: _e((o) => {
|
|
1718
1720
|
var S;
|
|
1719
|
-
((S = x.data) == null ? void 0 : S.length) === 0 || o.identity ? pe.mutate(o) :
|
|
1721
|
+
((S = x.data) == null ? void 0 : S.length) === 0 || o.identity ? pe.mutate(o) : u(!0);
|
|
1720
1722
|
}),
|
|
1721
1723
|
ref: We,
|
|
1722
1724
|
className: "relative",
|
|
@@ -1725,10 +1727,10 @@ const xn = {
|
|
|
1725
1727
|
nn,
|
|
1726
1728
|
{
|
|
1727
1729
|
identities: x.data ?? [],
|
|
1728
|
-
open:
|
|
1729
|
-
onOpenChange:
|
|
1730
|
+
open: j,
|
|
1731
|
+
onOpenChange: u,
|
|
1730
1732
|
onSubmit: ({ rememberedIdentity: o, identity: S }) => {
|
|
1731
|
-
o &&
|
|
1733
|
+
o && E("identity", S ?? B), u(!1), pe.mutate({ ...C, identity: S });
|
|
1732
1734
|
}
|
|
1733
1735
|
}
|
|
1734
1736
|
),
|
|
@@ -1736,9 +1738,9 @@ const xn = {
|
|
|
1736
1738
|
dn,
|
|
1737
1739
|
{
|
|
1738
1740
|
open: qt,
|
|
1739
|
-
setOpen: (o) =>
|
|
1741
|
+
setOpen: (o) => Y(!o),
|
|
1740
1742
|
onSignUp: w,
|
|
1741
|
-
onLogin:
|
|
1743
|
+
onLogin: g
|
|
1742
1744
|
}
|
|
1743
1745
|
),
|
|
1744
1746
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-2 text-sm h-full", children: [
|
|
@@ -1764,35 +1766,35 @@ const xn = {
|
|
|
1764
1766
|
] }),
|
|
1765
1767
|
/* @__PURE__ */ e.jsxs(jt, { defaultValue: "parameters", children: [
|
|
1766
1768
|
/* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-1 justify-between", children: /* @__PURE__ */ e.jsxs(vt, { children: [
|
|
1767
|
-
/* @__PURE__ */ e.jsxs(
|
|
1769
|
+
/* @__PURE__ */ e.jsxs(z, { value: "parameters", children: [
|
|
1768
1770
|
"Parameters",
|
|
1769
1771
|
(C.pathParams.some((o) => o.value !== "") || C.queryParams.some((o) => o.active)) && /* @__PURE__ */ e.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ml-2" })
|
|
1770
1772
|
] }),
|
|
1771
|
-
/* @__PURE__ */ e.jsxs(
|
|
1773
|
+
/* @__PURE__ */ e.jsxs(z, { value: "headers", children: [
|
|
1772
1774
|
"Headers",
|
|
1773
1775
|
C.headers.filter((o) => o.active).length > 0 && /* @__PURE__ */ e.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ml-2" })
|
|
1774
1776
|
] }),
|
|
1775
|
-
/* @__PURE__ */ e.jsxs(
|
|
1777
|
+
/* @__PURE__ */ e.jsxs(z, { value: "auth", children: [
|
|
1776
1778
|
"Auth",
|
|
1777
|
-
C.identity !==
|
|
1779
|
+
C.identity !== B && /* @__PURE__ */ e.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ml-2" })
|
|
1778
1780
|
] }),
|
|
1779
|
-
/* @__PURE__ */ e.jsxs(
|
|
1781
|
+
/* @__PURE__ */ e.jsxs(z, { value: "body", children: [
|
|
1780
1782
|
"Body",
|
|
1781
1783
|
C.body && /* @__PURE__ */ e.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ml-2" })
|
|
1782
1784
|
] })
|
|
1783
1785
|
] }) }),
|
|
1784
|
-
/* @__PURE__ */ e.jsx(
|
|
1785
|
-
/* @__PURE__ */ e.jsxs(
|
|
1786
|
+
/* @__PURE__ */ e.jsx(H, { value: "headers", children: /* @__PURE__ */ e.jsx(tn, { control: se, headers: r }) }),
|
|
1787
|
+
/* @__PURE__ */ e.jsxs(H, { value: "parameters", children: [
|
|
1786
1788
|
l.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
|
|
1787
1789
|
/* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Path Parameters" }),
|
|
1788
|
-
/* @__PURE__ */ e.jsx(an, { url: n, control:
|
|
1790
|
+
/* @__PURE__ */ e.jsx(an, { url: n, control: se })
|
|
1789
1791
|
] }),
|
|
1790
1792
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
|
|
1791
1793
|
/* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Query Parameters" }),
|
|
1792
|
-
/* @__PURE__ */ e.jsx(on, { control:
|
|
1794
|
+
/* @__PURE__ */ e.jsx(on, { control: se, queryParams: i })
|
|
1793
1795
|
] })
|
|
1794
1796
|
] }),
|
|
1795
|
-
/* @__PURE__ */ e.jsxs(
|
|
1797
|
+
/* @__PURE__ */ e.jsxs(H, { value: "body", children: [
|
|
1796
1798
|
!["POST", "PUT", "PATCH", "DELETE"].includes(
|
|
1797
1799
|
a.toUpperCase()
|
|
1798
1800
|
) && /* @__PURE__ */ e.jsxs($e, { className: "mb-2", children: [
|
|
@@ -1804,26 +1806,26 @@ const xn = {
|
|
|
1804
1806
|
Ct,
|
|
1805
1807
|
{
|
|
1806
1808
|
...Ue("body"),
|
|
1807
|
-
className:
|
|
1809
|
+
className: p(
|
|
1808
1810
|
"border w-full rounded-lg bg-muted/40 p-2 h-64 font-mono text-[13px]",
|
|
1809
|
-
!
|
|
1811
|
+
!ne && "h-20 bg-muted"
|
|
1810
1812
|
),
|
|
1811
|
-
placeholder:
|
|
1812
|
-
disabled: !
|
|
1813
|
+
placeholder: ne ? void 0 : "This request does not support a body",
|
|
1814
|
+
disabled: !ne
|
|
1813
1815
|
}
|
|
1814
1816
|
),
|
|
1815
|
-
|
|
1817
|
+
ne && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 mt-2 justify-between", children: [
|
|
1816
1818
|
/* @__PURE__ */ e.jsxs(
|
|
1817
1819
|
Ne,
|
|
1818
1820
|
{
|
|
1819
1821
|
value: C.bodyContentType,
|
|
1820
|
-
onValueChange: (o) =>
|
|
1822
|
+
onValueChange: (o) => E(
|
|
1821
1823
|
"bodyContentType",
|
|
1822
1824
|
o
|
|
1823
1825
|
),
|
|
1824
1826
|
children: [
|
|
1825
1827
|
/* @__PURE__ */ e.jsx(we, { className: "w-[100px]", children: /* @__PURE__ */ e.jsx(Ce, {}) }),
|
|
1826
|
-
/* @__PURE__ */ e.jsx(Se, { children: Object.keys(be).map((o) => /* @__PURE__ */ e.jsx(
|
|
1828
|
+
/* @__PURE__ */ e.jsx(Se, { children: Object.keys(be).map((o) => /* @__PURE__ */ e.jsx(U, { value: o, children: o }, o)) })
|
|
1827
1829
|
]
|
|
1828
1830
|
}
|
|
1829
1831
|
),
|
|
@@ -1832,21 +1834,21 @@ const xn = {
|
|
|
1832
1834
|
{
|
|
1833
1835
|
examples: d,
|
|
1834
1836
|
onSelect: (o, S) => {
|
|
1835
|
-
var
|
|
1836
|
-
|
|
1837
|
+
var V;
|
|
1838
|
+
E(
|
|
1837
1839
|
"body",
|
|
1838
1840
|
JSON.stringify(o.value, null, 2)
|
|
1839
1841
|
);
|
|
1840
|
-
const k = (
|
|
1841
|
-
([P,
|
|
1842
|
-
)) == null ? void 0 :
|
|
1843
|
-
k &&
|
|
1842
|
+
const k = (V = ms(be).find(
|
|
1843
|
+
([P, F]) => F === S
|
|
1844
|
+
)) == null ? void 0 : V[0];
|
|
1845
|
+
k && E("bodyContentType", k);
|
|
1844
1846
|
}
|
|
1845
1847
|
}
|
|
1846
1848
|
)
|
|
1847
1849
|
] })
|
|
1848
1850
|
] }),
|
|
1849
|
-
/* @__PURE__ */ e.jsx(
|
|
1851
|
+
/* @__PURE__ */ e.jsx(H, { value: "auth", children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
|
|
1850
1852
|
((Ke = x.data) == null ? void 0 : Ke.length) === 0 && /* @__PURE__ */ e.jsxs($e, { children: [
|
|
1851
1853
|
/* @__PURE__ */ e.jsx(nt, { className: "w-4 h-4" }),
|
|
1852
1854
|
/* @__PURE__ */ e.jsx(Pe, { children: "Authentication" }),
|
|
@@ -1857,7 +1859,7 @@ const xn = {
|
|
|
1857
1859
|
{
|
|
1858
1860
|
value: C.identity,
|
|
1859
1861
|
identities: x.data ?? [],
|
|
1860
|
-
setValue: (o) =>
|
|
1862
|
+
setValue: (o) => E("identity", o)
|
|
1861
1863
|
}
|
|
1862
1864
|
) })
|
|
1863
1865
|
] }) })
|
|
@@ -1870,12 +1872,12 @@ const xn = {
|
|
|
1870
1872
|
showPathParamsWarning: C.pathParams.some(
|
|
1871
1873
|
(o) => o.value === ""
|
|
1872
1874
|
),
|
|
1873
|
-
showLongRunningWarning:
|
|
1875
|
+
showLongRunningWarning: ee,
|
|
1874
1876
|
onCancel: () => {
|
|
1875
1877
|
var o;
|
|
1876
|
-
(o =
|
|
1878
|
+
(o = te.current) == null || o.abort(
|
|
1877
1879
|
"Request cancelled by the user"
|
|
1878
|
-
),
|
|
1880
|
+
), D(!1);
|
|
1879
1881
|
}
|
|
1880
1882
|
}
|
|
1881
1883
|
)
|
|
@@ -1971,7 +1973,7 @@ const xn = {
|
|
|
1971
1973
|
}), xt = (t) => ({
|
|
1972
1974
|
path: t.routePath,
|
|
1973
1975
|
async lazy() {
|
|
1974
|
-
const { OasProvider: s } = await import("./OasProvider-
|
|
1976
|
+
const { OasProvider: s } = await import("./OasProvider-DEL8ulKm.js");
|
|
1975
1977
|
return {
|
|
1976
1978
|
element: /* @__PURE__ */ e.jsx(
|
|
1977
1979
|
s,
|
|
@@ -1992,13 +1994,13 @@ const xn = {
|
|
|
1992
1994
|
}) => ({
|
|
1993
1995
|
path: t,
|
|
1994
1996
|
async lazy() {
|
|
1995
|
-
const { OperationList: a } = await import("./OperationList-
|
|
1997
|
+
const { OperationList: a } = await import("./OperationList-D6goKbzX.js");
|
|
1996
1998
|
return { element: /* @__PURE__ */ e.jsx(a, { tag: s, untagged: n }) };
|
|
1997
1999
|
}
|
|
1998
2000
|
}), $n = (t, s) => {
|
|
1999
2001
|
const n = q(
|
|
2000
2002
|
t,
|
|
2001
|
-
s[0] ?
|
|
2003
|
+
s[0] ? ae(s[0]) : _
|
|
2002
2004
|
);
|
|
2003
2005
|
return [
|
|
2004
2006
|
// Redirect to first tag on the index route
|
|
@@ -2006,13 +2008,13 @@ const xn = {
|
|
|
2006
2008
|
// Create routes for each tag
|
|
2007
2009
|
...s.map(
|
|
2008
2010
|
(a) => Re({
|
|
2009
|
-
path: q(t,
|
|
2011
|
+
path: q(t, ae(a)),
|
|
2010
2012
|
tag: a
|
|
2011
2013
|
})
|
|
2012
2014
|
),
|
|
2013
2015
|
// Category without tagged operations
|
|
2014
2016
|
Re({
|
|
2015
|
-
path: q(t,
|
|
2017
|
+
path: q(t, _),
|
|
2016
2018
|
untagged: !0
|
|
2017
2019
|
})
|
|
2018
2020
|
];
|
|
@@ -2034,12 +2036,12 @@ const xn = {
|
|
|
2034
2036
|
];
|
|
2035
2037
|
const r = Ot(s);
|
|
2036
2038
|
return (r.length > 1 ? [void 0, ...r] : [void 0]).map((l) => {
|
|
2037
|
-
const
|
|
2039
|
+
const m = q(t, l);
|
|
2038
2040
|
return xt({
|
|
2039
2041
|
basePath: t,
|
|
2040
2042
|
version: l,
|
|
2041
|
-
routePath:
|
|
2042
|
-
routes: $n(
|
|
2043
|
+
routePath: m,
|
|
2044
|
+
routes: $n(m, a),
|
|
2043
2045
|
client: n,
|
|
2044
2046
|
config: s
|
|
2045
2047
|
});
|
|
@@ -2077,7 +2079,7 @@ const xn = {
|
|
|
2077
2079
|
}
|
|
2078
2080
|
}
|
|
2079
2081
|
}
|
|
2080
|
-
`),
|
|
2082
|
+
`), _ = "~endpoints", ia = (t) => {
|
|
2081
2083
|
const s = q(t.navigationId ?? "/reference"), n = new Is(t);
|
|
2082
2084
|
return {
|
|
2083
2085
|
getHead: () => {
|
|
@@ -2100,18 +2102,18 @@ const xn = {
|
|
|
2100
2102
|
server: r,
|
|
2101
2103
|
method: i,
|
|
2102
2104
|
url: l,
|
|
2103
|
-
children:
|
|
2105
|
+
children: m,
|
|
2104
2106
|
...d
|
|
2105
2107
|
}) => {
|
|
2106
|
-
const
|
|
2108
|
+
const c = ts();
|
|
2107
2109
|
if (!r)
|
|
2108
2110
|
throw new Error("Server is required");
|
|
2109
|
-
return a && !
|
|
2110
|
-
|
|
2111
|
+
return a && !c.isAuthenticated ? /* @__PURE__ */ e.jsxs(
|
|
2112
|
+
W,
|
|
2111
2113
|
{
|
|
2112
2114
|
className: "gap-2 items-center",
|
|
2113
2115
|
variant: "outline",
|
|
2114
|
-
onClick:
|
|
2116
|
+
onClick: c.login,
|
|
2115
2117
|
children: [
|
|
2116
2118
|
"Login to open in Playground ",
|
|
2117
2119
|
/* @__PURE__ */ e.jsx(_t, { size: 16 })
|
|
@@ -2124,7 +2126,7 @@ const xn = {
|
|
|
2124
2126
|
method: i ?? "get",
|
|
2125
2127
|
server: r,
|
|
2126
2128
|
...d,
|
|
2127
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2129
|
+
children: /* @__PURE__ */ e.jsx(W, { className: "gap-2 items-center", variant: "outline", children: m ?? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2128
2130
|
"Open in Playground ",
|
|
2129
2131
|
/* @__PURE__ */ e.jsx(Qt, { size: 16 })
|
|
2130
2132
|
] }) })
|
|
@@ -2141,43 +2143,43 @@ const xn = {
|
|
|
2141
2143
|
a
|
|
2142
2144
|
);
|
|
2143
2145
|
try {
|
|
2144
|
-
const l = r == null ? void 0 : r.params.version,
|
|
2145
|
-
(
|
|
2146
|
-
), [
|
|
2147
|
-
n.fetch(In, { type: d, input:
|
|
2146
|
+
const l = r == null ? void 0 : r.params.version, m = l ?? Ot(t).at(0), { type: d, options: c } = t, g = d === "file" ? t.input[m] : t.input, w = (c == null ? void 0 : c.loadTags) === !0 || t.type === "url", v = !(c != null && c.loadTags) && t.type !== "url", h = (i = t.tagPages) == null ? void 0 : i.find(
|
|
2147
|
+
(f) => ae(f) === (r == null ? void 0 : r.params.tag)
|
|
2148
|
+
), [j, u] = await Promise.all([
|
|
2149
|
+
n.fetch(In, { type: d, input: g }),
|
|
2148
2150
|
n.fetch(Rn, {
|
|
2149
2151
|
type: d,
|
|
2150
|
-
input:
|
|
2151
|
-
tag:
|
|
2152
|
+
input: g,
|
|
2153
|
+
tag: c != null && c.loadTags ? void 0 : h
|
|
2152
2154
|
})
|
|
2153
|
-
]),
|
|
2154
|
-
const
|
|
2155
|
+
]), x = j.schema.tags.flatMap((f) => {
|
|
2156
|
+
const $ = q(
|
|
2155
2157
|
s,
|
|
2156
2158
|
l,
|
|
2157
|
-
|
|
2158
|
-
), T =
|
|
2159
|
-
(
|
|
2160
|
-
var
|
|
2161
|
-
return ((
|
|
2159
|
+
ae(f.name)
|
|
2160
|
+
), T = u.schema.operations.filter(
|
|
2161
|
+
(K) => {
|
|
2162
|
+
var Y, ee;
|
|
2163
|
+
return ((Y = K.tags) == null ? void 0 : Y.length) !== 0 && ((ee = K.tags) == null ? void 0 : ee.map((D) => D.name).includes(f.name));
|
|
2162
2164
|
}
|
|
2163
2165
|
);
|
|
2164
|
-
return
|
|
2165
|
-
label:
|
|
2166
|
-
path:
|
|
2167
|
-
operations: (r == null ? void 0 : r.params.tag) !==
|
|
2168
|
-
collapsible:
|
|
2169
|
-
collapsed:
|
|
2166
|
+
return c != null && c.loadTags && T.length === 0 ? [] : ht({
|
|
2167
|
+
label: f.name,
|
|
2168
|
+
path: $,
|
|
2169
|
+
operations: (r == null ? void 0 : r.params.tag) !== _ || c != null && c.loadTags ? T : [],
|
|
2170
|
+
collapsible: w,
|
|
2171
|
+
collapsed: v
|
|
2170
2172
|
});
|
|
2171
2173
|
});
|
|
2172
|
-
return
|
|
2174
|
+
return u.schema.untagged.length > 0 && x.push(
|
|
2173
2175
|
ht({
|
|
2174
2176
|
label: "Other endpoints",
|
|
2175
|
-
path: q(s, l,
|
|
2176
|
-
operations: (r == null ? void 0 : r.params.tag) ===
|
|
2177
|
-
collapsible:
|
|
2178
|
-
collapsed:
|
|
2177
|
+
path: q(s, l, _),
|
|
2178
|
+
operations: (r == null ? void 0 : r.params.tag) === _ || c != null && c.loadTags ? u.schema.untagged : [],
|
|
2179
|
+
collapsible: w,
|
|
2180
|
+
collapsed: v
|
|
2179
2181
|
})
|
|
2180
|
-
),
|
|
2182
|
+
), x;
|
|
2181
2183
|
} catch {
|
|
2182
2184
|
return [];
|
|
2183
2185
|
}
|
|
@@ -2188,7 +2190,7 @@ const xn = {
|
|
|
2188
2190
|
export {
|
|
2189
2191
|
St as C,
|
|
2190
2192
|
Sn as P,
|
|
2191
|
-
U,
|
|
2193
|
+
_ as U,
|
|
2192
2194
|
wt as a,
|
|
2193
2195
|
dt as b,
|
|
2194
2196
|
mt as c,
|
|
@@ -2198,4 +2200,4 @@ export {
|
|
|
2198
2200
|
mn as m,
|
|
2199
2201
|
ia as o
|
|
2200
2202
|
};
|
|
2201
|
-
//# sourceMappingURL=index-
|
|
2203
|
+
//# sourceMappingURL=index-PKytqmuw.js.map
|