zudoku 0.0.0-z6bcd96da → 0.0.0-z6e949a6d

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 (212) hide show
  1. package/dist/config/loader.js +3 -1
  2. package/dist/config/loader.js.map +1 -1
  3. package/dist/config/validators/InputNavigationSchema.d.ts +170 -120
  4. package/dist/config/validators/InputNavigationSchema.js +17 -0
  5. package/dist/config/validators/InputNavigationSchema.js.map +1 -1
  6. package/dist/config/validators/NavigationSchema.d.ts +10 -2
  7. package/dist/config/validators/NavigationSchema.js +6 -0
  8. package/dist/config/validators/NavigationSchema.js.map +1 -1
  9. package/dist/config/validators/ProtectedRoutesSchema.d.ts +1 -1
  10. package/dist/config/validators/validate.d.ts +7 -7
  11. package/dist/flat-config.d.ts +35 -24
  12. package/dist/lib/components/Heading.d.ts +1 -1
  13. package/dist/lib/components/MobileTopNavigation.js +2 -1
  14. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  15. package/dist/lib/components/TopNavigation.d.ts +7 -1
  16. package/dist/lib/components/TopNavigation.js +7 -2
  17. package/dist/lib/components/TopNavigation.js.map +1 -1
  18. package/dist/lib/components/context/ZudokuContext.d.ts +8 -1
  19. package/dist/lib/components/context/ZudokuContext.js +2 -0
  20. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  21. package/dist/lib/components/index.d.ts +18 -74
  22. package/dist/lib/components/index.js +19 -36
  23. package/dist/lib/components/index.js.map +1 -1
  24. package/dist/lib/components/navigation/Navigation.js +4 -3
  25. package/dist/lib/components/navigation/Navigation.js.map +1 -1
  26. package/dist/lib/components/navigation/NavigationCategory.js +8 -0
  27. package/dist/lib/components/navigation/NavigationCategory.js.map +1 -1
  28. package/dist/lib/components/navigation/NavigationFilterContext.d.ts +8 -0
  29. package/dist/lib/components/navigation/NavigationFilterContext.js +12 -0
  30. package/dist/lib/components/navigation/NavigationFilterContext.js.map +1 -0
  31. package/dist/lib/components/navigation/NavigationFilterInput.d.ts +3 -0
  32. package/dist/lib/components/navigation/NavigationFilterInput.js +9 -0
  33. package/dist/lib/components/navigation/NavigationFilterInput.js.map +1 -0
  34. package/dist/lib/components/navigation/NavigationItem.js +11 -1
  35. package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
  36. package/dist/lib/components/navigation/utils.d.ts +2 -1
  37. package/dist/lib/components/navigation/utils.js +22 -1
  38. package/dist/lib/components/navigation/utils.js.map +1 -1
  39. package/dist/lib/core/plugins.d.ts +11 -1
  40. package/dist/lib/core/plugins.js +1 -0
  41. package/dist/lib/core/plugins.js.map +1 -1
  42. package/dist/lib/core/transform-config.d.ts +2 -0
  43. package/dist/lib/core/transform-config.js +22 -0
  44. package/dist/lib/core/transform-config.js.map +1 -0
  45. package/dist/lib/hooks/index.d.ts +7 -30
  46. package/dist/lib/hooks/index.js +7 -15
  47. package/dist/lib/hooks/index.js.map +1 -1
  48. package/dist/lib/oas/graphql/circular.d.ts +1 -1
  49. package/dist/lib/oas/graphql/circular.js +18 -35
  50. package/dist/lib/oas/graphql/circular.js.map +1 -1
  51. package/dist/lib/oas/graphql/circular.test.js +33 -2
  52. package/dist/lib/oas/graphql/circular.test.js.map +1 -1
  53. package/dist/lib/oas/parser/index.js +14 -5
  54. package/dist/lib/oas/parser/index.js.map +1 -1
  55. package/dist/lib/plugins/openapi/playground/fileUtils.d.ts +1 -0
  56. package/dist/lib/plugins/openapi/playground/fileUtils.js +3 -0
  57. package/dist/lib/plugins/openapi/playground/fileUtils.js.map +1 -1
  58. package/dist/lib/plugins/openapi/playground/result-panel/AudioPlayer.d.ts +6 -0
  59. package/dist/lib/plugins/openapi/playground/result-panel/AudioPlayer.js +20 -0
  60. package/dist/lib/plugins/openapi/playground/result-panel/AudioPlayer.js.map +1 -0
  61. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +7 -2
  62. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
  63. package/dist/lib/ui/Command.d.ts +3 -3
  64. package/dist/lib/ui/InputGroup.d.ts +16 -0
  65. package/dist/lib/ui/InputGroup.js +65 -0
  66. package/dist/lib/ui/InputGroup.js.map +1 -0
  67. package/dist/lib/util/flattenAllOf.d.ts +0 -2
  68. package/dist/lib/util/flattenAllOf.js +0 -46
  69. package/dist/lib/util/flattenAllOf.js.map +1 -1
  70. package/dist/lib/util/flattenAllOf.test.js +2 -1
  71. package/dist/lib/util/flattenAllOf.test.js.map +1 -1
  72. package/dist/lib/util/flattenAllOfProcessor.d.ts +2 -0
  73. package/dist/lib/util/flattenAllOfProcessor.js +48 -0
  74. package/dist/lib/util/flattenAllOfProcessor.js.map +1 -0
  75. package/dist/lib/util/readFrontmatter.js +2 -1
  76. package/dist/lib/util/readFrontmatter.js.map +1 -1
  77. package/dist/vite/api/SchemaManager.js +1 -1
  78. package/dist/vite/api/SchemaManager.js.map +1 -1
  79. package/dist/vite/api/SchemaManager.test.js +1 -1
  80. package/dist/vite/api/SchemaManager.test.js.map +1 -1
  81. package/dist/vite/build.js +91 -73
  82. package/dist/vite/build.js.map +1 -1
  83. package/dist/vite/mdx/remark-inject-filepath.js +5 -1
  84. package/dist/vite/mdx/remark-inject-filepath.js.map +1 -1
  85. package/dist/vite/mdx/remark-link-rewrite.js +3 -2
  86. package/dist/vite/mdx/remark-link-rewrite.js.map +1 -1
  87. package/dist/vite/plugin-docs.js +9 -7
  88. package/dist/vite/plugin-docs.js.map +1 -1
  89. package/dist/vite/plugin-markdown-export.js +4 -2
  90. package/dist/vite/plugin-markdown-export.js.map +1 -1
  91. package/lib/{ClaudeLogo-DJ9bU-sO.js → ClaudeLogo-OpUSMQJe.js} +26 -22
  92. package/lib/{ClaudeLogo-DJ9bU-sO.js.map → ClaudeLogo-OpUSMQJe.js.map} +1 -1
  93. package/lib/{MdxPage-stpAoBtx.js → MdxPage-dzCPGdvD.js} +8 -8
  94. package/lib/{MdxPage-stpAoBtx.js.map → MdxPage-dzCPGdvD.js.map} +1 -1
  95. package/lib/{Mermaid-Koc3z8mU.js → Mermaid-JEnWyK0s.js} +3 -2
  96. package/lib/{Mermaid-Koc3z8mU.js.map → Mermaid-JEnWyK0s.js.map} +1 -1
  97. package/lib/{OAuthErrorPage-DJ811Bn_.js → OAuthErrorPage-D7n-_cqN.js} +20 -18
  98. package/lib/{OAuthErrorPage-DJ811Bn_.js.map → OAuthErrorPage-D7n-_cqN.js.map} +1 -1
  99. package/lib/{OasProvider-CS_ASmBB.js → OasProvider-DPPdikt_.js} +3 -3
  100. package/lib/{OasProvider-CS_ASmBB.js.map → OasProvider-DPPdikt_.js.map} +1 -1
  101. package/lib/{OperationList-Dq_AB4W9.js → OperationList-cEveQ_l5.js} +948 -946
  102. package/lib/OperationList-cEveQ_l5.js.map +1 -0
  103. package/lib/{RouteGuard--A04ESy8.js → RouteGuard-BMbu_Yb7.js} +5 -5
  104. package/lib/{RouteGuard--A04ESy8.js.map → RouteGuard-BMbu_Yb7.js.map} +1 -1
  105. package/lib/{SchemaList-BJZJv1gD.js → SchemaList-CRC8n5co.js} +7 -7
  106. package/lib/{SchemaList-BJZJv1gD.js.map → SchemaList-CRC8n5co.js.map} +1 -1
  107. package/lib/{SchemaView-U4JMYB3N.js → SchemaView-BR6dtnPg.js} +3 -3
  108. package/lib/{SchemaView-U4JMYB3N.js.map → SchemaView-BR6dtnPg.js.map} +1 -1
  109. package/lib/{SignUp-DCBViNUi.js → SignUp-ChqXj9vd.js} +31 -26
  110. package/lib/{SignUp-DCBViNUi.js.map → SignUp-ChqXj9vd.js.map} +1 -1
  111. package/lib/{SyntaxHighlight-Dshjn3Zf.js → SyntaxHighlight-O-IZOPLg.js} +3 -3
  112. package/lib/{SyntaxHighlight-Dshjn3Zf.js.map → SyntaxHighlight-O-IZOPLg.js.map} +1 -1
  113. package/lib/{Toc-Cgz6CPiE.js → Toc-DQF7trHT.js} +2 -2
  114. package/lib/{Toc-Cgz6CPiE.js.map → Toc-DQF7trHT.js.map} +1 -1
  115. package/lib/{index-CL8eDnQW.js → Zudoku-DA1yA-te.js} +2609 -2452
  116. package/lib/Zudoku-DA1yA-te.js.map +1 -0
  117. package/lib/{ZudokuContext-BZB1TWdT.js → ZudokuContext-C6wlLMUH.js} +137 -135
  118. package/lib/{ZudokuContext-BZB1TWdT.js.map → ZudokuContext-C6wlLMUH.js.map} +1 -1
  119. package/lib/{circular-BmMJjG1v.js → circular-C4l1Kj1N.js} +1327 -1346
  120. package/lib/{circular-BmMJjG1v.js.map → circular-C4l1Kj1N.js.map} +1 -1
  121. package/lib/createServer-DoRZ6tMa.js +13036 -0
  122. package/lib/createServer-DoRZ6tMa.js.map +1 -0
  123. package/lib/{errors-b9I-fAOY.js → errors-CYLN8SNc.js} +3 -3
  124. package/lib/{errors-b9I-fAOY.js.map → errors-CYLN8SNc.js.map} +1 -1
  125. package/lib/{firebase-BCXX7Qv5.js → firebase-DF-VVKB7.js} +14 -14
  126. package/lib/firebase-DF-VVKB7.js.map +1 -0
  127. package/lib/{hook-BGlHBdET.js → hook-C35h0YhF.js} +2 -2
  128. package/lib/{hook-BGlHBdET.js.map → hook-C35h0YhF.js.map} +1 -1
  129. package/lib/{index-O9RHI87z.js → index-Ck4TmzTO.js} +574 -538
  130. package/lib/index-Ck4TmzTO.js.map +1 -0
  131. package/lib/index-DAWHN3cH.js +86 -0
  132. package/lib/index-DAWHN3cH.js.map +1 -0
  133. package/lib/{index-UOLtazB8.js → index-DrAVvbXa.js} +2 -2
  134. package/lib/{index-UOLtazB8.js.map → index-DrAVvbXa.js.map} +1 -1
  135. package/lib/{index.esm-C5CBsVzN.js → index.esm-B2cLXwjS.js} +2 -2
  136. package/lib/index.esm-B2cLXwjS.js.map +1 -0
  137. package/lib/{index.esm-B_0dvNjB.js → index.esm-Ca5zvoff.js} +20 -20
  138. package/lib/{index.esm-B_0dvNjB.js.map → index.esm-Ca5zvoff.js.map} +1 -1
  139. package/lib/{invariant-BJAl77rw.js → invariant-B_t_F2s_.js} +3 -3
  140. package/lib/{invariant-BJAl77rw.js.map → invariant-B_t_F2s_.js.map} +1 -1
  141. package/lib/ui/InputGroup.js +155 -0
  142. package/lib/ui/InputGroup.js.map +1 -0
  143. package/lib/ui/SyntaxHighlight.js +3 -3
  144. package/lib/useExposedProps-CzTDfXfq.js +30 -0
  145. package/lib/useExposedProps-CzTDfXfq.js.map +1 -0
  146. package/lib/zudoku.__internal.js +1493 -1031
  147. package/lib/zudoku.__internal.js.map +1 -1
  148. package/lib/zudoku.auth-auth0.js +1 -1
  149. package/lib/zudoku.auth-azureb2c.js +4 -4
  150. package/lib/zudoku.auth-clerk.js +2 -2
  151. package/lib/zudoku.auth-firebase.js +5 -5
  152. package/lib/zudoku.auth-openid.js +5 -5
  153. package/lib/zudoku.auth-supabase.js +4 -4
  154. package/lib/zudoku.components.js +31 -29
  155. package/lib/zudoku.components.js.map +1 -1
  156. package/lib/zudoku.hooks.js +24 -11
  157. package/lib/zudoku.hooks.js.map +1 -1
  158. package/lib/zudoku.mermaid.js +4 -3
  159. package/lib/zudoku.mermaid.js.map +1 -1
  160. package/lib/zudoku.plugin-api-catalog.js +36 -32
  161. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  162. package/lib/zudoku.plugin-api-keys.js +131 -130
  163. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  164. package/lib/zudoku.plugin-custom-pages.js +1 -1
  165. package/lib/zudoku.plugin-markdown.js +1 -1
  166. package/lib/zudoku.plugin-openapi.js +2 -2
  167. package/lib/zudoku.plugin-search-pagefind.js +2 -2
  168. package/lib/zudoku.plugins.js +9 -8
  169. package/lib/zudoku.plugins.js.map +1 -1
  170. package/package.json +6 -4
  171. package/src/lib/components/MobileTopNavigation.tsx +13 -8
  172. package/src/lib/components/TopNavigation.tsx +25 -7
  173. package/src/lib/components/context/ZudokuContext.ts +1 -0
  174. package/src/lib/components/index.ts +19 -39
  175. package/src/lib/components/navigation/Navigation.tsx +4 -3
  176. package/src/lib/components/navigation/NavigationCategory.tsx +9 -0
  177. package/src/lib/components/navigation/NavigationFilterContext.tsx +28 -0
  178. package/src/lib/components/navigation/NavigationFilterInput.tsx +35 -0
  179. package/src/lib/components/navigation/NavigationItem.tsx +17 -1
  180. package/src/lib/components/navigation/utils.ts +32 -1
  181. package/src/lib/core/plugins.ts +21 -1
  182. package/src/lib/core/transform-config.ts +29 -0
  183. package/src/lib/hooks/index.ts +7 -16
  184. package/src/lib/oas/graphql/circular.test.ts +37 -2
  185. package/src/lib/oas/graphql/circular.ts +25 -51
  186. package/src/lib/oas/parser/index.ts +17 -6
  187. package/src/lib/plugins/openapi/playground/fileUtils.ts +4 -0
  188. package/src/lib/plugins/openapi/playground/result-panel/AudioPlayer.tsx +50 -0
  189. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +33 -17
  190. package/src/lib/ui/InputGroup.tsx +168 -0
  191. package/src/lib/util/flattenAllOf.test.ts +2 -1
  192. package/src/lib/util/flattenAllOf.ts +0 -57
  193. package/src/lib/util/flattenAllOfProcessor.ts +58 -0
  194. package/src/lib/util/readFrontmatter.ts +2 -1
  195. package/src/zuplo/enrich-with-zuplo-mcp.ts +168 -0
  196. package/src/zuplo/enrich-with-zuplo.ts +254 -0
  197. package/src/zuplo/policy-types.ts +46 -0
  198. package/src/zuplo/with-zuplo-processors.ts +35 -0
  199. package/src/zuplo/with-zuplo.ts +14 -0
  200. package/lib/OperationList-Dq_AB4W9.js.map +0 -1
  201. package/lib/Separator-BXt1LYnm.js +0 -27
  202. package/lib/Separator-BXt1LYnm.js.map +0 -1
  203. package/lib/___vite-browser-external_commonjs-proxy-BttVsNON.js +0 -9
  204. package/lib/___vite-browser-external_commonjs-proxy-BttVsNON.js.map +0 -1
  205. package/lib/createServer-CLSZ7hWJ.js +0 -16693
  206. package/lib/createServer-CLSZ7hWJ.js.map +0 -1
  207. package/lib/firebase-BCXX7Qv5.js.map +0 -1
  208. package/lib/index-CL8eDnQW.js.map +0 -1
  209. package/lib/index-DBjOT2H1.js +0 -133
  210. package/lib/index-DBjOT2H1.js.map +0 -1
  211. package/lib/index-O9RHI87z.js.map +0 -1
  212. package/lib/index.esm-C5CBsVzN.js.map +0 -1
@@ -1,78 +1,78 @@
1
- import { a as L, u as T, e as q } from "./useSuspenseQuery-CSB_rVek.js";
2
- import S, { useCallback as Z, createContext as F, useContext as K, useEffect as Q } from "react";
1
+ import { a as T, u as F, e as Z } from "./useSuspenseQuery-CSB_rVek.js";
2
+ import S, { useCallback as q, createContext as K, useContext as U, useEffect as J } from "react";
3
3
  import { a as b, m as x } from "./chunk-EPOLDU6W-C6C8jAwd.js";
4
- import { c as U } from "./index-DI5SPFK9.js";
4
+ import { c as M } from "./index-DI5SPFK9.js";
5
5
  const N = (t) => {
6
- let n;
7
- const e = /* @__PURE__ */ new Set(), r = (l, m) => {
8
- const g = typeof l == "function" ? l(n) : l;
9
- if (!Object.is(g, n)) {
10
- const v = n;
11
- n = m ?? (typeof g != "object" || g === null) ? g : Object.assign({}, n, g), e.forEach((p) => p(n, v));
6
+ let e;
7
+ const n = /* @__PURE__ */ new Set(), r = (l, y) => {
8
+ const g = typeof l == "function" ? l(e) : l;
9
+ if (!Object.is(g, e)) {
10
+ const v = e;
11
+ e = y ?? (typeof g != "object" || g === null) ? g : Object.assign({}, e, g), n.forEach((p) => p(e, v));
12
12
  }
13
- }, a = () => n, i = { setState: r, getState: a, getInitialState: () => c, subscribe: (l) => (e.add(l), () => e.delete(l)) }, c = n = t(r, a, i);
13
+ }, a = () => e, i = { setState: r, getState: a, getInitialState: () => c, subscribe: (l) => (n.add(l), () => n.delete(l)) }, c = e = t(r, a, i);
14
14
  return i;
15
- }, J = ((t) => t ? N(t) : N), $ = (t) => t;
16
- function B(t, n = $) {
17
- const e = S.useSyncExternalStore(
15
+ }, Q = ((t) => t ? N(t) : N), $ = (t) => t;
16
+ function B(t, e = $) {
17
+ const n = S.useSyncExternalStore(
18
18
  t.subscribe,
19
- S.useCallback(() => n(t.getState()), [t, n]),
20
- S.useCallback(() => n(t.getInitialState()), [t, n])
19
+ S.useCallback(() => e(t.getState()), [t, e]),
20
+ S.useCallback(() => e(t.getInitialState()), [t, e])
21
21
  );
22
- return S.useDebugValue(e), e;
22
+ return S.useDebugValue(n), n;
23
23
  }
24
- const M = (t) => {
25
- const n = J(t), e = (r) => B(n, r);
26
- return Object.assign(e, n), e;
27
- }, Y = ((t) => M);
28
- function _(t, n) {
29
- let e;
24
+ const Y = (t) => {
25
+ const e = Q(t), n = (r) => B(e, r);
26
+ return Object.assign(n, e), n;
27
+ }, z = ((t) => Y);
28
+ function _(t, e) {
29
+ let n;
30
30
  try {
31
- e = t();
31
+ n = t();
32
32
  } catch {
33
33
  return;
34
34
  }
35
35
  return {
36
36
  getItem: (a) => {
37
37
  var s;
38
- const u = (c) => c === null ? null : JSON.parse(c, void 0), i = (s = e.getItem(a)) != null ? s : null;
38
+ const u = (c) => c === null ? null : JSON.parse(c, void 0), i = (s = n.getItem(a)) != null ? s : null;
39
39
  return i instanceof Promise ? i.then(u) : u(i);
40
40
  },
41
- setItem: (a, s) => e.setItem(a, JSON.stringify(s, void 0)),
42
- removeItem: (a) => e.removeItem(a)
41
+ setItem: (a, s) => n.setItem(a, JSON.stringify(s, void 0)),
42
+ removeItem: (a) => n.removeItem(a)
43
43
  };
44
44
  }
45
- const w = (t) => (n) => {
45
+ const w = (t) => (e) => {
46
46
  try {
47
- const e = t(n);
48
- return e instanceof Promise ? e : {
47
+ const n = t(e);
48
+ return n instanceof Promise ? n : {
49
49
  then(r) {
50
- return w(r)(e);
50
+ return w(r)(n);
51
51
  },
52
52
  catch(r) {
53
53
  return this;
54
54
  }
55
55
  };
56
- } catch (e) {
56
+ } catch (n) {
57
57
  return {
58
58
  then(r) {
59
59
  return this;
60
60
  },
61
61
  catch(r) {
62
- return w(r)(e);
62
+ return w(r)(n);
63
63
  }
64
64
  };
65
65
  }
66
- }, z = (t, n) => (e, r, a) => {
66
+ }, G = (t, e) => (n, r, a) => {
67
67
  let s = {
68
68
  storage: _(() => localStorage),
69
69
  partialize: (o) => o,
70
70
  version: 0,
71
- merge: (o, y) => ({
72
- ...y,
71
+ merge: (o, m) => ({
72
+ ...m,
73
73
  ...o
74
74
  }),
75
- ...n
75
+ ...e
76
76
  }, u = !1;
77
77
  const i = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Set();
78
78
  let l = s.storage;
@@ -81,34 +81,34 @@ const w = (t) => (n) => {
81
81
  (...o) => {
82
82
  console.warn(
83
83
  `[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`
84
- ), e(...o);
84
+ ), n(...o);
85
85
  },
86
86
  r,
87
87
  a
88
88
  );
89
- const m = () => {
89
+ const y = () => {
90
90
  const o = s.partialize({ ...r() });
91
91
  return l.setItem(s.name, {
92
92
  state: o,
93
93
  version: s.version
94
94
  });
95
95
  }, g = a.setState;
96
- a.setState = (o, y) => (g(o, y), m());
96
+ a.setState = (o, m) => (g(o, m), y());
97
97
  const v = t(
98
- (...o) => (e(...o), m()),
98
+ (...o) => (n(...o), y()),
99
99
  r,
100
100
  a
101
101
  );
102
102
  a.getInitialState = () => v;
103
103
  let p;
104
- const k = () => {
105
- var o, y;
104
+ const A = () => {
105
+ var o, m;
106
106
  if (!l) return;
107
107
  u = !1, i.forEach((d) => {
108
108
  var f;
109
109
  return d((f = r()) != null ? f : v);
110
110
  });
111
- const I = ((y = s.onRehydrateStorage) == null ? void 0 : y.call(s, (o = r()) != null ? o : v)) || void 0;
111
+ const I = ((m = s.onRehydrateStorage) == null ? void 0 : m.call(s, (o = r()) != null ? o : v)) || void 0;
112
112
  return w(l.getItem.bind(l))(s.name).then((d) => {
113
113
  if (d)
114
114
  if (typeof d.version == "number" && d.version !== s.version) {
@@ -131,8 +131,8 @@ const w = (t) => (n) => {
131
131
  if (p = s.merge(
132
132
  H,
133
133
  (f = r()) != null ? f : v
134
- ), e(p, !0), P)
135
- return m();
134
+ ), n(p, !0), P)
135
+ return y();
136
136
  }).then(() => {
137
137
  I?.(p, void 0), p = r(), u = !0, c.forEach((d) => d(p));
138
138
  }).catch((d) => {
@@ -150,7 +150,7 @@ const w = (t) => (n) => {
150
150
  l?.removeItem(s.name);
151
151
  },
152
152
  getOptions: () => s,
153
- rehydrate: () => k(),
153
+ rehydrate: () => A(),
154
154
  hasHydrated: () => u,
155
155
  onHydrate: (o) => (i.add(o), () => {
156
156
  i.delete(o);
@@ -158,17 +158,17 @@ const w = (t) => (n) => {
158
158
  onFinishHydration: (o) => (c.add(o), () => {
159
159
  c.delete(o);
160
160
  })
161
- }, s.skipHydration || k(), p || v;
162
- }, G = z, W = (t) => {
163
- const n = (e) => {
164
- e.key === t.persist.getOptions().name && e.newValue && t.persist.rehydrate();
161
+ }, s.skipHydration || A(), p || v;
162
+ }, W = G, X = (t) => {
163
+ const e = (n) => {
164
+ n.key === t.persist.getOptions().name && n.newValue && t.persist.rehydrate();
165
165
  };
166
166
  if (!(typeof window > "u"))
167
- return window.addEventListener("storage", n), () => {
168
- window.removeEventListener("storage", n);
167
+ return window.addEventListener("storage", e), () => {
168
+ window.removeEventListener("storage", e);
169
169
  };
170
- }, j = Y()(
171
- G(
170
+ }, j = z()(
171
+ W(
172
172
  (t) => ({
173
173
  isAuthenticated: !1,
174
174
  isPending: !0,
@@ -187,18 +187,18 @@ const w = (t) => (n) => {
187
187
  providerData: null
188
188
  })),
189
189
  setLoggedIn: ({
190
- profile: n,
191
- providerData: e
190
+ profile: e,
191
+ providerData: n
192
192
  }) => t(() => ({
193
193
  isAuthenticated: !0,
194
194
  isPending: !1,
195
- profile: n,
196
- providerData: e
195
+ profile: e,
196
+ providerData: n
197
197
  }))
198
198
  }),
199
199
  {
200
- merge: (t, n) => ({
201
- ...n,
200
+ merge: (t, e) => ({
201
+ ...e,
202
202
  isPending: !1,
203
203
  ...typeof t == "object" ? t : {}
204
204
  }),
@@ -207,77 +207,79 @@ const w = (t) => (n) => {
207
207
  }
208
208
  )
209
209
  );
210
- W(j);
211
- const X = /^(\w+:\/\/[^/?]+)?([^?]*)(\?.*)?$/, V = (t) => t.filter(
212
- (n) => n != null && n !== !1 && (typeof n == "string" || typeof n == "number")
213
- ).map((n) => `${n}`).filter((n) => n), tt = (t) => {
214
- const n = t.join("/"), [, e = "", r = ""] = n.match(X) ?? [];
210
+ X(j);
211
+ const V = /^(\w+:\/\/[^/?]+)?([^?]*)(\?.*)?$/, tt = (t) => t.filter(
212
+ (e) => e != null && e !== !1 && (typeof e == "string" || typeof e == "number")
213
+ ).map((e) => `${e}`).filter((e) => e), et = (t) => {
214
+ const e = t.join("/"), [, n = "", r = ""] = e.match(V) ?? [];
215
215
  return {
216
- prefix: e,
216
+ prefix: n,
217
217
  pathname: r.split("/").filter((a) => a !== "")
218
218
  };
219
- }, et = (t) => {
220
- const { prefix: n, pathname: e } = t;
221
- let r = n;
222
- return e.length > 0 ? (r ? r += "/" : r = "/", r += e.join("/")) : r || (r = "/"), r;
219
+ }, nt = (t) => {
220
+ const { prefix: e, pathname: n } = t;
221
+ let r = e;
222
+ return n.length > 0 ? (r ? r += "/" : r = "/", r += n.join("/")) : r || (r = "/"), r;
223
223
  }, h = (...t) => {
224
- const n = V(t), e = tt(n);
225
- return et(e);
224
+ const e = tt(t), n = et(e);
225
+ return nt(n);
226
226
  }, O = Object.freeze({
227
227
  API_IDENTITIES: ["api-identities"]
228
- }), nt = () => {
229
- const t = L();
230
- return { invalidateCache: Z(
231
- (e) => t.invalidateQueries({ queryKey: O[e] }),
228
+ }), rt = () => {
229
+ const t = T();
230
+ return { invalidateCache: q(
231
+ (n) => t.invalidateQueries({ queryKey: O[n] }),
232
232
  [t]
233
233
  ) };
234
- }, ct = "no-dehydrate", E = (t, n) => {
235
- for (const e of t) {
236
- const r = A(e, n);
234
+ }, lt = "no-dehydrate", E = (t, e) => {
235
+ for (const n of t) {
236
+ const r = k(n, e);
237
237
  if (r !== void 0) return r;
238
238
  }
239
- }, A = (t, n, e = []) => {
240
- const r = n(t, e);
239
+ }, k = (t, e, n = []) => {
240
+ const r = e(t, n);
241
241
  if (r !== void 0) return r;
242
242
  if (t.type === "category")
243
243
  for (const a of t.items) {
244
- const s = A(a, n, [
245
- ...e,
244
+ const s = k(a, e, [
245
+ ...n,
246
246
  t
247
247
  ]);
248
248
  if (s !== void 0) return s;
249
249
  }
250
- }, lt = () => {
251
- const t = b(), { navigation: n } = R();
252
- return E(n, (e) => {
253
- if (e.type === "doc" && h(e.path) === t.pathname)
254
- return e;
250
+ }, dt = () => {
251
+ const t = b(), { navigation: e } = R();
252
+ return E(e, (n) => {
253
+ if (n.type === "doc" && h(n.path) === t.pathname)
254
+ return n;
255
255
  });
256
- }, dt = (t) => {
257
- const n = b();
258
- return A(t, (e) => {
259
- switch (e.type) {
256
+ }, ft = (t) => {
257
+ const e = b();
258
+ return k(t, (n) => {
259
+ switch (n.type) {
260
260
  case "category":
261
- return e.link && h(e.link.path) === n.pathname ? !0 : void 0;
261
+ return n.link && h(n.link.path) === e.pathname ? !0 : void 0;
262
262
  case "custom-page":
263
263
  case "doc":
264
- return h(e.path) === n.pathname ? !0 : void 0;
264
+ return h(n.path) === e.pathname ? !0 : void 0;
265
265
  default:
266
266
  return;
267
267
  }
268
268
  });
269
- }, ft = () => {
270
- const t = b().pathname, { navigation: n } = R();
271
- let e, r, a = !1;
272
- return E(n, (s) => {
269
+ }, pt = () => {
270
+ const t = b().pathname, { navigation: e } = R();
271
+ let n, r, a = !1;
272
+ return E(e, (s) => {
273
+ if (s.type === "separator" || s.type === "section" || s.type === "filter")
274
+ return;
273
275
  const u = s.type === "doc" ? h(s.path) : s.type === "category" && s.link ? h(s.link.path) : void 0;
274
276
  if (u) {
275
277
  if (a)
276
278
  return r = { label: s.label, id: u }, !0;
277
- t === u ? a = !0 : e = { label: s.label, id: u };
279
+ t === u ? a = !0 : n = { label: s.label, id: u };
278
280
  }
279
- }), { prev: e, next: r };
280
- }, pt = U(
281
+ }), { prev: n, next: r };
282
+ }, ht = M(
281
283
  "relative flex items-center gap-2 px-(--padding-nav-item) my-0.5 py-1.5 rounded-lg hover:bg-accent tabular-nums",
282
284
  {
283
285
  variants: {
@@ -298,18 +300,18 @@ const X = /^(\w+:\/\/[^/?]+)?([^?]*)(\?.*)?$/, V = (t) => t.filter(
298
300
  isActive: !1
299
301
  }
300
302
  }
301
- ), ht = (t, n) => (e) => typeof e.display == "function" ? e.display({ context: n, auth: t }) : e.display === "hide" || !e.label ? !1 : e.display === "auth" && t.isAuthenticated || e.display === "anon" && !t.isAuthenticated || !e.display || e.display === "always", rt = F(
303
+ ), L = (t, e) => ["separator", "section", "filter"].includes(t.type) || t.label?.toLowerCase().includes(e.toLowerCase()) ? !0 : t.type === "category" ? t.items.some((n) => L(n, e)) : !1, gt = (t, e, n) => (r) => r.type === "filter" ? !0 : n?.trim() && !L(r, n) ? !1 : typeof r.display == "function" ? r.display({ context: e, auth: t }) : r.display === "hide" || !r.label ? !1 : r.display === "auth" && t.isAuthenticated || r.display === "anon" && !t.isAuthenticated || !r.display || r.display === "always", st = K(
302
304
  void 0
303
305
  ), D = () => {
304
- const t = K(rt);
306
+ const t = U(st);
305
307
  if (!t)
306
308
  throw new Error("useZudoku must be used within a ZudokuProvider.");
307
309
  return t;
308
- }, gt = () => {
309
- const { getApiIdentities: t } = D(), { isAuthenticated: n } = j(), { invalidateCache: e } = nt();
310
- return Q(() => {
311
- n || e("API_IDENTITIES");
312
- }, [n, e]), q({
310
+ }, vt = () => {
311
+ const { getApiIdentities: t } = D(), { isAuthenticated: e } = j(), { invalidateCache: n } = rt();
312
+ return J(() => {
313
+ e || n("API_IDENTITIES");
314
+ }, [e, n]), Z({
313
315
  queryFn: t,
314
316
  queryKey: O.API_IDENTITIES
315
317
  });
@@ -326,26 +328,26 @@ const X = /^(\w+:\/\/[^/?]+)?([^?]*)(\?.*)?$/, V = (t) => t.filter(
326
328
  default:
327
329
  return;
328
330
  }
329
- }, st = (t) => {
330
- const n = /* @__PURE__ */ new Set(), e = (r) => {
331
+ }, at = (t) => {
332
+ const e = /* @__PURE__ */ new Set(), n = (r) => {
331
333
  for (const a of r) {
332
334
  const s = C(a)?.split("?").at(0)?.split("#").at(0);
333
- s && n.add(s), a.type === "category" && e(a.items);
335
+ s && e.add(s), a.type === "category" && n(a.items);
334
336
  }
335
337
  };
336
- return e(t), [...n];
338
+ return n(t), [...e];
337
339
  }, R = () => {
338
- const { getPluginNavigation: t, navigation: n } = D(), e = b(), r = E(n, (u, i) => {
339
- if (C(u) === e.pathname)
340
+ const { getPluginNavigation: t, navigation: e } = D(), n = b(), r = E(e, (u, i) => {
341
+ if (u.type !== "link" && C(u) === n.pathname)
340
342
  return i.at(0) ?? u;
341
- }), { data: a } = T({
342
- queryFn: () => t(e.pathname),
343
- queryKey: ["plugin-navigation", e.pathname]
343
+ }), { data: a } = F({
344
+ queryFn: () => t(n.pathname),
345
+ queryKey: ["plugin-navigation", n.pathname]
344
346
  });
345
347
  let s = r;
346
348
  if (!r && a.length > 0) {
347
- const u = st(a);
348
- s = n.flatMap((i) => {
349
+ const u = at(a);
350
+ s = e.flatMap((i) => {
349
351
  const c = C(i);
350
352
  return c ? [{ item: i, path: c }] : [];
351
353
  }).sort((i, c) => c.path.length - i.path.length).find(({ path: i }) => u.some(
@@ -362,26 +364,26 @@ const X = /^(\w+:\/\/[^/?]+)?([^?]*)(\?.*)?$/, V = (t) => t.filter(
362
364
  };
363
365
  export {
364
366
  O as C,
365
- ct as N,
366
- rt as Z,
367
+ lt as N,
368
+ st as Z,
367
369
  D as a,
368
- lt as b,
369
- ft as c,
370
- nt as d,
370
+ j as b,
371
+ dt as c,
372
+ pt as d,
371
373
  R as e,
372
- Y as f,
374
+ z as f,
373
375
  _ as g,
374
- gt as h,
375
- dt as i,
376
+ vt as h,
377
+ ft as i,
376
378
  h as j,
377
- ht as k,
378
- J as l,
379
+ gt as k,
380
+ Q as l,
379
381
  B as m,
380
- pt as n,
381
- A as o,
382
- G as p,
383
- W as s,
382
+ ht as n,
383
+ k as o,
384
+ W as p,
385
+ X as s,
384
386
  E as t,
385
- j as u
387
+ rt as u
386
388
  };
387
- //# sourceMappingURL=ZudokuContext-BZB1TWdT.js.map
389
+ //# sourceMappingURL=ZudokuContext-C6wlLMUH.js.map