zudoku 0.0.0-f9d5b02 → 0.0.0-fabd0c1

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 (580) hide show
  1. package/client.d.ts +7 -0
  2. package/dist/app/demo.js +1 -1
  3. package/dist/app/demo.js.map +1 -1
  4. package/dist/app/entry.client.d.ts +1 -0
  5. package/dist/app/entry.client.js +14 -1
  6. package/dist/app/entry.client.js.map +1 -1
  7. package/dist/app/entry.server.d.ts +1 -0
  8. package/dist/app/entry.server.js +2 -2
  9. package/dist/app/entry.server.js.map +1 -1
  10. package/dist/app/main.d.ts +1 -1
  11. package/dist/app/main.js +2 -1
  12. package/dist/app/main.js.map +1 -1
  13. package/dist/app/sentry.d.ts +3 -0
  14. package/dist/app/sentry.js +19 -0
  15. package/dist/app/sentry.js.map +1 -0
  16. package/dist/app/standalone.js +1 -1
  17. package/dist/app/standalone.js.map +1 -1
  18. package/dist/app/tailwind.d.ts +2 -1
  19. package/dist/app/tailwind.js +64 -52
  20. package/dist/app/tailwind.js.map +1 -1
  21. package/dist/cli/cli.js +0 -2
  22. package/dist/cli/cli.js.map +1 -1
  23. package/dist/cli/cmds/build.js +1 -0
  24. package/dist/cli/cmds/build.js.map +1 -1
  25. package/dist/cli/common/logger.js +9 -0
  26. package/dist/cli/common/logger.js.map +1 -1
  27. package/dist/cli/common/outdated.js +2 -1
  28. package/dist/cli/common/outdated.js.map +1 -1
  29. package/dist/config/common.d.ts +8 -0
  30. package/dist/config/common.js +2 -0
  31. package/dist/config/common.js.map +1 -0
  32. package/dist/config/config.d.ts +3 -2
  33. package/dist/config/loader.d.ts +20 -0
  34. package/dist/config/loader.js +154 -0
  35. package/dist/config/loader.js.map +1 -0
  36. package/dist/config/validators/InputSidebarSchema.d.ts +14 -13
  37. package/dist/config/validators/InputSidebarSchema.js.map +1 -1
  38. package/dist/config/validators/common.d.ts +4945 -0
  39. package/dist/config/validators/common.js +280 -0
  40. package/dist/config/validators/common.js.map +1 -0
  41. package/dist/config/validators/icon-types.d.ts +1 -0
  42. package/dist/config/validators/icon-types.js +2 -0
  43. package/dist/config/validators/icon-types.js.map +1 -0
  44. package/dist/config/validators/validate.d.ts +800 -530
  45. package/dist/config/validators/validate.js +9 -228
  46. package/dist/config/validators/validate.js.map +1 -1
  47. package/dist/lib/authentication/AuthenticationPlugin.d.ts +4 -2
  48. package/dist/lib/authentication/AuthenticationPlugin.js +3 -0
  49. package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -1
  50. package/dist/lib/authentication/authentication.d.ts +1 -1
  51. package/dist/lib/authentication/components/CallbackHandler.js +1 -1
  52. package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
  53. package/dist/lib/authentication/components/SignIn.js +1 -1
  54. package/dist/lib/authentication/components/SignIn.js.map +1 -1
  55. package/dist/lib/authentication/components/SignOut.js +1 -1
  56. package/dist/lib/authentication/components/SignOut.js.map +1 -1
  57. package/dist/lib/authentication/hook.d.ts +5 -4
  58. package/dist/lib/authentication/hook.js +1 -3
  59. package/dist/lib/authentication/hook.js.map +1 -1
  60. package/dist/lib/authentication/providers/auth0.js +2 -2
  61. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  62. package/dist/lib/authentication/providers/openid.d.ts +7 -1
  63. package/dist/lib/authentication/providers/openid.js +18 -27
  64. package/dist/lib/authentication/providers/openid.js.map +1 -1
  65. package/dist/lib/authentication/state.d.ts +25 -4
  66. package/dist/lib/authentication/state.js +28 -5
  67. package/dist/lib/authentication/state.js.map +1 -1
  68. package/dist/lib/components/AnchorLink.d.ts +1 -1
  69. package/dist/lib/components/AnchorLink.js +1 -1
  70. package/dist/lib/components/AnchorLink.js.map +1 -1
  71. package/dist/lib/components/Bootstrap.d.ts +1 -2
  72. package/dist/lib/components/Bootstrap.js +11 -7
  73. package/dist/lib/components/Bootstrap.js.map +1 -1
  74. package/dist/lib/components/Header.js +14 -6
  75. package/dist/lib/components/Header.js.map +1 -1
  76. package/dist/lib/components/Heading.d.ts +4 -4
  77. package/dist/lib/components/Heading.js +1 -1
  78. package/dist/lib/components/Heading.js.map +1 -1
  79. package/dist/lib/components/Layout.js +14 -5
  80. package/dist/lib/components/Layout.js.map +1 -1
  81. package/dist/lib/components/Markdown.js +1 -1
  82. package/dist/lib/components/Markdown.js.map +1 -1
  83. package/dist/lib/components/MobileTopNavigation.js +5 -7
  84. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  85. package/dist/lib/components/NotFoundPage.js +1 -1
  86. package/dist/lib/components/NotFoundPage.js.map +1 -1
  87. package/dist/lib/components/ReactMarkdown.d.ts +29 -0
  88. package/dist/lib/components/ReactMarkdown.js +182 -0
  89. package/dist/lib/components/ReactMarkdown.js.map +1 -0
  90. package/dist/lib/components/Search.d.ts +3 -1
  91. package/dist/lib/components/Search.js +3 -3
  92. package/dist/lib/components/Search.js.map +1 -1
  93. package/dist/lib/components/SlotletProvider.d.ts +2 -2
  94. package/dist/lib/components/SyntaxHighlight.js +2 -6
  95. package/dist/lib/components/SyntaxHighlight.js.map +1 -1
  96. package/dist/lib/components/ThemeSwitch.js +5 -3
  97. package/dist/lib/components/ThemeSwitch.js.map +1 -1
  98. package/dist/lib/components/TopNavigation.d.ts +2 -0
  99. package/dist/lib/components/TopNavigation.js +13 -7
  100. package/dist/lib/components/TopNavigation.js.map +1 -1
  101. package/dist/lib/components/Zudoku.js +1 -1
  102. package/dist/lib/components/Zudoku.js.map +1 -1
  103. package/dist/lib/components/context/ZudokuContext.js +1 -1
  104. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  105. package/dist/lib/components/index.d.ts +15 -5
  106. package/dist/lib/components/index.js +1 -1
  107. package/dist/lib/components/index.js.map +1 -1
  108. package/dist/lib/components/navigation/Sidebar.d.ts +3 -1
  109. package/dist/lib/components/navigation/Sidebar.js +2 -2
  110. package/dist/lib/components/navigation/Sidebar.js.map +1 -1
  111. package/dist/lib/components/navigation/SidebarBadge.d.ts +0 -9
  112. package/dist/lib/components/navigation/SidebarBadge.js +0 -9
  113. package/dist/lib/components/navigation/SidebarBadge.js.map +1 -1
  114. package/dist/lib/components/navigation/SidebarCategory.d.ts +2 -2
  115. package/dist/lib/components/navigation/SidebarCategory.js +4 -5
  116. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  117. package/dist/lib/components/navigation/SidebarItem.d.ts +2 -4
  118. package/dist/lib/components/navigation/SidebarItem.js +6 -11
  119. package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
  120. package/dist/lib/components/navigation/SidebarWrapper.js +1 -1
  121. package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
  122. package/dist/lib/components/navigation/utils.js +1 -1
  123. package/dist/lib/components/navigation/utils.js.map +1 -1
  124. package/dist/lib/core/ZudokuContext.d.ts +1 -1
  125. package/dist/lib/core/plugins.d.ts +5 -1
  126. package/dist/lib/core/plugins.js.map +1 -1
  127. package/dist/lib/errors/RouterError.js +1 -1
  128. package/dist/lib/errors/RouterError.js.map +1 -1
  129. package/dist/lib/oas/graphql/index.js +4 -1
  130. package/dist/lib/oas/graphql/index.js.map +1 -1
  131. package/dist/lib/oas/parser/upgrade/index.d.ts +2 -2
  132. package/dist/lib/oas/parser/upgrade/index.js +3 -20
  133. package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
  134. package/dist/lib/plugins/api-catalog/Catalog.d.ts +2 -0
  135. package/dist/lib/plugins/api-catalog/Catalog.js +36 -0
  136. package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -0
  137. package/dist/lib/plugins/api-catalog/index.d.ts +30 -0
  138. package/dist/lib/plugins/api-catalog/index.js +15 -0
  139. package/dist/lib/plugins/api-catalog/index.js.map +1 -0
  140. package/dist/lib/plugins/api-keys/CreateApiKey.js +1 -1
  141. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
  142. package/dist/lib/plugins/api-keys/ProtectedRoute.js +1 -1
  143. package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -1
  144. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +1 -1
  145. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  146. package/dist/lib/plugins/api-keys/index.js +3 -0
  147. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  148. package/dist/lib/plugins/markdown/MdxPage.d.ts +9 -1
  149. package/dist/lib/plugins/markdown/MdxPage.js +16 -3
  150. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  151. package/dist/lib/plugins/markdown/index.d.ts +3 -1
  152. package/dist/lib/plugins/markdown/index.js +1 -1
  153. package/dist/lib/plugins/markdown/index.js.map +1 -1
  154. package/dist/lib/plugins/markdown/resolver.js.map +1 -1
  155. package/dist/lib/plugins/openapi/ColorizedParam.js +2 -2
  156. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  157. package/dist/lib/plugins/openapi/OperationList.js +24 -3
  158. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  159. package/dist/lib/plugins/openapi/OperationListItem.d.ts +2 -1
  160. package/dist/lib/plugins/openapi/OperationListItem.js +14 -4
  161. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  162. package/dist/lib/plugins/openapi/Route.d.ts +4 -2
  163. package/dist/lib/plugins/openapi/Route.js +25 -2
  164. package/dist/lib/plugins/openapi/Route.js.map +1 -1
  165. package/dist/lib/plugins/openapi/Sidecar.js +3 -13
  166. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  167. package/dist/lib/plugins/openapi/client/GraphQLClient.js +12 -0
  168. package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -1
  169. package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +1 -1
  170. package/dist/lib/plugins/openapi/client/useCreateQuery.js +4 -2
  171. package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
  172. package/dist/lib/plugins/openapi/context.d.ts +3 -3
  173. package/dist/lib/plugins/openapi/graphql/gql.d.ts +1 -1
  174. package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
  175. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  176. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +2 -0
  177. package/dist/lib/plugins/openapi/graphql/graphql.js +1 -0
  178. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  179. package/dist/lib/plugins/openapi/index.js +13 -13
  180. package/dist/lib/plugins/openapi/index.js.map +1 -1
  181. package/dist/lib/plugins/openapi/interfaces.d.ts +20 -1
  182. package/dist/lib/plugins/openapi/playground/PathParams.js +1 -1
  183. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  184. package/dist/lib/plugins/openapi/post-processors/removeExtensions.d.ts +6 -0
  185. package/dist/lib/plugins/openapi/post-processors/removeExtensions.js +14 -0
  186. package/dist/lib/plugins/openapi/post-processors/removeExtensions.js.map +1 -0
  187. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.d.ts +1 -0
  188. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js +125 -0
  189. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js.map +1 -0
  190. package/dist/lib/plugins/openapi/post-processors/removePaths.d.ts +11 -0
  191. package/dist/lib/plugins/openapi/post-processors/removePaths.js +33 -0
  192. package/dist/lib/plugins/openapi/post-processors/removePaths.js.map +1 -0
  193. package/dist/lib/plugins/openapi/post-processors/removePaths.test.d.ts +1 -0
  194. package/dist/lib/plugins/openapi/post-processors/removePaths.test.js +104 -0
  195. package/dist/lib/plugins/openapi/post-processors/removePaths.test.js.map +1 -0
  196. package/dist/lib/plugins/openapi/post-processors/traverse.d.ts +1 -0
  197. package/dist/lib/plugins/openapi/post-processors/traverse.js +2 -0
  198. package/dist/lib/plugins/openapi/post-processors/traverse.js.map +1 -0
  199. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  200. package/dist/lib/plugins/openapi/util/methodToColor.d.ts +20 -0
  201. package/dist/lib/plugins/openapi/util/methodToColor.js +24 -0
  202. package/dist/lib/plugins/openapi/util/methodToColor.js.map +1 -0
  203. package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.d.ts +1 -0
  204. package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.js +27 -0
  205. package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.js.map +1 -0
  206. package/dist/lib/plugins/redirect/index.d.ts +1 -1
  207. package/dist/lib/plugins/redirect/index.js +1 -1
  208. package/dist/lib/plugins/redirect/index.js.map +1 -1
  209. package/dist/lib/plugins/search-inkeep/index.d.ts +22 -3
  210. package/dist/lib/plugins/search-inkeep/index.js +41 -5
  211. package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
  212. package/dist/lib/plugins/search-inkeep/inkeep.d.ts +3 -4
  213. package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -1
  214. package/dist/lib/ui/Button.d.ts +1 -1
  215. package/dist/lib/ui/Command.d.ts +1 -1
  216. package/dist/lib/util/MdxComponents.d.ts +18 -19
  217. package/dist/lib/util/MdxComponents.js +1 -3
  218. package/dist/lib/util/MdxComponents.js.map +1 -1
  219. package/dist/lib/util/createVariantComponent.d.ts +2 -2
  220. package/dist/lib/util/traverse.d.ts +2 -0
  221. package/dist/lib/util/traverse.js +18 -0
  222. package/dist/lib/util/traverse.js.map +1 -0
  223. package/dist/lib/util/useExposedProps.js +1 -1
  224. package/dist/lib/util/useExposedProps.js.map +1 -1
  225. package/dist/lib/util/useOnScreen.d.ts +1 -1
  226. package/dist/lib/util/useScrollToAnchor.js +1 -1
  227. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  228. package/dist/lib/util/useScrollToTop.js +1 -1
  229. package/dist/lib/util/useScrollToTop.js.map +1 -1
  230. package/dist/vite/build.js +15 -3
  231. package/dist/vite/build.js.map +1 -1
  232. package/dist/vite/config.d.ts +6 -4
  233. package/dist/vite/config.js +70 -23
  234. package/dist/vite/config.js.map +1 -1
  235. package/dist/vite/config.test.js +7 -5
  236. package/dist/vite/config.test.js.map +1 -1
  237. package/dist/vite/css/collect.d.ts +2 -0
  238. package/dist/vite/css/collect.js +27 -0
  239. package/dist/vite/css/collect.js.map +1 -0
  240. package/dist/vite/css/plugin.d.ts +5 -0
  241. package/dist/vite/css/plugin.js +79 -0
  242. package/dist/vite/css/plugin.js.map +1 -0
  243. package/dist/vite/dev-server.js +19 -6
  244. package/dist/vite/dev-server.js.map +1 -1
  245. package/dist/vite/output.d.ts +1 -1
  246. package/dist/vite/output.js +39 -10
  247. package/dist/vite/output.js.map +1 -1
  248. package/dist/vite/plugin-api.js +93 -20
  249. package/dist/vite/plugin-api.js.map +1 -1
  250. package/dist/vite/plugin-component.js +15 -19
  251. package/dist/vite/plugin-component.js.map +1 -1
  252. package/dist/vite/plugin-config-reload.d.ts +1 -2
  253. package/dist/vite/plugin-config-reload.js.map +1 -1
  254. package/dist/vite/plugin-config.js +20 -0
  255. package/dist/vite/plugin-config.js.map +1 -1
  256. package/dist/vite/plugin-docs.test.js +15 -23
  257. package/dist/vite/plugin-docs.test.js.map +1 -1
  258. package/dist/vite/plugin-mdx.js +60 -4
  259. package/dist/vite/plugin-mdx.js.map +1 -1
  260. package/dist/vite/{plugin-custom-css.d.ts → plugin-theme-css.d.ts} +2 -2
  261. package/dist/vite/{plugin-custom-css.js → plugin-theme-css.js} +10 -3
  262. package/dist/vite/plugin-theme-css.js.map +1 -0
  263. package/dist/vite/plugin.d.ts +1 -2
  264. package/dist/vite/plugin.js +6 -2
  265. package/dist/vite/plugin.js.map +1 -1
  266. package/dist/vite/prerender.d.ts +2 -1
  267. package/dist/vite/prerender.js +2 -2
  268. package/dist/vite/prerender.js.map +1 -1
  269. package/dist/vite/remarkStaticGeneration.js +5 -5
  270. package/dist/vite/remarkStaticGeneration.js.map +1 -1
  271. package/dist/vite/sitemap.d.ts +1 -1
  272. package/dist/zuplo/env.d.ts +6 -0
  273. package/dist/zuplo/env.js +9 -0
  274. package/dist/zuplo/env.js.map +1 -0
  275. package/dist/zuplo/with-zuplo.d.ts +3 -0
  276. package/dist/zuplo/with-zuplo.js +28 -0
  277. package/dist/zuplo/with-zuplo.js.map +1 -0
  278. package/lib/AnchorLink-DFZZbmvr.js +34 -0
  279. package/lib/AnchorLink-DFZZbmvr.js.map +1 -0
  280. package/lib/{AuthenticationPlugin-DeGDVa1r.js → AuthenticationPlugin-fB7viE7A.js} +23 -21
  281. package/lib/AuthenticationPlugin-fB7viE7A.js.map +1 -0
  282. package/lib/{Button-jK0EsymC.js → Button-DeAoTouo.js} +4 -4
  283. package/lib/{Button-jK0EsymC.js.map → Button-DeAoTouo.js.map} +1 -1
  284. package/lib/{CategoryHeading-Bb9dqxD3.js → CategoryHeading-CBconmtI.js} +3 -3
  285. package/lib/{CategoryHeading-Bb9dqxD3.js.map → CategoryHeading-CBconmtI.js.map} +1 -1
  286. package/lib/ClientOnly-E7hGysn1.js.map +1 -1
  287. package/lib/{Dialog-k70Qfukb.js → Dialog-Bxv1yEIg.js} +3 -3
  288. package/lib/{Dialog-k70Qfukb.js.map → Dialog-Bxv1yEIg.js.map} +1 -1
  289. package/lib/{Markdown-BorQdbxW.js → Markdown-CZDLNOFc.js} +13227 -13217
  290. package/lib/Markdown-CZDLNOFc.js.map +1 -0
  291. package/lib/MdxPage-CPBw4_lf.js +188 -0
  292. package/lib/MdxPage-CPBw4_lf.js.map +1 -0
  293. package/lib/OperationList-n4U_BHmO.js +5062 -0
  294. package/lib/OperationList-n4U_BHmO.js.map +1 -0
  295. package/lib/Route-C8nwd9A2.js +37 -0
  296. package/lib/Route-C8nwd9A2.js.map +1 -0
  297. package/lib/{Select-DP74t8Yy.js → Select-D3XuKKuH.js} +5 -5
  298. package/lib/{Select-DP74t8Yy.js.map → Select-D3XuKKuH.js.map} +1 -1
  299. package/lib/SlotletProvider-pfc9oejW.js +221 -0
  300. package/lib/SlotletProvider-pfc9oejW.js.map +1 -0
  301. package/lib/{Spinner-3cQDBVGr.js → Spinner-DuxJLLNE.js} +2 -2
  302. package/lib/{Spinner-3cQDBVGr.js.map → Spinner-DuxJLLNE.js.map} +1 -1
  303. package/lib/StaggeredRender-DgsamH_G.js +17 -0
  304. package/lib/StaggeredRender-DgsamH_G.js.map +1 -0
  305. package/lib/{SyntaxHighlight-CBmwwKoM.js → SyntaxHighlight-Bz-lOJtH.js} +9 -13
  306. package/lib/{SyntaxHighlight-CBmwwKoM.js.map → SyntaxHighlight-Bz-lOJtH.js.map} +1 -1
  307. package/lib/assets/{index-B_Jk_Yzp.js → index-C7jnHK4b.js} +218 -197
  308. package/lib/assets/index-C7jnHK4b.js.map +1 -0
  309. package/lib/assets/{worker-CPsGZsve.js → worker-D2kRl-cG.js} +5326 -4949
  310. package/lib/assets/worker-D2kRl-cG.js.map +1 -0
  311. package/lib/chunk-D52XG6IA-Dl7HLe6j.js +1823 -0
  312. package/lib/chunk-D52XG6IA-Dl7HLe6j.js.map +1 -0
  313. package/lib/{cn-BmFQLtkS.js → cn-qaFjX9_3.js} +2 -2
  314. package/lib/cn-qaFjX9_3.js.map +1 -0
  315. package/lib/{context-D1nXWxm7.js → context-h_UkBLvr.js} +2 -2
  316. package/lib/context-h_UkBLvr.js.map +1 -0
  317. package/lib/{createServer-DK-g7kbB.js → createServer-69sLlmQA.js} +5350 -5760
  318. package/lib/createServer-69sLlmQA.js.map +1 -0
  319. package/lib/{hook-Diu0rqp-.js → hook-DgGeo5iL.js} +12 -14
  320. package/lib/{hook-Diu0rqp-.js.map → hook-DgGeo5iL.js.map} +1 -1
  321. package/lib/{index-CkwDvuPt.js → index-CBXSgjaE.js} +259 -238
  322. package/lib/index-CBXSgjaE.js.map +1 -0
  323. package/lib/index-CPNSgwSb.js +36 -0
  324. package/lib/index-CPNSgwSb.js.map +1 -0
  325. package/lib/index-DStSNvP-.js +1284 -0
  326. package/lib/index-DStSNvP-.js.map +1 -0
  327. package/lib/index-LNp6rxyU.js.map +1 -1
  328. package/lib/index.esm-BSV1C092.js +692 -0
  329. package/lib/index.esm-BSV1C092.js.map +1 -0
  330. package/lib/index.esm-BnnBRKJX.js +1214 -0
  331. package/lib/index.esm-BnnBRKJX.js.map +1 -0
  332. package/lib/invariant-Caa8-XvF.js.map +1 -1
  333. package/lib/jsx-runtime-Dx-03ztt.js +446 -0
  334. package/lib/jsx-runtime-Dx-03ztt.js.map +1 -0
  335. package/lib/object_hash-BNWPnMN9.js +787 -0
  336. package/lib/object_hash-BNWPnMN9.js.map +1 -0
  337. package/lib/post-processors/removeExtensions.js +11 -0
  338. package/lib/post-processors/removeExtensions.js.map +1 -0
  339. package/lib/post-processors/removePaths.js +28 -0
  340. package/lib/post-processors/removePaths.js.map +1 -0
  341. package/lib/post-processors/traverse.js +12 -0
  342. package/lib/post-processors/traverse.js.map +1 -0
  343. package/lib/prism-csharp.min-DUwvItt4.js +63 -0
  344. package/lib/{prism-csharp.min-Yizuc34Y.js.map → prism-csharp.min-DUwvItt4.js.map} +1 -1
  345. package/lib/prism-java.min-BtgBR4yd.js +35 -0
  346. package/lib/{prism-java.min-d5iT_mOd.js.map → prism-java.min-BtgBR4yd.js.map} +1 -1
  347. package/lib/prism-markup-BNGj0Tvm.js.map +1 -1
  348. package/lib/prism-ruby.min-DeDXCp1r.js +38 -0
  349. package/lib/{prism-ruby.min-C7LwcKyz.js.map → prism-ruby.min-DeDXCp1r.js.map} +1 -1
  350. package/lib/prism-typescript.min-CD7H2IYQ.js +34 -0
  351. package/lib/{prism-typescript.min-oSVeWCAd.js.map → prism-typescript.min-CD7H2IYQ.js.map} +1 -1
  352. package/lib/state-CFQsUZUP.js +202 -0
  353. package/lib/state-CFQsUZUP.js.map +1 -0
  354. package/lib/ui/Accordion.js +2 -2
  355. package/lib/ui/Accordion.js.map +1 -1
  356. package/lib/ui/ActionButton.js +4 -4
  357. package/lib/ui/ActionButton.js.map +1 -1
  358. package/lib/ui/Alert.js +3 -3
  359. package/lib/ui/Alert.js.map +1 -1
  360. package/lib/ui/AlertDialog.js +2 -2
  361. package/lib/ui/AlertDialog.js.map +1 -1
  362. package/lib/ui/Badge.js +3 -3
  363. package/lib/ui/Badge.js.map +1 -1
  364. package/lib/ui/Breadcrumb.js +2 -2
  365. package/lib/ui/Breadcrumb.js.map +1 -1
  366. package/lib/ui/Button.js +3 -3
  367. package/lib/ui/Button.js.map +1 -1
  368. package/lib/ui/Callout.js +2 -2
  369. package/lib/ui/Callout.js.map +1 -1
  370. package/lib/ui/Card.js +2 -2
  371. package/lib/ui/Card.js.map +1 -1
  372. package/lib/ui/Carousel.js +407 -401
  373. package/lib/ui/Carousel.js.map +1 -1
  374. package/lib/ui/Checkbox.js +2 -2
  375. package/lib/ui/Checkbox.js.map +1 -1
  376. package/lib/ui/Command.js +111 -108
  377. package/lib/ui/Command.js.map +1 -1
  378. package/lib/ui/Dialog.js +2 -2
  379. package/lib/ui/Dialog.js.map +1 -1
  380. package/lib/ui/Drawer.js +81 -81
  381. package/lib/ui/Drawer.js.map +1 -1
  382. package/lib/ui/DropdownMenu.js +2 -2
  383. package/lib/ui/DropdownMenu.js.map +1 -1
  384. package/lib/ui/Form.js +3 -3
  385. package/lib/ui/Form.js.map +1 -1
  386. package/lib/ui/HoverCard.js +2 -2
  387. package/lib/ui/Input.js +2 -2
  388. package/lib/ui/Input.js.map +1 -1
  389. package/lib/ui/Label.js +3 -3
  390. package/lib/ui/Pagination.js +2 -2
  391. package/lib/ui/Pagination.js.map +1 -1
  392. package/lib/ui/Popover.js +2 -2
  393. package/lib/ui/Popover.js.map +1 -1
  394. package/lib/ui/Progress.js +2 -2
  395. package/lib/ui/Progress.js.map +1 -1
  396. package/lib/ui/RadioGroup.js +2 -2
  397. package/lib/ui/RadioGroup.js.map +1 -1
  398. package/lib/ui/ScrollArea.js +2 -2
  399. package/lib/ui/ScrollArea.js.map +1 -1
  400. package/lib/ui/Select.js +2 -2
  401. package/lib/ui/Select.js.map +1 -1
  402. package/lib/ui/Skeleton.js +2 -2
  403. package/lib/ui/Skeleton.js.map +1 -1
  404. package/lib/ui/Slider.js +2 -2
  405. package/lib/ui/Switch.js +2 -2
  406. package/lib/ui/Switch.js.map +1 -1
  407. package/lib/ui/Tabs.js +2 -2
  408. package/lib/ui/Textarea.js +2 -2
  409. package/lib/ui/Textarea.js.map +1 -1
  410. package/lib/ui/Toggle.js +3 -3
  411. package/lib/ui/Toggle.js.map +1 -1
  412. package/lib/ui/ToggleGroup.js +2 -2
  413. package/lib/ui/ToggleGroup.js.map +1 -1
  414. package/lib/ui/Tooltip.js +2 -2
  415. package/lib/useExposedProps-DE9lR6MF.js +9 -0
  416. package/lib/useExposedProps-DE9lR6MF.js.map +1 -0
  417. package/lib/{utils-DcpDOncX.js → utils-B4O1uet5.js} +35 -36
  418. package/lib/{utils-DcpDOncX.js.map → utils-B4O1uet5.js.map} +1 -1
  419. package/lib/zudoku.auth-auth0.js +9 -8
  420. package/lib/zudoku.auth-auth0.js.map +1 -1
  421. package/lib/zudoku.auth-clerk.js +2 -2
  422. package/lib/zudoku.auth-clerk.js.map +1 -1
  423. package/lib/zudoku.auth-openid.js +365 -371
  424. package/lib/zudoku.auth-openid.js.map +1 -1
  425. package/lib/zudoku.components.js +814 -967
  426. package/lib/zudoku.components.js.map +1 -1
  427. package/lib/zudoku.openapi-worker.js +1 -1
  428. package/lib/zudoku.openapi-worker.js.map +1 -1
  429. package/lib/zudoku.plugin-api-catalog.js +123 -0
  430. package/lib/zudoku.plugin-api-catalog.js.map +1 -0
  431. package/lib/zudoku.plugin-api-keys.js +40 -39
  432. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  433. package/lib/zudoku.plugin-custom-pages.js +4 -4
  434. package/lib/zudoku.plugin-custom-pages.js.map +1 -1
  435. package/lib/zudoku.plugin-markdown.js +16 -15
  436. package/lib/zudoku.plugin-markdown.js.map +1 -1
  437. package/lib/zudoku.plugin-openapi.js +5 -5
  438. package/lib/zudoku.plugin-redirect.js +1 -1
  439. package/lib/zudoku.plugin-redirect.js.map +1 -1
  440. package/lib/zudoku.plugin-search-inkeep.js +53 -24
  441. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  442. package/package.json +74 -51
  443. package/src/app/demo.tsx +1 -1
  444. package/src/app/entry.client.tsx +16 -1
  445. package/src/app/entry.server.tsx +3 -2
  446. package/src/app/main.tsx +6 -2
  447. package/src/app/sentry.ts +24 -0
  448. package/src/app/standalone.tsx +1 -1
  449. package/src/app/tailwind.ts +67 -52
  450. package/src/lib/authentication/AuthenticationPlugin.tsx +4 -1
  451. package/src/lib/authentication/authentication.ts +1 -1
  452. package/src/lib/authentication/components/CallbackHandler.tsx +1 -1
  453. package/src/lib/authentication/components/SignIn.tsx +1 -1
  454. package/src/lib/authentication/components/SignOut.tsx +1 -1
  455. package/src/lib/authentication/hook.ts +1 -3
  456. package/src/lib/authentication/providers/auth0.tsx +3 -2
  457. package/src/lib/authentication/providers/openid.tsx +22 -33
  458. package/src/lib/authentication/state.ts +44 -10
  459. package/src/lib/components/AnchorLink.tsx +1 -1
  460. package/src/lib/components/Bootstrap.tsx +25 -20
  461. package/src/lib/components/Header.tsx +44 -11
  462. package/src/lib/components/Heading.tsx +13 -13
  463. package/src/lib/components/Layout.tsx +55 -38
  464. package/src/lib/components/Markdown.tsx +1 -1
  465. package/src/lib/components/MobileTopNavigation.tsx +26 -33
  466. package/src/lib/components/NotFoundPage.tsx +1 -1
  467. package/src/lib/components/ReactMarkdown.license.txt +21 -0
  468. package/src/lib/components/ReactMarkdown.tsx +264 -0
  469. package/src/lib/components/Search.tsx +3 -3
  470. package/src/lib/components/SlotletProvider.tsx +1 -1
  471. package/src/lib/components/SyntaxHighlight.tsx +3 -6
  472. package/src/lib/components/ThemeSwitch.tsx +6 -4
  473. package/src/lib/components/TopNavigation.tsx +26 -18
  474. package/src/lib/components/Zudoku.tsx +1 -1
  475. package/src/lib/components/context/ZudokuContext.ts +1 -1
  476. package/src/lib/components/index.ts +1 -1
  477. package/src/lib/components/navigation/Sidebar.tsx +18 -8
  478. package/src/lib/components/navigation/SidebarBadge.tsx +0 -10
  479. package/src/lib/components/navigation/SidebarCategory.tsx +11 -10
  480. package/src/lib/components/navigation/SidebarItem.tsx +11 -14
  481. package/src/lib/components/navigation/SidebarWrapper.tsx +1 -1
  482. package/src/lib/components/navigation/utils.ts +1 -1
  483. package/src/lib/core/ZudokuContext.ts +1 -1
  484. package/src/lib/core/plugins.ts +5 -1
  485. package/src/lib/errors/RouterError.tsx +1 -1
  486. package/src/lib/oas/graphql/index.ts +4 -1
  487. package/src/lib/oas/parser/upgrade/index.ts +4 -27
  488. package/src/lib/plugins/api-catalog/Catalog.tsx +123 -0
  489. package/src/lib/plugins/api-catalog/index.tsx +64 -0
  490. package/src/lib/plugins/api-keys/CreateApiKey.tsx +1 -1
  491. package/src/lib/plugins/api-keys/ProtectedRoute.tsx +1 -1
  492. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +1 -1
  493. package/src/lib/plugins/api-keys/index.tsx +4 -1
  494. package/src/lib/plugins/custom-pages/index.tsx +1 -1
  495. package/src/lib/plugins/markdown/MdxPage.tsx +28 -2
  496. package/src/lib/plugins/markdown/index.tsx +5 -2
  497. package/src/lib/plugins/markdown/resolver.ts +2 -4
  498. package/src/lib/plugins/openapi/ColorizedParam.tsx +2 -2
  499. package/src/lib/plugins/openapi/OperationList.tsx +64 -8
  500. package/src/lib/plugins/openapi/OperationListItem.tsx +31 -2
  501. package/src/lib/plugins/openapi/Route.tsx +45 -9
  502. package/src/lib/plugins/openapi/Sidecar.tsx +3 -17
  503. package/src/lib/plugins/openapi/client/GraphQLClient.tsx +17 -0
  504. package/src/lib/plugins/openapi/client/useCreateQuery.ts +5 -2
  505. package/src/lib/plugins/openapi/context.tsx +2 -2
  506. package/src/lib/plugins/openapi/graphql/gql.ts +2 -2
  507. package/src/lib/plugins/openapi/graphql/graphql.ts +3 -0
  508. package/src/lib/plugins/openapi/index.tsx +35 -28
  509. package/src/lib/plugins/openapi/interfaces.ts +22 -1
  510. package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -0
  511. package/src/lib/plugins/openapi/post-processors/removeExtensions.test.ts +144 -0
  512. package/src/lib/plugins/openapi/post-processors/removeExtensions.ts +24 -0
  513. package/src/lib/plugins/openapi/post-processors/removePaths.test.ts +126 -0
  514. package/src/lib/plugins/openapi/post-processors/removePaths.ts +55 -0
  515. package/src/lib/plugins/openapi/post-processors/traverse.ts +1 -0
  516. package/src/lib/plugins/openapi/schema/SchemaView.tsx +1 -1
  517. package/src/lib/plugins/openapi/util/methodToColor.ts +27 -0
  518. package/src/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.tsx +32 -0
  519. package/src/lib/plugins/redirect/index.tsx +2 -2
  520. package/src/lib/plugins/search-inkeep/index.tsx +78 -23
  521. package/src/lib/plugins/search-inkeep/inkeep.ts +3 -9
  522. package/src/lib/util/MdxComponents.tsx +3 -8
  523. package/src/lib/util/createVariantComponent.tsx +2 -2
  524. package/src/lib/util/traverse.ts +25 -0
  525. package/src/lib/util/useExposedProps.tsx +1 -1
  526. package/src/lib/util/useScrollToAnchor.ts +1 -1
  527. package/src/lib/util/useScrollToTop.ts +1 -1
  528. package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.d.ts +0 -2
  529. package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js +0 -3
  530. package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js.map +0 -1
  531. package/dist/vite/plugin-custom-css.js.map +0 -1
  532. package/lib/AnchorLink-CDlhr8gL.js +0 -706
  533. package/lib/AnchorLink-CDlhr8gL.js.map +0 -1
  534. package/lib/AuthenticationPlugin-DeGDVa1r.js.map +0 -1
  535. package/lib/InkeepCustomTrigger-CE5-K5ex.js +0 -6
  536. package/lib/InkeepCustomTrigger-CE5-K5ex.js.map +0 -1
  537. package/lib/Markdown-BorQdbxW.js.map +0 -1
  538. package/lib/MdxPage-DFlbtJWi.js +0 -174
  539. package/lib/MdxPage-DFlbtJWi.js.map +0 -1
  540. package/lib/OperationList-KshJrrLL.js +0 -4691
  541. package/lib/OperationList-KshJrrLL.js.map +0 -1
  542. package/lib/Route-DlG_HTMu.js +0 -11
  543. package/lib/Route-DlG_HTMu.js.map +0 -1
  544. package/lib/SidebarBadge-DxFJcJ6V.js +0 -51
  545. package/lib/SidebarBadge-DxFJcJ6V.js.map +0 -1
  546. package/lib/SlotletProvider-D2v6rJy1.js +0 -252
  547. package/lib/SlotletProvider-D2v6rJy1.js.map +0 -1
  548. package/lib/assets/index-B_Jk_Yzp.js.map +0 -1
  549. package/lib/assets/worker-CPsGZsve.js.map +0 -1
  550. package/lib/cn-BmFQLtkS.js.map +0 -1
  551. package/lib/context-D1nXWxm7.js.map +0 -1
  552. package/lib/createServer-DK-g7kbB.js.map +0 -1
  553. package/lib/index-BcesIHH4.js +0 -1273
  554. package/lib/index-BcesIHH4.js.map +0 -1
  555. package/lib/index-BuAyrJe3.js +0 -46
  556. package/lib/index-BuAyrJe3.js.map +0 -1
  557. package/lib/index-CkwDvuPt.js.map +0 -1
  558. package/lib/index-Czzd9rjU.js +0 -899
  559. package/lib/index-Czzd9rjU.js.map +0 -1
  560. package/lib/index-Yn8c3UWE.js +0 -921
  561. package/lib/index-Yn8c3UWE.js.map +0 -1
  562. package/lib/index.esm-C5mr_sKO.js +0 -1193
  563. package/lib/index.esm-C5mr_sKO.js.map +0 -1
  564. package/lib/jsx-runtime-B6kdoens.js +0 -635
  565. package/lib/jsx-runtime-B6kdoens.js.map +0 -1
  566. package/lib/prism-csharp.min-Yizuc34Y.js +0 -35
  567. package/lib/prism-java.min-d5iT_mOd.js +0 -7
  568. package/lib/prism-markup-templating-DZrrEs0A.js +0 -62
  569. package/lib/prism-markup-templating-DZrrEs0A.js.map +0 -1
  570. package/lib/prism-php.min-o7FpoMP_.js +0 -11
  571. package/lib/prism-php.min-o7FpoMP_.js.map +0 -1
  572. package/lib/prism-ruby.min-C7LwcKyz.js +0 -10
  573. package/lib/prism-typescript.min-oSVeWCAd.js +0 -6
  574. package/lib/router-lfyopgBI.js +0 -3024
  575. package/lib/router-lfyopgBI.js.map +0 -1
  576. package/lib/state-BsPrOUAh.js +0 -252
  577. package/lib/state-BsPrOUAh.js.map +0 -1
  578. package/lib/useExposedProps-CTPtylCV.js +0 -10
  579. package/lib/useExposedProps-CTPtylCV.js.map +0 -1
  580. package/src/lib/plugins/search-inkeep/InkeepCustomTrigger.tsx +0 -3
@@ -0,0 +1,1284 @@
1
+ var Ie = Object.defineProperty;
2
+ var me = (e) => {
3
+ throw TypeError(e);
4
+ };
5
+ var qe = (e, n, s) => n in e ? Ie(e, n, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[n] = s;
6
+ var W = (e, n, s) => qe(e, typeof n != "symbol" ? n + "" : n, s), pe = (e, n, s) => n.has(e) || me("Cannot " + s);
7
+ var y = (e, n, s) => (pe(e, n, "read from private field"), s ? s.call(e) : n.get(e)), R = (e, n, s) => n.has(e) ? me("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(e) : n.set(e, s), M = (e, n, s, a) => (pe(e, n, "write to private field"), a ? a.call(e, s) : n.set(e, s), s);
8
+ import { j as t } from "./jsx-runtime-Dx-03ztt.js";
9
+ import { m as Re } from "./chunk-D52XG6IA-Dl7HLe6j.js";
10
+ import { i as Me, j as he, k as Ae } from "./utils-B4O1uet5.js";
11
+ import { XIcon as Ve, EraserIcon as Ce, ChevronsUpDownIcon as ze, LogInIcon as Fe, CirclePlayIcon as Le } from "lucide-react";
12
+ import { u as De } from "./hook-DgGeo5iL.js";
13
+ import { Button as E } from "./ui/Button.js";
14
+ import { initializeWorker as Ge } from "zudoku/openapi-worker";
15
+ import { Z as Be } from "./invariant-Caa8-XvF.js";
16
+ import { VisuallyHidden as Je } from "@radix-ui/react-visually-hidden";
17
+ import * as fe from "react";
18
+ import { useRef as $e, useEffect as Te, useState as Ee, useTransition as He, Fragment as Z } from "react";
19
+ import { D as Qe, b as Ue, a as We, c as Ze } from "./Dialog-Bxv1yEIg.js";
20
+ import { u as Ke, S as xe, a as ye, b as ge, c as ve, e as K } from "./Select-D3XuKKuH.js";
21
+ import { b as oe, C as $, u as Xe, a as Ye, F as et } from "./index.esm-BnnBRKJX.js";
22
+ import { a as tt } from "./state-CFQsUZUP.js";
23
+ import { S as je } from "./Spinner-DuxJLLNE.js";
24
+ import { Callout as nt } from "./ui/Callout.js";
25
+ import { Card as ae, CardHeader as st, CardTitle as rt, CardContent as at } from "./ui/Card.js";
26
+ import { Tabs as be, TabsList as Ne, TabsTrigger as A, TabsContent as V } from "./ui/Tabs.js";
27
+ import { z as ot, S as it } from "./SyntaxHighlight-Bz-lOJtH.js";
28
+ import { c as O } from "./cn-qaFjX9_3.js";
29
+ import { Input as H } from "./ui/Input.js";
30
+ import { Slot as lt } from "@radix-ui/react-slot";
31
+ class L extends String {
32
+ constructor(s, a) {
33
+ super(s);
34
+ W(this, "__apiType");
35
+ this.value = s, this.__meta__ = a;
36
+ }
37
+ toString() {
38
+ return this.value;
39
+ }
40
+ }
41
+ const ct = new L(
42
+ `
43
+ fragment OperationsFragment on OperationItem {
44
+ slug
45
+ summary
46
+ method
47
+ description
48
+ operationId
49
+ contentTypes
50
+ path
51
+ parameters {
52
+ name
53
+ in
54
+ description
55
+ required
56
+ schema
57
+ style
58
+ examples {
59
+ name
60
+ description
61
+ externalValue
62
+ value
63
+ summary
64
+ }
65
+ }
66
+ requestBody {
67
+ content {
68
+ mediaType
69
+ encoding {
70
+ name
71
+ }
72
+ examples {
73
+ name
74
+ description
75
+ externalValue
76
+ value
77
+ summary
78
+ }
79
+ schema
80
+ }
81
+ description
82
+ required
83
+ }
84
+ responses {
85
+ statusCode
86
+ links
87
+ description
88
+ content {
89
+ examples {
90
+ name
91
+ description
92
+ externalValue
93
+ value
94
+ summary
95
+ }
96
+ mediaType
97
+ encoding {
98
+ name
99
+ }
100
+ schema
101
+ }
102
+ }
103
+ }
104
+ `,
105
+ { fragmentName: "OperationsFragment" }
106
+ ), dt = new L(`
107
+ query ServersQuery($input: JSON!, $type: SchemaType!) {
108
+ schema(input: $input, type: $type) {
109
+ url
110
+ servers {
111
+ url
112
+ }
113
+ }
114
+ }
115
+ `), ut = new L(`
116
+ query AllOperations($input: JSON!, $type: SchemaType!) {
117
+ schema(input: $input, type: $type) {
118
+ description
119
+ summary
120
+ title
121
+ url
122
+ version
123
+ tags {
124
+ name
125
+ description
126
+ operations {
127
+ slug
128
+ ...OperationsFragment
129
+ }
130
+ }
131
+ }
132
+ }
133
+ fragment OperationsFragment on OperationItem {
134
+ slug
135
+ summary
136
+ method
137
+ description
138
+ operationId
139
+ contentTypes
140
+ path
141
+ parameters {
142
+ name
143
+ in
144
+ description
145
+ required
146
+ schema
147
+ style
148
+ examples {
149
+ name
150
+ description
151
+ externalValue
152
+ value
153
+ summary
154
+ }
155
+ }
156
+ requestBody {
157
+ content {
158
+ mediaType
159
+ encoding {
160
+ name
161
+ }
162
+ examples {
163
+ name
164
+ description
165
+ externalValue
166
+ value
167
+ summary
168
+ }
169
+ schema
170
+ }
171
+ description
172
+ required
173
+ }
174
+ responses {
175
+ statusCode
176
+ links
177
+ description
178
+ content {
179
+ examples {
180
+ name
181
+ description
182
+ externalValue
183
+ value
184
+ summary
185
+ }
186
+ mediaType
187
+ encoding {
188
+ name
189
+ }
190
+ schema
191
+ }
192
+ }
193
+ }`), mt = new L(`
194
+ query getServerQuery($input: JSON!, $type: SchemaType!) {
195
+ schema(input: $input, type: $type) {
196
+ url
197
+ servers {
198
+ url
199
+ }
200
+ }
201
+ }
202
+ `), pt = new L(`
203
+ query GetCategories($input: JSON!, $type: SchemaType!) {
204
+ schema(input: $input, type: $type) {
205
+ url
206
+ tags {
207
+ __typename
208
+ name
209
+ operations {
210
+ __typename
211
+ slug
212
+ deprecated
213
+ method
214
+ summary
215
+ operationId
216
+ path
217
+ }
218
+ }
219
+ }
220
+ }
221
+ `), ht = {
222
+ "\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": dt,
223
+ "\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n examples {\n name\n description\n externalValue\n value\n summary\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n examples {\n name\n description\n externalValue\n value\n summary\n }\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n": ct,
224
+ "\n query AllOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n description\n summary\n title\n url\n version\n tags {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n }\n }\n }\n": ut,
225
+ "\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": mt,
226
+ "\n query GetCategories($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n tags {\n __typename\n name\n operations {\n __typename\n slug\n deprecated\n method\n summary\n operationId\n path\n }\n }\n }\n }\n": pt
227
+ };
228
+ function ft(e) {
229
+ return ht[e] ?? {};
230
+ }
231
+ function X(e) {
232
+ if (!ie(e))
233
+ throw new Error("Parameter was not an error");
234
+ }
235
+ function ie(e) {
236
+ return !!e && typeof e == "object" && xt(e) === "[object Error]" || e instanceof Error;
237
+ }
238
+ function xt(e) {
239
+ return Object.prototype.toString.call(e);
240
+ }
241
+ const yt = "Layerr";
242
+ let gt = yt;
243
+ function vt() {
244
+ return gt;
245
+ }
246
+ function jt(e) {
247
+ let n, s = "";
248
+ if (e.length === 0)
249
+ n = {};
250
+ else if (ie(e[0]))
251
+ n = {
252
+ cause: e[0]
253
+ }, s = e.slice(1).join(" ") || "";
254
+ else if (e[0] && typeof e[0] == "object")
255
+ n = Object.assign({}, e[0]), s = e.slice(1).join(" ") || "";
256
+ else if (typeof e[0] == "string")
257
+ n = {}, s = s = e.join(" ") || "";
258
+ else
259
+ throw new Error("Invalid arguments passed to Layerr");
260
+ return {
261
+ options: n,
262
+ shortMessage: s
263
+ };
264
+ }
265
+ class g extends Error {
266
+ constructor(n, s) {
267
+ const a = [...arguments], { options: r, shortMessage: i } = jt(a);
268
+ let l = i;
269
+ if (r.cause && (l = `${l}: ${r.cause.message}`), super(l), this.message = l, r.name && typeof r.name == "string" ? this.name = r.name : this.name = vt(), r.cause && Object.defineProperty(this, "_cause", { value: r.cause }), Object.defineProperty(this, "_info", { value: {} }), r.info && typeof r.info == "object" && Object.assign(this._info, r.info), Error.captureStackTrace) {
270
+ const u = r.constructorOpt || this.constructor;
271
+ Error.captureStackTrace(this, u);
272
+ }
273
+ }
274
+ static cause(n) {
275
+ return X(n), n._cause && ie(n._cause) ? n._cause : null;
276
+ }
277
+ static fullStack(n) {
278
+ X(n);
279
+ const s = g.cause(n);
280
+ return s ? `${n.stack}
281
+ caused by: ${g.fullStack(s)}` : n.stack ?? "";
282
+ }
283
+ static info(n) {
284
+ X(n);
285
+ const s = {}, a = g.cause(n);
286
+ return a && Object.assign(s, g.info(a)), n._info && Object.assign(s, n._info), s;
287
+ }
288
+ toString() {
289
+ let n = this.name || this.constructor.name || this.constructor.prototype.name;
290
+ return this.message && (n = `${n}: ${this.message}`), n;
291
+ }
292
+ }
293
+ const Oe = "0123456789ABCDEFGHJKMNPQRSTVWXYZ", F = 32, we = 281474976710655, bt = 10, Nt = 16, z = Object.freeze({
294
+ source: "ulid"
295
+ });
296
+ function wt(e) {
297
+ const n = St(), s = n && (n.crypto || n.msCrypto) || null;
298
+ if (typeof (s == null ? void 0 : s.getRandomValues) == "function")
299
+ return () => {
300
+ const a = new Uint8Array(1);
301
+ return s.getRandomValues(a), a[0] / 255;
302
+ };
303
+ if (typeof (s == null ? void 0 : s.randomBytes) == "function")
304
+ return () => s.randomBytes(1).readUInt8() / 255;
305
+ throw new g({
306
+ info: {
307
+ code: "PRNG_DETECT",
308
+ ...z
309
+ }
310
+ }, "Failed to find a reliable PRNG");
311
+ }
312
+ function St() {
313
+ return Tt() ? self : typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : null;
314
+ }
315
+ function Ct(e, n) {
316
+ let s = "";
317
+ for (; e > 0; e--)
318
+ s = Et(n) + s;
319
+ return s;
320
+ }
321
+ function $t(e, n) {
322
+ if (isNaN(e))
323
+ throw new g({
324
+ info: {
325
+ code: "ENC_TIME_NAN",
326
+ ...z
327
+ }
328
+ }, `Time must be a number: ${e}`);
329
+ if (e > we)
330
+ throw new g({
331
+ info: {
332
+ code: "ENC_TIME_SIZE_EXCEED",
333
+ ...z
334
+ }
335
+ }, `Cannot encode a time larger than ${we}: ${e}`);
336
+ if (e < 0)
337
+ throw new g({
338
+ info: {
339
+ code: "ENC_TIME_NEG",
340
+ ...z
341
+ }
342
+ }, `Time must be positive: ${e}`);
343
+ if (Number.isInteger(e) === !1)
344
+ throw new g({
345
+ info: {
346
+ code: "ENC_TIME_TYPE",
347
+ ...z
348
+ }
349
+ }, `Time must be an integer: ${e}`);
350
+ let s, a = "";
351
+ for (let r = n; r > 0; r--)
352
+ s = e % F, a = Oe.charAt(s) + a, e = (e - s) / F;
353
+ return a;
354
+ }
355
+ function Tt() {
356
+ return typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope;
357
+ }
358
+ function Et(e) {
359
+ let n = Math.floor(e() * F);
360
+ return n === F && (n = F - 1), Oe.charAt(n);
361
+ }
362
+ function Ot(e, n) {
363
+ const s = wt(), a = isNaN(e) ? Date.now() : e;
364
+ return $t(a, bt) + Ct(Nt, s);
365
+ }
366
+ let Y, ee;
367
+ const Pt = async (e) => {
368
+ e && typeof e == "object" && "type" in e && e.type === "file" && "input" in e && typeof e.input == "function" && (e.input = await e.input());
369
+ }, te = (e) => {
370
+ var n;
371
+ if ((n = e.errors) != null && n[0])
372
+ throw new Be(e.errors[0].message, {
373
+ developerHint: "Check your configuration value `apis.type` and `apis.input` in the Zudoku config."
374
+ });
375
+ };
376
+ var T, P, N, Q;
377
+ class kt {
378
+ constructor(n) {
379
+ R(this, T);
380
+ R(this, P, /* @__PURE__ */ new Map());
381
+ R(this, N);
382
+ R(this, Q, () => import("./createServer-69sLlmQA.js").then((n) => n.createServer()));
383
+ W(this, "fetch", async (n, ...[s]) => {
384
+ var i;
385
+ const a = (i = n.match(/query (\w+)/)) == null ? void 0 : i[1];
386
+ await Pt(s);
387
+ const r = JSON.stringify({ query: n, variables: s, operationName: a });
388
+ switch (y(this, T)) {
389
+ case "remote": {
390
+ const l = await fetch(this.config.server, {
391
+ method: "POST",
392
+ body: r,
393
+ headers: { "Content-Type": "application/json" }
394
+ });
395
+ if (!l.ok)
396
+ throw new Error("Network response was not ok");
397
+ const u = await l.json();
398
+ return te(u), u.data;
399
+ }
400
+ case "in-memory": {
401
+ Y || (Y = y(this, Q).call(this));
402
+ const l = await Y;
403
+ if (!l) throw new Error("Local server not initialized");
404
+ const u = await l.fetch(
405
+ new Request("http://localhost/graphql", {
406
+ method: "POST",
407
+ body: r,
408
+ headers: { "Content-Type": "application/json" }
409
+ })
410
+ );
411
+ if (!u.ok)
412
+ throw new Error("Network response was not ok");
413
+ const d = await u.json();
414
+ return te(d), d.data;
415
+ }
416
+ case "worker": {
417
+ if (ee || (ee = Ge()), !y(this, N)) {
418
+ const c = new MessageChannel();
419
+ ee.port.postMessage({ port: c.port2 }, [c.port2]), M(this, N, c.port1), y(this, N).onmessage = (f) => {
420
+ const { id: h, body: j } = f.data, b = y(this, P).get(h);
421
+ if (b) {
422
+ const w = JSON.parse(j);
423
+ b(w), y(this, P).delete(h);
424
+ } else
425
+ console.error(`No pending request found for id: ${h}`);
426
+ }, y(this, N).start();
427
+ }
428
+ const l = Ot(), d = await new Promise(
429
+ (c) => {
430
+ y(this, P).set(l, c), y(this, N).postMessage({ id: l, body: r });
431
+ }
432
+ );
433
+ return te(d), d.data;
434
+ }
435
+ }
436
+ });
437
+ this.config = n, n.server ? M(this, T, "remote") : n.inMemory || typeof SharedWorker > "u" ? M(this, T, "in-memory") : M(this, T, "worker");
438
+ }
439
+ }
440
+ T = new WeakMap(), P = new WeakMap(), N = new WeakMap(), Q = new WeakMap();
441
+ const ne = (e) => Math.abs(
442
+ isNaN(parseInt(e)) ? e.toLowerCase().charCodeAt(0) - 96 : isNaN(parseInt(e)) ? 0 : parseInt(e)
443
+ ), se = (e) => e.length > 1 ? parseInt(e.split("").reduce((n, s) => `${ne(n) + ne(s)}`)) : ne(e), _t = (e, n = {}) => {
444
+ const s = (3 * se(e) + 2 * se(e) + se(e)) % 360, { saturation: a = 75, lightness: r = 60 } = n;
445
+ return `${s}deg ${a}% ${r}%`;
446
+ }, re = "data-linked-param", It = (e) => {
447
+ const { resolvedTheme: n } = ot();
448
+ return _t(
449
+ e,
450
+ n === "light" ? { saturation: 85, lightness: 50 } : void 0
451
+ );
452
+ }, Pe = ({
453
+ name: e,
454
+ className: n,
455
+ backgroundOpacity: s = "100%",
456
+ borderOpacity: a = "100%",
457
+ slug: r,
458
+ children: i,
459
+ onClick: l
460
+ }) => {
461
+ const u = $e(null), d = e.replace(/[{}]/g, ""), c = r == null ? void 0 : r.replace(/[{}]/g, ""), f = It(d), h = `hsl(${f} / ${a})`, j = `hsl(${f} / ${s})`;
462
+ return Te(() => {
463
+ if (!c || !u.current) return;
464
+ const b = () => {
465
+ document.querySelectorAll(`[${re}="${c}"]`).forEach((S) => {
466
+ S instanceof HTMLElement && (S.dataset.active = "true");
467
+ });
468
+ }, w = () => {
469
+ document.querySelectorAll(`[${re}="${c}"]`).forEach((S) => {
470
+ S instanceof HTMLElement && (S.dataset.active = "false");
471
+ });
472
+ }, v = u.current;
473
+ return v.addEventListener("mouseenter", b), v.addEventListener("mouseleave", w), () => {
474
+ v.removeEventListener("mouseenter", b), v.removeEventListener("mouseleave", w);
475
+ };
476
+ }, [c]), /* @__PURE__ */ t.jsx(
477
+ "span",
478
+ {
479
+ [re]: c,
480
+ className: O(
481
+ "relative after:rounded after:absolute after:inset-0 after:-bottom-0.5 after:border-b-2 after:transition-opacity after:duration-200",
482
+ "after:pointer-events-none after:border-[--border-color] after:opacity-30 after:data-[active=true]:opacity-100",
483
+ n
484
+ ),
485
+ suppressHydrationWarning: !0,
486
+ ref: u,
487
+ onClick: l,
488
+ style: {
489
+ "--border-color": h,
490
+ "--background-color": j
491
+ },
492
+ children: i ?? e
493
+ }
494
+ );
495
+ }, qt = (e, n, s) => {
496
+ const a = n.replace(/(:\w+|\{\w+})/g, (i) => {
497
+ var d;
498
+ const l = i.replace(/[:{}]/g, "");
499
+ return ((d = s.pathParams.find((c) => c.name === l)) == null ? void 0 : d.value) ?? i;
500
+ }), r = new URL(
501
+ a.replace(/^\//, ""),
502
+ e.endsWith("/") ? e : `${e}/`
503
+ );
504
+ return s.queryParams.filter((i) => i.active).forEach((i) => {
505
+ r.searchParams.set(i.name, i.value);
506
+ }), r;
507
+ }, Rt = ({
508
+ control: e,
509
+ register: n
510
+ }) => {
511
+ const { fields: s, append: a, remove: r } = oe({
512
+ control: e,
513
+ name: "headers"
514
+ });
515
+ return /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-2", children: [
516
+ /* @__PURE__ */ t.jsx("table", { className: "w-full [&_td]:border [&_td]:p-1.5 [&_td]:px-2", children: /* @__PURE__ */ t.jsx("tbody", { children: s.map((i, l) => /* @__PURE__ */ t.jsxs(
517
+ "tr",
518
+ {
519
+ className: "group has-[:focus]:bg-muted/50 hover:bg-muted/50",
520
+ children: [
521
+ /* @__PURE__ */ t.jsx("td", { className: "flex gap-2 items-center", children: /* @__PURE__ */ t.jsx(
522
+ H,
523
+ {
524
+ ...n(`headers.${l}.name`),
525
+ placeholder: "Name",
526
+ className: "border-0 shadow-none text-xs font-mono",
527
+ autoComplete: "off"
528
+ }
529
+ ) }),
530
+ /* @__PURE__ */ t.jsx("td", { children: /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
531
+ /* @__PURE__ */ t.jsx(
532
+ H,
533
+ {
534
+ placeholder: "Value",
535
+ className: "border-0 shadow-none text-xs font-mono",
536
+ ...n(`headers.${l}.value`),
537
+ autoComplete: "off"
538
+ }
539
+ ),
540
+ /* @__PURE__ */ t.jsx(
541
+ E,
542
+ {
543
+ size: "icon",
544
+ variant: "ghost",
545
+ className: "text-muted-foreground opacity-0 group-hover:opacity-100",
546
+ onClick: () => {
547
+ r(l);
548
+ },
549
+ type: "button",
550
+ children: /* @__PURE__ */ t.jsx(Ve, { size: 16 })
551
+ }
552
+ )
553
+ ] }) })
554
+ ]
555
+ },
556
+ i.id
557
+ )) }) }),
558
+ /* @__PURE__ */ t.jsx("div", { className: "text-end", children: /* @__PURE__ */ t.jsx(
559
+ E,
560
+ {
561
+ className: "",
562
+ onClick: () => a({ name: "", value: "" }),
563
+ type: "button",
564
+ children: "Add header"
565
+ }
566
+ ) })
567
+ ] });
568
+ }, Mt = ({
569
+ control: e
570
+ }) => {
571
+ const { fields: n } = oe({
572
+ control: e,
573
+ name: "pathParams"
574
+ });
575
+ return /* @__PURE__ */ t.jsx("table", { className: "w-full table-auto [&_td]:border [&_td]:py-1 [&_td]:px-2", children: /* @__PURE__ */ t.jsx("tbody", { children: n.map((s, a) => /* @__PURE__ */ t.jsxs("tr", { className: "hover:bg-accent/40", children: [
576
+ /* @__PURE__ */ t.jsx("td", { children: /* @__PURE__ */ t.jsx(
577
+ $,
578
+ {
579
+ control: e,
580
+ name: `pathParams.${a}.value`,
581
+ render: ({ field: r }) => /* @__PURE__ */ t.jsxs("div", { children: [
582
+ /* @__PURE__ */ t.jsx(
583
+ Pe,
584
+ {
585
+ slug: s.name,
586
+ name: s.name,
587
+ backgroundOpacity: "25%",
588
+ borderOpacity: r.value ? "100%" : "0",
589
+ className: O(
590
+ "font-mono text-xs m-2",
591
+ !r.value && "opacity-60"
592
+ )
593
+ }
594
+ ),
595
+ "*"
596
+ ] })
597
+ }
598
+ ) }),
599
+ /* @__PURE__ */ t.jsx("td", { children: /* @__PURE__ */ t.jsxs("div", { className: "flex justify-between items-center", children: [
600
+ /* @__PURE__ */ t.jsx(
601
+ $,
602
+ {
603
+ control: e,
604
+ name: `pathParams.${a}.value`,
605
+ render: ({ field: r }) => /* @__PURE__ */ t.jsx(
606
+ H,
607
+ {
608
+ ...r,
609
+ required: !0,
610
+ placeholder: "Enter value",
611
+ className: "border-0 shadow-none ring-0 font-mono text-xs"
612
+ }
613
+ )
614
+ }
615
+ ),
616
+ /* @__PURE__ */ t.jsx(
617
+ $,
618
+ {
619
+ control: e,
620
+ name: `pathParams.${a}.value`,
621
+ render: ({ field: r }) => /* @__PURE__ */ t.jsx(
622
+ E,
623
+ {
624
+ size: "icon",
625
+ type: "button",
626
+ variant: "ghost",
627
+ "aria-label": "Clear value",
628
+ className: O(
629
+ "ms-2",
630
+ r.value.length === 0 ? "opacity-0 pointer-events-none" : "opacity-100"
631
+ ),
632
+ title: "Clear value",
633
+ onClick: () => r.onChange(""),
634
+ children: /* @__PURE__ */ t.jsx(Ce, { size: 16 })
635
+ }
636
+ )
637
+ }
638
+ )
639
+ ] }) })
640
+ ] }, s.id)) }) });
641
+ }, At = (e, n) => {
642
+ const s = fe.forwardRef(({ className: a, asChild: r, ...i }, l) => {
643
+ const u = r ? lt : e;
644
+ return fe.createElement(u, {
645
+ ...i,
646
+ ref: l,
647
+ className: O(n, a)
648
+ });
649
+ });
650
+ return s.displayName = `VariantComponent(${e})`, s;
651
+ }, Vt = At(
652
+ "input",
653
+ "px-2 bg-transparent h-6 font-mono text-xs m-2"
654
+ ), zt = ({
655
+ control: e,
656
+ queryParams: n
657
+ }) => {
658
+ const { fields: s } = oe({
659
+ control: e,
660
+ name: "queryParams"
661
+ }), a = Xe(), r = n.map((u) => !!u.isRequired), l = a.watch("identity") !== J;
662
+ return /* @__PURE__ */ t.jsx("div", { className: "", children: /* @__PURE__ */ t.jsx("table", { className: "w-full [&_td]:border [&_td]:p-1.5 [&_td]:px-2", children: /* @__PURE__ */ t.jsx("tbody", { children: s.filter(
663
+ // TODO remove this hack for Accu or make it more generic
664
+ (u) => !(l && u.name === "apikey")
665
+ ).map((u, d) => /* @__PURE__ */ t.jsxs("tr", { className: "hover:bg-accent/40", children: [
666
+ /* @__PURE__ */ t.jsx("td", { className: "text-center", children: /* @__PURE__ */ t.jsx(
667
+ $,
668
+ {
669
+ control: e,
670
+ name: `queryParams.${d}.active`,
671
+ render: ({ field: c }) => /* @__PURE__ */ t.jsx(
672
+ "input",
673
+ {
674
+ type: "checkbox",
675
+ id: `queryParams.${d}.active`,
676
+ checked: c.value,
677
+ onChange: c.onChange
678
+ }
679
+ )
680
+ }
681
+ ) }),
682
+ /* @__PURE__ */ t.jsx("td", { children: /* @__PURE__ */ t.jsx(
683
+ $,
684
+ {
685
+ control: e,
686
+ render: ({ field: c }) => /* @__PURE__ */ t.jsx(Vt, { asChild: !0, children: /* @__PURE__ */ t.jsxs(
687
+ "label",
688
+ {
689
+ className: "flex items-center cursor-pointer",
690
+ htmlFor: `queryParams.${d}.active`,
691
+ title: r[d] ? "Required field" : void 0,
692
+ children: [
693
+ c.value,
694
+ r[d] && /* @__PURE__ */ t.jsx("sup", { children: " *" })
695
+ ]
696
+ }
697
+ ) }),
698
+ name: `queryParams.${d}.name`
699
+ }
700
+ ) }),
701
+ /* @__PURE__ */ t.jsx("td", { children: /* @__PURE__ */ t.jsxs("div", { className: "flex justify-between items-center", children: [
702
+ /* @__PURE__ */ t.jsx(
703
+ $,
704
+ {
705
+ control: e,
706
+ render: ({ field: c }) => /* @__PURE__ */ t.jsx(
707
+ H,
708
+ {
709
+ ...c,
710
+ onChange: (f) => {
711
+ c.onChange(f.target.value), f.target.value.length > 0 && a.setValue(`queryParams.${d}.active`, !0);
712
+ },
713
+ placeholder: "Enter value",
714
+ className: "w-full border-0 shadow-none text-xs font-mono"
715
+ }
716
+ ),
717
+ name: `queryParams.${d}.value`
718
+ }
719
+ ),
720
+ /* @__PURE__ */ t.jsx(
721
+ $,
722
+ {
723
+ control: e,
724
+ render: ({ field: c }) => /* @__PURE__ */ t.jsx(
725
+ E,
726
+ {
727
+ size: "icon",
728
+ type: "button",
729
+ variant: "ghost",
730
+ "aria-label": "Clear value",
731
+ className: O(
732
+ "ms-2",
733
+ c.value.length === 0 ? "opacity-0 pointer-events-none" : "opacity-100"
734
+ ),
735
+ title: "Clear value",
736
+ onClick: () => c.onChange(""),
737
+ children: /* @__PURE__ */ t.jsx(Ce, { size: 16 })
738
+ }
739
+ ),
740
+ name: `queryParams.${d}.value`
741
+ }
742
+ )
743
+ ] }) })
744
+ ] }, u.id)) }) }) });
745
+ }, Ft = ({
746
+ value: e,
747
+ onChange: n,
748
+ className: s,
749
+ options: a,
750
+ showChevrons: r = !0
751
+ }) => /* @__PURE__ */ t.jsxs("div", { className: "grid", children: [
752
+ /* @__PURE__ */ t.jsx(
753
+ "select",
754
+ {
755
+ className: O(
756
+ "row-start-1 col-start-1 border border-input text-foreground px-2 py-1 pe-6",
757
+ "rounded-md appearance-none bg-zinc-50 hover:bg-white dark:bg-zinc-800 hover:dark:bg-zinc-800/75",
758
+ s
759
+ ),
760
+ value: e,
761
+ onChange: n,
762
+ children: a.map((i) => /* @__PURE__ */ t.jsx("option", { value: i.value, children: i.label }, i.value))
763
+ }
764
+ ),
765
+ /* @__PURE__ */ t.jsx(
766
+ "div",
767
+ {
768
+ className: O(
769
+ !r && "hidden",
770
+ "row-start-1 col-start-1 self-center justify-self-end relative end-2 pointer-events-none"
771
+ ),
772
+ children: /* @__PURE__ */ t.jsx(ze, { size: 14 })
773
+ }
774
+ )
775
+ ] }), Lt = (e) => {
776
+ var s;
777
+ return (s = Object.entries({
778
+ "application/json": "json",
779
+ "text/json": "json",
780
+ "text/html": "html",
781
+ "text/css": "css",
782
+ "text/javascript": "javascript",
783
+ "application/xml": "xml",
784
+ "application/xhtml+xml": "xhtml"
785
+ }).find(
786
+ ([a]) => e.includes(a)
787
+ )) == null ? void 0 : s[1];
788
+ }, Dt = (e) => {
789
+ const n = e.get("Content-Type") || "";
790
+ return Lt(n);
791
+ }, Gt = (e) => {
792
+ try {
793
+ return JSON.stringify(JSON.parse(e), null, 2);
794
+ } catch {
795
+ return null;
796
+ }
797
+ }, Bt = ({
798
+ body: e = "",
799
+ headers: n
800
+ }) => {
801
+ const s = Dt(n), a = Gt(e), r = a || e, [i, l] = Ee(
802
+ a ? "formatted" : "raw"
803
+ );
804
+ return /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-2", children: [
805
+ /* @__PURE__ */ t.jsx(ae, { className: "shadow-none", children: /* @__PURE__ */ t.jsx(
806
+ it,
807
+ {
808
+ language: i === "raw" ? a ? "plain" : s : "json",
809
+ noBackground: !0,
810
+ className: "overflow-x-auto p-4 text-xs max-h-[calc(83.333vh-180px)]",
811
+ code: i === "raw" ? e : r
812
+ }
813
+ ) }),
814
+ a && /* @__PURE__ */ t.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ t.jsx(
815
+ Ft,
816
+ {
817
+ value: i,
818
+ onChange: (u) => l(u.target.value),
819
+ options: [
820
+ { value: "formatted", label: "Formatted" },
821
+ { value: "raw", label: "Raw" }
822
+ ]
823
+ }
824
+ ) })
825
+ ] });
826
+ }, J = "__none", Jt = {
827
+ 200: "OK",
828
+ 201: "Created",
829
+ 202: "Accepted",
830
+ 204: "No Content",
831
+ 400: "Bad Request",
832
+ 401: "Unauthorized",
833
+ 403: "Forbidden",
834
+ 404: "Not Found",
835
+ 405: "Method Not Allowed",
836
+ 500: "Internal Server Error"
837
+ }, Ht = ({
838
+ server: e,
839
+ servers: n,
840
+ url: s,
841
+ method: a,
842
+ headers: r = [],
843
+ queryParams: i = [],
844
+ pathParams: l = [],
845
+ defaultBody: u = ""
846
+ }) => {
847
+ var de, ue;
848
+ const { selectedServer: d, setSelectedServer: c } = tt(), [, f] = He(), { register: h, control: j, handleSubmit: b, watch: w, setValue: v, ...S } = Ye({
849
+ defaultValues: {
850
+ body: u,
851
+ queryParams: i.map((o) => ({
852
+ name: o.name,
853
+ value: o.defaultValue ?? "",
854
+ active: o.defaultActive ?? !1
855
+ })),
856
+ pathParams: l.map((o) => ({
857
+ name: o.name,
858
+ value: o.defaultValue ?? ""
859
+ })),
860
+ headers: r.map((o) => ({
861
+ name: o.name,
862
+ value: o.defaultValue ?? ""
863
+ })),
864
+ identity: J
865
+ }
866
+ }), C = w(), k = Me(), le = $e(!1);
867
+ Te(() => {
868
+ var x;
869
+ if (le.current) return;
870
+ const o = (x = k.data) == null ? void 0 : x.at(0);
871
+ o && (v("identity", o.id), le.current = !0);
872
+ }, [v, k.data]);
873
+ const p = Ke({
874
+ mutationFn: async (o) => {
875
+ var I, q;
876
+ const x = qt(d ?? e, s, o), _ = performance.now(), D = new Request(x, {
877
+ method: a.toUpperCase(),
878
+ headers: Object.fromEntries(
879
+ o.headers.filter((m) => m.name).map((m) => [m.name, m.value])
880
+ ),
881
+ body: o.body ? o.body : void 0
882
+ });
883
+ o.identity !== J && ((q = (I = k.data) == null ? void 0 : I.find((m) => m.id === o.identity)) == null || q.authorizeRequest(D));
884
+ try {
885
+ const m = await fetch(D, {
886
+ signal: AbortSignal.timeout(5e3)
887
+ }), G = performance.now() - _, B = await m.text();
888
+ return {
889
+ status: m.status,
890
+ headers: m.headers,
891
+ size: B.length,
892
+ body: B,
893
+ time: G
894
+ };
895
+ } catch (m) {
896
+ throw m instanceof TypeError ? new Error(
897
+ "The request failed, possibly due to network issues or CORS policy."
898
+ ) : m;
899
+ }
900
+ }
901
+ }), ke = s.split("/").map((o, x, _) => {
902
+ var G;
903
+ const D = o.startsWith("{") && o.endsWith("}") || o.startsWith(":"), I = o.replace(/[:{}]/g, ""), q = (G = C.pathParams.find((B) => B.name === I)) == null ? void 0 : G.value, m = q ? /* @__PURE__ */ t.jsx(Pe, { backgroundOpacity: "25%", name: o, slug: o, children: encodeURIComponent(q) }) : /* @__PURE__ */ t.jsx(
904
+ "span",
905
+ {
906
+ className: "underline decoration-wavy decoration-red-500",
907
+ title: `Missing value for path parameter \`${I}\``,
908
+ children: o
909
+ }
910
+ );
911
+ return (
912
+ // eslint-disable-next-line react/no-array-index-key
913
+ /* @__PURE__ */ t.jsxs(Z, { children: [
914
+ D ? m : o,
915
+ x < _.length - 1 && "/",
916
+ /* @__PURE__ */ t.jsx("wbr", {})
917
+ ] }, o + x)
918
+ );
919
+ }), U = Array.from(((de = p.data) == null ? void 0 : de.headers.entries()) ?? []), ce = C.queryParams.filter((o) => o.active).map((o, x, _) => /* @__PURE__ */ t.jsxs(Z, { children: [
920
+ o.name,
921
+ "=",
922
+ encodeURIComponent(o.value).replaceAll("%20", "+"),
923
+ x < _.length - 1 && "&",
924
+ /* @__PURE__ */ t.jsx("wbr", {})
925
+ ] }, o.name)), _e = /* @__PURE__ */ t.jsx("div", { className: "inline-block opacity-50 hover:opacity-100 transition", children: n && n.length > 1 ? /* @__PURE__ */ t.jsxs(
926
+ xe,
927
+ {
928
+ onValueChange: (o) => {
929
+ f(() => {
930
+ c(o);
931
+ });
932
+ },
933
+ value: d,
934
+ children: [
935
+ /* @__PURE__ */ t.jsx(ye, { className: "p-0 border-none flex-row-reverse bg-transparent text-xs gap-0.5 h-auto", children: /* @__PURE__ */ t.jsx(ge, {}) }),
936
+ /* @__PURE__ */ t.jsx(ve, { children: n.map((o) => /* @__PURE__ */ t.jsx(K, { value: o, children: o.replace(/^https?:\/\//, "") }, o)) })
937
+ ]
938
+ }
939
+ ) : /* @__PURE__ */ t.jsx("span", { children: e.replace(/^https?:\/\//, "") }) });
940
+ return /* @__PURE__ */ t.jsx(
941
+ et,
942
+ {
943
+ register: h,
944
+ control: j,
945
+ handleSubmit: b,
946
+ watch: w,
947
+ setValue: v,
948
+ ...S,
949
+ children: /* @__PURE__ */ t.jsx("form", { onSubmit: b((o) => p.mutateAsync(o)), children: /* @__PURE__ */ t.jsxs("div", { className: "grid grid-cols-[8fr_7fr] text-sm h-full", children: [
950
+ /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-4 p-8 bg-muted/50 after:bg-muted-foreground/20 relative after:absolute after:w-px after:inset-0 after:left-auto", children: [
951
+ /* @__PURE__ */ t.jsxs("div", { className: "flex gap-2 items-stretch", children: [
952
+ /* @__PURE__ */ t.jsxs("div", { className: "flex flex-1 items-center w-full border rounded-md", children: [
953
+ /* @__PURE__ */ t.jsx("div", { className: "border-r p-2 bg-muted rounded-l-md self-stretch font-semibold font-mono", children: a.toUpperCase() }),
954
+ /* @__PURE__ */ t.jsxs("div", { className: "flex items-center flex-wrap p-2 font-mono text-xs", children: [
955
+ _e,
956
+ ke,
957
+ ce.length > 0 ? "?" : "",
958
+ ce
959
+ ] })
960
+ ] }),
961
+ /* @__PURE__ */ t.jsx(E, { type: "submit", className: "h-auto flex gap-1", children: "Send" })
962
+ ] }),
963
+ /* @__PURE__ */ t.jsxs(
964
+ be,
965
+ {
966
+ defaultValue: i.length + l.length > 0 ? "parameters" : "headers",
967
+ children: [
968
+ /* @__PURE__ */ t.jsxs("div", { className: "flex flex-wrap gap-1 justify-between", children: [
969
+ /* @__PURE__ */ t.jsxs(Ne, { children: [
970
+ i.length + l.length > 0 && /* @__PURE__ */ t.jsx(A, { value: "parameters", children: "Parameters" }),
971
+ /* @__PURE__ */ t.jsxs(A, { value: "headers", children: [
972
+ "Headers",
973
+ " ",
974
+ C.headers.length > 0 && `(${C.headers.length})`
975
+ ] }),
976
+ /* @__PURE__ */ t.jsx(
977
+ A,
978
+ {
979
+ value: "body",
980
+ disabled: !["POST", "PUT", "PATCH", "DELETE"].includes(
981
+ a.toUpperCase()
982
+ ),
983
+ children: "Body"
984
+ }
985
+ )
986
+ ] }),
987
+ /* @__PURE__ */ t.jsxs("div", { className: "flex gap-2 items-center", children: [
988
+ "Auth:",
989
+ /* @__PURE__ */ t.jsxs(
990
+ xe,
991
+ {
992
+ onValueChange: (o) => v("identity", o),
993
+ value: C.identity,
994
+ defaultValue: C.identity,
995
+ children: [
996
+ /* @__PURE__ */ t.jsx(ye, { className: "w-[180px] flex", children: k.isPending ? /* @__PURE__ */ t.jsx(je, {}) : /* @__PURE__ */ t.jsx(ge, {}) }),
997
+ /* @__PURE__ */ t.jsxs(ve, { align: "center", children: [
998
+ /* @__PURE__ */ t.jsx(K, { value: J, children: "None" }),
999
+ (ue = k.data) == null ? void 0 : ue.map((o) => /* @__PURE__ */ t.jsx(K, { value: o.id, children: o.label }, o.id))
1000
+ ] })
1001
+ ]
1002
+ }
1003
+ )
1004
+ ] })
1005
+ ] }),
1006
+ /* @__PURE__ */ t.jsx(V, { value: "headers", children: /* @__PURE__ */ t.jsx(Rt, { control: j, register: h }) }),
1007
+ /* @__PURE__ */ t.jsxs(V, { value: "parameters", children: [
1008
+ l.length > 0 && /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
1009
+ /* @__PURE__ */ t.jsx("span", { className: "font-semibold", children: "Path Parameters" }),
1010
+ /* @__PURE__ */ t.jsx(Mt, { control: j })
1011
+ ] }),
1012
+ i.length > 0 && /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
1013
+ /* @__PURE__ */ t.jsx("span", { className: "font-semibold", children: "Query Parameters" }),
1014
+ /* @__PURE__ */ t.jsx(zt, { control: j, queryParams: i })
1015
+ ] })
1016
+ ] }),
1017
+ /* @__PURE__ */ t.jsx(V, { value: "body", children: /* @__PURE__ */ t.jsx(
1018
+ "textarea",
1019
+ {
1020
+ ...h("body"),
1021
+ className: "border w-full rounded p-2 bg-muted h-40"
1022
+ }
1023
+ ) })
1024
+ ]
1025
+ }
1026
+ )
1027
+ ] }),
1028
+ /* @__PURE__ */ t.jsx("div", { className: "min-w-0 p-8 bg-muted/70", children: p.error ? /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-2", children: [
1029
+ C.pathParams.some((o) => o.value === "") && /* @__PURE__ */ t.jsx(nt, { type: "caution", children: "Some path parameters are missing values. Please fill them in to ensure the request is sent correctly." }),
1030
+ /* @__PURE__ */ t.jsxs(ae, { children: [
1031
+ /* @__PURE__ */ t.jsx(st, { children: /* @__PURE__ */ t.jsx(rt, { children: "Request failed" }) }),
1032
+ /* @__PURE__ */ t.jsxs(at, { children: [
1033
+ "Error:",
1034
+ " ",
1035
+ p.error.message || String(p.error) || "Unexpected error"
1036
+ ] })
1037
+ ] })
1038
+ ] }) : p.data ? /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-2", children: [
1039
+ /* @__PURE__ */ t.jsx("div", { className: "flex gap-2", children: /* @__PURE__ */ t.jsxs("div", { className: "flex text-xs gap-6", children: [
1040
+ /* @__PURE__ */ t.jsxs("div", { children: [
1041
+ "Status: ",
1042
+ p.data.status,
1043
+ " ",
1044
+ Jt[p.data.status] ?? ""
1045
+ ] }),
1046
+ /* @__PURE__ */ t.jsxs("div", { children: [
1047
+ "Time: ",
1048
+ p.data.time.toFixed(0),
1049
+ "ms"
1050
+ ] }),
1051
+ /* @__PURE__ */ t.jsxs("div", { children: [
1052
+ "Size: ",
1053
+ p.data.size,
1054
+ " B"
1055
+ ] })
1056
+ ] }) }),
1057
+ /* @__PURE__ */ t.jsxs(be, { defaultValue: "response", children: [
1058
+ /* @__PURE__ */ t.jsxs(Ne, { children: [
1059
+ /* @__PURE__ */ t.jsx(A, { value: "response", children: "Response" }),
1060
+ /* @__PURE__ */ t.jsx(A, { value: "headers", children: U.length ? `Headers (${U.length})` : "No headers" })
1061
+ ] }),
1062
+ /* @__PURE__ */ t.jsx(V, { value: "response", children: /* @__PURE__ */ t.jsx(
1063
+ Bt,
1064
+ {
1065
+ headers: p.data.headers,
1066
+ body: p.data.body
1067
+ }
1068
+ ) }),
1069
+ /* @__PURE__ */ t.jsx(V, { value: "headers", children: /* @__PURE__ */ t.jsxs(
1070
+ ae,
1071
+ {
1072
+ className: "max-h-[calc(83.333vh-140px)] overflow-y-auto grid grid-cols-2 w-full gap-2.5 font-mono text-xs shadow-none p-4",
1073
+ children: [
1074
+ /* @__PURE__ */ t.jsx("div", { className: "font-semibold", children: "Key" }),
1075
+ /* @__PURE__ */ t.jsx("div", { className: "font-semibold", children: "Value" }),
1076
+ U.map(([o, x]) => /* @__PURE__ */ t.jsxs(Z, { children: [
1077
+ /* @__PURE__ */ t.jsx("div", { children: o }),
1078
+ /* @__PURE__ */ t.jsx("div", { className: "break-words", children: x })
1079
+ ] }, o))
1080
+ ]
1081
+ }
1082
+ ) })
1083
+ ] })
1084
+ ] }) : /* @__PURE__ */ t.jsx("div", { className: "grid place-items-center h-full", children: /* @__PURE__ */ t.jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children: p.isPending ? /* @__PURE__ */ t.jsx(je, {}) : "Send a request first to see the response here" }) }) })
1085
+ ] }) })
1086
+ }
1087
+ );
1088
+ }, Qt = ({
1089
+ className: e,
1090
+ size: n = 16
1091
+ }) => /* @__PURE__ */ t.jsx(
1092
+ "svg",
1093
+ {
1094
+ xmlns: "http://www.w3.org/2000/svg",
1095
+ viewBox: "0 0 24 24",
1096
+ fill: "currentColor",
1097
+ className: e,
1098
+ width: n,
1099
+ height: n,
1100
+ children: /* @__PURE__ */ t.jsx(
1101
+ "path",
1102
+ {
1103
+ fillRule: "evenodd",
1104
+ d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm14.024-.983a1.125 1.125 0 0 1 0 1.966l-5.603 3.113A1.125 1.125 0 0 1 9 15.113V8.887c0-.857.921-1.4 1.671-.983l5.603 3.113Z",
1105
+ clipRule: "evenodd"
1106
+ }
1107
+ )
1108
+ }
1109
+ ), Ut = (e) => {
1110
+ const [n, s] = Ee(!1);
1111
+ return /* @__PURE__ */ t.jsxs(Qe, { onOpenChange: (a) => s(a), children: [
1112
+ /* @__PURE__ */ t.jsx(Ue, { asChild: !0, children: e.children ?? /* @__PURE__ */ t.jsxs("button", { className: "flex gap-1 items-center px-2 py-1 rounded-md bg-primary/80 hover:bg-primary transition text-primary-foreground text-xs", children: [
1113
+ "Test",
1114
+ /* @__PURE__ */ t.jsx(Qt, { className: "", size: 14 })
1115
+ ] }) }),
1116
+ /* @__PURE__ */ t.jsxs(
1117
+ We,
1118
+ {
1119
+ className: "max-w-screen-xl w-full h-5/6 overflow-auto p-0",
1120
+ "aria-describedby": void 0,
1121
+ children: [
1122
+ /* @__PURE__ */ t.jsx(Je, { children: /* @__PURE__ */ t.jsx(Ze, { children: "Playground" }) }),
1123
+ n && /* @__PURE__ */ t.jsx(Ht, { ...e })
1124
+ ]
1125
+ }
1126
+ )
1127
+ ] });
1128
+ }, Se = ft(`
1129
+ query GetCategories($input: JSON!, $type: SchemaType!) {
1130
+ schema(input: $input, type: $type) {
1131
+ url
1132
+ tags {
1133
+ __typename
1134
+ name
1135
+ operations {
1136
+ __typename
1137
+ slug
1138
+ deprecated
1139
+ method
1140
+ summary
1141
+ operationId
1142
+ path
1143
+ }
1144
+ }
1145
+ }
1146
+ }
1147
+ `), Wt = {
1148
+ get: "green",
1149
+ post: "blue",
1150
+ put: "yellow",
1151
+ delete: "red",
1152
+ patch: "purple",
1153
+ options: "gray",
1154
+ head: "gray"
1155
+ }, jn = (e) => {
1156
+ const n = he(e.navigationId ?? "/reference"), s = e.type === "file" ? Object.keys(e.input) : [], a = new kt(e);
1157
+ return {
1158
+ getHead: () => {
1159
+ if (e.type === "url" && !e.skipPreload)
1160
+ return /* @__PURE__ */ t.jsx(
1161
+ "link",
1162
+ {
1163
+ rel: "preload",
1164
+ href: e.input,
1165
+ as: "fetch",
1166
+ crossOrigin: "anonymous"
1167
+ }
1168
+ );
1169
+ if (e.server)
1170
+ return /* @__PURE__ */ t.jsx("link", { rel: "preconnect", href: e.server });
1171
+ },
1172
+ getMdxComponents: () => ({
1173
+ OpenPlaygroundButton: ({
1174
+ requireAuth: r,
1175
+ server: i,
1176
+ method: l,
1177
+ url: u,
1178
+ ...d
1179
+ }) => {
1180
+ var h;
1181
+ const c = De(), f = Ae({
1182
+ queryFn: () => a.fetch(Se, {
1183
+ type: e.type,
1184
+ input: e.input
1185
+ }),
1186
+ enabled: !i,
1187
+ queryKey: ["playground-server"]
1188
+ });
1189
+ return r && !c.isAuthenticated ? /* @__PURE__ */ t.jsxs(
1190
+ E,
1191
+ {
1192
+ className: "gap-2 items-center",
1193
+ variant: "outline",
1194
+ onClick: c.login,
1195
+ children: [
1196
+ "Login to open in Playground ",
1197
+ /* @__PURE__ */ t.jsx(Fe, { size: 16 })
1198
+ ]
1199
+ }
1200
+ ) : /* @__PURE__ */ t.jsx(
1201
+ Ut,
1202
+ {
1203
+ url: u ?? "/",
1204
+ method: l ?? "get",
1205
+ server: i ?? ((h = f.data) == null ? void 0 : h.schema.url) ?? "https://example.com",
1206
+ ...d,
1207
+ children: /* @__PURE__ */ t.jsxs(E, { className: "gap-2 items-center", variant: "outline", children: [
1208
+ "Open in Playground ",
1209
+ /* @__PURE__ */ t.jsx(Le, { size: 16 })
1210
+ ] })
1211
+ }
1212
+ );
1213
+ }
1214
+ }),
1215
+ getSidebar: async (r) => {
1216
+ if (!Re({ path: n, end: !1 }, r))
1217
+ return [];
1218
+ try {
1219
+ const i = s.find((d) => r === he(n, d)) ?? Object.keys(e.input).at(0), u = (await a.fetch(Se, {
1220
+ type: e.type,
1221
+ input: e.type === "file" ? e.input[i] : e.input,
1222
+ version: i
1223
+ })).schema.tags.filter((d) => d.operations.length > 0).map((d) => ({
1224
+ type: "category",
1225
+ label: d.name || "Other endpoints",
1226
+ collapsible: !0,
1227
+ collapsed: !1,
1228
+ items: d.operations.map((c) => ({
1229
+ type: "link",
1230
+ label: c.summary ?? c.path,
1231
+ href: `#${c.slug}`,
1232
+ badge: {
1233
+ label: c.method,
1234
+ color: Wt[c.method.toLowerCase()]
1235
+ }
1236
+ }))
1237
+ }));
1238
+ return u.unshift({
1239
+ type: "link",
1240
+ label: "Overview",
1241
+ href: "#description"
1242
+ }), u;
1243
+ } catch {
1244
+ return [];
1245
+ }
1246
+ },
1247
+ getRoutes: () => [
1248
+ {
1249
+ path: n + "/:version?",
1250
+ async lazy() {
1251
+ const { OpenApiRoute: r } = await import("./Route-C8nwd9A2.js");
1252
+ return {
1253
+ element: /* @__PURE__ */ t.jsx(
1254
+ r,
1255
+ {
1256
+ basePath: n,
1257
+ versions: s,
1258
+ client: a,
1259
+ config: e
1260
+ }
1261
+ )
1262
+ };
1263
+ },
1264
+ children: [
1265
+ {
1266
+ index: !0,
1267
+ async lazy() {
1268
+ const { OperationList: r } = await import("./OperationList-n4U_BHmO.js");
1269
+ return { element: /* @__PURE__ */ t.jsx(r, {}) };
1270
+ }
1271
+ }
1272
+ ]
1273
+ }
1274
+ ]
1275
+ };
1276
+ };
1277
+ export {
1278
+ Pe as C,
1279
+ Ut as P,
1280
+ Ft as S,
1281
+ ft as g,
1282
+ jn as o
1283
+ };
1284
+ //# sourceMappingURL=index-DStSNvP-.js.map