zudoku 0.3.0-dev.21 → 0.3.0-dev.22
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 +1 -1
- package/dist/lib/authentication/authentication.d.ts +1 -1
- package/dist/lib/plugins/api-keys/index.js +1 -0
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/markdown/generateRoutes.js +1 -1
- package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +1 -1
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
- package/dist/lib/plugins/openapi/Route.d.ts +6 -0
- package/dist/lib/plugins/openapi/Route.js +8 -0
- package/dist/lib/plugins/openapi/Route.js.map +1 -0
- package/dist/lib/plugins/openapi/context.d.ts +5 -0
- package/dist/lib/plugins/openapi/context.js +11 -0
- package/dist/lib/plugins/openapi/context.js.map +1 -0
- package/dist/lib/plugins/openapi/index.d.ts +1 -19
- package/dist/lib/plugins/openapi/index.js +17 -18
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +15 -0
- package/dist/lib/plugins/openapi/interfaces.js +2 -0
- package/dist/lib/plugins/openapi/interfaces.js.map +1 -0
- package/lib/{util-voKLTRDG.js → AnchorLink-DIUlXlf0.js} +149 -184
- package/lib/DevPortalProvider-gzyAGqHT.js +1080 -0
- package/lib/{Markdown-5LmPZyLV.js → Markdown-BjA7peYW.js} +3 -3
- package/lib/{MdxComponents-DYD_QPVF.js → MdxComponents-W-fE1ISO.js} +130 -129
- package/lib/MdxPage-DQ7lZBzE.js +216 -0
- package/lib/OperationList-DuIBqFNA.js +5545 -0
- package/lib/Route-B98Y2MdH.js +13 -0
- package/lib/{Select-DR3PiqjV.js → Select-DczD5e29.js} +24 -22
- package/lib/{Spinner-DjQ2eBxC.js → Spinner-CSoij67T.js} +3 -3
- package/lib/cn-DpqTslo9.js +2341 -0
- package/lib/context-_fYfJFgk.js +13 -0
- package/lib/{hook-FCY9-FHO.js → hook-CBXxHulF.js} +1 -1
- package/lib/{index-By9bEW57.js → index-C7O9D7f6.js} +15 -15
- package/lib/index-CKvOcM7w.js +712 -0
- package/lib/index-Cg6lXS1z.js +709 -0
- package/lib/index-ClDDiRmC.js +463 -0
- package/lib/router-DibNxKUP.js +3008 -0
- package/lib/util-CaVongBq.js +40 -0
- package/lib/zudoku.auth-openid.js +7 -6
- package/lib/zudoku.components.js +73 -69
- package/lib/zudoku.plugin-api-keys.js +26 -23
- package/lib/zudoku.plugin-markdown.js +33 -237
- package/lib/zudoku.plugin-openapi.js +5 -6238
- package/lib/zudoku.plugin-redirect.js +7 -6
- package/package.json +1 -1
- package/src/lib/authentication/authentication.ts +1 -1
- package/src/lib/plugins/api-keys/index.tsx +1 -0
- package/src/lib/plugins/markdown/generateRoutes.tsx +2 -2
- package/src/lib/plugins/openapi/OperationList.tsx +1 -1
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +1 -1
- package/src/lib/plugins/openapi/Route.tsx +21 -0
- package/src/lib/plugins/openapi/context.tsx +16 -0
- package/src/lib/plugins/openapi/index.tsx +19 -46
- package/src/lib/plugins/openapi/interfaces.ts +9 -0
- package/lib/DevPortalProvider-CRKuwoXc.js +0 -4123
- package/lib/index-PyGcnQFX.js +0 -3462
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { m as u } from "./router-DibNxKUP.js";
|
|
2
|
+
const l = (...t) => {
|
|
3
|
+
const i = t.filter((r) => !!r).map((r) => r.replace(/(^\/+|\/+$)/g, "")).join("/");
|
|
4
|
+
return i ? `/${i}` : "";
|
|
5
|
+
}, s = (t, i, r, o = []) => {
|
|
6
|
+
const e = a(t) ? l(r, t.path) : r, n = i(t, e, o);
|
|
7
|
+
if (n !== void 0) return n;
|
|
8
|
+
if ("children" in t && t.children) {
|
|
9
|
+
const h = [...o, t];
|
|
10
|
+
for (const f of t.children) {
|
|
11
|
+
const c = s(
|
|
12
|
+
f,
|
|
13
|
+
i,
|
|
14
|
+
e,
|
|
15
|
+
h
|
|
16
|
+
);
|
|
17
|
+
if (c !== void 0) return c;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}, g = (t, i) => {
|
|
21
|
+
if (t.categories)
|
|
22
|
+
for (const r of t.categories) {
|
|
23
|
+
const o = s(r, i, t.path);
|
|
24
|
+
if (o !== void 0) return o;
|
|
25
|
+
}
|
|
26
|
+
}, a = (t) => "path" in t, m = (t) => "href" in t, d = (t, i, r) => !!s(
|
|
27
|
+
t,
|
|
28
|
+
(o, e) => {
|
|
29
|
+
if (a(o) && u(e, i))
|
|
30
|
+
return !0;
|
|
31
|
+
},
|
|
32
|
+
r
|
|
33
|
+
);
|
|
34
|
+
export {
|
|
35
|
+
m as a,
|
|
36
|
+
d as c,
|
|
37
|
+
a as i,
|
|
38
|
+
l as j,
|
|
39
|
+
g as t
|
|
40
|
+
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
var ue = Object.defineProperty;
|
|
2
2
|
var he = (e, t, n) => t in e ? ue(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var w = (e, t, n) => he(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import {
|
|
4
|
+
import { j as g } from "./router-DibNxKUP.js";
|
|
5
5
|
import { l as I } from "./loglevel-CA34MiFn.js";
|
|
6
|
-
import { useRef as
|
|
6
|
+
import { useRef as de, useState as fe, useEffect as le } from "react";
|
|
7
|
+
import { a as pe } from "./index-ClDDiRmC.js";
|
|
7
8
|
import { u as M } from "./state-Ds_OxRHP.js";
|
|
8
9
|
let z;
|
|
9
10
|
var v, Z;
|
|
@@ -714,8 +715,8 @@ class L extends b {
|
|
|
714
715
|
function ot({
|
|
715
716
|
handleCallback: e
|
|
716
717
|
}) {
|
|
717
|
-
const t =
|
|
718
|
-
return
|
|
718
|
+
const t = de(!1), [n, r] = fe(void 0), a = pe();
|
|
719
|
+
return le(() => {
|
|
719
720
|
t.current || (t.current = !0, e().then(() => {
|
|
720
721
|
a("/");
|
|
721
722
|
}).catch((i) => {
|
|
@@ -905,8 +906,8 @@ class ct {
|
|
|
905
906
|
];
|
|
906
907
|
}
|
|
907
908
|
}
|
|
908
|
-
const
|
|
909
|
+
const mt = (e) => new ct(e);
|
|
909
910
|
export {
|
|
910
911
|
ct as OpenIDAuthenticationProvider,
|
|
911
|
-
|
|
912
|
+
mt as default
|
|
912
913
|
};
|
package/lib/zudoku.components.js
CHANGED
|
@@ -13,25 +13,29 @@ var E = (t, e, s, a) => ({
|
|
|
13
13
|
return i(t, e, a);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import { u as Se, a as U, M as Ee, T as Re, V as Fe } from "./MdxComponents-
|
|
17
|
-
import { C as
|
|
18
|
-
import { j as n
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { M as
|
|
24
|
-
import {
|
|
25
|
-
import { u as
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
16
|
+
import { u as Se, a as U, M as Ee, T as Re, V as Fe } from "./MdxComponents-W-fE1ISO.js";
|
|
17
|
+
import { C as es } from "./MdxComponents-W-fE1ISO.js";
|
|
18
|
+
import { j as n } from "./router-DibNxKUP.js";
|
|
19
|
+
import { S as me, h as ge, Q as He, n as m, m as ne, a as re, b as j, e as Le, c as ze, d as Ke, f as _e, o as ie, r as oe, g as Be, i as le, p as ce, s as Ve, u as W, j as Ue, k as We, l as Xe, D as $e } from "./DevPortalProvider-gzyAGqHT.js";
|
|
20
|
+
import { memo as ve, createContext as Ge, useEffect as I, useRef as z, useState as Je, forwardRef as Ye, Suspense as ye, useMemo as H, Fragment as Ze } from "react";
|
|
21
|
+
import { c as et } from "./state-Ds_OxRHP.js";
|
|
22
|
+
import { M as tt } from "./index-C7O9D7f6.js";
|
|
23
|
+
import { A as st, H as xe, a as at, M as nt } from "./AnchorLink-DIUlXlf0.js";
|
|
24
|
+
import { u as ss } from "./AnchorLink-DIUlXlf0.js";
|
|
25
|
+
import { u as rt } from "./hook-CBXxHulF.js";
|
|
26
|
+
import { c as K, N as B, a as it, b as ot, d as lt, R as ct } from "./index-CKvOcM7w.js";
|
|
27
|
+
import { L as ns } from "./index-CKvOcM7w.js";
|
|
28
|
+
import { u as q, O as ht } from "./index-ClDDiRmC.js";
|
|
29
|
+
import { R as be, T as je, C as Pe, S as ut } from "./Spinner-CSoij67T.js";
|
|
30
|
+
import { c as L } from "./cn-DpqTslo9.js";
|
|
31
|
+
import { c as X, i as V, j as we, a as dt } from "./util-CaVongBq.js";
|
|
28
32
|
/**
|
|
29
33
|
* @license lucide-react v0.378.0 - ISC
|
|
30
34
|
*
|
|
31
35
|
* This source code is licensed under the ISC license.
|
|
32
36
|
* See the LICENSE file in the root directory of this source tree.
|
|
33
37
|
*/
|
|
34
|
-
const Ne =
|
|
38
|
+
const Ne = K("ChevronRight", [
|
|
35
39
|
["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
|
|
36
40
|
]);
|
|
37
41
|
/**
|
|
@@ -40,7 +44,7 @@ const Ne = z("ChevronRight", [
|
|
|
40
44
|
* This source code is licensed under the ISC license.
|
|
41
45
|
* See the LICENSE file in the root directory of this source tree.
|
|
42
46
|
*/
|
|
43
|
-
const ft =
|
|
47
|
+
const ft = K("ExternalLink", [
|
|
44
48
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
45
49
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
46
50
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
@@ -51,7 +55,7 @@ const ft = z("ExternalLink", [
|
|
|
51
55
|
* This source code is licensed under the ISC license.
|
|
52
56
|
* See the LICENSE file in the root directory of this source tree.
|
|
53
57
|
*/
|
|
54
|
-
const pt =
|
|
58
|
+
const pt = K("MoonStar", [
|
|
55
59
|
["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9", key: "4ay0iu" }],
|
|
56
60
|
["path", { d: "M20 3v4", key: "1olli1" }],
|
|
57
61
|
["path", { d: "M22 5h-4", key: "1gvqau" }]
|
|
@@ -62,7 +66,7 @@ const pt = z("MoonStar", [
|
|
|
62
66
|
* This source code is licensed under the ISC license.
|
|
63
67
|
* See the LICENSE file in the root directory of this source tree.
|
|
64
68
|
*/
|
|
65
|
-
const mt =
|
|
69
|
+
const mt = K("Sun", [
|
|
66
70
|
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
|
|
67
71
|
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
68
72
|
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
@@ -82,7 +86,7 @@ var x, de, gt = (de = class extends me {
|
|
|
82
86
|
build(e, s, a) {
|
|
83
87
|
const r = s.queryKey, o = s.queryHash ?? ge(r, s);
|
|
84
88
|
let l = this.get(o);
|
|
85
|
-
return l || (l = new
|
|
89
|
+
return l || (l = new He({
|
|
86
90
|
cache: this,
|
|
87
91
|
queryKey: r,
|
|
88
92
|
queryHash: o,
|
|
@@ -153,7 +157,7 @@ var x, de, gt = (de = class extends me {
|
|
|
153
157
|
this.config = e, u(this, p, /* @__PURE__ */ new Map()), u(this, D, Date.now());
|
|
154
158
|
}
|
|
155
159
|
build(e, s, a) {
|
|
156
|
-
const r = new
|
|
160
|
+
const r = new tt({
|
|
157
161
|
mutationCache: this,
|
|
158
162
|
mutationId: ++E(this, D)._,
|
|
159
163
|
options: e.defaultMutationOptions(s),
|
|
@@ -237,7 +241,7 @@ function yt(t) {
|
|
|
237
241
|
b = !0;
|
|
238
242
|
}), e.signal)
|
|
239
243
|
});
|
|
240
|
-
},
|
|
244
|
+
}, Te = Le(e.options, e.fetchOptions), _ = async (y, P, C) => {
|
|
241
245
|
if (b)
|
|
242
246
|
return Promise.reject();
|
|
243
247
|
if (P == null && y.pages.length)
|
|
@@ -249,11 +253,11 @@ function yt(t) {
|
|
|
249
253
|
meta: e.options.meta
|
|
250
254
|
};
|
|
251
255
|
f(S);
|
|
252
|
-
const
|
|
256
|
+
const qe = await Te(
|
|
253
257
|
S
|
|
254
|
-
), { maxPages: ee } = e.options, te = C ?
|
|
258
|
+
), { maxPages: ee } = e.options, te = C ? ze : Ke;
|
|
255
259
|
return {
|
|
256
|
-
pages: te(y.pages,
|
|
260
|
+
pages: te(y.pages, qe, ee),
|
|
257
261
|
pageParams: te(y.pageParams, P, ee)
|
|
258
262
|
};
|
|
259
263
|
};
|
|
@@ -312,7 +316,7 @@ function xt(t, { pages: e, pageParams: s }) {
|
|
|
312
316
|
s
|
|
313
317
|
);
|
|
314
318
|
}
|
|
315
|
-
var c, w, N, O, A, k, Q,
|
|
319
|
+
var c, w, N, O, A, k, Q, T, pe, bt = (pe = class {
|
|
316
320
|
constructor(t = {}) {
|
|
317
321
|
v(this, c);
|
|
318
322
|
v(this, w);
|
|
@@ -321,19 +325,19 @@ var c, w, N, O, A, k, Q, q, pe, bt = (pe = class {
|
|
|
321
325
|
v(this, A);
|
|
322
326
|
v(this, k);
|
|
323
327
|
v(this, Q);
|
|
324
|
-
v(this,
|
|
328
|
+
v(this, T);
|
|
325
329
|
u(this, c, t.queryCache || new gt()), u(this, w, t.mutationCache || new vt()), u(this, N, t.defaultOptions || {}), u(this, O, /* @__PURE__ */ new Map()), u(this, A, /* @__PURE__ */ new Map()), u(this, k, 0);
|
|
326
330
|
}
|
|
327
331
|
mount() {
|
|
328
|
-
E(this, k)._++, i(this, k) === 1 && (u(this, Q,
|
|
332
|
+
E(this, k)._++, i(this, k) === 1 && (u(this, Q, _e.subscribe(async (t) => {
|
|
329
333
|
t && (await this.resumePausedMutations(), i(this, c).onFocus());
|
|
330
|
-
})), u(this,
|
|
334
|
+
})), u(this, T, ie.subscribe(async (t) => {
|
|
331
335
|
t && (await this.resumePausedMutations(), i(this, c).onOnline());
|
|
332
336
|
})));
|
|
333
337
|
}
|
|
334
338
|
unmount() {
|
|
335
339
|
var t, e;
|
|
336
|
-
E(this, k)._--, i(this, k) === 0 && ((t = i(this, Q)) == null || t.call(this), u(this, Q, void 0), (e = i(this,
|
|
340
|
+
E(this, k)._--, i(this, k) === 0 && ((t = i(this, Q)) == null || t.call(this), u(this, Q, void 0), (e = i(this, T)) == null || e.call(this), u(this, T, void 0));
|
|
337
341
|
}
|
|
338
342
|
isFetching(t) {
|
|
339
343
|
return i(this, c).findAll({ ...t, fetchStatus: "fetching" }).length;
|
|
@@ -364,7 +368,7 @@ var c, w, N, O, A, k, Q, q, pe, bt = (pe = class {
|
|
|
364
368
|
setQueryData(t, e, s) {
|
|
365
369
|
const a = this.defaultQueryOptions({ queryKey: t }), r = i(this, c).get(
|
|
366
370
|
a.queryHash
|
|
367
|
-
), o = r == null ? void 0 : r.state.data, l =
|
|
371
|
+
), o = r == null ? void 0 : r.state.data, l = Be(e, o);
|
|
368
372
|
if (l !== void 0)
|
|
369
373
|
return i(this, c).build(this, a).setData(l, { ...s, manual: !0 });
|
|
370
374
|
}
|
|
@@ -499,7 +503,7 @@ var c, w, N, O, A, k, Q, q, pe, bt = (pe = class {
|
|
|
499
503
|
return e.queryHash || (e.queryHash = ge(
|
|
500
504
|
e.queryKey,
|
|
501
505
|
e
|
|
502
|
-
)), e.refetchOnReconnect === void 0 && (e.refetchOnReconnect = e.networkMode !== "always"), e.throwOnError === void 0 && (e.throwOnError = !!e.suspense), !e.networkMode && e.persister && (e.networkMode = "offlineFirst"), e.enabled !== !0 && e.queryFn ===
|
|
506
|
+
)), e.refetchOnReconnect === void 0 && (e.refetchOnReconnect = e.networkMode !== "always"), e.throwOnError === void 0 && (e.throwOnError = !!e.suspense), !e.networkMode && e.persister && (e.networkMode = "offlineFirst"), e.enabled !== !0 && e.queryFn === Ve && (e.enabled = !1), e;
|
|
503
507
|
}
|
|
504
508
|
defaultMutationOptions(t) {
|
|
505
509
|
return t != null && t._defaulted ? t : {
|
|
@@ -512,8 +516,8 @@ var c, w, N, O, A, k, Q, q, pe, bt = (pe = class {
|
|
|
512
516
|
clear() {
|
|
513
517
|
i(this, c).clear(), i(this, w).clear();
|
|
514
518
|
}
|
|
515
|
-
}, c = new WeakMap(), w = new WeakMap(), N = new WeakMap(), O = new WeakMap(), A = new WeakMap(), k = new WeakMap(), Q = new WeakMap(),
|
|
516
|
-
const ke = (t) => "getRoutes" in t && typeof t.getRoutes == "function", jt = (t) => "initialize" in t && typeof t.initialize == "function", Pt = (t) => "getHead" in t && typeof t.getHead == "function", wt = (t) => "getIdentities" in t && typeof t.getIdentities == "function", Ce = new bt(), Nt =
|
|
519
|
+
}, c = new WeakMap(), w = new WeakMap(), N = new WeakMap(), O = new WeakMap(), A = new WeakMap(), k = new WeakMap(), Q = new WeakMap(), T = new WeakMap(), pe);
|
|
520
|
+
const ke = (t) => "getRoutes" in t && typeof t.getRoutes == "function", jt = (t) => "initialize" in t && typeof t.initialize == "function", Pt = (t) => "getHead" in t && typeof t.getHead == "function", wt = (t) => "getIdentities" in t && typeof t.getIdentities == "function", Ce = new bt(), Nt = et(() => ({}));
|
|
517
521
|
class kt {
|
|
518
522
|
constructor(e) {
|
|
519
523
|
g(this, "plugins", []);
|
|
@@ -559,7 +563,7 @@ const Ct = () => {
|
|
|
559
563
|
return /* @__PURE__ */ n.jsx("nav", { className: "border-b border-border text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ n.jsx("ul", { className: "flex flex-row items-center gap-8", children: t.map((e) => /* @__PURE__ */ n.jsx("li", { children: /* @__PURE__ */ n.jsx(
|
|
560
564
|
B,
|
|
561
565
|
{
|
|
562
|
-
className: ({ isActive: s }) =>
|
|
566
|
+
className: ({ isActive: s }) => it(
|
|
563
567
|
"block py-3.5 font-medium -mb-px border-b-2",
|
|
564
568
|
s ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
|
|
565
569
|
),
|
|
@@ -568,7 +572,7 @@ const Ct = () => {
|
|
|
568
572
|
}
|
|
569
573
|
) }, e.label)) }) });
|
|
570
574
|
}, Me = ve(function() {
|
|
571
|
-
const [e, s] = Se(), { isAuthenticated: a, profile: r, isAuthEnabled: o, login: l, logout: h } =
|
|
575
|
+
const [e, s] = Se(), { isAuthenticated: a, profile: r, isAuthEnabled: o, login: l, logout: h } = rt(), { page: d } = W(), b = e ? pt : mt;
|
|
572
576
|
return /* @__PURE__ */ n.jsx("header", { className: "fixed top-0 w-full z-10 bg-background/80 backdrop-blur", children: /* @__PURE__ */ n.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
|
|
573
577
|
/* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b border-border px-12 h-[--top-header-height]", children: [
|
|
574
578
|
/* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-3.5", children: [
|
|
@@ -611,8 +615,8 @@ const Ct = () => {
|
|
|
611
615
|
] }) });
|
|
612
616
|
}), Oe = {
|
|
613
617
|
Header: Me
|
|
614
|
-
}, Mt =
|
|
615
|
-
const t =
|
|
618
|
+
}, Mt = Ge(Oe), Ot = Mt.Provider, At = () => {
|
|
619
|
+
const t = q(), { setActiveAnchor: e } = U();
|
|
616
620
|
I(() => {
|
|
617
621
|
if (!t.hash) return;
|
|
618
622
|
const s = t.hash.split("/")[0].slice(1), a = document.getElementById(decodeURIComponent(s));
|
|
@@ -629,7 +633,7 @@ const Ct = () => {
|
|
|
629
633
|
return r.observe(document.body, { childList: !0, subtree: !0 }), () => r.disconnect();
|
|
630
634
|
}, [t.hash, e]);
|
|
631
635
|
}, Qt = () => {
|
|
632
|
-
const t =
|
|
636
|
+
const t = q(), e = z(t.pathname);
|
|
633
637
|
I(() => {
|
|
634
638
|
e.current !== t.pathname && (window.scrollTo(0, 0), e.current = t.pathname);
|
|
635
639
|
}, [t.pathname]);
|
|
@@ -638,11 +642,11 @@ const Ct = () => {
|
|
|
638
642
|
defaultOpen: e,
|
|
639
643
|
path: s
|
|
640
644
|
}) => {
|
|
641
|
-
const [a, r] =
|
|
645
|
+
const [a, r] = Je(e), o = q(), l = z(o.pathname);
|
|
642
646
|
return I(() => {
|
|
643
647
|
!a && l.current !== o.pathname && r(X(t, o.pathname, s)), l.current = o.pathname;
|
|
644
648
|
}, [a, t, s, o.pathname]), [a, r];
|
|
645
|
-
}, F =
|
|
649
|
+
}, F = ot(
|
|
646
650
|
"flex px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent transition-colors duration-300",
|
|
647
651
|
{
|
|
648
652
|
variants: {
|
|
@@ -656,19 +660,19 @@ const Ct = () => {
|
|
|
656
660
|
}
|
|
657
661
|
}
|
|
658
662
|
}
|
|
659
|
-
),
|
|
663
|
+
), Tt = "data-anchor", Qe = ({
|
|
660
664
|
category: t,
|
|
661
665
|
item: e,
|
|
662
666
|
activeAnchor: s,
|
|
663
667
|
currentTopNavItem: a,
|
|
664
668
|
basePath: r = ""
|
|
665
669
|
}) => {
|
|
666
|
-
const o = V(e) ?
|
|
670
|
+
const o = V(e) ? we(r, e.path) : "", l = q(), [h, d] = Ae({
|
|
667
671
|
item: e,
|
|
668
672
|
path: o,
|
|
669
673
|
defaultOpen: () => X(e, l.pathname, o)
|
|
670
674
|
});
|
|
671
|
-
if (
|
|
675
|
+
if (dt(e)) {
|
|
672
676
|
const f = L(
|
|
673
677
|
"flex items-center gap-2",
|
|
674
678
|
F({
|
|
@@ -703,14 +707,14 @@ const Ct = () => {
|
|
|
703
707
|
)
|
|
704
708
|
] });
|
|
705
709
|
return /* @__PURE__ */ n.jsx("li", { title: typeof e.label == "string" ? e.label : e.title, children: e.children ? /* @__PURE__ */ n.jsxs(
|
|
706
|
-
|
|
710
|
+
be,
|
|
707
711
|
{
|
|
708
712
|
open: h,
|
|
709
713
|
onOpenChange: () => d((f) => !f),
|
|
710
714
|
className: "flex flex-col",
|
|
711
715
|
children: [
|
|
712
716
|
/* @__PURE__ */ n.jsx(
|
|
713
|
-
|
|
717
|
+
je,
|
|
714
718
|
{
|
|
715
719
|
className: L(
|
|
716
720
|
"group text-start",
|
|
@@ -719,7 +723,7 @@ const Ct = () => {
|
|
|
719
723
|
children: b
|
|
720
724
|
}
|
|
721
725
|
),
|
|
722
|
-
/* @__PURE__ */ n.jsx(
|
|
726
|
+
/* @__PURE__ */ n.jsx(Pe, { className: "CollapsibleContent ms-[calc(var(--padding-nav-item)*1.125)]", children: /* @__PURE__ */ n.jsx("ul", { className: "mt-1 border-border border-l ps-1.5", children: e.children.map((f) => /* @__PURE__ */ n.jsx(
|
|
723
727
|
Qe,
|
|
724
728
|
{
|
|
725
729
|
category: t,
|
|
@@ -733,10 +737,10 @@ const Ct = () => {
|
|
|
733
737
|
]
|
|
734
738
|
}
|
|
735
739
|
) : e.path.startsWith("#") ? /* @__PURE__ */ n.jsx(
|
|
736
|
-
|
|
740
|
+
st,
|
|
737
741
|
{
|
|
738
742
|
to: e.path,
|
|
739
|
-
[
|
|
743
|
+
[Tt]: e.path,
|
|
740
744
|
className: F({
|
|
741
745
|
isActive: e.path.slice(1) === s,
|
|
742
746
|
isMuted: e.muted
|
|
@@ -751,21 +755,21 @@ const Ct = () => {
|
|
|
751
755
|
children: b
|
|
752
756
|
}
|
|
753
757
|
) });
|
|
754
|
-
},
|
|
758
|
+
}, qt = ({
|
|
755
759
|
category: t
|
|
756
760
|
}) => {
|
|
757
|
-
const { activeAnchor: e } = U(), s =
|
|
761
|
+
const { activeAnchor: e } = U(), s = Ue(), a = q(), r = t.collapsible ?? !0, [o, l] = Ae({
|
|
758
762
|
item: t,
|
|
759
763
|
path: (s == null ? void 0 : s.path) ?? "",
|
|
760
764
|
defaultOpen: () => !r || t.expanded || X(t, a.pathname, (s == null ? void 0 : s.path) ?? "")
|
|
761
765
|
});
|
|
762
766
|
return /* @__PURE__ */ n.jsxs(
|
|
763
|
-
|
|
767
|
+
be,
|
|
764
768
|
{
|
|
765
769
|
open: o,
|
|
766
770
|
onOpenChange: () => l((h) => !h),
|
|
767
771
|
children: [
|
|
768
|
-
t.label.length > 0 ? /* @__PURE__ */ n.jsx(
|
|
772
|
+
t.label.length > 0 ? /* @__PURE__ */ n.jsx(je, { asChild: r, disabled: !r, children: /* @__PURE__ */ n.jsxs(
|
|
769
773
|
"h5",
|
|
770
774
|
{
|
|
771
775
|
className: L(
|
|
@@ -784,14 +788,14 @@ const Ct = () => {
|
|
|
784
788
|
]
|
|
785
789
|
}
|
|
786
790
|
) }) : "Endpoints",
|
|
787
|
-
/* @__PURE__ */ n.jsx(
|
|
791
|
+
/* @__PURE__ */ n.jsx(Pe, { className: "CollapsibleContent -mx-[--padding-nav-item]", children: /* @__PURE__ */ n.jsx("ul", { className: "space-y-0.5 mt-1.5 mb-4 ms-3", children: t.children.map((h) => /* @__PURE__ */ n.jsx(
|
|
788
792
|
Qe,
|
|
789
793
|
{
|
|
790
794
|
category: t,
|
|
791
795
|
item: h,
|
|
792
796
|
activeAnchor: e,
|
|
793
797
|
currentTopNavItem: s,
|
|
794
|
-
basePath:
|
|
798
|
+
basePath: we(s == null ? void 0 : s.path, t.path)
|
|
795
799
|
},
|
|
796
800
|
V(h) ? h.path + h.label : h.href
|
|
797
801
|
)) }) })
|
|
@@ -799,7 +803,7 @@ const Ct = () => {
|
|
|
799
803
|
},
|
|
800
804
|
t.label
|
|
801
805
|
);
|
|
802
|
-
}, Dt =
|
|
806
|
+
}, Dt = Ye(function({ children: e, className: s, pushMainContent: a }, r) {
|
|
803
807
|
return /* @__PURE__ */ n.jsx(
|
|
804
808
|
"nav",
|
|
805
809
|
{
|
|
@@ -813,23 +817,23 @@ const Ct = () => {
|
|
|
813
817
|
}
|
|
814
818
|
);
|
|
815
819
|
}), It = () => {
|
|
816
|
-
const t =
|
|
820
|
+
const t = z(null), e = We();
|
|
817
821
|
return /* @__PURE__ */ n.jsx(
|
|
818
822
|
Dt,
|
|
819
823
|
{
|
|
820
824
|
ref: t,
|
|
821
825
|
pushMainContent: e.data.items.length > 0,
|
|
822
|
-
children: e.data.items.map((s) => /* @__PURE__ */ n.jsx(
|
|
826
|
+
children: e.data.items.map((s) => /* @__PURE__ */ n.jsx(qt, { category: s }, s.label))
|
|
823
827
|
}
|
|
824
828
|
);
|
|
825
829
|
}, ue = ({ children: t }) => {
|
|
826
|
-
const e =
|
|
830
|
+
const e = q(), { setActiveAnchor: s } = U(), { meta: a } = W();
|
|
827
831
|
At(), Qt();
|
|
828
|
-
const r =
|
|
832
|
+
const r = z(e.pathname);
|
|
829
833
|
return I(() => {
|
|
830
834
|
e.pathname !== r.current && s(""), r.current = e.pathname;
|
|
831
835
|
}, [e.pathname, s]), /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
832
|
-
/* @__PURE__ */ n.jsxs(
|
|
836
|
+
/* @__PURE__ */ n.jsxs(xe, { titleTemplate: a == null ? void 0 : a.title, children: [
|
|
833
837
|
/* @__PURE__ */ n.jsx("title", { children: "Home" }),
|
|
834
838
|
(a == null ? void 0 : a.description) && /* @__PURE__ */ n.jsx("meta", { name: "description", content: a.description }),
|
|
835
839
|
(a == null ? void 0 : a.favicon) && /* @__PURE__ */ n.jsx("link", { rel: "icon", href: a.favicon })
|
|
@@ -838,7 +842,7 @@ const Ct = () => {
|
|
|
838
842
|
/* @__PURE__ */ n.jsx("div", { className: "max-w-screen-2xl mx-auto pt-[--header-height] px-10 lg:px-12 h-full", children: /* @__PURE__ */ n.jsxs(
|
|
839
843
|
ye,
|
|
840
844
|
{
|
|
841
|
-
fallback: /* @__PURE__ */ n.jsx("div", { className: "grid h-full place-items-center", children: /* @__PURE__ */ n.jsx(
|
|
845
|
+
fallback: /* @__PURE__ */ n.jsx("div", { className: "grid h-full place-items-center", children: /* @__PURE__ */ n.jsx(ut, {}) }),
|
|
842
846
|
children: [
|
|
843
847
|
/* @__PURE__ */ n.jsx(It, {}),
|
|
844
848
|
/* @__PURE__ */ n.jsx(
|
|
@@ -848,7 +852,7 @@ const Ct = () => {
|
|
|
848
852
|
lg:overflow-visible
|
|
849
853
|
lg:peer-data-[navigation=true]:w-[calc(100%-var(--side-nav-width))]
|
|
850
854
|
lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] peer-data-[navigation=true]:pl-12`,
|
|
851
|
-
children: t ?? /* @__PURE__ */ n.jsx(
|
|
855
|
+
children: t ?? /* @__PURE__ */ n.jsx(ht, {})
|
|
852
856
|
}
|
|
853
857
|
)
|
|
854
858
|
]
|
|
@@ -861,7 +865,7 @@ function St({ plugins: t }) {
|
|
|
861
865
|
const s = (t ?? []).flatMap(
|
|
862
866
|
(a) => ke(a) ? a.getRoutes() : []
|
|
863
867
|
);
|
|
864
|
-
return
|
|
868
|
+
return lt([
|
|
865
869
|
{
|
|
866
870
|
path: "/",
|
|
867
871
|
element: /* @__PURE__ */ n.jsx(ue, {}),
|
|
@@ -870,7 +874,7 @@ function St({ plugins: t }) {
|
|
|
870
874
|
}
|
|
871
875
|
]);
|
|
872
876
|
}, [t]);
|
|
873
|
-
return /* @__PURE__ */ n.jsx(
|
|
877
|
+
return /* @__PURE__ */ n.jsx(ct, { router: e });
|
|
874
878
|
}
|
|
875
879
|
const Et = (t) => {
|
|
876
880
|
var o;
|
|
@@ -886,11 +890,11 @@ const Et = (t) => {
|
|
|
886
890
|
}, [a]);
|
|
887
891
|
const r = (o = t.plugins) == null ? void 0 : o.filter(Pt).map((l, h) => {
|
|
888
892
|
var d;
|
|
889
|
-
return /* @__PURE__ */ n.jsx(
|
|
893
|
+
return /* @__PURE__ */ n.jsx(Ze, { children: (d = l.getHead) == null ? void 0 : d.call(l) }, h);
|
|
890
894
|
});
|
|
891
|
-
return /* @__PURE__ */ n.jsx(
|
|
892
|
-
/* @__PURE__ */ n.jsx(
|
|
893
|
-
/* @__PURE__ */ n.jsx(
|
|
895
|
+
return /* @__PURE__ */ n.jsx(Xe, { client: Ce, children: /* @__PURE__ */ n.jsxs(at, { children: [
|
|
896
|
+
/* @__PURE__ */ n.jsx(xe, { children: r }),
|
|
897
|
+
/* @__PURE__ */ n.jsx($e, { value: a, children: /* @__PURE__ */ n.jsx(nt, { components: s, children: /* @__PURE__ */ n.jsx(Re, { children: /* @__PURE__ */ n.jsx(Ot, { value: e, children: /* @__PURE__ */ n.jsx(Fe, { children: /* @__PURE__ */ n.jsx(
|
|
894
898
|
ye,
|
|
895
899
|
{
|
|
896
900
|
fallback: /* @__PURE__ */ n.jsx("div", { className: "grid place-items-center h-full", children: "Loading..." }),
|
|
@@ -909,8 +913,8 @@ const Et = (t) => {
|
|
|
909
913
|
}, Rt = ve(Et);
|
|
910
914
|
Rt.displayName = "DevPortal";
|
|
911
915
|
export {
|
|
912
|
-
|
|
916
|
+
es as Callout,
|
|
913
917
|
Rt as DevPortal,
|
|
914
|
-
|
|
915
|
-
|
|
918
|
+
ns as Link,
|
|
919
|
+
ss as useMDXComponents
|
|
916
920
|
};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { j as e
|
|
2
|
-
import { l as
|
|
3
|
-
import { u as
|
|
4
|
-
import { u as
|
|
5
|
-
import { c as l,
|
|
6
|
-
import
|
|
7
|
-
import
|
|
1
|
+
import { j as e } from "./router-DibNxKUP.js";
|
|
2
|
+
import { l as g } from "./loglevel-CA34MiFn.js";
|
|
3
|
+
import { u as j } from "./hook-CBXxHulF.js";
|
|
4
|
+
import { u as v, a as m, S as b, b as w, c as N, d as k, e as K, f as p, B as o } from "./Select-DczD5e29.js";
|
|
5
|
+
import { c as l, L as x } from "./index-CKvOcM7w.js";
|
|
6
|
+
import { u as h, q as S, t as E } from "./DevPortalProvider-gzyAGqHT.js";
|
|
7
|
+
import * as A from "react";
|
|
8
|
+
import { useState as C } from "react";
|
|
9
|
+
import { c as P } from "./cn-DpqTslo9.js";
|
|
10
|
+
import { a as D, O as I, b as O } from "./index-ClDDiRmC.js";
|
|
8
11
|
/**
|
|
9
12
|
* @license lucide-react v0.378.0 - ISC
|
|
10
13
|
*
|
|
@@ -66,12 +69,12 @@ function u(t, r) {
|
|
|
66
69
|
throw new Error(n);
|
|
67
70
|
}
|
|
68
71
|
}
|
|
69
|
-
const y =
|
|
72
|
+
const y = A.forwardRef(
|
|
70
73
|
({ className: t, type: r, ...a }, n) => /* @__PURE__ */ e.jsx(
|
|
71
74
|
"input",
|
|
72
75
|
{
|
|
73
76
|
type: r,
|
|
74
|
-
className:
|
|
77
|
+
className: P(
|
|
75
78
|
"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
76
79
|
t
|
|
77
80
|
),
|
|
@@ -82,11 +85,11 @@ const y = I.forwardRef(
|
|
|
82
85
|
);
|
|
83
86
|
y.displayName = "Input";
|
|
84
87
|
const T = ({ service: t }) => {
|
|
85
|
-
const r =
|
|
88
|
+
const r = h(), a = D(), n = v({
|
|
86
89
|
defaultValues: {
|
|
87
90
|
expiresOn: "30"
|
|
88
91
|
}
|
|
89
|
-
}), i =
|
|
92
|
+
}), i = m({
|
|
90
93
|
mutationFn: ({ description: s, expiresOn: c }) => {
|
|
91
94
|
if (!t.createKey)
|
|
92
95
|
throw new Error("deleteKey not implemented");
|
|
@@ -109,13 +112,13 @@ const T = ({ service: t }) => {
|
|
|
109
112
|
/* @__PURE__ */ e.jsx(y, { ...n.register("description") }),
|
|
110
113
|
"Expiration",
|
|
111
114
|
/* @__PURE__ */ e.jsxs(
|
|
112
|
-
|
|
115
|
+
b,
|
|
113
116
|
{
|
|
114
117
|
onValueChange: (s) => n.setValue("expiresOn", s),
|
|
115
118
|
defaultValue: n.getValues("expiresOn"),
|
|
116
119
|
children: [
|
|
117
|
-
/* @__PURE__ */ e.jsx(
|
|
118
|
-
/* @__PURE__ */ e.jsx(
|
|
120
|
+
/* @__PURE__ */ e.jsx(w, { children: /* @__PURE__ */ e.jsx(N, {}) }),
|
|
121
|
+
/* @__PURE__ */ e.jsx(k, { children: /* @__PURE__ */ e.jsxs(K, { children: [
|
|
119
122
|
[7, 30, 60, 90].map((s) => /* @__PURE__ */ e.jsxs(p, { value: String(s), children: [
|
|
120
123
|
s,
|
|
121
124
|
" days"
|
|
@@ -137,11 +140,11 @@ const T = ({ service: t }) => {
|
|
|
137
140
|
const r = /* @__PURE__ */ new Date();
|
|
138
141
|
return r.setDate(r.getDate() + t), r.toISOString();
|
|
139
142
|
}, F = ({ service: t }) => {
|
|
140
|
-
const r =
|
|
143
|
+
const r = h(), a = S(), { data: n } = E({
|
|
141
144
|
queryFn: () => t.getKeys(r),
|
|
142
145
|
queryKey: ["api-keys"],
|
|
143
146
|
retry: !1
|
|
144
|
-
}), i =
|
|
147
|
+
}), i = m({
|
|
145
148
|
mutationFn: (s) => {
|
|
146
149
|
if (!t.deleteKey)
|
|
147
150
|
throw new Error("deleteKey not implemented");
|
|
@@ -203,7 +206,7 @@ const T = ({ service: t }) => {
|
|
|
203
206
|
)) })
|
|
204
207
|
] });
|
|
205
208
|
}, _ = ({ apiKey: t }) => {
|
|
206
|
-
const [r, a] =
|
|
209
|
+
const [r, a] = C(!1);
|
|
207
210
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center text-sm", children: [
|
|
208
211
|
/* @__PURE__ */ e.jsx("code", { className: "border border-border rounded bg-gray-100 dark:bg-gray-950 p-1 font-mono", children: r ? t : "•".repeat(t.length) }),
|
|
209
212
|
/* @__PURE__ */ e.jsx(
|
|
@@ -244,18 +247,18 @@ const T = ({ service: t }) => {
|
|
|
244
247
|
return u(n.ok, "Failed to fetch API keys"), await n.json();
|
|
245
248
|
}
|
|
246
249
|
}), Q = () => {
|
|
247
|
-
const t =
|
|
248
|
-
return t.isPending ? null : t.isAuthenticated ? /* @__PURE__ */ e.jsx(
|
|
250
|
+
const t = j();
|
|
251
|
+
return t.isPending ? null : t.isAuthenticated ? /* @__PURE__ */ e.jsx(I, {}) : /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2 my-12", children: [
|
|
249
252
|
"Please login first to view this page",
|
|
250
253
|
/* @__PURE__ */ e.jsx(o, { onClick: () => t.login(), children: "Login" })
|
|
251
254
|
] });
|
|
252
255
|
}, H = () => {
|
|
253
|
-
const t =
|
|
254
|
-
return
|
|
256
|
+
const t = O();
|
|
257
|
+
return g.error(String(t)), /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2 my-12", children: [
|
|
255
258
|
/* @__PURE__ */ e.jsx("h1", { children: "Something went wrong" }),
|
|
256
259
|
t instanceof Error && /* @__PURE__ */ e.jsx("p", { children: t.message })
|
|
257
260
|
] });
|
|
258
|
-
},
|
|
261
|
+
}, se = (t) => {
|
|
259
262
|
const r = "endpoint" in t ? t.endpoint : B, a = "getKeys" in t ? t : G(r);
|
|
260
263
|
return {
|
|
261
264
|
getIdentities: async (n) => {
|
|
@@ -288,5 +291,5 @@ const T = ({ service: t }) => {
|
|
|
288
291
|
};
|
|
289
292
|
};
|
|
290
293
|
export {
|
|
291
|
-
|
|
294
|
+
se as apiKeyPlugin
|
|
292
295
|
};
|