zudoku 0.0.0-f90a252 → 0.0.0-f9211eb

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 (735) hide show
  1. package/README.md +1 -1
  2. package/cli.js +3 -0
  3. package/dist/app/entry.client.d.ts +5 -0
  4. package/dist/app/entry.client.js +1 -0
  5. package/dist/app/entry.client.js.map +1 -1
  6. package/dist/app/entry.server.d.ts +8 -6
  7. package/dist/app/entry.server.js +12 -8
  8. package/dist/app/entry.server.js.map +1 -1
  9. package/dist/app/main.js +3 -1
  10. package/dist/app/main.js.map +1 -1
  11. package/dist/app/tailwind.js +20 -0
  12. package/dist/app/tailwind.js.map +1 -1
  13. package/dist/cli/build/handler.d.ts +1 -3
  14. package/dist/cli/build/handler.js +9 -1
  15. package/dist/cli/build/handler.js.map +1 -1
  16. package/dist/cli/cli.js +5 -0
  17. package/dist/cli/cli.js.map +1 -1
  18. package/dist/cli/cmds/build.d.ts +11 -3
  19. package/dist/cli/cmds/build.js +20 -13
  20. package/dist/cli/cmds/build.js.map +1 -1
  21. package/dist/cli/cmds/dev.d.ts +1 -1
  22. package/dist/cli/cmds/dev.js.map +1 -1
  23. package/dist/cli/cmds/preview.d.ts +16 -0
  24. package/dist/cli/cmds/preview.js +25 -0
  25. package/dist/cli/cmds/preview.js.map +1 -0
  26. package/dist/cli/dev/handler.js +2 -1
  27. package/dist/cli/dev/handler.js.map +1 -1
  28. package/dist/cli/preview/handler.d.ts +3 -0
  29. package/dist/cli/preview/handler.js +35 -0
  30. package/dist/cli/preview/handler.js.map +1 -0
  31. package/dist/config/common.d.ts +5 -3
  32. package/dist/config/config.d.ts +15 -15
  33. package/dist/config/loader.d.ts +6 -6
  34. package/dist/config/loader.js +20 -28
  35. package/dist/config/loader.js.map +1 -1
  36. package/dist/config/validators/InputSidebarSchema.d.ts +15 -15
  37. package/dist/config/validators/InputSidebarSchema.js +10 -1
  38. package/dist/config/validators/InputSidebarSchema.js.map +1 -1
  39. package/dist/config/validators/common.d.ts +2993 -599
  40. package/dist/config/validators/common.js +107 -12
  41. package/dist/config/validators/common.js.map +1 -1
  42. package/dist/config/validators/icon-types.d.ts +1 -1
  43. package/dist/config/validators/validate.d.ts +1127 -284
  44. package/dist/index.d.ts +1 -0
  45. package/dist/index.js +1 -0
  46. package/dist/index.js.map +1 -1
  47. package/dist/lib/authentication/authentication.d.ts +1 -0
  48. package/dist/lib/authentication/hook.d.ts +1 -0
  49. package/dist/lib/authentication/hook.js +11 -1
  50. package/dist/lib/authentication/hook.js.map +1 -1
  51. package/dist/lib/authentication/providers/auth0.d.ts +2 -2
  52. package/dist/lib/authentication/providers/auth0.js +1 -0
  53. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  54. package/dist/lib/authentication/providers/clerk.d.ts +2 -2
  55. package/dist/lib/authentication/providers/clerk.js +25 -6
  56. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  57. package/dist/lib/authentication/providers/openid.d.ts +5 -3
  58. package/dist/lib/authentication/providers/openid.js +24 -10
  59. package/dist/lib/authentication/providers/openid.js.map +1 -1
  60. package/dist/lib/authentication/providers/supabase.d.ts +4 -0
  61. package/dist/lib/authentication/providers/supabase.js +117 -0
  62. package/dist/lib/authentication/providers/supabase.js.map +1 -0
  63. package/dist/lib/authentication/state.d.ts +0 -26
  64. package/dist/lib/authentication/state.js +9 -18
  65. package/dist/lib/authentication/state.js.map +1 -1
  66. package/dist/lib/components/AnchorLink.d.ts +2 -2
  67. package/dist/lib/components/AnchorLink.js +5 -4
  68. package/dist/lib/components/AnchorLink.js.map +1 -1
  69. package/dist/lib/components/Banner.js +1 -1
  70. package/dist/lib/components/Banner.js.map +1 -1
  71. package/dist/lib/components/Bootstrap.d.ts +2 -1
  72. package/dist/lib/components/Bootstrap.js +3 -2
  73. package/dist/lib/components/Bootstrap.js.map +1 -1
  74. package/dist/lib/components/Footer.d.ts +1 -0
  75. package/dist/lib/components/Footer.js +32 -0
  76. package/dist/lib/components/Footer.js.map +1 -0
  77. package/dist/lib/components/Header.js +4 -4
  78. package/dist/lib/components/Header.js.map +1 -1
  79. package/dist/lib/components/Heading.d.ts +2 -2
  80. package/dist/lib/components/InlineCode.d.ts +2 -1
  81. package/dist/lib/components/InlineCode.js +2 -9
  82. package/dist/lib/components/InlineCode.js.map +1 -1
  83. package/dist/lib/components/Layout.js +8 -29
  84. package/dist/lib/components/Layout.js.map +1 -1
  85. package/dist/lib/components/Main.d.ts +2 -0
  86. package/dist/lib/components/Main.js +17 -0
  87. package/dist/lib/components/Main.js.map +1 -0
  88. package/dist/lib/components/MobileTopNavigation.js +6 -3
  89. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  90. package/dist/lib/components/Pagination.d.ts +11 -0
  91. package/dist/lib/components/Pagination.js +10 -0
  92. package/dist/lib/components/Pagination.js.map +1 -0
  93. package/dist/lib/components/ThemeSwitch.js +1 -1
  94. package/dist/lib/components/ThemeSwitch.js.map +1 -1
  95. package/dist/lib/components/TopNavigation.d.ts +3 -2
  96. package/dist/lib/components/TopNavigation.js +28 -14
  97. package/dist/lib/components/TopNavigation.js.map +1 -1
  98. package/dist/lib/components/Zudoku.d.ts +1 -1
  99. package/dist/lib/components/Zudoku.js +15 -8
  100. package/dist/lib/components/Zudoku.js.map +1 -1
  101. package/dist/lib/components/cache.d.ts +7 -0
  102. package/dist/lib/components/cache.js +7 -0
  103. package/dist/lib/components/cache.js.map +1 -1
  104. package/dist/lib/components/context/BypassProtectedRoutesContext.d.ts +1 -0
  105. package/dist/lib/components/context/BypassProtectedRoutesContext.js +3 -0
  106. package/dist/lib/components/context/BypassProtectedRoutesContext.js.map +1 -0
  107. package/dist/lib/components/context/RouterEventsEmitter.d.ts +1 -0
  108. package/dist/lib/components/context/RouterEventsEmitter.js +17 -0
  109. package/dist/lib/components/context/RouterEventsEmitter.js.map +1 -0
  110. package/dist/lib/components/context/ViewportAnchorContext.d.ts +2 -4
  111. package/dist/lib/components/context/ViewportAnchorContext.js +5 -10
  112. package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
  113. package/dist/lib/components/context/ZudokuContext.d.ts +2 -2
  114. package/dist/lib/components/context/ZudokuContext.js +13 -7
  115. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  116. package/dist/lib/components/index.d.ts +7 -3
  117. package/dist/lib/components/index.js +2 -0
  118. package/dist/lib/components/index.js.map +1 -1
  119. package/dist/lib/components/navigation/PoweredByZudoku.d.ts +3 -0
  120. package/dist/lib/components/navigation/PoweredByZudoku.js +6 -0
  121. package/dist/lib/components/navigation/PoweredByZudoku.js.map +1 -0
  122. package/dist/lib/components/navigation/Sidebar.d.ts +3 -1
  123. package/dist/lib/components/navigation/Sidebar.js +1 -12
  124. package/dist/lib/components/navigation/Sidebar.js.map +1 -1
  125. package/dist/lib/components/navigation/SidebarBadge.d.ts +2 -0
  126. package/dist/lib/components/navigation/SidebarBadge.js +3 -1
  127. package/dist/lib/components/navigation/SidebarBadge.js.map +1 -1
  128. package/dist/lib/components/navigation/SidebarCategory.d.ts +2 -2
  129. package/dist/lib/components/navigation/SidebarCategory.js +10 -6
  130. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  131. package/dist/lib/components/navigation/SidebarItem.d.ts +1 -0
  132. package/dist/lib/components/navigation/SidebarItem.js +17 -11
  133. package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
  134. package/dist/lib/components/navigation/SidebarWrapper.d.ts +7 -6
  135. package/dist/lib/components/navigation/SidebarWrapper.js +18 -3
  136. package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
  137. package/dist/lib/{plugins/markdown → components/navigation}/Toc.js +5 -7
  138. package/dist/lib/components/navigation/Toc.js.map +1 -0
  139. package/dist/lib/components/navigation/ZudokuLogo.d.ts +6 -0
  140. package/dist/lib/components/navigation/ZudokuLogo.js +5 -0
  141. package/dist/lib/components/navigation/ZudokuLogo.js.map +1 -0
  142. package/dist/lib/core/RouteGuard.d.ts +2 -1
  143. package/dist/lib/core/RouteGuard.js +31 -11
  144. package/dist/lib/core/RouteGuard.js.map +1 -1
  145. package/dist/lib/core/ZudokuContext.d.ts +32 -6
  146. package/dist/lib/core/ZudokuContext.js +29 -6
  147. package/dist/lib/core/ZudokuContext.js.map +1 -1
  148. package/dist/lib/core/plugins.d.ts +15 -7
  149. package/dist/lib/core/plugins.js +1 -0
  150. package/dist/lib/core/plugins.js.map +1 -1
  151. package/dist/lib/errors/ErrorAlert.js +6 -1
  152. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  153. package/dist/lib/hooks/index.d.ts +3 -0
  154. package/dist/lib/hooks/index.js +5 -0
  155. package/dist/lib/hooks/index.js.map +1 -0
  156. package/dist/lib/hooks/useEvent.d.ts +11 -0
  157. package/dist/lib/hooks/useEvent.js +19 -0
  158. package/dist/lib/hooks/useEvent.js.map +1 -0
  159. package/dist/lib/hooks/useEvent.test.js +100 -0
  160. package/dist/lib/hooks/useEvent.test.js.map +1 -0
  161. package/dist/lib/oas/graphql/index.d.ts +17 -4
  162. package/dist/lib/oas/graphql/index.js +151 -39
  163. package/dist/lib/oas/graphql/index.js.map +1 -1
  164. package/dist/lib/oas/parser/dereference/index.js +2 -0
  165. package/dist/lib/oas/parser/dereference/index.js.map +1 -1
  166. package/dist/lib/oas/parser/index.d.ts +5 -3
  167. package/dist/lib/oas/parser/index.js +0 -22
  168. package/dist/lib/oas/parser/index.js.map +1 -1
  169. package/dist/lib/plugins/api-catalog/Catalog.d.ts +4 -2
  170. package/dist/lib/plugins/api-catalog/Catalog.js +16 -26
  171. package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -1
  172. package/dist/lib/plugins/api-catalog/index.d.ts +1 -0
  173. package/dist/lib/plugins/api-catalog/index.js +39 -8
  174. package/dist/lib/plugins/api-catalog/index.js.map +1 -1
  175. package/dist/lib/plugins/api-keys/CreateApiKey.js +7 -3
  176. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
  177. package/dist/lib/plugins/markdown/MdxPage.d.ts +1 -1
  178. package/dist/lib/plugins/markdown/MdxPage.js +3 -9
  179. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  180. package/dist/lib/plugins/openapi/ColorizedParam.js +1 -1
  181. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  182. package/dist/lib/plugins/openapi/Endpoint.js +1 -1
  183. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  184. package/dist/lib/plugins/openapi/OperationList.d.ts +2 -2
  185. package/dist/lib/plugins/openapi/OperationList.js +63 -18
  186. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  187. package/dist/lib/plugins/openapi/OperationListItem.d.ts +1 -1
  188. package/dist/lib/plugins/openapi/OperationListItem.js +7 -12
  189. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  190. package/dist/lib/plugins/openapi/ParamInfos.d.ts +6 -0
  191. package/dist/lib/plugins/openapi/ParamInfos.js +42 -0
  192. package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -0
  193. package/dist/lib/plugins/openapi/ParameterList.d.ts +2 -1
  194. package/dist/lib/plugins/openapi/ParameterList.js +3 -2
  195. package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
  196. package/dist/lib/plugins/openapi/ParameterListItem.js +9 -4
  197. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  198. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +3 -1
  199. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
  200. package/dist/lib/plugins/openapi/SchemaList.d.ts +1 -0
  201. package/dist/lib/plugins/openapi/SchemaList.js +52 -0
  202. package/dist/lib/plugins/openapi/SchemaList.js.map +1 -0
  203. package/dist/lib/plugins/openapi/Sidecar.js +39 -10
  204. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  205. package/dist/lib/plugins/openapi/SidecarExamples.js +2 -2
  206. package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
  207. package/dist/lib/plugins/openapi/SimpleSelect.js +1 -1
  208. package/dist/lib/plugins/openapi/SimpleSelect.js.map +1 -1
  209. package/dist/lib/plugins/openapi/client/GraphQLClient.d.ts +1 -1
  210. package/dist/lib/plugins/openapi/client/GraphQLClient.js +1 -1
  211. package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -1
  212. package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +6 -2
  213. package/dist/lib/plugins/openapi/client/useCreateQuery.js +6 -5
  214. package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
  215. package/dist/lib/plugins/openapi/components/EnumValues.d.ts +5 -0
  216. package/dist/lib/plugins/openapi/components/EnumValues.js +15 -0
  217. package/dist/lib/plugins/openapi/components/EnumValues.js.map +1 -0
  218. package/dist/lib/plugins/openapi/components/SelectOnClick.d.ts +5 -0
  219. package/dist/lib/plugins/openapi/components/SelectOnClick.js +16 -0
  220. package/dist/lib/plugins/openapi/components/SelectOnClick.js.map +1 -0
  221. package/dist/lib/plugins/openapi/graphql/gql.d.ts +9 -5
  222. package/dist/lib/plugins/openapi/graphql/gql.js +5 -15
  223. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  224. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +108 -55
  225. package/dist/lib/plugins/openapi/graphql/graphql.js +59 -34
  226. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  227. package/dist/lib/plugins/openapi/index.d.ts +6 -11
  228. package/dist/lib/plugins/openapi/index.js +41 -60
  229. package/dist/lib/plugins/openapi/index.js.map +1 -1
  230. package/dist/lib/plugins/openapi/interfaces.d.ts +36 -10
  231. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +2 -2
  232. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +1 -5
  233. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
  234. package/dist/lib/plugins/openapi/playground/Headers.js +1 -1
  235. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  236. package/dist/lib/plugins/openapi/playground/IdentityDialog.d.ts +11 -0
  237. package/dist/lib/plugins/openapi/playground/IdentityDialog.js +14 -0
  238. package/dist/lib/plugins/openapi/playground/IdentityDialog.js.map +1 -0
  239. package/dist/lib/plugins/openapi/playground/IdentitySelector.d.ts +7 -0
  240. package/dist/lib/plugins/openapi/playground/IdentitySelector.js +10 -0
  241. package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -0
  242. package/dist/lib/plugins/openapi/playground/PathParams.d.ts +3 -2
  243. package/dist/lib/plugins/openapi/playground/PathParams.js +3 -2
  244. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  245. package/dist/lib/plugins/openapi/playground/Playground.d.ts +13 -2
  246. package/dist/lib/plugins/openapi/playground/Playground.js +81 -27
  247. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  248. package/dist/lib/plugins/openapi/playground/QueryParams.js +1 -1
  249. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  250. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.d.ts +7 -0
  251. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js +8 -0
  252. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js.map +1 -0
  253. package/dist/lib/plugins/openapi/playground/rememberedIdentity.d.ts +17 -0
  254. package/dist/lib/plugins/openapi/playground/rememberedIdentity.js +11 -0
  255. package/dist/lib/plugins/openapi/playground/rememberedIdentity.js.map +1 -0
  256. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +20 -14
  257. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
  258. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +6 -4
  259. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +4 -3
  260. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
  261. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.d.ts +1 -2
  262. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js +2 -2
  263. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js.map +1 -1
  264. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.d.ts +2 -1
  265. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js +2 -2
  266. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js.map +1 -1
  267. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.d.ts +0 -1
  268. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js +1 -1
  269. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js.map +1 -1
  270. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.d.ts +4 -0
  271. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +12 -0
  272. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -0
  273. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.d.ts +2 -4
  274. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +18 -13
  275. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
  276. package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +1 -2
  277. package/dist/lib/plugins/openapi/schema/SchemaView.js +33 -48
  278. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  279. package/dist/lib/plugins/openapi/schema/utils.d.ts +1 -0
  280. package/dist/lib/plugins/openapi/schema/utils.js +3 -1
  281. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  282. package/dist/lib/plugins/openapi/state.d.ts +25 -0
  283. package/dist/lib/plugins/openapi/state.js +18 -0
  284. package/dist/lib/plugins/openapi/state.js.map +1 -0
  285. package/dist/lib/plugins/openapi/util/createSidebarCategory.js +5 -7
  286. package/dist/lib/plugins/openapi/util/createSidebarCategory.js.map +1 -1
  287. package/dist/lib/plugins/openapi/util/getRoutes.js +9 -3
  288. package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
  289. package/dist/lib/plugins/search-pagefind/PagefindSearch.d.ts +6 -0
  290. package/dist/lib/plugins/search-pagefind/PagefindSearch.js +80 -0
  291. package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -0
  292. package/dist/lib/plugins/search-pagefind/ResultList.d.ts +8 -0
  293. package/dist/lib/plugins/search-pagefind/ResultList.js +32 -0
  294. package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -0
  295. package/dist/lib/plugins/search-pagefind/get-results.d.ts +10 -0
  296. package/dist/lib/plugins/search-pagefind/get-results.js +42 -0
  297. package/dist/lib/plugins/search-pagefind/get-results.js.map +1 -0
  298. package/dist/lib/plugins/search-pagefind/index.d.ts +6 -0
  299. package/dist/lib/plugins/search-pagefind/index.js +9 -0
  300. package/dist/lib/plugins/search-pagefind/index.js.map +1 -0
  301. package/dist/lib/plugins/search-pagefind/types.d.ts +85 -0
  302. package/dist/lib/plugins/search-pagefind/types.js +2 -0
  303. package/dist/lib/plugins/search-pagefind/types.js.map +1 -0
  304. package/dist/lib/ui/Badge.d.ts +1 -1
  305. package/dist/lib/ui/Button.d.ts +2 -2
  306. package/dist/lib/ui/Button.js +2 -1
  307. package/dist/lib/ui/Button.js.map +1 -1
  308. package/dist/lib/ui/Callout.d.ts +2 -1
  309. package/dist/lib/ui/Callout.js +3 -2
  310. package/dist/lib/ui/Callout.js.map +1 -1
  311. package/dist/lib/ui/Checkbox.d.ts +2 -8
  312. package/dist/lib/ui/Checkbox.js +1 -13
  313. package/dist/lib/ui/Checkbox.js.map +1 -1
  314. package/dist/lib/ui/Command.d.ts +7 -1
  315. package/dist/lib/ui/Command.js +2 -2
  316. package/dist/lib/ui/Command.js.map +1 -1
  317. package/dist/lib/ui/Select.js +1 -1
  318. package/dist/lib/ui/Select.js.map +1 -1
  319. package/dist/lib/ui/Stepper.d.ts +3 -0
  320. package/dist/lib/ui/Stepper.js +7 -0
  321. package/dist/lib/ui/Stepper.js.map +1 -0
  322. package/dist/lib/ui/SyntaxHighlight.d.ts +15 -0
  323. package/dist/lib/ui/SyntaxHighlight.js +62 -0
  324. package/dist/lib/ui/SyntaxHighlight.js.map +1 -0
  325. package/dist/lib/ui/util.d.ts +2 -0
  326. package/dist/lib/ui/util.js +3 -0
  327. package/dist/lib/ui/util.js.map +1 -0
  328. package/dist/lib/util/MdxComponents.d.ts +5 -2
  329. package/dist/lib/util/MdxComponents.js +6 -3
  330. package/dist/lib/util/MdxComponents.js.map +1 -1
  331. package/dist/lib/util/joinPath.d.ts +3 -0
  332. package/dist/lib/util/joinPath.js +3 -0
  333. package/dist/lib/util/joinPath.js.map +1 -1
  334. package/dist/lib/util/traverse.d.ts +2 -8
  335. package/dist/lib/util/traverse.js +2 -2
  336. package/dist/lib/util/traverse.js.map +1 -1
  337. package/dist/lib/util/types.d.ts +7 -0
  338. package/dist/lib/util/types.js +2 -0
  339. package/dist/lib/util/types.js.map +1 -0
  340. package/dist/lib/util/useOnScreen.d.ts +3 -2
  341. package/dist/lib/util/useOnScreen.js +3 -3
  342. package/dist/lib/util/useOnScreen.js.map +1 -1
  343. package/dist/lib/util/useScrollToAnchor.js +26 -20
  344. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  345. package/dist/vite/api/schema-codegen.d.ts +1 -1
  346. package/dist/vite/api/schema-codegen.js +31 -9
  347. package/dist/vite/api/schema-codegen.js.map +1 -1
  348. package/dist/vite/api/schema-codegen.test.js +66 -0
  349. package/dist/vite/api/schema-codegen.test.js.map +1 -1
  350. package/dist/vite/build.js +2 -0
  351. package/dist/vite/build.js.map +1 -1
  352. package/dist/vite/config.d.ts +2 -5
  353. package/dist/vite/config.js +39 -56
  354. package/dist/vite/config.js.map +1 -1
  355. package/dist/vite/config.test.js +1 -1
  356. package/dist/vite/config.test.js.map +1 -1
  357. package/dist/vite/create-pagefind-index.d.ts +4 -0
  358. package/dist/vite/create-pagefind-index.js +12 -0
  359. package/dist/vite/create-pagefind-index.js.map +1 -0
  360. package/dist/vite/css/plugin.d.ts +2 -2
  361. package/dist/vite/css/plugin.js.map +1 -1
  362. package/dist/vite/dev-server.js +12 -4
  363. package/dist/vite/dev-server.js.map +1 -1
  364. package/dist/vite/plugin-api-keys.d.ts +2 -2
  365. package/dist/vite/plugin-api-keys.js +3 -3
  366. package/dist/vite/plugin-api-keys.js.map +1 -1
  367. package/dist/vite/plugin-api.d.ts +2 -2
  368. package/dist/vite/plugin-api.js +42 -35
  369. package/dist/vite/plugin-api.js.map +1 -1
  370. package/dist/vite/plugin-auth.d.ts +2 -2
  371. package/dist/vite/plugin-auth.js +3 -3
  372. package/dist/vite/plugin-auth.js.map +1 -1
  373. package/dist/vite/plugin-component.d.ts +2 -2
  374. package/dist/vite/plugin-component.js +7 -2
  375. package/dist/vite/plugin-component.js.map +1 -1
  376. package/dist/vite/plugin-config-reload.d.ts +4 -3
  377. package/dist/vite/plugin-config-reload.js +13 -6
  378. package/dist/vite/plugin-config-reload.js.map +1 -1
  379. package/dist/vite/plugin-config.d.ts +2 -2
  380. package/dist/vite/plugin-config.js +7 -4
  381. package/dist/vite/plugin-config.js.map +1 -1
  382. package/dist/vite/plugin-custom-pages.d.ts +2 -2
  383. package/dist/vite/plugin-custom-pages.js +3 -3
  384. package/dist/vite/plugin-custom-pages.js.map +1 -1
  385. package/dist/vite/plugin-docs.d.ts +3 -3
  386. package/dist/vite/plugin-docs.js +23 -6
  387. package/dist/vite/plugin-docs.js.map +1 -1
  388. package/dist/vite/plugin-frontmatter.d.ts +2 -2
  389. package/dist/vite/plugin-frontmatter.js +5 -4
  390. package/dist/vite/plugin-frontmatter.js.map +1 -1
  391. package/dist/vite/plugin-mdx.d.ts +2 -2
  392. package/dist/vite/plugin-mdx.js +1 -1
  393. package/dist/vite/plugin-mdx.js.map +1 -1
  394. package/dist/vite/plugin-redirect.d.ts +2 -2
  395. package/dist/vite/plugin-redirect.js +3 -3
  396. package/dist/vite/plugin-redirect.js.map +1 -1
  397. package/dist/vite/plugin-search.d.ts +2 -2
  398. package/dist/vite/plugin-search.js +5 -1
  399. package/dist/vite/plugin-search.js.map +1 -1
  400. package/dist/vite/plugin-sidebar.d.ts +2 -2
  401. package/dist/vite/plugin-sidebar.js +2 -2
  402. package/dist/vite/plugin-sidebar.js.map +1 -1
  403. package/dist/vite/plugin-theme-css.d.ts +2 -2
  404. package/dist/vite/plugin-theme-css.js.map +1 -1
  405. package/dist/vite/plugin.d.ts +2 -2
  406. package/dist/vite/plugin.js.map +1 -1
  407. package/dist/vite/prerender/FileWritingResponse.d.ts +11 -6
  408. package/dist/vite/prerender/FileWritingResponse.js +9 -6
  409. package/dist/vite/prerender/FileWritingResponse.js.map +1 -1
  410. package/dist/vite/prerender/InMemoryResponse.d.ts +16 -0
  411. package/dist/vite/prerender/InMemoryResponse.js +32 -0
  412. package/dist/vite/prerender/InMemoryResponse.js.map +1 -0
  413. package/dist/vite/prerender/PrerenderResponse.d.ts +10 -0
  414. package/dist/vite/prerender/PrerenderResponse.js +2 -0
  415. package/dist/vite/prerender/PrerenderResponse.js.map +1 -0
  416. package/dist/vite/prerender/prerender.d.ts +1 -0
  417. package/dist/vite/prerender/prerender.js +34 -28
  418. package/dist/vite/prerender/prerender.js.map +1 -1
  419. package/dist/vite/prerender/worker.d.ts +1 -1
  420. package/dist/vite/prerender/worker.js +42 -12
  421. package/dist/vite/prerender/worker.js.map +1 -1
  422. package/dist/vite/sitemap.js +2 -1
  423. package/dist/vite/sitemap.js.map +1 -1
  424. package/dist/zuplo/with-zuplo.js +4 -0
  425. package/dist/zuplo/with-zuplo.js.map +1 -1
  426. package/lib/{AuthenticationPlugin-_YVa673u.js → AuthenticationPlugin-foqdvvkf.js} +4 -4
  427. package/lib/{AuthenticationPlugin-_YVa673u.js.map → AuthenticationPlugin-foqdvvkf.js.map} +1 -1
  428. package/lib/Button-Fp19CMUr.js +49 -0
  429. package/lib/Button-Fp19CMUr.js.map +1 -0
  430. package/lib/Callout-B2vsR09t.js +229 -0
  431. package/lib/Callout-B2vsR09t.js.map +1 -0
  432. package/lib/{CategoryHeading-MYL1u_6K.js → CategoryHeading-DpB47wvk.js} +3 -3
  433. package/lib/{CategoryHeading-MYL1u_6K.js.map → CategoryHeading-DpB47wvk.js.map} +1 -1
  434. package/lib/Dialog-sbgekbjb.js +98 -0
  435. package/lib/Dialog-sbgekbjb.js.map +1 -0
  436. package/lib/Drawer-kDAfOq_2.js +1133 -0
  437. package/lib/Drawer-kDAfOq_2.js.map +1 -0
  438. package/lib/{Markdown-8mv9nhGd.js → Markdown-aF5FdsNi.js} +7822 -6052
  439. package/lib/Markdown-aF5FdsNi.js.map +1 -0
  440. package/lib/MdxPage-Vw_dc9Yz.js +85 -0
  441. package/lib/MdxPage-Vw_dc9Yz.js.map +1 -0
  442. package/lib/{OasProvider-IS9wBrb7.js → OasProvider-CjXTP-nz.js} +6 -6
  443. package/lib/{OasProvider-IS9wBrb7.js.map → OasProvider-CjXTP-nz.js.map} +1 -1
  444. package/lib/OperationList-BYemrDYk.js +5068 -0
  445. package/lib/OperationList-BYemrDYk.js.map +1 -0
  446. package/lib/Pagination-SdlocK96.js +48 -0
  447. package/lib/Pagination-SdlocK96.js.map +1 -0
  448. package/lib/{index.esm-9-TF9KQB.js → RouteGuard-CqZPoZYJ.js} +196 -144
  449. package/lib/RouteGuard-CqZPoZYJ.js.map +1 -0
  450. package/lib/SchemaList-CAeKy9pV.js +148 -0
  451. package/lib/SchemaList-CAeKy9pV.js.map +1 -0
  452. package/lib/SchemaView-B3fOPR4V.js +357 -0
  453. package/lib/SchemaView-B3fOPR4V.js.map +1 -0
  454. package/lib/{Select-D9CKL33X.js → Select-DVFRKf1R.js} +71 -71
  455. package/lib/{Select-D9CKL33X.js.map → Select-DVFRKf1R.js.map} +1 -1
  456. package/lib/SlotletProvider-DXvc0aY6.js +338 -0
  457. package/lib/SlotletProvider-DXvc0aY6.js.map +1 -0
  458. package/lib/Spinner-CE68iCm0.js +7 -0
  459. package/lib/Spinner-CE68iCm0.js.map +1 -0
  460. package/lib/{SyntaxHighlight-B0L4SC_N.js → SyntaxHighlight-BEoSoPEo.js} +496 -592
  461. package/lib/SyntaxHighlight-BEoSoPEo.js.map +1 -0
  462. package/lib/Toc-YBsgI72s.js +92 -0
  463. package/lib/Toc-YBsgI72s.js.map +1 -0
  464. package/lib/{chunk-SYFQ2XB5-QijJrSf0.js → chunk-HA7DTUK3-C4gP41vD.js} +560 -560
  465. package/lib/chunk-HA7DTUK3-C4gP41vD.js.map +1 -0
  466. package/lib/{circular-DxaIIlWD.js → circular-ByJI6Mci.js} +5461 -4993
  467. package/lib/circular-ByJI6Mci.js.map +1 -0
  468. package/lib/context-DLCwaMXN.js +22 -0
  469. package/lib/{context-rwLGh-6_.js.map → context-DLCwaMXN.js.map} +1 -1
  470. package/lib/{createServer-DSQiPwjN.js → createServer-mYvGvmc0.js} +5062 -5209
  471. package/lib/createServer-mYvGvmc0.js.map +1 -0
  472. package/lib/{hook-C_t2ISLC.js → hook-CqpVYDqN.js} +495 -467
  473. package/lib/hook-CqpVYDqN.js.map +1 -0
  474. package/lib/index-Bn6Lc9tq.js +9 -0
  475. package/lib/index-Bn6Lc9tq.js.map +1 -0
  476. package/lib/index-C1OzjGUK.js +2227 -0
  477. package/lib/index-C1OzjGUK.js.map +1 -0
  478. package/lib/index-CPNSgwSb.js +36 -0
  479. package/lib/{index-Djenk2Hj.js.map → index-CPNSgwSb.js.map} +1 -1
  480. package/lib/index-D48iOQvJ.js +1973 -0
  481. package/lib/index-D48iOQvJ.js.map +1 -0
  482. package/lib/index-DwT-v3zK.js +86 -0
  483. package/lib/index-DwT-v3zK.js.map +1 -0
  484. package/lib/{index-CjJS0l4l.js → index-LNp6rxyU.js} +2 -2
  485. package/lib/{index-CjJS0l4l.js.map → index-LNp6rxyU.js.map} +1 -1
  486. package/lib/index-gQD2h1wX.js +447 -0
  487. package/lib/index-gQD2h1wX.js.map +1 -0
  488. package/lib/{index.esm-CrSoEshU.js → index.esm--gIChbWs.js} +3 -3
  489. package/lib/{index.esm-CrSoEshU.js.map → index.esm--gIChbWs.js.map} +1 -1
  490. package/lib/{jsx-runtime-Bdg6XQ1m.js → jsx-runtime-CYK1ROHF.js} +99 -99
  491. package/lib/{jsx-runtime-Bdg6XQ1m.js.map → jsx-runtime-CYK1ROHF.js.map} +1 -1
  492. package/lib/{mutation-Cm3O9f3X.js → mutation-8LjrN7uz.js} +26 -26
  493. package/lib/{mutation-Cm3O9f3X.js.map → mutation-8LjrN7uz.js.map} +1 -1
  494. package/lib/objectEntries-yMIkr2mI.js +5 -0
  495. package/lib/objectEntries-yMIkr2mI.js.map +1 -0
  496. package/lib/post-processors/removeExtensions.js +4 -4
  497. package/lib/post-processors/traverse.js +2 -2
  498. package/lib/post-processors/traverse.js.map +1 -1
  499. package/lib/prism-bash.min-HHIMdNJ_.js.map +1 -1
  500. package/lib/prism-csharp.min-bQAo2pmx.js.map +1 -1
  501. package/lib/prism-java.min-BpvsOuIa.js.map +1 -1
  502. package/lib/prism-javascript.min-CEqHqgbm.js.map +1 -1
  503. package/lib/prism-json.min-B1GJqK1k.js.map +1 -1
  504. package/lib/prism-jsstacktrace.min-BfobCF2F.js +2 -0
  505. package/lib/prism-jsstacktrace.min-BfobCF2F.js.map +1 -0
  506. package/lib/prism-markdown.min-C0Qn0m-5.js.map +1 -1
  507. package/lib/prism-markup-BNGj0Tvm.js.map +1 -1
  508. package/lib/prism-objectivec.min-BXSWqpJJ.js.map +1 -1
  509. package/lib/prism-ruby.min-Dx9KO9ds.js.map +1 -1
  510. package/lib/prism-typescript.min-CD7H2IYQ.js.map +1 -1
  511. package/lib/ui/Accordion.js +1 -1
  512. package/lib/ui/ActionButton.js +11 -10
  513. package/lib/ui/ActionButton.js.map +1 -1
  514. package/lib/ui/Alert.js +2 -2
  515. package/lib/ui/AlertDialog.js +1 -1
  516. package/lib/ui/Badge.js +2 -2
  517. package/lib/ui/Breadcrumb.js +4 -4
  518. package/lib/ui/Button.js +13 -12
  519. package/lib/ui/Button.js.map +1 -1
  520. package/lib/ui/Callout.js +39 -21
  521. package/lib/ui/Callout.js.map +1 -1
  522. package/lib/ui/Card.js +1 -1
  523. package/lib/ui/Carousel.js +1 -1
  524. package/lib/ui/Checkbox.js +16 -26
  525. package/lib/ui/Checkbox.js.map +1 -1
  526. package/lib/ui/Command.js +105 -78
  527. package/lib/ui/Command.js.map +1 -1
  528. package/lib/ui/Dialog.js +1 -1
  529. package/lib/ui/Drawer.js +14 -1151
  530. package/lib/ui/Drawer.js.map +1 -1
  531. package/lib/ui/DropdownMenu.js +1 -1
  532. package/lib/ui/Form.js +5 -5
  533. package/lib/ui/HoverCard.js +1 -1
  534. package/lib/ui/Input.js +1 -1
  535. package/lib/ui/Label.js +2 -2
  536. package/lib/ui/Pagination.js +10 -10
  537. package/lib/ui/Popover.js +1 -1
  538. package/lib/ui/Progress.js +1 -1
  539. package/lib/ui/RadioGroup.js +1 -1
  540. package/lib/ui/ScrollArea.js +1 -1
  541. package/lib/ui/Select.js +2 -2
  542. package/lib/ui/Select.js.map +1 -1
  543. package/lib/ui/Skeleton.js +1 -1
  544. package/lib/ui/Slider.js +1 -1
  545. package/lib/ui/Stepper.js +6 -0
  546. package/lib/ui/Stepper.js.map +1 -0
  547. package/lib/ui/Switch.js +1 -1
  548. package/lib/ui/SyntaxHighlight.js +11 -0
  549. package/lib/ui/SyntaxHighlight.js.map +1 -0
  550. package/lib/ui/Tabs.js +1 -1
  551. package/lib/ui/Textarea.js +1 -1
  552. package/lib/ui/Toggle.js +2 -2
  553. package/lib/ui/ToggleGroup.js +1 -1
  554. package/lib/ui/Tooltip.js +1 -1
  555. package/lib/ui/util.js +6 -0
  556. package/lib/ui/util.js.map +1 -0
  557. package/lib/{useExposedProps-Bbf99zic.js → useExposedProps-B9qXJedG.js} +2 -2
  558. package/lib/{useExposedProps-Bbf99zic.js.map → useExposedProps-B9qXJedG.js.map} +1 -1
  559. package/lib/useLatest-hmRS46UF.js +11 -0
  560. package/lib/useLatest-hmRS46UF.js.map +1 -0
  561. package/lib/zudoku.auth-auth0.js +15 -14
  562. package/lib/zudoku.auth-auth0.js.map +1 -1
  563. package/lib/zudoku.auth-clerk.js +67 -49
  564. package/lib/zudoku.auth-clerk.js.map +1 -1
  565. package/lib/zudoku.auth-openid.js +370 -404
  566. package/lib/zudoku.auth-openid.js.map +1 -1
  567. package/lib/zudoku.components.js +32 -1334
  568. package/lib/zudoku.components.js.map +1 -1
  569. package/lib/zudoku.hooks.js +19 -0
  570. package/lib/zudoku.hooks.js.map +1 -0
  571. package/lib/zudoku.icons.js +1 -1
  572. package/lib/zudoku.plugin-api-catalog.js +106 -111
  573. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  574. package/lib/zudoku.plugin-api-keys.js +108 -106
  575. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  576. package/lib/zudoku.plugin-custom-pages.js +3 -3
  577. package/lib/zudoku.plugin-markdown.js +2 -2
  578. package/lib/zudoku.plugin-openapi.js +6 -8
  579. package/lib/zudoku.plugin-openapi.js.map +1 -1
  580. package/lib/zudoku.plugin-redirect.js +1 -1
  581. package/lib/zudoku.plugin-search-inkeep.js +9 -9
  582. package/lib/zudoku.plugin-search-pagefind.js +233 -0
  583. package/lib/zudoku.plugin-search-pagefind.js.map +1 -0
  584. package/lib/zudoku.plugins.js +9 -8
  585. package/lib/zudoku.plugins.js.map +1 -1
  586. package/package.json +76 -56
  587. package/src/app/entry.client.tsx +8 -0
  588. package/src/app/entry.server.tsx +23 -13
  589. package/src/app/main.css +98 -57
  590. package/src/app/main.tsx +3 -1
  591. package/src/app/tailwind.ts +20 -0
  592. package/src/lib/authentication/authentication.ts +2 -0
  593. package/src/lib/authentication/hook.ts +12 -1
  594. package/src/lib/authentication/providers/auth0.tsx +3 -2
  595. package/src/lib/authentication/providers/clerk.tsx +32 -8
  596. package/src/lib/authentication/providers/openid.tsx +31 -15
  597. package/src/lib/authentication/providers/supabase.tsx +157 -0
  598. package/src/lib/authentication/state.ts +9 -37
  599. package/src/lib/components/AnchorLink.tsx +9 -7
  600. package/src/lib/components/Banner.tsx +1 -0
  601. package/src/lib/components/Bootstrap.tsx +13 -6
  602. package/src/lib/components/Footer.tsx +136 -0
  603. package/src/lib/components/Header.tsx +12 -8
  604. package/src/lib/components/Heading.tsx +1 -1
  605. package/src/lib/components/InlineCode.tsx +13 -16
  606. package/src/lib/components/Layout.tsx +22 -67
  607. package/src/lib/components/Main.tsx +50 -0
  608. package/src/lib/components/MobileTopNavigation.tsx +27 -18
  609. package/src/lib/components/Pagination.tsx +50 -0
  610. package/src/lib/components/ThemeSwitch.tsx +1 -1
  611. package/src/lib/components/TopNavigation.tsx +51 -24
  612. package/src/lib/components/Zudoku.tsx +20 -7
  613. package/src/lib/components/cache.ts +8 -0
  614. package/src/lib/components/context/BypassProtectedRoutesContext.ts +3 -0
  615. package/src/lib/components/context/RouterEventsEmitter.tsx +19 -0
  616. package/src/lib/components/context/ViewportAnchorContext.tsx +6 -15
  617. package/src/lib/components/context/ZudokuContext.ts +17 -8
  618. package/src/lib/components/index.ts +2 -0
  619. package/src/lib/components/navigation/PoweredByZudoku.tsx +23 -0
  620. package/src/lib/components/navigation/Sidebar.tsx +30 -44
  621. package/src/lib/components/navigation/SidebarBadge.tsx +4 -1
  622. package/src/lib/components/navigation/SidebarCategory.tsx +15 -12
  623. package/src/lib/components/navigation/SidebarItem.tsx +22 -29
  624. package/src/lib/components/navigation/SidebarWrapper.tsx +42 -23
  625. package/src/lib/{plugins/markdown → components/navigation}/Toc.tsx +5 -14
  626. package/src/lib/components/navigation/ZudokuLogo.tsx +25 -0
  627. package/src/lib/core/RouteGuard.tsx +69 -12
  628. package/src/lib/core/ZudokuContext.ts +63 -12
  629. package/src/lib/core/plugins.ts +21 -7
  630. package/src/lib/errors/ErrorAlert.tsx +24 -17
  631. package/src/lib/hooks/index.ts +5 -0
  632. package/src/lib/hooks/useEvent.test.tsx +149 -0
  633. package/src/lib/hooks/useEvent.ts +41 -0
  634. package/src/lib/oas/graphql/index.ts +206 -55
  635. package/src/lib/oas/parser/dereference/index.ts +2 -0
  636. package/src/lib/oas/parser/index.ts +7 -29
  637. package/src/lib/plugins/api-catalog/Catalog.tsx +50 -100
  638. package/src/lib/plugins/api-catalog/index.tsx +66 -15
  639. package/src/lib/plugins/api-keys/CreateApiKey.tsx +7 -3
  640. package/src/lib/plugins/markdown/MdxPage.tsx +15 -47
  641. package/src/lib/plugins/openapi/ColorizedParam.tsx +1 -1
  642. package/src/lib/plugins/openapi/Endpoint.tsx +1 -1
  643. package/src/lib/plugins/openapi/OperationList.tsx +171 -81
  644. package/src/lib/plugins/openapi/OperationListItem.tsx +118 -104
  645. package/src/lib/plugins/openapi/ParamInfos.tsx +87 -0
  646. package/src/lib/plugins/openapi/ParameterList.tsx +4 -0
  647. package/src/lib/plugins/openapi/ParameterListItem.tsx +35 -23
  648. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +7 -0
  649. package/src/lib/plugins/openapi/SchemaList.tsx +151 -0
  650. package/src/lib/plugins/openapi/Sidecar.tsx +50 -13
  651. package/src/lib/plugins/openapi/SidecarExamples.tsx +1 -2
  652. package/src/lib/plugins/openapi/SimpleSelect.tsx +1 -1
  653. package/src/lib/plugins/openapi/client/GraphQLClient.tsx +1 -1
  654. package/src/lib/plugins/openapi/client/useCreateQuery.ts +13 -5
  655. package/src/lib/plugins/openapi/components/EnumValues.tsx +58 -0
  656. package/src/lib/plugins/openapi/components/SelectOnClick.tsx +29 -0
  657. package/src/lib/plugins/openapi/graphql/gql.ts +34 -17
  658. package/src/lib/plugins/openapi/graphql/graphql.ts +172 -86
  659. package/src/lib/plugins/openapi/index.tsx +55 -87
  660. package/src/lib/plugins/openapi/interfaces.ts +44 -15
  661. package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +30 -32
  662. package/src/lib/plugins/openapi/playground/Headers.tsx +0 -1
  663. package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +74 -0
  664. package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +54 -0
  665. package/src/lib/plugins/openapi/playground/PathParams.tsx +8 -2
  666. package/src/lib/plugins/openapi/playground/Playground.tsx +176 -89
  667. package/src/lib/plugins/openapi/playground/QueryParams.tsx +0 -1
  668. package/src/lib/plugins/openapi/playground/RequestLoginDialog.tsx +51 -0
  669. package/src/lib/plugins/openapi/playground/rememberedIdentity.ts +26 -0
  670. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +25 -5
  671. package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +67 -45
  672. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.tsx +1 -8
  673. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.tsx +3 -0
  674. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.tsx +6 -3
  675. package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +36 -0
  676. package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +47 -50
  677. package/src/lib/plugins/openapi/schema/SchemaView.tsx +84 -138
  678. package/src/lib/plugins/openapi/schema/utils.ts +7 -1
  679. package/src/lib/plugins/openapi/state.ts +36 -0
  680. package/src/lib/plugins/openapi/util/createSidebarCategory.tsx +5 -7
  681. package/src/lib/plugins/openapi/util/getRoutes.tsx +9 -6
  682. package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +164 -0
  683. package/src/lib/plugins/search-pagefind/ResultList.tsx +105 -0
  684. package/src/lib/plugins/search-pagefind/get-results.tsx +75 -0
  685. package/src/lib/plugins/search-pagefind/index.tsx +21 -0
  686. package/src/lib/plugins/search-pagefind/types.ts +118 -0
  687. package/src/lib/ui/Button.tsx +4 -2
  688. package/src/lib/ui/Callout.tsx +28 -10
  689. package/src/lib/ui/Checkbox.tsx +8 -24
  690. package/src/lib/ui/Command.tsx +25 -3
  691. package/src/lib/ui/Select.tsx +1 -1
  692. package/src/lib/ui/Stepper.tsx +8 -0
  693. package/src/lib/ui/SyntaxHighlight.tsx +186 -0
  694. package/src/lib/ui/util.tsx +3 -0
  695. package/src/lib/util/MdxComponents.tsx +7 -4
  696. package/src/lib/util/joinPath.tsx +3 -0
  697. package/src/lib/util/traverse.ts +4 -8
  698. package/src/lib/util/types.ts +7 -0
  699. package/src/lib/util/useOnScreen.ts +6 -4
  700. package/src/lib/util/useScrollToAnchor.ts +30 -20
  701. package/dist/lib/components/SyntaxHighlight.d.ts +0 -12
  702. package/dist/lib/components/SyntaxHighlight.js +0 -53
  703. package/dist/lib/components/SyntaxHighlight.js.map +0 -1
  704. package/dist/lib/components/context/PluginSystem.js +0 -2
  705. package/dist/lib/components/context/PluginSystem.js.map +0 -1
  706. package/dist/lib/plugins/markdown/Toc.js.map +0 -1
  707. package/lib/Markdown-8mv9nhGd.js.map +0 -1
  708. package/lib/MdxPage-GM1T5jmO.js +0 -193
  709. package/lib/MdxPage-GM1T5jmO.js.map +0 -1
  710. package/lib/OperationList-BTmRbbXk.js +0 -5179
  711. package/lib/OperationList-BTmRbbXk.js.map +0 -1
  712. package/lib/SlotletProvider-D0mFmGJu.js +0 -221
  713. package/lib/SlotletProvider-D0mFmGJu.js.map +0 -1
  714. package/lib/Spinner-BlzrEEk1.js +0 -51
  715. package/lib/Spinner-BlzrEEk1.js.map +0 -1
  716. package/lib/SyntaxHighlight-B0L4SC_N.js.map +0 -1
  717. package/lib/chunk-SYFQ2XB5-QijJrSf0.js.map +0 -1
  718. package/lib/circular-DxaIIlWD.js.map +0 -1
  719. package/lib/context-rwLGh-6_.js +0 -22
  720. package/lib/createServer-DSQiPwjN.js.map +0 -1
  721. package/lib/hook-C_t2ISLC.js.map +0 -1
  722. package/lib/index-B7mqiOei.js +0 -509
  723. package/lib/index-B7mqiOei.js.map +0 -1
  724. package/lib/index-BANyVRgL.js +0 -2098
  725. package/lib/index-BANyVRgL.js.map +0 -1
  726. package/lib/index-Djenk2Hj.js +0 -36
  727. package/lib/index.esm-9-TF9KQB.js.map +0 -1
  728. package/lib/joinUrl-nLx9pD-Z.js +0 -20
  729. package/lib/joinUrl-nLx9pD-Z.js.map +0 -1
  730. package/lib/useScrollToAnchor-BGEcH3HM.js +0 -286
  731. package/lib/useScrollToAnchor-BGEcH3HM.js.map +0 -1
  732. package/src/lib/components/SyntaxHighlight.tsx +0 -171
  733. package/src/lib/components/context/PluginSystem.ts +0 -0
  734. /package/dist/lib/{plugins/markdown → components/navigation}/Toc.d.ts +0 -0
  735. /package/dist/lib/{components/context/PluginSystem.d.ts → hooks/useEvent.test.d.ts} +0 -0
@@ -1,1337 +1,35 @@
1
- var lt = Object.defineProperty;
2
- var xe = (t) => {
3
- throw TypeError(t);
4
- };
5
- var ct = (t, e, r) => e in t ? lt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
6
- var P = (t, e, r) => ct(t, typeof e != "symbol" ? e + "" : e, r), ye = (t, e, r) => e.has(t) || xe("Cannot " + r);
7
- var l = (t, e, r) => (ye(t, e, "read from private field"), r ? r.call(t) : e.get(t)), j = (t, e, r) => e.has(t) ? xe("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), y = (t, e, r, n) => (ye(t, e, "write to private field"), n ? n.call(t, r) : e.set(t, r), r);
8
- var G = (t, e, r, n) => ({
9
- set _(a) {
10
- y(t, e, a, r);
11
- },
12
- get _() {
13
- return l(t, e, n);
14
- }
15
- });
16
- import { a as Re, H as oe } from "./index.esm-9-TF9KQB.js";
17
- import { u as le, m as ut, O as ce, R as dt, S as ht, h as ue, f as ft, L as de } from "./chunk-SYFQ2XB5-QijJrSf0.js";
18
- import { S as Fe, m as Be, Q as gt, n as w, o as ve, p as be, q as M, r as mt, t as pt, v as xt, w as yt, x as je, y as we, z as vt, h as Pe, A as ke, B as bt, e as jt, k as z, i as A, C as He, D as ze, E as wt, j as ne, a as Pt, Z as kt, F as Ct, G as St } from "./hook-C_t2ISLC.js";
19
- import { j as s } from "./jsx-runtime-Bdg6XQ1m.js";
20
- import * as U from "react";
21
- import Nt, { useRef as ee, useEffect as I, createContext as he, StrictMode as Le, useState as L, useCallback as Dt, Suspense as fe, memo as Ke, forwardRef as Mt, Component as Ot, createElement as Ce, useMemo as te, useContext as At, Fragment as Et } from "react";
22
- import { Z as $e } from "./invariant-Caa8-XvF.js";
23
- import { E as Ue, S as D, a as qt, R as Tt } from "./SlotletProvider-D0mFmGJu.js";
24
- import { Button as It } from "./ui/Button.js";
25
- import { Callout as Qt } from "./ui/Callout.js";
26
- import { M as Rt } from "./mutation-Cm3O9f3X.js";
27
- import * as Ft from "react-dom";
28
- import { C as ge } from "./ClientOnly-E7hGysn1.js";
29
- import { CircleXIcon as Bt, SearchIcon as Ht, SunIcon as zt, MoonIcon as Lt, MenuIcon as Kt, PanelLeftIcon as $t } from "lucide-react";
30
- import { Drawer as Ze, DrawerTrigger as Ye, DrawerContent as Ve, DrawerTitle as Xe } from "./ui/Drawer.js";
31
- import { c as Q } from "./cn-qaFjX9_3.js";
32
- import { s as Ut, S as Se, a as Zt, M as Yt, u as Vt } from "./useScrollToAnchor-BGEcH3HM.js";
33
- import { u as Xt, P as Gt, H as _t, a as Wt, V as Jt, M as er } from "./Markdown-8mv9nhGd.js";
34
- import { B as ae, S as Ge } from "./Spinner-BlzrEEk1.js";
35
- import { isSearchPlugin as tr, isProfileMenuPlugin as rr, isNavigationPlugin as sr, needsInitialization as nr, isApiIdentityPlugin as ar, isMdxProviderPlugin as ir, hasHead as or } from "./zudoku.plugins.js";
36
- import { DropdownMenu as lr, DropdownMenuTrigger as cr, DropdownMenuContent as ur, DropdownMenuLabel as dr, DropdownMenuSeparator as re, DropdownMenuSub as hr, DropdownMenuSubTrigger as fr, DropdownMenuPortal as gr, DropdownMenuSubContent as mr, DropdownMenuItem as pr } from "./ui/DropdownMenu.js";
37
- import { j as Ne } from "./joinUrl-nLx9pD-Z.js";
38
- import { VisuallyHidden as _e } from "@radix-ui/react-visually-hidden";
39
- import { z as xr, J as yr } from "./SyntaxHighlight-B0L4SC_N.js";
40
- import { a as vr } from "./index-Djenk2Hj.js";
41
- import { C as br } from "./CategoryHeading-MYL1u_6K.js";
42
- var N, Te, jr = (Te = class extends Fe {
43
- constructor(e = {}) {
44
- super();
45
- j(this, N);
46
- this.config = e, y(this, N, /* @__PURE__ */ new Map());
47
- }
48
- build(e, r, n) {
49
- const a = r.queryKey, o = r.queryHash ?? Be(a, r);
50
- let i = this.get(o);
51
- return i || (i = new gt({
52
- cache: this,
53
- queryKey: a,
54
- queryHash: o,
55
- options: e.defaultQueryOptions(r),
56
- state: n,
57
- defaultOptions: e.getQueryDefaults(a)
58
- }), this.add(i)), i;
59
- }
60
- add(e) {
61
- l(this, N).has(e.queryHash) || (l(this, N).set(e.queryHash, e), this.notify({
62
- type: "added",
63
- query: e
64
- }));
65
- }
66
- remove(e) {
67
- const r = l(this, N).get(e.queryHash);
68
- r && (e.destroy(), r === e && l(this, N).delete(e.queryHash), this.notify({ type: "removed", query: e }));
69
- }
70
- clear() {
71
- w.batch(() => {
72
- this.getAll().forEach((e) => {
73
- this.remove(e);
74
- });
75
- });
76
- }
77
- get(e) {
78
- return l(this, N).get(e);
79
- }
80
- getAll() {
81
- return [...l(this, N).values()];
82
- }
83
- find(e) {
84
- const r = { exact: !0, ...e };
85
- return this.getAll().find(
86
- (n) => ve(r, n)
87
- );
88
- }
89
- findAll(e = {}) {
90
- const r = this.getAll();
91
- return Object.keys(e).length > 0 ? r.filter((n) => ve(e, n)) : r;
92
- }
93
- notify(e) {
94
- w.batch(() => {
95
- this.listeners.forEach((r) => {
96
- r(e);
97
- });
98
- });
99
- }
100
- onFocus() {
101
- w.batch(() => {
102
- this.getAll().forEach((e) => {
103
- e.onFocus();
104
- });
105
- });
106
- }
107
- onOnline() {
108
- w.batch(() => {
109
- this.getAll().forEach((e) => {
110
- e.onOnline();
111
- });
112
- });
113
- }
114
- }, N = new WeakMap(), Te), O, C, Y, Ie, wr = (Ie = class extends Fe {
115
- constructor(e = {}) {
116
- super();
117
- j(this, O);
118
- j(this, C);
119
- j(this, Y);
120
- this.config = e, y(this, O, /* @__PURE__ */ new Set()), y(this, C, /* @__PURE__ */ new Map()), y(this, Y, 0);
121
- }
122
- build(e, r, n) {
123
- const a = new Rt({
124
- mutationCache: this,
125
- mutationId: ++G(this, Y)._,
126
- options: e.defaultMutationOptions(r),
127
- state: n
128
- });
129
- return this.add(a), a;
130
- }
131
- add(e) {
132
- l(this, O).add(e);
133
- const r = _(e);
134
- if (typeof r == "string") {
135
- const n = l(this, C).get(r);
136
- n ? n.push(e) : l(this, C).set(r, [e]);
137
- }
138
- this.notify({ type: "added", mutation: e });
139
- }
140
- remove(e) {
141
- if (l(this, O).delete(e)) {
142
- const r = _(e);
143
- if (typeof r == "string") {
144
- const n = l(this, C).get(r);
145
- if (n)
146
- if (n.length > 1) {
147
- const a = n.indexOf(e);
148
- a !== -1 && n.splice(a, 1);
149
- } else n[0] === e && l(this, C).delete(r);
150
- }
151
- }
152
- this.notify({ type: "removed", mutation: e });
153
- }
154
- canRun(e) {
155
- const r = _(e);
156
- if (typeof r == "string") {
157
- const n = l(this, C).get(r), a = n == null ? void 0 : n.find(
158
- (o) => o.state.status === "pending"
159
- );
160
- return !a || a === e;
161
- } else
162
- return !0;
163
- }
164
- runNext(e) {
165
- var n;
166
- const r = _(e);
167
- if (typeof r == "string") {
168
- const a = (n = l(this, C).get(r)) == null ? void 0 : n.find((o) => o !== e && o.state.isPaused);
169
- return (a == null ? void 0 : a.continue()) ?? Promise.resolve();
170
- } else
171
- return Promise.resolve();
172
- }
173
- clear() {
174
- w.batch(() => {
175
- l(this, O).forEach((e) => {
176
- this.notify({ type: "removed", mutation: e });
177
- }), l(this, O).clear(), l(this, C).clear();
178
- });
179
- }
180
- getAll() {
181
- return Array.from(l(this, O));
182
- }
183
- find(e) {
184
- const r = { exact: !0, ...e };
185
- return this.getAll().find(
186
- (n) => be(r, n)
187
- );
188
- }
189
- findAll(e = {}) {
190
- return this.getAll().filter((r) => be(e, r));
191
- }
192
- notify(e) {
193
- w.batch(() => {
194
- this.listeners.forEach((r) => {
195
- r(e);
196
- });
197
- });
198
- }
199
- resumePausedMutations() {
200
- const e = this.getAll().filter((r) => r.state.isPaused);
201
- return w.batch(
202
- () => Promise.all(
203
- e.map((r) => r.continue().catch(M))
204
- )
205
- );
206
- }
207
- }, O = new WeakMap(), C = new WeakMap(), Y = new WeakMap(), Ie);
208
- function _(t) {
209
- var e;
210
- return (e = t.options.scope) == null ? void 0 : e.id;
211
- }
212
- function De(t) {
213
- return {
214
- onFetch: (e, r) => {
215
- var g, f, h, x, v;
216
- const n = e.options, a = (h = (f = (g = e.fetchOptions) == null ? void 0 : g.meta) == null ? void 0 : f.fetchMore) == null ? void 0 : h.direction, o = ((x = e.state.data) == null ? void 0 : x.pages) || [], i = ((v = e.state.data) == null ? void 0 : v.pageParams) || [];
217
- let u = { pages: [], pageParams: [] }, d = 0;
218
- const c = async () => {
219
- let m = !1;
220
- const k = (b) => {
221
- Object.defineProperty(b, "signal", {
222
- enumerable: !0,
223
- get: () => (e.signal.aborted ? m = !0 : e.signal.addEventListener("abort", () => {
224
- m = !0;
225
- }), e.signal)
226
- });
227
- }, V = mt(e.options, e.fetchOptions), K = async (b, S, $) => {
228
- if (m)
229
- return Promise.reject();
230
- if (S == null && b.pages.length)
231
- return Promise.resolve(b);
232
- const X = {
233
- queryKey: e.queryKey,
234
- pageParam: S,
235
- direction: $ ? "backward" : "forward",
236
- meta: e.options.meta
237
- };
238
- k(X);
239
- const ot = await V(
240
- X
241
- ), { maxPages: me } = e.options, pe = $ ? pt : xt;
242
- return {
243
- pages: pe(b.pages, ot, me),
244
- pageParams: pe(b.pageParams, S, me)
245
- };
246
- };
247
- if (a && o.length) {
248
- const b = a === "backward", S = b ? Pr : Me, $ = {
249
- pages: o,
250
- pageParams: i
251
- }, X = S(n, $);
252
- u = await K($, X, b);
253
- } else {
254
- const b = t ?? o.length;
255
- do {
256
- const S = d === 0 ? i[0] ?? n.initialPageParam : Me(n, u);
257
- if (d > 0 && S == null)
258
- break;
259
- u = await K(u, S), d++;
260
- } while (d < b);
261
- }
262
- return u;
263
- };
264
- e.options.persister ? e.fetchFn = () => {
265
- var m, k;
266
- return (k = (m = e.options).persister) == null ? void 0 : k.call(
267
- m,
268
- c,
269
- {
270
- queryKey: e.queryKey,
271
- meta: e.options.meta,
272
- signal: e.signal
273
- },
274
- r
275
- );
276
- } : e.fetchFn = c;
277
- }
278
- };
279
- }
280
- function Me(t, { pages: e, pageParams: r }) {
281
- const n = e.length - 1;
282
- return e.length > 0 ? t.getNextPageParam(
283
- e[n],
284
- e,
285
- r[n],
286
- r
287
- ) : void 0;
288
- }
289
- function Pr(t, { pages: e, pageParams: r }) {
290
- var n;
291
- return e.length > 0 ? (n = t.getPreviousPageParam) == null ? void 0 : n.call(t, e[0], e, r[0], r) : void 0;
292
- }
293
- var p, E, q, R, F, T, B, H, Qe, kr = (Qe = class {
294
- constructor(t = {}) {
295
- j(this, p);
296
- j(this, E);
297
- j(this, q);
298
- j(this, R);
299
- j(this, F);
300
- j(this, T);
301
- j(this, B);
302
- j(this, H);
303
- y(this, p, t.queryCache || new jr()), y(this, E, t.mutationCache || new wr()), y(this, q, t.defaultOptions || {}), y(this, R, /* @__PURE__ */ new Map()), y(this, F, /* @__PURE__ */ new Map()), y(this, T, 0);
304
- }
305
- mount() {
306
- G(this, T)._++, l(this, T) === 1 && (y(this, B, yt.subscribe(async (t) => {
307
- t && (await this.resumePausedMutations(), l(this, p).onFocus());
308
- })), y(this, H, je.subscribe(async (t) => {
309
- t && (await this.resumePausedMutations(), l(this, p).onOnline());
310
- })));
311
- }
312
- unmount() {
313
- var t, e;
314
- G(this, T)._--, l(this, T) === 0 && ((t = l(this, B)) == null || t.call(this), y(this, B, void 0), (e = l(this, H)) == null || e.call(this), y(this, H, void 0));
315
- }
316
- isFetching(t) {
317
- return l(this, p).findAll({ ...t, fetchStatus: "fetching" }).length;
318
- }
319
- isMutating(t) {
320
- return l(this, E).findAll({ ...t, status: "pending" }).length;
321
- }
322
- getQueryData(t) {
323
- var r;
324
- const e = this.defaultQueryOptions({ queryKey: t });
325
- return (r = l(this, p).get(e.queryHash)) == null ? void 0 : r.state.data;
326
- }
327
- ensureQueryData(t) {
328
- const e = this.defaultQueryOptions(t), r = l(this, p).build(this, e), n = r.state.data;
329
- return n === void 0 ? this.fetchQuery(t) : (t.revalidateIfStale && r.isStaleByTime(we(e.staleTime, r)) && this.prefetchQuery(e), Promise.resolve(n));
330
- }
331
- getQueriesData(t) {
332
- return l(this, p).findAll(t).map(({ queryKey: e, state: r }) => {
333
- const n = r.data;
334
- return [e, n];
335
- });
336
- }
337
- setQueryData(t, e, r) {
338
- const n = this.defaultQueryOptions({ queryKey: t }), a = l(this, p).get(
339
- n.queryHash
340
- ), o = a == null ? void 0 : a.state.data, i = vt(e, o);
341
- if (i !== void 0)
342
- return l(this, p).build(this, n).setData(i, { ...r, manual: !0 });
343
- }
344
- setQueriesData(t, e, r) {
345
- return w.batch(
346
- () => l(this, p).findAll(t).map(({ queryKey: n }) => [
347
- n,
348
- this.setQueryData(n, e, r)
349
- ])
350
- );
351
- }
352
- getQueryState(t) {
353
- var r;
354
- const e = this.defaultQueryOptions({ queryKey: t });
355
- return (r = l(this, p).get(
356
- e.queryHash
357
- )) == null ? void 0 : r.state;
358
- }
359
- removeQueries(t) {
360
- const e = l(this, p);
361
- w.batch(() => {
362
- e.findAll(t).forEach((r) => {
363
- e.remove(r);
364
- });
365
- });
366
- }
367
- resetQueries(t, e) {
368
- const r = l(this, p), n = {
369
- type: "active",
370
- ...t
371
- };
372
- return w.batch(() => (r.findAll(t).forEach((a) => {
373
- a.reset();
374
- }), this.refetchQueries(n, e)));
375
- }
376
- cancelQueries(t, e = {}) {
377
- const r = { revert: !0, ...e }, n = w.batch(
378
- () => l(this, p).findAll(t).map((a) => a.cancel(r))
379
- );
380
- return Promise.all(n).then(M).catch(M);
381
- }
382
- invalidateQueries(t, e = {}) {
383
- return w.batch(() => {
384
- if (l(this, p).findAll(t).forEach((n) => {
385
- n.invalidate();
386
- }), (t == null ? void 0 : t.refetchType) === "none")
387
- return Promise.resolve();
388
- const r = {
389
- ...t,
390
- type: (t == null ? void 0 : t.refetchType) ?? (t == null ? void 0 : t.type) ?? "active"
391
- };
392
- return this.refetchQueries(r, e);
393
- });
394
- }
395
- refetchQueries(t, e = {}) {
396
- const r = {
397
- ...e,
398
- cancelRefetch: e.cancelRefetch ?? !0
399
- }, n = w.batch(
400
- () => l(this, p).findAll(t).filter((a) => !a.isDisabled()).map((a) => {
401
- let o = a.fetch(void 0, r);
402
- return r.throwOnError || (o = o.catch(M)), a.state.fetchStatus === "paused" ? Promise.resolve() : o;
403
- })
404
- );
405
- return Promise.all(n).then(M);
406
- }
407
- fetchQuery(t) {
408
- const e = this.defaultQueryOptions(t);
409
- e.retry === void 0 && (e.retry = !1);
410
- const r = l(this, p).build(this, e);
411
- return r.isStaleByTime(
412
- we(e.staleTime, r)
413
- ) ? r.fetch(e) : Promise.resolve(r.state.data);
414
- }
415
- prefetchQuery(t) {
416
- return this.fetchQuery(t).then(M).catch(M);
417
- }
418
- fetchInfiniteQuery(t) {
419
- return t.behavior = De(t.pages), this.fetchQuery(t);
420
- }
421
- prefetchInfiniteQuery(t) {
422
- return this.fetchInfiniteQuery(t).then(M).catch(M);
423
- }
424
- ensureInfiniteQueryData(t) {
425
- return t.behavior = De(t.pages), this.ensureQueryData(t);
426
- }
427
- resumePausedMutations() {
428
- return je.isOnline() ? l(this, E).resumePausedMutations() : Promise.resolve();
429
- }
430
- getQueryCache() {
431
- return l(this, p);
432
- }
433
- getMutationCache() {
434
- return l(this, E);
435
- }
436
- getDefaultOptions() {
437
- return l(this, q);
438
- }
439
- setDefaultOptions(t) {
440
- y(this, q, t);
441
- }
442
- setQueryDefaults(t, e) {
443
- l(this, R).set(Pe(t), {
444
- queryKey: t,
445
- defaultOptions: e
446
- });
447
- }
448
- getQueryDefaults(t) {
449
- const e = [...l(this, R).values()], r = {};
450
- return e.forEach((n) => {
451
- ke(t, n.queryKey) && Object.assign(r, n.defaultOptions);
452
- }), r;
453
- }
454
- setMutationDefaults(t, e) {
455
- l(this, F).set(Pe(t), {
456
- mutationKey: t,
457
- defaultOptions: e
458
- });
459
- }
460
- getMutationDefaults(t) {
461
- const e = [...l(this, F).values()];
462
- let r = {};
463
- return e.forEach((n) => {
464
- ke(t, n.mutationKey) && (r = { ...r, ...n.defaultOptions });
465
- }), r;
466
- }
467
- defaultQueryOptions(t) {
468
- if (t._defaulted)
469
- return t;
470
- const e = {
471
- ...l(this, q).queries,
472
- ...this.getQueryDefaults(t.queryKey),
473
- ...t,
474
- _defaulted: !0
475
- };
476
- return e.queryHash || (e.queryHash = Be(
477
- e.queryKey,
478
- e
479
- )), e.refetchOnReconnect === void 0 && (e.refetchOnReconnect = e.networkMode !== "always"), e.throwOnError === void 0 && (e.throwOnError = !!e.suspense), !e.networkMode && e.persister && (e.networkMode = "offlineFirst"), e.queryFn === bt && (e.enabled = !1), e;
480
- }
481
- defaultMutationOptions(t) {
482
- return t != null && t._defaulted ? t : {
483
- ...l(this, q).mutations,
484
- ...(t == null ? void 0 : t.mutationKey) && this.getMutationDefaults(t.mutationKey),
485
- ...t,
486
- _defaulted: !0
487
- };
488
- }
489
- clear() {
490
- l(this, p).clear(), l(this, E).clear();
491
- }
492
- }, p = new WeakMap(), E = new WeakMap(), q = new WeakMap(), R = new WeakMap(), F = new WeakMap(), T = new WeakMap(), B = new WeakMap(), H = new WeakMap(), Qe);
493
- function Cr(t) {
494
- return t;
495
- }
496
- function Oe(t, e, r) {
497
- var d, c;
498
- if (typeof e != "object" || e === null)
499
- return;
500
- const n = t.getMutationCache(), a = t.getQueryCache(), o = ((d = r == null ? void 0 : r.defaultOptions) == null ? void 0 : d.deserializeData) ?? ((c = t.getDefaultOptions().hydrate) == null ? void 0 : c.deserializeData) ?? Cr, i = e.mutations || [], u = e.queries || [];
501
- i.forEach(({ state: g, ...f }) => {
502
- var h, x;
503
- n.build(
504
- t,
505
- {
506
- ...(h = t.getDefaultOptions().hydrate) == null ? void 0 : h.mutations,
507
- ...(x = r == null ? void 0 : r.defaultOptions) == null ? void 0 : x.mutations,
508
- ...f
509
- },
510
- g
511
- );
512
- }), u.forEach(({ queryKey: g, state: f, queryHash: h, meta: x, promise: v }) => {
513
- var V, K;
514
- let m = a.get(h);
515
- const k = f.data === void 0 ? f.data : o(f.data);
516
- if (m) {
517
- if (m.state.dataUpdatedAt < f.dataUpdatedAt) {
518
- const { fetchStatus: b, ...S } = f;
519
- m.setState({
520
- ...S,
521
- data: k
522
- });
523
- }
524
- } else
525
- m = a.build(
526
- t,
527
- {
528
- ...(V = t.getDefaultOptions().hydrate) == null ? void 0 : V.queries,
529
- ...(K = r == null ? void 0 : r.defaultOptions) == null ? void 0 : K.queries,
530
- queryKey: g,
531
- queryHash: h,
532
- meta: x
533
- },
534
- // Reset fetch status to idle to avoid
535
- // query being stuck in fetching state upon hydration
536
- {
537
- ...f,
538
- data: k,
539
- fetchStatus: "idle"
540
- }
541
- );
542
- if (v) {
543
- const b = Promise.resolve(v).then(o);
544
- m.fetch(void 0, { initialPromise: b });
545
- }
546
- });
547
- }
548
- var Sr = ({
549
- children: t,
550
- options: e = {},
551
- state: r,
552
- queryClient: n
553
- }) => {
554
- const a = jt(n), [o, i] = U.useState(), u = U.useRef(e);
555
- return u.current = e, U.useMemo(() => {
556
- if (r) {
557
- if (typeof r != "object")
558
- return;
559
- const d = a.getQueryCache(), c = r.queries || [], g = [], f = [];
560
- for (const h of c) {
561
- const x = d.get(h.queryHash);
562
- if (!x)
563
- g.push(h);
564
- else {
565
- const v = h.state.dataUpdatedAt > x.state.dataUpdatedAt, m = o == null ? void 0 : o.find(
566
- (k) => k.queryHash === h.queryHash
567
- );
568
- v && (!m || h.state.dataUpdatedAt > m.state.dataUpdatedAt) && f.push(h);
569
- }
570
- }
571
- g.length > 0 && Oe(a, { queries: g }, u.current), f.length > 0 && i(
572
- (h) => h ? [...h, ...f] : f
573
- );
574
- }
575
- }, [a, o, r]), U.useEffect(() => {
576
- o && (Oe(a, { queries: o }, u.current), i(void 0));
577
- }, [a, o]), t;
578
- };
579
- const Nr = (t) => {
580
- const e = ee(t);
581
- return e.current = t, I(() => {
582
- e.current = t;
583
- }, [t]), e;
584
- }, Dr = () => {
585
- var o;
586
- const t = z(), e = A(), r = le(), n = Nr(r.pathname), a = (o = e.options.protectedRoutes) == null ? void 0 : o.some(
587
- (i) => ut({ path: i, end: !0 }, r.pathname)
588
- );
589
- if (I(() => {
590
- var i;
591
- a && !t.isAuthenticated && ((i = e.authentication) == null || i.signIn({
592
- redirectTo: n.current
593
- }));
594
- }, [a, t.isAuthenticated, e.authentication, n]), a && !t.isAuthenticated)
595
- return null;
596
- if (a && !t.isAuthEnabled)
597
- throw new $e("Authentication is not enabled", {
598
- title: "Authentication is not enabled",
599
- developerHint: "To use protectedRoutes you need authentication to be enabled"
600
- });
601
- return /* @__PURE__ */ s.jsx(ce, {});
602
- };
603
- function Mr({ error: t }) {
604
- return /* @__PURE__ */ s.jsx(Ue, { error: t });
605
- }
606
- /**
607
- * react-router v7.1.3
608
- *
609
- * Copyright (c) Remix Software Inc.
610
- *
611
- * This source code is licensed under the MIT license found in the
612
- * LICENSE.md file in the root directory of this source tree.
613
- *
614
- * @license MIT
615
- */
616
- function Or(t) {
617
- return /* @__PURE__ */ U.createElement(dt, { flushSync: Ft.flushSync, ...t });
618
- }
619
- const ie = he({ stagger: !1 }), Ar = new kr({
620
- defaultOptions: {
621
- queries: {
622
- staleTime: 1e3 * 60 * 5
623
- }
624
- }
625
- }), Er = ({
626
- router: t,
627
- hydrate: e = !1
628
- }) => /* @__PURE__ */ s.jsx(Le, { children: /* @__PURE__ */ s.jsx(He, { client: Ar, children: /* @__PURE__ */ s.jsx(Sr, { state: e ? window.DATA : void 0, children: /* @__PURE__ */ s.jsx(Re, { children: /* @__PURE__ */ s.jsx(ie.Provider, { value: { stagger: !e }, children: /* @__PURE__ */ s.jsx(Or, { router: t }) }) }) }) }) }), qr = ({
629
- router: t,
630
- context: e,
631
- queryClient: r,
632
- helmetContext: n
633
- }) => /* @__PURE__ */ s.jsx(Le, { children: /* @__PURE__ */ s.jsx(He, { client: r, children: /* @__PURE__ */ s.jsx(Re, { context: n, children: /* @__PURE__ */ s.jsx(ht, { router: t, context: e }) }) }) });
634
- var Z = { exports: {} }, Tr = Z.exports, Ae;
635
- function Ir() {
636
- return Ae || (Ae = 1, function(t, e) {
637
- (function(r, n) {
638
- n(e, Nt);
639
- })(Tr, function(r, n) {
640
- const a = {
641
- delay: 500,
642
- minDuration: 200,
643
- ssr: !0
644
- };
645
- function o() {
646
- const [u, d] = n.useState(!0);
647
- return n.useEffect(() => {
648
- d(!1);
649
- }, []), u;
650
- }
651
- function i(u, d) {
652
- d = Object.assign({}, a, d);
653
- const c = o() && d.ssr, g = c && u ? "DISPLAY" : "IDLE", [f, h] = n.useState(g), x = n.useRef(null);
654
- return n.useEffect(() => {
655
- if (u && (f === "IDLE" || c)) {
656
- clearTimeout(x.current);
657
- const v = c ? 0 : d.delay;
658
- x.current = setTimeout(() => {
659
- if (!u)
660
- return h("IDLE");
661
- x.current = setTimeout(() => {
662
- h("EXPIRE");
663
- }, d.minDuration), h("DISPLAY");
664
- }, v), c || h("DELAY");
665
- }
666
- !u && f !== "DISPLAY" && (clearTimeout(x.current), h("IDLE"));
667
- }, [u, f, d.delay, d.minDuration, c]), n.useEffect(() => () => clearTimeout(x.current), []), f === "DISPLAY" || f === "EXPIRE";
668
- }
669
- r.defaultOptions = a, r.useSpinDelay = i;
670
- });
671
- }(Z, Z.exports)), Z.exports;
672
- }
673
- var Qr = Ir();
674
- const Rr = () => {
675
- const t = le(), e = ee(t.pathname);
676
- I(() => {
677
- const r = e.current !== t.pathname, n = t.hash !== "";
678
- r && !n && window.scrollTo(0, 0), e.current = t.pathname;
679
- }, [t.pathname, t.hash]);
680
- };
681
- function Fr({
682
- className: t,
683
- ...e
684
- }) {
685
- return /* @__PURE__ */ s.jsx(
686
- "div",
687
- {
688
- className: Q("animate-pulse rounded-md bg-muted", t),
689
- ...e
690
- }
691
- );
692
- }
693
- const Ee = {
694
- info: "bg-blue-500",
695
- note: "bg-gray-500",
696
- tip: "bg-green-600",
697
- caution: "bg-orange-500",
698
- danger: "bg-rose-500"
699
- }, Br = () => {
700
- const { page: t } = A(), [e, r] = L(!0);
701
- if (!(t != null && t.banner) || !e)
702
- return /* @__PURE__ */ s.jsx("style", { children: ":root { --banner-height: 0px; }" });
703
- const n = t.banner.color && t.banner.color in Ee ? Ee[t.banner.color] : t.banner.color ? void 0 : "bg-primary", a = n ? {} : { backgroundColor: t.banner.color };
704
- return /* @__PURE__ */ s.jsxs(
705
- "div",
706
- {
707
- className: Q(
708
- "relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
709
- n
710
- ),
711
- style: a,
712
- children: [
713
- /* @__PURE__ */ s.jsx("div", { className: "w-full", children: t.banner.message }),
714
- t.banner.dismissible && /* @__PURE__ */ s.jsx(
715
- "button",
716
- {
717
- type: "button",
718
- className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
719
- onClick: () => r(!1),
720
- children: /* @__PURE__ */ s.jsx(Bt, { size: 16 })
721
- }
722
- )
723
- ]
724
- }
725
- );
726
- }, We = ({ className: t }) => {
727
- const e = A(), [r, n] = L(!1), a = Dt(() => n(!1), []);
728
- I(() => {
729
- if (r)
730
- return;
731
- function i(u) {
732
- u.key === "k" && (u.metaKey || u.ctrlKey) && (u.preventDefault(), n(!0));
733
- }
734
- return window.addEventListener("keydown", i), () => {
735
- window.removeEventListener("keydown", i);
736
- };
737
- }, [r, n]);
738
- const o = e.plugins.find(tr);
739
- return o ? /* @__PURE__ */ s.jsxs("div", { className: t, children: [
740
- /* @__PURE__ */ s.jsxs(
741
- "button",
742
- {
743
- type: "button",
744
- onClick: () => n(!0),
745
- className: "flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-full sm:w-72",
746
- children: [
747
- /* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
748
- /* @__PURE__ */ s.jsx(Ht, { size: 14 }),
749
- "Search"
750
- ] }),
751
- /* @__PURE__ */ s.jsx("kbd", { className: "absolute right-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: "⌘K" })
752
- ]
753
- }
754
- ),
755
- /* @__PURE__ */ s.jsx(fe, { fallback: null, children: o.renderSearch({
756
- isOpen: r,
757
- onClose: a
758
- }) })
759
- ] }) : null;
760
- }, Je = () => {
761
- const { resolvedTheme: t, setTheme: e } = xr();
762
- return /* @__PURE__ */ s.jsx(ge, { fallback: /* @__PURE__ */ s.jsx(ae, { variant: "ghost", size: "icon" }), children: /* @__PURE__ */ s.jsxs(
763
- "button",
764
- {
765
- type: "button",
766
- className: "flex rounded-full border p-0.5 gap-0.5 group",
767
- onClick: () => e(t === "dark" ? "light" : "dark"),
768
- "aria-label": t === "dark" ? "Switch to light mode" : "Switch to dark mode",
769
- children: [
770
- /* @__PURE__ */ s.jsx(
771
- "div",
772
- {
773
- className: Q(
774
- "border border-transparent rounded-full p-0.5 [&>svg>circle]:transition-colors [&>svg>path]:transition-transform transition-all [&>svg>path]:duration-200 [&>svg>circle]:duration-500 [&>svg>circle]:fill-transparent",
775
- t === "light" && "border-border bg-muted/50",
776
- t === "dark" && "group-hover:[&>svg>path]:scale-110 group-hover:[&>svg>path]:-translate-x-[1px] group-hover:[&>svg>path]:-translate-y-[1px] group-hover:rotate-[15deg] "
777
- ),
778
- children: /* @__PURE__ */ s.jsx(zt, { size: 16 })
779
- }
780
- ),
781
- /* @__PURE__ */ s.jsx(
782
- "div",
783
- {
784
- className: Q(
785
- "border border-transparent rounded-full p-0.5 transition-transform transform-gpu duration-500",
786
- t === "dark" && "border-border bg-muted [&>svg>path]:fill-white [&>svg>path]:stroke-transparent",
787
- t === "light" && "group-hover:rotate-[-10deg] [&>svg>path]:stroke-currentColor"
788
- ),
789
- children: /* @__PURE__ */ s.jsx(Lt, { size: 16 })
790
- }
791
- )
792
- ]
793
- }
794
- ) });
795
- }, et = (t) => (e) => e.display === "auth" && t || e.display === "anon" && !t || !e.display || e.display === "always", Hr = () => {
796
- const { topNavigation: t } = A(), { isAuthenticated: e } = z();
797
- return t.length <= 1 ? /* @__PURE__ */ s.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ s.jsx(fe, { children: /* @__PURE__ */ s.jsx("nav", { className: "hidden lg:block text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ s.jsx("ul", { className: "flex flex-row items-center gap-8", children: t.filter(et(e)).map((r) => /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(tt, { ...r }) }, r.id)) }) }) });
798
- }, tt = ({
799
- id: t,
800
- label: e,
801
- default: r
802
- }) => {
803
- var c;
804
- const { sidebars: n } = A(), a = n[t], o = ze(), i = !!ue().location, u = ((c = o.topNavItem) == null ? void 0 : c.id) === t && !i, d = r ?? (a ? wt(a, (g) => {
805
- if (g.type === "doc") return ne(g.id);
806
- }) : ne(t));
807
- if (!d)
808
- throw new $e("Page not found.", {
809
- developerHint: `No links found in top navigation for '${t}'. Check that the sidebar isn't empty or that a default link is set.`
810
- });
811
- return (
812
- // We don't use isActive here because it has to be inside the sidebar,
813
- // the top nav id doesn't necessarily start with the sidebar id
814
- /* @__PURE__ */ s.jsx(
815
- ft,
816
- {
817
- className: ({ isPending: g }) => vr(
818
- "block lg:py-3.5 font-medium -mb-px",
819
- u || g ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
820
- ),
821
- to: d,
822
- children: e
823
- }
824
- )
825
- );
826
- }, zr = () => {
827
- const { topNavigation: t } = A(), { isAuthenticated: e } = z(), [r, n] = L(!1);
828
- return /* @__PURE__ */ s.jsxs(
829
- Ze,
830
- {
831
- direction: "right",
832
- open: r,
833
- onOpenChange: (a) => n(a),
834
- children: [
835
- /* @__PURE__ */ s.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ s.jsx(Ye, { className: "lg:hidden", children: /* @__PURE__ */ s.jsx(Kt, { size: 22 }) }) }),
836
- /* @__PURE__ */ s.jsx(
837
- Ve,
838
- {
839
- className: "lg:hidden h-[100dvh] right-0 left-auto w-[320px] rounded-none",
840
- "aria-describedby": void 0,
841
- children: /* @__PURE__ */ s.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
842
- /* @__PURE__ */ s.jsx(_e, { children: /* @__PURE__ */ s.jsx(Xe, { children: "Navigation" }) }),
843
- /* @__PURE__ */ s.jsx(We, { className: "flex p-4" }),
844
- /* @__PURE__ */ s.jsxs("ul", { className: "flex flex-col items-center gap-4 p-4", children: [
845
- /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(Je, {}) }),
846
- t.filter(et(e)).map((a) => /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx("button", { onClick: () => n(!1), children: /* @__PURE__ */ s.jsx(tt, { ...a }) }) }, a.label))
847
- ] })
848
- ] })
849
- }
850
- )
851
- ]
852
- }
853
- );
854
- }, J = ({ item: t }) => t.children ? /* @__PURE__ */ s.jsxs(hr, { children: [
855
- /* @__PURE__ */ s.jsx(fr, { children: t.label }),
856
- /* @__PURE__ */ s.jsx(gr, { children: /* @__PURE__ */ s.jsx(mr, { children: t.children.map((e, r) => (
857
- // eslint-disable-next-line react/no-array-index-key
858
- /* @__PURE__ */ s.jsx(J, { item: e }, r)
859
- )) }) })
860
- ] }, t.label) : /* @__PURE__ */ s.jsx(de, { to: t.path ?? "", children: /* @__PURE__ */ s.jsxs(pr, { className: "flex gap-2", children: [
861
- t.icon && /* @__PURE__ */ s.jsx(t.icon, { size: 16, strokeWidth: 1, absoluteStrokeWidth: !0 }),
862
- t.label
863
- ] }, t.label) }), rt = Ke(function() {
864
- const e = z(), { isAuthenticated: r, profile: n, isAuthEnabled: a } = z(), o = A(), { page: i, plugins: u } = o, d = u.filter((c) => rr(c)).flatMap((c) => c.getProfileMenuItems(o)).sort((c) => c.weight ?? 0);
865
- return /* @__PURE__ */ s.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
866
- /* @__PURE__ */ s.jsx(Br, {}),
867
- /* @__PURE__ */ s.jsx("div", { className: "border-b", children: /* @__PURE__ */ s.jsxs("div", { className: "max-w-screen-2xl border-l border-r mx-auto grid grid-cols-[1fr_auto] lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center px-4 lg:px-12 h-[--top-header-height]", children: [
868
- /* @__PURE__ */ s.jsx("div", { className: "flex", children: /* @__PURE__ */ s.jsx(de, { to: "/", children: /* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-3.5", children: [
869
- (i == null ? void 0 : i.logo) && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
870
- /* @__PURE__ */ s.jsx(
871
- "img",
872
- {
873
- src: /https?:\/\//.test(i.logo.src.light) ? i.logo.src.light : Ne(
874
- "/",
875
- i.logo.src.light
876
- ),
877
- alt: i.logo.alt ?? i.pageTitle,
878
- style: { width: i.logo.width },
879
- className: "h-10 dark:hidden",
880
- loading: "lazy"
881
- }
882
- ),
883
- /* @__PURE__ */ s.jsx(
884
- "img",
885
- {
886
- src: /https?:\/\//.test(i.logo.src.dark) ? i.logo.src.dark : Ne(
887
- "/",
888
- i.logo.src.dark
889
- ),
890
- alt: i.logo.alt ?? i.pageTitle,
891
- style: { width: i.logo.width },
892
- className: "h-10 hidden dark:block",
893
- loading: "lazy"
894
- }
895
- )
896
- ] }),
897
- /* @__PURE__ */ s.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: i == null ? void 0 : i.pageTitle })
898
- ] }) }) }),
899
- /* @__PURE__ */ s.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
900
- /* @__PURE__ */ s.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ s.jsx(We, {}) }),
901
- /* @__PURE__ */ s.jsx(zr, {}),
902
- /* @__PURE__ */ s.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
903
- /* @__PURE__ */ s.jsx(D, { name: "head-navigation-start" }),
904
- a && /* @__PURE__ */ s.jsx(
905
- ge,
906
- {
907
- fallback: /* @__PURE__ */ s.jsx(Fr, { className: "rounded h-5 w-24 mr-4" }),
908
- children: r ? Object.values(d).length > 0 && /* @__PURE__ */ s.jsxs(lr, { modal: !1, children: [
909
- /* @__PURE__ */ s.jsx(cr, { asChild: !0, children: /* @__PURE__ */ s.jsx(ae, { variant: "ghost", children: n != null && n.name ? `${n.name}` : "My Account" }) }),
910
- /* @__PURE__ */ s.jsxs(ur, { className: "w-56", children: [
911
- /* @__PURE__ */ s.jsxs(dr, { children: [
912
- n != null && n.name ? `${n.name}` : "My Account",
913
- (n == null ? void 0 : n.email) && /* @__PURE__ */ s.jsx("div", { className: "font-normal text-muted-foreground", children: n.email })
914
- ] }),
915
- d.filter((c) => c.category === "top").length > 0 && /* @__PURE__ */ s.jsx(re, {}),
916
- d.filter((c) => c.category === "top").map((c) => /* @__PURE__ */ s.jsx(J, { item: c }, c.label)),
917
- d.filter(
918
- (c) => !c.category || c.category === "middle"
919
- ).length > 0 && /* @__PURE__ */ s.jsx(re, {}),
920
- d.filter(
921
- (c) => !c.category || c.category === "middle"
922
- ).map((c) => /* @__PURE__ */ s.jsx(J, { item: c }, c.label)),
923
- d.filter((c) => c.category === "bottom").length > 0 && /* @__PURE__ */ s.jsx(re, {}),
924
- d.filter((c) => c.category === "bottom").map((c) => /* @__PURE__ */ s.jsx(J, { item: c }, c.label))
925
- ] })
926
- ] }) : /* @__PURE__ */ s.jsx(ae, { variant: "ghost", onClick: () => e.login(), children: "Login" })
927
- }
928
- ),
929
- /* @__PURE__ */ s.jsx(D, { name: "head-navigation-end" }),
930
- /* @__PURE__ */ s.jsx(Je, {})
931
- ] })
932
- ] })
933
- ] }) }),
934
- /* @__PURE__ */ s.jsx("div", { className: "border-b", children: /* @__PURE__ */ s.jsxs("div", { className: "max-w-screen-2xl mx-auto border-l border-r", children: [
935
- /* @__PURE__ */ s.jsx(D, { name: "top-navigation-before" }),
936
- /* @__PURE__ */ s.jsx(Hr, {}),
937
- /* @__PURE__ */ s.jsx(D, { name: "top-navigation-after" })
938
- ] }) })
939
- ] });
940
- }), st = Mt(({ children: t, className: e, pushMainContent: r }, n) => /* @__PURE__ */ s.jsx(
941
- "nav",
942
- {
943
- "data-navigation": String(r),
944
- className: Q(
945
- "scrollbar peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0 border-r pr-10",
946
- "-mx-[--padding-nav-item] pb-20 pt-[--padding-content-top]",
947
- "w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2",
948
- !r && "border-r-0",
949
- e
950
- ),
951
- ref: n,
952
- children: t
953
- }
954
- ));
955
- st.displayName = "SidebarWrapper";
956
- const Lr = ({
957
- onRequestClose: t
958
- }) => {
959
- const e = ee(null), r = ze();
960
- return I(() => {
961
- var a;
962
- const n = (a = e.current) == null ? void 0 : a.querySelector('[aria-current="page"]');
963
- Ut(n ?? null);
964
- }, []), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
965
- /* @__PURE__ */ s.jsxs(
966
- st,
967
- {
968
- ref: e,
969
- pushMainContent: r.sidebar.length > 0,
970
- children: [
971
- /* @__PURE__ */ s.jsx(D, { name: "zudoku-before-navigation" }),
972
- r.sidebar.map((n) => /* @__PURE__ */ s.jsx(Se, { item: n }, n.label)),
973
- /* @__PURE__ */ s.jsx(D, { name: "zudoku-after-navigation" })
974
- ]
975
- }
976
- ),
977
- /* @__PURE__ */ s.jsx(
978
- Ve,
979
- {
980
- className: "lg:hidden h-[100dvh] left-0 w-[320px] rounded-none",
981
- "aria-describedby": void 0,
982
- children: /* @__PURE__ */ s.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
983
- /* @__PURE__ */ s.jsx(_e, { children: /* @__PURE__ */ s.jsx(Xe, { children: "Sidebar" }) }),
984
- r.sidebar.map((n) => /* @__PURE__ */ s.jsx(
985
- Se,
986
- {
987
- item: n,
988
- onRequestClose: t
989
- },
990
- n.label
991
- ))
992
- ] })
993
- }
994
- )
995
- ] });
996
- }, qe = () => /* @__PURE__ */ s.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ s.jsx(Ge, {}) }), Kr = ({ children: t }) => {
997
- const e = le(), { setActiveAnchor: r } = Xt(), { meta: n, authentication: a } = A();
998
- Zt(), Rr();
999
- const o = ee(e.pathname);
1000
- I(() => {
1001
- var g;
1002
- (g = a == null ? void 0 : a.onPageLoad) == null || g.call(a);
1003
- }, [a]), I(() => {
1004
- e.pathname !== o.current && r(""), o.current = e.pathname;
1005
- }, [e.pathname, r]);
1006
- const i = !!ue().location, u = Qr.useSpinDelay(i, {
1007
- delay: 300,
1008
- minDuration: 500
1009
- }), [d, c] = L(!1);
1010
- return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
1011
- !1,
1012
- /* @__PURE__ */ s.jsxs(oe, { titleTemplate: n == null ? void 0 : n.title, children: [
1013
- (n == null ? void 0 : n.description) && /* @__PURE__ */ s.jsx("meta", { name: "description", content: n.description }),
1014
- (n == null ? void 0 : n.favicon) && /* @__PURE__ */ s.jsx("link", { rel: "icon", href: n.favicon })
1015
- ] }),
1016
- /* @__PURE__ */ s.jsx(D, { name: "layout-before-head" }),
1017
- /* @__PURE__ */ s.jsx(rt, {}),
1018
- /* @__PURE__ */ s.jsx(D, { name: "layout-after-head" }),
1019
- /* @__PURE__ */ s.jsx("div", { className: "w-full max-w-screen-2xl mx-auto px-4 lg:px-12 border-l border-r", children: u ? /* @__PURE__ */ s.jsx(qe, {}) : /* @__PURE__ */ s.jsx(fe, { fallback: /* @__PURE__ */ s.jsx(qe, {}), children: /* @__PURE__ */ s.jsxs(
1020
- Ze,
1021
- {
1022
- direction: "left",
1023
- open: d,
1024
- onOpenChange: (g) => c(g),
1025
- children: [
1026
- /* @__PURE__ */ s.jsx(Lr, { onRequestClose: () => c(!1) }),
1027
- /* @__PURE__ */ s.jsx(
1028
- "div",
1029
- {
1030
- className: Q(
1031
- "lg:hidden -mx-10 px-10 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b",
1032
- "peer-data-[navigation=false]:hidden"
1033
- ),
1034
- children: /* @__PURE__ */ s.jsxs(Ye, { className: "flex items-center gap-2", children: [
1035
- /* @__PURE__ */ s.jsx($t, { size: 16, strokeWidth: 1.5 }),
1036
- /* @__PURE__ */ s.jsx("span", { className: "text-sm", children: "Menu" })
1037
- ] })
1038
- }
1039
- ),
1040
- /* @__PURE__ */ s.jsxs(
1041
- "main",
1042
- {
1043
- className: Q(
1044
- "h-full dark:border-white/10 translate-x-0",
1045
- "lg:overflow-visible",
1046
- // This works in tandem with the `SidebarWrapper` component
1047
- "lg:peer-data-[navigation=true]:w-[calc(100%-var(--side-nav-width))]",
1048
- "lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12"
1049
- ),
1050
- children: [
1051
- /* @__PURE__ */ s.jsx(D, { name: "zudoku-before-content" }),
1052
- t ?? /* @__PURE__ */ s.jsx(ce, {}),
1053
- /* @__PURE__ */ s.jsx(D, { name: "zudoku-after-content" })
1054
- ]
1055
- }
1056
- )
1057
- ]
1058
- }
1059
- ) }) })
1060
- ] });
1061
- }, $r = ({
1062
- title: t = "An error occurred",
1063
- message: e,
1064
- category: r
1065
- }) => /* @__PURE__ */ s.jsxs("div", { className: Gt + " h-full pt-[--padding-content-top]", children: [
1066
- r && /* @__PURE__ */ s.jsx(br, { children: r }),
1067
- t && /* @__PURE__ */ s.jsx(_t, { level: 1, className: "flex gap-3.5 items-center", children: t }),
1068
- /* @__PURE__ */ s.jsx("p", { children: e })
1069
- ] }), Ur = (t) => {
1070
- switch (t) {
1071
- case 400:
1072
- return {
1073
- title: "Bad Request",
1074
- message: "The request could not be understood by the server due to malformed syntax."
1075
- };
1076
- case 403:
1077
- return {
1078
- title: "Forbidden",
1079
- message: "You don't have permission to access this resource."
1080
- };
1081
- case 404:
1082
- return {
1083
- title: "Not Found",
1084
- message: "The requested resource could not be found."
1085
- };
1086
- case 405:
1087
- return {
1088
- title: "Method Not Allowed",
1089
- message: "The request method is not supported for the requested resource."
1090
- };
1091
- case 414:
1092
- return {
1093
- title: "Request URI Too Large",
1094
- message: "The request URI is too large."
1095
- };
1096
- case 416:
1097
- return {
1098
- title: "Range Not Satisfiable",
1099
- message: "The server cannot satisfy the request range."
1100
- };
1101
- case 500:
1102
- return {
1103
- title: "Internal Server Error",
1104
- message: "An unexpected error occurred while processing your request."
1105
- };
1106
- case 501:
1107
- return {
1108
- title: "Not Implemented",
1109
- message: "The server does not support the functionality required to fulfill the request."
1110
- };
1111
- case 502:
1112
- return {
1113
- title: "Bad Gateway",
1114
- message: "The server received an invalid response from the upstream server."
1115
- };
1116
- case 503:
1117
- return {
1118
- title: "Service Unavailable",
1119
- message: "The server is temporarily unable to handle the request."
1120
- };
1121
- case 504:
1122
- return {
1123
- title: "Gateway Timeout",
1124
- message: "The server did not receive a timely response from the upstream server."
1125
- };
1126
- default:
1127
- return {
1128
- title: "An error occurred",
1129
- message: "Something went wrong while processing your request."
1130
- };
1131
- }
1132
- }, Zr = ({ statusCode: t, message: e }) => {
1133
- const r = Ur(t);
1134
- return /* @__PURE__ */ s.jsx(
1135
- $r,
1136
- {
1137
- title: r.title,
1138
- message: e ?? r.message,
1139
- category: t
1140
- }
1141
- );
1142
- }, Yr = he(null), se = {
1143
- didCatch: !1,
1144
- error: null
1145
- };
1146
- class Vr extends Ot {
1147
- constructor(e) {
1148
- super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = se;
1149
- }
1150
- static getDerivedStateFromError(e) {
1151
- return {
1152
- didCatch: !0,
1153
- error: e
1154
- };
1155
- }
1156
- resetErrorBoundary() {
1157
- const {
1158
- error: e
1159
- } = this.state;
1160
- if (e !== null) {
1161
- for (var r, n, a = arguments.length, o = new Array(a), i = 0; i < a; i++)
1162
- o[i] = arguments[i];
1163
- (r = (n = this.props).onReset) === null || r === void 0 || r.call(n, {
1164
- args: o,
1165
- reason: "imperative-api"
1166
- }), this.setState(se);
1167
- }
1168
- }
1169
- componentDidCatch(e, r) {
1170
- var n, a;
1171
- (n = (a = this.props).onError) === null || n === void 0 || n.call(a, e, r);
1172
- }
1173
- componentDidUpdate(e, r) {
1174
- const {
1175
- didCatch: n
1176
- } = this.state, {
1177
- resetKeys: a
1178
- } = this.props;
1179
- if (n && r.error !== null && Xr(e.resetKeys, a)) {
1180
- var o, i;
1181
- (o = (i = this.props).onReset) === null || o === void 0 || o.call(i, {
1182
- next: a,
1183
- prev: e.resetKeys,
1184
- reason: "keys"
1185
- }), this.setState(se);
1186
- }
1187
- }
1188
- render() {
1189
- const {
1190
- children: e,
1191
- fallbackRender: r,
1192
- FallbackComponent: n,
1193
- fallback: a
1194
- } = this.props, {
1195
- didCatch: o,
1196
- error: i
1197
- } = this.state;
1198
- let u = e;
1199
- if (o) {
1200
- const d = {
1201
- error: i,
1202
- resetErrorBoundary: this.resetErrorBoundary
1203
- };
1204
- if (typeof r == "function")
1205
- u = r(d);
1206
- else if (n)
1207
- u = Ce(n, d);
1208
- else if (a !== void 0)
1209
- u = a;
1210
- else
1211
- throw i;
1212
- }
1213
- return Ce(Yr.Provider, {
1214
- value: {
1215
- didCatch: o,
1216
- error: i,
1217
- resetErrorBoundary: this.resetErrorBoundary
1218
- }
1219
- }, u);
1220
- }
1221
- }
1222
- function Xr() {
1223
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
1224
- return t.length !== e.length || t.some((r, n) => !Object.is(r, e[n]));
1225
- }
1226
- class Gr {
1227
- constructor(e) {
1228
- P(this, "plugins");
1229
- P(this, "sidebars");
1230
- P(this, "topNavigation");
1231
- P(this, "meta");
1232
- P(this, "page");
1233
- P(this, "authentication");
1234
- P(this, "navigationPlugins");
1235
- P(this, "initialize", async () => {
1236
- await Promise.all(
1237
- this.plugins.filter(nr).map((e) => {
1238
- var r;
1239
- return (r = e.initialize) == null ? void 0 : r.call(e, this);
1240
- })
1241
- );
1242
- });
1243
- P(this, "getApiIdentities", async () => (await Promise.all(
1244
- this.plugins.filter(ar).map((r) => r.getIdentities(this))
1245
- )).flat());
1246
- P(this, "getPluginSidebar", async (e) => (await Promise.all(
1247
- this.navigationPlugins.map(
1248
- (n) => {
1249
- var a;
1250
- return (a = n.getSidebar) == null ? void 0 : a.call(n, ne(e));
1251
- }
1252
- )
1253
- )).flatMap((n) => n ?? []));
1254
- P(this, "signRequest", async (e) => {
1255
- if (!this.authentication)
1256
- throw new Error("No authentication provider configured");
1257
- const r = await this.authentication.getAccessToken();
1258
- return e.headers.set("Authorization", `Bearer ${r}`), e;
1259
- });
1260
- this.options = e, this.plugins = e.plugins ?? [], this.topNavigation = e.topNavigation ?? [], this.sidebars = e.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(sr), this.authentication = e.authentication, this.meta = e.metadata, this.page = e.page;
1261
- }
1262
- }
1263
- function _r({ error: t, resetErrorBoundary: e }) {
1264
- return /* @__PURE__ */ s.jsx(Ue, { error: t });
1265
- }
1266
- const W = globalThis;
1267
- (!W.requestIdleCallback || !W.cancelIdleCallback) && (W.requestIdleCallback = (t) => setTimeout(t, 1), W.cancelIdleCallback = clearTimeout);
1268
- const nt = {
1269
- Header: rt
1270
- }, Wr = he(nt), Jr = Wr.Provider, es = ({
1271
- children: t,
1272
- context: e
1273
- }) => (Pt({
1274
- queryFn: async () => (await e.initialize(), !0),
1275
- queryKey: ["zudoku-initialize"]
1276
- }), /* @__PURE__ */ s.jsx(kt.Provider, { value: e, children: t })), at = Ke(
1277
- ({ children: t, ...e }) => {
1278
- var f, h;
1279
- const r = te(
1280
- () => ({ ...nt, ...e.overrides }),
1281
- [e.overrides]
1282
- ), n = te(() => {
1283
- var v;
1284
- return {
1285
- ...(e.plugins ?? []).filter(ir).flatMap(
1286
- (m) => m.getMdxComponents ? [m.getMdxComponents()] : []
1287
- ).reduce(
1288
- (m, k) => ({ ...m, ...k }),
1289
- {}
1290
- ),
1291
- ...Wt,
1292
- ...(v = e.mdx) == null ? void 0 : v.components
1293
- };
1294
- }, [(f = e.mdx) == null ? void 0 : f.components, e.plugins]), { stagger: a } = At(ie), [o, i] = L(!1), u = te(
1295
- () => o ? { stagger: !0 } : { stagger: a },
1296
- [a, o]
1297
- ), d = ue();
1298
- I(() => {
1299
- o || i(!0);
1300
- }, [o, d.location]);
1301
- const [c] = L(() => new Gr(e)), g = (h = e.plugins) == null ? void 0 : h.filter(or).map((x, v) => {
1302
- var m;
1303
- return /* @__PURE__ */ s.jsx(Et, { children: (m = x.getHead) == null ? void 0 : m.call(x) }, v);
1304
- });
1305
- return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
1306
- /* @__PURE__ */ s.jsx(oe, { children: g }),
1307
- /* @__PURE__ */ s.jsx(ie.Provider, { value: u, children: /* @__PURE__ */ s.jsx(es, { context: c, children: /* @__PURE__ */ s.jsx(Yt, { components: n, children: /* @__PURE__ */ s.jsx(yr, { attribute: "class", disableTransitionOnChange: !0, children: /* @__PURE__ */ s.jsx(Jr, { value: r, children: /* @__PURE__ */ s.jsx(qt, { slotlets: e.slotlets, children: /* @__PURE__ */ s.jsx(Jt, { children: t ?? /* @__PURE__ */ s.jsx(ce, {}) }) }) }) }) }) }) })
1308
- ] });
1309
- }
1310
- );
1311
- at.displayName = "ZudokoInner";
1312
- const it = (t) => /* @__PURE__ */ s.jsx(Vr, { FallbackComponent: _r, children: /* @__PURE__ */ s.jsx(at, { ...t }) });
1313
- it.displayName = "Zudoku";
1314
- const Ss = Vt, Ns = Kr, Ds = Tt, Ms = Mr, Os = Er, As = qr, Es = Dr, qs = oe, Ts = A, Is = z, Qs = Ct, Rs = St, Fs = it, Bs = Zr, Hs = Qt, zs = er, Ls = Ge, Ks = ge, $s = It, Us = de;
1
+ import "./RouteGuard-CqZPoZYJ.js";
2
+ import "./index-DwT-v3zK.js";
3
+ import "./chunk-HA7DTUK3-C4gP41vD.js";
4
+ import "./hook-CqpVYDqN.js";
5
+ import "./SlotletProvider-DXvc0aY6.js";
6
+ import { e as d, f as S, B as k, C as l, j as h, l as B, H as E, d as c, L as H, M as L, g as M, R, S as Z, k as f, i as g, Z as y, a as A, h as b, c as j, m as v, b as w } from "./index-D48iOQvJ.js";
7
+ import "./ui/Button.js";
8
+ import "./ui/Callout.js";
9
+ import "./ClientOnly-E7hGysn1.js";
10
+ import "./Markdown-aF5FdsNi.js";
11
+ import "./Spinner-CE68iCm0.js";
1315
12
  export {
1316
- Os as Bootstrap,
1317
- As as BootstrapStatic,
1318
- $s as Button,
1319
- Rs as CACHE_KEYS,
1320
- Hs as Callout,
1321
- Ks as ClientOnly,
1322
- qs as Head,
1323
- Ns as Layout,
1324
- Us as Link,
1325
- zs as Markdown,
1326
- Es as RouteGuard,
1327
- Ds as RouterError,
1328
- Ms as ServerError,
1329
- Ls as Spinner,
1330
- Bs as StatusPage,
1331
- Fs as Zudoku,
1332
- Is as useAuth,
1333
- Qs as useCache,
1334
- Ss as useMDXComponents,
1335
- Ts as useZudoku
13
+ d as Bootstrap,
14
+ S as BootstrapStatic,
15
+ k as Button,
16
+ l as CACHE_KEYS,
17
+ h as Callout,
18
+ B as ClientOnly,
19
+ E as Head,
20
+ c as Layout,
21
+ H as Link,
22
+ L as Markdown,
23
+ M as RouteGuard,
24
+ R as RouterError,
25
+ Z as ServerError,
26
+ f as Spinner,
27
+ g as StatusPage,
28
+ y as Zudoku,
29
+ A as useAuth,
30
+ b as useCache,
31
+ j as useMDXComponents,
32
+ v as useTheme,
33
+ w as useZudoku
1336
34
  };
1337
35
  //# sourceMappingURL=zudoku.components.js.map