zudoku 0.46.3 → 0.47.1

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 (128) hide show
  1. package/dist/app/main.js +2 -2
  2. package/dist/app/main.js.map +1 -1
  3. package/dist/config/config.d.ts +11 -0
  4. package/dist/config/validators/InputSidebarSchema.d.ts +1 -1
  5. package/dist/config/validators/validate.d.ts +167 -47
  6. package/dist/config/validators/validate.js +22 -1
  7. package/dist/config/validators/validate.js.map +1 -1
  8. package/dist/config/validators/validate.test.d.ts +1 -0
  9. package/dist/config/validators/validate.test.js +80 -0
  10. package/dist/config/validators/validate.test.js.map +1 -0
  11. package/dist/lib/auth/issuer.d.ts +2 -0
  12. package/dist/lib/auth/issuer.js +37 -0
  13. package/dist/lib/auth/issuer.js.map +1 -0
  14. package/dist/lib/auth/issuer.test.d.ts +1 -0
  15. package/dist/lib/auth/issuer.test.js +94 -0
  16. package/dist/lib/auth/issuer.test.js.map +1 -0
  17. package/dist/lib/authentication/hook.d.ts +6 -0
  18. package/dist/lib/authentication/providers/auth0.js +1 -1
  19. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  20. package/dist/lib/authentication/providers/azureb2c.d.ts +28 -0
  21. package/dist/lib/authentication/providers/azureb2c.js +145 -0
  22. package/dist/lib/authentication/providers/azureb2c.js.map +1 -0
  23. package/dist/lib/authentication/providers/clerk.js +3 -12
  24. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  25. package/dist/lib/authentication/providers/openid.d.ts +1 -0
  26. package/dist/lib/authentication/providers/openid.js +38 -0
  27. package/dist/lib/authentication/providers/openid.js.map +1 -1
  28. package/dist/lib/authentication/providers/supabase.js +2 -9
  29. package/dist/lib/authentication/providers/supabase.js.map +1 -1
  30. package/dist/lib/authentication/state.d.ts +6 -5
  31. package/dist/lib/authentication/state.js +19 -6
  32. package/dist/lib/authentication/state.js.map +1 -1
  33. package/dist/lib/components/context/ZudokuProvider.d.ts +1 -1
  34. package/dist/lib/components/index.d.ts +6 -0
  35. package/dist/lib/hooks/index.d.ts +6 -0
  36. package/dist/lib/plugins/api-keys/index.js +1 -3
  37. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  38. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +1 -1
  39. package/dist/lib/plugins/openapi/playground/Headers.d.ts +2 -2
  40. package/dist/lib/plugins/openapi/playground/fileUtils.js +1 -1
  41. package/dist/lib/plugins/openapi/playground/fileUtils.js.map +1 -1
  42. package/dist/lib/util/MdxComponents.js +1 -1
  43. package/dist/lib/util/MdxComponents.js.map +1 -1
  44. package/dist/vite/build.js +1 -28
  45. package/dist/vite/build.js.map +1 -1
  46. package/lib/Drawer-BzkOKwgC.js.map +1 -1
  47. package/lib/{Markdown-D81l28Ib.js → Markdown-r4buN85T.js} +37 -37
  48. package/lib/{Markdown-D81l28Ib.js.map → Markdown-r4buN85T.js.map} +1 -1
  49. package/lib/{MdxPage-S_CxlNmX.js → MdxPage-DYKsTerz.js} +4 -4
  50. package/lib/{MdxPage-S_CxlNmX.js.map → MdxPage-DYKsTerz.js.map} +1 -1
  51. package/lib/{OasProvider-D5rt6WMb.js → OasProvider-8vNiLpIG.js} +2 -2
  52. package/lib/{OasProvider-D5rt6WMb.js.map → OasProvider-8vNiLpIG.js.map} +1 -1
  53. package/lib/{OperationList-CNhg654C.js → OperationList-BCVHtZNK.js} +6 -6
  54. package/lib/OperationList-BCVHtZNK.js.map +1 -0
  55. package/lib/{RouteGuard-CZ_uLv3g.js → RouteGuard-B7GVW4oL.js} +2 -2
  56. package/lib/{RouteGuard-CZ_uLv3g.js.map → RouteGuard-B7GVW4oL.js.map} +1 -1
  57. package/lib/{SchemaList-BvzCrTYg.js → SchemaList-1oJKvBxh.js} +6 -6
  58. package/lib/{SchemaList-BvzCrTYg.js.map → SchemaList-1oJKvBxh.js.map} +1 -1
  59. package/lib/{SchemaView-Br1RupCp.js → SchemaView-CTqaB-79.js} +3 -3
  60. package/lib/{SchemaView-Br1RupCp.js.map → SchemaView-CTqaB-79.js.map} +1 -1
  61. package/lib/{SignUp-B-1Pvc-8.js → SignUp-CRIKdWt9.js} +2 -2
  62. package/lib/{SignUp-B-1Pvc-8.js.map → SignUp-CRIKdWt9.js.map} +1 -1
  63. package/lib/{Slot-T8NJUkm4.js → Slot-B5qSAnwR.js} +4 -4
  64. package/lib/{Slot-T8NJUkm4.js.map → Slot-B5qSAnwR.js.map} +1 -1
  65. package/lib/{SyntaxHighlight-Cz6Me7-F.js → SyntaxHighlight-CqKHkyEy.js} +1291 -1265
  66. package/lib/SyntaxHighlight-CqKHkyEy.js.map +1 -0
  67. package/lib/{Toc-PA-j0gEu.js → Toc-lxYQEOzX.js} +2 -2
  68. package/lib/{Toc-PA-j0gEu.js.map → Toc-lxYQEOzX.js.map} +1 -1
  69. package/lib/{circular-5FeDWJOn.js → circular-ZGGPtwMq.js} +2 -2
  70. package/lib/{circular-5FeDWJOn.js.map → circular-ZGGPtwMq.js.map} +1 -1
  71. package/lib/clerk-yAKDC3Qz.js +24812 -0
  72. package/lib/clerk-yAKDC3Qz.js.map +1 -0
  73. package/lib/{createServer-BC2RZgmW.js → createServer-DUBpXfvA.js} +2627 -2617
  74. package/lib/createServer-DUBpXfvA.js.map +1 -0
  75. package/lib/errors-D27ZTQgx.js +78 -0
  76. package/lib/errors-D27ZTQgx.js.map +1 -0
  77. package/lib/{hook-k7PfUIsj.js → hook-7wZANGJP.js} +53 -35
  78. package/lib/{hook-k7PfUIsj.js.map → hook-7wZANGJP.js.map} +1 -1
  79. package/lib/index-CrcNWbel.js.map +1 -1
  80. package/lib/{index-CJZthJSj.js → index-Cucjfk3D.js} +10 -10
  81. package/lib/index-Cucjfk3D.js.map +1 -0
  82. package/lib/{index-zddirpDj.js → index-DmNq2fbN.js} +226 -221
  83. package/lib/index-DmNq2fbN.js.map +1 -0
  84. package/lib/{mutation-BSeQ8pEK.js → mutation-C1XCQTQL.js} +2 -2
  85. package/lib/{mutation-BSeQ8pEK.js.map → mutation-C1XCQTQL.js.map} +1 -1
  86. package/lib/ui/SyntaxHighlight.js +2 -2
  87. package/lib/{useMutation-CZSmsIGW.js → useMutation-BKvPttRn.js} +3 -3
  88. package/lib/{useMutation-CZSmsIGW.js.map → useMutation-BKvPttRn.js.map} +1 -1
  89. package/lib/zudoku.auth-auth0.js +2 -2
  90. package/lib/zudoku.auth-auth0.js.map +1 -1
  91. package/lib/zudoku.auth-azureb2c.js +9974 -0
  92. package/lib/zudoku.auth-azureb2c.js.map +1 -0
  93. package/lib/zudoku.auth-clerk.js +39 -48
  94. package/lib/zudoku.auth-clerk.js.map +1 -1
  95. package/lib/zudoku.auth-openid.js +291 -316
  96. package/lib/zudoku.auth-openid.js.map +1 -1
  97. package/lib/zudoku.components.js +1222 -1594
  98. package/lib/zudoku.components.js.map +1 -1
  99. package/lib/zudoku.hooks.js +2 -2
  100. package/lib/zudoku.plugin-api-catalog.js +2 -2
  101. package/lib/zudoku.plugin-api-keys.js +19 -21
  102. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  103. package/lib/zudoku.plugin-custom-pages.js +1 -1
  104. package/lib/zudoku.plugin-markdown.js +1 -1
  105. package/lib/zudoku.plugin-openapi.js +2 -2
  106. package/lib/zudoku.plugin-search-pagefind.js +2 -2
  107. package/package.json +40 -22
  108. package/src/app/main.tsx +2 -2
  109. package/src/lib/auth/issuer.test.ts +120 -0
  110. package/src/lib/auth/issuer.ts +41 -0
  111. package/src/lib/authentication/providers/auth0.tsx +1 -1
  112. package/src/lib/authentication/providers/azureb2c.tsx +196 -0
  113. package/src/lib/authentication/providers/clerk.tsx +3 -12
  114. package/src/lib/authentication/providers/openid.tsx +53 -0
  115. package/src/lib/authentication/providers/supabase.tsx +2 -9
  116. package/src/lib/authentication/state.ts +37 -7
  117. package/src/lib/components/context/ZudokuProvider.tsx +1 -1
  118. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +1 -1
  119. package/src/lib/plugins/api-keys/index.tsx +1 -3
  120. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +1 -1
  121. package/src/lib/plugins/openapi/playground/Headers.tsx +2 -2
  122. package/src/lib/plugins/openapi/playground/fileUtils.ts +1 -1
  123. package/src/lib/util/MdxComponents.tsx +1 -1
  124. package/lib/OperationList-CNhg654C.js.map +0 -1
  125. package/lib/SyntaxHighlight-Cz6Me7-F.js.map +0 -1
  126. package/lib/createServer-BC2RZgmW.js.map +0 -1
  127. package/lib/index-CJZthJSj.js.map +0 -1
  128. package/lib/index-zddirpDj.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-CRIKdWt9.js";
4
+ import { d as l, j as c } from "./hook-7wZANGJP.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-D27ZTQgx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors-D27ZTQgx.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) => {
@@ -1231,10 +1231,7 @@ function Se(e, t) {
1231
1231
  const o = (u) => u === null ? null : JSON.parse(u, void 0), i = (a = s.getItem(n)) != null ? a : null;
1232
1232
  return i instanceof Promise ? i.then(o) : o(i);
1233
1233
  },
1234
- setItem: (n, a) => s.setItem(
1235
- n,
1236
- JSON.stringify(a, void 0)
1237
- ),
1234
+ setItem: (n, a) => s.setItem(n, JSON.stringify(a, void 0)),
1238
1235
  removeItem: (n) => s.removeItem(n)
1239
1236
  };
1240
1237
  }
@@ -1372,7 +1369,28 @@ const B = (e) => (t) => {
1372
1369
  isAuthenticated: !1,
1373
1370
  isPending: !0,
1374
1371
  profile: null,
1375
- providerData: null
1372
+ providerData: null,
1373
+ setAuthenticationPending: () => e(() => ({
1374
+ isAuthenticated: !1,
1375
+ isPending: !1,
1376
+ profile: null,
1377
+ providerData: null
1378
+ })),
1379
+ setLoggedOut: () => e(() => ({
1380
+ isAuthenticated: !1,
1381
+ isPending: !1,
1382
+ profile: null,
1383
+ providerData: null
1384
+ })),
1385
+ setLoggedIn: ({
1386
+ profile: t,
1387
+ providerData: s
1388
+ }) => e(() => ({
1389
+ isAuthenticated: !0,
1390
+ isPending: !1,
1391
+ profile: t,
1392
+ providerData: s
1393
+ }))
1376
1394
  }),
1377
1395
  {
1378
1396
  merge: (e, t) => ({
@@ -1416,28 +1434,28 @@ export {
1416
1434
  ue as A,
1417
1435
  ce as B,
1418
1436
  be as C,
1419
- k as D,
1437
+ A as D,
1420
1438
  bt as E,
1421
1439
  z as F,
1422
- x as G,
1440
+ k as G,
1423
1441
  Ct as H,
1424
- xt as I,
1442
+ kt as I,
1425
1443
  ge as J,
1426
1444
  J as K,
1427
1445
  ut as L,
1428
1446
  ht as M,
1429
1447
  It as N,
1430
1448
  Se as O,
1431
- At as P,
1449
+ xt as P,
1432
1450
  Et as Q,
1433
1451
  qe as R,
1434
1452
  G as S,
1435
1453
  Tt as T,
1436
- kt as U,
1454
+ At as U,
1437
1455
  rt as Z,
1438
1456
  Pt as a,
1439
1457
  Dt as b,
1440
- xe as c,
1458
+ ke as c,
1441
1459
  Ye as d,
1442
1460
  ye as e,
1443
1461
  ne as f,
@@ -1462,4 +1480,4 @@ export {
1462
1480
  Rt as y,
1463
1481
  Ot as z
1464
1482
  };
1465
- //# sourceMappingURL=hook-k7PfUIsj.js.map
1483
+ //# sourceMappingURL=hook-7wZANGJP.js.map