zudoku 0.61.5 → 0.63.0

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 (403) hide show
  1. package/README.md +1 -1
  2. package/dist/cli/cli.d.ts +9 -0
  3. package/dist/cli/cli.js +4 -10
  4. package/dist/cli/cli.js.map +1 -1
  5. package/dist/cli/common/version-check.d.ts +2 -0
  6. package/dist/cli/common/version-check.js +58 -0
  7. package/dist/cli/common/version-check.js.map +1 -0
  8. package/dist/config/config.d.ts +3 -0
  9. package/dist/config/validators/InputNavigationSchema.d.ts +64 -4
  10. package/dist/config/validators/icon-types.d.ts +1 -1
  11. package/dist/config/validators/icon-types.js +15 -0
  12. package/dist/config/validators/icon-types.js.map +1 -1
  13. package/dist/config/validators/validate.d.ts +39 -9
  14. package/dist/config/validators/validate.js +23 -0
  15. package/dist/config/validators/validate.js.map +1 -1
  16. package/dist/flat-config.d.ts +22 -2
  17. package/dist/lib/assets/language-icons/c.d.ts +3 -0
  18. package/dist/lib/assets/language-icons/c.js +4 -0
  19. package/dist/lib/assets/language-icons/c.js.map +1 -0
  20. package/dist/lib/assets/language-icons/commonlisp.d.ts +3 -0
  21. package/dist/lib/assets/language-icons/commonlisp.js +4 -0
  22. package/dist/lib/assets/language-icons/commonlisp.js.map +1 -0
  23. package/dist/lib/assets/language-icons/cpp.d.ts +3 -0
  24. package/dist/lib/assets/language-icons/cpp.js +4 -0
  25. package/dist/lib/assets/language-icons/cpp.js.map +1 -0
  26. package/dist/lib/assets/language-icons/dart.d.ts +3 -0
  27. package/dist/lib/assets/language-icons/dart.js +4 -0
  28. package/dist/lib/assets/language-icons/dart.js.map +1 -0
  29. package/dist/lib/assets/language-icons/elixir.d.ts +3 -0
  30. package/dist/lib/assets/language-icons/elixir.js +4 -0
  31. package/dist/lib/assets/language-icons/elixir.js.map +1 -0
  32. package/dist/lib/assets/language-icons/ocaml.d.ts +3 -0
  33. package/dist/lib/assets/language-icons/ocaml.js +4 -0
  34. package/dist/lib/assets/language-icons/ocaml.js.map +1 -0
  35. package/dist/lib/assets/language-icons/powershell.d.ts +3 -0
  36. package/dist/lib/assets/language-icons/powershell.js +4 -0
  37. package/dist/lib/assets/language-icons/powershell.js.map +1 -0
  38. package/dist/lib/assets/language-icons/scala.d.ts +3 -0
  39. package/dist/lib/assets/language-icons/scala.js +4 -0
  40. package/dist/lib/assets/language-icons/scala.js.map +1 -0
  41. package/dist/lib/assets/language-icons/zig.d.ts +3 -0
  42. package/dist/lib/assets/language-icons/zig.js +4 -0
  43. package/dist/lib/assets/language-icons/zig.js.map +1 -0
  44. package/dist/lib/authentication/providers/auth0.js +7 -3
  45. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  46. package/dist/lib/components/BuildCheck.js +2 -2
  47. package/dist/lib/components/BuildCheck.js.map +1 -1
  48. package/dist/lib/components/Heading.js +1 -5
  49. package/dist/lib/components/Heading.js.map +1 -1
  50. package/dist/lib/components/LanguageIcon.js +45 -0
  51. package/dist/lib/components/LanguageIcon.js.map +1 -1
  52. package/dist/lib/components/Main.js +1 -1
  53. package/dist/lib/components/Main.js.map +1 -1
  54. package/dist/lib/components/cache.d.ts +3 -1
  55. package/dist/lib/components/cache.js +3 -5
  56. package/dist/lib/components/cache.js.map +1 -1
  57. package/dist/lib/components/context/ZudokuContext.js +10 -2
  58. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  59. package/dist/lib/components/index.d.ts +1 -2
  60. package/dist/lib/hooks/index.d.ts +1 -1
  61. package/dist/lib/oas/graphql/index.js +17 -0
  62. package/dist/lib/oas/graphql/index.js.map +1 -1
  63. package/dist/lib/plugins/markdown/MdxPage.js +26 -3
  64. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  65. package/dist/lib/plugins/markdown/assets/ChatGPTLogo.d.ts +2 -0
  66. package/dist/lib/plugins/markdown/assets/ChatGPTLogo.js +3 -0
  67. package/dist/lib/plugins/markdown/assets/ChatGPTLogo.js.map +1 -0
  68. package/dist/lib/plugins/markdown/assets/ClaudeLogo.d.ts +2 -0
  69. package/dist/lib/plugins/markdown/assets/ClaudeLogo.js +3 -0
  70. package/dist/lib/plugins/markdown/assets/ClaudeLogo.js.map +1 -0
  71. package/dist/lib/plugins/markdown/index.d.ts +2 -1
  72. package/dist/lib/plugins/markdown/index.js.map +1 -1
  73. package/dist/lib/plugins/openapi/MCPEndpoint.js +9 -18
  74. package/dist/lib/plugins/openapi/MCPEndpoint.js.map +1 -1
  75. package/dist/lib/plugins/openapi/OperationList.js +8 -3
  76. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  77. package/dist/lib/plugins/openapi/OperationListItem.d.ts +2 -2
  78. package/dist/lib/plugins/openapi/OperationListItem.js +6 -3
  79. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  80. package/dist/lib/plugins/openapi/Sidecar.d.ts +2 -1
  81. package/dist/lib/plugins/openapi/Sidecar.js +6 -9
  82. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  83. package/dist/lib/plugins/openapi/graphql/fragment-masking.js.map +1 -1
  84. package/dist/lib/plugins/openapi/graphql/gql.d.ts +1 -1
  85. package/dist/lib/plugins/openapi/graphql/gql.js +2 -1
  86. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  87. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +8 -2
  88. package/dist/lib/plugins/openapi/graphql/graphql.js +8 -0
  89. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  90. package/dist/lib/plugins/openapi/index.js +1 -1
  91. package/dist/lib/plugins/openapi/index.js.map +1 -1
  92. package/dist/lib/plugins/openapi/interfaces.d.ts +1 -0
  93. package/dist/lib/plugins/openapi/playground/Playground.js +1 -1
  94. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  95. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
  96. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  97. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +15 -3
  98. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
  99. package/dist/lib/shiki.js +9 -0
  100. package/dist/lib/shiki.js.map +1 -1
  101. package/dist/lib/ui/Carousel.js.map +1 -1
  102. package/dist/lib/ui/Dialog.d.ts +12 -18
  103. package/dist/lib/ui/Dialog.js +30 -17
  104. package/dist/lib/ui/Dialog.js.map +1 -1
  105. package/dist/lib/ui/Secret.d.ts +6 -0
  106. package/dist/lib/ui/Secret.js +7 -4
  107. package/dist/lib/ui/Secret.js.map +1 -1
  108. package/dist/lib/util/pastellize.js +4 -4
  109. package/dist/lib/util/pastellize.js.map +1 -1
  110. package/dist/vite/api/SchemaManager.js.map +1 -1
  111. package/dist/vite/llms.d.ts +12 -0
  112. package/dist/vite/llms.js +66 -0
  113. package/dist/vite/llms.js.map +1 -0
  114. package/dist/vite/plugin-api.js +1 -1
  115. package/dist/vite/plugin-api.js.map +1 -1
  116. package/dist/vite/plugin-docs.d.ts +9 -0
  117. package/dist/vite/plugin-docs.js +67 -48
  118. package/dist/vite/plugin-docs.js.map +1 -1
  119. package/dist/vite/plugin-markdown-export.d.ts +21 -0
  120. package/dist/vite/plugin-markdown-export.js +139 -0
  121. package/dist/vite/plugin-markdown-export.js.map +1 -0
  122. package/dist/vite/plugin-mdx.d.ts +1 -1
  123. package/dist/vite/plugin-mdx.js +5 -1
  124. package/dist/vite/plugin-mdx.js.map +1 -1
  125. package/dist/vite/plugin-navigation.js +4 -0
  126. package/dist/vite/plugin-navigation.js.map +1 -1
  127. package/dist/vite/plugin.js +2 -0
  128. package/dist/vite/plugin.js.map +1 -1
  129. package/dist/vite/prerender/prerender.js +30 -0
  130. package/dist/vite/prerender/prerender.js.map +1 -1
  131. package/lib/{Button-DTDRi4CT.js → Button-DmS4u8Lj.js} +2 -2
  132. package/lib/{Button-DTDRi4CT.js.map → Button-DmS4u8Lj.js.map} +1 -1
  133. package/lib/{Card-hTy9PAnh.js → Card-KFniaZn5.js} +2 -2
  134. package/lib/{Card-hTy9PAnh.js.map → Card-KFniaZn5.js.map} +1 -1
  135. package/lib/{CategoryHeading-BGCNu3VK.js → CategoryHeading-DhmodDcq.js} +2 -2
  136. package/lib/{CategoryHeading-BGCNu3VK.js.map → CategoryHeading-DhmodDcq.js.map} +1 -1
  137. package/lib/CodeBlock-CanTUJLl.js +221 -0
  138. package/lib/CodeBlock-CanTUJLl.js.map +1 -0
  139. package/lib/{Command-TEBTONf1.js → Command-CUcrW3qs.js} +3 -3
  140. package/lib/{Command-TEBTONf1.js.map → Command-CUcrW3qs.js.map} +1 -1
  141. package/lib/Dialog-BQciPiHN.js +144 -0
  142. package/lib/Dialog-BQciPiHN.js.map +1 -0
  143. package/lib/{Drawer-DM9wJUC6.js → Drawer-Ci7XwhqT.js} +2 -2
  144. package/lib/Drawer-Ci7XwhqT.js.map +1 -0
  145. package/lib/DropdownMenu-BZ2NKQ3K.js +126 -0
  146. package/lib/DropdownMenu-BZ2NKQ3K.js.map +1 -0
  147. package/lib/{ErrorAlert-xpVkFS_n.js → ErrorAlert-VBJ8aHH7.js} +100 -103
  148. package/lib/ErrorAlert-VBJ8aHH7.js.map +1 -0
  149. package/lib/MdxPage-DFRNwSsc.js +239 -0
  150. package/lib/MdxPage-DFRNwSsc.js.map +1 -0
  151. package/lib/{OAuthErrorPage-DCjFngGS.js → OAuthErrorPage-DJUOdr6Q.js} +7 -7
  152. package/lib/{OAuthErrorPage-DCjFngGS.js.map → OAuthErrorPage-DJUOdr6Q.js.map} +1 -1
  153. package/lib/{OasProvider-DH82Y-KM.js → OasProvider-D2NYAaBN.js} +3 -3
  154. package/lib/{OasProvider-DH82Y-KM.js.map → OasProvider-D2NYAaBN.js.map} +1 -1
  155. package/lib/{OperationList-Dr87uHqG.js → OperationList-DmXCI4NU.js} +1848 -1853
  156. package/lib/OperationList-DmXCI4NU.js.map +1 -0
  157. package/lib/{Pagination-Cdi_qiXc.js → Pagination-CT4VUR6u.js} +3 -3
  158. package/lib/{Pagination-Cdi_qiXc.js.map → Pagination-CT4VUR6u.js.map} +1 -1
  159. package/lib/{RouteGuard-dji1UEYe.js → RouteGuard-Bg0Lu0OU.js} +5 -5
  160. package/lib/{RouteGuard-dji1UEYe.js.map → RouteGuard-Bg0Lu0OU.js.map} +1 -1
  161. package/lib/{RouterError-D1I15Qyy.js → RouterError-fm21cqlj.js} +4 -4
  162. package/lib/{RouterError-D1I15Qyy.js.map → RouterError-fm21cqlj.js.map} +1 -1
  163. package/lib/{SchemaList-07lprC0m.js → SchemaList-uElsscMN.js} +10 -10
  164. package/lib/{SchemaList-07lprC0m.js.map → SchemaList-uElsscMN.js.map} +1 -1
  165. package/lib/{SchemaView-m0NDK2i0.js → SchemaView-CNQ3VAbI.js} +5 -5
  166. package/lib/{SchemaView-m0NDK2i0.js.map → SchemaView-CNQ3VAbI.js.map} +1 -1
  167. package/lib/Select-CPoGZU_V.js +372 -0
  168. package/lib/Select-CPoGZU_V.js.map +1 -0
  169. package/lib/{SignUp-C-YP_Rxi.js → SignUp-BraHuRN_.js} +9 -9
  170. package/lib/{SignUp-C-YP_Rxi.js.map → SignUp-BraHuRN_.js.map} +1 -1
  171. package/lib/{Spinner-Cf6E803I.js → Spinner-CI6bRyZw.js} +2 -2
  172. package/lib/{Spinner-Cf6E803I.js.map → Spinner-CI6bRyZw.js.map} +1 -1
  173. package/lib/{SyntaxHighlight-CPF64UHi.js → SyntaxHighlight-B0laqAqK.js} +6 -6
  174. package/lib/{SyntaxHighlight-CPF64UHi.js.map → SyntaxHighlight-B0laqAqK.js.map} +1 -1
  175. package/lib/{Toc-Cf5UojVb.js → Toc-KzXCRqrX.js} +3 -3
  176. package/lib/{Toc-Cf5UojVb.js.map → Toc-KzXCRqrX.js.map} +1 -1
  177. package/lib/ZudokuContext-BXTZApgy.js +1506 -0
  178. package/lib/ZudokuContext-BXTZApgy.js.map +1 -0
  179. package/lib/c-B-NUhs61.js +46 -0
  180. package/lib/c-B-NUhs61.js.map +1 -0
  181. package/lib/chunk-PVWAREVJ-BO6B-RAk.js.map +1 -1
  182. package/lib/{circular-ga83n0Za.js → circular-BWT7_Ahq.js} +30 -30
  183. package/lib/{circular-ga83n0Za.js.map → circular-BWT7_Ahq.js.map} +1 -1
  184. package/lib/commonlisp-De080z23.js +28 -0
  185. package/lib/commonlisp-De080z23.js.map +1 -0
  186. package/lib/cpp-79Paht7T.js +53 -0
  187. package/lib/cpp-79Paht7T.js.map +1 -0
  188. package/lib/{createServer-DL1AYSpR.js → createServer-zhJZSgor.js} +3225 -3165
  189. package/lib/createServer-zhJZSgor.js.map +1 -0
  190. package/lib/{csharp-rrJEDRrV.js → csharp-D8MIL50B.js} +2 -2
  191. package/lib/{csharp-rrJEDRrV.js.map → csharp-D8MIL50B.js.map} +1 -1
  192. package/lib/{css-Dpk9bCql.js → css-Bt6hr1td.js} +2 -2
  193. package/lib/{css-Dpk9bCql.js.map → css-Bt6hr1td.js.map} +1 -1
  194. package/lib/dart-B0vy1jWB.js +60 -0
  195. package/lib/dart-B0vy1jWB.js.map +1 -0
  196. package/lib/elixir-Ds8r0sF8.js +25 -0
  197. package/lib/elixir-Ds8r0sF8.js.map +1 -0
  198. package/lib/{errors-ouIp07AW.js → errors-XqO6MsfU.js} +3 -3
  199. package/lib/{errors-ouIp07AW.js.map → errors-XqO6MsfU.js.map} +1 -1
  200. package/lib/{go-D8SJIQ0Z.js → go-D2VsmIOS.js} +2 -2
  201. package/lib/{go-D8SJIQ0Z.js.map → go-D2VsmIOS.js.map} +1 -1
  202. package/lib/{graphql-aeVKJNa2.js → graphql-BtA6M4m5.js} +2 -2
  203. package/lib/{graphql-aeVKJNa2.js.map → graphql-BtA6M4m5.js.map} +1 -1
  204. package/lib/hook-CAebs2rv.js +31 -0
  205. package/lib/hook-CAebs2rv.js.map +1 -0
  206. package/lib/{html-D_7om-nA.js → html-MGnI2uzP.js} +2 -2
  207. package/lib/{html-D_7om-nA.js.map → html-MGnI2uzP.js.map} +1 -1
  208. package/lib/{index-CVfG8Pb4.js → index-BPSpOxTK.js} +26 -26
  209. package/lib/index-BPSpOxTK.js.map +1 -0
  210. package/lib/{index-DhL3LhWV.js → index-C5L4favO.js} +166 -50
  211. package/lib/index-C5L4favO.js.map +1 -0
  212. package/lib/index-CrcNWbel.js.map +1 -1
  213. package/lib/{index-DQ8kWcE8.js → index-D8Btv4uT.js} +723 -811
  214. package/lib/index-D8Btv4uT.js.map +1 -0
  215. package/lib/index.esm-BYObtETB.js +1294 -0
  216. package/lib/index.esm-BYObtETB.js.map +1 -0
  217. package/lib/index.esm-BnYHxCYC.js.map +1 -1
  218. package/lib/{java-DUh-EL8n.js → java-CVLzHfb1.js} +2 -2
  219. package/lib/{java-DUh-EL8n.js.map → java-CVLzHfb1.js.map} +1 -1
  220. package/lib/{javascript-CrY8dcGu.js → javascript-CcmIpL4G.js} +2 -2
  221. package/lib/{javascript-CrY8dcGu.js.map → javascript-CcmIpL4G.js.map} +1 -1
  222. package/lib/{json-DLK2_sdf.js → json-4AyP4uiY.js} +2 -2
  223. package/lib/{json-DLK2_sdf.js.map → json-4AyP4uiY.js.map} +1 -1
  224. package/lib/{jsx-runtime-DywqP_6a.js → jsx-runtime-BzflLqGi.js} +109 -111
  225. package/lib/jsx-runtime-BzflLqGi.js.map +1 -0
  226. package/lib/{kotlin-rJMOGl7D.js → kotlin-v2plddBQ.js} +2 -2
  227. package/lib/{kotlin-rJMOGl7D.js.map → kotlin-v2plddBQ.js.map} +1 -1
  228. package/lib/{markdown-BD9bIU5J.js → markdown-DYGWCmGQ.js} +2 -2
  229. package/lib/{markdown-BD9bIU5J.js.map → markdown-DYGWCmGQ.js.map} +1 -1
  230. package/lib/{mdx-G25UCvf3.js → mdx-CHwYvXd4.js} +2 -2
  231. package/lib/{mdx-G25UCvf3.js.map → mdx-CHwYvXd4.js.map} +1 -1
  232. package/lib/{mutation-De-1gXxl.js → mutation-CdGPxHNX.js} +2 -2
  233. package/lib/{mutation-De-1gXxl.js.map → mutation-CdGPxHNX.js.map} +1 -1
  234. package/lib/{objectivec-DDpj0aWX.js → objectivec-HZY8shkd.js} +2 -2
  235. package/lib/{objectivec-DDpj0aWX.js.map → objectivec-HZY8shkd.js.map} +1 -1
  236. package/lib/ocaml-DqsdDdwb.js +52 -0
  237. package/lib/ocaml-DqsdDdwb.js.map +1 -0
  238. package/lib/{php-BeG18bSy.js → php-rQXzo7K_.js} +2 -2
  239. package/lib/{php-BeG18bSy.js.map → php-rQXzo7K_.js.map} +1 -1
  240. package/lib/powershell-CQje9pm1.js +39 -0
  241. package/lib/powershell-CQje9pm1.js.map +1 -0
  242. package/lib/{python-BaF2byD-.js → python-QIQAE5Ei.js} +2 -2
  243. package/lib/{python-BaF2byD-.js.map → python-QIQAE5Ei.js.map} +1 -1
  244. package/lib/{react-CQvDN20M.js → react-DHpVpxRv.js} +2 -2
  245. package/lib/{react-CQvDN20M.js.map → react-DHpVpxRv.js.map} +1 -1
  246. package/lib/{ruby-CmxRVHMR.js → ruby-B2dU8Ny5.js} +2 -2
  247. package/lib/{ruby-CmxRVHMR.js.map → ruby-B2dU8Ny5.js.map} +1 -1
  248. package/lib/{rust-IfSC62c5.js → rust-DYnLHAi2.js} +2 -2
  249. package/lib/{rust-IfSC62c5.js.map → rust-DYnLHAi2.js.map} +1 -1
  250. package/lib/scala-CeKInBR8.js +25 -0
  251. package/lib/scala-CeKInBR8.js.map +1 -0
  252. package/lib/{shell-BFu0M6m4.js → shell-HUv9oVtp.js} +2 -2
  253. package/lib/{shell-BFu0M6m4.js.map → shell-HUv9oVtp.js.map} +1 -1
  254. package/lib/{swift-DckbsN4v.js → swift-B4z6ig1Z.js} +2 -2
  255. package/lib/{swift-DckbsN4v.js.map → swift-B4z6ig1Z.js.map} +1 -1
  256. package/lib/{toml-BJsCc8TC.js → toml-Co9mpdct.js} +2 -2
  257. package/lib/{toml-BJsCc8TC.js.map → toml-Co9mpdct.js.map} +1 -1
  258. package/lib/{typescript-7qOVMjOC.js → typescript-C26xdBDC.js} +2 -2
  259. package/lib/{typescript-7qOVMjOC.js.map → typescript-C26xdBDC.js.map} +1 -1
  260. package/lib/ui/Accordion.js +1 -1
  261. package/lib/ui/ActionButton.js +3 -3
  262. package/lib/ui/Alert.js +1 -1
  263. package/lib/ui/AlertDialog.js +1 -1
  264. package/lib/ui/Badge.js +1 -1
  265. package/lib/ui/Breadcrumb.js +1 -1
  266. package/lib/ui/Button.js +1 -1
  267. package/lib/ui/Callout.js +1 -1
  268. package/lib/ui/Card.js +1 -1
  269. package/lib/ui/Carousel.js +1 -1
  270. package/lib/ui/Carousel.js.map +1 -1
  271. package/lib/ui/Checkbox.js +1 -1
  272. package/lib/ui/CodeBlock.js +2 -2
  273. package/lib/ui/Command.js +2 -2
  274. package/lib/ui/Dialog.js +135 -105
  275. package/lib/ui/Dialog.js.map +1 -1
  276. package/lib/ui/Drawer.js +2 -2
  277. package/lib/ui/DropdownMenu.js +1 -1
  278. package/lib/ui/EmbeddedCodeBlock.js +1 -1
  279. package/lib/ui/Form.js +2 -2
  280. package/lib/ui/HoverCard.js +1 -1
  281. package/lib/ui/Input.js +1 -1
  282. package/lib/ui/Label.js +1 -1
  283. package/lib/ui/Pagination.js +1 -1
  284. package/lib/ui/Popover.js +1 -1
  285. package/lib/ui/Progress.js +1 -1
  286. package/lib/ui/RadioGroup.js +1 -1
  287. package/lib/ui/ReactComponentDoc.js +1 -1
  288. package/lib/ui/ScrollArea.js +1 -1
  289. package/lib/ui/Secret.js +64 -54
  290. package/lib/ui/Secret.js.map +1 -1
  291. package/lib/ui/Select.js +1 -1
  292. package/lib/ui/Skeleton.js +1 -1
  293. package/lib/ui/Slider.js +1 -1
  294. package/lib/ui/Stepper.js +1 -1
  295. package/lib/ui/Switch.js +1 -1
  296. package/lib/ui/SyntaxHighlight.js +4 -4
  297. package/lib/ui/Tabs.js +1 -1
  298. package/lib/ui/Textarea.js +1 -1
  299. package/lib/ui/Toggle.js +1 -1
  300. package/lib/ui/ToggleGroup.js +1 -1
  301. package/lib/ui/Tooltip.js +1 -1
  302. package/lib/ui/Value.js +1 -1
  303. package/lib/{useExposedProps-B8NHdNRq.js → useExposedProps-Cd7Yg_uG.js} +3 -3
  304. package/lib/useExposedProps-Cd7Yg_uG.js.map +1 -0
  305. package/lib/{xml-DAaTIkBX.js → xml-BQOOC04j.js} +2 -2
  306. package/lib/{xml-DAaTIkBX.js.map → xml-BQOOC04j.js.map} +1 -1
  307. package/lib/{yaml-DUi-dbfu.js → yaml-BGsJItKv.js} +2 -2
  308. package/lib/{yaml-DUi-dbfu.js.map → yaml-BGsJItKv.js.map} +1 -1
  309. package/lib/zig-CUV2sTct.js +35 -0
  310. package/lib/zig-CUV2sTct.js.map +1 -0
  311. package/lib/zudoku.__internal.js +1041 -938
  312. package/lib/zudoku.__internal.js.map +1 -1
  313. package/lib/zudoku.auth-auth0.js +22 -21
  314. package/lib/zudoku.auth-auth0.js.map +1 -1
  315. package/lib/zudoku.auth-azureb2c.js +14 -15
  316. package/lib/zudoku.auth-azureb2c.js.map +1 -1
  317. package/lib/zudoku.auth-clerk.js +3 -3
  318. package/lib/zudoku.auth-openid.js +57 -58
  319. package/lib/zudoku.auth-openid.js.map +1 -1
  320. package/lib/zudoku.auth-supabase.js +2 -2
  321. package/lib/zudoku.components.js +6 -6
  322. package/lib/zudoku.hooks.js +6 -6
  323. package/lib/zudoku.hooks.js.map +1 -1
  324. package/lib/zudoku.icons.js +1 -1
  325. package/lib/zudoku.plugin-api-catalog.js +27 -28
  326. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  327. package/lib/zudoku.plugin-api-keys.js +215 -301
  328. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  329. package/lib/zudoku.plugin-custom-pages.js +1 -1
  330. package/lib/zudoku.plugin-markdown.js +2 -2
  331. package/lib/zudoku.plugin-markdown.js.map +1 -1
  332. package/lib/zudoku.plugin-openapi.js +4 -4
  333. package/lib/zudoku.plugin-search-inkeep.js +1 -1
  334. package/lib/zudoku.plugin-search-pagefind.js +27 -28
  335. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  336. package/lib/zudoku.router.js +1 -1
  337. package/lib/zudoku.router.js.map +1 -1
  338. package/package.json +39 -39
  339. package/src/lib/assets/language-icons/c.tsx +31 -0
  340. package/src/lib/assets/language-icons/commonlisp.tsx +22 -0
  341. package/src/lib/assets/language-icons/cpp.tsx +35 -0
  342. package/src/lib/assets/language-icons/dart.tsx +39 -0
  343. package/src/lib/assets/language-icons/elixir.tsx +19 -0
  344. package/src/lib/assets/language-icons/ocaml.tsx +34 -0
  345. package/src/lib/assets/language-icons/powershell.tsx +27 -0
  346. package/src/lib/assets/language-icons/scala.tsx +19 -0
  347. package/src/lib/assets/language-icons/zig.tsx +32 -0
  348. package/src/lib/authentication/providers/auth0.tsx +7 -3
  349. package/src/lib/components/BuildCheck.tsx +12 -10
  350. package/src/lib/components/Heading.tsx +2 -6
  351. package/src/lib/components/LanguageIcon.tsx +45 -0
  352. package/src/lib/components/Main.tsx +1 -1
  353. package/src/lib/components/cache.ts +9 -5
  354. package/src/lib/components/context/ZudokuContext.ts +11 -2
  355. package/src/lib/oas/graphql/index.ts +19 -0
  356. package/src/lib/plugins/markdown/MdxPage.tsx +122 -8
  357. package/src/lib/plugins/markdown/assets/ChatGPTLogo.tsx +11 -0
  358. package/src/lib/plugins/markdown/assets/ClaudeLogo.tsx +19 -0
  359. package/src/lib/plugins/markdown/index.tsx +3 -7
  360. package/src/lib/plugins/openapi/MCPEndpoint.tsx +8 -28
  361. package/src/lib/plugins/openapi/OperationList.tsx +14 -3
  362. package/src/lib/plugins/openapi/OperationListItem.tsx +10 -5
  363. package/src/lib/plugins/openapi/Sidecar.tsx +8 -8
  364. package/src/lib/plugins/openapi/graphql/fragment-masking.ts +1 -0
  365. package/src/lib/plugins/openapi/graphql/gql.ts +4 -3
  366. package/src/lib/plugins/openapi/graphql/graphql.ts +20 -3
  367. package/src/lib/plugins/openapi/index.tsx +1 -1
  368. package/src/lib/plugins/openapi/interfaces.ts +1 -0
  369. package/src/lib/plugins/openapi/playground/Playground.tsx +1 -1
  370. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
  371. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +31 -3
  372. package/src/lib/shiki.ts +9 -0
  373. package/src/lib/ui/Carousel.tsx +0 -1
  374. package/src/lib/ui/Dialog.tsx +112 -106
  375. package/src/lib/ui/Secret.tsx +44 -27
  376. package/src/lib/util/pastellize.ts +4 -4
  377. package/src/shiki/langs/hurl.js +1 -0
  378. package/src/shiki/langs/kdl.js +1 -0
  379. package/src/shiki/langs/pkl.js +1 -0
  380. package/src/shiki/langs/rosmsg.js +1 -0
  381. package/lib/CodeBlock-i0BM_QFf.js +0 -176
  382. package/lib/CodeBlock-i0BM_QFf.js.map +0 -1
  383. package/lib/Dialog-VIMic7xI.js +0 -114
  384. package/lib/Dialog-VIMic7xI.js.map +0 -1
  385. package/lib/Drawer-DM9wJUC6.js.map +0 -1
  386. package/lib/ErrorAlert-xpVkFS_n.js.map +0 -1
  387. package/lib/MdxPage-Ud1w_GV-.js +0 -111
  388. package/lib/MdxPage-Ud1w_GV-.js.map +0 -1
  389. package/lib/OperationList-Dr87uHqG.js.map +0 -1
  390. package/lib/Select-BiBMWiLv.js +0 -273
  391. package/lib/Select-BiBMWiLv.js.map +0 -1
  392. package/lib/ZudokuContext-BcqSiygJ.js +0 -1294
  393. package/lib/ZudokuContext-BcqSiygJ.js.map +0 -1
  394. package/lib/createServer-DL1AYSpR.js.map +0 -1
  395. package/lib/hook-BkLXq8pm.js +0 -243
  396. package/lib/hook-BkLXq8pm.js.map +0 -1
  397. package/lib/index-CVfG8Pb4.js.map +0 -1
  398. package/lib/index-DQ8kWcE8.js.map +0 -1
  399. package/lib/index-DhL3LhWV.js.map +0 -1
  400. package/lib/index.esm-DpgNxKa2.js +0 -1267
  401. package/lib/index.esm-DpgNxKa2.js.map +0 -1
  402. package/lib/jsx-runtime-DywqP_6a.js.map +0 -1
  403. package/lib/useExposedProps-B8NHdNRq.js.map +0 -1
@@ -1,56 +1,55 @@
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-D1I15Qyy.js";
4
- import { i as P } from "./invariant-Bm-FVUQE.js";
5
- import { O as Ce, b as we } from "./chunk-PVWAREVJ-BO6B-RAk.js";
6
- import { a as be } from "./hook-BkLXq8pm.js";
7
- import { D as ke, a as Y } from "./ErrorAlert-xpVkFS_n.js";
8
- import { Button as j } from "./ui/Button.js";
9
- import { d as ne, g as ie, b as Ne } from "./ZudokuContext-BcqSiygJ.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-BiBMWiLv.js";
1
+ import { j as e } from "./jsx-runtime-BzflLqGi.js";
2
+ import { CircleSlashIcon as z, CheckIcon as ue, XIcon as he, PencilLineIcon as fe, RefreshCwIcon as pe, TrashIcon as me, KeyRoundIcon as xe } from "lucide-react";
3
+ import { R as ye } from "./RouterError-fm21cqlj.js";
4
+ import { i as I } from "./invariant-Bm-FVUQE.js";
5
+ import { O as ge, b as je } from "./chunk-PVWAREVJ-BO6B-RAk.js";
6
+ import { u as Ce } from "./hook-CAebs2rv.js";
7
+ import { D as ve, a as Y } from "./ErrorAlert-VBJ8aHH7.js";
8
+ import { Button as w } from "./ui/Button.js";
9
+ import { a as se, i as ne, b as we } from "./ZudokuContext-BXTZApgy.js";
10
+ import { u as O, A as M, a as q, b as be, S as ke, c as Ne, d as Ke, e as Ee, f as De, g as Z, h as Ae } from "./Select-CPoGZU_V.js";
11
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-DpgNxKa2.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: [
12
+ import Pe, { createContext as Q, useRef as E, useLayoutEffect as Ie, useEffect as ie, useId as _, useContext as B, useInsertionEffect as Re, useMemo as F, useCallback as Se, Children as Te, isValidElement as Oe, useState as K, forwardRef as Me } from "react";
13
+ import { C as qe, a as $e } from "./Card-KFniaZn5.js";
14
+ import { e as H, f as D, D as V, g as G, a as J, b as U, c as W, d as re } from "./Dialog-BQciPiHN.js";
15
+ import { Input as ae } from "./ui/Input.js";
16
+ import { c as A } from "./cn-dYga0KKN.js";
17
+ import { a as ze } from "./index.esm-BYObtETB.js";
18
+ import { B as Fe } from "./Button-DmS4u8Lj.js";
19
+ import { S as Le } from "./Spinner-CI6bRyZw.js";
20
+ import { useAuth as Qe } from "./zudoku.hooks.js";
21
+ const _e = () => {
22
+ const t = Ce();
23
+ return t.isAuthEnabled && t.isPending ? null : t.isAuthenticated ? /* @__PURE__ */ e.jsx(ge, {}) : t.isAuthEnabled ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2", children: [
25
24
  "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: [
25
+ /* @__PURE__ */ e.jsx(w, { onClick: () => t.login(), children: "Login" })
26
+ ] }) : /* @__PURE__ */ e.jsx("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2", children: /* @__PURE__ */ e.jsxs(ve, { className: "max-w-[600px]", children: [
28
27
  "Authentication needs to be enabled for API keys to work. Enable it in your Zudoku configuration under ",
29
28
  /* @__PURE__ */ e.jsx("code", { children: "authentication" }),
30
29
  "."
31
30
  ] }) });
32
- }, Ge = Q({});
33
- function le(t) {
34
- const i = D(null);
31
+ }, Be = Q({});
32
+ function oe(t) {
33
+ const i = E(null);
35
34
  return i.current === null && (i.current = t()), i.current;
36
35
  }
37
- const Je = typeof window < "u", Ue = Je ? Se : re, ce = /* @__PURE__ */ Q(null);
38
- function We(t) {
36
+ const He = typeof window < "u", Ve = He ? Ie : ie, le = /* @__PURE__ */ Q(null);
37
+ function Ge(t) {
39
38
  return typeof t == "object" && t !== null;
40
39
  }
41
- function Xe(t) {
42
- return We(t) && "offsetHeight" in t;
40
+ function Je(t) {
41
+ return Ge(t) && "offsetHeight" in t;
43
42
  }
44
- const Ye = Q({
43
+ const Ue = Q({
45
44
  transformPagePoint: (t) => t,
46
45
  isStatic: !1,
47
46
  reducedMotion: "never"
48
47
  });
49
- class Ze extends L.Component {
48
+ class We extends L.Component {
50
49
  getSnapshotBeforeUpdate(i) {
51
50
  const s = this.props.childRef.current;
52
51
  if (s && i.isPresent && !this.props.isPresent) {
53
- const n = s.offsetParent, r = Xe(n) && n.offsetWidth || 0, a = this.props.sizeRef.current;
52
+ const n = s.offsetParent, r = Je(n) && n.offsetWidth || 0, a = this.props.sizeRef.current;
54
53
  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
54
  }
56
55
  return null;
@@ -64,231 +63,146 @@ class Ze extends L.Component {
64
63
  return this.props.children;
65
64
  }
66
65
  }
67
- function et({ children: t, isPresent: i, anchorX: s, root: n }) {
68
- const r = _(), a = D(null), l = D({
66
+ function Xe({ children: t, isPresent: i, anchorX: s, root: n }) {
67
+ const r = _(), a = E(null), l = E({
69
68
  width: 0,
70
69
  height: 0,
71
70
  top: 0,
72
71
  left: 0,
73
72
  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)
73
+ }), { nonce: u } = B(Ue);
74
+ return Re(() => {
75
+ const { width: h, height: d, top: g, left: f, right: m } = l.current;
76
+ if (i || !a.current || !h || !d)
78
77
  return;
79
78
  const p = s === "left" ? `left: ${f}` : `right: ${m}`;
80
79
  a.current.dataset.motionPopId = r;
81
80
  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(`
81
+ u && (x.nonce = u);
82
+ const j = n ?? document.head;
83
+ return j.appendChild(x), x.sheet && x.sheet.insertRule(`
85
84
  [data-motion-pop-id="${r}"] {
86
85
  position: absolute !important;
87
- width: ${c}px !important;
88
- height: ${u}px !important;
86
+ width: ${h}px !important;
87
+ height: ${d}px !important;
89
88
  ${p}px !important;
90
- top: ${y}px !important;
89
+ top: ${g}px !important;
91
90
  }
92
91
  `), () => {
93
- v.contains(x) && v.removeChild(x);
92
+ j.contains(x) && j.removeChild(x);
94
93
  };
95
- }, [i]), e.jsx(Ze, { isPresent: i, childRef: a, sizeRef: l, children: L.cloneElement(t, { ref: a }) });
94
+ }, [i]), e.jsx(We, { isPresent: i, childRef: a, sizeRef: l, children: L.cloneElement(t, { ref: a }) });
96
95
  }
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 = _();
96
+ const Ye = ({ children: t, initial: i, isPresent: s, onExitComplete: n, custom: r, presenceAffectsLayout: a, mode: l, anchorX: u, root: h }) => {
97
+ const d = oe(Ze), g = _();
99
98
  let f = !0, m = F(() => (f = !1, {
100
- id: y,
99
+ id: g,
101
100
  initial: i,
102
101
  isPresent: s,
103
102
  custom: r,
104
103
  onExitComplete: (p) => {
105
- u.set(p, !0);
106
- for (const x of u.values())
104
+ d.set(p, !0);
105
+ for (const x of d.values())
107
106
  if (!x)
108
107
  return;
109
108
  n && n();
110
109
  },
111
- register: (p) => (u.set(p, !1), () => u.delete(p))
112
- }), [s, u, n]);
110
+ register: (p) => (d.set(p, !1), () => d.delete(p))
111
+ }), [s, d, n]);
113
112
  return a && f && (m = { ...m }), F(() => {
114
- u.forEach((p, x) => u.set(x, !1));
113
+ d.forEach((p, x) => d.set(x, !1));
115
114
  }, [s]), L.useEffect(() => {
116
- !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 });
115
+ !s && !d.size && n && n();
116
+ }, [s]), l === "popLayout" && (t = e.jsx(Xe, { isPresent: s, anchorX: u, root: h, children: t })), e.jsx(le.Provider, { value: m, children: t });
118
117
  };
119
- function st() {
118
+ function Ze() {
120
119
  return /* @__PURE__ */ new Map();
121
120
  }
122
- function nt(t = !0) {
123
- const i = B(ce);
121
+ function et(t = !0) {
122
+ const i = B(le);
124
123
  if (i === null)
125
124
  return [!0, null];
126
125
  const { isPresent: s, onExitComplete: n, register: r } = i, a = _();
127
- re(() => {
126
+ ie(() => {
128
127
  if (t)
129
128
  return r(a);
130
129
  }, [t]);
131
- const l = Oe(() => t && n && n(a), [a, n, t]);
130
+ const l = Se(() => t && n && n(a), [a, n, t]);
132
131
  return !s && n ? [!1, l] : [!0];
133
132
  }
134
133
  const R = (t) => t.key || "";
135
134
  function ee(t) {
136
135
  const i = [];
137
- return ze.forEach(t, (s) => {
138
- Me(s) && i.push(s);
136
+ return Te.forEach(t, (s) => {
137
+ Oe(s) && i.push(s);
139
138
  }), i;
140
139
  }
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(() => {
140
+ const tt = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presenceAffectsLayout: r = !0, mode: a = "sync", propagate: l = !1, anchorX: u = "left", root: h }) => {
141
+ const [d, g] = et(l), f = F(() => ee(t), [t]), m = l && !d ? [] : f.map(R), p = E(!0), x = E(f), j = oe(() => /* @__PURE__ */ new Map()), [P, o] = K(f), [c, C] = K(f);
142
+ Ve(() => {
144
143
  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);
144
+ for (let v = 0; v < c.length; v++) {
145
+ const y = R(c[v]);
146
+ m.includes(y) ? j.delete(y) : j.get(y) !== !0 && j.set(y, !1);
148
147
  }
149
- }, [d, m.length, m.join("-")]);
148
+ }, [c, m.length, m.join("-")]);
150
149
  const b = [];
151
- if (f !== A) {
152
- 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));
150
+ if (f !== P) {
151
+ let v = [...f];
152
+ for (let y = 0; y < c.length; y++) {
153
+ const N = c[y], $ = R(N);
154
+ m.includes($) || (v.splice(y, 0, N), b.push(N));
156
155
  }
157
- return a === "wait" && b.length && (w = b), C(ee(w)), o(f), null;
156
+ return a === "wait" && b.length && (v = b), C(ee(v)), o(f), null;
158
157
  }
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);
158
+ process.env.NODE_ENV !== "production" && a === "wait" && c.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.`);
159
+ const { forceRender: k } = B(Be);
160
+ return e.jsx(e.Fragment, { children: c.map((v) => {
161
+ const y = R(v), N = l && !d ? !1 : f === c || m.includes(y), $ = () => {
162
+ if (j.has(y))
163
+ j.set(y, !0);
165
164
  else
166
165
  return;
167
166
  let X = !0;
168
- v.forEach((ue) => {
169
- ue || (X = !1);
170
- }), X && (k?.(), C(x.current), l && y?.(), n && n());
167
+ j.forEach((de) => {
168
+ de || (X = !1);
169
+ }), X && (k?.(), C(x.current), l && g?.(), n && n());
171
170
  };
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);
171
+ return e.jsx(Ye, { isPresent: N, initial: !p.current || s ? void 0 : !1, custom: i, presenceAffectsLayout: r, mode: a, root: h, onExitComplete: N ? void 0 : $, anchorX: u, children: v }, y);
173
172
  }) });
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
183
- }) => {
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
191
- ),
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
- ] })
233
- ] }),
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(
173
+ }, ce = Me(
260
174
  ({ isPending: t, children: i, className: s, ...n }, r) => /* @__PURE__ */ e.jsxs(
261
- _e,
175
+ Fe,
262
176
  {
263
177
  ref: r,
264
178
  disabled: t,
265
179
  ...n,
266
- className: N("relative", s),
180
+ className: A("relative", s),
267
181
  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 })
182
+ t && /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 grid place-items-center", children: /* @__PURE__ */ e.jsx(Le, {}) }),
183
+ /* @__PURE__ */ e.jsx("span", { className: A("block", t && "invisible"), children: i })
270
184
  ]
271
185
  }
272
186
  )
273
187
  );
274
- de.displayName = "ActionButton";
275
- const at = ({
188
+ ce.displayName = "ActionButton";
189
+ const st = ({
276
190
  service: t,
277
191
  onOpenChange: i
278
192
  }) => {
279
- const s = ne(), n = ie(), r = we(), a = Qe({
193
+ const s = se(), n = ne(), r = je(), a = ze({
280
194
  defaultValues: {
281
195
  expiresOn: "30"
282
196
  }
283
- }), l = He(), h = O({
284
- mutationFn: ({ description: c, expiresOn: u }) => {
197
+ }), l = Qe(), u = O({
198
+ mutationFn: ({ description: h, expiresOn: d }) => {
285
199
  if (!t.createKey)
286
200
  throw new Error("createKey not implemented");
287
- const y = u !== "never" ? ot(Number(u)) : void 0;
201
+ const g = d !== "never" ? nt(Number(d)) : void 0;
288
202
  return t.createKey({
289
203
  apiKey: {
290
- description: c || "Secret Key",
291
- expiresOn: y
204
+ description: h || "Secret Key",
205
+ expiresOn: g
292
206
  },
293
207
  context: s,
294
208
  auth: l
@@ -302,48 +216,48 @@ const at = ({
302
216
  "form",
303
217
  {
304
218
  onSubmit: a.handleSubmit(
305
- (c) => h.mutate(
306
- { ...c },
219
+ (h) => u.mutate(
220
+ { ...h },
307
221
  {
308
222
  onSuccess: () => i(!1)
309
223
  }
310
224
  )
311
225
  ),
312
226
  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 })
227
+ u.error && /* @__PURE__ */ e.jsxs(M, { variant: "destructive", className: "mb-4", children: [
228
+ /* @__PURE__ */ e.jsx(q, { children: "Error" }),
229
+ /* @__PURE__ */ e.jsx(be, { children: u.error.message })
316
230
  ] }),
317
231
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 flex-col text-sm font-medium", children: [
318
232
  "Name",
319
- /* @__PURE__ */ e.jsx(oe, { ...a.register("description") }),
233
+ /* @__PURE__ */ e.jsx(ae, { ...a.register("description") }),
320
234
  "Expiration",
321
235
  /* @__PURE__ */ e.jsxs(
322
- Ke,
236
+ ke,
323
237
  {
324
- onValueChange: (c) => a.setValue("expiresOn", c),
238
+ onValueChange: (h) => a.setValue("expiresOn", h),
325
239
  defaultValue: a.getValues("expiresOn"),
326
240
  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,
241
+ /* @__PURE__ */ e.jsx(Ne, { children: /* @__PURE__ */ e.jsx(Ke, {}) }),
242
+ /* @__PURE__ */ e.jsx(Ee, { children: /* @__PURE__ */ e.jsxs(De, { children: [
243
+ [7, 30, 60, 90].map((h) => /* @__PURE__ */ e.jsxs(Z, { value: String(h), children: [
244
+ h,
331
245
  " days"
332
- ] }, c)),
246
+ ] }, h)),
333
247
  /* @__PURE__ */ e.jsx(Z, { value: "never", children: "Never" })
334
248
  ] }) })
335
249
  ]
336
250
  }
337
251
  ),
338
252
  /* @__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" })
253
+ /* @__PURE__ */ e.jsx(D, { asChild: !0, children: /* @__PURE__ */ e.jsx(w, { variant: "outline", children: "Cancel" }) }),
254
+ /* @__PURE__ */ e.jsx(ce, { isPending: u.isPending, children: "Generate Key" })
341
255
  ] })
342
256
  ] })
343
257
  ]
344
258
  }
345
259
  ) : null;
346
- }, ot = (t) => {
260
+ }, nt = (t) => {
347
261
  const i = /* @__PURE__ */ new Date();
348
262
  return i.setDate(i.getDate() + t), i.toISOString();
349
263
  }, te = ({
@@ -353,41 +267,41 @@ const at = ({
353
267
  trigger: n,
354
268
  buttonVariant: r = "outline"
355
269
  }) => {
356
- const a = /* @__PURE__ */ e.jsx(j, { variant: r, children: "Create API Key" });
270
+ const a = /* @__PURE__ */ e.jsx(w, { variant: r, children: "Create API Key" });
357
271
  return /* @__PURE__ */ e.jsxs(V, { open: i, onOpenChange: s, children: [
358
272
  /* @__PURE__ */ e.jsx(G, { asChild: !0, children: n ?? a }),
359
273
  /* @__PURE__ */ e.jsxs(J, { children: [
360
274
  /* @__PURE__ */ e.jsx(U, { children: /* @__PURE__ */ e.jsx(W, { children: "Create API Key" }) }),
361
- /* @__PURE__ */ e.jsx(at, { service: t, onOpenChange: s })
275
+ /* @__PURE__ */ e.jsx(st, { service: t, onOpenChange: s })
362
276
  ] })
363
277
  ] });
364
- }, lt = ({ service: t }) => {
365
- const i = ne(), s = ie(), [n, r] = E(
278
+ }, it = ({ service: t }) => {
279
+ const i = se(), s = ne(), [n, r] = K(
366
280
  null
367
- ), [a, l] = E(""), { data: h, isFetching: c } = Ne({
281
+ ), [a, l] = K(""), { data: u, isFetching: h } = we({
368
282
  queryFn: () => t.getConsumers(i),
369
283
  queryKey: ["api-keys"],
370
284
  retry: !1
371
- }), [u, y] = E(!1), f = O({
285
+ }), [d, g] = K(!1), f = O({
372
286
  mutationFn: ({
373
287
  consumerId: o,
374
- keyId: d
288
+ keyId: c
375
289
  }) => {
376
290
  if (!t.deleteKey)
377
291
  throw new Error("deleteKey not implemented");
378
- return t.deleteKey(o, d, i);
292
+ return t.deleteKey(o, c, i);
379
293
  },
380
- onMutate: async ({ consumerId: o, keyId: d }) => {
294
+ onMutate: async ({ consumerId: o, keyId: c }) => {
381
295
  await s.cancelQueries({ queryKey: ["api-keys"] });
382
296
  const C = s.getQueryData([
383
297
  "api-keys"
384
298
  ]);
385
299
  return s.setQueryData(["api-keys"], (b) => b && b.map((k) => k.id === o ? {
386
300
  ...k,
387
- apiKeys: k.apiKeys.filter((w) => w.id !== d)
301
+ apiKeys: k.apiKeys.filter((v) => v.id !== c)
388
302
  } : k)), { previousData: C };
389
303
  },
390
- onError: (o, d, C) => {
304
+ onError: (o, c, C) => {
391
305
  C?.previousData && s.setQueryData(["api-keys"], C.previousData);
392
306
  },
393
307
  onSuccess: () => {
@@ -396,21 +310,21 @@ const at = ({
396
310
  }), m = O({
397
311
  mutationFn: ({
398
312
  consumerId: o,
399
- label: d
313
+ label: c
400
314
  }) => {
401
315
  if (!t.updateConsumer)
402
316
  throw new Error("updateConsumer not implemented");
403
- return t.updateConsumer({ id: o, label: d }, i);
317
+ return t.updateConsumer({ id: o, label: c }, i);
404
318
  },
405
- onMutate: async ({ consumerId: o, label: d }) => {
319
+ onMutate: async ({ consumerId: o, label: c }) => {
406
320
  await s.cancelQueries({ queryKey: ["api-keys"] });
407
321
  const C = s.getQueryData(["api-keys"]);
408
322
  return s.setQueryData(["api-keys"], (b) => b && b.map((k) => k.id === o ? {
409
323
  ...k,
410
- label: d
324
+ label: c
411
325
  } : k)), { previousData: C };
412
326
  },
413
- onError: (o, d, C) => {
327
+ onError: (o, c, C) => {
414
328
  C?.previousData && s.setQueryData(["api-keys"], C.previousData);
415
329
  },
416
330
  onSuccess: () => {
@@ -423,14 +337,14 @@ const at = ({
423
337
  return t.rollKey(o, i);
424
338
  },
425
339
  onSuccess: () => s.invalidateQueries({ queryKey: ["api-keys"] })
426
- }), x = (o, d) => {
427
- r(o), l(d);
428
- }, v = (o) => {
340
+ }), x = (o, c) => {
341
+ r(o), l(c);
342
+ }, j = (o) => {
429
343
  a.trim() && m.mutate({
430
344
  consumerId: o,
431
345
  label: a.trim()
432
346
  }), r(null), l("");
433
- }, A = () => {
347
+ }, P = () => {
434
348
  r(null), l("");
435
349
  };
436
350
  return /* @__PURE__ */ e.jsxs("div", { className: "max-w-screen-md h-full pt-(--padding-content-top) pb-(--padding-content-bottom)", children: [
@@ -441,27 +355,27 @@ const at = ({
441
355
  te,
442
356
  {
443
357
  service: t,
444
- isOpen: u,
445
- onOpenChange: y
358
+ isOpen: d,
359
+ onOpenChange: g
446
360
  }
447
361
  )
448
362
  ] }),
449
363
  /* @__PURE__ */ e.jsx("p", { children: "Create, manage, and monitor your API keys" }),
450
364
  /* @__PURE__ */ e.jsx(Y.Target, { name: "api-keys-list-page-before-keys" }),
451
365
  /* @__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 })
366
+ p.isError && /* @__PURE__ */ e.jsxs(M, { variant: "destructive", className: "mb-4", children: [
367
+ /* @__PURE__ */ e.jsx(z, { size: 16 }),
368
+ /* @__PURE__ */ e.jsx(q, { children: p.error.message })
455
369
  ] }),
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 })
370
+ m.isError && /* @__PURE__ */ e.jsxs(M, { variant: "destructive", className: "mb-4", children: [
371
+ /* @__PURE__ */ e.jsx(z, { size: 16 }),
372
+ /* @__PURE__ */ e.jsx(q, { children: m.error.message })
459
373
  ] }),
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 })
374
+ f.isError && /* @__PURE__ */ e.jsxs(M, { variant: "destructive", className: "mb-4", children: [
375
+ /* @__PURE__ */ e.jsx(z, { size: 16 }),
376
+ /* @__PURE__ */ e.jsx(q, { children: f.error.message })
463
377
  ] }),
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: [
378
+ /* @__PURE__ */ e.jsx("div", { className: "", children: u.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
379
  /* @__PURE__ */ e.jsxs("p", { className: "text-center", children: [
466
380
  "You have no API keys yet.",
467
381
  /* @__PURE__ */ e.jsx("br", {}),
@@ -471,33 +385,33 @@ const at = ({
471
385
  te,
472
386
  {
473
387
  service: t,
474
- isOpen: u,
475
- onOpenChange: y
388
+ isOpen: d,
389
+ onOpenChange: g
476
390
  }
477
391
  )
478
392
  ] }) : /* @__PURE__ */ e.jsx(
479
393
  "ul",
480
394
  {
481
- className: N(
395
+ className: A(
482
396
  "grid grid-cols-[1fr_min-content] divide-y divide-border col-span-6"
483
397
  ),
484
- children: h.map((o) => /* @__PURE__ */ e.jsxs(
485
- $e,
398
+ children: u.map((o) => /* @__PURE__ */ e.jsxs(
399
+ qe,
486
400
  {
487
401
  className: "grid grid-cols-subgrid col-span-full items-center mb-4 group",
488
402
  children: [
489
- /* @__PURE__ */ e.jsxs(Fe, { className: "border-b col-span-full grid-cols-subgrid grid", children: [
403
+ /* @__PURE__ */ e.jsxs($e, { className: "border-b col-span-full grid-cols-subgrid grid", children: [
490
404
  /* @__PURE__ */ e.jsxs("div", { className: "h-10 flex flex-col text-sm justify-center", children: [
491
405
  /* @__PURE__ */ e.jsxs("div", { className: "font-medium text-lg flex items-center gap-2", children: [
492
406
  n === o.id ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 w-full", children: [
493
407
  /* @__PURE__ */ e.jsx(
494
- oe,
408
+ ae,
495
409
  {
496
410
  maxLength: 32,
497
411
  value: a,
498
- onChange: (d) => l(d.target.value),
499
- onKeyDown: (d) => {
500
- d.key === "Enter" ? v(o.id) : d.key === "Escape" && A();
412
+ onChange: (c) => l(c.target.value),
413
+ onKeyDown: (c) => {
414
+ c.key === "Enter" ? j(o.id) : c.key === "Escape" && P();
501
415
  },
502
416
  className: "text-lg font-medium",
503
417
  autoFocus: !0
@@ -505,22 +419,22 @@ const at = ({
505
419
  ),
506
420
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
507
421
  /* @__PURE__ */ e.jsx(
508
- j,
422
+ w,
509
423
  {
510
424
  size: "icon",
511
425
  variant: "ghost",
512
- onClick: () => v(o.id),
426
+ onClick: () => j(o.id),
513
427
  disabled: !a.trim(),
514
- children: /* @__PURE__ */ e.jsx(se, { size: 16 })
428
+ children: /* @__PURE__ */ e.jsx(ue, { size: 16 })
515
429
  }
516
430
  ),
517
431
  /* @__PURE__ */ e.jsx(
518
- j,
432
+ w,
519
433
  {
520
434
  size: "icon",
521
435
  variant: "ghost",
522
- onClick: A,
523
- children: /* @__PURE__ */ e.jsx(me, { size: 16 })
436
+ onClick: P,
437
+ children: /* @__PURE__ */ e.jsx(he, { size: 16 })
524
438
  }
525
439
  )
526
440
  ] })
@@ -542,24 +456,24 @@ const at = ({
542
456
  ] }),
543
457
  /* @__PURE__ */ e.jsxs("div", { className: "flex justify-end", children: [
544
458
  t.updateConsumer && /* @__PURE__ */ e.jsxs(
545
- j,
459
+ w,
546
460
  {
547
461
  variant: "ghost",
548
462
  onClick: () => x(o.id, o.label),
549
- className: N(
463
+ className: A(
550
464
  "flex gap-2",
551
465
  n === o.id && "opacity-0! pointer-events-none"
552
466
  ),
553
467
  disabled: n === o.id,
554
468
  children: [
555
- /* @__PURE__ */ e.jsx(xe, { size: 16 }),
469
+ /* @__PURE__ */ e.jsx(fe, { size: 16 }),
556
470
  /* @__PURE__ */ e.jsx("span", { className: "hidden md:block", children: "Edit label" })
557
471
  ]
558
472
  }
559
473
  ),
560
474
  t.rollKey && /* @__PURE__ */ e.jsxs(V, { children: [
561
475
  /* @__PURE__ */ e.jsx(G, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
562
- j,
476
+ w,
563
477
  {
564
478
  title: "Roll this key",
565
479
  variant: "ghost",
@@ -567,7 +481,7 @@ const at = ({
567
481
  className: "flex items-center gap-2",
568
482
  children: [
569
483
  /* @__PURE__ */ e.jsx(
570
- ye,
484
+ pe,
571
485
  {
572
486
  size: 16,
573
487
  className: p.isPending ? "animate-spin" : void 0
@@ -580,12 +494,12 @@ const at = ({
580
494
  /* @__PURE__ */ e.jsxs(J, { children: [
581
495
  /* @__PURE__ */ e.jsxs(U, { children: [
582
496
  /* @__PURE__ */ e.jsx(W, { children: "Roll API Key" }),
583
- /* @__PURE__ */ e.jsx(ae, { children: "Are you sure you want to roll this API key?" })
497
+ /* @__PURE__ */ e.jsx(re, { children: "Are you sure you want to roll this API key?" })
584
498
  ] }),
585
499
  /* @__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,
500
+ /* @__PURE__ */ e.jsx(D, { asChild: !0, children: /* @__PURE__ */ e.jsx(w, { variant: "outline", children: "Cancel" }) }),
501
+ /* @__PURE__ */ e.jsx(D, { asChild: !0, children: /* @__PURE__ */ e.jsx(
502
+ w,
589
503
  {
590
504
  onClick: () => {
591
505
  p.mutate(o.id);
@@ -598,22 +512,22 @@ const at = ({
598
512
  ] })
599
513
  ] })
600
514
  ] }),
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: [
515
+ /* @__PURE__ */ e.jsx("div", { className: "col-span-full grid-cols-subgrid grid", children: /* @__PURE__ */ e.jsx(tt, { children: o.apiKeys.map((c) => /* @__PURE__ */ e.jsxs(Pe.Fragment, { children: [
602
516
  /* @__PURE__ */ e.jsx(
603
- dt,
517
+ at,
604
518
  {
605
- apiKey: d,
519
+ apiKey: c,
606
520
  onDeleteKey: () => {
607
521
  f.mutate({
608
522
  consumerId: o.id,
609
- keyId: d.id
523
+ keyId: c.id
610
524
  });
611
525
  },
612
- className: f.variables?.keyId === d.id && (f.isPending || c) ? "opacity-10!" : void 0
526
+ className: f.variables?.keyId === c.id && (f.isPending || h) ? "opacity-10!" : void 0
613
527
  }
614
528
  ),
615
529
  /* @__PURE__ */ e.jsx("div", { className: "col-span-full h-px bg-border" })
616
- ] }, d.id)) }) })
530
+ ] }, c.id)) }) })
617
531
  ]
618
532
  },
619
533
  o.id
@@ -621,25 +535,25 @@ const at = ({
621
535
  }
622
536
  ) })
623
537
  ] });
624
- }, ct = (t) => {
538
+ }, rt = (t) => {
625
539
  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
540
  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 = ({
541
+ }, at = ({
628
542
  apiKey: t,
629
543
  onDeleteKey: i,
630
544
  className: s
631
545
  }) => {
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: [
546
+ const [n, r] = K(!1), { key: a, createdOn: l, expiresOn: u } = t, h = u && new Date(u) < /* @__PURE__ */ new Date(), d = u ? Math.ceil(
547
+ (new Date(u).getTime() - Date.now()) / (1e3 * 60 * 60 * 24)
548
+ ) : 1 / 0, g = d <= 7 && !h;
549
+ return /* @__PURE__ */ e.jsxs("div", { className: A("grid col-span-full grid-cols-subgrid p-6", s), children: [
636
550
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1", children: [
637
551
  /* @__PURE__ */ e.jsx(
638
- rt,
552
+ Ae,
639
553
  {
640
554
  className: "max-w-fit w-full",
641
555
  secret: a,
642
- status: c ? "expired" : y ? "expiring" : "active",
556
+ status: h ? "expired" : g ? "expiring" : "active",
643
557
  revealed: n,
644
558
  onReveal: r
645
559
  }
@@ -647,35 +561,35 @@ const at = ({
647
561
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1 mt-0.5 text-nowrap", children: [
648
562
  l && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-muted-foreground", children: [
649
563
  "Created ",
650
- ct(l),
564
+ rt(l),
651
565
  "."
652
566
  ] }),
653
567
  " ",
654
- h && y && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-primary", children: [
568
+ u && g && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-primary", children: [
655
569
  "Expires in ",
656
- u,
570
+ d,
657
571
  " ",
658
- u === 1 ? "day" : "days",
572
+ d === 1 ? "day" : "days",
659
573
  "."
660
574
  ] }),
661
- h && c && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-primary", children: [
575
+ u && h && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-primary", children: [
662
576
  "Expired",
663
577
  " ",
664
- u === 0 ? "today." : `${u * -1} days ago.`
578
+ d === 0 ? "today." : `${d * -1} days ago.`
665
579
  ] })
666
580
  ] })
667
581
  ] }),
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 }) }) }),
582
+ /* @__PURE__ */ e.jsx("div", { className: "flex justify-end", children: u && i && /* @__PURE__ */ e.jsxs(V, { children: [
583
+ /* @__PURE__ */ e.jsx(G, { asChild: !0, children: /* @__PURE__ */ e.jsx(w, { variant: "ghost", size: "icon", children: /* @__PURE__ */ e.jsx(me, { size: 16 }) }) }),
670
584
  /* @__PURE__ */ e.jsxs(J, { children: [
671
585
  /* @__PURE__ */ e.jsxs(U, { children: [
672
586
  /* @__PURE__ */ e.jsx(W, { children: "Delete API Key" }),
673
- /* @__PURE__ */ e.jsx(ae, { children: "Are you sure you want to delete this API key?" })
587
+ /* @__PURE__ */ e.jsx(re, { children: "Are you sure you want to delete this API key?" })
674
588
  ] }),
675
589
  /* @__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,
590
+ /* @__PURE__ */ e.jsx(D, { asChild: !0, children: /* @__PURE__ */ e.jsx(w, { variant: "outline", children: "Cancel" }) }),
591
+ /* @__PURE__ */ e.jsx(D, { asChild: !0, children: /* @__PURE__ */ e.jsx(
592
+ w,
679
593
  {
680
594
  onClick: () => {
681
595
  i();
@@ -687,7 +601,7 @@ const at = ({
687
601
  ] })
688
602
  ] }) })
689
603
  ] });
690
- }, S = "https://api.zuploedge.com/v2/client", ut = async (t) => {
604
+ }, S = "https://api.zuploedge.com/v2/client", ot = async (t) => {
691
605
  try {
692
606
  return await t.json();
693
607
  } catch {
@@ -696,11 +610,11 @@ const at = ({
696
610
  }, T = async (t) => {
697
611
  const i = t.headers.get("content-type");
698
612
  if (!t.ok && i?.includes("application/problem+json")) {
699
- const s = await ut(t);
613
+ const s = await ot(t);
700
614
  if (s.type && s.title)
701
615
  throw new Error(s.detail ?? s.title);
702
616
  }
703
- }, ht = (t, i) => ({
617
+ }, lt = (t, i) => ({
704
618
  deleteKey: async (s, n, r) => {
705
619
  const a = new Request(
706
620
  S + `/${t}/consumers/${s}/keys/${n}`,
@@ -710,7 +624,7 @@ const at = ({
710
624
  );
711
625
  await r.signRequest(a);
712
626
  const l = await fetch(a);
713
- await T(l), P(l.ok, "Failed to delete API key");
627
+ await T(l), I(l.ok, "Failed to delete API key");
714
628
  },
715
629
  updateConsumer: async (s, n) => {
716
630
  const r = await fetch(
@@ -729,7 +643,7 @@ const at = ({
729
643
  )
730
644
  )
731
645
  );
732
- await T(r), P(r.ok, "Failed to update API key description");
646
+ await T(r), I(r.ok, "Failed to update API key description");
733
647
  },
734
648
  rollKey: async (s, n) => {
735
649
  const r = await fetch(
@@ -746,7 +660,7 @@ const at = ({
746
660
  )
747
661
  )
748
662
  );
749
- await T(r), P(r.ok, "Failed to delete API key");
663
+ await T(r), I(r.ok, "Failed to delete API key");
750
664
  },
751
665
  getConsumers: async (s) => {
752
666
  const n = new Request(
@@ -754,7 +668,7 @@ const at = ({
754
668
  );
755
669
  await s.signRequest(n);
756
670
  const r = await fetch(n);
757
- return await T(r), P(r.ok, "Failed to fetch API keys"), (await r.json()).data.map((l) => ({
671
+ return await T(r), I(r.ok, "Failed to fetch API keys"), (await r.json()).data.map((l) => ({
758
672
  id: l.id,
759
673
  label: l.label || l.subject || "API Key",
760
674
  apiKeys: l.apiKeys.data,
@@ -762,15 +676,15 @@ const at = ({
762
676
  }));
763
677
  },
764
678
  ...i
765
- }), St = (t) => t, Tt = (t) => {
766
- const i = "deploymentName" in t ? ht(t.deploymentName, t) : t;
679
+ }), Dt = (t) => t, At = (t) => {
680
+ const i = "deploymentName" in t ? lt(t.deploymentName, t) : t;
767
681
  return {
768
682
  getProfileMenuItems: () => [
769
683
  {
770
684
  label: "API Keys",
771
685
  path: "/settings/api-keys",
772
686
  category: "middle",
773
- icon: je
687
+ icon: xe
774
688
  }
775
689
  ],
776
690
  getIdentities: async (s) => {
@@ -789,12 +703,12 @@ const at = ({
789
703
  },
790
704
  getRoutes: () => [
791
705
  {
792
- element: /* @__PURE__ */ e.jsx(Ve, {}),
793
- errorElement: /* @__PURE__ */ e.jsx(ve, {}),
706
+ element: /* @__PURE__ */ e.jsx(_e, {}),
707
+ errorElement: /* @__PURE__ */ e.jsx(ye, {}),
794
708
  children: [
795
709
  {
796
710
  path: "/settings/api-keys",
797
- element: /* @__PURE__ */ e.jsx(lt, { service: i })
711
+ element: /* @__PURE__ */ e.jsx(it, { service: i })
798
712
  }
799
713
  ]
800
714
  }
@@ -802,7 +716,7 @@ const at = ({
802
716
  };
803
717
  };
804
718
  export {
805
- Tt as apiKeyPlugin,
806
- St as createApiKeyService
719
+ At as apiKeyPlugin,
720
+ Dt as createApiKeyService
807
721
  };
808
722
  //# sourceMappingURL=zudoku.plugin-api-keys.js.map