zudoku 0.32.2 → 0.32.4
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/entry.client.d.ts +5 -0
- package/dist/app/entry.client.js +1 -0
- package/dist/app/entry.client.js.map +1 -1
- package/dist/lib/components/Header.js +2 -2
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Layout.js +1 -1
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.js +7 -3
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
- package/dist/vite/build.js +2 -2
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.js +2 -13
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/plugin-config-reload.js +2 -1
- package/dist/vite/plugin-config-reload.js.map +1 -1
- package/dist/vite/plugin-config.js +5 -2
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/prerender/prerender.js +2 -20
- package/dist/vite/prerender/prerender.js.map +1 -1
- package/lib/zudoku.components.js +36 -36
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +107 -105
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/package.json +1 -1
- package/src/app/entry.client.tsx +8 -0
- package/src/lib/components/Header.tsx +3 -3
- package/src/lib/components/Layout.tsx +2 -2
- package/src/lib/plugins/api-keys/CreateApiKey.tsx +7 -3
package/lib/zudoku.components.js
CHANGED
|
@@ -16,10 +16,10 @@ var G = (t, e, r, n) => ({
|
|
|
16
16
|
import { a as Fe, H as oe } from "./index.esm-CQHE3GEU.js";
|
|
17
17
|
import { z as Be, J as ht } from "./SyntaxHighlight-CcnUjERD.js";
|
|
18
18
|
import { u as le, m as ft, O as ce, R as gt, S as mt, h as ue, f as pt, L as de } from "./chunk-IR6S3I6Y-D_3UmFIn.js";
|
|
19
|
-
import { S as He, m as ze, Q as xt, n as w, o as ye, p as be, q as M, r as vt, t as yt, v as bt, w as jt, x as je, y as we, z as wt, h as Pe, A as
|
|
19
|
+
import { S as He, m as ze, Q as xt, n as w, o as ye, p as be, q as M, r as vt, t as yt, v as bt, w as jt, x as je, y as we, z as wt, h as Pe, A as ke, B as Pt, e as kt, k as z, i as A, C as Le, D as Ke, E as Ct, j as ne, a as St, Z as Nt, F as Dt, G as Mt } from "./hook-CWwSAAlH.js";
|
|
20
20
|
import { j as s } from "./jsx-runtime-CYK1ROHF.js";
|
|
21
21
|
import * as U from "react";
|
|
22
|
-
import Ot, { useRef as ee, useEffect as I, createContext as he, StrictMode as $e, useState as L, useCallback as At, Suspense as fe, memo as Ue, forwardRef as Et, Component as qt, createElement as
|
|
22
|
+
import Ot, { useRef as ee, useEffect as I, createContext as he, StrictMode as $e, useState as L, useCallback as At, Suspense as fe, memo as Ue, forwardRef as Et, Component as qt, createElement as Ce, useMemo as te, useContext as Tt, Fragment as It } from "react";
|
|
23
23
|
import { Z as Ze } from "./invariant-Caa8-XvF.js";
|
|
24
24
|
import { E as Ye, S, a as Qt, R as Rt } from "./SlotletProvider-CEfNOA8i.js";
|
|
25
25
|
import { Button as Ft } from "./ui/Button.js";
|
|
@@ -111,13 +111,13 @@ var D, Ie, wr = (Ie = class extends He {
|
|
|
111
111
|
});
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
-
}, D = new WeakMap(), Ie), O,
|
|
114
|
+
}, D = new WeakMap(), Ie), O, C, Y, Qe, Pr = (Qe = class extends He {
|
|
115
115
|
constructor(e = {}) {
|
|
116
116
|
super();
|
|
117
117
|
j(this, O);
|
|
118
|
-
j(this,
|
|
118
|
+
j(this, C);
|
|
119
119
|
j(this, Y);
|
|
120
|
-
this.config = e, v(this, O, /* @__PURE__ */ new Set()), v(this,
|
|
120
|
+
this.config = e, v(this, O, /* @__PURE__ */ new Set()), v(this, C, /* @__PURE__ */ new Map()), v(this, Y, 0);
|
|
121
121
|
}
|
|
122
122
|
build(e, r, n) {
|
|
123
123
|
const a = new Ht({
|
|
@@ -132,8 +132,8 @@ var D, Ie, wr = (Ie = class extends He {
|
|
|
132
132
|
l(this, O).add(e);
|
|
133
133
|
const r = _(e);
|
|
134
134
|
if (typeof r == "string") {
|
|
135
|
-
const n = l(this,
|
|
136
|
-
n ? n.push(e) : l(this,
|
|
135
|
+
const n = l(this, C).get(r);
|
|
136
|
+
n ? n.push(e) : l(this, C).set(r, [e]);
|
|
137
137
|
}
|
|
138
138
|
this.notify({ type: "added", mutation: e });
|
|
139
139
|
}
|
|
@@ -141,12 +141,12 @@ var D, Ie, wr = (Ie = class extends He {
|
|
|
141
141
|
if (l(this, O).delete(e)) {
|
|
142
142
|
const r = _(e);
|
|
143
143
|
if (typeof r == "string") {
|
|
144
|
-
const n = l(this,
|
|
144
|
+
const n = l(this, C).get(r);
|
|
145
145
|
if (n)
|
|
146
146
|
if (n.length > 1) {
|
|
147
147
|
const a = n.indexOf(e);
|
|
148
148
|
a !== -1 && n.splice(a, 1);
|
|
149
|
-
} else n[0] === e && l(this,
|
|
149
|
+
} else n[0] === e && l(this, C).delete(r);
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
this.notify({ type: "removed", mutation: e });
|
|
@@ -154,7 +154,7 @@ var D, Ie, wr = (Ie = class extends He {
|
|
|
154
154
|
canRun(e) {
|
|
155
155
|
const r = _(e);
|
|
156
156
|
if (typeof r == "string") {
|
|
157
|
-
const n = l(this,
|
|
157
|
+
const n = l(this, C).get(r), a = n == null ? void 0 : n.find(
|
|
158
158
|
(o) => o.state.status === "pending"
|
|
159
159
|
);
|
|
160
160
|
return !a || a === e;
|
|
@@ -165,7 +165,7 @@ var D, Ie, wr = (Ie = class extends He {
|
|
|
165
165
|
var n;
|
|
166
166
|
const r = _(e);
|
|
167
167
|
if (typeof r == "string") {
|
|
168
|
-
const a = (n = l(this,
|
|
168
|
+
const a = (n = l(this, C).get(r)) == null ? void 0 : n.find((o) => o !== e && o.state.isPaused);
|
|
169
169
|
return (a == null ? void 0 : a.continue()) ?? Promise.resolve();
|
|
170
170
|
} else
|
|
171
171
|
return Promise.resolve();
|
|
@@ -174,7 +174,7 @@ var D, Ie, wr = (Ie = class extends He {
|
|
|
174
174
|
w.batch(() => {
|
|
175
175
|
l(this, O).forEach((e) => {
|
|
176
176
|
this.notify({ type: "removed", mutation: e });
|
|
177
|
-
}), l(this, O).clear(), l(this,
|
|
177
|
+
}), l(this, O).clear(), l(this, C).clear();
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
180
|
getAll() {
|
|
@@ -204,7 +204,7 @@ var D, Ie, wr = (Ie = class extends He {
|
|
|
204
204
|
)
|
|
205
205
|
);
|
|
206
206
|
}
|
|
207
|
-
}, O = new WeakMap(),
|
|
207
|
+
}, O = new WeakMap(), C = new WeakMap(), Y = new WeakMap(), Qe);
|
|
208
208
|
function _(t) {
|
|
209
209
|
var e;
|
|
210
210
|
return (e = t.options.scope) == null ? void 0 : e.id;
|
|
@@ -217,7 +217,7 @@ function De(t) {
|
|
|
217
217
|
let u = { pages: [], pageParams: [] }, d = 0;
|
|
218
218
|
const c = async () => {
|
|
219
219
|
let p = !1;
|
|
220
|
-
const
|
|
220
|
+
const k = (b) => {
|
|
221
221
|
Object.defineProperty(b, "signal", {
|
|
222
222
|
enumerable: !0,
|
|
223
223
|
get: () => (e.signal.aborted ? p = !0 : e.signal.addEventListener("abort", () => {
|
|
@@ -236,7 +236,7 @@ function De(t) {
|
|
|
236
236
|
direction: $ ? "backward" : "forward",
|
|
237
237
|
meta: e.options.meta
|
|
238
238
|
};
|
|
239
|
-
|
|
239
|
+
k(X);
|
|
240
240
|
const ct = await V(
|
|
241
241
|
X
|
|
242
242
|
), { maxPages: me } = e.options, pe = $ ? yt : bt;
|
|
@@ -246,7 +246,7 @@ function De(t) {
|
|
|
246
246
|
};
|
|
247
247
|
};
|
|
248
248
|
if (a && o.length) {
|
|
249
|
-
const b = a === "backward", N = b ?
|
|
249
|
+
const b = a === "backward", N = b ? kr : Me, $ = {
|
|
250
250
|
pages: o,
|
|
251
251
|
pageParams: i
|
|
252
252
|
}, X = N(n, $);
|
|
@@ -263,8 +263,8 @@ function De(t) {
|
|
|
263
263
|
return u;
|
|
264
264
|
};
|
|
265
265
|
e.options.persister ? e.fetchFn = () => {
|
|
266
|
-
var p,
|
|
267
|
-
return (
|
|
266
|
+
var p, k;
|
|
267
|
+
return (k = (p = e.options).persister) == null ? void 0 : k.call(
|
|
268
268
|
p,
|
|
269
269
|
c,
|
|
270
270
|
{
|
|
@@ -288,11 +288,11 @@ function Me(t, { pages: e, pageParams: r }) {
|
|
|
288
288
|
r
|
|
289
289
|
) : void 0;
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function kr(t, { pages: e, pageParams: r }) {
|
|
292
292
|
var n;
|
|
293
293
|
return e.length > 0 ? (n = t.getPreviousPageParam) == null ? void 0 : n.call(t, e[0], e, r[0], r) : void 0;
|
|
294
294
|
}
|
|
295
|
-
var x, E, q, R, F, T, B, H, Re,
|
|
295
|
+
var x, E, q, R, F, T, B, H, Re, Cr = (Re = class {
|
|
296
296
|
constructor(t = {}) {
|
|
297
297
|
j(this, x);
|
|
298
298
|
j(this, E);
|
|
@@ -450,7 +450,7 @@ var x, E, q, R, F, T, B, H, Re, kr = (Re = class {
|
|
|
450
450
|
getQueryDefaults(t) {
|
|
451
451
|
const e = [...l(this, R).values()], r = {};
|
|
452
452
|
return e.forEach((n) => {
|
|
453
|
-
|
|
453
|
+
ke(t, n.queryKey) && Object.assign(r, n.defaultOptions);
|
|
454
454
|
}), r;
|
|
455
455
|
}
|
|
456
456
|
setMutationDefaults(t, e) {
|
|
@@ -463,7 +463,7 @@ var x, E, q, R, F, T, B, H, Re, kr = (Re = class {
|
|
|
463
463
|
const e = [...l(this, F).values()];
|
|
464
464
|
let r = {};
|
|
465
465
|
return e.forEach((n) => {
|
|
466
|
-
|
|
466
|
+
ke(t, n.mutationKey) && (r = { ...r, ...n.defaultOptions });
|
|
467
467
|
}), r;
|
|
468
468
|
}
|
|
469
469
|
defaultQueryOptions(t) {
|
|
@@ -514,13 +514,13 @@ function Oe(t, e, r) {
|
|
|
514
514
|
}), u.forEach(({ queryKey: g, state: f, queryHash: h, meta: m, promise: y }) => {
|
|
515
515
|
var V, K;
|
|
516
516
|
let p = a.get(h);
|
|
517
|
-
const
|
|
517
|
+
const k = f.data === void 0 ? f.data : o(f.data);
|
|
518
518
|
if (p) {
|
|
519
519
|
if (p.state.dataUpdatedAt < f.dataUpdatedAt) {
|
|
520
520
|
const { fetchStatus: b, ...N } = f;
|
|
521
521
|
p.setState({
|
|
522
522
|
...N,
|
|
523
|
-
data:
|
|
523
|
+
data: k
|
|
524
524
|
});
|
|
525
525
|
}
|
|
526
526
|
} else
|
|
@@ -537,7 +537,7 @@ function Oe(t, e, r) {
|
|
|
537
537
|
// query being stuck in fetching state upon hydration
|
|
538
538
|
{
|
|
539
539
|
...f,
|
|
540
|
-
data:
|
|
540
|
+
data: k,
|
|
541
541
|
fetchStatus: "idle"
|
|
542
542
|
}
|
|
543
543
|
);
|
|
@@ -553,7 +553,7 @@ var Ae = (t, e) => typeof t == "object" && t !== null && e in t, Nr = ({
|
|
|
553
553
|
state: r,
|
|
554
554
|
queryClient: n
|
|
555
555
|
}) => {
|
|
556
|
-
const a =
|
|
556
|
+
const a = kt(n), [o, i] = U.useState(), u = U.useRef(e);
|
|
557
557
|
return u.current = e, U.useMemo(() => {
|
|
558
558
|
if (r) {
|
|
559
559
|
if (typeof r != "object")
|
|
@@ -566,7 +566,7 @@ var Ae = (t, e) => typeof t == "object" && t !== null && e in t, Nr = ({
|
|
|
566
566
|
else {
|
|
567
567
|
const y = h.state.dataUpdatedAt > m.state.dataUpdatedAt || // RSC special serialized then-able chunks
|
|
568
568
|
Ae(h.promise, "status") && Ae(m.promise, "status") && h.promise.status !== m.promise.status, p = o == null ? void 0 : o.find(
|
|
569
|
-
(
|
|
569
|
+
(k) => k.queryHash === h.queryHash
|
|
570
570
|
);
|
|
571
571
|
y && (!p || h.state.dataUpdatedAt > p.state.dataUpdatedAt) && f.push(h);
|
|
572
572
|
}
|
|
@@ -619,7 +619,7 @@ function Or({ error: t }) {
|
|
|
619
619
|
function Ar(t) {
|
|
620
620
|
return /* @__PURE__ */ U.createElement(gt, { flushSync: zt.flushSync, ...t });
|
|
621
621
|
}
|
|
622
|
-
const ie = he({ stagger: !1 }), Er = new
|
|
622
|
+
const ie = he({ stagger: !1 }), Er = new Cr({
|
|
623
623
|
defaultOptions: {
|
|
624
624
|
queries: {
|
|
625
625
|
staleTime: 1e3 * 60 * 5
|
|
@@ -807,7 +807,7 @@ const qe = {
|
|
|
807
807
|
default: r
|
|
808
808
|
}) => {
|
|
809
809
|
var c;
|
|
810
|
-
const { sidebars: n } = A(), a = n[t], o = Ke(), i = !!ue().location, u = ((c = o.topNavItem) == null ? void 0 : c.id) === t && !i, d = r ?? (a ?
|
|
810
|
+
const { sidebars: n } = A(), a = n[t], o = Ke(), i = !!ue().location, u = ((c = o.topNavItem) == null ? void 0 : c.id) === t && !i, d = r ?? (a ? Ct(a, (g) => {
|
|
811
811
|
if (g.type === "doc") return ne(g.id);
|
|
812
812
|
}) : ne(t));
|
|
813
813
|
if (!d)
|
|
@@ -870,7 +870,7 @@ const qe = {
|
|
|
870
870
|
const e = z(), { isAuthenticated: r, profile: n, isAuthEnabled: a } = z(), o = A(), { page: i, plugins: u } = o, d = u.filter((c) => ar(c)).flatMap((c) => c.getProfileMenuItems(o)).sort((c) => c.weight ?? 0);
|
|
871
871
|
return /* @__PURE__ */ s.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
|
|
872
872
|
/* @__PURE__ */ s.jsx(Hr, {}),
|
|
873
|
-
/* @__PURE__ */ s.jsx("div", { className: "border-b", children: /* @__PURE__ */ s.jsxs("div", { className: "max-w-screen-2xl border-
|
|
873
|
+
/* @__PURE__ */ s.jsx("div", { className: "border-b", children: /* @__PURE__ */ s.jsxs("div", { className: "max-w-screen-2xl 2xl:border-x mx-auto grid grid-cols-[1fr_auto] lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center px-4 lg:px-8 h-[--top-header-height]", children: [
|
|
874
874
|
/* @__PURE__ */ s.jsx("div", { className: "flex", children: /* @__PURE__ */ s.jsx(de, { to: "/", children: /* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-3.5", children: [
|
|
875
875
|
(i == null ? void 0 : i.logo) && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
876
876
|
/* @__PURE__ */ s.jsx(
|
|
@@ -937,7 +937,7 @@ const qe = {
|
|
|
937
937
|
] })
|
|
938
938
|
] })
|
|
939
939
|
] }) }),
|
|
940
|
-
/* @__PURE__ */ s.jsx("div", { className: "border-b", children: /* @__PURE__ */ s.jsxs("div", { className: "max-w-screen-2xl mx-auto border-
|
|
940
|
+
/* @__PURE__ */ s.jsx("div", { className: "border-b hidden lg:block", children: /* @__PURE__ */ s.jsxs("div", { className: "max-w-screen-2xl mx-auto 2xl:border-x", children: [
|
|
941
941
|
/* @__PURE__ */ s.jsx(S, { name: "top-navigation-before" }),
|
|
942
942
|
/* @__PURE__ */ s.jsx(zr, {}),
|
|
943
943
|
/* @__PURE__ */ s.jsx(S, { name: "top-navigation-after" })
|
|
@@ -1022,7 +1022,7 @@ const Kr = ({
|
|
|
1022
1022
|
/* @__PURE__ */ s.jsx(S, { name: "layout-before-head" }),
|
|
1023
1023
|
/* @__PURE__ */ s.jsx(nt, {}),
|
|
1024
1024
|
/* @__PURE__ */ s.jsx(S, { name: "layout-after-head" }),
|
|
1025
|
-
/* @__PURE__ */ s.jsx("div", { className: "w-full max-w-screen-2xl mx-auto px-4 lg:px-8 border-
|
|
1025
|
+
/* @__PURE__ */ s.jsx("div", { className: "w-full min-h-[calc(100vh-var(--header-height))] max-w-screen-2xl mx-auto px-4 lg:px-8 2xl:border-x", children: u ? /* @__PURE__ */ s.jsx(Te, {}) : /* @__PURE__ */ s.jsx(fe, { fallback: /* @__PURE__ */ s.jsx(Te, {}), children: /* @__PURE__ */ s.jsxs(
|
|
1026
1026
|
Ve,
|
|
1027
1027
|
{
|
|
1028
1028
|
direction: "left",
|
|
@@ -1034,7 +1034,7 @@ const Kr = ({
|
|
|
1034
1034
|
"div",
|
|
1035
1035
|
{
|
|
1036
1036
|
className: Q(
|
|
1037
|
-
"lg:hidden -mx-
|
|
1037
|
+
"lg:hidden -mx-4 px-4 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b",
|
|
1038
1038
|
"peer-data-[navigation=false]:hidden"
|
|
1039
1039
|
),
|
|
1040
1040
|
children: /* @__PURE__ */ s.jsxs(Xe, { className: "flex items-center gap-2", children: [
|
|
@@ -1210,13 +1210,13 @@ class Xr extends qt {
|
|
|
1210
1210
|
if (typeof r == "function")
|
|
1211
1211
|
u = r(d);
|
|
1212
1212
|
else if (n)
|
|
1213
|
-
u =
|
|
1213
|
+
u = Ce(n, d);
|
|
1214
1214
|
else if (a !== void 0)
|
|
1215
1215
|
u = a;
|
|
1216
1216
|
else
|
|
1217
1217
|
throw i;
|
|
1218
1218
|
}
|
|
1219
|
-
return
|
|
1219
|
+
return Ce(Vr.Provider, {
|
|
1220
1220
|
value: {
|
|
1221
1221
|
didCatch: o,
|
|
1222
1222
|
error: i,
|
|
@@ -1291,7 +1291,7 @@ const it = {
|
|
|
1291
1291
|
...(e.plugins ?? []).filter(cr).flatMap(
|
|
1292
1292
|
(p) => p.getMdxComponents ? [p.getMdxComponents()] : []
|
|
1293
1293
|
).reduce(
|
|
1294
|
-
(p,
|
|
1294
|
+
(p, k) => ({ ...p, ...k }),
|
|
1295
1295
|
{}
|
|
1296
1296
|
),
|
|
1297
1297
|
...tr,
|