zudoku 0.3.0-dev.90 → 0.3.0-dev.92

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.
Files changed (45) hide show
  1. package/dist/config/config.d.ts +1 -2
  2. package/dist/lib/components/context/ZudokuContext.js +4 -1
  3. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  4. package/dist/lib/plugins/openapi/index.js +1 -1
  5. package/dist/lib/plugins/openapi/index.js.map +1 -1
  6. package/dist/lib/plugins/openapi/interfaces.d.ts +1 -0
  7. package/dist/vite/config.d.ts +2 -1
  8. package/dist/vite/config.js.map +1 -1
  9. package/dist/vite/plugin-config.d.ts +4 -3
  10. package/dist/vite/plugin-config.js +3 -11
  11. package/dist/vite/plugin-config.js.map +1 -1
  12. package/dist/vite/plugin-docs.js +1 -5
  13. package/dist/vite/plugin-docs.js.map +1 -1
  14. package/lib/{AuthenticationPlugin-C3dzfGaA.js → AuthenticationPlugin-CH5NSVOu.js} +2 -2
  15. package/lib/{AuthenticationPlugin-C3dzfGaA.js.map → AuthenticationPlugin-CH5NSVOu.js.map} +1 -1
  16. package/lib/{Combination-Djh-LWhb.js → Combination-D-9IH0zy.js} +2 -2
  17. package/lib/{Combination-Djh-LWhb.js.map → Combination-D-9IH0zy.js.map} +1 -1
  18. package/lib/{Input-SCGD-EvD.js → Input-HmAaR6kw.js} +3 -3
  19. package/lib/{Input-SCGD-EvD.js.map → Input-HmAaR6kw.js.map} +1 -1
  20. package/lib/{MdxPage-d02krMBw.js → MdxPage-3-PenZs2.js} +2 -2
  21. package/lib/{MdxPage-d02krMBw.js.map → MdxPage-3-PenZs2.js.map} +1 -1
  22. package/lib/{OperationList-BQweX28o.js → OperationList-DvKqvB16.js} +4 -4
  23. package/lib/{OperationList-BQweX28o.js.map → OperationList-DvKqvB16.js.map} +1 -1
  24. package/lib/{Route-BPGW1TS_.js → Route-CnmaDun4.js} +2 -2
  25. package/lib/{Route-BPGW1TS_.js.map → Route-CnmaDun4.js.map} +1 -1
  26. package/lib/{Spinner-DEgs-1Gu.js → Spinner-D99Tq0hv.js} +2 -2
  27. package/lib/{Spinner-DEgs-1Gu.js.map → Spinner-D99Tq0hv.js.map} +1 -1
  28. package/lib/{ZudokuContext-C3JtXViU.js → ZudokuContext-BIZ8zHbZ.js} +44 -44
  29. package/lib/{ZudokuContext-C3JtXViU.js.map → ZudokuContext-BIZ8zHbZ.js.map} +1 -1
  30. package/lib/{index-B8BCBPkc.js → index-7nswqEVR.js} +3 -3
  31. package/lib/{index-B8BCBPkc.js.map → index-7nswqEVR.js.map} +1 -1
  32. package/lib/{index-DoIWqOG1.js → index-DjaqWcmv.js} +8 -8
  33. package/lib/{index-DoIWqOG1.js.map → index-DjaqWcmv.js.map} +1 -1
  34. package/lib/{utils-D3fcGEot.js → utils-D3g3xyZM.js} +2 -2
  35. package/lib/{utils-D3fcGEot.js.map → utils-D3g3xyZM.js.map} +1 -1
  36. package/lib/zudoku.auth-clerk.js +1 -1
  37. package/lib/zudoku.auth-openid.js +1 -1
  38. package/lib/zudoku.components.js +5 -5
  39. package/lib/zudoku.plugin-api-keys.js +3 -3
  40. package/lib/zudoku.plugin-markdown.js +1 -1
  41. package/lib/zudoku.plugin-openapi.js +3 -3
  42. package/package.json +1 -2
  43. package/src/lib/components/context/ZudokuContext.ts +4 -1
  44. package/src/lib/plugins/openapi/index.tsx +1 -1
  45. package/src/lib/plugins/openapi/interfaces.ts +1 -0
@@ -4,9 +4,9 @@ var qt = (e) => {
4
4
  var ct = (e, t, s) => t.has(e) || qt("Cannot " + s);
5
5
  var i = (e, t, s) => (ct(e, t, "read from private field"), s ? s.call(e) : t.get(e)), f = (e, t, s) => t.has(e) ? qt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s), h = (e, t, s, r) => (ct(e, t, "write to private field"), r ? r.call(e, s) : t.set(e, s), s), v = (e, t, s) => (ct(e, t, "access private method"), s);
6
6
  import * as T from "react";
7
- import { createContext as se, useContext as re } from "react";
8
- import { j as ie } from "./jsx-runtime-B6kdoens.js";
9
- import { u as ne } from "./index-7kcHaXD6.js";
7
+ import { createContext as re, useContext as ie } from "react";
8
+ import { j as ne } from "./jsx-runtime-B6kdoens.js";
9
+ import { u as Bt } from "./index-7kcHaXD6.js";
10
10
  var Dt = class {
11
11
  constructor() {
12
12
  this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
@@ -32,7 +32,7 @@ function Le(e, t) {
32
32
  function ft(e) {
33
33
  return typeof e == "number" && e >= 0 && e !== 1 / 0;
34
34
  }
35
- function Bt(e, t) {
35
+ function Gt(e, t) {
36
36
  return Math.max(e + (t || 0) - Date.now(), 0);
37
37
  }
38
38
  function ut(e, t) {
@@ -89,7 +89,7 @@ function yt(e) {
89
89
  function Pt(e, t) {
90
90
  return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? !Object.keys(t).some((s) => !Pt(e[s], t[s])) : !1;
91
91
  }
92
- function Gt(e, t) {
92
+ function Ht(e, t) {
93
93
  if (e === t)
94
94
  return e;
95
95
  const s = It(e) && It(t);
@@ -98,7 +98,7 @@ function Gt(e, t) {
98
98
  let b = 0;
99
99
  for (let R = 0; R < o; R++) {
100
100
  const m = s ? R : c[R];
101
- (!s && r.includes(m) || s) && e[m] === void 0 && t[m] === void 0 ? (l[m] = void 0, b++) : (l[m] = Gt(e[m], t[m]), l[m] === e[m] && e[m] !== void 0 && b++);
101
+ (!s && r.includes(m) || s) && e[m] === void 0 && t[m] === void 0 ? (l[m] = void 0, b++) : (l[m] = Ht(e[m], t[m]), l[m] === e[m] && e[m] !== void 0 && b++);
102
102
  }
103
103
  return n === o && b === n ? e : l;
104
104
  }
@@ -133,7 +133,7 @@ function oe(e) {
133
133
  });
134
134
  }
135
135
  function mt(e, t, s) {
136
- return typeof s.structuralSharing == "function" ? s.structuralSharing(e, t) : s.structuralSharing !== !1 ? Gt(e, t) : t;
136
+ return typeof s.structuralSharing == "function" ? s.structuralSharing(e, t) : s.structuralSharing !== !1 ? Ht(e, t) : t;
137
137
  }
138
138
  function _e(e, t, s = 0) {
139
139
  const r = [...e, t];
@@ -186,7 +186,7 @@ var bt = Symbol(), ue = (e, t) => (process.env.NODE_ENV !== "production" && e.qu
186
186
  var t;
187
187
  return typeof i(this, N) == "boolean" ? i(this, N) : ((t = globalThis.document) == null ? void 0 : t.visibilityState) !== "hidden";
188
188
  }
189
- }, N = new WeakMap(), k = new WeakMap(), z = new WeakMap(), Mt), Ht = new he(), $, M, W, Lt, ce = (Lt = class extends Dt {
189
+ }, N = new WeakMap(), k = new WeakMap(), z = new WeakMap(), Mt), Vt = new he(), $, M, W, Lt, ce = (Lt = class extends Dt {
190
190
  constructor() {
191
191
  super();
192
192
  f(this, $, !0);
@@ -220,20 +220,20 @@ var bt = Symbol(), ue = (e, t) => (process.env.NODE_ENV !== "production" && e.qu
220
220
  isOnline() {
221
221
  return i(this, $);
222
222
  }
223
- }, $ = new WeakMap(), M = new WeakMap(), W = new WeakMap(), Lt), Vt = new ce();
223
+ }, $ = new WeakMap(), M = new WeakMap(), W = new WeakMap(), Lt), zt = new ce();
224
224
  function le(e) {
225
225
  return Math.min(1e3 * 2 ** e, 3e4);
226
226
  }
227
- function zt(e) {
228
- return (e ?? "online") === "online" ? Vt.isOnline() : !0;
227
+ function $t(e) {
228
+ return (e ?? "online") === "online" ? zt.isOnline() : !0;
229
229
  }
230
- var $t = class {
230
+ var Wt = class {
231
231
  constructor(e) {
232
232
  this.revert = e == null ? void 0 : e.revert, this.silent = e == null ? void 0 : e.silent;
233
233
  }
234
234
  };
235
235
  function lt(e) {
236
- return e instanceof $t;
236
+ return e instanceof Wt;
237
237
  }
238
238
  function de(e) {
239
239
  let t = !1, s = 0, r = !1, n, c, o;
@@ -241,12 +241,12 @@ function de(e) {
241
241
  c = g, o = S;
242
242
  }), b = (g) => {
243
243
  var S;
244
- r || (O(new $t(g)), (S = e.abort) == null || S.call(e));
244
+ r || (O(new Wt(g)), (S = e.abort) == null || S.call(e));
245
245
  }, R = () => {
246
246
  t = !0;
247
247
  }, m = () => {
248
248
  t = !1;
249
- }, a = () => Ht.isFocused() && (e.networkMode === "always" || Vt.isOnline()) && e.canRun(), u = () => zt(e.networkMode) && e.canRun(), p = (g) => {
249
+ }, a = () => Vt.isFocused() && (e.networkMode === "always" || zt.isOnline()) && e.canRun(), u = () => $t(e.networkMode) && e.canRun(), p = (g) => {
250
250
  var S;
251
251
  r || (r = !0, (S = e.onSuccess) == null || S.call(e, g), n == null || n(), c(g));
252
252
  }, O = (g) => {
@@ -425,7 +425,7 @@ var Tt = fe(), K, Nt, ye = (Nt = class {
425
425
  ) : this.state.data === void 0;
426
426
  }
427
427
  isStaleByTime(t = 0) {
428
- return this.state.isInvalidated || this.state.data === void 0 || !Bt(this.state.dataUpdatedAt, t);
428
+ return this.state.isInvalidated || this.state.data === void 0 || !Gt(this.state.dataUpdatedAt, t);
429
429
  }
430
430
  onFocus() {
431
431
  var s;
@@ -563,7 +563,7 @@ var Tt = fe(), K, Nt, ye = (Nt = class {
563
563
  case "fetch":
564
564
  return {
565
565
  ...r,
566
- ...Wt(r.data, this.options),
566
+ ...Zt(r.data, this.options),
567
567
  fetchMeta: t.meta ?? null
568
568
  };
569
569
  case "success":
@@ -611,11 +611,11 @@ var Tt = fe(), K, Nt, ye = (Nt = class {
611
611
  }), i(this, P).notify({ query: this, type: "updated", action: t });
612
612
  });
613
613
  }, Kt);
614
- function Wt(e, t) {
614
+ function Zt(e, t) {
615
615
  return {
616
616
  fetchFailureCount: 0,
617
617
  fetchFailureReason: null,
618
- fetchStatus: zt(t.networkMode) ? "fetching" : "paused",
618
+ fetchStatus: $t(t.networkMode) ? "fetching" : "paused",
619
619
  ...e === void 0 && {
620
620
  error: null,
621
621
  status: "pending"
@@ -639,7 +639,7 @@ function pe(e) {
639
639
  fetchStatus: "idle"
640
640
  };
641
641
  }
642
- var E, d, nt, F, B, X, I, at, Y, tt, G, H, L, et, y, rt, gt, Rt, St, Ct, wt, Ft, Ot, Jt, _t, Zt = (_t = class extends Dt {
642
+ var E, d, nt, F, B, X, I, at, Y, tt, G, H, L, et, y, rt, gt, Rt, St, Ct, wt, Ft, Ot, Xt, _t, Jt = (_t = class extends Dt {
643
643
  constructor(t, s) {
644
644
  super();
645
645
  f(this, y);
@@ -751,10 +751,10 @@ var E, d, nt, F, B, X, I, at, Y, tt, G, H, L, et, y, rt, gt, Rt, St, Ct, wt, Ft,
751
751
  const r = i(this, d), n = this.options, c = i(this, F), o = i(this, B), l = i(this, X), R = t !== r ? t.state : i(this, nt), { state: m } = t;
752
752
  let a = { ...m }, u = !1, p;
753
753
  if (s._optimisticResults) {
754
- const w = this.hasListeners(), ht = !w && jt(t, s), ee = w && kt(t, r, s, n);
755
- (ht || ee) && (a = {
754
+ const w = this.hasListeners(), ht = !w && jt(t, s), se = w && kt(t, r, s, n);
755
+ (ht || se) && (a = {
756
756
  ...a,
757
- ...Wt(m.data, t.options)
757
+ ...Zt(m.data, t.options)
758
758
  }), s._optimisticResults === "isRestoring" && (a.fetchStatus = "idle");
759
759
  }
760
760
  let { error: O, errorUpdatedAt: U, status: A } = a;
@@ -836,7 +836,7 @@ var E, d, nt, F, B, X, I, at, Y, tt, G, H, L, et, y, rt, gt, Rt, St, Ct, wt, Ft,
836
836
  return i(this, F)[m] !== s[m] && b.has(m);
837
837
  });
838
838
  };
839
- (t == null ? void 0 : t.listeners) !== !1 && c() && (n.listeners = !0), v(this, y, Jt).call(this, { ...n, ...t });
839
+ (t == null ? void 0 : t.listeners) !== !1 && c() && (n.listeners = !0), v(this, y, Xt).call(this, { ...n, ...t });
840
840
  }
841
841
  onQueryUpdate() {
842
842
  this.updateResult(), this.hasListeners() && v(this, y, Ct).call(this);
@@ -856,7 +856,7 @@ var E, d, nt, F, B, X, I, at, Y, tt, G, H, L, et, y, rt, gt, Rt, St, Ct, wt, Ft,
856
856
  );
857
857
  if (st || i(this, F).isStale || !ft(t))
858
858
  return;
859
- const r = Bt(i(this, F).dataUpdatedAt, t) + 1;
859
+ const r = Gt(i(this, F).dataUpdatedAt, t) + 1;
860
860
  h(this, G, setTimeout(() => {
861
861
  i(this, F).isStale || this.updateResult();
862
862
  }, r));
@@ -864,7 +864,7 @@ var E, d, nt, F, B, X, I, at, Y, tt, G, H, L, et, y, rt, gt, Rt, St, Ct, wt, Ft,
864
864
  return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(i(this, d)) : this.options.refetchInterval) ?? !1;
865
865
  }, St = function(t) {
866
866
  v(this, y, Ft).call(this), h(this, L, t), !(st || q(this.options.enabled, i(this, d)) === !1 || !ft(i(this, L)) || i(this, L) === 0) && h(this, H, setInterval(() => {
867
- (this.options.refetchIntervalInBackground || Ht.isFocused()) && v(this, y, rt).call(this);
867
+ (this.options.refetchIntervalInBackground || Vt.isFocused()) && v(this, y, rt).call(this);
868
868
  }, i(this, L)));
869
869
  }, Ct = function() {
870
870
  v(this, y, gt).call(this), v(this, y, St).call(this, v(this, y, Rt).call(this));
@@ -878,7 +878,7 @@ var E, d, nt, F, B, X, I, at, Y, tt, G, H, L, et, y, rt, gt, Rt, St, Ct, wt, Ft,
878
878
  return;
879
879
  const s = i(this, d);
880
880
  h(this, d, t), h(this, nt, t.state), this.hasListeners() && (s == null || s.removeObserver(this), t.addObserver(this));
881
- }, Jt = function(t) {
881
+ }, Xt = function(t) {
882
882
  Tt.batch(() => {
883
883
  t.listeners && this.listeners.forEach((s) => {
884
884
  s(i(this, F));
@@ -910,10 +910,10 @@ function Ut(e, t) {
910
910
  function me(e, t) {
911
911
  return !pt(e.getCurrentResult(), t);
912
912
  }
913
- var Xt = T.createContext(
913
+ var Yt = T.createContext(
914
914
  void 0
915
915
  ), be = (e) => {
916
- const t = T.useContext(Xt);
916
+ const t = T.useContext(Yt);
917
917
  if (!t)
918
918
  throw new Error("No QueryClient set, use QueryClientProvider to set one");
919
919
  return t;
@@ -922,8 +922,8 @@ var Xt = T.createContext(
922
922
  children: t
923
923
  }) => (T.useEffect(() => (e.mount(), () => {
924
924
  e.unmount();
925
- }), [e]), /* @__PURE__ */ ie.jsx(Xt.Provider, { value: e, children: t })), Yt = T.createContext(!1), ge = () => T.useContext(Yt);
926
- Yt.Provider;
925
+ }), [e]), /* @__PURE__ */ ne.jsx(Yt.Provider, { value: e, children: t })), te = T.createContext(!1), ge = () => T.useContext(te);
926
+ te.Provider;
927
927
  function Re() {
928
928
  let e = !1;
929
929
  return {
@@ -958,7 +958,7 @@ var Fe = (e, t) => {
958
958
  }, Te = (e, t) => (e == null ? void 0 : e.suspense) && t.isPending, Ue = (e, t, s) => t.fetchOptimistic(e).catch(() => {
959
959
  s.clearReset();
960
960
  });
961
- function te(e, t, s) {
961
+ function ee(e, t, s) {
962
962
  var R, m, a, u;
963
963
  if (process.env.NODE_ENV !== "production" && (typeof e != "object" || Array.isArray(e)))
964
964
  throw new Error(
@@ -1004,10 +1004,10 @@ function te(e, t, s) {
1004
1004
  ), o.notifyOnChangeProps ? b : l.trackResult(b);
1005
1005
  }
1006
1006
  function Ae(e, t) {
1007
- return te(e, Zt);
1007
+ return ee(e, Jt);
1008
1008
  }
1009
1009
  function Qe(e, t) {
1010
- return process.env.NODE_ENV !== "production" && e.queryFn === bt && console.error("skipToken is not allowed for useSuspenseQuery"), te(
1010
+ return process.env.NODE_ENV !== "production" && e.queryFn === bt && console.error("skipToken is not allowed for useSuspenseQuery"), ee(
1011
1011
  {
1012
1012
  ...e,
1013
1013
  enabled: !0,
@@ -1015,13 +1015,13 @@ function Qe(e, t) {
1015
1015
  throwOnError: De,
1016
1016
  placeholderData: void 0
1017
1017
  },
1018
- Zt
1018
+ Jt
1019
1019
  );
1020
1020
  }
1021
- const qe = se(
1021
+ const qe = re(
1022
1022
  void 0
1023
1023
  ), At = () => {
1024
- const e = re(qe);
1024
+ const e = ie(qe);
1025
1025
  if (!e)
1026
1026
  throw new Error("useDevPortal must be used within a DevPortalProvider.");
1027
1027
  return e;
@@ -1032,16 +1032,16 @@ const qe = se(
1032
1032
  queryKey: ["api-identities"]
1033
1033
  });
1034
1034
  }, Ie = () => {
1035
- const { topNavigation: e } = At(), s = ne().pathname.split("/").at(1);
1035
+ const { topNavigation: e } = At(), s = Bt().pathname.split("/").at(1);
1036
1036
  if (s)
1037
1037
  return e.find((r) => r.id === s);
1038
1038
  }, $e = () => {
1039
- const { getPluginSidebar: e, sidebars: t } = At(), s = Ie(), r = s == null ? void 0 : s.id, n = r ? t[r] ?? [] : [];
1039
+ const { getPluginSidebar: e, sidebars: t } = At(), s = Ie(), r = s == null ? void 0 : s.id, n = r ? t[r] ?? [] : [], c = Bt();
1040
1040
  return Qe({
1041
1041
  queryFn: async () => {
1042
- const c = r ? await e(r) : [];
1042
+ const o = r ? await e(r) : await e(c.pathname);
1043
1043
  return {
1044
- items: [...n, ...c],
1044
+ items: [...n, ...o],
1045
1045
  currentTopNavItem: s
1046
1046
  };
1047
1047
  },
@@ -1059,7 +1059,7 @@ export {
1059
1059
  Be as c,
1060
1060
  _e as d,
1061
1061
  ue as e,
1062
- Ht as f,
1062
+ Vt as f,
1063
1063
  Le as g,
1064
1064
  ae as h,
1065
1065
  yt as i,
@@ -1068,7 +1068,7 @@ export {
1068
1068
  Ie as l,
1069
1069
  Ne as m,
1070
1070
  Tt as n,
1071
- Vt as o,
1071
+ zt as o,
1072
1072
  Pt as p,
1073
1073
  $e as q,
1074
1074
  ut as r,
@@ -1081,4 +1081,4 @@ export {
1081
1081
  Ve as y,
1082
1082
  we as z
1083
1083
  };
1084
- //# sourceMappingURL=ZudokuContext-C3JtXViU.js.map
1084
+ //# sourceMappingURL=ZudokuContext-BIZ8zHbZ.js.map