zudoku 0.46.3 → 0.47.0

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 (117) hide show
  1. package/dist/config/config.d.ts +11 -0
  2. package/dist/config/validators/InputSidebarSchema.d.ts +1 -1
  3. package/dist/config/validators/validate.d.ts +47 -47
  4. package/dist/config/validators/validate.js +11 -1
  5. package/dist/config/validators/validate.js.map +1 -1
  6. package/dist/config/validators/validate.test.d.ts +1 -0
  7. package/dist/config/validators/validate.test.js +80 -0
  8. package/dist/config/validators/validate.test.js.map +1 -0
  9. package/dist/lib/auth/issuer.d.ts +2 -0
  10. package/dist/lib/auth/issuer.js +34 -0
  11. package/dist/lib/auth/issuer.js.map +1 -0
  12. package/dist/lib/auth/issuer.test.d.ts +1 -0
  13. package/dist/lib/auth/issuer.test.js +81 -0
  14. package/dist/lib/auth/issuer.test.js.map +1 -0
  15. package/dist/lib/authentication/hook.d.ts +6 -0
  16. package/dist/lib/authentication/providers/auth0.js +1 -1
  17. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  18. package/dist/lib/authentication/providers/azureb2c.d.ts +28 -0
  19. package/dist/lib/authentication/providers/azureb2c.js +145 -0
  20. package/dist/lib/authentication/providers/azureb2c.js.map +1 -0
  21. package/dist/lib/authentication/providers/clerk.js +3 -12
  22. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  23. package/dist/lib/authentication/providers/openid.d.ts +1 -0
  24. package/dist/lib/authentication/providers/openid.js +38 -0
  25. package/dist/lib/authentication/providers/openid.js.map +1 -1
  26. package/dist/lib/authentication/providers/supabase.js +2 -9
  27. package/dist/lib/authentication/providers/supabase.js.map +1 -1
  28. package/dist/lib/authentication/state.d.ts +6 -5
  29. package/dist/lib/authentication/state.js +19 -6
  30. package/dist/lib/authentication/state.js.map +1 -1
  31. package/dist/lib/components/context/ZudokuProvider.d.ts +1 -1
  32. package/dist/lib/components/index.d.ts +6 -0
  33. package/dist/lib/hooks/index.d.ts +6 -0
  34. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +1 -1
  35. package/dist/lib/plugins/openapi/playground/Headers.d.ts +2 -2
  36. package/dist/lib/plugins/openapi/playground/fileUtils.js +1 -1
  37. package/dist/lib/plugins/openapi/playground/fileUtils.js.map +1 -1
  38. package/dist/lib/util/MdxComponents.js +1 -1
  39. package/dist/lib/util/MdxComponents.js.map +1 -1
  40. package/dist/vite/build.js +1 -28
  41. package/dist/vite/build.js.map +1 -1
  42. package/lib/{Markdown-D81l28Ib.js → Markdown-BUE2ViaD.js} +37 -37
  43. package/lib/{Markdown-D81l28Ib.js.map → Markdown-BUE2ViaD.js.map} +1 -1
  44. package/lib/{MdxPage-S_CxlNmX.js → MdxPage-By4UkRkI.js} +4 -4
  45. package/lib/{MdxPage-S_CxlNmX.js.map → MdxPage-By4UkRkI.js.map} +1 -1
  46. package/lib/{OasProvider-D5rt6WMb.js → OasProvider-C6_Kx5O7.js} +2 -2
  47. package/lib/{OasProvider-D5rt6WMb.js.map → OasProvider-C6_Kx5O7.js.map} +1 -1
  48. package/lib/{OperationList-CNhg654C.js → OperationList-BISd29LY.js} +6 -6
  49. package/lib/OperationList-BISd29LY.js.map +1 -0
  50. package/lib/{RouteGuard-CZ_uLv3g.js → RouteGuard-CgmsSw7T.js} +2 -2
  51. package/lib/{RouteGuard-CZ_uLv3g.js.map → RouteGuard-CgmsSw7T.js.map} +1 -1
  52. package/lib/{SchemaList-BvzCrTYg.js → SchemaList-BqnRo5ov.js} +6 -6
  53. package/lib/{SchemaList-BvzCrTYg.js.map → SchemaList-BqnRo5ov.js.map} +1 -1
  54. package/lib/{SchemaView-Br1RupCp.js → SchemaView-CtYJpxQI.js} +3 -3
  55. package/lib/{SchemaView-Br1RupCp.js.map → SchemaView-CtYJpxQI.js.map} +1 -1
  56. package/lib/{SignUp-B-1Pvc-8.js → SignUp-CrjeBbqN.js} +2 -2
  57. package/lib/{SignUp-B-1Pvc-8.js.map → SignUp-CrjeBbqN.js.map} +1 -1
  58. package/lib/{Slot-T8NJUkm4.js → Slot-DANV2b7_.js} +4 -4
  59. package/lib/{Slot-T8NJUkm4.js.map → Slot-DANV2b7_.js.map} +1 -1
  60. package/lib/{SyntaxHighlight-Cz6Me7-F.js → SyntaxHighlight-DtvR7RLF.js} +1291 -1265
  61. package/lib/SyntaxHighlight-DtvR7RLF.js.map +1 -0
  62. package/lib/{Toc-PA-j0gEu.js → Toc-ClJBmdtI.js} +2 -2
  63. package/lib/{Toc-PA-j0gEu.js.map → Toc-ClJBmdtI.js.map} +1 -1
  64. package/lib/{circular-5FeDWJOn.js → circular-pOdgLzpG.js} +2 -2
  65. package/lib/{circular-5FeDWJOn.js.map → circular-pOdgLzpG.js.map} +1 -1
  66. package/lib/clerk-yAKDC3Qz.js +24812 -0
  67. package/lib/clerk-yAKDC3Qz.js.map +1 -0
  68. package/lib/{createServer-BC2RZgmW.js → createServer-qAtUf99r.js} +2625 -2615
  69. package/lib/createServer-qAtUf99r.js.map +1 -0
  70. package/lib/errors-Bpodza84.js +78 -0
  71. package/lib/errors-Bpodza84.js.map +1 -0
  72. package/lib/{hook-k7PfUIsj.js → hook-wIlTGE-2.js} +52 -31
  73. package/lib/{hook-k7PfUIsj.js.map → hook-wIlTGE-2.js.map} +1 -1
  74. package/lib/{index-CJZthJSj.js → index-RFzRn4fM.js} +10 -10
  75. package/lib/index-RFzRn4fM.js.map +1 -0
  76. package/lib/{mutation-BSeQ8pEK.js → mutation-C-kdA_1r.js} +2 -2
  77. package/lib/{mutation-BSeQ8pEK.js.map → mutation-C-kdA_1r.js.map} +1 -1
  78. package/lib/ui/SyntaxHighlight.js +2 -2
  79. package/lib/{useMutation-CZSmsIGW.js → useMutation-3Ph3x6En.js} +3 -3
  80. package/lib/{useMutation-CZSmsIGW.js.map → useMutation-3Ph3x6En.js.map} +1 -1
  81. package/lib/zudoku.auth-auth0.js +2 -2
  82. package/lib/zudoku.auth-auth0.js.map +1 -1
  83. package/lib/zudoku.auth-azureb2c.js +9974 -0
  84. package/lib/zudoku.auth-azureb2c.js.map +1 -0
  85. package/lib/zudoku.auth-clerk.js +39 -48
  86. package/lib/zudoku.auth-clerk.js.map +1 -1
  87. package/lib/zudoku.auth-openid.js +291 -316
  88. package/lib/zudoku.auth-openid.js.map +1 -1
  89. package/lib/zudoku.components.js +1222 -1594
  90. package/lib/zudoku.components.js.map +1 -1
  91. package/lib/zudoku.hooks.js +2 -2
  92. package/lib/zudoku.plugin-api-catalog.js +2 -2
  93. package/lib/zudoku.plugin-api-keys.js +3 -3
  94. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  95. package/lib/zudoku.plugin-custom-pages.js +1 -1
  96. package/lib/zudoku.plugin-markdown.js +1 -1
  97. package/lib/zudoku.plugin-openapi.js +2 -2
  98. package/lib/zudoku.plugin-search-pagefind.js +2 -2
  99. package/package.json +37 -19
  100. package/src/lib/auth/issuer.test.ts +104 -0
  101. package/src/lib/auth/issuer.ts +38 -0
  102. package/src/lib/authentication/providers/auth0.tsx +1 -1
  103. package/src/lib/authentication/providers/azureb2c.tsx +196 -0
  104. package/src/lib/authentication/providers/clerk.tsx +3 -12
  105. package/src/lib/authentication/providers/openid.tsx +53 -0
  106. package/src/lib/authentication/providers/supabase.tsx +2 -9
  107. package/src/lib/authentication/state.ts +37 -7
  108. package/src/lib/components/context/ZudokuProvider.tsx +1 -1
  109. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +1 -1
  110. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +1 -1
  111. package/src/lib/plugins/openapi/playground/Headers.tsx +2 -2
  112. package/src/lib/plugins/openapi/playground/fileUtils.ts +1 -1
  113. package/src/lib/util/MdxComponents.tsx +1 -1
  114. package/lib/OperationList-CNhg654C.js.map +0 -1
  115. package/lib/SyntaxHighlight-Cz6Me7-F.js.map +0 -1
  116. package/lib/createServer-BC2RZgmW.js.map +0 -1
  117. package/lib/index-CJZthJSj.js.map +0 -1
@@ -0,0 +1,78 @@
1
+ import { j as o } from "./jsx-runtime-C5mzlN2N.js";
2
+ import { LogOutIcon as a } from "lucide-react";
3
+ import { S as s, a as u, b as i } from "./SignUp-CrjeBbqN.js";
4
+ import { d as l, j as c } from "./hook-wIlTGE-2.js";
5
+ import { N as h } from "./chunk-DQRVZFIR-BblmKnHy.js";
6
+ import { useZudoku as m } from "./zudoku.components.js";
7
+ import { Z as p } from "./invariant-DAFpPywt.js";
8
+ class C {
9
+ getRoutes() {
10
+ return [
11
+ {
12
+ path: "/signout",
13
+ element: /* @__PURE__ */ o.jsx(s, {})
14
+ },
15
+ {
16
+ path: "/signin",
17
+ element: /* @__PURE__ */ o.jsx(u, {})
18
+ },
19
+ {
20
+ path: "/signup",
21
+ element: /* @__PURE__ */ o.jsx(i, {})
22
+ }
23
+ ];
24
+ }
25
+ getProfileMenuItems() {
26
+ return [
27
+ {
28
+ label: "Logout",
29
+ path: "/signout",
30
+ category: "bottom",
31
+ icon: a
32
+ }
33
+ ];
34
+ }
35
+ }
36
+ function g(t, r, e = "/") {
37
+ return t.startsWith(r) ? e !== "/" && t.startsWith(r + e) ? t.slice(r.length + e.length) : t.slice(r.length) : t;
38
+ }
39
+ function E({
40
+ handleCallback: t
41
+ }) {
42
+ const { options: r } = m(), e = l({
43
+ retry: !1,
44
+ queryKey: ["oauth-callback"],
45
+ queryFn: async () => {
46
+ try {
47
+ return c(
48
+ g(
49
+ await t(),
50
+ window.location.origin,
51
+ r.basePath
52
+ )
53
+ );
54
+ } catch (n) {
55
+ throw new p("Could not validate user", {
56
+ cause: n,
57
+ title: "Authentication Error",
58
+ developerHint: "Check the configuration of your authorization provider and ensure all settings such as the callback URL are configured correctly."
59
+ });
60
+ }
61
+ }
62
+ });
63
+ return /* @__PURE__ */ o.jsx(h, { to: e.data });
64
+ }
65
+ class f extends Error {
66
+ }
67
+ class w extends f {
68
+ constructor(r, e, n) {
69
+ super(r, n), this.error = e;
70
+ }
71
+ }
72
+ export {
73
+ f as A,
74
+ C,
75
+ w as O,
76
+ E as a
77
+ };
78
+ //# sourceMappingURL=errors-Bpodza84.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors-Bpodza84.js","sources":["../src/lib/authentication/AuthenticationPlugin.tsx","../src/lib/util/url.ts","../src/lib/authentication/components/CallbackHandler.tsx","../src/lib/authentication/errors.ts"],"sourcesContent":["import { LogOutIcon } from \"lucide-react\";\nimport {\n type CommonPlugin,\n type NavigationPlugin,\n type ProfileMenuPlugin,\n} from \"../core/plugins.js\";\nimport { SignIn } from \"./components/SignIn.js\";\nimport { SignOut } from \"./components/SignOut.js\";\nimport { SignUp } from \"./components/SignUp.js\";\n\ntype PluginInterface = NavigationPlugin & CommonPlugin & ProfileMenuPlugin;\n\nexport class CoreAuthenticationPlugin implements PluginInterface {\n getRoutes() {\n return [\n {\n path: \"/signout\",\n element: <SignOut />,\n },\n {\n path: \"/signin\",\n element: <SignIn />,\n },\n {\n path: \"/signup\",\n element: <SignUp />,\n },\n ];\n }\n\n getProfileMenuItems() {\n return [\n {\n label: \"Logout\",\n path: \"/signout\",\n category: \"bottom\",\n icon: LogOutIcon,\n } as const,\n ];\n }\n}\n","/**\n * Normalizes a redirect URL by removing the origin and optionally the root path\n */\nexport function normalizeRedirectUrl(\n redirectTo: string,\n origin: string,\n basePath: string = \"/\",\n): string {\n if (!redirectTo.startsWith(origin)) {\n return redirectTo;\n }\n\n if (basePath !== \"/\" && redirectTo.startsWith(origin + basePath)) {\n return redirectTo.slice(origin.length + basePath.length);\n }\n\n return redirectTo.slice(origin.length);\n}\n","import { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { Navigate } from \"react-router\";\nimport { useZudoku } from \"zudoku/components\";\nimport { ZudokuError } from \"../../util/invariant.js\";\nimport { joinUrl } from \"../../util/joinUrl.js\";\nimport { normalizeRedirectUrl } from \"../../util/url.js\";\n\nexport function CallbackHandler({\n handleCallback,\n}: {\n handleCallback: () => Promise<string>;\n}) {\n const { options } = useZudoku();\n const executeCallback = useSuspenseQuery({\n retry: false,\n queryKey: [\"oauth-callback\"],\n queryFn: async () => {\n try {\n return joinUrl(\n normalizeRedirectUrl(\n await handleCallback(),\n window.location.origin,\n options.basePath,\n ),\n );\n } catch (error) {\n throw new ZudokuError(\"Could not validate user\", {\n cause: error,\n title: \"Authentication Error\",\n developerHint:\n \"Check the configuration of your authorization provider and ensure all settings such as the callback URL are configured correctly.\",\n });\n }\n },\n });\n\n return <Navigate to={executeCallback.data} />;\n}\n","export class AuthorizationError extends Error {}\n\ninterface OAuthError {\n readonly error: string;\n readonly error_description?: string;\n readonly error_uri?: string;\n readonly algs?: string;\n readonly scope?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n readonly [parameter: string]: any | undefined;\n}\n\nexport class OAuthAuthorizationError extends AuthorizationError {\n constructor(\n message: string,\n public error: OAuthError,\n options?: ErrorOptions,\n ) {\n super(message, options);\n }\n}\n"],"names":["CoreAuthenticationPlugin","SignOut","SignIn","SignUp","LogOutIcon","normalizeRedirectUrl","redirectTo","origin","basePath","CallbackHandler","handleCallback","options","useZudoku","executeCallback","useSuspenseQuery","joinUrl","error","ZudokuError","jsx","Navigate","AuthorizationError","OAuthAuthorizationError","message"],"mappings":";;;;;;;AAYO,MAAMA,EAAoD;AAAA,EAC/D,YAAY;AACH,WAAA;AAAA,MACL;AAAA,QACE,MAAM;AAAA,QACN,+BAAUC,GAAQ,CAAA,CAAA;AAAA,MACpB;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,+BAAUC,GAAO,CAAA,CAAA;AAAA,MACnB;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,+BAAUC,GAAO,CAAA,CAAA;AAAA,MAAA;AAAA,IAErB;AAAA,EAAA;AAAA,EAGF,sBAAsB;AACb,WAAA;AAAA,MACL;AAAA,QACE,OAAO;AAAA,QACP,MAAM;AAAA,QACN,UAAU;AAAA,QACV,MAAMC;AAAA,MAAA;AAAA,IAEV;AAAA,EAAA;AAEJ;ACrCO,SAASC,EACdC,GACAC,GACAC,IAAmB,KACX;AACR,SAAKF,EAAW,WAAWC,CAAM,IAI7BC,MAAa,OAAOF,EAAW,WAAWC,IAASC,CAAQ,IACtDF,EAAW,MAAMC,EAAO,SAASC,EAAS,MAAM,IAGlDF,EAAW,MAAMC,EAAO,MAAM,IAP5BD;AAQX;ACVO,SAASG,EAAgB;AAAA,EAC9B,gBAAAC;AACF,GAEG;AACK,QAAA,EAAE,SAAAC,EAAQ,IAAIC,EAAU,GACxBC,IAAkBC,EAAiB;AAAA,IACvC,OAAO;AAAA,IACP,UAAU,CAAC,gBAAgB;AAAA,IAC3B,SAAS,YAAY;AACf,UAAA;AACK,eAAAC;AAAA,UACLV;AAAA,YACE,MAAMK,EAAe;AAAA,YACrB,OAAO,SAAS;AAAA,YAChBC,EAAQ;AAAA,UAAA;AAAA,QAEZ;AAAA,eACOK,GAAO;AACR,cAAA,IAAIC,EAAY,2BAA2B;AAAA,UAC/C,OAAOD;AAAA,UACP,OAAO;AAAA,UACP,eACE;AAAA,QAAA,CACH;AAAA,MAAA;AAAA,IACH;AAAA,EACF,CACD;AAED,SAAQE,gBAAAA,EAAAA,IAAAC,GAAA,EAAS,IAAIN,EAAgB,KAAM,CAAA;AAC7C;ACrCO,MAAMO,UAA2B,MAAM;AAAC;AAYxC,MAAMC,UAAgCD,EAAmB;AAAA,EAC9D,YACEE,GACON,GACPL,GACA;AACA,UAAMW,GAASX,CAAO,GAHf,KAAA,QAAAK;AAAA,EAAA;AAKX;"}
@@ -1,7 +1,7 @@
1
1
  import * as S from "react";
2
2
  import Y, { createContext as Oe, useContext as Re } from "react";
3
3
  import { j as Ee } from "./jsx-runtime-C5mzlN2N.js";
4
- import { u as A, m as X } from "./chunk-DQRVZFIR-BblmKnHy.js";
4
+ import { u as x, m as X } from "./chunk-DQRVZFIR-BblmKnHy.js";
5
5
  import { c as Ce } from "./index-DI5SPFK9.js";
6
6
  var G = class {
7
7
  constructor() {
@@ -31,7 +31,7 @@ function U(e) {
31
31
  function oe(e, t) {
32
32
  return Math.max(e + (t || 0) - Date.now(), 0);
33
33
  }
34
- function k(e, t) {
34
+ function A(e, t) {
35
35
  return typeof e == "function" ? e(t) : e;
36
36
  }
37
37
  function w(e, t) {
@@ -155,11 +155,11 @@ function Rt(e, t, s = 0) {
155
155
  const r = [t, ...e];
156
156
  return s && r.length > s ? r.slice(0, -1) : r;
157
157
  }
158
- var x = Symbol();
158
+ var k = Symbol();
159
159
  function Pe(e, t) {
160
- return process.env.NODE_ENV !== "production" && e.queryFn === x && console.error(
160
+ return process.env.NODE_ENV !== "production" && e.queryFn === k && console.error(
161
161
  `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`
162
- ), !e.queryFn && t?.initialPromise ? () => t.initialPromise : !e.queryFn || e.queryFn === x ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
162
+ ), !e.queryFn && t?.initialPromise ? () => t.initialPromise : !e.queryFn || e.queryFn === k ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
163
163
  }
164
164
  var Te = class extends G {
165
165
  #t;
@@ -252,7 +252,7 @@ function H() {
252
252
  }), t(n);
253
253
  }, s;
254
254
  }
255
- function ke(e) {
255
+ function Ae(e) {
256
256
  return Math.min(1e3 * 2 ** e, 3e4);
257
257
  }
258
258
  function he(e) {
@@ -266,7 +266,7 @@ var le = class extends Error {
266
266
  function j(e) {
267
267
  return e instanceof le;
268
268
  }
269
- function xe(e) {
269
+ function ke(e) {
270
270
  let t = !1, s = 0, r = !1, n;
271
271
  const a = H(), o = (c) => {
272
272
  r || (d(new le(c)), e.abort?.());
@@ -297,7 +297,7 @@ function xe(e) {
297
297
  Promise.resolve(c).then(p).catch((v) => {
298
298
  if (r)
299
299
  return;
300
- const f = e.retry ?? (C ? 0 : 3), y = e.retryDelay ?? ke, E = typeof y == "function" ? y(s, v) : y, I = f === !0 || typeof f == "number" && s < f || typeof f == "function" && f(s, v);
300
+ const f = e.retry ?? (C ? 0 : 3), y = e.retryDelay ?? Ae, E = typeof y == "function" ? y(s, v) : y, I = f === !0 || typeof f == "number" && s < f || typeof f == "function" && f(s, v);
301
301
  if (t || !I) {
302
302
  d(v);
303
303
  return;
@@ -317,13 +317,13 @@ function xe(e) {
317
317
  start: () => (h() ? R() : m().then(R), a)
318
318
  };
319
319
  }
320
- var Ae = (e) => setTimeout(e, 0);
320
+ var xe = (e) => setTimeout(e, 0);
321
321
  function je() {
322
322
  let e = [], t = 0, s = (i) => {
323
323
  i();
324
324
  }, r = (i) => {
325
325
  i();
326
- }, n = Ae;
326
+ }, n = xe;
327
327
  const a = (i) => {
328
328
  t ? e.push(i) : n(() => {
329
329
  s(i);
@@ -447,7 +447,7 @@ var $ = je(), qe = class {
447
447
  );
448
448
  }
449
449
  isDisabled() {
450
- return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === x || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
450
+ return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === k || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
451
451
  }
452
452
  isStale() {
453
453
  return this.state.isInvalidated ? !0 : this.getObserversCount() > 0 ? this.observers.some(
@@ -530,7 +530,7 @@ var $ = je(), qe = class {
530
530
  this
531
531
  )), this.scheduleGc();
532
532
  };
533
- return this.#r = xe({
533
+ return this.#r = ke({
534
534
  initialPromise: t?.initialPromise,
535
535
  fn: a.fetchFn,
536
536
  abort: s.abort.bind(s),
@@ -734,7 +734,7 @@ var fe = class extends G {
734
734
  s,
735
735
  this.options,
736
736
  t
737
- ) && this.#l(), this.updateResult(), r && (this.#e !== s || w(this.options.enabled, this.#e) !== w(t.enabled, this.#e) || k(this.options.staleTime, this.#e) !== k(t.staleTime, this.#e)) && this.#v();
737
+ ) && this.#l(), this.updateResult(), r && (this.#e !== s || w(this.options.enabled, this.#e) !== w(t.enabled, this.#e) || A(this.options.staleTime, this.#e) !== A(t.staleTime, this.#e)) && this.#v();
738
738
  const n = this.#m();
739
739
  r && (this.#e !== s || w(this.options.enabled, this.#e) !== w(t.enabled, this.#e) || n !== this.#u) && this.#b(n);
740
740
  }
@@ -786,7 +786,7 @@ var fe = class extends G {
786
786
  }
787
787
  #v() {
788
788
  this.#S();
789
- const e = k(
789
+ const e = A(
790
790
  this.options.staleTime,
791
791
  this.#e
792
792
  );
@@ -955,7 +955,7 @@ function re(e, t, s, r) {
955
955
  return (e !== t || w(r.enabled, e) === !1) && (!s.suspense || e.state.status !== "error") && V(e, s);
956
956
  }
957
957
  function V(e, t) {
958
- return w(t.enabled, e) !== !1 && e.isStaleByTime(k(t.staleTime, e));
958
+ return w(t.enabled, e) !== !1 && e.isStaleByTime(A(t.staleTime, e));
959
959
  }
960
960
  function Le(e, t) {
961
961
  return !M(e.getCurrentResult(), t);
@@ -1068,7 +1068,7 @@ function We(e, t) {
1068
1068
  return me(e, fe, t);
1069
1069
  }
1070
1070
  function Ye(e, t) {
1071
- return process.env.NODE_ENV !== "production" && e.queryFn === x && console.error("skipToken is not allowed for useSuspenseQuery"), me(
1071
+ return process.env.NODE_ENV !== "production" && e.queryFn === k && console.error("skipToken is not allowed for useSuspenseQuery"), me(
1072
1072
  {
1073
1073
  ...e,
1074
1074
  enabled: !0,
@@ -1121,19 +1121,19 @@ const Xe = /^(\w+:\/\/[^/?]+)?([^?]*)(\?.*)?$/, et = (e) => e.filter(
1121
1121
  if (a !== void 0) return a;
1122
1122
  }
1123
1123
  }, Pt = () => {
1124
- const e = A(), s = ge().sidebar;
1124
+ const e = x(), s = ge().sidebar;
1125
1125
  return J(s, (r) => {
1126
1126
  if (r.type === "doc" && F(r.id) === e.pathname)
1127
1127
  return r;
1128
1128
  });
1129
1129
  }, Tt = (e) => {
1130
- const t = A();
1130
+ const t = x();
1131
1131
  return Z(e, (s) => {
1132
1132
  if (s.type === "category" && s.link && F(s.link.id) === t.pathname || s.type === "doc" && F(s.id) === t.pathname)
1133
1133
  return !0;
1134
1134
  });
1135
1135
  }, Dt = () => {
1136
- const e = A().pathname, s = ge().sidebar;
1136
+ const e = x().pathname, s = ge().sidebar;
1137
1137
  let r, n, a = !1;
1138
1138
  return J(s, (o) => {
1139
1139
  const i = o.type === "doc" ? F(o.id) : o.type === "category" && o.link ? F(o.link.id) : void 0;
@@ -1143,7 +1143,7 @@ const Xe = /^(\w+:\/\/[^/?]+)?([^?]*)(\?.*)?$/, et = (e) => e.filter(
1143
1143
  e === i ? a = !0 : r = { label: o.label, id: i };
1144
1144
  }
1145
1145
  }), { prev: r, next: n };
1146
- }, kt = Ce(
1146
+ }, At = Ce(
1147
1147
  "relative flex items-center gap-2 px-(--padding-nav-item) my-0.5 py-1.5 rounded-lg hover:bg-accent tabular-nums",
1148
1148
  {
1149
1149
  variants: {
@@ -1164,21 +1164,21 @@ const Xe = /^(\w+:\/\/[^/?]+)?([^?]*)(\?.*)?$/, et = (e) => e.filter(
1164
1164
  isActive: !1
1165
1165
  }
1166
1166
  }
1167
- ), xt = (e) => (t) => t.display === "hide" ? !1 : t.display === "auth" && e || t.display === "anon" && !e || !t.display || t.display === "always", rt = Oe(
1167
+ ), kt = (e) => (t) => t.display === "hide" ? !1 : t.display === "auth" && e || t.display === "anon" && !e || !t.display || t.display === "always", rt = Oe(
1168
1168
  void 0
1169
1169
  ), W = () => {
1170
1170
  const e = Re(rt);
1171
1171
  if (!e)
1172
1172
  throw new Error("useZudoku must be used within a ZudokuProvider.");
1173
1173
  return e;
1174
- }, At = () => {
1174
+ }, xt = () => {
1175
1175
  const { getApiIdentities: e } = W();
1176
1176
  return We({
1177
1177
  queryFn: e,
1178
1178
  queryKey: be.API_IDENTITIES
1179
1179
  });
1180
1180
  }, ge = () => {
1181
- const { getPluginSidebar: e, sidebars: t, topNavigation: s, options: r } = W(), n = A(), a = dt(), o = r.protectedRoutes?.some(
1181
+ const { getPluginSidebar: e, sidebars: t, topNavigation: s, options: r } = W(), n = x(), a = dt(), o = r.protectedRoutes?.some(
1182
1182
  (p) => X(p, n.pathname)
1183
1183
  );
1184
1184
  let i = Object.entries(t).find(([, p]) => J(p, (d) => {
@@ -1372,7 +1372,28 @@ const B = (e) => (t) => {
1372
1372
  isAuthenticated: !1,
1373
1373
  isPending: !0,
1374
1374
  profile: null,
1375
- providerData: null
1375
+ providerData: null,
1376
+ setAuthenticationPending: () => e(() => ({
1377
+ isAuthenticated: !1,
1378
+ isPending: !1,
1379
+ profile: null,
1380
+ providerData: null
1381
+ })),
1382
+ setLoggedOut: () => e(() => ({
1383
+ isAuthenticated: !1,
1384
+ isPending: !1,
1385
+ profile: null,
1386
+ providerData: null
1387
+ })),
1388
+ setLoggedIn: ({
1389
+ profile: t,
1390
+ providerData: s
1391
+ }) => e(() => ({
1392
+ isAuthenticated: !0,
1393
+ isPending: !1,
1394
+ profile: t,
1395
+ providerData: s
1396
+ }))
1376
1397
  }),
1377
1398
  {
1378
1399
  merge: (e, t) => ({
@@ -1416,28 +1437,28 @@ export {
1416
1437
  ue as A,
1417
1438
  ce as B,
1418
1439
  be as C,
1419
- k as D,
1440
+ A as D,
1420
1441
  bt as E,
1421
1442
  z as F,
1422
- x as G,
1443
+ k as G,
1423
1444
  Ct as H,
1424
- xt as I,
1445
+ kt as I,
1425
1446
  ge as J,
1426
1447
  J as K,
1427
1448
  ut as L,
1428
1449
  ht as M,
1429
1450
  It as N,
1430
1451
  Se as O,
1431
- At as P,
1452
+ xt as P,
1432
1453
  Et as Q,
1433
1454
  qe as R,
1434
1455
  G as S,
1435
1456
  Tt as T,
1436
- kt as U,
1457
+ At as U,
1437
1458
  rt as Z,
1438
1459
  Pt as a,
1439
1460
  Dt as b,
1440
- xe as c,
1461
+ ke as c,
1441
1462
  Ye as d,
1442
1463
  ye as e,
1443
1464
  ne as f,
@@ -1462,4 +1483,4 @@ export {
1462
1483
  Rt as y,
1463
1484
  Ot as z
1464
1485
  };
1465
- //# sourceMappingURL=hook-k7PfUIsj.js.map
1486
+ //# sourceMappingURL=hook-wIlTGE-2.js.map