zudoku 0.0.0-fb7d300 → 0.0.0-fc93837

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 (760) hide show
  1. package/client.d.ts +7 -0
  2. package/dist/app/demo.js +1 -2
  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 -15
  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 +2 -2
  11. package/dist/app/main.js +21 -8
  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 -2
  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/cmds/dev.js +5 -0
  26. package/dist/cli/cmds/dev.js.map +1 -1
  27. package/dist/cli/common/logger.js +9 -0
  28. package/dist/cli/common/logger.js.map +1 -1
  29. package/dist/cli/common/outdated.js +2 -1
  30. package/dist/cli/common/outdated.js.map +1 -1
  31. package/dist/cli/dev/handler.d.ts +1 -0
  32. package/dist/cli/dev/handler.js +3 -3
  33. package/dist/cli/dev/handler.js.map +1 -1
  34. package/dist/config/common.d.ts +8 -0
  35. package/dist/config/common.js +2 -0
  36. package/dist/config/common.js.map +1 -0
  37. package/dist/config/config.d.ts +4 -2
  38. package/dist/config/loader.d.ts +20 -0
  39. package/dist/config/loader.js +154 -0
  40. package/dist/config/loader.js.map +1 -0
  41. package/dist/config/validators/InputSidebarSchema.d.ts +29 -13
  42. package/dist/config/validators/InputSidebarSchema.js +1 -0
  43. package/dist/config/validators/InputSidebarSchema.js.map +1 -1
  44. package/dist/config/validators/common.d.ts +5034 -0
  45. package/dist/config/validators/common.js +287 -0
  46. package/dist/config/validators/common.js.map +1 -0
  47. package/dist/config/validators/icon-types.d.ts +1 -0
  48. package/dist/config/validators/icon-types.js +2 -0
  49. package/dist/config/validators/icon-types.js.map +1 -0
  50. package/dist/config/validators/validate.d.ts +835 -526
  51. package/dist/config/validators/validate.js +9 -228
  52. package/dist/config/validators/validate.js.map +1 -1
  53. package/dist/lib/authentication/components/CallbackHandler.js +1 -1
  54. package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
  55. package/dist/lib/authentication/components/SignIn.js +1 -1
  56. package/dist/lib/authentication/components/SignIn.js.map +1 -1
  57. package/dist/lib/authentication/components/SignOut.js +2 -2
  58. package/dist/lib/authentication/components/SignOut.js.map +1 -1
  59. package/dist/lib/authentication/providers/auth0.js +1 -1
  60. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  61. package/dist/lib/authentication/providers/clerk.js +29 -6
  62. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  63. package/dist/lib/authentication/providers/openid.d.ts +8 -1
  64. package/dist/lib/authentication/providers/openid.js +21 -10
  65. package/dist/lib/authentication/providers/openid.js.map +1 -1
  66. package/dist/lib/components/AnchorLink.d.ts +1 -1
  67. package/dist/lib/components/AnchorLink.js +6 -3
  68. package/dist/lib/components/AnchorLink.js.map +1 -1
  69. package/dist/lib/components/Autocomplete.d.ts +12 -0
  70. package/dist/lib/components/Autocomplete.js +47 -0
  71. package/dist/lib/components/Autocomplete.js.map +1 -0
  72. package/dist/lib/components/Bootstrap.d.ts +1 -2
  73. package/dist/lib/components/Bootstrap.js +3 -3
  74. package/dist/lib/components/Bootstrap.js.map +1 -1
  75. package/dist/lib/components/Header.js +15 -15
  76. package/dist/lib/components/Header.js.map +1 -1
  77. package/dist/lib/components/Heading.d.ts +4 -4
  78. package/dist/lib/components/Heading.js +1 -1
  79. package/dist/lib/components/Heading.js.map +1 -1
  80. package/dist/lib/components/Layout.js +4 -3
  81. package/dist/lib/components/Layout.js.map +1 -1
  82. package/dist/lib/components/Markdown.d.ts +2 -2
  83. package/dist/lib/components/Markdown.js +4 -2
  84. package/dist/lib/components/Markdown.js.map +1 -1
  85. package/dist/lib/components/MobileTopNavigation.js +1 -1
  86. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  87. package/dist/lib/components/NotFoundPage.js +1 -1
  88. package/dist/lib/components/NotFoundPage.js.map +1 -1
  89. package/dist/lib/components/ReactMarkdown.d.ts +29 -0
  90. package/dist/lib/components/ReactMarkdown.js +182 -0
  91. package/dist/lib/components/ReactMarkdown.js.map +1 -0
  92. package/dist/lib/components/Search.d.ts +3 -1
  93. package/dist/lib/components/Search.js +3 -3
  94. package/dist/lib/components/Search.js.map +1 -1
  95. package/dist/lib/components/SlotletProvider.d.ts +2 -2
  96. package/dist/lib/components/StatusPage.d.ts +7 -0
  97. package/dist/lib/components/StatusPage.js +71 -0
  98. package/dist/lib/components/StatusPage.js.map +1 -0
  99. package/dist/lib/components/SyntaxHighlight.d.ts +2 -1
  100. package/dist/lib/components/SyntaxHighlight.js +2 -6
  101. package/dist/lib/components/SyntaxHighlight.js.map +1 -1
  102. package/dist/lib/components/ThemeSwitch.js +4 -4
  103. package/dist/lib/components/ThemeSwitch.js.map +1 -1
  104. package/dist/lib/components/TopNavigation.d.ts +1 -1
  105. package/dist/lib/components/TopNavigation.js +3 -3
  106. package/dist/lib/components/TopNavigation.js.map +1 -1
  107. package/dist/lib/components/Zudoku.js +1 -1
  108. package/dist/lib/components/Zudoku.js.map +1 -1
  109. package/dist/lib/components/cache.d.ts +6 -0
  110. package/dist/lib/components/cache.js +13 -0
  111. package/dist/lib/components/cache.js.map +1 -0
  112. package/dist/lib/components/context/ViewportAnchorContext.js +16 -4
  113. package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
  114. package/dist/lib/components/context/ZudokuContext.js +3 -2
  115. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  116. package/dist/lib/components/index.d.ts +26 -15
  117. package/dist/lib/components/index.js +10 -3
  118. package/dist/lib/components/index.js.map +1 -1
  119. package/dist/lib/components/navigation/Sidebar.d.ts +3 -1
  120. package/dist/lib/components/navigation/Sidebar.js +2 -2
  121. package/dist/lib/components/navigation/Sidebar.js.map +1 -1
  122. package/dist/lib/components/navigation/SidebarBadge.d.ts +4 -3
  123. package/dist/lib/components/navigation/SidebarBadge.js +11 -11
  124. package/dist/lib/components/navigation/SidebarBadge.js.map +1 -1
  125. package/dist/lib/components/navigation/SidebarCategory.d.ts +2 -2
  126. package/dist/lib/components/navigation/SidebarCategory.js +5 -6
  127. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  128. package/dist/lib/components/navigation/SidebarItem.d.ts +2 -4
  129. package/dist/lib/components/navigation/SidebarItem.js +7 -12
  130. package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
  131. package/dist/lib/components/navigation/SidebarWrapper.js +1 -1
  132. package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
  133. package/dist/lib/components/navigation/utils.js +1 -1
  134. package/dist/lib/components/navigation/utils.js.map +1 -1
  135. package/dist/lib/core/RouteGuard.d.ts +1 -0
  136. package/dist/lib/core/RouteGuard.js +28 -0
  137. package/dist/lib/core/RouteGuard.js.map +1 -0
  138. package/dist/lib/core/ZudokuContext.d.ts +5 -3
  139. package/dist/lib/core/ZudokuContext.js +9 -7
  140. package/dist/lib/core/ZudokuContext.js.map +1 -1
  141. package/dist/lib/core/plugins.d.ts +3 -5
  142. package/dist/lib/core/plugins.js.map +1 -1
  143. package/dist/lib/errors/RouterError.js +1 -1
  144. package/dist/lib/errors/RouterError.js.map +1 -1
  145. package/dist/lib/oas/graphql/circular.d.ts +3 -0
  146. package/dist/lib/oas/graphql/circular.js +27 -0
  147. package/dist/lib/oas/graphql/circular.js.map +1 -0
  148. package/dist/lib/oas/graphql/index.d.ts +3 -0
  149. package/dist/lib/oas/graphql/index.js +37 -23
  150. package/dist/lib/oas/graphql/index.js.map +1 -1
  151. package/dist/lib/oas/parser/dereference/index.js +6 -3
  152. package/dist/lib/oas/parser/dereference/index.js.map +1 -1
  153. package/dist/lib/oas/parser/upgrade/index.d.ts +2 -2
  154. package/dist/lib/oas/parser/upgrade/index.js +19 -22
  155. package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
  156. package/dist/lib/plugins/api-catalog/Catalog.d.ts +2 -0
  157. package/dist/lib/plugins/api-catalog/Catalog.js +36 -0
  158. package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -0
  159. package/dist/lib/plugins/api-catalog/index.d.ts +30 -0
  160. package/dist/lib/plugins/api-catalog/index.js +15 -0
  161. package/dist/lib/plugins/api-catalog/index.js.map +1 -0
  162. package/dist/lib/plugins/api-keys/CreateApiKey.js +1 -1
  163. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
  164. package/dist/lib/plugins/api-keys/ProtectedRoute.js +1 -1
  165. package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -1
  166. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +1 -1
  167. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  168. package/dist/lib/plugins/markdown/MdxPage.d.ts +9 -1
  169. package/dist/lib/plugins/markdown/MdxPage.js +22 -3
  170. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  171. package/dist/lib/plugins/markdown/index.d.ts +3 -1
  172. package/dist/lib/plugins/markdown/index.js +1 -1
  173. package/dist/lib/plugins/markdown/index.js.map +1 -1
  174. package/dist/lib/plugins/markdown/resolver.js.map +1 -1
  175. package/dist/lib/plugins/openapi/CollapsibleCode.js +2 -1
  176. package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -1
  177. package/dist/lib/plugins/openapi/ColorizedParam.d.ts +10 -2
  178. package/dist/lib/plugins/openapi/ColorizedParam.js +16 -7
  179. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  180. package/dist/lib/plugins/openapi/Endpoint.d.ts +1 -1
  181. package/dist/lib/plugins/openapi/Endpoint.js +3 -1
  182. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  183. package/dist/lib/plugins/openapi/OperationList.js +27 -3
  184. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  185. package/dist/lib/plugins/openapi/OperationListItem.d.ts +2 -1
  186. package/dist/lib/plugins/openapi/OperationListItem.js +14 -4
  187. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  188. package/dist/lib/plugins/openapi/ParameterListItem.js +3 -2
  189. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  190. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +3 -1
  191. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +5 -2
  192. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
  193. package/dist/lib/plugins/openapi/RequestBodySidecarBox.d.ts +4 -5
  194. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +4 -14
  195. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  196. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +7 -13
  197. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  198. package/dist/lib/plugins/openapi/Route.d.ts +4 -2
  199. package/dist/lib/plugins/openapi/Route.js +22 -2
  200. package/dist/lib/plugins/openapi/Route.js.map +1 -1
  201. package/dist/lib/plugins/openapi/Sidecar.js +14 -21
  202. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  203. package/dist/lib/plugins/openapi/SidecarBox.js +4 -4
  204. package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
  205. package/dist/lib/plugins/openapi/SidecarExamples.d.ts +9 -0
  206. package/dist/lib/plugins/openapi/SidecarExamples.js +65 -0
  207. package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -0
  208. package/dist/lib/plugins/openapi/client/GraphQLClient.d.ts +1 -1
  209. package/dist/lib/plugins/openapi/client/GraphQLClient.js +22 -81
  210. package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -1
  211. package/dist/lib/plugins/openapi/client/createServer.d.ts +2 -1
  212. package/dist/lib/plugins/openapi/client/createServer.js +5 -2
  213. package/dist/lib/plugins/openapi/client/createServer.js.map +1 -1
  214. package/dist/lib/plugins/openapi/context.d.ts +3 -3
  215. package/dist/lib/plugins/openapi/graphql/gql.d.ts +1 -1
  216. package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
  217. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  218. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +2 -0
  219. package/dist/lib/plugins/openapi/graphql/graphql.js +1 -0
  220. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  221. package/dist/lib/plugins/openapi/index.d.ts +2 -1
  222. package/dist/lib/plugins/openapi/index.js +23 -28
  223. package/dist/lib/plugins/openapi/index.js.map +1 -1
  224. package/dist/lib/plugins/openapi/interfaces.d.ts +26 -2
  225. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +6 -0
  226. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +12 -0
  227. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -0
  228. package/dist/lib/plugins/openapi/playground/Headers.js +67 -4
  229. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  230. package/dist/lib/plugins/openapi/playground/ParamsGrid.d.ts +5 -0
  231. package/dist/lib/plugins/openapi/playground/ParamsGrid.js +4 -0
  232. package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -0
  233. package/dist/lib/plugins/openapi/playground/PathParams.js +4 -7
  234. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  235. package/dist/lib/plugins/openapi/playground/Playground.d.ts +21 -1
  236. package/dist/lib/plugins/openapi/playground/Playground.js +57 -41
  237. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  238. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
  239. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  240. package/dist/lib/plugins/openapi/playground/QueryParams.js +20 -14
  241. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  242. package/dist/lib/plugins/openapi/playground/SubmitButton.d.ts +7 -0
  243. package/dist/lib/plugins/openapi/playground/SubmitButton.js +22 -0
  244. package/dist/lib/plugins/openapi/playground/SubmitButton.js.map +1 -0
  245. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.d.ts +7 -0
  246. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +11 -0
  247. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js.map +1 -0
  248. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +8 -0
  249. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +95 -0
  250. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -0
  251. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +7 -0
  252. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +16 -0
  253. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -0
  254. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.d.ts +10 -0
  255. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js +32 -0
  256. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js.map +1 -0
  257. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.d.ts +1 -0
  258. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.js +56 -0
  259. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.js.map +1 -0
  260. package/dist/lib/plugins/openapi/post-processors/removeExtensions.d.ts +7 -0
  261. package/dist/lib/plugins/openapi/post-processors/removeExtensions.js +16 -0
  262. package/dist/lib/plugins/openapi/post-processors/removeExtensions.js.map +1 -0
  263. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.d.ts +1 -0
  264. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js +174 -0
  265. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js.map +1 -0
  266. package/dist/lib/plugins/openapi/post-processors/removeParameters.d.ts +10 -0
  267. package/dist/lib/plugins/openapi/post-processors/removeParameters.js +66 -0
  268. package/dist/lib/plugins/openapi/post-processors/removeParameters.js.map +1 -0
  269. package/dist/lib/plugins/openapi/post-processors/removeParameters.test.d.ts +1 -0
  270. package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js +131 -0
  271. package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js.map +1 -0
  272. package/dist/lib/plugins/openapi/post-processors/removePaths.d.ts +11 -0
  273. package/dist/lib/plugins/openapi/post-processors/removePaths.js +33 -0
  274. package/dist/lib/plugins/openapi/post-processors/removePaths.js.map +1 -0
  275. package/dist/lib/plugins/openapi/post-processors/removePaths.test.d.ts +1 -0
  276. package/dist/lib/plugins/openapi/post-processors/removePaths.test.js +104 -0
  277. package/dist/lib/plugins/openapi/post-processors/removePaths.test.js.map +1 -0
  278. package/dist/lib/plugins/openapi/post-processors/traverse.d.ts +1 -0
  279. package/dist/lib/plugins/openapi/post-processors/traverse.js +2 -0
  280. package/dist/lib/plugins/openapi/post-processors/traverse.js.map +1 -0
  281. package/dist/lib/plugins/openapi/schema/SchemaComponents.js +9 -2
  282. package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +1 -1
  283. package/dist/lib/plugins/openapi/util/generateSchemaExample.js +19 -11
  284. package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
  285. package/dist/lib/plugins/openapi/util/methodToColor.d.ts +20 -0
  286. package/dist/lib/plugins/openapi/util/methodToColor.js +24 -0
  287. package/dist/lib/plugins/openapi/util/methodToColor.js.map +1 -0
  288. package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.d.ts +1 -0
  289. package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.js +27 -0
  290. package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.js.map +1 -0
  291. package/dist/lib/plugins/redirect/index.d.ts +1 -1
  292. package/dist/lib/plugins/redirect/index.js +1 -1
  293. package/dist/lib/plugins/redirect/index.js.map +1 -1
  294. package/dist/lib/plugins/search-inkeep/index.d.ts +22 -3
  295. package/dist/lib/plugins/search-inkeep/index.js +41 -5
  296. package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
  297. package/dist/lib/plugins/search-inkeep/inkeep.d.ts +3 -4
  298. package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -1
  299. package/dist/lib/ui/Badge.d.ts +1 -1
  300. package/dist/lib/ui/Badge.js +2 -1
  301. package/dist/lib/ui/Badge.js.map +1 -1
  302. package/dist/lib/ui/Button.d.ts +1 -1
  303. package/dist/lib/ui/Card.js +1 -1
  304. package/dist/lib/ui/Card.js.map +1 -1
  305. package/dist/lib/ui/Checkbox.d.ts +8 -2
  306. package/dist/lib/ui/Checkbox.js +13 -1
  307. package/dist/lib/ui/Checkbox.js.map +1 -1
  308. package/dist/lib/ui/Command.d.ts +10 -2
  309. package/dist/lib/ui/Command.js +5 -1
  310. package/dist/lib/ui/Command.js.map +1 -1
  311. package/dist/lib/ui/Select.js +2 -2
  312. package/dist/lib/ui/Select.js.map +1 -1
  313. package/dist/lib/util/MdxComponents.d.ts +18 -19
  314. package/dist/lib/util/MdxComponents.js +3 -5
  315. package/dist/lib/util/MdxComponents.js.map +1 -1
  316. package/dist/lib/util/createVariantComponent.d.ts +2 -2
  317. package/dist/lib/util/joinUrl.d.ts +1 -0
  318. package/dist/lib/util/joinUrl.js +40 -0
  319. package/dist/lib/util/joinUrl.js.map +1 -0
  320. package/dist/lib/util/traverse.d.ts +9 -0
  321. package/dist/lib/util/traverse.js +22 -0
  322. package/dist/lib/util/traverse.js.map +1 -0
  323. package/dist/lib/util/useExposedProps.js +1 -1
  324. package/dist/lib/util/useExposedProps.js.map +1 -1
  325. package/dist/lib/util/useOnScreen.d.ts +1 -1
  326. package/dist/lib/util/useScrollToAnchor.d.ts +1 -0
  327. package/dist/lib/util/useScrollToAnchor.js +27 -16
  328. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  329. package/dist/lib/util/useScrollToTop.js +1 -1
  330. package/dist/lib/util/useScrollToTop.js.map +1 -1
  331. package/dist/vite/api/schema-codegen.d.ts +12 -0
  332. package/dist/vite/api/schema-codegen.js +62 -0
  333. package/dist/vite/api/schema-codegen.js.map +1 -0
  334. package/dist/vite/api/schema-codegen.test.d.ts +1 -0
  335. package/dist/vite/api/schema-codegen.test.js +247 -0
  336. package/dist/vite/api/schema-codegen.test.js.map +1 -0
  337. package/dist/vite/build.js +24 -10
  338. package/dist/vite/build.js.map +1 -1
  339. package/dist/vite/config.d.ts +6 -4
  340. package/dist/vite/config.js +83 -30
  341. package/dist/vite/config.js.map +1 -1
  342. package/dist/vite/config.test.js +11 -5
  343. package/dist/vite/config.test.js.map +1 -1
  344. package/dist/vite/css/collect.d.ts +2 -0
  345. package/dist/vite/css/collect.js +27 -0
  346. package/dist/vite/css/collect.js.map +1 -0
  347. package/dist/vite/css/plugin.d.ts +5 -0
  348. package/dist/vite/css/plugin.js +79 -0
  349. package/dist/vite/css/plugin.js.map +1 -0
  350. package/dist/vite/dev-server.d.ts +1 -0
  351. package/dist/vite/dev-server.js +26 -6
  352. package/dist/vite/dev-server.js.map +1 -1
  353. package/dist/vite/output.d.ts +1 -1
  354. package/dist/vite/output.js +39 -10
  355. package/dist/vite/output.js.map +1 -1
  356. package/dist/vite/plugin-api.d.ts +1 -1
  357. package/dist/vite/plugin-api.js +154 -22
  358. package/dist/vite/plugin-api.js.map +1 -1
  359. package/dist/vite/plugin-auth.js +4 -1
  360. package/dist/vite/plugin-auth.js.map +1 -1
  361. package/dist/vite/plugin-component.js +14 -19
  362. package/dist/vite/plugin-component.js.map +1 -1
  363. package/dist/vite/plugin-config-reload.d.ts +1 -2
  364. package/dist/vite/plugin-config-reload.js.map +1 -1
  365. package/dist/vite/plugin-config.js +20 -0
  366. package/dist/vite/plugin-config.js.map +1 -1
  367. package/dist/vite/plugin-docs.test.js +15 -23
  368. package/dist/vite/plugin-docs.test.js.map +1 -1
  369. package/dist/vite/plugin-mdx.js +69 -8
  370. package/dist/vite/plugin-mdx.js.map +1 -1
  371. package/dist/vite/{plugin-custom-css.d.ts → plugin-theme-css.d.ts} +2 -2
  372. package/dist/vite/plugin-theme-css.js +114 -0
  373. package/dist/vite/plugin-theme-css.js.map +1 -0
  374. package/dist/vite/plugin.d.ts +1 -2
  375. package/dist/vite/plugin.js +6 -2
  376. package/dist/vite/plugin.js.map +1 -1
  377. package/dist/vite/prerender.d.ts +3 -2
  378. package/dist/vite/prerender.js +6 -5
  379. package/dist/vite/prerender.js.map +1 -1
  380. package/dist/vite/sitemap.d.ts +1 -1
  381. package/dist/zuplo/enrich-with-zuplo.d.ts +5 -0
  382. package/dist/zuplo/enrich-with-zuplo.js +184 -0
  383. package/dist/zuplo/enrich-with-zuplo.js.map +1 -0
  384. package/dist/zuplo/env.d.ts +7 -0
  385. package/dist/zuplo/env.js +12 -0
  386. package/dist/zuplo/env.js.map +1 -0
  387. package/dist/zuplo/policy-types.d.ts +33 -0
  388. package/dist/zuplo/policy-types.js +8 -0
  389. package/dist/zuplo/policy-types.js.map +1 -0
  390. package/dist/zuplo/with-zuplo-processors.d.ts +3 -0
  391. package/dist/zuplo/with-zuplo-processors.js +26 -0
  392. package/dist/zuplo/with-zuplo-processors.js.map +1 -0
  393. package/dist/zuplo/with-zuplo.d.ts +3 -0
  394. package/dist/zuplo/with-zuplo.js +9 -0
  395. package/dist/zuplo/with-zuplo.js.map +1 -0
  396. package/lib/AuthenticationPlugin-CO_YCd2x.js +58 -0
  397. package/lib/AuthenticationPlugin-CO_YCd2x.js.map +1 -0
  398. package/lib/{CategoryHeading-Bb9dqxD3.js → CategoryHeading-MYL1u_6K.js} +3 -3
  399. package/lib/{CategoryHeading-Bb9dqxD3.js.map → CategoryHeading-MYL1u_6K.js.map} +1 -1
  400. package/lib/ClientOnly-E7hGysn1.js.map +1 -1
  401. package/lib/{Markdown-ievDDhFT.js → Markdown-B8o9Qz4q.js} +13430 -13409
  402. package/lib/Markdown-B8o9Qz4q.js.map +1 -0
  403. package/lib/MdxPage-BxRt3Ly7.js +193 -0
  404. package/lib/MdxPage-BxRt3Ly7.js.map +1 -0
  405. package/lib/OperationList-DH-zIgtq.js +5160 -0
  406. package/lib/OperationList-DH-zIgtq.js.map +1 -0
  407. package/lib/Route-DJ0ZlVq1.js +35 -0
  408. package/lib/Route-DJ0ZlVq1.js.map +1 -0
  409. package/lib/Select-B7UXR0SB.js +223 -0
  410. package/lib/Select-B7UXR0SB.js.map +1 -0
  411. package/lib/SlotletProvider-CtIp8rP3.js +221 -0
  412. package/lib/SlotletProvider-CtIp8rP3.js.map +1 -0
  413. package/lib/{Button-jK0EsymC.js → Spinner-BlzrEEk1.js} +17 -14
  414. package/lib/Spinner-BlzrEEk1.js.map +1 -0
  415. package/lib/StaggeredRender-DgsamH_G.js +17 -0
  416. package/lib/StaggeredRender-DgsamH_G.js.map +1 -0
  417. package/lib/{SyntaxHighlight-DkLOsjHS.js → SyntaxHighlight-C1w1QPdY.js} +385 -388
  418. package/lib/{SyntaxHighlight-DkLOsjHS.js.map → SyntaxHighlight-C1w1QPdY.js.map} +1 -1
  419. package/lib/{utils-DcpDOncX.js → ZudokuContext-8jts0fF3.js} +487 -476
  420. package/lib/ZudokuContext-8jts0fF3.js.map +1 -0
  421. package/lib/chunk-SYFQ2XB5-BPvC-soB.js +1821 -0
  422. package/lib/chunk-SYFQ2XB5-BPvC-soB.js.map +1 -0
  423. package/lib/circular-Dgpd6AN-.js +15397 -0
  424. package/lib/circular-Dgpd6AN-.js.map +1 -0
  425. package/lib/{cn-BmFQLtkS.js → cn-qaFjX9_3.js} +2 -2
  426. package/lib/cn-qaFjX9_3.js.map +1 -0
  427. package/lib/context-rwLGh-6_.js +22 -0
  428. package/lib/context-rwLGh-6_.js.map +1 -0
  429. package/lib/createServer-BV0tHzLK.js +12590 -0
  430. package/lib/createServer-BV0tHzLK.js.map +1 -0
  431. package/lib/{hook-hEqe7fPB.js → hook-BG02esyv.js} +17 -17
  432. package/lib/{hook-hEqe7fPB.js.map → hook-BG02esyv.js.map} +1 -1
  433. package/lib/index-B7mqiOei.js +509 -0
  434. package/lib/index-B7mqiOei.js.map +1 -0
  435. package/lib/index-Djenk2Hj.js +36 -0
  436. package/lib/index-Djenk2Hj.js.map +1 -0
  437. package/lib/{index-CkwDvuPt.js → index-Dl3Yl0yb.js} +303 -286
  438. package/lib/index-Dl3Yl0yb.js.map +1 -0
  439. package/lib/index-DmqsUPcm.js +1915 -0
  440. package/lib/index-DmqsUPcm.js.map +1 -0
  441. package/lib/index-LNp6rxyU.js.map +1 -1
  442. package/lib/index.esm-9-TF9KQB.js +692 -0
  443. package/lib/index.esm-9-TF9KQB.js.map +1 -0
  444. package/lib/index.esm-CrSoEshU.js +1207 -0
  445. package/lib/index.esm-CrSoEshU.js.map +1 -0
  446. package/lib/invariant-Caa8-XvF.js.map +1 -1
  447. package/lib/joinUrl-BTy9bvoK.js +20 -0
  448. package/lib/joinUrl-BTy9bvoK.js.map +1 -0
  449. package/lib/jsx-runtime-Bdg6XQ1m.js +446 -0
  450. package/lib/jsx-runtime-Bdg6XQ1m.js.map +1 -0
  451. package/lib/post-processors/removeExtensions.js +11 -0
  452. package/lib/post-processors/removeExtensions.js.map +1 -0
  453. package/lib/post-processors/removeParameters.js +48 -0
  454. package/lib/post-processors/removeParameters.js.map +1 -0
  455. package/lib/post-processors/removePaths.js +28 -0
  456. package/lib/post-processors/removePaths.js.map +1 -0
  457. package/lib/post-processors/traverse.js +15 -0
  458. package/lib/post-processors/traverse.js.map +1 -0
  459. package/lib/{prism-bash.min-DadFsM4Z.js → prism-bash.min-HHIMdNJ_.js} +4 -4
  460. package/lib/{prism-bash.min-DadFsM4Z.js.map → prism-bash.min-HHIMdNJ_.js.map} +1 -1
  461. package/lib/prism-csharp.min-bQAo2pmx.js +63 -0
  462. package/lib/{prism-csharp.min-Yizuc34Y.js.map → prism-csharp.min-bQAo2pmx.js.map} +1 -1
  463. package/lib/prism-java.min-BpvsOuIa.js +35 -0
  464. package/lib/{prism-java.min-d5iT_mOd.js.map → prism-java.min-BpvsOuIa.js.map} +1 -1
  465. package/lib/{prism-markdown.min-F3U-vPBi.js → prism-markdown.min-C0Qn0m-5.js} +30 -30
  466. package/lib/{prism-markdown.min-F3U-vPBi.js.map → prism-markdown.min-C0Qn0m-5.js.map} +1 -1
  467. package/lib/prism-markup-BNGj0Tvm.js.map +1 -1
  468. package/lib/prism-ruby.min-Dx9KO9ds.js +38 -0
  469. package/lib/{prism-ruby.min-C7LwcKyz.js.map → prism-ruby.min-Dx9KO9ds.js.map} +1 -1
  470. package/lib/prism-typescript.min-CD7H2IYQ.js +34 -0
  471. package/lib/{prism-typescript.min-oSVeWCAd.js.map → prism-typescript.min-CD7H2IYQ.js.map} +1 -1
  472. package/lib/state-mM7uaXTW.js +202 -0
  473. package/lib/state-mM7uaXTW.js.map +1 -0
  474. package/lib/ui/Accordion.js +2 -2
  475. package/lib/ui/Accordion.js.map +1 -1
  476. package/lib/ui/ActionButton.js +10 -11
  477. package/lib/ui/ActionButton.js.map +1 -1
  478. package/lib/ui/Alert.js +3 -3
  479. package/lib/ui/Alert.js.map +1 -1
  480. package/lib/ui/AlertDialog.js +2 -2
  481. package/lib/ui/AlertDialog.js.map +1 -1
  482. package/lib/ui/Badge.js +5 -4
  483. package/lib/ui/Badge.js.map +1 -1
  484. package/lib/ui/Breadcrumb.js +2 -2
  485. package/lib/ui/Breadcrumb.js.map +1 -1
  486. package/lib/ui/Button.js +3 -3
  487. package/lib/ui/Button.js.map +1 -1
  488. package/lib/ui/Callout.js +2 -2
  489. package/lib/ui/Callout.js.map +1 -1
  490. package/lib/ui/Card.js +9 -9
  491. package/lib/ui/Card.js.map +1 -1
  492. package/lib/ui/Carousel.js +408 -402
  493. package/lib/ui/Carousel.js.map +1 -1
  494. package/lib/ui/Checkbox.js +26 -15
  495. package/lib/ui/Checkbox.js.map +1 -1
  496. package/lib/ui/Command.js +80 -501
  497. package/lib/ui/Command.js.map +1 -1
  498. package/lib/ui/Dialog.js +2 -2
  499. package/lib/ui/Dialog.js.map +1 -1
  500. package/lib/ui/Drawer.js +515 -514
  501. package/lib/ui/Drawer.js.map +1 -1
  502. package/lib/ui/DropdownMenu.js +2 -2
  503. package/lib/ui/DropdownMenu.js.map +1 -1
  504. package/lib/ui/Form.js +3 -3
  505. package/lib/ui/Form.js.map +1 -1
  506. package/lib/ui/HoverCard.js +2 -2
  507. package/lib/ui/Input.js +2 -2
  508. package/lib/ui/Input.js.map +1 -1
  509. package/lib/ui/Label.js +3 -3
  510. package/lib/ui/Pagination.js +8 -8
  511. package/lib/ui/Pagination.js.map +1 -1
  512. package/lib/ui/Popover.js +2 -2
  513. package/lib/ui/Popover.js.map +1 -1
  514. package/lib/ui/Progress.js +2 -2
  515. package/lib/ui/Progress.js.map +1 -1
  516. package/lib/ui/RadioGroup.js +2 -2
  517. package/lib/ui/RadioGroup.js.map +1 -1
  518. package/lib/ui/ScrollArea.js +2 -2
  519. package/lib/ui/ScrollArea.js.map +1 -1
  520. package/lib/ui/Select.js +4 -4
  521. package/lib/ui/Select.js.map +1 -1
  522. package/lib/ui/Skeleton.js +2 -2
  523. package/lib/ui/Skeleton.js.map +1 -1
  524. package/lib/ui/Slider.js +2 -2
  525. package/lib/ui/Switch.js +2 -2
  526. package/lib/ui/Switch.js.map +1 -1
  527. package/lib/ui/Tabs.js +2 -2
  528. package/lib/ui/Textarea.js +2 -2
  529. package/lib/ui/Textarea.js.map +1 -1
  530. package/lib/ui/Toggle.js +3 -3
  531. package/lib/ui/Toggle.js.map +1 -1
  532. package/lib/ui/ToggleGroup.js +2 -2
  533. package/lib/ui/ToggleGroup.js.map +1 -1
  534. package/lib/ui/Tooltip.js +2 -2
  535. package/lib/useExposedProps-BLKFBylA.js +9 -0
  536. package/lib/useExposedProps-BLKFBylA.js.map +1 -0
  537. package/lib/useScrollToAnchor-Bl6mz9_x.js +288 -0
  538. package/lib/useScrollToAnchor-Bl6mz9_x.js.map +1 -0
  539. package/lib/zudoku.auth-auth0.js +8 -10
  540. package/lib/zudoku.auth-auth0.js.map +1 -1
  541. package/lib/zudoku.auth-clerk.js +79 -51
  542. package/lib/zudoku.auth-clerk.js.map +1 -1
  543. package/lib/zudoku.auth-openid.js +398 -385
  544. package/lib/zudoku.auth-openid.js.map +1 -1
  545. package/lib/zudoku.components.js +808 -1245
  546. package/lib/zudoku.components.js.map +1 -1
  547. package/lib/zudoku.plugin-api-catalog.js +123 -0
  548. package/lib/zudoku.plugin-api-catalog.js.map +1 -0
  549. package/lib/zudoku.plugin-api-keys.js +15 -16
  550. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  551. package/lib/zudoku.plugin-custom-pages.js +4 -4
  552. package/lib/zudoku.plugin-custom-pages.js.map +1 -1
  553. package/lib/zudoku.plugin-markdown.js +16 -15
  554. package/lib/zudoku.plugin-markdown.js.map +1 -1
  555. package/lib/zudoku.plugin-openapi.js +5 -5
  556. package/lib/zudoku.plugin-redirect.js +1 -1
  557. package/lib/zudoku.plugin-redirect.js.map +1 -1
  558. package/lib/zudoku.plugin-search-inkeep.js +53 -24
  559. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  560. package/package.json +101 -84
  561. package/src/app/demo.tsx +1 -2
  562. package/src/app/entry.client.tsx +16 -15
  563. package/src/app/entry.server.tsx +3 -2
  564. package/src/app/main.css +57 -44
  565. package/src/app/main.tsx +32 -9
  566. package/src/app/sentry.ts +24 -0
  567. package/src/app/standalone.tsx +1 -2
  568. package/src/app/tailwind.ts +67 -52
  569. package/src/lib/authentication/components/CallbackHandler.tsx +1 -1
  570. package/src/lib/authentication/components/SignIn.tsx +1 -1
  571. package/src/lib/authentication/components/SignOut.tsx +3 -2
  572. package/src/lib/authentication/providers/auth0.tsx +1 -4
  573. package/src/lib/authentication/providers/clerk.tsx +38 -7
  574. package/src/lib/authentication/providers/openid.tsx +31 -12
  575. package/src/lib/components/AnchorLink.tsx +6 -3
  576. package/src/lib/components/Autocomplete.tsx +111 -0
  577. package/src/lib/components/Bootstrap.tsx +4 -6
  578. package/src/lib/components/Header.tsx +14 -10
  579. package/src/lib/components/Heading.tsx +13 -13
  580. package/src/lib/components/Layout.tsx +10 -5
  581. package/src/lib/components/Markdown.tsx +15 -16
  582. package/src/lib/components/MobileTopNavigation.tsx +18 -18
  583. package/src/lib/components/NotFoundPage.tsx +1 -1
  584. package/src/lib/components/ReactMarkdown.license.txt +21 -0
  585. package/src/lib/components/ReactMarkdown.tsx +264 -0
  586. package/src/lib/components/Search.tsx +3 -3
  587. package/src/lib/components/SlotletProvider.tsx +1 -1
  588. package/src/lib/components/StatusPage.tsx +91 -0
  589. package/src/lib/components/SyntaxHighlight.tsx +14 -4
  590. package/src/lib/components/ThemeSwitch.tsx +14 -15
  591. package/src/lib/components/TopNavigation.tsx +4 -4
  592. package/src/lib/components/Zudoku.tsx +1 -1
  593. package/src/lib/components/cache.ts +15 -0
  594. package/src/lib/components/context/ViewportAnchorContext.tsx +20 -6
  595. package/src/lib/components/context/ZudokuContext.ts +4 -2
  596. package/src/lib/components/index.ts +15 -4
  597. package/src/lib/components/navigation/Sidebar.tsx +18 -8
  598. package/src/lib/components/navigation/SidebarBadge.tsx +13 -11
  599. package/src/lib/components/navigation/SidebarCategory.tsx +8 -11
  600. package/src/lib/components/navigation/SidebarItem.tsx +12 -15
  601. package/src/lib/components/navigation/SidebarWrapper.tsx +3 -2
  602. package/src/lib/components/navigation/utils.ts +1 -1
  603. package/src/lib/core/RouteGuard.tsx +35 -0
  604. package/src/lib/core/ZudokuContext.ts +10 -9
  605. package/src/lib/core/plugins.ts +3 -7
  606. package/src/lib/errors/RouterError.tsx +1 -1
  607. package/src/lib/oas/graphql/circular.ts +29 -0
  608. package/src/lib/oas/graphql/index.ts +48 -32
  609. package/src/lib/oas/parser/dereference/index.ts +8 -4
  610. package/src/lib/oas/parser/upgrade/index.ts +22 -30
  611. package/src/lib/plugins/api-catalog/Catalog.tsx +123 -0
  612. package/src/lib/plugins/api-catalog/index.tsx +64 -0
  613. package/src/lib/plugins/api-keys/CreateApiKey.tsx +1 -1
  614. package/src/lib/plugins/api-keys/ProtectedRoute.tsx +1 -1
  615. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +1 -1
  616. package/src/lib/plugins/api-keys/index.tsx +1 -1
  617. package/src/lib/plugins/custom-pages/index.tsx +1 -1
  618. package/src/lib/plugins/markdown/MdxPage.tsx +36 -2
  619. package/src/lib/plugins/markdown/index.tsx +5 -2
  620. package/src/lib/plugins/markdown/resolver.ts +2 -4
  621. package/src/lib/plugins/openapi/CollapsibleCode.tsx +10 -7
  622. package/src/lib/plugins/openapi/ColorizedParam.tsx +29 -12
  623. package/src/lib/plugins/openapi/Endpoint.tsx +3 -3
  624. package/src/lib/plugins/openapi/OperationList.tsx +68 -8
  625. package/src/lib/plugins/openapi/OperationListItem.tsx +33 -4
  626. package/src/lib/plugins/openapi/ParameterListItem.tsx +6 -7
  627. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +7 -0
  628. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +14 -39
  629. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +46 -63
  630. package/src/lib/plugins/openapi/Route.tsx +41 -9
  631. package/src/lib/plugins/openapi/Sidecar.tsx +23 -30
  632. package/src/lib/plugins/openapi/SidecarBox.tsx +4 -16
  633. package/src/lib/plugins/openapi/SidecarExamples.tsx +163 -0
  634. package/src/lib/plugins/openapi/client/GraphQLClient.tsx +28 -103
  635. package/src/lib/plugins/openapi/client/createServer.ts +6 -2
  636. package/src/lib/plugins/openapi/context.tsx +2 -2
  637. package/src/lib/plugins/openapi/graphql/gql.ts +2 -2
  638. package/src/lib/plugins/openapi/graphql/graphql.ts +3 -0
  639. package/src/lib/plugins/openapi/index.tsx +49 -44
  640. package/src/lib/plugins/openapi/interfaces.ts +31 -2
  641. package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +54 -0
  642. package/src/lib/plugins/openapi/playground/Headers.tsx +137 -39
  643. package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +8 -0
  644. package/src/lib/plugins/openapi/playground/PathParams.tsx +30 -61
  645. package/src/lib/plugins/openapi/playground/Playground.tsx +244 -189
  646. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +2 -2
  647. package/src/lib/plugins/openapi/playground/QueryParams.tsx +77 -80
  648. package/src/lib/plugins/openapi/playground/SubmitButton.tsx +75 -0
  649. package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +73 -0
  650. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +210 -0
  651. package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +101 -0
  652. package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.test.ts +64 -0
  653. package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.ts +36 -0
  654. package/src/lib/plugins/openapi/post-processors/removeExtensions.test.ts +202 -0
  655. package/src/lib/plugins/openapi/post-processors/removeExtensions.ts +27 -0
  656. package/src/lib/plugins/openapi/post-processors/removeParameters.test.ts +148 -0
  657. package/src/lib/plugins/openapi/post-processors/removeParameters.ts +101 -0
  658. package/src/lib/plugins/openapi/post-processors/removePaths.test.ts +126 -0
  659. package/src/lib/plugins/openapi/post-processors/removePaths.ts +55 -0
  660. package/src/lib/plugins/openapi/post-processors/traverse.ts +1 -0
  661. package/src/lib/plugins/openapi/schema/SchemaComponents.tsx +29 -8
  662. package/src/lib/plugins/openapi/util/generateSchemaExample.ts +26 -11
  663. package/src/lib/plugins/openapi/util/methodToColor.ts +27 -0
  664. package/src/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.tsx +32 -0
  665. package/src/lib/plugins/redirect/index.tsx +2 -2
  666. package/src/lib/plugins/search-inkeep/index.tsx +78 -23
  667. package/src/lib/plugins/search-inkeep/inkeep.ts +3 -9
  668. package/src/lib/ui/Badge.tsx +2 -1
  669. package/src/lib/ui/Card.tsx +1 -1
  670. package/src/lib/ui/Checkbox.tsx +24 -7
  671. package/src/lib/ui/Command.tsx +20 -0
  672. package/src/lib/ui/Select.tsx +1 -1
  673. package/src/lib/util/MdxComponents.tsx +5 -9
  674. package/src/lib/util/createVariantComponent.tsx +2 -2
  675. package/src/lib/util/joinUrl.ts +57 -0
  676. package/src/lib/util/traverse.ts +35 -0
  677. package/src/lib/util/useExposedProps.tsx +1 -1
  678. package/src/lib/util/useScrollToAnchor.ts +33 -16
  679. package/src/lib/util/useScrollToTop.ts +1 -1
  680. package/dist/lib/plugins/openapi/client/worker.d.ts +0 -4
  681. package/dist/lib/plugins/openapi/client/worker.js +0 -29
  682. package/dist/lib/plugins/openapi/client/worker.js.map +0 -1
  683. package/dist/lib/plugins/openapi/playground/ResponseTab.d.ts +0 -4
  684. package/dist/lib/plugins/openapi/playground/ResponseTab.js +0 -42
  685. package/dist/lib/plugins/openapi/playground/ResponseTab.js.map +0 -1
  686. package/dist/lib/plugins/openapi-worker.d.ts +0 -1
  687. package/dist/lib/plugins/openapi-worker.js +0 -8
  688. package/dist/lib/plugins/openapi-worker.js.map +0 -1
  689. package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.d.ts +0 -2
  690. package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js +0 -3
  691. package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js.map +0 -1
  692. package/dist/vite/plugin-custom-css.js +0 -55
  693. package/dist/vite/plugin-custom-css.js.map +0 -1
  694. package/lib/AnchorLink-CDlhr8gL.js +0 -706
  695. package/lib/AnchorLink-CDlhr8gL.js.map +0 -1
  696. package/lib/AuthenticationPlugin-D0Em0SwR.js +0 -59
  697. package/lib/AuthenticationPlugin-D0Em0SwR.js.map +0 -1
  698. package/lib/Button-jK0EsymC.js.map +0 -1
  699. package/lib/Dialog-k70Qfukb.js +0 -67
  700. package/lib/Dialog-k70Qfukb.js.map +0 -1
  701. package/lib/InkeepCustomTrigger-CE5-K5ex.js +0 -6
  702. package/lib/InkeepCustomTrigger-CE5-K5ex.js.map +0 -1
  703. package/lib/Markdown-ievDDhFT.js.map +0 -1
  704. package/lib/MdxPage-Bwn-VSsH.js +0 -174
  705. package/lib/MdxPage-Bwn-VSsH.js.map +0 -1
  706. package/lib/OperationList-BwBl1xrD.js +0 -4691
  707. package/lib/OperationList-BwBl1xrD.js.map +0 -1
  708. package/lib/Route-DlG_HTMu.js +0 -11
  709. package/lib/Route-DlG_HTMu.js.map +0 -1
  710. package/lib/Select-O9ZM3ZgX.js +0 -223
  711. package/lib/Select-O9ZM3ZgX.js.map +0 -1
  712. package/lib/SidebarBadge-DxFJcJ6V.js +0 -51
  713. package/lib/SidebarBadge-DxFJcJ6V.js.map +0 -1
  714. package/lib/SlotletProvider-DyomlzGx.js +0 -252
  715. package/lib/SlotletProvider-DyomlzGx.js.map +0 -1
  716. package/lib/Spinner-3cQDBVGr.js +0 -7
  717. package/lib/Spinner-3cQDBVGr.js.map +0 -1
  718. package/lib/assets/index-B_Jk_Yzp.js +0 -4820
  719. package/lib/assets/index-B_Jk_Yzp.js.map +0 -1
  720. package/lib/assets/worker-CPsGZsve.js +0 -18201
  721. package/lib/assets/worker-CPsGZsve.js.map +0 -1
  722. package/lib/cn-BmFQLtkS.js.map +0 -1
  723. package/lib/context-D1nXWxm7.js +0 -22
  724. package/lib/context-D1nXWxm7.js.map +0 -1
  725. package/lib/createServer-DK-g7kbB.js +0 -16089
  726. package/lib/createServer-DK-g7kbB.js.map +0 -1
  727. package/lib/index-BuAyrJe3.js +0 -46
  728. package/lib/index-BuAyrJe3.js.map +0 -1
  729. package/lib/index-CkwDvuPt.js.map +0 -1
  730. package/lib/index-Czzd9rjU.js +0 -899
  731. package/lib/index-Czzd9rjU.js.map +0 -1
  732. package/lib/index-DNxQ_rCt.js +0 -1273
  733. package/lib/index-DNxQ_rCt.js.map +0 -1
  734. package/lib/index-Yn8c3UWE.js +0 -921
  735. package/lib/index-Yn8c3UWE.js.map +0 -1
  736. package/lib/index.esm-C5mr_sKO.js +0 -1193
  737. package/lib/index.esm-C5mr_sKO.js.map +0 -1
  738. package/lib/jsx-runtime-B6kdoens.js +0 -635
  739. package/lib/jsx-runtime-B6kdoens.js.map +0 -1
  740. package/lib/prism-csharp.min-Yizuc34Y.js +0 -35
  741. package/lib/prism-java.min-d5iT_mOd.js +0 -7
  742. package/lib/prism-markup-templating-DZrrEs0A.js +0 -62
  743. package/lib/prism-markup-templating-DZrrEs0A.js.map +0 -1
  744. package/lib/prism-php.min-o7FpoMP_.js +0 -11
  745. package/lib/prism-php.min-o7FpoMP_.js.map +0 -1
  746. package/lib/prism-ruby.min-C7LwcKyz.js +0 -10
  747. package/lib/prism-typescript.min-oSVeWCAd.js +0 -6
  748. package/lib/router-lfyopgBI.js +0 -3024
  749. package/lib/router-lfyopgBI.js.map +0 -1
  750. package/lib/state-tsXBLONe.js +0 -203
  751. package/lib/state-tsXBLONe.js.map +0 -1
  752. package/lib/useExposedProps-CTPtylCV.js +0 -10
  753. package/lib/useExposedProps-CTPtylCV.js.map +0 -1
  754. package/lib/utils-DcpDOncX.js.map +0 -1
  755. package/lib/zudoku.openapi-worker.js +0 -15
  756. package/lib/zudoku.openapi-worker.js.map +0 -1
  757. package/src/lib/plugins/openapi/client/worker.ts +0 -44
  758. package/src/lib/plugins/openapi/playground/ResponseTab.tsx +0 -76
  759. package/src/lib/plugins/openapi-worker.ts +0 -11
  760. package/src/lib/plugins/search-inkeep/InkeepCustomTrigger.tsx +0 -3
@@ -0,0 +1,1915 @@
1
+ var dt = Object.defineProperty;
2
+ var Ie = (t) => {
3
+ throw TypeError(t);
4
+ };
5
+ var ct = (t, s, a) => s in t ? dt(t, s, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[s] = a;
6
+ var ee = (t, s, a) => ct(t, typeof s != "symbol" ? s + "" : s, a), mt = (t, s, a) => s.has(t) || Ie("Cannot " + a);
7
+ var te = (t, s, a) => (mt(t, s, "read from private field"), a ? a.call(t) : s.get(t)), se = (t, s, a) => s.has(t) ? Ie("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, a);
8
+ import { j as e } from "./jsx-runtime-Bdg6XQ1m.js";
9
+ import { m as ut } from "./chunk-SYFQ2XB5-BPvC-soB.js";
10
+ import { Circle as pt, ChevronRightIcon as V, CheckIcon as ht, DotIcon as xt, Check as ft, Search as gt, XIcon as yt, ChevronDownIcon as vt, InfoIcon as Oe, LogInIcon as jt, CirclePlayIcon as bt } from "lucide-react";
11
+ import { u as Nt } from "./hook-BG02esyv.js";
12
+ import { Button as G } from "./ui/Button.js";
13
+ import { F as wt, G as Ct, j as Ee } from "./ZudokuContext-8jts0fF3.js";
14
+ import { Z as Tt } from "./invariant-Caa8-XvF.js";
15
+ import { VisuallyHidden as St } from "@radix-ui/react-visually-hidden";
16
+ import * as p from "react";
17
+ import { useRef as E, useEffect as _e, useState as F, Fragment as z, useTransition as Pt } from "react";
18
+ import { V as j, T as $t, D as kt, b as Rt, a as It, c as Ot } from "./index-B7mqiOei.js";
19
+ import { S as He, a as Me, b as Be, c as Ue, e as B, u as Et } from "./Select-B7UXR0SB.js";
20
+ import { b as ue, u as pe, C as k, a as At, F as qt } from "./index.esm-CrSoEshU.js";
21
+ import { c as he } from "./index-Djenk2Hj.js";
22
+ import { c } from "./cn-qaFjX9_3.js";
23
+ import * as Ge from "@radix-ui/react-label";
24
+ import * as _ from "@radix-ui/react-radio-group";
25
+ import { a as Lt } from "./state-mM7uaXTW.js";
26
+ import { Card as xe, CardHeader as Dt, CardTitle as Vt, CardContent as Ft } from "./ui/Card.js";
27
+ import { Tabs as Je, TabsList as Qe, TabsTrigger as I, TabsContent as O } from "./ui/Tabs.js";
28
+ import { z as zt, S as _t } from "./SyntaxHighlight-C1w1QPdY.js";
29
+ import { B as U, S as Ht } from "./Spinner-BlzrEEk1.js";
30
+ import * as g from "@radix-ui/react-dropdown-menu";
31
+ import * as le from "@radix-ui/react-checkbox";
32
+ import * as J from "@radix-ui/react-popover";
33
+ import { PopoverAnchor as Mt } from "@radix-ui/react-popover";
34
+ import { Input as fe } from "./ui/Input.js";
35
+ import { Slot as Bt } from "@radix-ui/react-slot";
36
+ import { Callout as Ut } from "./ui/Callout.js";
37
+ import { Collapsible as Ae, CollapsibleTrigger as qe, CollapsibleContent as Le } from "./ui/Collapsible.js";
38
+ import * as ge from "@radix-ui/react-collapsible";
39
+ class H extends String {
40
+ constructor(a, n) {
41
+ super(a);
42
+ ee(this, "__apiType");
43
+ this.value = a, this.__meta__ = n;
44
+ }
45
+ toString() {
46
+ return this.value;
47
+ }
48
+ }
49
+ const Gt = new H(
50
+ `
51
+ fragment OperationsFragment on OperationItem {
52
+ slug
53
+ summary
54
+ method
55
+ description
56
+ operationId
57
+ contentTypes
58
+ path
59
+ parameters {
60
+ name
61
+ in
62
+ description
63
+ required
64
+ schema
65
+ style
66
+ examples {
67
+ name
68
+ description
69
+ externalValue
70
+ value
71
+ summary
72
+ }
73
+ }
74
+ requestBody {
75
+ content {
76
+ mediaType
77
+ encoding {
78
+ name
79
+ }
80
+ examples {
81
+ name
82
+ description
83
+ externalValue
84
+ value
85
+ summary
86
+ }
87
+ schema
88
+ }
89
+ description
90
+ required
91
+ }
92
+ responses {
93
+ statusCode
94
+ links
95
+ description
96
+ content {
97
+ examples {
98
+ name
99
+ description
100
+ externalValue
101
+ value
102
+ summary
103
+ }
104
+ mediaType
105
+ encoding {
106
+ name
107
+ }
108
+ schema
109
+ }
110
+ }
111
+ }
112
+ `,
113
+ { fragmentName: "OperationsFragment" }
114
+ ), Jt = new H(`
115
+ query ServersQuery($input: JSON!, $type: SchemaType!) {
116
+ schema(input: $input, type: $type) {
117
+ url
118
+ servers {
119
+ url
120
+ }
121
+ }
122
+ }
123
+ `), Qt = new H(`
124
+ query AllOperations($input: JSON!, $type: SchemaType!) {
125
+ schema(input: $input, type: $type) {
126
+ description
127
+ summary
128
+ title
129
+ url
130
+ version
131
+ tags {
132
+ name
133
+ description
134
+ operations {
135
+ slug
136
+ ...OperationsFragment
137
+ }
138
+ }
139
+ }
140
+ }
141
+ fragment OperationsFragment on OperationItem {
142
+ slug
143
+ summary
144
+ method
145
+ description
146
+ operationId
147
+ contentTypes
148
+ path
149
+ parameters {
150
+ name
151
+ in
152
+ description
153
+ required
154
+ schema
155
+ style
156
+ examples {
157
+ name
158
+ description
159
+ externalValue
160
+ value
161
+ summary
162
+ }
163
+ }
164
+ requestBody {
165
+ content {
166
+ mediaType
167
+ encoding {
168
+ name
169
+ }
170
+ examples {
171
+ name
172
+ description
173
+ externalValue
174
+ value
175
+ summary
176
+ }
177
+ schema
178
+ }
179
+ description
180
+ required
181
+ }
182
+ responses {
183
+ statusCode
184
+ links
185
+ description
186
+ content {
187
+ examples {
188
+ name
189
+ description
190
+ externalValue
191
+ value
192
+ summary
193
+ }
194
+ mediaType
195
+ encoding {
196
+ name
197
+ }
198
+ schema
199
+ }
200
+ }
201
+ }`), Wt = new H(`
202
+ query getServerQuery($input: JSON!, $type: SchemaType!) {
203
+ schema(input: $input, type: $type) {
204
+ url
205
+ servers {
206
+ url
207
+ }
208
+ }
209
+ }
210
+ `), Zt = new H(`
211
+ query GetCategories($input: JSON!, $type: SchemaType!) {
212
+ schema(input: $input, type: $type) {
213
+ url
214
+ tags {
215
+ __typename
216
+ name
217
+ operations {
218
+ __typename
219
+ slug
220
+ deprecated
221
+ method
222
+ summary
223
+ operationId
224
+ path
225
+ }
226
+ }
227
+ }
228
+ }
229
+ `), Kt = {
230
+ "\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": Jt,
231
+ "\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": Gt,
232
+ "\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": Qt,
233
+ "\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": Wt,
234
+ "\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": Zt
235
+ };
236
+ function Xt(t) {
237
+ return Kt[t] ?? {};
238
+ }
239
+ let ae;
240
+ const Yt = (t) => {
241
+ var s;
242
+ if ((s = t.errors) != null && s[0])
243
+ throw new Tt(t.errors[0].message, {
244
+ developerHint: "Check your configuration value `apis.type` and `apis.input` in the Zudoku config."
245
+ });
246
+ };
247
+ var W, Z;
248
+ class es {
249
+ constructor(s) {
250
+ se(this, W, async () => (ae || (ae = import("./createServer-BV0tHzLK.js").then(
251
+ (s) => s.createServer(this.config)
252
+ )), ae));
253
+ se(this, Z, async (s) => this.config.server ? fetch(this.config.server, s) : (await te(this, W).call(this)).fetch("http://localhost/graphql", s));
254
+ ee(this, "fetch", async (s, ...[a]) => {
255
+ var l;
256
+ const n = (l = s.match(/query (\w+)/)) == null ? void 0 : l[1], o = await te(this, Z).call(this, {
257
+ method: "POST",
258
+ body: JSON.stringify({ query: s, variables: a, operationName: n }),
259
+ headers: { "Content-Type": "application/json" }
260
+ });
261
+ if (!o.ok)
262
+ throw new Error("Network response was not ok");
263
+ const i = await o.json();
264
+ return Yt(i), i.data;
265
+ });
266
+ this.config = s;
267
+ }
268
+ }
269
+ W = new WeakMap(), Z = new WeakMap();
270
+ const ts = he(
271
+ "relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
272
+ {
273
+ variants: {
274
+ variant: {
275
+ default: "bg-background text-foreground",
276
+ destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
277
+ }
278
+ },
279
+ defaultVariants: {
280
+ variant: "default"
281
+ }
282
+ }
283
+ ), ie = p.forwardRef(({ className: t, variant: s, ...a }, n) => /* @__PURE__ */ e.jsx(
284
+ "div",
285
+ {
286
+ ref: n,
287
+ role: "alert",
288
+ className: c(ts({ variant: s }), t),
289
+ ...a
290
+ }
291
+ ));
292
+ ie.displayName = "Alert";
293
+ const de = p.forwardRef(({ className: t, ...s }, a) => /* @__PURE__ */ e.jsx(
294
+ "h5",
295
+ {
296
+ ref: a,
297
+ className: c("mb-1 font-medium leading-none tracking-tight", t),
298
+ ...s
299
+ }
300
+ ));
301
+ de.displayName = "AlertTitle";
302
+ const ce = p.forwardRef(({ className: t, ...s }, a) => /* @__PURE__ */ e.jsx(
303
+ "div",
304
+ {
305
+ ref: a,
306
+ className: c("text-sm [&_p]:leading-relaxed", t),
307
+ ...s
308
+ }
309
+ ));
310
+ ce.displayName = "AlertDescription";
311
+ const ss = he(
312
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
313
+ ), L = p.forwardRef(({ className: t, ...s }, a) => /* @__PURE__ */ e.jsx(
314
+ Ge.Root,
315
+ {
316
+ ref: a,
317
+ className: c(ss(), t),
318
+ ...s
319
+ }
320
+ ));
321
+ L.displayName = Ge.Root.displayName;
322
+ const ye = p.forwardRef(({ className: t, ...s }, a) => /* @__PURE__ */ e.jsx(
323
+ _.Root,
324
+ {
325
+ className: c("grid gap-2", t),
326
+ ...s,
327
+ ref: a
328
+ }
329
+ ));
330
+ ye.displayName = _.Root.displayName;
331
+ const Q = p.forwardRef(({ className: t, ...s }, a) => /* @__PURE__ */ e.jsx(
332
+ _.Item,
333
+ {
334
+ ref: a,
335
+ className: c(
336
+ "aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
337
+ t
338
+ ),
339
+ ...s,
340
+ children: /* @__PURE__ */ e.jsx(_.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(pt, { className: "h-2.5 w-2.5 fill-current text-current" }) })
341
+ }
342
+ ));
343
+ Q.displayName = _.Item.displayName;
344
+ const We = p.forwardRef(
345
+ ({ className: t, ...s }, a) => /* @__PURE__ */ e.jsx(
346
+ "textarea",
347
+ {
348
+ className: c(
349
+ "flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
350
+ t
351
+ ),
352
+ ref: a,
353
+ ...s
354
+ }
355
+ )
356
+ );
357
+ We.displayName = "Textarea";
358
+ const ne = (t) => Math.abs(
359
+ isNaN(parseInt(t)) ? t.toLowerCase().charCodeAt(0) - 96 : isNaN(parseInt(t)) ? 0 : parseInt(t)
360
+ ), re = (t) => t.length > 1 ? parseInt(t.split("").reduce((s, a) => `${ne(s) + ne(a)}`)) : ne(t), De = (t, s = {}) => {
361
+ const a = (3 * re(t) + 2 * re(t) + re(t)) % 360, { saturation: n = 75, lightness: o = 60 } = s;
362
+ return `${a}deg ${n}% ${o}%`;
363
+ }, oe = "data-linked-param", as = (t) => {
364
+ const { resolvedTheme: s } = zt();
365
+ return {
366
+ text: De(
367
+ t,
368
+ s === "light" ? { saturation: 95, lightness: 38 } : {}
369
+ ),
370
+ background: De(
371
+ t,
372
+ s === "light" ? { saturation: 85, lightness: 40 } : {}
373
+ )
374
+ };
375
+ }, Ze = ({
376
+ name: t,
377
+ className: s,
378
+ slug: a,
379
+ title: n,
380
+ children: o,
381
+ onClick: i
382
+ }) => {
383
+ const l = E(null), u = a == null ? void 0 : a.replace(/[{}]/g, ""), d = t.replace(/[{}]/g, ""), { text: h, background: v } = as(d), b = `hsl(${h} / 100%)`, x = `hsl(${v} / 10%)`, m = `hsl(${v} / 50%)`;
384
+ return _e(() => {
385
+ if (!u || !l.current) return;
386
+ const f = () => {
387
+ document.querySelectorAll(`[${oe}="${u}"]`).forEach(($) => {
388
+ $ instanceof HTMLElement && ($.dataset.active = "true");
389
+ });
390
+ }, C = () => {
391
+ document.querySelectorAll(`[${oe}="${u}"]`).forEach(($) => {
392
+ $ instanceof HTMLElement && ($.dataset.active = "false");
393
+ });
394
+ }, N = l.current;
395
+ return N.addEventListener("mouseenter", f), N.addEventListener("mouseleave", C), () => {
396
+ N.removeEventListener("mouseenter", f), N.removeEventListener("mouseleave", C);
397
+ };
398
+ }, [u]), /* @__PURE__ */ e.jsx(
399
+ "span",
400
+ {
401
+ [oe]: u,
402
+ className: c(
403
+ "relative inline-block rounded transition-all duration-100",
404
+ "rounded-lg",
405
+ "border border-[--border-color] p-0.5 text-[--param-color] bg-[--background-color]",
406
+ "data-[active=true]:border-[--param-color] data-[active=true]:shadow data-[active=true]:-translate-y-px",
407
+ s
408
+ ),
409
+ title: n,
410
+ suppressHydrationWarning: !0,
411
+ ref: l,
412
+ onClick: i,
413
+ style: {
414
+ "--param-color": b,
415
+ "--border-color": m,
416
+ "--background-color": x
417
+ },
418
+ children: o ?? t
419
+ }
420
+ );
421
+ }, ns = (t, s, a) => {
422
+ const n = s.replace(/(:\w+|\{\w+})/g, (i) => {
423
+ var d;
424
+ const l = i.replace(/[:{}]/g, "");
425
+ return ((d = a.pathParams.find((h) => h.name === l)) == null ? void 0 : d.value) ?? i;
426
+ }), o = new URL(
427
+ n.replace(/^\//, ""),
428
+ t.endsWith("/") ? t : `${t}/`
429
+ );
430
+ return a.queryParams.filter((i) => i.active).forEach((i) => {
431
+ o.searchParams.set(i.name, i.value);
432
+ }), o;
433
+ }, Ke = g.Root, Xe = g.Trigger, rs = g.Group, os = p.forwardRef(({ className: t, inset: s, children: a, ...n }, o) => /* @__PURE__ */ e.jsxs(
434
+ g.SubTrigger,
435
+ {
436
+ ref: o,
437
+ className: c(
438
+ "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
439
+ s && "pl-8",
440
+ t
441
+ ),
442
+ ...n,
443
+ children: [
444
+ a,
445
+ /* @__PURE__ */ e.jsx(V, { className: "ml-auto h-4 w-4" })
446
+ ]
447
+ }
448
+ ));
449
+ os.displayName = g.SubTrigger.displayName;
450
+ const ls = p.forwardRef(({ className: t, ...s }, a) => /* @__PURE__ */ e.jsx(
451
+ g.SubContent,
452
+ {
453
+ ref: a,
454
+ className: c(
455
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
456
+ t
457
+ ),
458
+ ...s
459
+ }
460
+ ));
461
+ ls.displayName = g.SubContent.displayName;
462
+ const ve = p.forwardRef(({ className: t, sideOffset: s = 4, ...a }, n) => /* @__PURE__ */ e.jsx(g.Portal, { children: /* @__PURE__ */ e.jsx(
463
+ g.Content,
464
+ {
465
+ ref: n,
466
+ sideOffset: s,
467
+ className: c(
468
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
469
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
470
+ t
471
+ ),
472
+ ...a
473
+ }
474
+ ) }));
475
+ ve.displayName = g.Content.displayName;
476
+ const je = p.forwardRef(({ className: t, inset: s, ...a }, n) => /* @__PURE__ */ e.jsx(
477
+ g.Item,
478
+ {
479
+ ref: n,
480
+ className: c(
481
+ "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
482
+ s && "pl-8",
483
+ t
484
+ ),
485
+ ...a
486
+ }
487
+ ));
488
+ je.displayName = g.Item.displayName;
489
+ const is = p.forwardRef(({ className: t, children: s, checked: a, ...n }, o) => /* @__PURE__ */ e.jsxs(
490
+ g.CheckboxItem,
491
+ {
492
+ ref: o,
493
+ className: c(
494
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
495
+ t
496
+ ),
497
+ checked: a,
498
+ ...n,
499
+ children: [
500
+ /* @__PURE__ */ e.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e.jsx(g.ItemIndicator, { children: /* @__PURE__ */ e.jsx(ht, { className: "h-4 w-4" }) }) }),
501
+ s
502
+ ]
503
+ }
504
+ ));
505
+ is.displayName = g.CheckboxItem.displayName;
506
+ const ds = p.forwardRef(({ className: t, children: s, ...a }, n) => /* @__PURE__ */ e.jsxs(
507
+ g.RadioItem,
508
+ {
509
+ ref: n,
510
+ className: c(
511
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
512
+ t
513
+ ),
514
+ ...a,
515
+ children: [
516
+ /* @__PURE__ */ e.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e.jsx(g.ItemIndicator, { children: /* @__PURE__ */ e.jsx(xt, { className: "h-4 w-4 fill-current" }) }) }),
517
+ s
518
+ ]
519
+ }
520
+ ));
521
+ ds.displayName = g.RadioItem.displayName;
522
+ const Ye = p.forwardRef(({ className: t, inset: s, ...a }, n) => /* @__PURE__ */ e.jsx(
523
+ g.Label,
524
+ {
525
+ ref: n,
526
+ className: c(
527
+ "px-2 py-1.5 text-sm font-semibold",
528
+ s && "pl-8",
529
+ t
530
+ ),
531
+ ...a
532
+ }
533
+ ));
534
+ Ye.displayName = g.Label.displayName;
535
+ const et = p.forwardRef(({ className: t, ...s }, a) => /* @__PURE__ */ e.jsx(
536
+ g.Separator,
537
+ {
538
+ ref: a,
539
+ className: c("-mx-1 my-1 h-px bg-muted", t),
540
+ ...s
541
+ }
542
+ ));
543
+ et.displayName = g.Separator.displayName;
544
+ const cs = ({
545
+ examples: t,
546
+ onSelect: s
547
+ }) => /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2 mt-2 items-end", children: /* @__PURE__ */ e.jsxs(Ke, { children: [
548
+ /* @__PURE__ */ e.jsx(Xe, { asChild: !0, children: /* @__PURE__ */ e.jsx(U, { variant: "outline", children: "Use Example" }) }),
549
+ /* @__PURE__ */ e.jsx(ve, { className: "w-56", children: t.map((a) => {
550
+ var n;
551
+ return /* @__PURE__ */ e.jsxs("div", { children: [
552
+ /* @__PURE__ */ e.jsx(Ye, { children: a.mediaType }),
553
+ /* @__PURE__ */ e.jsx(et, {}),
554
+ /* @__PURE__ */ e.jsx(rs, { children: (n = a.examples) == null ? void 0 : n.map((o) => /* @__PURE__ */ e.jsx(
555
+ je,
556
+ {
557
+ onSelect: () => s(o),
558
+ className: "line-clamp-1",
559
+ children: o.summary ?? o.name
560
+ },
561
+ o.name
562
+ )) })
563
+ ] }, a.mediaType);
564
+ }) })
565
+ ] }) }), K = p.forwardRef(({ className: t, ...s }, a) => /* @__PURE__ */ e.jsx(
566
+ "div",
567
+ {
568
+ ref: a,
569
+ className: c(
570
+ "rounded-xl border bg-card text-card-foreground shadow-sm",
571
+ t
572
+ ),
573
+ ...s
574
+ }
575
+ ));
576
+ K.displayName = "Card";
577
+ const ms = p.forwardRef(({ className: t, ...s }, a) => /* @__PURE__ */ e.jsx(
578
+ "div",
579
+ {
580
+ ref: a,
581
+ className: c("flex flex-col space-y-1.5 p-6", t),
582
+ ...s
583
+ }
584
+ ));
585
+ ms.displayName = "CardHeader";
586
+ const us = p.forwardRef(({ className: t, ...s }, a) => /* @__PURE__ */ e.jsx(
587
+ "h3",
588
+ {
589
+ ref: a,
590
+ className: c("font-semibold leading-none tracking-tight", t),
591
+ ...s
592
+ }
593
+ ));
594
+ us.displayName = "CardTitle";
595
+ const ps = p.forwardRef(({ className: t, ...s }, a) => /* @__PURE__ */ e.jsx(
596
+ "p",
597
+ {
598
+ ref: a,
599
+ className: c("text-sm text-muted-foreground", t),
600
+ ...s
601
+ }
602
+ ));
603
+ ps.displayName = "CardDescription";
604
+ const hs = p.forwardRef(({ className: t, ...s }, a) => /* @__PURE__ */ e.jsx("div", { ref: a, className: c("p-6 pt-0", t), ...s }));
605
+ hs.displayName = "CardContent";
606
+ const xs = p.forwardRef(({ className: t, ...s }, a) => /* @__PURE__ */ e.jsx(
607
+ "div",
608
+ {
609
+ ref: a,
610
+ className: c("flex items-center p-6 pt-0", t),
611
+ ...s
612
+ }
613
+ ));
614
+ xs.displayName = "CardFooter";
615
+ const fs = he(
616
+ "peer h-4 w-4 shrink-0 rounded-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:text-primary",
617
+ {
618
+ variants: {
619
+ variant: {
620
+ default: "border border-primary data-[state=checked]:bg-primary",
621
+ outline: "border border-input data-[state=checked]:bg-accent"
622
+ }
623
+ },
624
+ defaultVariants: {
625
+ variant: "default"
626
+ }
627
+ }
628
+ ), be = p.forwardRef(({ className: t, variant: s, ...a }, n) => /* @__PURE__ */ e.jsx(
629
+ le.Root,
630
+ {
631
+ ref: n,
632
+ className: c(fs({ variant: s, className: t })),
633
+ ...a,
634
+ children: /* @__PURE__ */ e.jsx(
635
+ le.Indicator,
636
+ {
637
+ className: c("flex items-center justify-center text-current"),
638
+ children: /* @__PURE__ */ e.jsx(ft, { className: "h-4 w-4" })
639
+ }
640
+ )
641
+ }
642
+ ));
643
+ be.displayName = le.Root.displayName;
644
+ const tt = p.forwardRef(({ className: t, ...s }, a) => /* @__PURE__ */ e.jsx(
645
+ j,
646
+ {
647
+ ref: a,
648
+ className: c(
649
+ "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
650
+ t
651
+ ),
652
+ ...s
653
+ }
654
+ ));
655
+ tt.displayName = j.displayName;
656
+ const gs = p.forwardRef(({ className: t, ...s }, a) => (
657
+ // eslint-disable-next-line react/no-unknown-property
658
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
659
+ /* @__PURE__ */ e.jsx(gt, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
660
+ /* @__PURE__ */ e.jsx(
661
+ j.Input,
662
+ {
663
+ ref: a,
664
+ className: c(
665
+ "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
666
+ t
667
+ ),
668
+ ...s
669
+ }
670
+ )
671
+ ] })
672
+ ));
673
+ gs.displayName = j.Input.displayName;
674
+ const st = p.forwardRef(({ className: t, ...s }, a) => (
675
+ // eslint-disable-next-line react/no-unknown-property
676
+ /* @__PURE__ */ e.jsx("div", { className: "flex items-center", "cmdk-input-wrapper": "", children: /* @__PURE__ */ e.jsx(
677
+ j.Input,
678
+ {
679
+ ref: a,
680
+ className: c(
681
+ "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
682
+ "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
683
+ t
684
+ ),
685
+ ...s
686
+ }
687
+ ) })
688
+ ));
689
+ st.displayName = j.Input.displayName;
690
+ const at = p.forwardRef(({ className: t, ...s }, a) => /* @__PURE__ */ e.jsx(
691
+ j.List,
692
+ {
693
+ ref: a,
694
+ className: c("max-h-[300px] overflow-y-auto overflow-x-hidden", t),
695
+ ...s
696
+ }
697
+ ));
698
+ at.displayName = j.List.displayName;
699
+ const ys = p.forwardRef((t, s) => /* @__PURE__ */ e.jsx(
700
+ j.Empty,
701
+ {
702
+ ref: s,
703
+ className: "py-6 text-center text-sm",
704
+ ...t
705
+ }
706
+ ));
707
+ ys.displayName = j.Empty.displayName;
708
+ const vs = p.forwardRef(({ className: t, ...s }, a) => /* @__PURE__ */ e.jsx(
709
+ j.Group,
710
+ {
711
+ ref: a,
712
+ className: c(
713
+ "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
714
+ t
715
+ ),
716
+ ...s
717
+ }
718
+ ));
719
+ vs.displayName = j.Group.displayName;
720
+ const js = p.forwardRef(({ className: t, ...s }, a) => /* @__PURE__ */ e.jsx(
721
+ j.Separator,
722
+ {
723
+ ref: a,
724
+ className: c("-mx-1 h-px bg-border", t),
725
+ ...s
726
+ }
727
+ ));
728
+ js.displayName = j.Separator.displayName;
729
+ const nt = p.forwardRef(({ className: t, ...s }, a) => /* @__PURE__ */ e.jsx(
730
+ j.Item,
731
+ {
732
+ ref: a,
733
+ className: c(
734
+ "relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
735
+ t
736
+ ),
737
+ ...s
738
+ }
739
+ ));
740
+ nt.displayName = j.Item.displayName;
741
+ const bs = J.Root, rt = p.forwardRef(({ className: t, align: s = "center", sideOffset: a = 4, ...n }, o) => /* @__PURE__ */ e.jsx(J.Portal, { children: /* @__PURE__ */ e.jsx(
742
+ J.Content,
743
+ {
744
+ ref: o,
745
+ align: s,
746
+ sideOffset: a,
747
+ className: c(
748
+ "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
749
+ t
750
+ ),
751
+ ...n
752
+ }
753
+ ) }));
754
+ rt.displayName = J.Content.displayName;
755
+ const Ns = ({
756
+ value: t,
757
+ options: s,
758
+ onChange: a,
759
+ className: n,
760
+ placeholder: o = "Enter value",
761
+ onEnterPress: i,
762
+ ref: l
763
+ }) => {
764
+ const [u, d] = F(!1), [h, v] = F(!1), b = $t((m) => m.filtered.count), x = E(null);
765
+ return /* @__PURE__ */ e.jsxs(bs, { open: u, children: [
766
+ /* @__PURE__ */ e.jsx(Mt, { children: /* @__PURE__ */ e.jsx(
767
+ st,
768
+ {
769
+ ref: (m) => {
770
+ x.current = m, typeof l == "function" ? l(m) : l && (l.current = m);
771
+ },
772
+ value: t,
773
+ placeholder: o,
774
+ className: c("h-9 bg-transparent", n),
775
+ onFocus: () => d(!0),
776
+ onBlur: () => {
777
+ h || d(!1);
778
+ },
779
+ onKeyDown: (m) => {
780
+ var f;
781
+ m.key === "Enter" && (d(!1), (f = x.current) == null || f.blur(), i == null || i(m));
782
+ },
783
+ onValueChange: (m) => a(m)
784
+ }
785
+ ) }),
786
+ /* @__PURE__ */ e.jsx(
787
+ rt,
788
+ {
789
+ onMouseEnter: () => v(!0),
790
+ onMouseLeave: () => v(!1),
791
+ onOpenAutoFocus: (m) => m.preventDefault(),
792
+ className: c("p-0 w-[--radix-popover-trigger-width]", {
793
+ "border-0": b === 0
794
+ }),
795
+ align: "start",
796
+ side: "bottom",
797
+ onWheel: (m) => {
798
+ m.stopPropagation();
799
+ },
800
+ onTouchMove: (m) => {
801
+ m.stopPropagation();
802
+ },
803
+ children: /* @__PURE__ */ e.jsx(at, { className: "max-h-[140px]", children: s.map((m) => /* @__PURE__ */ e.jsx(
804
+ nt,
805
+ {
806
+ value: m,
807
+ onSelect: (f) => {
808
+ a(f), d(!1);
809
+ },
810
+ className: "cursor-pointer",
811
+ children: m
812
+ },
813
+ m
814
+ )) })
815
+ }
816
+ )
817
+ ] });
818
+ }, me = (t) => /* @__PURE__ */ e.jsx(tt, { className: "bg-transparent", children: /* @__PURE__ */ e.jsx(Ns, { ...t }) }), ot = (t, s) => {
819
+ const a = p.forwardRef(({ className: n, asChild: o, ...i }, l) => {
820
+ const u = o ? Bt : t;
821
+ return p.createElement(u, {
822
+ ...i,
823
+ ref: l,
824
+ className: typeof s == "function" ? s({ className: n }) : c(s, n)
825
+ });
826
+ });
827
+ return a.displayName = `VariantComponent(${t})`, a;
828
+ }, Ne = ot(
829
+ "div",
830
+ "hover:bg-accent/40 grid grid-cols-[2fr_3fr] gap-2 items-center px-3"
831
+ ), ws = Object.freeze([
832
+ "Accept",
833
+ "Accept-Encoding",
834
+ "Accept-Language",
835
+ "Authorization",
836
+ "Cache-Control",
837
+ "Connection",
838
+ "Content-Disposition",
839
+ "Content-Encoding",
840
+ "Content-Language",
841
+ "Content-Length",
842
+ "Content-Range",
843
+ "Content-Security-Policy",
844
+ "Content-Type",
845
+ "Cookie",
846
+ "Date",
847
+ "ETag",
848
+ "Expires",
849
+ "Host",
850
+ "If-Modified-Since",
851
+ "Location",
852
+ "Origin",
853
+ "Pragma",
854
+ "Referer",
855
+ "Set-Cookie",
856
+ "User-Agent",
857
+ "X-Requested-With"
858
+ ]), Cs = ({
859
+ control: t,
860
+ register: s
861
+ }) => {
862
+ const { fields: a, append: n, remove: o } = ue({
863
+ control: t,
864
+ name: "headers"
865
+ }), { setValue: i } = pe(), l = E([]), u = E([]), d = () => {
866
+ n({
867
+ name: "",
868
+ value: "",
869
+ active: !1
870
+ });
871
+ }, h = (b) => {
872
+ var x;
873
+ (x = l.current[b]) == null || x.focus();
874
+ }, v = (b) => {
875
+ d(), requestAnimationFrame(() => {
876
+ var x;
877
+ return (x = u.current[b + 1]) == null ? void 0 : x.focus();
878
+ });
879
+ };
880
+ return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
881
+ /* @__PURE__ */ e.jsx(K, { className: "overflow-hidden", children: /* @__PURE__ */ e.jsx(Ne, { children: a.map((b, x) => /* @__PURE__ */ e.jsxs("div", { className: "group grid col-span-full grid-cols-subgrid", children: [
882
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 ", children: [
883
+ /* @__PURE__ */ e.jsx(
884
+ k,
885
+ {
886
+ control: t,
887
+ name: `headers.${x}.active`,
888
+ render: ({ field: m }) => /* @__PURE__ */ e.jsx(
889
+ be,
890
+ {
891
+ variant: "outline",
892
+ id: `headers.${x}.active`,
893
+ checked: m.value,
894
+ onCheckedChange: (f) => {
895
+ m.onChange(f);
896
+ }
897
+ }
898
+ )
899
+ }
900
+ ),
901
+ /* @__PURE__ */ e.jsx(
902
+ k,
903
+ {
904
+ control: t,
905
+ name: `headers.${x}.name`,
906
+ render: ({ field: m }) => /* @__PURE__ */ e.jsx(
907
+ me,
908
+ {
909
+ ...m,
910
+ placeholder: "Name",
911
+ className: "border-0 shadow-none bg-transparent text-xs font-mono",
912
+ options: ws,
913
+ onEnterPress: () => h(x),
914
+ onChange: (f) => {
915
+ m.onChange(f), i(`headers.${x}.active`, !0);
916
+ },
917
+ ref: (f) => {
918
+ u.current[x] = f;
919
+ }
920
+ }
921
+ )
922
+ }
923
+ )
924
+ ] }),
925
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
926
+ /* @__PURE__ */ e.jsx(
927
+ k,
928
+ {
929
+ control: t,
930
+ name: `headers.${x}.value`,
931
+ render: ({ field: m }) => /* @__PURE__ */ e.jsx(
932
+ fe,
933
+ {
934
+ placeholder: "Value",
935
+ className: "w-full border-0 shadow-none text-xs font-mono focus-visible:ring-0",
936
+ ...m,
937
+ ref: (f) => {
938
+ l.current[x] = f;
939
+ },
940
+ onKeyDown: (f) => {
941
+ f.key === "Enter" && f.currentTarget.value.trim() && v(x);
942
+ },
943
+ autoComplete: "off"
944
+ }
945
+ )
946
+ }
947
+ ),
948
+ /* @__PURE__ */ e.jsx(
949
+ G,
950
+ {
951
+ size: "icon",
952
+ variant: "ghost",
953
+ className: "text-muted-foreground opacity-0 group-hover:opacity-100 rounded-full w-8 h-7",
954
+ onClick: () => {
955
+ o(x);
956
+ },
957
+ type: "button",
958
+ children: /* @__PURE__ */ e.jsx(yt, { size: 16 })
959
+ }
960
+ )
961
+ ] })
962
+ ] }, x)) }) }),
963
+ /* @__PURE__ */ e.jsx("div", { className: "text-end", children: /* @__PURE__ */ e.jsx(
964
+ G,
965
+ {
966
+ className: "",
967
+ onClick: d,
968
+ type: "button",
969
+ variant: "secondary",
970
+ children: "Add header"
971
+ }
972
+ ) })
973
+ ] });
974
+ }, Ts = ({
975
+ control: t
976
+ }) => {
977
+ const { fields: s } = ue({
978
+ control: t,
979
+ name: "pathParams"
980
+ });
981
+ return /* @__PURE__ */ e.jsx(K, { className: "rounded-lg", children: /* @__PURE__ */ e.jsx(Ne, { children: s.map((a, n) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
982
+ /* @__PURE__ */ e.jsx(
983
+ k,
984
+ {
985
+ control: t,
986
+ name: `pathParams.${n}.value`,
987
+ render: () => /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(
988
+ Ze,
989
+ {
990
+ slug: a.name,
991
+ name: a.name,
992
+ className: "font-mono text-xs px-2"
993
+ }
994
+ ) })
995
+ }
996
+ ),
997
+ /* @__PURE__ */ e.jsx("div", { className: "flex justify-between items-center", children: /* @__PURE__ */ e.jsx(
998
+ k,
999
+ {
1000
+ control: t,
1001
+ name: `pathParams.${n}.value`,
1002
+ render: ({ field: o }) => /* @__PURE__ */ e.jsx(
1003
+ fe,
1004
+ {
1005
+ ...o,
1006
+ required: !0,
1007
+ placeholder: "Enter value",
1008
+ className: "w-full border-0 shadow-none text-xs font-mono hover:bg-accent"
1009
+ }
1010
+ )
1011
+ }
1012
+ ) })
1013
+ ] })) }) });
1014
+ }, Ss = ot(
1015
+ "input",
1016
+ "px-2 bg-transparent h-6 font-mono text-xs m-2"
1017
+ ), Ps = ({
1018
+ control: t,
1019
+ queryParams: s
1020
+ }) => {
1021
+ const { fields: a } = ue({
1022
+ control: t,
1023
+ name: "queryParams"
1024
+ }), n = pe(), o = s.map((i) => !!i.isRequired);
1025
+ return /* @__PURE__ */ e.jsx(K, { className: "rounded-lg", children: /* @__PURE__ */ e.jsx("div", { className: "w-full ", children: a.map((i, l) => {
1026
+ const u = s.find(
1027
+ (d) => d.name === i.name
1028
+ );
1029
+ return /* @__PURE__ */ e.jsxs(Ne, { children: [
1030
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
1031
+ /* @__PURE__ */ e.jsx(
1032
+ k,
1033
+ {
1034
+ control: t,
1035
+ name: `queryParams.${l}.active`,
1036
+ render: ({ field: d }) => /* @__PURE__ */ e.jsx(
1037
+ be,
1038
+ {
1039
+ variant: "outline",
1040
+ id: `queryParams.${l}.active`,
1041
+ className: "mr-2",
1042
+ checked: d.value,
1043
+ onCheckedChange: d.onChange
1044
+ }
1045
+ )
1046
+ }
1047
+ ),
1048
+ /* @__PURE__ */ e.jsx(
1049
+ k,
1050
+ {
1051
+ control: t,
1052
+ render: ({ field: d }) => o[l] ? /* @__PURE__ */ e.jsx(Ss, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
1053
+ "label",
1054
+ {
1055
+ className: "flex items-center cursor-pointer gap-1",
1056
+ htmlFor: `queryParams.${l}.active`,
1057
+ title: o[l] ? "Required field" : void 0,
1058
+ children: [
1059
+ d.value,
1060
+ o[l] && /* @__PURE__ */ e.jsx("sup", { children: " *" })
1061
+ ]
1062
+ }
1063
+ ) }) : /* @__PURE__ */ e.jsx(
1064
+ me,
1065
+ {
1066
+ value: d.value,
1067
+ options: s.map((h) => h.name),
1068
+ onChange: (h) => {
1069
+ d.onChange(h);
1070
+ },
1071
+ className: "border-0 font-mono text-xs bg-transparent hover:bg-transparent"
1072
+ }
1073
+ ),
1074
+ name: `queryParams.${l}.name`
1075
+ }
1076
+ )
1077
+ ] }),
1078
+ /* @__PURE__ */ e.jsx("div", { className: "flex justify-between items-center", children: /* @__PURE__ */ e.jsx(
1079
+ k,
1080
+ {
1081
+ control: t,
1082
+ render: ({ field: d }) => (u == null ? void 0 : u.enum) && u.enum.length > 0 ? /* @__PURE__ */ e.jsx(
1083
+ me,
1084
+ {
1085
+ value: d.value,
1086
+ options: u.enum ?? [],
1087
+ onChange: (v) => {
1088
+ d.onChange(v), n.setValue(`queryParams.${l}.active`, !0);
1089
+ },
1090
+ className: "font-mono text-xs border-0 ring-1 ring-ring"
1091
+ }
1092
+ ) : /* @__PURE__ */ e.jsx(
1093
+ fe,
1094
+ {
1095
+ ...d,
1096
+ onChange: (v) => {
1097
+ d.onChange(v.target.value), v.target.value.length > 0 && n.setValue(`queryParams.${l}.active`, !0);
1098
+ },
1099
+ placeholder: "Enter value",
1100
+ className: "w-full border-0 shadow-none text-xs font-mono"
1101
+ }
1102
+ ),
1103
+ name: `queryParams.${l}.value`
1104
+ }
1105
+ ) })
1106
+ ] }, i.id);
1107
+ }) }) });
1108
+ }, P = {
1109
+ green: "text-green-600",
1110
+ blue: "text-sky-600",
1111
+ yellow: "text-yellow-600",
1112
+ red: "text-red-600",
1113
+ purple: "text-purple-600",
1114
+ indigo: "text-indigo-600",
1115
+ gray: "text-gray-600"
1116
+ }, $s = {
1117
+ get: P.green,
1118
+ post: P.blue,
1119
+ put: P.yellow,
1120
+ delete: P.red,
1121
+ patch: P.purple,
1122
+ options: P.indigo,
1123
+ head: P.gray,
1124
+ trace: P.gray
1125
+ }, ks = (t) => $s[t.toLocaleLowerCase()] ?? P.gray, Rs = ({
1126
+ method: t,
1127
+ url: s,
1128
+ headers: a,
1129
+ body: n
1130
+ }) => /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 font-mono text-xs", children: [
1131
+ /* @__PURE__ */ e.jsxs("div", { className: "gap-2 p-2 bg-muted rounded-md", children: [
1132
+ /* @__PURE__ */ e.jsx("span", { className: c(ks(t), "font-semibold"), children: t }),
1133
+ " ",
1134
+ /* @__PURE__ */ e.jsx("span", { className: "break-all", children: s }),
1135
+ " ",
1136
+ /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "HTTP/1.1" })
1137
+ ] }),
1138
+ /* @__PURE__ */ e.jsxs("div", { className: "mx-1.5 flex flex-col gap-3", children: [
1139
+ /* @__PURE__ */ e.jsxs(Ae, { defaultOpen: !0, children: [
1140
+ /* @__PURE__ */ e.jsxs(qe, { className: "flex items-center gap-2 hover:text-primary group", children: [
1141
+ /* @__PURE__ */ e.jsx(V, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
1142
+ /* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Headers" })
1143
+ ] }),
1144
+ /* @__PURE__ */ e.jsx(Le, { children: /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-[auto,1fr] gap-x-8 gap-y-1 pl-1.5 pt-2", children: a.map(([o, i]) => /* @__PURE__ */ e.jsxs(z, { children: [
1145
+ /* @__PURE__ */ e.jsx("div", { className: "text-primary", children: o }),
1146
+ /* @__PURE__ */ e.jsx("div", { className: "break-words", children: i })
1147
+ ] }, o)) }) })
1148
+ ] }),
1149
+ /* @__PURE__ */ e.jsxs(Ae, { defaultOpen: !0, children: [
1150
+ /* @__PURE__ */ e.jsxs(qe, { className: "flex items-center gap-2 hover:text-primary group", children: [
1151
+ /* @__PURE__ */ e.jsx(V, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
1152
+ /* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Body" })
1153
+ ] }),
1154
+ /* @__PURE__ */ e.jsx(Le, { children: /* @__PURE__ */ e.jsx("div", { className: "pl-0 pt-2", children: /* @__PURE__ */ e.jsx(
1155
+ "div",
1156
+ {
1157
+ className: c(
1158
+ "whitespace-pre-wrap break-all bg-muted p-2 rounded-md",
1159
+ !n && "text-muted-foreground"
1160
+ ),
1161
+ children: n ?? "Empty body"
1162
+ }
1163
+ ) }) })
1164
+ ] })
1165
+ ] })
1166
+ ] }), Ve = ge.Root, Fe = ge.CollapsibleTrigger, ze = ge.CollapsibleContent;
1167
+ function we(t) {
1168
+ if (t === null) return "null";
1169
+ if (Array.isArray(t)) {
1170
+ if (t.length === 0) return "any[]";
1171
+ const s = t[0];
1172
+ return s === void 0 ? "any[]" : `${we(s)}[]`;
1173
+ }
1174
+ return typeof t == "object" ? Is(t) : typeof t;
1175
+ }
1176
+ function Is(t, s = "") {
1177
+ const a = ["{"];
1178
+ for (const [n, o] of Object.entries(t)) {
1179
+ const i = we(o);
1180
+ a.push(` ${n}: ${i};`);
1181
+ }
1182
+ return a.push("}"), a.join(`
1183
+ `);
1184
+ }
1185
+ function Os(t) {
1186
+ return { lines: [`type GeneratedType = ${we(t)};`] };
1187
+ }
1188
+ const Es = {
1189
+ 200: "OK",
1190
+ 201: "Created",
1191
+ 202: "Accepted",
1192
+ 204: "No Content",
1193
+ 400: "Bad Request",
1194
+ 401: "Unauthorized",
1195
+ 403: "Forbidden",
1196
+ 404: "Not Found",
1197
+ 405: "Method Not Allowed",
1198
+ 500: "Internal Server Error"
1199
+ }, As = (t) => {
1200
+ var a;
1201
+ return (a = Object.entries({
1202
+ "application/json": "json",
1203
+ "text/json": "json",
1204
+ "text/html": "html",
1205
+ "text/css": "css",
1206
+ "text/javascript": "javascript",
1207
+ "application/xml": "xml",
1208
+ "application/xhtml+xml": "xhtml"
1209
+ }).find(
1210
+ ([n]) => t.includes(n)
1211
+ )) == null ? void 0 : a[1];
1212
+ }, qs = (t) => {
1213
+ var a;
1214
+ const s = ((a = t.find(([n, o]) => n === "Content-Type")) == null ? void 0 : a[1]) || "";
1215
+ return As(s);
1216
+ }, Ls = (t) => {
1217
+ try {
1218
+ return JSON.stringify(JSON.parse(t), null, 2);
1219
+ } catch {
1220
+ return null;
1221
+ }
1222
+ }, Ds = (t) => {
1223
+ const s = [
1224
+ "Content-Type",
1225
+ "Content-Length",
1226
+ "Authorization",
1227
+ "X-RateLimit-Remaining",
1228
+ "X-RateLimit-Limit",
1229
+ "Cache-Control",
1230
+ "ETag"
1231
+ ].map((a) => a.toLowerCase());
1232
+ return [...t].sort(([a], [n]) => {
1233
+ const o = s.indexOf(a.toLowerCase()), i = s.indexOf(n.toLowerCase());
1234
+ return o === i ? 0 : o === -1 ? 1 : i === -1 ? -1 : o - i;
1235
+ });
1236
+ }, Vs = ({
1237
+ body: t = "",
1238
+ headers: s,
1239
+ status: a,
1240
+ time: n,
1241
+ size: o,
1242
+ url: i
1243
+ }) => {
1244
+ var m;
1245
+ const l = qs(s), u = Ls(t), d = u || t, [h, v] = F(
1246
+ u ? "formatted" : "raw"
1247
+ ), b = wt({
1248
+ queryKey: ["types", d],
1249
+ queryFn: async () => Os(JSON.parse(d)),
1250
+ enabled: h === "types"
1251
+ }), x = Ds([...s]);
1252
+ return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 h-full overflow-y-scroll max-h-[calc(100vh-220px)] py-4", children: [
1253
+ /* @__PURE__ */ e.jsxs(Ve, { defaultOpen: !0, children: [
1254
+ /* @__PURE__ */ e.jsxs(Fe, { className: "flex items-center gap-2 hover:text-primary group", children: [
1255
+ /* @__PURE__ */ e.jsx(V, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
1256
+ /* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Headers" })
1257
+ ] }),
1258
+ /* @__PURE__ */ e.jsx(ze, { children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-[auto,1fr] gap-x-8 gap-y-1 pl-1.5 pt-2 font-mono text-xs", children: [
1259
+ x.slice(0, 5).map(([f, C]) => /* @__PURE__ */ e.jsxs(z, { children: [
1260
+ /* @__PURE__ */ e.jsx("div", { className: "text-primary whitespace-pre", children: f }),
1261
+ /* @__PURE__ */ e.jsx("div", { className: "break-all", children: C })
1262
+ ] }, f)),
1263
+ x.length > 5 && /* @__PURE__ */ e.jsxs(Ve, { className: "col-span-full grid-cols-subgrid grid", children: [
1264
+ /* @__PURE__ */ e.jsxs(Fe, { className: "col-span-2 text-xs text-muted-foreground hover:text-primary flex items-center gap-1 py-1", children: [
1265
+ /* @__PURE__ */ e.jsx(V, { className: "h-3 w-3 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
1266
+ "Show ",
1267
+ x.length - 5,
1268
+ " more headers"
1269
+ ] }),
1270
+ /* @__PURE__ */ e.jsx(ze, { className: "col-span-full grid grid-cols-subgrid gap-x-8 gap-y-1 ", children: x.slice(5).map(([f, C]) => /* @__PURE__ */ e.jsxs(z, { children: [
1271
+ /* @__PURE__ */ e.jsx("div", { className: "text-primary whitespace-pre", children: f }),
1272
+ /* @__PURE__ */ e.jsx("div", { className: "break-all", children: C })
1273
+ ] }, f)) })
1274
+ ] })
1275
+ ] }) })
1276
+ ] }),
1277
+ /* @__PURE__ */ e.jsx(xe, { className: "shadow-none", children: /* @__PURE__ */ e.jsx(
1278
+ _t,
1279
+ {
1280
+ language: h === "types" ? "typescript" : h === "raw" ? u ? "plain" : l : "json",
1281
+ noBackground: !0,
1282
+ className: "overflow-x-auto p-4 text-xs max-h-[calc(83.333vh-180px)]",
1283
+ code: (h === "raw" ? t : h === "types" ? (m = b.data) == null ? void 0 : m.lines.join(`
1284
+ `) : d) ?? ""
1285
+ }
1286
+ ) }),
1287
+ /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 justify-between", children: [
1288
+ /* @__PURE__ */ e.jsxs("div", { className: "flex text-xs gap-2 border bg-muted rounded-md p-2 items-center h-8 font-mono divide-x", children: [
1289
+ /* @__PURE__ */ e.jsxs("div", { children: [
1290
+ /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "Status" }),
1291
+ " ",
1292
+ a,
1293
+ " ",
1294
+ Es[a] ?? ""
1295
+ ] }),
1296
+ /* @__PURE__ */ e.jsxs("div", { children: [
1297
+ /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "Time" }),
1298
+ " ",
1299
+ n.toFixed(0),
1300
+ "ms"
1301
+ ] }),
1302
+ /* @__PURE__ */ e.jsxs("div", { children: [
1303
+ /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "Size" }),
1304
+ " ",
1305
+ o,
1306
+ "B"
1307
+ ] })
1308
+ ] }),
1309
+ u && /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs(
1310
+ He,
1311
+ {
1312
+ value: h,
1313
+ onValueChange: (f) => v(f),
1314
+ children: [
1315
+ /* @__PURE__ */ e.jsx(Me, { className: "min-w-32", children: /* @__PURE__ */ e.jsx(Be, { placeholder: "View" }) }),
1316
+ /* @__PURE__ */ e.jsxs(Ue, { children: [
1317
+ /* @__PURE__ */ e.jsx(B, { value: "formatted", children: "Formatted" }),
1318
+ /* @__PURE__ */ e.jsx(B, { value: "raw", children: "Raw" }),
1319
+ /* @__PURE__ */ e.jsx(B, { value: "types", children: "Types" })
1320
+ ] })
1321
+ ]
1322
+ }
1323
+ ) })
1324
+ ] })
1325
+ ] });
1326
+ }, Fs = ({
1327
+ queryMutation: t,
1328
+ showPathParamsWarning: s
1329
+ }) => {
1330
+ var n;
1331
+ const a = ((((n = t.data) == null ? void 0 : n.status) ?? 0) / 100).toFixed(0);
1332
+ return /* @__PURE__ */ e.jsx("div", { className: "min-w-0 p-8 bg-muted/70 overflow-y-auto", children: t.error ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
1333
+ s && /* @__PURE__ */ e.jsx(Ut, { type: "caution", children: "Some path parameters are missing values. Please fill them in to ensure the request is sent correctly." }),
1334
+ /* @__PURE__ */ e.jsxs(xe, { children: [
1335
+ /* @__PURE__ */ e.jsx(Dt, { children: /* @__PURE__ */ e.jsx(Vt, { children: "Request failed" }) }),
1336
+ /* @__PURE__ */ e.jsxs(Ft, { children: [
1337
+ "Error:",
1338
+ " ",
1339
+ t.error.message || String(t.error) || "Unexpected error"
1340
+ ] })
1341
+ ] })
1342
+ ] }) : t.data ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ e.jsxs(Je, { defaultValue: "response", children: [
1343
+ /* @__PURE__ */ e.jsxs(Qe, { children: [
1344
+ /* @__PURE__ */ e.jsx(I, { value: "request", children: "Request" }),
1345
+ /* @__PURE__ */ e.jsxs(I, { value: "response", children: [
1346
+ "Response",
1347
+ /* @__PURE__ */ e.jsxs(
1348
+ "span",
1349
+ {
1350
+ className: c(
1351
+ "text-xs font-mono ml-1",
1352
+ a === "2" && "text-green-500",
1353
+ a === "3" && "text-blue-500",
1354
+ a === "4" && "text-yellow-500",
1355
+ a === "5" && "text-red-500"
1356
+ ),
1357
+ children: [
1358
+ "(",
1359
+ t.data.status,
1360
+ ")"
1361
+ ]
1362
+ }
1363
+ )
1364
+ ] })
1365
+ ] }),
1366
+ /* @__PURE__ */ e.jsx(O, { value: "request", children: /* @__PURE__ */ e.jsx(Rs, { ...t.data.request }) }),
1367
+ /* @__PURE__ */ e.jsx(O, { value: "response", children: /* @__PURE__ */ e.jsx(
1368
+ Vs,
1369
+ {
1370
+ status: t.data.status,
1371
+ time: t.data.time,
1372
+ size: t.data.size,
1373
+ headers: t.data.headers,
1374
+ body: t.data.body,
1375
+ url: t.data.request.url
1376
+ }
1377
+ ) })
1378
+ ] }) }) : /* @__PURE__ */ e.jsx("div", { className: "grid place-items-center h-full", children: /* @__PURE__ */ e.jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children: t.isPending ? /* @__PURE__ */ e.jsx(Ht, {}) : "Send a request first to see the response here" }) }) });
1379
+ }, zs = ({
1380
+ identities: t,
1381
+ formRef: s,
1382
+ disabled: a
1383
+ }) => {
1384
+ const { setValue: n } = pe(), [o, i] = F();
1385
+ return t.length === 0 ? /* @__PURE__ */ e.jsx(U, { disabled: a, children: "Send" }) : /* @__PURE__ */ e.jsxs("div", { className: "flex", children: [
1386
+ /* @__PURE__ */ e.jsx(
1387
+ U,
1388
+ {
1389
+ className: "rounded-r-none inset-shadow-sm",
1390
+ disabled: a,
1391
+ onClick: () => {
1392
+ var l;
1393
+ return (l = s == null ? void 0 : s.current) == null ? void 0 : l.requestSubmit();
1394
+ },
1395
+ children: "Send"
1396
+ }
1397
+ ),
1398
+ /* @__PURE__ */ e.jsxs(Ke, { children: [
1399
+ /* @__PURE__ */ e.jsx(Xe, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1400
+ U,
1401
+ {
1402
+ disabled: a,
1403
+ className: "rounded-l-none border-l border-border/40 inset-shadow-sm w-6",
1404
+ size: "icon",
1405
+ children: /* @__PURE__ */ e.jsx(vt, { className: "w-4 h-4" })
1406
+ }
1407
+ ) }),
1408
+ /* @__PURE__ */ e.jsx(ye, { value: o, children: /* @__PURE__ */ e.jsx(ve, { className: "w-56", align: "end", alignOffset: -150, children: [{ id: D, label: "None" }, ...t].map(
1409
+ (l) => /* @__PURE__ */ e.jsxs(
1410
+ je,
1411
+ {
1412
+ onClick: () => {
1413
+ var u;
1414
+ i(l.id), n("identity", l.id), (u = s == null ? void 0 : s.current) == null || u.requestSubmit();
1415
+ },
1416
+ onMouseEnter: () => i(l.id),
1417
+ onMouseLeave: () => i(void 0),
1418
+ children: [
1419
+ /* @__PURE__ */ e.jsx(Q, { value: l.id, className: "mr-2" }),
1420
+ l.label
1421
+ ]
1422
+ },
1423
+ l.id
1424
+ )
1425
+ ) }) })
1426
+ ] })
1427
+ ] });
1428
+ }, D = "__none", _s = ({
1429
+ server: t,
1430
+ servers: s,
1431
+ url: a,
1432
+ method: n,
1433
+ headers: o = [],
1434
+ queryParams: i = [],
1435
+ pathParams: l = [],
1436
+ defaultBody: u = "",
1437
+ examples: d
1438
+ }) => {
1439
+ var $e, ke, Re;
1440
+ const { selectedServer: h, setSelectedServer: v } = Lt(), [, b] = Pt(), { register: x, control: m, handleSubmit: f, watch: C, setValue: N, ...$ } = At({
1441
+ defaultValues: {
1442
+ body: u,
1443
+ queryParams: i.map((r) => ({
1444
+ name: r.name,
1445
+ value: r.defaultValue ?? "",
1446
+ active: r.defaultActive ?? !1,
1447
+ enum: r.enum ?? []
1448
+ })).concat([
1449
+ {
1450
+ name: "",
1451
+ value: "",
1452
+ active: !1,
1453
+ enum: []
1454
+ }
1455
+ ]),
1456
+ pathParams: l.map((r) => ({
1457
+ name: r.name,
1458
+ value: r.defaultValue ?? ""
1459
+ })),
1460
+ headers: o.map((r) => ({
1461
+ name: r.name,
1462
+ value: r.defaultValue ?? "",
1463
+ active: r.defaultActive ?? !1
1464
+ })).concat([
1465
+ {
1466
+ name: "",
1467
+ value: "",
1468
+ active: !1
1469
+ }
1470
+ ]),
1471
+ identity: D
1472
+ }
1473
+ }), T = C(), R = Ct(), Ce = E(!1);
1474
+ _e(() => {
1475
+ var S;
1476
+ if (Ce.current) return;
1477
+ const r = (S = R.data) == null ? void 0 : S.at(0);
1478
+ r && (N("identity", r.id), Ce.current = !0);
1479
+ }, [N, R.data]);
1480
+ const Te = E(null), Se = Et({
1481
+ mutationFn: async (r) => {
1482
+ var M, A;
1483
+ const S = performance.now(), w = new Request(
1484
+ ns(h ?? t, a, r),
1485
+ {
1486
+ method: n.toUpperCase(),
1487
+ headers: Object.fromEntries(
1488
+ r.headers.filter((y) => y.name && y.active).map((y) => [y.name, y.value])
1489
+ ),
1490
+ body: r.body ? r.body : void 0
1491
+ }
1492
+ );
1493
+ r.identity !== D && ((A = (M = R.data) == null ? void 0 : M.find((y) => y.id === r.identity)) == null || A.authorizeRequest(w));
1494
+ try {
1495
+ const y = await fetch(w, {
1496
+ signal: AbortSignal.timeout(5e3)
1497
+ }), X = performance.now() - S, q = await y.text(), Y = new URL(w.url);
1498
+ return {
1499
+ status: y.status,
1500
+ headers: Array.from(y.headers.entries()),
1501
+ size: q.length,
1502
+ body: q,
1503
+ time: X,
1504
+ request: {
1505
+ method: w.method.toUpperCase(),
1506
+ url: w.url,
1507
+ headers: [
1508
+ ["Host", Y.host],
1509
+ ["User-Agent", "Zudoku Playground"],
1510
+ ...Array.from(w.headers.entries())
1511
+ ],
1512
+ body: r.body ? r.body : void 0
1513
+ }
1514
+ };
1515
+ } catch (y) {
1516
+ throw y instanceof TypeError ? new Error(
1517
+ "The request failed, possibly due to network issues or CORS policy."
1518
+ ) : y;
1519
+ }
1520
+ }
1521
+ }), lt = a.split("/").map((r, S, w) => {
1522
+ var q;
1523
+ const M = r.startsWith("{") && r.endsWith("}") || r.startsWith(":"), A = r.replace(/[:{}]/g, ""), y = (q = T.pathParams.find((Y) => Y.name === A)) == null ? void 0 : q.value, X = /* @__PURE__ */ e.jsx(
1524
+ Ze,
1525
+ {
1526
+ backgroundOpacity: "25%",
1527
+ name: r,
1528
+ slug: r,
1529
+ title: y ? void 0 : `Missing value for path parameter \`${A}\``,
1530
+ children: y ? encodeURIComponent(y) : r
1531
+ }
1532
+ );
1533
+ return (
1534
+ // eslint-disable-next-line react/no-array-index-key
1535
+ /* @__PURE__ */ e.jsxs(z, { children: [
1536
+ M ? X : r,
1537
+ S < w.length - 1 && "/",
1538
+ /* @__PURE__ */ e.jsx("wbr", {})
1539
+ ] }, r + S)
1540
+ );
1541
+ }), Pe = T.queryParams.filter((r) => r.active).map((r, S, w) => /* @__PURE__ */ e.jsxs(z, { children: [
1542
+ r.name,
1543
+ "=",
1544
+ encodeURIComponent(r.value).replaceAll("%20", "+"),
1545
+ S < w.length - 1 && "&",
1546
+ /* @__PURE__ */ e.jsx("wbr", {})
1547
+ ] }, r.name)), it = /* @__PURE__ */ e.jsx("div", { className: "inline-block opacity-50 hover:opacity-100 transition", children: s && s.length > 1 ? /* @__PURE__ */ e.jsxs(
1548
+ He,
1549
+ {
1550
+ onValueChange: (r) => {
1551
+ b(() => {
1552
+ v(r);
1553
+ });
1554
+ },
1555
+ value: h,
1556
+ defaultValue: h,
1557
+ children: [
1558
+ /* @__PURE__ */ e.jsx(Me, { className: "p-0 border-none flex-row-reverse bg-transparent text-xs gap-0.5 h-auto", children: /* @__PURE__ */ e.jsx(Be, {}) }),
1559
+ /* @__PURE__ */ e.jsx(Ue, { children: s.map((r) => /* @__PURE__ */ e.jsx(B, { value: r, children: r.replace(/^https?:\/\//, "") }, r)) })
1560
+ ]
1561
+ }
1562
+ ) : /* @__PURE__ */ e.jsx("span", { children: t.replace(/^https?:\/\//, "") }) });
1563
+ return /* @__PURE__ */ e.jsx(
1564
+ qt,
1565
+ {
1566
+ register: x,
1567
+ control: m,
1568
+ handleSubmit: f,
1569
+ watch: C,
1570
+ setValue: N,
1571
+ ...$,
1572
+ children: /* @__PURE__ */ e.jsx(
1573
+ "form",
1574
+ {
1575
+ onSubmit: f((r) => Se.mutateAsync(r)),
1576
+ ref: Te,
1577
+ children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-2 text-sm h-full", children: [
1578
+ /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 p-4 after:bg-muted-foreground/20 relative after:absolute after:w-px after:inset-0 after:left-auto", children: [
1579
+ /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-stretch", children: [
1580
+ /* @__PURE__ */ e.jsxs("div", { className: "flex flex-1 items-center w-full border rounded-md", children: [
1581
+ /* @__PURE__ */ e.jsx("div", { className: "border-r p-2 bg-muted rounded-l-md self-stretch font-semibold font-mono flex items-center", children: n.toUpperCase() }),
1582
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center flex-wrap p-2 font-mono text-xs break-all", children: [
1583
+ it,
1584
+ lt,
1585
+ Pe.length > 0 ? "?" : "",
1586
+ Pe
1587
+ ] })
1588
+ ] }),
1589
+ /* @__PURE__ */ e.jsx(
1590
+ zs,
1591
+ {
1592
+ identities: R.data ?? [],
1593
+ formRef: Te,
1594
+ disabled: $.formState.isSubmitting
1595
+ }
1596
+ )
1597
+ ] }),
1598
+ /* @__PURE__ */ e.jsxs(Je, { defaultValue: "parameters", children: [
1599
+ /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-1 justify-between", children: /* @__PURE__ */ e.jsxs(Qe, { children: [
1600
+ /* @__PURE__ */ e.jsxs(I, { value: "parameters", children: [
1601
+ "Parameters",
1602
+ (T.pathParams.some((r) => r.value !== "") || T.queryParams.some((r) => r.active)) && /* @__PURE__ */ e.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ml-2" })
1603
+ ] }),
1604
+ /* @__PURE__ */ e.jsxs(I, { value: "headers", children: [
1605
+ "Headers",
1606
+ T.headers.filter((r) => r.active).length > 0 && /* @__PURE__ */ e.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ml-2" })
1607
+ ] }),
1608
+ /* @__PURE__ */ e.jsxs(I, { value: "auth", children: [
1609
+ "Auth",
1610
+ T.identity !== D && /* @__PURE__ */ e.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ml-2" })
1611
+ ] }),
1612
+ /* @__PURE__ */ e.jsx(I, { value: "body", children: "Body" })
1613
+ ] }) }),
1614
+ /* @__PURE__ */ e.jsx(O, { value: "headers", children: /* @__PURE__ */ e.jsx(Cs, { control: m, register: x }) }),
1615
+ /* @__PURE__ */ e.jsxs(O, { value: "parameters", children: [
1616
+ l.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
1617
+ /* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Path Parameters" }),
1618
+ /* @__PURE__ */ e.jsx(Ts, { control: m })
1619
+ ] }),
1620
+ /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
1621
+ /* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Query Parameters" }),
1622
+ /* @__PURE__ */ e.jsx(Ps, { control: m, queryParams: i })
1623
+ ] })
1624
+ ] }),
1625
+ /* @__PURE__ */ e.jsxs(O, { value: "body", children: [
1626
+ !["POST", "PUT", "PATCH", "DELETE"].includes(
1627
+ n.toUpperCase()
1628
+ ) && /* @__PURE__ */ e.jsxs(ie, { className: "mb-2", children: [
1629
+ /* @__PURE__ */ e.jsx(Oe, { className: "w-4 h-4" }),
1630
+ /* @__PURE__ */ e.jsx(de, { children: "Body" }),
1631
+ /* @__PURE__ */ e.jsx(ce, { children: "Body is only supported for POST, PUT, PATCH, and DELETE requests" })
1632
+ ] }),
1633
+ /* @__PURE__ */ e.jsx(
1634
+ We,
1635
+ {
1636
+ ...x("body"),
1637
+ className: c(
1638
+ "border w-full rounded-lg p-2 bg-muted h-40 font-mono",
1639
+ !["POST", "PUT", "PATCH", "DELETE"].includes(
1640
+ n.toUpperCase()
1641
+ ) && "h-20"
1642
+ ),
1643
+ placeholder: ["POST", "PUT", "PATCH", "DELETE"].includes(
1644
+ n.toUpperCase()
1645
+ ) ? void 0 : "This request does not support a body",
1646
+ disabled: !["POST", "PUT", "PATCH", "DELETE"].includes(
1647
+ n.toUpperCase()
1648
+ )
1649
+ }
1650
+ ),
1651
+ d && /* @__PURE__ */ e.jsx(
1652
+ cs,
1653
+ {
1654
+ examples: d,
1655
+ onSelect: (r) => N("body", JSON.stringify(r.value, null, 2))
1656
+ }
1657
+ )
1658
+ ] }),
1659
+ /* @__PURE__ */ e.jsx(O, { value: "auth", children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
1660
+ (($e = R.data) == null ? void 0 : $e.length) === 0 && /* @__PURE__ */ e.jsxs(ie, { children: [
1661
+ /* @__PURE__ */ e.jsx(Oe, { className: "w-4 h-4" }),
1662
+ /* @__PURE__ */ e.jsx(de, { children: "Authentication" }),
1663
+ /* @__PURE__ */ e.jsx(ce, { children: "No identities found. Please create an identity first." })
1664
+ ] }),
1665
+ /* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center gap-2", children: /* @__PURE__ */ e.jsx(xe, { className: "w-full overflow-hidden", children: /* @__PURE__ */ e.jsxs(
1666
+ ye,
1667
+ {
1668
+ onValueChange: (r) => N("identity", r),
1669
+ value: T.identity,
1670
+ defaultValue: T.identity,
1671
+ className: "gap-0",
1672
+ disabled: ((ke = R.data) == null ? void 0 : ke.length) === 0,
1673
+ children: [
1674
+ /* @__PURE__ */ e.jsxs(
1675
+ L,
1676
+ {
1677
+ className: "h-12 border-b items-center flex p-4 cursor-pointer hover:bg-accent",
1678
+ htmlFor: "none",
1679
+ children: [
1680
+ /* @__PURE__ */ e.jsx(Q, { value: D, id: "none", children: "None" }),
1681
+ /* @__PURE__ */ e.jsx(L, { htmlFor: "none", className: "ml-2", children: "None" })
1682
+ ]
1683
+ }
1684
+ ),
1685
+ (Re = R.data) == null ? void 0 : Re.map((r) => /* @__PURE__ */ e.jsxs(
1686
+ L,
1687
+ {
1688
+ className: "h-12 border-b items-center flex p-4 cursor-pointer hover:bg-accent",
1689
+ children: [
1690
+ /* @__PURE__ */ e.jsx(
1691
+ Q,
1692
+ {
1693
+ value: r.id,
1694
+ id: r.id,
1695
+ children: r.label
1696
+ }
1697
+ ),
1698
+ /* @__PURE__ */ e.jsx(L, { htmlFor: r.id, className: "ml-2", children: r.label })
1699
+ ]
1700
+ },
1701
+ r.id
1702
+ ))
1703
+ ]
1704
+ }
1705
+ ) }) })
1706
+ ] }) })
1707
+ ] })
1708
+ ] }),
1709
+ /* @__PURE__ */ e.jsx(
1710
+ Fs,
1711
+ {
1712
+ queryMutation: Se,
1713
+ showPathParamsWarning: T.pathParams.some(
1714
+ (r) => r.value === ""
1715
+ )
1716
+ }
1717
+ )
1718
+ ] })
1719
+ }
1720
+ )
1721
+ }
1722
+ );
1723
+ }, Hs = ({
1724
+ className: t,
1725
+ size: s = 16
1726
+ }) => /* @__PURE__ */ e.jsx(
1727
+ "svg",
1728
+ {
1729
+ xmlns: "http://www.w3.org/2000/svg",
1730
+ viewBox: "0 0 24 24",
1731
+ fill: "currentColor",
1732
+ className: t,
1733
+ width: s,
1734
+ height: s,
1735
+ children: /* @__PURE__ */ e.jsx(
1736
+ "path",
1737
+ {
1738
+ fillRule: "evenodd",
1739
+ 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",
1740
+ clipRule: "evenodd"
1741
+ }
1742
+ )
1743
+ }
1744
+ ), Ms = (t) => {
1745
+ const [s, a] = F(!1);
1746
+ return /* @__PURE__ */ e.jsxs(kt, { onOpenChange: (n) => a(n), children: [
1747
+ /* @__PURE__ */ e.jsx(Rt, { asChild: !0, children: t.children ?? /* @__PURE__ */ e.jsxs("button", { className: "flex gap-1 items-center px-2 py-1 rounded-md transition text-xs bg-primary text-primary-foreground shadow-sm hover:bg-primary/80", children: [
1748
+ "Test",
1749
+ /* @__PURE__ */ e.jsx(Hs, { className: "", size: 14 })
1750
+ ] }) }),
1751
+ /* @__PURE__ */ e.jsxs(
1752
+ It,
1753
+ {
1754
+ className: "max-w-screen-xl w-full h-5/6 overflow-hidden p-0",
1755
+ "aria-describedby": void 0,
1756
+ children: [
1757
+ /* @__PURE__ */ e.jsx(St, { children: /* @__PURE__ */ e.jsx(Ot, { children: "Playground" }) }),
1758
+ s && /* @__PURE__ */ e.jsx(_s, { ...t })
1759
+ ]
1760
+ }
1761
+ )
1762
+ ] });
1763
+ }, Bs = Xt(`
1764
+ query GetCategories($input: JSON!, $type: SchemaType!) {
1765
+ schema(input: $input, type: $type) {
1766
+ url
1767
+ tags {
1768
+ __typename
1769
+ name
1770
+ operations {
1771
+ __typename
1772
+ slug
1773
+ deprecated
1774
+ method
1775
+ summary
1776
+ operationId
1777
+ path
1778
+ }
1779
+ }
1780
+ }
1781
+ }
1782
+ `), Us = {
1783
+ get: "green",
1784
+ post: "blue",
1785
+ put: "yellow",
1786
+ delete: "red",
1787
+ patch: "purple",
1788
+ options: "gray",
1789
+ head: "gray"
1790
+ }, ga = (t) => {
1791
+ const s = Ee(t.navigationId ?? "/reference"), a = t.type === "file" ? Object.keys(t.input) : [], n = new es(t);
1792
+ return {
1793
+ getHead: () => {
1794
+ if (t.type === "url" && !t.skipPreload)
1795
+ return /* @__PURE__ */ e.jsx(
1796
+ "link",
1797
+ {
1798
+ rel: "preload",
1799
+ href: t.input,
1800
+ as: "fetch",
1801
+ crossOrigin: "anonymous"
1802
+ }
1803
+ );
1804
+ if (t.server)
1805
+ return /* @__PURE__ */ e.jsx("link", { rel: "preconnect", href: t.server });
1806
+ },
1807
+ getMdxComponents: () => ({
1808
+ OpenPlaygroundButton: ({
1809
+ requireAuth: o,
1810
+ server: i,
1811
+ method: l,
1812
+ url: u,
1813
+ ...d
1814
+ }) => {
1815
+ const h = Nt();
1816
+ if (!i)
1817
+ throw new Error("Server is required");
1818
+ return o && !h.isAuthenticated ? /* @__PURE__ */ e.jsxs(
1819
+ G,
1820
+ {
1821
+ className: "gap-2 items-center",
1822
+ variant: "outline",
1823
+ onClick: h.login,
1824
+ children: [
1825
+ "Login to open in Playground ",
1826
+ /* @__PURE__ */ e.jsx(jt, { size: 16 })
1827
+ ]
1828
+ }
1829
+ ) : /* @__PURE__ */ e.jsx(
1830
+ Ms,
1831
+ {
1832
+ url: u ?? "/",
1833
+ method: l ?? "get",
1834
+ server: i,
1835
+ ...d,
1836
+ children: /* @__PURE__ */ e.jsxs(G, { className: "gap-2 items-center", variant: "outline", children: [
1837
+ "Open in Playground ",
1838
+ /* @__PURE__ */ e.jsx(bt, { size: 16 })
1839
+ ] })
1840
+ }
1841
+ );
1842
+ }
1843
+ }),
1844
+ getSidebar: async (o) => {
1845
+ if (!ut({ path: s, end: !1 }, o))
1846
+ return [];
1847
+ try {
1848
+ const i = a.find((d) => o === Ee(s, d)) ?? Object.keys(t.input).at(0), u = (await n.fetch(Bs, {
1849
+ type: t.type,
1850
+ input: t.type === "file" ? t.input[i] : t.input,
1851
+ version: i
1852
+ })).schema.tags.filter((d) => d.operations.length > 0).map((d) => ({
1853
+ type: "category",
1854
+ label: d.name || "Other endpoints",
1855
+ collapsible: !0,
1856
+ collapsed: !1,
1857
+ items: d.operations.map((h) => ({
1858
+ type: "link",
1859
+ label: h.summary ?? h.path,
1860
+ href: `#${h.slug}`,
1861
+ badge: {
1862
+ label: h.method,
1863
+ color: Us[h.method.toLowerCase()],
1864
+ invert: !0
1865
+ }
1866
+ }))
1867
+ }));
1868
+ return u.unshift({
1869
+ type: "link",
1870
+ label: "Overview",
1871
+ href: "#description"
1872
+ }), u;
1873
+ } catch {
1874
+ return [];
1875
+ }
1876
+ },
1877
+ getRoutes: () => [null, ...a].map((i) => ({
1878
+ path: s + (i ? `/${i}` : ""),
1879
+ async lazy() {
1880
+ const { OpenApiRoute: l } = await import("./Route-DJ0ZlVq1.js");
1881
+ return {
1882
+ element: /* @__PURE__ */ e.jsx(
1883
+ l,
1884
+ {
1885
+ basePath: s,
1886
+ versions: a,
1887
+ client: n,
1888
+ config: t
1889
+ }
1890
+ )
1891
+ };
1892
+ },
1893
+ children: [
1894
+ {
1895
+ index: !0,
1896
+ async lazy() {
1897
+ const { OperationList: l } = await import("./OperationList-DH-zIgtq.js");
1898
+ return { element: /* @__PURE__ */ e.jsx(l, {}) };
1899
+ }
1900
+ }
1901
+ ]
1902
+ }))
1903
+ };
1904
+ };
1905
+ export {
1906
+ Ze as C,
1907
+ Ms as P,
1908
+ Ve as a,
1909
+ ze as b,
1910
+ Fe as c,
1911
+ Xt as g,
1912
+ ks as m,
1913
+ ga as o
1914
+ };
1915
+ //# sourceMappingURL=index-DmqsUPcm.js.map