zudoku 0.0.0-eb4182d → 0.0.0-eeace45

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 (936) hide show
  1. package/README.md +121 -0
  2. package/cli.js +2 -2
  3. package/client.d.ts +7 -0
  4. package/dist/app/demo.js +1 -3
  5. package/dist/app/demo.js.map +1 -1
  6. package/dist/app/entry.client.d.ts +1 -0
  7. package/dist/app/entry.client.js +16 -3
  8. package/dist/app/entry.client.js.map +1 -1
  9. package/dist/app/entry.server.d.ts +1 -0
  10. package/dist/app/entry.server.js +11 -8
  11. package/dist/app/entry.server.js.map +1 -1
  12. package/dist/app/main.d.ts +3 -2
  13. package/dist/app/main.js +16 -32
  14. package/dist/app/main.js.map +1 -1
  15. package/dist/app/sentry.d.ts +3 -0
  16. package/dist/app/sentry.js +19 -0
  17. package/dist/app/sentry.js.map +1 -0
  18. package/dist/app/standalone.js +1 -3
  19. package/dist/app/standalone.js.map +1 -1
  20. package/dist/app/tailwind.d.ts +2 -1
  21. package/dist/app/tailwind.js +64 -52
  22. package/dist/app/tailwind.js.map +1 -1
  23. package/dist/cli/cli.js +1 -4
  24. package/dist/cli/cli.js.map +1 -1
  25. package/dist/cli/cmds/build.js +1 -0
  26. package/dist/cli/cmds/build.js.map +1 -1
  27. package/dist/cli/cmds/dev.js +5 -0
  28. package/dist/cli/cmds/dev.js.map +1 -1
  29. package/dist/cli/common/logger.js +9 -0
  30. package/dist/cli/common/logger.js.map +1 -1
  31. package/dist/cli/common/machine-id/lib.js.map +1 -1
  32. package/dist/cli/common/outdated.js +2 -1
  33. package/dist/cli/common/outdated.js.map +1 -1
  34. package/dist/cli/common/utils/box.js.map +1 -1
  35. package/dist/cli/dev/handler.d.ts +1 -0
  36. package/dist/cli/dev/handler.js +3 -3
  37. package/dist/cli/dev/handler.js.map +1 -1
  38. package/dist/codegen.d.ts +3 -0
  39. package/dist/codegen.js +45 -0
  40. package/dist/codegen.js.map +1 -0
  41. package/dist/config/common.d.ts +8 -0
  42. package/dist/config/common.js +2 -0
  43. package/dist/config/common.js.map +1 -0
  44. package/dist/config/config.d.ts +3 -2
  45. package/dist/config/loader.d.ts +20 -0
  46. package/dist/config/loader.js +154 -0
  47. package/dist/config/loader.js.map +1 -0
  48. package/dist/config/validators/InputSidebarSchema.d.ts +35 -19
  49. package/dist/config/validators/InputSidebarSchema.js +7 -28
  50. package/dist/config/validators/InputSidebarSchema.js.map +1 -1
  51. package/dist/config/validators/SidebarSchema.d.ts +24 -1
  52. package/dist/config/validators/SidebarSchema.js +80 -44
  53. package/dist/config/validators/SidebarSchema.js.map +1 -1
  54. package/dist/config/validators/common.d.ts +4945 -0
  55. package/dist/config/validators/common.js +280 -0
  56. package/dist/config/validators/common.js.map +1 -0
  57. package/dist/config/validators/icon-types.d.ts +1 -0
  58. package/dist/config/validators/icon-types.js +2 -0
  59. package/dist/config/validators/icon-types.js.map +1 -0
  60. package/dist/config/validators/validate.d.ts +888 -453
  61. package/dist/config/validators/validate.js +14 -213
  62. package/dist/config/validators/validate.js.map +1 -1
  63. package/dist/index.d.ts +5 -1
  64. package/dist/index.js +1 -1
  65. package/dist/index.js.map +1 -1
  66. package/dist/lib/authentication/AuthenticationPlugin.d.ts +4 -2
  67. package/dist/lib/authentication/AuthenticationPlugin.js +3 -0
  68. package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -1
  69. package/dist/lib/authentication/authentication.d.ts +3 -3
  70. package/dist/lib/authentication/components/CallbackHandler.js +21 -31
  71. package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
  72. package/dist/lib/authentication/components/SignIn.js +1 -1
  73. package/dist/lib/authentication/components/SignIn.js.map +1 -1
  74. package/dist/lib/authentication/components/SignOut.js +1 -1
  75. package/dist/lib/authentication/components/SignOut.js.map +1 -1
  76. package/dist/lib/authentication/hook.d.ts +5 -4
  77. package/dist/lib/authentication/hook.js +1 -3
  78. package/dist/lib/authentication/hook.js.map +1 -1
  79. package/dist/lib/authentication/providers/auth0.js +12 -11
  80. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  81. package/dist/lib/authentication/providers/openid.d.ts +7 -1
  82. package/dist/lib/authentication/providers/openid.js +18 -27
  83. package/dist/lib/authentication/providers/openid.js.map +1 -1
  84. package/dist/lib/authentication/state.d.ts +25 -4
  85. package/dist/lib/authentication/state.js +28 -3
  86. package/dist/lib/authentication/state.js.map +1 -1
  87. package/dist/lib/authentication/use-broadcast/shared.d.ts +48 -0
  88. package/dist/lib/authentication/use-broadcast/shared.js +243 -0
  89. package/dist/lib/authentication/use-broadcast/shared.js.map +1 -0
  90. package/dist/lib/authentication/use-broadcast/useBroadcast.d.ts +24 -0
  91. package/dist/lib/authentication/use-broadcast/useBroadcast.js +106 -0
  92. package/dist/lib/authentication/use-broadcast/useBroadcast.js.map +1 -0
  93. package/dist/lib/components/AnchorLink.d.ts +1 -1
  94. package/dist/lib/components/AnchorLink.js +1 -1
  95. package/dist/lib/components/AnchorLink.js.map +1 -1
  96. package/dist/lib/components/Banner.js +7 -1
  97. package/dist/lib/components/Banner.js.map +1 -1
  98. package/dist/lib/components/Bootstrap.d.ts +4 -3
  99. package/dist/lib/components/Bootstrap.js +12 -6
  100. package/dist/lib/components/Bootstrap.js.map +1 -1
  101. package/dist/lib/components/ClientOnly.d.ts +4 -2
  102. package/dist/lib/components/ClientOnly.js +1 -1
  103. package/dist/lib/components/ClientOnly.js.map +1 -1
  104. package/dist/lib/components/DeveloperHint.js +2 -1
  105. package/dist/lib/components/DeveloperHint.js.map +1 -1
  106. package/dist/lib/components/ErrorPage.js +1 -2
  107. package/dist/lib/components/ErrorPage.js.map +1 -1
  108. package/dist/lib/components/Header.js +21 -10
  109. package/dist/lib/components/Header.js.map +1 -1
  110. package/dist/lib/components/Heading.d.ts +4 -4
  111. package/dist/lib/components/Heading.js +1 -1
  112. package/dist/lib/components/Heading.js.map +1 -1
  113. package/dist/lib/components/Layout.js +14 -5
  114. package/dist/lib/components/Layout.js.map +1 -1
  115. package/dist/lib/components/Markdown.js +1 -1
  116. package/dist/lib/components/Markdown.js.map +1 -1
  117. package/dist/lib/components/MobileTopNavigation.js +9 -6
  118. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  119. package/dist/lib/components/NotFoundPage.js +1 -1
  120. package/dist/lib/components/NotFoundPage.js.map +1 -1
  121. package/dist/lib/components/ReactMarkdown.d.ts +29 -0
  122. package/dist/lib/components/ReactMarkdown.js +182 -0
  123. package/dist/lib/components/ReactMarkdown.js.map +1 -0
  124. package/dist/lib/components/Search.d.ts +3 -1
  125. package/dist/lib/components/Search.js +3 -3
  126. package/dist/lib/components/Search.js.map +1 -1
  127. package/dist/lib/components/SlotletProvider.d.ts +11 -3
  128. package/dist/lib/components/SlotletProvider.js +4 -2
  129. package/dist/lib/components/SlotletProvider.js.map +1 -1
  130. package/dist/lib/components/SyntaxHighlight.js +19 -16
  131. package/dist/lib/components/SyntaxHighlight.js.map +1 -1
  132. package/dist/lib/components/ThemeSwitch.d.ts +1 -0
  133. package/dist/lib/components/ThemeSwitch.js +13 -0
  134. package/dist/lib/components/ThemeSwitch.js.map +1 -0
  135. package/dist/lib/components/TopNavigation.d.ts +5 -0
  136. package/dist/lib/components/TopNavigation.js +44 -5
  137. package/dist/lib/components/TopNavigation.js.map +1 -1
  138. package/dist/lib/components/{DevPortal.d.ts → Zudoku.d.ts} +3 -3
  139. package/dist/lib/components/{DevPortal.js → Zudoku.js} +14 -15
  140. package/dist/lib/components/Zudoku.js.map +1 -0
  141. package/dist/lib/components/context/ZudokuContext.d.ts +10 -14
  142. package/dist/lib/components/context/ZudokuContext.js +27 -26
  143. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  144. package/dist/lib/components/context/ZudokuProvider.d.ts +2 -2
  145. package/dist/lib/components/context/ZudokuProvider.js.map +1 -1
  146. package/dist/lib/components/index.d.ts +38 -16
  147. package/dist/lib/components/index.js +16 -6
  148. package/dist/lib/components/index.js.map +1 -1
  149. package/dist/lib/components/navigation/Sidebar.d.ts +3 -1
  150. package/dist/lib/components/navigation/Sidebar.js +4 -4
  151. package/dist/lib/components/navigation/Sidebar.js.map +1 -1
  152. package/dist/lib/components/navigation/SidebarBadge.d.ts +0 -9
  153. package/dist/lib/components/navigation/SidebarBadge.js +0 -9
  154. package/dist/lib/components/navigation/SidebarBadge.js.map +1 -1
  155. package/dist/lib/components/navigation/SidebarCategory.d.ts +2 -2
  156. package/dist/lib/components/navigation/SidebarCategory.js +18 -10
  157. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  158. package/dist/lib/components/navigation/SidebarItem.d.ts +2 -4
  159. package/dist/lib/components/navigation/SidebarItem.js +12 -12
  160. package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
  161. package/dist/lib/components/navigation/SidebarWrapper.js +1 -1
  162. package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
  163. package/dist/lib/components/navigation/utils.js +11 -15
  164. package/dist/lib/components/navigation/utils.js.map +1 -1
  165. package/dist/lib/core/{DevPortalContext.d.ts → ZudokuContext.d.ts} +7 -14
  166. package/dist/lib/core/{DevPortalContext.js → ZudokuContext.js} +2 -7
  167. package/dist/lib/core/ZudokuContext.js.map +1 -0
  168. package/dist/lib/core/plugins.d.ts +18 -13
  169. package/dist/lib/core/plugins.js.map +1 -1
  170. package/dist/lib/errors/ErrorAlert.d.ts +1 -1
  171. package/dist/lib/errors/ErrorAlert.js +8 -3
  172. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  173. package/dist/lib/errors/RouterError.js +1 -1
  174. package/dist/lib/errors/RouterError.js.map +1 -1
  175. package/dist/lib/oas/graphql/index.js +10 -11
  176. package/dist/lib/oas/graphql/index.js.map +1 -1
  177. package/dist/lib/oas/parser/upgrade/index.d.ts +2 -2
  178. package/dist/lib/oas/parser/upgrade/index.js +2 -17
  179. package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
  180. package/dist/lib/plugins/api-catalog/Catalog.d.ts +2 -0
  181. package/dist/lib/plugins/api-catalog/Catalog.js +36 -0
  182. package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -0
  183. package/dist/lib/plugins/api-catalog/index.d.ts +30 -0
  184. package/dist/lib/plugins/api-catalog/index.js +15 -0
  185. package/dist/lib/plugins/api-catalog/index.js.map +1 -0
  186. package/dist/lib/plugins/api-keys/CreateApiKey.js +2 -2
  187. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
  188. package/dist/lib/plugins/api-keys/ProtectedRoute.js +1 -1
  189. package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -1
  190. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +1 -1
  191. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  192. package/dist/lib/plugins/api-keys/index.d.ts +9 -9
  193. package/dist/lib/plugins/api-keys/index.js +3 -0
  194. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  195. package/dist/lib/plugins/custom-pages/CustomPage.d.ts +2 -0
  196. package/dist/lib/plugins/custom-pages/CustomPage.js +11 -0
  197. package/dist/lib/plugins/custom-pages/CustomPage.js.map +1 -0
  198. package/dist/lib/plugins/custom-pages/index.d.ts +10 -0
  199. package/dist/lib/plugins/custom-pages/index.js +11 -0
  200. package/dist/lib/plugins/custom-pages/index.js.map +1 -0
  201. package/dist/lib/plugins/markdown/MdxPage.d.ts +9 -1
  202. package/dist/lib/plugins/markdown/MdxPage.js +16 -3
  203. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  204. package/dist/lib/plugins/markdown/index.d.ts +8 -7
  205. package/dist/lib/plugins/markdown/index.js +31 -3
  206. package/dist/lib/plugins/markdown/index.js.map +1 -1
  207. package/dist/lib/plugins/markdown/resolver.d.ts +38 -0
  208. package/dist/lib/plugins/markdown/resolver.js +75 -0
  209. package/dist/lib/plugins/markdown/resolver.js.map +1 -0
  210. package/dist/lib/plugins/openapi/CollapsibleCode.d.ts +5 -0
  211. package/dist/lib/plugins/openapi/CollapsibleCode.js +24 -0
  212. package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -0
  213. package/dist/lib/plugins/openapi/ColorizedParam.js +13 -9
  214. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  215. package/dist/lib/plugins/openapi/Endpoint.d.ts +1 -1
  216. package/dist/lib/plugins/openapi/Endpoint.js +5 -9
  217. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  218. package/dist/lib/plugins/openapi/OperationList.d.ts +2 -2
  219. package/dist/lib/plugins/openapi/OperationList.js +43 -23
  220. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  221. package/dist/lib/plugins/openapi/OperationListItem.d.ts +2 -1
  222. package/dist/lib/plugins/openapi/OperationListItem.js +14 -4
  223. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  224. package/dist/lib/plugins/openapi/ParameterListItem.js +6 -1
  225. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  226. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +7 -3
  227. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  228. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +9 -2
  229. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  230. package/dist/lib/plugins/openapi/Route.d.ts +7 -5
  231. package/dist/lib/plugins/openapi/Route.js +23 -5
  232. package/dist/lib/plugins/openapi/Route.js.map +1 -1
  233. package/dist/lib/plugins/openapi/Sidecar.d.ts +1 -1
  234. package/dist/lib/plugins/openapi/Sidecar.js +38 -46
  235. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  236. package/dist/lib/plugins/openapi/client/GraphQLClient.d.ts +8 -0
  237. package/dist/lib/plugins/openapi/client/GraphQLClient.js +114 -0
  238. package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -0
  239. package/dist/lib/plugins/openapi/client/GraphQLContext.d.ts +7 -0
  240. package/dist/lib/plugins/openapi/client/GraphQLContext.js +5 -0
  241. package/dist/lib/plugins/openapi/client/GraphQLContext.js.map +1 -0
  242. package/dist/lib/plugins/openapi/client/createServer.d.ts +1 -0
  243. package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +5 -0
  244. package/dist/lib/plugins/openapi/client/useCreateQuery.js +24 -0
  245. package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -0
  246. package/dist/lib/plugins/openapi/client/worker.d.ts +4 -1
  247. package/dist/lib/plugins/openapi/client/worker.js +23 -14
  248. package/dist/lib/plugins/openapi/client/worker.js.map +1 -1
  249. package/dist/lib/plugins/openapi/context.d.ts +3 -3
  250. package/dist/lib/plugins/openapi/graphql/fragment-masking.d.ts +3 -3
  251. package/dist/lib/plugins/openapi/graphql/fragment-masking.js +3 -4
  252. package/dist/lib/plugins/openapi/graphql/fragment-masking.js.map +1 -1
  253. package/dist/lib/plugins/openapi/graphql/gql.d.ts +5 -51
  254. package/dist/lib/plugins/openapi/graphql/gql.js +5 -3
  255. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  256. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +34 -8
  257. package/dist/lib/plugins/openapi/graphql/graphql.js +195 -662
  258. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  259. package/dist/lib/plugins/openapi/index.d.ts +2 -2
  260. package/dist/lib/plugins/openapi/index.js +56 -68
  261. package/dist/lib/plugins/openapi/index.js.map +1 -1
  262. package/dist/lib/plugins/openapi/interfaces.d.ts +20 -1
  263. package/dist/lib/plugins/openapi/playground/PathParams.js +1 -1
  264. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  265. package/dist/lib/plugins/openapi/playground/Playground.js +3 -2
  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/ResponseTab.js +1 -1
  270. package/dist/lib/plugins/openapi/playground/ResponseTab.js.map +1 -1
  271. package/dist/lib/plugins/openapi/post-processors/removeExtensions.d.ts +6 -0
  272. package/dist/lib/plugins/openapi/post-processors/removeExtensions.js +14 -0
  273. package/dist/lib/plugins/openapi/post-processors/removeExtensions.js.map +1 -0
  274. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.d.ts +1 -0
  275. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js +125 -0
  276. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js.map +1 -0
  277. package/dist/lib/plugins/openapi/post-processors/removePaths.d.ts +11 -0
  278. package/dist/lib/plugins/openapi/post-processors/removePaths.js +33 -0
  279. package/dist/lib/plugins/openapi/post-processors/removePaths.js.map +1 -0
  280. package/dist/lib/plugins/openapi/post-processors/removePaths.test.d.ts +1 -0
  281. package/dist/lib/plugins/openapi/post-processors/removePaths.test.js +104 -0
  282. package/dist/lib/plugins/openapi/post-processors/removePaths.test.js.map +1 -0
  283. package/dist/lib/plugins/openapi/post-processors/traverse.d.ts +1 -0
  284. package/dist/lib/plugins/openapi/post-processors/traverse.js +2 -0
  285. package/dist/lib/plugins/openapi/post-processors/traverse.js.map +1 -0
  286. package/dist/lib/plugins/openapi/schema/SchemaView.js +2 -1
  287. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  288. package/dist/lib/plugins/openapi/util/generateSchemaExample.d.ts +0 -1
  289. package/dist/lib/plugins/openapi/util/generateSchemaExample.js +25 -36
  290. package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
  291. package/dist/lib/plugins/openapi/util/methodToColor.d.ts +20 -0
  292. package/dist/lib/plugins/openapi/util/methodToColor.js +24 -0
  293. package/dist/lib/plugins/openapi/util/methodToColor.js.map +1 -0
  294. package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.d.ts +1 -0
  295. package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.js +27 -0
  296. package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.js.map +1 -0
  297. package/dist/lib/plugins/openapi-worker.d.ts +1 -1
  298. package/dist/lib/plugins/openapi-worker.js +7 -1
  299. package/dist/lib/plugins/openapi-worker.js.map +1 -1
  300. package/dist/lib/plugins/redirect/index.d.ts +4 -7
  301. package/dist/lib/plugins/redirect/index.js +2 -2
  302. package/dist/lib/plugins/redirect/index.js.map +1 -1
  303. package/dist/lib/plugins/search-inkeep/index.d.ts +24 -5
  304. package/dist/lib/plugins/search-inkeep/index.js +41 -5
  305. package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
  306. package/dist/lib/plugins/search-inkeep/inkeep.d.ts +3 -4
  307. package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -1
  308. package/dist/lib/ui/Accordion.d.ts +7 -0
  309. package/dist/lib/ui/Accordion.js +14 -0
  310. package/dist/lib/ui/Accordion.js.map +1 -0
  311. package/dist/lib/ui/ActionButton.d.ts +4 -0
  312. package/dist/lib/ui/ActionButton.js +10 -0
  313. package/dist/lib/ui/ActionButton.js.map +1 -0
  314. package/dist/lib/ui/Alert.d.ts +8 -0
  315. package/dist/lib/ui/Alert.js +23 -0
  316. package/dist/lib/ui/Alert.js.map +1 -0
  317. package/dist/lib/ui/AlertDialog.d.ts +20 -0
  318. package/dist/lib/ui/AlertDialog.js +27 -0
  319. package/dist/lib/ui/AlertDialog.js.map +1 -0
  320. package/dist/lib/ui/AspectRatio.d.ts +3 -0
  321. package/dist/lib/ui/AspectRatio.js +4 -0
  322. package/dist/lib/ui/AspectRatio.js.map +1 -0
  323. package/dist/lib/ui/Badge.d.ts +9 -0
  324. package/dist/lib/ui/Badge.js +21 -0
  325. package/dist/lib/ui/Badge.js.map +1 -0
  326. package/dist/lib/ui/Breadcrumb.d.ts +19 -0
  327. package/dist/lib/ui/Breadcrumb.js +24 -0
  328. package/dist/lib/ui/Breadcrumb.js.map +1 -0
  329. package/dist/lib/ui/Button.d.ts +2 -3
  330. package/dist/lib/ui/Button.js +1 -1
  331. package/dist/lib/ui/Button.js.map +1 -1
  332. package/dist/lib/ui/Callout.d.ts +36 -35
  333. package/dist/lib/ui/Callout.js.map +1 -1
  334. package/dist/lib/ui/Carousel.d.ts +18 -0
  335. package/dist/lib/ui/Carousel.js +99 -0
  336. package/dist/lib/ui/Carousel.js.map +1 -0
  337. package/dist/lib/ui/Checkbox.d.ts +4 -0
  338. package/dist/lib/ui/Checkbox.js +9 -0
  339. package/dist/lib/ui/Checkbox.js.map +1 -0
  340. package/dist/lib/ui/Collapsible.d.ts +5 -0
  341. package/dist/lib/ui/Collapsible.js +6 -0
  342. package/dist/lib/ui/Collapsible.js.map +1 -0
  343. package/dist/lib/ui/Command.d.ts +80 -0
  344. package/dist/lib/ui/Command.js +31 -0
  345. package/dist/lib/ui/Command.js.map +1 -0
  346. package/dist/lib/{components → ui}/Dialog.js +2 -2
  347. package/dist/lib/ui/Dialog.js.map +1 -0
  348. package/dist/lib/ui/Drawer.d.ts +8 -10
  349. package/dist/lib/ui/Drawer.js.map +1 -1
  350. package/dist/lib/ui/Form.d.ts +23 -0
  351. package/dist/lib/ui/Form.js +63 -0
  352. package/dist/lib/ui/Form.js.map +1 -0
  353. package/dist/lib/ui/HoverCard.d.ts +6 -0
  354. package/dist/lib/ui/HoverCard.js +10 -0
  355. package/dist/lib/ui/HoverCard.js.map +1 -0
  356. package/dist/lib/ui/Label.d.ts +5 -0
  357. package/dist/lib/ui/Label.js +10 -0
  358. package/dist/lib/ui/Label.js.map +1 -0
  359. package/dist/lib/ui/Pagination.d.ts +28 -0
  360. package/dist/lib/ui/Pagination.js +24 -0
  361. package/dist/lib/ui/Pagination.js.map +1 -0
  362. package/dist/lib/ui/Popover.d.ts +6 -0
  363. package/dist/lib/ui/Popover.js +10 -0
  364. package/dist/lib/ui/Popover.js.map +1 -0
  365. package/dist/lib/ui/Progress.d.ts +4 -0
  366. package/dist/lib/ui/Progress.js +8 -0
  367. package/dist/lib/ui/Progress.js.map +1 -0
  368. package/dist/lib/ui/RadioGroup.d.ts +5 -0
  369. package/dist/lib/ui/RadioGroup.js +15 -0
  370. package/dist/lib/ui/RadioGroup.js.map +1 -0
  371. package/dist/lib/ui/ScrollArea.d.ts +5 -0
  372. package/dist/lib/ui/ScrollArea.js +12 -0
  373. package/dist/lib/ui/ScrollArea.js.map +1 -0
  374. package/dist/lib/ui/Select.js.map +1 -0
  375. package/dist/lib/ui/Skeleton.d.ts +2 -0
  376. package/dist/lib/ui/Skeleton.js +7 -0
  377. package/dist/lib/ui/Skeleton.js.map +1 -0
  378. package/dist/lib/ui/Slider.d.ts +4 -0
  379. package/dist/lib/ui/Slider.js +8 -0
  380. package/dist/lib/ui/Slider.js.map +1 -0
  381. package/dist/lib/ui/Switch.d.ts +4 -0
  382. package/dist/lib/ui/Switch.js +8 -0
  383. package/dist/lib/ui/Switch.js.map +1 -0
  384. package/dist/lib/ui/Textarea.d.ts +4 -0
  385. package/dist/lib/ui/Textarea.js +9 -0
  386. package/dist/lib/ui/Textarea.js.map +1 -0
  387. package/dist/lib/ui/Toggle.d.ts +12 -0
  388. package/dist/lib/ui/Toggle.js +26 -0
  389. package/dist/lib/ui/Toggle.js.map +1 -0
  390. package/dist/lib/ui/ToggleGroup.d.ts +12 -0
  391. package/dist/lib/ui/ToggleGroup.js +21 -0
  392. package/dist/lib/ui/ToggleGroup.js.map +1 -0
  393. package/dist/lib/ui/Tooltip.d.ts +7 -0
  394. package/dist/lib/ui/Tooltip.js +11 -0
  395. package/dist/lib/ui/Tooltip.js.map +1 -0
  396. package/dist/lib/util/MdxComponents.d.ts +19 -20
  397. package/dist/lib/util/MdxComponents.js +1 -3
  398. package/dist/lib/util/MdxComponents.js.map +1 -1
  399. package/dist/lib/util/createVariantComponent.d.ts +2 -2
  400. package/dist/lib/util/invariant.d.ts +9 -0
  401. package/dist/lib/util/invariant.js +7 -3
  402. package/dist/lib/util/invariant.js.map +1 -1
  403. package/dist/lib/util/traverse.d.ts +2 -0
  404. package/dist/lib/util/traverse.js +18 -0
  405. package/dist/lib/util/traverse.js.map +1 -0
  406. package/dist/lib/util/useExposedProps.d.ts +2 -0
  407. package/dist/lib/util/useExposedProps.js +9 -0
  408. package/dist/lib/util/useExposedProps.js.map +1 -0
  409. package/dist/lib/util/useIsomorphicLayoutEffect.d.ts +3 -0
  410. package/dist/lib/util/useIsomorphicLayoutEffect.js +4 -0
  411. package/dist/lib/util/useIsomorphicLayoutEffect.js.map +1 -0
  412. package/dist/lib/util/useOnScreen.d.ts +4 -0
  413. package/dist/lib/util/useOnScreen.js +19 -0
  414. package/dist/lib/util/useOnScreen.js.map +1 -0
  415. package/dist/lib/util/useScrollToAnchor.js +1 -1
  416. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  417. package/dist/lib/util/useScrollToTop.js +1 -1
  418. package/dist/lib/util/useScrollToTop.js.map +1 -1
  419. package/dist/vite/build.js +26 -5
  420. package/dist/vite/build.js.map +1 -1
  421. package/dist/vite/config.d.ts +6 -10
  422. package/dist/vite/config.js +91 -78
  423. package/dist/vite/config.js.map +1 -1
  424. package/dist/vite/config.test.js +7 -5
  425. package/dist/vite/config.test.js.map +1 -1
  426. package/dist/vite/css/collect.d.ts +2 -0
  427. package/dist/vite/css/collect.js +27 -0
  428. package/dist/vite/css/collect.js.map +1 -0
  429. package/dist/vite/css/plugin.d.ts +5 -0
  430. package/dist/vite/css/plugin.js +79 -0
  431. package/dist/vite/css/plugin.js.map +1 -0
  432. package/dist/vite/debug.d.ts +1 -0
  433. package/dist/vite/debug.js +10 -0
  434. package/dist/vite/debug.js.map +1 -0
  435. package/dist/vite/dev-server.d.ts +7 -1
  436. package/dist/vite/dev-server.js +35 -8
  437. package/dist/vite/dev-server.js.map +1 -1
  438. package/dist/vite/html.js +0 -2
  439. package/dist/vite/html.js.map +1 -1
  440. package/dist/vite/output.d.ts +101 -0
  441. package/dist/vite/output.js +62 -0
  442. package/dist/vite/output.js.map +1 -0
  443. package/dist/vite/plugin-api.js +100 -20
  444. package/dist/vite/plugin-api.js.map +1 -1
  445. package/dist/vite/plugin-component.js +17 -12
  446. package/dist/vite/plugin-component.js.map +1 -1
  447. package/dist/vite/plugin-config-reload.d.ts +1 -2
  448. package/dist/vite/plugin-config-reload.js +0 -2
  449. package/dist/vite/plugin-config-reload.js.map +1 -1
  450. package/dist/vite/plugin-config.d.ts +2 -3
  451. package/dist/vite/plugin-config.js +22 -3
  452. package/dist/vite/plugin-config.js.map +1 -1
  453. package/dist/vite/plugin-custom-pages.d.ts +4 -0
  454. package/dist/vite/plugin-custom-pages.js +30 -0
  455. package/dist/vite/plugin-custom-pages.js.map +1 -0
  456. package/dist/vite/plugin-docs.js +37 -26
  457. package/dist/vite/plugin-docs.js.map +1 -1
  458. package/dist/vite/plugin-docs.test.js +15 -23
  459. package/dist/vite/plugin-docs.test.js.map +1 -1
  460. package/dist/vite/plugin-frontmatter.d.ts +2 -1
  461. package/dist/vite/plugin-frontmatter.js +27 -24
  462. package/dist/vite/plugin-frontmatter.js.map +1 -1
  463. package/dist/vite/plugin-mdx.d.ts +0 -6
  464. package/dist/vite/plugin-mdx.js +80 -6
  465. package/dist/vite/plugin-mdx.js.map +1 -1
  466. package/dist/vite/plugin-search.d.ts +3 -0
  467. package/dist/vite/plugin-search.js +26 -0
  468. package/dist/vite/plugin-search.js.map +1 -0
  469. package/dist/vite/plugin-sidebar.js +7 -6
  470. package/dist/vite/plugin-sidebar.js.map +1 -1
  471. package/dist/vite/{plugin-custom-css.d.ts → plugin-theme-css.d.ts} +2 -2
  472. package/dist/vite/plugin-theme-css.js +114 -0
  473. package/dist/vite/plugin-theme-css.js.map +1 -0
  474. package/dist/vite/plugin.d.ts +1 -2
  475. package/dist/vite/plugin.js +12 -6
  476. package/dist/vite/plugin.js.map +1 -1
  477. package/dist/vite/prerender.d.ts +6 -1
  478. package/dist/vite/prerender.js +7 -5
  479. package/dist/vite/prerender.js.map +1 -1
  480. package/dist/vite/remarkStaticGeneration.d.ts +3 -0
  481. package/dist/vite/remarkStaticGeneration.js +125 -0
  482. package/dist/vite/remarkStaticGeneration.js.map +1 -0
  483. package/dist/vite/sitemap.d.ts +1 -1
  484. package/dist/zuplo/env.d.ts +6 -0
  485. package/dist/zuplo/env.js +9 -0
  486. package/dist/zuplo/env.js.map +1 -0
  487. package/dist/zuplo/with-zuplo.d.ts +3 -0
  488. package/dist/zuplo/with-zuplo.js +28 -0
  489. package/dist/zuplo/with-zuplo.js.map +1 -0
  490. package/lib/AnchorLink-DFZZbmvr.js +34 -0
  491. package/lib/AnchorLink-DFZZbmvr.js.map +1 -0
  492. package/lib/{AuthenticationPlugin-Bx9FK124.js → AuthenticationPlugin-DVLEc6cm.js} +23 -20
  493. package/lib/AuthenticationPlugin-DVLEc6cm.js.map +1 -0
  494. package/lib/Button-DeAoTouo.js +48 -0
  495. package/lib/Button-DeAoTouo.js.map +1 -0
  496. package/lib/CategoryHeading-CBconmtI.js +10 -0
  497. package/lib/{CategoryHeading-ovR-zHRq.js.map → CategoryHeading-CBconmtI.js.map} +1 -1
  498. package/lib/ClientOnly-E7hGysn1.js +11 -0
  499. package/lib/ClientOnly-E7hGysn1.js.map +1 -0
  500. package/lib/Dialog-Bxv1yEIg.js +67 -0
  501. package/lib/Dialog-Bxv1yEIg.js.map +1 -0
  502. package/lib/Markdown-CZDLNOFc.js +15202 -0
  503. package/lib/Markdown-CZDLNOFc.js.map +1 -0
  504. package/lib/MdxPage-DKMbBROv.js +188 -0
  505. package/lib/MdxPage-DKMbBROv.js.map +1 -0
  506. package/lib/OperationList-BKHUKlAL.js +5062 -0
  507. package/lib/OperationList-BKHUKlAL.js.map +1 -0
  508. package/lib/Route-DYwKZ_c_.js +35 -0
  509. package/lib/Route-DYwKZ_c_.js.map +1 -0
  510. package/lib/Select-B_IxRUUC.js +223 -0
  511. package/lib/Select-B_IxRUUC.js.map +1 -0
  512. package/lib/SlotletProvider-pfc9oejW.js +221 -0
  513. package/lib/SlotletProvider-pfc9oejW.js.map +1 -0
  514. package/lib/{Spinner-3cQDBVGr.js → Spinner-DuxJLLNE.js} +2 -2
  515. package/lib/{Spinner-3cQDBVGr.js.map → Spinner-DuxJLLNE.js.map} +1 -1
  516. package/lib/StaggeredRender-DgsamH_G.js +17 -0
  517. package/lib/StaggeredRender-DgsamH_G.js.map +1 -0
  518. package/lib/SyntaxHighlight-Bz-lOJtH.js +2979 -0
  519. package/lib/SyntaxHighlight-Bz-lOJtH.js.map +1 -0
  520. package/lib/ZudokuContext-hmLMUdf2.js +1217 -0
  521. package/lib/ZudokuContext-hmLMUdf2.js.map +1 -0
  522. package/lib/__vite-browser-external-BYRIRx8p.js +9 -0
  523. package/lib/__vite-browser-external-BYRIRx8p.js.map +1 -0
  524. package/lib/{index-CLd8ycZz.js → assets/index-C7jnHK4b.js} +1008 -957
  525. package/lib/assets/index-C7jnHK4b.js.map +1 -0
  526. package/lib/assets/{worker-Bcj4NA2p.js → worker-D2kRl-cG.js} +6035 -5375
  527. package/lib/assets/worker-D2kRl-cG.js.map +1 -0
  528. package/lib/chunk-D52XG6IA-Dl7HLe6j.js +1823 -0
  529. package/lib/chunk-D52XG6IA-Dl7HLe6j.js.map +1 -0
  530. package/lib/cn-qaFjX9_3.js +2279 -0
  531. package/lib/cn-qaFjX9_3.js.map +1 -0
  532. package/lib/context-h_UkBLvr.js +22 -0
  533. package/lib/context-h_UkBLvr.js.map +1 -0
  534. package/lib/createServer-69sLlmQA.js +15679 -0
  535. package/lib/createServer-69sLlmQA.js.map +1 -0
  536. package/lib/hook-CHq7pFyz.js +227 -0
  537. package/lib/hook-CHq7pFyz.js.map +1 -0
  538. package/lib/{assets/index-B9EWVYfo.js → index-CBXSgjaE.js} +1034 -983
  539. package/lib/index-CBXSgjaE.js.map +1 -0
  540. package/lib/index-CPNSgwSb.js +36 -0
  541. package/lib/index-CPNSgwSb.js.map +1 -0
  542. package/lib/index-CbrnMIak.js +1282 -0
  543. package/lib/index-CbrnMIak.js.map +1 -0
  544. package/lib/index-LNp6rxyU.js.map +1 -1
  545. package/lib/index.esm-BSV1C092.js +692 -0
  546. package/lib/index.esm-BSV1C092.js.map +1 -0
  547. package/lib/index.esm-BnnBRKJX.js +1214 -0
  548. package/lib/index.esm-BnnBRKJX.js.map +1 -0
  549. package/lib/invariant-Caa8-XvF.js +26 -0
  550. package/lib/invariant-Caa8-XvF.js.map +1 -0
  551. package/lib/jsx-runtime-Dx-03ztt.js +446 -0
  552. package/lib/jsx-runtime-Dx-03ztt.js.map +1 -0
  553. package/lib/object_hash-BNWPnMN9.js +787 -0
  554. package/lib/object_hash-BNWPnMN9.js.map +1 -0
  555. package/lib/post-processors/removeExtensions.js +11 -0
  556. package/lib/post-processors/removeExtensions.js.map +1 -0
  557. package/lib/post-processors/removePaths.js +28 -0
  558. package/lib/post-processors/removePaths.js.map +1 -0
  559. package/lib/post-processors/traverse.js +12 -0
  560. package/lib/post-processors/traverse.js.map +1 -0
  561. package/lib/prism-csharp.min-DUwvItt4.js +63 -0
  562. package/lib/{prism-csharp.min-Yizuc34Y.js.map → prism-csharp.min-DUwvItt4.js.map} +1 -1
  563. package/lib/prism-java.min-BtgBR4yd.js +35 -0
  564. package/lib/{prism-java.min-d5iT_mOd.js.map → prism-java.min-BtgBR4yd.js.map} +1 -1
  565. package/lib/prism-markup-BNGj0Tvm.js.map +1 -1
  566. package/lib/prism-ruby.min-DeDXCp1r.js +38 -0
  567. package/lib/{prism-ruby.min-C7LwcKyz.js.map → prism-ruby.min-DeDXCp1r.js.map} +1 -1
  568. package/lib/prism-typescript.min-CD7H2IYQ.js +34 -0
  569. package/lib/{prism-typescript.min-oSVeWCAd.js.map → prism-typescript.min-CD7H2IYQ.js.map} +1 -1
  570. package/lib/state-CFQsUZUP.js +202 -0
  571. package/lib/state-CFQsUZUP.js.map +1 -0
  572. package/lib/ui/Accordion.js +47 -0
  573. package/lib/ui/Accordion.js.map +1 -0
  574. package/lib/ui/ActionButton.js +25 -0
  575. package/lib/ui/ActionButton.js.map +1 -0
  576. package/lib/ui/Alert.js +51 -0
  577. package/lib/ui/Alert.js.map +1 -0
  578. package/lib/ui/AlertDialog.js +114 -0
  579. package/lib/ui/AlertDialog.js.map +1 -0
  580. package/lib/ui/AspectRatio.js +6 -0
  581. package/lib/ui/AspectRatio.js.map +1 -0
  582. package/lib/ui/Badge.js +27 -0
  583. package/lib/ui/Badge.js.map +1 -0
  584. package/lib/ui/Breadcrumb.js +94 -0
  585. package/lib/ui/Breadcrumb.js.map +1 -0
  586. package/lib/ui/Button.js +49 -0
  587. package/lib/ui/Button.js.map +1 -0
  588. package/lib/ui/Callout.js +77 -0
  589. package/lib/ui/Callout.js.map +1 -0
  590. package/lib/ui/Card.js +62 -0
  591. package/lib/ui/Card.js.map +1 -0
  592. package/lib/ui/Carousel.js +1416 -0
  593. package/lib/ui/Carousel.js.map +1 -0
  594. package/lib/ui/Checkbox.js +28 -0
  595. package/lib/ui/Checkbox.js.map +1 -0
  596. package/lib/ui/Collapsible.js +8 -0
  597. package/lib/ui/Collapsible.js.map +1 -0
  598. package/lib/ui/Command.js +553 -0
  599. package/lib/ui/Command.js.map +1 -0
  600. package/lib/ui/Dialog.js +101 -0
  601. package/lib/ui/Dialog.js.map +1 -0
  602. package/lib/ui/Drawer.js +1153 -0
  603. package/lib/ui/Drawer.js.map +1 -0
  604. package/lib/ui/DropdownMenu.js +145 -0
  605. package/lib/ui/DropdownMenu.js.map +1 -0
  606. package/lib/ui/Form.js +95 -0
  607. package/lib/ui/Form.js.map +1 -0
  608. package/lib/ui/HoverCard.js +24 -0
  609. package/lib/ui/HoverCard.js.map +1 -0
  610. package/lib/ui/Input.js +22 -0
  611. package/lib/ui/Input.js.map +1 -0
  612. package/lib/ui/Label.js +20 -0
  613. package/lib/ui/Label.js.map +1 -0
  614. package/lib/ui/Pagination.js +106 -0
  615. package/lib/ui/Pagination.js.map +1 -0
  616. package/lib/ui/Popover.js +24 -0
  617. package/lib/ui/Popover.js.map +1 -0
  618. package/lib/ui/Progress.js +27 -0
  619. package/lib/ui/Progress.js.map +1 -0
  620. package/lib/ui/RadioGroup.js +32 -0
  621. package/lib/ui/RadioGroup.js.map +1 -0
  622. package/lib/ui/ScrollArea.js +39 -0
  623. package/lib/ui/ScrollArea.js.map +1 -0
  624. package/lib/ui/Select.js +122 -0
  625. package/lib/ui/Select.js.map +1 -0
  626. package/lib/ui/Skeleton.js +18 -0
  627. package/lib/ui/Skeleton.js.map +1 -0
  628. package/lib/ui/Slider.js +24 -0
  629. package/lib/ui/Slider.js.map +1 -0
  630. package/lib/ui/Switch.js +28 -0
  631. package/lib/ui/Switch.js.map +1 -0
  632. package/lib/ui/Tabs.js +47 -0
  633. package/lib/ui/Tabs.js.map +1 -0
  634. package/lib/ui/Textarea.js +21 -0
  635. package/lib/ui/Textarea.js.map +1 -0
  636. package/lib/ui/Toggle.js +38 -0
  637. package/lib/ui/Toggle.js.map +1 -0
  638. package/lib/ui/ToggleGroup.js +42 -0
  639. package/lib/ui/ToggleGroup.js.map +1 -0
  640. package/lib/ui/Tooltip.js +24 -0
  641. package/lib/ui/Tooltip.js.map +1 -0
  642. package/lib/useExposedProps-DE9lR6MF.js +9 -0
  643. package/lib/useExposedProps-DE9lR6MF.js.map +1 -0
  644. package/lib/zudoku.auth-auth0.js +24 -18
  645. package/lib/zudoku.auth-auth0.js.map +1 -1
  646. package/lib/zudoku.auth-clerk.js +2 -2
  647. package/lib/zudoku.auth-clerk.js.map +1 -1
  648. package/lib/zudoku.auth-openid.js +620 -619
  649. package/lib/zudoku.auth-openid.js.map +1 -1
  650. package/lib/zudoku.components.js +1064 -3006
  651. package/lib/zudoku.components.js.map +1 -1
  652. package/lib/zudoku.openapi-worker.js +10 -16056
  653. package/lib/zudoku.openapi-worker.js.map +1 -1
  654. package/lib/zudoku.plugin-api-catalog.js +123 -0
  655. package/lib/zudoku.plugin-api-catalog.js.map +1 -0
  656. package/lib/zudoku.plugin-api-keys.js +72 -78
  657. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  658. package/lib/zudoku.plugin-custom-pages.js +22 -0
  659. package/lib/zudoku.plugin-custom-pages.js.map +1 -0
  660. package/lib/zudoku.plugin-markdown.js +94 -27
  661. package/lib/zudoku.plugin-markdown.js.map +1 -1
  662. package/lib/zudoku.plugin-openapi.js +7 -12
  663. package/lib/zudoku.plugin-openapi.js.map +1 -1
  664. package/lib/zudoku.plugin-redirect.js +2 -2
  665. package/lib/zudoku.plugin-redirect.js.map +1 -1
  666. package/lib/zudoku.plugin-search-inkeep.js +53 -28
  667. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  668. package/package.json +135 -87
  669. package/src/app/demo.tsx +1 -4
  670. package/src/app/entry.client.tsx +20 -3
  671. package/src/app/entry.server.tsx +63 -52
  672. package/src/app/main.css +5 -2
  673. package/src/app/main.tsx +24 -38
  674. package/src/app/sentry.ts +24 -0
  675. package/src/app/standalone.tsx +2 -5
  676. package/src/app/tailwind.ts +67 -52
  677. package/src/lib/authentication/AuthenticationPlugin.tsx +4 -1
  678. package/src/lib/authentication/authentication.ts +3 -3
  679. package/src/lib/authentication/components/CallbackHandler.tsx +20 -51
  680. package/src/lib/authentication/components/SignIn.tsx +1 -1
  681. package/src/lib/authentication/components/SignOut.tsx +1 -1
  682. package/src/lib/authentication/hook.ts +1 -3
  683. package/src/lib/authentication/providers/auth0.tsx +17 -11
  684. package/src/lib/authentication/providers/openid.tsx +22 -33
  685. package/src/lib/authentication/state.ts +50 -9
  686. package/{LICENSE.md → src/lib/authentication/use-broadcast/LICENSE.md} +2 -2
  687. package/src/lib/authentication/use-broadcast/shared.ts +372 -0
  688. package/src/lib/authentication/use-broadcast/useBroadcast.ts +146 -0
  689. package/src/lib/components/AnchorLink.tsx +1 -1
  690. package/src/lib/components/Banner.tsx +12 -2
  691. package/src/lib/components/Bootstrap.tsx +36 -16
  692. package/src/lib/components/ClientOnly.tsx +6 -3
  693. package/src/lib/components/DeveloperHint.tsx +6 -1
  694. package/src/lib/components/ErrorPage.tsx +0 -2
  695. package/src/lib/components/Header.tsx +91 -46
  696. package/src/lib/components/Heading.tsx +13 -13
  697. package/src/lib/components/Layout.tsx +56 -38
  698. package/src/lib/components/Markdown.tsx +1 -1
  699. package/src/lib/components/MobileTopNavigation.tsx +31 -26
  700. package/src/lib/components/NotFoundPage.tsx +1 -1
  701. package/src/lib/components/ReactMarkdown.license.txt +21 -0
  702. package/src/lib/components/ReactMarkdown.tsx +264 -0
  703. package/src/lib/components/Search.tsx +4 -4
  704. package/src/lib/components/SlotletProvider.tsx +29 -4
  705. package/src/lib/components/SyntaxHighlight.tsx +85 -50
  706. package/src/lib/components/ThemeSwitch.tsx +26 -0
  707. package/src/lib/components/TopNavigation.tsx +78 -23
  708. package/src/lib/components/Zudoku.tsx +108 -0
  709. package/src/lib/components/context/ZudokuContext.ts +33 -30
  710. package/src/lib/components/context/ZudokuProvider.tsx +2 -2
  711. package/src/lib/components/index.ts +19 -7
  712. package/src/lib/components/navigation/Sidebar.tsx +22 -12
  713. package/src/lib/components/navigation/SidebarBadge.tsx +0 -10
  714. package/src/lib/components/navigation/SidebarCategory.tsx +39 -32
  715. package/src/lib/components/navigation/SidebarItem.tsx +24 -30
  716. package/src/lib/components/navigation/SidebarWrapper.tsx +1 -1
  717. package/src/lib/components/navigation/utils.ts +12 -17
  718. package/src/lib/core/{DevPortalContext.ts → ZudokuContext.ts} +7 -14
  719. package/src/lib/core/plugins.ts +19 -17
  720. package/src/lib/errors/ErrorAlert.tsx +20 -6
  721. package/src/lib/errors/RouterError.tsx +1 -1
  722. package/src/lib/oas/graphql/index.ts +11 -16
  723. package/src/lib/oas/parser/upgrade/index.ts +3 -24
  724. package/src/lib/plugins/api-catalog/Catalog.tsx +123 -0
  725. package/src/lib/plugins/api-catalog/index.tsx +64 -0
  726. package/src/lib/plugins/api-keys/CreateApiKey.tsx +3 -3
  727. package/src/lib/plugins/api-keys/ProtectedRoute.tsx +1 -1
  728. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +1 -1
  729. package/src/lib/plugins/api-keys/index.tsx +13 -10
  730. package/src/lib/plugins/custom-pages/CustomPage.tsx +18 -0
  731. package/src/lib/plugins/custom-pages/index.tsx +24 -0
  732. package/src/lib/plugins/markdown/MdxPage.tsx +38 -10
  733. package/src/lib/plugins/markdown/index.tsx +53 -13
  734. package/src/lib/plugins/markdown/resolver.ts +90 -0
  735. package/src/lib/plugins/openapi/CollapsibleCode.tsx +80 -0
  736. package/src/lib/plugins/openapi/ColorizedParam.tsx +23 -14
  737. package/src/lib/plugins/openapi/Endpoint.tsx +7 -12
  738. package/src/lib/plugins/openapi/OperationList.tsx +81 -45
  739. package/src/lib/plugins/openapi/OperationListItem.tsx +31 -2
  740. package/src/lib/plugins/openapi/ParameterListItem.tsx +37 -31
  741. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +18 -13
  742. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +17 -12
  743. package/src/lib/plugins/openapi/Route.tsx +42 -12
  744. package/src/lib/plugins/openapi/Sidecar.tsx +75 -75
  745. package/src/lib/plugins/openapi/client/GraphQLClient.tsx +157 -0
  746. package/src/lib/plugins/openapi/client/GraphQLContext.tsx +16 -0
  747. package/src/lib/plugins/openapi/client/createServer.ts +2 -0
  748. package/src/lib/plugins/openapi/client/useCreateQuery.ts +33 -0
  749. package/src/lib/plugins/openapi/client/worker.ts +38 -24
  750. package/src/lib/plugins/openapi/context.tsx +2 -2
  751. package/src/lib/plugins/openapi/graphql/fragment-masking.ts +11 -18
  752. package/src/lib/plugins/openapi/graphql/gql.ts +12 -29
  753. package/src/lib/plugins/openapi/graphql/graphql.ts +236 -665
  754. package/src/lib/plugins/openapi/index.tsx +77 -97
  755. package/src/lib/plugins/openapi/interfaces.ts +22 -1
  756. package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -0
  757. package/src/lib/plugins/openapi/playground/Playground.tsx +5 -4
  758. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
  759. package/src/lib/plugins/openapi/playground/ResponseTab.tsx +0 -1
  760. package/src/lib/plugins/openapi/post-processors/removeExtensions.test.ts +144 -0
  761. package/src/lib/plugins/openapi/post-processors/removeExtensions.ts +24 -0
  762. package/src/lib/plugins/openapi/post-processors/removePaths.test.ts +126 -0
  763. package/src/lib/plugins/openapi/post-processors/removePaths.ts +55 -0
  764. package/src/lib/plugins/openapi/post-processors/traverse.ts +1 -0
  765. package/src/lib/plugins/openapi/schema/SchemaView.tsx +5 -2
  766. package/src/lib/plugins/openapi/util/generateSchemaExample.ts +28 -42
  767. package/src/lib/plugins/openapi/util/methodToColor.ts +27 -0
  768. package/src/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.tsx +32 -0
  769. package/src/lib/plugins/openapi-worker.ts +11 -1
  770. package/src/lib/plugins/redirect/index.tsx +6 -10
  771. package/src/lib/plugins/search-inkeep/index.tsx +80 -25
  772. package/src/lib/plugins/search-inkeep/inkeep.ts +3 -9
  773. package/src/lib/ui/Accordion.tsx +56 -0
  774. package/src/lib/ui/ActionButton.tsx +28 -0
  775. package/src/lib/ui/{Note.tsx → Alert.tsx} +11 -10
  776. package/src/lib/ui/AlertDialog.tsx +139 -0
  777. package/src/lib/ui/AspectRatio.tsx +5 -0
  778. package/src/lib/ui/Badge.tsx +36 -0
  779. package/src/lib/ui/Breadcrumb.tsx +115 -0
  780. package/src/lib/ui/Button.tsx +1 -1
  781. package/src/lib/ui/Callout.tsx +7 -6
  782. package/src/lib/ui/Carousel.tsx +260 -0
  783. package/src/lib/ui/Checkbox.tsx +28 -0
  784. package/src/lib/ui/Collapsible.tsx +9 -0
  785. package/src/lib/ui/Command.tsx +151 -0
  786. package/src/lib/{components → ui}/Dialog.tsx +4 -3
  787. package/src/lib/ui/Drawer.tsx +38 -36
  788. package/src/lib/ui/Form.tsx +177 -0
  789. package/src/lib/ui/HoverCard.tsx +27 -0
  790. package/src/lib/ui/Label.tsx +24 -0
  791. package/src/lib/ui/Pagination.tsx +117 -0
  792. package/src/lib/ui/Popover.tsx +29 -0
  793. package/src/lib/ui/Progress.tsx +26 -0
  794. package/src/lib/ui/RadioGroup.tsx +42 -0
  795. package/src/lib/ui/ScrollArea.tsx +46 -0
  796. package/src/lib/ui/Skeleton.tsx +15 -0
  797. package/src/lib/ui/Slider.tsx +26 -0
  798. package/src/lib/ui/Switch.tsx +27 -0
  799. package/src/lib/ui/Textarea.tsx +23 -0
  800. package/src/lib/ui/Toggle.tsx +43 -0
  801. package/src/lib/ui/ToggleGroup.tsx +59 -0
  802. package/src/lib/ui/Tooltip.tsx +28 -0
  803. package/src/lib/util/MdxComponents.tsx +3 -9
  804. package/src/lib/util/createVariantComponent.tsx +2 -2
  805. package/src/lib/util/invariant.ts +15 -3
  806. package/src/lib/util/traverse.ts +25 -0
  807. package/src/lib/util/useExposedProps.tsx +16 -0
  808. package/src/lib/util/useIsomorphicLayoutEffect.ts +5 -0
  809. package/src/lib/util/useOnScreen.ts +32 -0
  810. package/src/lib/util/useScrollToAnchor.ts +2 -2
  811. package/src/lib/util/useScrollToTop.ts +1 -1
  812. package/dist/internal.d.ts +0 -1
  813. package/dist/internal.js +0 -2
  814. package/dist/internal.js.map +0 -1
  815. package/dist/lib/components/DevPortal.js.map +0 -1
  816. package/dist/lib/components/Dialog.js.map +0 -1
  817. package/dist/lib/components/Select.js.map +0 -1
  818. package/dist/lib/components/context/ThemeContext.d.ts +0 -2
  819. package/dist/lib/components/context/ThemeContext.js +0 -7
  820. package/dist/lib/components/context/ThemeContext.js.map +0 -1
  821. package/dist/lib/components/context/ThemeProvider.d.ts +0 -4
  822. package/dist/lib/components/context/ThemeProvider.js +0 -23
  823. package/dist/lib/components/context/ThemeProvider.js.map +0 -1
  824. package/dist/lib/core/DevPortalContext.js.map +0 -1
  825. package/dist/lib/plugins/custom-page/index.d.ts +0 -8
  826. package/dist/lib/plugins/custom-page/index.js +0 -12
  827. package/dist/lib/plugins/custom-page/index.js.map +0 -1
  828. package/dist/lib/plugins/markdown/generateRoutes.d.ts +0 -3
  829. package/dist/lib/plugins/markdown/generateRoutes.js +0 -21
  830. package/dist/lib/plugins/markdown/generateRoutes.js.map +0 -1
  831. package/dist/lib/plugins/openapi/client/createMemoryClient.d.ts +0 -12
  832. package/dist/lib/plugins/openapi/client/createMemoryClient.js +0 -46
  833. package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +0 -1
  834. package/dist/lib/plugins/openapi/client/createWorkerClient.d.ts +0 -10
  835. package/dist/lib/plugins/openapi/client/createWorkerClient.js +0 -61
  836. package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +0 -1
  837. package/dist/lib/plugins/openapi/client/interfaces.d.ts +0 -4
  838. package/dist/lib/plugins/openapi/client/interfaces.js +0 -2
  839. package/dist/lib/plugins/openapi/client/interfaces.js.map +0 -1
  840. package/dist/lib/plugins/openapi/playground/Editor.d.ts +0 -1
  841. package/dist/lib/plugins/openapi/playground/Editor.js +0 -5
  842. package/dist/lib/plugins/openapi/playground/Editor.js.map +0 -1
  843. package/dist/lib/plugins/openapi/util/urql.d.ts +0 -7
  844. package/dist/lib/plugins/openapi/util/urql.js +0 -8
  845. package/dist/lib/plugins/openapi/util/urql.js.map +0 -1
  846. package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.d.ts +0 -2
  847. package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js +0 -3
  848. package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js.map +0 -1
  849. package/dist/lib/themeToggle.d.ts +0 -1
  850. package/dist/lib/themeToggle.js +0 -7
  851. package/dist/lib/themeToggle.js.map +0 -1
  852. package/dist/lib/ui/Note.d.ts +0 -8
  853. package/dist/lib/ui/Note.js +0 -23
  854. package/dist/lib/ui/Note.js.map +0 -1
  855. package/dist/lib/util/createWaitForNotify.d.ts +0 -1
  856. package/dist/lib/util/createWaitForNotify.js +0 -15
  857. package/dist/lib/util/createWaitForNotify.js.map +0 -1
  858. package/dist/vite/plugin-custom-css.js +0 -55
  859. package/dist/vite/plugin-custom-css.js.map +0 -1
  860. package/dist/vite/plugin-html-transform.d.ts +0 -2
  861. package/dist/vite/plugin-html-transform.js +0 -15
  862. package/dist/vite/plugin-html-transform.js.map +0 -1
  863. package/lib/AuthenticationPlugin-Bx9FK124.js.map +0 -1
  864. package/lib/CategoryHeading-ovR-zHRq.js +0 -10
  865. package/lib/DeveloperHint-YeWHKvyr.js +0 -16
  866. package/lib/DeveloperHint-YeWHKvyr.js.map +0 -1
  867. package/lib/ErrorPage-Dri5_2lr.js +0 -18
  868. package/lib/ErrorPage-Dri5_2lr.js.map +0 -1
  869. package/lib/InkeepCustomTrigger-CE5-K5ex.js +0 -6
  870. package/lib/InkeepCustomTrigger-CE5-K5ex.js.map +0 -1
  871. package/lib/Input-CtVUl3eT.js +0 -2198
  872. package/lib/Input-CtVUl3eT.js.map +0 -1
  873. package/lib/Markdown-DapSf3wG.js +0 -20281
  874. package/lib/Markdown-DapSf3wG.js.map +0 -1
  875. package/lib/MdxPage-BqBWsXZ1.js +0 -172
  876. package/lib/MdxPage-BqBWsXZ1.js.map +0 -1
  877. package/lib/OperationList-JAQF5-tn.js +0 -602
  878. package/lib/OperationList-JAQF5-tn.js.map +0 -1
  879. package/lib/Route-DSANUy5e.js +0 -14
  880. package/lib/Route-DSANUy5e.js.map +0 -1
  881. package/lib/SidebarBadge-Dx7jtnoA.js +0 -498
  882. package/lib/SidebarBadge-Dx7jtnoA.js.map +0 -1
  883. package/lib/SlotletProvider-D3UD5Go3.js +0 -238
  884. package/lib/SlotletProvider-D3UD5Go3.js.map +0 -1
  885. package/lib/ZudokuContext-cr-pTRY1.js +0 -1084
  886. package/lib/ZudokuContext-cr-pTRY1.js.map +0 -1
  887. package/lib/assets/index-B9EWVYfo.js.map +0 -1
  888. package/lib/assets/worker-Bcj4NA2p.js.map +0 -1
  889. package/lib/index-BG0g4WW0.js +0 -1771
  890. package/lib/index-BG0g4WW0.js.map +0 -1
  891. package/lib/index-BngPzhKn.js +0 -124
  892. package/lib/index-BngPzhKn.js.map +0 -1
  893. package/lib/index-CLd8ycZz.js.map +0 -1
  894. package/lib/index-Dolisrci.js +0 -2814
  895. package/lib/index-Dolisrci.js.map +0 -1
  896. package/lib/index-DyJyULzS.js +0 -5816
  897. package/lib/index-DyJyULzS.js.map +0 -1
  898. package/lib/joinPath-B7kNnUX4.js +0 -8
  899. package/lib/joinPath-B7kNnUX4.js.map +0 -1
  900. package/lib/jsx-runtime-B6kdoens.js +0 -635
  901. package/lib/jsx-runtime-B6kdoens.js.map +0 -1
  902. package/lib/prism-csharp.min-Yizuc34Y.js +0 -35
  903. package/lib/prism-java.min-d5iT_mOd.js +0 -7
  904. package/lib/prism-markup-templating-DZrrEs0A.js +0 -62
  905. package/lib/prism-markup-templating-DZrrEs0A.js.map +0 -1
  906. package/lib/prism-php.min-o7FpoMP_.js +0 -11
  907. package/lib/prism-php.min-o7FpoMP_.js.map +0 -1
  908. package/lib/prism-ruby.min-C7LwcKyz.js +0 -10
  909. package/lib/prism-typescript.min-oSVeWCAd.js +0 -6
  910. package/lib/router-D2p7Olpn.js +0 -2971
  911. package/lib/router-D2p7Olpn.js.map +0 -1
  912. package/lib/state-hNe1dw4B.js +0 -548
  913. package/lib/state-hNe1dw4B.js.map +0 -1
  914. package/lib/urql-YhcsXYy8.js +0 -1591
  915. package/lib/urql-YhcsXYy8.js.map +0 -1
  916. package/lib/utils-ByIc_KIM.js +0 -749
  917. package/lib/utils-ByIc_KIM.js.map +0 -1
  918. package/lib/zudoku.plugin-custom-page.js +0 -13
  919. package/lib/zudoku.plugin-custom-page.js.map +0 -1
  920. package/src/lib/components/DevPortal.tsx +0 -111
  921. package/src/lib/components/context/ThemeContext.tsx +0 -8
  922. package/src/lib/components/context/ThemeProvider.tsx +0 -27
  923. package/src/lib/plugins/custom-page/index.tsx +0 -22
  924. package/src/lib/plugins/markdown/generateRoutes.tsx +0 -38
  925. package/src/lib/plugins/openapi/client/createMemoryClient.ts +0 -56
  926. package/src/lib/plugins/openapi/client/createWorkerClient.ts +0 -80
  927. package/src/lib/plugins/openapi/client/interfaces.ts +0 -5
  928. package/src/lib/plugins/openapi/playground/Editor.tsx +0 -4
  929. package/src/lib/plugins/openapi/util/urql.ts +0 -8
  930. package/src/lib/plugins/search-inkeep/InkeepCustomTrigger.tsx +0 -3
  931. package/src/lib/themeToggle.ts +0 -7
  932. package/src/lib/util/createWaitForNotify.ts +0 -18
  933. /package/dist/lib/{components → ui}/Dialog.d.ts +0 -0
  934. /package/dist/lib/{components → ui}/Select.d.ts +0 -0
  935. /package/dist/lib/{components → ui}/Select.js +0 -0
  936. /package/src/lib/{components → ui}/Select.tsx +0 -0
@@ -0,0 +1,1217 @@
1
+ var _e = (t) => {
2
+ throw TypeError(t);
3
+ };
4
+ var be = (t, e, s) => e.has(t) || _e("Cannot " + s);
5
+ var i = (t, e, s) => (be(t, e, "read from private field"), s ? s.call(t) : e.get(t)), y = (t, e, s) => e.has(t) ? _e("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), c = (t, e, s, r) => (be(t, e, "write to private field"), r ? r.call(t, s) : e.set(t, s), s), b = (t, e, s) => (be(t, e, "access private method"), s);
6
+ import * as T from "react";
7
+ import { createContext as ft, useContext as yt } from "react";
8
+ import { j as pt } from "./jsx-runtime-Dx-03ztt.js";
9
+ import { u as pe, m as vt } from "./chunk-D52XG6IA-Dl7HLe6j.js";
10
+ var Qe = class {
11
+ constructor() {
12
+ this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
13
+ }
14
+ subscribe(t) {
15
+ return this.listeners.add(t), this.onSubscribe(), () => {
16
+ this.listeners.delete(t), this.onUnsubscribe();
17
+ };
18
+ }
19
+ hasListeners() {
20
+ return this.listeners.size > 0;
21
+ }
22
+ onSubscribe() {
23
+ }
24
+ onUnsubscribe() {
25
+ }
26
+ }, V = typeof window > "u" || "Deno" in globalThis;
27
+ function ge() {
28
+ }
29
+ function Zt(t, e) {
30
+ return typeof t == "function" ? t(e) : t;
31
+ }
32
+ function Re(t) {
33
+ return typeof t == "number" && t >= 0 && t !== 1 / 0;
34
+ }
35
+ function et(t, e) {
36
+ return Math.max(t + (e || 0) - Date.now(), 0);
37
+ }
38
+ function fe(t, e) {
39
+ return typeof t == "function" ? t(e) : t;
40
+ }
41
+ function x(t, e) {
42
+ return typeof t == "function" ? t(e) : t;
43
+ }
44
+ function Wt(t, e) {
45
+ const {
46
+ type: s = "all",
47
+ exact: r,
48
+ fetchStatus: n,
49
+ predicate: u,
50
+ queryKey: a,
51
+ stale: o
52
+ } = t;
53
+ if (a) {
54
+ if (r) {
55
+ if (e.queryHash !== bt(a, e.options))
56
+ return !1;
57
+ } else if (!qe(e.queryKey, a))
58
+ return !1;
59
+ }
60
+ if (s !== "all") {
61
+ const l = e.isActive();
62
+ if (s === "active" && !l || s === "inactive" && l)
63
+ return !1;
64
+ }
65
+ return !(typeof o == "boolean" && e.isStale() !== o || n && n !== e.state.fetchStatus || u && !u(e));
66
+ }
67
+ function Jt(t, e) {
68
+ const { exact: s, status: r, predicate: n, mutationKey: u } = t;
69
+ if (u) {
70
+ if (!e.options.mutationKey)
71
+ return !1;
72
+ if (s) {
73
+ if (Se(e.options.mutationKey) !== Se(u))
74
+ return !1;
75
+ } else if (!qe(e.options.mutationKey, u))
76
+ return !1;
77
+ }
78
+ return !(r && e.state.status !== r || n && !n(e));
79
+ }
80
+ function bt(t, e) {
81
+ return ((e == null ? void 0 : e.queryKeyHashFn) || Se)(t);
82
+ }
83
+ function Se(t) {
84
+ return JSON.stringify(
85
+ t,
86
+ (e, s) => Ee(s) ? Object.keys(s).sort().reduce((r, n) => (r[n] = s[n], r), {}) : s
87
+ );
88
+ }
89
+ function qe(t, e) {
90
+ return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? !Object.keys(e).some((s) => !qe(t[s], e[s])) : !1;
91
+ }
92
+ function Ce(t, e) {
93
+ if (t === e)
94
+ return t;
95
+ const s = He(t) && He(e);
96
+ if (s || Ee(t) && Ee(e)) {
97
+ const r = s ? t : Object.keys(t), n = r.length, u = s ? e : Object.keys(e), a = u.length, o = s ? [] : {};
98
+ let l = 0;
99
+ for (let R = 0; R < a; R++) {
100
+ const v = s ? R : u[R];
101
+ (!s && r.includes(v) || s) && t[v] === void 0 && e[v] === void 0 ? (o[v] = void 0, l++) : (o[v] = Ce(t[v], e[v]), o[v] === t[v] && t[v] !== void 0 && l++);
102
+ }
103
+ return n === a && l === n ? t : o;
104
+ }
105
+ return e;
106
+ }
107
+ function we(t, e) {
108
+ if (!e || Object.keys(t).length !== Object.keys(e).length)
109
+ return !1;
110
+ for (const s in t)
111
+ if (t[s] !== e[s])
112
+ return !1;
113
+ return !0;
114
+ }
115
+ function He(t) {
116
+ return Array.isArray(t) && t.length === Object.keys(t).length;
117
+ }
118
+ function Ee(t) {
119
+ if (!Be(t))
120
+ return !1;
121
+ const e = t.constructor;
122
+ if (e === void 0)
123
+ return !0;
124
+ const s = e.prototype;
125
+ return !(!Be(s) || !s.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(t) !== Object.prototype);
126
+ }
127
+ function Be(t) {
128
+ return Object.prototype.toString.call(t) === "[object Object]";
129
+ }
130
+ function mt(t) {
131
+ return new Promise((e) => {
132
+ setTimeout(e, t);
133
+ });
134
+ }
135
+ function Oe(t, e, s) {
136
+ if (typeof s.structuralSharing == "function")
137
+ return s.structuralSharing(t, e);
138
+ if (s.structuralSharing !== !1) {
139
+ if (process.env.NODE_ENV !== "production")
140
+ try {
141
+ return Ce(t, e);
142
+ } catch (r) {
143
+ console.error(
144
+ `Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${s.queryHash}]: ${r}`
145
+ );
146
+ }
147
+ return Ce(t, e);
148
+ }
149
+ return e;
150
+ }
151
+ function Xt(t, e, s = 0) {
152
+ const r = [...t, e];
153
+ return s && r.length > s ? r.slice(1) : r;
154
+ }
155
+ function Yt(t, e, s = 0) {
156
+ const r = [e, ...t];
157
+ return s && r.length > s ? r.slice(0, -1) : r;
158
+ }
159
+ var ye = Symbol();
160
+ function gt(t, e) {
161
+ return process.env.NODE_ENV !== "production" && t.queryFn === ye && console.error(
162
+ `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${t.queryHash}'`
163
+ ), !t.queryFn && (e != null && e.initialPromise) ? () => e.initialPromise : !t.queryFn || t.queryFn === ye ? () => Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)) : t.queryFn;
164
+ }
165
+ var K, q, J, Ze, Rt = (Ze = class extends Qe {
166
+ constructor() {
167
+ super();
168
+ y(this, K);
169
+ y(this, q);
170
+ y(this, J);
171
+ c(this, J, (e) => {
172
+ if (!V && window.addEventListener) {
173
+ const s = () => e();
174
+ return window.addEventListener("visibilitychange", s, !1), () => {
175
+ window.removeEventListener("visibilitychange", s);
176
+ };
177
+ }
178
+ });
179
+ }
180
+ onSubscribe() {
181
+ i(this, q) || this.setEventListener(i(this, J));
182
+ }
183
+ onUnsubscribe() {
184
+ var e;
185
+ this.hasListeners() || ((e = i(this, q)) == null || e.call(this), c(this, q, void 0));
186
+ }
187
+ setEventListener(e) {
188
+ var s;
189
+ c(this, J, e), (s = i(this, q)) == null || s.call(this), c(this, q, e((r) => {
190
+ typeof r == "boolean" ? this.setFocused(r) : this.onFocus();
191
+ }));
192
+ }
193
+ setFocused(e) {
194
+ i(this, K) !== e && (c(this, K, e), this.onFocus());
195
+ }
196
+ onFocus() {
197
+ const e = this.isFocused();
198
+ this.listeners.forEach((s) => {
199
+ s(e);
200
+ });
201
+ }
202
+ isFocused() {
203
+ var e;
204
+ return typeof i(this, K) == "boolean" ? i(this, K) : ((e = globalThis.document) == null ? void 0 : e.visibilityState) !== "hidden";
205
+ }
206
+ }, K = new WeakMap(), q = new WeakMap(), J = new WeakMap(), Ze), tt = new Rt(), X, A, Y, We, St = (We = class extends Qe {
207
+ constructor() {
208
+ super();
209
+ y(this, X, !0);
210
+ y(this, A);
211
+ y(this, Y);
212
+ c(this, Y, (e) => {
213
+ if (!V && window.addEventListener) {
214
+ const s = () => e(!0), r = () => e(!1);
215
+ return window.addEventListener("online", s, !1), window.addEventListener("offline", r, !1), () => {
216
+ window.removeEventListener("online", s), window.removeEventListener("offline", r);
217
+ };
218
+ }
219
+ });
220
+ }
221
+ onSubscribe() {
222
+ i(this, A) || this.setEventListener(i(this, Y));
223
+ }
224
+ onUnsubscribe() {
225
+ var e;
226
+ this.hasListeners() || ((e = i(this, A)) == null || e.call(this), c(this, A, void 0));
227
+ }
228
+ setEventListener(e) {
229
+ var s;
230
+ c(this, Y, e), (s = i(this, A)) == null || s.call(this), c(this, A, e(this.setOnline.bind(this)));
231
+ }
232
+ setOnline(e) {
233
+ i(this, X) !== e && (c(this, X, e), this.listeners.forEach((r) => {
234
+ r(e);
235
+ }));
236
+ }
237
+ isOnline() {
238
+ return i(this, X);
239
+ }
240
+ }, X = new WeakMap(), A = new WeakMap(), Y = new WeakMap(), We), st = new St();
241
+ function Fe() {
242
+ let t, e;
243
+ const s = new Promise((n, u) => {
244
+ t = n, e = u;
245
+ });
246
+ s.status = "pending", s.catch(() => {
247
+ });
248
+ function r(n) {
249
+ Object.assign(s, n), delete s.resolve, delete s.reject;
250
+ }
251
+ return s.resolve = (n) => {
252
+ r({
253
+ status: "fulfilled",
254
+ value: n
255
+ }), t(n);
256
+ }, s.reject = (n) => {
257
+ r({
258
+ status: "rejected",
259
+ reason: n
260
+ }), e(n);
261
+ }, s;
262
+ }
263
+ function Ct(t) {
264
+ return Math.min(1e3 * 2 ** t, 3e4);
265
+ }
266
+ function rt(t) {
267
+ return (t ?? "online") === "online" ? st.isOnline() : !0;
268
+ }
269
+ var it = class extends Error {
270
+ constructor(t) {
271
+ super("CancelledError"), this.revert = t == null ? void 0 : t.revert, this.silent = t == null ? void 0 : t.silent;
272
+ }
273
+ };
274
+ function me(t) {
275
+ return t instanceof it;
276
+ }
277
+ function wt(t) {
278
+ let e = !1, s = 0, r = !1, n;
279
+ const u = Fe(), a = (f) => {
280
+ var g;
281
+ r || (m(new it(f)), (g = t.abort) == null || g.call(t));
282
+ }, o = () => {
283
+ e = !0;
284
+ }, l = () => {
285
+ e = !1;
286
+ }, R = () => tt.isFocused() && (t.networkMode === "always" || st.isOnline()) && t.canRun(), v = () => rt(t.networkMode) && t.canRun(), h = (f) => {
287
+ var g;
288
+ r || (r = !0, (g = t.onSuccess) == null || g.call(t, f), n == null || n(), u.resolve(f));
289
+ }, m = (f) => {
290
+ var g;
291
+ r || (r = !0, (g = t.onError) == null || g.call(t, f), n == null || n(), u.reject(f));
292
+ }, S = () => new Promise((f) => {
293
+ var g;
294
+ n = (P) => {
295
+ (r || R()) && f(P);
296
+ }, (g = t.onPause) == null || g.call(t);
297
+ }).then(() => {
298
+ var f;
299
+ n = void 0, r || (f = t.onContinue) == null || f.call(t);
300
+ }), w = () => {
301
+ if (r)
302
+ return;
303
+ let f;
304
+ const g = s === 0 ? t.initialPromise : void 0;
305
+ try {
306
+ f = g ?? t.fn();
307
+ } catch (P) {
308
+ f = Promise.reject(P);
309
+ }
310
+ Promise.resolve(f).then(h).catch((P) => {
311
+ var ve;
312
+ if (r)
313
+ return;
314
+ const U = t.retry ?? (V ? 0 : 3), N = t.retryDelay ?? Ct, ce = typeof N == "function" ? N(s, P) : N, le = U === !0 || typeof U == "number" && s < U || typeof U == "function" && U(s, P);
315
+ if (e || !le) {
316
+ m(P);
317
+ return;
318
+ }
319
+ s++, (ve = t.onFail) == null || ve.call(t, s, P), mt(ce).then(() => R() ? void 0 : S()).then(() => {
320
+ e ? m(P) : w();
321
+ });
322
+ });
323
+ };
324
+ return {
325
+ promise: u,
326
+ cancel: a,
327
+ continue: () => (n == null || n(), u),
328
+ cancelRetry: o,
329
+ continueRetry: l,
330
+ canStart: v,
331
+ start: () => (v() ? w() : S().then(w), u)
332
+ };
333
+ }
334
+ function Et() {
335
+ let t = [], e = 0, s = (o) => {
336
+ o();
337
+ }, r = (o) => {
338
+ o();
339
+ }, n = (o) => setTimeout(o, 0);
340
+ const u = (o) => {
341
+ e ? t.push(o) : n(() => {
342
+ s(o);
343
+ });
344
+ }, a = () => {
345
+ const o = t;
346
+ t = [], o.length && n(() => {
347
+ r(() => {
348
+ o.forEach((l) => {
349
+ s(l);
350
+ });
351
+ });
352
+ });
353
+ };
354
+ return {
355
+ batch: (o) => {
356
+ let l;
357
+ e++;
358
+ try {
359
+ l = o();
360
+ } finally {
361
+ e--, e || a();
362
+ }
363
+ return l;
364
+ },
365
+ /**
366
+ * All calls to the wrapped function will be batched.
367
+ */
368
+ batchCalls: (o) => (...l) => {
369
+ u(() => {
370
+ o(...l);
371
+ });
372
+ },
373
+ schedule: u,
374
+ /**
375
+ * Use this method to set a custom notify function.
376
+ * This can be used to for example wrap notifications with `React.act` while running tests.
377
+ */
378
+ setNotifyFunction: (o) => {
379
+ s = o;
380
+ },
381
+ /**
382
+ * Use this method to set a custom function to batch notifications together into a single tick.
383
+ * By default React Query will use the batch function provided by ReactDOM or React Native.
384
+ */
385
+ setBatchNotifyFunction: (o) => {
386
+ r = o;
387
+ },
388
+ setScheduler: (o) => {
389
+ n = o;
390
+ }
391
+ };
392
+ }
393
+ var Ae = Et(), _, Je, Ot = (Je = class {
394
+ constructor() {
395
+ y(this, _);
396
+ }
397
+ destroy() {
398
+ this.clearGcTimeout();
399
+ }
400
+ scheduleGc() {
401
+ this.clearGcTimeout(), Re(this.gcTime) && c(this, _, setTimeout(() => {
402
+ this.optionalRemove();
403
+ }, this.gcTime));
404
+ }
405
+ updateGcTime(t) {
406
+ this.gcTime = Math.max(
407
+ this.gcTime || 0,
408
+ t ?? (V ? 1 / 0 : 5 * 60 * 1e3)
409
+ );
410
+ }
411
+ clearGcTimeout() {
412
+ i(this, _) && (clearTimeout(i(this, _)), c(this, _, void 0));
413
+ }
414
+ }, _ = new WeakMap(), Je), ee, te, I, C, oe, H, D, Q, Xe, es = (Xe = class extends Ot {
415
+ constructor(e) {
416
+ super();
417
+ y(this, D);
418
+ y(this, ee);
419
+ y(this, te);
420
+ y(this, I);
421
+ y(this, C);
422
+ y(this, oe);
423
+ y(this, H);
424
+ c(this, H, !1), c(this, oe, e.defaultOptions), this.setOptions(e.options), this.observers = [], c(this, I, e.cache), this.queryKey = e.queryKey, this.queryHash = e.queryHash, c(this, ee, Ft(this.options)), this.state = e.state ?? i(this, ee), this.scheduleGc();
425
+ }
426
+ get meta() {
427
+ return this.options.meta;
428
+ }
429
+ get promise() {
430
+ var e;
431
+ return (e = i(this, C)) == null ? void 0 : e.promise;
432
+ }
433
+ setOptions(e) {
434
+ this.options = { ...i(this, oe), ...e }, this.updateGcTime(this.options.gcTime);
435
+ }
436
+ optionalRemove() {
437
+ !this.observers.length && this.state.fetchStatus === "idle" && i(this, I).remove(this);
438
+ }
439
+ setData(e, s) {
440
+ const r = Oe(this.state.data, e, this.options);
441
+ return b(this, D, Q).call(this, {
442
+ data: r,
443
+ type: "success",
444
+ dataUpdatedAt: s == null ? void 0 : s.updatedAt,
445
+ manual: s == null ? void 0 : s.manual
446
+ }), r;
447
+ }
448
+ setState(e, s) {
449
+ b(this, D, Q).call(this, { type: "setState", state: e, setStateOptions: s });
450
+ }
451
+ cancel(e) {
452
+ var r, n;
453
+ const s = (r = i(this, C)) == null ? void 0 : r.promise;
454
+ return (n = i(this, C)) == null || n.cancel(e), s ? s.then(ge).catch(ge) : Promise.resolve();
455
+ }
456
+ destroy() {
457
+ super.destroy(), this.cancel({ silent: !0 });
458
+ }
459
+ reset() {
460
+ this.destroy(), this.setState(i(this, ee));
461
+ }
462
+ isActive() {
463
+ return this.observers.some(
464
+ (e) => x(e.options.enabled, this) !== !1
465
+ );
466
+ }
467
+ isDisabled() {
468
+ return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === ye || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
469
+ }
470
+ isStale() {
471
+ return this.state.isInvalidated ? !0 : this.getObserversCount() > 0 ? this.observers.some(
472
+ (e) => e.getCurrentResult().isStale
473
+ ) : this.state.data === void 0;
474
+ }
475
+ isStaleByTime(e = 0) {
476
+ return this.state.isInvalidated || this.state.data === void 0 || !et(this.state.dataUpdatedAt, e);
477
+ }
478
+ onFocus() {
479
+ var s;
480
+ const e = this.observers.find((r) => r.shouldFetchOnWindowFocus());
481
+ e == null || e.refetch({ cancelRefetch: !1 }), (s = i(this, C)) == null || s.continue();
482
+ }
483
+ onOnline() {
484
+ var s;
485
+ const e = this.observers.find((r) => r.shouldFetchOnReconnect());
486
+ e == null || e.refetch({ cancelRefetch: !1 }), (s = i(this, C)) == null || s.continue();
487
+ }
488
+ addObserver(e) {
489
+ this.observers.includes(e) || (this.observers.push(e), this.clearGcTimeout(), i(this, I).notify({ type: "observerAdded", query: this, observer: e }));
490
+ }
491
+ removeObserver(e) {
492
+ this.observers.includes(e) && (this.observers = this.observers.filter((s) => s !== e), this.observers.length || (i(this, C) && (i(this, H) ? i(this, C).cancel({ revert: !0 }) : i(this, C).cancelRetry()), this.scheduleGc()), i(this, I).notify({ type: "observerRemoved", query: this, observer: e }));
493
+ }
494
+ getObserversCount() {
495
+ return this.observers.length;
496
+ }
497
+ invalidate() {
498
+ this.state.isInvalidated || b(this, D, Q).call(this, { type: "invalidate" });
499
+ }
500
+ fetch(e, s) {
501
+ var l, R, v;
502
+ if (this.state.fetchStatus !== "idle") {
503
+ if (this.state.data !== void 0 && (s != null && s.cancelRefetch))
504
+ this.cancel({ silent: !0 });
505
+ else if (i(this, C))
506
+ return i(this, C).continueRetry(), i(this, C).promise;
507
+ }
508
+ if (e && this.setOptions(e), !this.options.queryFn) {
509
+ const h = this.observers.find((m) => m.options.queryFn);
510
+ h && this.setOptions(h.options);
511
+ }
512
+ process.env.NODE_ENV !== "production" && (Array.isArray(this.options.queryKey) || console.error(
513
+ "As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"
514
+ ));
515
+ const r = new AbortController(), n = (h) => {
516
+ Object.defineProperty(h, "signal", {
517
+ enumerable: !0,
518
+ get: () => (c(this, H, !0), r.signal)
519
+ });
520
+ }, u = () => {
521
+ const h = gt(this.options, s), m = {
522
+ queryKey: this.queryKey,
523
+ meta: this.meta
524
+ };
525
+ return n(m), c(this, H, !1), this.options.persister ? this.options.persister(
526
+ h,
527
+ m,
528
+ this
529
+ ) : h(m);
530
+ }, a = {
531
+ fetchOptions: s,
532
+ options: this.options,
533
+ queryKey: this.queryKey,
534
+ state: this.state,
535
+ fetchFn: u
536
+ };
537
+ n(a), (l = this.options.behavior) == null || l.onFetch(
538
+ a,
539
+ this
540
+ ), c(this, te, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((R = a.fetchOptions) == null ? void 0 : R.meta)) && b(this, D, Q).call(this, { type: "fetch", meta: (v = a.fetchOptions) == null ? void 0 : v.meta });
541
+ const o = (h) => {
542
+ var m, S, w, f;
543
+ me(h) && h.silent || b(this, D, Q).call(this, {
544
+ type: "error",
545
+ error: h
546
+ }), me(h) || ((S = (m = i(this, I).config).onError) == null || S.call(
547
+ m,
548
+ h,
549
+ this
550
+ ), (f = (w = i(this, I).config).onSettled) == null || f.call(
551
+ w,
552
+ this.state.data,
553
+ h,
554
+ this
555
+ )), this.scheduleGc();
556
+ };
557
+ return c(this, C, wt({
558
+ initialPromise: s == null ? void 0 : s.initialPromise,
559
+ fn: a.fetchFn,
560
+ abort: r.abort.bind(r),
561
+ onSuccess: (h) => {
562
+ var m, S, w, f;
563
+ if (h === void 0) {
564
+ process.env.NODE_ENV !== "production" && console.error(
565
+ `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
566
+ ), o(new Error(`${this.queryHash} data is undefined`));
567
+ return;
568
+ }
569
+ try {
570
+ this.setData(h);
571
+ } catch (g) {
572
+ o(g);
573
+ return;
574
+ }
575
+ (S = (m = i(this, I).config).onSuccess) == null || S.call(m, h, this), (f = (w = i(this, I).config).onSettled) == null || f.call(
576
+ w,
577
+ h,
578
+ this.state.error,
579
+ this
580
+ ), this.scheduleGc();
581
+ },
582
+ onError: o,
583
+ onFail: (h, m) => {
584
+ b(this, D, Q).call(this, { type: "failed", failureCount: h, error: m });
585
+ },
586
+ onPause: () => {
587
+ b(this, D, Q).call(this, { type: "pause" });
588
+ },
589
+ onContinue: () => {
590
+ b(this, D, Q).call(this, { type: "continue" });
591
+ },
592
+ retry: a.options.retry,
593
+ retryDelay: a.options.retryDelay,
594
+ networkMode: a.options.networkMode,
595
+ canRun: () => !0
596
+ })), i(this, C).start();
597
+ }
598
+ }, ee = new WeakMap(), te = new WeakMap(), I = new WeakMap(), C = new WeakMap(), oe = new WeakMap(), H = new WeakMap(), D = new WeakSet(), Q = function(e) {
599
+ const s = (r) => {
600
+ switch (e.type) {
601
+ case "failed":
602
+ return {
603
+ ...r,
604
+ fetchFailureCount: e.failureCount,
605
+ fetchFailureReason: e.error
606
+ };
607
+ case "pause":
608
+ return {
609
+ ...r,
610
+ fetchStatus: "paused"
611
+ };
612
+ case "continue":
613
+ return {
614
+ ...r,
615
+ fetchStatus: "fetching"
616
+ };
617
+ case "fetch":
618
+ return {
619
+ ...r,
620
+ ...nt(r.data, this.options),
621
+ fetchMeta: e.meta ?? null
622
+ };
623
+ case "success":
624
+ return {
625
+ ...r,
626
+ data: e.data,
627
+ dataUpdateCount: r.dataUpdateCount + 1,
628
+ dataUpdatedAt: e.dataUpdatedAt ?? Date.now(),
629
+ error: null,
630
+ isInvalidated: !1,
631
+ status: "success",
632
+ ...!e.manual && {
633
+ fetchStatus: "idle",
634
+ fetchFailureCount: 0,
635
+ fetchFailureReason: null
636
+ }
637
+ };
638
+ case "error":
639
+ const n = e.error;
640
+ return me(n) && n.revert && i(this, te) ? { ...i(this, te), fetchStatus: "idle" } : {
641
+ ...r,
642
+ error: n,
643
+ errorUpdateCount: r.errorUpdateCount + 1,
644
+ errorUpdatedAt: Date.now(),
645
+ fetchFailureCount: r.fetchFailureCount + 1,
646
+ fetchFailureReason: n,
647
+ fetchStatus: "idle",
648
+ status: "error"
649
+ };
650
+ case "invalidate":
651
+ return {
652
+ ...r,
653
+ isInvalidated: !0
654
+ };
655
+ case "setState":
656
+ return {
657
+ ...r,
658
+ ...e.state
659
+ };
660
+ }
661
+ };
662
+ this.state = s(this.state), Ae.batch(() => {
663
+ this.observers.forEach((r) => {
664
+ r.onQueryUpdate();
665
+ }), i(this, I).notify({ query: this, type: "updated", action: e });
666
+ });
667
+ }, Xe);
668
+ function nt(t, e) {
669
+ return {
670
+ fetchFailureCount: 0,
671
+ fetchFailureReason: null,
672
+ fetchStatus: rt(e.networkMode) ? "fetching" : "paused",
673
+ ...t === void 0 && {
674
+ error: null,
675
+ status: "pending"
676
+ }
677
+ };
678
+ }
679
+ function Ft(t) {
680
+ const e = typeof t.initialData == "function" ? t.initialData() : t.initialData, s = e !== void 0, r = s ? typeof t.initialDataUpdatedAt == "function" ? t.initialDataUpdatedAt() : t.initialDataUpdatedAt : 0;
681
+ return {
682
+ data: e,
683
+ dataUpdateCount: 0,
684
+ dataUpdatedAt: s ? r ?? Date.now() : 0,
685
+ error: null,
686
+ errorUpdateCount: 0,
687
+ errorUpdatedAt: 0,
688
+ fetchFailureCount: 0,
689
+ fetchFailureReason: null,
690
+ fetchMeta: null,
691
+ isInvalidated: !1,
692
+ status: s ? "success" : "pending",
693
+ fetchStatus: "idle"
694
+ };
695
+ }
696
+ var F, d, ue, O, B, se, L, k, he, re, ie, G, z, M, ne, p, ae, Pe, Ie, Te, De, xe, je, ke, ot, Ye, at = (Ye = class extends Qe {
697
+ constructor(e, s) {
698
+ super();
699
+ y(this, p);
700
+ y(this, F);
701
+ y(this, d);
702
+ y(this, ue);
703
+ y(this, O);
704
+ y(this, B);
705
+ y(this, se);
706
+ y(this, L);
707
+ y(this, k);
708
+ y(this, he);
709
+ y(this, re);
710
+ // This property keeps track of the last query with defined data.
711
+ // It will be used to pass the previous data and query to the placeholder function between renders.
712
+ y(this, ie);
713
+ y(this, G);
714
+ y(this, z);
715
+ y(this, M);
716
+ y(this, ne, /* @__PURE__ */ new Set());
717
+ this.options = s, c(this, F, e), c(this, k, null), c(this, L, Fe()), this.options.experimental_prefetchInRender || i(this, L).reject(
718
+ new Error("experimental_prefetchInRender feature flag is not enabled")
719
+ ), this.bindMethods(), this.setOptions(s);
720
+ }
721
+ bindMethods() {
722
+ this.refetch = this.refetch.bind(this);
723
+ }
724
+ onSubscribe() {
725
+ this.listeners.size === 1 && (i(this, d).addObserver(this), Ge(i(this, d), this.options) ? b(this, p, ae).call(this) : this.updateResult(), b(this, p, De).call(this));
726
+ }
727
+ onUnsubscribe() {
728
+ this.hasListeners() || this.destroy();
729
+ }
730
+ shouldFetchOnReconnect() {
731
+ return Ue(
732
+ i(this, d),
733
+ this.options,
734
+ this.options.refetchOnReconnect
735
+ );
736
+ }
737
+ shouldFetchOnWindowFocus() {
738
+ return Ue(
739
+ i(this, d),
740
+ this.options,
741
+ this.options.refetchOnWindowFocus
742
+ );
743
+ }
744
+ destroy() {
745
+ this.listeners = /* @__PURE__ */ new Set(), b(this, p, xe).call(this), b(this, p, je).call(this), i(this, d).removeObserver(this);
746
+ }
747
+ setOptions(e, s) {
748
+ const r = this.options, n = i(this, d);
749
+ if (this.options = i(this, F).defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof x(this.options.enabled, i(this, d)) != "boolean")
750
+ throw new Error(
751
+ "Expected enabled to be a boolean or a callback that returns a boolean"
752
+ );
753
+ b(this, p, ke).call(this), i(this, d).setOptions(this.options), r._defaulted && !we(this.options, r) && i(this, F).getQueryCache().notify({
754
+ type: "observerOptionsUpdated",
755
+ query: i(this, d),
756
+ observer: this
757
+ });
758
+ const u = this.hasListeners();
759
+ u && ze(
760
+ i(this, d),
761
+ n,
762
+ this.options,
763
+ r
764
+ ) && b(this, p, ae).call(this), this.updateResult(s), u && (i(this, d) !== n || x(this.options.enabled, i(this, d)) !== x(r.enabled, i(this, d)) || fe(this.options.staleTime, i(this, d)) !== fe(r.staleTime, i(this, d))) && b(this, p, Pe).call(this);
765
+ const a = b(this, p, Ie).call(this);
766
+ u && (i(this, d) !== n || x(this.options.enabled, i(this, d)) !== x(r.enabled, i(this, d)) || a !== i(this, M)) && b(this, p, Te).call(this, a);
767
+ }
768
+ getOptimisticResult(e) {
769
+ const s = i(this, F).getQueryCache().build(i(this, F), e), r = this.createResult(s, e);
770
+ return It(this, r) && (c(this, O, r), c(this, se, this.options), c(this, B, i(this, d).state)), r;
771
+ }
772
+ getCurrentResult() {
773
+ return i(this, O);
774
+ }
775
+ trackResult(e, s) {
776
+ const r = {};
777
+ return Object.keys(e).forEach((n) => {
778
+ Object.defineProperty(r, n, {
779
+ configurable: !1,
780
+ enumerable: !0,
781
+ get: () => (this.trackProp(n), s == null || s(n), e[n])
782
+ });
783
+ }), r;
784
+ }
785
+ trackProp(e) {
786
+ i(this, ne).add(e);
787
+ }
788
+ getCurrentQuery() {
789
+ return i(this, d);
790
+ }
791
+ refetch({ ...e } = {}) {
792
+ return this.fetch({
793
+ ...e
794
+ });
795
+ }
796
+ fetchOptimistic(e) {
797
+ const s = i(this, F).defaultQueryOptions(e), r = i(this, F).getQueryCache().build(i(this, F), s);
798
+ return r.fetch().then(() => this.createResult(r, s));
799
+ }
800
+ fetch(e) {
801
+ return b(this, p, ae).call(this, {
802
+ ...e,
803
+ cancelRefetch: e.cancelRefetch ?? !0
804
+ }).then(() => (this.updateResult(), i(this, O)));
805
+ }
806
+ createResult(e, s) {
807
+ var Ke;
808
+ const r = i(this, d), n = this.options, u = i(this, O), a = i(this, B), o = i(this, se), R = e !== r ? e.state : i(this, ue), { state: v } = e;
809
+ let h = { ...v }, m = !1, S;
810
+ if (s._optimisticResults) {
811
+ const E = this.hasListeners(), Z = !E && Ge(e, s), W = E && ze(e, r, s, n);
812
+ (Z || W) && (h = {
813
+ ...h,
814
+ ...nt(v.data, e.options)
815
+ }), s._optimisticResults === "isRestoring" && (h.fetchStatus = "idle");
816
+ }
817
+ let { error: w, errorUpdatedAt: f, status: g } = h;
818
+ if (s.select && h.data !== void 0)
819
+ if (u && h.data === (a == null ? void 0 : a.data) && s.select === i(this, he))
820
+ S = i(this, re);
821
+ else
822
+ try {
823
+ c(this, he, s.select), S = s.select(h.data), S = Oe(u == null ? void 0 : u.data, S, s), c(this, re, S), c(this, k, null);
824
+ } catch (E) {
825
+ c(this, k, E);
826
+ }
827
+ else
828
+ S = h.data;
829
+ if (s.placeholderData !== void 0 && S === void 0 && g === "pending") {
830
+ let E;
831
+ if (u != null && u.isPlaceholderData && s.placeholderData === (o == null ? void 0 : o.placeholderData))
832
+ E = u.data;
833
+ else if (E = typeof s.placeholderData == "function" ? s.placeholderData(
834
+ (Ke = i(this, ie)) == null ? void 0 : Ke.state.data,
835
+ i(this, ie)
836
+ ) : s.placeholderData, s.select && E !== void 0)
837
+ try {
838
+ E = s.select(E), c(this, k, null);
839
+ } catch (Z) {
840
+ c(this, k, Z);
841
+ }
842
+ E !== void 0 && (g = "success", S = Oe(
843
+ u == null ? void 0 : u.data,
844
+ E,
845
+ s
846
+ ), m = !0);
847
+ }
848
+ i(this, k) && (w = i(this, k), S = i(this, re), f = Date.now(), g = "error");
849
+ const P = h.fetchStatus === "fetching", U = g === "pending", N = g === "error", ce = U && P, le = S !== void 0, j = {
850
+ status: g,
851
+ fetchStatus: h.fetchStatus,
852
+ isPending: U,
853
+ isSuccess: g === "success",
854
+ isError: N,
855
+ isInitialLoading: ce,
856
+ isLoading: ce,
857
+ data: S,
858
+ dataUpdatedAt: h.dataUpdatedAt,
859
+ error: w,
860
+ errorUpdatedAt: f,
861
+ failureCount: h.fetchFailureCount,
862
+ failureReason: h.fetchFailureReason,
863
+ errorUpdateCount: h.errorUpdateCount,
864
+ isFetched: h.dataUpdateCount > 0 || h.errorUpdateCount > 0,
865
+ isFetchedAfterMount: h.dataUpdateCount > R.dataUpdateCount || h.errorUpdateCount > R.errorUpdateCount,
866
+ isFetching: P,
867
+ isRefetching: P && !U,
868
+ isLoadingError: N && !le,
869
+ isPaused: h.fetchStatus === "paused",
870
+ isPlaceholderData: m,
871
+ isRefetchError: N && le,
872
+ isStale: Le(e, s),
873
+ refetch: this.refetch,
874
+ promise: i(this, L)
875
+ };
876
+ if (this.options.experimental_prefetchInRender) {
877
+ const E = (de) => {
878
+ j.status === "error" ? de.reject(j.error) : j.data !== void 0 && de.resolve(j.data);
879
+ }, Z = () => {
880
+ const de = c(this, L, j.promise = Fe());
881
+ E(de);
882
+ }, W = i(this, L);
883
+ switch (W.status) {
884
+ case "pending":
885
+ e.queryHash === r.queryHash && E(W);
886
+ break;
887
+ case "fulfilled":
888
+ (j.status === "error" || j.data !== W.value) && Z();
889
+ break;
890
+ case "rejected":
891
+ (j.status !== "error" || j.error !== W.reason) && Z();
892
+ break;
893
+ }
894
+ }
895
+ return j;
896
+ }
897
+ updateResult(e) {
898
+ const s = i(this, O), r = this.createResult(i(this, d), this.options);
899
+ if (c(this, B, i(this, d).state), c(this, se, this.options), i(this, B).data !== void 0 && c(this, ie, i(this, d)), we(r, s))
900
+ return;
901
+ c(this, O, r);
902
+ const n = {}, u = () => {
903
+ if (!s)
904
+ return !0;
905
+ const { notifyOnChangeProps: a } = this.options, o = typeof a == "function" ? a() : a;
906
+ if (o === "all" || !o && !i(this, ne).size)
907
+ return !0;
908
+ const l = new Set(
909
+ o ?? i(this, ne)
910
+ );
911
+ return this.options.throwOnError && l.add("error"), Object.keys(i(this, O)).some((R) => {
912
+ const v = R;
913
+ return i(this, O)[v] !== s[v] && l.has(v);
914
+ });
915
+ };
916
+ (e == null ? void 0 : e.listeners) !== !1 && u() && (n.listeners = !0), b(this, p, ot).call(this, { ...n, ...e });
917
+ }
918
+ onQueryUpdate() {
919
+ this.updateResult(), this.hasListeners() && b(this, p, De).call(this);
920
+ }
921
+ }, F = new WeakMap(), d = new WeakMap(), ue = new WeakMap(), O = new WeakMap(), B = new WeakMap(), se = new WeakMap(), L = new WeakMap(), k = new WeakMap(), he = new WeakMap(), re = new WeakMap(), ie = new WeakMap(), G = new WeakMap(), z = new WeakMap(), M = new WeakMap(), ne = new WeakMap(), p = new WeakSet(), ae = function(e) {
922
+ b(this, p, ke).call(this);
923
+ let s = i(this, d).fetch(
924
+ this.options,
925
+ e
926
+ );
927
+ return e != null && e.throwOnError || (s = s.catch(ge)), s;
928
+ }, Pe = function() {
929
+ b(this, p, xe).call(this);
930
+ const e = fe(
931
+ this.options.staleTime,
932
+ i(this, d)
933
+ );
934
+ if (V || i(this, O).isStale || !Re(e))
935
+ return;
936
+ const r = et(i(this, O).dataUpdatedAt, e) + 1;
937
+ c(this, G, setTimeout(() => {
938
+ i(this, O).isStale || this.updateResult();
939
+ }, r));
940
+ }, Ie = function() {
941
+ return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(i(this, d)) : this.options.refetchInterval) ?? !1;
942
+ }, Te = function(e) {
943
+ b(this, p, je).call(this), c(this, M, e), !(V || x(this.options.enabled, i(this, d)) === !1 || !Re(i(this, M)) || i(this, M) === 0) && c(this, z, setInterval(() => {
944
+ (this.options.refetchIntervalInBackground || tt.isFocused()) && b(this, p, ae).call(this);
945
+ }, i(this, M)));
946
+ }, De = function() {
947
+ b(this, p, Pe).call(this), b(this, p, Te).call(this, b(this, p, Ie).call(this));
948
+ }, xe = function() {
949
+ i(this, G) && (clearTimeout(i(this, G)), c(this, G, void 0));
950
+ }, je = function() {
951
+ i(this, z) && (clearInterval(i(this, z)), c(this, z, void 0));
952
+ }, ke = function() {
953
+ const e = i(this, F).getQueryCache().build(i(this, F), this.options);
954
+ if (e === i(this, d))
955
+ return;
956
+ const s = i(this, d);
957
+ c(this, d, e), c(this, ue, e.state), this.hasListeners() && (s == null || s.removeObserver(this), e.addObserver(this));
958
+ }, ot = function(e) {
959
+ Ae.batch(() => {
960
+ e.listeners && this.listeners.forEach((s) => {
961
+ s(i(this, O));
962
+ }), i(this, F).getQueryCache().notify({
963
+ query: i(this, d),
964
+ type: "observerResultsUpdated"
965
+ });
966
+ });
967
+ }, Ye);
968
+ function Pt(t, e) {
969
+ return x(e.enabled, t) !== !1 && t.state.data === void 0 && !(t.state.status === "error" && e.retryOnMount === !1);
970
+ }
971
+ function Ge(t, e) {
972
+ return Pt(t, e) || t.state.data !== void 0 && Ue(t, e, e.refetchOnMount);
973
+ }
974
+ function Ue(t, e, s) {
975
+ if (x(e.enabled, t) !== !1) {
976
+ const r = typeof s == "function" ? s(t) : s;
977
+ return r === "always" || r !== !1 && Le(t, e);
978
+ }
979
+ return !1;
980
+ }
981
+ function ze(t, e, s, r) {
982
+ return (t !== e || x(r.enabled, t) === !1) && (!s.suspense || t.state.status !== "error") && Le(t, s);
983
+ }
984
+ function Le(t, e) {
985
+ return x(e.enabled, t) !== !1 && t.isStaleByTime(fe(e.staleTime, t));
986
+ }
987
+ function It(t, e) {
988
+ return !we(t.getCurrentResult(), e);
989
+ }
990
+ var ut = T.createContext(
991
+ void 0
992
+ ), Tt = (t) => {
993
+ const e = T.useContext(ut);
994
+ if (t)
995
+ return t;
996
+ if (!e)
997
+ throw new Error("No QueryClient set, use QueryClientProvider to set one");
998
+ return e;
999
+ }, ts = ({
1000
+ client: t,
1001
+ children: e
1002
+ }) => (T.useEffect(() => (t.mount(), () => {
1003
+ t.unmount();
1004
+ }), [t]), /* @__PURE__ */ pt.jsx(ut.Provider, { value: t, children: e })), ht = T.createContext(!1), Dt = () => T.useContext(ht);
1005
+ ht.Provider;
1006
+ function xt() {
1007
+ let t = !1;
1008
+ return {
1009
+ clearReset: () => {
1010
+ t = !1;
1011
+ },
1012
+ reset: () => {
1013
+ t = !0;
1014
+ },
1015
+ isReset: () => t
1016
+ };
1017
+ }
1018
+ var jt = T.createContext(xt()), kt = () => T.useContext(jt);
1019
+ function Ut(t, e) {
1020
+ return typeof t == "function" ? t(...e) : !!t;
1021
+ }
1022
+ function Ve() {
1023
+ }
1024
+ var Qt = (t, e) => {
1025
+ (t.suspense || t.throwOnError || t.experimental_prefetchInRender) && (e.isReset() || (t.retryOnMount = !1));
1026
+ }, qt = (t) => {
1027
+ T.useEffect(() => {
1028
+ t.clearReset();
1029
+ }, [t]);
1030
+ }, At = ({
1031
+ result: t,
1032
+ errorResetBoundary: e,
1033
+ throwOnError: s,
1034
+ query: r
1035
+ }) => t.isError && !e.isReset() && !t.isFetching && r && Ut(s, [t.error, r]), Lt = (t, e) => e.state.data === void 0, Mt = (t) => {
1036
+ t.suspense && (t.staleTime === void 0 && (t.staleTime = 1e3), typeof t.gcTime == "number" && (t.gcTime = Math.max(t.gcTime, 1e3)));
1037
+ }, Nt = (t, e) => t.isLoading && t.isFetching && !e, Kt = (t, e) => (t == null ? void 0 : t.suspense) && e.isPending, $e = (t, e, s) => e.fetchOptimistic(t).catch(() => {
1038
+ s.clearReset();
1039
+ });
1040
+ function ct(t, e, s) {
1041
+ var v, h, m, S, w;
1042
+ if (process.env.NODE_ENV !== "production" && (typeof t != "object" || Array.isArray(t)))
1043
+ throw new Error(
1044
+ 'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
1045
+ );
1046
+ const r = Tt(s), n = Dt(), u = kt(), a = r.defaultQueryOptions(t);
1047
+ (h = (v = r.getDefaultOptions().queries) == null ? void 0 : v._experimental_beforeQuery) == null || h.call(
1048
+ v,
1049
+ a
1050
+ ), a._optimisticResults = n ? "isRestoring" : "optimistic", Mt(a), Qt(a, u), qt(u);
1051
+ const o = !r.getQueryCache().get(a.queryHash), [l] = T.useState(
1052
+ () => new e(
1053
+ r,
1054
+ a
1055
+ )
1056
+ ), R = l.getOptimisticResult(a);
1057
+ if (T.useSyncExternalStore(
1058
+ T.useCallback(
1059
+ (f) => {
1060
+ const g = n ? Ve : l.subscribe(Ae.batchCalls(f));
1061
+ return l.updateResult(), g;
1062
+ },
1063
+ [l, n]
1064
+ ),
1065
+ () => l.getCurrentResult(),
1066
+ () => l.getCurrentResult()
1067
+ ), T.useEffect(() => {
1068
+ l.setOptions(a, { listeners: !1 });
1069
+ }, [a, l]), Kt(a, R))
1070
+ throw $e(a, l, u);
1071
+ if (At({
1072
+ result: R,
1073
+ errorResetBoundary: u,
1074
+ throwOnError: a.throwOnError,
1075
+ query: r.getQueryCache().get(a.queryHash)
1076
+ }))
1077
+ throw R.error;
1078
+ if ((S = (m = r.getDefaultOptions().queries) == null ? void 0 : m._experimental_afterQuery) == null || S.call(
1079
+ m,
1080
+ a,
1081
+ R
1082
+ ), a.experimental_prefetchInRender && !V && Nt(R, n)) {
1083
+ const f = o ? (
1084
+ // Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
1085
+ $e(a, l, u)
1086
+ ) : (
1087
+ // subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
1088
+ (w = r.getQueryCache().get(a.queryHash)) == null ? void 0 : w.promise
1089
+ );
1090
+ f == null || f.catch(Ve).finally(() => {
1091
+ l.updateResult();
1092
+ });
1093
+ }
1094
+ return a.notifyOnChangeProps ? R : l.trackResult(R);
1095
+ }
1096
+ function _t(t, e) {
1097
+ return ct(t, at, e);
1098
+ }
1099
+ function Ht(t, e) {
1100
+ return process.env.NODE_ENV !== "production" && t.queryFn === ye && console.error("skipToken is not allowed for useSuspenseQuery"), ct(
1101
+ {
1102
+ ...t,
1103
+ enabled: !0,
1104
+ suspense: !0,
1105
+ throwOnError: Lt,
1106
+ placeholderData: void 0
1107
+ },
1108
+ at,
1109
+ e
1110
+ );
1111
+ }
1112
+ const $ = (...t) => {
1113
+ const e = t.filter((s) => !!s).map((s) => s.replace(/(^\/+|\/+$)/g, "")).join("/").replace(/(^\/+|\/+$)/g, "");
1114
+ return e ? `/${e}` : "/";
1115
+ }, Me = (t, e) => {
1116
+ for (const s of t) {
1117
+ const r = Ne(s, e);
1118
+ if (r !== void 0) return r;
1119
+ }
1120
+ }, Ne = (t, e, s = []) => {
1121
+ const r = e(t, s);
1122
+ if (r !== void 0) return r;
1123
+ if (t.type === "category")
1124
+ for (const n of t.items) {
1125
+ const u = Ne(n, e, [
1126
+ ...s,
1127
+ t
1128
+ ]);
1129
+ if (u !== void 0) return u;
1130
+ }
1131
+ }, ss = () => {
1132
+ const t = pe(), s = dt().sidebar;
1133
+ return Me(s, (r) => {
1134
+ if (r.type === "doc" && $(r.id) === t.pathname)
1135
+ return r;
1136
+ });
1137
+ }, rs = (t) => {
1138
+ const e = pe();
1139
+ return Ne(t, (s) => {
1140
+ if (s.type === "category" && s.link && $(s.link.id) === e.pathname || s.type === "doc" && $(s.id) === e.pathname)
1141
+ return !0;
1142
+ });
1143
+ }, is = () => {
1144
+ const t = pe().pathname, s = dt().sidebar;
1145
+ let r, n, u = !1;
1146
+ return Me(s, (a) => {
1147
+ const o = a.type === "doc" ? $(a.id) : a.type === "category" && a.link ? $(a.link.id) : void 0;
1148
+ if (o) {
1149
+ if (u)
1150
+ return n = { label: a.label, id: o }, !0;
1151
+ t === o ? u = !0 : r = { label: a.label, id: o };
1152
+ }
1153
+ }), { prev: r, next: n };
1154
+ }, Bt = ft(
1155
+ void 0
1156
+ ), lt = () => {
1157
+ const t = yt(Bt);
1158
+ if (!t)
1159
+ throw new Error("useZudoku must be used within a ZudokuProvider.");
1160
+ return t;
1161
+ }, ns = () => {
1162
+ const { getApiIdentities: t } = lt();
1163
+ return _t({
1164
+ queryFn: t,
1165
+ queryKey: ["api-identities"]
1166
+ });
1167
+ }, dt = () => {
1168
+ const { getPluginSidebar: t, sidebars: e, topNavigation: s } = lt(), r = pe(), n = Object.entries(e).find(([, o]) => Me(o, (l) => {
1169
+ if ((l.type === "doc" ? $(l.id) : l.type === "category" && l.link ? $(l.link.id) : void 0) === r.pathname)
1170
+ return l;
1171
+ })), u = s.find((o) => o.id === (n == null ? void 0 : n[0])) ?? s.find((o) => vt(o.id, r.pathname)), { data: a } = Ht({
1172
+ queryFn: () => t(r.pathname),
1173
+ queryKey: ["plugin-sidebar", r.pathname]
1174
+ });
1175
+ return {
1176
+ sidebar: [...n ? n[1] : [], ...a],
1177
+ topNavItem: u
1178
+ };
1179
+ };
1180
+ export {
1181
+ ye as A,
1182
+ ts as B,
1183
+ rs as C,
1184
+ dt as D,
1185
+ Me as E,
1186
+ es as Q,
1187
+ Ot as R,
1188
+ Qe as S,
1189
+ Bt as Z,
1190
+ lt as a,
1191
+ ss as b,
1192
+ wt as c,
1193
+ is as d,
1194
+ Tt as e,
1195
+ Ve as f,
1196
+ Ut as g,
1197
+ Se as h,
1198
+ ns as i,
1199
+ $ as j,
1200
+ _t as k,
1201
+ bt as l,
1202
+ Wt as m,
1203
+ Ae as n,
1204
+ Jt as o,
1205
+ ge as p,
1206
+ gt as q,
1207
+ Yt as r,
1208
+ we as s,
1209
+ Xt as t,
1210
+ Ht as u,
1211
+ tt as v,
1212
+ st as w,
1213
+ fe as x,
1214
+ Zt as y,
1215
+ qe as z
1216
+ };
1217
+ //# sourceMappingURL=ZudokuContext-hmLMUdf2.js.map