zudoku 0.3.0-dev.4 → 0.3.0-dev.5
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/lib/components/Layout.js +1 -1
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/plugins/api-key/SettingsApiKeys.js +6 -7
- package/dist/lib/plugins/api-key/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/api-key/index.js +19 -7
- 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/lib/{Spinner-7LezPqGn.js → Spinner-DWHrSHMP.js} +567 -549
- package/lib/state-DfftBQ9X.js +312 -0
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-clerk.js +1 -1
- package/lib/zudoku.auth-openid.js +3 -4
- package/lib/zudoku.components.js +132 -149
- package/lib/zudoku.plugins.js +2412 -2402
- package/package.json +1 -1
- package/src/lib/components/Layout.tsx +1 -1
- package/src/lib/plugins/api-key/SettingsApiKeys.tsx +47 -50
- package/src/lib/plugins/api-key/index.tsx +26 -6
- 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-DNx3xWa2.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-DWHrSHMP.js";
|
|
18
|
+
import { X as Bt, W as Vt } from "./Spinner-DWHrSHMP.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-DfftBQ9X.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,29 @@ 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
|
-
|
|
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
471
|
var e;
|
|
472
472
|
this.plugins.filter(vt).forEach((s) => s.initialize(this)), (e = this.authentication) == null || e.initialize(this);
|
|
473
473
|
});
|
|
474
|
-
|
|
474
|
+
x(this, "invalidateCache", async (e) => {
|
|
475
475
|
await Ne.invalidateQueries({ queryKey: e });
|
|
476
476
|
});
|
|
477
|
-
|
|
478
|
-
this.plugins.filter(
|
|
477
|
+
x(this, "getApiIdentities", async () => (await Promise.all(
|
|
478
|
+
this.plugins.filter(xt).map((s) => s.getIdentities(this))
|
|
479
479
|
)).flat());
|
|
480
|
-
|
|
480
|
+
x(this, "getNavigation", async (e) => (await Promise.all(
|
|
481
481
|
this.navigationPlugins.map(
|
|
482
482
|
async (a) => {
|
|
483
483
|
var r;
|
|
@@ -485,7 +485,7 @@ class bt {
|
|
|
485
485
|
}
|
|
486
486
|
)
|
|
487
487
|
)).flatMap((a) => a ?? []));
|
|
488
|
-
this.plugins = e.plugins ?? [], this.navigation = e.navigation, this.navigationPlugins = this.plugins.filter(
|
|
488
|
+
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
489
|
}
|
|
490
490
|
async signRequest(e) {
|
|
491
491
|
if (!this.authentication)
|
|
@@ -500,7 +500,7 @@ class bt {
|
|
|
500
500
|
* This source code is licensed under the ISC license.
|
|
501
501
|
* See the LICENSE file in the root directory of this source tree.
|
|
502
502
|
*/
|
|
503
|
-
const ke =
|
|
503
|
+
const ke = I("ChevronRight", [
|
|
504
504
|
["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
|
|
505
505
|
]);
|
|
506
506
|
/**
|
|
@@ -509,7 +509,7 @@ const ke = E("ChevronRight", [
|
|
|
509
509
|
* This source code is licensed under the ISC license.
|
|
510
510
|
* See the LICENSE file in the root directory of this source tree.
|
|
511
511
|
*/
|
|
512
|
-
const jt =
|
|
512
|
+
const jt = I("ExternalLink", [
|
|
513
513
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
514
514
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
515
515
|
["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 +520,7 @@ const jt = E("ExternalLink", [
|
|
|
520
520
|
* This source code is licensed under the ISC license.
|
|
521
521
|
* See the LICENSE file in the root directory of this source tree.
|
|
522
522
|
*/
|
|
523
|
-
const
|
|
523
|
+
const Pt = I("MoonStar", [
|
|
524
524
|
["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9", key: "4ay0iu" }],
|
|
525
525
|
["path", { d: "M20 3v4", key: "1olli1" }],
|
|
526
526
|
["path", { d: "M22 5h-4", key: "1gvqau" }]
|
|
@@ -531,7 +531,7 @@ const wt = E("MoonStar", [
|
|
|
531
531
|
* This source code is licensed under the ISC license.
|
|
532
532
|
* See the LICENSE file in the root directory of this source tree.
|
|
533
533
|
*/
|
|
534
|
-
const
|
|
534
|
+
const wt = I("Search", [
|
|
535
535
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
536
536
|
["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
|
|
537
537
|
]);
|
|
@@ -541,7 +541,7 @@ const Pt = E("Search", [
|
|
|
541
541
|
* This source code is licensed under the ISC license.
|
|
542
542
|
* See the LICENSE file in the root directory of this source tree.
|
|
543
543
|
*/
|
|
544
|
-
const Nt =
|
|
544
|
+
const Nt = I("Sun", [
|
|
545
545
|
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
|
|
546
546
|
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
547
547
|
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
@@ -552,26 +552,9 @@ const Nt = E("Sun", [
|
|
|
552
552
|
["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
|
|
553
553
|
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
554
554
|
]), 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();
|
|
555
|
+
const { navigation: t } = U();
|
|
573
556
|
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
|
-
|
|
557
|
+
B,
|
|
575
558
|
{
|
|
576
559
|
className: ({ isActive: s }) => _e(
|
|
577
560
|
"block py-3.5 font-medium -mb-px border-b-2",
|
|
@@ -582,7 +565,7 @@ const Nt = E("Sun", [
|
|
|
582
565
|
}
|
|
583
566
|
) }, e.label)) }) });
|
|
584
567
|
}, Oe = je(function() {
|
|
585
|
-
const [e, s] = Be(), { isAuthenticated: a, profile: r, isAuthEnabled: o, login: l, logout: h } =
|
|
568
|
+
const [e, s] = Be(), { isAuthenticated: a, profile: r, isAuthEnabled: o, login: l, logout: h } = Ve(), { meta: g } = U(), b = e ? Pt : Nt;
|
|
586
569
|
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
570
|
/* @__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
571
|
/* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-3.5", children: [
|
|
@@ -592,7 +575,7 @@ const Nt = E("Sun", [
|
|
|
592
575
|
/* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
|
|
593
576
|
/* @__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
577
|
/* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
|
|
595
|
-
/* @__PURE__ */ n.jsx(
|
|
578
|
+
/* @__PURE__ */ n.jsx(wt, { size: 14 }),
|
|
596
579
|
"Search"
|
|
597
580
|
] }),
|
|
598
581
|
/* @__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 +610,13 @@ const Nt = E("Sun", [
|
|
|
627
610
|
] })
|
|
628
611
|
] })
|
|
629
612
|
] }),
|
|
630
|
-
/* @__PURE__ */ n.jsx(
|
|
613
|
+
/* @__PURE__ */ n.jsx(kt, {})
|
|
631
614
|
] }) });
|
|
632
|
-
}),
|
|
615
|
+
}), Ce = {
|
|
633
616
|
Header: Oe
|
|
634
|
-
},
|
|
617
|
+
}, Ot = lt(Ce), Ct = Ot.Provider, Mt = () => {
|
|
635
618
|
const t = D(), { setActiveAnchor: e } = W();
|
|
636
|
-
|
|
619
|
+
S(() => {
|
|
637
620
|
if (!t.hash) return;
|
|
638
621
|
const s = t.hash.split("/")[0].slice(1), a = document.getElementById(decodeURIComponent(s));
|
|
639
622
|
if (a) {
|
|
@@ -648,21 +631,21 @@ const Nt = E("Sun", [
|
|
|
648
631
|
});
|
|
649
632
|
return r.observe(document.body, { childList: !0, subtree: !0 }), () => r.disconnect();
|
|
650
633
|
}, [t.hash, e]);
|
|
651
|
-
},
|
|
652
|
-
const t = D(), e =
|
|
653
|
-
|
|
634
|
+
}, At = () => {
|
|
635
|
+
const t = D(), e = K(t.pathname);
|
|
636
|
+
S(() => {
|
|
654
637
|
e.current !== t.pathname && (window.scrollTo(0, 0), e.current = t.pathname);
|
|
655
638
|
}, [t.pathname]);
|
|
656
|
-
},
|
|
639
|
+
}, Me = ({
|
|
657
640
|
item: t,
|
|
658
641
|
defaultOpen: e,
|
|
659
642
|
path: s
|
|
660
643
|
}) => {
|
|
661
|
-
const [a, r] =
|
|
662
|
-
return
|
|
644
|
+
const [a, r] = ct(e), o = D(), l = K(o.pathname);
|
|
645
|
+
return S(() => {
|
|
663
646
|
!a && l.current !== o.pathname && r(X(t, o.pathname, s)), l.current = o.pathname;
|
|
664
647
|
}, [a, t, s, o.pathname]), [a, r];
|
|
665
|
-
}, H =
|
|
648
|
+
}, H = Xe(
|
|
666
649
|
"flex px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent transition-colors duration-300",
|
|
667
650
|
{
|
|
668
651
|
variants: {
|
|
@@ -676,19 +659,19 @@ const Nt = E("Sun", [
|
|
|
676
659
|
}
|
|
677
660
|
}
|
|
678
661
|
}
|
|
679
|
-
),
|
|
662
|
+
), Qt = "data-anchor", Ae = ({
|
|
680
663
|
category: t,
|
|
681
664
|
item: e,
|
|
682
665
|
activeAnchor: s,
|
|
683
666
|
currentTopNavItem: a,
|
|
684
667
|
basePath: r = ""
|
|
685
668
|
}) => {
|
|
686
|
-
const o =
|
|
669
|
+
const o = V(e) ? ve(r, e.path) : "", l = D(), [h, g] = Me({
|
|
687
670
|
item: e,
|
|
688
671
|
path: o,
|
|
689
672
|
defaultOpen: () => X(e, l.pathname, o)
|
|
690
673
|
});
|
|
691
|
-
if (
|
|
674
|
+
if (Ue(e)) {
|
|
692
675
|
const d = z(
|
|
693
676
|
"flex items-center gap-2",
|
|
694
677
|
H({
|
|
@@ -707,7 +690,7 @@ const Nt = E("Sun", [
|
|
|
707
690
|
/* @__PURE__ */ n.jsx(jt, { size: 14 })
|
|
708
691
|
]
|
|
709
692
|
}
|
|
710
|
-
) : /* @__PURE__ */ n.jsx(
|
|
693
|
+
) : /* @__PURE__ */ n.jsx(B, { className: d, to: e.href, children: e.label });
|
|
711
694
|
}
|
|
712
695
|
const b = /* @__PURE__ */ n.jsxs("div", { className: "flex justify-between w-full", children: [
|
|
713
696
|
/* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2 truncate w-full", children: [
|
|
@@ -723,14 +706,14 @@ const Nt = E("Sun", [
|
|
|
723
706
|
)
|
|
724
707
|
] });
|
|
725
708
|
return /* @__PURE__ */ n.jsx("li", { title: typeof e.label == "string" ? e.label : e.title, children: e.children ? /* @__PURE__ */ n.jsxs(
|
|
726
|
-
|
|
709
|
+
xe,
|
|
727
710
|
{
|
|
728
711
|
open: h,
|
|
729
712
|
onOpenChange: () => g((d) => !d),
|
|
730
713
|
className: "flex flex-col",
|
|
731
714
|
children: [
|
|
732
715
|
/* @__PURE__ */ n.jsx(
|
|
733
|
-
|
|
716
|
+
ye,
|
|
734
717
|
{
|
|
735
718
|
className: z(
|
|
736
719
|
"group text-start",
|
|
@@ -740,7 +723,7 @@ const Nt = E("Sun", [
|
|
|
740
723
|
}
|
|
741
724
|
),
|
|
742
725
|
/* @__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
|
-
|
|
726
|
+
Ae,
|
|
744
727
|
{
|
|
745
728
|
category: t,
|
|
746
729
|
item: d,
|
|
@@ -748,15 +731,15 @@ const Nt = E("Sun", [
|
|
|
748
731
|
currentTopNavItem: a,
|
|
749
732
|
basePath: o
|
|
750
733
|
},
|
|
751
|
-
|
|
734
|
+
V(d) ? d.path : d.href
|
|
752
735
|
)) }) })
|
|
753
736
|
]
|
|
754
737
|
}
|
|
755
738
|
) : e.path.startsWith("#") ? /* @__PURE__ */ n.jsx(
|
|
756
|
-
|
|
739
|
+
We,
|
|
757
740
|
{
|
|
758
741
|
to: e.path,
|
|
759
|
-
[
|
|
742
|
+
[Qt]: e.path,
|
|
760
743
|
className: H({
|
|
761
744
|
isActive: e.path.slice(1) === s,
|
|
762
745
|
isMuted: e.muted
|
|
@@ -764,28 +747,28 @@ const Nt = E("Sun", [
|
|
|
764
747
|
children: b
|
|
765
748
|
}
|
|
766
749
|
) : /* @__PURE__ */ n.jsx(
|
|
767
|
-
|
|
750
|
+
B,
|
|
768
751
|
{
|
|
769
752
|
className: ({ isActive: d }) => H({ isActive: d }),
|
|
770
753
|
to: o,
|
|
771
754
|
children: b
|
|
772
755
|
}
|
|
773
756
|
) });
|
|
774
|
-
},
|
|
757
|
+
}, qt = ({
|
|
775
758
|
category: t
|
|
776
759
|
}) => {
|
|
777
|
-
const { activeAnchor: e } = W(), s =
|
|
760
|
+
const { activeAnchor: e } = W(), s = $e(), a = D(), r = t.collapsible ?? !0, [o, l] = Me({
|
|
778
761
|
item: t,
|
|
779
762
|
path: (s == null ? void 0 : s.path) ?? "",
|
|
780
763
|
defaultOpen: () => !r || t.expanded || X(t, a.pathname, (s == null ? void 0 : s.path) ?? "")
|
|
781
764
|
});
|
|
782
765
|
return /* @__PURE__ */ n.jsxs(
|
|
783
|
-
|
|
766
|
+
xe,
|
|
784
767
|
{
|
|
785
768
|
open: o,
|
|
786
769
|
onOpenChange: () => l((h) => !h),
|
|
787
770
|
children: [
|
|
788
|
-
t.label.length > 0 ? /* @__PURE__ */ n.jsx(
|
|
771
|
+
t.label.length > 0 ? /* @__PURE__ */ n.jsx(ye, { asChild: r, disabled: !r, children: /* @__PURE__ */ n.jsxs(
|
|
789
772
|
"h5",
|
|
790
773
|
{
|
|
791
774
|
className: z(
|
|
@@ -805,7 +788,7 @@ const Nt = E("Sun", [
|
|
|
805
788
|
}
|
|
806
789
|
) }) : "Endpoints",
|
|
807
790
|
/* @__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
|
-
|
|
791
|
+
Ae,
|
|
809
792
|
{
|
|
810
793
|
category: t,
|
|
811
794
|
item: h,
|
|
@@ -813,13 +796,13 @@ const Nt = E("Sun", [
|
|
|
813
796
|
currentTopNavItem: s,
|
|
814
797
|
basePath: ve(s == null ? void 0 : s.path, t.path)
|
|
815
798
|
},
|
|
816
|
-
|
|
799
|
+
V(h) ? h.path + h.label : h.href
|
|
817
800
|
)) }) })
|
|
818
801
|
]
|
|
819
802
|
},
|
|
820
803
|
t.label
|
|
821
804
|
);
|
|
822
|
-
},
|
|
805
|
+
}, Dt = ht(function({ children: e, className: s, pushMainContent: a }, r) {
|
|
823
806
|
return /* @__PURE__ */ n.jsx(
|
|
824
807
|
"nav",
|
|
825
808
|
{
|
|
@@ -832,43 +815,43 @@ const Nt = E("Sun", [
|
|
|
832
815
|
children: e
|
|
833
816
|
}
|
|
834
817
|
);
|
|
835
|
-
}),
|
|
836
|
-
const t =
|
|
818
|
+
}), Tt = () => {
|
|
819
|
+
const t = K(null), e = Ge();
|
|
837
820
|
return /* @__PURE__ */ n.jsx(
|
|
838
|
-
|
|
821
|
+
Dt,
|
|
839
822
|
{
|
|
840
823
|
ref: t,
|
|
841
824
|
pushMainContent: e.data.items.length > 0,
|
|
842
|
-
children: e.data.items.map((s) => /* @__PURE__ */ n.jsx(
|
|
825
|
+
children: e.data.items.map((s) => /* @__PURE__ */ n.jsx(qt, { category: s }, s.label))
|
|
843
826
|
}
|
|
844
827
|
);
|
|
845
828
|
}, ue = ({ children: t }) => {
|
|
846
|
-
const e = D(), { setActiveAnchor: s } = W(), { meta: a } =
|
|
847
|
-
Mt(),
|
|
848
|
-
const r =
|
|
849
|
-
return
|
|
829
|
+
const e = D(), { setActiveAnchor: s } = W(), { meta: a } = U();
|
|
830
|
+
Mt(), At();
|
|
831
|
+
const r = K(e.pathname);
|
|
832
|
+
return S(() => {
|
|
850
833
|
e.pathname !== r.current && s(""), r.current = e.pathname;
|
|
851
834
|
}, [e.pathname, s]), /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
852
|
-
/* @__PURE__ */ n.jsxs(
|
|
835
|
+
/* @__PURE__ */ n.jsxs(Je, { titleTemplate: a == null ? void 0 : a.pageTitle, children: [
|
|
853
836
|
/* @__PURE__ */ n.jsx("title", { children: "Home" }),
|
|
854
837
|
(a == null ? void 0 : a.description) && /* @__PURE__ */ n.jsx("meta", { name: "description", content: a.description }),
|
|
855
838
|
(a == null ? void 0 : a.favicon) && /* @__PURE__ */ n.jsx("link", { rel: "icon", href: a.favicon })
|
|
856
839
|
] }),
|
|
857
840
|
/* @__PURE__ */ n.jsx(Oe, {}),
|
|
858
841
|
/* @__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
|
-
|
|
842
|
+
Pe,
|
|
860
843
|
{
|
|
861
|
-
fallback: /* @__PURE__ */ n.jsx("div", { className: "grid h-full place-items-center", children: /* @__PURE__ */ n.jsx(
|
|
844
|
+
fallback: /* @__PURE__ */ n.jsx("div", { className: "grid h-full place-items-center", children: /* @__PURE__ */ n.jsx(Ye, {}) }),
|
|
862
845
|
children: [
|
|
863
|
-
/* @__PURE__ */ n.jsx(
|
|
846
|
+
/* @__PURE__ */ n.jsx(Tt, {}),
|
|
864
847
|
/* @__PURE__ */ n.jsx(
|
|
865
848
|
"main",
|
|
866
849
|
{
|
|
867
|
-
className: `dark:border-white/10 translate-x-0
|
|
850
|
+
className: `dark:border-white/10 translate-x-0 h-full
|
|
868
851
|
lg:overflow-visible
|
|
869
852
|
lg:peer-data-[navigation=true]:w-[calc(100%-var(--side-nav-width))]
|
|
870
853
|
lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] peer-data-[navigation=true]:pl-12`,
|
|
871
|
-
children: t ?? /* @__PURE__ */ n.jsx(
|
|
854
|
+
children: t ?? /* @__PURE__ */ n.jsx(Ie, {})
|
|
872
855
|
}
|
|
873
856
|
)
|
|
874
857
|
]
|
|
@@ -876,12 +859,12 @@ const Nt = E("Sun", [
|
|
|
876
859
|
) })
|
|
877
860
|
] });
|
|
878
861
|
};
|
|
879
|
-
function
|
|
862
|
+
function It({ plugins: t }) {
|
|
880
863
|
const e = L(() => {
|
|
881
864
|
const s = (t ?? []).flatMap(
|
|
882
|
-
(a) =>
|
|
865
|
+
(a) => we(a) ? a.getRoutes() : []
|
|
883
866
|
);
|
|
884
|
-
return
|
|
867
|
+
return Ze([
|
|
885
868
|
{
|
|
886
869
|
path: "/",
|
|
887
870
|
element: /* @__PURE__ */ n.jsx(ue, {}),
|
|
@@ -890,24 +873,24 @@ function Tt({ plugins: t }) {
|
|
|
890
873
|
}
|
|
891
874
|
]);
|
|
892
875
|
}, [t]);
|
|
893
|
-
return /* @__PURE__ */ n.jsx(
|
|
876
|
+
return /* @__PURE__ */ n.jsx(et, { router: e });
|
|
894
877
|
}
|
|
895
|
-
const
|
|
878
|
+
const St = (t) => {
|
|
896
879
|
const e = L(
|
|
897
|
-
() => ({ ...
|
|
880
|
+
() => ({ ...Ce, ...t.overrides }),
|
|
898
881
|
[t.overrides]
|
|
899
882
|
), s = L(
|
|
900
|
-
() => ({ ...
|
|
883
|
+
() => ({ ...tt, ...t.mdxComponents }),
|
|
901
884
|
[t.mdxComponents]
|
|
902
885
|
), a = L(() => new bt(t), [t]);
|
|
903
|
-
return
|
|
886
|
+
return S(() => {
|
|
904
887
|
a.initialize();
|
|
905
|
-
}, [a]), /* @__PURE__ */ n.jsx(
|
|
906
|
-
|
|
888
|
+
}, [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(
|
|
889
|
+
Pe,
|
|
907
890
|
{
|
|
908
891
|
fallback: /* @__PURE__ */ n.jsx("div", { className: "grid place-items-center h-full", children: "Loading..." }),
|
|
909
892
|
children: /* @__PURE__ */ n.jsx(
|
|
910
|
-
|
|
893
|
+
It,
|
|
911
894
|
{
|
|
912
895
|
plugins: [
|
|
913
896
|
...t.plugins ?? [],
|
|
@@ -917,10 +900,10 @@ const It = (t) => {
|
|
|
917
900
|
)
|
|
918
901
|
}
|
|
919
902
|
) }) }) }) }) }) }) });
|
|
920
|
-
},
|
|
921
|
-
|
|
903
|
+
}, Et = je(St);
|
|
904
|
+
Et.displayName = "DevPortal";
|
|
922
905
|
export {
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
906
|
+
Et as DevPortal,
|
|
907
|
+
Bt as Link,
|
|
908
|
+
Vt as useMDXComponents
|
|
926
909
|
};
|