zudoku 0.0.0-f36627bd → 0.0.0-f370c714

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 (963) hide show
  1. package/README.md +1 -1
  2. package/client.d.ts +8 -0
  3. package/dist/app/entry.server.js +14 -1
  4. package/dist/app/entry.server.js.map +1 -1
  5. package/dist/app/main.d.ts +91 -1
  6. package/dist/app/main.js +5 -1
  7. package/dist/app/main.js.map +1 -1
  8. package/dist/app/sentry.js +1 -1
  9. package/dist/cli/cli.d.ts +9 -0
  10. package/dist/cli/cli.js +4 -10
  11. package/dist/cli/cli.js.map +1 -1
  12. package/dist/cli/common/version-check.d.ts +2 -0
  13. package/dist/cli/common/version-check.js +58 -0
  14. package/dist/cli/common/version-check.js.map +1 -0
  15. package/dist/config/config.d.ts +15 -41
  16. package/dist/config/validators/BuildSchema.d.ts +15 -7
  17. package/dist/config/validators/BuildSchema.js +34 -2
  18. package/dist/config/validators/BuildSchema.js.map +1 -1
  19. package/dist/config/validators/InputNavigationSchema.d.ts +169 -85
  20. package/dist/config/validators/InputNavigationSchema.js +1 -0
  21. package/dist/config/validators/InputNavigationSchema.js.map +1 -1
  22. package/dist/config/validators/NavigationSchema.js +2 -4
  23. package/dist/config/validators/NavigationSchema.js.map +1 -1
  24. package/dist/config/validators/ProtectedRoutesSchema.d.ts +1 -1
  25. package/dist/config/validators/icon-types.d.ts +1 -1
  26. package/dist/config/validators/icon-types.js +20 -0
  27. package/dist/config/validators/icon-types.js.map +1 -1
  28. package/dist/config/validators/validate.d.ts +278 -25
  29. package/dist/config/validators/validate.js +75 -10
  30. package/dist/config/validators/validate.js.map +1 -1
  31. package/dist/config/validators/validate.test.js +43 -0
  32. package/dist/config/validators/validate.test.js.map +1 -1
  33. package/dist/flat-config.d.ts +60 -5
  34. package/dist/lib/assets/language-icons/c.d.ts +3 -0
  35. package/dist/lib/assets/language-icons/c.js +4 -0
  36. package/dist/lib/assets/language-icons/c.js.map +1 -0
  37. package/dist/lib/assets/language-icons/commonlisp.d.ts +3 -0
  38. package/dist/lib/assets/language-icons/commonlisp.js +4 -0
  39. package/dist/lib/assets/language-icons/commonlisp.js.map +1 -0
  40. package/dist/lib/assets/language-icons/cpp.d.ts +3 -0
  41. package/dist/lib/assets/language-icons/cpp.js +4 -0
  42. package/dist/lib/assets/language-icons/cpp.js.map +1 -0
  43. package/dist/lib/assets/language-icons/dart.d.ts +3 -0
  44. package/dist/lib/assets/language-icons/dart.js +4 -0
  45. package/dist/lib/assets/language-icons/dart.js.map +1 -0
  46. package/dist/lib/assets/language-icons/elixir.d.ts +3 -0
  47. package/dist/lib/assets/language-icons/elixir.js +4 -0
  48. package/dist/lib/assets/language-icons/elixir.js.map +1 -0
  49. package/dist/lib/assets/language-icons/ocaml.d.ts +3 -0
  50. package/dist/lib/assets/language-icons/ocaml.js +4 -0
  51. package/dist/lib/assets/language-icons/ocaml.js.map +1 -0
  52. package/dist/lib/assets/language-icons/powershell.d.ts +3 -0
  53. package/dist/lib/assets/language-icons/powershell.js +4 -0
  54. package/dist/lib/assets/language-icons/powershell.js.map +1 -0
  55. package/dist/lib/assets/language-icons/scala.d.ts +3 -0
  56. package/dist/lib/assets/language-icons/scala.js +4 -0
  57. package/dist/lib/assets/language-icons/scala.js.map +1 -0
  58. package/dist/lib/assets/language-icons/zig.d.ts +3 -0
  59. package/dist/lib/assets/language-icons/zig.js +4 -0
  60. package/dist/lib/assets/language-icons/zig.js.map +1 -0
  61. package/dist/lib/auth/issuer.js +3 -0
  62. package/dist/lib/auth/issuer.js.map +1 -1
  63. package/dist/lib/authentication/authentication.d.ts +19 -10
  64. package/dist/lib/authentication/components/OAuthErrorPage.js +1 -1
  65. package/dist/lib/authentication/components/OAuthErrorPage.js.map +1 -1
  66. package/dist/lib/authentication/components/SignIn.js +8 -5
  67. package/dist/lib/authentication/components/SignIn.js.map +1 -1
  68. package/dist/lib/authentication/components/SignOut.js +6 -6
  69. package/dist/lib/authentication/components/SignOut.js.map +1 -1
  70. package/dist/lib/authentication/components/SignUp.js +7 -5
  71. package/dist/lib/authentication/components/SignUp.js.map +1 -1
  72. package/dist/lib/authentication/hook.d.ts +5 -2
  73. package/dist/lib/authentication/hook.js +22 -8
  74. package/dist/lib/authentication/hook.js.map +1 -1
  75. package/dist/lib/authentication/providers/auth0.js +13 -4
  76. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  77. package/dist/lib/authentication/providers/azureb2c.d.ts +4 -4
  78. package/dist/lib/authentication/providers/azureb2c.js +3 -3
  79. package/dist/lib/authentication/providers/azureb2c.js.map +1 -1
  80. package/dist/lib/authentication/providers/clerk.js +2 -2
  81. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  82. package/dist/lib/authentication/providers/firebase.d.ts +4 -0
  83. package/dist/lib/authentication/providers/firebase.js +273 -0
  84. package/dist/lib/authentication/providers/firebase.js.map +1 -0
  85. package/dist/lib/authentication/providers/openid.d.ts +7 -7
  86. package/dist/lib/authentication/providers/openid.js +5 -3
  87. package/dist/lib/authentication/providers/openid.js.map +1 -1
  88. package/dist/lib/authentication/providers/supabase/SupabaseAuthUI.d.ts +8 -0
  89. package/dist/lib/authentication/providers/supabase/SupabaseAuthUI.js +39 -0
  90. package/dist/lib/authentication/providers/supabase/SupabaseAuthUI.js.map +1 -0
  91. package/dist/lib/authentication/providers/supabase.js +30 -31
  92. package/dist/lib/authentication/providers/supabase.js.map +1 -1
  93. package/dist/lib/authentication/state.d.ts +5 -7
  94. package/dist/lib/authentication/state.js +2 -14
  95. package/dist/lib/authentication/state.js.map +1 -1
  96. package/dist/lib/authentication/ui/EmailVerificationUi.d.ts +4 -0
  97. package/dist/lib/authentication/ui/EmailVerificationUi.js +34 -0
  98. package/dist/lib/authentication/ui/EmailVerificationUi.js.map +1 -0
  99. package/dist/lib/authentication/ui/ZudokuAuthUi.d.ts +29 -0
  100. package/dist/lib/authentication/ui/ZudokuAuthUi.js +160 -0
  101. package/dist/lib/authentication/ui/ZudokuAuthUi.js.map +1 -0
  102. package/dist/lib/authentication/ui/icons/Apple.d.ts +3 -0
  103. package/dist/lib/authentication/ui/icons/Apple.js +4 -0
  104. package/dist/lib/authentication/ui/icons/Apple.js.map +1 -0
  105. package/dist/lib/authentication/ui/icons/Facebook.d.ts +3 -0
  106. package/dist/lib/authentication/ui/icons/Facebook.js +4 -0
  107. package/dist/lib/authentication/ui/icons/Facebook.js.map +1 -0
  108. package/dist/lib/authentication/ui/icons/Github.d.ts +3 -0
  109. package/dist/lib/authentication/ui/icons/Github.js +4 -0
  110. package/dist/lib/authentication/ui/icons/Github.js.map +1 -0
  111. package/dist/lib/authentication/ui/icons/Google.d.ts +3 -0
  112. package/dist/lib/authentication/ui/icons/Google.js +4 -0
  113. package/dist/lib/authentication/ui/icons/Google.js.map +1 -0
  114. package/dist/lib/authentication/ui/icons/Microsoft.d.ts +3 -0
  115. package/dist/lib/authentication/ui/icons/Microsoft.js +4 -0
  116. package/dist/lib/authentication/ui/icons/Microsoft.js.map +1 -0
  117. package/dist/lib/authentication/ui/icons/X.d.ts +3 -0
  118. package/dist/lib/authentication/ui/icons/X.js +4 -0
  119. package/dist/lib/authentication/ui/icons/X.js.map +1 -0
  120. package/dist/lib/authentication/utils/relativeRedirectUrl.d.ts +1 -0
  121. package/dist/lib/authentication/utils/relativeRedirectUrl.js +8 -0
  122. package/dist/lib/authentication/utils/relativeRedirectUrl.js.map +1 -0
  123. package/dist/lib/components/Autocomplete.d.ts +3 -1
  124. package/dist/lib/components/Autocomplete.js +6 -2
  125. package/dist/lib/components/Autocomplete.js.map +1 -1
  126. package/dist/lib/components/BuildCheck.js +2 -2
  127. package/dist/lib/components/BuildCheck.js.map +1 -1
  128. package/dist/lib/components/Heading.d.ts +1 -1
  129. package/dist/lib/components/Heading.js +1 -5
  130. package/dist/lib/components/Heading.js.map +1 -1
  131. package/dist/lib/components/LanguageIcon.js +45 -0
  132. package/dist/lib/components/LanguageIcon.js.map +1 -1
  133. package/dist/lib/components/Layout.js +3 -2
  134. package/dist/lib/components/Layout.js.map +1 -1
  135. package/dist/lib/components/Main.js +1 -1
  136. package/dist/lib/components/Main.js.map +1 -1
  137. package/dist/lib/components/Mermaid.d.ts +7 -0
  138. package/dist/lib/components/Mermaid.js +42 -0
  139. package/dist/lib/components/Mermaid.js.map +1 -0
  140. package/dist/lib/components/PagefindSearchMeta.d.ts +8 -0
  141. package/dist/lib/components/PagefindSearchMeta.js +7 -0
  142. package/dist/lib/components/PagefindSearchMeta.js.map +1 -0
  143. package/dist/lib/components/Zudoku.js +5 -8
  144. package/dist/lib/components/Zudoku.js.map +1 -1
  145. package/dist/lib/components/cache.d.ts +3 -1
  146. package/dist/lib/components/cache.js +3 -5
  147. package/dist/lib/components/cache.js.map +1 -1
  148. package/dist/lib/components/context/ZudokuContext.js +10 -2
  149. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  150. package/dist/lib/components/index.d.ts +5 -4
  151. package/dist/lib/components/navigation/NavigationItem.js +3 -3
  152. package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
  153. package/dist/lib/components/navigation/Toc.js +1 -1
  154. package/dist/lib/components/navigation/Toc.js.map +1 -1
  155. package/dist/lib/core/RouteGuard.d.ts +1 -1
  156. package/dist/lib/core/RouteGuard.js +13 -21
  157. package/dist/lib/core/RouteGuard.js.map +1 -1
  158. package/dist/lib/core/ZudokuContext.d.ts +1 -0
  159. package/dist/lib/core/ZudokuContext.js +2 -0
  160. package/dist/lib/core/ZudokuContext.js.map +1 -1
  161. package/dist/lib/core/__internal.d.ts +1 -1
  162. package/dist/lib/core/plugins.d.ts +3 -3
  163. package/dist/lib/errors/ErrorAlert.js +1 -1
  164. package/dist/lib/errors/ErrorMessage.d.ts +3 -0
  165. package/dist/lib/errors/ErrorMessage.js +16 -0
  166. package/dist/lib/errors/ErrorMessage.js.map +1 -0
  167. package/dist/lib/errors/RouterError.d.ts +3 -1
  168. package/dist/lib/errors/RouterError.js +3 -2
  169. package/dist/lib/errors/RouterError.js.map +1 -1
  170. package/dist/lib/hooks/index.d.ts +5 -3
  171. package/dist/lib/oas/graphql/index.js +24 -3
  172. package/dist/lib/oas/graphql/index.js.map +1 -1
  173. package/dist/lib/oas/parser/index.d.ts +1 -0
  174. package/dist/lib/oas/parser/index.js +7 -3
  175. package/dist/lib/oas/parser/index.js.map +1 -1
  176. package/dist/lib/plugins/api-keys/ProtectedRoute.js +4 -1
  177. package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -1
  178. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +9 -172
  179. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  180. package/dist/lib/plugins/api-keys/index.d.ts +4 -1
  181. package/dist/lib/plugins/api-keys/index.js +21 -17
  182. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  183. package/dist/lib/plugins/api-keys/settings/ApiKeyItem.d.ts +12 -0
  184. package/dist/lib/plugins/api-keys/settings/ApiKeyItem.js +133 -0
  185. package/dist/lib/plugins/api-keys/settings/ApiKeyItem.js.map +1 -0
  186. package/dist/lib/plugins/api-keys/settings/ApiKeyList.d.ts +4 -0
  187. package/dist/lib/plugins/api-keys/settings/ApiKeyList.js +30 -0
  188. package/dist/lib/plugins/api-keys/settings/ApiKeyList.js.map +1 -0
  189. package/dist/lib/plugins/api-keys/settings/RevealApiKey.d.ts +6 -0
  190. package/dist/lib/plugins/api-keys/settings/RevealApiKey.js +39 -0
  191. package/dist/lib/plugins/api-keys/settings/RevealApiKey.js.map +1 -0
  192. package/dist/lib/plugins/markdown/MdxPage.d.ts +2 -1
  193. package/dist/lib/plugins/markdown/MdxPage.js +28 -4
  194. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  195. package/dist/lib/plugins/markdown/assets/ChatGPTLogo.d.ts +2 -0
  196. package/dist/lib/plugins/markdown/assets/ChatGPTLogo.js +3 -0
  197. package/dist/lib/plugins/markdown/assets/ChatGPTLogo.js.map +1 -0
  198. package/dist/lib/plugins/markdown/assets/ClaudeLogo.d.ts +2 -0
  199. package/dist/lib/plugins/markdown/assets/ClaudeLogo.js +3 -0
  200. package/dist/lib/plugins/markdown/assets/ClaudeLogo.js.map +1 -0
  201. package/dist/lib/plugins/markdown/index.d.ts +3 -1
  202. package/dist/lib/plugins/markdown/index.js +1 -1
  203. package/dist/lib/plugins/markdown/index.js.map +1 -1
  204. package/dist/lib/plugins/openapi/CollapsibleCode.d.ts +1 -0
  205. package/dist/lib/plugins/openapi/CollapsibleCode.js +2 -1
  206. package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -1
  207. package/dist/lib/plugins/openapi/DownloadSchemaButton.d.ts +3 -0
  208. package/dist/lib/plugins/openapi/DownloadSchemaButton.js +47 -0
  209. package/dist/lib/plugins/openapi/DownloadSchemaButton.js.map +1 -0
  210. package/dist/lib/plugins/openapi/Endpoint.js +3 -6
  211. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  212. package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.d.ts +5 -0
  213. package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js +10 -0
  214. package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js.map +1 -0
  215. package/dist/lib/plugins/openapi/MCPEndpoint.js +9 -18
  216. package/dist/lib/plugins/openapi/MCPEndpoint.js.map +1 -1
  217. package/dist/lib/plugins/openapi/OasProvider.js +22 -13
  218. package/dist/lib/plugins/openapi/OasProvider.js.map +1 -1
  219. package/dist/lib/plugins/openapi/OperationList.js +22 -7
  220. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  221. package/dist/lib/plugins/openapi/OperationListItem.d.ts +3 -2
  222. package/dist/lib/plugins/openapi/OperationListItem.js +8 -4
  223. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  224. package/dist/lib/plugins/openapi/ParamInfos.js +1 -0
  225. package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -1
  226. package/dist/lib/plugins/openapi/ParameterList.js +7 -4
  227. package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
  228. package/dist/lib/plugins/openapi/ParameterListItem.js +17 -6
  229. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  230. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +1 -3
  231. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
  232. package/dist/lib/plugins/openapi/RequestBodySidecarBox.d.ts +9 -2
  233. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +5 -2
  234. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  235. package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +4 -2
  236. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +26 -4
  237. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  238. package/dist/lib/plugins/openapi/SchemaList.js +2 -1
  239. package/dist/lib/plugins/openapi/SchemaList.js.map +1 -1
  240. package/dist/lib/plugins/openapi/Sidecar.d.ts +3 -2
  241. package/dist/lib/plugins/openapi/Sidecar.js +68 -35
  242. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  243. package/dist/lib/plugins/openapi/SidecarBox.js +4 -4
  244. package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
  245. package/dist/lib/plugins/openapi/SidecarExamples.d.ts +9 -2
  246. package/dist/lib/plugins/openapi/SidecarExamples.js +24 -43
  247. package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
  248. package/dist/lib/plugins/openapi/components/ConstValue.js +1 -1
  249. package/dist/lib/plugins/openapi/components/ConstValue.js.map +1 -1
  250. package/dist/lib/plugins/openapi/components/EnumValues.js +1 -1
  251. package/dist/lib/plugins/openapi/components/EnumValues.js.map +1 -1
  252. package/dist/lib/plugins/openapi/components/NonHighlightedCode.d.ts +4 -0
  253. package/dist/lib/plugins/openapi/components/NonHighlightedCode.js +5 -0
  254. package/dist/lib/plugins/openapi/components/NonHighlightedCode.js.map +1 -0
  255. package/dist/lib/plugins/openapi/components/ResponseContent.js +5 -6
  256. package/dist/lib/plugins/openapi/components/ResponseContent.js.map +1 -1
  257. package/dist/lib/plugins/openapi/graphql/fragment-masking.js.map +1 -1
  258. package/dist/lib/plugins/openapi/graphql/gql.d.ts +1 -1
  259. package/dist/lib/plugins/openapi/graphql/gql.js +2 -1
  260. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  261. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +8 -2
  262. package/dist/lib/plugins/openapi/graphql/graphql.js +8 -0
  263. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  264. package/dist/lib/plugins/openapi/index.js +16 -15
  265. package/dist/lib/plugins/openapi/index.js.map +1 -1
  266. package/dist/lib/plugins/openapi/interfaces.d.ts +30 -13
  267. package/dist/lib/plugins/openapi/playground/BodyPanel.js +67 -15
  268. package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -1
  269. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +2 -2
  270. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -1
  271. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +1 -1
  272. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
  273. package/dist/lib/plugins/openapi/playground/Headers.js +23 -83
  274. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  275. package/dist/lib/plugins/openapi/playground/ParamsGrid.d.ts +10 -2
  276. package/dist/lib/plugins/openapi/playground/ParamsGrid.js +8 -1
  277. package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -1
  278. package/dist/lib/plugins/openapi/playground/PathParams.js +2 -3
  279. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  280. package/dist/lib/plugins/openapi/playground/Playground.d.ts +7 -0
  281. package/dist/lib/plugins/openapi/playground/Playground.js +71 -29
  282. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  283. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +5 -2
  284. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  285. package/dist/lib/plugins/openapi/playground/QueryParams.js +16 -40
  286. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  287. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.d.ts +2 -1
  288. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js +10 -2
  289. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js.map +1 -1
  290. package/dist/lib/plugins/openapi/playground/rememberedIdentity.d.ts +5 -3
  291. package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.d.ts +8 -0
  292. package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.js +19 -0
  293. package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.js.map +1 -0
  294. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js +1 -1
  295. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js.map +1 -1
  296. package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.d.ts +1 -0
  297. package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.js +540 -0
  298. package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.js.map +1 -0
  299. package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.d.ts +40 -0
  300. package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.js +205 -0
  301. package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.js.map +1 -0
  302. package/dist/lib/plugins/openapi/playground/result-panel/Highlight.d.ts +1 -1
  303. package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js +1 -1
  304. package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js.map +1 -1
  305. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +33 -19
  306. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
  307. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +1 -1
  308. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
  309. package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.d.ts +5 -3
  310. package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js +2 -0
  311. package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js.map +1 -1
  312. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +1 -1
  313. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -1
  314. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +17 -8
  315. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
  316. package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +1 -1
  317. package/dist/lib/plugins/openapi/schema/SchemaView.js +31 -16
  318. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  319. package/dist/lib/plugins/openapi/schema/UnionView.js +2 -5
  320. package/dist/lib/plugins/openapi/schema/UnionView.js.map +1 -1
  321. package/dist/lib/plugins/openapi/schema/union-helpers.js +0 -1
  322. package/dist/lib/plugins/openapi/schema/union-helpers.js.map +1 -1
  323. package/dist/lib/plugins/openapi/schema/utils.d.ts +2 -2
  324. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  325. package/dist/lib/plugins/openapi/state.d.ts +5 -3
  326. package/dist/lib/plugins/openapi/util/createHttpSnippet.js +24 -1
  327. package/dist/lib/plugins/openapi/util/createHttpSnippet.js.map +1 -1
  328. package/dist/lib/plugins/openapi/util/generateSchemaExample.js +9 -11
  329. package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
  330. package/dist/lib/plugins/openapi/util/getRoutes.d.ts +6 -1
  331. package/dist/lib/plugins/openapi/util/getRoutes.js +29 -2
  332. package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
  333. package/dist/lib/plugins/search-pagefind/IndexingDialog.d.ts +3 -0
  334. package/dist/lib/plugins/search-pagefind/IndexingDialog.js +64 -0
  335. package/dist/lib/plugins/search-pagefind/IndexingDialog.js.map +1 -0
  336. package/dist/lib/plugins/search-pagefind/PagefindSearch.js +22 -5
  337. package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
  338. package/dist/lib/plugins/search-pagefind/ResultList.js +5 -4
  339. package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
  340. package/dist/lib/shiki.d.ts +2 -2
  341. package/dist/lib/shiki.js +40 -14
  342. package/dist/lib/shiki.js.map +1 -1
  343. package/dist/lib/ui/Badge.d.ts +3 -3
  344. package/dist/lib/ui/Badge.js +9 -7
  345. package/dist/lib/ui/Badge.js.map +1 -1
  346. package/dist/lib/ui/Button.d.ts +2 -2
  347. package/dist/lib/ui/Button.js +10 -8
  348. package/dist/lib/ui/Button.js.map +1 -1
  349. package/dist/lib/ui/ButtonGroup.d.ts +11 -0
  350. package/dist/lib/ui/ButtonGroup.js +28 -0
  351. package/dist/lib/ui/ButtonGroup.js.map +1 -0
  352. package/dist/lib/ui/Callout.d.ts +5 -5
  353. package/dist/lib/ui/Callout.js +5 -5
  354. package/dist/lib/ui/Callout.js.map +1 -1
  355. package/dist/lib/ui/Carousel.js.map +1 -1
  356. package/dist/lib/ui/Checkbox.d.ts +2 -2
  357. package/dist/lib/ui/Checkbox.js +4 -4
  358. package/dist/lib/ui/Checkbox.js.map +1 -1
  359. package/dist/lib/ui/CodeBlock.d.ts +0 -1
  360. package/dist/lib/ui/CodeBlock.js +1 -1
  361. package/dist/lib/ui/CodeBlock.js.map +1 -1
  362. package/dist/lib/ui/Collapsible.d.ts +4 -4
  363. package/dist/lib/ui/Collapsible.js +11 -4
  364. package/dist/lib/ui/Collapsible.js.map +1 -1
  365. package/dist/lib/ui/Command.d.ts +3 -3
  366. package/dist/lib/ui/Command.js +2 -2
  367. package/dist/lib/ui/Command.js.map +1 -1
  368. package/dist/lib/ui/Dialog.d.ts +12 -18
  369. package/dist/lib/ui/Dialog.js +30 -17
  370. package/dist/lib/ui/Dialog.js.map +1 -1
  371. package/dist/lib/ui/DropdownMenu.d.ts +21 -23
  372. package/dist/lib/ui/DropdownMenu.js +47 -32
  373. package/dist/lib/ui/DropdownMenu.js.map +1 -1
  374. package/dist/lib/ui/EmbeddedCodeBlock.d.ts +3 -2
  375. package/dist/lib/ui/EmbeddedCodeBlock.js +4 -3
  376. package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
  377. package/dist/lib/ui/Frame.d.ts +8 -0
  378. package/dist/lib/ui/Frame.js +22 -0
  379. package/dist/lib/ui/Frame.js.map +1 -0
  380. package/dist/lib/ui/Item.d.ts +23 -0
  381. package/dist/lib/ui/Item.js +67 -0
  382. package/dist/lib/ui/Item.js.map +1 -0
  383. package/dist/lib/ui/Kbd.d.ts +3 -0
  384. package/dist/lib/ui/Kbd.js +10 -0
  385. package/dist/lib/ui/Kbd.js.map +1 -0
  386. package/dist/lib/ui/NativeSelect.d.ts +5 -0
  387. package/dist/lib/ui/NativeSelect.js +14 -0
  388. package/dist/lib/ui/NativeSelect.js.map +1 -0
  389. package/dist/lib/ui/ReactComponentDoc.d.ts +1 -1
  390. package/dist/lib/ui/ReactComponentDoc.js +2 -2
  391. package/dist/lib/ui/ReactComponentDoc.js.map +1 -1
  392. package/dist/lib/ui/Secret.d.ts +6 -0
  393. package/dist/lib/ui/Secret.js +7 -4
  394. package/dist/lib/ui/Secret.js.map +1 -1
  395. package/dist/lib/ui/Select.d.ts +13 -11
  396. package/dist/lib/ui/Select.js +34 -23
  397. package/dist/lib/ui/Select.js.map +1 -1
  398. package/dist/lib/ui/Separator.d.ts +4 -0
  399. package/dist/lib/ui/Separator.js +8 -0
  400. package/dist/lib/ui/Separator.js.map +1 -0
  401. package/dist/lib/ui/SyntaxHighlight.d.ts +1 -0
  402. package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
  403. package/dist/lib/ui/Tooltip.d.ts +7 -7
  404. package/dist/lib/ui/Tooltip.js +16 -10
  405. package/dist/lib/ui/Tooltip.js.map +1 -1
  406. package/dist/lib/util/MdxComponents.d.ts +3 -1
  407. package/dist/lib/util/MdxComponents.js +5 -2
  408. package/dist/lib/util/MdxComponents.js.map +1 -1
  409. package/dist/lib/util/createVariantComponent.d.ts +5 -2
  410. package/dist/lib/util/createVariantComponent.js +5 -2
  411. package/dist/lib/util/createVariantComponent.js.map +1 -1
  412. package/dist/lib/util/flattenAllOf.d.ts +4 -0
  413. package/dist/lib/util/flattenAllOf.js +88 -0
  414. package/dist/lib/util/flattenAllOf.js.map +1 -0
  415. package/dist/lib/util/flattenAllOf.test.d.ts +1 -0
  416. package/dist/lib/util/flattenAllOf.test.js +587 -0
  417. package/dist/lib/util/flattenAllOf.test.js.map +1 -0
  418. package/dist/lib/util/pastellize.js +4 -4
  419. package/dist/lib/util/pastellize.js.map +1 -1
  420. package/dist/lib/util/readFrontmatter.d.ts +6 -0
  421. package/dist/lib/util/readFrontmatter.js +12 -0
  422. package/dist/lib/util/readFrontmatter.js.map +1 -0
  423. package/dist/lib/util/syncZustandState.d.ts +5 -0
  424. package/dist/lib/util/syncZustandState.js +14 -0
  425. package/dist/lib/util/syncZustandState.js.map +1 -0
  426. package/dist/vite/api/SchemaManager.d.ts +8 -1
  427. package/dist/vite/api/SchemaManager.js +52 -21
  428. package/dist/vite/api/SchemaManager.js.map +1 -1
  429. package/dist/vite/api/SchemaManager.test.js +69 -2
  430. package/dist/vite/api/SchemaManager.test.js.map +1 -1
  431. package/dist/vite/config.js +11 -1
  432. package/dist/vite/config.js.map +1 -1
  433. package/dist/vite/dev-server.js +25 -0
  434. package/dist/vite/dev-server.js.map +1 -1
  435. package/dist/vite/llms.d.ts +12 -0
  436. package/dist/vite/llms.js +66 -0
  437. package/dist/vite/llms.js.map +1 -0
  438. package/dist/vite/mdx/remark-last-modified.js +57 -3
  439. package/dist/vite/mdx/remark-last-modified.js.map +1 -1
  440. package/dist/vite/pagefind-dev-index.d.ts +16 -0
  441. package/dist/vite/pagefind-dev-index.js +68 -0
  442. package/dist/vite/pagefind-dev-index.js.map +1 -0
  443. package/dist/vite/plugin-api-keys.js +4 -1
  444. package/dist/vite/plugin-api-keys.js.map +1 -1
  445. package/dist/vite/plugin-api.js +58 -19
  446. package/dist/vite/plugin-api.js.map +1 -1
  447. package/dist/vite/plugin-docs.d.ts +9 -0
  448. package/dist/vite/plugin-docs.js +68 -49
  449. package/dist/vite/plugin-docs.js.map +1 -1
  450. package/dist/vite/plugin-frontmatter.js +3 -5
  451. package/dist/vite/plugin-frontmatter.js.map +1 -1
  452. package/dist/vite/plugin-markdown-export.d.ts +21 -0
  453. package/dist/vite/plugin-markdown-export.js +140 -0
  454. package/dist/vite/plugin-markdown-export.js.map +1 -0
  455. package/dist/vite/plugin-mdx.d.ts +1 -1
  456. package/dist/vite/plugin-mdx.js +39 -29
  457. package/dist/vite/plugin-mdx.js.map +1 -1
  458. package/dist/vite/plugin-navigation.js +4 -0
  459. package/dist/vite/plugin-navigation.js.map +1 -1
  460. package/dist/vite/plugin-theme.js +10 -1
  461. package/dist/vite/plugin-theme.js.map +1 -1
  462. package/dist/vite/plugin.js +2 -0
  463. package/dist/vite/plugin.js.map +1 -1
  464. package/dist/vite/prerender/prerender.js +38 -23
  465. package/dist/vite/prerender/prerender.js.map +1 -1
  466. package/dist/vite/prerender/utils.d.ts +2 -0
  467. package/dist/vite/prerender/utils.js +24 -0
  468. package/dist/vite/prerender/utils.js.map +1 -0
  469. package/dist/vite/prerender/worker.js +3 -0
  470. package/dist/vite/prerender/worker.js.map +1 -1
  471. package/dist/vite/zuplo.d.ts +13 -0
  472. package/dist/vite/zuplo.js +15 -0
  473. package/dist/vite/zuplo.js.map +1 -0
  474. package/lib/ActionButton-BSM2oNHF.js +25 -0
  475. package/lib/ActionButton-BSM2oNHF.js.map +1 -0
  476. package/lib/Button-IOAeVaIH.js +54 -0
  477. package/lib/Button-IOAeVaIH.js.map +1 -0
  478. package/lib/{Card-hTy9PAnh.js → Card-KFniaZn5.js} +2 -2
  479. package/lib/{Card-hTy9PAnh.js.map → Card-KFniaZn5.js.map} +1 -1
  480. package/lib/{CategoryHeading-BGCNu3VK.js → CategoryHeading-DhmodDcq.js} +2 -2
  481. package/lib/{CategoryHeading-BGCNu3VK.js.map → CategoryHeading-DhmodDcq.js.map} +1 -1
  482. package/lib/ClaudeLogo-DgjivS8A.js +69 -0
  483. package/lib/ClaudeLogo-DgjivS8A.js.map +1 -0
  484. package/lib/{Command-TEBTONf1.js → Command-BpT1iBE6.js} +26 -26
  485. package/lib/Command-BpT1iBE6.js.map +1 -0
  486. package/lib/Dialog-BQciPiHN.js +144 -0
  487. package/lib/Dialog-BQciPiHN.js.map +1 -0
  488. package/lib/{Drawer-DM9wJUC6.js → Drawer-BRMcpfuF.js} +7 -7
  489. package/lib/Drawer-BRMcpfuF.js.map +1 -0
  490. package/lib/DropdownMenu-C8SX_-S_.js +104 -0
  491. package/lib/DropdownMenu-C8SX_-S_.js.map +1 -0
  492. package/lib/Frame-DxlznfVd.js +205 -0
  493. package/lib/Frame-DxlznfVd.js.map +1 -0
  494. package/lib/IndexingDialog-DZWj_3cU.js +100 -0
  495. package/lib/IndexingDialog-DZWj_3cU.js.map +1 -0
  496. package/lib/Input-D-kqEQ5M.js +115 -0
  497. package/lib/Input-D-kqEQ5M.js.map +1 -0
  498. package/lib/MdxPage-BL-HbZrv.js +210 -0
  499. package/lib/MdxPage-BL-HbZrv.js.map +1 -0
  500. package/lib/Mermaid-BjSczjLW.js +102 -0
  501. package/lib/Mermaid-BjSczjLW.js.map +1 -0
  502. package/lib/{OAuthErrorPage-BbI9XJWR.js → OAuthErrorPage-DQtg28Go.js} +22 -23
  503. package/lib/{OAuthErrorPage-BbI9XJWR.js.map → OAuthErrorPage-DQtg28Go.js.map} +1 -1
  504. package/lib/OasProvider--qcZwrKS.js +40 -0
  505. package/lib/OasProvider--qcZwrKS.js.map +1 -0
  506. package/lib/OperationList-CSJYzxQY.js +5819 -0
  507. package/lib/OperationList-CSJYzxQY.js.map +1 -0
  508. package/lib/RouteGuard-D0f743SM.js +77 -0
  509. package/lib/RouteGuard-D0f743SM.js.map +1 -0
  510. package/lib/{SchemaList-BcJyi2sR.js → SchemaList-DtyuDrQA.js} +30 -29
  511. package/lib/SchemaList-DtyuDrQA.js.map +1 -0
  512. package/lib/SchemaView-G-SVXxAG.js +435 -0
  513. package/lib/SchemaView-G-SVXxAG.js.map +1 -0
  514. package/lib/Secret-BxGpIhDP.js +243 -0
  515. package/lib/Secret-BxGpIhDP.js.map +1 -0
  516. package/lib/Separator-CTPSeW1S.js +27 -0
  517. package/lib/Separator-CTPSeW1S.js.map +1 -0
  518. package/lib/SignUp-CDl7bQj3.js +50 -0
  519. package/lib/SignUp-CDl7bQj3.js.map +1 -0
  520. package/lib/{Spinner-Cf6E803I.js → Spinner-CI6bRyZw.js} +2 -2
  521. package/lib/{Spinner-Cf6E803I.js.map → Spinner-CI6bRyZw.js.map} +1 -1
  522. package/lib/{SyntaxHighlight-Cqh6cwC3.js → SyntaxHighlight-Dgd0AaaX.js} +1585 -1492
  523. package/lib/SyntaxHighlight-Dgd0AaaX.js.map +1 -0
  524. package/lib/{Toc-Zzozy3eB.js → Toc-D_Rj4jVx.js} +6 -6
  525. package/lib/Toc-D_Rj4jVx.js.map +1 -0
  526. package/lib/ZudokuContext-DNHMZfcP.js +1508 -0
  527. package/lib/ZudokuContext-DNHMZfcP.js.map +1 -0
  528. package/lib/___vite-browser-external_commonjs-proxy-Cga3HsWk.js +9 -0
  529. package/lib/___vite-browser-external_commonjs-proxy-Cga3HsWk.js.map +1 -0
  530. package/lib/c-B-NUhs61.js +46 -0
  531. package/lib/c-B-NUhs61.js.map +1 -0
  532. package/lib/chunk-PVWAREVJ-ClM0m2aJ.js +7965 -0
  533. package/lib/chunk-PVWAREVJ-ClM0m2aJ.js.map +1 -0
  534. package/lib/{circular-CokAagii.js → circular-BxODTa7z.js} +6365 -5958
  535. package/lib/circular-BxODTa7z.js.map +1 -0
  536. package/lib/commonlisp-De080z23.js +28 -0
  537. package/lib/commonlisp-De080z23.js.map +1 -0
  538. package/lib/cpp-79Paht7T.js +53 -0
  539. package/lib/cpp-79Paht7T.js.map +1 -0
  540. package/lib/createServer-BpreIXp6.js +16693 -0
  541. package/lib/createServer-BpreIXp6.js.map +1 -0
  542. package/lib/createVariantComponent-CQVt-H3r.js +18 -0
  543. package/lib/createVariantComponent-CQVt-H3r.js.map +1 -0
  544. package/lib/{csharp-rrJEDRrV.js → csharp-D8MIL50B.js} +2 -2
  545. package/lib/{csharp-rrJEDRrV.js.map → csharp-D8MIL50B.js.map} +1 -1
  546. package/lib/{css-Dpk9bCql.js → css-Bt6hr1td.js} +2 -2
  547. package/lib/{css-Dpk9bCql.js.map → css-Bt6hr1td.js.map} +1 -1
  548. package/lib/dart-B0vy1jWB.js +60 -0
  549. package/lib/dart-B0vy1jWB.js.map +1 -0
  550. package/lib/elixir-Ds8r0sF8.js +25 -0
  551. package/lib/elixir-Ds8r0sF8.js.map +1 -0
  552. package/lib/{errors-CQLQ5016.js → errors-DliW1dED.js} +4 -4
  553. package/lib/{errors-CQLQ5016.js.map → errors-DliW1dED.js.map} +1 -1
  554. package/lib/firebase-D4tbaCYB.js +7612 -0
  555. package/lib/firebase-D4tbaCYB.js.map +1 -0
  556. package/lib/{go-D8SJIQ0Z.js → go-D2VsmIOS.js} +2 -2
  557. package/lib/{go-D8SJIQ0Z.js.map → go-D2VsmIOS.js.map} +1 -1
  558. package/lib/{graphql-aeVKJNa2.js → graphql-BtA6M4m5.js} +2 -2
  559. package/lib/{graphql-aeVKJNa2.js.map → graphql-BtA6M4m5.js.map} +1 -1
  560. package/lib/hook-CHw_R_xu.js +52 -0
  561. package/lib/hook-CHw_R_xu.js.map +1 -0
  562. package/lib/{html-D_7om-nA.js → html-MGnI2uzP.js} +2 -2
  563. package/lib/{html-D_7om-nA.js.map → html-MGnI2uzP.js.map} +1 -1
  564. package/lib/{index-CF3Ls1wd.js → index-1TbL0HXQ.js} +166 -50
  565. package/lib/index-1TbL0HXQ.js.map +1 -0
  566. package/lib/index-9MxNUgg4.js +3675 -0
  567. package/lib/index-9MxNUgg4.js.map +1 -0
  568. package/lib/{ErrorAlert-Diu_w5Po.js → index-CboxZOVW.js} +5432 -4439
  569. package/lib/index-CboxZOVW.js.map +1 -0
  570. package/lib/index-CrcNWbel.js.map +1 -1
  571. package/lib/index-DXXZDuSJ.js +133 -0
  572. package/lib/index-DXXZDuSJ.js.map +1 -0
  573. package/lib/index.esm-BYObtETB.js +1294 -0
  574. package/lib/index.esm-BYObtETB.js.map +1 -0
  575. package/lib/{index.esm-BnYHxCYC.js → index.esm-DtzT_KoE.js} +20 -20
  576. package/lib/{index.esm-BnYHxCYC.js.map → index.esm-DtzT_KoE.js.map} +1 -1
  577. package/lib/index.esm-ti5zvZS_.js +34 -0
  578. package/lib/index.esm-ti5zvZS_.js.map +1 -0
  579. package/lib/{invariant-Bm-FVUQE.js → invariant-CGOLuIIz.js} +3 -3
  580. package/lib/{invariant-Bm-FVUQE.js.map → invariant-CGOLuIIz.js.map} +1 -1
  581. package/lib/{java-DUh-EL8n.js → java-CVLzHfb1.js} +2 -2
  582. package/lib/{java-DUh-EL8n.js.map → java-CVLzHfb1.js.map} +1 -1
  583. package/lib/{javascript-CrY8dcGu.js → javascript-CcmIpL4G.js} +2 -2
  584. package/lib/{javascript-CrY8dcGu.js.map → javascript-CcmIpL4G.js.map} +1 -1
  585. package/lib/{json-DLK2_sdf.js → json-4AyP4uiY.js} +2 -2
  586. package/lib/{json-DLK2_sdf.js.map → json-4AyP4uiY.js.map} +1 -1
  587. package/lib/{jsx-runtime-DywqP_6a.js → jsx-runtime-BzflLqGi.js} +109 -111
  588. package/lib/jsx-runtime-BzflLqGi.js.map +1 -0
  589. package/lib/{kotlin-rJMOGl7D.js → kotlin-v2plddBQ.js} +2 -2
  590. package/lib/{kotlin-rJMOGl7D.js.map → kotlin-v2plddBQ.js.map} +1 -1
  591. package/lib/{markdown-BD9bIU5J.js → markdown-DYGWCmGQ.js} +2 -2
  592. package/lib/{markdown-BD9bIU5J.js.map → markdown-DYGWCmGQ.js.map} +1 -1
  593. package/lib/{mdx-G25UCvf3.js → mdx-CHwYvXd4.js} +2 -2
  594. package/lib/{mdx-G25UCvf3.js.map → mdx-CHwYvXd4.js.map} +1 -1
  595. package/lib/{mutation-DvBlWyBr.js → mutation-DMHWqmFp.js} +2 -2
  596. package/lib/{mutation-DvBlWyBr.js.map → mutation-DMHWqmFp.js.map} +1 -1
  597. package/lib/{objectivec-DDpj0aWX.js → objectivec-HZY8shkd.js} +2 -2
  598. package/lib/{objectivec-DDpj0aWX.js.map → objectivec-HZY8shkd.js.map} +1 -1
  599. package/lib/ocaml-DqsdDdwb.js +52 -0
  600. package/lib/ocaml-DqsdDdwb.js.map +1 -0
  601. package/lib/{php-BeG18bSy.js → php-rQXzo7K_.js} +2 -2
  602. package/lib/{php-BeG18bSy.js.map → php-rQXzo7K_.js.map} +1 -1
  603. package/lib/powershell-CQje9pm1.js +39 -0
  604. package/lib/powershell-CQje9pm1.js.map +1 -0
  605. package/lib/{python-BaF2byD-.js → python-QIQAE5Ei.js} +2 -2
  606. package/lib/{python-BaF2byD-.js.map → python-QIQAE5Ei.js.map} +1 -1
  607. package/lib/{react-CQvDN20M.js → react-DHpVpxRv.js} +2 -2
  608. package/lib/{react-CQvDN20M.js.map → react-DHpVpxRv.js.map} +1 -1
  609. package/lib/{ruby-CmxRVHMR.js → ruby-B2dU8Ny5.js} +2 -2
  610. package/lib/{ruby-CmxRVHMR.js.map → ruby-B2dU8Ny5.js.map} +1 -1
  611. package/lib/{rust-IfSC62c5.js → rust-DYnLHAi2.js} +2 -2
  612. package/lib/{rust-IfSC62c5.js.map → rust-DYnLHAi2.js.map} +1 -1
  613. package/lib/scala-CeKInBR8.js +25 -0
  614. package/lib/scala-CeKInBR8.js.map +1 -0
  615. package/lib/{shell-BFu0M6m4.js → shell-HUv9oVtp.js} +2 -2
  616. package/lib/{shell-BFu0M6m4.js.map → shell-HUv9oVtp.js.map} +1 -1
  617. package/lib/{swift-DckbsN4v.js → swift-B4z6ig1Z.js} +2 -2
  618. package/lib/{swift-DckbsN4v.js.map → swift-B4z6ig1Z.js.map} +1 -1
  619. package/lib/{toml-BJsCc8TC.js → toml-Co9mpdct.js} +2 -2
  620. package/lib/{toml-BJsCc8TC.js.map → toml-Co9mpdct.js.map} +1 -1
  621. package/lib/{typescript-7qOVMjOC.js → typescript-C26xdBDC.js} +2 -2
  622. package/lib/{typescript-7qOVMjOC.js.map → typescript-C26xdBDC.js.map} +1 -1
  623. package/lib/ui/Accordion.js +1 -1
  624. package/lib/ui/ActionButton.js +3 -3
  625. package/lib/ui/Alert.js +1 -1
  626. package/lib/ui/AlertDialog.js +1 -1
  627. package/lib/ui/Badge.js +28 -14
  628. package/lib/ui/Badge.js.map +1 -1
  629. package/lib/ui/Breadcrumb.js +1 -1
  630. package/lib/ui/Button.js +28 -25
  631. package/lib/ui/Button.js.map +1 -1
  632. package/lib/ui/ButtonGroup.js +77 -0
  633. package/lib/ui/ButtonGroup.js.map +1 -0
  634. package/lib/ui/Callout.js +19 -19
  635. package/lib/ui/Callout.js.map +1 -1
  636. package/lib/ui/Card.js +1 -1
  637. package/lib/ui/Carousel.js +1 -1
  638. package/lib/ui/Carousel.js.map +1 -1
  639. package/lib/ui/Checkbox.js +29 -26
  640. package/lib/ui/Checkbox.js.map +1 -1
  641. package/lib/ui/CodeBlock.js +217 -7
  642. package/lib/ui/CodeBlock.js.map +1 -1
  643. package/lib/ui/Collapsible.js +32 -5
  644. package/lib/ui/Collapsible.js.map +1 -1
  645. package/lib/ui/Command.js +5 -5
  646. package/lib/ui/Command.js.map +1 -1
  647. package/lib/ui/Dialog.js +135 -105
  648. package/lib/ui/Dialog.js.map +1 -1
  649. package/lib/ui/Drawer.js +3 -3
  650. package/lib/ui/DropdownMenu.js +227 -140
  651. package/lib/ui/DropdownMenu.js.map +1 -1
  652. package/lib/ui/EmbeddedCodeBlock.js +36 -32
  653. package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
  654. package/lib/ui/Form.js +2 -2
  655. package/lib/ui/Frame.js +81 -0
  656. package/lib/ui/Frame.js.map +1 -0
  657. package/lib/ui/HoverCard.js +1 -1
  658. package/lib/ui/Input.js +1 -1
  659. package/lib/ui/Item.js +188 -0
  660. package/lib/ui/Item.js.map +1 -0
  661. package/lib/ui/Kbd.js +32 -0
  662. package/lib/ui/Kbd.js.map +1 -0
  663. package/lib/ui/Label.js +1 -1
  664. package/lib/ui/NativeSelect.js +57 -0
  665. package/lib/ui/NativeSelect.js.map +1 -0
  666. package/lib/ui/Pagination.js +1 -1
  667. package/lib/ui/Popover.js +1 -1
  668. package/lib/ui/Progress.js +1 -1
  669. package/lib/ui/RadioGroup.js +1 -1
  670. package/lib/ui/ReactComponentDoc.js +14 -14
  671. package/lib/ui/ReactComponentDoc.js.map +1 -1
  672. package/lib/ui/ScrollArea.js +1 -1
  673. package/lib/ui/Secret.js +64 -54
  674. package/lib/ui/Secret.js.map +1 -1
  675. package/lib/ui/Select.js +166 -116
  676. package/lib/ui/Select.js.map +1 -1
  677. package/lib/ui/Separator.js +27 -0
  678. package/lib/ui/Separator.js.map +1 -0
  679. package/lib/ui/Skeleton.js +1 -1
  680. package/lib/ui/Slider.js +1 -1
  681. package/lib/ui/Stepper.js +1 -1
  682. package/lib/ui/Switch.js +1 -1
  683. package/lib/ui/SyntaxHighlight.js +5 -5
  684. package/lib/ui/Tabs.js +11 -11
  685. package/lib/ui/Textarea.js +1 -1
  686. package/lib/ui/Toggle.js +1 -1
  687. package/lib/ui/ToggleGroup.js +1 -1
  688. package/lib/ui/Tooltip.js +55 -28
  689. package/lib/ui/Tooltip.js.map +1 -1
  690. package/lib/ui/Value.js +1 -1
  691. package/lib/{xml-DAaTIkBX.js → xml-BQOOC04j.js} +2 -2
  692. package/lib/{xml-DAaTIkBX.js.map → xml-BQOOC04j.js.map} +1 -1
  693. package/lib/{yaml-DUi-dbfu.js → yaml-BGsJItKv.js} +2 -2
  694. package/lib/{yaml-DUi-dbfu.js.map → yaml-BGsJItKv.js.map} +1 -1
  695. package/lib/zig-CUV2sTct.js +35 -0
  696. package/lib/zig-CUV2sTct.js.map +1 -0
  697. package/lib/zudoku.__internal.js +1082 -951
  698. package/lib/zudoku.__internal.js.map +1 -1
  699. package/lib/zudoku.auth-auth0.js +24 -23
  700. package/lib/zudoku.auth-auth0.js.map +1 -1
  701. package/lib/zudoku.auth-azureb2c.js +34 -35
  702. package/lib/zudoku.auth-azureb2c.js.map +1 -1
  703. package/lib/zudoku.auth-clerk.js +41 -41
  704. package/lib/zudoku.auth-clerk.js.map +1 -1
  705. package/lib/zudoku.auth-firebase.js +10 -0
  706. package/lib/zudoku.auth-firebase.js.map +1 -0
  707. package/lib/zudoku.auth-openid.js +105 -109
  708. package/lib/zudoku.auth-openid.js.map +1 -1
  709. package/lib/zudoku.auth-supabase.js +108 -52
  710. package/lib/zudoku.auth-supabase.js.map +1 -1
  711. package/lib/zudoku.components.js +22 -23
  712. package/lib/zudoku.components.js.map +1 -1
  713. package/lib/zudoku.hooks.js +11 -24
  714. package/lib/zudoku.hooks.js.map +1 -1
  715. package/lib/zudoku.icons.js +1 -1
  716. package/lib/zudoku.mermaid.js +10 -0
  717. package/lib/zudoku.mermaid.js.map +1 -0
  718. package/lib/zudoku.plugin-api-catalog.js +31 -33
  719. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  720. package/lib/zudoku.plugin-api-keys.js +573 -615
  721. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  722. package/lib/zudoku.plugin-custom-pages.js +1 -1
  723. package/lib/zudoku.plugin-markdown.js +10 -9
  724. package/lib/zudoku.plugin-markdown.js.map +1 -1
  725. package/lib/zudoku.plugin-openapi.js +7 -8
  726. package/lib/zudoku.plugin-openapi.js.map +1 -1
  727. package/lib/zudoku.plugin-redirect.js +3 -3
  728. package/lib/zudoku.plugin-search-inkeep.js +1 -1
  729. package/lib/zudoku.plugin-search-pagefind.js +185 -228
  730. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  731. package/lib/zudoku.plugins.js.map +1 -1
  732. package/lib/zudoku.router.js +2502 -118
  733. package/lib/zudoku.router.js.map +1 -1
  734. package/package.json +94 -66
  735. package/src/app/entry.server.tsx +16 -6
  736. package/src/app/main.css +61 -9
  737. package/src/app/main.tsx +5 -1
  738. package/src/app/sentry.ts +1 -1
  739. package/src/lib/assets/language-icons/c.tsx +31 -0
  740. package/src/lib/assets/language-icons/commonlisp.tsx +22 -0
  741. package/src/lib/assets/language-icons/cpp.tsx +35 -0
  742. package/src/lib/assets/language-icons/dart.tsx +39 -0
  743. package/src/lib/assets/language-icons/elixir.tsx +19 -0
  744. package/src/lib/assets/language-icons/ocaml.tsx +34 -0
  745. package/src/lib/assets/language-icons/powershell.tsx +27 -0
  746. package/src/lib/assets/language-icons/scala.tsx +19 -0
  747. package/src/lib/assets/language-icons/zig.tsx +32 -0
  748. package/src/lib/auth/issuer.ts +3 -0
  749. package/src/lib/authentication/authentication.ts +29 -5
  750. package/src/lib/authentication/components/OAuthErrorPage.tsx +1 -1
  751. package/src/lib/authentication/components/SignIn.tsx +10 -5
  752. package/src/lib/authentication/components/SignOut.tsx +7 -6
  753. package/src/lib/authentication/components/SignUp.tsx +8 -8
  754. package/src/lib/authentication/hook.ts +37 -10
  755. package/src/lib/authentication/providers/auth0.tsx +14 -4
  756. package/src/lib/authentication/providers/azureb2c.tsx +10 -3
  757. package/src/lib/authentication/providers/clerk.tsx +9 -2
  758. package/src/lib/authentication/providers/firebase.tsx +376 -0
  759. package/src/lib/authentication/providers/openid.tsx +20 -15
  760. package/src/lib/authentication/providers/supabase/SupabaseAuthUI.tsx +75 -0
  761. package/src/lib/authentication/providers/supabase.tsx +55 -44
  762. package/src/lib/authentication/state.ts +3 -23
  763. package/src/lib/authentication/ui/EmailVerificationUi.tsx +129 -0
  764. package/src/lib/authentication/ui/ZudokuAuthUi.tsx +477 -0
  765. package/src/lib/authentication/ui/icons/Apple.tsx +10 -0
  766. package/src/lib/authentication/ui/icons/Facebook.tsx +15 -0
  767. package/src/lib/authentication/ui/icons/Github.tsx +16 -0
  768. package/src/lib/authentication/ui/icons/Google.tsx +16 -0
  769. package/src/lib/authentication/ui/icons/Microsoft.tsx +12 -0
  770. package/src/lib/authentication/ui/icons/X.tsx +10 -0
  771. package/src/lib/authentication/utils/relativeRedirectUrl.ts +12 -0
  772. package/src/lib/components/Autocomplete.tsx +11 -2
  773. package/src/lib/components/BuildCheck.tsx +12 -10
  774. package/src/lib/components/Heading.tsx +2 -6
  775. package/src/lib/components/LanguageIcon.tsx +45 -0
  776. package/src/lib/components/Layout.tsx +3 -2
  777. package/src/lib/components/Main.tsx +1 -1
  778. package/src/lib/components/Mermaid.tsx +68 -0
  779. package/src/lib/components/PagefindSearchMeta.tsx +14 -0
  780. package/src/lib/components/Zudoku.tsx +7 -10
  781. package/src/lib/components/cache.ts +9 -5
  782. package/src/lib/components/context/ZudokuContext.ts +11 -2
  783. package/src/lib/components/navigation/NavigationItem.tsx +8 -21
  784. package/src/lib/components/navigation/Toc.tsx +3 -3
  785. package/src/lib/core/RouteGuard.tsx +42 -22
  786. package/src/lib/core/ZudokuContext.ts +3 -0
  787. package/src/lib/core/plugins.ts +2 -2
  788. package/src/lib/errors/ErrorAlert.tsx +1 -1
  789. package/src/lib/errors/ErrorMessage.tsx +38 -0
  790. package/src/lib/errors/RouterError.tsx +7 -2
  791. package/src/lib/oas/graphql/index.ts +26 -3
  792. package/src/lib/oas/parser/index.ts +10 -3
  793. package/src/lib/plugins/api-keys/ProtectedRoute.tsx +11 -7
  794. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +36 -476
  795. package/src/lib/plugins/api-keys/index.tsx +35 -21
  796. package/src/lib/plugins/api-keys/settings/ApiKeyItem.tsx +342 -0
  797. package/src/lib/plugins/api-keys/settings/ApiKeyList.tsx +64 -0
  798. package/src/lib/plugins/api-keys/settings/RevealApiKey.tsx +124 -0
  799. package/src/lib/plugins/markdown/MdxPage.tsx +125 -8
  800. package/src/lib/plugins/markdown/assets/ChatGPTLogo.tsx +11 -0
  801. package/src/lib/plugins/markdown/assets/ClaudeLogo.tsx +19 -0
  802. package/src/lib/plugins/markdown/index.tsx +5 -7
  803. package/src/lib/plugins/openapi/CollapsibleCode.tsx +5 -3
  804. package/src/lib/plugins/openapi/DownloadSchemaButton.tsx +115 -0
  805. package/src/lib/plugins/openapi/Endpoint.tsx +20 -27
  806. package/src/lib/plugins/openapi/GeneratedExampleSidecarBox.tsx +52 -0
  807. package/src/lib/plugins/openapi/MCPEndpoint.tsx +8 -28
  808. package/src/lib/plugins/openapi/OasProvider.tsx +30 -17
  809. package/src/lib/plugins/openapi/OperationList.tsx +60 -24
  810. package/src/lib/plugins/openapi/OperationListItem.tsx +25 -17
  811. package/src/lib/plugins/openapi/ParamInfos.tsx +1 -0
  812. package/src/lib/plugins/openapi/ParameterList.tsx +37 -23
  813. package/src/lib/plugins/openapi/ParameterListItem.tsx +105 -54
  814. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +0 -7
  815. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +48 -7
  816. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +101 -33
  817. package/src/lib/plugins/openapi/SchemaList.tsx +4 -0
  818. package/src/lib/plugins/openapi/Sidecar.tsx +155 -74
  819. package/src/lib/plugins/openapi/SidecarBox.tsx +26 -4
  820. package/src/lib/plugins/openapi/SidecarExamples.tsx +91 -79
  821. package/src/lib/plugins/openapi/components/ConstValue.tsx +1 -1
  822. package/src/lib/plugins/openapi/components/EnumValues.tsx +2 -2
  823. package/src/lib/plugins/openapi/components/NonHighlightedCode.tsx +22 -0
  824. package/src/lib/plugins/openapi/components/ResponseContent.tsx +63 -53
  825. package/src/lib/plugins/openapi/graphql/fragment-masking.ts +1 -0
  826. package/src/lib/plugins/openapi/graphql/gql.ts +4 -3
  827. package/src/lib/plugins/openapi/graphql/graphql.ts +20 -3
  828. package/src/lib/plugins/openapi/index.tsx +26 -37
  829. package/src/lib/plugins/openapi/interfaces.ts +29 -7
  830. package/src/lib/plugins/openapi/playground/BodyPanel.tsx +246 -30
  831. package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +10 -6
  832. package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +3 -2
  833. package/src/lib/plugins/openapi/playground/Headers.tsx +103 -219
  834. package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +33 -1
  835. package/src/lib/plugins/openapi/playground/PathParams.tsx +26 -34
  836. package/src/lib/plugins/openapi/playground/Playground.tsx +89 -36
  837. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +22 -32
  838. package/src/lib/plugins/openapi/playground/QueryParams.tsx +82 -136
  839. package/src/lib/plugins/openapi/playground/RequestLoginDialog.tsx +20 -1
  840. package/src/lib/plugins/openapi/playground/request-panel/MultipartField.tsx +91 -0
  841. package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +1 -1
  842. package/src/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.tsx +872 -0
  843. package/src/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.ts +349 -0
  844. package/src/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.tsx +2 -2
  845. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +124 -56
  846. package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +1 -1
  847. package/src/lib/plugins/openapi/playground/useRememberSkipLoginDialog.tsx +3 -0
  848. package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +1 -1
  849. package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +89 -55
  850. package/src/lib/plugins/openapi/schema/SchemaView.tsx +100 -60
  851. package/src/lib/plugins/openapi/schema/UnionView.tsx +6 -17
  852. package/src/lib/plugins/openapi/schema/union-helpers.ts +0 -1
  853. package/src/lib/plugins/openapi/schema/utils.ts +5 -2
  854. package/src/lib/plugins/openapi/util/createHttpSnippet.ts +29 -1
  855. package/src/lib/plugins/openapi/util/generateSchemaExample.ts +11 -11
  856. package/src/lib/plugins/openapi/util/getRoutes.tsx +35 -3
  857. package/src/lib/plugins/search-pagefind/IndexingDialog.tsx +163 -0
  858. package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +61 -22
  859. package/src/lib/plugins/search-pagefind/ResultList.tsx +8 -3
  860. package/src/lib/shiki.ts +46 -14
  861. package/src/lib/ui/Badge.tsx +21 -12
  862. package/src/lib/ui/Button.tsx +11 -9
  863. package/src/lib/ui/ButtonGroup.tsx +82 -0
  864. package/src/lib/ui/Callout.tsx +10 -5
  865. package/src/lib/ui/Carousel.tsx +0 -1
  866. package/src/lib/ui/Checkbox.tsx +23 -24
  867. package/src/lib/ui/CodeBlock.tsx +3 -4
  868. package/src/lib/ui/Collapsible.tsx +26 -4
  869. package/src/lib/ui/Command.tsx +3 -3
  870. package/src/lib/ui/Dialog.tsx +112 -106
  871. package/src/lib/ui/DropdownMenu.tsx +226 -170
  872. package/src/lib/ui/EmbeddedCodeBlock.tsx +24 -19
  873. package/src/lib/ui/Frame.tsx +81 -0
  874. package/src/lib/ui/Item.tsx +192 -0
  875. package/src/lib/ui/Kbd.tsx +28 -0
  876. package/src/lib/ui/NativeSelect.tsx +47 -0
  877. package/src/lib/ui/ReactComponentDoc.tsx +17 -17
  878. package/src/lib/ui/Secret.tsx +44 -27
  879. package/src/lib/ui/Select.tsx +153 -126
  880. package/src/lib/ui/Separator.tsx +25 -0
  881. package/src/lib/ui/SyntaxHighlight.tsx +6 -1
  882. package/src/lib/ui/Tooltip.tsx +54 -32
  883. package/src/lib/util/MdxComponents.tsx +5 -5
  884. package/src/lib/util/createVariantComponent.tsx +31 -5
  885. package/src/lib/util/flattenAllOf.test.ts +689 -0
  886. package/src/lib/util/flattenAllOf.ts +122 -0
  887. package/src/lib/util/pastellize.ts +4 -4
  888. package/src/lib/util/readFrontmatter.ts +13 -0
  889. package/src/lib/util/syncZustandState.ts +22 -0
  890. package/src/shiki/langs/hurl.js +1 -0
  891. package/src/shiki/langs/kdl.js +1 -0
  892. package/src/shiki/langs/markdown-nix.js +1 -0
  893. package/src/shiki/langs/openscad.js +1 -0
  894. package/src/shiki/langs/pkl.js +1 -0
  895. package/src/shiki/langs/rosmsg.js +1 -0
  896. package/dist/lib/plugins/openapi/playground/InlineInput.d.ts +0 -4
  897. package/dist/lib/plugins/openapi/playground/InlineInput.js +0 -3
  898. package/dist/lib/plugins/openapi/playground/InlineInput.js.map +0 -1
  899. package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.d.ts +0 -5
  900. package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.js +0 -7
  901. package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.js.map +0 -1
  902. package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.d.ts +0 -4
  903. package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.js +0 -10
  904. package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.js.map +0 -1
  905. package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.d.ts +0 -5
  906. package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.js +0 -16
  907. package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.js.map +0 -1
  908. package/dist/vite/create-pagefind-index.d.ts +0 -4
  909. package/dist/vite/create-pagefind-index.js +0 -12
  910. package/dist/vite/create-pagefind-index.js.map +0 -1
  911. package/lib/Button-DTDRi4CT.js +0 -51
  912. package/lib/Button-DTDRi4CT.js.map +0 -1
  913. package/lib/CodeBlock-i0BM_QFf.js +0 -176
  914. package/lib/CodeBlock-i0BM_QFf.js.map +0 -1
  915. package/lib/Command-TEBTONf1.js.map +0 -1
  916. package/lib/Dialog-VIMic7xI.js +0 -114
  917. package/lib/Dialog-VIMic7xI.js.map +0 -1
  918. package/lib/Drawer-DM9wJUC6.js.map +0 -1
  919. package/lib/ErrorAlert-Diu_w5Po.js.map +0 -1
  920. package/lib/MdxPage-CDs_vtjC.js +0 -111
  921. package/lib/MdxPage-CDs_vtjC.js.map +0 -1
  922. package/lib/OasProvider-D3Cjaaxr.js +0 -36
  923. package/lib/OasProvider-D3Cjaaxr.js.map +0 -1
  924. package/lib/OperationList-BH4cFU-0.js +0 -5454
  925. package/lib/OperationList-BH4cFU-0.js.map +0 -1
  926. package/lib/Pagination-BKphudjx.js +0 -37
  927. package/lib/Pagination-BKphudjx.js.map +0 -1
  928. package/lib/RouteGuard-nFlgfJqk.js +0 -56
  929. package/lib/RouteGuard-nFlgfJqk.js.map +0 -1
  930. package/lib/RouterError-CnS5hYUh.js +0 -41
  931. package/lib/RouterError-CnS5hYUh.js.map +0 -1
  932. package/lib/SchemaList-BcJyi2sR.js.map +0 -1
  933. package/lib/SchemaView-DnTxmN15.js +0 -458
  934. package/lib/SchemaView-DnTxmN15.js.map +0 -1
  935. package/lib/Select-BPQp7Yqx.js +0 -273
  936. package/lib/Select-BPQp7Yqx.js.map +0 -1
  937. package/lib/SignUp-tBtnwuXL.js +0 -56
  938. package/lib/SignUp-tBtnwuXL.js.map +0 -1
  939. package/lib/SyntaxHighlight-Cqh6cwC3.js.map +0 -1
  940. package/lib/Toc-Zzozy3eB.js.map +0 -1
  941. package/lib/ZudokuContext-3cqbu21w.js +0 -1285
  942. package/lib/ZudokuContext-3cqbu21w.js.map +0 -1
  943. package/lib/chunk-QMGIS6GS-DqecZ6nq.js +0 -9204
  944. package/lib/chunk-QMGIS6GS-DqecZ6nq.js.map +0 -1
  945. package/lib/circular-CokAagii.js.map +0 -1
  946. package/lib/createServer-DW4hIUUB.js +0 -12499
  947. package/lib/createServer-DW4hIUUB.js.map +0 -1
  948. package/lib/hook-ChlxzJwv.js +0 -247
  949. package/lib/hook-ChlxzJwv.js.map +0 -1
  950. package/lib/index-7FEjMkZ_.js +0 -1058
  951. package/lib/index-7FEjMkZ_.js.map +0 -1
  952. package/lib/index-CF3Ls1wd.js.map +0 -1
  953. package/lib/index-QwGs6inR.js +0 -3397
  954. package/lib/index-QwGs6inR.js.map +0 -1
  955. package/lib/index.esm-CdzlRw50.js +0 -1254
  956. package/lib/index.esm-CdzlRw50.js.map +0 -1
  957. package/lib/jsx-runtime-DywqP_6a.js.map +0 -1
  958. package/lib/useExposedProps-BH9aq4MD.js +0 -113
  959. package/lib/useExposedProps-BH9aq4MD.js.map +0 -1
  960. package/src/lib/plugins/openapi/playground/InlineInput.tsx +0 -6
  961. package/src/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.tsx +0 -36
  962. package/src/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.tsx +0 -25
  963. package/src/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.tsx +0 -42
@@ -1,56 +1,176 @@
1
- import { j as e } from "./jsx-runtime-DywqP_6a.js";
2
- import { EyeOffIcon as he, EyeIcon as fe, CheckIcon as se, CopyIcon as pe, CircleSlashIcon as $, XIcon as me, PencilLineIcon as xe, RefreshCwIcon as ye, TrashIcon as ge, KeyRoundIcon as je } from "lucide-react";
3
- import { R as ve } from "./RouterError-CnS5hYUh.js";
4
- import { i as P } from "./invariant-Bm-FVUQE.js";
5
- import { O as Ce, aP as we } from "./chunk-QMGIS6GS-DqecZ6nq.js";
6
- import { a as be } from "./hook-ChlxzJwv.js";
7
- import { D as ke, a as Y } from "./ErrorAlert-Diu_w5Po.js";
8
- import { Button as j } from "./ui/Button.js";
9
- import { d as ne, g as ie, b as Ne } from "./ZudokuContext-3cqbu21w.js";
10
- import { u as O, A as z, a as M, b as Ee, S as Ke, c as De, d as Ie, e as Ae, f as Pe, g as Z } from "./Select-BPQp7Yqx.js";
11
- import * as L from "react";
12
- import Re, { createContext as Q, useRef as D, useLayoutEffect as Se, useEffect as re, useId as _, useContext as B, useInsertionEffect as Te, useMemo as F, useCallback as Oe, Children as ze, isValidElement as Me, useState as E, forwardRef as qe } from "react";
13
- import { C as $e, a as Fe } from "./Card-hTy9PAnh.js";
14
- import { e as H, f as I, D as V, g as G, a as J, b as U, c as W, d as ae } from "./Dialog-VIMic7xI.js";
15
- import { c as N } from "./cn-dYga0KKN.js";
16
- import { u as Le } from "./useCopyToClipboard-B_085nfO.js";
17
- import { Input as oe } from "./ui/Input.js";
18
- import { a as Qe } from "./index.esm-CdzlRw50.js";
19
- import { B as _e } from "./Button-DTDRi4CT.js";
20
- import { S as Be } from "./Spinner-Cf6E803I.js";
21
- import { useAuth as He } from "./zudoku.hooks.js";
22
- const Ve = () => {
23
- const t = be();
24
- return t.isAuthEnabled && t.isPending ? null : t.isAuthenticated ? /* @__PURE__ */ e.jsx(Ce, {}) : t.isAuthEnabled ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2", children: [
25
- "Please login first to view this page",
26
- /* @__PURE__ */ e.jsx(j, { onClick: () => t.login(), children: "Login" })
27
- ] }) : /* @__PURE__ */ e.jsx("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2", children: /* @__PURE__ */ e.jsxs(ke, { className: "max-w-[600px]", children: [
28
- "Authentication needs to be enabled for API keys to work. Enable it in your Zudoku configuration under ",
29
- /* @__PURE__ */ e.jsx("code", { children: "authentication" }),
30
- "."
31
- ] }) });
32
- }, Ge = Q({});
33
- function le(t) {
34
- const i = D(null);
1
+ import { j as e } from "./jsx-runtime-BzflLqGi.js";
2
+ import { TrashIcon as pe, CircleSlashIcon as F, CheckIcon as me, XIcon as xe, PencilLineIcon as ye, RefreshCwIcon as ge, KeyRoundIcon as je } from "lucide-react";
3
+ import { Z as $, i as N } from "./invariant-CGOLuIIz.js";
4
+ import * as q from "react";
5
+ import { createContext as L, useRef as P, useLayoutEffect as ve, useEffect as ne, useId as Q, useContext as V, useInsertionEffect as Ce, useMemo as z, useCallback as we, Children as ke, isValidElement as Ee, useState as E } from "react";
6
+ import { D as Ie, c as be, d as Z, B as De, E as Ke } from "./index-CboxZOVW.js";
7
+ import { b as ie } from "./index-DXXZDuSJ.js";
8
+ import { F as Pe, g as Ae, j as Ne, h as Se, d as Re, I as Oe, a as Te, b as qe, k as Me, c as Fe } from "./Frame-DxlznfVd.js";
9
+ import { A as D, a as K, b as re } from "./Mermaid-BjSczjLW.js";
10
+ import { e as H, f as A, D as _, g as B, a as G, b as J, c as Y, d as ae } from "./Dialog-BQciPiHN.js";
11
+ import { Button as oe } from "./ui/Button.js";
12
+ import { a as U, g as le, e as $e } from "./ZudokuContext-DNHMZfcP.js";
13
+ import { u as T, I as ze } from "./Input-D-kqEQ5M.js";
14
+ import { a as Le } from "./index.esm-BYObtETB.js";
15
+ import { u as Qe } from "./chunk-PVWAREVJ-ClM0m2aJ.js";
16
+ import { A as Ve } from "./ActionButton-BSM2oNHF.js";
17
+ import { S as He, a as _e, b as Be, c as Ge, d as Je, e as ee, f as Ye } from "./Secret-BxGpIhDP.js";
18
+ import { Input as Ue } from "./ui/Input.js";
19
+ import { c as W } from "./cn-dYga0KKN.js";
20
+ import { B as k } from "./Button-IOAeVaIH.js";
21
+ function We({ error: t }) {
22
+ const i = t instanceof Error ? t.message : "Something went wrong", s = process.env.NODE_ENV === "development", n = t instanceof $ ? t.developerHint : void 0, r = t instanceof $ ? t.title : "Something went wrong", a = t instanceof Error ? t.stack : void 0, o = t instanceof Error ? t.cause : void 0, d = o instanceof Error ? String(o.stack) : a;
23
+ return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
24
+ /* @__PURE__ */ e.jsxs(D, { variant: "destructive", children: [
25
+ /* @__PURE__ */ e.jsx(K, { children: r }),
26
+ /* @__PURE__ */ e.jsx(re, { children: i })
27
+ ] }),
28
+ s && n && /* @__PURE__ */ e.jsx(Ie, { className: "mb-4", children: n }),
29
+ s && d && /* @__PURE__ */ e.jsx(
30
+ be,
31
+ {
32
+ className: "max-h-[400px] [&>pre]:p-4",
33
+ language: "js",
34
+ code: d
35
+ }
36
+ )
37
+ ] });
38
+ }
39
+ const Xe = ({
40
+ service: t,
41
+ onOpenChange: i
42
+ }) => {
43
+ const s = U(), n = le(), r = Qe(), a = Le({
44
+ defaultValues: {
45
+ expiresOn: "30"
46
+ }
47
+ }), o = ie(), d = T({
48
+ mutationFn: ({ description: c, expiresOn: u }) => {
49
+ if (!t.createKey)
50
+ throw new Error("createKey not implemented");
51
+ const h = u !== "never" ? Ze(Number(u)) : void 0;
52
+ return t.createKey({
53
+ apiKey: {
54
+ description: c || "Secret Key",
55
+ expiresOn: h
56
+ },
57
+ context: s,
58
+ auth: o
59
+ });
60
+ },
61
+ onSuccess: async () => {
62
+ await n.invalidateQueries({ queryKey: ["api-keys"] }), await r("/settings/api-keys/");
63
+ }
64
+ });
65
+ return t.createKey ? /* @__PURE__ */ e.jsxs(
66
+ "form",
67
+ {
68
+ onSubmit: a.handleSubmit(
69
+ (c) => d.mutate(
70
+ { ...c },
71
+ {
72
+ onSuccess: () => i(!1)
73
+ }
74
+ )
75
+ ),
76
+ children: [
77
+ d.error && /* @__PURE__ */ e.jsxs(D, { variant: "destructive", className: "mb-4", children: [
78
+ /* @__PURE__ */ e.jsx(K, { children: "Error" }),
79
+ /* @__PURE__ */ e.jsx(re, { children: d.error.message })
80
+ ] }),
81
+ /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 flex-col text-sm font-medium", children: [
82
+ "Name",
83
+ /* @__PURE__ */ e.jsx(Ue, { ...a.register("description") }),
84
+ "Expiration",
85
+ /* @__PURE__ */ e.jsxs(
86
+ He,
87
+ {
88
+ onValueChange: (c) => a.setValue("expiresOn", c),
89
+ defaultValue: a.getValues("expiresOn"),
90
+ children: [
91
+ /* @__PURE__ */ e.jsx(_e, { children: /* @__PURE__ */ e.jsx(Be, {}) }),
92
+ /* @__PURE__ */ e.jsx(Ge, { children: /* @__PURE__ */ e.jsxs(Je, { children: [
93
+ [7, 30, 60, 90].map((c) => /* @__PURE__ */ e.jsxs(ee, { value: String(c), children: [
94
+ c,
95
+ " days"
96
+ ] }, c)),
97
+ /* @__PURE__ */ e.jsx(ee, { value: "never", children: "Never" })
98
+ ] }) })
99
+ ]
100
+ }
101
+ ),
102
+ /* @__PURE__ */ e.jsxs(H, { children: [
103
+ /* @__PURE__ */ e.jsx(A, { asChild: !0, children: /* @__PURE__ */ e.jsx(oe, { variant: "outline", children: "Cancel" }) }),
104
+ /* @__PURE__ */ e.jsx(Ve, { isPending: d.isPending, children: "Generate Key" })
105
+ ] })
106
+ ] })
107
+ ]
108
+ }
109
+ ) : null;
110
+ }, Ze = (t) => {
111
+ const i = /* @__PURE__ */ new Date();
112
+ return i.setDate(i.getDate() + t), i.toISOString();
113
+ }, ce = ({
114
+ service: t,
115
+ isOpen: i,
116
+ onOpenChange: s,
117
+ trigger: n,
118
+ buttonVariant: r = "outline"
119
+ }) => {
120
+ const a = /* @__PURE__ */ e.jsx(oe, { variant: r, children: "Create API Key" });
121
+ return /* @__PURE__ */ e.jsxs(_, { open: i, onOpenChange: s, children: [
122
+ /* @__PURE__ */ e.jsx(B, { asChild: !0, children: n ?? a }),
123
+ /* @__PURE__ */ e.jsxs(G, { children: [
124
+ /* @__PURE__ */ e.jsx(J, { children: /* @__PURE__ */ e.jsx(Y, { children: "Create API Key" }) }),
125
+ /* @__PURE__ */ e.jsx(Xe, { service: t, onOpenChange: s })
126
+ ] })
127
+ ] });
128
+ }, et = L({});
129
+ function de(t) {
130
+ const i = P(null);
35
131
  return i.current === null && (i.current = t()), i.current;
36
132
  }
37
- const Je = typeof window < "u", Ue = Je ? Se : re, ce = /* @__PURE__ */ Q(null);
38
- function We(t) {
133
+ const tt = typeof window < "u", st = tt ? ve : ne, ue = /* @__PURE__ */ L(null);
134
+ function nt(t) {
39
135
  return typeof t == "object" && t !== null;
40
136
  }
41
- function Xe(t) {
42
- return We(t) && "offsetHeight" in t;
137
+ function it(t) {
138
+ return nt(t) && "offsetHeight" in t;
43
139
  }
44
- const Ye = Q({
140
+ const rt = L({
45
141
  transformPagePoint: (t) => t,
46
142
  isStatic: !1,
47
143
  reducedMotion: "never"
48
144
  });
49
- class Ze extends L.Component {
145
+ function te(t, i) {
146
+ if (typeof t == "function")
147
+ return t(i);
148
+ t != null && (t.current = i);
149
+ }
150
+ function at(...t) {
151
+ return (i) => {
152
+ let s = !1;
153
+ const n = t.map((r) => {
154
+ const a = te(r, i);
155
+ return !s && typeof a == "function" && (s = !0), a;
156
+ });
157
+ if (s)
158
+ return () => {
159
+ for (let r = 0; r < n.length; r++) {
160
+ const a = n[r];
161
+ typeof a == "function" ? a() : te(t[r], null);
162
+ }
163
+ };
164
+ };
165
+ }
166
+ function ot(...t) {
167
+ return q.useCallback(at(...t), t);
168
+ }
169
+ class lt extends q.Component {
50
170
  getSnapshotBeforeUpdate(i) {
51
171
  const s = this.props.childRef.current;
52
172
  if (s && i.isPresent && !this.props.isPresent) {
53
- const n = s.offsetParent, r = Xe(n) && n.offsetWidth || 0, a = this.props.sizeRef.current;
173
+ const n = s.offsetParent, r = it(n) && n.offsetWidth || 0, a = this.props.sizeRef.current;
54
174
  a.height = s.offsetHeight || 0, a.width = s.offsetWidth || 0, a.top = s.offsetTop, a.left = s.offsetLeft, a.right = r - a.width - a.left;
55
175
  }
56
176
  return null;
@@ -64,659 +184,490 @@ class Ze extends L.Component {
64
184
  return this.props.children;
65
185
  }
66
186
  }
67
- function et({ children: t, isPresent: i, anchorX: s, root: n }) {
68
- const r = _(), a = D(null), l = D({
187
+ function ct({ children: t, isPresent: i, anchorX: s, root: n }) {
188
+ const r = Q(), a = P(null), o = P({
69
189
  width: 0,
70
190
  height: 0,
71
191
  top: 0,
72
192
  left: 0,
73
193
  right: 0
74
- }), { nonce: h } = B(Ye);
75
- return Te(() => {
76
- const { width: c, height: u, top: y, left: f, right: m } = l.current;
77
- if (i || !a.current || !c || !u)
194
+ }), { nonce: d } = V(rt), c = ot(a, t?.ref);
195
+ return Ce(() => {
196
+ const { width: u, height: h, top: f, left: m, right: g } = o.current;
197
+ if (i || !a.current || !u || !h)
78
198
  return;
79
- const p = s === "left" ? `left: ${f}` : `right: ${m}`;
199
+ const j = s === "left" ? `left: ${m}` : `right: ${g}`;
80
200
  a.current.dataset.motionPopId = r;
81
- const x = document.createElement("style");
82
- h && (x.nonce = h);
83
- const v = n ?? document.head;
84
- return v.appendChild(x), x.sheet && x.sheet.insertRule(`
201
+ const l = document.createElement("style");
202
+ d && (l.nonce = d);
203
+ const x = n ?? document.head;
204
+ return x.appendChild(l), l.sheet && l.sheet.insertRule(`
85
205
  [data-motion-pop-id="${r}"] {
86
206
  position: absolute !important;
87
- width: ${c}px !important;
88
- height: ${u}px !important;
89
- ${p}px !important;
90
- top: ${y}px !important;
207
+ width: ${u}px !important;
208
+ height: ${h}px !important;
209
+ ${j}px !important;
210
+ top: ${f}px !important;
91
211
  }
92
212
  `), () => {
93
- v.contains(x) && v.removeChild(x);
213
+ x.contains(l) && x.removeChild(l);
94
214
  };
95
- }, [i]), e.jsx(Ze, { isPresent: i, childRef: a, sizeRef: l, children: L.cloneElement(t, { ref: a }) });
215
+ }, [i]), e.jsx(lt, { isPresent: i, childRef: a, sizeRef: o, children: q.cloneElement(t, { ref: c }) });
96
216
  }
97
- const tt = ({ children: t, initial: i, isPresent: s, onExitComplete: n, custom: r, presenceAffectsLayout: a, mode: l, anchorX: h, root: c }) => {
98
- const u = le(st), y = _();
99
- let f = !0, m = F(() => (f = !1, {
100
- id: y,
217
+ const dt = ({ children: t, initial: i, isPresent: s, onExitComplete: n, custom: r, presenceAffectsLayout: a, mode: o, anchorX: d, root: c }) => {
218
+ const u = de(ut), h = Q();
219
+ let f = !0, m = z(() => (f = !1, {
220
+ id: h,
101
221
  initial: i,
102
222
  isPresent: s,
103
223
  custom: r,
104
- onExitComplete: (p) => {
105
- u.set(p, !0);
106
- for (const x of u.values())
107
- if (!x)
224
+ onExitComplete: (g) => {
225
+ u.set(g, !0);
226
+ for (const j of u.values())
227
+ if (!j)
108
228
  return;
109
229
  n && n();
110
230
  },
111
- register: (p) => (u.set(p, !1), () => u.delete(p))
231
+ register: (g) => (u.set(g, !1), () => u.delete(g))
112
232
  }), [s, u, n]);
113
- return a && f && (m = { ...m }), F(() => {
114
- u.forEach((p, x) => u.set(x, !1));
115
- }, [s]), L.useEffect(() => {
233
+ return a && f && (m = { ...m }), z(() => {
234
+ u.forEach((g, j) => u.set(j, !1));
235
+ }, [s]), q.useEffect(() => {
116
236
  !s && !u.size && n && n();
117
- }, [s]), l === "popLayout" && (t = e.jsx(et, { isPresent: s, anchorX: h, root: c, children: t })), e.jsx(ce.Provider, { value: m, children: t });
237
+ }, [s]), o === "popLayout" && (t = e.jsx(ct, { isPresent: s, anchorX: d, root: c, children: t })), e.jsx(ue.Provider, { value: m, children: t });
118
238
  };
119
- function st() {
239
+ function ut() {
120
240
  return /* @__PURE__ */ new Map();
121
241
  }
122
- function nt(t = !0) {
123
- const i = B(ce);
242
+ function ft(t = !0) {
243
+ const i = V(ue);
124
244
  if (i === null)
125
245
  return [!0, null];
126
- const { isPresent: s, onExitComplete: n, register: r } = i, a = _();
127
- re(() => {
246
+ const { isPresent: s, onExitComplete: n, register: r } = i, a = Q();
247
+ ne(() => {
128
248
  if (t)
129
249
  return r(a);
130
250
  }, [t]);
131
- const l = Oe(() => t && n && n(a), [a, n, t]);
132
- return !s && n ? [!1, l] : [!0];
251
+ const o = we(() => t && n && n(a), [a, n, t]);
252
+ return !s && n ? [!1, o] : [!0];
133
253
  }
134
- const R = (t) => t.key || "";
135
- function ee(t) {
254
+ const S = (t) => t.key || "";
255
+ function se(t) {
136
256
  const i = [];
137
- return ze.forEach(t, (s) => {
138
- Me(s) && i.push(s);
257
+ return ke.forEach(t, (s) => {
258
+ Ee(s) && i.push(s);
139
259
  }), i;
140
260
  }
141
- const it = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presenceAffectsLayout: r = !0, mode: a = "sync", propagate: l = !1, anchorX: h = "left", root: c }) => {
142
- const [u, y] = nt(l), f = F(() => ee(t), [t]), m = l && !u ? [] : f.map(R), p = D(!0), x = D(f), v = le(() => /* @__PURE__ */ new Map()), [A, o] = E(f), [d, C] = E(f);
143
- Ue(() => {
144
- p.current = !1, x.current = f;
145
- for (let w = 0; w < d.length; w++) {
146
- const g = R(d[w]);
147
- m.includes(g) ? v.delete(g) : v.get(g) !== !0 && v.set(g, !1);
261
+ const ht = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presenceAffectsLayout: r = !0, mode: a = "sync", propagate: o = !1, anchorX: d = "left", root: c }) => {
262
+ const [u, h] = ft(o), f = z(() => se(t), [t]), m = o && !u ? [] : f.map(S), g = P(!0), j = P(f), l = de(() => /* @__PURE__ */ new Map()), [x, v] = E(f), [p, C] = E(f);
263
+ st(() => {
264
+ g.current = !1, j.current = f;
265
+ for (let w = 0; w < p.length; w++) {
266
+ const y = S(p[w]);
267
+ m.includes(y) ? l.delete(y) : l.get(y) !== !0 && l.set(y, !1);
148
268
  }
149
- }, [d, m.length, m.join("-")]);
269
+ }, [p, m.length, m.join("-")]);
150
270
  const b = [];
151
- if (f !== A) {
271
+ if (f !== x) {
152
272
  let w = [...f];
153
- for (let g = 0; g < d.length; g++) {
154
- const K = d[g], q = R(K);
155
- m.includes(q) || (w.splice(g, 0, K), b.push(K));
273
+ for (let y = 0; y < p.length; y++) {
274
+ const I = p[y], M = S(I);
275
+ m.includes(M) || (w.splice(y, 0, I), b.push(I));
156
276
  }
157
- return a === "wait" && b.length && (w = b), C(ee(w)), o(f), null;
277
+ return a === "wait" && b.length && (w = b), C(se(w)), v(f), null;
158
278
  }
159
- process.env.NODE_ENV !== "production" && a === "wait" && d.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
160
- const { forceRender: k } = B(Ge);
161
- return e.jsx(e.Fragment, { children: d.map((w) => {
162
- const g = R(w), K = l && !u ? !1 : f === d || m.includes(g), q = () => {
163
- if (v.has(g))
164
- v.set(g, !0);
279
+ process.env.NODE_ENV !== "production" && a === "wait" && p.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
280
+ const { forceRender: fe } = V(et);
281
+ return e.jsx(e.Fragment, { children: p.map((w) => {
282
+ const y = S(w), I = o && !u ? !1 : f === p || m.includes(y), M = () => {
283
+ if (l.has(y))
284
+ l.set(y, !0);
165
285
  else
166
286
  return;
167
287
  let X = !0;
168
- v.forEach((ue) => {
169
- ue || (X = !1);
170
- }), X && (k?.(), C(x.current), l && y?.(), n && n());
288
+ l.forEach((he) => {
289
+ he || (X = !1);
290
+ }), X && (fe?.(), C(j.current), o && h?.(), n && n());
171
291
  };
172
- return e.jsx(tt, { isPresent: K, initial: !p.current || s ? void 0 : !1, custom: i, presenceAffectsLayout: r, mode: a, root: c, onExitComplete: K ? void 0 : q, anchorX: h, children: w }, g);
292
+ return e.jsx(dt, { isPresent: I, initial: !g.current || s ? void 0 : !1, custom: i, presenceAffectsLayout: r, mode: a, root: c, onExitComplete: I ? void 0 : M, anchorX: d, children: w }, y);
173
293
  }) });
174
- }, rt = ({
175
- secret: t,
176
- preview: i = 5,
177
- className: s,
178
- status: n,
179
- onCopy: r,
180
- revealed: a,
181
- onReveal: l,
182
- noReveal: h
294
+ }, pt = ({
295
+ apiKey: t,
296
+ onDeleteKey: i,
297
+ className: s
183
298
  }) => {
184
- const c = Math.abs(i), [u, y] = E(!1), [f, m] = Le(), p = a ?? u;
185
- return /* @__PURE__ */ e.jsxs(
186
- "div",
187
- {
188
- className: N(
189
- "flex gap-2 items-center text-sm border rounded-md px-1",
190
- s
299
+ const [n, r] = E(!1), { key: a, createdOn: o, expiresOn: d } = t, c = d && new Date(d) < /* @__PURE__ */ new Date(), u = d ? Math.ceil(
300
+ (new Date(d).getTime() - Date.now()) / (1e3 * 60 * 60 * 24)
301
+ ) : 1 / 0, h = u <= 7 && !c;
302
+ return /* @__PURE__ */ e.jsxs("div", { className: W("grid col-span-full grid-cols-subgrid p-6", s), children: [
303
+ /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1", children: [
304
+ /* @__PURE__ */ e.jsx(
305
+ Ye,
306
+ {
307
+ className: "max-w-fit w-full",
308
+ secret: a,
309
+ status: c ? "expired" : h ? "expiring" : "active",
310
+ revealed: n,
311
+ onReveal: r
312
+ }
191
313
  ),
192
- children: [
193
- /* @__PURE__ */ e.jsxs("div", { className: "font-mono w-full h-9 items-center flex px-2 text-xs gap-2", children: [
194
- n && /* @__PURE__ */ e.jsx(
195
- "div",
196
- {
197
- className: N(
198
- "rounded-full shrink-0 w-2 h-2 mr-2",
199
- n === "active" && "bg-emerald-400",
200
- n === "expired" && "bg-neutral-200",
201
- n === "expiring" && "bg-yellow-400",
202
- n === "revoked" && "bg-red-400",
203
- n === "none" && "opacity-0"
204
- )
205
- }
206
- ),
207
- /* @__PURE__ */ e.jsxs("span", { className: "w-full truncate", children: [
208
- /* @__PURE__ */ e.jsx(
209
- "div",
210
- {
211
- className: N(
212
- "w-40 inline-block md:w-fit",
213
- p ? "" : "opacity-50"
214
- ),
215
- children: p ? t.slice(
216
- 0,
217
- c === 0 ? t.length : -c
218
- ) : "•••• ".repeat(
219
- t.slice(
220
- 0,
221
- c === 0 ? t.length : -c
222
- ).length / 5
223
- ) + "•".repeat(
224
- t.slice(
225
- 0,
226
- c === 0 ? t.length : -c
227
- ).length % 5
228
- )
229
- }
230
- ),
231
- c > 0 && /* @__PURE__ */ e.jsx("span", { children: t.slice(-c) })
232
- ] })
314
+ /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1 mt-0.5 text-nowrap", children: [
315
+ o && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-muted-foreground", children: [
316
+ "Created ",
317
+ mt(o),
318
+ "."
233
319
  ] }),
234
- h !== !0 && /* @__PURE__ */ e.jsx(
235
- j,
236
- {
237
- variant: "ghost",
238
- onClick: () => {
239
- y((x) => !x), l?.(!p);
240
- },
241
- size: "icon",
242
- children: p ? /* @__PURE__ */ e.jsx(he, { size: 16 }) : /* @__PURE__ */ e.jsx(fe, { size: 16 })
243
- }
244
- ),
245
- /* @__PURE__ */ e.jsx(
246
- j,
247
- {
248
- variant: "ghost",
249
- onClick: () => {
250
- m(t), r?.(t);
251
- },
252
- size: "icon",
253
- children: f ? /* @__PURE__ */ e.jsx(se, { size: 16 }) : /* @__PURE__ */ e.jsx(pe, { size: 16 })
254
- }
255
- )
256
- ]
257
- }
258
- );
259
- }, de = qe(
260
- ({ isPending: t, children: i, className: s, ...n }, r) => /* @__PURE__ */ e.jsxs(
261
- _e,
262
- {
263
- ref: r,
264
- disabled: t,
265
- ...n,
266
- className: N("relative", s),
267
- children: [
268
- t && /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 grid place-items-center", children: /* @__PURE__ */ e.jsx(Be, {}) }),
269
- /* @__PURE__ */ e.jsx("span", { className: N("block", t && "invisible"), children: i })
270
- ]
271
- }
272
- )
273
- );
274
- de.displayName = "ActionButton";
275
- const at = ({
276
- service: t,
277
- onOpenChange: i
278
- }) => {
279
- const s = ne(), n = ie(), r = we(), a = Qe({
280
- defaultValues: {
281
- expiresOn: "30"
282
- }
283
- }), l = He(), h = O({
284
- mutationFn: ({ description: c, expiresOn: u }) => {
285
- if (!t.createKey)
286
- throw new Error("createKey not implemented");
287
- const y = u !== "never" ? ot(Number(u)) : void 0;
288
- return t.createKey({
289
- apiKey: {
290
- description: c || "Secret Key",
291
- expiresOn: y
292
- },
293
- context: s,
294
- auth: l
295
- });
296
- },
297
- onSuccess: async () => {
298
- await n.invalidateQueries({ queryKey: ["api-keys"] }), await r("/settings/api-keys/");
299
- }
300
- });
301
- return t.createKey ? /* @__PURE__ */ e.jsxs(
302
- "form",
303
- {
304
- onSubmit: a.handleSubmit(
305
- (c) => h.mutate(
306
- { ...c },
307
- {
308
- onSuccess: () => i(!1)
309
- }
310
- )
311
- ),
312
- children: [
313
- h.error && /* @__PURE__ */ e.jsxs(z, { variant: "destructive", className: "mb-4", children: [
314
- /* @__PURE__ */ e.jsx(M, { children: "Error" }),
315
- /* @__PURE__ */ e.jsx(Ee, { children: h.error.message })
320
+ " ",
321
+ d && h && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-primary", children: [
322
+ "Expires in ",
323
+ u,
324
+ " ",
325
+ u === 1 ? "day" : "days",
326
+ "."
316
327
  ] }),
317
- /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 flex-col text-sm font-medium", children: [
318
- "Name",
319
- /* @__PURE__ */ e.jsx(oe, { ...a.register("description") }),
320
- "Expiration",
321
- /* @__PURE__ */ e.jsxs(
322
- Ke,
328
+ d && c && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-primary", children: [
329
+ "Expired",
330
+ " ",
331
+ u === 0 ? "today." : `${u * -1} days ago.`
332
+ ] })
333
+ ] })
334
+ ] }),
335
+ /* @__PURE__ */ e.jsx("div", { className: "flex justify-end", children: d && i && /* @__PURE__ */ e.jsxs(_, { children: [
336
+ /* @__PURE__ */ e.jsx(B, { asChild: !0, children: /* @__PURE__ */ e.jsx(k, { variant: "ghost", size: "icon", children: /* @__PURE__ */ e.jsx(pe, { size: 16 }) }) }),
337
+ /* @__PURE__ */ e.jsxs(G, { children: [
338
+ /* @__PURE__ */ e.jsxs(J, { children: [
339
+ /* @__PURE__ */ e.jsx(Y, { children: "Delete API Key" }),
340
+ /* @__PURE__ */ e.jsx(ae, { children: "Are you sure you want to delete this API key?" })
341
+ ] }),
342
+ /* @__PURE__ */ e.jsxs(H, { children: [
343
+ /* @__PURE__ */ e.jsx(A, { asChild: !0, children: /* @__PURE__ */ e.jsx(k, { variant: "outline", children: "Cancel" }) }),
344
+ /* @__PURE__ */ e.jsx(A, { asChild: !0, children: /* @__PURE__ */ e.jsx(
345
+ k,
323
346
  {
324
- onValueChange: (c) => a.setValue("expiresOn", c),
325
- defaultValue: a.getValues("expiresOn"),
326
- children: [
327
- /* @__PURE__ */ e.jsx(De, { children: /* @__PURE__ */ e.jsx(Ie, {}) }),
328
- /* @__PURE__ */ e.jsx(Ae, { children: /* @__PURE__ */ e.jsxs(Pe, { children: [
329
- [7, 30, 60, 90].map((c) => /* @__PURE__ */ e.jsxs(Z, { value: String(c), children: [
330
- c,
331
- " days"
332
- ] }, c)),
333
- /* @__PURE__ */ e.jsx(Z, { value: "never", children: "Never" })
334
- ] }) })
335
- ]
347
+ onClick: () => {
348
+ i();
349
+ },
350
+ children: "Delete"
336
351
  }
337
- ),
338
- /* @__PURE__ */ e.jsxs(H, { children: [
339
- /* @__PURE__ */ e.jsx(I, { asChild: !0, children: /* @__PURE__ */ e.jsx(j, { variant: "outline", children: "Cancel" }) }),
340
- /* @__PURE__ */ e.jsx(de, { isPending: h.isPending, children: "Generate Key" })
341
- ] })
352
+ ) })
342
353
  ] })
343
- ]
344
- }
345
- ) : null;
346
- }, ot = (t) => {
347
- const i = /* @__PURE__ */ new Date();
348
- return i.setDate(i.getDate() + t), i.toISOString();
349
- }, te = ({
350
- service: t,
351
- isOpen: i,
352
- onOpenChange: s,
353
- trigger: n,
354
- buttonVariant: r = "outline"
355
- }) => {
356
- const a = /* @__PURE__ */ e.jsx(j, { variant: r, children: "Create API Key" });
357
- return /* @__PURE__ */ e.jsxs(V, { open: i, onOpenChange: s, children: [
358
- /* @__PURE__ */ e.jsx(G, { asChild: !0, children: n ?? a }),
359
- /* @__PURE__ */ e.jsxs(J, { children: [
360
- /* @__PURE__ */ e.jsx(U, { children: /* @__PURE__ */ e.jsx(W, { children: "Create API Key" }) }),
361
- /* @__PURE__ */ e.jsx(at, { service: t, onOpenChange: s })
362
- ] })
354
+ ] })
355
+ ] }) })
363
356
  ] });
364
- }, lt = ({ service: t }) => {
365
- const i = ne(), s = ie(), [n, r] = E(
366
- null
367
- ), [a, l] = E(""), { data: h, isFetching: c } = Ne({
368
- queryFn: () => t.getConsumers(i),
369
- queryKey: ["api-keys"],
370
- retry: !1
371
- }), [u, y] = E(!1), f = O({
357
+ }, mt = (t) => {
358
+ const i = /* @__PURE__ */ new Date(), s = new Date(t), n = Math.floor((i.getTime() - s.getTime()) / 1e3), r = new Intl.RelativeTimeFormat("en", { numeric: "auto" });
359
+ return n < 60 ? r.format(-n, "second") : n < 3600 ? r.format(-Math.floor(n / 60), "minute") : n < 86400 ? r.format(-Math.floor(n / 3600), "hour") : n < 2592e3 ? r.format(-Math.floor(n / 86400), "day") : n < 31536e3 ? r.format(-Math.floor(n / 2592e3), "month") : r.format(-Math.floor(n / 31536e3), "year");
360
+ }, xt = ({
361
+ consumer: t,
362
+ onUpdate: i,
363
+ onRollKey: s,
364
+ onDeleteKey: n
365
+ }) => {
366
+ const [r, a] = E(!1), [o, d] = E(t.label), c = le(), u = U(), h = T({
367
+ mutationFn: async (l) => {
368
+ if (!s)
369
+ throw new Error("rollKey not implemented");
370
+ return await s?.(l, u);
371
+ },
372
+ onSuccess: () => void c.invalidateQueries({ queryKey: ["api-keys"] })
373
+ }), f = T({
372
374
  mutationFn: ({
373
- consumerId: o,
374
- keyId: d
375
+ consumerId: l,
376
+ keyId: x
375
377
  }) => {
376
- if (!t.deleteKey)
378
+ if (!n)
377
379
  throw new Error("deleteKey not implemented");
378
- return t.deleteKey(o, d, i);
380
+ return n(l, x, u);
379
381
  },
380
- onMutate: async ({ consumerId: o, keyId: d }) => {
381
- await s.cancelQueries({ queryKey: ["api-keys"] });
382
- const C = s.getQueryData([
382
+ onMutate: async ({ consumerId: l, keyId: x }) => {
383
+ await c.cancelQueries({ queryKey: ["api-keys"] });
384
+ const v = c.getQueryData([
383
385
  "api-keys"
384
386
  ]);
385
- return s.setQueryData(["api-keys"], (b) => b && b.map((k) => k.id === o ? {
386
- ...k,
387
- apiKeys: k.apiKeys.filter((w) => w.id !== d)
388
- } : k)), { previousData: C };
387
+ return c.setQueryData(["api-keys"], (p) => p && p.map((C) => C.id === l ? {
388
+ ...C,
389
+ apiKeys: C.apiKeys.filter((b) => b.id !== x)
390
+ } : C)), { previousData: v };
389
391
  },
390
- onError: (o, d, C) => {
391
- C?.previousData && s.setQueryData(["api-keys"], C.previousData);
392
+ onError: (l, x, v) => {
393
+ v?.previousData && c.setQueryData(["api-keys"], v.previousData);
392
394
  },
393
395
  onSuccess: () => {
394
- s.invalidateQueries({ queryKey: ["api-keys"] });
396
+ c.invalidateQueries({ queryKey: ["api-keys"] });
395
397
  }
396
- }), m = O({
398
+ }), m = T({
397
399
  mutationFn: ({
398
- consumerId: o,
399
- label: d
400
+ consumerId: l,
401
+ label: x
400
402
  }) => {
401
- if (!t.updateConsumer)
403
+ if (!i)
402
404
  throw new Error("updateConsumer not implemented");
403
- return t.updateConsumer({ id: o, label: d }, i);
405
+ return i({ id: l, label: x }, u);
404
406
  },
405
- onMutate: async ({ consumerId: o, label: d }) => {
406
- await s.cancelQueries({ queryKey: ["api-keys"] });
407
- const C = s.getQueryData(["api-keys"]);
408
- return s.setQueryData(["api-keys"], (b) => b && b.map((k) => k.id === o ? {
409
- ...k,
410
- label: d
411
- } : k)), { previousData: C };
407
+ onMutate: async ({ consumerId: l, label: x }) => {
408
+ await c.cancelQueries({ queryKey: ["api-keys"] });
409
+ const v = c.getQueryData(["api-keys"]);
410
+ return c.setQueryData(["api-keys"], (p) => p && p.map((C) => C.id === l ? {
411
+ ...C,
412
+ label: x
413
+ } : C)), { previousData: v };
412
414
  },
413
- onError: (o, d, C) => {
414
- C?.previousData && s.setQueryData(["api-keys"], C.previousData);
415
+ onError: (l, x, v) => {
416
+ v?.previousData && c.setQueryData(["api-keys"], v.previousData);
415
417
  },
416
418
  onSuccess: () => {
417
- s.invalidateQueries({ queryKey: ["api-keys"] });
419
+ c.invalidateQueries({ queryKey: ["api-keys"] });
418
420
  }
419
- }), p = O({
420
- mutationFn: (o) => {
421
- if (!t.rollKey)
422
- throw new Error("rollKey not implemented");
423
- return t.rollKey(o, i);
424
- },
425
- onSuccess: () => s.invalidateQueries({ queryKey: ["api-keys"] })
426
- }), x = (o, d) => {
427
- r(o), l(d);
428
- }, v = (o) => {
429
- a.trim() && m.mutate({
430
- consumerId: o,
431
- label: a.trim()
432
- }), r(null), l("");
433
- }, A = () => {
434
- r(null), l("");
421
+ }), g = () => {
422
+ a(!0), d(t.label);
423
+ }, j = () => {
424
+ o.trim() && m.mutate({
425
+ label: o.trim(),
426
+ consumerId: t.id
427
+ }), a(!1);
435
428
  };
436
- return /* @__PURE__ */ e.jsxs("div", { className: "max-w-screen-md h-full pt-(--padding-content-top) pb-(--padding-content-bottom)", children: [
437
- /* @__PURE__ */ e.jsx(Y.Target, { name: "api-keys-list-page" }),
438
- /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between pb-3", children: [
439
- /* @__PURE__ */ e.jsx("h1", { className: "font-medium text-2xl", children: "API Keys" }),
440
- t.createKey && /* @__PURE__ */ e.jsx(
441
- te,
442
- {
443
- service: t,
444
- isOpen: u,
445
- onOpenChange: y
446
- }
447
- )
429
+ return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
430
+ h.isError && /* @__PURE__ */ e.jsxs(D, { variant: "destructive", className: "mb-4", children: [
431
+ /* @__PURE__ */ e.jsx(F, { size: 16 }),
432
+ /* @__PURE__ */ e.jsx(K, { children: h.error.message })
448
433
  ] }),
449
- /* @__PURE__ */ e.jsx("p", { children: "Create, manage, and monitor your API keys" }),
450
- /* @__PURE__ */ e.jsx(Y.Target, { name: "api-keys-list-page-before-keys" }),
451
- /* @__PURE__ */ e.jsx("div", { className: "h-8" }),
452
- p.isError && /* @__PURE__ */ e.jsxs(z, { variant: "destructive", className: "mb-4", children: [
453
- /* @__PURE__ */ e.jsx($, { size: 16 }),
454
- /* @__PURE__ */ e.jsx(M, { children: p.error.message })
434
+ m.isError && /* @__PURE__ */ e.jsxs(D, { variant: "destructive", className: "mb-4", children: [
435
+ /* @__PURE__ */ e.jsx(F, { size: 16 }),
436
+ /* @__PURE__ */ e.jsx(K, { children: m.error.message })
455
437
  ] }),
456
- m.isError && /* @__PURE__ */ e.jsxs(z, { variant: "destructive", className: "mb-4", children: [
457
- /* @__PURE__ */ e.jsx($, { size: 16 }),
458
- /* @__PURE__ */ e.jsx(M, { children: m.error.message })
438
+ f.isError && /* @__PURE__ */ e.jsxs(D, { variant: "destructive", className: "mb-4", children: [
439
+ /* @__PURE__ */ e.jsx(F, { size: 16 }),
440
+ /* @__PURE__ */ e.jsx(K, { children: f.error.message })
459
441
  ] }),
460
- f.isError && /* @__PURE__ */ e.jsxs(z, { variant: "destructive", className: "mb-4", children: [
461
- /* @__PURE__ */ e.jsx($, { size: 16 }),
462
- /* @__PURE__ */ e.jsx(M, { children: f.error.message })
463
- ] }),
464
- /* @__PURE__ */ e.jsx("div", { className: "", children: h.length === 0 ? /* @__PURE__ */ e.jsxs("div", { className: "flex col-span-full flex-col justify-center gap-4 items-center p-8 border rounded-sm bg-muted/30 text-muted-foreground", children: [
465
- /* @__PURE__ */ e.jsxs("p", { className: "text-center", children: [
466
- "You have no API keys yet.",
467
- /* @__PURE__ */ e.jsx("br", {}),
468
- t.createKey && "Get started and create your first key."
469
- ] }),
470
- t.createKey && /* @__PURE__ */ e.jsx(
471
- te,
472
- {
473
- service: t,
474
- isOpen: u,
475
- onOpenChange: y
476
- }
477
- )
478
- ] }) : /* @__PURE__ */ e.jsx(
479
- "ul",
442
+ /* @__PURE__ */ e.jsxs(
443
+ Pe,
480
444
  {
481
- className: N(
482
- "grid grid-cols-[1fr_min-content] divide-y divide-border col-span-6"
483
- ),
484
- children: h.map((o) => /* @__PURE__ */ e.jsxs(
485
- $e,
486
- {
487
- className: "grid grid-cols-subgrid col-span-full items-center mb-4 group",
488
- children: [
489
- /* @__PURE__ */ e.jsxs(Fe, { className: "border-b col-span-full grid-cols-subgrid grid", children: [
490
- /* @__PURE__ */ e.jsxs("div", { className: "h-10 flex flex-col text-sm justify-center", children: [
491
- /* @__PURE__ */ e.jsxs("div", { className: "font-medium text-lg flex items-center gap-2", children: [
492
- n === o.id ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 w-full", children: [
445
+ className: "grid grid-cols-subgrid col-span-full items-center mb-4 group",
446
+ children: [
447
+ /* @__PURE__ */ e.jsxs(Ae, { className: "col-span-full flex-row items-start justify-between gap-4", children: [
448
+ /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1", children: [
449
+ r ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
450
+ /* @__PURE__ */ e.jsx(
451
+ ze,
452
+ {
453
+ maxLength: 32,
454
+ value: o,
455
+ onChange: (l) => d(l.target.value),
456
+ onKeyDown: (l) => {
457
+ l.key === "Enter" ? j() : l.key === "Escape" && a(!1);
458
+ },
459
+ autoFocus: !0
460
+ }
461
+ ),
462
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
463
+ /* @__PURE__ */ e.jsx(
464
+ k,
465
+ {
466
+ size: "icon",
467
+ variant: "ghost",
468
+ onClick: j,
469
+ disabled: !o.trim(),
470
+ children: /* @__PURE__ */ e.jsx(me, { size: 16 })
471
+ }
472
+ ),
473
+ /* @__PURE__ */ e.jsx(
474
+ k,
475
+ {
476
+ size: "icon",
477
+ variant: "ghost",
478
+ onClick: () => a(!1),
479
+ children: /* @__PURE__ */ e.jsx(xe, { size: 16 })
480
+ }
481
+ )
482
+ ] })
483
+ ] }) : /* @__PURE__ */ e.jsx(Ne, { children: t.label }),
484
+ /* @__PURE__ */ e.jsxs(Se, { children: [
485
+ t.createdOn && /* @__PURE__ */ e.jsxs("div", { children: [
486
+ "Created on ",
487
+ new Date(t.createdOn).toLocaleDateString()
488
+ ] }),
489
+ t.expiresOn && /* @__PURE__ */ e.jsxs("div", { children: [
490
+ "Expires on ",
491
+ new Date(t.expiresOn).toLocaleDateString()
492
+ ] })
493
+ ] })
494
+ ] }),
495
+ /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1", children: [
496
+ i && /* @__PURE__ */ e.jsxs(
497
+ k,
498
+ {
499
+ variant: "ghost",
500
+ onClick: g,
501
+ className: W(
502
+ "flex gap-2",
503
+ r && "opacity-0! pointer-events-none"
504
+ ),
505
+ disabled: r,
506
+ children: [
507
+ /* @__PURE__ */ e.jsx(ye, { size: 16 }),
508
+ /* @__PURE__ */ e.jsx("span", { className: "hidden md:block", children: "Edit label" })
509
+ ]
510
+ }
511
+ ),
512
+ s && /* @__PURE__ */ e.jsxs(_, { children: [
513
+ /* @__PURE__ */ e.jsx(B, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
514
+ k,
515
+ {
516
+ title: "Roll this key",
517
+ variant: "ghost",
518
+ disabled: h.isPending,
519
+ className: "flex items-center gap-2",
520
+ children: [
493
521
  /* @__PURE__ */ e.jsx(
494
- oe,
522
+ ge,
495
523
  {
496
- maxLength: 32,
497
- value: a,
498
- onChange: (d) => l(d.target.value),
499
- onKeyDown: (d) => {
500
- d.key === "Enter" ? v(o.id) : d.key === "Escape" && A();
501
- },
502
- className: "text-lg font-medium",
503
- autoFocus: !0
524
+ size: 16,
525
+ className: h.isPending ? "animate-spin" : void 0
504
526
  }
505
527
  ),
506
- /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
507
- /* @__PURE__ */ e.jsx(
508
- j,
509
- {
510
- size: "icon",
511
- variant: "ghost",
512
- onClick: () => v(o.id),
513
- disabled: !a.trim(),
514
- children: /* @__PURE__ */ e.jsx(se, { size: 16 })
515
- }
516
- ),
517
- /* @__PURE__ */ e.jsx(
518
- j,
519
- {
520
- size: "icon",
521
- variant: "ghost",
522
- onClick: A,
523
- children: /* @__PURE__ */ e.jsx(me, { size: 16 })
524
- }
525
- )
526
- ] })
527
- ] }) : o.label,
528
- /* @__PURE__ */ e.jsx("div", { className: "text-muted-foreground text-xs", children: o.createdOn })
528
+ /* @__PURE__ */ e.jsx("span", { className: "hidden md:block", children: "Roll key" })
529
+ ]
530
+ }
531
+ ) }),
532
+ /* @__PURE__ */ e.jsxs(G, { children: [
533
+ /* @__PURE__ */ e.jsxs(J, { children: [
534
+ /* @__PURE__ */ e.jsx(Y, { children: "Roll API Key" }),
535
+ /* @__PURE__ */ e.jsx(ae, { children: "Are you sure you want to roll this API key?" })
529
536
  ] }),
530
- /* @__PURE__ */ e.jsxs("div", { className: "text-muted-foreground text-xs", children: [
531
- o.createdOn && /* @__PURE__ */ e.jsxs("div", { children: [
532
- "Created on",
533
- " ",
534
- new Date(o.createdOn).toLocaleDateString()
535
- ] }),
536
- o.expiresOn && /* @__PURE__ */ e.jsxs("div", { children: [
537
- "Expires on",
538
- " ",
539
- new Date(o.expiresOn).toLocaleDateString()
540
- ] })
541
- ] })
542
- ] }),
543
- /* @__PURE__ */ e.jsxs("div", { className: "flex justify-end", children: [
544
- t.updateConsumer && /* @__PURE__ */ e.jsxs(
545
- j,
546
- {
547
- variant: "ghost",
548
- onClick: () => x(o.id, o.label),
549
- className: N(
550
- "flex gap-2",
551
- n === o.id && "opacity-0! pointer-events-none"
552
- ),
553
- disabled: n === o.id,
554
- children: [
555
- /* @__PURE__ */ e.jsx(xe, { size: 16 }),
556
- /* @__PURE__ */ e.jsx("span", { className: "hidden md:block", children: "Edit label" })
557
- ]
558
- }
559
- ),
560
- t.rollKey && /* @__PURE__ */ e.jsxs(V, { children: [
561
- /* @__PURE__ */ e.jsx(G, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
562
- j,
537
+ /* @__PURE__ */ e.jsxs(H, { children: [
538
+ /* @__PURE__ */ e.jsx(A, { asChild: !0, children: /* @__PURE__ */ e.jsx(k, { variant: "outline", children: "Cancel" }) }),
539
+ /* @__PURE__ */ e.jsx(A, { asChild: !0, children: /* @__PURE__ */ e.jsx(
540
+ k,
563
541
  {
564
- title: "Roll this key",
565
- variant: "ghost",
566
- disabled: p.isPending,
567
- className: "flex items-center gap-2",
568
- children: [
569
- /* @__PURE__ */ e.jsx(
570
- ye,
571
- {
572
- size: 16,
573
- className: p.isPending ? "animate-spin" : void 0
574
- }
575
- ),
576
- /* @__PURE__ */ e.jsx("span", { className: "hidden md:block", children: "Roll key" })
577
- ]
542
+ onClick: () => {
543
+ h.mutate(t.id);
544
+ },
545
+ children: "Roll Key"
578
546
  }
579
- ) }),
580
- /* @__PURE__ */ e.jsxs(J, { children: [
581
- /* @__PURE__ */ e.jsxs(U, { children: [
582
- /* @__PURE__ */ e.jsx(W, { children: "Roll API Key" }),
583
- /* @__PURE__ */ e.jsx(ae, { children: "Are you sure you want to roll this API key?" })
584
- ] }),
585
- /* @__PURE__ */ e.jsxs(H, { children: [
586
- /* @__PURE__ */ e.jsx(I, { asChild: !0, children: /* @__PURE__ */ e.jsx(j, { variant: "outline", children: "Cancel" }) }),
587
- /* @__PURE__ */ e.jsx(I, { asChild: !0, children: /* @__PURE__ */ e.jsx(
588
- j,
589
- {
590
- onClick: () => {
591
- p.mutate(o.id);
592
- },
593
- children: "Roll Key"
594
- }
595
- ) })
596
- ] })
597
- ] })
547
+ ) })
598
548
  ] })
599
549
  ] })
600
- ] }),
601
- /* @__PURE__ */ e.jsx("div", { className: "col-span-full grid-cols-subgrid grid", children: /* @__PURE__ */ e.jsx(it, { children: o.apiKeys.map((d) => /* @__PURE__ */ e.jsxs(Re.Fragment, { children: [
602
- /* @__PURE__ */ e.jsx(
603
- dt,
604
- {
605
- apiKey: d,
606
- onDeleteKey: () => {
607
- f.mutate({
608
- consumerId: o.id,
609
- keyId: d.id
610
- });
611
- },
612
- className: f.variables?.keyId === d.id && (f.isPending || c) ? "opacity-10!" : void 0
613
- }
614
- ),
615
- /* @__PURE__ */ e.jsx("div", { className: "col-span-full h-px bg-border" })
616
- ] }, d.id)) }) })
617
- ]
618
- },
619
- o.id
620
- ))
621
- }
622
- ) })
550
+ ] })
551
+ ] })
552
+ ] }),
553
+ /* @__PURE__ */ e.jsx(Re, { className: "p-0 grid grid-cols-subgrid col-span-full divide-y divide-border", children: /* @__PURE__ */ e.jsx(ht, { children: t.apiKeys.map((l) => /* @__PURE__ */ e.jsx(
554
+ pt,
555
+ {
556
+ apiKey: l,
557
+ onDeleteKey: () => {
558
+ f.mutate({
559
+ consumerId: t.id,
560
+ keyId: l.id
561
+ });
562
+ },
563
+ className: f.variables?.keyId === l.id && f.isPending ? "opacity-10!" : void 0
564
+ },
565
+ l.id
566
+ )) }) })
567
+ ]
568
+ },
569
+ t.id
570
+ )
623
571
  ] });
624
- }, ct = (t) => {
625
- const i = /* @__PURE__ */ new Date(), s = new Date(t), n = Math.floor((i.getTime() - s.getTime()) / 1e3), r = new Intl.RelativeTimeFormat("en", { numeric: "auto" });
626
- return n < 60 ? r.format(-n, "second") : n < 3600 ? r.format(-Math.floor(n / 60), "minute") : n < 86400 ? r.format(-Math.floor(n / 3600), "hour") : n < 2592e3 ? r.format(-Math.floor(n / 86400), "day") : n < 31536e3 ? r.format(-Math.floor(n / 2592e3), "month") : r.format(-Math.floor(n / 31536e3), "year");
627
- }, dt = ({
628
- apiKey: t,
629
- onDeleteKey: i,
630
- className: s
631
- }) => {
632
- const [n, r] = E(!1), { key: a, createdOn: l, expiresOn: h } = t, c = h && new Date(h) < /* @__PURE__ */ new Date(), u = h ? Math.ceil(
633
- (new Date(h).getTime() - Date.now()) / (1e3 * 60 * 60 * 24)
634
- ) : 1 / 0, y = u <= 7 && !c;
635
- return /* @__PURE__ */ e.jsxs("div", { className: N("grid col-span-full grid-cols-subgrid p-6", s), children: [
636
- /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1", children: [
637
- /* @__PURE__ */ e.jsx(
638
- rt,
572
+ }, yt = ({ service: t }) => {
573
+ const i = U(), { data: s } = $e({
574
+ queryFn: async () => {
575
+ try {
576
+ return await t.getConsumers(i);
577
+ } catch (a) {
578
+ throw new $("Cannot get API keys", {
579
+ cause: a,
580
+ title: "Error getting API keys",
581
+ developerHint: "Check the response of the API request for more information."
582
+ });
583
+ }
584
+ },
585
+ queryKey: ["api-keys"],
586
+ retry: !1
587
+ }), [n, r] = E(!1);
588
+ return /* @__PURE__ */ e.jsx("div", { className: "mt-8", children: s.length === 0 ? /* @__PURE__ */ e.jsxs("div", { className: "flex col-span-full flex-col justify-center gap-4 items-center p-8 border rounded-sm bg-muted/30 text-muted-foreground", children: [
589
+ /* @__PURE__ */ e.jsxs("p", { className: "text-center", children: [
590
+ "You have no API keys yet.",
591
+ /* @__PURE__ */ e.jsx("br", {}),
592
+ t.createKey && "Get started and create your first key."
593
+ ] }),
594
+ t.createKey && /* @__PURE__ */ e.jsx(
595
+ ce,
596
+ {
597
+ service: t,
598
+ isOpen: n,
599
+ onOpenChange: r
600
+ }
601
+ )
602
+ ] }) : /* @__PURE__ */ e.jsx("ul", { className: W("grid grid-cols-[1fr_min-content] col-span-6"), children: s.map((a) => /* @__PURE__ */ e.jsx(
603
+ xt,
604
+ {
605
+ consumer: a,
606
+ onUpdate: t.updateConsumer,
607
+ onRollKey: t.rollKey,
608
+ onDeleteKey: t.deleteKey
609
+ },
610
+ a.id
611
+ )) }) });
612
+ }, gt = ({ service: t }) => {
613
+ const [i, s] = E(!1), n = ie();
614
+ return /* @__PURE__ */ e.jsxs("div", { className: "max-w-3xl h-full pt-(--padding-content-top) pb-(--padding-content-bottom)", children: [
615
+ /* @__PURE__ */ e.jsx(Z.Target, { name: "api-keys-list-page" }),
616
+ /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between pb-3", children: [
617
+ /* @__PURE__ */ e.jsx("h1", { className: "font-medium text-2xl", children: "API Keys" }),
618
+ t.createKey && /* @__PURE__ */ e.jsx(
619
+ ce,
639
620
  {
640
- className: "max-w-fit w-full",
641
- secret: a,
642
- status: c ? "expired" : y ? "expiring" : "active",
643
- revealed: n,
644
- onReveal: r
621
+ service: t,
622
+ isOpen: i,
623
+ onOpenChange: s
645
624
  }
646
- ),
647
- /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1 mt-0.5 text-nowrap", children: [
648
- l && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-muted-foreground", children: [
649
- "Created ",
650
- ct(l),
651
- "."
652
- ] }),
653
- " ",
654
- h && y && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-primary", children: [
655
- "Expires in ",
656
- u,
657
- " ",
658
- u === 1 ? "day" : "days",
659
- "."
660
- ] }),
661
- h && c && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-primary", children: [
662
- "Expired",
663
- " ",
664
- u === 0 ? "today." : `${u * -1} days ago.`
665
- ] })
666
- ] })
625
+ )
667
626
  ] }),
668
- /* @__PURE__ */ e.jsx("div", { className: "flex justify-end", children: h && i && /* @__PURE__ */ e.jsxs(V, { children: [
669
- /* @__PURE__ */ e.jsx(G, { asChild: !0, children: /* @__PURE__ */ e.jsx(j, { variant: "ghost", size: "icon", children: /* @__PURE__ */ e.jsx(ge, { size: 16 }) }) }),
670
- /* @__PURE__ */ e.jsxs(J, { children: [
671
- /* @__PURE__ */ e.jsxs(U, { children: [
672
- /* @__PURE__ */ e.jsx(W, { children: "Delete API Key" }),
673
- /* @__PURE__ */ e.jsx(ae, { children: "Are you sure you want to delete this API key?" })
674
- ] }),
675
- /* @__PURE__ */ e.jsxs(H, { children: [
676
- /* @__PURE__ */ e.jsx(I, { asChild: !0, children: /* @__PURE__ */ e.jsx(j, { variant: "outline", children: "Cancel" }) }),
677
- /* @__PURE__ */ e.jsx(I, { asChild: !0, children: /* @__PURE__ */ e.jsx(
678
- j,
679
- {
680
- onClick: () => {
681
- i();
682
- },
683
- children: "Delete"
684
- }
685
- ) })
686
- ] })
687
- ] })
688
- ] }) })
627
+ /* @__PURE__ */ e.jsx("p", { children: "Create, manage, and monitor your API keys" }),
628
+ /* @__PURE__ */ e.jsx(Z.Target, { name: "api-keys-list-page-before-keys" }),
629
+ n.profile?.emailVerified === !1 ? /* @__PURE__ */ e.jsxs(Oe, { variant: "outline", children: [
630
+ /* @__PURE__ */ e.jsxs(Te, { children: [
631
+ /* @__PURE__ */ e.jsx(qe, { children: "Verified email required" }),
632
+ /* @__PURE__ */ e.jsx(Me, { children: "You need to verify your email to access API keys." })
633
+ ] }),
634
+ /* @__PURE__ */ e.jsx(Fe, { children: /* @__PURE__ */ e.jsx(De, { onClick: () => n.requestEmailVerification(), children: "Verify email" }) })
635
+ ] }) : /* @__PURE__ */ e.jsx(
636
+ Ke,
637
+ {
638
+ fallbackRender: ({ error: r }) => /* @__PURE__ */ e.jsx(We, { error: r }),
639
+ children: /* @__PURE__ */ e.jsx(yt, { service: t })
640
+ }
641
+ )
689
642
  ] });
690
- }, S = "https://api.zuploedge.com/v2/client", ut = async (t) => {
643
+ }, R = "https://api.zuploedge.com/v2/client", jt = async (t) => {
691
644
  try {
692
645
  return await t.json();
693
646
  } catch {
694
647
  return;
695
648
  }
696
- }, T = async (t) => {
649
+ }, O = async (t) => {
697
650
  const i = t.headers.get("content-type");
698
651
  if (!t.ok && i?.includes("application/problem+json")) {
699
- const s = await ut(t);
652
+ const s = await jt(t);
700
653
  if (s.type && s.title)
701
654
  throw new Error(s.detail ?? s.title);
702
655
  }
703
- }, ht = (t, i) => ({
656
+ }, vt = (t, i) => ({
704
657
  deleteKey: async (s, n, r) => {
705
658
  const a = new Request(
706
- S + `/${t}/consumers/${s}/keys/${n}`,
659
+ R + `/${t}/consumers/${s}/keys/${n}`,
707
660
  {
708
661
  method: "DELETE"
709
662
  }
710
- );
711
- await r.signRequest(a);
712
- const l = await fetch(a);
713
- await T(l), P(l.ok, "Failed to delete API key");
663
+ ), o = await fetch(await r.signRequest(a));
664
+ await O(o), N(o.ok, "Failed to delete API key");
714
665
  },
715
666
  updateConsumer: async (s, n) => {
716
667
  const r = await fetch(
717
668
  await n.signRequest(
718
669
  new Request(
719
- S + `/${t}/consumers/${s.id}`,
670
+ R + `/${t}/consumers/${s.id}`,
720
671
  {
721
672
  method: "PATCH",
722
673
  headers: {
@@ -729,13 +680,13 @@ const at = ({
729
680
  )
730
681
  )
731
682
  );
732
- await T(r), P(r.ok, "Failed to update API key description");
683
+ await O(r), N(r.ok, "Failed to update API key description");
733
684
  },
734
685
  rollKey: async (s, n) => {
735
686
  const r = await fetch(
736
687
  await n.signRequest(
737
688
  new Request(
738
- S + `/${t}/consumers/${s}/roll-key`,
689
+ R + `/${t}/consumers/${s}/roll-key`,
739
690
  {
740
691
  method: "POST",
741
692
  headers: {
@@ -746,24 +697,36 @@ const at = ({
746
697
  )
747
698
  )
748
699
  );
749
- await T(r), P(r.ok, "Failed to delete API key");
700
+ await O(r), N(r.ok, "Failed to roll API key");
750
701
  },
751
702
  getConsumers: async (s) => {
752
703
  const n = new Request(
753
- `${S}/${t}/consumers`
704
+ `${R}/${t}/consumers`
754
705
  );
755
706
  await s.signRequest(n);
756
707
  const r = await fetch(n);
757
- return await T(r), P(r.ok, "Failed to fetch API keys"), (await r.json()).data.map((l) => ({
758
- id: l.id,
759
- label: l.label || l.subject || "API Key",
760
- apiKeys: l.apiKeys.data,
761
- key: l.apiKeys.data.at(0)
708
+ return await O(r), N(r.ok, "Failed to fetch API keys"), (await r.json()).data.map((o) => ({
709
+ id: o.id,
710
+ createdOn: o.createdOn,
711
+ updatedOn: o.updatedOn,
712
+ expiresOn: o.expiresOn,
713
+ label: o.label || o.subject || "API Key",
714
+ apiKeys: o.apiKeys.data,
715
+ key: o.apiKeys.data.at(0)
762
716
  }));
763
717
  },
764
718
  ...i
765
- }), St = (t) => t, Tt = (t) => {
766
- const i = "deploymentName" in t ? ht(t.deploymentName, t) : t;
719
+ }), zt = (t) => t, Lt = ({
720
+ deploymentName: t,
721
+ ...i
722
+ }) => {
723
+ const s = t ? vt(t, { deploymentName: t, ...i }) : i;
724
+ if (!s.getConsumers)
725
+ throw new Error("getConsumers is required when using the apiKeyPlugin");
726
+ const n = {
727
+ ...s,
728
+ getConsumers: s.getConsumers
729
+ };
767
730
  return {
768
731
  getProfileMenuItems: () => [
769
732
  {
@@ -773,15 +736,15 @@ const at = ({
773
736
  icon: je
774
737
  }
775
738
  ],
776
- getIdentities: async (s) => {
739
+ getIdentities: async (r) => {
777
740
  try {
778
- return (await i.getConsumers(s)).map((r) => ({
779
- authorizeRequest: (a) => (a.headers.set(
741
+ return (await n.getConsumers(r)).map((o) => ({
742
+ authorizeRequest: (d) => (d.headers.set(
780
743
  "Authorization",
781
- `Bearer ${r.apiKeys.at(0)?.key}`
782
- ), a),
783
- id: r.id,
784
- label: r.label
744
+ `Bearer ${o.apiKeys.at(0)?.key}`
745
+ ), d),
746
+ id: o.id,
747
+ label: o.label
785
748
  }));
786
749
  } catch {
787
750
  return [];
@@ -789,20 +752,15 @@ const at = ({
789
752
  },
790
753
  getRoutes: () => [
791
754
  {
792
- element: /* @__PURE__ */ e.jsx(Ve, {}),
793
- errorElement: /* @__PURE__ */ e.jsx(ve, {}),
794
- children: [
795
- {
796
- path: "/settings/api-keys",
797
- element: /* @__PURE__ */ e.jsx(lt, { service: i })
798
- }
799
- ]
755
+ path: "/settings/api-keys",
756
+ element: /* @__PURE__ */ e.jsx(gt, { service: n })
800
757
  }
801
- ]
758
+ ],
759
+ getProtectedRoutes: () => ["/settings/api-keys"]
802
760
  };
803
761
  };
804
762
  export {
805
- Tt as apiKeyPlugin,
806
- St as createApiKeyService
763
+ Lt as apiKeyPlugin,
764
+ zt as createApiKeyService
807
765
  };
808
766
  //# sourceMappingURL=zudoku.plugin-api-keys.js.map