zudoku 0.0.0-ec30b50 → 0.0.0-ee328ec

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