zudoku 0.51.0 → 0.52.1

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 (322) hide show
  1. package/dist/config/validators/InputNavigationSchema.d.ts +152 -0
  2. package/dist/config/validators/NavigationSchema.js +1 -1
  3. package/dist/config/validators/NavigationSchema.js.map +1 -1
  4. package/dist/config/validators/icon-types.d.ts +1 -1
  5. package/dist/config/validators/icon-types.js +38 -0
  6. package/dist/config/validators/icon-types.js.map +1 -1
  7. package/dist/config/validators/validate.d.ts +10 -0
  8. package/dist/config/validators/validate.js +7 -0
  9. package/dist/config/validators/validate.js.map +1 -1
  10. package/dist/lib/components/Autocomplete.js +1 -1
  11. package/dist/lib/components/Autocomplete.js.map +1 -1
  12. package/dist/lib/components/ErrorPage.js +2 -2
  13. package/dist/lib/components/ErrorPage.js.map +1 -1
  14. package/dist/lib/components/Markdown.d.ts +0 -1
  15. package/dist/lib/components/Markdown.js +2 -3
  16. package/dist/lib/components/Markdown.js.map +1 -1
  17. package/dist/lib/components/NotFoundPage.js +2 -2
  18. package/dist/lib/components/NotFoundPage.js.map +1 -1
  19. package/dist/lib/components/Pagination.js +1 -1
  20. package/dist/lib/components/Pagination.js.map +1 -1
  21. package/dist/lib/components/Typography.d.ts +5 -0
  22. package/dist/lib/components/Typography.js +8 -0
  23. package/dist/lib/components/Typography.js.map +1 -0
  24. package/dist/lib/components/index.d.ts +4 -0
  25. package/dist/lib/components/index.js +2 -0
  26. package/dist/lib/components/index.js.map +1 -1
  27. package/dist/lib/errors/ErrorAlert.js +2 -3
  28. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  29. package/dist/lib/hooks/useHotkey.d.ts +4 -0
  30. package/dist/lib/hooks/useHotkey.js +58 -0
  31. package/dist/lib/hooks/useHotkey.js.map +1 -0
  32. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +4 -8
  33. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  34. package/dist/lib/plugins/custom-pages/index.d.ts +1 -4
  35. package/dist/lib/plugins/custom-pages/index.js +1 -3
  36. package/dist/lib/plugins/custom-pages/index.js.map +1 -1
  37. package/dist/lib/plugins/markdown/MdxPage.d.ts +1 -2
  38. package/dist/lib/plugins/markdown/MdxPage.js +22 -6
  39. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  40. package/dist/lib/plugins/markdown/index.d.ts +8 -1
  41. package/dist/lib/plugins/markdown/index.js +1 -1
  42. package/dist/lib/plugins/markdown/index.js.map +1 -1
  43. package/dist/lib/plugins/openapi/OperationList.js +2 -3
  44. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  45. package/dist/lib/plugins/openapi/OperationListItem.js +2 -2
  46. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  47. package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
  48. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  49. package/dist/lib/plugins/openapi/SchemaList.js +2 -3
  50. package/dist/lib/plugins/openapi/SchemaList.js.map +1 -1
  51. package/dist/lib/plugins/openapi/SidecarExamples.js +1 -1
  52. package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
  53. package/dist/lib/plugins/openapi/playground/BodyPanel.js +14 -11
  54. package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -1
  55. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.d.ts +8 -0
  56. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +11 -0
  57. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -0
  58. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +2 -2
  59. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
  60. package/dist/lib/plugins/openapi/playground/Headers.d.ts +3 -2
  61. package/dist/lib/plugins/openapi/playground/Headers.js +52 -30
  62. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  63. package/dist/lib/plugins/openapi/playground/IdentityDialog.js +2 -1
  64. package/dist/lib/plugins/openapi/playground/IdentityDialog.js.map +1 -1
  65. package/dist/lib/plugins/openapi/playground/IdentitySelector.js +1 -2
  66. package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -1
  67. package/dist/lib/plugins/openapi/playground/InlineInput.js +1 -1
  68. package/dist/lib/plugins/openapi/playground/InlineInput.js.map +1 -1
  69. package/dist/lib/plugins/openapi/playground/ParamsGrid.js +2 -2
  70. package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -1
  71. package/dist/lib/plugins/openapi/playground/PathParams.js +1 -2
  72. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  73. package/dist/lib/plugins/openapi/playground/Playground.js +52 -34
  74. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  75. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
  76. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  77. package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +2 -2
  78. package/dist/lib/plugins/openapi/playground/QueryParams.js +38 -23
  79. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  80. package/dist/lib/plugins/openapi/playground/Spinner.d.ts +2 -0
  81. package/dist/lib/plugins/openapi/playground/Spinner.js +63 -0
  82. package/dist/lib/plugins/openapi/playground/Spinner.js.map +1 -0
  83. package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.d.ts +3 -0
  84. package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js +13 -0
  85. package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js.map +1 -0
  86. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.d.ts +1 -0
  87. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js +12 -0
  88. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js.map +1 -0
  89. package/dist/lib/plugins/openapi/playground/result-panel/Highlight.d.ts +12 -0
  90. package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js +11 -0
  91. package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js.map +1 -0
  92. package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.d.ts +6 -0
  93. package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js +66 -0
  94. package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js.map +1 -0
  95. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +7 -4
  96. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +23 -32
  97. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
  98. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +2 -2
  99. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +8 -10
  100. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
  101. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +3 -3
  102. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -1
  103. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +2 -3
  104. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
  105. package/dist/lib/plugins/openapi/schema/SchemaView.js +4 -4
  106. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  107. package/dist/lib/plugins/openapi/schema/utils.js +3 -2
  108. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  109. package/dist/lib/ui/CodeBlock.js +5 -6
  110. package/dist/lib/ui/CodeBlock.js.map +1 -1
  111. package/dist/lib/ui/Dialog.js +1 -1
  112. package/dist/lib/ui/Dialog.js.map +1 -1
  113. package/dist/lib/ui/EmbeddedCodeBlock.js +1 -1
  114. package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
  115. package/dist/lib/ui/Select.js +1 -1
  116. package/dist/lib/util/os.d.ts +2 -0
  117. package/dist/lib/util/os.js +21 -0
  118. package/dist/lib/util/os.js.map +1 -0
  119. package/dist/lib/util/useCopyToClipboard.d.ts +1 -0
  120. package/dist/lib/util/useCopyToClipboard.js +11 -0
  121. package/dist/lib/util/useCopyToClipboard.js.map +1 -0
  122. package/dist/vite/api/SchemaManager.js +6 -2
  123. package/dist/vite/api/SchemaManager.js.map +1 -1
  124. package/dist/vite/api/schema-codegen.js +42 -11
  125. package/dist/vite/api/schema-codegen.js.map +1 -1
  126. package/dist/vite/api/schema-codegen.test.js +82 -0
  127. package/dist/vite/api/schema-codegen.test.js.map +1 -1
  128. package/dist/vite/mdx/remark-last-modified.d.ts +3 -0
  129. package/dist/vite/mdx/remark-last-modified.js +56 -0
  130. package/dist/vite/mdx/remark-last-modified.js.map +1 -0
  131. package/dist/vite/mdx/utils.d.ts +2 -0
  132. package/dist/vite/mdx/utils.js +31 -0
  133. package/dist/vite/mdx/utils.js.map +1 -0
  134. package/dist/vite/plugin-frontmatter.js +4 -2
  135. package/dist/vite/plugin-frontmatter.js.map +1 -1
  136. package/dist/vite/plugin-mdx.js +11 -33
  137. package/dist/vite/plugin-mdx.js.map +1 -1
  138. package/dist/vite/plugin-theme.js +21 -9
  139. package/dist/vite/plugin-theme.js.map +1 -1
  140. package/dist/vite/plugin-theme.test.js +22 -1
  141. package/dist/vite/plugin-theme.test.js.map +1 -1
  142. package/lib/Alert-CT_ViLrJ.js +161 -0
  143. package/lib/Alert-CT_ViLrJ.js.map +1 -0
  144. package/lib/CodeBlock-DAKxs_Tu.js +85 -0
  145. package/lib/CodeBlock-DAKxs_Tu.js.map +1 -0
  146. package/lib/Command-CPtGTZAL.js +140 -0
  147. package/lib/Command-CPtGTZAL.js.map +1 -0
  148. package/lib/{Dialog-BxpuVLh9.js → Dialog-DGlrUTCS.js} +4 -4
  149. package/lib/Dialog-DGlrUTCS.js.map +1 -0
  150. package/lib/MdxPage-D-QSUlMf.js +110 -0
  151. package/lib/MdxPage-D-QSUlMf.js.map +1 -0
  152. package/lib/{OasProvider-BC0q5m3u.js → OasProvider-DKB2uJU-.js} +3 -3
  153. package/lib/{OasProvider-BC0q5m3u.js.map → OasProvider-DKB2uJU-.js.map} +1 -1
  154. package/lib/{OperationList-Dpip6ozi.js → OperationList-CccIt45w.js} +579 -567
  155. package/lib/OperationList-CccIt45w.js.map +1 -0
  156. package/lib/Pagination-ClHXydm9.js +36 -0
  157. package/lib/Pagination-ClHXydm9.js.map +1 -0
  158. package/lib/RouteGuard-Bd-ppFbi.js +737 -0
  159. package/lib/RouteGuard-Bd-ppFbi.js.map +1 -0
  160. package/lib/{SchemaList-t4BIfh6Z.js → SchemaList-DY3FBF2U.js} +26 -37
  161. package/lib/SchemaList-DY3FBF2U.js.map +1 -0
  162. package/lib/{SchemaView-CLxthVcA.js → SchemaView-matL2maR.js} +94 -103
  163. package/lib/SchemaView-matL2maR.js.map +1 -0
  164. package/lib/{SignUp-B6w5AwHM.js → SignUp-CfojO4Pb.js} +13 -13
  165. package/lib/{SignUp-B6w5AwHM.js.map → SignUp-CfojO4Pb.js.map} +1 -1
  166. package/lib/{Markdown-BQ8YqLsz.js → Slot-DwZlQ-vX.js} +3347 -3001
  167. package/lib/Slot-DwZlQ-vX.js.map +1 -0
  168. package/lib/{SyntaxHighlight-C5ja40ix.js → SyntaxHighlight-CrjhGEwT.js} +3 -3
  169. package/lib/{SyntaxHighlight-C5ja40ix.js.map → SyntaxHighlight-CrjhGEwT.js.map} +1 -1
  170. package/lib/{Toc-BS0f4GTe.js → Toc-WCmwFkX-.js} +2 -2
  171. package/lib/{Toc-BS0f4GTe.js.map → Toc-WCmwFkX-.js.map} +1 -1
  172. package/lib/{chunk-DQRVZFIR-BblmKnHy.js → chunk-DQRVZFIR-DHK7_Ilc.js} +7 -7
  173. package/lib/{chunk-DQRVZFIR-BblmKnHy.js.map → chunk-DQRVZFIR-DHK7_Ilc.js.map} +1 -1
  174. package/lib/{circular-DfOaDE_x.js → circular-CqHpo7-e.js} +2 -2
  175. package/lib/{circular-DfOaDE_x.js.map → circular-CqHpo7-e.js.map} +1 -1
  176. package/lib/clerk-BDZ31hjU.js +25190 -0
  177. package/lib/clerk-BDZ31hjU.js.map +1 -0
  178. package/lib/{createServer-DjOMygls.js → createServer-ByKo3XCG.js} +4 -4
  179. package/lib/{createServer-DjOMygls.js.map → createServer-ByKo3XCG.js.map} +1 -1
  180. package/lib/{errors-D_5vKvUq.js → errors-BsabiSKg.js} +5 -5
  181. package/lib/{errors-D_5vKvUq.js.map → errors-BsabiSKg.js.map} +1 -1
  182. package/lib/{hook-CHXroBFt.js → hook-Bd0yS8M0.js} +36 -36
  183. package/lib/{hook-CHXroBFt.js.map → hook-Bd0yS8M0.js.map} +1 -1
  184. package/lib/index-BIbCx5Fh.js +3919 -0
  185. package/lib/index-BIbCx5Fh.js.map +1 -0
  186. package/lib/index-CEfpz8vY.js +3458 -0
  187. package/lib/index-CEfpz8vY.js.map +1 -0
  188. package/lib/{index-BvvmIczU.js → index-CcV90rin.js} +2 -2
  189. package/lib/{index-BvvmIczU.js.map → index-CcV90rin.js.map} +1 -1
  190. package/lib/index-ClhS5TxS.js +107 -0
  191. package/lib/index-ClhS5TxS.js.map +1 -0
  192. package/lib/ui/CodeBlock.js +6 -73
  193. package/lib/ui/CodeBlock.js.map +1 -1
  194. package/lib/ui/Command.js +1 -1
  195. package/lib/ui/Dialog.js +1 -1
  196. package/lib/ui/Dialog.js.map +1 -1
  197. package/lib/ui/EmbeddedCodeBlock.js +1 -1
  198. package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
  199. package/lib/ui/Select.js +1 -1
  200. package/lib/ui/Select.js.map +1 -1
  201. package/lib/ui/SyntaxHighlight.js +3 -3
  202. package/lib/{useExposedProps-BZQkZneR.js → useExposedProps-BIYjecPD.js} +2 -2
  203. package/lib/{useExposedProps-BZQkZneR.js.map → useExposedProps-BIYjecPD.js.map} +1 -1
  204. package/lib/zudoku.auth-auth0.js +1 -1
  205. package/lib/zudoku.auth-azureb2c.js +2 -2
  206. package/lib/zudoku.auth-clerk.js +3 -3
  207. package/lib/zudoku.auth-openid.js +2 -2
  208. package/lib/zudoku.components.js +33 -3534
  209. package/lib/zudoku.components.js.map +1 -1
  210. package/lib/zudoku.hooks.js +10 -11
  211. package/lib/zudoku.hooks.js.map +1 -1
  212. package/lib/zudoku.plugin-api-catalog.js +6 -6
  213. package/lib/zudoku.plugin-api-keys.js +268 -321
  214. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  215. package/lib/zudoku.plugin-custom-pages.js +8 -20
  216. package/lib/zudoku.plugin-custom-pages.js.map +1 -1
  217. package/lib/zudoku.plugin-markdown.js +4 -5
  218. package/lib/zudoku.plugin-markdown.js.map +1 -1
  219. package/lib/zudoku.plugin-openapi.js +3 -3
  220. package/lib/zudoku.plugin-redirect.js +1 -1
  221. package/lib/zudoku.plugin-search-pagefind.js +201 -111
  222. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  223. package/package.json +5 -4
  224. package/src/lib/components/Autocomplete.tsx +1 -0
  225. package/src/lib/components/ErrorPage.tsx +3 -3
  226. package/src/lib/components/Markdown.tsx +3 -5
  227. package/src/lib/components/NotFoundPage.tsx +3 -3
  228. package/src/lib/components/Pagination.tsx +4 -4
  229. package/src/lib/components/Typography.tsx +14 -0
  230. package/src/lib/components/index.ts +2 -0
  231. package/src/lib/errors/ErrorAlert.tsx +3 -9
  232. package/src/lib/hooks/useHotkey.ts +70 -0
  233. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +5 -9
  234. package/src/lib/plugins/custom-pages/index.tsx +2 -6
  235. package/src/lib/plugins/markdown/MdxPage.tsx +66 -15
  236. package/src/lib/plugins/markdown/index.tsx +10 -2
  237. package/src/lib/plugins/openapi/OperationList.tsx +7 -17
  238. package/src/lib/plugins/openapi/OperationListItem.tsx +2 -2
  239. package/src/lib/plugins/openapi/ParameterListItem.tsx +6 -0
  240. package/src/lib/plugins/openapi/SchemaList.tsx +3 -9
  241. package/src/lib/plugins/openapi/SidecarExamples.tsx +1 -0
  242. package/src/lib/plugins/openapi/playground/BodyPanel.tsx +36 -28
  243. package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +47 -0
  244. package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +7 -3
  245. package/src/lib/plugins/openapi/playground/Headers.tsx +187 -89
  246. package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +3 -2
  247. package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +7 -12
  248. package/src/lib/plugins/openapi/playground/InlineInput.tsx +1 -1
  249. package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +2 -2
  250. package/src/lib/plugins/openapi/playground/PathParams.tsx +3 -4
  251. package/src/lib/plugins/openapi/playground/Playground.tsx +196 -136
  252. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
  253. package/src/lib/plugins/openapi/playground/QueryParams.tsx +102 -58
  254. package/src/lib/plugins/openapi/playground/Spinner.tsx +87 -0
  255. package/src/lib/plugins/openapi/playground/request-panel/UrlPath.tsx +31 -0
  256. package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +25 -0
  257. package/src/lib/plugins/openapi/playground/result-panel/Highlight.tsx +26 -0
  258. package/src/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.tsx +104 -0
  259. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +98 -97
  260. package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +62 -92
  261. package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +3 -3
  262. package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +2 -3
  263. package/src/lib/plugins/openapi/schema/SchemaView.tsx +5 -10
  264. package/src/lib/plugins/openapi/schema/utils.ts +3 -2
  265. package/src/lib/ui/CodeBlock.tsx +5 -6
  266. package/src/lib/ui/Dialog.tsx +1 -1
  267. package/src/lib/ui/EmbeddedCodeBlock.tsx +1 -1
  268. package/src/lib/ui/Select.tsx +1 -1
  269. package/src/lib/util/os.ts +18 -0
  270. package/src/lib/util/useCopyToClipboard.ts +17 -0
  271. package/dist/flat-config.d.ts +0 -320
  272. package/dist/lib/plugins/custom-pages/CustomPage.d.ts +0 -2
  273. package/dist/lib/plugins/custom-pages/CustomPage.js +0 -11
  274. package/dist/lib/plugins/custom-pages/CustomPage.js.map +0 -1
  275. package/dist/lib/plugins/openapi/playground/UrlDisplay.d.ts +0 -4
  276. package/dist/lib/plugins/openapi/playground/UrlDisplay.js +0 -22
  277. package/dist/lib/plugins/openapi/playground/UrlDisplay.js.map +0 -1
  278. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.d.ts +0 -7
  279. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +0 -11
  280. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js.map +0 -1
  281. package/lib/Callout-CoVxYafP.js +0 -231
  282. package/lib/Callout-CoVxYafP.js.map +0 -1
  283. package/lib/CategoryHeading-Cu2RwgjC.js +0 -10
  284. package/lib/CategoryHeading-Cu2RwgjC.js.map +0 -1
  285. package/lib/Dialog-BxpuVLh9.js.map +0 -1
  286. package/lib/Markdown-BQ8YqLsz.js.map +0 -1
  287. package/lib/MdxPage-DJvKmI-r.js +0 -84
  288. package/lib/MdxPage-DJvKmI-r.js.map +0 -1
  289. package/lib/OperationList-Dpip6ozi.js.map +0 -1
  290. package/lib/Pagination-CCxhL836.js +0 -36
  291. package/lib/Pagination-CCxhL836.js.map +0 -1
  292. package/lib/RouteGuard-gV7nvzi7.js +0 -55
  293. package/lib/RouteGuard-gV7nvzi7.js.map +0 -1
  294. package/lib/SchemaList-t4BIfh6Z.js.map +0 -1
  295. package/lib/SchemaView-CLxthVcA.js.map +0 -1
  296. package/lib/Slot-CSEIvwwO.js +0 -161
  297. package/lib/Slot-CSEIvwwO.js.map +0 -1
  298. package/lib/clerk-yAKDC3Qz.js +0 -24812
  299. package/lib/clerk-yAKDC3Qz.js.map +0 -1
  300. package/lib/index--oeBayMa.js +0 -86
  301. package/lib/index--oeBayMa.js.map +0 -1
  302. package/lib/index-Bn6Lc9tq.js +0 -9
  303. package/lib/index-Bn6Lc9tq.js.map +0 -1
  304. package/lib/index-DW2qmCJa.js +0 -3227
  305. package/lib/index-DW2qmCJa.js.map +0 -1
  306. package/lib/index-QzXzw_ra.js +0 -24
  307. package/lib/index-QzXzw_ra.js.map +0 -1
  308. package/lib/index.esm-BFcSKCe-.js +0 -683
  309. package/lib/index.esm-BFcSKCe-.js.map +0 -1
  310. package/lib/mutation-BpcyTgWI.js +0 -196
  311. package/lib/mutation-BpcyTgWI.js.map +0 -1
  312. package/lib/objectEntries-yMIkr2mI.js +0 -5
  313. package/lib/objectEntries-yMIkr2mI.js.map +0 -1
  314. package/lib/react-nprogress.esm-C2MPXjiJ.js +0 -389
  315. package/lib/react-nprogress.esm-C2MPXjiJ.js.map +0 -1
  316. package/lib/useLatest-hmRS46UF.js +0 -11
  317. package/lib/useLatest-hmRS46UF.js.map +0 -1
  318. package/lib/useMutation-N4ockVKi.js +0 -97
  319. package/lib/useMutation-N4ockVKi.js.map +0 -1
  320. package/src/lib/plugins/custom-pages/CustomPage.tsx +0 -18
  321. package/src/lib/plugins/openapi/playground/UrlDisplay.tsx +0 -32
  322. package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +0 -73
@@ -1,51 +1,49 @@
1
1
  import { j as e } from "./jsx-runtime-C5mzlN2N.js";
2
- import { CircleSlashIcon as M, CheckIcon as V, XIcon as ae, PencilLineIcon as oe, RefreshCwIcon as le, EyeOffIcon as ce, EyeIcon as de, CopyIcon as ue, TrashIcon as fe, KeyRoundIcon as he } from "lucide-react";
3
- import { D as pe, S as B, R as me } from "./Slot-CSEIvwwO.js";
4
- import { i as D } from "./invariant-DAFpPywt.js";
5
- import { O as xe, L as J } from "./chunk-DQRVZFIR-BblmKnHy.js";
6
- import { i as ye, k as ge, e as je, d as ve } from "./hook-CHXroBFt.js";
7
- import { Button as j } from "./ui/Button.js";
8
- import { u as S } from "./useMutation-N4ockVKi.js";
9
- import * as F from "react";
10
- import Ce, { createContext as O, useRef as P, useLayoutEffect as we, useEffect as W, useId as Q, useContext as _, useInsertionEffect as ke, useMemo as $, useCallback as be, Children as Ee, isValidElement as Ne, useState as E } from "react";
11
- import { c as Pe } from "./index-DI5SPFK9.js";
12
- import { c as N } from "./cn-wvCW-ho6.js";
13
- import { C as De, a as Ie } from "./Card-DPhGbYUM.js";
14
- import { D as X, e as Y, a as G, b as Z, c as ee, d as te, f as se, g as A } from "./Dialog-BxpuVLh9.js";
15
- import { Input as Ke } from "./ui/Input.js";
16
- const Re = () => {
17
- const t = ye();
18
- return t.isAuthEnabled && t.isPending ? null : t.isAuthenticated ? /* @__PURE__ */ e.jsx(xe, {}) : t.isAuthEnabled ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2", children: [
2
+ import { CircleSlashIcon as R, CheckIcon as _, XIcon as se, PencilLineIcon as ne, RefreshCwIcon as ie, EyeOffIcon as re, EyeIcon as ae, CopyIcon as oe, TrashIcon as le, KeyRoundIcon as ce } from "lucide-react";
3
+ import { D as de, a as F, R as ue } from "./Slot-DwZlQ-vX.js";
4
+ import { i as E } from "./invariant-DAFpPywt.js";
5
+ import { O as he, L as $ } from "./chunk-DQRVZFIR-DHK7_Ilc.js";
6
+ import { e as pe, d as fe, g as me, c as xe } from "./hook-Bd0yS8M0.js";
7
+ import { Button as y } from "./ui/Button.js";
8
+ import { u as z, A as T, a as M } from "./Alert-CT_ViLrJ.js";
9
+ import * as q from "react";
10
+ import ye, { createContext as L, useLayoutEffect as ge, useEffect as je, useRef as k, useId as H, useContext as B, useInsertionEffect as Ce, useCallback as ve, useMemo as S, Children as we, isValidElement as ke, useState as b } from "react";
11
+ import { C as be, a as Ee } from "./Card-DPhGbYUM.js";
12
+ import { D as J, e as U, a as V, c as Y, b as G, d as Z, f as W, g as K } from "./Dialog-DGlrUTCS.js";
13
+ import { Input as Ne } from "./ui/Input.js";
14
+ import { c as P } from "./cn-wvCW-ho6.js";
15
+ import { u as De } from "./CodeBlock-DAKxs_Tu.js";
16
+ const Ie = () => {
17
+ const t = pe();
18
+ return t.isAuthEnabled && t.isPending ? null : t.isAuthenticated ? /* @__PURE__ */ e.jsx(he, {}) : t.isAuthEnabled ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2", children: [
19
19
  "Please login first to view this page",
20
- /* @__PURE__ */ e.jsx(j, { onClick: () => t.login(), children: "Login" })
21
- ] }) : /* @__PURE__ */ e.jsx("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2", children: /* @__PURE__ */ e.jsxs(pe, { className: "max-w-[600px]", children: [
20
+ /* @__PURE__ */ e.jsx(y, { onClick: () => t.login(), children: "Login" })
21
+ ] }) : /* @__PURE__ */ e.jsx("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2", children: /* @__PURE__ */ e.jsxs(de, { className: "max-w-[600px]", children: [
22
22
  "Authentication needs to be enabled for API keys to work. Enable it in your Zudoku configuration under ",
23
23
  /* @__PURE__ */ e.jsx("code", { children: "authentication" }),
24
24
  "."
25
25
  ] }) });
26
- }, Ae = O({});
27
- function ne(t) {
28
- const i = P(null);
29
- return i.current === null && (i.current = t()), i.current;
30
- }
31
- const Te = typeof window < "u", ze = Te ? we : W, ie = /* @__PURE__ */ O(null);
32
- function Me(t) {
33
- return typeof t == "object" && t !== null;
34
- }
35
- function Se(t) {
36
- return Me(t) && "offsetHeight" in t;
37
- }
38
- const qe = O({
26
+ }, Ke = (t) => t;
27
+ let X = Ke;
28
+ process.env.NODE_ENV !== "production" && (X = (t, i) => {
29
+ if (!t)
30
+ throw new Error(i);
31
+ });
32
+ const Pe = L(null), Ae = L({}), Re = L({
39
33
  transformPagePoint: (t) => t,
40
34
  isStatic: !1,
41
35
  reducedMotion: "never"
42
- });
43
- class Le extends F.Component {
36
+ }), ze = typeof window < "u", Te = ze ? ge : je;
37
+ function ee(t) {
38
+ const i = k(null);
39
+ return i.current === null && (i.current = t()), i.current;
40
+ }
41
+ class Me extends q.Component {
44
42
  getSnapshotBeforeUpdate(i) {
45
43
  const s = this.props.childRef.current;
46
44
  if (s && i.isPresent && !this.props.isPresent) {
47
- const n = s.offsetParent, o = Se(n) && n.offsetWidth || 0, r = this.props.sizeRef.current;
48
- r.height = s.offsetHeight || 0, r.width = s.offsetWidth || 0, r.top = s.offsetTop, r.left = s.offsetLeft, r.right = o - r.width - r.left;
45
+ const n = this.props.sizeRef.current;
46
+ n.height = s.offsetHeight || 0, n.width = s.offsetWidth || 0, n.top = s.offsetTop, n.left = s.offsetLeft;
49
47
  }
50
48
  return null;
51
49
  }
@@ -58,277 +56,230 @@ class Le extends F.Component {
58
56
  return this.props.children;
59
57
  }
60
58
  }
61
- function $e({ children: t, isPresent: i, anchorX: s }) {
62
- const n = Q(), o = P(null), r = P({
59
+ function Se({ children: t, isPresent: i }) {
60
+ const s = H(), n = k(null), o = k({
63
61
  width: 0,
64
62
  height: 0,
65
63
  top: 0,
66
- left: 0,
67
- right: 0
68
- }), { nonce: u } = _(qe);
69
- return ke(() => {
70
- const { width: x, height: f, top: h, left: d, right: l } = r.current;
71
- if (i || !o.current || !x || !f)
64
+ left: 0
65
+ }), { nonce: l } = B(Re);
66
+ return Ce(() => {
67
+ const { width: m, height: a, top: x, left: h } = o.current;
68
+ if (i || !n.current || !m || !a)
72
69
  return;
73
- const y = s === "left" ? `left: ${d}` : `right: ${l}`;
74
- o.current.dataset.motionPopId = n;
70
+ n.current.dataset.motionPopId = s;
75
71
  const p = document.createElement("style");
76
- return u && (p.nonce = u), document.head.appendChild(p), p.sheet && p.sheet.insertRule(`
77
- [data-motion-pop-id="${n}"] {
72
+ return l && (p.nonce = l), document.head.appendChild(p), p.sheet && p.sheet.insertRule(`
73
+ [data-motion-pop-id="${s}"] {
78
74
  position: absolute !important;
79
- width: ${x}px !important;
80
- height: ${f}px !important;
81
- ${y}px !important;
82
- top: ${h}px !important;
75
+ width: ${m}px !important;
76
+ height: ${a}px !important;
77
+ top: ${x}px !important;
78
+ left: ${h}px !important;
83
79
  }
84
80
  `), () => {
85
- document.head.contains(p) && document.head.removeChild(p);
81
+ document.head.removeChild(p);
86
82
  };
87
- }, [i]), e.jsx(Le, { isPresent: i, childRef: o, sizeRef: r, children: F.cloneElement(t, { ref: o }) });
83
+ }, [i]), e.jsx(Me, { isPresent: i, childRef: n, sizeRef: o, children: q.cloneElement(t, { ref: n }) });
88
84
  }
89
- const Fe = ({ children: t, initial: i, isPresent: s, onExitComplete: n, custom: o, presenceAffectsLayout: r, mode: u, anchorX: x }) => {
90
- const f = ne(Oe), h = Q();
91
- let d = !0, l = $(() => (d = !1, {
92
- id: h,
93
- initial: i,
94
- isPresent: s,
95
- custom: o,
96
- onExitComplete: (y) => {
97
- f.set(y, !0);
98
- for (const p of f.values())
99
- if (!p)
100
- return;
101
- n && n();
102
- },
103
- register: (y) => (f.set(y, !1), () => f.delete(y))
104
- }), [s, f, n]);
105
- return r && d && (l = { ...l }), $(() => {
106
- f.forEach((y, p) => f.set(p, !1));
107
- }, [s]), F.useEffect(() => {
108
- !s && !f.size && n && n();
109
- }, [s]), u === "popLayout" && (t = e.jsx($e, { isPresent: s, anchorX: x, children: t })), e.jsx(ie.Provider, { value: l, children: t });
85
+ const qe = ({ children: t, initial: i, isPresent: s, onExitComplete: n, custom: o, presenceAffectsLayout: l, mode: m }) => {
86
+ const a = ee(Le), x = H(), h = ve((d) => {
87
+ a.set(d, !0);
88
+ for (const C of a.values())
89
+ if (!C)
90
+ return;
91
+ n && n();
92
+ }, [a, n]), p = S(
93
+ () => ({
94
+ id: x,
95
+ initial: i,
96
+ isPresent: s,
97
+ custom: o,
98
+ onExitComplete: h,
99
+ register: (d) => (a.set(d, !1), () => a.delete(d))
100
+ }),
101
+ /**
102
+ * If the presence of a child affects the layout of the components around it,
103
+ * we want to make a new context value to ensure they get re-rendered
104
+ * so they can detect that layout change.
105
+ */
106
+ l ? [Math.random(), h] : [s, h]
107
+ );
108
+ return S(() => {
109
+ a.forEach((d, C) => a.set(C, !1));
110
+ }, [s]), q.useEffect(() => {
111
+ !s && !a.size && n && n();
112
+ }, [s]), m === "popLayout" && (t = e.jsx(Se, { isPresent: s, children: t })), e.jsx(Pe.Provider, { value: p, children: t });
110
113
  };
111
- function Oe() {
114
+ function Le() {
112
115
  return /* @__PURE__ */ new Map();
113
116
  }
114
- function Qe(t = !0) {
115
- const i = _(ie);
116
- if (i === null)
117
- return [!0, null];
118
- const { isPresent: s, onExitComplete: n, register: o } = i, r = Q();
119
- W(() => {
120
- if (t)
121
- return o(r);
122
- }, [t]);
123
- const u = be(() => t && n && n(r), [r, n, t]);
124
- return !s && n ? [!1, u] : [!0];
125
- }
126
- const I = (t) => t.key || "";
127
- function U(t) {
117
+ const N = (t) => t.key || "";
118
+ function Q(t) {
128
119
  const i = [];
129
- return Ee.forEach(t, (s) => {
130
- Ne(s) && i.push(s);
120
+ return we.forEach(t, (s) => {
121
+ ke(s) && i.push(s);
131
122
  }), i;
132
123
  }
133
- const _e = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presenceAffectsLayout: o = !0, mode: r = "sync", propagate: u = !1, anchorX: x = "left" }) => {
134
- const [f, h] = Qe(u), d = $(() => U(t), [t]), l = u && !f ? [] : d.map(I), y = P(!0), p = P(d), k = ne(() => /* @__PURE__ */ new Map()), [a, c] = E(d), [m, C] = E(d);
135
- ze(() => {
136
- y.current = !1, p.current = d;
137
- for (let w = 0; w < m.length; w++) {
138
- const g = I(m[w]);
139
- l.includes(g) ? k.delete(g) : k.get(g) !== !0 && k.set(g, !1);
124
+ const Oe = ({ children: t, exitBeforeEnter: i, custom: s, initial: n = !0, onExitComplete: o, presenceAffectsLayout: l = !0, mode: m = "sync" }) => {
125
+ X(!i, "Replace exitBeforeEnter with mode='wait'");
126
+ const a = S(() => Q(t), [t]), x = a.map(N), h = k(!0), p = k(a), d = ee(() => /* @__PURE__ */ new Map()), [C, w] = b(a), [j, r] = b(a);
127
+ Te(() => {
128
+ h.current = !1, p.current = a;
129
+ for (let f = 0; f < j.length; f++) {
130
+ const u = N(j[f]);
131
+ x.includes(u) ? d.delete(u) : d.get(u) !== !0 && d.set(u, !1);
140
132
  }
141
- }, [m, l.length, l.join("-")]);
142
- const v = [];
143
- if (d !== a) {
144
- let w = [...d];
145
- for (let g = 0; g < m.length; g++) {
146
- const b = m[g], z = I(b);
147
- l.includes(z) || (w.splice(g, 0, b), v.push(b));
133
+ }, [j, x.length, x.join("-")]);
134
+ const c = [];
135
+ if (a !== C) {
136
+ let f = [...a];
137
+ for (let u = 0; u < j.length; u++) {
138
+ const v = j[u], A = N(v);
139
+ x.includes(A) || (f.splice(u, 0, v), c.push(v));
148
140
  }
149
- return r === "wait" && v.length && (w = v), C(U(w)), c(d), null;
141
+ m === "wait" && c.length && (f = c), r(Q(f)), w(a);
142
+ return;
150
143
  }
151
- process.env.NODE_ENV !== "production" && r === "wait" && m.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.`);
152
- const { forceRender: T } = _(Ae);
153
- return e.jsx(e.Fragment, { children: m.map((w) => {
154
- const g = I(w), b = u && !f ? !1 : d === m || l.includes(g), z = () => {
155
- if (k.has(g))
156
- k.set(g, !0);
144
+ process.env.NODE_ENV !== "production" && m === "wait" && j.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.`);
145
+ const { forceRender: g } = B(Ae);
146
+ return e.jsx(e.Fragment, { children: j.map((f) => {
147
+ const u = N(f), v = a === j || x.includes(u), A = () => {
148
+ if (d.has(u))
149
+ d.set(u, !0);
157
150
  else
158
151
  return;
159
- let H = !0;
160
- k.forEach((re) => {
161
- re || (H = !1);
162
- }), H && (T?.(), C(p.current), u && h?.(), n && n());
152
+ let O = !0;
153
+ d.forEach((te) => {
154
+ te || (O = !1);
155
+ }), O && (g?.(), r(p.current), o && o());
163
156
  };
164
- return e.jsx(Fe, { isPresent: b, initial: !y.current || s ? void 0 : !1, custom: i, presenceAffectsLayout: o, mode: r, onExitComplete: b ? void 0 : z, anchorX: x, children: w }, g);
157
+ return e.jsx(qe, { isPresent: v, initial: !h.current || n ? void 0 : !1, custom: v ? void 0 : s, presenceAffectsLayout: l, mode: m, onExitComplete: v ? void 0 : A, children: f }, u);
165
158
  }) });
166
- }, He = Pe(
167
- "relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
168
- {
169
- variants: {
170
- variant: {
171
- default: "bg-card text-card-foreground",
172
- destructive: "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"
173
- }
174
- },
175
- defaultVariants: {
176
- variant: "default"
177
- }
178
- }
179
- );
180
- function q({
181
- className: t,
182
- variant: i,
183
- ...s
184
- }) {
185
- return /* @__PURE__ */ e.jsx(
186
- "div",
187
- {
188
- "data-slot": "alert",
189
- role: "alert",
190
- className: N(He({ variant: i }), t),
191
- ...s
192
- }
193
- );
194
- }
195
- function L({ className: t, ...i }) {
196
- return /* @__PURE__ */ e.jsx(
197
- "div",
198
- {
199
- "data-slot": "alert-title",
200
- className: N(
201
- "col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
202
- t
203
- ),
204
- ...i
205
- }
206
- );
207
- }
208
- const Be = ({ service: t }) => {
209
- const i = ge(), s = je(), [n, o] = E(
159
+ }, Fe = ({ service: t }) => {
160
+ const i = fe(), s = me(), [n, o] = b(
210
161
  null
211
- ), [r, u] = E(""), { data: x, isFetching: f } = ve({
162
+ ), [l, m] = b(""), { data: a, isFetching: x } = xe({
212
163
  queryFn: () => t.getConsumers(i),
213
164
  queryKey: ["api-keys"],
214
165
  retry: !1
215
- }), h = S({
166
+ }), h = z({
216
167
  mutationFn: ({
217
- consumerId: a,
168
+ consumerId: r,
218
169
  keyId: c
219
170
  }) => {
220
171
  if (!t.deleteKey)
221
172
  throw new Error("deleteKey not implemented");
222
- return t.deleteKey(a, c, i);
173
+ return t.deleteKey(r, c, i);
223
174
  },
224
- onMutate: async ({ consumerId: a, keyId: c }) => {
175
+ onMutate: async ({ consumerId: r, keyId: c }) => {
225
176
  await s.cancelQueries({ queryKey: ["api-keys"] });
226
- const m = s.getQueryData([
177
+ const g = s.getQueryData([
227
178
  "api-keys"
228
179
  ]);
229
- return s.setQueryData(["api-keys"], (C) => C && C.map((v) => v.id === a ? {
230
- ...v,
231
- apiKeys: v.apiKeys.filter((T) => T.id !== c)
232
- } : v)), { previousData: m };
180
+ return s.setQueryData(["api-keys"], (f) => f && f.map((u) => u.id === r ? {
181
+ ...u,
182
+ apiKeys: u.apiKeys.filter((v) => v.id !== c)
183
+ } : u)), { previousData: g };
233
184
  },
234
- onError: (a, c, m) => {
235
- m?.previousData && s.setQueryData(["api-keys"], m.previousData);
185
+ onError: (r, c, g) => {
186
+ g?.previousData && s.setQueryData(["api-keys"], g.previousData);
236
187
  },
237
188
  onSuccess: () => {
238
189
  s.invalidateQueries({ queryKey: ["api-keys"] });
239
190
  }
240
- }), d = S({
191
+ }), p = z({
241
192
  mutationFn: ({
242
- consumerId: a,
193
+ consumerId: r,
243
194
  label: c
244
195
  }) => {
245
196
  if (!t.updateConsumer)
246
197
  throw new Error("updateConsumer not implemented");
247
- return t.updateConsumer({ id: a, label: c }, i);
198
+ return t.updateConsumer({ id: r, label: c }, i);
248
199
  },
249
- onMutate: async ({ consumerId: a, label: c }) => {
200
+ onMutate: async ({ consumerId: r, label: c }) => {
250
201
  await s.cancelQueries({ queryKey: ["api-keys"] });
251
- const m = s.getQueryData(["api-keys"]);
252
- return s.setQueryData(["api-keys"], (C) => C && C.map((v) => v.id === a ? {
253
- ...v,
202
+ const g = s.getQueryData(["api-keys"]);
203
+ return s.setQueryData(["api-keys"], (f) => f && f.map((u) => u.id === r ? {
204
+ ...u,
254
205
  label: c
255
- } : v)), { previousData: m };
206
+ } : u)), { previousData: g };
256
207
  },
257
- onError: (a, c, m) => {
258
- m?.previousData && s.setQueryData(["api-keys"], m.previousData);
208
+ onError: (r, c, g) => {
209
+ g?.previousData && s.setQueryData(["api-keys"], g.previousData);
259
210
  },
260
211
  onSuccess: () => {
261
212
  s.invalidateQueries({ queryKey: ["api-keys"] });
262
213
  }
263
- }), l = S({
264
- mutationFn: (a) => {
214
+ }), d = z({
215
+ mutationFn: (r) => {
265
216
  if (!t.rollKey)
266
217
  throw new Error("rollKey not implemented");
267
- return t.rollKey(a, i);
218
+ return t.rollKey(r, i);
268
219
  },
269
220
  onSuccess: () => s.invalidateQueries({ queryKey: ["api-keys"] })
270
- }), y = (a, c) => {
271
- o(a), u(c);
272
- }, p = (a) => {
273
- r.trim() && d.mutate({
274
- consumerId: a,
275
- label: r.trim()
276
- }), o(null), u("");
277
- }, k = () => {
278
- o(null), u("");
221
+ }), C = (r, c) => {
222
+ o(r), m(c);
223
+ }, w = (r) => {
224
+ l.trim() && p.mutate({
225
+ consumerId: r,
226
+ label: l.trim()
227
+ }), o(null), m("");
228
+ }, j = () => {
229
+ o(null), m("");
279
230
  };
280
231
  return /* @__PURE__ */ e.jsxs("div", { className: "max-w-screen-md h-full pt-(--padding-content-top) pb-(--padding-content-bottom)", children: [
281
- /* @__PURE__ */ e.jsx(B.Target, { name: "api-keys-list-page" }),
232
+ /* @__PURE__ */ e.jsx(F.Target, { name: "api-keys-list-page" }),
282
233
  /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between pb-3", children: [
283
234
  /* @__PURE__ */ e.jsx("h1", { className: "font-medium text-2xl", children: "API Keys" }),
284
- t.createKey && /* @__PURE__ */ e.jsx(j, { asChild: !0, children: /* @__PURE__ */ e.jsx(J, { to: "/settings/api-keys/new", children: "Create API Key" }) })
235
+ t.createKey && /* @__PURE__ */ e.jsx(y, { asChild: !0, children: /* @__PURE__ */ e.jsx($, { to: "/settings/api-keys/new", children: "Create API Key" }) })
285
236
  ] }),
286
237
  /* @__PURE__ */ e.jsx("p", { children: "Create, manage, and monitor your API keys" }),
287
- /* @__PURE__ */ e.jsx(B.Target, { name: "api-keys-list-page-before-keys" }),
238
+ /* @__PURE__ */ e.jsx(F.Target, { name: "api-keys-list-page-before-keys" }),
288
239
  /* @__PURE__ */ e.jsx("div", { className: "h-8" }),
289
- l.isError && /* @__PURE__ */ e.jsxs(q, { variant: "destructive", className: "mb-4", children: [
290
- /* @__PURE__ */ e.jsx(M, { size: 16 }),
291
- /* @__PURE__ */ e.jsx(L, { children: l.error.message })
240
+ d.isError && /* @__PURE__ */ e.jsxs(T, { variant: "destructive", className: "mb-4", children: [
241
+ /* @__PURE__ */ e.jsx(R, { size: 16 }),
242
+ /* @__PURE__ */ e.jsx(M, { children: d.error.message })
292
243
  ] }),
293
- d.isError && /* @__PURE__ */ e.jsxs(q, { variant: "destructive", className: "mb-4", children: [
294
- /* @__PURE__ */ e.jsx(M, { size: 16 }),
295
- /* @__PURE__ */ e.jsx(L, { children: d.error.message })
244
+ p.isError && /* @__PURE__ */ e.jsxs(T, { variant: "destructive", className: "mb-4", children: [
245
+ /* @__PURE__ */ e.jsx(R, { size: 16 }),
246
+ /* @__PURE__ */ e.jsx(M, { children: p.error.message })
296
247
  ] }),
297
- h.isError && /* @__PURE__ */ e.jsxs(q, { variant: "destructive", className: "mb-4", children: [
298
- /* @__PURE__ */ e.jsx(M, { size: 16 }),
299
- /* @__PURE__ */ e.jsx(L, { children: h.error.message })
248
+ h.isError && /* @__PURE__ */ e.jsxs(T, { variant: "destructive", className: "mb-4", children: [
249
+ /* @__PURE__ */ e.jsx(R, { size: 16 }),
250
+ /* @__PURE__ */ e.jsx(M, { children: h.error.message })
300
251
  ] }),
301
- /* @__PURE__ */ e.jsx("div", { className: "", children: x.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: [
252
+ /* @__PURE__ */ e.jsx("div", { className: "", children: a.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: [
302
253
  /* @__PURE__ */ e.jsxs("p", { className: "text-center", children: [
303
254
  "You have no API keys yet.",
304
255
  /* @__PURE__ */ e.jsx("br", {}),
305
256
  t.createKey && "Get started and create your first key."
306
257
  ] }),
307
- t.createKey && /* @__PURE__ */ e.jsx(j, { asChild: !0, variant: "outline", children: /* @__PURE__ */ e.jsx(J, { to: "/settings/api-keys/new", children: "Create API Key" }) })
258
+ t.createKey && /* @__PURE__ */ e.jsx(y, { asChild: !0, variant: "outline", children: /* @__PURE__ */ e.jsx($, { to: "/settings/api-keys/new", children: "Create API Key" }) })
308
259
  ] }) : /* @__PURE__ */ e.jsx(
309
260
  "ul",
310
261
  {
311
- className: N(
262
+ className: P(
312
263
  "grid grid-cols-1 divide-y divide-border col-span-6",
313
264
  "lg:grid-cols-[1fr_min-content]"
314
265
  ),
315
- children: x.map((a) => /* @__PURE__ */ e.jsxs(
316
- De,
266
+ children: a.map((r) => /* @__PURE__ */ e.jsxs(
267
+ be,
317
268
  {
318
269
  className: "grid grid-cols-subgrid col-span-full items-center mb-4 group",
319
270
  children: [
320
- /* @__PURE__ */ e.jsxs(Ie, { className: "border-b col-span-full grid-cols-subgrid grid", children: [
271
+ /* @__PURE__ */ e.jsxs(Ee, { className: "border-b col-span-full grid-cols-subgrid grid", children: [
321
272
  /* @__PURE__ */ e.jsxs("div", { className: "h-10 flex flex-col text-sm justify-center", children: [
322
273
  /* @__PURE__ */ e.jsxs("div", { className: "font-medium text-lg flex items-center gap-2", children: [
323
- n === a.id ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 w-full", children: [
274
+ n === r.id ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 w-full", children: [
324
275
  /* @__PURE__ */ e.jsx(
325
- Ke,
276
+ Ne,
326
277
  {
327
278
  maxLength: 32,
328
- value: r,
329
- onChange: (c) => u(c.target.value),
279
+ value: l,
280
+ onChange: (c) => m(c.target.value),
330
281
  onKeyDown: (c) => {
331
- c.key === "Enter" ? p(a.id) : c.key === "Escape" && k();
282
+ c.key === "Enter" ? w(r.id) : c.key === "Escape" && j();
332
283
  },
333
284
  className: "text-lg font-medium",
334
285
  autoFocus: !0
@@ -336,90 +287,90 @@ const Be = ({ service: t }) => {
336
287
  ),
337
288
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
338
289
  /* @__PURE__ */ e.jsx(
339
- j,
290
+ y,
340
291
  {
341
292
  size: "icon",
342
293
  variant: "ghost",
343
- onClick: () => p(a.id),
344
- disabled: !r.trim(),
345
- children: /* @__PURE__ */ e.jsx(V, { size: 16 })
294
+ onClick: () => w(r.id),
295
+ disabled: !l.trim(),
296
+ children: /* @__PURE__ */ e.jsx(_, { size: 16 })
346
297
  }
347
298
  ),
348
299
  /* @__PURE__ */ e.jsx(
349
- j,
300
+ y,
350
301
  {
351
302
  size: "icon",
352
303
  variant: "ghost",
353
- onClick: k,
354
- children: /* @__PURE__ */ e.jsx(ae, { size: 16 })
304
+ onClick: j,
305
+ children: /* @__PURE__ */ e.jsx(se, { size: 16 })
355
306
  }
356
307
  )
357
308
  ] })
358
- ] }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: a.label }),
359
- /* @__PURE__ */ e.jsx("div", { className: "text-muted-foreground text-xs", children: a.createdOn })
309
+ ] }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: r.label }),
310
+ /* @__PURE__ */ e.jsx("div", { className: "text-muted-foreground text-xs", children: r.createdOn })
360
311
  ] }),
361
312
  /* @__PURE__ */ e.jsxs("div", { className: "text-muted-foreground text-xs", children: [
362
- a.createdOn && /* @__PURE__ */ e.jsxs("div", { children: [
313
+ r.createdOn && /* @__PURE__ */ e.jsxs("div", { children: [
363
314
  "Created on",
364
315
  " ",
365
- new Date(a.createdOn).toLocaleDateString()
316
+ new Date(r.createdOn).toLocaleDateString()
366
317
  ] }),
367
- a.expiresOn && /* @__PURE__ */ e.jsxs("div", { children: [
318
+ r.expiresOn && /* @__PURE__ */ e.jsxs("div", { children: [
368
319
  "Expires on",
369
320
  " ",
370
- new Date(a.expiresOn).toLocaleDateString()
321
+ new Date(r.expiresOn).toLocaleDateString()
371
322
  ] })
372
323
  ] })
373
324
  ] }),
374
325
  /* @__PURE__ */ e.jsxs("div", { className: "flex justify-end", children: [
375
326
  t.updateConsumer && /* @__PURE__ */ e.jsxs(
376
- j,
327
+ y,
377
328
  {
378
329
  variant: "ghost",
379
- onClick: () => y(a.id, a.label),
380
- className: N(
330
+ onClick: () => C(r.id, r.label),
331
+ className: P(
381
332
  "flex gap-2",
382
- n === a.id && "opacity-0! pointer-events-none"
333
+ n === r.id && "opacity-0! pointer-events-none"
383
334
  ),
384
- disabled: n === a.id,
335
+ disabled: n === r.id,
385
336
  children: [
386
- /* @__PURE__ */ e.jsx(oe, { size: 16 }),
337
+ /* @__PURE__ */ e.jsx(ne, { size: 16 }),
387
338
  "Edit label"
388
339
  ]
389
340
  }
390
341
  ),
391
- t.rollKey && /* @__PURE__ */ e.jsxs(X, { children: [
392
- /* @__PURE__ */ e.jsx(Y, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
393
- j,
342
+ t.rollKey && /* @__PURE__ */ e.jsxs(J, { children: [
343
+ /* @__PURE__ */ e.jsx(U, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
344
+ y,
394
345
  {
395
346
  title: "Roll this key",
396
347
  variant: "ghost",
397
- disabled: l.isPending,
348
+ disabled: d.isPending,
398
349
  className: "flex items-center gap-2",
399
350
  children: [
400
351
  /* @__PURE__ */ e.jsx(
401
- le,
352
+ ie,
402
353
  {
403
354
  size: 16,
404
- className: l.isPending ? "animate-spin" : void 0
355
+ className: d.isPending ? "animate-spin" : void 0
405
356
  }
406
357
  ),
407
358
  "Roll key"
408
359
  ]
409
360
  }
410
361
  ) }),
411
- /* @__PURE__ */ e.jsxs(G, { children: [
412
- /* @__PURE__ */ e.jsxs(Z, { children: [
413
- /* @__PURE__ */ e.jsx(ee, { children: "Roll API Key" }),
414
- /* @__PURE__ */ e.jsx(te, { children: "Are you sure you want to roll this API key?" })
362
+ /* @__PURE__ */ e.jsxs(V, { children: [
363
+ /* @__PURE__ */ e.jsxs(Y, { children: [
364
+ /* @__PURE__ */ e.jsx(G, { children: "Roll API Key" }),
365
+ /* @__PURE__ */ e.jsx(Z, { children: "Are you sure you want to roll this API key?" })
415
366
  ] }),
416
- /* @__PURE__ */ e.jsxs(se, { children: [
417
- /* @__PURE__ */ e.jsx(A, { asChild: !0, children: /* @__PURE__ */ e.jsx(j, { variant: "outline", children: "Cancel" }) }),
418
- /* @__PURE__ */ e.jsx(A, { asChild: !0, children: /* @__PURE__ */ e.jsx(
419
- j,
367
+ /* @__PURE__ */ e.jsxs(W, { children: [
368
+ /* @__PURE__ */ e.jsx(K, { asChild: !0, children: /* @__PURE__ */ e.jsx(y, { variant: "outline", children: "Cancel" }) }),
369
+ /* @__PURE__ */ e.jsx(K, { asChild: !0, children: /* @__PURE__ */ e.jsx(
370
+ y,
420
371
  {
421
372
  onClick: () => {
422
- l.mutate(a.id);
373
+ d.mutate(r.id);
423
374
  },
424
375
  children: "Roll Key"
425
376
  }
@@ -429,113 +380,109 @@ const Be = ({ service: t }) => {
429
380
  ] })
430
381
  ] })
431
382
  ] }),
432
- /* @__PURE__ */ e.jsx("div", { className: "col-span-full grid-cols-subgrid grid", children: /* @__PURE__ */ e.jsx(_e, { children: a.apiKeys.map((c) => /* @__PURE__ */ e.jsxs(Ce.Fragment, { children: [
383
+ /* @__PURE__ */ e.jsx("div", { className: "col-span-full grid-cols-subgrid grid", children: /* @__PURE__ */ e.jsx(Oe, { children: r.apiKeys.map((c) => /* @__PURE__ */ e.jsxs(ye.Fragment, { children: [
433
384
  /* @__PURE__ */ e.jsx(
434
- Ue,
385
+ Qe,
435
386
  {
436
387
  apiKey: c,
437
388
  onDeleteKey: () => {
438
389
  h.mutate({
439
- consumerId: a.id,
390
+ consumerId: r.id,
440
391
  keyId: c.id
441
392
  });
442
393
  },
443
- className: h.variables?.keyId === c.id && (h.isPending || f) ? "opacity-10!" : void 0
394
+ className: h.variables?.keyId === c.id && (h.isPending || x) ? "opacity-10!" : void 0
444
395
  }
445
396
  ),
446
397
  /* @__PURE__ */ e.jsx("div", { className: "col-span-full h-px bg-border" })
447
398
  ] }, c.id)) }) })
448
399
  ]
449
400
  },
450
- a.id
401
+ r.id
451
402
  ))
452
403
  }
453
404
  ) })
454
405
  ] });
455
- }, Je = (t) => {
406
+ }, $e = (t) => {
456
407
  const i = /* @__PURE__ */ new Date(), s = new Date(t), n = Math.floor((i.getTime() - s.getTime()) / 1e3), o = new Intl.RelativeTimeFormat("en", { numeric: "auto" });
457
408
  return n < 60 ? o.format(-n, "second") : n < 3600 ? o.format(-Math.floor(n / 60), "minute") : n < 86400 ? o.format(-Math.floor(n / 3600), "hour") : n < 2592e3 ? o.format(-Math.floor(n / 86400), "day") : n < 31536e3 ? o.format(-Math.floor(n / 2592e3), "month") : o.format(-Math.floor(n / 31536e3), "year");
458
- }, Ue = ({
409
+ }, Qe = ({
459
410
  apiKey: t,
460
411
  onDeleteKey: i,
461
412
  className: s
462
413
  }) => {
463
- const [n, o] = E(!1), [r, u] = E(!1), { key: x, createdOn: f, expiresOn: h } = t, d = h && new Date(h) < /* @__PURE__ */ new Date(), l = h ? Math.ceil(
414
+ const [n, o] = b(!1), [l, m] = De(), { key: a, createdOn: x, expiresOn: h } = t, p = h && new Date(h) < /* @__PURE__ */ new Date(), d = h ? Math.ceil(
464
415
  (new Date(h).getTime() - (/* @__PURE__ */ new Date()).getTime()) / (1e3 * 60 * 60 * 24)
465
- ) : 1 / 0, y = l <= 7 && !d;
466
- return /* @__PURE__ */ e.jsxs("div", { className: N("grid col-span-full grid-cols-subgrid p-6", s), children: [
416
+ ) : 1 / 0, C = d <= 7 && !p;
417
+ return /* @__PURE__ */ e.jsxs("div", { className: P("grid col-span-full grid-cols-subgrid p-6", s), children: [
467
418
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1", children: [
468
419
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center text-sm border rounded-md w-fit px-1", children: [
469
420
  /* @__PURE__ */ e.jsxs("div", { className: "font-mono truncate h-9 items-center flex px-2 text-xs gap-2", children: [
470
421
  /* @__PURE__ */ e.jsx(
471
422
  "div",
472
423
  {
473
- className: N(
424
+ className: P(
474
425
  "rounded-full w-2 h-2 bg-emerald-400 mr-2",
475
- (y || d) && "bg-neutral-200"
426
+ (C || p) && "bg-neutral-200"
476
427
  )
477
428
  }
478
429
  ),
479
430
  /* @__PURE__ */ e.jsxs("span", { children: [
480
- /* @__PURE__ */ e.jsx("span", { className: n ? "" : "opacity-20", children: n ? x.slice(0, -5) : "**** ".repeat(x.slice(0, -5).length / 5) + "*".repeat(x.slice(0, -5).length % 5) }),
481
- /* @__PURE__ */ e.jsx("span", { children: x.slice(-5) })
431
+ /* @__PURE__ */ e.jsx("span", { className: n ? "" : "opacity-20", children: n ? a.slice(0, -5) : "**** ".repeat(a.slice(0, -5).length / 5) + "*".repeat(a.slice(0, -5).length % 5) }),
432
+ /* @__PURE__ */ e.jsx("span", { children: a.slice(-5) })
482
433
  ] })
483
434
  ] }),
484
435
  /* @__PURE__ */ e.jsx(
485
- j,
436
+ y,
486
437
  {
487
438
  variant: "ghost",
488
- onClick: () => o((p) => !p),
439
+ onClick: () => o((w) => !w),
489
440
  size: "icon",
490
- children: n ? /* @__PURE__ */ e.jsx(ce, { size: 16 }) : /* @__PURE__ */ e.jsx(de, { size: 16 })
441
+ children: n ? /* @__PURE__ */ e.jsx(re, { size: 16 }) : /* @__PURE__ */ e.jsx(ae, { size: 16 })
491
442
  }
492
443
  ),
493
444
  /* @__PURE__ */ e.jsx(
494
- j,
445
+ y,
495
446
  {
496
447
  variant: "ghost",
497
- onClick: () => {
498
- navigator.clipboard.writeText(x).then(() => {
499
- u(!0), setTimeout(() => u(!1), 2e3);
500
- });
501
- },
448
+ onClick: () => m(a),
502
449
  size: "icon",
503
- children: r ? /* @__PURE__ */ e.jsx(V, { size: 16 }) : /* @__PURE__ */ e.jsx(ue, { size: 16 })
450
+ children: l ? /* @__PURE__ */ e.jsx(_, { size: 16 }) : /* @__PURE__ */ e.jsx(oe, { size: 16 })
504
451
  }
505
452
  )
506
453
  ] }),
507
454
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1 mt-0.5 text-nowrap", children: [
508
- f && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-muted-foreground", children: [
455
+ x && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-muted-foreground", children: [
509
456
  "Created ",
510
- Je(f),
457
+ $e(x),
511
458
  "."
512
459
  ] }),
513
460
  " ",
514
- h && y && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-primary", children: [
461
+ h && C && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-primary", children: [
515
462
  "Expires in ",
516
- l,
463
+ d,
517
464
  " ",
518
- l === 1 ? "day" : "days",
465
+ d === 1 ? "day" : "days",
519
466
  "."
520
467
  ] }),
521
- h && d && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-primary", children: [
468
+ h && p && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-primary", children: [
522
469
  "Expired",
523
470
  " ",
524
- l === 0 ? "today." : `${l * -1} days ago.`
471
+ d === 0 ? "today." : `${d * -1} days ago.`
525
472
  ] })
526
473
  ] })
527
474
  ] }),
528
- /* @__PURE__ */ e.jsx("div", { className: "flex justify-end", children: h && i && /* @__PURE__ */ e.jsxs(X, { children: [
529
- /* @__PURE__ */ e.jsx(Y, { asChild: !0, children: /* @__PURE__ */ e.jsx(j, { variant: "ghost", size: "icon", children: /* @__PURE__ */ e.jsx(fe, { size: 16 }) }) }),
530
- /* @__PURE__ */ e.jsxs(G, { children: [
531
- /* @__PURE__ */ e.jsxs(Z, { children: [
532
- /* @__PURE__ */ e.jsx(ee, { children: "Delete API Key" }),
533
- /* @__PURE__ */ e.jsx(te, { children: "Are you sure you want to delete this API key?" })
475
+ /* @__PURE__ */ e.jsx("div", { className: "flex justify-end", children: h && i && /* @__PURE__ */ e.jsxs(J, { children: [
476
+ /* @__PURE__ */ e.jsx(U, { asChild: !0, children: /* @__PURE__ */ e.jsx(y, { variant: "ghost", size: "icon", children: /* @__PURE__ */ e.jsx(le, { size: 16 }) }) }),
477
+ /* @__PURE__ */ e.jsxs(V, { children: [
478
+ /* @__PURE__ */ e.jsxs(Y, { children: [
479
+ /* @__PURE__ */ e.jsx(G, { children: "Delete API Key" }),
480
+ /* @__PURE__ */ e.jsx(Z, { children: "Are you sure you want to delete this API key?" })
534
481
  ] }),
535
- /* @__PURE__ */ e.jsxs(se, { children: [
536
- /* @__PURE__ */ e.jsx(A, { asChild: !0, children: /* @__PURE__ */ e.jsx(j, { variant: "outline", children: "Cancel" }) }),
537
- /* @__PURE__ */ e.jsx(A, { asChild: !0, children: /* @__PURE__ */ e.jsx(
538
- j,
482
+ /* @__PURE__ */ e.jsxs(W, { children: [
483
+ /* @__PURE__ */ e.jsx(K, { asChild: !0, children: /* @__PURE__ */ e.jsx(y, { variant: "outline", children: "Cancel" }) }),
484
+ /* @__PURE__ */ e.jsx(K, { asChild: !0, children: /* @__PURE__ */ e.jsx(
485
+ y,
539
486
  {
540
487
  onClick: () => {
541
488
  i();
@@ -547,36 +494,36 @@ const Be = ({ service: t }) => {
547
494
  ] })
548
495
  ] }) })
549
496
  ] });
550
- }, K = "https://api.zuploedge.com/v2/client", Ve = async (t) => {
497
+ }, D = "https://api.zuploedge.com/v2/client", _e = async (t) => {
551
498
  try {
552
499
  return await t.json();
553
500
  } catch {
554
501
  return;
555
502
  }
556
- }, R = async (t) => {
503
+ }, I = async (t) => {
557
504
  const i = t.headers.get("content-type");
558
505
  if (!t.ok && i?.includes("application/problem+json")) {
559
- const s = await Ve(t);
506
+ const s = await _e(t);
560
507
  if (s.type && s.title)
561
508
  throw new Error(s.detail ?? s.title);
562
509
  }
563
- }, We = (t) => ({
510
+ }, He = (t) => ({
564
511
  deleteKey: async (i, s, n) => {
565
512
  const o = new Request(
566
- K + `/${t}/consumers/${i}/keys/${s}`,
513
+ D + `/${t}/consumers/${i}/keys/${s}`,
567
514
  {
568
515
  method: "DELETE"
569
516
  }
570
517
  );
571
518
  await n.signRequest(o);
572
- const r = await fetch(o);
573
- await R(r), D(r.ok, "Failed to delete API key");
519
+ const l = await fetch(o);
520
+ await I(l), E(l.ok, "Failed to delete API key");
574
521
  },
575
522
  updateConsumer: async (i, s) => {
576
523
  const n = await fetch(
577
524
  await s.signRequest(
578
525
  new Request(
579
- K + `/${t}/consumers/${i.id}`,
526
+ D + `/${t}/consumers/${i.id}`,
580
527
  {
581
528
  method: "PATCH",
582
529
  headers: {
@@ -589,13 +536,13 @@ const Be = ({ service: t }) => {
589
536
  )
590
537
  )
591
538
  );
592
- await R(n), D(n.ok, "Failed to update API key description");
539
+ await I(n), E(n.ok, "Failed to update API key description");
593
540
  },
594
541
  rollKey: async (i, s) => {
595
542
  const n = await fetch(
596
543
  await s.signRequest(
597
544
  new Request(
598
- K + `/${t}/consumers/${i}/roll-key`,
545
+ D + `/${t}/consumers/${i}/roll-key`,
599
546
  {
600
547
  method: "POST",
601
548
  headers: {
@@ -606,39 +553,39 @@ const Be = ({ service: t }) => {
606
553
  )
607
554
  )
608
555
  );
609
- await R(n), D(n.ok, "Failed to delete API key");
556
+ await I(n), E(n.ok, "Failed to delete API key");
610
557
  },
611
558
  getConsumers: async (i) => {
612
559
  const s = new Request(
613
- K + `/${t}/consumers`
560
+ D + `/${t}/consumers`
614
561
  );
615
562
  await i.signRequest(s);
616
563
  const n = await fetch(s);
617
- return await R(n), D(n.ok, "Failed to fetch API keys"), (await n.json()).data.map((r) => ({
618
- id: r.id,
619
- label: r.label ?? r.subject ?? "API Key",
620
- apiKeys: r.apiKeys.data,
621
- key: r.apiKeys.data.at(0)
564
+ return await I(n), E(n.ok, "Failed to fetch API keys"), (await n.json()).data.map((l) => ({
565
+ id: l.id,
566
+ label: l.label ?? l.subject ?? "API Key",
567
+ apiKeys: l.apiKeys.data,
568
+ key: l.apiKeys.data.at(0)
622
569
  }));
623
570
  }
624
- }), dt = (t) => t, ut = (t) => {
625
- const i = "deploymentName" in t ? We(t.deploymentName) : t;
571
+ }), rt = (t) => t, at = (t) => {
572
+ const i = "deploymentName" in t ? He(t.deploymentName) : t;
626
573
  return {
627
574
  getProfileMenuItems: () => [
628
575
  {
629
576
  label: "API Keys",
630
577
  path: "/settings/api-keys",
631
578
  category: "middle",
632
- icon: he
579
+ icon: ce
633
580
  }
634
581
  ],
635
582
  getIdentities: async (s) => {
636
583
  try {
637
584
  return (await i.getConsumers(s)).map((o) => ({
638
- authorizeRequest: (r) => (r.headers.set(
585
+ authorizeRequest: (l) => (l.headers.set(
639
586
  "Authorization",
640
587
  `Bearer ${o.apiKeys.at(0)?.key}`
641
- ), r),
588
+ ), l),
642
589
  id: o.id,
643
590
  label: o.label
644
591
  }));
@@ -648,12 +595,12 @@ const Be = ({ service: t }) => {
648
595
  },
649
596
  getRoutes: () => [
650
597
  {
651
- element: /* @__PURE__ */ e.jsx(Re, {}),
652
- errorElement: /* @__PURE__ */ e.jsx(me, {}),
598
+ element: /* @__PURE__ */ e.jsx(Ie, {}),
599
+ errorElement: /* @__PURE__ */ e.jsx(ue, {}),
653
600
  children: [
654
601
  {
655
602
  path: "/settings/api-keys",
656
- element: /* @__PURE__ */ e.jsx(Be, { service: i })
603
+ element: /* @__PURE__ */ e.jsx(Fe, { service: i })
657
604
  }
658
605
  // {
659
606
  // path: "/settings/api-keys/new",
@@ -665,7 +612,7 @@ const Be = ({ service: t }) => {
665
612
  };
666
613
  };
667
614
  export {
668
- ut as apiKeyPlugin,
669
- dt as createApiKeyService
615
+ at as apiKeyPlugin,
616
+ rt as createApiKeyService
670
617
  };
671
618
  //# sourceMappingURL=zudoku.plugin-api-keys.js.map