zudoku 0.0.0-fdf886de → 0.0.0-fe92c9e1

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 (1220) hide show
  1. package/README.md +32 -12
  2. package/cli.js +1 -0
  3. package/client.d.ts +8 -0
  4. package/dist/app/ZuploBuildConfig.d.ts +1 -1
  5. package/dist/app/ZuploBuildConfig.js +1 -1
  6. package/dist/app/ZuploBuildConfig.js.map +1 -1
  7. package/dist/app/entry.client.js +5 -4
  8. package/dist/app/entry.client.js.map +1 -1
  9. package/dist/app/entry.server.js +16 -3
  10. package/dist/app/entry.server.js.map +1 -1
  11. package/dist/app/env.js +6 -6
  12. package/dist/app/env.js.map +1 -1
  13. package/dist/app/main.d.ts +91 -1
  14. package/dist/app/main.js +5 -1
  15. package/dist/app/main.js.map +1 -1
  16. package/dist/app/standalone.js +4 -1
  17. package/dist/app/standalone.js.map +1 -1
  18. package/dist/cli/cli.d.ts +9 -0
  19. package/dist/cli/cli.js +5 -10
  20. package/dist/cli/cli.js.map +1 -1
  21. package/dist/cli/cmds/build.d.ts +1 -1
  22. package/dist/cli/cmds/dev.d.ts +1 -1
  23. package/dist/cli/cmds/preview.d.ts +1 -1
  24. package/dist/cli/common/analytics/lib.js +1 -1
  25. package/dist/cli/common/analytics/lib.js.map +1 -1
  26. package/dist/cli/common/logger.js +0 -1
  27. package/dist/cli/common/logger.js.map +1 -1
  28. package/dist/cli/common/machine-id/lib.js +3 -2
  29. package/dist/cli/common/machine-id/lib.js.map +1 -1
  30. package/dist/cli/common/outdated.js +2 -1
  31. package/dist/cli/common/outdated.js.map +1 -1
  32. package/dist/cli/common/output.js +2 -3
  33. package/dist/cli/common/output.js.map +1 -1
  34. package/dist/cli/common/utils/box.js +2 -2
  35. package/dist/cli/common/utils/box.js.map +1 -1
  36. package/dist/cli/common/validators/lib.js +1 -1
  37. package/dist/cli/common/validators/lib.js.map +1 -1
  38. package/dist/cli/common/version-check.d.ts +2 -0
  39. package/dist/cli/common/version-check.js +58 -0
  40. package/dist/cli/common/version-check.js.map +1 -0
  41. package/dist/cli/dev/handler.js +0 -4
  42. package/dist/cli/dev/handler.js.map +1 -1
  43. package/dist/codegen.js +2 -2
  44. package/dist/codegen.js.map +1 -1
  45. package/dist/config/config.d.ts +15 -41
  46. package/dist/config/loader.js.map +1 -1
  47. package/dist/config/validators/BuildSchema.d.ts +16 -8
  48. package/dist/config/validators/BuildSchema.js +22 -5
  49. package/dist/config/validators/BuildSchema.js.map +1 -1
  50. package/dist/config/validators/InputNavigationSchema.d.ts +260 -78
  51. package/dist/config/validators/InputNavigationSchema.js +5 -2
  52. package/dist/config/validators/InputNavigationSchema.js.map +1 -1
  53. package/dist/config/validators/InputNavigationSchema.test-d.js +2 -1
  54. package/dist/config/validators/InputNavigationSchema.test-d.js.map +1 -1
  55. package/dist/config/validators/NavigationSchema.d.ts +1 -1
  56. package/dist/config/validators/NavigationSchema.js +2 -2
  57. package/dist/config/validators/NavigationSchema.js.map +1 -1
  58. package/dist/config/validators/ProtectedRoutesSchema.d.ts +2 -2
  59. package/dist/config/validators/ProtectedRoutesSchema.js +1 -1
  60. package/dist/config/validators/ProtectedRoutesSchema.js.map +1 -1
  61. package/dist/config/validators/auth.d.ts +2 -2
  62. package/dist/config/validators/auth.js +1 -1
  63. package/dist/config/validators/auth.js.map +1 -1
  64. package/dist/config/validators/icon-types.d.ts +1 -1
  65. package/dist/config/validators/icon-types.js +43 -0
  66. package/dist/config/validators/icon-types.js.map +1 -1
  67. package/dist/config/validators/validate.d.ts +202 -20
  68. package/dist/config/validators/validate.js +70 -11
  69. package/dist/config/validators/validate.js.map +1 -1
  70. package/dist/config/validators/validate.test.js +1 -2
  71. package/dist/config/validators/validate.test.js.map +1 -1
  72. package/dist/flat-config.d.ts +52 -3
  73. package/dist/index.d.ts +5 -5
  74. package/dist/index.js +2 -2
  75. package/dist/index.js.map +1 -1
  76. package/dist/lib/MissingIcon.d.ts +1 -1
  77. package/dist/lib/MissingIcon.js.map +1 -1
  78. package/dist/lib/assets/language-icons/c.d.ts +3 -0
  79. package/dist/lib/assets/language-icons/c.js +4 -0
  80. package/dist/lib/assets/language-icons/c.js.map +1 -0
  81. package/dist/lib/assets/language-icons/commonlisp.d.ts +3 -0
  82. package/dist/lib/assets/language-icons/commonlisp.js +4 -0
  83. package/dist/lib/assets/language-icons/commonlisp.js.map +1 -0
  84. package/dist/lib/assets/language-icons/cpp.d.ts +3 -0
  85. package/dist/lib/assets/language-icons/cpp.js +4 -0
  86. package/dist/lib/assets/language-icons/cpp.js.map +1 -0
  87. package/dist/lib/assets/language-icons/csharp.d.ts +3 -0
  88. package/dist/lib/assets/language-icons/csharp.js +4 -0
  89. package/dist/lib/assets/language-icons/csharp.js.map +1 -0
  90. package/dist/lib/assets/language-icons/css.d.ts +3 -0
  91. package/dist/lib/assets/language-icons/css.js +4 -0
  92. package/dist/lib/assets/language-icons/css.js.map +1 -0
  93. package/dist/lib/assets/language-icons/dart.d.ts +3 -0
  94. package/dist/lib/assets/language-icons/dart.js +4 -0
  95. package/dist/lib/assets/language-icons/dart.js.map +1 -0
  96. package/dist/lib/assets/language-icons/elixir.d.ts +3 -0
  97. package/dist/lib/assets/language-icons/elixir.js +4 -0
  98. package/dist/lib/assets/language-icons/elixir.js.map +1 -0
  99. package/dist/lib/assets/language-icons/go.d.ts +3 -0
  100. package/dist/lib/assets/language-icons/go.js +4 -0
  101. package/dist/lib/assets/language-icons/go.js.map +1 -0
  102. package/dist/lib/assets/language-icons/graphql.d.ts +3 -0
  103. package/dist/lib/assets/language-icons/graphql.js +4 -0
  104. package/dist/lib/assets/language-icons/graphql.js.map +1 -0
  105. package/dist/lib/assets/language-icons/html.d.ts +3 -0
  106. package/dist/lib/assets/language-icons/html.js +4 -0
  107. package/dist/lib/assets/language-icons/html.js.map +1 -0
  108. package/dist/lib/assets/language-icons/java.d.ts +3 -0
  109. package/dist/lib/assets/language-icons/java.js +4 -0
  110. package/dist/lib/assets/language-icons/java.js.map +1 -0
  111. package/dist/lib/assets/language-icons/javascript.d.ts +3 -0
  112. package/dist/lib/assets/language-icons/javascript.js +4 -0
  113. package/dist/lib/assets/language-icons/javascript.js.map +1 -0
  114. package/dist/lib/assets/language-icons/json.d.ts +3 -0
  115. package/dist/lib/assets/language-icons/json.js +4 -0
  116. package/dist/lib/assets/language-icons/json.js.map +1 -0
  117. package/dist/lib/assets/language-icons/kotlin.d.ts +3 -0
  118. package/dist/lib/assets/language-icons/kotlin.js +4 -0
  119. package/dist/lib/assets/language-icons/kotlin.js.map +1 -0
  120. package/dist/lib/assets/language-icons/markdown.d.ts +3 -0
  121. package/dist/lib/assets/language-icons/markdown.js +4 -0
  122. package/dist/lib/assets/language-icons/markdown.js.map +1 -0
  123. package/dist/lib/assets/language-icons/mdx.d.ts +3 -0
  124. package/dist/lib/assets/language-icons/mdx.js +4 -0
  125. package/dist/lib/assets/language-icons/mdx.js.map +1 -0
  126. package/dist/lib/assets/language-icons/objectivec.d.ts +3 -0
  127. package/dist/lib/assets/language-icons/objectivec.js +4 -0
  128. package/dist/lib/assets/language-icons/objectivec.js.map +1 -0
  129. package/dist/lib/assets/language-icons/ocaml.d.ts +3 -0
  130. package/dist/lib/assets/language-icons/ocaml.js +4 -0
  131. package/dist/lib/assets/language-icons/ocaml.js.map +1 -0
  132. package/dist/lib/assets/language-icons/php.d.ts +3 -0
  133. package/dist/lib/assets/language-icons/php.js +4 -0
  134. package/dist/lib/assets/language-icons/php.js.map +1 -0
  135. package/dist/lib/assets/language-icons/powershell.d.ts +3 -0
  136. package/dist/lib/assets/language-icons/powershell.js +4 -0
  137. package/dist/lib/assets/language-icons/powershell.js.map +1 -0
  138. package/dist/lib/assets/language-icons/python.d.ts +3 -0
  139. package/dist/lib/assets/language-icons/python.js +4 -0
  140. package/dist/lib/assets/language-icons/python.js.map +1 -0
  141. package/dist/lib/assets/language-icons/react.d.ts +3 -0
  142. package/dist/lib/assets/language-icons/react.js +4 -0
  143. package/dist/lib/assets/language-icons/react.js.map +1 -0
  144. package/dist/lib/assets/language-icons/ruby.d.ts +3 -0
  145. package/dist/lib/assets/language-icons/ruby.js +4 -0
  146. package/dist/lib/assets/language-icons/ruby.js.map +1 -0
  147. package/dist/lib/assets/language-icons/rust.d.ts +3 -0
  148. package/dist/lib/assets/language-icons/rust.js +4 -0
  149. package/dist/lib/assets/language-icons/rust.js.map +1 -0
  150. package/dist/lib/assets/language-icons/scala.d.ts +3 -0
  151. package/dist/lib/assets/language-icons/scala.js +4 -0
  152. package/dist/lib/assets/language-icons/scala.js.map +1 -0
  153. package/dist/lib/assets/language-icons/shell.d.ts +3 -0
  154. package/dist/lib/assets/language-icons/shell.js +4 -0
  155. package/dist/lib/assets/language-icons/shell.js.map +1 -0
  156. package/dist/lib/assets/language-icons/swift.d.ts +3 -0
  157. package/dist/lib/assets/language-icons/swift.js +4 -0
  158. package/dist/lib/assets/language-icons/swift.js.map +1 -0
  159. package/dist/lib/assets/language-icons/toml.d.ts +3 -0
  160. package/dist/lib/assets/language-icons/toml.js +4 -0
  161. package/dist/lib/assets/language-icons/toml.js.map +1 -0
  162. package/dist/lib/assets/language-icons/typescript.d.ts +3 -0
  163. package/dist/lib/assets/language-icons/typescript.js +4 -0
  164. package/dist/lib/assets/language-icons/typescript.js.map +1 -0
  165. package/dist/lib/assets/language-icons/xml.d.ts +3 -0
  166. package/dist/lib/assets/language-icons/xml.js +4 -0
  167. package/dist/lib/assets/language-icons/xml.js.map +1 -0
  168. package/dist/lib/assets/language-icons/yaml.d.ts +3 -0
  169. package/dist/lib/assets/language-icons/yaml.js +4 -0
  170. package/dist/lib/assets/language-icons/yaml.js.map +1 -0
  171. package/dist/lib/assets/language-icons/zig.d.ts +3 -0
  172. package/dist/lib/assets/language-icons/zig.js +4 -0
  173. package/dist/lib/assets/language-icons/zig.js.map +1 -0
  174. package/dist/lib/auth/issuer.js +3 -0
  175. package/dist/lib/auth/issuer.js.map +1 -1
  176. package/dist/lib/auth/issuer.test.js +1 -0
  177. package/dist/lib/auth/issuer.test.js.map +1 -1
  178. package/dist/lib/authentication/AuthenticationPlugin.d.ts +1 -1
  179. package/dist/lib/authentication/authentication.d.ts +19 -13
  180. package/dist/lib/authentication/components/OAuthErrorPage.d.ts +1 -1
  181. package/dist/lib/authentication/components/OAuthErrorPage.js +1 -1
  182. package/dist/lib/authentication/components/OAuthErrorPage.js.map +1 -1
  183. package/dist/lib/authentication/components/SignIn.js +6 -5
  184. package/dist/lib/authentication/components/SignIn.js.map +1 -1
  185. package/dist/lib/authentication/components/SignOut.js +6 -6
  186. package/dist/lib/authentication/components/SignOut.js.map +1 -1
  187. package/dist/lib/authentication/components/SignUp.js +5 -5
  188. package/dist/lib/authentication/components/SignUp.js.map +1 -1
  189. package/dist/lib/authentication/hook.d.ts +3 -2
  190. package/dist/lib/authentication/hook.js +12 -8
  191. package/dist/lib/authentication/hook.js.map +1 -1
  192. package/dist/lib/authentication/providers/auth0.d.ts +2 -2
  193. package/dist/lib/authentication/providers/auth0.js +9 -5
  194. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  195. package/dist/lib/authentication/providers/azureb2c.d.ts +5 -5
  196. package/dist/lib/authentication/providers/azureb2c.js +3 -3
  197. package/dist/lib/authentication/providers/azureb2c.js.map +1 -1
  198. package/dist/lib/authentication/providers/clerk.d.ts +2 -2
  199. package/dist/lib/authentication/providers/clerk.js +2 -2
  200. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  201. package/dist/lib/authentication/providers/firebase.d.ts +4 -0
  202. package/dist/lib/authentication/providers/firebase.js +215 -0
  203. package/dist/lib/authentication/providers/firebase.js.map +1 -0
  204. package/dist/lib/authentication/providers/openid.d.ts +8 -8
  205. package/dist/lib/authentication/providers/openid.js +5 -3
  206. package/dist/lib/authentication/providers/openid.js.map +1 -1
  207. package/dist/lib/authentication/providers/supabase/SupabaseAuthUI.d.ts +8 -0
  208. package/dist/lib/authentication/providers/supabase/SupabaseAuthUI.js +39 -0
  209. package/dist/lib/authentication/providers/supabase/SupabaseAuthUI.js.map +1 -0
  210. package/dist/lib/authentication/providers/supabase.d.ts +2 -2
  211. package/dist/lib/authentication/providers/supabase.js +30 -30
  212. package/dist/lib/authentication/providers/supabase.js.map +1 -1
  213. package/dist/lib/authentication/state.d.ts +5 -7
  214. package/dist/lib/authentication/state.js +2 -14
  215. package/dist/lib/authentication/state.js.map +1 -1
  216. package/dist/lib/authentication/ui/ZudokuAuthUi.d.ts +24 -0
  217. package/dist/lib/authentication/ui/ZudokuAuthUi.js +124 -0
  218. package/dist/lib/authentication/ui/ZudokuAuthUi.js.map +1 -0
  219. package/dist/lib/authentication/ui/icons/Apple.d.ts +3 -0
  220. package/dist/lib/authentication/ui/icons/Apple.js +4 -0
  221. package/dist/lib/authentication/ui/icons/Apple.js.map +1 -0
  222. package/dist/lib/authentication/ui/icons/Facebook.d.ts +3 -0
  223. package/dist/lib/authentication/ui/icons/Facebook.js +4 -0
  224. package/dist/lib/authentication/ui/icons/Facebook.js.map +1 -0
  225. package/dist/lib/authentication/ui/icons/Github.d.ts +3 -0
  226. package/dist/lib/authentication/ui/icons/Github.js +4 -0
  227. package/dist/lib/authentication/ui/icons/Github.js.map +1 -0
  228. package/dist/lib/authentication/ui/icons/Google.d.ts +3 -0
  229. package/dist/lib/authentication/ui/icons/Google.js +4 -0
  230. package/dist/lib/authentication/ui/icons/Google.js.map +1 -0
  231. package/dist/lib/authentication/ui/icons/Microsoft.d.ts +3 -0
  232. package/dist/lib/authentication/ui/icons/Microsoft.js +4 -0
  233. package/dist/lib/authentication/ui/icons/Microsoft.js.map +1 -0
  234. package/dist/lib/authentication/ui/icons/X.d.ts +3 -0
  235. package/dist/lib/authentication/ui/icons/X.js +4 -0
  236. package/dist/lib/authentication/ui/icons/X.js.map +1 -0
  237. package/dist/lib/authentication/use-broadcast/shared.d.ts +1 -1
  238. package/dist/lib/authentication/use-broadcast/shared.js +3 -3
  239. package/dist/lib/authentication/use-broadcast/shared.js.map +1 -1
  240. package/dist/lib/authentication/use-broadcast/useBroadcast.js +2 -2
  241. package/dist/lib/authentication/use-broadcast/useBroadcast.js.map +1 -1
  242. package/dist/lib/components/Autocomplete.d.ts +3 -1
  243. package/dist/lib/components/Autocomplete.js +6 -2
  244. package/dist/lib/components/Autocomplete.js.map +1 -1
  245. package/dist/lib/components/Bootstrap.js.map +1 -1
  246. package/dist/lib/components/BuildCheck.js +4 -3
  247. package/dist/lib/components/BuildCheck.js.map +1 -1
  248. package/dist/lib/components/Header.js +1 -3
  249. package/dist/lib/components/Header.js.map +1 -1
  250. package/dist/lib/components/Heading.d.ts +2 -2
  251. package/dist/lib/components/Heading.js +2 -6
  252. package/dist/lib/components/Heading.js.map +1 -1
  253. package/dist/lib/components/LanguageIcon.d.ts +3 -0
  254. package/dist/lib/components/LanguageIcon.js +163 -0
  255. package/dist/lib/components/LanguageIcon.js.map +1 -0
  256. package/dist/lib/components/Layout.js.map +1 -1
  257. package/dist/lib/components/Main.js +1 -1
  258. package/dist/lib/components/Main.js.map +1 -1
  259. package/dist/lib/components/Markdown.js +2 -2
  260. package/dist/lib/components/Markdown.js.map +1 -1
  261. package/dist/lib/components/Meta.js +1 -1
  262. package/dist/lib/components/Meta.js.map +1 -1
  263. package/dist/lib/components/MobileTopNavigation.js +4 -4
  264. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  265. package/dist/lib/components/PathRenderer.js +1 -1
  266. package/dist/lib/components/PathRenderer.js.map +1 -1
  267. package/dist/lib/components/Search.js +1 -1
  268. package/dist/lib/components/Search.js.map +1 -1
  269. package/dist/lib/components/Slot.js.map +1 -1
  270. package/dist/lib/components/Slot.test.js +7 -3
  271. package/dist/lib/components/Slot.test.js.map +1 -1
  272. package/dist/lib/components/TopNavigation.d.ts +1 -1
  273. package/dist/lib/components/TopNavigation.js +2 -2
  274. package/dist/lib/components/TopNavigation.js.map +1 -1
  275. package/dist/lib/components/Zudoku.js +5 -5
  276. package/dist/lib/components/Zudoku.js.map +1 -1
  277. package/dist/lib/components/cache.d.ts +3 -1
  278. package/dist/lib/components/cache.js +3 -5
  279. package/dist/lib/components/cache.js.map +1 -1
  280. package/dist/lib/components/context/ComponentsContext.js.map +1 -1
  281. package/dist/lib/components/context/RouterEventsEmitter.js.map +1 -1
  282. package/dist/lib/components/context/SlotProvider.js.map +1 -1
  283. package/dist/lib/components/context/ViewportAnchorContext.js +1 -1
  284. package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
  285. package/dist/lib/components/context/ZudokuContext.d.ts +1 -1
  286. package/dist/lib/components/context/ZudokuContext.js +10 -2
  287. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  288. package/dist/lib/components/context/ZudokuProvider.d.ts +1 -1
  289. package/dist/lib/components/index.d.ts +14 -4
  290. package/dist/lib/components/index.js +3 -1
  291. package/dist/lib/components/index.js.map +1 -1
  292. package/dist/lib/components/navigation/NavigationCategory.js +6 -1
  293. package/dist/lib/components/navigation/NavigationCategory.js.map +1 -1
  294. package/dist/lib/components/navigation/NavigationItem.js +3 -3
  295. package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
  296. package/dist/lib/components/navigation/NavigationWrapper.js.map +1 -1
  297. package/dist/lib/components/navigation/Toc.js +1 -1
  298. package/dist/lib/components/navigation/Toc.js.map +1 -1
  299. package/dist/lib/components/navigation/ZudokuLogo.d.ts +1 -1
  300. package/dist/lib/components/navigation/utils.d.ts +3 -3
  301. package/dist/lib/components/navigation/utils.js +1 -2
  302. package/dist/lib/components/navigation/utils.js.map +1 -1
  303. package/dist/lib/core/RouteGuard.d.ts +1 -1
  304. package/dist/lib/core/RouteGuard.js +12 -20
  305. package/dist/lib/core/RouteGuard.js.map +1 -1
  306. package/dist/lib/core/ZudokuContext.d.ts +2 -1
  307. package/dist/lib/core/ZudokuContext.js +3 -0
  308. package/dist/lib/core/ZudokuContext.js.map +1 -1
  309. package/dist/lib/core/__internal.d.ts +1 -1
  310. package/dist/lib/errors/ErrorAlert.js +1 -2
  311. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  312. package/dist/lib/errors/RouterError.d.ts +3 -1
  313. package/dist/lib/errors/RouterError.js +3 -2
  314. package/dist/lib/errors/RouterError.js.map +1 -1
  315. package/dist/lib/errors/TopLevelError.d.ts +2 -2
  316. package/dist/lib/errors/TopLevelError.js +1 -2
  317. package/dist/lib/errors/TopLevelError.js.map +1 -1
  318. package/dist/lib/hooks/index.d.ts +3 -3
  319. package/dist/lib/oas/graphql/circular.js +2 -2
  320. package/dist/lib/oas/graphql/circular.js.map +1 -1
  321. package/dist/lib/oas/graphql/index.js +39 -3
  322. package/dist/lib/oas/graphql/index.js.map +1 -1
  323. package/dist/lib/oas/parser/dereference/index.js +2 -1
  324. package/dist/lib/oas/parser/dereference/index.js.map +1 -1
  325. package/dist/lib/oas/parser/dereference/resolveRef.js +3 -3
  326. package/dist/lib/oas/parser/dereference/resolveRef.js.map +1 -1
  327. package/dist/lib/oas/parser/index.js +8 -4
  328. package/dist/lib/oas/parser/index.js.map +1 -1
  329. package/dist/lib/oas/parser/upgrade/index.js +2 -1
  330. package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
  331. package/dist/lib/plugins/api-catalog/Catalog.js +7 -1
  332. package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -1
  333. package/dist/lib/plugins/api-keys/CreateApiKey.d.ts +1 -1
  334. package/dist/lib/plugins/api-keys/CreateApiKeyDialog.d.ts +11 -0
  335. package/dist/lib/plugins/api-keys/CreateApiKeyDialog.js +9 -0
  336. package/dist/lib/plugins/api-keys/CreateApiKeyDialog.js.map +1 -0
  337. package/dist/lib/plugins/api-keys/ProtectedRoute.js +4 -1
  338. package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -1
  339. package/dist/lib/plugins/api-keys/SettingsApiKeys.d.ts +1 -1
  340. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +10 -16
  341. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  342. package/dist/lib/plugins/api-keys/index.d.ts +3 -3
  343. package/dist/lib/plugins/api-keys/index.js +1 -1
  344. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  345. package/dist/lib/plugins/custom-pages/index.d.ts +1 -1
  346. package/dist/lib/plugins/markdown/MdxPage.d.ts +3 -2
  347. package/dist/lib/plugins/markdown/MdxPage.js +32 -8
  348. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  349. package/dist/lib/plugins/markdown/assets/ChatGPTLogo.d.ts +2 -0
  350. package/dist/lib/plugins/markdown/assets/ChatGPTLogo.js +3 -0
  351. package/dist/lib/plugins/markdown/assets/ChatGPTLogo.js.map +1 -0
  352. package/dist/lib/plugins/markdown/assets/ClaudeLogo.d.ts +2 -0
  353. package/dist/lib/plugins/markdown/assets/ClaudeLogo.js +3 -0
  354. package/dist/lib/plugins/markdown/assets/ClaudeLogo.js.map +1 -0
  355. package/dist/lib/plugins/markdown/index.d.ts +4 -2
  356. package/dist/lib/plugins/markdown/index.js +1 -1
  357. package/dist/lib/plugins/markdown/index.js.map +1 -1
  358. package/dist/lib/plugins/openapi/CollapsibleCode.d.ts +1 -0
  359. package/dist/lib/plugins/openapi/CollapsibleCode.js +2 -1
  360. package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -1
  361. package/dist/lib/plugins/openapi/ColorizedParam.js +4 -1
  362. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  363. package/dist/lib/plugins/openapi/Endpoint.js +2 -2
  364. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  365. package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.d.ts +5 -0
  366. package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js +10 -0
  367. package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js.map +1 -0
  368. package/dist/lib/plugins/openapi/MCPEndpoint.d.ts +5 -0
  369. package/dist/lib/plugins/openapi/MCPEndpoint.js +56 -0
  370. package/dist/lib/plugins/openapi/MCPEndpoint.js.map +1 -0
  371. package/dist/lib/plugins/openapi/OasProvider.d.ts +1 -1
  372. package/dist/lib/plugins/openapi/OasProvider.js +1 -0
  373. package/dist/lib/plugins/openapi/OasProvider.js.map +1 -1
  374. package/dist/lib/plugins/openapi/OperationList.d.ts +0 -2
  375. package/dist/lib/plugins/openapi/OperationList.js +31 -8
  376. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  377. package/dist/lib/plugins/openapi/OperationListItem.d.ts +4 -3
  378. package/dist/lib/plugins/openapi/OperationListItem.js +12 -5
  379. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  380. package/dist/lib/plugins/openapi/ParamInfos.d.ts +1 -1
  381. package/dist/lib/plugins/openapi/ParamInfos.js +11 -9
  382. package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -1
  383. package/dist/lib/plugins/openapi/ParameterList.d.ts +2 -2
  384. package/dist/lib/plugins/openapi/ParameterList.js +1 -1
  385. package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
  386. package/dist/lib/plugins/openapi/ParameterListItem.d.ts +2 -3
  387. package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
  388. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  389. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +3 -4
  390. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +3 -5
  391. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
  392. package/dist/lib/plugins/openapi/RequestBodySidecarBox.d.ts +11 -4
  393. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +2 -2
  394. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  395. package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +3 -1
  396. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +14 -2
  397. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  398. package/dist/lib/plugins/openapi/Sidecar.d.ts +5 -3
  399. package/dist/lib/plugins/openapi/Sidecar.js +54 -30
  400. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  401. package/dist/lib/plugins/openapi/SidecarExamples.d.ts +11 -6
  402. package/dist/lib/plugins/openapi/SidecarExamples.js +15 -33
  403. package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
  404. package/dist/lib/plugins/openapi/StaggeredRender.d.ts +1 -1
  405. package/dist/lib/plugins/openapi/client/GraphQLContext.d.ts +1 -1
  406. package/dist/lib/plugins/openapi/client/createServer.js +1 -2
  407. package/dist/lib/plugins/openapi/client/createServer.js.map +1 -1
  408. package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
  409. package/dist/lib/plugins/openapi/components/NonHighlightedCode.d.ts +4 -0
  410. package/dist/lib/plugins/openapi/components/NonHighlightedCode.js +5 -0
  411. package/dist/lib/plugins/openapi/components/NonHighlightedCode.js.map +1 -0
  412. package/dist/lib/plugins/openapi/components/ResponseContent.js +1 -1
  413. package/dist/lib/plugins/openapi/components/ResponseContent.js.map +1 -1
  414. package/dist/lib/plugins/openapi/context.d.ts +1 -1
  415. package/dist/lib/plugins/openapi/graphql/fragment-masking.d.ts +1 -1
  416. package/dist/lib/plugins/openapi/graphql/gql.d.ts +2 -2
  417. package/dist/lib/plugins/openapi/graphql/gql.js +2 -2
  418. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  419. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +11 -2
  420. package/dist/lib/plugins/openapi/graphql/graphql.js +11 -0
  421. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  422. package/dist/lib/plugins/openapi/index.d.ts +2 -2
  423. package/dist/lib/plugins/openapi/index.js +7 -11
  424. package/dist/lib/plugins/openapi/index.js.map +1 -1
  425. package/dist/lib/plugins/openapi/interfaces.d.ts +18 -4
  426. package/dist/lib/plugins/openapi/playground/BodyPanel.d.ts +2 -2
  427. package/dist/lib/plugins/openapi/playground/BodyPanel.js +67 -15
  428. package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -1
  429. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +2 -2
  430. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -1
  431. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +3 -3
  432. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +1 -1
  433. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
  434. package/dist/lib/plugins/openapi/playground/Headers.d.ts +1 -1
  435. package/dist/lib/plugins/openapi/playground/Headers.js +23 -83
  436. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  437. package/dist/lib/plugins/openapi/playground/IdentityDialog.d.ts +1 -1
  438. package/dist/lib/plugins/openapi/playground/IdentitySelector.d.ts +1 -1
  439. package/dist/lib/plugins/openapi/playground/ParamsGrid.d.ts +10 -2
  440. package/dist/lib/plugins/openapi/playground/ParamsGrid.js +8 -1
  441. package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -1
  442. package/dist/lib/plugins/openapi/playground/PathParams.js +2 -3
  443. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  444. package/dist/lib/plugins/openapi/playground/Playground.d.ts +9 -2
  445. package/dist/lib/plugins/openapi/playground/Playground.js +70 -32
  446. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  447. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +3 -1
  448. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  449. package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +1 -1
  450. package/dist/lib/plugins/openapi/playground/QueryParams.js +16 -40
  451. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  452. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.d.ts +2 -1
  453. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js +10 -2
  454. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js.map +1 -1
  455. package/dist/lib/plugins/openapi/playground/rememberedIdentity.d.ts +5 -3
  456. package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.d.ts +8 -0
  457. package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.js +19 -0
  458. package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.js.map +1 -0
  459. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js +1 -1
  460. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js.map +1 -1
  461. package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.d.ts +1 -0
  462. package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.js +540 -0
  463. package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.js.map +1 -0
  464. package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.d.ts +40 -0
  465. package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.js +205 -0
  466. package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.js.map +1 -0
  467. package/dist/lib/plugins/openapi/playground/result-panel/Highlight.d.ts +1 -1
  468. package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js +4 -2
  469. package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js.map +1 -1
  470. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +33 -19
  471. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
  472. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +2 -2
  473. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +1 -1
  474. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
  475. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.d.ts +1 -1
  476. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js +1 -1
  477. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js.map +1 -1
  478. package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.d.ts +5 -3
  479. package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js +2 -0
  480. package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js.map +1 -1
  481. package/dist/lib/plugins/openapi/processors/removeExtensions.test.js +1 -0
  482. package/dist/lib/plugins/openapi/processors/removeExtensions.test.js.map +1 -1
  483. package/dist/lib/plugins/openapi/processors/removeParameters.test.js +1 -0
  484. package/dist/lib/plugins/openapi/processors/removeParameters.test.js.map +1 -1
  485. package/dist/lib/plugins/openapi/processors/traverse.d.ts +1 -1
  486. package/dist/lib/plugins/openapi/processors/traverse.js.map +1 -1
  487. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.d.ts +0 -3
  488. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +6 -15
  489. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
  490. package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +2 -1
  491. package/dist/lib/plugins/openapi/schema/SchemaView.js +12 -11
  492. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  493. package/dist/lib/plugins/openapi/schema/UnionView.d.ts +5 -0
  494. package/dist/lib/plugins/openapi/schema/UnionView.js +36 -0
  495. package/dist/lib/plugins/openapi/schema/UnionView.js.map +1 -0
  496. package/dist/lib/plugins/openapi/schema/union-helpers.d.ts +28 -0
  497. package/dist/lib/plugins/openapi/schema/union-helpers.js +71 -0
  498. package/dist/lib/plugins/openapi/schema/union-helpers.js.map +1 -0
  499. package/dist/lib/plugins/openapi/schema/utils.d.ts +0 -7
  500. package/dist/lib/plugins/openapi/schema/utils.js +0 -6
  501. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  502. package/dist/lib/plugins/openapi/state.d.ts +5 -3
  503. package/dist/lib/plugins/openapi/util/createHttpSnippet.d.ts +1 -1
  504. package/dist/lib/plugins/openapi/util/createHttpSnippet.js +1 -1
  505. package/dist/lib/plugins/openapi/util/createHttpSnippet.js.map +1 -1
  506. package/dist/lib/plugins/openapi/util/createNavigationCategory.js +1 -0
  507. package/dist/lib/plugins/openapi/util/createNavigationCategory.js.map +1 -1
  508. package/dist/lib/plugins/openapi/util/generateSchemaExample.d.ts +1 -1
  509. package/dist/lib/plugins/openapi/util/generateSchemaExample.js +10 -13
  510. package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
  511. package/dist/lib/plugins/openapi/util/getRoutes.js +1 -1
  512. package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
  513. package/dist/lib/plugins/openapi/util/methodColorMap.d.ts +1 -1
  514. package/dist/lib/plugins/search-inkeep/index.js +1 -1
  515. package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
  516. package/dist/lib/plugins/search-pagefind/PagefindSearch.js +1 -1
  517. package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
  518. package/dist/lib/plugins/search-pagefind/ResultList.d.ts +1 -1
  519. package/dist/lib/plugins/search-pagefind/ResultList.js +4 -1
  520. package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
  521. package/dist/lib/plugins/search-pagefind/get-results.js +0 -1
  522. package/dist/lib/plugins/search-pagefind/get-results.js.map +1 -1
  523. package/dist/lib/shiki.d.ts +3 -6
  524. package/dist/lib/shiki.js +29 -8
  525. package/dist/lib/shiki.js.map +1 -1
  526. package/dist/lib/ui/Breadcrumb.js +1 -1
  527. package/dist/lib/ui/Breadcrumb.js.map +1 -1
  528. package/dist/lib/ui/Button.d.ts +1 -1
  529. package/dist/lib/ui/Button.js +1 -0
  530. package/dist/lib/ui/Button.js.map +1 -1
  531. package/dist/lib/ui/Callout.d.ts +5 -5
  532. package/dist/lib/ui/Callout.js +5 -5
  533. package/dist/lib/ui/Callout.js.map +1 -1
  534. package/dist/lib/ui/Checkbox.d.ts +2 -2
  535. package/dist/lib/ui/Checkbox.js +4 -4
  536. package/dist/lib/ui/Checkbox.js.map +1 -1
  537. package/dist/lib/ui/CodeBlock.d.ts +1 -2
  538. package/dist/lib/ui/CodeBlock.js +3 -28
  539. package/dist/lib/ui/CodeBlock.js.map +1 -1
  540. package/dist/lib/ui/Command.d.ts +5 -5
  541. package/dist/lib/ui/Command.js +2 -6
  542. package/dist/lib/ui/Command.js.map +1 -1
  543. package/dist/lib/ui/Dialog.d.ts +12 -18
  544. package/dist/lib/ui/Dialog.js +30 -17
  545. package/dist/lib/ui/Dialog.js.map +1 -1
  546. package/dist/lib/ui/EmbeddedCodeBlock.d.ts +3 -2
  547. package/dist/lib/ui/EmbeddedCodeBlock.js +2 -2
  548. package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
  549. package/dist/lib/ui/Form.d.ts +2 -2
  550. package/dist/lib/ui/Pagination.d.ts +1 -1
  551. package/dist/lib/ui/Pagination.js +1 -1
  552. package/dist/lib/ui/Pagination.js.map +1 -1
  553. package/dist/lib/ui/ReactComponentDoc.d.ts +20 -0
  554. package/dist/lib/ui/ReactComponentDoc.js +10 -0
  555. package/dist/lib/ui/ReactComponentDoc.js.map +1 -0
  556. package/dist/lib/ui/Secret.d.ts +18 -0
  557. package/dist/lib/ui/Secret.js +26 -0
  558. package/dist/lib/ui/Secret.js.map +1 -0
  559. package/dist/lib/ui/Separator.d.ts +4 -0
  560. package/dist/lib/ui/Separator.js +8 -0
  561. package/dist/lib/ui/Separator.js.map +1 -0
  562. package/dist/lib/ui/SyntaxHighlight.d.ts +1 -0
  563. package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
  564. package/dist/lib/ui/ToggleGroup.d.ts +1 -1
  565. package/dist/lib/ui/Tooltip.d.ts +7 -7
  566. package/dist/lib/ui/Tooltip.js +16 -10
  567. package/dist/lib/ui/Tooltip.js.map +1 -1
  568. package/dist/lib/ui/Value.d.ts +5 -0
  569. package/dist/lib/ui/Value.js +13 -0
  570. package/dist/lib/ui/Value.js.map +1 -0
  571. package/dist/lib/util/MdxComponents.d.ts +3 -2
  572. package/dist/lib/util/MdxComponents.js +7 -4
  573. package/dist/lib/util/MdxComponents.js.map +1 -1
  574. package/dist/lib/util/cn.js.map +1 -1
  575. package/dist/lib/util/createVariantComponent.d.ts +7 -4
  576. package/dist/lib/util/createVariantComponent.js +5 -2
  577. package/dist/lib/util/createVariantComponent.js.map +1 -1
  578. package/dist/lib/util/flattenAllOf.d.ts +4 -0
  579. package/dist/lib/util/flattenAllOf.js +65 -0
  580. package/dist/lib/util/flattenAllOf.js.map +1 -0
  581. package/dist/lib/util/flattenAllOf.test.d.ts +1 -0
  582. package/dist/lib/util/flattenAllOf.test.js +532 -0
  583. package/dist/lib/util/flattenAllOf.test.js.map +1 -0
  584. package/dist/lib/util/groupBy.js +1 -0
  585. package/dist/lib/util/groupBy.js.map +1 -1
  586. package/dist/lib/util/humanFileSize.js +1 -1
  587. package/dist/lib/util/humanFileSize.js.map +1 -1
  588. package/dist/lib/util/invariant.js +3 -1
  589. package/dist/lib/util/invariant.js.map +1 -1
  590. package/dist/lib/util/pastellize.js +4 -4
  591. package/dist/lib/util/pastellize.js.map +1 -1
  592. package/dist/lib/util/syncZustandState.d.ts +5 -0
  593. package/dist/lib/util/syncZustandState.js +14 -0
  594. package/dist/lib/util/syncZustandState.js.map +1 -0
  595. package/dist/lib/util/traverse.d.ts +1 -0
  596. package/dist/lib/util/traverse.js +25 -0
  597. package/dist/lib/util/traverse.js.map +1 -1
  598. package/dist/lib/util/useIsomorphicLayoutEffect.js.map +1 -1
  599. package/dist/lib/util/useScrollToAnchor.js +2 -0
  600. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  601. package/dist/ts.js +3 -3
  602. package/dist/ts.js.map +1 -1
  603. package/dist/vite/api/SchemaManager.d.ts +3 -1
  604. package/dist/vite/api/SchemaManager.js +43 -32
  605. package/dist/vite/api/SchemaManager.js.map +1 -1
  606. package/dist/vite/api/SchemaManager.test.js +2 -2
  607. package/dist/vite/api/SchemaManager.test.js.map +1 -1
  608. package/dist/vite/api/schema-codegen.js +60 -42
  609. package/dist/vite/api/schema-codegen.js.map +1 -1
  610. package/dist/vite/api/schema-codegen.test.js +76 -3
  611. package/dist/vite/api/schema-codegen.test.js.map +1 -1
  612. package/dist/vite/build.js +1 -1
  613. package/dist/vite/build.js.map +1 -1
  614. package/dist/vite/dev-server.js +2 -2
  615. package/dist/vite/dev-server.js.map +1 -1
  616. package/dist/vite/error-handler.d.ts +2 -2
  617. package/dist/vite/error-handler.js.map +1 -1
  618. package/dist/vite/llms.d.ts +12 -0
  619. package/dist/vite/llms.js +66 -0
  620. package/dist/vite/llms.js.map +1 -0
  621. package/dist/vite/mdx/remark-inject-filepath.js.map +1 -1
  622. package/dist/vite/mdx/remark-last-modified.js +57 -4
  623. package/dist/vite/mdx/remark-last-modified.js.map +1 -1
  624. package/dist/vite/mdx/remark-link-rewrite.js.map +1 -1
  625. package/dist/vite/mdx/remark-static-generation.js +1 -1
  626. package/dist/vite/mdx/remark-static-generation.js.map +1 -1
  627. package/dist/vite/output.d.ts +1 -1
  628. package/dist/vite/output.js +1 -1
  629. package/dist/vite/output.js.map +1 -1
  630. package/dist/vite/plugin-api-keys.d.ts +1 -1
  631. package/dist/vite/plugin-api-keys.js +1 -1
  632. package/dist/vite/plugin-api-keys.js.map +1 -1
  633. package/dist/vite/plugin-api.js +22 -21
  634. package/dist/vite/plugin-api.js.map +1 -1
  635. package/dist/vite/plugin-auth.d.ts +1 -1
  636. package/dist/vite/plugin-auth.js +1 -1
  637. package/dist/vite/plugin-auth.js.map +1 -1
  638. package/dist/vite/plugin-component.d.ts +1 -1
  639. package/dist/vite/plugin-config-reload.d.ts +1 -1
  640. package/dist/vite/plugin-custom-pages.d.ts +1 -1
  641. package/dist/vite/plugin-custom-pages.js +1 -1
  642. package/dist/vite/plugin-custom-pages.js.map +1 -1
  643. package/dist/vite/plugin-docs.d.ts +9 -0
  644. package/dist/vite/plugin-docs.js +70 -47
  645. package/dist/vite/plugin-docs.js.map +1 -1
  646. package/dist/vite/plugin-frontmatter.js +1 -1
  647. package/dist/vite/plugin-frontmatter.js.map +1 -1
  648. package/dist/vite/plugin-markdown-export.d.ts +21 -0
  649. package/dist/vite/plugin-markdown-export.js +141 -0
  650. package/dist/vite/plugin-markdown-export.js.map +1 -0
  651. package/dist/vite/plugin-mdx.d.ts +2 -2
  652. package/dist/vite/plugin-mdx.js +44 -34
  653. package/dist/vite/plugin-mdx.js.map +1 -1
  654. package/dist/vite/plugin-metadata.d.ts +1 -1
  655. package/dist/vite/plugin-navigation.d.ts +2 -2
  656. package/dist/vite/plugin-navigation.js +38 -35
  657. package/dist/vite/plugin-navigation.js.map +1 -1
  658. package/dist/vite/plugin-redirect.d.ts +1 -1
  659. package/dist/vite/plugin-redirect.js +1 -1
  660. package/dist/vite/plugin-redirect.js.map +1 -1
  661. package/dist/vite/plugin-search.d.ts +1 -1
  662. package/dist/vite/plugin-search.js +1 -1
  663. package/dist/vite/plugin-search.js.map +1 -1
  664. package/dist/vite/plugin-shiki-register.js +1 -1
  665. package/dist/vite/plugin-shiki-register.js.map +1 -1
  666. package/dist/vite/plugin-theme.js +16 -7
  667. package/dist/vite/plugin-theme.js.map +1 -1
  668. package/dist/vite/plugin-theme.test.js +2 -0
  669. package/dist/vite/plugin-theme.test.js.map +1 -1
  670. package/dist/vite/plugin.d.ts +1 -1
  671. package/dist/vite/plugin.js +4 -2
  672. package/dist/vite/plugin.js.map +1 -1
  673. package/dist/vite/prerender/FileWritingResponse.js +5 -3
  674. package/dist/vite/prerender/FileWritingResponse.js.map +1 -1
  675. package/dist/vite/prerender/InMemoryResponse.js +3 -1
  676. package/dist/vite/prerender/InMemoryResponse.js.map +1 -1
  677. package/dist/vite/prerender/prerender.js +38 -5
  678. package/dist/vite/prerender/prerender.js.map +1 -1
  679. package/dist/vite/prerender/worker.d.ts +1 -1
  680. package/dist/vite/prerender/worker.js.map +1 -1
  681. package/dist/vite/reporter.js +2 -2
  682. package/dist/vite/reporter.js.map +1 -1
  683. package/dist/vite/shadcn-registry.d.ts +8 -33
  684. package/dist/vite/sitemap.js +4 -4
  685. package/dist/vite/sitemap.js.map +1 -1
  686. package/dist/zuplo/enrich-with-zuplo-mcp.d.ts +4 -0
  687. package/dist/zuplo/enrich-with-zuplo-mcp.js +117 -0
  688. package/dist/zuplo/enrich-with-zuplo-mcp.js.map +1 -0
  689. package/dist/zuplo/enrich-with-zuplo.d.ts +1 -0
  690. package/dist/zuplo/enrich-with-zuplo.js +4 -4
  691. package/dist/zuplo/enrich-with-zuplo.js.map +1 -1
  692. package/dist/zuplo/policy-types.js +0 -1
  693. package/dist/zuplo/policy-types.js.map +1 -1
  694. package/dist/zuplo/with-zuplo-processors.js +2 -0
  695. package/dist/zuplo/with-zuplo-processors.js.map +1 -1
  696. package/dist/zuplo/with-zuplo.js +1 -1
  697. package/dist/zuplo/with-zuplo.js.map +1 -1
  698. package/lib/{Button-B3o-2Xdf.js → Button-B3ucvvQw.js} +7 -6
  699. package/lib/Button-B3ucvvQw.js.map +1 -0
  700. package/lib/{Card-CMDQUPM4.js → Card-KFniaZn5.js} +2 -2
  701. package/lib/{Card-CMDQUPM4.js.map → Card-KFniaZn5.js.map} +1 -1
  702. package/lib/{CategoryHeading-DCpZu3yG.js → CategoryHeading-DhmodDcq.js} +2 -2
  703. package/lib/{CategoryHeading-DCpZu3yG.js.map → CategoryHeading-DhmodDcq.js.map} +1 -1
  704. package/lib/{Command-CDn17s8X.js → Command-CUcrW3qs.js} +22 -28
  705. package/lib/Command-CUcrW3qs.js.map +1 -0
  706. package/lib/Dialog-BQciPiHN.js +144 -0
  707. package/lib/Dialog-BQciPiHN.js.map +1 -0
  708. package/lib/{Drawer-DJ05s2pH.js → Drawer-Ci7XwhqT.js} +2 -2
  709. package/lib/{Drawer-DJ05s2pH.js.map → Drawer-Ci7XwhqT.js.map} +1 -1
  710. package/lib/DropdownMenu-BZ2NKQ3K.js +126 -0
  711. package/lib/DropdownMenu-BZ2NKQ3K.js.map +1 -0
  712. package/lib/{Slot-DOtTvoyj.js → ErrorAlert-B4eXGBQj.js} +2413 -2431
  713. package/lib/ErrorAlert-B4eXGBQj.js.map +1 -0
  714. package/lib/MdxPage-BSxjb_Mb.js +240 -0
  715. package/lib/MdxPage-BSxjb_Mb.js.map +1 -0
  716. package/lib/{OAuthErrorPage-Jv3r8wnL.js → OAuthErrorPage-YbraVLZt.js} +9 -9
  717. package/lib/OAuthErrorPage-YbraVLZt.js.map +1 -0
  718. package/lib/{OasProvider-CA_lpILt.js → OasProvider-CgHWBl16.js} +5 -4
  719. package/lib/OasProvider-CgHWBl16.js.map +1 -0
  720. package/lib/OperationList-BNNhgkkk.js +5482 -0
  721. package/lib/OperationList-BNNhgkkk.js.map +1 -0
  722. package/lib/{Pagination-CBiRGddW.js → Pagination-BpxzD3Tn.js} +4 -4
  723. package/lib/{Pagination-CBiRGddW.js.map → Pagination-BpxzD3Tn.js.map} +1 -1
  724. package/lib/RouteGuard-Brz95MSt.js +77 -0
  725. package/lib/RouteGuard-Brz95MSt.js.map +1 -0
  726. package/lib/RouterError-BsnUU8eo.js +42 -0
  727. package/lib/RouterError-BsnUU8eo.js.map +1 -0
  728. package/lib/{SchemaList-BeYWvBC7.js → SchemaList-C8-SHBql.js} +10 -10
  729. package/lib/{SchemaList-BeYWvBC7.js.map → SchemaList-C8-SHBql.js.map} +1 -1
  730. package/lib/SchemaView-VsgUbgRw.js +397 -0
  731. package/lib/SchemaView-VsgUbgRw.js.map +1 -0
  732. package/lib/Select-C1DeCqKv.js +372 -0
  733. package/lib/Select-C1DeCqKv.js.map +1 -0
  734. package/lib/SignUp-Bnvel-zK.js +50 -0
  735. package/lib/SignUp-Bnvel-zK.js.map +1 -0
  736. package/lib/{Spinner-mNLZ6awP.js → Spinner-CI6bRyZw.js} +2 -2
  737. package/lib/{Spinner-mNLZ6awP.js.map → Spinner-CI6bRyZw.js.map} +1 -1
  738. package/lib/{SyntaxHighlight-GR0eix_L.js → SyntaxHighlight-C19vH0V_.js} +1074 -1030
  739. package/lib/SyntaxHighlight-C19vH0V_.js.map +1 -0
  740. package/lib/{Toc-BlcGIkXc.js → Toc-DR_4nkDQ.js} +6 -6
  741. package/lib/Toc-DR_4nkDQ.js.map +1 -0
  742. package/lib/ZudokuContext-BUZ5hkWB.js +1508 -0
  743. package/lib/ZudokuContext-BUZ5hkWB.js.map +1 -0
  744. package/lib/c-B-NUhs61.js +46 -0
  745. package/lib/c-B-NUhs61.js.map +1 -0
  746. package/lib/chunk-PVWAREVJ-BMhpCH5D.js +7965 -0
  747. package/lib/chunk-PVWAREVJ-BMhpCH5D.js.map +1 -0
  748. package/lib/{circular-CGTcsqA3.js → circular-BHuymtcS.js} +30 -30
  749. package/lib/{circular-CGTcsqA3.js.map → circular-BHuymtcS.js.map} +1 -1
  750. package/lib/cn-dYga0KKN.js.map +1 -1
  751. package/lib/commonlisp-De080z23.js +28 -0
  752. package/lib/commonlisp-De080z23.js.map +1 -0
  753. package/lib/cpp-79Paht7T.js +53 -0
  754. package/lib/cpp-79Paht7T.js.map +1 -0
  755. package/lib/{createServer-DjgpuLne.js → createServer-C4Kx4Ah4.js} +3703 -3225
  756. package/lib/createServer-C4Kx4Ah4.js.map +1 -0
  757. package/lib/csharp-D8MIL50B.js +53 -0
  758. package/lib/csharp-D8MIL50B.js.map +1 -0
  759. package/lib/css-Bt6hr1td.js +54 -0
  760. package/lib/css-Bt6hr1td.js.map +1 -0
  761. package/lib/dart-B0vy1jWB.js +60 -0
  762. package/lib/dart-B0vy1jWB.js.map +1 -0
  763. package/lib/elixir-Ds8r0sF8.js +25 -0
  764. package/lib/elixir-Ds8r0sF8.js.map +1 -0
  765. package/lib/{errors-CrI3s7mR.js → errors-C43bc4dH.js} +3 -3
  766. package/lib/errors-C43bc4dH.js.map +1 -0
  767. package/lib/go-D2VsmIOS.js +25 -0
  768. package/lib/go-D2VsmIOS.js.map +1 -0
  769. package/lib/graphql-BtA6M4m5.js +25 -0
  770. package/lib/graphql-BtA6M4m5.js.map +1 -0
  771. package/lib/hook-CMeoxziF.js +40 -0
  772. package/lib/hook-CMeoxziF.js.map +1 -0
  773. package/lib/html-MGnI2uzP.js +33 -0
  774. package/lib/html-MGnI2uzP.js.map +1 -0
  775. package/lib/index-BlL_RtG2.js +3665 -0
  776. package/lib/index-BlL_RtG2.js.map +1 -0
  777. package/lib/{index-DzO-Qh6S.js → index-CfR_Jx5Q.js} +276 -278
  778. package/lib/index-CfR_Jx5Q.js.map +1 -0
  779. package/lib/index-CrcNWbel.js.map +1 -1
  780. package/lib/{index-HarEI51d.js → index-Dc4KrhPf.js} +166 -50
  781. package/lib/index-Dc4KrhPf.js.map +1 -0
  782. package/lib/{index-DmNq2fbN.js → index-nGbmHh_A.js} +2 -2
  783. package/lib/index-nGbmHh_A.js.map +1 -0
  784. package/lib/index.esm-BYObtETB.js +1294 -0
  785. package/lib/index.esm-BYObtETB.js.map +1 -0
  786. package/lib/index.esm-BnYHxCYC.js.map +1 -1
  787. package/lib/invariant-Bm-FVUQE.js.map +1 -1
  788. package/lib/java-CVLzHfb1.js +53 -0
  789. package/lib/java-CVLzHfb1.js.map +1 -0
  790. package/lib/javascript-CcmIpL4G.js +10 -0
  791. package/lib/javascript-CcmIpL4G.js.map +1 -0
  792. package/lib/json-4AyP4uiY.js +25 -0
  793. package/lib/json-4AyP4uiY.js.map +1 -0
  794. package/lib/{jsx-runtime-C5mzlN2N.js → jsx-runtime-BzflLqGi.js} +110 -112
  795. package/lib/jsx-runtime-BzflLqGi.js.map +1 -0
  796. package/lib/kotlin-v2plddBQ.js +37 -0
  797. package/lib/kotlin-v2plddBQ.js.map +1 -0
  798. package/lib/markdown-DYGWCmGQ.js +25 -0
  799. package/lib/markdown-DYGWCmGQ.js.map +1 -0
  800. package/lib/mdx-CHwYvXd4.js +32 -0
  801. package/lib/mdx-CHwYvXd4.js.map +1 -0
  802. package/lib/{mutation-Dy_5up8v.js → mutation-BSU0xu4m.js} +2 -2
  803. package/lib/{mutation-Dy_5up8v.js.map → mutation-BSU0xu4m.js.map} +1 -1
  804. package/lib/objectivec-HZY8shkd.js +32 -0
  805. package/lib/objectivec-HZY8shkd.js.map +1 -0
  806. package/lib/ocaml-DqsdDdwb.js +52 -0
  807. package/lib/ocaml-DqsdDdwb.js.map +1 -0
  808. package/lib/php-rQXzo7K_.js +25 -0
  809. package/lib/php-rQXzo7K_.js.map +1 -0
  810. package/lib/powershell-CQje9pm1.js +39 -0
  811. package/lib/powershell-CQje9pm1.js.map +1 -0
  812. package/lib/processors/traverse.js.map +1 -1
  813. package/lib/python-QIQAE5Ei.js +32 -0
  814. package/lib/python-QIQAE5Ei.js.map +1 -0
  815. package/lib/react-DHpVpxRv.js +24 -0
  816. package/lib/react-DHpVpxRv.js.map +1 -0
  817. package/lib/ruby-B2dU8Ny5.js +25 -0
  818. package/lib/ruby-B2dU8Ny5.js.map +1 -0
  819. package/lib/rust-DYnLHAi2.js +25 -0
  820. package/lib/rust-DYnLHAi2.js.map +1 -0
  821. package/lib/scala-CeKInBR8.js +25 -0
  822. package/lib/scala-CeKInBR8.js.map +1 -0
  823. package/lib/shell-HUv9oVtp.js +25 -0
  824. package/lib/shell-HUv9oVtp.js.map +1 -0
  825. package/lib/swift-B4z6ig1Z.js +25 -0
  826. package/lib/swift-B4z6ig1Z.js.map +1 -0
  827. package/lib/toml-Co9mpdct.js +32 -0
  828. package/lib/toml-Co9mpdct.js.map +1 -0
  829. package/lib/typescript-C26xdBDC.js +32 -0
  830. package/lib/typescript-C26xdBDC.js.map +1 -0
  831. package/lib/ui/Accordion.js +1 -1
  832. package/lib/ui/ActionButton.js +3 -3
  833. package/lib/ui/Alert.js +1 -1
  834. package/lib/ui/AlertDialog.js +1 -1
  835. package/lib/ui/Badge.js +1 -1
  836. package/lib/ui/Breadcrumb.js +23 -22
  837. package/lib/ui/Breadcrumb.js.map +1 -1
  838. package/lib/ui/Button.js +6 -5
  839. package/lib/ui/Button.js.map +1 -1
  840. package/lib/ui/Callout.js +19 -19
  841. package/lib/ui/Callout.js.map +1 -1
  842. package/lib/ui/Card.js +1 -1
  843. package/lib/ui/Carousel.js +1 -1
  844. package/lib/ui/Carousel.js.map +1 -1
  845. package/lib/ui/Checkbox.js +29 -26
  846. package/lib/ui/Checkbox.js.map +1 -1
  847. package/lib/ui/CodeBlock.js +217 -6
  848. package/lib/ui/CodeBlock.js.map +1 -1
  849. package/lib/ui/Command.js +21 -27
  850. package/lib/ui/Command.js.map +1 -1
  851. package/lib/ui/Dialog.js +135 -105
  852. package/lib/ui/Dialog.js.map +1 -1
  853. package/lib/ui/Drawer.js +2 -2
  854. package/lib/ui/DropdownMenu.js +1 -1
  855. package/lib/ui/EmbeddedCodeBlock.js +25 -22
  856. package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
  857. package/lib/ui/Form.js +2 -2
  858. package/lib/ui/Form.js.map +1 -1
  859. package/lib/ui/HoverCard.js +1 -1
  860. package/lib/ui/Input.js +1 -1
  861. package/lib/ui/Label.js +1 -1
  862. package/lib/ui/Pagination.js +28 -29
  863. package/lib/ui/Pagination.js.map +1 -1
  864. package/lib/ui/Popover.js +1 -1
  865. package/lib/ui/Progress.js +1 -1
  866. package/lib/ui/RadioGroup.js +1 -1
  867. package/lib/ui/ReactComponentDoc.js +28 -0
  868. package/lib/ui/ReactComponentDoc.js.map +1 -0
  869. package/lib/ui/ScrollArea.js +1 -1
  870. package/lib/ui/Secret.js +106 -0
  871. package/lib/ui/Secret.js.map +1 -0
  872. package/lib/ui/Select.js +1 -1
  873. package/lib/ui/Separator.js +27 -0
  874. package/lib/ui/Separator.js.map +1 -0
  875. package/lib/ui/Skeleton.js +1 -1
  876. package/lib/ui/Slider.js +1 -1
  877. package/lib/ui/Stepper.js +1 -1
  878. package/lib/ui/Switch.js +1 -1
  879. package/lib/ui/SyntaxHighlight.js +4 -4
  880. package/lib/ui/Tabs.js +1 -1
  881. package/lib/ui/Textarea.js +1 -1
  882. package/lib/ui/Toggle.js +1 -1
  883. package/lib/ui/ToggleGroup.js +1 -1
  884. package/lib/ui/ToggleGroup.js.map +1 -1
  885. package/lib/ui/Tooltip.js +55 -28
  886. package/lib/ui/Tooltip.js.map +1 -1
  887. package/lib/ui/Value.js +39 -0
  888. package/lib/ui/Value.js.map +1 -0
  889. package/lib/useCopyToClipboard-B_085nfO.js +14 -0
  890. package/lib/useCopyToClipboard-B_085nfO.js.map +1 -0
  891. package/lib/{useExposedProps-BH9aq4MD.js → useExposedProps-U3pmsHaG.js} +34 -34
  892. package/lib/{useExposedProps-BH9aq4MD.js.map → useExposedProps-U3pmsHaG.js.map} +1 -1
  893. package/lib/xml-BQOOC04j.js +25 -0
  894. package/lib/xml-BQOOC04j.js.map +1 -0
  895. package/lib/yaml-BGsJItKv.js +32 -0
  896. package/lib/yaml-BGsJItKv.js.map +1 -0
  897. package/lib/zig-CUV2sTct.js +35 -0
  898. package/lib/zig-CUV2sTct.js.map +1 -0
  899. package/lib/zudoku.__internal.js +1192 -1073
  900. package/lib/zudoku.__internal.js.map +1 -1
  901. package/lib/zudoku.auth-auth0.js +23 -22
  902. package/lib/zudoku.auth-auth0.js.map +1 -1
  903. package/lib/zudoku.auth-azureb2c.js +34 -35
  904. package/lib/zudoku.auth-azureb2c.js.map +1 -1
  905. package/lib/zudoku.auth-clerk.js +41 -41
  906. package/lib/zudoku.auth-clerk.js.map +1 -1
  907. package/lib/zudoku.auth-openid.js +104 -108
  908. package/lib/zudoku.auth-openid.js.map +1 -1
  909. package/lib/zudoku.auth-supabase.js +108 -51
  910. package/lib/zudoku.auth-supabase.js.map +1 -1
  911. package/lib/zudoku.components.js +21 -20
  912. package/lib/zudoku.hooks.js +6 -6
  913. package/lib/zudoku.hooks.js.map +1 -1
  914. package/lib/zudoku.icons.js +1 -1
  915. package/lib/zudoku.icons.js.map +1 -1
  916. package/lib/zudoku.plugin-api-catalog.js +34 -28
  917. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  918. package/lib/zudoku.plugin-api-keys.js +302 -327
  919. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  920. package/lib/zudoku.plugin-custom-pages.js +1 -1
  921. package/lib/zudoku.plugin-custom-pages.js.map +1 -1
  922. package/lib/zudoku.plugin-markdown.js +10 -9
  923. package/lib/zudoku.plugin-markdown.js.map +1 -1
  924. package/lib/zudoku.plugin-openapi.js +7 -8
  925. package/lib/zudoku.plugin-openapi.js.map +1 -1
  926. package/lib/zudoku.plugin-redirect.js +3 -3
  927. package/lib/zudoku.plugin-search-inkeep.js +1 -1
  928. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  929. package/lib/zudoku.plugin-search-pagefind.js +48 -49
  930. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  931. package/lib/zudoku.router.js +2502 -118
  932. package/lib/zudoku.router.js.map +1 -1
  933. package/package.json +93 -92
  934. package/src/app/ZuploBuildConfig.ts +1 -1
  935. package/src/app/entry.client.tsx +6 -5
  936. package/src/app/entry.server.tsx +19 -9
  937. package/src/app/env.ts +6 -6
  938. package/src/app/main.css +71 -19
  939. package/src/app/main.tsx +7 -3
  940. package/src/app/standalone.tsx +7 -2
  941. package/src/lib/MissingIcon.tsx +1 -1
  942. package/src/lib/assets/language-icons/c.tsx +31 -0
  943. package/src/lib/assets/language-icons/commonlisp.tsx +22 -0
  944. package/src/lib/assets/language-icons/cpp.tsx +35 -0
  945. package/src/lib/assets/language-icons/csharp.tsx +35 -0
  946. package/src/lib/assets/language-icons/css.tsx +36 -0
  947. package/src/lib/assets/language-icons/dart.tsx +39 -0
  948. package/src/lib/assets/language-icons/elixir.tsx +19 -0
  949. package/src/lib/assets/language-icons/go.tsx +19 -0
  950. package/src/lib/assets/language-icons/graphql.tsx +19 -0
  951. package/src/lib/assets/language-icons/html.tsx +24 -0
  952. package/src/lib/assets/language-icons/java.tsx +35 -0
  953. package/src/lib/assets/language-icons/javascript.tsx +11 -0
  954. package/src/lib/assets/language-icons/json.tsx +19 -0
  955. package/src/lib/assets/language-icons/kotlin.tsx +30 -0
  956. package/src/lib/assets/language-icons/markdown.tsx +19 -0
  957. package/src/lib/assets/language-icons/mdx.tsx +23 -0
  958. package/src/lib/assets/language-icons/objectivec.tsx +23 -0
  959. package/src/lib/assets/language-icons/ocaml.tsx +34 -0
  960. package/src/lib/assets/language-icons/php.tsx +19 -0
  961. package/src/lib/assets/language-icons/powershell.tsx +27 -0
  962. package/src/lib/assets/language-icons/python.tsx +23 -0
  963. package/src/lib/assets/language-icons/react.tsx +21 -0
  964. package/src/lib/assets/language-icons/ruby.tsx +19 -0
  965. package/src/lib/assets/language-icons/rust.tsx +19 -0
  966. package/src/lib/assets/language-icons/scala.tsx +19 -0
  967. package/src/lib/assets/language-icons/shell.tsx +19 -0
  968. package/src/lib/assets/language-icons/swift.tsx +19 -0
  969. package/src/lib/assets/language-icons/toml.tsx +23 -0
  970. package/src/lib/assets/language-icons/typescript.tsx +23 -0
  971. package/src/lib/assets/language-icons/xml.tsx +19 -0
  972. package/src/lib/assets/language-icons/yaml.tsx +23 -0
  973. package/src/lib/assets/language-icons/zig.tsx +32 -0
  974. package/src/lib/auth/issuer.test.ts +1 -0
  975. package/src/lib/auth/issuer.ts +3 -0
  976. package/src/lib/authentication/AuthenticationPlugin.tsx +4 -4
  977. package/src/lib/authentication/authentication.ts +26 -8
  978. package/src/lib/authentication/components/OAuthErrorPage.tsx +2 -2
  979. package/src/lib/authentication/components/SignIn.tsx +7 -5
  980. package/src/lib/authentication/components/SignOut.tsx +7 -6
  981. package/src/lib/authentication/components/SignUp.tsx +5 -8
  982. package/src/lib/authentication/hook.ts +21 -10
  983. package/src/lib/authentication/providers/auth0.tsx +14 -9
  984. package/src/lib/authentication/providers/azureb2c.tsx +15 -8
  985. package/src/lib/authentication/providers/clerk.tsx +14 -7
  986. package/src/lib/authentication/providers/firebase.tsx +284 -0
  987. package/src/lib/authentication/providers/openid.tsx +26 -21
  988. package/src/lib/authentication/providers/supabase/SupabaseAuthUI.tsx +75 -0
  989. package/src/lib/authentication/providers/supabase.tsx +61 -49
  990. package/src/lib/authentication/state.ts +3 -23
  991. package/src/lib/authentication/ui/ZudokuAuthUi.tsx +335 -0
  992. package/src/lib/authentication/ui/icons/Apple.tsx +10 -0
  993. package/src/lib/authentication/ui/icons/Facebook.tsx +15 -0
  994. package/src/lib/authentication/ui/icons/Github.tsx +16 -0
  995. package/src/lib/authentication/ui/icons/Google.tsx +16 -0
  996. package/src/lib/authentication/ui/icons/Microsoft.tsx +12 -0
  997. package/src/lib/authentication/ui/icons/X.tsx +10 -0
  998. package/src/lib/authentication/use-broadcast/LICENSE.md +12 -3
  999. package/src/lib/authentication/use-broadcast/shared.ts +4 -4
  1000. package/src/lib/authentication/use-broadcast/useBroadcast.ts +2 -2
  1001. package/src/lib/components/AnchorLink.tsx +1 -1
  1002. package/src/lib/components/Autocomplete.tsx +12 -3
  1003. package/src/lib/components/Bootstrap.tsx +1 -0
  1004. package/src/lib/components/BuildCheck.tsx +14 -11
  1005. package/src/lib/components/Header.tsx +2 -3
  1006. package/src/lib/components/Heading.tsx +4 -9
  1007. package/src/lib/components/LanguageIcon.tsx +181 -0
  1008. package/src/lib/components/Layout.tsx +1 -1
  1009. package/src/lib/components/Main.tsx +1 -1
  1010. package/src/lib/components/Markdown.tsx +5 -2
  1011. package/src/lib/components/Meta.tsx +13 -0
  1012. package/src/lib/components/MobileTopNavigation.tsx +11 -13
  1013. package/src/lib/components/PathRenderer.tsx +2 -2
  1014. package/src/lib/components/Search.tsx +1 -1
  1015. package/src/lib/components/Slot.test.tsx +8 -8
  1016. package/src/lib/components/Slot.tsx +2 -2
  1017. package/src/lib/components/TopNavigation.tsx +3 -3
  1018. package/src/lib/components/Zudoku.tsx +5 -5
  1019. package/src/lib/components/cache.ts +9 -5
  1020. package/src/lib/components/context/ComponentsContext.tsx +2 -2
  1021. package/src/lib/components/context/RouterEventsEmitter.tsx +1 -1
  1022. package/src/lib/components/context/SlotProvider.tsx +4 -4
  1023. package/src/lib/components/context/ViewportAnchorContext.tsx +2 -2
  1024. package/src/lib/components/context/ZudokuContext.ts +12 -3
  1025. package/src/lib/components/context/ZudokuProvider.tsx +1 -1
  1026. package/src/lib/components/index.ts +3 -1
  1027. package/src/lib/components/navigation/NavigationCategory.tsx +8 -1
  1028. package/src/lib/components/navigation/NavigationItem.tsx +3 -3
  1029. package/src/lib/components/navigation/NavigationWrapper.tsx +1 -1
  1030. package/src/lib/components/navigation/Toc.tsx +5 -5
  1031. package/src/lib/components/navigation/ZudokuLogo.tsx +1 -1
  1032. package/src/lib/components/navigation/utils.ts +5 -6
  1033. package/src/lib/core/RouteGuard.tsx +41 -21
  1034. package/src/lib/core/ZudokuContext.ts +5 -1
  1035. package/src/lib/errors/ErrorAlert.tsx +1 -2
  1036. package/src/lib/errors/RouterError.tsx +7 -2
  1037. package/src/lib/errors/TopLevelError.tsx +2 -4
  1038. package/src/lib/hooks/useEvent.test.tsx +2 -2
  1039. package/src/lib/oas/graphql/circular.ts +3 -3
  1040. package/src/lib/oas/graphql/index.ts +39 -3
  1041. package/src/lib/oas/parser/dereference/index.ts +2 -1
  1042. package/src/lib/oas/parser/dereference/resolveRef.ts +4 -4
  1043. package/src/lib/oas/parser/index.ts +10 -5
  1044. package/src/lib/oas/parser/upgrade/index.ts +2 -1
  1045. package/src/lib/plugins/api-catalog/Catalog.tsx +7 -0
  1046. package/src/lib/plugins/api-keys/CreateApiKey.tsx +1 -1
  1047. package/src/lib/plugins/api-keys/CreateApiKeyDialog.tsx +49 -0
  1048. package/src/lib/plugins/api-keys/ProtectedRoute.tsx +11 -7
  1049. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +23 -70
  1050. package/src/lib/plugins/api-keys/index.tsx +8 -8
  1051. package/src/lib/plugins/custom-pages/index.tsx +1 -1
  1052. package/src/lib/plugins/markdown/MdxPage.tsx +131 -14
  1053. package/src/lib/plugins/markdown/assets/ChatGPTLogo.tsx +11 -0
  1054. package/src/lib/plugins/markdown/assets/ClaudeLogo.tsx +19 -0
  1055. package/src/lib/plugins/markdown/index.tsx +6 -8
  1056. package/src/lib/plugins/openapi/CollapsibleCode.tsx +5 -3
  1057. package/src/lib/plugins/openapi/ColorizedParam.tsx +3 -1
  1058. package/src/lib/plugins/openapi/Endpoint.tsx +2 -2
  1059. package/src/lib/plugins/openapi/GeneratedExampleSidecarBox.tsx +52 -0
  1060. package/src/lib/plugins/openapi/MCPEndpoint.tsx +273 -0
  1061. package/src/lib/plugins/openapi/OasProvider.tsx +2 -1
  1062. package/src/lib/plugins/openapi/OperationList.tsx +39 -13
  1063. package/src/lib/plugins/openapi/OperationListItem.tsx +103 -76
  1064. package/src/lib/plugins/openapi/ParamInfos.tsx +10 -9
  1065. package/src/lib/plugins/openapi/ParameterList.tsx +3 -5
  1066. package/src/lib/plugins/openapi/ParameterListItem.tsx +6 -12
  1067. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +8 -13
  1068. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +23 -4
  1069. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +27 -2
  1070. package/src/lib/plugins/openapi/Sidecar.tsx +112 -64
  1071. package/src/lib/plugins/openapi/SidecarExamples.tsx +40 -57
  1072. package/src/lib/plugins/openapi/StaggeredRender.tsx +1 -1
  1073. package/src/lib/plugins/openapi/client/GraphQLContext.tsx +1 -1
  1074. package/src/lib/plugins/openapi/client/createServer.ts +1 -2
  1075. package/src/lib/plugins/openapi/client/useCreateQuery.ts +3 -2
  1076. package/src/lib/plugins/openapi/components/NonHighlightedCode.tsx +22 -0
  1077. package/src/lib/plugins/openapi/components/ResponseContent.tsx +1 -1
  1078. package/src/lib/plugins/openapi/context.tsx +1 -1
  1079. package/src/lib/plugins/openapi/graphql/fragment-masking.ts +1 -1
  1080. package/src/lib/plugins/openapi/graphql/gql.ts +6 -6
  1081. package/src/lib/plugins/openapi/graphql/graphql.ts +25 -3
  1082. package/src/lib/plugins/openapi/index.tsx +14 -33
  1083. package/src/lib/plugins/openapi/interfaces.ts +19 -4
  1084. package/src/lib/plugins/openapi/playground/BodyPanel.tsx +249 -33
  1085. package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +10 -6
  1086. package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +6 -5
  1087. package/src/lib/plugins/openapi/playground/Headers.tsx +104 -220
  1088. package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +1 -1
  1089. package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +1 -1
  1090. package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +33 -1
  1091. package/src/lib/plugins/openapi/playground/PathParams.tsx +26 -34
  1092. package/src/lib/plugins/openapi/playground/Playground.tsx +90 -41
  1093. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +13 -2
  1094. package/src/lib/plugins/openapi/playground/QueryParams.tsx +83 -137
  1095. package/src/lib/plugins/openapi/playground/RequestLoginDialog.tsx +20 -1
  1096. package/src/lib/plugins/openapi/playground/request-panel/MultipartField.tsx +91 -0
  1097. package/src/lib/plugins/openapi/playground/request-panel/UrlPath.tsx +1 -1
  1098. package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +2 -2
  1099. package/src/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.tsx +872 -0
  1100. package/src/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.ts +349 -0
  1101. package/src/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.tsx +5 -3
  1102. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +124 -56
  1103. package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +4 -4
  1104. package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.ts +1 -1
  1105. package/src/lib/plugins/openapi/playground/useRememberSkipLoginDialog.tsx +3 -0
  1106. package/src/lib/plugins/openapi/processors/removeExtensions.test.ts +1 -0
  1107. package/src/lib/plugins/openapi/processors/removeParameters.test.ts +1 -0
  1108. package/src/lib/plugins/openapi/processors/traverse.ts +1 -1
  1109. package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +6 -27
  1110. package/src/lib/plugins/openapi/schema/SchemaView.tsx +30 -23
  1111. package/src/lib/plugins/openapi/schema/UnionView.tsx +143 -0
  1112. package/src/lib/plugins/openapi/schema/union-helpers.ts +123 -0
  1113. package/src/lib/plugins/openapi/schema/utils.ts +0 -11
  1114. package/src/lib/plugins/openapi/util/createHttpSnippet.ts +2 -2
  1115. package/src/lib/plugins/openapi/util/createNavigationCategory.tsx +1 -0
  1116. package/src/lib/plugins/openapi/util/generateSchemaExample.ts +14 -15
  1117. package/src/lib/plugins/openapi/util/getRoutes.tsx +2 -2
  1118. package/src/lib/plugins/openapi/util/methodColorMap.tsx +1 -1
  1119. package/src/lib/plugins/search-inkeep/index.tsx +3 -3
  1120. package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +2 -4
  1121. package/src/lib/plugins/search-pagefind/ResultList.tsx +3 -4
  1122. package/src/lib/plugins/search-pagefind/get-results.tsx +0 -1
  1123. package/src/lib/shiki.ts +35 -8
  1124. package/src/lib/ui/Breadcrumb.tsx +1 -0
  1125. package/src/lib/ui/Button.tsx +1 -0
  1126. package/src/lib/ui/Callout.tsx +10 -5
  1127. package/src/lib/ui/Checkbox.tsx +23 -24
  1128. package/src/lib/ui/CodeBlock.tsx +7 -41
  1129. package/src/lib/ui/Command.tsx +2 -4
  1130. package/src/lib/ui/Dialog.tsx +112 -107
  1131. package/src/lib/ui/EmbeddedCodeBlock.tsx +6 -4
  1132. package/src/lib/ui/Form.tsx +4 -4
  1133. package/src/lib/ui/Pagination.tsx +1 -2
  1134. package/src/lib/ui/ReactComponentDoc.tsx +68 -0
  1135. package/src/lib/ui/Secret.tsx +123 -0
  1136. package/src/lib/ui/Separator.tsx +25 -0
  1137. package/src/lib/ui/SyntaxHighlight.tsx +6 -1
  1138. package/src/lib/ui/ToggleGroup.tsx +1 -1
  1139. package/src/lib/ui/Tooltip.tsx +54 -32
  1140. package/src/lib/ui/Value.tsx +42 -0
  1141. package/src/lib/util/MdxComponents.tsx +12 -4
  1142. package/src/lib/util/cn.ts +1 -1
  1143. package/src/lib/util/createVariantComponent.tsx +33 -7
  1144. package/src/lib/util/flattenAllOf.test.ts +637 -0
  1145. package/src/lib/util/flattenAllOf.ts +101 -0
  1146. package/src/lib/util/groupBy.ts +1 -0
  1147. package/src/lib/util/humanFileSize.ts +2 -3
  1148. package/src/lib/util/invariant.ts +1 -0
  1149. package/src/lib/util/pastellize.ts +4 -4
  1150. package/src/lib/util/syncZustandState.ts +22 -0
  1151. package/src/lib/util/traverse.ts +36 -0
  1152. package/src/lib/util/types.ts +1 -1
  1153. package/src/lib/util/useIsomorphicLayoutEffect.ts +1 -0
  1154. package/src/lib/util/useScrollToAnchor.ts +3 -1
  1155. package/src/shiki/langs/hurl.js +1 -0
  1156. package/src/shiki/langs/kdl.js +1 -0
  1157. package/src/shiki/langs/pkl.js +1 -0
  1158. package/src/shiki/langs/rosmsg.js +1 -0
  1159. package/dist/lib/components/ReactMarkdown.d.ts +0 -29
  1160. package/dist/lib/components/ReactMarkdown.js +0 -182
  1161. package/dist/lib/components/ReactMarkdown.js.map +0 -1
  1162. package/dist/lib/plugins/openapi/playground/InlineInput.d.ts +0 -4
  1163. package/dist/lib/plugins/openapi/playground/InlineInput.js +0 -3
  1164. package/dist/lib/plugins/openapi/playground/InlineInput.js.map +0 -1
  1165. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.d.ts +0 -8
  1166. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js +0 -14
  1167. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js.map +0 -1
  1168. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.d.ts +0 -7
  1169. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js +0 -17
  1170. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js.map +0 -1
  1171. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.d.ts +0 -6
  1172. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js +0 -10
  1173. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js.map +0 -1
  1174. package/lib/Button-B3o-2Xdf.js.map +0 -1
  1175. package/lib/CodeBlock-yJjjRwj-.js +0 -98
  1176. package/lib/CodeBlock-yJjjRwj-.js.map +0 -1
  1177. package/lib/Command-CDn17s8X.js.map +0 -1
  1178. package/lib/Dialog-BrIjMmUK.js +0 -114
  1179. package/lib/Dialog-BrIjMmUK.js.map +0 -1
  1180. package/lib/MdxPage-BmOQ5m5g.js +0 -111
  1181. package/lib/MdxPage-BmOQ5m5g.js.map +0 -1
  1182. package/lib/OAuthErrorPage-Jv3r8wnL.js.map +0 -1
  1183. package/lib/OasProvider-CA_lpILt.js.map +0 -1
  1184. package/lib/OperationList-C-TObVw6.js +0 -5169
  1185. package/lib/OperationList-C-TObVw6.js.map +0 -1
  1186. package/lib/RouteGuard-JLH6tCY8.js +0 -56
  1187. package/lib/RouteGuard-JLH6tCY8.js.map +0 -1
  1188. package/lib/RouterError-DcVonMP1.js +0 -41
  1189. package/lib/RouterError-DcVonMP1.js.map +0 -1
  1190. package/lib/SchemaView-CRcShewo.js +0 -366
  1191. package/lib/SchemaView-CRcShewo.js.map +0 -1
  1192. package/lib/Select-C3efYI1n.js +0 -273
  1193. package/lib/Select-C3efYI1n.js.map +0 -1
  1194. package/lib/SignUp-CxBGHgba.js +0 -56
  1195. package/lib/SignUp-CxBGHgba.js.map +0 -1
  1196. package/lib/Slot-DOtTvoyj.js.map +0 -1
  1197. package/lib/SyntaxHighlight-GR0eix_L.js.map +0 -1
  1198. package/lib/Toc-BlcGIkXc.js.map +0 -1
  1199. package/lib/ZudokuContext-BuJD7yIX.js +0 -1286
  1200. package/lib/ZudokuContext-BuJD7yIX.js.map +0 -1
  1201. package/lib/chunk-QMGIS6GS-DqecZ6nq.js +0 -9204
  1202. package/lib/chunk-QMGIS6GS-DqecZ6nq.js.map +0 -1
  1203. package/lib/createServer-DjgpuLne.js.map +0 -1
  1204. package/lib/errors-CrI3s7mR.js.map +0 -1
  1205. package/lib/hook-bv3iuX7X.js +0 -247
  1206. package/lib/hook-bv3iuX7X.js.map +0 -1
  1207. package/lib/index-CvTWnHZF.js +0 -3391
  1208. package/lib/index-CvTWnHZF.js.map +0 -1
  1209. package/lib/index-DmNq2fbN.js.map +0 -1
  1210. package/lib/index-DzO-Qh6S.js.map +0 -1
  1211. package/lib/index-HarEI51d.js.map +0 -1
  1212. package/lib/index.esm-CdzlRw50.js +0 -1254
  1213. package/lib/index.esm-CdzlRw50.js.map +0 -1
  1214. package/lib/jsx-runtime-C5mzlN2N.js.map +0 -1
  1215. package/src/lib/components/ReactMarkdown.license.txt +0 -21
  1216. package/src/lib/components/ReactMarkdown.tsx +0 -264
  1217. package/src/lib/plugins/openapi/playground/InlineInput.tsx +0 -6
  1218. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.tsx +0 -40
  1219. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.tsx +0 -57
  1220. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.tsx +0 -33
@@ -1,3391 +0,0 @@
1
- import { j as n } from "./jsx-runtime-C5mzlN2N.js";
2
- import { ChevronUpIcon as yn, ChevronRightIcon as vn, CheckIcon as ft, DotIcon as bn, PlusCircleIcon as he, FileInput as jn, Check as Cn, TableOfContentsIcon as wn, LockIcon as Nn, CircleAlertIcon as Sn, XIcon as gt, Circle as Tn, Unlink2Icon as An, CornerDownRightIcon as On, CornerDownLeftIcon as Pn, DownloadIcon as Rn, UnplugIcon as Ln, SendIcon as $n, CopyIcon as En, IdCardLanyardIcon as In, ShapesIcon as kn, LogInIcon as Dn, CirclePlayIcon as zn } from "lucide-react";
3
- import { aq as Fn, aU as qn, aM as Vn, e as Bn, ai as _n, an as st } from "./chunk-QMGIS6GS-DqecZ6nq.js";
4
- import { c as Le, p as $e, b as xt, a as Un } from "./hook-bv3iuX7X.js";
5
- import { Button as ne } from "./ui/Button.js";
6
- import { d as Mn, e as Gn, I as Hn, j as I, b as Qn } from "./ZudokuContext-BuJD7yIX.js";
7
- import { Z as Jn, i as Wn } from "./invariant-Bm-FVUQE.js";
8
- import * as A from "react";
9
- import { createContext as yt, use as Xn, useRef as R, useEffect as z, useMemo as vt, useState as k, useCallback as bt, Fragment as K, useLayoutEffect as Zn, useTransition as Yn, useContext as Kn } from "react";
10
- import { VisuallyHidden as es } from "@radix-ui/react-visually-hidden";
11
- import { D as Ee, a as Ie, c as ke, d as jt, e as Ct, g as ts } from "./Dialog-BrIjMmUK.js";
12
- import { S as ns, b as ss } from "./index-DzO-Qh6S.js";
13
- import { S as wt, c as Nt, d as St, e as Tt, g as le, A as rs, a as as, b as os, u as is } from "./Select-C3efYI1n.js";
14
- import { u as ae, b as De, C as F, a as cs, F as ls } from "./index.esm-CdzlRw50.js";
15
- import { B as E } from "./Button-B3o-2Xdf.js";
16
- import * as ze from "@radix-ui/react-collapsible";
17
- import { g as rt, h as at, i as ot, j as ds } from "./Slot-DOtTvoyj.js";
18
- import { c as C } from "./cn-dYga0KKN.js";
19
- import { u as us } from "./CodeBlock-yJjjRwj-.js";
20
- import { u as ms } from "./useLatest-hmRS46UF.js";
21
- import * as w from "@radix-ui/react-dropdown-menu";
22
- import * as Oe from "@radix-ui/react-checkbox";
23
- import * as de from "@radix-ui/react-popover";
24
- import { PopoverAnchor as ps } from "@radix-ui/react-popover";
25
- import { P as hs } from "./index-CrcNWbel.js";
26
- import { f as fs, g as gs, C as xs, b as ys } from "./Command-CDn17s8X.js";
27
- import { Input as ue } from "./ui/Input.js";
28
- import { Slot as vs } from "@radix-ui/react-slot";
29
- import { C as bs } from "./Card-CMDQUPM4.js";
30
- import * as At from "@radix-ui/react-label";
31
- import { c as js } from "./index-DI5SPFK9.js";
32
- import * as se from "@radix-ui/react-radio-group";
33
- import { z as Cs } from "./useExposedProps-BH9aq4MD.js";
34
- import { h as ws } from "./SyntaxHighlight-GR0eix_L.js";
35
- let je;
36
- const Ns = (e) => {
37
- if (e.errors?.[0])
38
- throw new Jn(e.errors[0].message, {
39
- developerHint: "Check your configuration value `apis.type` and `apis.input` in the Zudoku config."
40
- });
41
- };
42
- class Ss {
43
- constructor(t) {
44
- this.config = t;
45
- }
46
- #e = async () => (je || (je = import("./createServer-DjgpuLne.js").then(
47
- (t) => t.createServer(this.config)
48
- )), je);
49
- #t = async (t) => this.config.server ? fetch(this.config.server, t) : (await this.#e()).fetch("http://localhost/graphql", t);
50
- fetch = async (t, s) => {
51
- const a = t.match(/query (\w+)/)?.[1], r = await this.#t({
52
- method: "POST",
53
- body: JSON.stringify({ query: t, variables: s, operationName: a }),
54
- headers: { "Content-Type": "application/json" }
55
- });
56
- if (!r.ok)
57
- throw new Error("Network response was not ok");
58
- const o = await r.json();
59
- return Ns(o), o.data;
60
- };
61
- }
62
- function Ce(e, t) {
63
- if (!!!e)
64
- throw new Error(t);
65
- }
66
- function Ts(e) {
67
- return typeof e == "object" && e !== null;
68
- }
69
- function As(e, t) {
70
- if (!!!e)
71
- throw new Error(
72
- t ?? "Unexpected invariant triggered."
73
- );
74
- }
75
- const Os = /\r\n|[\n\r]/g;
76
- function Pe(e, t) {
77
- let s = 0, a = 1;
78
- for (const r of e.body.matchAll(Os)) {
79
- if (typeof r.index == "number" || As(!1), r.index >= t)
80
- break;
81
- s = r.index + r[0].length, a += 1;
82
- }
83
- return {
84
- line: a,
85
- column: t + 1 - s
86
- };
87
- }
88
- function Ps(e) {
89
- return Ot(
90
- e.source,
91
- Pe(e.source, e.start)
92
- );
93
- }
94
- function Ot(e, t) {
95
- const s = e.locationOffset.column - 1, a = "".padStart(s) + e.body, r = t.line - 1, o = e.locationOffset.line - 1, i = t.line + o, l = t.line === 1 ? s : 0, c = t.column + l, u = `${e.name}:${i}:${c}
96
- `, d = a.split(/\r\n|[\n\r]/g), h = d[r];
97
- if (h.length > 120) {
98
- const g = Math.floor(c / 80), m = c % 80, y = [];
99
- for (let v = 0; v < h.length; v += 80)
100
- y.push(h.slice(v, v + 80));
101
- return u + it([
102
- [`${i} |`, y[0]],
103
- ...y.slice(1, g + 1).map((v) => ["|", v]),
104
- ["|", "^".padStart(m)],
105
- ["|", y[g + 1]]
106
- ]);
107
- }
108
- return u + it([
109
- // Lines specified like this: ["prefix", "string"],
110
- [`${i - 1} |`, d[r - 1]],
111
- [`${i} |`, h],
112
- ["|", "^".padStart(c)],
113
- [`${i + 1} |`, d[r + 1]]
114
- ]);
115
- }
116
- function it(e) {
117
- const t = e.filter(([a, r]) => r !== void 0), s = Math.max(...t.map(([a]) => a.length));
118
- return t.map(([a, r]) => a.padStart(s) + (r ? " " + r : "")).join(`
119
- `);
120
- }
121
- function Rs(e) {
122
- const t = e[0];
123
- return t == null || "kind" in t || "length" in t ? {
124
- nodes: t,
125
- source: e[1],
126
- positions: e[2],
127
- path: e[3],
128
- originalError: e[4],
129
- extensions: e[5]
130
- } : t;
131
- }
132
- class Fe extends Error {
133
- /**
134
- * An array of `{ line, column }` locations within the source GraphQL document
135
- * which correspond to this error.
136
- *
137
- * Errors during validation often contain multiple locations, for example to
138
- * point out two things with the same name. Errors during execution include a
139
- * single location, the field which produced the error.
140
- *
141
- * Enumerable, and appears in the result of JSON.stringify().
142
- */
143
- /**
144
- * An array describing the JSON-path into the execution response which
145
- * corresponds to this error. Only included for errors during execution.
146
- *
147
- * Enumerable, and appears in the result of JSON.stringify().
148
- */
149
- /**
150
- * An array of GraphQL AST Nodes corresponding to this error.
151
- */
152
- /**
153
- * The source GraphQL document for the first location of this error.
154
- *
155
- * Note that if this Error represents more than one node, the source may not
156
- * represent nodes after the first node.
157
- */
158
- /**
159
- * An array of character offsets within the source GraphQL document
160
- * which correspond to this error.
161
- */
162
- /**
163
- * The original error thrown from a field resolver during execution.
164
- */
165
- /**
166
- * Extension fields to add to the formatted error.
167
- */
168
- /**
169
- * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.
170
- */
171
- constructor(t, ...s) {
172
- var a, r, o;
173
- const { nodes: i, source: l, positions: c, path: u, originalError: d, extensions: h } = Rs(s);
174
- super(t), this.name = "GraphQLError", this.path = u ?? void 0, this.originalError = d ?? void 0, this.nodes = ct(
175
- Array.isArray(i) ? i : i ? [i] : void 0
176
- );
177
- const g = ct(
178
- (a = this.nodes) === null || a === void 0 ? void 0 : a.map((y) => y.loc).filter((y) => y != null)
179
- );
180
- this.source = l ?? (g == null || (r = g[0]) === null || r === void 0 ? void 0 : r.source), this.positions = c ?? g?.map((y) => y.start), this.locations = c && l ? c.map((y) => Pe(l, y)) : g?.map((y) => Pe(y.source, y.start));
181
- const m = Ts(
182
- d?.extensions
183
- ) ? d?.extensions : void 0;
184
- this.extensions = (o = h ?? m) !== null && o !== void 0 ? o : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
185
- message: {
186
- writable: !0,
187
- enumerable: !0
188
- },
189
- name: {
190
- enumerable: !1
191
- },
192
- nodes: {
193
- enumerable: !1
194
- },
195
- source: {
196
- enumerable: !1
197
- },
198
- positions: {
199
- enumerable: !1
200
- },
201
- originalError: {
202
- enumerable: !1
203
- }
204
- }), d != null && d.stack ? Object.defineProperty(this, "stack", {
205
- value: d.stack,
206
- writable: !0,
207
- configurable: !0
208
- }) : Error.captureStackTrace ? Error.captureStackTrace(this, Fe) : Object.defineProperty(this, "stack", {
209
- value: Error().stack,
210
- writable: !0,
211
- configurable: !0
212
- });
213
- }
214
- get [Symbol.toStringTag]() {
215
- return "GraphQLError";
216
- }
217
- toString() {
218
- let t = this.message;
219
- if (this.nodes)
220
- for (const s of this.nodes)
221
- s.loc && (t += `
222
-
223
- ` + Ps(s.loc));
224
- else if (this.source && this.locations)
225
- for (const s of this.locations)
226
- t += `
227
-
228
- ` + Ot(this.source, s);
229
- return t;
230
- }
231
- toJSON() {
232
- const t = {
233
- message: this.message
234
- };
235
- return this.locations != null && (t.locations = this.locations), this.path != null && (t.path = this.path), this.extensions != null && Object.keys(this.extensions).length > 0 && (t.extensions = this.extensions), t;
236
- }
237
- }
238
- function ct(e) {
239
- return e === void 0 || e.length === 0 ? void 0 : e;
240
- }
241
- function L(e, t, s) {
242
- return new Fe(`Syntax Error: ${s}`, {
243
- source: e,
244
- positions: [t]
245
- });
246
- }
247
- class Va {
248
- /**
249
- * The character offset at which this Node begins.
250
- */
251
- /**
252
- * The character offset at which this Node ends.
253
- */
254
- /**
255
- * The Token at which this Node begins.
256
- */
257
- /**
258
- * The Token at which this Node ends.
259
- */
260
- /**
261
- * The Source document the AST represents.
262
- */
263
- constructor(t, s, a) {
264
- this.start = t.start, this.end = s.end, this.startToken = t, this.endToken = s, this.source = a;
265
- }
266
- get [Symbol.toStringTag]() {
267
- return "Location";
268
- }
269
- toJSON() {
270
- return {
271
- start: this.start,
272
- end: this.end
273
- };
274
- }
275
- }
276
- class Pt {
277
- /**
278
- * The kind of Token.
279
- */
280
- /**
281
- * The character offset at which this Node begins.
282
- */
283
- /**
284
- * The character offset at which this Node ends.
285
- */
286
- /**
287
- * The 1-indexed line number on which this Token appears.
288
- */
289
- /**
290
- * The 1-indexed column number at which this Token begins.
291
- */
292
- /**
293
- * For non-punctuation tokens, represents the interpreted value of the token.
294
- *
295
- * Note: is undefined for punctuation tokens, but typed as string for
296
- * convenience in the parser.
297
- */
298
- /**
299
- * Tokens exist as nodes in a double-linked-list amongst all tokens
300
- * including ignored tokens. <SOF> is always the first node and <EOF>
301
- * the last.
302
- */
303
- constructor(t, s, a, r, o, i) {
304
- this.kind = t, this.start = s, this.end = a, this.line = r, this.column = o, this.value = i, this.prev = null, this.next = null;
305
- }
306
- get [Symbol.toStringTag]() {
307
- return "Token";
308
- }
309
- toJSON() {
310
- return {
311
- kind: this.kind,
312
- value: this.value,
313
- line: this.line,
314
- column: this.column
315
- };
316
- }
317
- }
318
- const Ls = {
319
- Name: [],
320
- Document: ["definitions"],
321
- OperationDefinition: [
322
- "name",
323
- "variableDefinitions",
324
- "directives",
325
- "selectionSet"
326
- ],
327
- VariableDefinition: ["variable", "type", "defaultValue", "directives"],
328
- Variable: ["name"],
329
- SelectionSet: ["selections"],
330
- Field: ["alias", "name", "arguments", "directives", "selectionSet"],
331
- Argument: ["name", "value"],
332
- FragmentSpread: ["name", "directives"],
333
- InlineFragment: ["typeCondition", "directives", "selectionSet"],
334
- FragmentDefinition: [
335
- "name",
336
- // Note: fragment variable definitions are deprecated and will removed in v17.0.0
337
- "variableDefinitions",
338
- "typeCondition",
339
- "directives",
340
- "selectionSet"
341
- ],
342
- IntValue: [],
343
- FloatValue: [],
344
- StringValue: [],
345
- BooleanValue: [],
346
- NullValue: [],
347
- EnumValue: [],
348
- ListValue: ["values"],
349
- ObjectValue: ["fields"],
350
- ObjectField: ["name", "value"],
351
- Directive: ["name", "arguments"],
352
- NamedType: ["name"],
353
- ListType: ["type"],
354
- NonNullType: ["type"],
355
- SchemaDefinition: ["description", "directives", "operationTypes"],
356
- OperationTypeDefinition: ["type"],
357
- ScalarTypeDefinition: ["description", "name", "directives"],
358
- ObjectTypeDefinition: [
359
- "description",
360
- "name",
361
- "interfaces",
362
- "directives",
363
- "fields"
364
- ],
365
- FieldDefinition: ["description", "name", "arguments", "type", "directives"],
366
- InputValueDefinition: [
367
- "description",
368
- "name",
369
- "type",
370
- "defaultValue",
371
- "directives"
372
- ],
373
- InterfaceTypeDefinition: [
374
- "description",
375
- "name",
376
- "interfaces",
377
- "directives",
378
- "fields"
379
- ],
380
- UnionTypeDefinition: ["description", "name", "directives", "types"],
381
- EnumTypeDefinition: ["description", "name", "directives", "values"],
382
- EnumValueDefinition: ["description", "name", "directives"],
383
- InputObjectTypeDefinition: ["description", "name", "directives", "fields"],
384
- DirectiveDefinition: ["description", "name", "arguments", "locations"],
385
- SchemaExtension: ["directives", "operationTypes"],
386
- ScalarTypeExtension: ["name", "directives"],
387
- ObjectTypeExtension: ["name", "interfaces", "directives", "fields"],
388
- InterfaceTypeExtension: ["name", "interfaces", "directives", "fields"],
389
- UnionTypeExtension: ["name", "directives", "types"],
390
- EnumTypeExtension: ["name", "directives", "values"],
391
- InputObjectTypeExtension: ["name", "directives", "fields"]
392
- }, $s = new Set(Object.keys(Ls));
393
- function Ba(e) {
394
- const t = e?.kind;
395
- return typeof t == "string" && $s.has(t);
396
- }
397
- var lt;
398
- (function(e) {
399
- e.QUERY = "query", e.MUTATION = "mutation", e.SUBSCRIPTION = "subscription";
400
- })(lt || (lt = {}));
401
- function Re(e) {
402
- return e === 9 || e === 32;
403
- }
404
- function re(e) {
405
- return e >= 48 && e <= 57;
406
- }
407
- function Rt(e) {
408
- return e >= 97 && e <= 122 || // A-Z
409
- e >= 65 && e <= 90;
410
- }
411
- function Lt(e) {
412
- return Rt(e) || e === 95;
413
- }
414
- function Es(e) {
415
- return Rt(e) || re(e) || e === 95;
416
- }
417
- function Is(e) {
418
- var t;
419
- let s = Number.MAX_SAFE_INTEGER, a = null, r = -1;
420
- for (let i = 0; i < e.length; ++i) {
421
- var o;
422
- const l = e[i], c = ks(l);
423
- c !== l.length && (a = (o = a) !== null && o !== void 0 ? o : i, r = i, i !== 0 && c < s && (s = c));
424
- }
425
- return e.map((i, l) => l === 0 ? i : i.slice(s)).slice(
426
- (t = a) !== null && t !== void 0 ? t : 0,
427
- r + 1
428
- );
429
- }
430
- function ks(e) {
431
- let t = 0;
432
- for (; t < e.length && Re(e.charCodeAt(t)); )
433
- ++t;
434
- return t;
435
- }
436
- function Ds(e, t) {
437
- const s = e.replace(/"""/g, '\\"""'), a = s.split(/\r\n|[\n\r]/g), r = a.length === 1, o = a.length > 1 && a.slice(1).every((m) => m.length === 0 || Re(m.charCodeAt(0))), i = s.endsWith('\\"""'), l = e.endsWith('"') && !i, c = e.endsWith("\\"), u = l || c, d = !(t != null && t.minimize) && // add leading and trailing new lines only if it improves readability
438
- (!r || e.length > 70 || u || o || i);
439
- let h = "";
440
- const g = r && Re(e.charCodeAt(0));
441
- return (d && !g || o) && (h += `
442
- `), h += s, (d || u) && (h += `
443
- `), '"""' + h + '"""';
444
- }
445
- var x;
446
- (function(e) {
447
- e.SOF = "<SOF>", e.EOF = "<EOF>", e.BANG = "!", e.DOLLAR = "$", e.AMP = "&", e.PAREN_L = "(", e.PAREN_R = ")", e.SPREAD = "...", e.COLON = ":", e.EQUALS = "=", e.AT = "@", e.BRACKET_L = "[", e.BRACKET_R = "]", e.BRACE_L = "{", e.PIPE = "|", e.BRACE_R = "}", e.NAME = "Name", e.INT = "Int", e.FLOAT = "Float", e.STRING = "String", e.BLOCK_STRING = "BlockString", e.COMMENT = "Comment";
448
- })(x || (x = {}));
449
- class zs {
450
- /**
451
- * The previously focused non-ignored token.
452
- */
453
- /**
454
- * The currently focused non-ignored token.
455
- */
456
- /**
457
- * The (1-indexed) line containing the current token.
458
- */
459
- /**
460
- * The character offset at which the current line begins.
461
- */
462
- constructor(t) {
463
- const s = new Pt(x.SOF, 0, 0, 0, 0);
464
- this.source = t, this.lastToken = s, this.token = s, this.line = 1, this.lineStart = 0;
465
- }
466
- get [Symbol.toStringTag]() {
467
- return "Lexer";
468
- }
469
- /**
470
- * Advances the token stream to the next non-ignored token.
471
- */
472
- advance() {
473
- return this.lastToken = this.token, this.token = this.lookahead();
474
- }
475
- /**
476
- * Looks ahead and returns the next non-ignored token, but does not change
477
- * the state of Lexer.
478
- */
479
- lookahead() {
480
- let t = this.token;
481
- if (t.kind !== x.EOF)
482
- do
483
- if (t.next)
484
- t = t.next;
485
- else {
486
- const s = qs(this, t.end);
487
- t.next = s, s.prev = t, t = s;
488
- }
489
- while (t.kind === x.COMMENT);
490
- return t;
491
- }
492
- }
493
- function Fs(e) {
494
- return e === x.BANG || e === x.DOLLAR || e === x.AMP || e === x.PAREN_L || e === x.PAREN_R || e === x.SPREAD || e === x.COLON || e === x.EQUALS || e === x.AT || e === x.BRACKET_L || e === x.BRACKET_R || e === x.BRACE_L || e === x.PIPE || e === x.BRACE_R;
495
- }
496
- function Z(e) {
497
- return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111;
498
- }
499
- function fe(e, t) {
500
- return $t(e.charCodeAt(t)) && Et(e.charCodeAt(t + 1));
501
- }
502
- function $t(e) {
503
- return e >= 55296 && e <= 56319;
504
- }
505
- function Et(e) {
506
- return e >= 56320 && e <= 57343;
507
- }
508
- function U(e, t) {
509
- const s = e.source.body.codePointAt(t);
510
- if (s === void 0)
511
- return x.EOF;
512
- if (s >= 32 && s <= 126) {
513
- const a = String.fromCodePoint(s);
514
- return a === '"' ? `'"'` : `"${a}"`;
515
- }
516
- return "U+" + s.toString(16).toUpperCase().padStart(4, "0");
517
- }
518
- function N(e, t, s, a, r) {
519
- const o = e.line, i = 1 + s - e.lineStart;
520
- return new Pt(t, s, a, o, i, r);
521
- }
522
- function qs(e, t) {
523
- const s = e.source.body, a = s.length;
524
- let r = t;
525
- for (; r < a; ) {
526
- const o = s.charCodeAt(r);
527
- switch (o) {
528
- // Ignored ::
529
- // - UnicodeBOM
530
- // - WhiteSpace
531
- // - LineTerminator
532
- // - Comment
533
- // - Comma
534
- //
535
- // UnicodeBOM :: "Byte Order Mark (U+FEFF)"
536
- //
537
- // WhiteSpace ::
538
- // - "Horizontal Tab (U+0009)"
539
- // - "Space (U+0020)"
540
- //
541
- // Comma :: ,
542
- case 65279:
543
- // <BOM>
544
- case 9:
545
- // \t
546
- case 32:
547
- // <space>
548
- case 44:
549
- ++r;
550
- continue;
551
- // LineTerminator ::
552
- // - "New Line (U+000A)"
553
- // - "Carriage Return (U+000D)" [lookahead != "New Line (U+000A)"]
554
- // - "Carriage Return (U+000D)" "New Line (U+000A)"
555
- case 10:
556
- ++r, ++e.line, e.lineStart = r;
557
- continue;
558
- case 13:
559
- s.charCodeAt(r + 1) === 10 ? r += 2 : ++r, ++e.line, e.lineStart = r;
560
- continue;
561
- // Comment
562
- case 35:
563
- return Vs(e, r);
564
- // Token ::
565
- // - Punctuator
566
- // - Name
567
- // - IntValue
568
- // - FloatValue
569
- // - StringValue
570
- //
571
- // Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | }
572
- case 33:
573
- return N(e, x.BANG, r, r + 1);
574
- case 36:
575
- return N(e, x.DOLLAR, r, r + 1);
576
- case 38:
577
- return N(e, x.AMP, r, r + 1);
578
- case 40:
579
- return N(e, x.PAREN_L, r, r + 1);
580
- case 41:
581
- return N(e, x.PAREN_R, r, r + 1);
582
- case 46:
583
- if (s.charCodeAt(r + 1) === 46 && s.charCodeAt(r + 2) === 46)
584
- return N(e, x.SPREAD, r, r + 3);
585
- break;
586
- case 58:
587
- return N(e, x.COLON, r, r + 1);
588
- case 61:
589
- return N(e, x.EQUALS, r, r + 1);
590
- case 64:
591
- return N(e, x.AT, r, r + 1);
592
- case 91:
593
- return N(e, x.BRACKET_L, r, r + 1);
594
- case 93:
595
- return N(e, x.BRACKET_R, r, r + 1);
596
- case 123:
597
- return N(e, x.BRACE_L, r, r + 1);
598
- case 124:
599
- return N(e, x.PIPE, r, r + 1);
600
- case 125:
601
- return N(e, x.BRACE_R, r, r + 1);
602
- // StringValue
603
- case 34:
604
- return s.charCodeAt(r + 1) === 34 && s.charCodeAt(r + 2) === 34 ? Hs(e, r) : _s(e, r);
605
- }
606
- if (re(o) || o === 45)
607
- return Bs(e, r, o);
608
- if (Lt(o))
609
- return Qs(e, r);
610
- throw L(
611
- e.source,
612
- r,
613
- o === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : Z(o) || fe(s, r) ? `Unexpected character: ${U(e, r)}.` : `Invalid character: ${U(e, r)}.`
614
- );
615
- }
616
- return N(e, x.EOF, a, a);
617
- }
618
- function Vs(e, t) {
619
- const s = e.source.body, a = s.length;
620
- let r = t + 1;
621
- for (; r < a; ) {
622
- const o = s.charCodeAt(r);
623
- if (o === 10 || o === 13)
624
- break;
625
- if (Z(o))
626
- ++r;
627
- else if (fe(s, r))
628
- r += 2;
629
- else
630
- break;
631
- }
632
- return N(
633
- e,
634
- x.COMMENT,
635
- t,
636
- r,
637
- s.slice(t + 1, r)
638
- );
639
- }
640
- function Bs(e, t, s) {
641
- const a = e.source.body;
642
- let r = t, o = s, i = !1;
643
- if (o === 45 && (o = a.charCodeAt(++r)), o === 48) {
644
- if (o = a.charCodeAt(++r), re(o))
645
- throw L(
646
- e.source,
647
- r,
648
- `Invalid number, unexpected digit after 0: ${U(
649
- e,
650
- r
651
- )}.`
652
- );
653
- } else
654
- r = we(e, r, o), o = a.charCodeAt(r);
655
- if (o === 46 && (i = !0, o = a.charCodeAt(++r), r = we(e, r, o), o = a.charCodeAt(r)), (o === 69 || o === 101) && (i = !0, o = a.charCodeAt(++r), (o === 43 || o === 45) && (o = a.charCodeAt(++r)), r = we(e, r, o), o = a.charCodeAt(r)), o === 46 || Lt(o))
656
- throw L(
657
- e.source,
658
- r,
659
- `Invalid number, expected digit but got: ${U(
660
- e,
661
- r
662
- )}.`
663
- );
664
- return N(
665
- e,
666
- i ? x.FLOAT : x.INT,
667
- t,
668
- r,
669
- a.slice(t, r)
670
- );
671
- }
672
- function we(e, t, s) {
673
- if (!re(s))
674
- throw L(
675
- e.source,
676
- t,
677
- `Invalid number, expected digit but got: ${U(
678
- e,
679
- t
680
- )}.`
681
- );
682
- const a = e.source.body;
683
- let r = t + 1;
684
- for (; re(a.charCodeAt(r)); )
685
- ++r;
686
- return r;
687
- }
688
- function _s(e, t) {
689
- const s = e.source.body, a = s.length;
690
- let r = t + 1, o = r, i = "";
691
- for (; r < a; ) {
692
- const l = s.charCodeAt(r);
693
- if (l === 34)
694
- return i += s.slice(o, r), N(e, x.STRING, t, r + 1, i);
695
- if (l === 92) {
696
- i += s.slice(o, r);
697
- const c = s.charCodeAt(r + 1) === 117 ? s.charCodeAt(r + 2) === 123 ? Us(e, r) : Ms(e, r) : Gs(e, r);
698
- i += c.value, r += c.size, o = r;
699
- continue;
700
- }
701
- if (l === 10 || l === 13)
702
- break;
703
- if (Z(l))
704
- ++r;
705
- else if (fe(s, r))
706
- r += 2;
707
- else
708
- throw L(
709
- e.source,
710
- r,
711
- `Invalid character within String: ${U(
712
- e,
713
- r
714
- )}.`
715
- );
716
- }
717
- throw L(e.source, r, "Unterminated string.");
718
- }
719
- function Us(e, t) {
720
- const s = e.source.body;
721
- let a = 0, r = 3;
722
- for (; r < 12; ) {
723
- const o = s.charCodeAt(t + r++);
724
- if (o === 125) {
725
- if (r < 5 || !Z(a))
726
- break;
727
- return {
728
- value: String.fromCodePoint(a),
729
- size: r
730
- };
731
- }
732
- if (a = a << 4 | ee(o), a < 0)
733
- break;
734
- }
735
- throw L(
736
- e.source,
737
- t,
738
- `Invalid Unicode escape sequence: "${s.slice(
739
- t,
740
- t + r
741
- )}".`
742
- );
743
- }
744
- function Ms(e, t) {
745
- const s = e.source.body, a = dt(s, t + 2);
746
- if (Z(a))
747
- return {
748
- value: String.fromCodePoint(a),
749
- size: 6
750
- };
751
- if ($t(a) && s.charCodeAt(t + 6) === 92 && s.charCodeAt(t + 7) === 117) {
752
- const r = dt(s, t + 8);
753
- if (Et(r))
754
- return {
755
- value: String.fromCodePoint(a, r),
756
- size: 12
757
- };
758
- }
759
- throw L(
760
- e.source,
761
- t,
762
- `Invalid Unicode escape sequence: "${s.slice(t, t + 6)}".`
763
- );
764
- }
765
- function dt(e, t) {
766
- return ee(e.charCodeAt(t)) << 12 | ee(e.charCodeAt(t + 1)) << 8 | ee(e.charCodeAt(t + 2)) << 4 | ee(e.charCodeAt(t + 3));
767
- }
768
- function ee(e) {
769
- return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1;
770
- }
771
- function Gs(e, t) {
772
- const s = e.source.body;
773
- switch (s.charCodeAt(t + 1)) {
774
- case 34:
775
- return {
776
- value: '"',
777
- size: 2
778
- };
779
- case 92:
780
- return {
781
- value: "\\",
782
- size: 2
783
- };
784
- case 47:
785
- return {
786
- value: "/",
787
- size: 2
788
- };
789
- case 98:
790
- return {
791
- value: "\b",
792
- size: 2
793
- };
794
- case 102:
795
- return {
796
- value: "\f",
797
- size: 2
798
- };
799
- case 110:
800
- return {
801
- value: `
802
- `,
803
- size: 2
804
- };
805
- case 114:
806
- return {
807
- value: "\r",
808
- size: 2
809
- };
810
- case 116:
811
- return {
812
- value: " ",
813
- size: 2
814
- };
815
- }
816
- throw L(
817
- e.source,
818
- t,
819
- `Invalid character escape sequence: "${s.slice(
820
- t,
821
- t + 2
822
- )}".`
823
- );
824
- }
825
- function Hs(e, t) {
826
- const s = e.source.body, a = s.length;
827
- let r = e.lineStart, o = t + 3, i = o, l = "";
828
- const c = [];
829
- for (; o < a; ) {
830
- const u = s.charCodeAt(o);
831
- if (u === 34 && s.charCodeAt(o + 1) === 34 && s.charCodeAt(o + 2) === 34) {
832
- l += s.slice(i, o), c.push(l);
833
- const d = N(
834
- e,
835
- x.BLOCK_STRING,
836
- t,
837
- o + 3,
838
- // Return a string of the lines joined with U+000A.
839
- Is(c).join(`
840
- `)
841
- );
842
- return e.line += c.length - 1, e.lineStart = r, d;
843
- }
844
- if (u === 92 && s.charCodeAt(o + 1) === 34 && s.charCodeAt(o + 2) === 34 && s.charCodeAt(o + 3) === 34) {
845
- l += s.slice(i, o), i = o + 1, o += 4;
846
- continue;
847
- }
848
- if (u === 10 || u === 13) {
849
- l += s.slice(i, o), c.push(l), u === 13 && s.charCodeAt(o + 1) === 10 ? o += 2 : ++o, l = "", i = o, r = o;
850
- continue;
851
- }
852
- if (Z(u))
853
- ++o;
854
- else if (fe(s, o))
855
- o += 2;
856
- else
857
- throw L(
858
- e.source,
859
- o,
860
- `Invalid character within String: ${U(
861
- e,
862
- o
863
- )}.`
864
- );
865
- }
866
- throw L(e.source, o, "Unterminated string.");
867
- }
868
- function Qs(e, t) {
869
- const s = e.source.body, a = s.length;
870
- let r = t + 1;
871
- for (; r < a; ) {
872
- const o = s.charCodeAt(r);
873
- if (Es(o))
874
- ++r;
875
- else
876
- break;
877
- }
878
- return N(
879
- e,
880
- x.NAME,
881
- t,
882
- r,
883
- s.slice(t, r)
884
- );
885
- }
886
- const Js = 10, It = 2;
887
- function kt(e) {
888
- return ge(e, []);
889
- }
890
- function ge(e, t) {
891
- switch (typeof e) {
892
- case "string":
893
- return JSON.stringify(e);
894
- case "function":
895
- return e.name ? `[function ${e.name}]` : "[function]";
896
- case "object":
897
- return Ws(e, t);
898
- default:
899
- return String(e);
900
- }
901
- }
902
- function Ws(e, t) {
903
- if (e === null)
904
- return "null";
905
- if (t.includes(e))
906
- return "[Circular]";
907
- const s = [...t, e];
908
- if (Xs(e)) {
909
- const a = e.toJSON();
910
- if (a !== e)
911
- return typeof a == "string" ? a : ge(a, s);
912
- } else if (Array.isArray(e))
913
- return Ys(e, s);
914
- return Zs(e, s);
915
- }
916
- function Xs(e) {
917
- return typeof e.toJSON == "function";
918
- }
919
- function Zs(e, t) {
920
- const s = Object.entries(e);
921
- return s.length === 0 ? "{}" : t.length > It ? "[" + Ks(e) + "]" : "{ " + s.map(
922
- ([r, o]) => r + ": " + ge(o, t)
923
- ).join(", ") + " }";
924
- }
925
- function Ys(e, t) {
926
- if (e.length === 0)
927
- return "[]";
928
- if (t.length > It)
929
- return "[Array]";
930
- const s = Math.min(Js, e.length), a = e.length - s, r = [];
931
- for (let o = 0; o < s; ++o)
932
- r.push(ge(e[o], t));
933
- return a === 1 ? r.push("... 1 more item") : a > 1 && r.push(`... ${a} more items`), "[" + r.join(", ") + "]";
934
- }
935
- function Ks(e) {
936
- const t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
937
- if (t === "Object" && typeof e.constructor == "function") {
938
- const s = e.constructor.name;
939
- if (typeof s == "string" && s !== "")
940
- return s;
941
- }
942
- return t;
943
- }
944
- const er = globalThis.process && // eslint-disable-next-line no-undef
945
- process.env.NODE_ENV === "production", tr = (
946
- /* c8 ignore next 6 */
947
- // FIXME: https://github.com/graphql/graphql-js/issues/2317
948
- er ? function(t, s) {
949
- return t instanceof s;
950
- } : function(t, s) {
951
- if (t instanceof s)
952
- return !0;
953
- if (typeof t == "object" && t !== null) {
954
- var a;
955
- const r = s.prototype[Symbol.toStringTag], o = (
956
- // We still need to support constructor's name to detect conflicts with older versions of this library.
957
- Symbol.toStringTag in t ? t[Symbol.toStringTag] : (a = t.constructor) === null || a === void 0 ? void 0 : a.name
958
- );
959
- if (r === o) {
960
- const i = kt(t);
961
- throw new Error(`Cannot use ${r} "${i}" from another module or realm.
962
-
963
- Ensure that there is only one instance of "graphql" in the node_modules
964
- directory. If different versions of "graphql" are the dependencies of other
965
- relied on modules, use "resolutions" to ensure only one version is installed.
966
-
967
- https://yarnpkg.com/en/docs/selective-version-resolutions
968
-
969
- Duplicate "graphql" modules cannot be used at the same time since different
970
- versions may have different capabilities and behavior. The data from one
971
- version used in the function from another could produce confusing and
972
- spurious results.`);
973
- }
974
- }
975
- return !1;
976
- }
977
- );
978
- class Dt {
979
- constructor(t, s = "GraphQL request", a = {
980
- line: 1,
981
- column: 1
982
- }) {
983
- typeof t == "string" || Ce(!1, `Body must be a string. Received: ${kt(t)}.`), this.body = t, this.name = s, this.locationOffset = a, this.locationOffset.line > 0 || Ce(
984
- !1,
985
- "line in locationOffset is 1-indexed and must be positive."
986
- ), this.locationOffset.column > 0 || Ce(
987
- !1,
988
- "column in locationOffset is 1-indexed and must be positive."
989
- );
990
- }
991
- get [Symbol.toStringTag]() {
992
- return "Source";
993
- }
994
- }
995
- function nr(e) {
996
- return tr(e, Dt);
997
- }
998
- function sr(e) {
999
- const t = nr(e) ? e : new Dt(e), s = t.body, a = new zs(t);
1000
- let r = "", o = !1;
1001
- for (; a.advance().kind !== x.EOF; ) {
1002
- const i = a.token, l = i.kind, c = !Fs(i.kind);
1003
- o && (c || i.kind === x.SPREAD) && (r += " ");
1004
- const u = s.slice(i.start, i.end);
1005
- l === x.BLOCK_STRING ? r += Ds(i.value, {
1006
- minimize: !0
1007
- }) : r += u, o = c;
1008
- }
1009
- return r;
1010
- }
1011
- const zt = yt(
1012
- void 0
1013
- ), _a = ({
1014
- children: e,
1015
- client: t
1016
- }) => /* @__PURE__ */ n.jsx(zt.Provider, { value: t, children: e }), Ft = (e, t, ...[s]) => ({
1017
- queryFn: () => e.fetch(t, s),
1018
- queryKey: [sr(t.toString()), s]
1019
- }), rr = (e, ...[t]) => {
1020
- const s = Xn(zt);
1021
- if (s === void 0)
1022
- throw new Error("useGraphQL must be used within a GraphQLProvider");
1023
- return Ft(s, e, ...t === void 0 ? [] : [t]);
1024
- };
1025
- class H extends String {
1026
- __apiType;
1027
- value;
1028
- __meta__;
1029
- constructor(t, s) {
1030
- super(t), this.value = t, this.__meta__ = s;
1031
- }
1032
- toString() {
1033
- return this.value;
1034
- }
1035
- }
1036
- const ar = new H(
1037
- `
1038
- fragment OperationsFragment on OperationItem {
1039
- slug
1040
- summary
1041
- method
1042
- description
1043
- operationId
1044
- contentTypes
1045
- path
1046
- deprecated
1047
- extensions
1048
- parameters {
1049
- name
1050
- in
1051
- description
1052
- required
1053
- schema
1054
- style
1055
- explode
1056
- examples {
1057
- name
1058
- description
1059
- externalValue
1060
- value
1061
- summary
1062
- }
1063
- }
1064
- requestBody {
1065
- content {
1066
- mediaType
1067
- encoding {
1068
- name
1069
- }
1070
- examples {
1071
- name
1072
- description
1073
- externalValue
1074
- value
1075
- summary
1076
- }
1077
- schema
1078
- }
1079
- description
1080
- required
1081
- }
1082
- responses {
1083
- statusCode
1084
- links
1085
- description
1086
- content {
1087
- examples {
1088
- name
1089
- description
1090
- externalValue
1091
- value
1092
- summary
1093
- }
1094
- mediaType
1095
- encoding {
1096
- name
1097
- }
1098
- schema
1099
- }
1100
- }
1101
- }
1102
- `,
1103
- { fragmentName: "OperationsFragment" }
1104
- ), or = new H(`
1105
- query ServersQuery($input: JSON!, $type: SchemaType!) {
1106
- schema(input: $input, type: $type) {
1107
- url
1108
- servers {
1109
- url
1110
- }
1111
- }
1112
- }
1113
- `), ir = new H(`
1114
- query SchemaWarmup($input: JSON!, $type: SchemaType!) {
1115
- schema(input: $input, type: $type) {
1116
- openapi
1117
- }
1118
- }
1119
- `), cr = new H(`
1120
- query OperationsForTag($input: JSON!, $type: SchemaType!, $tag: String, $untagged: Boolean) {
1121
- schema(input: $input, type: $type) {
1122
- servers {
1123
- url
1124
- }
1125
- description
1126
- summary
1127
- title
1128
- url
1129
- version
1130
- tag(slug: $tag, untagged: $untagged) {
1131
- name
1132
- description
1133
- operations {
1134
- slug
1135
- ...OperationsFragment
1136
- }
1137
- next {
1138
- name
1139
- slug
1140
- }
1141
- prev {
1142
- name
1143
- slug
1144
- }
1145
- }
1146
- }
1147
- }
1148
- fragment OperationsFragment on OperationItem {
1149
- slug
1150
- summary
1151
- method
1152
- description
1153
- operationId
1154
- contentTypes
1155
- path
1156
- deprecated
1157
- extensions
1158
- parameters {
1159
- name
1160
- in
1161
- description
1162
- required
1163
- schema
1164
- style
1165
- explode
1166
- examples {
1167
- name
1168
- description
1169
- externalValue
1170
- value
1171
- summary
1172
- }
1173
- }
1174
- requestBody {
1175
- content {
1176
- mediaType
1177
- encoding {
1178
- name
1179
- }
1180
- examples {
1181
- name
1182
- description
1183
- externalValue
1184
- value
1185
- summary
1186
- }
1187
- schema
1188
- }
1189
- description
1190
- required
1191
- }
1192
- responses {
1193
- statusCode
1194
- links
1195
- description
1196
- content {
1197
- examples {
1198
- name
1199
- description
1200
- externalValue
1201
- value
1202
- summary
1203
- }
1204
- mediaType
1205
- encoding {
1206
- name
1207
- }
1208
- schema
1209
- }
1210
- }
1211
- }`), lr = new H(`
1212
- query GetSchemas($input: JSON!, $type: SchemaType!) {
1213
- schema(input: $input, type: $type) {
1214
- title
1215
- description
1216
- summary
1217
- components {
1218
- schemas {
1219
- name
1220
- schema
1221
- extensions
1222
- }
1223
- }
1224
- }
1225
- }
1226
- `), dr = new H(`
1227
- query getServerQuery($input: JSON!, $type: SchemaType!) {
1228
- schema(input: $input, type: $type) {
1229
- url
1230
- servers {
1231
- url
1232
- }
1233
- }
1234
- }
1235
- `), ur = new H(`
1236
- query GetNavigationOperations($input: JSON!, $type: SchemaType!) {
1237
- schema(input: $input, type: $type) {
1238
- extensions
1239
- tags {
1240
- slug
1241
- name
1242
- extensions
1243
- operations {
1244
- summary
1245
- slug
1246
- method
1247
- operationId
1248
- path
1249
- }
1250
- }
1251
- components {
1252
- schemas {
1253
- __typename
1254
- }
1255
- }
1256
- }
1257
- }
1258
- `), mr = {
1259
- "\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": or,
1260
- "\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n deprecated\n extensions\n parameters {\n name\n in\n description\n required\n schema\n style\n explode\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": ar,
1261
- "\n query SchemaWarmup($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n openapi\n }\n }\n": ir,
1262
- "\n query OperationsForTag(\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 tag(slug: $tag, untagged: $untagged) {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n next {\n name\n slug\n }\n prev {\n name\n slug\n }\n }\n }\n }\n": cr,
1263
- "\n query GetSchemas($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n title\n description\n summary\n components {\n schemas {\n name\n schema\n extensions\n }\n }\n }\n }\n": lr,
1264
- "\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": dr,
1265
- "\n query GetNavigationOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n extensions\n tags {\n slug\n name\n extensions\n operations {\n summary\n slug\n method\n operationId\n path\n }\n }\n components {\n schemas {\n __typename\n }\n }\n }\n }\n": ur
1266
- };
1267
- function pr(e) {
1268
- return mr[e] ?? {};
1269
- }
1270
- const q = ze.Root, qt = ze.CollapsibleTrigger, V = ze.CollapsibleContent;
1271
- function hr() {
1272
- const t = navigator.userAgent.toLowerCase();
1273
- if (t.indexOf("win") !== -1)
1274
- return "windows";
1275
- if (t.indexOf("mac") !== -1)
1276
- return "apple";
1277
- if (t.indexOf("linux") !== -1)
1278
- return "linux";
1279
- if (t.indexOf("x11") !== -1)
1280
- return "unix";
1281
- }
1282
- function fr() {
1283
- return hr() === "apple";
1284
- }
1285
- const gr = {
1286
- other: {
1287
- alt: "Alt",
1288
- meta: "Ctrl",
1289
- ctrl: "Ctrl",
1290
- shift: "⇧",
1291
- option: "Alt"
1292
- },
1293
- apple: {
1294
- alt: "⌥",
1295
- meta: "⌘",
1296
- ctrl: "Ctrl",
1297
- shift: "⇧",
1298
- option: "⌥"
1299
- }
1300
- }, xr = (e, t) => {
1301
- const s = e.toLowerCase().split("+"), a = s.includes("meta"), r = s.includes("shift"), o = s.includes("option") || s.includes("alt"), i = s.includes("ctrl"), l = e.split("+").pop(), c = R(t);
1302
- return z(() => {
1303
- c.current = t;
1304
- }, [t]), z(() => {
1305
- const u = (d) => {
1306
- (d.code === `Key${l?.toUpperCase()}` || d.code.toLowerCase() === l?.toLowerCase()) && d.metaKey === a && d.shiftKey === r && d.altKey === o && d.ctrlKey === i && (d.preventDefault(), c.current());
1307
- };
1308
- return window.addEventListener("keydown", u), () => {
1309
- window.removeEventListener("keydown", u);
1310
- };
1311
- }, [l, a, r, o, i]), {
1312
- trigger: () => c.current(),
1313
- label: s.map(
1314
- (u) => u === "meta" || u === "ctrl" || u === "alt" || u === "shift" || u === "option" ? gr[fr() ? "apple" : "other"][u] : u
1315
- )
1316
- };
1317
- }, yr = Le()(
1318
- $e(
1319
- (e) => ({
1320
- selectedServer: void 0,
1321
- setSelectedServer: (t) => e({ selectedServer: t })
1322
- }),
1323
- { name: "zudoku-selected-server" }
1324
- )
1325
- ), vr = (e) => {
1326
- const { selectedServer: t, setSelectedServer: s } = yr();
1327
- return { selectedServer: vt(
1328
- () => t && e.some((r) => r.url === t) ? t : e.at(0)?.url ?? "",
1329
- [t, e]
1330
- ), setSelectedServer: s };
1331
- }, Vt = A.forwardRef(
1332
- ({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1333
- "textarea",
1334
- {
1335
- className: C(
1336
- "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-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
1337
- e
1338
- ),
1339
- ref: s,
1340
- ...t
1341
- }
1342
- )
1343
- );
1344
- Vt.displayName = "Textarea";
1345
- const M = ({
1346
- children: e,
1347
- className: t
1348
- }) => /* @__PURE__ */ n.jsxs(
1349
- "div",
1350
- {
1351
- className: C(
1352
- "grid grid-cols-[max-content_1fr_min-content_max-content] items-center gap-4 group bg-muted w-full h-10 ps-4 pe-2 border-b",
1353
- t
1354
- ),
1355
- children: [
1356
- e,
1357
- /* @__PURE__ */ n.jsx(
1358
- qt,
1359
- {
1360
- className: C(
1361
- "flex items-center gap-4 group bg-muted w-full p-2 hover:bg-accent hover:brightness-95 rounded-md",
1362
- t
1363
- ),
1364
- children: /* @__PURE__ */ n.jsx(
1365
- yn,
1366
- {
1367
- className: "group-data-[state=open]:rotate-180 transition-transform flex-shrink-0",
1368
- size: 16
1369
- }
1370
- )
1371
- }
1372
- )
1373
- ]
1374
- }
1375
- ), G = ({
1376
- children: e,
1377
- className: t
1378
- }) => /* @__PURE__ */ n.jsx("span", { className: C("font-semibold w-full text-start", t), children: e }), br = w.Root, jr = w.Trigger, Cr = w.Group, wr = A.forwardRef(({ className: e, inset: t, children: s, ...a }, r) => /* @__PURE__ */ n.jsxs(
1379
- w.SubTrigger,
1380
- {
1381
- ref: r,
1382
- className: C(
1383
- "flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-accent data-[state=open]:bg-accent",
1384
- t && "pl-8",
1385
- e
1386
- ),
1387
- ...a,
1388
- children: [
1389
- s,
1390
- /* @__PURE__ */ n.jsx(vn, { className: "ml-auto h-4 w-4" })
1391
- ]
1392
- }
1393
- ));
1394
- wr.displayName = w.SubTrigger.displayName;
1395
- const Nr = A.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1396
- w.SubContent,
1397
- {
1398
- ref: s,
1399
- className: C(
1400
- "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",
1401
- e
1402
- ),
1403
- ...t
1404
- }
1405
- ));
1406
- Nr.displayName = w.SubContent.displayName;
1407
- const Bt = A.forwardRef(({ className: e, sideOffset: t = 4, ...s }, a) => /* @__PURE__ */ n.jsx(w.Portal, { children: /* @__PURE__ */ n.jsx(
1408
- w.Content,
1409
- {
1410
- ref: a,
1411
- sideOffset: t,
1412
- className: C(
1413
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
1414
- "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",
1415
- e
1416
- ),
1417
- ...s
1418
- }
1419
- ) }));
1420
- Bt.displayName = w.Content.displayName;
1421
- const _t = A.forwardRef(({ className: e, inset: t, ...s }, a) => /* @__PURE__ */ n.jsx(
1422
- w.Item,
1423
- {
1424
- ref: a,
1425
- className: C(
1426
- "relative flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1427
- t && "pl-8",
1428
- e
1429
- ),
1430
- ...s
1431
- }
1432
- ));
1433
- _t.displayName = w.Item.displayName;
1434
- const Sr = A.forwardRef(({ className: e, children: t, checked: s, ...a }, r) => /* @__PURE__ */ n.jsxs(
1435
- w.CheckboxItem,
1436
- {
1437
- ref: r,
1438
- className: C(
1439
- "relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1440
- e
1441
- ),
1442
- checked: s,
1443
- ...a,
1444
- children: [
1445
- /* @__PURE__ */ n.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n.jsx(w.ItemIndicator, { children: /* @__PURE__ */ n.jsx(ft, { className: "h-4 w-4" }) }) }),
1446
- t
1447
- ]
1448
- }
1449
- ));
1450
- Sr.displayName = w.CheckboxItem.displayName;
1451
- const Tr = A.forwardRef(({ className: e, children: t, ...s }, a) => /* @__PURE__ */ n.jsxs(
1452
- w.RadioItem,
1453
- {
1454
- ref: a,
1455
- className: C(
1456
- "relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1457
- e
1458
- ),
1459
- ...s,
1460
- children: [
1461
- /* @__PURE__ */ n.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n.jsx(w.ItemIndicator, { children: /* @__PURE__ */ n.jsx(bn, { className: "h-4 w-4 fill-current" }) }) }),
1462
- t
1463
- ]
1464
- }
1465
- ));
1466
- Tr.displayName = w.RadioItem.displayName;
1467
- const Ut = A.forwardRef(({ className: e, inset: t, ...s }, a) => /* @__PURE__ */ n.jsx(
1468
- w.Label,
1469
- {
1470
- ref: a,
1471
- className: C(
1472
- "px-2 py-1.5 text-sm font-semibold",
1473
- t && "pl-8",
1474
- e
1475
- ),
1476
- ...s
1477
- }
1478
- ));
1479
- Ut.displayName = w.Label.displayName;
1480
- const Mt = A.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1481
- w.Separator,
1482
- {
1483
- ref: s,
1484
- className: C("-mx-1 my-1 h-px bg-muted", e),
1485
- ...t
1486
- }
1487
- ));
1488
- Mt.displayName = w.Separator.displayName;
1489
- const Ar = ({
1490
- examples: e,
1491
- onSelect: t
1492
- }) => /* @__PURE__ */ n.jsxs(br, { children: [
1493
- /* @__PURE__ */ n.jsx(jr, { asChild: !0, children: /* @__PURE__ */ n.jsxs(
1494
- E,
1495
- {
1496
- variant: "ghost",
1497
- size: "sm",
1498
- className: "hover:bg-accent hover:brightness-95",
1499
- children: [
1500
- "Use Example ",
1501
- /* @__PURE__ */ n.jsx(he, { size: 16, className: "ml-2" })
1502
- ]
1503
- }
1504
- ) }),
1505
- /* @__PURE__ */ n.jsx(Bt, { className: "max-w-72", children: e.map((s) => /* @__PURE__ */ n.jsxs("div", { children: [
1506
- /* @__PURE__ */ n.jsx(Ut, { children: s.mediaType }),
1507
- /* @__PURE__ */ n.jsx(Mt, {}),
1508
- /* @__PURE__ */ n.jsx(Cr, { children: s.examples?.map((a) => /* @__PURE__ */ n.jsx(
1509
- _t,
1510
- {
1511
- onSelect: () => t(a, s.mediaType),
1512
- children: /* @__PURE__ */ n.jsx(
1513
- "span",
1514
- {
1515
- className: "line-clamp-1",
1516
- title: a.summary ?? a.name,
1517
- children: a.summary ?? a.name
1518
- }
1519
- )
1520
- },
1521
- a.name
1522
- )) })
1523
- ] }, s.mediaType)) })
1524
- ] }), Or = ({ content: e }) => {
1525
- const { register: t, setValue: s, watch: a } = ae(), r = (e ?? []).flatMap((i) => i.examples), o = a("headers");
1526
- return /* @__PURE__ */ n.jsxs(q, { defaultOpen: !0, children: [
1527
- /* @__PURE__ */ n.jsxs(M, { children: [
1528
- /* @__PURE__ */ n.jsx(jn, { size: 16 }),
1529
- /* @__PURE__ */ n.jsx(G, { children: "Body" }),
1530
- e && r.length > 0 ? /* @__PURE__ */ n.jsx(
1531
- Ar,
1532
- {
1533
- examples: e,
1534
- onSelect: (i, l) => {
1535
- s("body", JSON.stringify(i.value, null, 2)), s("headers", [
1536
- ...o.filter((c) => c.name !== "Content-Type"),
1537
- {
1538
- name: "Content-Type",
1539
- value: l,
1540
- active: !0
1541
- }
1542
- ]);
1543
- }
1544
- }
1545
- ) : /* @__PURE__ */ n.jsx("div", {})
1546
- ] }),
1547
- /* @__PURE__ */ n.jsx(V, { className: "flex flex-col gap-2 ", children: /* @__PURE__ */ n.jsx(
1548
- Vt,
1549
- {
1550
- ...t("body"),
1551
- className: C(
1552
- "w-full p-2 h-64 font-mono md:text-xs border-none rounded-none focus-visible:ring-0"
1553
- ),
1554
- placeholder: "Your body here..."
1555
- }
1556
- ) })
1557
- ] });
1558
- }, ut = (e, t, s) => {
1559
- const a = t.replace(/(:\w+|\{\w+})/g, (o) => {
1560
- const i = o.replace(/[:{}]/g, "");
1561
- return s.pathParams.find((c) => c.name === i)?.value ?? o;
1562
- }), r = new URL(
1563
- a.replace(/^\//, ""),
1564
- e.endsWith("/") ? e : `${e}/`
1565
- );
1566
- return s.queryParams.filter((o) => o.active).forEach((o) => {
1567
- r.searchParams.set(o.name, o.value);
1568
- }), r;
1569
- };
1570
- function Pr(e) {
1571
- return /^(application\/octet-stream|image\/|audio\/|video\/|font\/|application\/pdf|application\/zip|application\/x-protobuf|application\/x-binary)/i.test(
1572
- e
1573
- );
1574
- }
1575
- const Rr = (e, t) => {
1576
- const s = e.find(
1577
- ([a]) => a.toLowerCase() === "content-disposition"
1578
- )?.[1];
1579
- if (s) {
1580
- const a = s.match(
1581
- /filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/
1582
- );
1583
- if (a?.[1])
1584
- return a[1].replace(/['"]/g, "");
1585
- }
1586
- try {
1587
- const r = new URL(t).pathname.split("/").pop() || "download";
1588
- return r.includes(".") ? r : "download";
1589
- } catch {
1590
- return "download";
1591
- }
1592
- }, xe = A.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1593
- Oe.Root,
1594
- {
1595
- ref: s,
1596
- className: C(
1597
- "peer h-4 w-4 shrink-0 rounded-[min(6px,var(--radius)-4px)] ring-offset-background focus-visible:outline-hidden 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",
1598
- "border border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary",
1599
- e
1600
- ),
1601
- ...t,
1602
- children: /* @__PURE__ */ n.jsx(
1603
- Oe.Indicator,
1604
- {
1605
- className: C("flex items-center justify-center text-current"),
1606
- children: /* @__PURE__ */ n.jsx(Cn, { className: "h-4 w-4" })
1607
- }
1608
- )
1609
- }
1610
- ));
1611
- xe.displayName = Oe.Root.displayName;
1612
- const Lr = de.Root, Gt = A.forwardRef(({ className: e, align: t = "center", sideOffset: s = 4, ...a }, r) => /* @__PURE__ */ n.jsx(de.Portal, { children: /* @__PURE__ */ n.jsx(
1613
- de.Content,
1614
- {
1615
- ref: r,
1616
- align: t,
1617
- sideOffset: s,
1618
- className: C(
1619
- "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden 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",
1620
- e
1621
- ),
1622
- ...a
1623
- }
1624
- ) }));
1625
- Gt.displayName = de.Content.displayName;
1626
- const $r = ({
1627
- value: e,
1628
- options: t,
1629
- onChange: s,
1630
- className: a,
1631
- placeholder: r = "Value",
1632
- onEnterPress: o,
1633
- ref: i
1634
- }) => {
1635
- const [l, c] = k(!1), [u, d] = k(!1), h = hs((m) => m.filtered.count), g = R(null);
1636
- return /* @__PURE__ */ n.jsxs(Lr, { open: l, children: [
1637
- /* @__PURE__ */ n.jsx(ps, { children: /* @__PURE__ */ n.jsx(
1638
- gs,
1639
- {
1640
- autoComplete: "off",
1641
- ref: (m) => {
1642
- g.current = m, typeof i == "function" ? i(m) : i && (i.current = m);
1643
- },
1644
- value: e,
1645
- placeholder: r,
1646
- className: C("h-9 bg-transparent", a),
1647
- onFocus: () => c(!0),
1648
- onBlur: () => {
1649
- u || c(!1);
1650
- },
1651
- onKeyDown: (m) => {
1652
- m.key === "Enter" && (c(!1), g.current?.blur(), o?.(m));
1653
- },
1654
- onValueChange: (m) => s(m)
1655
- }
1656
- ) }),
1657
- /* @__PURE__ */ n.jsx(
1658
- Gt,
1659
- {
1660
- onMouseEnter: () => d(!0),
1661
- onMouseLeave: () => d(!1),
1662
- onOpenAutoFocus: (m) => m.preventDefault(),
1663
- className: C("p-0 w-(--radix-popover-trigger-width)", {
1664
- "border-0": h === 0
1665
- }),
1666
- align: "start",
1667
- side: "bottom",
1668
- onWheel: (m) => {
1669
- m.stopPropagation();
1670
- },
1671
- onTouchMove: (m) => {
1672
- m.stopPropagation();
1673
- },
1674
- children: /* @__PURE__ */ n.jsx(xs, { className: "max-h-[140px]", children: t.map((m) => /* @__PURE__ */ n.jsx(
1675
- ys,
1676
- {
1677
- value: m,
1678
- onSelect: (y) => {
1679
- s(y), c(!1);
1680
- },
1681
- className: "cursor-pointer",
1682
- children: m
1683
- },
1684
- m
1685
- )) })
1686
- }
1687
- )
1688
- ] });
1689
- }, me = ({ shouldFilter: e, ...t }) => /* @__PURE__ */ n.jsx(fs, { className: "bg-transparent", shouldFilter: e, children: /* @__PURE__ */ n.jsx($r, { ...t }) }), oe = (e, t) => {
1690
- const s = A.forwardRef(({ className: a, asChild: r, ...o }, i) => {
1691
- const l = r ? vs : e;
1692
- return A.createElement(l, {
1693
- ...o,
1694
- ref: i,
1695
- className: typeof t == "function" ? t({ className: a }) : C(t, a)
1696
- });
1697
- });
1698
- return s.displayName = `VariantComponent(${e})`, s;
1699
- }, qe = oe(
1700
- "div",
1701
- "grid grid-cols-[min-content_2fr_3fr] items-center gap-x-5"
1702
- ), pe = oe(
1703
- "div",
1704
- "group h-9 hover:bg-accent/75 ps-4 pe-2 grid col-span-full grid-cols-subgrid items-center border-b"
1705
- ), Er = Object.freeze([
1706
- "Accept",
1707
- "Accept-Encoding",
1708
- "Accept-Language",
1709
- "Authorization",
1710
- "Cache-Control",
1711
- "Connection",
1712
- "Content-Disposition",
1713
- "Content-Encoding",
1714
- "Content-Language",
1715
- "Content-Length",
1716
- "Content-Range",
1717
- "Content-Security-Policy",
1718
- "Content-Type",
1719
- "Cookie",
1720
- "Date",
1721
- "ETag",
1722
- "Expires",
1723
- "Host",
1724
- "If-Modified-Since",
1725
- "Location",
1726
- "Origin",
1727
- "Pragma",
1728
- "Referer",
1729
- "Set-Cookie",
1730
- "User-Agent",
1731
- "X-Requested-With"
1732
- ]), Ir = ({
1733
- control: e,
1734
- schemaHeaders: t,
1735
- lockedHeaders: s
1736
- }) => {
1737
- const { fields: a, append: r, remove: o } = De({
1738
- control: e,
1739
- name: "headers"
1740
- }), { setValue: i, watch: l, formState: c } = ae(), u = R([]), d = R([]), h = l("headers"), g = bt(
1741
- (f) => {
1742
- f?.stopPropagation(), r({ name: "", value: "", active: !1 }, { shouldFocus: !0 });
1743
- },
1744
- [r]
1745
- );
1746
- z(() => {
1747
- h.length === 0 && g();
1748
- }, [h, g]);
1749
- const m = (f) => {
1750
- u.current[f]?.focus();
1751
- }, y = (f) => {
1752
- g(), requestAnimationFrame(() => d.current[f + 1]?.focus());
1753
- }, v = t.filter((f) => !h.some((j) => j.name === f.name)).map(({ name: f }) => f), b = a.flatMap((f, j) => !s?.map((S) => S.toLowerCase()).includes(f.name.toLowerCase()) ? [] : [j]), O = s?.map((f) => ({
1754
- name: f,
1755
- id: `locked-${f}`,
1756
- value: "••••••••••",
1757
- active: !0,
1758
- locked: !0
1759
- })) ?? [];
1760
- return /* @__PURE__ */ n.jsxs(q, { defaultOpen: !0, children: [
1761
- /* @__PURE__ */ n.jsxs(M, { children: [
1762
- /* @__PURE__ */ n.jsx(wn, { size: 16 }),
1763
- /* @__PURE__ */ n.jsx(G, { children: "Headers" }),
1764
- /* @__PURE__ */ n.jsxs(
1765
- ne,
1766
- {
1767
- onClick: g,
1768
- type: "button",
1769
- size: "sm",
1770
- variant: "ghost",
1771
- className: "hover:bg-accent hover:brightness-95 flex gap-2",
1772
- children: [
1773
- "Add header ",
1774
- /* @__PURE__ */ n.jsx(he, { size: 16 })
1775
- ]
1776
- }
1777
- )
1778
- ] }),
1779
- /* @__PURE__ */ n.jsx(V, { className: "CollapsibleContent", children: /* @__PURE__ */ n.jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ n.jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ n.jsxs(qe, { children: [
1780
- O.map((f) => /* @__PURE__ */ n.jsxs(rt, { children: [
1781
- /* @__PURE__ */ n.jsx(at, { asChild: !0, children: /* @__PURE__ */ n.jsxs(
1782
- pe,
1783
- {
1784
- className: "opacity-50 cursor-not-allowed font-mono text-xs min-h-10",
1785
- children: [
1786
- /* @__PURE__ */ n.jsx(Nn, { size: 16 }),
1787
- /* @__PURE__ */ n.jsx(
1788
- ue,
1789
- {
1790
- value: f.name,
1791
- disabled: !0,
1792
- className: "w-full border-0 p-0 m-0 shadow-none text-xs focus-visible:ring-0 font-mono"
1793
- }
1794
- ),
1795
- /* @__PURE__ */ n.jsx("div", { children: f.value })
1796
- ]
1797
- },
1798
- f.id
1799
- ) }),
1800
- /* @__PURE__ */ n.jsx(
1801
- ot,
1802
- {
1803
- alignOffset: 10,
1804
- side: "bottom",
1805
- align: "start",
1806
- children: /* @__PURE__ */ n.jsx("p", { children: "This header is set by the selected authentication." })
1807
- }
1808
- )
1809
- ] }, f.id)),
1810
- a.map((f, j) => {
1811
- const $ = t.find(
1812
- (S) => S.name === h.at(j)?.name
1813
- );
1814
- return /* @__PURE__ */ n.jsxs(
1815
- pe,
1816
- {
1817
- className: C(
1818
- b.includes(j) && "text-amber-600",
1819
- b.includes(j) && !c.dirtyFields.headers?.[j]?.value && "hidden"
1820
- ),
1821
- children: [
1822
- /* @__PURE__ */ n.jsx(
1823
- F,
1824
- {
1825
- control: e,
1826
- name: `headers.${j}.active`,
1827
- render: ({ field: S }) => /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1828
- /* @__PURE__ */ n.jsx(
1829
- xe,
1830
- {
1831
- id: `headers.${j}.active`,
1832
- className: C(
1833
- b.includes(j) && "hidden"
1834
- ),
1835
- checked: S.value,
1836
- onCheckedChange: (D) => {
1837
- S.onChange(D);
1838
- }
1839
- }
1840
- ),
1841
- /* @__PURE__ */ n.jsxs(rt, { children: [
1842
- /* @__PURE__ */ n.jsx(at, { asChild: !0, children: /* @__PURE__ */ n.jsx(
1843
- Sn,
1844
- {
1845
- className: C(
1846
- "text-amber-600",
1847
- !b.includes(j) && "hidden"
1848
- ),
1849
- size: 16
1850
- }
1851
- ) }),
1852
- /* @__PURE__ */ n.jsx(
1853
- ot,
1854
- {
1855
- alignOffset: 10,
1856
- side: "bottom",
1857
- align: "start",
1858
- children: /* @__PURE__ */ n.jsx("p", { children: "This header will be overwritten by the selected authentication." })
1859
- }
1860
- )
1861
- ] })
1862
- ] })
1863
- }
1864
- ),
1865
- /* @__PURE__ */ n.jsx(
1866
- F,
1867
- {
1868
- control: e,
1869
- name: `headers.${j}.name`,
1870
- render: ({ field: S }) => /* @__PURE__ */ n.jsx(
1871
- me,
1872
- {
1873
- ...S,
1874
- placeholder: "Name",
1875
- className: "border-0 p-0 m-0 shadow-none focus-visible:ring-0 bg-transparent hover:bg-transparent text-xs font-mono",
1876
- options: [...v, ...Er],
1877
- onEnterPress: () => m(j),
1878
- onChange: (D) => {
1879
- S.onChange(D), i(`headers.${j}.active`, !0);
1880
- },
1881
- ref: (D) => {
1882
- d.current[j] = D;
1883
- }
1884
- }
1885
- )
1886
- }
1887
- ),
1888
- /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2", children: [
1889
- /* @__PURE__ */ n.jsx(
1890
- F,
1891
- {
1892
- control: e,
1893
- name: `headers.${j}.value`,
1894
- render: ({ field: S }) => $?.enum && $.enum.length > 0 ? /* @__PURE__ */ n.jsx(
1895
- me,
1896
- {
1897
- shouldFilter: !1,
1898
- value: S.value,
1899
- options: $.enum ?? [],
1900
- onChange: (P) => {
1901
- S.onChange(P), i(`headers.${j}.active`, !0);
1902
- },
1903
- className: "border-0 p-0 m-0 shadow-none focus-visible:ring-0 bg-transparent hover:bg-transparent text-xs font-mono"
1904
- }
1905
- ) : /* @__PURE__ */ n.jsx(
1906
- ue,
1907
- {
1908
- placeholder: "Value",
1909
- className: "w-full truncate border-0 p-0 m-0 shadow-none text-xs focus-visible:ring-0 font-mono",
1910
- autoComplete: "off",
1911
- ...S,
1912
- ref: (P) => {
1913
- u.current[j] = P;
1914
- },
1915
- onKeyDown: (P) => {
1916
- P.key === "Enter" && P.currentTarget.value.trim() && y(j);
1917
- }
1918
- }
1919
- )
1920
- }
1921
- ),
1922
- /* @__PURE__ */ n.jsx(
1923
- ne,
1924
- {
1925
- size: "icon-xs",
1926
- variant: "ghost",
1927
- className: "text-muted-foreground opacity-0 group-hover:brightness-95 group-hover:opacity-100",
1928
- onClick: () => o(j),
1929
- type: "button",
1930
- children: /* @__PURE__ */ n.jsx(gt, { size: 16 })
1931
- }
1932
- )
1933
- ] })
1934
- ]
1935
- },
1936
- f.id
1937
- );
1938
- })
1939
- ] }) }) }) })
1940
- ] });
1941
- }, kr = js(
1942
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
1943
- ), Ve = A.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1944
- At.Root,
1945
- {
1946
- ref: s,
1947
- className: C(kr(), e),
1948
- ...t
1949
- }
1950
- ));
1951
- Ve.displayName = At.Root.displayName;
1952
- const Ht = A.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1953
- se.Root,
1954
- {
1955
- className: C("grid gap-2", e),
1956
- ...t,
1957
- ref: s
1958
- }
1959
- ));
1960
- Ht.displayName = se.Root.displayName;
1961
- const Qt = A.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1962
- se.Item,
1963
- {
1964
- ref: s,
1965
- className: C(
1966
- "aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
1967
- e
1968
- ),
1969
- ...t,
1970
- children: /* @__PURE__ */ n.jsx(se.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ n.jsx(Tn, { className: "h-2.5 w-2.5 fill-current text-current" }) })
1971
- }
1972
- ));
1973
- Qt.displayName = se.Item.displayName;
1974
- const Jt = ({
1975
- identities: e,
1976
- setValue: t,
1977
- value: s
1978
- }) => /* @__PURE__ */ n.jsx("div", { className: "w-full overflow-hidden", children: /* @__PURE__ */ n.jsx(
1979
- Ht,
1980
- {
1981
- onValueChange: (a) => t(a),
1982
- value: s,
1983
- defaultValue: te,
1984
- className: "gap-0",
1985
- disabled: e?.length === 0,
1986
- children: [{ id: te, label: "None" }, ...e ?? []].map(
1987
- (a) => /* @__PURE__ */ n.jsxs(
1988
- Ve,
1989
- {
1990
- className: "h-10 items-center border-b font-normal flex gap-4 p-4 cursor-pointer hover:bg-accent/75",
1991
- children: [
1992
- /* @__PURE__ */ n.jsx(Qt, { value: a.id, id: a.id }),
1993
- /* @__PURE__ */ n.jsx("span", { children: a.label })
1994
- ]
1995
- },
1996
- a.id
1997
- )
1998
- )
1999
- }
2000
- ) }), Dr = ({
2001
- onSubmit: e,
2002
- identities: t,
2003
- open: s,
2004
- onOpenChange: a
2005
- }) => {
2006
- const [r, o] = k(void 0), [i, l] = k(!1);
2007
- return /* @__PURE__ */ n.jsx(Ee, { open: s, onOpenChange: a, children: /* @__PURE__ */ n.jsxs(Ie, { children: [
2008
- /* @__PURE__ */ n.jsx(ke, { children: "Select an auth identity" }),
2009
- /* @__PURE__ */ n.jsx(jt, { children: "Please select an identity for this request." }),
2010
- /* @__PURE__ */ n.jsx(bs, { className: "max-h-80 overflow-auto", children: /* @__PURE__ */ n.jsx(
2011
- Jt,
2012
- {
2013
- identities: t,
2014
- setValue: o,
2015
- value: r
2016
- }
2017
- ) }),
2018
- /* @__PURE__ */ n.jsxs(Ct, { className: "flex flex-col gap-2", children: [
2019
- /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2", children: [
2020
- /* @__PURE__ */ n.jsx(
2021
- xe,
2022
- {
2023
- id: "remember",
2024
- checked: i,
2025
- onCheckedChange: (c) => l(
2026
- c === "indeterminate" ? !1 : !!c
2027
- )
2028
- }
2029
- ),
2030
- /* @__PURE__ */ n.jsx(Ve, { htmlFor: "remember", children: "Remember my choice" })
2031
- ] }),
2032
- /* @__PURE__ */ n.jsx(
2033
- E,
2034
- {
2035
- onClick: () => e({ identity: r, rememberedIdentity: i }),
2036
- children: "Send"
2037
- }
2038
- )
2039
- ] })
2040
- ] }) });
2041
- }, Ne = (e) => Math.abs(
2042
- isNaN(parseInt(e)) ? e.toLowerCase().charCodeAt(0) - 96 : isNaN(parseInt(e)) ? 0 : parseInt(e)
2043
- ), Se = (e) => e.length > 1 ? parseInt(e.split("").reduce((t, s) => `${Ne(t) + Ne(s)}`)) : Ne(e), mt = (e, t = {}) => {
2044
- const s = (3 * Se(e) + 2 * Se(e) + Se(e)) % 360, { saturation: a = 75, lightness: r = 60 } = t;
2045
- return `${s}deg ${a}% ${r}%`;
2046
- }, Te = "data-linked-param", zr = (e) => {
2047
- const { resolvedTheme: t } = Cs();
2048
- return {
2049
- text: mt(
2050
- e,
2051
- t === "light" ? { saturation: 95, lightness: 38 } : {}
2052
- ),
2053
- background: mt(
2054
- e,
2055
- t === "light" ? { saturation: 85, lightness: 40 } : {}
2056
- )
2057
- };
2058
- }, Wt = ({
2059
- name: e,
2060
- className: t,
2061
- slug: s,
2062
- title: a,
2063
- children: r,
2064
- onClick: o
2065
- }) => {
2066
- const i = R(null), l = s?.replace(/[{}]/g, ""), c = e.replace(/[{}]/g, ""), { text: u, background: d } = zr(c), h = `hsl(${u} / 100%)`, g = `hsl(${d} / 10%)`, m = `hsl(${d} / 50%)`;
2067
- return z(() => {
2068
- if (!l || !i.current) return;
2069
- const y = () => {
2070
- document.querySelectorAll(`[${Te}="${l}"]`).forEach((O) => {
2071
- O instanceof HTMLElement && (O.dataset.active = "true");
2072
- });
2073
- }, v = () => {
2074
- document.querySelectorAll(`[${Te}="${l}"]`).forEach((O) => {
2075
- O instanceof HTMLElement && (O.dataset.active = "false");
2076
- });
2077
- }, b = i.current;
2078
- return b.addEventListener("mouseenter", y), b.addEventListener("mouseleave", v), () => {
2079
- b.removeEventListener("mouseenter", y), b.removeEventListener("mouseleave", v);
2080
- };
2081
- }, [l]), /* @__PURE__ */ n.jsx(
2082
- "span",
2083
- {
2084
- [Te]: l,
2085
- className: C(
2086
- // This may not contain (inline-)flex or (inline-)block otherwise it breaks the browser's full text search
2087
- "relative transition-all duration-100 rounded-lg",
2088
- "border border-(--border-color) p-0.5 text-(--param-color) bg-(--background-color)",
2089
- "data-[active=true]:border-(--param-color) data-[active=true]:shadow-sm data-[active=true]:bottom-px",
2090
- t
2091
- ),
2092
- title: a,
2093
- suppressHydrationWarning: !0,
2094
- ref: i,
2095
- onClick: o,
2096
- style: {
2097
- "--param-color": h,
2098
- "--border-color": m,
2099
- "--background-color": g
2100
- },
2101
- children: r ?? e
2102
- }
2103
- );
2104
- }, Fr = ({
2105
- control: e,
2106
- url: t
2107
- }) => {
2108
- const { fields: s } = De({
2109
- control: e,
2110
- name: "pathParams"
2111
- }), a = [...s].sort(
2112
- (r, o) => t.indexOf(`{${r.name}}`) - t.indexOf(`{${o.name}}`)
2113
- );
2114
- return /* @__PURE__ */ n.jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ n.jsx(qe, { children: a.map((r, o) => /* @__PURE__ */ n.jsxs(pe, { children: [
2115
- /* @__PURE__ */ n.jsx(
2116
- F,
2117
- {
2118
- control: e,
2119
- name: `pathParams.${o}.name`,
2120
- render: () => /* @__PURE__ */ n.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ n.jsx(
2121
- Wt,
2122
- {
2123
- slug: r.name,
2124
- name: r.name,
2125
- className: "font-mono text-xs px-2"
2126
- }
2127
- ) })
2128
- }
2129
- ),
2130
- /* @__PURE__ */ n.jsx("div", { className: "flex justify-between items-center col-span-2", children: /* @__PURE__ */ n.jsx(
2131
- F,
2132
- {
2133
- control: e,
2134
- name: `pathParams.${o}.value`,
2135
- render: ({ field: i }) => /* @__PURE__ */ n.jsx(
2136
- ue,
2137
- {
2138
- ...i,
2139
- required: !0,
2140
- placeholder: "Value",
2141
- className: "w-full truncate border-0 p-0 m-0 shadow-none text-xs font-mono focus-visible:ring-0"
2142
- }
2143
- )
2144
- }
2145
- ) })
2146
- ] }, r.id)) }) });
2147
- }, qr = oe(
2148
- "input",
2149
- "bg-transparent h-9 font-mono text-xs"
2150
- ), Vr = ({
2151
- control: e,
2152
- schemaQueryParams: t
2153
- }) => {
2154
- const { fields: s, remove: a, append: r } = De({
2155
- control: e,
2156
- name: "queryParams"
2157
- }), { setValue: o, getValues: i, watch: l } = ae(), c = l("queryParams");
2158
- z(() => {
2159
- c.length === 0 && r({ name: "", value: "", active: !1 }, { shouldFocus: !0 });
2160
- }, [c, r]);
2161
- const u = t.map(
2162
- (d) => !!d.isRequired
2163
- );
2164
- return /* @__PURE__ */ n.jsxs(q, { defaultOpen: !0, children: [
2165
- /* @__PURE__ */ n.jsxs(M, { children: [
2166
- /* @__PURE__ */ n.jsx(An, { size: 16 }),
2167
- /* @__PURE__ */ n.jsx(G, { children: "Query Parameters" }),
2168
- /* @__PURE__ */ n.jsxs(
2169
- E,
2170
- {
2171
- onClick: () => {
2172
- o("queryParams", [
2173
- ...i("queryParams"),
2174
- { name: "", value: "", active: !1 }
2175
- ]);
2176
- },
2177
- type: "button",
2178
- size: "sm",
2179
- variant: "ghost",
2180
- className: "hover:bg-accent hover:brightness-95 flex gap-2",
2181
- children: [
2182
- "Add parameter ",
2183
- /* @__PURE__ */ n.jsx(he, { size: 16 })
2184
- ]
2185
- }
2186
- )
2187
- ] }),
2188
- /* @__PURE__ */ n.jsx(V, { className: "CollapsibleContent", children: /* @__PURE__ */ n.jsx("div", { className: "overflow-hidden w-full", children: /* @__PURE__ */ n.jsx(qe, { children: s.map((d, h) => {
2189
- const g = t.find(
2190
- (m) => m.name === c.at(h)?.name
2191
- );
2192
- return /* @__PURE__ */ n.jsxs(pe, { children: [
2193
- /* @__PURE__ */ n.jsx(
2194
- F,
2195
- {
2196
- control: e,
2197
- name: `queryParams.${h}.active`,
2198
- render: ({ field: m }) => /* @__PURE__ */ n.jsx(
2199
- xe,
2200
- {
2201
- id: `queryParams.${h}.active`,
2202
- checked: m.value,
2203
- onCheckedChange: m.onChange
2204
- }
2205
- )
2206
- }
2207
- ),
2208
- /* @__PURE__ */ n.jsx(
2209
- F,
2210
- {
2211
- control: e,
2212
- render: ({ field: m }) => u[h] ? /* @__PURE__ */ n.jsx(qr, { asChild: !0, children: /* @__PURE__ */ n.jsxs(
2213
- "label",
2214
- {
2215
- className: "flex items-center cursor-pointer gap-1",
2216
- htmlFor: `queryParams.${h}.active`,
2217
- title: u[h] ? "Required field" : void 0,
2218
- children: [
2219
- m.value,
2220
- u[h] && /* @__PURE__ */ n.jsx("sup", { children: " *" })
2221
- ]
2222
- }
2223
- ) }) : /* @__PURE__ */ n.jsx(
2224
- me,
2225
- {
2226
- placeholder: "Name",
2227
- value: m.value,
2228
- options: t.map((y) => y.name),
2229
- onChange: (y) => {
2230
- m.onChange(y);
2231
- },
2232
- className: "border-0 p-0 m-0 shadow-none focus-visible:ring-0 bg-transparent hover:bg-transparent text-xs font-mono"
2233
- }
2234
- ),
2235
- name: `queryParams.${h}.name`
2236
- }
2237
- ),
2238
- /* @__PURE__ */ n.jsxs("div", { className: "flex justify-between items-center", children: [
2239
- /* @__PURE__ */ n.jsx(
2240
- F,
2241
- {
2242
- control: e,
2243
- render: ({ field: m }) => g?.enum && g.enum.length > 0 ? /* @__PURE__ */ n.jsx(
2244
- me,
2245
- {
2246
- value: m.value,
2247
- options: g.enum ?? [],
2248
- onChange: (v) => {
2249
- m.onChange(v), o(`queryParams.${h}.active`, !0);
2250
- },
2251
- className: "border-0 shadow-none focus-visible:ring-0 bg-transparent hover:bg-transparent text-xs font-mono"
2252
- }
2253
- ) : /* @__PURE__ */ n.jsx(
2254
- ue,
2255
- {
2256
- ...m,
2257
- onChange: (v) => {
2258
- m.onChange(v.target.value), v.target.value.length > 0 && o(`queryParams.${h}.active`, !0);
2259
- },
2260
- placeholder: "Value",
2261
- "aria-label": "Query parameter value",
2262
- className: "w-full border-0 p-0 m-0 shadow-none focus-visible:ring-0 text-xs font-mono"
2263
- }
2264
- ),
2265
- name: `queryParams.${h}.value`
2266
- }
2267
- ),
2268
- /* @__PURE__ */ n.jsx(
2269
- E,
2270
- {
2271
- size: "icon-xs",
2272
- variant: "ghost",
2273
- className: "text-muted-foreground opacity-0 group-hover:brightness-95 group-hover:opacity-100",
2274
- onClick: () => a(h),
2275
- type: "button",
2276
- children: /* @__PURE__ */ n.jsx(gt, { size: 16 })
2277
- }
2278
- )
2279
- ] })
2280
- ] }, d.id);
2281
- }) }) }) })
2282
- ] });
2283
- }, Br = Le()(
2284
- $e(
2285
- (e, t) => ({
2286
- rememberedIdentity: null,
2287
- setRememberedIdentity: (s) => e({ rememberedIdentity: s }),
2288
- getRememberedIdentity: (s) => s.find(
2289
- (a) => a === t().rememberedIdentity
2290
- )
2291
- }),
2292
- {
2293
- name: "identity-storage",
2294
- storage: xt(() => sessionStorage)
2295
- }
2296
- )
2297
- ), _r = ({
2298
- path: e,
2299
- renderParam: t
2300
- }) => {
2301
- let s = 0;
2302
- return e.split("/").map((a, r, o) => {
2303
- const i = Array.from(a.matchAll(/{([^}]+)}/g)), l = [];
2304
- let c = 0;
2305
- return i.forEach((u) => {
2306
- const [d, h] = u;
2307
- if (!h) return;
2308
- const g = u.index;
2309
- g > c && l.push(
2310
- /* @__PURE__ */ n.jsx(K, { children: a.slice(c, g) }, `text-${c}-${g}`)
2311
- ), l.push(
2312
- /* @__PURE__ */ n.jsx(K, { children: t({ name: h, originalValue: d, index: s++ }) }, `param-${h}`)
2313
- ), c = g + d.length;
2314
- }), c < a.length && l.push(
2315
- /* @__PURE__ */ n.jsx(K, { children: a.slice(c) }, `text-${c}-${a.length}`)
2316
- ), // eslint-disable-next-line react/no-array-index-key
2317
- /* @__PURE__ */ n.jsxs(K, { children: [
2318
- l,
2319
- r < o.length - 1 && "/",
2320
- /* @__PURE__ */ n.jsx("wbr", {})
2321
- ] }, `${a}-${r}`);
2322
- });
2323
- }, Ur = ({ url: e }) => {
2324
- const { watch: t, setFocus: s } = ae(), [a] = t(["pathParams"]);
2325
- return /* @__PURE__ */ n.jsx(
2326
- _r,
2327
- {
2328
- path: e,
2329
- renderParam: ({ name: r, originalValue: o, index: i }) => {
2330
- const l = a.find(
2331
- (c) => c.name === r
2332
- )?.value;
2333
- return /* @__PURE__ */ n.jsx(
2334
- Wt,
2335
- {
2336
- name: r,
2337
- backgroundOpacity: "0",
2338
- slug: r,
2339
- onClick: () => s(`pathParams.${i}.value`),
2340
- children: l || o
2341
- }
2342
- );
2343
- }
2344
- }
2345
- );
2346
- }, Mr = () => {
2347
- const { watch: e } = ae(), s = e("queryParams").filter((a) => a.active && a.name).map((a, r, o) => /* @__PURE__ */ n.jsxs(K, { children: [
2348
- a.name,
2349
- "=",
2350
- encodeURIComponent(a.value).replaceAll("%20", "+"),
2351
- r < o.length - 1 && "&",
2352
- /* @__PURE__ */ n.jsx("wbr", {})
2353
- ] }, a.name));
2354
- return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2355
- s.length > 0 ? "?" : "",
2356
- s
2357
- ] });
2358
- }, Gr = ({
2359
- open: e,
2360
- setOpen: t,
2361
- onSignUp: s,
2362
- onLogin: a
2363
- }) => /* @__PURE__ */ n.jsx(Ee, { open: e, onOpenChange: t, children: /* @__PURE__ */ n.jsxs(Ie, { children: [
2364
- /* @__PURE__ */ n.jsx(ke, { children: "Welcome to the Playground!" }),
2365
- /* @__PURE__ */ n.jsx(jt, { children: "The Playground is a tool for developers to test and explore our APIs. To use the Playground, you need to login." }),
2366
- /* @__PURE__ */ n.jsxs(Ct, { className: "flex gap-2 sm:justify-between", children: [
2367
- /* @__PURE__ */ n.jsx(E, { type: "button", variant: "ghost", onClick: () => t(!1), children: "Skip" }),
2368
- /* @__PURE__ */ n.jsxs("div", { className: "flex gap-2", children: [
2369
- s && /* @__PURE__ */ n.jsx(E, { type: "button", variant: "outline", onClick: s, children: "Sign Up" }),
2370
- a && /* @__PURE__ */ n.jsx(E, { type: "button", variant: "default", onClick: a, children: "Login" })
2371
- ] })
2372
- ] })
2373
- ] }) }), Xt = (e = 0) => {
2374
- if (e === 0)
2375
- return "0 B";
2376
- const t = Math.floor(Math.log(e) / Math.log(1e3));
2377
- return `${(e / Math.pow(1e3, t)).toFixed(
2378
- t ? 2 : 0
2379
- )} ${t ? `${"kMGTPEZY"[t - 1]}B` : "B"}`;
2380
- }, Hr = ({ status: e }) => {
2381
- if (!e) return /* @__PURE__ */ n.jsx("div", { className: "w-2 h-2 rounded-full bg-gray-500" });
2382
- switch (Number(e.toString().slice(0, 1))) {
2383
- case 2:
2384
- return /* @__PURE__ */ n.jsx("div", { className: "w-2 h-2 rounded-full bg-green-500" });
2385
- case 4:
2386
- return /* @__PURE__ */ n.jsx("div", { className: "w-2 h-2 rounded-full bg-yellow-400" });
2387
- case 5:
2388
- return /* @__PURE__ */ n.jsx("div", { className: "w-2 h-2 rounded-full bg-red-500" });
2389
- default:
2390
- return /* @__PURE__ */ n.jsx("div", { className: "w-2 h-2 rounded-full bg-gray-500" });
2391
- }
2392
- }, Qr = () => {
2393
- const e = R(null), t = R(null), s = R(Date.now()), a = R(null), r = bt(() => {
2394
- if (t.current) {
2395
- const o = Date.now() - s.current;
2396
- t.current.nodeValue = o.toFixed();
2397
- }
2398
- a.current = requestAnimationFrame(r);
2399
- }, []);
2400
- return Zn(() => {
2401
- const o = document.createTextNode("0"), i = e.current;
2402
- return i.appendChild(o), t.current = o, s.current = Date.now(), a.current = requestAnimationFrame(r), () => {
2403
- a.current && cancelAnimationFrame(a.current), t.current && i.contains(o) && i.removeChild(o);
2404
- };
2405
- }, [r]), /* @__PURE__ */ n.jsx("span", { className: "inline-block text-end w-[3ch]", ref: e });
2406
- }, Jr = ({
2407
- status: e,
2408
- time: t,
2409
- size: s,
2410
- isFinished: a,
2411
- progress: r
2412
- }) => {
2413
- const o = {
2414
- 200: "OK",
2415
- 201: "Created",
2416
- 202: "Accepted",
2417
- 204: "No Content",
2418
- 400: "Bad Request",
2419
- 401: "Unauthorized",
2420
- 403: "Forbidden",
2421
- 404: "Not Found",
2422
- 405: "Method Not Allowed",
2423
- 500: "Internal Server Error"
2424
- };
2425
- return /* @__PURE__ */ n.jsxs("div", { className: "relative flex h-10 text-xs gap-4 px-4 items-center justify-between font-mono border-b", children: [
2426
- /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2", children: [
2427
- /* @__PURE__ */ n.jsx(Hr, { status: e }),
2428
- " ",
2429
- e ?? "Sending Request...",
2430
- e ? ` ${o[e]}` : ""
2431
- ] }),
2432
- /* @__PURE__ */ n.jsxs("div", { className: "flex gap-2", children: [
2433
- /* @__PURE__ */ n.jsxs("div", { children: [
2434
- /* @__PURE__ */ n.jsx("span", { className: "text-muted-foreground", children: "Size" }),
2435
- " ",
2436
- /* @__PURE__ */ n.jsx("span", { className: "inline-block text-end min-w-[5ch]", children: s ? Xt(s) : "- B" })
2437
- ] }),
2438
- /* @__PURE__ */ n.jsxs("div", { children: [
2439
- /* @__PURE__ */ n.jsx("span", { className: "text-muted-foreground", children: "Time" }),
2440
- " ",
2441
- t !== void 0 ? `${t.toFixed(0)}` : /* @__PURE__ */ n.jsx(Qr, {}),
2442
- "ms"
2443
- ] })
2444
- ] }),
2445
- /* @__PURE__ */ n.jsx(
2446
- "div",
2447
- {
2448
- className: "h-full bg-neutral-500/10 absolute left-0 -bottom-0 z-10 transition-all duration-200 ease-in-out",
2449
- style: {
2450
- opacity: a ? 0 : 1,
2451
- width: a ? 0 : `${r * 100}%`
2452
- }
2453
- }
2454
- )
2455
- ] });
2456
- };
2457
- function Be(e) {
2458
- if (e === null) return "null";
2459
- if (Array.isArray(e)) {
2460
- if (e.length === 0) return "any[]";
2461
- const t = e[0];
2462
- return t === void 0 ? "any[]" : `${Be(t)}[]`;
2463
- }
2464
- return typeof e == "object" ? Wr(e) : typeof e;
2465
- }
2466
- function Wr(e, t = "") {
2467
- const s = ["{"];
2468
- for (const [a, r] of Object.entries(e)) {
2469
- const o = Be(r);
2470
- s.push(` ${a}: ${o};`);
2471
- }
2472
- return s.push("}"), s.join(`
2473
- `);
2474
- }
2475
- function Xr(e) {
2476
- return { lines: [`type GeneratedType = ${Be(e)};`] };
2477
- }
2478
- const Zt = ({
2479
- code: e,
2480
- language: t,
2481
- children: s
2482
- }) => {
2483
- const { syntaxHighlighting: a } = Mn().options;
2484
- return Wn(a?.highlighter, "Highlighter not found"), ws(
2485
- a.highlighter,
2486
- e ?? s ?? "",
2487
- t,
2488
- a.themes
2489
- );
2490
- };
2491
- Zt.displayName = "Highlight";
2492
- const Zr = (e) => Object.entries({
2493
- "application/json": "json",
2494
- "text/json": "json",
2495
- "text/html": "html",
2496
- "text/css": "css",
2497
- "text/javascript": "javascript",
2498
- "application/xml": "xml",
2499
- "application/xhtml+xml": "xhtml"
2500
- }).find(
2501
- ([s]) => e.includes(s)
2502
- )?.[1], Yr = (e) => {
2503
- const t = e.find(([s]) => s.toLowerCase() === "content-type")?.[1] || "";
2504
- return Zr(t);
2505
- }, Kr = (e) => {
2506
- try {
2507
- return JSON.stringify(JSON.parse(e), null, 2);
2508
- } catch {
2509
- return null;
2510
- }
2511
- }, ea = (e) => {
2512
- const t = [
2513
- "Content-Type",
2514
- "Content-Length",
2515
- "Authorization",
2516
- "X-RateLimit-Remaining",
2517
- "X-RateLimit-Limit",
2518
- "Cache-Control",
2519
- "ETag"
2520
- ].map((s) => s.toLowerCase());
2521
- return [...e].sort(([s], [a]) => {
2522
- const r = t.indexOf(s.toLowerCase()), o = t.indexOf(a.toLowerCase());
2523
- return r === o ? 0 : r === -1 ? 1 : o === -1 ? -1 : r - o;
2524
- });
2525
- }, Y = 3, Ae = oe(
2526
- "div",
2527
- "grid-cols-subgrid grid border-b col-span-full px-4 py-1.5 font-mono text-xs"
2528
- ), X = oe("div", "py-1 break-all"), ta = ({
2529
- body: e = "",
2530
- headers: t,
2531
- request: s,
2532
- size: a,
2533
- isBinary: r = !1,
2534
- fileName: o,
2535
- blob: i
2536
- }) => {
2537
- const l = Yr(t), c = Kr(e), u = c || e, [d, h] = k(
2538
- c ? "formatted" : "raw"
2539
- ), g = Gn({
2540
- queryKey: ["types", u],
2541
- queryFn: async () => Xr(JSON.parse(u)),
2542
- enabled: d === "types" && !r
2543
- }), m = () => {
2544
- if (i && o) {
2545
- const v = URL.createObjectURL(i), b = document.createElement("a");
2546
- b.href = v, b.download = o, document.body.appendChild(b), b.click(), document.body.removeChild(b), URL.revokeObjectURL(v);
2547
- }
2548
- }, y = ea([...t]);
2549
- return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2550
- /* @__PURE__ */ n.jsxs(q, { defaultOpen: !0, children: [
2551
- /* @__PURE__ */ n.jsxs(M, { children: [
2552
- /* @__PURE__ */ n.jsx(On, { size: 16 }),
2553
- /* @__PURE__ */ n.jsx(G, { className: "col-span-2", children: "Header Request" })
2554
- ] }),
2555
- /* @__PURE__ */ n.jsx(V, { children: /* @__PURE__ */ n.jsx("div", { className: "grid grid-cols-2 gap-x-6 text-sm", children: s.headers.slice(0, Y).map(([v, b]) => /* @__PURE__ */ n.jsxs(Ae, { children: [
2556
- /* @__PURE__ */ n.jsx(X, { children: v }),
2557
- /* @__PURE__ */ n.jsx(X, { children: b })
2558
- ] }, v)) }) })
2559
- ] }),
2560
- /* @__PURE__ */ n.jsxs(q, { defaultOpen: !0, children: [
2561
- /* @__PURE__ */ n.jsxs(M, { children: [
2562
- /* @__PURE__ */ n.jsx(Pn, { size: 16 }),
2563
- /* @__PURE__ */ n.jsx(G, { className: "col-span-2", children: "Header Response" })
2564
- ] }),
2565
- /* @__PURE__ */ n.jsx(V, { children: /* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-2 gap-x-6 text-sm", children: [
2566
- y.slice(0, Y).map(([v, b]) => /* @__PURE__ */ n.jsxs(Ae, { children: [
2567
- /* @__PURE__ */ n.jsx(X, { children: v }),
2568
- /* @__PURE__ */ n.jsx(X, { children: b })
2569
- ] }, v)),
2570
- y.length > Y && /* @__PURE__ */ n.jsxs(q, { className: "col-span-full grid-cols-subgrid grid group", children: [
2571
- /* @__PURE__ */ n.jsxs(qt, { className: "data-[state=open]:hidden justify-center col-span-2 text-xs text-muted-foreground hover:text-primary border-b h-8 flex items-center gap-2", children: [
2572
- /* @__PURE__ */ n.jsxs("span", { children: [
2573
- "Show ",
2574
- y.length - Y,
2575
- " more headers"
2576
- ] }),
2577
- /* @__PURE__ */ n.jsx(he, { size: 12, className: "text-muted-foreground" })
2578
- ] }),
2579
- /* @__PURE__ */ n.jsx(V, { className: "col-span-full grid grid-cols-subgrid", children: y.slice(Y).map(([v, b]) => /* @__PURE__ */ n.jsxs(Ae, { children: [
2580
- /* @__PURE__ */ n.jsx(X, { children: v }),
2581
- /* @__PURE__ */ n.jsx(X, { children: b })
2582
- ] }, v)) })
2583
- ] })
2584
- ] }) })
2585
- ] }),
2586
- /* @__PURE__ */ n.jsx("div", { className: "flex gap-2 justify-between items-center border-b h-10", children: c && !r && /* @__PURE__ */ n.jsx("div", { className: "px-2", children: /* @__PURE__ */ n.jsxs(
2587
- wt,
2588
- {
2589
- value: d,
2590
- onValueChange: (v) => h(v),
2591
- children: [
2592
- /* @__PURE__ */ n.jsx(Nt, { className: "min-w-32 border-none h-8", children: /* @__PURE__ */ n.jsx(St, { placeholder: "View" }) }),
2593
- /* @__PURE__ */ n.jsxs(Tt, { children: [
2594
- /* @__PURE__ */ n.jsx(le, { value: "formatted", children: "Formatted" }),
2595
- /* @__PURE__ */ n.jsx(le, { value: "raw", children: "Raw" }),
2596
- /* @__PURE__ */ n.jsx(le, { value: "types", children: "Types" })
2597
- ] })
2598
- ]
2599
- }
2600
- ) }) }),
2601
- /* @__PURE__ */ n.jsx("div", { children: r ? /* @__PURE__ */ n.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col items-center gap-4", children: [
2602
- /* @__PURE__ */ n.jsx("div", { className: "text-lg font-semibold", children: "Binary Content" }),
2603
- /* @__PURE__ */ n.jsx("div", { className: "text-sm text-muted-foreground", children: "This response contains binary data that cannot be displayed as text." }),
2604
- /* @__PURE__ */ n.jsxs(
2605
- E,
2606
- {
2607
- onClick: m,
2608
- className: "flex items-center gap-2",
2609
- disabled: !i,
2610
- children: [
2611
- /* @__PURE__ */ n.jsx(Rn, { className: "h-4 w-4" }),
2612
- "Download ",
2613
- o || "file",
2614
- " (",
2615
- Xt(a),
2616
- ")"
2617
- ]
2618
- }
2619
- )
2620
- ] }) }) : /* @__PURE__ */ n.jsx("div", { className: "overflow-auto max-w-full p-4 text-xs max-h-[calc(83.333vh-180px)]", children: /* @__PURE__ */ n.jsx(
2621
- Zt,
2622
- {
2623
- language: d === "types" ? "typescript" : d === "raw" ? c ? "plain" : l : "json",
2624
- code: (d === "raw" ? e : d === "types" ? g.data?.lines.join(`
2625
- `) : u) ?? ""
2626
- }
2627
- ) }) })
2628
- ] });
2629
- }, na = ({
2630
- queryMutation: e,
2631
- showLongRunningWarning: t,
2632
- onCancel: s,
2633
- tip: a,
2634
- isFinished: r,
2635
- progress: o
2636
- }) => /* @__PURE__ */ n.jsxs("div", { className: "overflow-y-auto h-[80vh] bg-muted/50", children: [
2637
- (e.isPending || e.data) && /* @__PURE__ */ n.jsx(
2638
- Jr,
2639
- {
2640
- status: e.data?.status,
2641
- time: e.data?.time,
2642
- size: e.data?.size,
2643
- isFinished: r,
2644
- progress: o
2645
- }
2646
- ),
2647
- e.error ? /* @__PURE__ */ n.jsx("div", { className: "max-w-2/3 mx-auto mt-20", children: /* @__PURE__ */ n.jsxs(rs, { children: [
2648
- /* @__PURE__ */ n.jsx(Ln, { size: 24, strokeWidth: 1.5, className: "me-5" }),
2649
- /* @__PURE__ */ n.jsx(as, { children: "Request failed" }),
2650
- /* @__PURE__ */ n.jsx(os, { children: e.error.message || String(e.error) || "Unexpected error" })
2651
- ] }) }) : e.data ? /* @__PURE__ */ n.jsx(
2652
- ta,
2653
- {
2654
- request: e.data.request,
2655
- size: e.data.size,
2656
- headers: e.data.headers,
2657
- body: e.data.body,
2658
- isBinary: e.data.isBinary,
2659
- fileName: e.data.fileName,
2660
- blob: e.data.blob
2661
- }
2662
- ) : e.isPending ? /* @__PURE__ */ n.jsx("div", { className: "grid place-items-center h-full", children: /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2 items-center mt-20", children: [
2663
- /* @__PURE__ */ n.jsx(ns, {}),
2664
- /* @__PURE__ */ n.jsxs(
2665
- "div",
2666
- {
2667
- className: C(
2668
- "opacity-0 pointer-events-none transition-opacity h-20 text-sm text-muted-foreground duration-300 flex flex-col gap-2 items-center",
2669
- t && "opacity-100 pointer-events-auto"
2670
- ),
2671
- children: [
2672
- "Looks like the request is taking longer than expected.",
2673
- /* @__PURE__ */ n.jsx(
2674
- ne,
2675
- {
2676
- type: "button",
2677
- onClick: s,
2678
- size: "sm",
2679
- className: "w-fit",
2680
- variant: "outline",
2681
- children: "Cancel"
2682
- }
2683
- )
2684
- ]
2685
- }
2686
- )
2687
- ] }) }) : /* @__PURE__ */ n.jsx("div", { className: "h-full grid place-items-center", children: /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-4 items-center", children: [
2688
- /* @__PURE__ */ n.jsx(
2689
- $n,
2690
- {
2691
- size: 64,
2692
- className: "text-muted-foreground",
2693
- strokeWidth: 1.2
2694
- }
2695
- ),
2696
- /* @__PURE__ */ n.jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children: "Send your first request" }),
2697
- a
2698
- ] }) })
2699
- ] }), sa = Le()(
2700
- $e(
2701
- (e) => ({
2702
- skipLogin: !1,
2703
- setSkipLogin: (t) => e({ skipLogin: t })
2704
- }),
2705
- {
2706
- name: "remember-skip-login",
2707
- storage: xt(() => sessionStorage)
2708
- }
2709
- )
2710
- ), te = "__none", ra = ({
2711
- server: e,
2712
- servers: t = [],
2713
- url: s,
2714
- method: a,
2715
- headers: r = [],
2716
- queryParams: o = [],
2717
- pathParams: i = [],
2718
- defaultBody: l = "",
2719
- examples: c,
2720
- requiresLogin: u = !1,
2721
- onLogin: d,
2722
- onSignUp: h
2723
- }) => {
2724
- const { selectedServer: g, setSelectedServer: m } = vr(
2725
- t.map((p) => ({ url: p }))
2726
- ), [y, v] = k(!1), b = Hn(), { setRememberedIdentity: O, getRememberedIdentity: f } = Br(), [, j] = Yn(), { skipLogin: $, setSkipLogin: S } = sa(), [D, P] = k(!1), Q = R(void 0), Ue = ms(O), Me = R(null), { label: sn } = xr("meta+enter", () => {
2727
- Me.current?.requestSubmit();
2728
- }), Ge = s.match(/\{([^}]+)\}/g)?.map((p) => p.slice(1, -1)) ?? [], He = [...i].sort(
2729
- (p, W) => Ge.indexOf(p.name) - Ge.indexOf(W.name)
2730
- ), { register: rn, control: ie, handleSubmit: Qe, watch: Je, setValue: ye, ...ve } = cs({
2731
- defaultValues: {
2732
- body: l,
2733
- queryParams: o.length > 0 ? o.map((p) => ({
2734
- name: p.name,
2735
- value: p.defaultValue ?? "",
2736
- active: p.defaultActive ?? !1,
2737
- enum: p.enum ?? []
2738
- })) : [
2739
- {
2740
- name: "",
2741
- value: "",
2742
- active: !1,
2743
- enum: []
2744
- }
2745
- ],
2746
- pathParams: He.map((p) => ({
2747
- name: p.name,
2748
- value: p.defaultValue ?? ""
2749
- })),
2750
- headers: r.length > 0 ? r.map((p) => ({
2751
- name: p.name,
2752
- value: p.defaultValue ?? "",
2753
- active: p.defaultActive ?? !1
2754
- })) : [
2755
- {
2756
- name: "",
2757
- value: "",
2758
- active: !1
2759
- }
2760
- ],
2761
- identity: f([
2762
- te,
2763
- ...b.data?.map((p) => p.id) ?? []
2764
- ])
2765
- }
2766
- }), J = Je("identity"), an = vt(
2767
- () => b.data?.find((p) => p.id === J)?.authorizationFields,
2768
- [b.data, J]
2769
- );
2770
- z(() => {
2771
- J && Ue.current(J);
2772
- }, [Ue, J]);
2773
- const B = is({
2774
- gcTime: 0,
2775
- mutationFn: async (p) => {
2776
- const W = performance.now(), fn = Object.fromEntries([
2777
- ...p.headers.filter((T) => T.name && T.active).map((T) => [T.name, T.value])
2778
- ]), _ = new Request(
2779
- ut(e ?? g, s, p),
2780
- {
2781
- method: a.toUpperCase(),
2782
- headers: fn,
2783
- body: p.body ? p.body : void 0
2784
- }
2785
- );
2786
- p.identity !== te && await b.data?.find((T) => T.id === p.identity)?.authorizeRequest(_);
2787
- const be = setTimeout(
2788
- () => P(!0),
2789
- 3210
2790
- );
2791
- Q.current = new AbortController(), Q.current.signal.addEventListener("abort", () => {
2792
- clearTimeout(be);
2793
- });
2794
- try {
2795
- const T = await fetch(_, {
2796
- cache: "no-store",
2797
- signal: Q.current.signal
2798
- });
2799
- clearTimeout(be), P(!1);
2800
- const gn = performance.now() - W, xn = new URL(_.url), Ze = Array.from(T.headers.entries()), Ye = T.headers.get("content-type") || "", Ke = Pr(Ye);
2801
- let ce = "", et, tt;
2802
- Ke ? (et = await T.blob(), tt = Rr(Ze, _.url), ce = `Binary content (${Ye})`) : ce = await T.text();
2803
- const nt = T.headers.get("content-length");
2804
- return {
2805
- status: T.status,
2806
- headers: Ze,
2807
- size: nt ? parseInt(nt) : ce.length,
2808
- body: ce,
2809
- time: gn,
2810
- isBinary: Ke,
2811
- fileName: tt,
2812
- blob: et,
2813
- request: {
2814
- method: _.method.toUpperCase(),
2815
- url: _.url,
2816
- headers: [
2817
- ["Host", xn.host],
2818
- ["User-Agent", "Zudoku Playground"],
2819
- ...Array.from(_.headers.entries())
2820
- ],
2821
- body: p.body ? p.body : void 0
2822
- }
2823
- };
2824
- } catch (T) {
2825
- throw clearTimeout(be), P(!1), T instanceof TypeError ? new Error(
2826
- "The request failed, possibly due to network issues or CORS policy."
2827
- ) : T;
2828
- }
2829
- }
2830
- }), We = B.isPending, [on, cn] = k(!1);
2831
- z(() => {
2832
- const p = setTimeout(() => cn(We), 100);
2833
- return () => clearTimeout(p);
2834
- }, [We]);
2835
- const { isFinished: ln, progress: dn } = ss({ isAnimating: on });
2836
- z(() => () => {
2837
- Q.current?.abort();
2838
- }, []);
2839
- const un = /* @__PURE__ */ n.jsx("div", { className: "inline-block opacity-50 hover:opacity-100 transition", children: e ? /* @__PURE__ */ n.jsx("span", { children: e.replace(/^https?:\/\//, "").replace(/\/$/, "") }) : t.length > 1 && /* @__PURE__ */ n.jsxs(
2840
- wt,
2841
- {
2842
- onValueChange: (p) => {
2843
- j(() => m(p));
2844
- },
2845
- value: g,
2846
- defaultValue: g,
2847
- children: [
2848
- /* @__PURE__ */ n.jsx(Nt, { className: "p-0 border-none flex-row-reverse bg-transparent text-xs gap-0.5 h-auto translate-y-[4px]", children: /* @__PURE__ */ n.jsx(St, {}) }),
2849
- /* @__PURE__ */ n.jsx(Tt, { children: t.map((p) => /* @__PURE__ */ n.jsx(le, { value: p, children: p.replace(/^https?:\/\//, "").replace(/\/$/, "") }, p)) })
2850
- ]
2851
- }
2852
- ) }), mn = u && !$, pn = ["POST", "PUT", "PATCH", "DELETE"].includes(
2853
- a.toUpperCase()
2854
- ), [Xe, hn] = us();
2855
- return /* @__PURE__ */ n.jsx(
2856
- ls,
2857
- {
2858
- register: rn,
2859
- control: ie,
2860
- handleSubmit: Qe,
2861
- watch: Je,
2862
- setValue: ye,
2863
- ...ve,
2864
- children: /* @__PURE__ */ n.jsx(ds, { delayDuration: 150, children: /* @__PURE__ */ n.jsxs(
2865
- "form",
2866
- {
2867
- ref: Me,
2868
- onSubmit: Qe((p) => {
2869
- b.data?.length === 0 || p.identity ? B.mutate(p) : v(!0);
2870
- }),
2871
- className: "relative",
2872
- children: [
2873
- /* @__PURE__ */ n.jsx(
2874
- Dr,
2875
- {
2876
- identities: b.data ?? [],
2877
- open: y,
2878
- onOpenChange: v,
2879
- onSubmit: ({ rememberedIdentity: p, identity: W }) => {
2880
- p && ye("identity", W ?? te), v(!1), B.mutate({ ...ve.getValues(), identity: W });
2881
- }
2882
- }
2883
- ),
2884
- /* @__PURE__ */ n.jsx(
2885
- Gr,
2886
- {
2887
- open: mn,
2888
- setOpen: (p) => S(!p),
2889
- onSignUp: h,
2890
- onLogin: d
2891
- }
2892
- ),
2893
- /* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-[1fr_1px_1fr] text-sm", children: [
2894
- /* @__PURE__ */ n.jsxs("div", { className: "col-span-3 p-4 border-b flex gap-2 items-stretch", children: [
2895
- /* @__PURE__ */ n.jsxs("div", { className: "flex flex-1 items-center w-full border rounded-md relative overflow-hidden", children: [
2896
- /* @__PURE__ */ n.jsx("div", { className: "border-r p-2 bg-muted rounded-l-md self-stretch font-semibold font-mono flex items-center", children: a.toUpperCase() }),
2897
- /* @__PURE__ */ n.jsx("div", { className: "items-center px-2 font-mono text-xs break-all leading-6 relative h-full w-full", children: /* @__PURE__ */ n.jsxs("div", { className: "h-full py-1.5", children: [
2898
- un,
2899
- /* @__PURE__ */ n.jsx(Ur, { url: s }),
2900
- /* @__PURE__ */ n.jsx(Mr, {})
2901
- ] }) }),
2902
- /* @__PURE__ */ n.jsx("div", { className: "px-1", children: /* @__PURE__ */ n.jsx(
2903
- E,
2904
- {
2905
- type: "button",
2906
- onClick: () => {
2907
- hn(
2908
- ut(
2909
- e ?? g,
2910
- s,
2911
- ve.getValues()
2912
- ).toString()
2913
- );
2914
- },
2915
- variant: "ghost",
2916
- size: "icon-xs",
2917
- className: C(
2918
- "hover:opacity-100 transition",
2919
- Xe ? "text-emerald-600 opacity-100" : "opacity-50"
2920
- ),
2921
- children: Xe ? /* @__PURE__ */ n.jsx(ft, { className: "text-green-500", size: 14 }) : /* @__PURE__ */ n.jsx(En, { size: 14 })
2922
- }
2923
- ) })
2924
- ] }),
2925
- /* @__PURE__ */ n.jsx(
2926
- E,
2927
- {
2928
- type: "submit",
2929
- variant: B.isPending ? "destructive" : "default",
2930
- onClick: (p) => {
2931
- B.isPending && (Q.current?.abort(
2932
- "Request cancelled by user"
2933
- ), p.preventDefault());
2934
- },
2935
- className: "w-18",
2936
- children: B.isPending ? "Cancel" : "Send"
2937
- }
2938
- )
2939
- ] }),
2940
- /* @__PURE__ */ n.jsxs("div", { className: "relative overflow-y-auto h-[80vh]", children: [
2941
- b.data?.length !== 0 && /* @__PURE__ */ n.jsxs(q, { defaultOpen: !0, children: [
2942
- /* @__PURE__ */ n.jsxs(M, { children: [
2943
- /* @__PURE__ */ n.jsx(In, { size: 16 }),
2944
- /* @__PURE__ */ n.jsx(G, { className: "col-span-2", children: "Authentication" })
2945
- ] }),
2946
- /* @__PURE__ */ n.jsx(V, { className: "CollapsibleContent", children: /* @__PURE__ */ n.jsx(
2947
- Jt,
2948
- {
2949
- value: J,
2950
- identities: b.data ?? [],
2951
- setValue: (p) => ye("identity", p)
2952
- }
2953
- ) })
2954
- ] }),
2955
- He.length > 0 && /* @__PURE__ */ n.jsxs(q, { defaultOpen: !0, children: [
2956
- /* @__PURE__ */ n.jsxs(M, { children: [
2957
- /* @__PURE__ */ n.jsx(kn, { size: 16 }),
2958
- /* @__PURE__ */ n.jsx(G, { className: "col-span-2", children: "Path Parameters" })
2959
- ] }),
2960
- /* @__PURE__ */ n.jsx(V, { className: "CollapsibleContent", children: /* @__PURE__ */ n.jsx(Fr, { url: s, control: ie }) })
2961
- ] }),
2962
- /* @__PURE__ */ n.jsx(Vr, { control: ie, schemaQueryParams: o }),
2963
- /* @__PURE__ */ n.jsx(
2964
- Ir,
2965
- {
2966
- control: ie,
2967
- schemaHeaders: r,
2968
- lockedHeaders: an?.headers
2969
- }
2970
- ),
2971
- pn && /* @__PURE__ */ n.jsx(Or, { content: c })
2972
- ] }),
2973
- /* @__PURE__ */ n.jsx("div", { className: "w-full bg-muted-foreground/20" }),
2974
- /* @__PURE__ */ n.jsx(
2975
- na,
2976
- {
2977
- queryMutation: B,
2978
- showLongRunningWarning: D,
2979
- isFinished: ln,
2980
- progress: dn,
2981
- tip: /* @__PURE__ */ n.jsx("div", { className: "text-xs w-full", children: /* @__PURE__ */ n.jsxs("span", { className: "text-muted-foreground", children: [
2982
- "Press",
2983
- " ",
2984
- /* @__PURE__ */ n.jsx("kbd", { className: "text-foreground border rounded m-0.5 px-1 py-0.5 capitalize", children: sn.join(" + ") }),
2985
- " ",
2986
- "to send a request"
2987
- ] }) }),
2988
- onCancel: () => {
2989
- Q.current?.abort(
2990
- "Request cancelled by the user"
2991
- ), P(!1);
2992
- }
2993
- }
2994
- )
2995
- ] })
2996
- ]
2997
- }
2998
- ) })
2999
- }
3000
- );
3001
- }, aa = ({
3002
- className: e,
3003
- size: t = 16
3004
- }) => /* @__PURE__ */ n.jsx(
3005
- "svg",
3006
- {
3007
- xmlns: "http://www.w3.org/2000/svg",
3008
- viewBox: "0 0 24 24",
3009
- fill: "currentColor",
3010
- className: e,
3011
- width: t,
3012
- height: t,
3013
- children: /* @__PURE__ */ n.jsx(
3014
- "path",
3015
- {
3016
- fillRule: "evenodd",
3017
- 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",
3018
- clipRule: "evenodd"
3019
- }
3020
- )
3021
- }
3022
- ), oa = (e) => {
3023
- const [t, s] = k(!1);
3024
- return /* @__PURE__ */ n.jsxs(Ee, { onOpenChange: (a) => s(a), children: [
3025
- /* @__PURE__ */ n.jsx(ts, { asChild: !0, children: e.children ?? /* @__PURE__ */ n.jsxs(
3026
- "button",
3027
- {
3028
- type: "button",
3029
- className: "flex gap-1 items-center px-2 py-1 rounded-md transition text-xs bg-primary text-primary-foreground shadow-xs hover:bg-primary/80",
3030
- children: [
3031
- "Test",
3032
- /* @__PURE__ */ n.jsx(aa, { size: 14 })
3033
- ]
3034
- }
3035
- ) }),
3036
- /* @__PURE__ */ n.jsxs(
3037
- Ie,
3038
- {
3039
- className: "max-w-screen-xl w-full overflow-hidden p-0",
3040
- "aria-describedby": void 0,
3041
- showCloseButton: !0,
3042
- children: [
3043
- /* @__PURE__ */ n.jsx(es, { children: /* @__PURE__ */ n.jsx(ke, { children: "Playground" }) }),
3044
- t && /* @__PURE__ */ n.jsx(ra, { ...e })
3045
- ]
3046
- }
3047
- )
3048
- ] });
3049
- }, ia = {
3050
- get: "green",
3051
- post: "blue",
3052
- put: "yellow",
3053
- delete: "red",
3054
- patch: "purple",
3055
- options: "gray",
3056
- head: "gray"
3057
- }, pt = ({
3058
- label: e,
3059
- path: t,
3060
- operations: s,
3061
- collapsible: a,
3062
- collapsed: r
3063
- }) => ({
3064
- type: "category",
3065
- label: e,
3066
- link: {
3067
- type: "doc",
3068
- path: t,
3069
- file: t,
3070
- label: e
3071
- },
3072
- collapsible: a,
3073
- collapsed: r,
3074
- items: s.map((o) => ({
3075
- type: "link",
3076
- label: o.summary ?? o.path,
3077
- to: `${t}#${o.slug}`,
3078
- badge: {
3079
- label: o.method,
3080
- color: ia[o.method.toLowerCase()],
3081
- invert: !0
3082
- }
3083
- }))
3084
- }), Yt = yt(
3085
- void 0
3086
- ), Ua = Yt.Provider, ca = () => {
3087
- const e = Kn(Yt);
3088
- if (!e)
3089
- throw new Error("useOasConfig must be used within a OasConfigProvider");
3090
- return e.config;
3091
- }, ht = (e) => ({
3092
- path: e.routePath,
3093
- async lazy() {
3094
- const { OasProvider: t } = await import("./OasProvider-CA_lpILt.js");
3095
- return {
3096
- element: /* @__PURE__ */ n.jsx(
3097
- t,
3098
- {
3099
- basePath: e.basePath,
3100
- version: e.version,
3101
- client: e.client,
3102
- config: e.config
3103
- }
3104
- )
3105
- };
3106
- },
3107
- children: e.routes
3108
- }), Kt = ({
3109
- path: e,
3110
- tag: t,
3111
- untagged: s
3112
- }) => ({
3113
- path: e,
3114
- async lazy() {
3115
- const { OperationList: a } = await import("./OperationList-C-TObVw6.js");
3116
- return { element: /* @__PURE__ */ n.jsx(a, { tag: t, untagged: s }) };
3117
- }
3118
- }), la = ({
3119
- render: e,
3120
- path: t
3121
- }) => {
3122
- const { type: s, input: a } = ca(), { tag: r } = qn(), o = Vn(), i = rr(nn, { type: s, input: a }), {
3123
- data: { schema: l }
3124
- } = Qn(i), c = l.tags.at(0);
3125
- return !r && c?.slug ? /* @__PURE__ */ n.jsx(
3126
- Bn,
3127
- {
3128
- to: {
3129
- pathname: _n(t, { tag: c.slug }),
3130
- search: o.search
3131
- }
3132
- }
3133
- ) : r && l.tags.some((u) => u.slug === r) ? e(r) : null;
3134
- }, da = ({ path: e }) => ({
3135
- path: e,
3136
- async lazy() {
3137
- const { OperationList: t } = await import("./OperationList-C-TObVw6.js");
3138
- return {
3139
- element: /* @__PURE__ */ n.jsx(
3140
- la,
3141
- {
3142
- path: e,
3143
- render: (s) => /* @__PURE__ */ n.jsx(t, { tag: s })
3144
- }
3145
- )
3146
- };
3147
- }
3148
- }), en = (e) => [
3149
- // Category without tagged operations
3150
- Kt({
3151
- path: I(e, _e),
3152
- untagged: !0
3153
- }),
3154
- // Schema list route
3155
- {
3156
- path: I(e, "~schemas"),
3157
- lazy: async () => {
3158
- const { SchemaList: t } = await import("./SchemaList-BeYWvBC7.js");
3159
- return { element: /* @__PURE__ */ n.jsx(t, {}) };
3160
- }
3161
- }
3162
- ], ua = (e, t) => {
3163
- const s = I(e, t.at(0) ?? _e);
3164
- return [
3165
- // Redirect to first tag on the index route
3166
- { index: !0, loader: () => Fn(s) },
3167
- // Create routes for each tag
3168
- ...t.map(
3169
- (a) => Kt({
3170
- path: I(e, a),
3171
- tag: a
3172
- })
3173
- ),
3174
- ...en(e)
3175
- ];
3176
- }, tn = (e) => e.type === "file" ? Object.keys(e.input) : [], ma = ({
3177
- basePath: e,
3178
- config: t,
3179
- client: s
3180
- }) => {
3181
- const a = t.tagPages;
3182
- if (!a)
3183
- return [
3184
- ht({
3185
- basePath: e,
3186
- routePath: e,
3187
- routes: [
3188
- da({ path: e + "/:tag?" }),
3189
- ...en(e)
3190
- ],
3191
- client: s,
3192
- config: t
3193
- })
3194
- ];
3195
- const r = tn(t);
3196
- return (r.length > 1 ? [void 0, ...r] : [void 0]).map((i) => {
3197
- const l = I(e, i);
3198
- return ht({
3199
- basePath: e,
3200
- version: i,
3201
- routePath: l,
3202
- routes: ua(l, a),
3203
- client: s,
3204
- config: t
3205
- });
3206
- });
3207
- }, nn = pr(`
3208
- query GetNavigationOperations($input: JSON!, $type: SchemaType!) {
3209
- schema(input: $input, type: $type) {
3210
- extensions
3211
- tags {
3212
- slug
3213
- name
3214
- extensions
3215
- operations {
3216
- summary
3217
- slug
3218
- method
3219
- operationId
3220
- path
3221
- }
3222
- }
3223
- components {
3224
- schemas {
3225
- __typename
3226
- }
3227
- }
3228
- }
3229
- }
3230
- `), _e = "~endpoints", Ma = (e) => {
3231
- const t = I(e.path), s = new Ss(e);
3232
- return {
3233
- getHead: () => {
3234
- if (e.type === "url" && !e.skipPreload)
3235
- return /* @__PURE__ */ n.jsx(
3236
- "link",
3237
- {
3238
- rel: "preload",
3239
- href: e.input,
3240
- as: "fetch",
3241
- crossOrigin: "anonymous"
3242
- }
3243
- );
3244
- if (e.server)
3245
- return /* @__PURE__ */ n.jsx("link", { rel: "preconnect", href: e.server });
3246
- },
3247
- getMdxComponents: () => ({
3248
- OpenPlaygroundButton: ({
3249
- requireAuth: a,
3250
- server: r,
3251
- method: o,
3252
- url: i,
3253
- children: l,
3254
- ...c
3255
- }) => {
3256
- const u = Un();
3257
- if (!r)
3258
- throw new Error("Server is required");
3259
- return a && !u.isAuthenticated ? /* @__PURE__ */ n.jsxs(
3260
- ne,
3261
- {
3262
- className: "gap-2 items-center",
3263
- variant: "outline",
3264
- onClick: u.login,
3265
- children: [
3266
- "Login to open in Playground ",
3267
- /* @__PURE__ */ n.jsx(Dn, { size: 16 })
3268
- ]
3269
- }
3270
- ) : /* @__PURE__ */ n.jsx(
3271
- oa,
3272
- {
3273
- url: i ?? "/",
3274
- method: o ?? "get",
3275
- server: r,
3276
- ...c,
3277
- children: /* @__PURE__ */ n.jsx(ne, { className: "gap-2 items-center", variant: "outline", children: l ?? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
3278
- "Open in Playground ",
3279
- /* @__PURE__ */ n.jsx(zn, { size: 16 })
3280
- ] }) })
3281
- }
3282
- );
3283
- }
3284
- }),
3285
- getNavigation: async (a, r) => {
3286
- if (!st({ path: t, end: !1 }, a))
3287
- return [];
3288
- const o = st(
3289
- { path: `${t}/:version?/:tag`, end: !0 },
3290
- a
3291
- );
3292
- try {
3293
- const i = o?.params.version, l = i ?? tn(e).at(0), { type: c } = e, u = c === "file" ? e.input[l] : e.input, d = Ft(s, nn, {
3294
- type: c,
3295
- input: u
3296
- }), h = await r.queryClient.ensureQueryData(d), g = new Map(
3297
- h.schema.tags.filter((f) => f.name && f.operations.length > 0).map((f) => {
3298
- if (!f.name)
3299
- throw new Error(`Tag ${f.slug} has no name`);
3300
- const j = I(t, i, f.slug), $ = f.extensions?.["x-zudoku-collapsed"] ?? !e.options?.expandAllTags, S = f.extensions?.["x-zudoku-collapsible"] ?? !0;
3301
- return [
3302
- f.name,
3303
- pt({
3304
- label: f.name,
3305
- path: j,
3306
- operations: f.operations,
3307
- collapsed: $,
3308
- collapsible: S
3309
- })
3310
- ];
3311
- })
3312
- ), m = h.schema.extensions?.["x-tagGroups"] ?? [], y = new Set(
3313
- m.flatMap(
3314
- (f) => f.tags.filter((j) => g.has(j))
3315
- )
3316
- ), b = [
3317
- ...m.flatMap(
3318
- (f) => {
3319
- const j = f.tags.map(($) => g.get($)).filter(Boolean);
3320
- return j.length === 0 ? [] : [
3321
- {
3322
- type: "category",
3323
- label: f.name,
3324
- items: j,
3325
- collapsible: !0,
3326
- collapsed: !e.options?.expandAllTags
3327
- }
3328
- ];
3329
- }
3330
- ),
3331
- ...Array.from(g.entries()).filter(([f]) => !y.has(f)).map(([, f]) => f)
3332
- ], O = h.schema.tags.find(
3333
- (f) => !f.name
3334
- )?.operations;
3335
- return O && b.push(
3336
- pt({
3337
- label: b.length === 0 ? "Endpoints" : "Other endpoints",
3338
- path: I(t, i, _e),
3339
- operations: O,
3340
- collapsed: !e.options?.expandAllTags
3341
- })
3342
- ), h.schema.components?.schemas?.length && b.push({
3343
- type: "link",
3344
- label: "Schemas",
3345
- to: I(t, i, "~schemas")
3346
- }), b;
3347
- } catch {
3348
- return [];
3349
- }
3350
- },
3351
- getRoutes: () => ma({ basePath: t, config: e, client: s })
3352
- };
3353
- };
3354
- export {
3355
- q as C,
3356
- _a as G,
3357
- zs as L,
3358
- Ua as O,
3359
- oa as P,
3360
- Ls as Q,
3361
- Dt as S,
3362
- x as T,
3363
- _e as U,
3364
- rr as a,
3365
- qt as b,
3366
- V as c,
3367
- tn as d,
3368
- vr as e,
3369
- Wt as f,
3370
- pr as g,
3371
- _r as h,
3372
- nr as i,
3373
- lt as j,
3374
- Va as k,
3375
- Fs as l,
3376
- Fe as m,
3377
- kt as n,
3378
- Ts as o,
3379
- tr as p,
3380
- Ce as q,
3381
- As as r,
3382
- L as s,
3383
- Ba as t,
3384
- ca as u,
3385
- Ds as v,
3386
- Es as w,
3387
- Lt as x,
3388
- nn as y,
3389
- Ma as z
3390
- };
3391
- //# sourceMappingURL=index-CvTWnHZF.js.map