zudoku 0.3.0-dev.4 → 0.3.0-dev.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/App.js +2 -1
- package/dist/app/App.js.map +1 -1
- package/dist/lib/authentication/hook.d.ts +1 -0
- package/dist/lib/authentication/hook.js +1 -0
- package/dist/lib/authentication/hook.js.map +1 -1
- package/dist/lib/authentication/providers/auth0.js +1 -0
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/clerk.js +2 -0
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/providers/openid.js +2 -0
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/authentication/state.d.ts +1 -0
- package/dist/lib/authentication/state.js +1 -0
- package/dist/lib/authentication/state.js.map +1 -1
- package/dist/lib/components/DevPortal.js +0 -1
- package/dist/lib/components/DevPortal.js.map +1 -1
- package/dist/lib/components/Layout.js +1 -1
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/SyntaxHighlight.js +1 -1
- package/dist/lib/components/SyntaxHighlight.js.map +1 -1
- package/dist/lib/core/DevPortalContext.js +5 -4
- package/dist/lib/core/DevPortalContext.js.map +1 -1
- package/dist/lib/plugins/api-key/CreateApiKey.d.ts +2 -3
- package/dist/lib/plugins/api-key/CreateApiKey.js +1 -1
- package/dist/lib/plugins/api-key/CreateApiKey.js.map +1 -1
- package/dist/lib/plugins/api-key/SettingsApiKeys.d.ts +2 -3
- package/dist/lib/plugins/api-key/SettingsApiKeys.js +8 -8
- package/dist/lib/plugins/api-key/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/api-key/index.js +36 -9
- package/dist/lib/plugins/api-key/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/vite/config.test.js +1 -1
- package/dist/vite/config.test.js.map +1 -1
- package/dist/vite/plugin-docs.test.js +1 -1
- package/dist/vite/plugin-docs.test.js.map +1 -1
- package/lib/{Spinner-7LezPqGn.js → Spinner-BINYpvLB.js} +568 -549
- package/lib/{index-DNx3xWa2.js → index-PyGcnQFX.js} +13 -12
- package/lib/loglevel-CoH7VSwE.js +152 -0
- package/lib/state-2Hu1renZ.js +313 -0
- package/lib/zudoku.auth-auth0.js +2 -1
- package/lib/zudoku.auth-clerk.js +9 -7
- package/lib/zudoku.auth-openid.js +442 -588
- package/lib/zudoku.components.js +135 -151
- package/lib/zudoku.plugins.js +2829 -2800
- package/package.json +2 -1
- package/src/app/App.tsx +2 -1
- package/src/lib/authentication/hook.ts +1 -0
- package/src/lib/authentication/providers/auth0.tsx +1 -0
- package/src/lib/authentication/providers/clerk.tsx +2 -0
- package/src/lib/authentication/providers/openid.tsx +2 -0
- package/src/lib/authentication/state.ts +2 -0
- package/src/lib/components/DevPortal.tsx +0 -1
- package/src/lib/components/Layout.tsx +1 -1
- package/src/lib/components/SyntaxHighlight.tsx +1 -1
- package/src/lib/core/DevPortalContext.ts +5 -4
- package/src/lib/plugins/api-key/CreateApiKey.tsx +2 -8
- package/src/lib/plugins/api-key/SettingsApiKeys.tsx +50 -58
- package/src/lib/plugins/api-key/index.tsx +53 -8
- package/src/lib/plugins/markdown/MdxPage.tsx +1 -1
- package/lib/_commonjsHelpers-BkfeUUK-.js +0 -28
- package/lib/state-oycsxkHz.js +0 -287
package/lib/zudoku.components.js
CHANGED
|
@@ -2,8 +2,8 @@ var De = Object.defineProperty;
|
|
|
2
2
|
var se = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var Te = (t, e, s) => e in t ? De(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
|
|
6
|
+
var x = (t, e, s) => Te(t, typeof e != "symbol" ? e + "" : e, s), ae = (t, e, s) => e.has(t) || se("Cannot " + s);
|
|
7
7
|
var i = (t, e, s) => (ae(t, e, "read from private field"), s ? s.call(t) : e.get(t)), m = (t, e, s) => e.has(t) ? se("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), u = (t, e, s, a) => (ae(t, e, "write to private field"), a ? a.call(t, s) : e.set(t, s), s);
|
|
8
8
|
var F = (t, e, s, a) => ({
|
|
9
9
|
set _(r) {
|
|
@@ -13,21 +13,21 @@ var F = (t, e, s, a) => ({
|
|
|
13
13
|
return i(t, e, a);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import { j as n, u as D, O as
|
|
17
|
-
import { S as me, h as ge, Q as
|
|
18
|
-
import {
|
|
19
|
-
import { memo as je, createContext as
|
|
20
|
-
import { c as
|
|
21
|
-
var
|
|
16
|
+
import { j as n, u as D, O as Ie } from "./index-PyGcnQFX.js";
|
|
17
|
+
import { S as me, h as ge, Q as Se, n as p, m as ne, M as Ee, a as re, b as j, e as Fe, c as Re, d as He, f as Le, o as ie, r as oe, g as ze, i as le, p as ce, s as Ke, j as I, u as U, N as B, k as _e, l as Be, q as Ve, t as W, v as X, w as V, x as ve, y as Ue, z, R as xe, T as ye, C as be, A as We, B as Xe, D as $e, E as Ge, H as Je, F as Ye, G as Ze, I as et, J as tt, K as st, L as at, O as nt, P as rt, U as it, V as ot } from "./Spinner-BINYpvLB.js";
|
|
18
|
+
import { X as Bt, W as Vt } from "./Spinner-BINYpvLB.js";
|
|
19
|
+
import { memo as je, createContext as lt, useEffect as S, useRef as K, useState as ct, forwardRef as ht, Suspense as Pe, useMemo as L } from "react";
|
|
20
|
+
import { c as ut } from "./state-2Hu1renZ.js";
|
|
21
|
+
var y, de, dt = (de = class extends me {
|
|
22
22
|
constructor(e = {}) {
|
|
23
23
|
super();
|
|
24
|
-
m(this,
|
|
25
|
-
this.config = e, u(this,
|
|
24
|
+
m(this, y);
|
|
25
|
+
this.config = e, u(this, y, /* @__PURE__ */ new Map());
|
|
26
26
|
}
|
|
27
27
|
build(e, s, a) {
|
|
28
28
|
const r = s.queryKey, o = s.queryHash ?? ge(r, s);
|
|
29
29
|
let l = this.get(o);
|
|
30
|
-
return l || (l = new
|
|
30
|
+
return l || (l = new Se({
|
|
31
31
|
cache: this,
|
|
32
32
|
queryKey: r,
|
|
33
33
|
queryHash: o,
|
|
@@ -37,14 +37,14 @@ var x, de, dt = (de = class extends me {
|
|
|
37
37
|
}), this.add(l)), l;
|
|
38
38
|
}
|
|
39
39
|
add(e) {
|
|
40
|
-
i(this,
|
|
40
|
+
i(this, y).has(e.queryHash) || (i(this, y).set(e.queryHash, e), this.notify({
|
|
41
41
|
type: "added",
|
|
42
42
|
query: e
|
|
43
43
|
}));
|
|
44
44
|
}
|
|
45
45
|
remove(e) {
|
|
46
|
-
const s = i(this,
|
|
47
|
-
s && (e.destroy(), s === e && i(this,
|
|
46
|
+
const s = i(this, y).get(e.queryHash);
|
|
47
|
+
s && (e.destroy(), s === e && i(this, y).delete(e.queryHash), this.notify({ type: "removed", query: e }));
|
|
48
48
|
}
|
|
49
49
|
clear() {
|
|
50
50
|
p.batch(() => {
|
|
@@ -54,10 +54,10 @@ var x, de, dt = (de = class extends me {
|
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
56
|
get(e) {
|
|
57
|
-
return i(this,
|
|
57
|
+
return i(this, y).get(e);
|
|
58
58
|
}
|
|
59
59
|
getAll() {
|
|
60
|
-
return [...i(this,
|
|
60
|
+
return [...i(this, y).values()];
|
|
61
61
|
}
|
|
62
62
|
find(e) {
|
|
63
63
|
const s = { exact: !0, ...e };
|
|
@@ -90,17 +90,17 @@ var x, de, dt = (de = class extends me {
|
|
|
90
90
|
});
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
|
-
},
|
|
93
|
+
}, y = new WeakMap(), de), f, T, fe, ft = (fe = class extends me {
|
|
94
94
|
constructor(e = {}) {
|
|
95
95
|
super();
|
|
96
96
|
m(this, f);
|
|
97
|
-
m(this,
|
|
98
|
-
this.config = e, u(this, f, /* @__PURE__ */ new Map()), u(this,
|
|
97
|
+
m(this, T);
|
|
98
|
+
this.config = e, u(this, f, /* @__PURE__ */ new Map()), u(this, T, Date.now());
|
|
99
99
|
}
|
|
100
100
|
build(e, s, a) {
|
|
101
|
-
const r = new
|
|
101
|
+
const r = new Ee({
|
|
102
102
|
mutationCache: this,
|
|
103
|
-
mutationId: ++F(this,
|
|
103
|
+
mutationId: ++F(this, T)._,
|
|
104
104
|
options: e.defaultMutationOptions(s),
|
|
105
105
|
state: a
|
|
106
106
|
});
|
|
@@ -163,7 +163,7 @@ var x, de, dt = (de = class extends me {
|
|
|
163
163
|
)
|
|
164
164
|
);
|
|
165
165
|
}
|
|
166
|
-
}, f = new WeakMap(),
|
|
166
|
+
}, f = new WeakMap(), T = new WeakMap(), fe);
|
|
167
167
|
function R(t) {
|
|
168
168
|
var e;
|
|
169
169
|
return ((e = t.options.scope) == null ? void 0 : e.id) ?? String(t.mutationId);
|
|
@@ -182,45 +182,45 @@ function pt(t) {
|
|
|
182
182
|
b = !0;
|
|
183
183
|
}), e.signal)
|
|
184
184
|
});
|
|
185
|
-
}, Qe = Fe(e.options, e.fetchOptions),
|
|
185
|
+
}, Qe = Fe(e.options, e.fetchOptions), _ = async (v, P, O) => {
|
|
186
186
|
if (b)
|
|
187
187
|
return Promise.reject();
|
|
188
|
-
if (
|
|
188
|
+
if (P == null && v.pages.length)
|
|
189
189
|
return Promise.resolve(v);
|
|
190
|
-
const
|
|
190
|
+
const E = {
|
|
191
191
|
queryKey: e.queryKey,
|
|
192
|
-
pageParam:
|
|
192
|
+
pageParam: P,
|
|
193
193
|
direction: O ? "backward" : "forward",
|
|
194
194
|
meta: e.options.meta
|
|
195
195
|
};
|
|
196
|
-
d(
|
|
196
|
+
d(E);
|
|
197
197
|
const qe = await Qe(
|
|
198
|
-
|
|
198
|
+
E
|
|
199
199
|
), { maxPages: ee } = e.options, te = O ? Re : He;
|
|
200
200
|
return {
|
|
201
201
|
pages: te(v.pages, qe, ee),
|
|
202
|
-
pageParams: te(v.pageParams,
|
|
202
|
+
pageParams: te(v.pageParams, P, ee)
|
|
203
203
|
};
|
|
204
204
|
};
|
|
205
|
-
let
|
|
205
|
+
let C;
|
|
206
206
|
if (o && l.length) {
|
|
207
|
-
const v = o === "backward",
|
|
207
|
+
const v = o === "backward", P = v ? mt : he, O = {
|
|
208
208
|
pages: l,
|
|
209
209
|
pageParams: h
|
|
210
|
-
},
|
|
211
|
-
|
|
210
|
+
}, E = P(r, O);
|
|
211
|
+
C = await _(O, E, v);
|
|
212
212
|
} else {
|
|
213
|
-
|
|
213
|
+
C = await _(
|
|
214
214
|
g,
|
|
215
215
|
h[0] ?? r.initialPageParam
|
|
216
216
|
);
|
|
217
217
|
const v = t ?? l.length;
|
|
218
|
-
for (let
|
|
219
|
-
const O = he(r,
|
|
220
|
-
|
|
218
|
+
for (let P = 1; P < v; P++) {
|
|
219
|
+
const O = he(r, C);
|
|
220
|
+
C = await _(C, O);
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
|
-
return
|
|
223
|
+
return C;
|
|
224
224
|
};
|
|
225
225
|
e.options.persister ? e.fetchFn = () => {
|
|
226
226
|
var r, o;
|
|
@@ -257,17 +257,17 @@ function mt(t, { pages: e, pageParams: s }) {
|
|
|
257
257
|
s
|
|
258
258
|
);
|
|
259
259
|
}
|
|
260
|
-
var c,
|
|
260
|
+
var c, w, N, M, A, k, Q, q, pe, gt = (pe = class {
|
|
261
261
|
constructor(t = {}) {
|
|
262
262
|
m(this, c);
|
|
263
|
-
m(this,
|
|
263
|
+
m(this, w);
|
|
264
264
|
m(this, N);
|
|
265
|
-
m(this, C);
|
|
266
265
|
m(this, M);
|
|
266
|
+
m(this, A);
|
|
267
267
|
m(this, k);
|
|
268
268
|
m(this, Q);
|
|
269
269
|
m(this, q);
|
|
270
|
-
u(this, c, t.queryCache || new dt()), u(this,
|
|
270
|
+
u(this, c, t.queryCache || new dt()), u(this, w, t.mutationCache || new ft()), u(this, N, t.defaultOptions || {}), u(this, M, /* @__PURE__ */ new Map()), u(this, A, /* @__PURE__ */ new Map()), u(this, k, 0);
|
|
271
271
|
}
|
|
272
272
|
mount() {
|
|
273
273
|
F(this, k)._++, i(this, k) === 1 && (u(this, Q, Le.subscribe(async (t) => {
|
|
@@ -284,7 +284,7 @@ var c, P, N, C, M, k, Q, q, pe, gt = (pe = class {
|
|
|
284
284
|
return i(this, c).findAll({ ...t, fetchStatus: "fetching" }).length;
|
|
285
285
|
}
|
|
286
286
|
isMutating(t) {
|
|
287
|
-
return i(this,
|
|
287
|
+
return i(this, w).findAll({ ...t, status: "pending" }).length;
|
|
288
288
|
}
|
|
289
289
|
getQueryData(t) {
|
|
290
290
|
var s;
|
|
@@ -392,13 +392,13 @@ var c, P, N, C, M, k, Q, q, pe, gt = (pe = class {
|
|
|
392
392
|
return this.fetchInfiniteQuery(t).then(j).catch(j);
|
|
393
393
|
}
|
|
394
394
|
resumePausedMutations() {
|
|
395
|
-
return ie.isOnline() ? i(this,
|
|
395
|
+
return ie.isOnline() ? i(this, w).resumePausedMutations() : Promise.resolve();
|
|
396
396
|
}
|
|
397
397
|
getQueryCache() {
|
|
398
398
|
return i(this, c);
|
|
399
399
|
}
|
|
400
400
|
getMutationCache() {
|
|
401
|
-
return i(this,
|
|
401
|
+
return i(this, w);
|
|
402
402
|
}
|
|
403
403
|
getDefaultOptions() {
|
|
404
404
|
return i(this, N);
|
|
@@ -407,26 +407,26 @@ var c, P, N, C, M, k, Q, q, pe, gt = (pe = class {
|
|
|
407
407
|
u(this, N, t);
|
|
408
408
|
}
|
|
409
409
|
setQueryDefaults(t, e) {
|
|
410
|
-
i(this,
|
|
410
|
+
i(this, M).set(le(t), {
|
|
411
411
|
queryKey: t,
|
|
412
412
|
defaultOptions: e
|
|
413
413
|
});
|
|
414
414
|
}
|
|
415
415
|
getQueryDefaults(t) {
|
|
416
|
-
const e = [...i(this,
|
|
416
|
+
const e = [...i(this, M).values()];
|
|
417
417
|
let s = {};
|
|
418
418
|
return e.forEach((a) => {
|
|
419
419
|
ce(t, a.queryKey) && (s = { ...s, ...a.defaultOptions });
|
|
420
420
|
}), s;
|
|
421
421
|
}
|
|
422
422
|
setMutationDefaults(t, e) {
|
|
423
|
-
i(this,
|
|
423
|
+
i(this, A).set(le(t), {
|
|
424
424
|
mutationKey: t,
|
|
425
425
|
defaultOptions: e
|
|
426
426
|
});
|
|
427
427
|
}
|
|
428
428
|
getMutationDefaults(t) {
|
|
429
|
-
const e = [...i(this,
|
|
429
|
+
const e = [...i(this, A).values()];
|
|
430
430
|
let s = {};
|
|
431
431
|
return e.forEach((a) => {
|
|
432
432
|
ce(t, a.mutationKey) && (s = { ...s, ...a.defaultOptions });
|
|
@@ -455,29 +455,30 @@ var c, P, N, C, M, k, Q, q, pe, gt = (pe = class {
|
|
|
455
455
|
};
|
|
456
456
|
}
|
|
457
457
|
clear() {
|
|
458
|
-
i(this, c).clear(), i(this,
|
|
458
|
+
i(this, c).clear(), i(this, w).clear();
|
|
459
459
|
}
|
|
460
|
-
}, c = new WeakMap(),
|
|
461
|
-
const
|
|
460
|
+
}, c = new WeakMap(), w = new WeakMap(), N = new WeakMap(), M = new WeakMap(), A = new WeakMap(), k = new WeakMap(), Q = new WeakMap(), q = new WeakMap(), pe);
|
|
461
|
+
const we = (t) => "getRoutes" in t && typeof t.getRoutes == "function", vt = (t) => "initialize" in t && typeof t.initialize == "function", xt = (t) => "getIdentities" in t && typeof t.getIdentities == "function", Ne = new gt(), yt = ut(() => ({}));
|
|
462
462
|
class bt {
|
|
463
463
|
constructor(e) {
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
464
|
+
x(this, "plugins", []);
|
|
465
|
+
x(this, "navigationPlugins");
|
|
466
|
+
x(this, "navigation");
|
|
467
|
+
x(this, "meta");
|
|
468
|
+
x(this, "authentication");
|
|
469
|
+
x(this, "state");
|
|
470
|
+
x(this, "initialize", async () => {
|
|
471
|
+
await Promise.all([
|
|
472
|
+
this.plugins.filter(vt).map((e) => e.initialize(this))
|
|
473
|
+
]);
|
|
473
474
|
});
|
|
474
|
-
|
|
475
|
+
x(this, "invalidateCache", async (e) => {
|
|
475
476
|
await Ne.invalidateQueries({ queryKey: e });
|
|
476
477
|
});
|
|
477
|
-
|
|
478
|
-
this.plugins.filter(
|
|
478
|
+
x(this, "getApiIdentities", async () => (await Promise.all(
|
|
479
|
+
this.plugins.filter(xt).map((s) => s.getIdentities(this))
|
|
479
480
|
)).flat());
|
|
480
|
-
|
|
481
|
+
x(this, "getNavigation", async (e) => (await Promise.all(
|
|
481
482
|
this.navigationPlugins.map(
|
|
482
483
|
async (a) => {
|
|
483
484
|
var r;
|
|
@@ -485,7 +486,7 @@ class bt {
|
|
|
485
486
|
}
|
|
486
487
|
)
|
|
487
488
|
)).flatMap((a) => a ?? []));
|
|
488
|
-
this.plugins = e.plugins ?? [], this.navigation = e.navigation, this.navigationPlugins = this.plugins.filter(
|
|
489
|
+
this.plugins = e.plugins ?? [], this.navigation = e.navigation, this.navigationPlugins = this.plugins.filter(we), this.authentication = e.authentication, this.meta = e.meta, this.state = yt;
|
|
489
490
|
}
|
|
490
491
|
async signRequest(e) {
|
|
491
492
|
if (!this.authentication)
|
|
@@ -500,7 +501,7 @@ class bt {
|
|
|
500
501
|
* This source code is licensed under the ISC license.
|
|
501
502
|
* See the LICENSE file in the root directory of this source tree.
|
|
502
503
|
*/
|
|
503
|
-
const ke =
|
|
504
|
+
const ke = I("ChevronRight", [
|
|
504
505
|
["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
|
|
505
506
|
]);
|
|
506
507
|
/**
|
|
@@ -509,7 +510,7 @@ const ke = E("ChevronRight", [
|
|
|
509
510
|
* This source code is licensed under the ISC license.
|
|
510
511
|
* See the LICENSE file in the root directory of this source tree.
|
|
511
512
|
*/
|
|
512
|
-
const jt =
|
|
513
|
+
const jt = I("ExternalLink", [
|
|
513
514
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
514
515
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
515
516
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
@@ -520,7 +521,7 @@ const jt = E("ExternalLink", [
|
|
|
520
521
|
* This source code is licensed under the ISC license.
|
|
521
522
|
* See the LICENSE file in the root directory of this source tree.
|
|
522
523
|
*/
|
|
523
|
-
const
|
|
524
|
+
const Pt = I("MoonStar", [
|
|
524
525
|
["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9", key: "4ay0iu" }],
|
|
525
526
|
["path", { d: "M20 3v4", key: "1olli1" }],
|
|
526
527
|
["path", { d: "M22 5h-4", key: "1gvqau" }]
|
|
@@ -531,7 +532,7 @@ const wt = E("MoonStar", [
|
|
|
531
532
|
* This source code is licensed under the ISC license.
|
|
532
533
|
* See the LICENSE file in the root directory of this source tree.
|
|
533
534
|
*/
|
|
534
|
-
const
|
|
535
|
+
const wt = I("Search", [
|
|
535
536
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
536
537
|
["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
|
|
537
538
|
]);
|
|
@@ -541,7 +542,7 @@ const Pt = E("Search", [
|
|
|
541
542
|
* This source code is licensed under the ISC license.
|
|
542
543
|
* See the LICENSE file in the root directory of this source tree.
|
|
543
544
|
*/
|
|
544
|
-
const Nt =
|
|
545
|
+
const Nt = I("Sun", [
|
|
545
546
|
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
|
|
546
547
|
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
547
548
|
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
@@ -552,26 +553,9 @@ const Nt = E("Sun", [
|
|
|
552
553
|
["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
|
|
553
554
|
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
554
555
|
]), kt = () => {
|
|
555
|
-
const {
|
|
556
|
-
return {
|
|
557
|
-
isAuthEnabled: s,
|
|
558
|
-
profile: e.profile,
|
|
559
|
-
isAuthenticated: e.profile,
|
|
560
|
-
login: async () => {
|
|
561
|
-
if (!s)
|
|
562
|
-
throw new Error("Authentication is not enabled.");
|
|
563
|
-
await t.login();
|
|
564
|
-
},
|
|
565
|
-
logout: async () => {
|
|
566
|
-
if (!s)
|
|
567
|
-
throw new Error("Authentication is not enabled.");
|
|
568
|
-
await t.logout(), window.location.href = "/";
|
|
569
|
-
}
|
|
570
|
-
};
|
|
571
|
-
}, Ot = () => {
|
|
572
|
-
const { navigation: t } = K();
|
|
556
|
+
const { navigation: t } = U();
|
|
573
557
|
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(
|
|
574
|
-
|
|
558
|
+
B,
|
|
575
559
|
{
|
|
576
560
|
className: ({ isActive: s }) => _e(
|
|
577
561
|
"block py-3.5 font-medium -mb-px border-b-2",
|
|
@@ -582,7 +566,7 @@ const Nt = E("Sun", [
|
|
|
582
566
|
}
|
|
583
567
|
) }, e.label)) }) });
|
|
584
568
|
}, Oe = je(function() {
|
|
585
|
-
const [e, s] = Be(), { isAuthenticated: a, profile: r, isAuthEnabled: o, login: l, logout: h } =
|
|
569
|
+
const [e, s] = Be(), { isAuthenticated: a, profile: r, isAuthEnabled: o, login: l, logout: h } = Ve(), { meta: g } = U(), b = e ? Pt : Nt;
|
|
586
570
|
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: [
|
|
587
571
|
/* @__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: [
|
|
588
572
|
/* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-3.5", children: [
|
|
@@ -592,7 +576,7 @@ const Nt = E("Sun", [
|
|
|
592
576
|
/* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
|
|
593
577
|
/* @__PURE__ */ n.jsx("div", { className: "w-full max-w-prose", children: /* @__PURE__ */ n.jsxs("button", { className: "flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-40 sm:w-72", children: [
|
|
594
578
|
/* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
|
|
595
|
-
/* @__PURE__ */ n.jsx(
|
|
579
|
+
/* @__PURE__ */ n.jsx(wt, { size: 14 }),
|
|
596
580
|
"Search"
|
|
597
581
|
] }),
|
|
598
582
|
/* @__PURE__ */ n.jsx("kbd", { className: "absolute right-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border border-border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: "⌘K" })
|
|
@@ -627,13 +611,13 @@ const Nt = E("Sun", [
|
|
|
627
611
|
] })
|
|
628
612
|
] })
|
|
629
613
|
] }),
|
|
630
|
-
/* @__PURE__ */ n.jsx(
|
|
614
|
+
/* @__PURE__ */ n.jsx(kt, {})
|
|
631
615
|
] }) });
|
|
632
|
-
}),
|
|
616
|
+
}), Ce = {
|
|
633
617
|
Header: Oe
|
|
634
|
-
},
|
|
618
|
+
}, Ot = lt(Ce), Ct = Ot.Provider, Mt = () => {
|
|
635
619
|
const t = D(), { setActiveAnchor: e } = W();
|
|
636
|
-
|
|
620
|
+
S(() => {
|
|
637
621
|
if (!t.hash) return;
|
|
638
622
|
const s = t.hash.split("/")[0].slice(1), a = document.getElementById(decodeURIComponent(s));
|
|
639
623
|
if (a) {
|
|
@@ -648,21 +632,21 @@ const Nt = E("Sun", [
|
|
|
648
632
|
});
|
|
649
633
|
return r.observe(document.body, { childList: !0, subtree: !0 }), () => r.disconnect();
|
|
650
634
|
}, [t.hash, e]);
|
|
651
|
-
},
|
|
652
|
-
const t = D(), e =
|
|
653
|
-
|
|
635
|
+
}, At = () => {
|
|
636
|
+
const t = D(), e = K(t.pathname);
|
|
637
|
+
S(() => {
|
|
654
638
|
e.current !== t.pathname && (window.scrollTo(0, 0), e.current = t.pathname);
|
|
655
639
|
}, [t.pathname]);
|
|
656
|
-
},
|
|
640
|
+
}, Me = ({
|
|
657
641
|
item: t,
|
|
658
642
|
defaultOpen: e,
|
|
659
643
|
path: s
|
|
660
644
|
}) => {
|
|
661
|
-
const [a, r] =
|
|
662
|
-
return
|
|
645
|
+
const [a, r] = ct(e), o = D(), l = K(o.pathname);
|
|
646
|
+
return S(() => {
|
|
663
647
|
!a && l.current !== o.pathname && r(X(t, o.pathname, s)), l.current = o.pathname;
|
|
664
648
|
}, [a, t, s, o.pathname]), [a, r];
|
|
665
|
-
}, H =
|
|
649
|
+
}, H = Xe(
|
|
666
650
|
"flex px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent transition-colors duration-300",
|
|
667
651
|
{
|
|
668
652
|
variants: {
|
|
@@ -676,19 +660,19 @@ const Nt = E("Sun", [
|
|
|
676
660
|
}
|
|
677
661
|
}
|
|
678
662
|
}
|
|
679
|
-
),
|
|
663
|
+
), Qt = "data-anchor", Ae = ({
|
|
680
664
|
category: t,
|
|
681
665
|
item: e,
|
|
682
666
|
activeAnchor: s,
|
|
683
667
|
currentTopNavItem: a,
|
|
684
668
|
basePath: r = ""
|
|
685
669
|
}) => {
|
|
686
|
-
const o =
|
|
670
|
+
const o = V(e) ? ve(r, e.path) : "", l = D(), [h, g] = Me({
|
|
687
671
|
item: e,
|
|
688
672
|
path: o,
|
|
689
673
|
defaultOpen: () => X(e, l.pathname, o)
|
|
690
674
|
});
|
|
691
|
-
if (
|
|
675
|
+
if (Ue(e)) {
|
|
692
676
|
const d = z(
|
|
693
677
|
"flex items-center gap-2",
|
|
694
678
|
H({
|
|
@@ -707,7 +691,7 @@ const Nt = E("Sun", [
|
|
|
707
691
|
/* @__PURE__ */ n.jsx(jt, { size: 14 })
|
|
708
692
|
]
|
|
709
693
|
}
|
|
710
|
-
) : /* @__PURE__ */ n.jsx(
|
|
694
|
+
) : /* @__PURE__ */ n.jsx(B, { className: d, to: e.href, children: e.label });
|
|
711
695
|
}
|
|
712
696
|
const b = /* @__PURE__ */ n.jsxs("div", { className: "flex justify-between w-full", children: [
|
|
713
697
|
/* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2 truncate w-full", children: [
|
|
@@ -723,14 +707,14 @@ const Nt = E("Sun", [
|
|
|
723
707
|
)
|
|
724
708
|
] });
|
|
725
709
|
return /* @__PURE__ */ n.jsx("li", { title: typeof e.label == "string" ? e.label : e.title, children: e.children ? /* @__PURE__ */ n.jsxs(
|
|
726
|
-
|
|
710
|
+
xe,
|
|
727
711
|
{
|
|
728
712
|
open: h,
|
|
729
713
|
onOpenChange: () => g((d) => !d),
|
|
730
714
|
className: "flex flex-col",
|
|
731
715
|
children: [
|
|
732
716
|
/* @__PURE__ */ n.jsx(
|
|
733
|
-
|
|
717
|
+
ye,
|
|
734
718
|
{
|
|
735
719
|
className: z(
|
|
736
720
|
"group text-start",
|
|
@@ -740,7 +724,7 @@ const Nt = E("Sun", [
|
|
|
740
724
|
}
|
|
741
725
|
),
|
|
742
726
|
/* @__PURE__ */ n.jsx(be, { 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((d) => /* @__PURE__ */ n.jsx(
|
|
743
|
-
|
|
727
|
+
Ae,
|
|
744
728
|
{
|
|
745
729
|
category: t,
|
|
746
730
|
item: d,
|
|
@@ -748,15 +732,15 @@ const Nt = E("Sun", [
|
|
|
748
732
|
currentTopNavItem: a,
|
|
749
733
|
basePath: o
|
|
750
734
|
},
|
|
751
|
-
|
|
735
|
+
V(d) ? d.path : d.href
|
|
752
736
|
)) }) })
|
|
753
737
|
]
|
|
754
738
|
}
|
|
755
739
|
) : e.path.startsWith("#") ? /* @__PURE__ */ n.jsx(
|
|
756
|
-
|
|
740
|
+
We,
|
|
757
741
|
{
|
|
758
742
|
to: e.path,
|
|
759
|
-
[
|
|
743
|
+
[Qt]: e.path,
|
|
760
744
|
className: H({
|
|
761
745
|
isActive: e.path.slice(1) === s,
|
|
762
746
|
isMuted: e.muted
|
|
@@ -764,28 +748,28 @@ const Nt = E("Sun", [
|
|
|
764
748
|
children: b
|
|
765
749
|
}
|
|
766
750
|
) : /* @__PURE__ */ n.jsx(
|
|
767
|
-
|
|
751
|
+
B,
|
|
768
752
|
{
|
|
769
753
|
className: ({ isActive: d }) => H({ isActive: d }),
|
|
770
754
|
to: o,
|
|
771
755
|
children: b
|
|
772
756
|
}
|
|
773
757
|
) });
|
|
774
|
-
},
|
|
758
|
+
}, qt = ({
|
|
775
759
|
category: t
|
|
776
760
|
}) => {
|
|
777
|
-
const { activeAnchor: e } = W(), s =
|
|
761
|
+
const { activeAnchor: e } = W(), s = $e(), a = D(), r = t.collapsible ?? !0, [o, l] = Me({
|
|
778
762
|
item: t,
|
|
779
763
|
path: (s == null ? void 0 : s.path) ?? "",
|
|
780
764
|
defaultOpen: () => !r || t.expanded || X(t, a.pathname, (s == null ? void 0 : s.path) ?? "")
|
|
781
765
|
});
|
|
782
766
|
return /* @__PURE__ */ n.jsxs(
|
|
783
|
-
|
|
767
|
+
xe,
|
|
784
768
|
{
|
|
785
769
|
open: o,
|
|
786
770
|
onOpenChange: () => l((h) => !h),
|
|
787
771
|
children: [
|
|
788
|
-
t.label.length > 0 ? /* @__PURE__ */ n.jsx(
|
|
772
|
+
t.label.length > 0 ? /* @__PURE__ */ n.jsx(ye, { asChild: r, disabled: !r, children: /* @__PURE__ */ n.jsxs(
|
|
789
773
|
"h5",
|
|
790
774
|
{
|
|
791
775
|
className: z(
|
|
@@ -805,7 +789,7 @@ const Nt = E("Sun", [
|
|
|
805
789
|
}
|
|
806
790
|
) }) : "Endpoints",
|
|
807
791
|
/* @__PURE__ */ n.jsx(be, { 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(
|
|
808
|
-
|
|
792
|
+
Ae,
|
|
809
793
|
{
|
|
810
794
|
category: t,
|
|
811
795
|
item: h,
|
|
@@ -813,13 +797,13 @@ const Nt = E("Sun", [
|
|
|
813
797
|
currentTopNavItem: s,
|
|
814
798
|
basePath: ve(s == null ? void 0 : s.path, t.path)
|
|
815
799
|
},
|
|
816
|
-
|
|
800
|
+
V(h) ? h.path + h.label : h.href
|
|
817
801
|
)) }) })
|
|
818
802
|
]
|
|
819
803
|
},
|
|
820
804
|
t.label
|
|
821
805
|
);
|
|
822
|
-
},
|
|
806
|
+
}, Dt = ht(function({ children: e, className: s, pushMainContent: a }, r) {
|
|
823
807
|
return /* @__PURE__ */ n.jsx(
|
|
824
808
|
"nav",
|
|
825
809
|
{
|
|
@@ -832,43 +816,43 @@ const Nt = E("Sun", [
|
|
|
832
816
|
children: e
|
|
833
817
|
}
|
|
834
818
|
);
|
|
835
|
-
}),
|
|
836
|
-
const t =
|
|
819
|
+
}), Tt = () => {
|
|
820
|
+
const t = K(null), e = Ge();
|
|
837
821
|
return /* @__PURE__ */ n.jsx(
|
|
838
|
-
|
|
822
|
+
Dt,
|
|
839
823
|
{
|
|
840
824
|
ref: t,
|
|
841
825
|
pushMainContent: e.data.items.length > 0,
|
|
842
|
-
children: e.data.items.map((s) => /* @__PURE__ */ n.jsx(
|
|
826
|
+
children: e.data.items.map((s) => /* @__PURE__ */ n.jsx(qt, { category: s }, s.label))
|
|
843
827
|
}
|
|
844
828
|
);
|
|
845
829
|
}, ue = ({ children: t }) => {
|
|
846
|
-
const e = D(), { setActiveAnchor: s } = W(), { meta: a } =
|
|
847
|
-
Mt(),
|
|
848
|
-
const r =
|
|
849
|
-
return
|
|
830
|
+
const e = D(), { setActiveAnchor: s } = W(), { meta: a } = U();
|
|
831
|
+
Mt(), At();
|
|
832
|
+
const r = K(e.pathname);
|
|
833
|
+
return S(() => {
|
|
850
834
|
e.pathname !== r.current && s(""), r.current = e.pathname;
|
|
851
835
|
}, [e.pathname, s]), /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
852
|
-
/* @__PURE__ */ n.jsxs(
|
|
836
|
+
/* @__PURE__ */ n.jsxs(Je, { titleTemplate: a == null ? void 0 : a.pageTitle, children: [
|
|
853
837
|
/* @__PURE__ */ n.jsx("title", { children: "Home" }),
|
|
854
838
|
(a == null ? void 0 : a.description) && /* @__PURE__ */ n.jsx("meta", { name: "description", content: a.description }),
|
|
855
839
|
(a == null ? void 0 : a.favicon) && /* @__PURE__ */ n.jsx("link", { rel: "icon", href: a.favicon })
|
|
856
840
|
] }),
|
|
857
841
|
/* @__PURE__ */ n.jsx(Oe, {}),
|
|
858
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(
|
|
859
|
-
|
|
843
|
+
Pe,
|
|
860
844
|
{
|
|
861
|
-
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(Ye, {}) }),
|
|
862
846
|
children: [
|
|
863
|
-
/* @__PURE__ */ n.jsx(
|
|
847
|
+
/* @__PURE__ */ n.jsx(Tt, {}),
|
|
864
848
|
/* @__PURE__ */ n.jsx(
|
|
865
849
|
"main",
|
|
866
850
|
{
|
|
867
|
-
className: `dark:border-white/10 translate-x-0
|
|
851
|
+
className: `dark:border-white/10 translate-x-0 h-full
|
|
868
852
|
lg:overflow-visible
|
|
869
853
|
lg:peer-data-[navigation=true]:w-[calc(100%-var(--side-nav-width))]
|
|
870
854
|
lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] peer-data-[navigation=true]:pl-12`,
|
|
871
|
-
children: t ?? /* @__PURE__ */ n.jsx(
|
|
855
|
+
children: t ?? /* @__PURE__ */ n.jsx(Ie, {})
|
|
872
856
|
}
|
|
873
857
|
)
|
|
874
858
|
]
|
|
@@ -876,12 +860,12 @@ const Nt = E("Sun", [
|
|
|
876
860
|
) })
|
|
877
861
|
] });
|
|
878
862
|
};
|
|
879
|
-
function
|
|
863
|
+
function It({ plugins: t }) {
|
|
880
864
|
const e = L(() => {
|
|
881
865
|
const s = (t ?? []).flatMap(
|
|
882
|
-
(a) =>
|
|
866
|
+
(a) => we(a) ? a.getRoutes() : []
|
|
883
867
|
);
|
|
884
|
-
return
|
|
868
|
+
return Ze([
|
|
885
869
|
{
|
|
886
870
|
path: "/",
|
|
887
871
|
element: /* @__PURE__ */ n.jsx(ue, {}),
|
|
@@ -890,24 +874,24 @@ function Tt({ plugins: t }) {
|
|
|
890
874
|
}
|
|
891
875
|
]);
|
|
892
876
|
}, [t]);
|
|
893
|
-
return /* @__PURE__ */ n.jsx(
|
|
877
|
+
return /* @__PURE__ */ n.jsx(et, { router: e });
|
|
894
878
|
}
|
|
895
|
-
const
|
|
879
|
+
const St = (t) => {
|
|
896
880
|
const e = L(
|
|
897
|
-
() => ({ ...
|
|
881
|
+
() => ({ ...Ce, ...t.overrides }),
|
|
898
882
|
[t.overrides]
|
|
899
883
|
), s = L(
|
|
900
|
-
() => ({ ...
|
|
884
|
+
() => ({ ...tt, ...t.mdxComponents }),
|
|
901
885
|
[t.mdxComponents]
|
|
902
886
|
), a = L(() => new bt(t), [t]);
|
|
903
|
-
return
|
|
887
|
+
return S(() => {
|
|
904
888
|
a.initialize();
|
|
905
|
-
}, [a]), /* @__PURE__ */ n.jsx(
|
|
906
|
-
|
|
889
|
+
}, [a]), /* @__PURE__ */ n.jsx(st, { client: Ne, children: /* @__PURE__ */ n.jsx(at, { children: /* @__PURE__ */ n.jsx(nt, { value: a, children: /* @__PURE__ */ n.jsx(rt, { components: s, children: /* @__PURE__ */ n.jsx(it, { children: /* @__PURE__ */ n.jsx(Ct, { value: e, children: /* @__PURE__ */ n.jsx(ot, { children: /* @__PURE__ */ n.jsx(
|
|
890
|
+
Pe,
|
|
907
891
|
{
|
|
908
892
|
fallback: /* @__PURE__ */ n.jsx("div", { className: "grid place-items-center h-full", children: "Loading..." }),
|
|
909
893
|
children: /* @__PURE__ */ n.jsx(
|
|
910
|
-
|
|
894
|
+
It,
|
|
911
895
|
{
|
|
912
896
|
plugins: [
|
|
913
897
|
...t.plugins ?? [],
|
|
@@ -917,10 +901,10 @@ const It = (t) => {
|
|
|
917
901
|
)
|
|
918
902
|
}
|
|
919
903
|
) }) }) }) }) }) }) });
|
|
920
|
-
},
|
|
921
|
-
|
|
904
|
+
}, Et = je(St);
|
|
905
|
+
Et.displayName = "DevPortal";
|
|
922
906
|
export {
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
907
|
+
Et as DevPortal,
|
|
908
|
+
Bt as Link,
|
|
909
|
+
Vt as useMDXComponents
|
|
926
910
|
};
|