zudoku 0.0.0-f0602bf → 0.0.0-f0b4321

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 (732) hide show
  1. package/README.md +2 -2
  2. package/dist/app/ZuploBuildConfig.d.ts +11 -121
  3. package/dist/app/ZuploBuildConfig.js +8 -8
  4. package/dist/app/ZuploBuildConfig.js.map +1 -1
  5. package/dist/app/demo.js +21 -5
  6. package/dist/app/demo.js.map +1 -1
  7. package/dist/app/entry.client.d.ts +0 -2
  8. package/dist/app/entry.client.js +0 -2
  9. package/dist/app/entry.client.js.map +1 -1
  10. package/dist/app/entry.server.d.ts +0 -2
  11. package/dist/app/entry.server.js +0 -2
  12. package/dist/app/entry.server.js.map +1 -1
  13. package/dist/app/env.d.ts +7 -7
  14. package/dist/app/env.js +8 -0
  15. package/dist/app/env.js.map +1 -1
  16. package/dist/app/main.d.ts +1 -0
  17. package/dist/app/main.js +15 -20
  18. package/dist/app/main.js.map +1 -1
  19. package/dist/app/standalone.js +7 -6
  20. package/dist/app/standalone.js.map +1 -1
  21. package/dist/cli/build/handler.js +9 -1
  22. package/dist/cli/build/handler.js.map +1 -1
  23. package/dist/config/config.d.ts +11 -0
  24. package/dist/config/loader.js +4 -8
  25. package/dist/config/loader.js.map +1 -1
  26. package/dist/config/validators/BuildSchema.d.ts +20 -44
  27. package/dist/config/validators/BuildSchema.js +8 -14
  28. package/dist/config/validators/BuildSchema.js.map +1 -1
  29. package/dist/config/validators/InputNavigationSchema.d.ts +7364 -0
  30. package/dist/config/validators/InputNavigationSchema.js +71 -0
  31. package/dist/config/validators/InputNavigationSchema.js.map +1 -0
  32. package/dist/config/validators/InputNavigationSchema.test-d.d.ts +1 -0
  33. package/dist/config/validators/InputNavigationSchema.test-d.js +145 -0
  34. package/dist/config/validators/InputNavigationSchema.test-d.js.map +1 -0
  35. package/dist/config/validators/NavigationSchema.d.ts +44 -0
  36. package/dist/config/validators/NavigationSchema.js +95 -0
  37. package/dist/config/validators/NavigationSchema.js.map +1 -0
  38. package/dist/config/validators/icon-types.d.ts +2 -1
  39. package/dist/config/validators/icon-types.js +1813 -1
  40. package/dist/config/validators/icon-types.js.map +1 -1
  41. package/dist/config/validators/validate.d.ts +474 -5556
  42. package/dist/config/validators/validate.js +106 -73
  43. package/dist/config/validators/validate.js.map +1 -1
  44. package/dist/config/validators/validate.test.d.ts +1 -0
  45. package/dist/config/validators/validate.test.js +141 -0
  46. package/dist/config/validators/validate.test.js.map +1 -0
  47. package/dist/index.d.ts +2 -1
  48. package/dist/index.js +1 -0
  49. package/dist/index.js.map +1 -1
  50. package/dist/lib/auth/issuer.d.ts +2 -0
  51. package/dist/lib/auth/issuer.js +37 -0
  52. package/dist/lib/auth/issuer.js.map +1 -0
  53. package/dist/lib/auth/issuer.test.d.ts +1 -0
  54. package/dist/lib/auth/issuer.test.js +94 -0
  55. package/dist/lib/auth/issuer.test.js.map +1 -0
  56. package/dist/lib/authentication/AuthenticationPlugin.d.ts +0 -5
  57. package/dist/lib/authentication/AuthenticationPlugin.js +0 -12
  58. package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -1
  59. package/dist/lib/authentication/authentication.d.ts +2 -0
  60. package/dist/lib/authentication/components/CallbackHandler.js +1 -1
  61. package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
  62. package/dist/lib/authentication/components/SignIn.js +4 -3
  63. package/dist/lib/authentication/components/SignIn.js.map +1 -1
  64. package/dist/lib/authentication/hook.d.ts +6 -0
  65. package/dist/lib/authentication/providers/auth0.js +1 -1
  66. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  67. package/dist/lib/authentication/providers/azureb2c.d.ts +28 -0
  68. package/dist/lib/authentication/providers/azureb2c.js +145 -0
  69. package/dist/lib/authentication/providers/azureb2c.js.map +1 -0
  70. package/dist/lib/authentication/providers/clerk.js +3 -12
  71. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  72. package/dist/lib/authentication/providers/openid.d.ts +5 -2
  73. package/dist/lib/authentication/providers/openid.js +49 -5
  74. package/dist/lib/authentication/providers/openid.js.map +1 -1
  75. package/dist/lib/authentication/providers/supabase.js +2 -9
  76. package/dist/lib/authentication/providers/supabase.js.map +1 -1
  77. package/dist/lib/authentication/state.d.ts +6 -5
  78. package/dist/lib/authentication/state.js +19 -6
  79. package/dist/lib/authentication/state.js.map +1 -1
  80. package/dist/lib/components/Autocomplete.js +2 -2
  81. package/dist/lib/components/Autocomplete.js.map +1 -1
  82. package/dist/lib/components/Banner.js +2 -2
  83. package/dist/lib/components/Banner.js.map +1 -1
  84. package/dist/lib/components/BuildCheck.js +1 -1
  85. package/dist/lib/components/BuildCheck.js.map +1 -1
  86. package/dist/lib/components/CategoryHeading.js +1 -1
  87. package/dist/lib/components/CategoryHeading.js.map +1 -1
  88. package/dist/lib/components/ErrorPage.js +2 -2
  89. package/dist/lib/components/ErrorPage.js.map +1 -1
  90. package/dist/lib/components/Footer.js +1 -1
  91. package/dist/lib/components/Footer.js.map +1 -1
  92. package/dist/lib/components/Framed.d.ts +7 -0
  93. package/dist/lib/components/Framed.js +26 -0
  94. package/dist/lib/components/Framed.js.map +1 -0
  95. package/dist/lib/components/Header.js +19 -18
  96. package/dist/lib/components/Header.js.map +1 -1
  97. package/dist/lib/components/Heading.d.ts +6 -2
  98. package/dist/lib/components/Heading.js +7 -2
  99. package/dist/lib/components/Heading.js.map +1 -1
  100. package/dist/lib/components/Main.js +4 -4
  101. package/dist/lib/components/Main.js.map +1 -1
  102. package/dist/lib/components/Markdown.d.ts +0 -1
  103. package/dist/lib/components/Markdown.js +9 -5
  104. package/dist/lib/components/Markdown.js.map +1 -1
  105. package/dist/lib/components/MobileTopNavigation.js +11 -7
  106. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  107. package/dist/lib/components/NotFoundPage.js +2 -2
  108. package/dist/lib/components/NotFoundPage.js.map +1 -1
  109. package/dist/lib/components/PageProgress.d.ts +1 -0
  110. package/dist/lib/components/PageProgress.js +20 -0
  111. package/dist/lib/components/PageProgress.js.map +1 -0
  112. package/dist/lib/components/Pagination.js +1 -1
  113. package/dist/lib/components/Pagination.js.map +1 -1
  114. package/dist/lib/components/StatusPage.js +4 -0
  115. package/dist/lib/components/StatusPage.js.map +1 -1
  116. package/dist/lib/components/TopNavigation.d.ts +7 -3
  117. package/dist/lib/components/TopNavigation.js +49 -44
  118. package/dist/lib/components/TopNavigation.js.map +1 -1
  119. package/dist/lib/components/Typography.d.ts +5 -0
  120. package/dist/lib/components/Typography.js +8 -0
  121. package/dist/lib/components/Typography.js.map +1 -0
  122. package/dist/lib/components/context/ZudokuContext.d.ts +3 -7
  123. package/dist/lib/components/context/ZudokuContext.js +44 -26
  124. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  125. package/dist/lib/components/context/ZudokuProvider.d.ts +1 -1
  126. package/dist/lib/components/index.d.ts +39 -23
  127. package/dist/lib/components/index.js +15 -7
  128. package/dist/lib/components/index.js.map +1 -1
  129. package/dist/lib/components/navigation/Navigation.d.ts +5 -0
  130. package/dist/lib/components/navigation/Navigation.js +12 -0
  131. package/dist/lib/components/navigation/Navigation.js.map +1 -0
  132. package/dist/lib/components/navigation/{SidebarBadge.d.ts → NavigationBadge.d.ts} +1 -1
  133. package/dist/lib/components/navigation/{SidebarBadge.js → NavigationBadge.js} +2 -2
  134. package/dist/lib/components/navigation/NavigationBadge.js.map +1 -0
  135. package/dist/lib/components/navigation/NavigationCategory.d.ts +5 -0
  136. package/dist/lib/components/navigation/{SidebarCategory.js → NavigationCategory.js} +15 -13
  137. package/dist/lib/components/navigation/NavigationCategory.js.map +1 -0
  138. package/dist/lib/components/navigation/NavigationItem.d.ts +6 -0
  139. package/dist/lib/components/navigation/NavigationItem.js +47 -0
  140. package/dist/lib/components/navigation/NavigationItem.js.map +1 -0
  141. package/dist/lib/components/navigation/{SidebarWrapper.d.ts → NavigationWrapper.d.ts} +1 -1
  142. package/dist/lib/components/navigation/{SidebarWrapper.js → NavigationWrapper.js} +5 -5
  143. package/dist/lib/components/navigation/NavigationWrapper.js.map +1 -0
  144. package/dist/lib/components/navigation/utils.d.ts +12 -9
  145. package/dist/lib/components/navigation/utils.js +38 -18
  146. package/dist/lib/components/navigation/utils.js.map +1 -1
  147. package/dist/lib/core/ZudokuContext.d.ts +13 -13
  148. package/dist/lib/core/ZudokuContext.js +21 -10
  149. package/dist/lib/core/ZudokuContext.js.map +1 -1
  150. package/dist/lib/core/plugins.d.ts +2 -2
  151. package/dist/lib/errors/ErrorAlert.js +2 -3
  152. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  153. package/dist/lib/hooks/index.d.ts +25 -0
  154. package/dist/lib/hooks/index.js +11 -0
  155. package/dist/lib/hooks/index.js.map +1 -1
  156. package/dist/lib/hooks/useEvent.test.js +5 -3
  157. package/dist/lib/hooks/useEvent.test.js.map +1 -1
  158. package/dist/lib/hooks/useHotkey.d.ts +4 -0
  159. package/dist/lib/hooks/useHotkey.js +58 -0
  160. package/dist/lib/hooks/useHotkey.js.map +1 -0
  161. package/dist/lib/plugins/api-catalog/Catalog.d.ts +1 -1
  162. package/dist/lib/plugins/api-catalog/index.d.ts +6 -6
  163. package/dist/lib/plugins/api-catalog/index.js +10 -10
  164. package/dist/lib/plugins/api-catalog/index.js.map +1 -1
  165. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +115 -23
  166. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  167. package/dist/lib/plugins/api-keys/index.d.ts +3 -3
  168. package/dist/lib/plugins/api-keys/index.js +37 -18
  169. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  170. package/dist/lib/plugins/custom-pages/index.d.ts +4 -6
  171. package/dist/lib/plugins/custom-pages/index.js +15 -10
  172. package/dist/lib/plugins/custom-pages/index.js.map +1 -1
  173. package/dist/lib/plugins/markdown/MdxPage.d.ts +1 -2
  174. package/dist/lib/plugins/markdown/MdxPage.js +30 -10
  175. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  176. package/dist/lib/plugins/markdown/index.d.ts +10 -2
  177. package/dist/lib/plugins/markdown/index.js +9 -26
  178. package/dist/lib/plugins/markdown/index.js.map +1 -1
  179. package/dist/lib/plugins/openapi/OperationList.js +3 -3
  180. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  181. package/dist/lib/plugins/openapi/OperationListItem.js +2 -2
  182. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  183. package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
  184. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  185. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +1 -1
  186. package/dist/lib/plugins/openapi/SchemaList.js +2 -3
  187. package/dist/lib/plugins/openapi/SchemaList.js.map +1 -1
  188. package/dist/lib/plugins/openapi/Sidecar.js +11 -91
  189. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  190. package/dist/lib/plugins/openapi/SidecarExamples.js +1 -1
  191. package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
  192. package/dist/lib/plugins/openapi/graphql/gql.d.ts +1 -1
  193. package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
  194. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  195. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +3 -3
  196. package/dist/lib/plugins/openapi/graphql/graphql.js +2 -2
  197. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  198. package/dist/lib/plugins/openapi/index.d.ts +3 -3
  199. package/dist/lib/plugins/openapi/index.js +10 -10
  200. package/dist/lib/plugins/openapi/index.js.map +1 -1
  201. package/dist/lib/plugins/openapi/interfaces.d.ts +3 -3
  202. package/dist/lib/plugins/openapi/playground/BodyPanel.d.ts +5 -0
  203. package/dist/lib/plugins/openapi/playground/BodyPanel.js +26 -0
  204. package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -0
  205. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.d.ts +8 -0
  206. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +11 -0
  207. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -0
  208. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +2 -1
  209. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
  210. package/dist/lib/plugins/openapi/playground/Headers.d.ts +5 -4
  211. package/dist/lib/plugins/openapi/playground/Headers.js +54 -32
  212. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  213. package/dist/lib/plugins/openapi/playground/IdentityDialog.js +2 -1
  214. package/dist/lib/plugins/openapi/playground/IdentityDialog.js.map +1 -1
  215. package/dist/lib/plugins/openapi/playground/IdentitySelector.js +1 -2
  216. package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -1
  217. package/dist/lib/plugins/openapi/playground/InlineInput.js +1 -1
  218. package/dist/lib/plugins/openapi/playground/InlineInput.js.map +1 -1
  219. package/dist/lib/plugins/openapi/playground/ParamsGrid.js +2 -2
  220. package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -1
  221. package/dist/lib/plugins/openapi/playground/PathParams.js +1 -2
  222. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  223. package/dist/lib/plugins/openapi/playground/Playground.d.ts +3 -8
  224. package/dist/lib/plugins/openapi/playground/Playground.js +110 -92
  225. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  226. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
  227. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  228. package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +2 -2
  229. package/dist/lib/plugins/openapi/playground/QueryParams.js +38 -23
  230. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  231. package/dist/lib/plugins/openapi/playground/Spinner.d.ts +2 -0
  232. package/dist/lib/plugins/openapi/playground/Spinner.js +63 -0
  233. package/dist/lib/plugins/openapi/playground/Spinner.js.map +1 -0
  234. package/dist/lib/plugins/openapi/playground/fileUtils.d.ts +2 -0
  235. package/dist/lib/plugins/openapi/playground/fileUtils.js +22 -0
  236. package/dist/lib/plugins/openapi/playground/fileUtils.js.map +1 -0
  237. package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.d.ts +3 -0
  238. package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js +13 -0
  239. package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js.map +1 -0
  240. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.d.ts +1 -0
  241. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js +12 -0
  242. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js.map +1 -0
  243. package/dist/lib/plugins/openapi/playground/result-panel/Highlight.d.ts +12 -0
  244. package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js +11 -0
  245. package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js.map +1 -0
  246. package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.d.ts +8 -0
  247. package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js +69 -0
  248. package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js.map +1 -0
  249. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +10 -4
  250. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +33 -31
  251. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
  252. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +4 -2
  253. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +8 -10
  254. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
  255. package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.d.ts +16 -0
  256. package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js +10 -0
  257. package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js.map +1 -0
  258. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +3 -3
  259. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -1
  260. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +2 -3
  261. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
  262. package/dist/lib/plugins/openapi/schema/SchemaView.js +5 -5
  263. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  264. package/dist/lib/plugins/openapi/schema/utils.js +3 -2
  265. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  266. package/dist/lib/plugins/openapi/util/createHttpSnippet.d.ts +11 -0
  267. package/dist/lib/plugins/openapi/util/createHttpSnippet.js +89 -0
  268. package/dist/lib/plugins/openapi/util/createHttpSnippet.js.map +1 -0
  269. package/dist/lib/plugins/openapi/util/createNavigationCategory.d.ts +9 -0
  270. package/dist/lib/plugins/openapi/util/{createSidebarCategory.js → createNavigationCategory.js} +5 -4
  271. package/dist/lib/plugins/openapi/util/createNavigationCategory.js.map +1 -0
  272. package/dist/lib/plugins/openapi/util/getRoutes.js +2 -2
  273. package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
  274. package/dist/lib/plugins/openapi/util/methodColorMap.d.ts +1 -1
  275. package/dist/lib/plugins/search-inkeep/index.d.ts +5 -22
  276. package/dist/lib/plugins/search-inkeep/index.js +35 -29
  277. package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
  278. package/dist/lib/plugins/search-inkeep/inkeep.d.ts +5 -21
  279. package/dist/lib/plugins/search-inkeep/inkeep.js +10 -19
  280. package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -1
  281. package/dist/lib/plugins/search-pagefind/PagefindSearch.js +1 -1
  282. package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
  283. package/dist/lib/plugins/search-pagefind/ResultList.d.ts +1 -1
  284. package/dist/lib/plugins/search-pagefind/ResultList.js +12 -5
  285. package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
  286. package/dist/lib/shiki.d.ts +8 -12
  287. package/dist/lib/shiki.js +11 -13
  288. package/dist/lib/shiki.js.map +1 -1
  289. package/dist/lib/ui/Alert.d.ts +6 -5
  290. package/dist/lib/ui/Alert.js +12 -10
  291. package/dist/lib/ui/Alert.js.map +1 -1
  292. package/dist/lib/ui/Callout.js +1 -1
  293. package/dist/lib/ui/Callout.js.map +1 -1
  294. package/dist/lib/ui/CodeBlock.d.ts +1 -2
  295. package/dist/lib/ui/CodeBlock.js +10 -11
  296. package/dist/lib/ui/CodeBlock.js.map +1 -1
  297. package/dist/lib/ui/Dialog.d.ts +3 -1
  298. package/dist/lib/ui/Dialog.js +2 -2
  299. package/dist/lib/ui/Dialog.js.map +1 -1
  300. package/dist/lib/ui/EmbeddedCodeBlock.d.ts +15 -0
  301. package/dist/lib/ui/EmbeddedCodeBlock.js +18 -0
  302. package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -0
  303. package/dist/lib/ui/Select.js +1 -1
  304. package/dist/lib/ui/SyntaxHighlight.d.ts +3 -1
  305. package/dist/lib/ui/SyntaxHighlight.js +3 -2
  306. package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
  307. package/dist/lib/ui/Tooltip.d.ts +2 -1
  308. package/dist/lib/ui/Tooltip.js +2 -1
  309. package/dist/lib/ui/Tooltip.js.map +1 -1
  310. package/dist/lib/util/MdxComponents.d.ts +9 -1
  311. package/dist/lib/util/MdxComponents.js +4 -2
  312. package/dist/lib/util/MdxComponents.js.map +1 -1
  313. package/dist/lib/util/humanFileSize.d.ts +6 -0
  314. package/dist/lib/util/humanFileSize.js +14 -0
  315. package/dist/lib/util/humanFileSize.js.map +1 -0
  316. package/dist/lib/util/humanFileSize.test.d.ts +1 -0
  317. package/dist/lib/util/humanFileSize.test.js +22 -0
  318. package/dist/lib/util/humanFileSize.test.js.map +1 -0
  319. package/dist/lib/util/os.d.ts +2 -0
  320. package/dist/lib/util/os.js +21 -0
  321. package/dist/lib/util/os.js.map +1 -0
  322. package/dist/lib/util/useCopyToClipboard.d.ts +1 -0
  323. package/dist/lib/util/useCopyToClipboard.js +11 -0
  324. package/dist/lib/util/useCopyToClipboard.js.map +1 -0
  325. package/dist/lib/util/useScrollToAnchor.js +3 -3
  326. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  327. package/dist/vite/api/SchemaManager.d.ts +4 -4
  328. package/dist/vite/api/SchemaManager.js +25 -21
  329. package/dist/vite/api/SchemaManager.js.map +1 -1
  330. package/dist/vite/api/SchemaManager.test.js +4 -4
  331. package/dist/vite/api/SchemaManager.test.js.map +1 -1
  332. package/dist/vite/api/schema-codegen.js +42 -11
  333. package/dist/vite/api/schema-codegen.js.map +1 -1
  334. package/dist/vite/api/schema-codegen.test.js +82 -0
  335. package/dist/vite/api/schema-codegen.test.js.map +1 -1
  336. package/dist/vite/build.js +10 -34
  337. package/dist/vite/build.js.map +1 -1
  338. package/dist/vite/config.js +12 -2
  339. package/dist/vite/config.js.map +1 -1
  340. package/dist/vite/css/plugin.js +11 -0
  341. package/dist/vite/css/plugin.js.map +1 -1
  342. package/dist/vite/dev-server.js +1 -1
  343. package/dist/vite/mdx/remark-last-modified.d.ts +3 -0
  344. package/dist/vite/mdx/remark-last-modified.js +29 -0
  345. package/dist/vite/mdx/remark-last-modified.js.map +1 -0
  346. package/dist/vite/mdx/utils.d.ts +2 -0
  347. package/dist/vite/mdx/utils.js +31 -0
  348. package/dist/vite/mdx/utils.js.map +1 -0
  349. package/dist/vite/plugin-api.js +8 -8
  350. package/dist/vite/plugin-api.js.map +1 -1
  351. package/dist/vite/plugin-config-reload.js +2 -0
  352. package/dist/vite/plugin-config-reload.js.map +1 -1
  353. package/dist/vite/plugin-custom-pages.js +2 -2
  354. package/dist/vite/plugin-custom-pages.js.map +1 -1
  355. package/dist/vite/plugin-docs.js +61 -59
  356. package/dist/vite/plugin-docs.js.map +1 -1
  357. package/dist/vite/plugin-frontmatter.js +6 -2
  358. package/dist/vite/plugin-frontmatter.js.map +1 -1
  359. package/dist/vite/plugin-mdx.js +17 -38
  360. package/dist/vite/plugin-mdx.js.map +1 -1
  361. package/dist/vite/{plugin-sidebar.d.ts → plugin-navigation.d.ts} +1 -1
  362. package/dist/vite/{plugin-sidebar.js → plugin-navigation.js} +20 -19
  363. package/dist/vite/plugin-navigation.js.map +1 -0
  364. package/dist/vite/plugin-theme.d.ts +8 -0
  365. package/dist/vite/plugin-theme.js +234 -0
  366. package/dist/vite/plugin-theme.js.map +1 -0
  367. package/dist/vite/plugin-theme.test.d.ts +1 -0
  368. package/dist/vite/plugin-theme.test.js +312 -0
  369. package/dist/vite/plugin-theme.test.js.map +1 -0
  370. package/dist/vite/plugin.js +4 -6
  371. package/dist/vite/plugin.js.map +1 -1
  372. package/dist/vite/shadcn-registry.d.ts +45 -0
  373. package/dist/vite/shadcn-registry.js +29 -0
  374. package/dist/vite/shadcn-registry.js.map +1 -0
  375. package/lib/Alert-Cig_8hW6.js +161 -0
  376. package/lib/Alert-Cig_8hW6.js.map +1 -0
  377. package/lib/{Button-u7M2QYds.js → Button-B3o-2Xdf.js} +3 -3
  378. package/lib/{Button-u7M2QYds.js.map → Button-B3o-2Xdf.js.map} +1 -1
  379. package/lib/{Card-DkH-AU1V.js → Card-CMDQUPM4.js} +2 -2
  380. package/lib/{Card-DkH-AU1V.js.map → Card-CMDQUPM4.js.map} +1 -1
  381. package/lib/CodeBlock-BaBgX9Wy.js +85 -0
  382. package/lib/CodeBlock-BaBgX9Wy.js.map +1 -0
  383. package/lib/Command-C9AC5cf-.js +140 -0
  384. package/lib/Command-C9AC5cf-.js.map +1 -0
  385. package/lib/{Dialog-irKZWXGg.js → Dialog-DMWw1doX.js} +26 -26
  386. package/lib/Dialog-DMWw1doX.js.map +1 -0
  387. package/lib/{Drawer-DZ214i5V.js → Drawer-DXGPOKPx.js} +2 -2
  388. package/lib/{Drawer-DZ214i5V.js.map → Drawer-DXGPOKPx.js.map} +1 -1
  389. package/lib/MdxPage-D8Med7IR.js +110 -0
  390. package/lib/MdxPage-D8Med7IR.js.map +1 -0
  391. package/lib/OasProvider-YexVRErA.js +35 -0
  392. package/lib/OasProvider-YexVRErA.js.map +1 -0
  393. package/lib/{OperationList-CkKcRPvk.js → OperationList-CL_tp7DC.js} +1749 -1728
  394. package/lib/OperationList-CL_tp7DC.js.map +1 -0
  395. package/lib/Pagination-Bcjbdo_g.js +37 -0
  396. package/lib/Pagination-Bcjbdo_g.js.map +1 -0
  397. package/lib/RouteGuard-Vnlz_t51.js +737 -0
  398. package/lib/RouteGuard-Vnlz_t51.js.map +1 -0
  399. package/lib/{SchemaList-BUiEgmw6.js → SchemaList-BNDTWO1B.js} +32 -43
  400. package/lib/SchemaList-BNDTWO1B.js.map +1 -0
  401. package/lib/{SchemaView-DSgzGi1L.js → SchemaView-DdKqED8D.js} +95 -104
  402. package/lib/SchemaView-DdKqED8D.js.map +1 -0
  403. package/lib/SignUp-BkAQMKsK.js +56 -0
  404. package/lib/SignUp-BkAQMKsK.js.map +1 -0
  405. package/lib/Slot-CrCBhP3G.js +15743 -0
  406. package/lib/Slot-CrCBhP3G.js.map +1 -0
  407. package/lib/{SyntaxHighlight-DTgNHbGp.js → SyntaxHighlight-CVe58ZSY.js} +4683 -3484
  408. package/lib/SyntaxHighlight-CVe58ZSY.js.map +1 -0
  409. package/lib/{Toc-Ccycwd-T.js → Toc-CpsFSXeD.js} +3 -3
  410. package/lib/{Toc-Ccycwd-T.js.map → Toc-CpsFSXeD.js.map} +1 -1
  411. package/lib/{chunk-BAXFHI7N-C9WnHsLV.js → chunk-DQRVZFIR-DHK7_Ilc.js} +701 -701
  412. package/lib/chunk-DQRVZFIR-DHK7_Ilc.js.map +1 -0
  413. package/lib/{circular-D1Bwr5bf.js → circular-BJUzZQ5q.js} +1812 -1807
  414. package/lib/circular-BJUzZQ5q.js.map +1 -0
  415. package/lib/clerk-BDZ31hjU.js +25190 -0
  416. package/lib/clerk-BDZ31hjU.js.map +1 -0
  417. package/lib/clsx-OuTLNxxd.js +17 -0
  418. package/lib/clsx-OuTLNxxd.js.map +1 -0
  419. package/lib/{cn-BOFVZgHd.js → cn-dYga0KKN.js} +237 -250
  420. package/lib/cn-dYga0KKN.js.map +1 -0
  421. package/lib/{createServer-BZp1gEBL.js → createServer-C8-YhyiB.js} +2459 -2448
  422. package/lib/createServer-C8-YhyiB.js.map +1 -0
  423. package/lib/errors-CKo4K1aM.js +78 -0
  424. package/lib/errors-CKo4K1aM.js.map +1 -0
  425. package/lib/hook-CZjW2buS.js +1510 -0
  426. package/lib/hook-CZjW2buS.js.map +1 -0
  427. package/lib/{index-BvvmIczU.js → index-4XtG1tlD.js} +2 -2
  428. package/lib/{index-BvvmIczU.js.map → index-4XtG1tlD.js.map} +1 -1
  429. package/lib/index-B3xhxwZH.js +3469 -0
  430. package/lib/index-B3xhxwZH.js.map +1 -0
  431. package/lib/index-B4yKFxne.js +3980 -0
  432. package/lib/index-B4yKFxne.js.map +1 -0
  433. package/lib/index-Bm35Tkgf.js +107 -0
  434. package/lib/index-Bm35Tkgf.js.map +1 -0
  435. package/lib/index-CrcNWbel.js.map +1 -1
  436. package/lib/{index-C1S4w-gl.js → index-DI5SPFK9.js} +2 -2
  437. package/lib/{index-C1S4w-gl.js.map → index-DI5SPFK9.js.map} +1 -1
  438. package/lib/{index-zddirpDj.js → index-DmNq2fbN.js} +226 -221
  439. package/lib/index-DmNq2fbN.js.map +1 -0
  440. package/lib/index.esm-Cp4wkyud.js +1236 -0
  441. package/lib/index.esm-Cp4wkyud.js.map +1 -0
  442. package/lib/ui/Accordion.js +1 -1
  443. package/lib/ui/ActionButton.js +2 -2
  444. package/lib/ui/Alert.js +54 -38
  445. package/lib/ui/Alert.js.map +1 -1
  446. package/lib/ui/AlertDialog.js +1 -1
  447. package/lib/ui/Badge.js +2 -2
  448. package/lib/ui/Breadcrumb.js +1 -1
  449. package/lib/ui/Button.js +2 -2
  450. package/lib/ui/Callout.js +6 -5
  451. package/lib/ui/Callout.js.map +1 -1
  452. package/lib/ui/Card.js +1 -1
  453. package/lib/ui/Carousel.js +1 -1
  454. package/lib/ui/Checkbox.js +1 -1
  455. package/lib/ui/CodeBlock.js +6 -80
  456. package/lib/ui/CodeBlock.js.map +1 -1
  457. package/lib/ui/Command.js +2 -2
  458. package/lib/ui/Dialog.js +40 -40
  459. package/lib/ui/Dialog.js.map +1 -1
  460. package/lib/ui/Drawer.js +2 -2
  461. package/lib/ui/DropdownMenu.js +1 -1
  462. package/lib/ui/EmbeddedCodeBlock.js +80 -0
  463. package/lib/ui/EmbeddedCodeBlock.js.map +1 -0
  464. package/lib/ui/Form.js +2 -2
  465. package/lib/ui/HoverCard.js +1 -1
  466. package/lib/ui/Input.js +1 -1
  467. package/lib/ui/Label.js +2 -2
  468. package/lib/ui/Pagination.js +1 -1
  469. package/lib/ui/Popover.js +1 -1
  470. package/lib/ui/Progress.js +1 -1
  471. package/lib/ui/RadioGroup.js +1 -1
  472. package/lib/ui/ScrollArea.js +1 -1
  473. package/lib/ui/Select.js +2 -2
  474. package/lib/ui/Select.js.map +1 -1
  475. package/lib/ui/Skeleton.js +1 -1
  476. package/lib/ui/Slider.js +1 -1
  477. package/lib/ui/Switch.js +1 -1
  478. package/lib/ui/SyntaxHighlight.js +5 -4
  479. package/lib/ui/SyntaxHighlight.js.map +1 -1
  480. package/lib/ui/Tabs.js +1 -1
  481. package/lib/ui/Textarea.js +1 -1
  482. package/lib/ui/Toggle.js +2 -2
  483. package/lib/ui/ToggleGroup.js +1 -1
  484. package/lib/ui/Tooltip.js +15 -8
  485. package/lib/ui/Tooltip.js.map +1 -1
  486. package/lib/ui/util.js +1 -1
  487. package/lib/{useExposedProps-DG8J6ewJ.js → useExposedProps-BIYjecPD.js} +2 -2
  488. package/lib/{useExposedProps-DG8J6ewJ.js.map → useExposedProps-BIYjecPD.js.map} +1 -1
  489. package/lib/zudoku.auth-auth0.js +2 -2
  490. package/lib/zudoku.auth-auth0.js.map +1 -1
  491. package/lib/zudoku.auth-azureb2c.js +9971 -0
  492. package/lib/zudoku.auth-azureb2c.js.map +1 -0
  493. package/lib/zudoku.auth-clerk.js +39 -48
  494. package/lib/zudoku.auth-clerk.js.map +1 -1
  495. package/lib/zudoku.auth-openid.js +381 -406
  496. package/lib/zudoku.auth-openid.js.map +1 -1
  497. package/lib/zudoku.components.js +29 -30
  498. package/lib/zudoku.components.js.map +1 -1
  499. package/lib/zudoku.hooks.js +21 -13
  500. package/lib/zudoku.hooks.js.map +1 -1
  501. package/lib/zudoku.plugin-api-catalog.js +45 -45
  502. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  503. package/lib/zudoku.plugin-api-keys.js +512 -4971
  504. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  505. package/lib/zudoku.plugin-custom-pages.js +12 -18
  506. package/lib/zudoku.plugin-custom-pages.js.map +1 -1
  507. package/lib/zudoku.plugin-markdown.js +19 -69
  508. package/lib/zudoku.plugin-markdown.js.map +1 -1
  509. package/lib/zudoku.plugin-openapi.js +6 -6
  510. package/lib/zudoku.plugin-redirect.js +1 -1
  511. package/lib/zudoku.plugin-search-inkeep.js +54 -57
  512. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  513. package/lib/zudoku.plugin-search-pagefind.js +211 -117
  514. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  515. package/lib/zudoku.plugins.js.map +1 -1
  516. package/package.json +91 -70
  517. package/src/app/ZuploBuildConfig.ts +8 -8
  518. package/src/app/defaultTheme.css +68 -49
  519. package/src/app/demo.tsx +24 -6
  520. package/src/app/entry.client.tsx +0 -2
  521. package/src/app/entry.server.tsx +0 -2
  522. package/src/app/env.ts +8 -0
  523. package/src/app/main.css +15 -57
  524. package/src/app/main.tsx +18 -24
  525. package/src/app/standalone.tsx +7 -6
  526. package/src/lib/auth/issuer.test.ts +120 -0
  527. package/src/lib/auth/issuer.ts +41 -0
  528. package/src/lib/authentication/AuthenticationPlugin.tsx +0 -14
  529. package/src/lib/authentication/authentication.ts +2 -2
  530. package/src/lib/authentication/components/CallbackHandler.tsx +1 -1
  531. package/src/lib/authentication/components/SignIn.tsx +5 -12
  532. package/src/lib/authentication/providers/auth0.tsx +1 -1
  533. package/src/lib/authentication/providers/azureb2c.tsx +196 -0
  534. package/src/lib/authentication/providers/clerk.tsx +3 -12
  535. package/src/lib/authentication/providers/openid.tsx +76 -4
  536. package/src/lib/authentication/providers/supabase.tsx +2 -9
  537. package/src/lib/authentication/state.ts +37 -7
  538. package/src/lib/components/Autocomplete.tsx +2 -1
  539. package/src/lib/components/Banner.tsx +1 -2
  540. package/src/lib/components/BuildCheck.tsx +1 -1
  541. package/src/lib/components/CategoryHeading.tsx +4 -1
  542. package/src/lib/components/ErrorPage.tsx +3 -3
  543. package/src/lib/components/Footer.tsx +1 -1
  544. package/src/lib/components/Framed.tsx +51 -0
  545. package/src/lib/components/Header.tsx +25 -22
  546. package/src/lib/components/Heading.tsx +16 -8
  547. package/src/lib/components/Main.tsx +9 -9
  548. package/src/lib/components/Markdown.tsx +17 -9
  549. package/src/lib/components/MobileTopNavigation.tsx +69 -15
  550. package/src/lib/components/NotFoundPage.tsx +3 -3
  551. package/src/lib/components/PageProgress.tsx +28 -0
  552. package/src/lib/components/Pagination.tsx +5 -4
  553. package/src/lib/components/StatusPage.tsx +5 -0
  554. package/src/lib/components/TopNavigation.tsx +75 -68
  555. package/src/lib/components/Typography.tsx +14 -0
  556. package/src/lib/components/context/ZudokuContext.ts +50 -32
  557. package/src/lib/components/context/ZudokuProvider.tsx +1 -1
  558. package/src/lib/components/index.ts +16 -10
  559. package/src/lib/components/navigation/{Sidebar.tsx → Navigation.tsx} +18 -16
  560. package/src/lib/components/navigation/{SidebarBadge.tsx → NavigationBadge.tsx} +1 -1
  561. package/src/lib/components/navigation/{SidebarCategory.tsx → NavigationCategory.tsx} +17 -15
  562. package/src/lib/components/navigation/NavigationItem.tsx +151 -0
  563. package/src/lib/components/navigation/{SidebarWrapper.tsx → NavigationWrapper.tsx} +7 -4
  564. package/src/lib/components/navigation/utils.ts +52 -29
  565. package/src/lib/core/ZudokuContext.ts +36 -20
  566. package/src/lib/core/plugins.ts +2 -2
  567. package/src/lib/errors/ErrorAlert.tsx +3 -9
  568. package/src/lib/hooks/index.ts +11 -0
  569. package/src/lib/hooks/useEvent.test.tsx +7 -5
  570. package/src/lib/hooks/useHotkey.ts +70 -0
  571. package/src/lib/plugins/api-catalog/Catalog.tsx +1 -1
  572. package/src/lib/plugins/api-catalog/index.tsx +19 -19
  573. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +238 -70
  574. package/src/lib/plugins/api-keys/index.tsx +50 -23
  575. package/src/lib/plugins/custom-pages/index.tsx +21 -16
  576. package/src/lib/plugins/markdown/MdxPage.tsx +76 -21
  577. package/src/lib/plugins/markdown/index.tsx +28 -41
  578. package/src/lib/plugins/openapi/OperationList.tsx +12 -20
  579. package/src/lib/plugins/openapi/OperationListItem.tsx +3 -3
  580. package/src/lib/plugins/openapi/ParameterListItem.tsx +6 -0
  581. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +1 -1
  582. package/src/lib/plugins/openapi/SchemaList.tsx +5 -11
  583. package/src/lib/plugins/openapi/Sidecar.tsx +12 -97
  584. package/src/lib/plugins/openapi/SidecarExamples.tsx +1 -0
  585. package/src/lib/plugins/openapi/graphql/gql.ts +5 -5
  586. package/src/lib/plugins/openapi/graphql/graphql.ts +6 -6
  587. package/src/lib/plugins/openapi/index.tsx +12 -12
  588. package/src/lib/plugins/openapi/interfaces.ts +3 -3
  589. package/src/lib/plugins/openapi/playground/BodyPanel.tsx +55 -0
  590. package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +47 -0
  591. package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +8 -1
  592. package/src/lib/plugins/openapi/playground/Headers.tsx +217 -115
  593. package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +3 -2
  594. package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +13 -16
  595. package/src/lib/plugins/openapi/playground/InlineInput.tsx +1 -1
  596. package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +2 -2
  597. package/src/lib/plugins/openapi/playground/PathParams.tsx +4 -5
  598. package/src/lib/plugins/openapi/playground/Playground.tsx +253 -288
  599. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +2 -1
  600. package/src/lib/plugins/openapi/playground/QueryParams.tsx +104 -58
  601. package/src/lib/plugins/openapi/playground/Spinner.tsx +87 -0
  602. package/src/lib/plugins/openapi/playground/fileUtils.ts +32 -0
  603. package/src/lib/plugins/openapi/playground/request-panel/UrlPath.tsx +31 -0
  604. package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +25 -0
  605. package/src/lib/plugins/openapi/playground/result-panel/Highlight.tsx +26 -0
  606. package/src/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.tsx +115 -0
  607. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +149 -108
  608. package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +68 -89
  609. package/src/lib/plugins/openapi/playground/useRememberSkipLoginDialog.tsx +20 -0
  610. package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +3 -3
  611. package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +2 -3
  612. package/src/lib/plugins/openapi/schema/SchemaView.tsx +6 -11
  613. package/src/lib/plugins/openapi/schema/utils.ts +3 -2
  614. package/src/lib/plugins/openapi/util/createHttpSnippet.ts +107 -0
  615. package/src/lib/plugins/openapi/util/{createSidebarCategory.tsx → createNavigationCategory.tsx} +6 -5
  616. package/src/lib/plugins/openapi/util/getRoutes.tsx +2 -2
  617. package/src/lib/plugins/openapi/util/methodColorMap.tsx +1 -1
  618. package/src/lib/plugins/search-inkeep/index.tsx +54 -58
  619. package/src/lib/plugins/search-inkeep/inkeep.ts +19 -21
  620. package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +1 -0
  621. package/src/lib/plugins/search-pagefind/ResultList.tsx +13 -4
  622. package/src/lib/shiki.ts +21 -22
  623. package/src/lib/ui/Alert.tsx +45 -39
  624. package/src/lib/ui/Callout.tsx +1 -0
  625. package/src/lib/ui/CodeBlock.tsx +40 -54
  626. package/src/lib/ui/Dialog.tsx +11 -7
  627. package/src/lib/ui/EmbeddedCodeBlock.tsx +94 -0
  628. package/src/lib/ui/Select.tsx +1 -1
  629. package/src/lib/ui/SyntaxHighlight.tsx +11 -3
  630. package/src/lib/ui/Tooltip.tsx +16 -1
  631. package/src/lib/util/MdxComponents.tsx +13 -2
  632. package/src/lib/util/humanFileSize.test.ts +24 -0
  633. package/src/lib/util/humanFileSize.ts +16 -0
  634. package/src/lib/util/os.ts +18 -0
  635. package/src/lib/util/useCopyToClipboard.ts +17 -0
  636. package/src/lib/util/useScrollToAnchor.ts +3 -3
  637. package/dist/config/validators/InputSidebarSchema.d.ts +0 -217
  638. package/dist/config/validators/InputSidebarSchema.js +0 -62
  639. package/dist/config/validators/InputSidebarSchema.js.map +0 -1
  640. package/dist/config/validators/SidebarSchema.d.ts +0 -46
  641. package/dist/config/validators/SidebarSchema.js +0 -118
  642. package/dist/config/validators/SidebarSchema.js.map +0 -1
  643. package/dist/lib/components/navigation/Sidebar.d.ts +0 -5
  644. package/dist/lib/components/navigation/Sidebar.js +0 -10
  645. package/dist/lib/components/navigation/Sidebar.js.map +0 -1
  646. package/dist/lib/components/navigation/SidebarBadge.js.map +0 -1
  647. package/dist/lib/components/navigation/SidebarCategory.d.ts +0 -5
  648. package/dist/lib/components/navigation/SidebarCategory.js.map +0 -1
  649. package/dist/lib/components/navigation/SidebarItem.d.ts +0 -11
  650. package/dist/lib/components/navigation/SidebarItem.js +0 -49
  651. package/dist/lib/components/navigation/SidebarItem.js.map +0 -1
  652. package/dist/lib/components/navigation/SidebarWrapper.js.map +0 -1
  653. package/dist/lib/plugins/custom-pages/CustomPage.d.ts +0 -2
  654. package/dist/lib/plugins/custom-pages/CustomPage.js +0 -11
  655. package/dist/lib/plugins/custom-pages/CustomPage.js.map +0 -1
  656. package/dist/lib/plugins/markdown/resolver.d.ts +0 -32
  657. package/dist/lib/plugins/markdown/resolver.js +0 -46
  658. package/dist/lib/plugins/markdown/resolver.js.map +0 -1
  659. package/dist/lib/plugins/openapi/playground/SubmitButton.d.ts +0 -7
  660. package/dist/lib/plugins/openapi/playground/SubmitButton.js +0 -19
  661. package/dist/lib/plugins/openapi/playground/SubmitButton.js.map +0 -1
  662. package/dist/lib/plugins/openapi/playground/UrlDisplay.d.ts +0 -4
  663. package/dist/lib/plugins/openapi/playground/UrlDisplay.js +0 -22
  664. package/dist/lib/plugins/openapi/playground/UrlDisplay.js.map +0 -1
  665. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.d.ts +0 -7
  666. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +0 -11
  667. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js.map +0 -1
  668. package/dist/lib/plugins/openapi/util/createSidebarCategory.d.ts +0 -9
  669. package/dist/lib/plugins/openapi/util/createSidebarCategory.js.map +0 -1
  670. package/dist/vite/plugin-configure-tailwind.d.ts +0 -2
  671. package/dist/vite/plugin-configure-tailwind.js +0 -38
  672. package/dist/vite/plugin-configure-tailwind.js.map +0 -1
  673. package/dist/vite/plugin-sidebar.js.map +0 -1
  674. package/dist/vite/plugin-theme-css.d.ts +0 -5
  675. package/dist/vite/plugin-theme-css.js +0 -77
  676. package/dist/vite/plugin-theme-css.js.map +0 -1
  677. package/lib/Callout-CtCQJ6Cc.js +0 -230
  678. package/lib/Callout-CtCQJ6Cc.js.map +0 -1
  679. package/lib/CategoryHeading-BA7lKNWz.js +0 -10
  680. package/lib/CategoryHeading-BA7lKNWz.js.map +0 -1
  681. package/lib/Dialog-irKZWXGg.js.map +0 -1
  682. package/lib/Markdown-BNG8bTDA.js +0 -7691
  683. package/lib/Markdown-BNG8bTDA.js.map +0 -1
  684. package/lib/MdxPage-D74eGiYZ.js +0 -84
  685. package/lib/MdxPage-D74eGiYZ.js.map +0 -1
  686. package/lib/OasProvider-D61BSWef.js +0 -33
  687. package/lib/OasProvider-D61BSWef.js.map +0 -1
  688. package/lib/OperationList-CkKcRPvk.js.map +0 -1
  689. package/lib/Pagination-CeFxTDan.js +0 -36
  690. package/lib/Pagination-CeFxTDan.js.map +0 -1
  691. package/lib/RouteGuard-CIyGFkFD.js +0 -55
  692. package/lib/RouteGuard-CIyGFkFD.js.map +0 -1
  693. package/lib/SchemaList-BUiEgmw6.js.map +0 -1
  694. package/lib/SchemaView-DSgzGi1L.js.map +0 -1
  695. package/lib/SignUp-DCgoDR--.js +0 -63
  696. package/lib/SignUp-DCgoDR--.js.map +0 -1
  697. package/lib/Slot-Dw-g06lX.js +0 -160
  698. package/lib/Slot-Dw-g06lX.js.map +0 -1
  699. package/lib/SyntaxHighlight-DTgNHbGp.js.map +0 -1
  700. package/lib/chunk-BAXFHI7N-C9WnHsLV.js.map +0 -1
  701. package/lib/circular-D1Bwr5bf.js.map +0 -1
  702. package/lib/cn-BOFVZgHd.js.map +0 -1
  703. package/lib/createServer-BZp1gEBL.js.map +0 -1
  704. package/lib/hook-BpiAQVtd.js +0 -1446
  705. package/lib/hook-BpiAQVtd.js.map +0 -1
  706. package/lib/index--oeBayMa.js +0 -86
  707. package/lib/index--oeBayMa.js.map +0 -1
  708. package/lib/index-Bn6Lc9tq.js +0 -9
  709. package/lib/index-Bn6Lc9tq.js.map +0 -1
  710. package/lib/index-DEr_Ta6s.js +0 -4977
  711. package/lib/index-DEr_Ta6s.js.map +0 -1
  712. package/lib/index-E90CTqBl.js +0 -3268
  713. package/lib/index-E90CTqBl.js.map +0 -1
  714. package/lib/index-zddirpDj.js.map +0 -1
  715. package/lib/index.esm-BFcSKCe-.js +0 -683
  716. package/lib/index.esm-BFcSKCe-.js.map +0 -1
  717. package/lib/index.esm-DSfX_eMP.js +0 -1216
  718. package/lib/index.esm-DSfX_eMP.js.map +0 -1
  719. package/lib/mutation-CJrIFMgY.js +0 -196
  720. package/lib/mutation-CJrIFMgY.js.map +0 -1
  721. package/lib/objectEntries-yMIkr2mI.js +0 -5
  722. package/lib/objectEntries-yMIkr2mI.js.map +0 -1
  723. package/lib/useLatest-hmRS46UF.js +0 -11
  724. package/lib/useLatest-hmRS46UF.js.map +0 -1
  725. package/lib/useMutation-B2LNwShM.js +0 -97
  726. package/lib/useMutation-B2LNwShM.js.map +0 -1
  727. package/src/lib/components/navigation/SidebarItem.tsx +0 -117
  728. package/src/lib/plugins/custom-pages/CustomPage.tsx +0 -18
  729. package/src/lib/plugins/markdown/resolver.ts +0 -59
  730. package/src/lib/plugins/openapi/playground/SubmitButton.tsx +0 -70
  731. package/src/lib/plugins/openapi/playground/UrlDisplay.tsx +0 -32
  732. package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +0 -73
@@ -1,1446 +0,0 @@
1
- import * as S from "react";
2
- import Y, { createContext as Re, useContext as Ee } from "react";
3
- import { j as Ce } from "./jsx-runtime-C5mzlN2N.js";
4
- import { u as x, m as X } from "./chunk-BAXFHI7N-C9WnHsLV.js";
5
- var $ = class {
6
- constructor() {
7
- this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
8
- }
9
- subscribe(e) {
10
- return this.listeners.add(e), this.onSubscribe(), () => {
11
- this.listeners.delete(e), this.onUnsubscribe();
12
- };
13
- }
14
- hasListeners() {
15
- return this.listeners.size > 0;
16
- }
17
- onSubscribe() {
18
- }
19
- onUnsubscribe() {
20
- }
21
- }, C = typeof window > "u" || "Deno" in globalThis;
22
- function q() {
23
- }
24
- function bt(e, t) {
25
- return typeof e == "function" ? e(t) : e;
26
- }
27
- function U(e) {
28
- return typeof e == "number" && e >= 0 && e !== 1 / 0;
29
- }
30
- function ue(e, t) {
31
- return Math.max(e + (t || 0) - Date.now(), 0);
32
- }
33
- function k(e, t) {
34
- return typeof e == "function" ? e(t) : e;
35
- }
36
- function w(e, t) {
37
- return typeof e == "function" ? e(t) : e;
38
- }
39
- function mt(e, t) {
40
- const {
41
- type: s = "all",
42
- exact: r,
43
- fetchStatus: n,
44
- predicate: a,
45
- queryKey: o,
46
- stale: i
47
- } = e;
48
- if (o) {
49
- if (r) {
50
- if (t.queryHash !== Fe(o, t.options))
51
- return !1;
52
- } else if (!G(t.queryKey, o))
53
- return !1;
54
- }
55
- if (s !== "all") {
56
- const u = t.isActive();
57
- if (s === "active" && !u || s === "inactive" && u)
58
- return !1;
59
- }
60
- return !(typeof i == "boolean" && t.isStale() !== i || n && n !== t.state.fetchStatus || a && !a(t));
61
- }
62
- function gt(e, t) {
63
- const { exact: s, status: r, predicate: n, mutationKey: a } = e;
64
- if (a) {
65
- if (!t.options.mutationKey)
66
- return !1;
67
- if (s) {
68
- if (Q(t.options.mutationKey) !== Q(a))
69
- return !1;
70
- } else if (!G(t.options.mutationKey, a))
71
- return !1;
72
- }
73
- return !(r && t.state.status !== r || n && !n(t));
74
- }
75
- function Fe(e, t) {
76
- return (t?.queryKeyHashFn || Q)(e);
77
- }
78
- function Q(e) {
79
- return JSON.stringify(
80
- e,
81
- (t, s) => M(s) ? Object.keys(s).sort().reduce((r, n) => (r[n] = s[n], r), {}) : s
82
- );
83
- }
84
- function G(e, t) {
85
- return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? Object.keys(t).every((s) => G(e[s], t[s])) : !1;
86
- }
87
- function N(e, t) {
88
- if (e === t)
89
- return e;
90
- const s = ee(e) && ee(t);
91
- if (s || M(e) && M(t)) {
92
- const r = s ? e : Object.keys(e), n = r.length, a = s ? t : Object.keys(t), o = a.length, i = s ? [] : {};
93
- let u = 0;
94
- for (let l = 0; l < o; l++) {
95
- const h = s ? l : a[l];
96
- (!s && r.includes(h) || s) && e[h] === void 0 && t[h] === void 0 ? (i[h] = void 0, u++) : (i[h] = N(e[h], t[h]), i[h] === e[h] && e[h] !== void 0 && u++);
97
- }
98
- return n === o && u === n ? e : i;
99
- }
100
- return t;
101
- }
102
- function L(e, t) {
103
- if (!t || Object.keys(e).length !== Object.keys(t).length)
104
- return !1;
105
- for (const s in e)
106
- if (e[s] !== t[s])
107
- return !1;
108
- return !0;
109
- }
110
- function ee(e) {
111
- return Array.isArray(e) && e.length === Object.keys(e).length;
112
- }
113
- function M(e) {
114
- if (!te(e))
115
- return !1;
116
- const t = e.constructor;
117
- if (t === void 0)
118
- return !0;
119
- const s = t.prototype;
120
- return !(!te(s) || !s.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
121
- }
122
- function te(e) {
123
- return Object.prototype.toString.call(e) === "[object Object]";
124
- }
125
- function Ie(e) {
126
- return new Promise((t) => {
127
- setTimeout(t, e);
128
- });
129
- }
130
- function _(e, t, s) {
131
- if (typeof s.structuralSharing == "function")
132
- return s.structuralSharing(e, t);
133
- if (s.structuralSharing !== !1) {
134
- if (process.env.NODE_ENV !== "production")
135
- try {
136
- return N(e, t);
137
- } catch (r) {
138
- throw console.error(
139
- `Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${s.queryHash}]: ${r}`
140
- ), r;
141
- }
142
- return N(e, t);
143
- }
144
- return t;
145
- }
146
- function St(e) {
147
- return e;
148
- }
149
- function wt(e, t, s = 0) {
150
- const r = [...e, t];
151
- return s && r.length > s ? r.slice(1) : r;
152
- }
153
- function Ot(e, t, s = 0) {
154
- const r = [t, ...e];
155
- return s && r.length > s ? r.slice(0, -1) : r;
156
- }
157
- var j = Symbol();
158
- function Pe(e, t) {
159
- return process.env.NODE_ENV !== "production" && e.queryFn === j && console.error(
160
- `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`
161
- ), !e.queryFn && t?.initialPromise ? () => t.initialPromise : !e.queryFn || e.queryFn === j ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
162
- }
163
- var Te = class extends $ {
164
- #t;
165
- #e;
166
- #s;
167
- constructor() {
168
- super(), this.#s = (e) => {
169
- if (!C && window.addEventListener) {
170
- const t = () => e();
171
- return window.addEventListener("visibilitychange", t, !1), () => {
172
- window.removeEventListener("visibilitychange", t);
173
- };
174
- }
175
- };
176
- }
177
- onSubscribe() {
178
- this.#e || this.setEventListener(this.#s);
179
- }
180
- onUnsubscribe() {
181
- this.hasListeners() || (this.#e?.(), this.#e = void 0);
182
- }
183
- setEventListener(e) {
184
- this.#s = e, this.#e?.(), this.#e = e((t) => {
185
- typeof t == "boolean" ? this.setFocused(t) : this.onFocus();
186
- });
187
- }
188
- setFocused(e) {
189
- this.#t !== e && (this.#t = e, this.onFocus());
190
- }
191
- onFocus() {
192
- const e = this.isFocused();
193
- this.listeners.forEach((t) => {
194
- t(e);
195
- });
196
- }
197
- isFocused() {
198
- return typeof this.#t == "boolean" ? this.#t : globalThis.document?.visibilityState !== "hidden";
199
- }
200
- }, ce = new Te(), De = class extends $ {
201
- #t = !0;
202
- #e;
203
- #s;
204
- constructor() {
205
- super(), this.#s = (e) => {
206
- if (!C && window.addEventListener) {
207
- const t = () => e(!0), s = () => e(!1);
208
- return window.addEventListener("online", t, !1), window.addEventListener("offline", s, !1), () => {
209
- window.removeEventListener("online", t), window.removeEventListener("offline", s);
210
- };
211
- }
212
- };
213
- }
214
- onSubscribe() {
215
- this.#e || this.setEventListener(this.#s);
216
- }
217
- onUnsubscribe() {
218
- this.hasListeners() || (this.#e?.(), this.#e = void 0);
219
- }
220
- setEventListener(e) {
221
- this.#s = e, this.#e?.(), this.#e = e(this.setOnline.bind(this));
222
- }
223
- setOnline(e) {
224
- this.#t !== e && (this.#t = e, this.listeners.forEach((s) => {
225
- s(e);
226
- }));
227
- }
228
- isOnline() {
229
- return this.#t;
230
- }
231
- }, he = new De();
232
- function H() {
233
- let e, t;
234
- const s = new Promise((n, a) => {
235
- e = n, t = a;
236
- });
237
- s.status = "pending", s.catch(() => {
238
- });
239
- function r(n) {
240
- Object.assign(s, n), delete s.resolve, delete s.reject;
241
- }
242
- return s.resolve = (n) => {
243
- r({
244
- status: "fulfilled",
245
- value: n
246
- }), e(n);
247
- }, s.reject = (n) => {
248
- r({
249
- status: "rejected",
250
- reason: n
251
- }), t(n);
252
- }, s;
253
- }
254
- function ke(e) {
255
- return Math.min(1e3 * 2 ** e, 3e4);
256
- }
257
- function le(e) {
258
- return (e ?? "online") === "online" ? he.isOnline() : !0;
259
- }
260
- var de = class extends Error {
261
- constructor(e) {
262
- super("CancelledError"), this.revert = e?.revert, this.silent = e?.silent;
263
- }
264
- };
265
- function A(e) {
266
- return e instanceof de;
267
- }
268
- function je(e) {
269
- let t = !1, s = 0, r = !1, n;
270
- const a = H(), o = (c) => {
271
- r || (d(new de(c)), e.abort?.());
272
- }, i = () => {
273
- t = !0;
274
- }, u = () => {
275
- t = !1;
276
- }, l = () => ce.isFocused() && (e.networkMode === "always" || he.isOnline()) && e.canRun(), h = () => le(e.networkMode) && e.canRun(), p = (c) => {
277
- r || (r = !0, e.onSuccess?.(c), n?.(), a.resolve(c));
278
- }, d = (c) => {
279
- r || (r = !0, e.onError?.(c), n?.(), a.reject(c));
280
- }, b = () => new Promise((c) => {
281
- n = (m) => {
282
- (r || l()) && c(m);
283
- }, e.onPause?.();
284
- }).then(() => {
285
- n = void 0, r || e.onContinue?.();
286
- }), R = () => {
287
- if (r)
288
- return;
289
- let c;
290
- const m = s === 0 ? e.initialPromise : void 0;
291
- try {
292
- c = m ?? e.fn();
293
- } catch (v) {
294
- c = Promise.reject(v);
295
- }
296
- Promise.resolve(c).then(p).catch((v) => {
297
- if (r)
298
- return;
299
- const f = e.retry ?? (C ? 0 : 3), y = e.retryDelay ?? ke, E = typeof y == "function" ? y(s, v) : y, F = f === !0 || typeof f == "number" && s < f || typeof f == "function" && f(s, v);
300
- if (t || !F) {
301
- d(v);
302
- return;
303
- }
304
- s++, e.onFail?.(s, v), Ie(E).then(() => l() ? void 0 : b()).then(() => {
305
- t ? d(v) : R();
306
- });
307
- });
308
- };
309
- return {
310
- promise: a,
311
- cancel: o,
312
- continue: () => (n?.(), a),
313
- cancelRetry: i,
314
- continueRetry: u,
315
- canStart: h,
316
- start: () => (h() ? R() : b().then(R), a)
317
- };
318
- }
319
- var xe = (e) => setTimeout(e, 0);
320
- function Ae() {
321
- let e = [], t = 0, s = (i) => {
322
- i();
323
- }, r = (i) => {
324
- i();
325
- }, n = xe;
326
- const a = (i) => {
327
- t ? e.push(i) : n(() => {
328
- s(i);
329
- });
330
- }, o = () => {
331
- const i = e;
332
- e = [], i.length && n(() => {
333
- r(() => {
334
- i.forEach((u) => {
335
- s(u);
336
- });
337
- });
338
- });
339
- };
340
- return {
341
- batch: (i) => {
342
- let u;
343
- t++;
344
- try {
345
- u = i();
346
- } finally {
347
- t--, t || o();
348
- }
349
- return u;
350
- },
351
- /**
352
- * All calls to the wrapped function will be batched.
353
- */
354
- batchCalls: (i) => (...u) => {
355
- a(() => {
356
- i(...u);
357
- });
358
- },
359
- schedule: a,
360
- /**
361
- * Use this method to set a custom notify function.
362
- * This can be used to for example wrap notifications with `React.act` while running tests.
363
- */
364
- setNotifyFunction: (i) => {
365
- s = i;
366
- },
367
- /**
368
- * Use this method to set a custom function to batch notifications together into a single tick.
369
- * By default React Query will use the batch function provided by ReactDOM or React Native.
370
- */
371
- setBatchNotifyFunction: (i) => {
372
- r = i;
373
- },
374
- setScheduler: (i) => {
375
- n = i;
376
- }
377
- };
378
- }
379
- var z = Ae(), qe = class {
380
- #t;
381
- destroy() {
382
- this.clearGcTimeout();
383
- }
384
- scheduleGc() {
385
- this.clearGcTimeout(), U(this.gcTime) && (this.#t = setTimeout(() => {
386
- this.optionalRemove();
387
- }, this.gcTime));
388
- }
389
- updateGcTime(e) {
390
- this.gcTime = Math.max(
391
- this.gcTime || 0,
392
- e ?? (C ? 1 / 0 : 5 * 60 * 1e3)
393
- );
394
- }
395
- clearGcTimeout() {
396
- this.#t && (clearTimeout(this.#t), this.#t = void 0);
397
- }
398
- }, Rt = class extends qe {
399
- #t;
400
- #e;
401
- #s;
402
- #n;
403
- #r;
404
- #o;
405
- #a;
406
- constructor(e) {
407
- super(), this.#a = !1, this.#o = e.defaultOptions, this.setOptions(e.options), this.observers = [], this.#n = e.client, this.#s = this.#n.getQueryCache(), this.queryKey = e.queryKey, this.queryHash = e.queryHash, this.#t = Ue(this.options), this.state = e.state ?? this.#t, this.scheduleGc();
408
- }
409
- get meta() {
410
- return this.options.meta;
411
- }
412
- get promise() {
413
- return this.#r?.promise;
414
- }
415
- setOptions(e) {
416
- this.options = { ...this.#o, ...e }, this.updateGcTime(this.options.gcTime);
417
- }
418
- optionalRemove() {
419
- !this.observers.length && this.state.fetchStatus === "idle" && this.#s.remove(this);
420
- }
421
- setData(e, t) {
422
- const s = _(this.state.data, e, this.options);
423
- return this.#i({
424
- data: s,
425
- type: "success",
426
- dataUpdatedAt: t?.updatedAt,
427
- manual: t?.manual
428
- }), s;
429
- }
430
- setState(e, t) {
431
- this.#i({ type: "setState", state: e, setStateOptions: t });
432
- }
433
- cancel(e) {
434
- const t = this.#r?.promise;
435
- return this.#r?.cancel(e), t ? t.then(q).catch(q) : Promise.resolve();
436
- }
437
- destroy() {
438
- super.destroy(), this.cancel({ silent: !0 });
439
- }
440
- reset() {
441
- this.destroy(), this.setState(this.#t);
442
- }
443
- isActive() {
444
- return this.observers.some(
445
- (e) => w(e.options.enabled, this) !== !1
446
- );
447
- }
448
- isDisabled() {
449
- return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === j || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
450
- }
451
- isStale() {
452
- return this.state.isInvalidated ? !0 : this.getObserversCount() > 0 ? this.observers.some(
453
- (e) => e.getCurrentResult().isStale
454
- ) : this.state.data === void 0;
455
- }
456
- isStaleByTime(e = 0) {
457
- return this.state.isInvalidated || this.state.data === void 0 || !ue(this.state.dataUpdatedAt, e);
458
- }
459
- onFocus() {
460
- this.observers.find((t) => t.shouldFetchOnWindowFocus())?.refetch({ cancelRefetch: !1 }), this.#r?.continue();
461
- }
462
- onOnline() {
463
- this.observers.find((t) => t.shouldFetchOnReconnect())?.refetch({ cancelRefetch: !1 }), this.#r?.continue();
464
- }
465
- addObserver(e) {
466
- this.observers.includes(e) || (this.observers.push(e), this.clearGcTimeout(), this.#s.notify({ type: "observerAdded", query: this, observer: e }));
467
- }
468
- removeObserver(e) {
469
- this.observers.includes(e) && (this.observers = this.observers.filter((t) => t !== e), this.observers.length || (this.#r && (this.#a ? this.#r.cancel({ revert: !0 }) : this.#r.cancelRetry()), this.scheduleGc()), this.#s.notify({ type: "observerRemoved", query: this, observer: e }));
470
- }
471
- getObserversCount() {
472
- return this.observers.length;
473
- }
474
- invalidate() {
475
- this.state.isInvalidated || this.#i({ type: "invalidate" });
476
- }
477
- fetch(e, t) {
478
- if (this.state.fetchStatus !== "idle") {
479
- if (this.state.data !== void 0 && t?.cancelRefetch)
480
- this.cancel({ silent: !0 });
481
- else if (this.#r)
482
- return this.#r.continueRetry(), this.#r.promise;
483
- }
484
- if (e && this.setOptions(e), !this.options.queryFn) {
485
- const i = this.observers.find((u) => u.options.queryFn);
486
- i && this.setOptions(i.options);
487
- }
488
- process.env.NODE_ENV !== "production" && (Array.isArray(this.options.queryKey) || console.error(
489
- "As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"
490
- ));
491
- const s = new AbortController(), r = (i) => {
492
- Object.defineProperty(i, "signal", {
493
- enumerable: !0,
494
- get: () => (this.#a = !0, s.signal)
495
- });
496
- }, n = () => {
497
- const i = Pe(this.options, t), u = {
498
- client: this.#n,
499
- queryKey: this.queryKey,
500
- meta: this.meta
501
- };
502
- return r(u), this.#a = !1, this.options.persister ? this.options.persister(
503
- i,
504
- u,
505
- this
506
- ) : i(u);
507
- }, a = {
508
- fetchOptions: t,
509
- options: this.options,
510
- queryKey: this.queryKey,
511
- client: this.#n,
512
- state: this.state,
513
- fetchFn: n
514
- };
515
- r(a), this.options.behavior?.onFetch(
516
- a,
517
- this
518
- ), this.#e = this.state, (this.state.fetchStatus === "idle" || this.state.fetchMeta !== a.fetchOptions?.meta) && this.#i({ type: "fetch", meta: a.fetchOptions?.meta });
519
- const o = (i) => {
520
- A(i) && i.silent || this.#i({
521
- type: "error",
522
- error: i
523
- }), A(i) || (this.#s.config.onError?.(
524
- i,
525
- this
526
- ), this.#s.config.onSettled?.(
527
- this.state.data,
528
- i,
529
- this
530
- )), this.scheduleGc();
531
- };
532
- return this.#r = je({
533
- initialPromise: t?.initialPromise,
534
- fn: a.fetchFn,
535
- abort: s.abort.bind(s),
536
- onSuccess: (i) => {
537
- if (i === void 0) {
538
- process.env.NODE_ENV !== "production" && console.error(
539
- `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
540
- ), o(new Error(`${this.queryHash} data is undefined`));
541
- return;
542
- }
543
- try {
544
- this.setData(i);
545
- } catch (u) {
546
- o(u);
547
- return;
548
- }
549
- this.#s.config.onSuccess?.(i, this), this.#s.config.onSettled?.(
550
- i,
551
- this.state.error,
552
- this
553
- ), this.scheduleGc();
554
- },
555
- onError: o,
556
- onFail: (i, u) => {
557
- this.#i({ type: "failed", failureCount: i, error: u });
558
- },
559
- onPause: () => {
560
- this.#i({ type: "pause" });
561
- },
562
- onContinue: () => {
563
- this.#i({ type: "continue" });
564
- },
565
- retry: a.options.retry,
566
- retryDelay: a.options.retryDelay,
567
- networkMode: a.options.networkMode,
568
- canRun: () => !0
569
- }), this.#r.start();
570
- }
571
- #i(e) {
572
- const t = (s) => {
573
- switch (e.type) {
574
- case "failed":
575
- return {
576
- ...s,
577
- fetchFailureCount: e.failureCount,
578
- fetchFailureReason: e.error
579
- };
580
- case "pause":
581
- return {
582
- ...s,
583
- fetchStatus: "paused"
584
- };
585
- case "continue":
586
- return {
587
- ...s,
588
- fetchStatus: "fetching"
589
- };
590
- case "fetch":
591
- return {
592
- ...s,
593
- ...fe(s.data, this.options),
594
- fetchMeta: e.meta ?? null
595
- };
596
- case "success":
597
- return {
598
- ...s,
599
- data: e.data,
600
- dataUpdateCount: s.dataUpdateCount + 1,
601
- dataUpdatedAt: e.dataUpdatedAt ?? Date.now(),
602
- error: null,
603
- isInvalidated: !1,
604
- status: "success",
605
- ...!e.manual && {
606
- fetchStatus: "idle",
607
- fetchFailureCount: 0,
608
- fetchFailureReason: null
609
- }
610
- };
611
- case "error":
612
- const r = e.error;
613
- return A(r) && r.revert && this.#e ? { ...this.#e, fetchStatus: "idle" } : {
614
- ...s,
615
- error: r,
616
- errorUpdateCount: s.errorUpdateCount + 1,
617
- errorUpdatedAt: Date.now(),
618
- fetchFailureCount: s.fetchFailureCount + 1,
619
- fetchFailureReason: r,
620
- fetchStatus: "idle",
621
- status: "error"
622
- };
623
- case "invalidate":
624
- return {
625
- ...s,
626
- isInvalidated: !0
627
- };
628
- case "setState":
629
- return {
630
- ...s,
631
- ...e.state
632
- };
633
- }
634
- };
635
- this.state = t(this.state), z.batch(() => {
636
- this.observers.forEach((s) => {
637
- s.onQueryUpdate();
638
- }), this.#s.notify({ query: this, type: "updated", action: e });
639
- });
640
- }
641
- };
642
- function fe(e, t) {
643
- return {
644
- fetchFailureCount: 0,
645
- fetchFailureReason: null,
646
- fetchStatus: le(t.networkMode) ? "fetching" : "paused",
647
- ...e === void 0 && {
648
- error: null,
649
- status: "pending"
650
- }
651
- };
652
- }
653
- function Ue(e) {
654
- const t = typeof e.initialData == "function" ? e.initialData() : e.initialData, s = t !== void 0, r = s ? typeof e.initialDataUpdatedAt == "function" ? e.initialDataUpdatedAt() : e.initialDataUpdatedAt : 0;
655
- return {
656
- data: t,
657
- dataUpdateCount: 0,
658
- dataUpdatedAt: s ? r ?? Date.now() : 0,
659
- error: null,
660
- errorUpdateCount: 0,
661
- errorUpdatedAt: 0,
662
- fetchFailureCount: 0,
663
- fetchFailureReason: null,
664
- fetchMeta: null,
665
- isInvalidated: !1,
666
- status: s ? "success" : "pending",
667
- fetchStatus: "idle"
668
- };
669
- }
670
- var pe = class extends $ {
671
- constructor(e, t) {
672
- super(), this.options = t, this.#t = e, this.#i = null, this.#a = H(), this.options.experimental_prefetchInRender || this.#a.reject(
673
- new Error("experimental_prefetchInRender feature flag is not enabled")
674
- ), this.bindMethods(), this.setOptions(t);
675
- }
676
- #t;
677
- #e = void 0;
678
- #s = void 0;
679
- #n = void 0;
680
- #r;
681
- #o;
682
- #a;
683
- #i;
684
- #y;
685
- #d;
686
- // This property keeps track of the last query with defined data.
687
- // It will be used to pass the previous data and query to the placeholder function between renders.
688
- #f;
689
- #c;
690
- #h;
691
- #u;
692
- #p = /* @__PURE__ */ new Set();
693
- bindMethods() {
694
- this.refetch = this.refetch.bind(this);
695
- }
696
- onSubscribe() {
697
- this.listeners.size === 1 && (this.#e.addObserver(this), se(this.#e, this.options) ? this.#l() : this.updateResult(), this.#g());
698
- }
699
- onUnsubscribe() {
700
- this.hasListeners() || this.destroy();
701
- }
702
- shouldFetchOnReconnect() {
703
- return K(
704
- this.#e,
705
- this.options,
706
- this.options.refetchOnReconnect
707
- );
708
- }
709
- shouldFetchOnWindowFocus() {
710
- return K(
711
- this.#e,
712
- this.options,
713
- this.options.refetchOnWindowFocus
714
- );
715
- }
716
- destroy() {
717
- this.listeners = /* @__PURE__ */ new Set(), this.#S(), this.#w(), this.#e.removeObserver(this);
718
- }
719
- setOptions(e) {
720
- const t = this.options, s = this.#e;
721
- if (this.options = this.#t.defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof w(this.options.enabled, this.#e) != "boolean")
722
- throw new Error(
723
- "Expected enabled to be a boolean or a callback that returns a boolean"
724
- );
725
- this.#O(), this.#e.setOptions(this.options), t._defaulted && !L(this.options, t) && this.#t.getQueryCache().notify({
726
- type: "observerOptionsUpdated",
727
- query: this.#e,
728
- observer: this
729
- });
730
- const r = this.hasListeners();
731
- r && re(
732
- this.#e,
733
- s,
734
- this.options,
735
- t
736
- ) && 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
- const n = this.#b();
738
- r && (this.#e !== s || w(this.options.enabled, this.#e) !== w(t.enabled, this.#e) || n !== this.#u) && this.#m(n);
739
- }
740
- getOptimisticResult(e) {
741
- const t = this.#t.getQueryCache().build(this.#t, e), s = this.createResult(t, e);
742
- return Ne(this, s) && (this.#n = s, this.#o = this.options, this.#r = this.#e.state), s;
743
- }
744
- getCurrentResult() {
745
- return this.#n;
746
- }
747
- trackResult(e, t) {
748
- const s = {};
749
- return Object.keys(e).forEach((r) => {
750
- Object.defineProperty(s, r, {
751
- configurable: !1,
752
- enumerable: !0,
753
- get: () => (this.trackProp(r), t?.(r), e[r])
754
- });
755
- }), s;
756
- }
757
- trackProp(e) {
758
- this.#p.add(e);
759
- }
760
- getCurrentQuery() {
761
- return this.#e;
762
- }
763
- refetch({ ...e } = {}) {
764
- return this.fetch({
765
- ...e
766
- });
767
- }
768
- fetchOptimistic(e) {
769
- const t = this.#t.defaultQueryOptions(e), s = this.#t.getQueryCache().build(this.#t, t);
770
- return s.fetch().then(() => this.createResult(s, t));
771
- }
772
- fetch(e) {
773
- return this.#l({
774
- ...e,
775
- cancelRefetch: e.cancelRefetch ?? !0
776
- }).then(() => (this.updateResult(), this.#n));
777
- }
778
- #l(e) {
779
- this.#O();
780
- let t = this.#e.fetch(
781
- this.options,
782
- e
783
- );
784
- return e?.throwOnError || (t = t.catch(q)), t;
785
- }
786
- #v() {
787
- this.#S();
788
- const e = k(
789
- this.options.staleTime,
790
- this.#e
791
- );
792
- if (C || this.#n.isStale || !U(e))
793
- return;
794
- const s = ue(this.#n.dataUpdatedAt, e) + 1;
795
- this.#c = setTimeout(() => {
796
- this.#n.isStale || this.updateResult();
797
- }, s);
798
- }
799
- #b() {
800
- return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#e) : this.options.refetchInterval) ?? !1;
801
- }
802
- #m(e) {
803
- this.#w(), this.#u = e, !(C || w(this.options.enabled, this.#e) === !1 || !U(this.#u) || this.#u === 0) && (this.#h = setInterval(() => {
804
- (this.options.refetchIntervalInBackground || ce.isFocused()) && this.#l();
805
- }, this.#u));
806
- }
807
- #g() {
808
- this.#v(), this.#m(this.#b());
809
- }
810
- #S() {
811
- this.#c && (clearTimeout(this.#c), this.#c = void 0);
812
- }
813
- #w() {
814
- this.#h && (clearInterval(this.#h), this.#h = void 0);
815
- }
816
- createResult(e, t) {
817
- const s = this.#e, r = this.options, n = this.#n, a = this.#r, o = this.#o, u = e !== s ? e.state : this.#s, { state: l } = e;
818
- let h = { ...l }, p = !1, d;
819
- if (t._optimisticResults) {
820
- const g = this.hasListeners(), T = !g && se(e, t), I = g && re(e, s, t, r);
821
- (T || I) && (h = {
822
- ...h,
823
- ...fe(l.data, e.options)
824
- }), t._optimisticResults === "isRestoring" && (h.fetchStatus = "idle");
825
- }
826
- let { error: b, errorUpdatedAt: R, status: c } = h;
827
- d = h.data;
828
- let m = !1;
829
- if (t.placeholderData !== void 0 && d === void 0 && c === "pending") {
830
- let g;
831
- n?.isPlaceholderData && t.placeholderData === o?.placeholderData ? (g = n.data, m = !0) : g = typeof t.placeholderData == "function" ? t.placeholderData(
832
- this.#f?.state.data,
833
- this.#f
834
- ) : t.placeholderData, g !== void 0 && (c = "success", d = _(
835
- n?.data,
836
- g,
837
- t
838
- ), p = !0);
839
- }
840
- if (t.select && d !== void 0 && !m)
841
- if (n && d === a?.data && t.select === this.#y)
842
- d = this.#d;
843
- else
844
- try {
845
- this.#y = t.select, d = t.select(d), d = _(n?.data, d, t), this.#d = d, this.#i = null;
846
- } catch (g) {
847
- this.#i = g;
848
- }
849
- this.#i && (b = this.#i, d = this.#d, R = Date.now(), c = "error");
850
- const v = h.fetchStatus === "fetching", f = c === "pending", y = c === "error", E = f && v, F = d !== void 0, O = {
851
- status: c,
852
- fetchStatus: h.fetchStatus,
853
- isPending: f,
854
- isSuccess: c === "success",
855
- isError: y,
856
- isInitialLoading: E,
857
- isLoading: E,
858
- data: d,
859
- dataUpdatedAt: h.dataUpdatedAt,
860
- error: b,
861
- errorUpdatedAt: R,
862
- failureCount: h.fetchFailureCount,
863
- failureReason: h.fetchFailureReason,
864
- errorUpdateCount: h.errorUpdateCount,
865
- isFetched: h.dataUpdateCount > 0 || h.errorUpdateCount > 0,
866
- isFetchedAfterMount: h.dataUpdateCount > u.dataUpdateCount || h.errorUpdateCount > u.errorUpdateCount,
867
- isFetching: v,
868
- isRefetching: v && !f,
869
- isLoadingError: y && !F,
870
- isPaused: h.fetchStatus === "paused",
871
- isPlaceholderData: p,
872
- isRefetchError: y && F,
873
- isStale: V(e, t),
874
- refetch: this.refetch,
875
- promise: this.#a
876
- };
877
- if (this.options.experimental_prefetchInRender) {
878
- const g = (D) => {
879
- O.status === "error" ? D.reject(O.error) : O.data !== void 0 && D.resolve(O.data);
880
- }, T = () => {
881
- const D = this.#a = O.promise = H();
882
- g(D);
883
- }, I = this.#a;
884
- switch (I.status) {
885
- case "pending":
886
- e.queryHash === s.queryHash && g(I);
887
- break;
888
- case "fulfilled":
889
- (O.status === "error" || O.data !== I.value) && T();
890
- break;
891
- case "rejected":
892
- (O.status !== "error" || O.error !== I.reason) && T();
893
- break;
894
- }
895
- }
896
- return O;
897
- }
898
- updateResult() {
899
- const e = this.#n, t = this.createResult(this.#e, this.options);
900
- if (this.#r = this.#e.state, this.#o = this.options, this.#r.data !== void 0 && (this.#f = this.#e), L(t, e))
901
- return;
902
- this.#n = t;
903
- const s = () => {
904
- if (!e)
905
- return !0;
906
- const { notifyOnChangeProps: r } = this.options, n = typeof r == "function" ? r() : r;
907
- if (n === "all" || !n && !this.#p.size)
908
- return !0;
909
- const a = new Set(
910
- n ?? this.#p
911
- );
912
- return this.options.throwOnError && a.add("error"), Object.keys(this.#n).some((o) => {
913
- const i = o;
914
- return this.#n[i] !== e[i] && a.has(i);
915
- });
916
- };
917
- this.#R({ listeners: s() });
918
- }
919
- #O() {
920
- const e = this.#t.getQueryCache().build(this.#t, this.options);
921
- if (e === this.#e)
922
- return;
923
- const t = this.#e;
924
- this.#e = e, this.#s = e.state, this.hasListeners() && (t?.removeObserver(this), e.addObserver(this));
925
- }
926
- onQueryUpdate() {
927
- this.updateResult(), this.hasListeners() && this.#g();
928
- }
929
- #R(e) {
930
- z.batch(() => {
931
- e.listeners && this.listeners.forEach((t) => {
932
- t(this.#n);
933
- }), this.#t.getQueryCache().notify({
934
- query: this.#e,
935
- type: "observerResultsUpdated"
936
- });
937
- });
938
- }
939
- };
940
- function Qe(e, t) {
941
- return w(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
942
- }
943
- function se(e, t) {
944
- return Qe(e, t) || e.state.data !== void 0 && K(e, t, t.refetchOnMount);
945
- }
946
- function K(e, t, s) {
947
- if (w(t.enabled, e) !== !1) {
948
- const r = typeof s == "function" ? s(e) : s;
949
- return r === "always" || r !== !1 && V(e, t);
950
- }
951
- return !1;
952
- }
953
- function re(e, t, s, r) {
954
- return (e !== t || w(r.enabled, e) === !1) && (!s.suspense || e.state.status !== "error") && V(e, s);
955
- }
956
- function V(e, t) {
957
- return w(t.enabled, e) !== !1 && e.isStaleByTime(k(t.staleTime, e));
958
- }
959
- function Ne(e, t) {
960
- return !L(e.getCurrentResult(), t);
961
- }
962
- var ye = S.createContext(
963
- void 0
964
- ), ve = (e) => {
965
- const t = S.useContext(ye);
966
- if (e)
967
- return e;
968
- if (!t)
969
- throw new Error("No QueryClient set, use QueryClientProvider to set one");
970
- return t;
971
- }, Et = ({
972
- client: e,
973
- children: t
974
- }) => (S.useEffect(() => (e.mount(), () => {
975
- e.unmount();
976
- }), [e]), /* @__PURE__ */ Ce.jsx(ye.Provider, { value: e, children: t })), be = S.createContext(!1), Le = () => S.useContext(be);
977
- be.Provider;
978
- function Me() {
979
- let e = !1;
980
- return {
981
- clearReset: () => {
982
- e = !1;
983
- },
984
- reset: () => {
985
- e = !0;
986
- },
987
- isReset: () => e
988
- };
989
- }
990
- var _e = S.createContext(Me()), He = () => S.useContext(_e);
991
- function Ke(e, t) {
992
- return typeof e == "function" ? e(...t) : !!e;
993
- }
994
- function ne() {
995
- }
996
- var Be = (e, t) => {
997
- (e.suspense || e.throwOnError || e.experimental_prefetchInRender) && (t.isReset() || (e.retryOnMount = !1));
998
- }, $e = (e) => {
999
- S.useEffect(() => {
1000
- e.clearReset();
1001
- }, [e]);
1002
- }, Ge = ({
1003
- result: e,
1004
- errorResetBoundary: t,
1005
- throwOnError: s,
1006
- query: r,
1007
- suspense: n
1008
- }) => e.isError && !t.isReset() && !e.isFetching && r && (n && e.data === void 0 || Ke(s, [e.error, r])), ze = (e, t) => t.state.data === void 0, Ve = (e) => {
1009
- const t = e.staleTime;
1010
- e.suspense && (e.staleTime = typeof t == "function" ? (...s) => Math.max(t(...s), 1e3) : Math.max(t ?? 1e3, 1e3), typeof e.gcTime == "number" && (e.gcTime = Math.max(e.gcTime, 1e3)));
1011
- }, Je = (e, t) => e.isLoading && e.isFetching && !t, Ze = (e, t) => e?.suspense && t.isPending, ie = (e, t, s) => t.fetchOptimistic(e).catch(() => {
1012
- s.clearReset();
1013
- });
1014
- function me(e, t, s) {
1015
- if (process.env.NODE_ENV !== "production" && (typeof e != "object" || Array.isArray(e)))
1016
- throw new Error(
1017
- 'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
1018
- );
1019
- const r = ve(s), n = Le(), a = He(), o = r.defaultQueryOptions(e);
1020
- r.getDefaultOptions().queries?._experimental_beforeQuery?.(
1021
- o
1022
- ), process.env.NODE_ENV !== "production" && (o.queryFn || console.error(
1023
- `[${o.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`
1024
- )), o._optimisticResults = n ? "isRestoring" : "optimistic", Ve(o), Be(o, a), $e(a);
1025
- const i = !r.getQueryCache().get(o.queryHash), [u] = S.useState(
1026
- () => new t(
1027
- r,
1028
- o
1029
- )
1030
- ), l = u.getOptimisticResult(o), h = !n && e.subscribed !== !1;
1031
- if (S.useSyncExternalStore(
1032
- S.useCallback(
1033
- (p) => {
1034
- const d = h ? u.subscribe(z.batchCalls(p)) : ne;
1035
- return u.updateResult(), d;
1036
- },
1037
- [u, h]
1038
- ),
1039
- () => u.getCurrentResult(),
1040
- () => u.getCurrentResult()
1041
- ), S.useEffect(() => {
1042
- u.setOptions(o);
1043
- }, [o, u]), Ze(o, l))
1044
- throw ie(o, u, a);
1045
- if (Ge({
1046
- result: l,
1047
- errorResetBoundary: a,
1048
- throwOnError: o.throwOnError,
1049
- query: r.getQueryCache().get(o.queryHash),
1050
- suspense: o.suspense
1051
- }))
1052
- throw l.error;
1053
- return r.getDefaultOptions().queries?._experimental_afterQuery?.(
1054
- o,
1055
- l
1056
- ), o.experimental_prefetchInRender && !C && Je(l, n) && (i ? (
1057
- // Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
1058
- ie(o, u, a)
1059
- ) : (
1060
- // subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
1061
- r.getQueryCache().get(o.queryHash)?.promise
1062
- ))?.catch(ne).finally(() => {
1063
- u.updateResult();
1064
- }), o.notifyOnChangeProps ? l : u.trackResult(l);
1065
- }
1066
- function We(e, t) {
1067
- return me(e, pe, t);
1068
- }
1069
- function Ye(e, t) {
1070
- return process.env.NODE_ENV !== "production" && e.queryFn === j && console.error("skipToken is not allowed for useSuspenseQuery"), me(
1071
- {
1072
- ...e,
1073
- enabled: !0,
1074
- suspense: !0,
1075
- throwOnError: ze,
1076
- placeholderData: void 0
1077
- },
1078
- pe,
1079
- t
1080
- );
1081
- }
1082
- const Xe = /^(\w+:\/\/[^/?]+)?([^?]*)(\?.*)?$/, et = (e) => e.filter(
1083
- (t) => t != null && t !== !1 && (typeof t == "string" || typeof t == "number")
1084
- ).map((t) => `${t}`).filter((t) => t), tt = (e) => {
1085
- const t = e.join("/"), [, s = "", r = ""] = t.match(Xe) ?? [];
1086
- return {
1087
- prefix: s,
1088
- pathname: r.split("/").filter((n) => n !== "")
1089
- };
1090
- }, st = (e) => {
1091
- const { prefix: t, pathname: s } = e;
1092
- let r = t;
1093
- return s.length > 0 ? (r ? r += "/" : r = "/", r += s.join("/")) : r || (r = "/"), r;
1094
- }, ae = (...e) => {
1095
- const t = et(e), s = tt(t);
1096
- return st(s);
1097
- }, ge = Object.freeze({
1098
- API_IDENTITIES: ["api-identities"]
1099
- }), Ct = () => {
1100
- const e = ve();
1101
- return {
1102
- invalidateCache: async (t) => {
1103
- await e.invalidateQueries({ queryKey: ge[t] });
1104
- }
1105
- };
1106
- }, Ft = "no-dehydrate", P = (...e) => {
1107
- const t = e.filter((s) => !!s).map((s) => s.replace(/(^\/+|\/+$)/g, "")).join("/").replace(/(^\/+|\/+$)/g, "");
1108
- return t ? `/${t}` : "/";
1109
- }, J = (e, t) => {
1110
- for (const s of e) {
1111
- const r = Z(s, t);
1112
- if (r !== void 0) return r;
1113
- }
1114
- }, Z = (e, t, s = []) => {
1115
- const r = t(e, s);
1116
- if (r !== void 0) return r;
1117
- if (e.type === "category")
1118
- for (const n of e.items) {
1119
- const a = Z(n, t, [
1120
- ...s,
1121
- e
1122
- ]);
1123
- if (a !== void 0) return a;
1124
- }
1125
- }, It = () => {
1126
- const e = x(), s = Se().sidebar;
1127
- return J(s, (r) => {
1128
- if (r.type === "doc" && P(r.id) === e.pathname)
1129
- return r;
1130
- });
1131
- }, Pt = (e) => {
1132
- const t = x();
1133
- return Z(e, (s) => {
1134
- if (s.type === "category" && s.link && P(s.link.id) === t.pathname || s.type === "doc" && P(s.id) === t.pathname)
1135
- return !0;
1136
- });
1137
- }, Tt = () => {
1138
- const e = x().pathname, s = Se().sidebar;
1139
- let r, n, a = !1;
1140
- return J(s, (o) => {
1141
- const i = o.type === "doc" ? P(o.id) : o.type === "category" && o.link ? P(o.link.id) : void 0;
1142
- if (i) {
1143
- if (a)
1144
- return n = { label: o.label, id: i }, !0;
1145
- e === i ? a = !0 : r = { label: o.label, id: i };
1146
- }
1147
- }), { prev: r, next: n };
1148
- }, Dt = (e) => (t) => t.display === "hide" ? !1 : t.display === "auth" && e || t.display === "anon" && !e || !t.display || t.display === "always", rt = Re(
1149
- void 0
1150
- ), W = () => {
1151
- const e = Ee(rt);
1152
- if (!e)
1153
- throw new Error("useZudoku must be used within a ZudokuProvider.");
1154
- return e;
1155
- }, kt = () => {
1156
- const { getApiIdentities: e } = W();
1157
- return We({
1158
- queryFn: e,
1159
- queryKey: ge.API_IDENTITIES
1160
- });
1161
- }, Se = () => {
1162
- const { getPluginSidebar: e, sidebars: t, topNavigation: s, options: r } = W(), n = x(), a = dt(), o = r.protectedRoutes?.some(
1163
- (p) => X(p, n.pathname)
1164
- );
1165
- let i = Object.entries(t).find(([, p]) => J(p, (d) => {
1166
- if ((d.type === "doc" ? ae(d.id) : d.type === "category" && d.link ? ae(d.link.id) : void 0) === n.pathname)
1167
- return d;
1168
- }));
1169
- const u = s.find((p) => p.id === i?.[0]) ?? s.find((p) => X(p.id, n.pathname));
1170
- u && !i && u.id in t && (i = ["", t[u.id]]);
1171
- const { data: l } = Ye({
1172
- queryFn: () => e(n.pathname),
1173
- queryKey: ["plugin-sidebar", n.pathname]
1174
- });
1175
- return {
1176
- sidebar: a.isAuthEnabled && !a.isAuthenticated && o ? [] : [...i ? i[1] : [], ...l],
1177
- topNavItem: u
1178
- };
1179
- }, oe = (e) => {
1180
- let t;
1181
- const s = /* @__PURE__ */ new Set(), r = (l, h) => {
1182
- const p = typeof l == "function" ? l(t) : l;
1183
- if (!Object.is(p, t)) {
1184
- const d = t;
1185
- t = h ?? (typeof p != "object" || p === null) ? p : Object.assign({}, t, p), s.forEach((b) => b(t, d));
1186
- }
1187
- }, n = () => t, i = { setState: r, getState: n, getInitialState: () => u, subscribe: (l) => (s.add(l), () => s.delete(l)) }, u = t = e(r, n, i);
1188
- return i;
1189
- }, nt = (e) => e ? oe(e) : oe, it = (e) => e;
1190
- function at(e, t = it) {
1191
- const s = Y.useSyncExternalStore(
1192
- e.subscribe,
1193
- () => t(e.getState()),
1194
- () => t(e.getInitialState())
1195
- );
1196
- return Y.useDebugValue(s), s;
1197
- }
1198
- const ot = (e) => {
1199
- const t = nt(e), s = (r) => at(t, r);
1200
- return Object.assign(s, t), s;
1201
- }, ut = (e) => ot;
1202
- function we(e, t) {
1203
- let s;
1204
- try {
1205
- s = e();
1206
- } catch {
1207
- return;
1208
- }
1209
- return {
1210
- getItem: (n) => {
1211
- var a;
1212
- const o = (u) => u === null ? null : JSON.parse(u, void 0), i = (a = s.getItem(n)) != null ? a : null;
1213
- return i instanceof Promise ? i.then(o) : o(i);
1214
- },
1215
- setItem: (n, a) => s.setItem(
1216
- n,
1217
- JSON.stringify(a, void 0)
1218
- ),
1219
- removeItem: (n) => s.removeItem(n)
1220
- };
1221
- }
1222
- const B = (e) => (t) => {
1223
- try {
1224
- const s = e(t);
1225
- return s instanceof Promise ? s : {
1226
- then(r) {
1227
- return B(r)(s);
1228
- },
1229
- catch(r) {
1230
- return this;
1231
- }
1232
- };
1233
- } catch (s) {
1234
- return {
1235
- then(r) {
1236
- return this;
1237
- },
1238
- catch(r) {
1239
- return B(r)(s);
1240
- }
1241
- };
1242
- }
1243
- }, ct = (e, t) => (s, r, n) => {
1244
- let a = {
1245
- storage: we(() => localStorage),
1246
- partialize: (c) => c,
1247
- version: 0,
1248
- merge: (c, m) => ({
1249
- ...m,
1250
- ...c
1251
- }),
1252
- ...t
1253
- }, o = !1;
1254
- const i = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set();
1255
- let l = a.storage;
1256
- if (!l)
1257
- return e(
1258
- (...c) => {
1259
- console.warn(
1260
- `[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`
1261
- ), s(...c);
1262
- },
1263
- r,
1264
- n
1265
- );
1266
- const h = () => {
1267
- const c = a.partialize({ ...r() });
1268
- return l.setItem(a.name, {
1269
- state: c,
1270
- version: a.version
1271
- });
1272
- }, p = n.setState;
1273
- n.setState = (c, m) => {
1274
- p(c, m), h();
1275
- };
1276
- const d = e(
1277
- (...c) => {
1278
- s(...c), h();
1279
- },
1280
- r,
1281
- n
1282
- );
1283
- n.getInitialState = () => d;
1284
- let b;
1285
- const R = () => {
1286
- var c, m;
1287
- if (!l) return;
1288
- o = !1, i.forEach((f) => {
1289
- var y;
1290
- return f((y = r()) != null ? y : d);
1291
- });
1292
- const v = ((m = a.onRehydrateStorage) == null ? void 0 : m.call(a, (c = r()) != null ? c : d)) || void 0;
1293
- return B(l.getItem.bind(l))(a.name).then((f) => {
1294
- if (f)
1295
- if (typeof f.version == "number" && f.version !== a.version) {
1296
- if (a.migrate) {
1297
- const y = a.migrate(
1298
- f.state,
1299
- f.version
1300
- );
1301
- return y instanceof Promise ? y.then((E) => [!0, E]) : [!0, y];
1302
- }
1303
- console.error(
1304
- "State loaded from storage couldn't be migrated since no migrate function was provided"
1305
- );
1306
- } else
1307
- return [!1, f.state];
1308
- return [!1, void 0];
1309
- }).then((f) => {
1310
- var y;
1311
- const [E, F] = f;
1312
- if (b = a.merge(
1313
- F,
1314
- (y = r()) != null ? y : d
1315
- ), s(b, !0), E)
1316
- return h();
1317
- }).then(() => {
1318
- v?.(b, void 0), b = r(), o = !0, u.forEach((f) => f(b));
1319
- }).catch((f) => {
1320
- v?.(void 0, f);
1321
- });
1322
- };
1323
- return n.persist = {
1324
- setOptions: (c) => {
1325
- a = {
1326
- ...a,
1327
- ...c
1328
- }, c.storage && (l = c.storage);
1329
- },
1330
- clearStorage: () => {
1331
- l?.removeItem(a.name);
1332
- },
1333
- getOptions: () => a,
1334
- rehydrate: () => R(),
1335
- hasHydrated: () => o,
1336
- onHydrate: (c) => (i.add(c), () => {
1337
- i.delete(c);
1338
- }),
1339
- onFinishHydration: (c) => (u.add(c), () => {
1340
- u.delete(c);
1341
- })
1342
- }, a.skipHydration || R(), b || d;
1343
- }, ht = ct, lt = (e) => {
1344
- const t = (s) => {
1345
- s.key === e.persist.getOptions().name && s.newValue && e.persist.rehydrate();
1346
- };
1347
- return window.addEventListener("storage", t), () => {
1348
- window.removeEventListener("storage", t);
1349
- };
1350
- }, Oe = ut()(
1351
- ht(
1352
- (e) => ({
1353
- isAuthenticated: !1,
1354
- isPending: !0,
1355
- profile: null,
1356
- providerData: null
1357
- }),
1358
- {
1359
- merge: (e, t) => ({
1360
- ...t,
1361
- isPending: !1,
1362
- ...typeof e == "object" ? e : {}
1363
- }),
1364
- name: "auth-state",
1365
- storage: we(() => localStorage)
1366
- }
1367
- )
1368
- );
1369
- typeof window < "u" && lt(Oe);
1370
- const dt = () => {
1371
- const { authentication: e } = W(), t = Oe(), s = typeof e < "u";
1372
- return {
1373
- isAuthEnabled: s,
1374
- ...t,
1375
- login: async () => {
1376
- if (!s)
1377
- throw new Error("Authentication is not enabled.");
1378
- await e.signIn({
1379
- redirectTo: window.location.href
1380
- });
1381
- },
1382
- logout: async () => {
1383
- if (!s)
1384
- throw new Error("Authentication is not enabled.");
1385
- await e.signOut(), window.location.href = "/";
1386
- },
1387
- signup: async () => {
1388
- if (!s)
1389
- throw new Error("Authentication is not enabled.");
1390
- await e.signUp({
1391
- redirectTo: window.location.href
1392
- });
1393
- }
1394
- };
1395
- };
1396
- export {
1397
- ce as A,
1398
- he as B,
1399
- k as C,
1400
- bt as D,
1401
- G as E,
1402
- j as F,
1403
- Et as G,
1404
- Dt as H,
1405
- Se as I,
1406
- J,
1407
- Ct as K,
1408
- ge as L,
1409
- ut as M,
1410
- Ft as N,
1411
- ht as O,
1412
- we as P,
1413
- Rt as Q,
1414
- qe as R,
1415
- $ as S,
1416
- kt as T,
1417
- Pt as U,
1418
- rt as Z,
1419
- It as a,
1420
- Tt as b,
1421
- je as c,
1422
- Ye as d,
1423
- W as e,
1424
- ve as f,
1425
- ne as g,
1426
- Q as h,
1427
- Ke as i,
1428
- P as j,
1429
- ae as k,
1430
- dt as l,
1431
- We as m,
1432
- z as n,
1433
- St as o,
1434
- nt as p,
1435
- at as q,
1436
- Fe as r,
1437
- L as s,
1438
- mt as t,
1439
- Oe as u,
1440
- gt as v,
1441
- q as w,
1442
- Pe as x,
1443
- Ot as y,
1444
- wt as z
1445
- };
1446
- //# sourceMappingURL=hook-BpiAQVtd.js.map