zudoku 0.0.0-f49e3ea → 0.0.0-f52e8af

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 (1515) hide show
  1. package/README.md +1 -1
  2. package/cli.js +9 -0
  3. package/dist/app/ZuploBuildConfig.d.ts +155 -0
  4. package/dist/app/ZuploBuildConfig.js +29 -0
  5. package/dist/app/ZuploBuildConfig.js.map +1 -0
  6. package/dist/app/demo.js +1 -2
  7. package/dist/app/demo.js.map +1 -1
  8. package/dist/app/entry.client.d.ts +6 -0
  9. package/dist/app/entry.client.js +51 -15
  10. package/dist/app/entry.client.js.map +1 -1
  11. package/dist/app/entry.server.d.ts +9 -6
  12. package/dist/app/entry.server.js +14 -10
  13. package/dist/app/entry.server.js.map +1 -1
  14. package/dist/app/env.d.ts +33 -0
  15. package/dist/app/env.js +29 -0
  16. package/dist/app/env.js.map +1 -0
  17. package/dist/app/main.d.ts +2 -2
  18. package/dist/app/main.js +37 -12
  19. package/dist/app/main.js.map +1 -1
  20. package/dist/app/sentry.d.ts +3 -0
  21. package/dist/app/sentry.js +19 -0
  22. package/dist/app/sentry.js.map +1 -0
  23. package/dist/app/standalone.js +1 -2
  24. package/dist/app/standalone.js.map +1 -1
  25. package/dist/app/tailwind.d.ts +2 -1
  26. package/dist/app/tailwind.js +80 -48
  27. package/dist/app/tailwind.js.map +1 -1
  28. package/dist/cli/build/handler.d.ts +1 -3
  29. package/dist/cli/build/handler.js +9 -1
  30. package/dist/cli/build/handler.js.map +1 -1
  31. package/dist/cli/cli.js +17 -3
  32. package/dist/cli/cli.js.map +1 -1
  33. package/dist/cli/cmds/build.d.ts +11 -3
  34. package/dist/cli/cmds/build.js +21 -13
  35. package/dist/cli/cmds/build.js.map +1 -1
  36. package/dist/cli/cmds/dev.d.ts +1 -1
  37. package/dist/cli/cmds/dev.js +5 -0
  38. package/dist/cli/cmds/dev.js.map +1 -1
  39. package/dist/cli/cmds/preview.d.ts +16 -0
  40. package/dist/cli/cmds/preview.js +25 -0
  41. package/dist/cli/cmds/preview.js.map +1 -0
  42. package/dist/cli/common/logger.js +9 -0
  43. package/dist/cli/common/logger.js.map +1 -1
  44. package/dist/cli/common/machine-id/lib.js +1 -0
  45. package/dist/cli/common/machine-id/lib.js.map +1 -1
  46. package/dist/cli/common/outdated.js +2 -1
  47. package/dist/cli/common/outdated.js.map +1 -1
  48. package/dist/cli/common/output.js.map +1 -1
  49. package/dist/cli/common/utils/ports.d.ts +1 -1
  50. package/dist/cli/common/utils/ports.js +16 -15
  51. package/dist/cli/common/utils/ports.js.map +1 -1
  52. package/dist/cli/dev/handler.d.ts +1 -0
  53. package/dist/cli/dev/handler.js +15 -12
  54. package/dist/cli/dev/handler.js.map +1 -1
  55. package/dist/cli/preview/handler.d.ts +3 -0
  56. package/dist/cli/preview/handler.js +35 -0
  57. package/dist/cli/preview/handler.js.map +1 -0
  58. package/dist/config/common.d.ts +10 -0
  59. package/dist/config/common.js +2 -0
  60. package/dist/config/common.js.map +1 -0
  61. package/dist/config/config.d.ts +20 -16
  62. package/dist/config/loader.d.ts +6 -0
  63. package/dist/config/loader.js +65 -0
  64. package/dist/config/loader.js.map +1 -0
  65. package/dist/config/validators/BuildSchema.d.ts +60 -0
  66. package/dist/config/validators/BuildSchema.js +31 -0
  67. package/dist/config/validators/BuildSchema.js.map +1 -0
  68. package/dist/config/validators/InputSidebarSchema.d.ts +46 -30
  69. package/dist/config/validators/InputSidebarSchema.js +11 -1
  70. package/dist/config/validators/InputSidebarSchema.js.map +1 -1
  71. package/dist/config/validators/common.d.ts +8001 -0
  72. package/dist/config/validators/common.js +414 -0
  73. package/dist/config/validators/common.js.map +1 -0
  74. package/dist/config/validators/icon-types.d.ts +1 -0
  75. package/dist/config/validators/icon-types.js +2 -0
  76. package/dist/config/validators/icon-types.js.map +1 -0
  77. package/dist/config/validators/validate.d.ts +2008 -640
  78. package/dist/config/validators/validate.js +9 -228
  79. package/dist/config/validators/validate.js.map +1 -1
  80. package/dist/index.d.ts +3 -1
  81. package/dist/index.js +2 -0
  82. package/dist/index.js.map +1 -1
  83. package/dist/lib/MissingIcon.d.ts +2 -0
  84. package/dist/lib/MissingIcon.js +7 -0
  85. package/dist/lib/MissingIcon.js.map +1 -0
  86. package/dist/lib/authentication/AuthenticationPlugin.d.ts +4 -2
  87. package/dist/lib/authentication/AuthenticationPlugin.js +3 -0
  88. package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -1
  89. package/dist/lib/authentication/authentication.d.ts +2 -1
  90. package/dist/lib/authentication/components/CallbackHandler.js +6 -2
  91. package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
  92. package/dist/lib/authentication/components/SignIn.d.ts +1 -1
  93. package/dist/lib/authentication/components/SignIn.js +5 -2
  94. package/dist/lib/authentication/components/SignIn.js.map +1 -1
  95. package/dist/lib/authentication/components/SignOut.js +2 -2
  96. package/dist/lib/authentication/components/SignOut.js.map +1 -1
  97. package/dist/lib/authentication/components/SignUp.d.ts +1 -1
  98. package/dist/lib/authentication/components/SignUp.js +4 -1
  99. package/dist/lib/authentication/components/SignUp.js.map +1 -1
  100. package/dist/lib/authentication/hook.d.ts +1 -0
  101. package/dist/lib/authentication/hook.js +11 -1
  102. package/dist/lib/authentication/hook.js.map +1 -1
  103. package/dist/lib/authentication/providers/auth0.d.ts +2 -2
  104. package/dist/lib/authentication/providers/auth0.js +3 -2
  105. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  106. package/dist/lib/authentication/providers/clerk.d.ts +2 -2
  107. package/dist/lib/authentication/providers/clerk.js +63 -13
  108. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  109. package/dist/lib/authentication/providers/openid.d.ts +17 -9
  110. package/dist/lib/authentication/providers/openid.js +45 -26
  111. package/dist/lib/authentication/providers/openid.js.map +1 -1
  112. package/dist/lib/authentication/providers/supabase.d.ts +4 -0
  113. package/dist/lib/authentication/providers/supabase.js +117 -0
  114. package/dist/lib/authentication/providers/supabase.js.map +1 -0
  115. package/dist/lib/authentication/state.d.ts +0 -17
  116. package/dist/lib/authentication/state.js +9 -7
  117. package/dist/lib/authentication/state.js.map +1 -1
  118. package/dist/lib/components/AnchorLink.d.ts +2 -2
  119. package/dist/lib/components/AnchorLink.js +9 -5
  120. package/dist/lib/components/AnchorLink.js.map +1 -1
  121. package/dist/lib/components/Autocomplete.d.ts +13 -0
  122. package/dist/lib/components/Autocomplete.js +47 -0
  123. package/dist/lib/components/Autocomplete.js.map +1 -0
  124. package/dist/lib/components/Banner.js +1 -1
  125. package/dist/lib/components/Banner.js.map +1 -1
  126. package/dist/lib/components/Bootstrap.d.ts +3 -3
  127. package/dist/lib/components/Bootstrap.js +12 -13
  128. package/dist/lib/components/Bootstrap.js.map +1 -1
  129. package/dist/lib/components/BuildCheck.d.ts +4 -0
  130. package/dist/lib/components/BuildCheck.js +38 -0
  131. package/dist/lib/components/BuildCheck.js.map +1 -0
  132. package/dist/lib/components/Footer.d.ts +1 -0
  133. package/dist/lib/components/Footer.js +32 -0
  134. package/dist/lib/components/Footer.js.map +1 -0
  135. package/dist/lib/components/Header.js +18 -10
  136. package/dist/lib/components/Header.js.map +1 -1
  137. package/dist/lib/components/Heading.d.ts +5 -5
  138. package/dist/lib/components/Heading.js +1 -1
  139. package/dist/lib/components/Heading.js.map +1 -1
  140. package/dist/lib/components/InlineCode.d.ts +2 -1
  141. package/dist/lib/components/InlineCode.js +2 -9
  142. package/dist/lib/components/InlineCode.js.map +1 -1
  143. package/dist/lib/components/Layout.js +9 -23
  144. package/dist/lib/components/Layout.js.map +1 -1
  145. package/dist/lib/components/Main.d.ts +2 -0
  146. package/dist/lib/components/Main.js +18 -0
  147. package/dist/lib/components/Main.js.map +1 -0
  148. package/dist/lib/components/Markdown.d.ts +4 -2
  149. package/dist/lib/components/Markdown.js +10 -14
  150. package/dist/lib/components/Markdown.js.map +1 -1
  151. package/dist/lib/components/MobileTopNavigation.js +6 -3
  152. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  153. package/dist/lib/components/NotFoundPage.js +1 -1
  154. package/dist/lib/components/NotFoundPage.js.map +1 -1
  155. package/dist/lib/components/Pagination.d.ts +11 -0
  156. package/dist/lib/components/Pagination.js +10 -0
  157. package/dist/lib/components/Pagination.js.map +1 -0
  158. package/dist/lib/components/PathRenderer.d.ts +11 -0
  159. package/dist/lib/components/PathRenderer.js +28 -0
  160. package/dist/lib/components/PathRenderer.js.map +1 -0
  161. package/dist/lib/components/ReactMarkdown.d.ts +29 -0
  162. package/dist/lib/components/ReactMarkdown.js +182 -0
  163. package/dist/lib/components/ReactMarkdown.js.map +1 -0
  164. package/dist/lib/components/Search.d.ts +3 -1
  165. package/dist/lib/components/Search.js +9 -3
  166. package/dist/lib/components/Search.js.map +1 -1
  167. package/dist/lib/components/SlotletProvider.d.ts +2 -2
  168. package/dist/lib/components/StatusPage.d.ts +7 -0
  169. package/dist/lib/components/StatusPage.js +71 -0
  170. package/dist/lib/components/StatusPage.js.map +1 -0
  171. package/dist/lib/components/ThemeSwitch.js +8 -5
  172. package/dist/lib/components/ThemeSwitch.js.map +1 -1
  173. package/dist/lib/components/TopNavigation.d.ts +3 -2
  174. package/dist/lib/components/TopNavigation.js +30 -16
  175. package/dist/lib/components/TopNavigation.js.map +1 -1
  176. package/dist/lib/components/Zudoku.d.ts +1 -1
  177. package/dist/lib/components/Zudoku.js +13 -8
  178. package/dist/lib/components/Zudoku.js.map +1 -1
  179. package/dist/lib/components/cache.d.ts +13 -0
  180. package/dist/lib/components/cache.js +20 -0
  181. package/dist/lib/components/cache.js.map +1 -0
  182. package/dist/lib/components/context/BypassProtectedRoutesContext.d.ts +1 -0
  183. package/dist/lib/components/context/BypassProtectedRoutesContext.js +3 -0
  184. package/dist/lib/components/context/BypassProtectedRoutesContext.js.map +1 -0
  185. package/dist/lib/components/context/RouterEventsEmitter.d.ts +1 -0
  186. package/dist/lib/components/context/RouterEventsEmitter.js +17 -0
  187. package/dist/lib/components/context/RouterEventsEmitter.js.map +1 -0
  188. package/dist/lib/components/context/ViewportAnchorContext.d.ts +2 -4
  189. package/dist/lib/components/context/ViewportAnchorContext.js +29 -23
  190. package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
  191. package/dist/lib/components/context/ZudokuContext.d.ts +2 -2
  192. package/dist/lib/components/context/ZudokuContext.js +20 -8
  193. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  194. package/dist/lib/components/index.d.ts +42 -17
  195. package/dist/lib/components/index.js +19 -4
  196. package/dist/lib/components/index.js.map +1 -1
  197. package/dist/lib/components/navigation/PoweredByZudoku.d.ts +3 -0
  198. package/dist/lib/components/navigation/PoweredByZudoku.js +7 -0
  199. package/dist/lib/components/navigation/PoweredByZudoku.js.map +1 -0
  200. package/dist/lib/components/navigation/Sidebar.d.ts +5 -1
  201. package/dist/lib/components/navigation/Sidebar.js +3 -7
  202. package/dist/lib/components/navigation/Sidebar.js.map +1 -1
  203. package/dist/lib/components/navigation/SidebarBadge.d.ts +6 -3
  204. package/dist/lib/components/navigation/SidebarBadge.js +13 -11
  205. package/dist/lib/components/navigation/SidebarBadge.js.map +1 -1
  206. package/dist/lib/components/navigation/SidebarCategory.d.ts +3 -3
  207. package/dist/lib/components/navigation/SidebarCategory.js +31 -22
  208. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  209. package/dist/lib/components/navigation/SidebarItem.d.ts +3 -4
  210. package/dist/lib/components/navigation/SidebarItem.js +19 -18
  211. package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
  212. package/dist/lib/components/navigation/SidebarWrapper.d.ts +7 -6
  213. package/dist/lib/components/navigation/SidebarWrapper.js +18 -3
  214. package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
  215. package/dist/lib/{plugins/markdown → components/navigation}/Toc.js +6 -8
  216. package/dist/lib/components/navigation/Toc.js.map +1 -0
  217. package/dist/lib/components/navigation/ZudokuLogo.d.ts +6 -0
  218. package/dist/lib/components/navigation/ZudokuLogo.js +5 -0
  219. package/dist/lib/components/navigation/ZudokuLogo.js.map +1 -0
  220. package/dist/lib/components/navigation/ZuploLogo.d.ts +3 -0
  221. package/dist/lib/components/navigation/ZuploLogo.js +4 -0
  222. package/dist/lib/components/navigation/ZuploLogo.js.map +1 -0
  223. package/dist/lib/components/navigation/utils.js +1 -1
  224. package/dist/lib/components/navigation/utils.js.map +1 -1
  225. package/dist/lib/core/RouteGuard.d.ts +2 -0
  226. package/dist/lib/core/RouteGuard.js +52 -0
  227. package/dist/lib/core/RouteGuard.js.map +1 -0
  228. package/dist/lib/core/ZudokuContext.d.ts +45 -8
  229. package/dist/lib/core/ZudokuContext.js +37 -12
  230. package/dist/lib/core/ZudokuContext.js.map +1 -1
  231. package/dist/lib/core/plugins.d.ts +21 -7
  232. package/dist/lib/core/plugins.js +3 -0
  233. package/dist/lib/core/plugins.js.map +1 -1
  234. package/dist/lib/errors/ErrorAlert.js +6 -1
  235. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  236. package/dist/lib/errors/RouterError.js +1 -1
  237. package/dist/lib/errors/RouterError.js.map +1 -1
  238. package/dist/lib/hooks/index.d.ts +3 -0
  239. package/dist/lib/hooks/index.js +5 -0
  240. package/dist/lib/hooks/index.js.map +1 -0
  241. package/dist/lib/hooks/useEvent.d.ts +11 -0
  242. package/dist/lib/hooks/useEvent.js +19 -0
  243. package/dist/lib/hooks/useEvent.js.map +1 -0
  244. package/dist/lib/hooks/useEvent.test.js +100 -0
  245. package/dist/lib/hooks/useEvent.test.js.map +1 -0
  246. package/dist/lib/icons.d.ts +1 -0
  247. package/dist/lib/icons.js +1 -0
  248. package/dist/lib/icons.js.map +1 -1
  249. package/dist/lib/oas/graphql/circular.d.ts +3 -0
  250. package/dist/lib/oas/graphql/circular.js +43 -0
  251. package/dist/lib/oas/graphql/circular.js.map +1 -0
  252. package/dist/lib/oas/graphql/index.d.ts +25 -1
  253. package/dist/lib/oas/graphql/index.js +213 -66
  254. package/dist/lib/oas/graphql/index.js.map +1 -1
  255. package/dist/lib/oas/parser/dereference/index.js +8 -3
  256. package/dist/lib/oas/parser/dereference/index.js.map +1 -1
  257. package/dist/lib/oas/parser/index.d.ts +8 -3
  258. package/dist/lib/oas/parser/index.js +7 -23
  259. package/dist/lib/oas/parser/index.js.map +1 -1
  260. package/dist/lib/oas/parser/upgrade/index.d.ts +3 -2
  261. package/dist/lib/oas/parser/upgrade/index.js +83 -33
  262. package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
  263. package/dist/lib/plugins/api-catalog/Catalog.d.ts +4 -0
  264. package/dist/lib/plugins/api-catalog/Catalog.js +26 -0
  265. package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -0
  266. package/dist/lib/plugins/api-catalog/index.d.ts +31 -0
  267. package/dist/lib/plugins/api-catalog/index.js +46 -0
  268. package/dist/lib/plugins/api-catalog/index.js.map +1 -0
  269. package/dist/lib/plugins/api-keys/CreateApiKey.js +8 -4
  270. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
  271. package/dist/lib/plugins/api-keys/ProtectedRoute.js +1 -1
  272. package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -1
  273. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +1 -1
  274. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  275. package/dist/lib/plugins/api-keys/index.d.ts +1 -0
  276. package/dist/lib/plugins/api-keys/index.js +4 -0
  277. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  278. package/dist/lib/plugins/markdown/MdxPage.d.ts +10 -2
  279. package/dist/lib/plugins/markdown/MdxPage.js +17 -4
  280. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  281. package/dist/lib/plugins/markdown/index.d.ts +3 -1
  282. package/dist/lib/plugins/markdown/index.js +1 -1
  283. package/dist/lib/plugins/markdown/index.js.map +1 -1
  284. package/dist/lib/plugins/markdown/resolver.d.ts +0 -6
  285. package/dist/lib/plugins/markdown/resolver.js +0 -29
  286. package/dist/lib/plugins/markdown/resolver.js.map +1 -1
  287. package/dist/lib/plugins/openapi/CollapsibleCode.js +2 -1
  288. package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -1
  289. package/dist/lib/plugins/openapi/ColorizedParam.d.ts +10 -2
  290. package/dist/lib/plugins/openapi/ColorizedParam.js +18 -7
  291. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  292. package/dist/lib/plugins/openapi/Endpoint.d.ts +1 -1
  293. package/dist/lib/plugins/openapi/Endpoint.js +8 -7
  294. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  295. package/dist/lib/plugins/openapi/OasProvider.d.ts +8 -0
  296. package/dist/lib/plugins/openapi/OasProvider.js +29 -0
  297. package/dist/lib/plugins/openapi/OasProvider.js.map +1 -0
  298. package/dist/lib/plugins/openapi/OperationList.d.ts +5 -2
  299. package/dist/lib/plugins/openapi/OperationList.js +92 -11
  300. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  301. package/dist/lib/plugins/openapi/OperationListItem.d.ts +5 -3
  302. package/dist/lib/plugins/openapi/OperationListItem.js +12 -6
  303. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  304. package/dist/lib/plugins/openapi/ParamInfos.d.ts +6 -0
  305. package/dist/lib/plugins/openapi/ParamInfos.js +45 -0
  306. package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -0
  307. package/dist/lib/plugins/openapi/ParameterList.d.ts +2 -1
  308. package/dist/lib/plugins/openapi/ParameterList.js +3 -2
  309. package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
  310. package/dist/lib/plugins/openapi/ParameterListItem.js +16 -3
  311. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  312. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +4 -2
  313. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +12 -3
  314. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
  315. package/dist/lib/plugins/openapi/RequestBodySidecarBox.d.ts +3 -4
  316. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +5 -13
  317. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  318. package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +2 -4
  319. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +4 -13
  320. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  321. package/dist/lib/plugins/openapi/SchemaList.d.ts +1 -0
  322. package/dist/lib/plugins/openapi/SchemaList.js +53 -0
  323. package/dist/lib/plugins/openapi/SchemaList.js.map +1 -0
  324. package/dist/lib/plugins/openapi/Sidecar.js +85 -38
  325. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  326. package/dist/lib/plugins/openapi/SidecarBox.js +4 -4
  327. package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
  328. package/dist/lib/plugins/openapi/SidecarExamples.d.ts +9 -0
  329. package/dist/lib/plugins/openapi/SidecarExamples.js +76 -0
  330. package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -0
  331. package/dist/lib/plugins/openapi/SimpleSelect.js +1 -1
  332. package/dist/lib/plugins/openapi/SimpleSelect.js.map +1 -1
  333. package/dist/lib/plugins/openapi/client/GraphQLClient.d.ts +2 -2
  334. package/dist/lib/plugins/openapi/client/GraphQLClient.js +23 -82
  335. package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -1
  336. package/dist/lib/plugins/openapi/client/createServer.d.ts +2 -1
  337. package/dist/lib/plugins/openapi/client/createServer.js +5 -2
  338. package/dist/lib/plugins/openapi/client/createServer.js.map +1 -1
  339. package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +11 -2
  340. package/dist/lib/plugins/openapi/client/useCreateQuery.js +14 -7
  341. package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
  342. package/dist/lib/plugins/openapi/components/ConstValue.d.ts +5 -0
  343. package/dist/lib/plugins/openapi/components/ConstValue.js +6 -0
  344. package/dist/lib/plugins/openapi/components/ConstValue.js.map +1 -0
  345. package/dist/lib/plugins/openapi/components/EnumValues.d.ts +5 -0
  346. package/dist/lib/plugins/openapi/components/EnumValues.js +15 -0
  347. package/dist/lib/plugins/openapi/components/EnumValues.js.map +1 -0
  348. package/dist/lib/plugins/openapi/components/ResponseContent.d.ts +12 -0
  349. package/dist/lib/plugins/openapi/components/ResponseContent.js +21 -0
  350. package/dist/lib/plugins/openapi/components/ResponseContent.js.map +1 -0
  351. package/dist/lib/plugins/openapi/components/SelectOnClick.d.ts +5 -0
  352. package/dist/lib/plugins/openapi/components/SelectOnClick.js +16 -0
  353. package/dist/lib/plugins/openapi/components/SelectOnClick.js.map +1 -0
  354. package/dist/lib/plugins/openapi/context.d.ts +3 -3
  355. package/dist/lib/plugins/openapi/graphql/gql.d.ts +11 -3
  356. package/dist/lib/plugins/openapi/graphql/gql.js +5 -14
  357. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  358. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +113 -21
  359. package/dist/lib/plugins/openapi/graphql/graphql.js +55 -11
  360. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  361. package/dist/lib/plugins/openapi/index.d.ts +10 -7
  362. package/dist/lib/plugins/openapi/index.js +65 -82
  363. package/dist/lib/plugins/openapi/index.js.map +1 -1
  364. package/dist/lib/plugins/openapi/interfaces.d.ts +57 -3
  365. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +6 -0
  366. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +8 -0
  367. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -0
  368. package/dist/lib/plugins/openapi/playground/Headers.d.ts +4 -4
  369. package/dist/lib/plugins/openapi/playground/Headers.js +84 -5
  370. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  371. package/dist/lib/plugins/openapi/playground/IdentityDialog.d.ts +11 -0
  372. package/dist/lib/plugins/openapi/playground/IdentityDialog.js +14 -0
  373. package/dist/lib/plugins/openapi/playground/IdentityDialog.js.map +1 -0
  374. package/dist/lib/plugins/openapi/playground/IdentitySelector.d.ts +7 -0
  375. package/dist/lib/plugins/openapi/playground/IdentitySelector.js +8 -0
  376. package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -0
  377. package/dist/lib/plugins/openapi/playground/ParamsGrid.d.ts +9 -0
  378. package/dist/lib/plugins/openapi/playground/ParamsGrid.js +5 -0
  379. package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -0
  380. package/dist/lib/plugins/openapi/playground/PathParams.d.ts +3 -2
  381. package/dist/lib/plugins/openapi/playground/PathParams.js +5 -7
  382. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  383. package/dist/lib/plugins/openapi/playground/Playground.d.ts +37 -2
  384. package/dist/lib/plugins/openapi/playground/Playground.js +131 -69
  385. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  386. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
  387. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  388. package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +1 -1
  389. package/dist/lib/plugins/openapi/playground/QueryParams.js +24 -18
  390. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  391. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.d.ts +7 -0
  392. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js +8 -0
  393. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js.map +1 -0
  394. package/dist/lib/plugins/openapi/playground/SubmitButton.d.ts +7 -0
  395. package/dist/lib/plugins/openapi/playground/SubmitButton.js +22 -0
  396. package/dist/lib/plugins/openapi/playground/SubmitButton.js.map +1 -0
  397. package/dist/lib/plugins/openapi/playground/rememberedIdentity.d.ts +17 -0
  398. package/dist/lib/plugins/openapi/playground/rememberedIdentity.js +11 -0
  399. package/dist/lib/plugins/openapi/playground/rememberedIdentity.js.map +1 -0
  400. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.d.ts +7 -0
  401. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +11 -0
  402. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js.map +1 -0
  403. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +8 -0
  404. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +101 -0
  405. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -0
  406. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +9 -0
  407. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +17 -0
  408. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -0
  409. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.d.ts +10 -0
  410. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js +32 -0
  411. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js.map +1 -0
  412. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.d.ts +1 -0
  413. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.js +56 -0
  414. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.js.map +1 -0
  415. package/dist/lib/plugins/openapi/processors/removeExtensions.d.ts +8 -0
  416. package/dist/lib/plugins/openapi/processors/removeExtensions.js +16 -0
  417. package/dist/lib/plugins/openapi/processors/removeExtensions.js.map +1 -0
  418. package/dist/lib/plugins/openapi/processors/removeExtensions.test.d.ts +1 -0
  419. package/dist/lib/plugins/openapi/processors/removeExtensions.test.js +194 -0
  420. package/dist/lib/plugins/openapi/processors/removeExtensions.test.js.map +1 -0
  421. package/dist/lib/plugins/openapi/processors/removeParameters.d.ts +12 -0
  422. package/dist/lib/plugins/openapi/processors/removeParameters.js +66 -0
  423. package/dist/lib/plugins/openapi/processors/removeParameters.js.map +1 -0
  424. package/dist/lib/plugins/openapi/processors/removeParameters.test.d.ts +1 -0
  425. package/dist/lib/plugins/openapi/processors/removeParameters.test.js +159 -0
  426. package/dist/lib/plugins/openapi/processors/removeParameters.test.js.map +1 -0
  427. package/dist/lib/plugins/openapi/processors/removePaths.d.ts +13 -0
  428. package/dist/lib/plugins/openapi/processors/removePaths.js +33 -0
  429. package/dist/lib/plugins/openapi/processors/removePaths.js.map +1 -0
  430. package/dist/lib/plugins/openapi/processors/removePaths.test.d.ts +1 -0
  431. package/dist/lib/plugins/openapi/processors/removePaths.test.js +144 -0
  432. package/dist/lib/plugins/openapi/processors/removePaths.test.js.map +1 -0
  433. package/dist/lib/plugins/openapi/processors/traverse.d.ts +1 -0
  434. package/dist/lib/plugins/openapi/processors/traverse.js +2 -0
  435. package/dist/lib/plugins/openapi/processors/traverse.js.map +1 -0
  436. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.d.ts +1 -2
  437. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js +2 -2
  438. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js.map +1 -1
  439. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.d.ts +2 -1
  440. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js +2 -2
  441. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js.map +1 -1
  442. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.d.ts +0 -1
  443. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js +1 -1
  444. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js.map +1 -1
  445. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.d.ts +4 -0
  446. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +15 -0
  447. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -0
  448. package/dist/lib/plugins/openapi/schema/{SchemaComponents.d.ts → SchemaPropertyItem.d.ts} +2 -4
  449. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +45 -0
  450. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -0
  451. package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +2 -2
  452. package/dist/lib/plugins/openapi/schema/SchemaView.js +38 -50
  453. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  454. package/dist/lib/plugins/openapi/schema/utils.d.ts +8 -1
  455. package/dist/lib/plugins/openapi/schema/utils.js +15 -4
  456. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  457. package/dist/lib/plugins/openapi/state.d.ts +25 -0
  458. package/dist/lib/plugins/openapi/state.js +18 -0
  459. package/dist/lib/plugins/openapi/state.js.map +1 -0
  460. package/dist/lib/plugins/openapi/util/createSidebarCategory.d.ts +9 -0
  461. package/dist/lib/plugins/openapi/util/createSidebarCategory.js +23 -0
  462. package/dist/lib/plugins/openapi/util/createSidebarCategory.js.map +1 -0
  463. package/dist/lib/plugins/openapi/util/generateSchemaExample.d.ts +1 -1
  464. package/dist/lib/plugins/openapi/util/generateSchemaExample.js +62 -10
  465. package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
  466. package/dist/lib/plugins/openapi/util/getRoutes.d.ts +10 -0
  467. package/dist/lib/plugins/openapi/util/getRoutes.js +117 -0
  468. package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -0
  469. package/dist/lib/plugins/openapi/util/methodColorMap.d.ts +2 -0
  470. package/dist/lib/plugins/openapi/util/methodColorMap.js +10 -0
  471. package/dist/lib/plugins/openapi/util/methodColorMap.js.map +1 -0
  472. package/dist/lib/plugins/openapi/util/methodToColor.d.ts +20 -0
  473. package/dist/lib/plugins/openapi/util/methodToColor.js +24 -0
  474. package/dist/lib/plugins/openapi/util/methodToColor.js.map +1 -0
  475. package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.d.ts +1 -0
  476. package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.js +27 -0
  477. package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.js.map +1 -0
  478. package/dist/lib/plugins/redirect/index.d.ts +1 -1
  479. package/dist/lib/plugins/redirect/index.js +1 -1
  480. package/dist/lib/plugins/redirect/index.js.map +1 -1
  481. package/dist/lib/plugins/search-inkeep/index.d.ts +22 -3
  482. package/dist/lib/plugins/search-inkeep/index.js +41 -5
  483. package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
  484. package/dist/lib/plugins/search-inkeep/inkeep.d.ts +3 -4
  485. package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -1
  486. package/dist/lib/plugins/search-pagefind/PagefindSearch.d.ts +6 -0
  487. package/dist/lib/plugins/search-pagefind/PagefindSearch.js +80 -0
  488. package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -0
  489. package/dist/lib/plugins/search-pagefind/ResultList.d.ts +8 -0
  490. package/dist/lib/plugins/search-pagefind/ResultList.js +32 -0
  491. package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -0
  492. package/dist/lib/plugins/search-pagefind/get-results.d.ts +10 -0
  493. package/dist/lib/plugins/search-pagefind/get-results.js +42 -0
  494. package/dist/lib/plugins/search-pagefind/get-results.js.map +1 -0
  495. package/dist/lib/plugins/search-pagefind/index.d.ts +6 -0
  496. package/dist/lib/plugins/search-pagefind/index.js +9 -0
  497. package/dist/lib/plugins/search-pagefind/index.js.map +1 -0
  498. package/dist/lib/plugins/search-pagefind/types.d.ts +85 -0
  499. package/dist/lib/plugins/search-pagefind/types.js +2 -0
  500. package/dist/lib/plugins/search-pagefind/types.js.map +1 -0
  501. package/dist/lib/shiki.d.ts +35 -0
  502. package/dist/lib/shiki.js +103 -0
  503. package/dist/lib/shiki.js.map +1 -0
  504. package/dist/lib/ui/Badge.d.ts +1 -1
  505. package/dist/lib/ui/Badge.js +2 -1
  506. package/dist/lib/ui/Badge.js.map +1 -1
  507. package/dist/lib/ui/Button.d.ts +2 -2
  508. package/dist/lib/ui/Button.js +2 -1
  509. package/dist/lib/ui/Button.js.map +1 -1
  510. package/dist/lib/ui/Callout.d.ts +2 -1
  511. package/dist/lib/ui/Callout.js +3 -2
  512. package/dist/lib/ui/Callout.js.map +1 -1
  513. package/dist/lib/ui/Card.js +1 -1
  514. package/dist/lib/ui/Card.js.map +1 -1
  515. package/dist/lib/ui/Checkbox.js +1 -1
  516. package/dist/lib/ui/Checkbox.js.map +1 -1
  517. package/dist/lib/ui/CodeBlock.d.ts +16 -0
  518. package/dist/lib/ui/CodeBlock.js +18 -0
  519. package/dist/lib/ui/CodeBlock.js.map +1 -0
  520. package/dist/lib/ui/Command.d.ts +17 -3
  521. package/dist/lib/ui/Command.js +7 -3
  522. package/dist/lib/ui/Command.js.map +1 -1
  523. package/dist/lib/ui/Form.d.ts +1 -1
  524. package/dist/lib/ui/Input.d.ts +1 -2
  525. package/dist/lib/ui/Input.js.map +1 -1
  526. package/dist/lib/ui/Select.js +3 -3
  527. package/dist/lib/ui/Select.js.map +1 -1
  528. package/dist/lib/ui/Stepper.d.ts +3 -0
  529. package/dist/lib/ui/Stepper.js +7 -0
  530. package/dist/lib/ui/Stepper.js.map +1 -0
  531. package/dist/lib/ui/SyntaxHighlight.d.ts +10 -0
  532. package/dist/lib/ui/SyntaxHighlight.js +14 -0
  533. package/dist/lib/ui/SyntaxHighlight.js.map +1 -0
  534. package/dist/lib/ui/util.d.ts +2 -0
  535. package/dist/lib/ui/util.js +3 -0
  536. package/dist/lib/ui/util.js.map +1 -0
  537. package/dist/lib/util/MdxComponents.d.ts +29 -20
  538. package/dist/lib/util/MdxComponents.js +17 -15
  539. package/dist/lib/util/MdxComponents.js.map +1 -1
  540. package/dist/lib/util/createVariantComponent.d.ts +2 -2
  541. package/dist/lib/util/detectOS.d.ts +1 -0
  542. package/dist/lib/util/detectOS.js +11 -0
  543. package/dist/lib/util/detectOS.js.map +1 -0
  544. package/dist/lib/util/ensureArray.d.ts +1 -0
  545. package/dist/lib/util/ensureArray.js +2 -0
  546. package/dist/lib/util/ensureArray.js.map +1 -0
  547. package/dist/lib/util/joinPath.d.ts +3 -0
  548. package/dist/lib/util/joinPath.js +3 -0
  549. package/dist/lib/util/joinPath.js.map +1 -1
  550. package/dist/lib/util/joinUrl.d.ts +1 -0
  551. package/dist/lib/util/joinUrl.js +40 -0
  552. package/dist/lib/util/joinUrl.js.map +1 -0
  553. package/dist/lib/util/joinUrl.test.d.ts +1 -0
  554. package/dist/lib/util/joinUrl.test.js +43 -0
  555. package/dist/lib/util/joinUrl.test.js.map +1 -0
  556. package/dist/lib/util/scrollIntoViewIfNeeded.d.ts +1 -0
  557. package/dist/lib/util/scrollIntoViewIfNeeded.js +14 -0
  558. package/dist/lib/util/scrollIntoViewIfNeeded.js.map +1 -0
  559. package/dist/lib/util/traverse.d.ts +3 -0
  560. package/dist/lib/util/traverse.js +23 -0
  561. package/dist/lib/util/traverse.js.map +1 -0
  562. package/dist/lib/util/types.d.ts +7 -0
  563. package/dist/lib/util/types.js +2 -0
  564. package/dist/lib/util/types.js.map +1 -0
  565. package/dist/lib/util/url.d.ts +4 -0
  566. package/dist/lib/util/url.js +13 -0
  567. package/dist/lib/util/url.js.map +1 -0
  568. package/dist/lib/util/url.test.d.ts +1 -0
  569. package/dist/lib/util/url.test.js +26 -0
  570. package/dist/lib/util/url.test.js.map +1 -0
  571. package/dist/lib/util/useExposedProps.js +1 -1
  572. package/dist/lib/util/useExposedProps.js.map +1 -1
  573. package/dist/lib/util/useLatest.d.ts +1 -0
  574. package/dist/lib/util/useLatest.js +15 -0
  575. package/dist/lib/util/useLatest.js.map +1 -0
  576. package/dist/lib/util/useOnScreen.d.ts +3 -2
  577. package/dist/lib/util/useOnScreen.js +3 -3
  578. package/dist/lib/util/useOnScreen.js.map +1 -1
  579. package/dist/lib/util/useScrollToAnchor.d.ts +1 -0
  580. package/dist/lib/util/useScrollToAnchor.js +42 -37
  581. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  582. package/dist/lib/util/useScrollToTop.js +7 -5
  583. package/dist/lib/util/useScrollToTop.js.map +1 -1
  584. package/dist/vite/api/SchemaManager.d.ts +36 -0
  585. package/dist/vite/api/SchemaManager.js +122 -0
  586. package/dist/vite/api/SchemaManager.js.map +1 -0
  587. package/dist/vite/api/SchemaManager.test.d.ts +1 -0
  588. package/dist/vite/api/SchemaManager.test.js +106 -0
  589. package/dist/vite/api/SchemaManager.test.js.map +1 -0
  590. package/dist/vite/api/schema-codegen.d.ts +12 -0
  591. package/dist/vite/api/schema-codegen.js +85 -0
  592. package/dist/vite/api/schema-codegen.js.map +1 -0
  593. package/dist/vite/api/schema-codegen.test.d.ts +1 -0
  594. package/dist/vite/api/schema-codegen.test.js +313 -0
  595. package/dist/vite/api/schema-codegen.test.js.map +1 -0
  596. package/dist/vite/build.js +42 -16
  597. package/dist/vite/build.js.map +1 -1
  598. package/dist/vite/config.d.ts +7 -8
  599. package/dist/vite/config.js +156 -72
  600. package/dist/vite/config.js.map +1 -1
  601. package/dist/vite/config.test.js +11 -5
  602. package/dist/vite/config.test.js.map +1 -1
  603. package/dist/vite/create-pagefind-index.d.ts +4 -0
  604. package/dist/vite/create-pagefind-index.js +12 -0
  605. package/dist/vite/create-pagefind-index.js.map +1 -0
  606. package/dist/vite/css/collect.d.ts +2 -0
  607. package/dist/vite/css/collect.js +27 -0
  608. package/dist/vite/css/collect.js.map +1 -0
  609. package/dist/vite/css/plugin.d.ts +5 -0
  610. package/dist/vite/css/plugin.js +79 -0
  611. package/dist/vite/css/plugin.js.map +1 -0
  612. package/dist/vite/dev-server.d.ts +5 -3
  613. package/dist/vite/dev-server.js +71 -21
  614. package/dist/vite/dev-server.js.map +1 -1
  615. package/dist/vite/error-handler.d.ts +1 -1
  616. package/dist/vite/error-handler.js +1 -1
  617. package/dist/vite/error-handler.js.map +1 -1
  618. package/dist/vite/html.d.ts +6 -2
  619. package/dist/vite/html.js +11 -8
  620. package/dist/vite/html.js.map +1 -1
  621. package/dist/vite/output.d.ts +15 -3
  622. package/dist/vite/output.js +41 -14
  623. package/dist/vite/output.js.map +1 -1
  624. package/dist/vite/plugin-api-keys.d.ts +2 -2
  625. package/dist/vite/plugin-api-keys.js +5 -5
  626. package/dist/vite/plugin-api-keys.js.map +1 -1
  627. package/dist/vite/plugin-api.d.ts +2 -2
  628. package/dist/vite/plugin-api.js +145 -32
  629. package/dist/vite/plugin-api.js.map +1 -1
  630. package/dist/vite/plugin-auth.d.ts +2 -2
  631. package/dist/vite/plugin-auth.js +7 -4
  632. package/dist/vite/plugin-auth.js.map +1 -1
  633. package/dist/vite/plugin-component.d.ts +2 -2
  634. package/dist/vite/plugin-component.js +20 -20
  635. package/dist/vite/plugin-component.js.map +1 -1
  636. package/dist/vite/plugin-config-reload.d.ts +4 -4
  637. package/dist/vite/plugin-config-reload.js +15 -6
  638. package/dist/vite/plugin-config-reload.js.map +1 -1
  639. package/dist/vite/plugin-config.d.ts +2 -2
  640. package/dist/vite/plugin-config.js +25 -1
  641. package/dist/vite/plugin-config.js.map +1 -1
  642. package/dist/vite/plugin-custom-pages.d.ts +2 -2
  643. package/dist/vite/plugin-custom-pages.js +3 -3
  644. package/dist/vite/plugin-custom-pages.js.map +1 -1
  645. package/dist/vite/plugin-docs.d.ts +3 -3
  646. package/dist/vite/plugin-docs.js +23 -6
  647. package/dist/vite/plugin-docs.js.map +1 -1
  648. package/dist/vite/plugin-docs.test.js +15 -23
  649. package/dist/vite/plugin-docs.test.js.map +1 -1
  650. package/dist/vite/plugin-frontmatter.d.ts +2 -2
  651. package/dist/vite/plugin-frontmatter.js +5 -4
  652. package/dist/vite/plugin-frontmatter.js.map +1 -1
  653. package/dist/vite/plugin-mdx.d.ts +2 -2
  654. package/dist/vite/plugin-mdx.js +86 -21
  655. package/dist/vite/plugin-mdx.js.map +1 -1
  656. package/dist/vite/plugin-redirect.d.ts +2 -2
  657. package/dist/vite/plugin-redirect.js +3 -3
  658. package/dist/vite/plugin-redirect.js.map +1 -1
  659. package/dist/vite/plugin-search.d.ts +2 -2
  660. package/dist/vite/plugin-search.js +5 -1
  661. package/dist/vite/plugin-search.js.map +1 -1
  662. package/dist/vite/plugin-shiki-register.d.ts +3 -0
  663. package/dist/vite/plugin-shiki-register.js +38 -0
  664. package/dist/vite/plugin-shiki-register.js.map +1 -0
  665. package/dist/vite/plugin-sidebar.d.ts +5 -3
  666. package/dist/vite/plugin-sidebar.js +21 -6
  667. package/dist/vite/plugin-sidebar.js.map +1 -1
  668. package/dist/vite/{plugin-custom-css.d.ts → plugin-theme-css.d.ts} +3 -3
  669. package/dist/vite/plugin-theme-css.js +117 -0
  670. package/dist/vite/plugin-theme-css.js.map +1 -0
  671. package/dist/vite/plugin.d.ts +2 -3
  672. package/dist/vite/plugin.js +8 -2
  673. package/dist/vite/plugin.js.map +1 -1
  674. package/dist/vite/prerender/FileWritingResponse.d.ts +25 -0
  675. package/dist/vite/prerender/FileWritingResponse.js +51 -0
  676. package/dist/vite/prerender/FileWritingResponse.js.map +1 -0
  677. package/dist/vite/prerender/InMemoryResponse.d.ts +16 -0
  678. package/dist/vite/prerender/InMemoryResponse.js +32 -0
  679. package/dist/vite/prerender/InMemoryResponse.js.map +1 -0
  680. package/dist/vite/prerender/PrerenderResponse.d.ts +10 -0
  681. package/dist/vite/prerender/PrerenderResponse.js +2 -0
  682. package/dist/vite/prerender/PrerenderResponse.js.map +1 -0
  683. package/dist/vite/prerender/prerender.d.ts +15 -0
  684. package/dist/vite/prerender/prerender.js +109 -0
  685. package/dist/vite/prerender/prerender.js.map +1 -0
  686. package/dist/vite/prerender/worker.d.ts +13 -0
  687. package/dist/vite/prerender/worker.js +59 -0
  688. package/dist/vite/prerender/worker.js.map +1 -0
  689. package/dist/vite/remarkStaticGeneration.js +5 -5
  690. package/dist/vite/remarkStaticGeneration.js.map +1 -1
  691. package/dist/vite/reporter.d.ts +3 -0
  692. package/dist/vite/reporter.js +33 -0
  693. package/dist/vite/reporter.js.map +1 -0
  694. package/dist/vite/sitemap.d.ts +1 -1
  695. package/dist/vite/sitemap.js +2 -1
  696. package/dist/vite/sitemap.js.map +1 -1
  697. package/dist/zuplo/enrich-with-zuplo.d.ts +5 -0
  698. package/dist/zuplo/enrich-with-zuplo.js +185 -0
  699. package/dist/zuplo/enrich-with-zuplo.js.map +1 -0
  700. package/dist/zuplo/policy-types.d.ts +33 -0
  701. package/dist/zuplo/policy-types.js +8 -0
  702. package/dist/zuplo/policy-types.js.map +1 -0
  703. package/dist/zuplo/with-zuplo-processors.d.ts +3 -0
  704. package/dist/zuplo/with-zuplo-processors.js +26 -0
  705. package/dist/zuplo/with-zuplo-processors.js.map +1 -0
  706. package/dist/zuplo/with-zuplo.d.ts +6 -0
  707. package/dist/zuplo/with-zuplo.js +10 -0
  708. package/dist/zuplo/with-zuplo.js.map +1 -0
  709. package/lib/AuthenticationPlugin-B9ZLD8dq.js +90 -0
  710. package/lib/AuthenticationPlugin-B9ZLD8dq.js.map +1 -0
  711. package/lib/Button-Bdk_Ij3U.js +49 -0
  712. package/lib/Button-Bdk_Ij3U.js.map +1 -0
  713. package/lib/Callout-hI9CHaoU.js +230 -0
  714. package/lib/Callout-hI9CHaoU.js.map +1 -0
  715. package/lib/Card-BlCYNw5W.js +61 -0
  716. package/lib/Card-BlCYNw5W.js.map +1 -0
  717. package/lib/{CategoryHeading-Bb9dqxD3.js → CategoryHeading-DZi-Szor.js} +3 -3
  718. package/lib/{CategoryHeading-Bb9dqxD3.js.map → CategoryHeading-DZi-Szor.js.map} +1 -1
  719. package/lib/ClientOnly-E7hGysn1.js.map +1 -1
  720. package/lib/Dialog-qJtc4-PZ.js +98 -0
  721. package/lib/{Dialog-k70Qfukb.js.map → Dialog-qJtc4-PZ.js.map} +1 -1
  722. package/lib/Drawer-BPBxzel2.js +1133 -0
  723. package/lib/Drawer-BPBxzel2.js.map +1 -0
  724. package/lib/Markdown-D3MUf20w.js +7691 -0
  725. package/lib/Markdown-D3MUf20w.js.map +1 -0
  726. package/lib/MdxPage-qSYniGrR.js +84 -0
  727. package/lib/MdxPage-qSYniGrR.js.map +1 -0
  728. package/lib/OasProvider-BHyIG4Ge.js +33 -0
  729. package/lib/OasProvider-BHyIG4Ge.js.map +1 -0
  730. package/lib/OperationList-CfVK_S-T.js +5142 -0
  731. package/lib/OperationList-CfVK_S-T.js.map +1 -0
  732. package/lib/Pagination-CjsamWJW.js +48 -0
  733. package/lib/Pagination-CjsamWJW.js.map +1 -0
  734. package/lib/RouteGuard-ChX1tPqA.js +55 -0
  735. package/lib/RouteGuard-ChX1tPqA.js.map +1 -0
  736. package/lib/SchemaList-BZRVKC7J.js +160 -0
  737. package/lib/SchemaList-BZRVKC7J.js.map +1 -0
  738. package/lib/SchemaView-Db5jA7z7.js +375 -0
  739. package/lib/SchemaView-Db5jA7z7.js.map +1 -0
  740. package/lib/Select-CaRC4cvg.js +211 -0
  741. package/lib/Select-CaRC4cvg.js.map +1 -0
  742. package/lib/SlotletProvider-ZhDNaV0q.js +257 -0
  743. package/lib/SlotletProvider-ZhDNaV0q.js.map +1 -0
  744. package/lib/{Spinner-3cQDBVGr.js → Spinner-mNLZ6awP.js} +2 -2
  745. package/lib/{Spinner-3cQDBVGr.js.map → Spinner-mNLZ6awP.js.map} +1 -1
  746. package/lib/SyntaxHighlight-IcJTpNbL.js +9107 -0
  747. package/lib/SyntaxHighlight-IcJTpNbL.js.map +1 -0
  748. package/lib/Toc-B0gpT6e6.js +92 -0
  749. package/lib/Toc-B0gpT6e6.js.map +1 -0
  750. package/lib/chunk-BAXFHI7N-C9WnHsLV.js +1839 -0
  751. package/lib/chunk-BAXFHI7N-C9WnHsLV.js.map +1 -0
  752. package/lib/circular-BGxf3iUW.js +14929 -0
  753. package/lib/circular-BGxf3iUW.js.map +1 -0
  754. package/lib/{cn-BmFQLtkS.js → cn-CwJPJKOE.js} +29 -30
  755. package/lib/cn-CwJPJKOE.js.map +1 -0
  756. package/lib/createServer-C1kGUn7C.js +12494 -0
  757. package/lib/createServer-C1kGUn7C.js.map +1 -0
  758. package/lib/hook-CqYKERnR.js +1442 -0
  759. package/lib/hook-CqYKERnR.js.map +1 -0
  760. package/lib/index--oeBayMa.js +86 -0
  761. package/lib/index--oeBayMa.js.map +1 -0
  762. package/lib/{index-LNp6rxyU.js → index-BvvmIczU.js} +2 -2
  763. package/lib/{index-LNp6rxyU.js.map → index-BvvmIczU.js.map} +1 -1
  764. package/lib/index-CrcNWbel.js +316 -0
  765. package/lib/index-CrcNWbel.js.map +1 -0
  766. package/lib/index-D1LYvDiD.js +3158 -0
  767. package/lib/index-D1LYvDiD.js.map +1 -0
  768. package/lib/index-LSPm9Daf.js +4976 -0
  769. package/lib/index-LSPm9Daf.js.map +1 -0
  770. package/lib/index-Z13x6tPX.js +36 -0
  771. package/lib/index-Z13x6tPX.js.map +1 -0
  772. package/lib/{assets/index-B_Jk_Yzp.js → index-zddirpDj.js} +727 -725
  773. package/lib/index-zddirpDj.js.map +1 -0
  774. package/lib/index.esm-BFcSKCe-.js +683 -0
  775. package/lib/index.esm-BFcSKCe-.js.map +1 -0
  776. package/lib/index.esm-D2ZUREQN.js +1216 -0
  777. package/lib/index.esm-D2ZUREQN.js.map +1 -0
  778. package/lib/invariant-DAFpPywt.js +48 -0
  779. package/lib/{invariant-Caa8-XvF.js.map → invariant-DAFpPywt.js.map} +1 -1
  780. package/lib/jsx-runtime-C5mzlN2N.js +285 -0
  781. package/lib/jsx-runtime-C5mzlN2N.js.map +1 -0
  782. package/lib/mutation-DpoXF3gn.js +196 -0
  783. package/lib/mutation-DpoXF3gn.js.map +1 -0
  784. package/lib/objectEntries-yMIkr2mI.js +5 -0
  785. package/lib/objectEntries-yMIkr2mI.js.map +1 -0
  786. package/lib/processors/removeExtensions.js +11 -0
  787. package/lib/processors/removeExtensions.js.map +1 -0
  788. package/lib/processors/removeParameters.js +47 -0
  789. package/lib/processors/removeParameters.js.map +1 -0
  790. package/lib/processors/removePaths.js +28 -0
  791. package/lib/processors/removePaths.js.map +1 -0
  792. package/lib/processors/traverse.js +17 -0
  793. package/lib/processors/traverse.js.map +1 -0
  794. package/lib/ui/Accordion.js +2 -2
  795. package/lib/ui/Accordion.js.map +1 -1
  796. package/lib/ui/ActionButton.js +4 -4
  797. package/lib/ui/ActionButton.js.map +1 -1
  798. package/lib/ui/Alert.js +3 -3
  799. package/lib/ui/Alert.js.map +1 -1
  800. package/lib/ui/AlertDialog.js +2 -2
  801. package/lib/ui/AlertDialog.js.map +1 -1
  802. package/lib/ui/Badge.js +5 -4
  803. package/lib/ui/Badge.js.map +1 -1
  804. package/lib/ui/Breadcrumb.js +5 -5
  805. package/lib/ui/Breadcrumb.js.map +1 -1
  806. package/lib/ui/Button.js +14 -13
  807. package/lib/ui/Button.js.map +1 -1
  808. package/lib/ui/Callout.js +41 -22
  809. package/lib/ui/Callout.js.map +1 -1
  810. package/lib/ui/Card.js +9 -9
  811. package/lib/ui/Card.js.map +1 -1
  812. package/lib/ui/Carousel.js +552 -546
  813. package/lib/ui/Carousel.js.map +1 -1
  814. package/lib/ui/Checkbox.js +14 -13
  815. package/lib/ui/Checkbox.js.map +1 -1
  816. package/lib/ui/CodeBlock.js +83 -0
  817. package/lib/ui/CodeBlock.js.map +1 -0
  818. package/lib/ui/Command.js +114 -508
  819. package/lib/ui/Command.js.map +1 -1
  820. package/lib/ui/Dialog.js +2 -2
  821. package/lib/ui/Dialog.js.map +1 -1
  822. package/lib/ui/Drawer.js +14 -1150
  823. package/lib/ui/Drawer.js.map +1 -1
  824. package/lib/ui/DropdownMenu.js +2 -2
  825. package/lib/ui/DropdownMenu.js.map +1 -1
  826. package/lib/ui/Form.js +6 -6
  827. package/lib/ui/Form.js.map +1 -1
  828. package/lib/ui/HoverCard.js +2 -2
  829. package/lib/ui/Input.js +2 -2
  830. package/lib/ui/Input.js.map +1 -1
  831. package/lib/ui/Label.js +3 -3
  832. package/lib/ui/Pagination.js +5 -5
  833. package/lib/ui/Pagination.js.map +1 -1
  834. package/lib/ui/Popover.js +2 -2
  835. package/lib/ui/Popover.js.map +1 -1
  836. package/lib/ui/Progress.js +2 -2
  837. package/lib/ui/Progress.js.map +1 -1
  838. package/lib/ui/RadioGroup.js +2 -2
  839. package/lib/ui/RadioGroup.js.map +1 -1
  840. package/lib/ui/ScrollArea.js +2 -2
  841. package/lib/ui/ScrollArea.js.map +1 -1
  842. package/lib/ui/Select.js +5 -5
  843. package/lib/ui/Select.js.map +1 -1
  844. package/lib/ui/Skeleton.js +2 -2
  845. package/lib/ui/Skeleton.js.map +1 -1
  846. package/lib/ui/Slider.js +2 -2
  847. package/lib/ui/Stepper.js +6 -0
  848. package/lib/ui/Stepper.js.map +1 -0
  849. package/lib/ui/Switch.js +2 -2
  850. package/lib/ui/Switch.js.map +1 -1
  851. package/lib/ui/SyntaxHighlight.js +10 -0
  852. package/lib/ui/SyntaxHighlight.js.map +1 -0
  853. package/lib/ui/Tabs.js +11 -11
  854. package/lib/ui/Textarea.js +2 -2
  855. package/lib/ui/Textarea.js.map +1 -1
  856. package/lib/ui/Toggle.js +3 -3
  857. package/lib/ui/Toggle.js.map +1 -1
  858. package/lib/ui/ToggleGroup.js +2 -2
  859. package/lib/ui/ToggleGroup.js.map +1 -1
  860. package/lib/ui/Tooltip.js +2 -2
  861. package/lib/ui/util.js +6 -0
  862. package/lib/ui/util.js.map +1 -0
  863. package/lib/useExposedProps-DG8J6ewJ.js +9 -0
  864. package/lib/useExposedProps-DG8J6ewJ.js.map +1 -0
  865. package/lib/useLatest-hmRS46UF.js +11 -0
  866. package/lib/useLatest-hmRS46UF.js.map +1 -0
  867. package/lib/zudoku.auth-auth0.js +33 -37
  868. package/lib/zudoku.auth-auth0.js.map +1 -1
  869. package/lib/zudoku.auth-clerk.js +96 -56
  870. package/lib/zudoku.auth-clerk.js.map +1 -1
  871. package/lib/zudoku.auth-openid.js +562 -585
  872. package/lib/zudoku.auth-openid.js.map +1 -1
  873. package/lib/zudoku.components.js +34 -1586
  874. package/lib/zudoku.components.js.map +1 -1
  875. package/lib/zudoku.hooks.js +19 -0
  876. package/lib/zudoku.hooks.js.map +1 -0
  877. package/lib/zudoku.icons.js +10 -0
  878. package/lib/zudoku.icons.js.map +1 -1
  879. package/lib/zudoku.plugin-api-catalog.js +117 -0
  880. package/lib/zudoku.plugin-api-catalog.js.map +1 -0
  881. package/lib/zudoku.plugin-api-keys.js +112 -109
  882. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  883. package/lib/zudoku.plugin-custom-pages.js +4 -4
  884. package/lib/zudoku.plugin-custom-pages.js.map +1 -1
  885. package/lib/zudoku.plugin-markdown.js +27 -50
  886. package/lib/zudoku.plugin-markdown.js.map +1 -1
  887. package/lib/zudoku.plugin-openapi.js +7 -6
  888. package/lib/zudoku.plugin-openapi.js.map +1 -1
  889. package/lib/zudoku.plugin-redirect.js +1 -1
  890. package/lib/zudoku.plugin-redirect.js.map +1 -1
  891. package/lib/zudoku.plugin-search-inkeep.js +52 -24
  892. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  893. package/lib/zudoku.plugin-search-pagefind.js +230 -0
  894. package/lib/zudoku.plugin-search-pagefind.js.map +1 -0
  895. package/lib/zudoku.plugins.js +14 -0
  896. package/lib/zudoku.plugins.js.map +1 -0
  897. package/package.json +154 -99
  898. package/src/app/ZuploBuildConfig.ts +33 -0
  899. package/src/app/demo-cdn.html +31 -31
  900. package/src/app/demo.html +1 -1
  901. package/src/app/demo.tsx +1 -2
  902. package/src/app/entry.client.tsx +67 -15
  903. package/src/app/entry.server.tsx +26 -15
  904. package/src/app/env.ts +35 -0
  905. package/src/app/main.css +155 -43
  906. package/src/app/main.tsx +63 -11
  907. package/src/app/sentry.ts +24 -0
  908. package/src/app/standalone.tsx +1 -2
  909. package/src/app/tailwind.ts +83 -48
  910. package/src/lib/MissingIcon.tsx +22 -0
  911. package/src/lib/authentication/AuthenticationPlugin.tsx +4 -1
  912. package/src/lib/authentication/authentication.ts +3 -1
  913. package/src/lib/authentication/components/CallbackHandler.tsx +12 -2
  914. package/src/lib/authentication/components/SignIn.tsx +35 -2
  915. package/src/lib/authentication/components/SignOut.tsx +3 -2
  916. package/src/lib/authentication/components/SignUp.tsx +35 -1
  917. package/src/lib/authentication/hook.ts +12 -1
  918. package/src/lib/authentication/providers/auth0.tsx +5 -7
  919. package/src/lib/authentication/providers/clerk.tsx +76 -17
  920. package/src/lib/authentication/providers/openid.tsx +68 -40
  921. package/src/lib/authentication/providers/supabase.tsx +157 -0
  922. package/src/lib/authentication/state.ts +9 -19
  923. package/src/lib/components/AnchorLink.tsx +13 -8
  924. package/src/lib/components/Autocomplete.tsx +113 -0
  925. package/src/lib/components/Banner.tsx +2 -1
  926. package/src/lib/components/Bootstrap.tsx +29 -29
  927. package/src/lib/components/BuildCheck.tsx +75 -0
  928. package/src/lib/components/Footer.tsx +136 -0
  929. package/src/lib/components/Header.tsx +66 -25
  930. package/src/lib/components/Heading.tsx +14 -14
  931. package/src/lib/components/InlineCode.tsx +13 -16
  932. package/src/lib/components/Layout.tsx +28 -59
  933. package/src/lib/components/Main.tsx +51 -0
  934. package/src/lib/components/Markdown.tsx +33 -29
  935. package/src/lib/components/MobileTopNavigation.tsx +30 -21
  936. package/src/lib/components/NotFoundPage.tsx +1 -1
  937. package/src/lib/components/Pagination.tsx +50 -0
  938. package/src/lib/components/PathRenderer.tsx +61 -0
  939. package/src/lib/components/ReactMarkdown.license.txt +21 -0
  940. package/src/lib/components/ReactMarkdown.tsx +264 -0
  941. package/src/lib/components/Search.tsx +17 -6
  942. package/src/lib/components/SlotletProvider.tsx +1 -1
  943. package/src/lib/components/StatusPage.tsx +91 -0
  944. package/src/lib/components/ThemeSwitch.tsx +29 -9
  945. package/src/lib/components/TopNavigation.tsx +53 -26
  946. package/src/lib/components/Zudoku.tsx +18 -7
  947. package/src/lib/components/cache.ts +23 -0
  948. package/src/lib/components/context/BypassProtectedRoutesContext.ts +3 -0
  949. package/src/lib/components/context/RouterEventsEmitter.tsx +19 -0
  950. package/src/lib/components/context/ViewportAnchorContext.tsx +34 -36
  951. package/src/lib/components/context/ZudokuContext.ts +30 -9
  952. package/src/lib/components/index.ts +24 -5
  953. package/src/lib/components/navigation/PoweredByZudoku.tsx +33 -0
  954. package/src/lib/components/navigation/Sidebar.tsx +38 -29
  955. package/src/lib/components/navigation/SidebarBadge.tsx +17 -12
  956. package/src/lib/components/navigation/SidebarCategory.tsx +65 -58
  957. package/src/lib/components/navigation/SidebarItem.tsx +30 -40
  958. package/src/lib/components/navigation/SidebarWrapper.tsx +42 -22
  959. package/src/lib/{plugins/markdown → components/navigation}/Toc.tsx +9 -18
  960. package/src/lib/components/navigation/ZudokuLogo.tsx +25 -0
  961. package/src/lib/components/navigation/ZuploLogo.tsx +14 -0
  962. package/src/lib/components/navigation/utils.ts +1 -1
  963. package/src/lib/core/RouteGuard.tsx +96 -0
  964. package/src/lib/core/ZudokuContext.ts +79 -21
  965. package/src/lib/core/plugins.ts +33 -7
  966. package/src/lib/errors/ErrorAlert.tsx +24 -17
  967. package/src/lib/errors/RouterError.tsx +1 -1
  968. package/src/lib/hooks/index.ts +5 -0
  969. package/src/lib/hooks/useEvent.test.tsx +149 -0
  970. package/src/lib/hooks/useEvent.ts +41 -0
  971. package/src/lib/icons.ts +1 -0
  972. package/src/lib/oas/graphql/circular.ts +58 -0
  973. package/src/lib/oas/graphql/index.ts +295 -101
  974. package/src/lib/oas/parser/dereference/index.ts +10 -4
  975. package/src/lib/oas/parser/index.ts +14 -30
  976. package/src/lib/oas/parser/upgrade/index.ts +103 -40
  977. package/src/lib/plugins/api-catalog/Catalog.tsx +73 -0
  978. package/src/lib/plugins/api-catalog/index.tsx +115 -0
  979. package/src/lib/plugins/api-keys/CreateApiKey.tsx +8 -4
  980. package/src/lib/plugins/api-keys/ProtectedRoute.tsx +1 -1
  981. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +1 -1
  982. package/src/lib/plugins/api-keys/index.tsx +7 -1
  983. package/src/lib/plugins/custom-pages/index.tsx +1 -1
  984. package/src/lib/plugins/markdown/MdxPage.tsx +43 -41
  985. package/src/lib/plugins/markdown/index.tsx +5 -2
  986. package/src/lib/plugins/markdown/resolver.ts +2 -37
  987. package/src/lib/plugins/openapi/CollapsibleCode.tsx +14 -8
  988. package/src/lib/plugins/openapi/ColorizedParam.tsx +29 -12
  989. package/src/lib/plugins/openapi/Endpoint.tsx +14 -12
  990. package/src/lib/plugins/openapi/OasProvider.tsx +51 -0
  991. package/src/lib/plugins/openapi/OperationList.tsx +232 -42
  992. package/src/lib/plugins/openapi/OperationListItem.tsx +122 -93
  993. package/src/lib/plugins/openapi/ParamInfos.tsx +90 -0
  994. package/src/lib/plugins/openapi/ParameterList.tsx +4 -0
  995. package/src/lib/plugins/openapi/ParameterListItem.tsx +65 -24
  996. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +21 -2
  997. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +15 -38
  998. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +36 -64
  999. package/src/lib/plugins/openapi/SchemaList.tsx +163 -0
  1000. package/src/lib/plugins/openapi/Sidecar.tsx +120 -67
  1001. package/src/lib/plugins/openapi/SidecarBox.tsx +4 -16
  1002. package/src/lib/plugins/openapi/SidecarExamples.tsx +168 -0
  1003. package/src/lib/plugins/openapi/SimpleSelect.tsx +1 -1
  1004. package/src/lib/plugins/openapi/client/GraphQLClient.tsx +29 -104
  1005. package/src/lib/plugins/openapi/client/createServer.ts +6 -2
  1006. package/src/lib/plugins/openapi/client/useCreateQuery.ts +34 -7
  1007. package/src/lib/plugins/openapi/components/ConstValue.tsx +24 -0
  1008. package/src/lib/plugins/openapi/components/EnumValues.tsx +58 -0
  1009. package/src/lib/plugins/openapi/components/ResponseContent.tsx +104 -0
  1010. package/src/lib/plugins/openapi/components/SelectOnClick.tsx +29 -0
  1011. package/src/lib/plugins/openapi/context.tsx +2 -2
  1012. package/src/lib/plugins/openapi/graphql/gql.ts +36 -11
  1013. package/src/lib/plugins/openapi/graphql/graphql.ts +172 -36
  1014. package/src/lib/plugins/openapi/index.tsx +100 -98
  1015. package/src/lib/plugins/openapi/interfaces.ts +58 -3
  1016. package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +52 -0
  1017. package/src/lib/plugins/openapi/playground/Headers.tsx +165 -36
  1018. package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +74 -0
  1019. package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +41 -0
  1020. package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +13 -0
  1021. package/src/lib/plugins/openapi/playground/PathParams.tsx +39 -64
  1022. package/src/lib/plugins/openapi/playground/Playground.tsx +384 -244
  1023. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +6 -3
  1024. package/src/lib/plugins/openapi/playground/QueryParams.tsx +87 -89
  1025. package/src/lib/plugins/openapi/playground/RequestLoginDialog.tsx +51 -0
  1026. package/src/lib/plugins/openapi/playground/SubmitButton.tsx +75 -0
  1027. package/src/lib/plugins/openapi/playground/rememberedIdentity.ts +26 -0
  1028. package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +73 -0
  1029. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +230 -0
  1030. package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +123 -0
  1031. package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.test.ts +64 -0
  1032. package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.ts +36 -0
  1033. package/src/lib/plugins/openapi/processors/removeExtensions.test.ts +222 -0
  1034. package/src/lib/plugins/openapi/processors/removeExtensions.ts +29 -0
  1035. package/src/lib/plugins/openapi/processors/removeParameters.test.ts +182 -0
  1036. package/src/lib/plugins/openapi/processors/removeParameters.ts +103 -0
  1037. package/src/lib/plugins/openapi/processors/removePaths.test.ts +167 -0
  1038. package/src/lib/plugins/openapi/processors/removePaths.ts +57 -0
  1039. package/src/lib/plugins/openapi/processors/traverse.ts +1 -0
  1040. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.tsx +1 -8
  1041. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.tsx +3 -0
  1042. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.tsx +6 -3
  1043. package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +39 -0
  1044. package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +160 -0
  1045. package/src/lib/plugins/openapi/schema/SchemaView.tsx +105 -141
  1046. package/src/lib/plugins/openapi/schema/utils.ts +32 -5
  1047. package/src/lib/plugins/openapi/state.ts +36 -0
  1048. package/src/lib/plugins/openapi/util/createSidebarCategory.tsx +37 -0
  1049. package/src/lib/plugins/openapi/util/generateSchemaExample.ts +77 -12
  1050. package/src/lib/plugins/openapi/util/getRoutes.tsx +198 -0
  1051. package/src/lib/plugins/openapi/util/methodColorMap.tsx +11 -0
  1052. package/src/lib/plugins/openapi/util/methodToColor.ts +27 -0
  1053. package/src/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.tsx +32 -0
  1054. package/src/lib/plugins/redirect/index.tsx +2 -2
  1055. package/src/lib/plugins/search-inkeep/index.tsx +78 -23
  1056. package/src/lib/plugins/search-inkeep/inkeep.ts +3 -9
  1057. package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +164 -0
  1058. package/src/lib/plugins/search-pagefind/ResultList.tsx +105 -0
  1059. package/src/lib/plugins/search-pagefind/get-results.tsx +75 -0
  1060. package/src/lib/plugins/search-pagefind/index.tsx +21 -0
  1061. package/src/lib/plugins/search-pagefind/types.ts +118 -0
  1062. package/src/lib/shiki.ts +133 -0
  1063. package/src/lib/ui/Badge.tsx +2 -1
  1064. package/src/lib/ui/Button.tsx +4 -2
  1065. package/src/lib/ui/Callout.tsx +29 -10
  1066. package/src/lib/ui/Card.tsx +1 -1
  1067. package/src/lib/ui/Checkbox.tsx +2 -1
  1068. package/src/lib/ui/CodeBlock.tsx +102 -0
  1069. package/src/lib/ui/Command.tsx +45 -3
  1070. package/src/lib/ui/Input.tsx +1 -2
  1071. package/src/lib/ui/Select.tsx +2 -2
  1072. package/src/lib/ui/Stepper.tsx +8 -0
  1073. package/src/lib/ui/SyntaxHighlight.tsx +27 -0
  1074. package/src/lib/ui/util.tsx +3 -0
  1075. package/src/lib/util/MdxComponents.tsx +37 -23
  1076. package/src/lib/util/createVariantComponent.tsx +2 -2
  1077. package/src/lib/util/detectOS.ts +9 -0
  1078. package/src/lib/util/ensureArray.ts +3 -0
  1079. package/src/lib/util/joinPath.tsx +3 -0
  1080. package/src/lib/util/joinUrl.test.ts +62 -0
  1081. package/src/lib/util/joinUrl.ts +57 -0
  1082. package/src/lib/util/scrollIntoViewIfNeeded.ts +18 -0
  1083. package/src/lib/util/traverse.ts +34 -0
  1084. package/src/lib/util/types.ts +7 -0
  1085. package/src/lib/util/url.test.ts +51 -0
  1086. package/src/lib/util/url.ts +18 -0
  1087. package/src/lib/util/useExposedProps.tsx +1 -1
  1088. package/src/lib/util/useLatest.ts +18 -0
  1089. package/src/lib/util/useOnScreen.ts +6 -4
  1090. package/src/lib/util/useScrollToAnchor.ts +48 -39
  1091. package/src/lib/util/useScrollToTop.ts +9 -4
  1092. package/src/shiki/langs/abap.js +1 -0
  1093. package/src/shiki/langs/actionscript-3.js +1 -0
  1094. package/src/shiki/langs/ada.js +1 -0
  1095. package/src/shiki/langs/angular-expression.js +1 -0
  1096. package/src/shiki/langs/angular-html.js +1 -0
  1097. package/src/shiki/langs/angular-inline-style.js +1 -0
  1098. package/src/shiki/langs/angular-inline-template.js +1 -0
  1099. package/src/shiki/langs/angular-let-declaration.js +1 -0
  1100. package/src/shiki/langs/angular-template-blocks.js +1 -0
  1101. package/src/shiki/langs/angular-template.js +1 -0
  1102. package/src/shiki/langs/angular-ts.js +1 -0
  1103. package/src/shiki/langs/apache.js +1 -0
  1104. package/src/shiki/langs/apex.js +1 -0
  1105. package/src/shiki/langs/apl.js +1 -0
  1106. package/src/shiki/langs/applescript.js +1 -0
  1107. package/src/shiki/langs/ara.js +1 -0
  1108. package/src/shiki/langs/asciidoc.js +1 -0
  1109. package/src/shiki/langs/asm.js +1 -0
  1110. package/src/shiki/langs/astro.js +1 -0
  1111. package/src/shiki/langs/awk.js +1 -0
  1112. package/src/shiki/langs/ballerina.js +1 -0
  1113. package/src/shiki/langs/bat.js +1 -0
  1114. package/src/shiki/langs/beancount.js +1 -0
  1115. package/src/shiki/langs/berry.js +1 -0
  1116. package/src/shiki/langs/bibtex.js +1 -0
  1117. package/src/shiki/langs/bicep.js +1 -0
  1118. package/src/shiki/langs/blade.js +1 -0
  1119. package/src/shiki/langs/bsl.js +1 -0
  1120. package/src/shiki/langs/c.js +1 -0
  1121. package/src/shiki/langs/cadence.js +1 -0
  1122. package/src/shiki/langs/cairo.js +1 -0
  1123. package/src/shiki/langs/clarity.js +1 -0
  1124. package/src/shiki/langs/clojure.js +1 -0
  1125. package/src/shiki/langs/cmake.js +1 -0
  1126. package/src/shiki/langs/cobol.js +1 -0
  1127. package/src/shiki/langs/codeowners.js +1 -0
  1128. package/src/shiki/langs/codeql.js +1 -0
  1129. package/src/shiki/langs/coffee.js +1 -0
  1130. package/src/shiki/langs/common-lisp.js +1 -0
  1131. package/src/shiki/langs/coq.js +1 -0
  1132. package/src/shiki/langs/cpp-macro.js +1 -0
  1133. package/src/shiki/langs/cpp.js +1 -0
  1134. package/src/shiki/langs/crystal.js +1 -0
  1135. package/src/shiki/langs/csharp.js +1 -0
  1136. package/src/shiki/langs/css.js +1 -0
  1137. package/src/shiki/langs/csv.js +1 -0
  1138. package/src/shiki/langs/cue.js +1 -0
  1139. package/src/shiki/langs/cypher.js +1 -0
  1140. package/src/shiki/langs/d.js +1 -0
  1141. package/src/shiki/langs/dart.js +1 -0
  1142. package/src/shiki/langs/dax.js +1 -0
  1143. package/src/shiki/langs/desktop.js +1 -0
  1144. package/src/shiki/langs/diff.js +1 -0
  1145. package/src/shiki/langs/docker.js +1 -0
  1146. package/src/shiki/langs/dotenv.js +1 -0
  1147. package/src/shiki/langs/dream-maker.js +1 -0
  1148. package/src/shiki/langs/edge.js +1 -0
  1149. package/src/shiki/langs/elixir.js +1 -0
  1150. package/src/shiki/langs/elm.js +1 -0
  1151. package/src/shiki/langs/emacs-lisp.js +1 -0
  1152. package/src/shiki/langs/erb.js +1 -0
  1153. package/src/shiki/langs/erlang.js +1 -0
  1154. package/src/shiki/langs/es-tag-css.js +1 -0
  1155. package/src/shiki/langs/es-tag-glsl.js +1 -0
  1156. package/src/shiki/langs/es-tag-html.js +1 -0
  1157. package/src/shiki/langs/es-tag-sql.js +1 -0
  1158. package/src/shiki/langs/es-tag-xml.js +1 -0
  1159. package/src/shiki/langs/fennel.js +1 -0
  1160. package/src/shiki/langs/fish.js +1 -0
  1161. package/src/shiki/langs/fluent.js +1 -0
  1162. package/src/shiki/langs/fortran-fixed-form.js +1 -0
  1163. package/src/shiki/langs/fortran-free-form.js +1 -0
  1164. package/src/shiki/langs/fsharp.js +1 -0
  1165. package/src/shiki/langs/gdresource.js +1 -0
  1166. package/src/shiki/langs/gdscript.js +1 -0
  1167. package/src/shiki/langs/gdshader.js +1 -0
  1168. package/src/shiki/langs/genie.js +1 -0
  1169. package/src/shiki/langs/gherkin.js +1 -0
  1170. package/src/shiki/langs/git-commit.js +1 -0
  1171. package/src/shiki/langs/git-rebase.js +1 -0
  1172. package/src/shiki/langs/gleam.js +1 -0
  1173. package/src/shiki/langs/glimmer-js.js +1 -0
  1174. package/src/shiki/langs/glimmer-ts.js +1 -0
  1175. package/src/shiki/langs/glsl.js +1 -0
  1176. package/src/shiki/langs/gnuplot.js +1 -0
  1177. package/src/shiki/langs/go.js +1 -0
  1178. package/src/shiki/langs/graphql.js +1 -0
  1179. package/src/shiki/langs/groovy.js +1 -0
  1180. package/src/shiki/langs/hack.js +1 -0
  1181. package/src/shiki/langs/haml.js +1 -0
  1182. package/src/shiki/langs/handlebars.js +1 -0
  1183. package/src/shiki/langs/haskell.js +1 -0
  1184. package/src/shiki/langs/haxe.js +1 -0
  1185. package/src/shiki/langs/hcl.js +1 -0
  1186. package/src/shiki/langs/hjson.js +1 -0
  1187. package/src/shiki/langs/hlsl.js +1 -0
  1188. package/src/shiki/langs/html-derivative.js +1 -0
  1189. package/src/shiki/langs/html.js +1 -0
  1190. package/src/shiki/langs/http.js +1 -0
  1191. package/src/shiki/langs/hxml.js +1 -0
  1192. package/src/shiki/langs/hy.js +1 -0
  1193. package/src/shiki/langs/imba.js +1 -0
  1194. package/src/shiki/langs/ini.js +1 -0
  1195. package/src/shiki/langs/java.js +1 -0
  1196. package/src/shiki/langs/javascript.js +1 -0
  1197. package/src/shiki/langs/jinja-html.js +1 -0
  1198. package/src/shiki/langs/jinja.js +1 -0
  1199. package/src/shiki/langs/jison.js +1 -0
  1200. package/src/shiki/langs/json.js +1 -0
  1201. package/src/shiki/langs/json5.js +1 -0
  1202. package/src/shiki/langs/jsonc.js +1 -0
  1203. package/src/shiki/langs/jsonl.js +1 -0
  1204. package/src/shiki/langs/jsonnet.js +1 -0
  1205. package/src/shiki/langs/jssm.js +1 -0
  1206. package/src/shiki/langs/jsx.js +1 -0
  1207. package/src/shiki/langs/julia.js +1 -0
  1208. package/src/shiki/langs/kotlin.js +1 -0
  1209. package/src/shiki/langs/kusto.js +1 -0
  1210. package/src/shiki/langs/latex.js +1 -0
  1211. package/src/shiki/langs/lean.js +1 -0
  1212. package/src/shiki/langs/less.js +1 -0
  1213. package/src/shiki/langs/liquid.js +1 -0
  1214. package/src/shiki/langs/llvm.js +1 -0
  1215. package/src/shiki/langs/log.js +1 -0
  1216. package/src/shiki/langs/logo.js +1 -0
  1217. package/src/shiki/langs/lua.js +1 -0
  1218. package/src/shiki/langs/luau.js +1 -0
  1219. package/src/shiki/langs/make.js +1 -0
  1220. package/src/shiki/langs/markdown-vue.js +1 -0
  1221. package/src/shiki/langs/markdown.js +1 -0
  1222. package/src/shiki/langs/marko.js +1 -0
  1223. package/src/shiki/langs/matlab.js +1 -0
  1224. package/src/shiki/langs/mdc.js +1 -0
  1225. package/src/shiki/langs/mdx.js +1 -0
  1226. package/src/shiki/langs/mermaid.js +1 -0
  1227. package/src/shiki/langs/mipsasm.js +1 -0
  1228. package/src/shiki/langs/mojo.js +1 -0
  1229. package/src/shiki/langs/move.js +1 -0
  1230. package/src/shiki/langs/narrat.js +1 -0
  1231. package/src/shiki/langs/nextflow.js +1 -0
  1232. package/src/shiki/langs/nginx.js +1 -0
  1233. package/src/shiki/langs/nim.js +1 -0
  1234. package/src/shiki/langs/nix.js +1 -0
  1235. package/src/shiki/langs/nushell.js +1 -0
  1236. package/src/shiki/langs/objective-c.js +1 -0
  1237. package/src/shiki/langs/objective-cpp.js +1 -0
  1238. package/src/shiki/langs/ocaml.js +1 -0
  1239. package/src/shiki/langs/pascal.js +1 -0
  1240. package/src/shiki/langs/perl.js +1 -0
  1241. package/src/shiki/langs/php.js +1 -0
  1242. package/src/shiki/langs/plsql.js +1 -0
  1243. package/src/shiki/langs/po.js +1 -0
  1244. package/src/shiki/langs/polar.js +1 -0
  1245. package/src/shiki/langs/postcss.js +1 -0
  1246. package/src/shiki/langs/powerquery.js +1 -0
  1247. package/src/shiki/langs/powershell.js +1 -0
  1248. package/src/shiki/langs/prisma.js +1 -0
  1249. package/src/shiki/langs/prolog.js +1 -0
  1250. package/src/shiki/langs/proto.js +1 -0
  1251. package/src/shiki/langs/pug.js +1 -0
  1252. package/src/shiki/langs/puppet.js +1 -0
  1253. package/src/shiki/langs/purescript.js +1 -0
  1254. package/src/shiki/langs/python.js +1 -0
  1255. package/src/shiki/langs/qml.js +1 -0
  1256. package/src/shiki/langs/qmldir.js +1 -0
  1257. package/src/shiki/langs/qss.js +1 -0
  1258. package/src/shiki/langs/r.js +1 -0
  1259. package/src/shiki/langs/racket.js +1 -0
  1260. package/src/shiki/langs/raku.js +1 -0
  1261. package/src/shiki/langs/razor.js +1 -0
  1262. package/src/shiki/langs/reg.js +1 -0
  1263. package/src/shiki/langs/regexp.js +1 -0
  1264. package/src/shiki/langs/rel.js +1 -0
  1265. package/src/shiki/langs/riscv.js +1 -0
  1266. package/src/shiki/langs/rst.js +1 -0
  1267. package/src/shiki/langs/ruby.js +1 -0
  1268. package/src/shiki/langs/rust.js +1 -0
  1269. package/src/shiki/langs/sas.js +1 -0
  1270. package/src/shiki/langs/sass.js +1 -0
  1271. package/src/shiki/langs/scala.js +1 -0
  1272. package/src/shiki/langs/scheme.js +1 -0
  1273. package/src/shiki/langs/scss.js +1 -0
  1274. package/src/shiki/langs/sdbl.js +1 -0
  1275. package/src/shiki/langs/shaderlab.js +1 -0
  1276. package/src/shiki/langs/shellscript.js +1 -0
  1277. package/src/shiki/langs/shellsession.js +1 -0
  1278. package/src/shiki/langs/smalltalk.js +1 -0
  1279. package/src/shiki/langs/solidity.js +1 -0
  1280. package/src/shiki/langs/soy.js +1 -0
  1281. package/src/shiki/langs/sparql.js +1 -0
  1282. package/src/shiki/langs/splunk.js +1 -0
  1283. package/src/shiki/langs/sql.js +1 -0
  1284. package/src/shiki/langs/ssh-config.js +1 -0
  1285. package/src/shiki/langs/stata.js +1 -0
  1286. package/src/shiki/langs/stylus.js +1 -0
  1287. package/src/shiki/langs/svelte.js +1 -0
  1288. package/src/shiki/langs/swift.js +1 -0
  1289. package/src/shiki/langs/system-verilog.js +1 -0
  1290. package/src/shiki/langs/systemd.js +1 -0
  1291. package/src/shiki/langs/talonscript.js +1 -0
  1292. package/src/shiki/langs/tasl.js +1 -0
  1293. package/src/shiki/langs/tcl.js +1 -0
  1294. package/src/shiki/langs/templ.js +1 -0
  1295. package/src/shiki/langs/terraform.js +1 -0
  1296. package/src/shiki/langs/tex.js +1 -0
  1297. package/src/shiki/langs/toml.js +1 -0
  1298. package/src/shiki/langs/ts-tags.js +1 -0
  1299. package/src/shiki/langs/tsv.js +1 -0
  1300. package/src/shiki/langs/tsx.js +1 -0
  1301. package/src/shiki/langs/turtle.js +1 -0
  1302. package/src/shiki/langs/twig.js +1 -0
  1303. package/src/shiki/langs/typescript.js +1 -0
  1304. package/src/shiki/langs/typespec.js +1 -0
  1305. package/src/shiki/langs/typst.js +1 -0
  1306. package/src/shiki/langs/v.js +1 -0
  1307. package/src/shiki/langs/vala.js +1 -0
  1308. package/src/shiki/langs/vb.js +1 -0
  1309. package/src/shiki/langs/verilog.js +1 -0
  1310. package/src/shiki/langs/vhdl.js +1 -0
  1311. package/src/shiki/langs/viml.js +1 -0
  1312. package/src/shiki/langs/vue-directives.js +1 -0
  1313. package/src/shiki/langs/vue-html.js +1 -0
  1314. package/src/shiki/langs/vue-interpolations.js +1 -0
  1315. package/src/shiki/langs/vue-sfc-style-variable-injection.js +1 -0
  1316. package/src/shiki/langs/vue.js +1 -0
  1317. package/src/shiki/langs/vyper.js +1 -0
  1318. package/src/shiki/langs/wasm.js +1 -0
  1319. package/src/shiki/langs/wenyan.js +1 -0
  1320. package/src/shiki/langs/wgsl.js +1 -0
  1321. package/src/shiki/langs/wikitext.js +1 -0
  1322. package/src/shiki/langs/wit.js +1 -0
  1323. package/src/shiki/langs/wolfram.js +1 -0
  1324. package/src/shiki/langs/xml.js +1 -0
  1325. package/src/shiki/langs/xsl.js +1 -0
  1326. package/src/shiki/langs/yaml.js +1 -0
  1327. package/src/shiki/langs/zenscript.js +1 -0
  1328. package/src/shiki/langs/zig.js +1 -0
  1329. package/src/shiki/themes/andromeeda.js +1 -0
  1330. package/src/shiki/themes/aurora-x.js +1 -0
  1331. package/src/shiki/themes/ayu-dark.js +1 -0
  1332. package/src/shiki/themes/catppuccin-frappe.js +1 -0
  1333. package/src/shiki/themes/catppuccin-latte.js +1 -0
  1334. package/src/shiki/themes/catppuccin-macchiato.js +1 -0
  1335. package/src/shiki/themes/catppuccin-mocha.js +1 -0
  1336. package/src/shiki/themes/dark-plus.js +1 -0
  1337. package/src/shiki/themes/dracula-soft.js +1 -0
  1338. package/src/shiki/themes/dracula.js +1 -0
  1339. package/src/shiki/themes/everforest-dark.js +1 -0
  1340. package/src/shiki/themes/everforest-light.js +1 -0
  1341. package/src/shiki/themes/github-dark-default.js +1 -0
  1342. package/src/shiki/themes/github-dark-dimmed.js +1 -0
  1343. package/src/shiki/themes/github-dark-high-contrast.js +1 -0
  1344. package/src/shiki/themes/github-dark.js +1 -0
  1345. package/src/shiki/themes/github-light-default.js +1 -0
  1346. package/src/shiki/themes/github-light-high-contrast.js +1 -0
  1347. package/src/shiki/themes/github-light.js +1 -0
  1348. package/src/shiki/themes/gruvbox-dark-hard.js +1 -0
  1349. package/src/shiki/themes/gruvbox-dark-medium.js +1 -0
  1350. package/src/shiki/themes/gruvbox-dark-soft.js +1 -0
  1351. package/src/shiki/themes/gruvbox-light-hard.js +1 -0
  1352. package/src/shiki/themes/gruvbox-light-medium.js +1 -0
  1353. package/src/shiki/themes/gruvbox-light-soft.js +1 -0
  1354. package/src/shiki/themes/houston.js +1 -0
  1355. package/src/shiki/themes/kanagawa-dragon.js +1 -0
  1356. package/src/shiki/themes/kanagawa-lotus.js +1 -0
  1357. package/src/shiki/themes/kanagawa-wave.js +1 -0
  1358. package/src/shiki/themes/laserwave.js +1 -0
  1359. package/src/shiki/themes/light-plus.js +1 -0
  1360. package/src/shiki/themes/material-theme-darker.js +1 -0
  1361. package/src/shiki/themes/material-theme-lighter.js +1 -0
  1362. package/src/shiki/themes/material-theme-ocean.js +1 -0
  1363. package/src/shiki/themes/material-theme-palenight.js +1 -0
  1364. package/src/shiki/themes/material-theme.js +1 -0
  1365. package/src/shiki/themes/min-dark.js +1 -0
  1366. package/src/shiki/themes/min-light.js +1 -0
  1367. package/src/shiki/themes/monokai.js +1 -0
  1368. package/src/shiki/themes/night-owl.js +1 -0
  1369. package/src/shiki/themes/nord.js +1 -0
  1370. package/src/shiki/themes/one-dark-pro.js +1 -0
  1371. package/src/shiki/themes/one-light.js +1 -0
  1372. package/src/shiki/themes/plastic.js +1 -0
  1373. package/src/shiki/themes/poimandres.js +1 -0
  1374. package/src/shiki/themes/red.js +1 -0
  1375. package/src/shiki/themes/rose-pine-dawn.js +1 -0
  1376. package/src/shiki/themes/rose-pine-moon.js +1 -0
  1377. package/src/shiki/themes/rose-pine.js +1 -0
  1378. package/src/shiki/themes/slack-dark.js +1 -0
  1379. package/src/shiki/themes/slack-ochin.js +1 -0
  1380. package/src/shiki/themes/snazzy-light.js +1 -0
  1381. package/src/shiki/themes/solarized-dark.js +1 -0
  1382. package/src/shiki/themes/solarized-light.js +1 -0
  1383. package/src/shiki/themes/synthwave-84.js +1 -0
  1384. package/src/shiki/themes/tokyo-night.js +1 -0
  1385. package/src/shiki/themes/vesper.js +1 -0
  1386. package/src/shiki/themes/vitesse-black.js +1 -0
  1387. package/src/shiki/themes/vitesse-dark.js +1 -0
  1388. package/src/shiki/themes/vitesse-light.js +1 -0
  1389. package/client.d.ts +0 -1
  1390. package/dist/lib/components/SyntaxHighlight.d.ts +0 -11
  1391. package/dist/lib/components/SyntaxHighlight.js +0 -57
  1392. package/dist/lib/components/SyntaxHighlight.js.map +0 -1
  1393. package/dist/lib/components/context/PluginSystem.js +0 -2
  1394. package/dist/lib/components/context/PluginSystem.js.map +0 -1
  1395. package/dist/lib/plugins/markdown/Toc.js.map +0 -1
  1396. package/dist/lib/plugins/openapi/Route.d.ts +0 -6
  1397. package/dist/lib/plugins/openapi/Route.js +0 -6
  1398. package/dist/lib/plugins/openapi/Route.js.map +0 -1
  1399. package/dist/lib/plugins/openapi/client/worker.d.ts +0 -4
  1400. package/dist/lib/plugins/openapi/client/worker.js +0 -29
  1401. package/dist/lib/plugins/openapi/client/worker.js.map +0 -1
  1402. package/dist/lib/plugins/openapi/playground/ResponseTab.d.ts +0 -4
  1403. package/dist/lib/plugins/openapi/playground/ResponseTab.js +0 -42
  1404. package/dist/lib/plugins/openapi/playground/ResponseTab.js.map +0 -1
  1405. package/dist/lib/plugins/openapi/schema/SchemaComponents.js +0 -28
  1406. package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +0 -1
  1407. package/dist/lib/plugins/openapi-worker.d.ts +0 -1
  1408. package/dist/lib/plugins/openapi-worker.js +0 -8
  1409. package/dist/lib/plugins/openapi-worker.js.map +0 -1
  1410. package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.d.ts +0 -2
  1411. package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js +0 -3
  1412. package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js.map +0 -1
  1413. package/dist/vite/plugin-custom-css.js +0 -55
  1414. package/dist/vite/plugin-custom-css.js.map +0 -1
  1415. package/dist/vite/prerender.d.ts +0 -21
  1416. package/dist/vite/prerender.js +0 -89
  1417. package/dist/vite/prerender.js.map +0 -1
  1418. package/lib/AnchorLink-CDlhr8gL.js +0 -706
  1419. package/lib/AnchorLink-CDlhr8gL.js.map +0 -1
  1420. package/lib/AuthenticationPlugin-DeGDVa1r.js +0 -56
  1421. package/lib/AuthenticationPlugin-DeGDVa1r.js.map +0 -1
  1422. package/lib/Button-jK0EsymC.js +0 -48
  1423. package/lib/Button-jK0EsymC.js.map +0 -1
  1424. package/lib/Dialog-k70Qfukb.js +0 -67
  1425. package/lib/InkeepCustomTrigger-CE5-K5ex.js +0 -6
  1426. package/lib/InkeepCustomTrigger-CE5-K5ex.js.map +0 -1
  1427. package/lib/Markdown-ievDDhFT.js +0 -15192
  1428. package/lib/Markdown-ievDDhFT.js.map +0 -1
  1429. package/lib/MdxPage-Bwn-VSsH.js +0 -174
  1430. package/lib/MdxPage-Bwn-VSsH.js.map +0 -1
  1431. package/lib/OperationList-BwBl1xrD.js +0 -4691
  1432. package/lib/OperationList-BwBl1xrD.js.map +0 -1
  1433. package/lib/Route-DlG_HTMu.js +0 -11
  1434. package/lib/Route-DlG_HTMu.js.map +0 -1
  1435. package/lib/Select-O9ZM3ZgX.js +0 -223
  1436. package/lib/Select-O9ZM3ZgX.js.map +0 -1
  1437. package/lib/SidebarBadge-DxFJcJ6V.js +0 -51
  1438. package/lib/SidebarBadge-DxFJcJ6V.js.map +0 -1
  1439. package/lib/SlotletProvider-DyomlzGx.js +0 -252
  1440. package/lib/SlotletProvider-DyomlzGx.js.map +0 -1
  1441. package/lib/SyntaxHighlight-DkLOsjHS.js +0 -2983
  1442. package/lib/SyntaxHighlight-DkLOsjHS.js.map +0 -1
  1443. package/lib/__vite-browser-external-BYRIRx8p.js +0 -9
  1444. package/lib/__vite-browser-external-BYRIRx8p.js.map +0 -1
  1445. package/lib/_commonjsHelpers-BkfeUUK-.js +0 -29
  1446. package/lib/_commonjsHelpers-BkfeUUK-.js.map +0 -1
  1447. package/lib/assets/index-B_Jk_Yzp.js.map +0 -1
  1448. package/lib/assets/worker-CPsGZsve.js +0 -18201
  1449. package/lib/assets/worker-CPsGZsve.js.map +0 -1
  1450. package/lib/cn-BmFQLtkS.js.map +0 -1
  1451. package/lib/context-D1nXWxm7.js +0 -22
  1452. package/lib/context-D1nXWxm7.js.map +0 -1
  1453. package/lib/createServer-DK-g7kbB.js +0 -16089
  1454. package/lib/createServer-DK-g7kbB.js.map +0 -1
  1455. package/lib/hook-hEqe7fPB.js +0 -227
  1456. package/lib/hook-hEqe7fPB.js.map +0 -1
  1457. package/lib/index-BuAyrJe3.js +0 -46
  1458. package/lib/index-BuAyrJe3.js.map +0 -1
  1459. package/lib/index-CkwDvuPt.js +0 -4820
  1460. package/lib/index-CkwDvuPt.js.map +0 -1
  1461. package/lib/index-Czzd9rjU.js +0 -899
  1462. package/lib/index-Czzd9rjU.js.map +0 -1
  1463. package/lib/index-DNxQ_rCt.js +0 -1273
  1464. package/lib/index-DNxQ_rCt.js.map +0 -1
  1465. package/lib/index-Yn8c3UWE.js +0 -921
  1466. package/lib/index-Yn8c3UWE.js.map +0 -1
  1467. package/lib/index.esm-C5mr_sKO.js +0 -1193
  1468. package/lib/index.esm-C5mr_sKO.js.map +0 -1
  1469. package/lib/invariant-Caa8-XvF.js +0 -26
  1470. package/lib/jsx-runtime-B6kdoens.js +0 -635
  1471. package/lib/jsx-runtime-B6kdoens.js.map +0 -1
  1472. package/lib/prism-bash.min-DadFsM4Z.js +0 -7
  1473. package/lib/prism-bash.min-DadFsM4Z.js.map +0 -1
  1474. package/lib/prism-csharp.min-Yizuc34Y.js +0 -35
  1475. package/lib/prism-csharp.min-Yizuc34Y.js.map +0 -1
  1476. package/lib/prism-java.min-d5iT_mOd.js +0 -7
  1477. package/lib/prism-java.min-d5iT_mOd.js.map +0 -1
  1478. package/lib/prism-javascript.min-CEqHqgbm.js +0 -9
  1479. package/lib/prism-javascript.min-CEqHqgbm.js.map +0 -1
  1480. package/lib/prism-json.min-B1GJqK1k.js +0 -2
  1481. package/lib/prism-json.min-B1GJqK1k.js.map +0 -1
  1482. package/lib/prism-markdown.min-F3U-vPBi.js +0 -61
  1483. package/lib/prism-markdown.min-F3U-vPBi.js.map +0 -1
  1484. package/lib/prism-markup-BNGj0Tvm.js +0 -174
  1485. package/lib/prism-markup-BNGj0Tvm.js.map +0 -1
  1486. package/lib/prism-markup-templating-DZrrEs0A.js +0 -62
  1487. package/lib/prism-markup-templating-DZrrEs0A.js.map +0 -1
  1488. package/lib/prism-objectivec.min-BXSWqpJJ.js +0 -2
  1489. package/lib/prism-objectivec.min-BXSWqpJJ.js.map +0 -1
  1490. package/lib/prism-php.min-o7FpoMP_.js +0 -11
  1491. package/lib/prism-php.min-o7FpoMP_.js.map +0 -1
  1492. package/lib/prism-ruby.min-C7LwcKyz.js +0 -10
  1493. package/lib/prism-ruby.min-C7LwcKyz.js.map +0 -1
  1494. package/lib/prism-typescript.min-oSVeWCAd.js +0 -6
  1495. package/lib/prism-typescript.min-oSVeWCAd.js.map +0 -1
  1496. package/lib/router-lfyopgBI.js +0 -3024
  1497. package/lib/router-lfyopgBI.js.map +0 -1
  1498. package/lib/state-tsXBLONe.js +0 -203
  1499. package/lib/state-tsXBLONe.js.map +0 -1
  1500. package/lib/useExposedProps-CTPtylCV.js +0 -10
  1501. package/lib/useExposedProps-CTPtylCV.js.map +0 -1
  1502. package/lib/utils-DcpDOncX.js +0 -1218
  1503. package/lib/utils-DcpDOncX.js.map +0 -1
  1504. package/lib/zudoku.openapi-worker.js +0 -15
  1505. package/lib/zudoku.openapi-worker.js.map +0 -1
  1506. package/src/lib/components/SyntaxHighlight.tsx +0 -161
  1507. package/src/lib/components/context/PluginSystem.ts +0 -0
  1508. package/src/lib/plugins/openapi/Route.tsx +0 -19
  1509. package/src/lib/plugins/openapi/client/worker.ts +0 -44
  1510. package/src/lib/plugins/openapi/playground/ResponseTab.tsx +0 -76
  1511. package/src/lib/plugins/openapi/schema/SchemaComponents.tsx +0 -126
  1512. package/src/lib/plugins/openapi-worker.ts +0 -11
  1513. package/src/lib/plugins/search-inkeep/InkeepCustomTrigger.tsx +0 -3
  1514. /package/dist/lib/{plugins/markdown → components/navigation}/Toc.d.ts +0 -0
  1515. /package/dist/lib/{components/context/PluginSystem.d.ts → hooks/useEvent.test.d.ts} +0 -0
@@ -1,165 +1,163 @@
1
- var Ie = Object.defineProperty;
2
- var je = (t, e, n) => e in t ? Ie(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var b = (t, e, n) => je(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { j as fe } from "./jsx-runtime-B6kdoens.js";
5
- import { c as Je, g as Oe } from "./_commonjsHelpers-BkfeUUK-.js";
6
- import { A as ze } from "./AuthenticationPlugin-DeGDVa1r.js";
7
- import { g as De } from "./utils-DcpDOncX.js";
8
- import { Z as Ne } from "./invariant-Caa8-XvF.js";
9
- import { l as Ke } from "./index-Czzd9rjU.js";
10
- import { u as z } from "./state-tsXBLONe.js";
11
- var pe = { exports: {} };
12
- (function(t) {
13
- (function(e, n) {
14
- t.exports ? t.exports = n() : e.log = n();
15
- })(Je, function() {
16
- var e = function() {
17
- }, n = "undefined", o = typeof window !== n && typeof window.navigator !== n && /Trident\/|MSIE /.test(window.navigator.userAgent), a = [
18
- "trace",
19
- "debug",
20
- "info",
21
- "warn",
22
- "error"
23
- ], r = {}, i = null;
24
- function c(l, m) {
25
- var u = l[m];
26
- if (typeof u.bind == "function")
27
- return u.bind(l);
28
- try {
29
- return Function.prototype.bind.call(u, l);
30
- } catch {
1
+ import { j as M } from "./jsx-runtime-C5mzlN2N.js";
2
+ import { g as Pe, Z as Ue } from "./invariant-DAFpPywt.js";
3
+ import { C as Le } from "./ClientOnly-E7hGysn1.js";
4
+ import { d as xe, f as he, u as L } from "./hook-CqYKERnR.js";
5
+ import { A as Ce } from "./AuthenticationPlugin-B9ZLD8dq.js";
6
+ import { N as Ie } from "./chunk-BAXFHI7N-C9WnHsLV.js";
7
+ import { a as je } from "./index-LSPm9Daf.js";
8
+ var z = { exports: {} }, Oe = z.exports, re;
9
+ function ze() {
10
+ return re || (re = 1, function(t) {
11
+ (function(e, n) {
12
+ t.exports ? t.exports = n() : e.log = n();
13
+ })(Oe, function() {
14
+ var e = function() {
15
+ }, n = "undefined", o = typeof window !== n && typeof window.navigator !== n && /Trident\/|MSIE /.test(window.navigator.userAgent), s = [
16
+ "trace",
17
+ "debug",
18
+ "info",
19
+ "warn",
20
+ "error"
21
+ ], r = {}, i = null;
22
+ function c(l, m) {
23
+ var u = l[m];
24
+ if (typeof u.bind == "function")
25
+ return u.bind(l);
26
+ try {
27
+ return Function.prototype.bind.call(u, l);
28
+ } catch {
29
+ return function() {
30
+ return Function.prototype.apply.apply(u, [l, arguments]);
31
+ };
32
+ }
33
+ }
34
+ function f() {
35
+ console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
36
+ }
37
+ function y(l) {
38
+ return l === "debug" && (l = "log"), typeof console === n ? !1 : l === "trace" && o ? f : console[l] !== void 0 ? c(console, l) : console.log !== void 0 ? c(console, "log") : e;
39
+ }
40
+ function p() {
41
+ for (var l = this.getLevel(), m = 0; m < s.length; m++) {
42
+ var u = s[m];
43
+ this[u] = m < l ? e : this.methodFactory(u, l, this.name);
44
+ }
45
+ if (this.log = this.debug, typeof console === n && l < this.levels.SILENT)
46
+ return "No console available for logging";
47
+ }
48
+ function A(l) {
31
49
  return function() {
32
- return Function.prototype.apply.apply(u, [l, arguments]);
50
+ typeof console !== n && (p.call(this), this[l].apply(this, arguments));
33
51
  };
34
52
  }
35
- }
36
- function p() {
37
- console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
38
- }
39
- function _(l) {
40
- return l === "debug" && (l = "log"), typeof console === n ? !1 : l === "trace" && o ? p : console[l] !== void 0 ? c(console, l) : console.log !== void 0 ? c(console, "log") : e;
41
- }
42
- function f() {
43
- for (var l = this.getLevel(), m = 0; m < a.length; m++) {
44
- var u = a[m];
45
- this[u] = m < l ? e : this.methodFactory(u, l, this.name);
53
+ function b(l, m, u) {
54
+ return y(l) || A.apply(this, arguments);
46
55
  }
47
- if (this.log = this.debug, typeof console === n && l < this.levels.SILENT)
48
- return "No console available for logging";
49
- }
50
- function y(l) {
51
- return function() {
52
- typeof console !== n && (f.call(this), this[l].apply(this, arguments));
53
- };
54
- }
55
- function T(l, m, u) {
56
- return _(l) || y.apply(this, arguments);
57
- }
58
- function h(l, m) {
59
- var u = this, J, F, R, v = "loglevel";
60
- typeof l == "string" ? v += ":" + l : typeof l == "symbol" && (v = void 0);
61
- function Ce(d) {
62
- var g = (a[d] || "silent").toUpperCase();
63
- if (!(typeof window === n || !v)) {
64
- try {
65
- window.localStorage[v] = g;
66
- return;
67
- } catch {
68
- }
69
- try {
70
- window.document.cookie = encodeURIComponent(v) + "=" + g + ";";
71
- } catch {
56
+ function h(l, m) {
57
+ var u = this, j, K, P, _ = "loglevel";
58
+ typeof l == "string" ? _ += ":" + l : typeof l == "symbol" && (_ = void 0);
59
+ function ke(d) {
60
+ var g = (s[d] || "silent").toUpperCase();
61
+ if (!(typeof window === n || !_)) {
62
+ try {
63
+ window.localStorage[_] = g;
64
+ return;
65
+ } catch {
66
+ }
67
+ try {
68
+ window.document.cookie = encodeURIComponent(_) + "=" + g + ";";
69
+ } catch {
70
+ }
72
71
  }
73
72
  }
74
- }
75
- function te() {
76
- var d;
77
- if (!(typeof window === n || !v)) {
78
- try {
79
- d = window.localStorage[v];
80
- } catch {
81
- }
82
- if (typeof d === n)
73
+ function ee() {
74
+ var d;
75
+ if (!(typeof window === n || !_)) {
83
76
  try {
84
- var g = window.document.cookie, O = encodeURIComponent(v), re = g.indexOf(O + "=");
85
- re !== -1 && (d = /^([^;]+)/.exec(
86
- g.slice(re + O.length + 1)
87
- )[1]);
77
+ d = window.localStorage[_];
88
78
  } catch {
89
79
  }
90
- return u.levels[d] === void 0 && (d = void 0), d;
91
- }
92
- }
93
- function Le() {
94
- if (!(typeof window === n || !v)) {
95
- try {
96
- window.localStorage.removeItem(v);
97
- } catch {
80
+ if (typeof d === n)
81
+ try {
82
+ var g = window.document.cookie, O = encodeURIComponent(_), ne = g.indexOf(O + "=");
83
+ ne !== -1 && (d = /^([^;]+)/.exec(
84
+ g.slice(ne + O.length + 1)
85
+ )[1]);
86
+ } catch {
87
+ }
88
+ return u.levels[d] === void 0 && (d = void 0), d;
98
89
  }
99
- try {
100
- window.document.cookie = encodeURIComponent(v) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
101
- } catch {
90
+ }
91
+ function Ee() {
92
+ if (!(typeof window === n || !_)) {
93
+ try {
94
+ window.localStorage.removeItem(_);
95
+ } catch {
96
+ }
97
+ try {
98
+ window.document.cookie = encodeURIComponent(_) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
99
+ } catch {
100
+ }
102
101
  }
103
102
  }
103
+ function U(d) {
104
+ var g = d;
105
+ if (typeof g == "string" && u.levels[g.toUpperCase()] !== void 0 && (g = u.levels[g.toUpperCase()]), typeof g == "number" && g >= 0 && g <= u.levels.SILENT)
106
+ return g;
107
+ throw new TypeError("log.setLevel() called with invalid level: " + d);
108
+ }
109
+ u.name = l, u.levels = {
110
+ TRACE: 0,
111
+ DEBUG: 1,
112
+ INFO: 2,
113
+ WARN: 3,
114
+ ERROR: 4,
115
+ SILENT: 5
116
+ }, u.methodFactory = m || b, u.getLevel = function() {
117
+ return P ?? K ?? j;
118
+ }, u.setLevel = function(d, g) {
119
+ return P = U(d), g !== !1 && ke(P), p.call(u);
120
+ }, u.setDefaultLevel = function(d) {
121
+ K = U(d), ee() || u.setLevel(d, !1);
122
+ }, u.resetLevel = function() {
123
+ P = null, Ee(), p.call(u);
124
+ }, u.enableAll = function(d) {
125
+ u.setLevel(u.levels.TRACE, d);
126
+ }, u.disableAll = function(d) {
127
+ u.setLevel(u.levels.SILENT, d);
128
+ }, u.rebuild = function() {
129
+ if (i !== u && (j = U(i.getLevel())), p.call(u), i === u)
130
+ for (var d in r)
131
+ r[d].rebuild();
132
+ }, j = U(
133
+ i ? i.getLevel() : "WARN"
134
+ );
135
+ var te = ee();
136
+ te != null && (P = U(te)), p.call(u);
104
137
  }
105
- function U(d) {
106
- var g = d;
107
- if (typeof g == "string" && u.levels[g.toUpperCase()] !== void 0 && (g = u.levels[g.toUpperCase()]), typeof g == "number" && g >= 0 && g <= u.levels.SILENT)
108
- return g;
109
- throw new TypeError("log.setLevel() called with invalid level: " + d);
110
- }
111
- u.name = l, u.levels = {
112
- TRACE: 0,
113
- DEBUG: 1,
114
- INFO: 2,
115
- WARN: 3,
116
- ERROR: 4,
117
- SILENT: 5
118
- }, u.methodFactory = m || T, u.getLevel = function() {
119
- return R ?? F ?? J;
120
- }, u.setLevel = function(d, g) {
121
- return R = U(d), g !== !1 && Ce(R), f.call(u);
122
- }, u.setDefaultLevel = function(d) {
123
- F = U(d), te() || u.setLevel(d, !1);
124
- }, u.resetLevel = function() {
125
- R = null, Le(), f.call(u);
126
- }, u.enableAll = function(d) {
127
- u.setLevel(u.levels.TRACE, d);
128
- }, u.disableAll = function(d) {
129
- u.setLevel(u.levels.SILENT, d);
130
- }, u.rebuild = function() {
131
- if (i !== u && (J = U(i.getLevel())), f.call(u), i === u)
132
- for (var d in r)
133
- r[d].rebuild();
134
- }, J = U(
135
- i ? i.getLevel() : "WARN"
136
- );
137
- var ne = te();
138
- ne != null && (R = U(ne)), f.call(u);
139
- }
140
- i = new h(), i.getLogger = function(m) {
141
- if (typeof m != "symbol" && typeof m != "string" || m === "")
142
- throw new TypeError("You must supply a name when creating a logger.");
143
- var u = r[m];
144
- return u || (u = r[m] = new h(
145
- m,
146
- i.methodFactory
147
- )), u;
148
- };
149
- var j = typeof window !== n ? window.log : void 0;
150
- return i.noConflict = function() {
151
- return typeof window !== n && window.log === i && (window.log = j), i;
152
- }, i.getLoggers = function() {
153
- return r;
154
- }, i.default = i, i;
155
- });
156
- })(pe);
157
- var We = pe.exports;
158
- const oe = /* @__PURE__ */ Oe(We);
159
- let V;
160
- var D, he;
161
- (typeof navigator > "u" || !((he = (D = navigator.userAgent) == null ? void 0 : D.startsWith) != null && he.call(D, "Mozilla/5.0 "))) && (V = "oauth4webapi/v2.17.0");
162
- function Z(t, e) {
138
+ i = new h(), i.getLogger = function(m) {
139
+ if (typeof m != "symbol" && typeof m != "string" || m === "")
140
+ throw new TypeError("You must supply a name when creating a logger.");
141
+ var u = r[m];
142
+ return u || (u = r[m] = new h(
143
+ m,
144
+ i.methodFactory
145
+ )), u;
146
+ };
147
+ var R = typeof window !== n ? window.log : void 0;
148
+ return i.noConflict = function() {
149
+ return typeof window !== n && window.log === i && (window.log = R), i;
150
+ }, i.getLoggers = function() {
151
+ return r;
152
+ }, i.default = i, i;
153
+ });
154
+ }(z)), z.exports;
155
+ }
156
+ var Je = ze();
157
+ const oe = /* @__PURE__ */ Pe(Je);
158
+ let B;
159
+ (typeof navigator > "u" || !navigator.userAgent?.startsWith?.("Mozilla/5.0 ")) && (B = "oauth4webapi/v2.17.0");
160
+ function V(t, e) {
163
161
  if (t == null)
164
162
  return !1;
165
163
  try {
@@ -168,32 +166,32 @@ function Z(t, e) {
168
166
  return !1;
169
167
  }
170
168
  }
171
- const K = Symbol(), He = Symbol(), Y = Symbol(), we = Symbol(), $e = Symbol(), Fe = Symbol(), Me = new TextEncoder(), Be = new TextDecoder();
172
- function E(t) {
173
- return typeof t == "string" ? Me.encode(t) : Be.decode(t);
169
+ const D = Symbol(), De = Symbol(), G = Symbol(), Ne = Symbol(), We = Symbol(), Ke = Symbol(), He = new TextEncoder(), $e = new TextDecoder();
170
+ function k(t) {
171
+ return typeof t == "string" ? He.encode(t) : $e.decode(t);
174
172
  }
175
173
  const ie = 32768;
176
- function qe(t) {
174
+ function Fe(t) {
177
175
  t instanceof ArrayBuffer && (t = new Uint8Array(t));
178
176
  const e = [];
179
177
  for (let n = 0; n < t.byteLength; n += ie)
180
178
  e.push(String.fromCharCode.apply(null, t.subarray(n, n + ie)));
181
179
  return btoa(e.join("")).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
182
180
  }
183
- function Ve(t) {
181
+ function Me(t) {
184
182
  try {
185
183
  const e = atob(t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "")), n = new Uint8Array(e.length);
186
184
  for (let o = 0; o < e.length; o++)
187
185
  n[o] = e.charCodeAt(o);
188
186
  return n;
189
187
  } catch (e) {
190
- throw new s("The input to be decoded is not correctly encoded.", { cause: e });
188
+ throw new a("The input to be decoded is not correctly encoded.", { cause: e });
191
189
  }
192
190
  }
193
- function A(t) {
194
- return typeof t == "string" ? Ve(t) : qe(t);
191
+ function T(t) {
192
+ return typeof t == "string" ? Me(t) : Fe(t);
195
193
  }
196
- class Ge {
194
+ class Be {
197
195
  constructor(e) {
198
196
  this.cache = /* @__PURE__ */ new Map(), this._cache = /* @__PURE__ */ new Map(), this.maxSize = e;
199
197
  }
@@ -217,60 +215,58 @@ class Ge {
217
215
  this.cache.set(e, n), this.cache.size >= this.maxSize && (this._cache = this.cache, this.cache = /* @__PURE__ */ new Map());
218
216
  }
219
217
  }
220
- class S extends Error {
218
+ class v extends Error {
221
219
  constructor(e) {
222
- var n;
223
- super(e ?? "operation not supported"), this.name = this.constructor.name, (n = Error.captureStackTrace) == null || n.call(Error, this, this.constructor);
220
+ super(e ?? "operation not supported"), this.name = this.constructor.name, Error.captureStackTrace?.(this, this.constructor);
224
221
  }
225
222
  }
226
- class Ze extends Error {
223
+ class qe extends Error {
227
224
  constructor(e, n) {
228
- var o;
229
- super(e, n), this.name = this.constructor.name, (o = Error.captureStackTrace) == null || o.call(Error, this, this.constructor);
225
+ super(e, n), this.name = this.constructor.name, Error.captureStackTrace?.(this, this.constructor);
230
226
  }
231
227
  }
232
- const s = Ze, me = new Ge(100);
233
- function ge(t) {
228
+ const a = qe, fe = new Be(100);
229
+ function pe(t) {
234
230
  return t instanceof CryptoKey;
235
231
  }
236
- function ye(t) {
237
- return ge(t) && t.type === "private";
232
+ function Ve(t) {
233
+ return pe(t) && t.type === "private";
238
234
  }
239
- function Ye(t) {
240
- return ge(t) && t.type === "public";
235
+ function Ge(t) {
236
+ return pe(t) && t.type === "public";
241
237
  }
242
- function Q(t) {
238
+ function Z(t) {
243
239
  try {
244
240
  const e = t.headers.get("dpop-nonce");
245
- e && me.set(new URL(t.url).origin, e);
241
+ e && fe.set(new URL(t.url).origin, e);
246
242
  } catch {
247
243
  }
248
244
  return t;
249
245
  }
250
- function C(t) {
246
+ function x(t) {
251
247
  return !(t === null || typeof t != "object" || Array.isArray(t));
252
248
  }
253
- function W(t) {
254
- Z(t, Headers) && (t = Object.fromEntries(t.entries()));
249
+ function N(t) {
250
+ V(t, Headers) && (t = Object.fromEntries(t.entries()));
255
251
  const e = new Headers(t);
256
- if (V && !e.has("user-agent") && e.set("user-agent", V), e.has("authorization"))
252
+ if (B && !e.has("user-agent") && e.set("user-agent", B), e.has("authorization"))
257
253
  throw new TypeError('"options.headers" must not include the "authorization" header name');
258
254
  if (e.has("dpop"))
259
255
  throw new TypeError('"options.headers" must not include the "dpop" header name');
260
256
  return e;
261
257
  }
262
- function X(t) {
258
+ function Ze(t) {
263
259
  if (typeof t == "function" && (t = t()), !(t instanceof AbortSignal))
264
260
  throw new TypeError('"options.signal" must return or be an instance of AbortSignal');
265
261
  return t;
266
262
  }
267
- async function Qe(t, e) {
263
+ async function Ye(t, e) {
268
264
  if (!(t instanceof URL))
269
265
  throw new TypeError('"issuerIdentifier" must be an instance of URL');
270
266
  if (t.protocol !== "https:" && t.protocol !== "http:")
271
267
  throw new TypeError('"issuer.protocol" must be "https:" or "http:"');
272
268
  const n = new URL(t.href);
273
- switch (e == null ? void 0 : e.algorithm) {
269
+ switch (e?.algorithm) {
274
270
  case void 0:
275
271
  case "oidc":
276
272
  n.pathname = `${n.pathname}/.well-known/openid-configuration`.replace("//", "/");
@@ -281,74 +277,61 @@ async function Qe(t, e) {
281
277
  default:
282
278
  throw new TypeError('"options.algorithm" must be "oidc" (default), or "oauth2"');
283
279
  }
284
- const o = W(e == null ? void 0 : e.headers);
285
- return o.set("accept", "application/json"), ((e == null ? void 0 : e[Y]) || fetch)(n.href, {
280
+ const o = N(e?.headers);
281
+ return o.set("accept", "application/json"), (e?.[G] || fetch)(n.href, {
286
282
  headers: Object.fromEntries(o.entries()),
287
283
  method: "GET",
288
284
  redirect: "manual",
289
- signal: e != null && e.signal ? X(e.signal) : null
290
- }).then(Q);
285
+ signal: null
286
+ }).then(Z);
291
287
  }
292
288
  function w(t) {
293
289
  return typeof t == "string" && t.length !== 0;
294
290
  }
295
- async function Xe(t, e) {
291
+ async function Qe(t, e) {
296
292
  if (!(t instanceof URL))
297
293
  throw new TypeError('"expectedIssuer" must be an instance of URL');
298
- if (!Z(e, Response))
294
+ if (!V(e, Response))
299
295
  throw new TypeError('"response" must be an instance of Response');
300
296
  if (e.status !== 200)
301
- throw new s('"response" is not a conform Authorization Server Metadata response');
302
- ee(e);
297
+ throw new a('"response" is not a conform Authorization Server Metadata response');
298
+ X(e);
303
299
  let n;
304
300
  try {
305
301
  n = await e.json();
306
302
  } catch (o) {
307
- throw new s('failed to parse "response" body as JSON', { cause: o });
303
+ throw new a('failed to parse "response" body as JSON', { cause: o });
308
304
  }
309
- if (!C(n))
310
- throw new s('"response" body must be a top level object');
305
+ if (!x(n))
306
+ throw new a('"response" body must be a top level object');
311
307
  if (!w(n.issuer))
312
- throw new s('"response" body "issuer" property must be a non-empty string');
308
+ throw new a('"response" body "issuer" property must be a non-empty string');
313
309
  if (new URL(n.issuer).href !== t.href)
314
- throw new s('"response" body "issuer" does not match "expectedIssuer"');
310
+ throw new a('"response" body "issuer" does not match "expectedIssuer"');
315
311
  return n;
316
312
  }
317
- function H() {
318
- return A(crypto.getRandomValues(new Uint8Array(32)));
313
+ function Y() {
314
+ return T(crypto.getRandomValues(new Uint8Array(32)));
319
315
  }
320
- function et() {
321
- return H();
316
+ function Xe() {
317
+ return Y();
322
318
  }
323
- function tt() {
324
- return H();
319
+ function et() {
320
+ return Y();
325
321
  }
326
- async function nt(t) {
322
+ async function tt(t) {
327
323
  if (!w(t))
328
324
  throw new TypeError('"codeVerifier" must be a non-empty string');
329
- return A(await crypto.subtle.digest("SHA-256", E(t)));
325
+ return T(await crypto.subtle.digest("SHA-256", k(t)));
330
326
  }
331
- function rt(t) {
332
- if (t instanceof CryptoKey)
333
- return { key: t };
334
- if (!((t == null ? void 0 : t.key) instanceof CryptoKey))
335
- return {};
336
- if (t.kid !== void 0 && !w(t.kid))
337
- throw new TypeError('"kid" must be a non-empty string');
338
- return {
339
- key: t.key,
340
- kid: t.kid,
341
- modifyAssertion: t[we]
342
- };
343
- }
344
- function ae(t) {
327
+ function se(t) {
345
328
  return encodeURIComponent(t).replace(/%20/g, "+");
346
329
  }
347
- function ot(t, e) {
348
- const n = ae(t), o = ae(e);
330
+ function nt(t, e) {
331
+ const n = se(t), o = se(e);
349
332
  return `Basic ${btoa(`${n}:${o}`)}`;
350
333
  }
351
- function it(t) {
334
+ function rt(t) {
352
335
  switch (t.algorithm.hash.name) {
353
336
  case "SHA-256":
354
337
  return "PS256";
@@ -357,10 +340,10 @@ function it(t) {
357
340
  case "SHA-512":
358
341
  return "PS512";
359
342
  default:
360
- throw new S("unsupported RsaHashedKeyAlgorithm hash name");
343
+ throw new v("unsupported RsaHashedKeyAlgorithm hash name");
361
344
  }
362
345
  }
363
- function at(t) {
346
+ function ot(t) {
364
347
  switch (t.algorithm.hash.name) {
365
348
  case "SHA-256":
366
349
  return "RS256";
@@ -369,10 +352,10 @@ function at(t) {
369
352
  case "SHA-512":
370
353
  return "RS512";
371
354
  default:
372
- throw new S("unsupported RsaHashedKeyAlgorithm hash name");
355
+ throw new v("unsupported RsaHashedKeyAlgorithm hash name");
373
356
  }
374
357
  }
375
- function st(t) {
358
+ function it(t) {
376
359
  switch (t.algorithm.namedCurve) {
377
360
  case "P-256":
378
361
  return "ES256";
@@ -381,52 +364,36 @@ function st(t) {
381
364
  case "P-521":
382
365
  return "ES512";
383
366
  default:
384
- throw new S("unsupported EcKeyAlgorithm namedCurve");
367
+ throw new v("unsupported EcKeyAlgorithm namedCurve");
385
368
  }
386
369
  }
387
- function be(t) {
370
+ function st(t) {
388
371
  switch (t.algorithm.name) {
389
372
  case "RSA-PSS":
390
- return it(t);
373
+ return rt(t);
391
374
  case "RSASSA-PKCS1-v1_5":
392
- return at(t);
375
+ return ot(t);
393
376
  case "ECDSA":
394
- return st(t);
377
+ return it(t);
395
378
  case "Ed25519":
396
379
  case "Ed448":
397
380
  return "EdDSA";
398
381
  default:
399
- throw new S("unsupported CryptoKey algorithm name");
382
+ throw new v("unsupported CryptoKey algorithm name");
400
383
  }
401
384
  }
402
- function L(t) {
403
- const e = t == null ? void 0 : t[K];
385
+ function W(t) {
386
+ const e = t?.[D];
404
387
  return typeof e == "number" && Number.isFinite(e) ? e : 0;
405
388
  }
406
- function _e(t) {
407
- const e = t == null ? void 0 : t[He];
389
+ function we(t) {
390
+ const e = t?.[De];
408
391
  return typeof e == "number" && Number.isFinite(e) && Math.sign(e) !== -1 ? e : 30;
409
392
  }
410
- function $() {
393
+ function Q() {
411
394
  return Math.floor(Date.now() / 1e3);
412
395
  }
413
- function ct(t, e) {
414
- const n = $() + L(e);
415
- return {
416
- jti: H(),
417
- aud: [t.issuer, t.token_endpoint],
418
- exp: n + 60,
419
- iat: n,
420
- nbf: n,
421
- iss: e.client_id,
422
- sub: e.client_id
423
- };
424
- }
425
- async function ut(t, e, n, o, a) {
426
- const r = { alg: be(n), kid: o }, i = ct(t, e);
427
- return a == null || a(r, i), ve(r, i, n);
428
- }
429
- function x(t) {
396
+ function C(t) {
430
397
  if (typeof t != "object" || t === null)
431
398
  throw new TypeError('"as" must be an object');
432
399
  if (!w(t.issuer))
@@ -440,236 +407,224 @@ function I(t) {
440
407
  throw new TypeError('"client.client_id" property must be a non-empty string');
441
408
  return !0;
442
409
  }
443
- function se(t) {
410
+ function ae(t) {
444
411
  if (!w(t))
445
412
  throw new TypeError('"client.client_secret" property must be a non-empty string');
446
413
  return t;
447
414
  }
448
- function M(t, e) {
449
- if (e !== void 0)
450
- throw new TypeError(`"options.clientPrivateKey" property must not be provided when ${t} client authentication method is used.`);
451
- }
452
415
  function ce(t, e) {
453
416
  if (e !== void 0)
454
417
  throw new TypeError(`"client.client_secret" property must not be provided when ${t} client authentication method is used.`);
455
418
  }
456
- async function lt(t, e, n, o, a) {
419
+ async function at(t, e, n, o, s) {
457
420
  switch (n.delete("client_secret"), n.delete("client_assertion_type"), n.delete("client_assertion"), e.token_endpoint_auth_method) {
458
421
  case void 0:
459
422
  case "client_secret_basic": {
460
- M("client_secret_basic", a), o.set("authorization", ot(e.client_id, se(e.client_secret)));
423
+ o.set("authorization", nt(e.client_id, ae(e.client_secret)));
461
424
  break;
462
425
  }
463
426
  case "client_secret_post": {
464
- M("client_secret_post", a), n.set("client_id", e.client_id), n.set("client_secret", se(e.client_secret));
465
- break;
466
- }
467
- case "private_key_jwt": {
468
- if (ce("private_key_jwt", e.client_secret), a === void 0)
469
- throw new TypeError('"options.clientPrivateKey" must be provided when "client.token_endpoint_auth_method" is "private_key_jwt"');
470
- const { key: r, kid: i, modifyAssertion: c } = rt(a);
471
- if (!ye(r))
472
- throw new TypeError('"options.clientPrivateKey.key" must be a private CryptoKey');
473
- n.set("client_id", e.client_id), n.set("client_assertion_type", "urn:ietf:params:oauth:client-assertion-type:jwt-bearer"), n.set("client_assertion", await ut(t, e, r, i, c));
427
+ n.set("client_id", e.client_id), n.set("client_secret", ae(e.client_secret));
474
428
  break;
475
429
  }
430
+ case "private_key_jwt":
431
+ throw ce("private_key_jwt", e.client_secret), new TypeError('"options.clientPrivateKey" must be provided when "client.token_endpoint_auth_method" is "private_key_jwt"');
476
432
  case "tls_client_auth":
477
433
  case "self_signed_tls_client_auth":
478
434
  case "none": {
479
- ce(e.token_endpoint_auth_method, e.client_secret), M(e.token_endpoint_auth_method, a), n.set("client_id", e.client_id);
435
+ ce(e.token_endpoint_auth_method, e.client_secret), e.token_endpoint_auth_method, n.set("client_id", e.client_id);
480
436
  break;
481
437
  }
482
438
  default:
483
- throw new S("unsupported client token_endpoint_auth_method");
439
+ throw new v("unsupported client token_endpoint_auth_method");
484
440
  }
485
441
  }
486
- async function ve(t, e, n) {
442
+ async function ct(t, e, n) {
487
443
  if (!n.usages.includes("sign"))
488
444
  throw new TypeError('CryptoKey instances used for signing assertions must include "sign" in their "usages"');
489
- const o = `${A(E(JSON.stringify(t)))}.${A(E(JSON.stringify(e)))}`, a = A(await crypto.subtle.sign(Pe(n), n, E(o)));
490
- return `${o}.${a}`;
445
+ const o = `${T(k(JSON.stringify(t)))}.${T(k(JSON.stringify(e)))}`, s = T(await crypto.subtle.sign(Se(n), n, k(o)));
446
+ return `${o}.${s}`;
491
447
  }
492
- async function dt(t, e, n, o, a, r) {
493
- var T;
494
- const { privateKey: i, publicKey: c, nonce: p = me.get(n.origin) } = e;
495
- if (!ye(i))
448
+ async function ut(t, e, n, o, s, r) {
449
+ const { privateKey: i, publicKey: c, nonce: f = fe.get(n.origin) } = e;
450
+ if (!Ve(i))
496
451
  throw new TypeError('"DPoP.privateKey" must be a private CryptoKey');
497
- if (!Ye(c))
452
+ if (!Ge(c))
498
453
  throw new TypeError('"DPoP.publicKey" must be a public CryptoKey');
499
- if (p !== void 0 && !w(p))
454
+ if (f !== void 0 && !w(f))
500
455
  throw new TypeError('"DPoP.nonce" must be a non-empty string or undefined');
501
456
  if (!c.extractable)
502
457
  throw new TypeError('"DPoP.publicKey.extractable" must be true');
503
- const _ = $() + a, f = {
504
- alg: be(i),
458
+ const y = Q() + s, p = {
459
+ alg: st(i),
505
460
  typ: "dpop+jwt",
506
- jwk: await ft(c)
507
- }, y = {
508
- iat: _,
509
- jti: H(),
461
+ jwk: await dt(c)
462
+ }, A = {
463
+ iat: y,
464
+ jti: Y(),
510
465
  htm: o,
511
- nonce: p,
466
+ nonce: f,
512
467
  htu: `${n.origin}${n.pathname}`,
513
- ath: r ? A(await crypto.subtle.digest("SHA-256", E(r))) : void 0
468
+ ath: r ? T(await crypto.subtle.digest("SHA-256", k(r))) : void 0
514
469
  };
515
- (T = e[we]) == null || T.call(e, f, y), t.set("dpop", await ve(f, y, i));
470
+ e[Ne]?.(p, A), t.set("dpop", await ct(p, A, i));
516
471
  }
517
- let N;
518
- async function ht(t) {
519
- const { kty: e, e: n, n: o, x: a, y: r, crv: i } = await crypto.subtle.exportKey("jwk", t), c = { kty: e, e: n, n: o, x: a, y: r, crv: i };
520
- return N.set(t, c), c;
472
+ let J;
473
+ async function lt(t) {
474
+ const { kty: e, e: n, n: o, x: s, y: r, crv: i } = await crypto.subtle.exportKey("jwk", t), c = { kty: e, e: n, n: o, x: s, y: r, crv: i };
475
+ return J.set(t, c), c;
521
476
  }
522
- async function ft(t) {
523
- return N || (N = /* @__PURE__ */ new WeakMap()), N.get(t) || ht(t);
477
+ async function dt(t) {
478
+ return J || (J = /* @__PURE__ */ new WeakMap()), J.get(t) || lt(t);
524
479
  }
525
480
  function ue(t, e, n) {
526
481
  if (typeof t != "string")
527
482
  throw n ? new TypeError(`"as.mtls_endpoint_aliases.${e}" must be a string`) : new TypeError(`"as.${e}" must be a string`);
528
483
  return new URL(t);
529
484
  }
530
- function Se(t, e, n = !1) {
485
+ function me(t, e, n = !1) {
531
486
  return n && t.mtls_endpoint_aliases && e in t.mtls_endpoint_aliases ? ue(t.mtls_endpoint_aliases[e], e, n) : ue(t[e], e, n);
532
487
  }
533
- function Te(t, e) {
534
- return !!(t.use_mtls_endpoint_aliases || e != null && e[Fe]);
488
+ function ge(t, e) {
489
+ return !!(t.use_mtls_endpoint_aliases || e?.[Ke]);
535
490
  }
536
- function G(t) {
491
+ function q(t) {
537
492
  const e = t;
538
493
  return typeof e != "object" || Array.isArray(e) || e === null ? !1 : e.error !== void 0;
539
494
  }
540
- async function pt(t, e, n, o, a, r) {
495
+ async function ht(t, e, n, o, s, r) {
541
496
  if (!w(t))
542
497
  throw new TypeError('"accessToken" must be a non-empty string');
543
498
  if (!(n instanceof URL))
544
499
  throw new TypeError('"url" must be an instance of URL');
545
- return o = W(o), (r == null ? void 0 : r.DPoP) === void 0 ? o.set("authorization", `Bearer ${t}`) : (await dt(o, r.DPoP, n, e.toUpperCase(), L({ [K]: r == null ? void 0 : r[K] }), t), o.set("authorization", `DPoP ${t}`)), ((r == null ? void 0 : r[Y]) || fetch)(n.href, {
546
- body: a,
500
+ return o = N(o), r?.DPoP === void 0 ? o.set("authorization", `Bearer ${t}`) : (await ut(o, r.DPoP, n, e.toUpperCase(), W({ [D]: r?.[D] }), t), o.set("authorization", `DPoP ${t}`)), (r?.[G] || fetch)(n.href, {
501
+ body: s,
547
502
  headers: Object.fromEntries(o.entries()),
548
503
  method: e,
549
504
  redirect: "manual",
550
- signal: r != null && r.signal ? X(r.signal) : null
551
- }).then(Q);
505
+ signal: r?.signal ? Ze(r.signal) : null
506
+ }).then(Z);
552
507
  }
553
- async function wt(t, e, n, o) {
554
- x(t), I(e);
555
- const a = Se(t, "userinfo_endpoint", Te(e, o)), r = W(o == null ? void 0 : o.headers);
556
- return e.userinfo_signed_response_alg ? r.set("accept", "application/jwt") : (r.set("accept", "application/json"), r.append("accept", "application/jwt")), pt(n, "GET", a, r, null, {
508
+ async function ft(t, e, n, o) {
509
+ C(t), I(e);
510
+ const s = me(t, "userinfo_endpoint", ge(e, o)), r = N(o?.headers);
511
+ return e.userinfo_signed_response_alg ? r.set("accept", "application/jwt") : (r.set("accept", "application/json"), r.append("accept", "application/jwt")), ht(n, "GET", s, r, null, {
557
512
  ...o,
558
- [K]: L(e)
513
+ [D]: W(e)
559
514
  });
560
515
  }
561
- async function mt(t, e, n, o, a, r, i) {
562
- return await lt(t, e, a, r, i == null ? void 0 : i.clientPrivateKey), r.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"), ((i == null ? void 0 : i[Y]) || fetch)(o.href, {
563
- body: a,
516
+ async function pt(t, e, n, o, s, r, i) {
517
+ return await at(t, e, s, r), r.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"), (i?.[G] || fetch)(o.href, {
518
+ body: s,
564
519
  headers: Object.fromEntries(r.entries()),
565
520
  method: n,
566
521
  redirect: "manual",
567
- signal: i != null && i.signal ? X(i.signal) : null
568
- }).then(Q);
522
+ signal: null
523
+ }).then(Z);
569
524
  }
570
- async function ke(t, e, n, o, a) {
571
- const r = Se(t, "token_endpoint", Te(e, a));
525
+ async function ye(t, e, n, o, s) {
526
+ const r = me(t, "token_endpoint", ge(e, s));
572
527
  o.set("grant_type", n);
573
- const i = W(a == null ? void 0 : a.headers);
574
- return i.set("accept", "application/json"), mt(t, e, "POST", r, o, i, a);
528
+ const i = N(s?.headers);
529
+ return i.set("accept", "application/json"), pt(t, e, "POST", r, o, i, s);
575
530
  }
576
- async function gt(t, e, n, o) {
577
- if (x(t), I(e), !w(n))
531
+ async function wt(t, e, n, o) {
532
+ if (C(t), I(e), !w(n))
578
533
  throw new TypeError('"refreshToken" must be a non-empty string');
579
- const a = new URLSearchParams(o == null ? void 0 : o.additionalParameters);
580
- return a.set("refresh_token", n), ke(t, e, "refresh_token", a, o);
534
+ const s = new URLSearchParams(o?.additionalParameters);
535
+ return s.set("refresh_token", n), ye(t, e, "refresh_token", s, o);
581
536
  }
582
- const Ae = /* @__PURE__ */ new WeakMap();
583
- function yt(t) {
537
+ const be = /* @__PURE__ */ new WeakMap();
538
+ function mt(t) {
584
539
  if (!t.id_token)
585
540
  return;
586
- const e = Ae.get(t);
541
+ const e = be.get(t);
587
542
  if (!e)
588
543
  throw new TypeError('"ref" was already garbage collected or did not resolve from the proper sources');
589
544
  return e[0];
590
545
  }
591
- async function Ee(t, e, n, o = !1, a = !1) {
592
- if (x(t), I(e), !Z(n, Response))
546
+ async function _e(t, e, n, o = !1, s = !1) {
547
+ if (C(t), I(e), !V(n, Response))
593
548
  throw new TypeError('"response" must be an instance of Response');
594
549
  if (n.status !== 200) {
595
550
  let i;
596
- if (i = await Pt(n))
551
+ if (i = await Et(n))
597
552
  return i;
598
- throw new s('"response" is not a conform Token Endpoint response');
553
+ throw new a('"response" is not a conform Token Endpoint response');
599
554
  }
600
- ee(n);
555
+ X(n);
601
556
  let r;
602
557
  try {
603
558
  r = await n.json();
604
559
  } catch (i) {
605
- throw new s('failed to parse "response" body as JSON', { cause: i });
560
+ throw new a('failed to parse "response" body as JSON', { cause: i });
606
561
  }
607
- if (!C(r))
608
- throw new s('"response" body must be a top level object');
562
+ if (!x(r))
563
+ throw new a('"response" body must be a top level object');
609
564
  if (!w(r.access_token))
610
- throw new s('"response" body "access_token" property must be a non-empty string');
565
+ throw new a('"response" body "access_token" property must be a non-empty string');
611
566
  if (!w(r.token_type))
612
- throw new s('"response" body "token_type" property must be a non-empty string');
567
+ throw new a('"response" body "token_type" property must be a non-empty string');
613
568
  if (r.token_type = r.token_type.toLowerCase(), r.token_type !== "dpop" && r.token_type !== "bearer")
614
- throw new S("unsupported `token_type` value");
569
+ throw new v("unsupported `token_type` value");
615
570
  if (r.expires_in !== void 0 && (typeof r.expires_in != "number" || r.expires_in <= 0))
616
- throw new s('"response" body "expires_in" property must be a positive number');
617
- if (!a && r.refresh_token !== void 0 && !w(r.refresh_token))
618
- throw new s('"response" body "refresh_token" property must be a non-empty string');
571
+ throw new a('"response" body "expires_in" property must be a positive number');
572
+ if (!s && r.refresh_token !== void 0 && !w(r.refresh_token))
573
+ throw new a('"response" body "refresh_token" property must be a non-empty string');
619
574
  if (r.scope !== void 0 && typeof r.scope != "string")
620
- throw new s('"response" body "scope" property must be a string');
575
+ throw new a('"response" body "scope" property must be a string');
621
576
  if (!o) {
622
577
  if (r.id_token !== void 0 && !w(r.id_token))
623
- throw new s('"response" body "id_token" property must be a non-empty string');
578
+ throw new a('"response" body "id_token" property must be a non-empty string');
624
579
  if (r.id_token) {
625
- const { claims: i, jwt: c } = await Lt(r.id_token, xt.bind(void 0, e.id_token_signed_response_alg, t.id_token_signing_alg_values_supported), Ue, L(e), _e(e), e[$e]).then(At.bind(void 0, ["aud", "exp", "iat", "iss", "sub"])).then(vt.bind(void 0, t.issuer)).then(_t.bind(void 0, e.client_id));
580
+ const { claims: i, jwt: c } = await Ut(r.id_token, Lt.bind(void 0, e.id_token_signed_response_alg, t.id_token_signing_alg_values_supported), Te, W(e), we(e), e[We]).then(Tt.bind(void 0, ["aud", "exp", "iat", "iss", "sub"])).then(bt.bind(void 0, t.issuer)).then(yt.bind(void 0, e.client_id));
626
581
  if (Array.isArray(i.aud) && i.aud.length !== 1) {
627
582
  if (i.azp === void 0)
628
- throw new s('ID Token "aud" (audience) claim includes additional untrusted audiences');
583
+ throw new a('ID Token "aud" (audience) claim includes additional untrusted audiences');
629
584
  if (i.azp !== e.client_id)
630
- throw new s('unexpected ID Token "azp" (authorized party) claim value');
585
+ throw new a('unexpected ID Token "azp" (authorized party) claim value');
631
586
  }
632
587
  if (i.auth_time !== void 0 && (!Number.isFinite(i.auth_time) || Math.sign(i.auth_time) !== 1))
633
- throw new s('ID Token "auth_time" (authentication time) must be a positive number');
634
- Ae.set(r, [i, c]);
588
+ throw new a('ID Token "auth_time" (authentication time) must be a positive number');
589
+ be.set(r, [i, c]);
635
590
  }
636
591
  }
637
592
  return r;
638
593
  }
639
- async function bt(t, e, n) {
640
- return Ee(t, e, n);
594
+ async function gt(t, e, n) {
595
+ return _e(t, e, n);
641
596
  }
642
- function _t(t, e) {
597
+ function yt(t, e) {
643
598
  if (Array.isArray(e.claims.aud)) {
644
599
  if (!e.claims.aud.includes(t))
645
- throw new s('unexpected JWT "aud" (audience) claim value');
600
+ throw new a('unexpected JWT "aud" (audience) claim value');
646
601
  } else if (e.claims.aud !== t)
647
- throw new s('unexpected JWT "aud" (audience) claim value');
602
+ throw new a('unexpected JWT "aud" (audience) claim value');
648
603
  return e;
649
604
  }
650
- function vt(t, e) {
605
+ function bt(t, e) {
651
606
  if (e.claims.iss !== t)
652
- throw new s('unexpected JWT "iss" (issuer) claim value');
607
+ throw new a('unexpected JWT "iss" (issuer) claim value');
653
608
  return e;
654
609
  }
655
- const Re = /* @__PURE__ */ new WeakSet();
656
- function St(t) {
657
- return Re.add(t), t;
610
+ const ve = /* @__PURE__ */ new WeakSet();
611
+ function _t(t) {
612
+ return ve.add(t), t;
658
613
  }
659
- async function Tt(t, e, n, o, a, r) {
660
- if (x(t), I(e), !Re.has(n))
614
+ async function vt(t, e, n, o, s, r) {
615
+ if (C(t), I(e), !ve.has(n))
661
616
  throw new TypeError('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()');
662
617
  if (!w(o))
663
618
  throw new TypeError('"redirectUri" must be a non-empty string');
664
- if (!w(a))
619
+ if (!w(s))
665
620
  throw new TypeError('"codeVerifier" must be a non-empty string');
666
- const i = k(n, "code");
621
+ const i = S(n, "code");
667
622
  if (!i)
668
- throw new s('no authorization code in "callbackParameters"');
669
- const c = new URLSearchParams(r == null ? void 0 : r.additionalParameters);
670
- return c.set("redirect_uri", o), c.set("code_verifier", a), c.set("code", i), ke(t, e, "authorization_code", c, r);
623
+ throw new a('no authorization code in "callbackParameters"');
624
+ const c = new URLSearchParams(r?.additionalParameters);
625
+ return c.set("redirect_uri", o), c.set("code_verifier", s), c.set("code", i), ye(t, e, "authorization_code", c, r);
671
626
  }
672
- const kt = {
627
+ const St = {
673
628
  aud: "audience",
674
629
  c_hash: "code hash",
675
630
  client_id: "client id",
@@ -685,56 +640,56 @@ const kt = {
685
640
  htu: "http uri",
686
641
  cnf: "confirmation"
687
642
  };
688
- function At(t, e) {
643
+ function Tt(t, e) {
689
644
  for (const n of t)
690
645
  if (e.claims[n] === void 0)
691
- throw new s(`JWT "${n}" (${kt[n]}) claim missing`);
646
+ throw new a(`JWT "${n}" (${St[n]}) claim missing`);
692
647
  return e;
693
648
  }
694
- const Et = Symbol(), B = Symbol();
695
- async function Rt(t, e, n, o, a) {
696
- const r = await Ee(t, e, n);
697
- if (G(r))
649
+ const At = Symbol(), H = Symbol();
650
+ async function kt(t, e, n, o, s) {
651
+ const r = await _e(t, e, n);
652
+ if (q(r))
698
653
  return r;
699
654
  if (!w(r.id_token))
700
- throw new s('"response" body "id_token" property must be a non-empty string');
701
- a ?? (a = e.default_max_age ?? B);
702
- const i = yt(r);
703
- if ((e.require_auth_time || a !== B) && i.auth_time === void 0)
704
- throw new s('ID Token "auth_time" (authentication time) claim missing');
705
- if (a !== B) {
706
- if (typeof a != "number" || a < 0)
655
+ throw new a('"response" body "id_token" property must be a non-empty string');
656
+ s ?? (s = e.default_max_age ?? H);
657
+ const i = mt(r);
658
+ if ((e.require_auth_time || s !== H) && i.auth_time === void 0)
659
+ throw new a('ID Token "auth_time" (authentication time) claim missing');
660
+ if (s !== H) {
661
+ if (typeof s != "number" || s < 0)
707
662
  throw new TypeError('"maxAge" must be a non-negative number');
708
- const c = $() + L(e), p = _e(e);
709
- if (i.auth_time + a < c - p)
710
- throw new s("too much time has elapsed since the last End-User authentication");
663
+ const c = Q() + W(e), f = we(e);
664
+ if (i.auth_time + s < c - f)
665
+ throw new a("too much time has elapsed since the last End-User authentication");
711
666
  }
712
667
  switch (o) {
713
668
  case void 0:
714
- case Et:
669
+ case At:
715
670
  if (i.nonce !== void 0)
716
- throw new s('unexpected ID Token "nonce" claim value');
671
+ throw new a('unexpected ID Token "nonce" claim value');
717
672
  break;
718
673
  default:
719
674
  if (!w(o))
720
675
  throw new TypeError('"expectedNonce" must be a non-empty string');
721
676
  if (i.nonce === void 0)
722
- throw new s('ID Token "nonce" claim missing');
677
+ throw new a('ID Token "nonce" claim missing');
723
678
  if (i.nonce !== o)
724
- throw new s('unexpected ID Token "nonce" claim value');
679
+ throw new a('unexpected ID Token "nonce" claim value');
725
680
  }
726
681
  return r;
727
682
  }
728
- function ee(t) {
683
+ function X(t) {
729
684
  if (t.bodyUsed)
730
685
  throw new TypeError('"response" body has been used already');
731
686
  }
732
- async function Pt(t) {
687
+ async function Et(t) {
733
688
  if (t.status > 399 && t.status < 500) {
734
- ee(t);
689
+ X(t);
735
690
  try {
736
691
  const e = await t.json();
737
- if (C(e) && typeof e.error == "string" && e.error.length)
692
+ if (x(e) && typeof e.error == "string" && e.error.length)
738
693
  return e.error_description !== void 0 && typeof e.error_description != "string" && delete e.error_description, e.error_uri !== void 0 && typeof e.error_uri != "string" && delete e.error_uri, e.algs !== void 0 && typeof e.algs != "string" && delete e.algs, e.scope !== void 0 && typeof e.scope != "string" && delete e.scope, e;
739
694
  } catch {
740
695
  }
@@ -742,9 +697,9 @@ async function Pt(t) {
742
697
  }
743
698
  function le(t) {
744
699
  if (typeof t.modulusLength != "number" || t.modulusLength < 2048)
745
- throw new s(`${t.name} modulusLength must be at least 2048 bits`);
700
+ throw new a(`${t.name} modulusLength must be at least 2048 bits`);
746
701
  }
747
- function Ut(t) {
702
+ function Rt(t) {
748
703
  switch (t) {
749
704
  case "P-256":
750
705
  return "SHA-256";
@@ -753,15 +708,15 @@ function Ut(t) {
753
708
  case "P-521":
754
709
  return "SHA-512";
755
710
  default:
756
- throw new S();
711
+ throw new v();
757
712
  }
758
713
  }
759
- function Pe(t) {
714
+ function Se(t) {
760
715
  switch (t.algorithm.name) {
761
716
  case "ECDSA":
762
717
  return {
763
718
  name: t.algorithm.name,
764
- hash: Ut(t.algorithm.namedCurve)
719
+ hash: Rt(t.algorithm.namedCurve)
765
720
  };
766
721
  case "RSA-PSS":
767
722
  switch (le(t.algorithm), t.algorithm.hash.name) {
@@ -773,7 +728,7 @@ function Pe(t) {
773
728
  saltLength: parseInt(t.algorithm.hash.name.slice(-3), 10) >> 3
774
729
  };
775
730
  default:
776
- throw new S();
731
+ throw new v();
777
732
  }
778
733
  case "RSASSA-PKCS1-v1_5":
779
734
  return le(t.algorithm), t.algorithm.name;
@@ -781,259 +736,205 @@ function Pe(t) {
781
736
  case "Ed25519":
782
737
  return t.algorithm.name;
783
738
  }
784
- throw new S();
739
+ throw new v();
785
740
  }
786
- const Ue = Symbol();
787
- async function Ct(t, e, n, o) {
788
- const a = `${t}.${e}`;
789
- if (!await crypto.subtle.verify(Pe(n), n, o, E(a)))
790
- throw new s("JWT signature verification failed");
741
+ const Te = Symbol();
742
+ async function Pt(t, e, n, o) {
743
+ const s = `${t}.${e}`;
744
+ if (!await crypto.subtle.verify(Se(n), n, o, k(s)))
745
+ throw new a("JWT signature verification failed");
791
746
  }
792
- async function Lt(t, e, n, o, a, r) {
793
- let { 0: i, 1: c, 2: p, length: _ } = t.split(".");
794
- if (_ === 5)
747
+ async function Ut(t, e, n, o, s, r) {
748
+ let { 0: i, 1: c, 2: f, length: y } = t.split(".");
749
+ if (y === 5)
795
750
  if (r !== void 0)
796
- t = await r(t), { 0: i, 1: c, 2: p, length: _ } = t.split(".");
751
+ t = await r(t), { 0: i, 1: c, 2: f, length: y } = t.split(".");
797
752
  else
798
- throw new S("JWE structure JWTs are not supported");
799
- if (_ !== 3)
800
- throw new s("Invalid JWT");
801
- let f;
753
+ throw new v("JWE structure JWTs are not supported");
754
+ if (y !== 3)
755
+ throw new a("Invalid JWT");
756
+ let p;
802
757
  try {
803
- f = JSON.parse(E(A(i)));
758
+ p = JSON.parse(k(T(i)));
804
759
  } catch (l) {
805
- throw new s("failed to parse JWT Header body as base64url encoded JSON", { cause: l });
760
+ throw new a("failed to parse JWT Header body as base64url encoded JSON", { cause: l });
806
761
  }
807
- if (!C(f))
808
- throw new s("JWT Header must be a top level object");
809
- if (e(f), f.crit !== void 0)
810
- throw new s('unexpected JWT "crit" header parameter');
811
- const y = A(p);
812
- let T;
813
- n !== Ue && (T = await n(f), await Ct(i, c, T, y));
762
+ if (!x(p))
763
+ throw new a("JWT Header must be a top level object");
764
+ if (e(p), p.crit !== void 0)
765
+ throw new a('unexpected JWT "crit" header parameter');
766
+ const A = T(f);
767
+ let b;
768
+ n !== Te && (b = await n(p), await Pt(i, c, b, A));
814
769
  let h;
815
770
  try {
816
- h = JSON.parse(E(A(c)));
771
+ h = JSON.parse(k(T(c)));
817
772
  } catch (l) {
818
- throw new s("failed to parse JWT Payload body as base64url encoded JSON", { cause: l });
773
+ throw new a("failed to parse JWT Payload body as base64url encoded JSON", { cause: l });
819
774
  }
820
- if (!C(h))
821
- throw new s("JWT Payload must be a top level object");
822
- const j = $() + o;
775
+ if (!x(h))
776
+ throw new a("JWT Payload must be a top level object");
777
+ const R = Q() + o;
823
778
  if (h.exp !== void 0) {
824
779
  if (typeof h.exp != "number")
825
- throw new s('unexpected JWT "exp" (expiration time) claim type');
826
- if (h.exp <= j - a)
827
- throw new s('unexpected JWT "exp" (expiration time) claim value, timestamp is <= now()');
780
+ throw new a('unexpected JWT "exp" (expiration time) claim type');
781
+ if (h.exp <= R - s)
782
+ throw new a('unexpected JWT "exp" (expiration time) claim value, timestamp is <= now()');
828
783
  }
829
784
  if (h.iat !== void 0 && typeof h.iat != "number")
830
- throw new s('unexpected JWT "iat" (issued at) claim type');
785
+ throw new a('unexpected JWT "iat" (issued at) claim type');
831
786
  if (h.iss !== void 0 && typeof h.iss != "string")
832
- throw new s('unexpected JWT "iss" (issuer) claim type');
787
+ throw new a('unexpected JWT "iss" (issuer) claim type');
833
788
  if (h.nbf !== void 0) {
834
789
  if (typeof h.nbf != "number")
835
- throw new s('unexpected JWT "nbf" (not before) claim type');
836
- if (h.nbf > j + a)
837
- throw new s('unexpected JWT "nbf" (not before) claim value, timestamp is > now()');
790
+ throw new a('unexpected JWT "nbf" (not before) claim type');
791
+ if (h.nbf > R + s)
792
+ throw new a('unexpected JWT "nbf" (not before) claim value, timestamp is > now()');
838
793
  }
839
794
  if (h.aud !== void 0 && typeof h.aud != "string" && !Array.isArray(h.aud))
840
- throw new s('unexpected JWT "aud" (audience) claim type');
841
- return { header: f, claims: h, signature: y, key: T, jwt: t };
795
+ throw new a('unexpected JWT "aud" (audience) claim type');
796
+ return { header: p, claims: h, signature: A, key: b, jwt: t };
842
797
  }
843
- function xt(t, e, n) {
798
+ function Lt(t, e, n) {
844
799
  if (t !== void 0) {
845
800
  if (n.alg !== t)
846
- throw new s('unexpected JWT "alg" header parameter');
801
+ throw new a('unexpected JWT "alg" header parameter');
847
802
  return;
848
803
  }
849
804
  if (Array.isArray(e)) {
850
805
  if (!e.includes(n.alg))
851
- throw new s('unexpected JWT "alg" header parameter');
806
+ throw new a('unexpected JWT "alg" header parameter');
852
807
  return;
853
808
  }
854
809
  if (n.alg !== "RS256")
855
- throw new s('unexpected JWT "alg" header parameter');
810
+ throw new a('unexpected JWT "alg" header parameter');
856
811
  }
857
- function k(t, e) {
812
+ function S(t, e) {
858
813
  const { 0: n, length: o } = t.getAll(e);
859
814
  if (o > 1)
860
- throw new s(`"${e}" parameter must be provided only once`);
815
+ throw new a(`"${e}" parameter must be provided only once`);
861
816
  return n;
862
817
  }
863
- const It = Symbol(), jt = Symbol();
864
- function Jt(t, e, n, o) {
865
- if (x(t), I(e), n instanceof URL && (n = n.searchParams), !(n instanceof URLSearchParams))
818
+ const xt = Symbol(), Ct = Symbol();
819
+ function It(t, e, n, o) {
820
+ if (C(t), I(e), n instanceof URL && (n = n.searchParams), !(n instanceof URLSearchParams))
866
821
  throw new TypeError('"parameters" must be an instance of URLSearchParams, or URL');
867
- if (k(n, "response"))
868
- throw new s('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()');
869
- const a = k(n, "iss"), r = k(n, "state");
870
- if (!a && t.authorization_response_iss_parameter_supported)
871
- throw new s('response parameter "iss" (issuer) missing');
872
- if (a && a !== t.issuer)
873
- throw new s('unexpected "iss" (issuer) response parameter value');
822
+ if (S(n, "response"))
823
+ throw new a('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()');
824
+ const s = S(n, "iss"), r = S(n, "state");
825
+ if (!s && t.authorization_response_iss_parameter_supported)
826
+ throw new a('response parameter "iss" (issuer) missing');
827
+ if (s && s !== t.issuer)
828
+ throw new a('unexpected "iss" (issuer) response parameter value');
874
829
  switch (o) {
875
830
  case void 0:
876
- case jt:
831
+ case Ct:
877
832
  if (r !== void 0)
878
- throw new s('unexpected "state" response parameter encountered');
833
+ throw new a('unexpected "state" response parameter encountered');
879
834
  break;
880
- case It:
835
+ case xt:
881
836
  break;
882
837
  default:
883
838
  if (!w(o))
884
- throw new s('"expectedState" must be a non-empty string');
839
+ throw new a('"expectedState" must be a non-empty string');
885
840
  if (r === void 0)
886
- throw new s('response parameter "state" missing');
841
+ throw new a('response parameter "state" missing');
887
842
  if (r !== o)
888
- throw new s('unexpected "state" response parameter value');
843
+ throw new a('unexpected "state" response parameter value');
889
844
  }
890
- const i = k(n, "error");
845
+ const i = S(n, "error");
891
846
  if (i)
892
847
  return {
893
848
  error: i,
894
- error_description: k(n, "error_description"),
895
- error_uri: k(n, "error_uri")
849
+ error_description: S(n, "error_description"),
850
+ error_uri: S(n, "error_uri")
896
851
  };
897
- const c = k(n, "id_token"), p = k(n, "token");
898
- if (c !== void 0 || p !== void 0)
899
- throw new S("implicit and hybrid flows are not supported");
900
- return St(new URLSearchParams(n));
852
+ const c = S(n, "id_token"), f = S(n, "token");
853
+ if (c !== void 0 || f !== void 0)
854
+ throw new v("implicit and hybrid flows are not supported");
855
+ return _t(new URLSearchParams(n));
856
+ }
857
+ function jt(t, e, n = "/") {
858
+ return t.startsWith(e) ? n !== "/" && t.startsWith(e + n) ? t.slice(e.length + n.length) : t.slice(e.length) : t;
901
859
  }
902
860
  function Ot({
903
861
  handleCallback: t
904
862
  }) {
905
- const e = De({
863
+ const { options: e } = je(), n = xe({
906
864
  retry: !1,
907
865
  queryKey: ["oauth-callback"],
908
866
  queryFn: async () => {
909
867
  try {
910
- return await t();
911
- } catch (n) {
912
- throw new Ne("Could not validate user", {
913
- cause: n,
868
+ return he(
869
+ jt(
870
+ await t(),
871
+ window.location.origin,
872
+ e.basePath
873
+ )
874
+ );
875
+ } catch (o) {
876
+ throw new Ue("Could not validate user", {
877
+ cause: o,
914
878
  title: "Authentication Error",
915
879
  developerHint: "Check the configuration of your authorization provider and ensure all settings such as the callback URL are configured correctly."
916
880
  });
917
881
  }
918
882
  }
919
883
  });
920
- return /* @__PURE__ */ fe.jsx(Ke, { to: e.data });
884
+ return /* @__PURE__ */ M.jsx(Ie, { to: n.data });
921
885
  }
922
- class P extends Error {
886
+ class E extends Error {
923
887
  }
924
- class de extends P {
888
+ class de extends E {
925
889
  constructor(e, n, o) {
926
890
  super(e, o), this.error = n;
927
891
  }
928
892
  }
929
- const q = "code-verifier";
930
- class zt extends ze {
931
- constructor(e, n) {
932
- super(), this.callbackUrlPath = e, this.handleCallback = n;
893
+ const $ = "code-verifier", F = "oauth-state", Ae = "/oauth/callback";
894
+ class zt extends Ce {
895
+ constructor(e) {
896
+ super(), this.handleCallback = e;
933
897
  }
934
898
  getRoutes() {
935
899
  return [
936
900
  ...super.getRoutes(),
937
901
  {
938
- path: this.callbackUrlPath,
939
- element: /* @__PURE__ */ fe.jsx(Ot, { handleCallback: this.handleCallback })
902
+ path: Ae,
903
+ element: /* @__PURE__ */ M.jsx(Le, { children: /* @__PURE__ */ M.jsx(Ot, { handleCallback: this.handleCallback }) })
940
904
  }
941
905
  ];
942
906
  }
943
907
  }
944
- class Dt {
908
+ class Jt {
909
+ client;
910
+ issuer;
911
+ authorizationServer;
912
+ callbackUrlPath;
913
+ onAuthorizationUrl;
914
+ redirectToAfterSignUp;
915
+ redirectToAfterSignIn;
916
+ redirectToAfterSignOut;
917
+ audience;
918
+ scopes;
945
919
  constructor({
946
920
  issuer: e,
947
921
  audience: n,
948
922
  clientId: o,
949
- redirectToAfterSignUp: a,
923
+ redirectToAfterSignUp: s,
950
924
  redirectToAfterSignIn: r,
951
- redirectToAfterSignOut: i
925
+ redirectToAfterSignOut: i = "/",
926
+ basePath: c,
927
+ scopes: f
952
928
  }) {
953
- b(this, "client");
954
- b(this, "issuer");
955
- b(this, "authorizationServer");
956
- b(this, "callbackUrlPath", "/oauth/callback");
957
- b(this, "logoutRedirectUrlPath", "/");
958
- b(this, "onAuthorizationUrl");
959
- b(this, "redirectToAfterSignUp");
960
- b(this, "redirectToAfterSignIn");
961
- b(this, "redirectToAfterSignOut");
962
- b(this, "audience");
963
- b(this, "signOut", async () => {
964
- z.setState({
965
- isAuthenticated: !1,
966
- isPending: !1,
967
- profile: void 0,
968
- providerData: void 0
969
- });
970
- const e = await this.getAuthServer(), n = new URL(
971
- window.location.origin + this.redirectToAfterSignOut
972
- );
973
- n.pathname = this.logoutRedirectUrlPath;
974
- let o;
975
- e.end_session_endpoint ? (o = new URL(e.end_session_endpoint), o.searchParams.set(
976
- "post_logout_redirect_uri",
977
- n.toString()
978
- )) : o = n;
979
- });
980
- b(this, "handleCallback", async () => {
981
- const e = new URL(window.location.href), n = e.searchParams.get("state"), o = sessionStorage.getItem(q);
982
- if (sessionStorage.removeItem(q), !o)
983
- throw new P("No code verifier found in state.");
984
- const a = await this.getAuthServer(), r = Jt(
985
- a,
986
- this.client,
987
- e.searchParams,
988
- n ?? void 0
989
- );
990
- if (G(r))
991
- throw oe.error("Error validating OAuth response", r), new de(
992
- "Error validating OAuth response",
993
- r
994
- );
995
- const i = new URL(e);
996
- i.pathname = this.redirectToAfterSignIn, i.search = "";
997
- const c = await Tt(
998
- a,
999
- this.client,
1000
- r,
1001
- i.toString(),
1002
- o
1003
- ), p = await Rt(
1004
- a,
1005
- this.client,
1006
- c
1007
- );
1008
- this.setTokensFromResponse(p);
1009
- const _ = await this.getAccessToken(), y = await (await wt(
1010
- a,
1011
- this.client,
1012
- _
1013
- )).json(), T = {
1014
- sub: y.sub,
1015
- email: y.email,
1016
- name: y.name,
1017
- emailVerified: y.email_verified ?? !1,
1018
- pictureUrl: y.picture
1019
- };
1020
- z.setState({
1021
- isAuthenticated: !0,
1022
- isPending: !1,
1023
- profile: T
1024
- });
1025
- const h = sessionStorage.getItem("redirect-to") ?? "/";
1026
- return sessionStorage.removeItem("redirect-to"), h;
1027
- });
1028
929
  this.client = {
1029
930
  client_id: o,
1030
931
  token_endpoint_auth_method: "none"
1031
- }, this.audience = n, this.issuer = e, this.redirectToAfterSignUp = a ?? "/", this.redirectToAfterSignIn = r ?? "/", this.redirectToAfterSignOut = i ?? "/";
932
+ }, this.audience = n, this.issuer = e, this.callbackUrlPath = he(c, Ae), this.scopes = f ?? ["openid", "profile", "email"], this.redirectToAfterSignUp = s, this.redirectToAfterSignIn = r, this.redirectToAfterSignOut = i;
1032
933
  }
1033
934
  async getAuthServer() {
1034
935
  if (!this.authorizationServer) {
1035
- const e = new URL(this.issuer), n = await Qe(e);
1036
- this.authorizationServer = await Xe(
936
+ const e = new URL(this.issuer), n = await Ye(e);
937
+ this.authorizationServer = await Qe(
1037
938
  e,
1038
939
  n
1039
940
  );
@@ -1045,88 +946,164 @@ class Dt {
1045
946
  * @param response
1046
947
  */
1047
948
  setTokensFromResponse(e) {
1048
- if (G(e))
949
+ if (q(e))
1049
950
  throw oe.error("Bad Token Response", e), new de("Bad Token Response", e);
1050
951
  if (!e.expires_in)
1051
- throw new P("No expires_in in response");
952
+ throw new E("No expires_in in response");
1052
953
  const n = {
1053
954
  accessToken: e.access_token,
1054
955
  refreshToken: e.refresh_token,
956
+ idToken: e.id_token,
1055
957
  expiresOn: new Date(Date.now() + e.expires_in * 1e3),
1056
958
  tokenType: e.token_type
1057
959
  };
1058
- z.setState({
960
+ L.setState({
1059
961
  providerData: n
1060
962
  });
1061
963
  }
1062
964
  async signUp({ redirectTo: e } = {}) {
1063
965
  return this.authorize({
1064
- redirectTo: e ?? this.redirectToAfterSignUp,
966
+ redirectTo: this.redirectToAfterSignUp ?? e ?? "/",
1065
967
  isSignUp: !0
1066
968
  });
1067
969
  }
1068
970
  async signIn({ redirectTo: e } = {}) {
1069
971
  return this.authorize({
1070
- redirectTo: e ?? this.redirectToAfterSignIn
972
+ redirectTo: this.redirectToAfterSignIn ?? e ?? "/"
1071
973
  });
1072
974
  }
1073
975
  async authorize({
1074
976
  redirectTo: e,
1075
977
  isSignUp: n = !1
1076
978
  }) {
1077
- var _, f;
1078
- const o = "S256", a = await this.getAuthServer();
1079
- if (!a.authorization_endpoint)
1080
- throw new P("No authorization endpoint");
1081
- const r = et(), i = await nt(r);
1082
- sessionStorage.setItem(q, r);
979
+ const o = "S256", s = await this.getAuthServer();
980
+ if (!s.authorization_endpoint)
981
+ throw new E("No authorization endpoint");
982
+ const r = Xe(), i = await tt(r);
983
+ sessionStorage.setItem($, r);
1083
984
  const c = new URL(
1084
- a.authorization_endpoint
985
+ s.authorization_endpoint
1085
986
  );
1086
987
  sessionStorage.setItem("redirect-to", e);
1087
- const p = new URL(window.location.origin);
1088
- if (p.pathname = this.callbackUrlPath, p.search = "", c.searchParams.set("client_id", this.client.client_id), c.searchParams.set("redirect_uri", p.toString()), c.searchParams.set("response_type", "code"), c.searchParams.set("scope", "openid profile email"), c.searchParams.set("code_challenge", i), c.searchParams.set(
988
+ const f = new URL(window.location.origin);
989
+ f.pathname = this.callbackUrlPath, f.search = "", c.searchParams.set("client_id", this.client.client_id), c.searchParams.set("redirect_uri", f.toString()), c.searchParams.set("response_type", "code"), c.searchParams.set("scope", this.scopes.join(" ")), c.searchParams.set("code_challenge", i), c.searchParams.set(
1089
990
  "code_challenge_method",
1090
991
  o
1091
- ), this.audience && c.searchParams.set("audience", this.audience), (_ = this.onAuthorizationUrl) == null || _.call(this, c, {
992
+ ), this.audience && c.searchParams.set("audience", this.audience), this.onAuthorizationUrl?.(c, {
1092
993
  isSignIn: !n,
1093
994
  isSignUp: n
1094
- }), ((f = a.code_challenge_methods_supported) == null ? void 0 : f.includes("S256")) !== !0) {
1095
- const y = tt();
1096
- c.searchParams.set("state", y);
1097
- }
1098
- location.href = c.href;
995
+ });
996
+ const y = et();
997
+ sessionStorage.setItem(F, y), c.searchParams.set("state", y), location.href = c.href;
1099
998
  }
1100
999
  async getAccessToken() {
1101
- const e = await this.getAuthServer(), { providerData: n } = z.getState();
1000
+ const e = await this.getAuthServer(), { providerData: n } = L.getState();
1102
1001
  if (!n)
1103
- throw new P("User is not authenticated");
1002
+ throw new E("User is not authenticated");
1104
1003
  const o = n;
1105
- if (o.expiresOn < /* @__PURE__ */ new Date()) {
1004
+ if (new Date(o.expiresOn) < /* @__PURE__ */ new Date()) {
1106
1005
  if (!o.refreshToken)
1107
- return await this.signIn(), "";
1108
- const a = await gt(
1006
+ return L.setState({
1007
+ isAuthenticated: !1,
1008
+ isPending: !1,
1009
+ profile: null,
1010
+ providerData: null
1011
+ }), "";
1012
+ const s = await wt(
1109
1013
  e,
1110
1014
  this.client,
1111
1015
  o.refreshToken
1112
- ), r = await bt(
1016
+ ), r = await gt(
1113
1017
  e,
1114
1018
  this.client,
1115
- a
1019
+ s
1116
1020
  );
1117
1021
  if (!r.access_token)
1118
- throw new P("No access token in response");
1022
+ throw new E("No access token in response");
1119
1023
  return this.setTokensFromResponse(r), r.access_token.toString();
1120
1024
  } else
1121
1025
  return o.accessToken;
1122
1026
  }
1027
+ signRequest = async (e) => {
1028
+ const n = await this.getAccessToken();
1029
+ return e.headers.set("Authorization", `Bearer ${n}`), e;
1030
+ };
1031
+ signOut = async () => {
1032
+ L.setState({
1033
+ isAuthenticated: !1,
1034
+ isPending: !1,
1035
+ profile: void 0,
1036
+ providerData: void 0
1037
+ });
1038
+ const e = await this.getAuthServer(), n = new URL(
1039
+ window.location.origin + this.redirectToAfterSignOut
1040
+ );
1041
+ n.pathname = this.callbackUrlPath;
1042
+ let o;
1043
+ e.end_session_endpoint ? (o = new URL(e.end_session_endpoint), o.searchParams.set(
1044
+ "post_logout_redirect_uri",
1045
+ n.toString()
1046
+ )) : o = n;
1047
+ };
1048
+ handleCallback = async () => {
1049
+ const e = new URL(window.location.href), n = e.searchParams.get("state"), o = sessionStorage.getItem(F);
1050
+ if (sessionStorage.removeItem(F), n !== o)
1051
+ throw new E("Invalid state parameter");
1052
+ const s = sessionStorage.getItem($);
1053
+ if (sessionStorage.removeItem($), !s)
1054
+ throw new E("No code verifier found in state.");
1055
+ const r = await this.getAuthServer(), i = It(
1056
+ r,
1057
+ this.client,
1058
+ e.searchParams,
1059
+ n ?? void 0
1060
+ );
1061
+ if (q(i))
1062
+ throw oe.error("Error validating OAuth response", i), new de(
1063
+ "Error validating OAuth response",
1064
+ i
1065
+ );
1066
+ const c = new URL(e);
1067
+ c.pathname = this.callbackUrlPath, c.search = "";
1068
+ const f = await vt(
1069
+ r,
1070
+ this.client,
1071
+ i,
1072
+ c.toString(),
1073
+ s
1074
+ ), y = await kt(
1075
+ r,
1076
+ this.client,
1077
+ f
1078
+ );
1079
+ this.setTokensFromResponse(y);
1080
+ const p = await this.getAccessToken(), b = await (await ft(
1081
+ r,
1082
+ this.client,
1083
+ p
1084
+ )).json(), h = {
1085
+ sub: b.sub,
1086
+ email: b.email,
1087
+ name: b.name,
1088
+ emailVerified: b.email_verified ?? !1,
1089
+ pictureUrl: b.picture
1090
+ };
1091
+ L.setState({
1092
+ isAuthenticated: !0,
1093
+ isPending: !1,
1094
+ profile: h
1095
+ });
1096
+ const R = sessionStorage.getItem("redirect-to") ?? "/";
1097
+ return sessionStorage.removeItem("redirect-to"), R;
1098
+ };
1123
1099
  getAuthenticationPlugin() {
1124
- return new zt(this.callbackUrlPath, this.handleCallback);
1100
+ return new zt(this.handleCallback);
1125
1101
  }
1126
1102
  }
1127
- const qt = (t) => new Dt(t);
1103
+ const Mt = (t) => new Jt(t);
1128
1104
  export {
1129
- Dt as OpenIDAuthenticationProvider,
1130
- qt as default
1105
+ Ae as OPENID_CALLBACK_PATH,
1106
+ Jt as OpenIDAuthenticationProvider,
1107
+ Mt as default
1131
1108
  };
1132
1109
  //# sourceMappingURL=zudoku.auth-openid.js.map