zudoku 0.0.0-f3f6db5 → 0.0.0-f471fb8

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