zudoku 0.0.0-e4d0ea8 → 0.0.0-e5be921

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