zudoku 0.0.0-z7b86faab → 0.0.0-z8ac421f0

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 (321) hide show
  1. package/dist/app/main.js +1 -1
  2. package/dist/app/main.js.map +1 -1
  3. package/dist/config/create-plugin.d.ts +2 -0
  4. package/dist/config/create-plugin.js +55 -0
  5. package/dist/config/create-plugin.js.map +1 -0
  6. package/dist/config/loader.js +2 -2
  7. package/dist/config/loader.js.map +1 -1
  8. package/dist/config/validators/InputNavigationSchema.d.ts +174 -124
  9. package/dist/config/validators/InputNavigationSchema.js +17 -0
  10. package/dist/config/validators/InputNavigationSchema.js.map +1 -1
  11. package/dist/config/validators/NavigationSchema.d.ts +10 -2
  12. package/dist/config/validators/NavigationSchema.js +7 -0
  13. package/dist/config/validators/NavigationSchema.js.map +1 -1
  14. package/dist/config/validators/ProtectedRoutesSchema.d.ts +1 -1
  15. package/dist/config/validators/validate.d.ts +6 -5
  16. package/dist/config/validators/validate.js +2 -0
  17. package/dist/config/validators/validate.js.map +1 -1
  18. package/dist/flat-config.d.ts +36 -24
  19. package/dist/index.d.ts +2 -1
  20. package/dist/index.js +1 -0
  21. package/dist/index.js.map +1 -1
  22. package/dist/lib/components/Bootstrap.js +1 -2
  23. package/dist/lib/components/Bootstrap.js.map +1 -1
  24. package/dist/lib/components/Heading.d.ts +1 -1
  25. package/dist/lib/components/MobileTopNavigation.js +2 -1
  26. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  27. package/dist/lib/components/Slot.test.js +1 -1
  28. package/dist/lib/components/Slot.test.js.map +1 -1
  29. package/dist/lib/components/TopNavigation.d.ts +7 -1
  30. package/dist/lib/components/TopNavigation.js +7 -2
  31. package/dist/lib/components/TopNavigation.js.map +1 -1
  32. package/dist/lib/components/Zudoku.d.ts +4 -1
  33. package/dist/lib/components/Zudoku.js +4 -7
  34. package/dist/lib/components/Zudoku.js.map +1 -1
  35. package/dist/lib/components/context/ZudokuContext.d.ts +9 -4
  36. package/dist/lib/components/context/ZudokuContext.js +4 -2
  37. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  38. package/dist/lib/components/context/ZudokuProvider.js +1 -1
  39. package/dist/lib/components/context/ZudokuProvider.js.map +1 -1
  40. package/dist/lib/components/context/ZudokuReactContext.d.ts +11 -0
  41. package/dist/lib/components/context/ZudokuReactContext.js +4 -0
  42. package/dist/lib/components/context/ZudokuReactContext.js.map +1 -0
  43. package/dist/lib/components/index.d.ts +18 -74
  44. package/dist/lib/components/index.js +19 -36
  45. package/dist/lib/components/index.js.map +1 -1
  46. package/dist/lib/components/navigation/Navigation.js +4 -3
  47. package/dist/lib/components/navigation/Navigation.js.map +1 -1
  48. package/dist/lib/components/navigation/NavigationCategory.js +8 -0
  49. package/dist/lib/components/navigation/NavigationCategory.js.map +1 -1
  50. package/dist/lib/components/navigation/NavigationFilterContext.d.ts +8 -0
  51. package/dist/lib/components/navigation/NavigationFilterContext.js +12 -0
  52. package/dist/lib/components/navigation/NavigationFilterContext.js.map +1 -0
  53. package/dist/lib/components/navigation/NavigationFilterInput.d.ts +3 -0
  54. package/dist/lib/components/navigation/NavigationFilterInput.js +9 -0
  55. package/dist/lib/components/navigation/NavigationFilterInput.js.map +1 -0
  56. package/dist/lib/components/navigation/NavigationItem.js +11 -1
  57. package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
  58. package/dist/lib/components/navigation/utils.d.ts +2 -1
  59. package/dist/lib/components/navigation/utils.js +22 -1
  60. package/dist/lib/components/navigation/utils.js.map +1 -1
  61. package/dist/lib/core/ZudokuContext.d.ts +2 -1
  62. package/dist/lib/core/ZudokuContext.js +3 -1
  63. package/dist/lib/core/ZudokuContext.js.map +1 -1
  64. package/dist/lib/core/__internal.d.ts +1 -0
  65. package/dist/lib/core/__internal.js +2 -0
  66. package/dist/lib/core/__internal.js.map +1 -1
  67. package/dist/lib/core/plugins.d.ts +5 -1
  68. package/dist/lib/core/plugins.js.map +1 -1
  69. package/dist/lib/core/transform-config.d.ts +4 -2
  70. package/dist/lib/core/transform-config.js +33 -13
  71. package/dist/lib/core/transform-config.js.map +1 -1
  72. package/dist/lib/core/transform-config.test.d.ts +1 -0
  73. package/dist/lib/core/transform-config.test.js +83 -0
  74. package/dist/lib/core/transform-config.test.js.map +1 -0
  75. package/dist/lib/errors/ErrorAlert.js +1 -2
  76. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  77. package/dist/lib/hooks/index.d.ts +7 -30
  78. package/dist/lib/hooks/index.js +7 -15
  79. package/dist/lib/hooks/index.js.map +1 -1
  80. package/dist/lib/hooks/useEvent.test.js +1 -1
  81. package/dist/lib/hooks/useEvent.test.js.map +1 -1
  82. package/dist/lib/oas/graphql/circular.d.ts +1 -1
  83. package/dist/lib/oas/graphql/circular.js +18 -35
  84. package/dist/lib/oas/graphql/circular.js.map +1 -1
  85. package/dist/lib/oas/graphql/circular.test.js +33 -2
  86. package/dist/lib/oas/graphql/circular.test.js.map +1 -1
  87. package/dist/lib/oas/parser/index.js +14 -5
  88. package/dist/lib/oas/parser/index.js.map +1 -1
  89. package/dist/lib/plugins/openapi/ParamInfos.js +8 -5
  90. package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -1
  91. package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
  92. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  93. package/dist/lib/plugins/openapi/playground/fileUtils.d.ts +1 -0
  94. package/dist/lib/plugins/openapi/playground/fileUtils.js +3 -0
  95. package/dist/lib/plugins/openapi/playground/fileUtils.js.map +1 -1
  96. package/dist/lib/plugins/openapi/playground/result-panel/AudioPlayer.d.ts +6 -0
  97. package/dist/lib/plugins/openapi/playground/result-panel/AudioPlayer.js +20 -0
  98. package/dist/lib/plugins/openapi/playground/result-panel/AudioPlayer.js.map +1 -0
  99. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +7 -2
  100. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
  101. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +2 -2
  102. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
  103. package/dist/lib/ui/Alert.d.ts +3 -2
  104. package/dist/lib/ui/Alert.js +9 -5
  105. package/dist/lib/ui/Alert.js.map +1 -1
  106. package/dist/lib/ui/InputGroup.d.ts +16 -0
  107. package/dist/lib/ui/InputGroup.js +65 -0
  108. package/dist/lib/ui/InputGroup.js.map +1 -0
  109. package/dist/lib/ui/Secret.js +2 -2
  110. package/dist/lib/ui/Secret.js.map +1 -1
  111. package/dist/lib/util/flattenAllOf.d.ts +0 -2
  112. package/dist/lib/util/flattenAllOf.js +6 -46
  113. package/dist/lib/util/flattenAllOf.js.map +1 -1
  114. package/dist/lib/util/flattenAllOf.test.js +28 -1
  115. package/dist/lib/util/flattenAllOf.test.js.map +1 -1
  116. package/dist/lib/util/flattenAllOfProcessor.d.ts +2 -0
  117. package/dist/lib/util/flattenAllOfProcessor.js +48 -0
  118. package/dist/lib/util/flattenAllOfProcessor.js.map +1 -0
  119. package/dist/lib/util/readFrontmatter.js +2 -1
  120. package/dist/lib/util/readFrontmatter.js.map +1 -1
  121. package/dist/vite/api/SchemaManager.js +1 -1
  122. package/dist/vite/api/SchemaManager.js.map +1 -1
  123. package/dist/vite/api/SchemaManager.test.js +1 -1
  124. package/dist/vite/api/SchemaManager.test.js.map +1 -1
  125. package/dist/vite/build.js +91 -73
  126. package/dist/vite/build.js.map +1 -1
  127. package/dist/vite/config.js +5 -2
  128. package/dist/vite/config.js.map +1 -1
  129. package/dist/vite/mdx/remark-inject-filepath.js +5 -1
  130. package/dist/vite/mdx/remark-inject-filepath.js.map +1 -1
  131. package/dist/vite/mdx/remark-link-rewrite.js +3 -2
  132. package/dist/vite/mdx/remark-link-rewrite.js.map +1 -1
  133. package/dist/vite/plugin-config.js +16 -4
  134. package/dist/vite/plugin-config.js.map +1 -1
  135. package/dist/vite/plugin-docs.js +9 -7
  136. package/dist/vite/plugin-docs.js.map +1 -1
  137. package/dist/vite/plugin-markdown-export.js +4 -2
  138. package/dist/vite/plugin-markdown-export.js.map +1 -1
  139. package/dist/vite/plugin-theme.js +2 -1
  140. package/dist/vite/plugin-theme.js.map +1 -1
  141. package/dist/vite/prerender/prerender.js +3 -1
  142. package/dist/vite/prerender/prerender.js.map +1 -1
  143. package/dist/vite/prerender/worker.js +3 -1
  144. package/dist/vite/prerender/worker.js.map +1 -1
  145. package/lib/{ClaudeLogo-DJ9bU-sO.js → ClaudeLogo-Br8C_vTq.js} +26 -22
  146. package/lib/{ClaudeLogo-DJ9bU-sO.js.map → ClaudeLogo-Br8C_vTq.js.map} +1 -1
  147. package/lib/Drawer-Ch7927PF.js.map +1 -1
  148. package/lib/{HydrationBoundary-CNF2ZV3E.js → HydrationBoundary-CJu4vUlG.js} +6 -6
  149. package/lib/{HydrationBoundary-CNF2ZV3E.js.map → HydrationBoundary-CJu4vUlG.js.map} +1 -1
  150. package/lib/{MdxPage-stpAoBtx.js → MdxPage-C0QFAsgv.js} +8 -8
  151. package/lib/{MdxPage-stpAoBtx.js.map → MdxPage-C0QFAsgv.js.map} +1 -1
  152. package/lib/Mermaid-Chx5BPHn.js +104 -0
  153. package/lib/Mermaid-Chx5BPHn.js.map +1 -0
  154. package/lib/{OAuthErrorPage-DJ811Bn_.js → OAuthErrorPage-CFz_gBFx.js} +22 -19
  155. package/lib/{OAuthErrorPage-DJ811Bn_.js.map → OAuthErrorPage-CFz_gBFx.js.map} +1 -1
  156. package/lib/{OasProvider-CS_ASmBB.js → OasProvider-BwIOIlky.js} +3 -3
  157. package/lib/{OasProvider-CS_ASmBB.js.map → OasProvider-BwIOIlky.js.map} +1 -1
  158. package/lib/OperationList-DYRzbPJu.js +5908 -0
  159. package/lib/OperationList-DYRzbPJu.js.map +1 -0
  160. package/lib/{RouteGuard--A04ESy8.js → RouteGuard-CVs3yvEs.js} +5 -5
  161. package/lib/{RouteGuard--A04ESy8.js.map → RouteGuard-CVs3yvEs.js.map} +1 -1
  162. package/lib/{SchemaList-BJZJv1gD.js → SchemaList-D4FEyoDV.js} +8 -8
  163. package/lib/{SchemaList-BJZJv1gD.js.map → SchemaList-D4FEyoDV.js.map} +1 -1
  164. package/lib/{SchemaView-U4JMYB3N.js → SchemaView-ScvkhsYE.js} +116 -110
  165. package/lib/SchemaView-ScvkhsYE.js.map +1 -0
  166. package/lib/{Secret-BDBqq4p3.js → Secret-DUpgv4V3.js} +92 -72
  167. package/lib/Secret-DUpgv4V3.js.map +1 -0
  168. package/lib/{SignUp-DCBViNUi.js → SignUp-Dug1jAGC.js} +31 -26
  169. package/lib/{SignUp-DCBViNUi.js.map → SignUp-Dug1jAGC.js.map} +1 -1
  170. package/lib/{SyntaxHighlight-Dshjn3Zf.js → SyntaxHighlight-BMu0b_hF.js} +9 -9
  171. package/lib/{SyntaxHighlight-Dshjn3Zf.js.map → SyntaxHighlight-BMu0b_hF.js.map} +1 -1
  172. package/lib/{Toc-Cgz6CPiE.js → Toc-BiJ2YL0O.js} +2 -2
  173. package/lib/{Toc-Cgz6CPiE.js.map → Toc-BiJ2YL0O.js.map} +1 -1
  174. package/lib/{index-CL8eDnQW.js → Zudoku-iyiXgWFY.js} +2996 -2859
  175. package/lib/Zudoku-iyiXgWFY.js.map +1 -0
  176. package/lib/ZudokuContext-CYyb_PB_.js +175 -0
  177. package/lib/ZudokuContext-CYyb_PB_.js.map +1 -0
  178. package/lib/ZudokuReactContext-DGJAP1sN.js +222 -0
  179. package/lib/ZudokuReactContext-DGJAP1sN.js.map +1 -0
  180. package/lib/chunk-EPOLDU6W-C6C8jAwd.js.map +1 -1
  181. package/lib/{circular-BmMJjG1v.js → circular-BOpxmAie.js} +1327 -1346
  182. package/lib/{circular-BmMJjG1v.js.map → circular-BOpxmAie.js.map} +1 -1
  183. package/lib/createServer-BunbJzB5.js +13038 -0
  184. package/lib/createServer-BunbJzB5.js.map +1 -0
  185. package/lib/{errors-b9I-fAOY.js → errors-B77S9iOc.js} +3 -3
  186. package/lib/{errors-b9I-fAOY.js.map → errors-B77S9iOc.js.map} +1 -1
  187. package/lib/{firebase-BCXX7Qv5.js → firebase-C7XKRGLf.js} +26 -25
  188. package/lib/{firebase-BCXX7Qv5.js.map → firebase-C7XKRGLf.js.map} +1 -1
  189. package/lib/{hook-BGlHBdET.js → hook-Dz_n9SoE.js} +16 -15
  190. package/lib/{hook-BGlHBdET.js.map → hook-Dz_n9SoE.js.map} +1 -1
  191. package/lib/{index-UOLtazB8.js → index-BDp2MTiq.js} +2 -2
  192. package/lib/{index-UOLtazB8.js.map → index-BDp2MTiq.js.map} +1 -1
  193. package/lib/{index-O9RHI87z.js → index-Bx29qHVi.js} +589 -551
  194. package/lib/index-Bx29qHVi.js.map +1 -0
  195. package/lib/index-CrcNWbel.js.map +1 -1
  196. package/lib/index-DAWHN3cH.js +86 -0
  197. package/lib/index-DAWHN3cH.js.map +1 -0
  198. package/lib/index.esm-BYObtETB.js.map +1 -1
  199. package/lib/{index.esm-B_0dvNjB.js → index.esm-Ca5zvoff.js} +20 -20
  200. package/lib/{index.esm-B_0dvNjB.js.map → index.esm-Ca5zvoff.js.map} +1 -1
  201. package/lib/{index.esm-C5CBsVzN.js → index.esm-Cth49JBv.js} +2 -2
  202. package/lib/index.esm-Cth49JBv.js.map +1 -0
  203. package/lib/{invariant-BJAl77rw.js → invariant-B_t_F2s_.js} +3 -3
  204. package/lib/{invariant-BJAl77rw.js.map → invariant-B_t_F2s_.js.map} +1 -1
  205. package/lib/jsx-runtime-BzflLqGi.js.map +1 -1
  206. package/lib/{mutation-BISOc7OM.js → mutation-B7eFBLZY.js} +2 -2
  207. package/lib/{mutation-BISOc7OM.js.map → mutation-B7eFBLZY.js.map} +1 -1
  208. package/lib/ui/Alert.js +32 -20
  209. package/lib/ui/Alert.js.map +1 -1
  210. package/lib/ui/Carousel.js.map +1 -1
  211. package/lib/ui/InputGroup.js +155 -0
  212. package/lib/ui/InputGroup.js.map +1 -0
  213. package/lib/ui/Secret.js +2 -2
  214. package/lib/ui/Secret.js.map +1 -1
  215. package/lib/ui/SyntaxHighlight.js +3 -3
  216. package/lib/useExposedProps-CzTDfXfq.js +30 -0
  217. package/lib/useExposedProps-CzTDfXfq.js.map +1 -0
  218. package/lib/{useMutation-CFMGlAMW.js → useMutation-CErliDZ9.js} +5 -5
  219. package/lib/{useMutation-CFMGlAMW.js.map → useMutation-CErliDZ9.js.map} +1 -1
  220. package/lib/{useSuspenseQuery-CSB_rVek.js → useQuery-ht7aWJ3S.js} +432 -446
  221. package/lib/useQuery-ht7aWJ3S.js.map +1 -0
  222. package/lib/useSuspenseQuery-DQH4Bmc2.js +18 -0
  223. package/lib/useSuspenseQuery-DQH4Bmc2.js.map +1 -0
  224. package/lib/zudoku.__internal.js +1519 -1033
  225. package/lib/zudoku.__internal.js.map +1 -1
  226. package/lib/zudoku.auth-auth0.js +6 -5
  227. package/lib/zudoku.auth-auth0.js.map +1 -1
  228. package/lib/zudoku.auth-azureb2c.js +14 -13
  229. package/lib/zudoku.auth-azureb2c.js.map +1 -1
  230. package/lib/zudoku.auth-clerk.js +2 -2
  231. package/lib/zudoku.auth-firebase.js +5 -5
  232. package/lib/zudoku.auth-openid.js +8 -7
  233. package/lib/zudoku.auth-openid.js.map +1 -1
  234. package/lib/zudoku.auth-supabase.js +4 -4
  235. package/lib/zudoku.components.js +31 -29
  236. package/lib/zudoku.components.js.map +1 -1
  237. package/lib/zudoku.hooks.js +24 -11
  238. package/lib/zudoku.hooks.js.map +1 -1
  239. package/lib/zudoku.mermaid.js +5 -4
  240. package/lib/zudoku.mermaid.js.map +1 -1
  241. package/lib/zudoku.plugin-api-catalog.js +41 -36
  242. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  243. package/lib/zudoku.plugin-api-keys.js +156 -153
  244. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  245. package/lib/zudoku.plugin-custom-pages.js +1 -1
  246. package/lib/zudoku.plugin-markdown.js +1 -1
  247. package/lib/zudoku.plugin-openapi.js +2 -2
  248. package/lib/zudoku.plugin-search-pagefind.js +19 -18
  249. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  250. package/lib/zudoku.plugins.js.map +1 -1
  251. package/lib/zudoku.react-query.js +26 -25
  252. package/lib/zudoku.react-query.js.map +1 -1
  253. package/lib/zudoku.router.js.map +1 -1
  254. package/package.json +17 -10
  255. package/src/app/defaultTheme.css +4 -0
  256. package/src/app/main.css +2 -0
  257. package/src/app/main.tsx +1 -1
  258. package/src/lib/components/Bootstrap.tsx +1 -4
  259. package/src/lib/components/MobileTopNavigation.tsx +13 -8
  260. package/src/lib/components/Slot.test.tsx +1 -1
  261. package/src/lib/components/TopNavigation.tsx +25 -7
  262. package/src/lib/components/Zudoku.tsx +18 -14
  263. package/src/lib/components/context/ZudokuContext.ts +3 -6
  264. package/src/lib/components/context/ZudokuProvider.tsx +1 -1
  265. package/src/lib/components/context/ZudokuReactContext.tsx +17 -0
  266. package/src/lib/components/index.ts +19 -39
  267. package/src/lib/components/navigation/Navigation.tsx +4 -3
  268. package/src/lib/components/navigation/NavigationCategory.tsx +9 -0
  269. package/src/lib/components/navigation/NavigationFilterContext.tsx +28 -0
  270. package/src/lib/components/navigation/NavigationFilterInput.tsx +35 -0
  271. package/src/lib/components/navigation/NavigationItem.tsx +17 -1
  272. package/src/lib/components/navigation/utils.ts +32 -1
  273. package/src/lib/core/ZudokuContext.ts +7 -1
  274. package/src/lib/core/__internal.tsx +2 -0
  275. package/src/lib/core/plugins.ts +7 -3
  276. package/src/lib/core/transform-config.test.tsx +99 -0
  277. package/src/lib/core/transform-config.ts +57 -19
  278. package/src/lib/errors/ErrorAlert.tsx +1 -6
  279. package/src/lib/hooks/index.ts +7 -16
  280. package/src/lib/hooks/useEvent.test.tsx +1 -1
  281. package/src/lib/oas/graphql/circular.test.ts +37 -2
  282. package/src/lib/oas/graphql/circular.ts +25 -51
  283. package/src/lib/oas/parser/index.ts +17 -6
  284. package/src/lib/plugins/openapi/ParamInfos.tsx +10 -5
  285. package/src/lib/plugins/openapi/ParameterListItem.tsx +1 -0
  286. package/src/lib/plugins/openapi/playground/fileUtils.ts +4 -0
  287. package/src/lib/plugins/openapi/playground/result-panel/AudioPlayer.tsx +50 -0
  288. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +33 -17
  289. package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +2 -0
  290. package/src/lib/ui/Alert.tsx +17 -5
  291. package/src/lib/ui/InputGroup.tsx +168 -0
  292. package/src/lib/ui/Secret.tsx +2 -2
  293. package/src/lib/util/flattenAllOf.test.ts +34 -1
  294. package/src/lib/util/flattenAllOf.ts +7 -57
  295. package/src/lib/util/flattenAllOfProcessor.ts +58 -0
  296. package/src/lib/util/readFrontmatter.ts +2 -1
  297. package/src/zuplo/enrich-with-zuplo-mcp.ts +168 -0
  298. package/src/zuplo/enrich-with-zuplo.ts +254 -0
  299. package/src/zuplo/policy-types.ts +46 -0
  300. package/src/zuplo/with-zuplo-processors.ts +35 -0
  301. package/src/zuplo/with-zuplo.ts +14 -0
  302. package/lib/Mermaid-Koc3z8mU.js +0 -102
  303. package/lib/Mermaid-Koc3z8mU.js.map +0 -1
  304. package/lib/OperationList-Dq_AB4W9.js +0 -5820
  305. package/lib/OperationList-Dq_AB4W9.js.map +0 -1
  306. package/lib/SchemaView-U4JMYB3N.js.map +0 -1
  307. package/lib/Secret-BDBqq4p3.js.map +0 -1
  308. package/lib/Separator-BXt1LYnm.js +0 -27
  309. package/lib/Separator-BXt1LYnm.js.map +0 -1
  310. package/lib/ZudokuContext-BZB1TWdT.js +0 -387
  311. package/lib/ZudokuContext-BZB1TWdT.js.map +0 -1
  312. package/lib/___vite-browser-external_commonjs-proxy-BttVsNON.js +0 -9
  313. package/lib/___vite-browser-external_commonjs-proxy-BttVsNON.js.map +0 -1
  314. package/lib/createServer-CLSZ7hWJ.js +0 -16693
  315. package/lib/createServer-CLSZ7hWJ.js.map +0 -1
  316. package/lib/index-CL8eDnQW.js.map +0 -1
  317. package/lib/index-DBjOT2H1.js +0 -133
  318. package/lib/index-DBjOT2H1.js.map +0 -1
  319. package/lib/index-O9RHI87z.js.map +0 -1
  320. package/lib/index.esm-C5CBsVzN.js.map +0 -1
  321. package/lib/useSuspenseQuery-CSB_rVek.js.map +0 -1
@@ -1,35 +1,38 @@
1
1
  import { j as e } from "./jsx-runtime-BzflLqGi.js";
2
2
  import { TrashIcon as me, CircleSlashIcon as z, CheckIcon as xe, XIcon as ye, PencilLineIcon as ge, RefreshCwIcon as je, KeyRoundIcon as ve } from "lucide-react";
3
- import { Z as M, i as E } from "./invariant-BJAl77rw.js";
3
+ import { Z as M, i as E } from "./invariant-B_t_F2s_.js";
4
4
  import * as F from "react";
5
- import { createContext as Q, useRef as A, useLayoutEffect as Ce, useEffect as ie, useId as H, useContext as V, useInsertionEffect as we, useMemo as L, useCallback as ke, Children as Ee, isValidElement as Ie, useState as I } from "react";
6
- import { D as be, c as Ke, d as ee, B as De, E as Pe } from "./index-CL8eDnQW.js";
7
- import { b as re } from "./index-DBjOT2H1.js";
8
- import { F as Ae, g as Se, j as Re, h as Ne, d as Oe, I as Te, a as qe, b as Me, k as Fe, c as $e } from "./Frame-DKlOmSkU.js";
9
- import { A as D, a as P, b as ae } from "./Mermaid-Koc3z8mU.js";
10
- import { e as _, f as S, D as B, g as Z, a as G, b as J, c as Y, d as oe } from "./Dialog-hlvmmQ_c.js";
11
- import { Button as le } from "./ui/Button.js";
12
- import { a as ce, u as ze } from "./useSuspenseQuery-CSB_rVek.js";
13
- import { u as q } from "./useMutation-CFMGlAMW.js";
14
- import { a as Le } from "./index.esm-BYObtETB.js";
15
- import { u as Qe } from "./chunk-EPOLDU6W-C6C8jAwd.js";
16
- import { A as He } from "./ActionButton-B0CXL1Lq.js";
17
- import { S as Ve, a as _e, b as Be, c as Ze, d as Ge, e as te, f as Je } from "./Secret-BDBqq4p3.js";
18
- import { a as U } from "./ZudokuContext-BZB1TWdT.js";
19
- import { Input as Ye } from "./ui/Input.js";
20
- import { c as W } from "./cn-5-Gd1Dss.js";
5
+ import { createContext as Q, useRef as A, useLayoutEffect as Ce, useEffect as re, useId as H, useContext as V, useInsertionEffect as we, useMemo as L, useCallback as ke, Children as Ee, isValidElement as Ie, useState as I } from "react";
6
+ import { D as be, a as te, E as Ke } from "./Zudoku-iyiXgWFY.js";
7
+ import { Button as _ } from "./ui/Button.js";
8
+ import "./ZudokuReactContext-DGJAP1sN.js";
9
+ import "./index-DAWHN3cH.js";
10
+ import { u as ae } from "./hook-Dz_n9SoE.js";
11
+ import { F as De, g as Pe, j as Ae, h as Se, d as Re, I as Ne, a as Oe, b as Te, k as qe, c as Me } from "./Frame-DKlOmSkU.js";
12
+ import { A as D, a as P, b as oe } from "./Mermaid-Chx5BPHn.js";
13
+ import { S as Fe, a as $e, b as ze, c as Le, d as Qe, e as He, f as se, g as Ve } from "./Secret-DUpgv4V3.js";
14
+ import { e as B, f as S, D as Z, g as G, a as J, b as Y, c as U, d as le } from "./Dialog-hlvmmQ_c.js";
15
+ import { b as ce } from "./useQuery-ht7aWJ3S.js";
16
+ import { u as q } from "./useMutation-CErliDZ9.js";
17
+ import { a as _e } from "./index.esm-BYObtETB.js";
18
+ import { u as Be } from "./chunk-EPOLDU6W-C6C8jAwd.js";
19
+ import { A as Ze } from "./ActionButton-B0CXL1Lq.js";
20
+ import { a as W } from "./ZudokuContext-CYyb_PB_.js";
21
+ import { Input as Ge } from "./ui/Input.js";
22
+ import { u as Je } from "./useSuspenseQuery-DQH4Bmc2.js";
23
+ import { c as X } from "./cn-5-Gd1Dss.js";
21
24
  import { B as k } from "./Button-GUVe7pmt.js";
22
- import { I as Ue } from "./Input-Cx-GeKoF.js";
23
- function We({ error: t }) {
25
+ import { I as Ye } from "./Input-Cx-GeKoF.js";
26
+ function Ue({ error: t }) {
24
27
  const a = t instanceof Error ? t.message : "Something went wrong", s = process.env.NODE_ENV === "development", n = t instanceof M ? t.developerHint : void 0, r = t instanceof M ? t.title : "Something went wrong", i = t instanceof Error ? t.stack : void 0, o = t instanceof Error ? t.cause : void 0, d = o instanceof Error ? String(o.stack) : i;
25
28
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
26
29
  /* @__PURE__ */ e.jsxs(D, { variant: "destructive", children: [
27
30
  /* @__PURE__ */ e.jsx(P, { children: r }),
28
- /* @__PURE__ */ e.jsx(ae, { children: a })
31
+ /* @__PURE__ */ e.jsx(oe, { children: a })
29
32
  ] }),
30
33
  s && n && /* @__PURE__ */ e.jsx(be, { className: "mb-4", children: n }),
31
34
  s && d && /* @__PURE__ */ e.jsx(
32
- Ke,
35
+ Fe,
33
36
  {
34
37
  className: "max-h-[400px] [&>pre]:p-4",
35
38
  language: "js",
@@ -38,23 +41,23 @@ function We({ error: t }) {
38
41
  )
39
42
  ] });
40
43
  }
41
- const Xe = ({
44
+ const We = ({
42
45
  service: t,
43
46
  onOpenChange: a
44
47
  }) => {
45
- const s = U(), n = ce(), r = Qe(), i = Le({
48
+ const s = W(), n = ce(), r = Be(), i = _e({
46
49
  defaultValues: {
47
50
  expiresOn: "30"
48
51
  }
49
- }), o = re(), d = q({
52
+ }), o = ae(), d = q({
50
53
  mutationFn: ({ description: c, expiresOn: u }) => {
51
54
  if (!t.createKey)
52
55
  throw new Error("createKey not implemented");
53
- const p = u !== "never" ? et(Number(u)) : void 0;
56
+ const f = u !== "never" ? Xe(Number(u)) : void 0;
54
57
  return t.createKey({
55
58
  apiKey: {
56
59
  description: c || "Secret Key",
57
- expiresOn: p
60
+ expiresOn: f
58
61
  },
59
62
  context: s,
60
63
  auth: o
@@ -78,38 +81,38 @@ const Xe = ({
78
81
  children: [
79
82
  d.error && /* @__PURE__ */ e.jsxs(D, { variant: "destructive", className: "mb-4", children: [
80
83
  /* @__PURE__ */ e.jsx(P, { children: "Error" }),
81
- /* @__PURE__ */ e.jsx(ae, { children: d.error.message })
84
+ /* @__PURE__ */ e.jsx(oe, { children: d.error.message })
82
85
  ] }),
83
86
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 flex-col text-sm font-medium", children: [
84
87
  "Name",
85
- /* @__PURE__ */ e.jsx(Ye, { ...i.register("description") }),
88
+ /* @__PURE__ */ e.jsx(Ge, { ...i.register("description") }),
86
89
  "Expiration",
87
90
  /* @__PURE__ */ e.jsxs(
88
- Ve,
91
+ $e,
89
92
  {
90
93
  onValueChange: (c) => i.setValue("expiresOn", c),
91
94
  defaultValue: i.getValues("expiresOn"),
92
95
  children: [
93
- /* @__PURE__ */ e.jsx(_e, { children: /* @__PURE__ */ e.jsx(Be, {}) }),
94
- /* @__PURE__ */ e.jsx(Ze, { children: /* @__PURE__ */ e.jsxs(Ge, { children: [
95
- [7, 30, 60, 90].map((c) => /* @__PURE__ */ e.jsxs(te, { value: String(c), children: [
96
+ /* @__PURE__ */ e.jsx(ze, { children: /* @__PURE__ */ e.jsx(Le, {}) }),
97
+ /* @__PURE__ */ e.jsx(Qe, { children: /* @__PURE__ */ e.jsxs(He, { children: [
98
+ [7, 30, 60, 90].map((c) => /* @__PURE__ */ e.jsxs(se, { value: String(c), children: [
96
99
  c,
97
100
  " days"
98
101
  ] }, c)),
99
- /* @__PURE__ */ e.jsx(te, { value: "never", children: "Never" })
102
+ /* @__PURE__ */ e.jsx(se, { value: "never", children: "Never" })
100
103
  ] }) })
101
104
  ]
102
105
  }
103
106
  ),
104
- /* @__PURE__ */ e.jsxs(_, { children: [
105
- /* @__PURE__ */ e.jsx(S, { asChild: !0, children: /* @__PURE__ */ e.jsx(le, { variant: "outline", children: "Cancel" }) }),
106
- /* @__PURE__ */ e.jsx(He, { isPending: d.isPending, children: "Generate Key" })
107
+ /* @__PURE__ */ e.jsxs(B, { children: [
108
+ /* @__PURE__ */ e.jsx(S, { asChild: !0, children: /* @__PURE__ */ e.jsx(_, { variant: "outline", children: "Cancel" }) }),
109
+ /* @__PURE__ */ e.jsx(Ze, { isPending: d.isPending, children: "Generate Key" })
107
110
  ] })
108
111
  ] })
109
112
  ]
110
113
  }
111
114
  ) : null;
112
- }, et = (t) => {
115
+ }, Xe = (t) => {
113
116
  const a = /* @__PURE__ */ new Date();
114
117
  return a.setDate(a.getDate() + t), a.toISOString();
115
118
  }, de = ({
@@ -119,60 +122,60 @@ const Xe = ({
119
122
  trigger: n,
120
123
  buttonVariant: r = "outline"
121
124
  }) => {
122
- const i = /* @__PURE__ */ e.jsx(le, { variant: r, children: "Create API Key" });
123
- return /* @__PURE__ */ e.jsxs(B, { open: a, onOpenChange: s, children: [
124
- /* @__PURE__ */ e.jsx(Z, { asChild: !0, children: n ?? i }),
125
- /* @__PURE__ */ e.jsxs(G, { children: [
126
- /* @__PURE__ */ e.jsx(J, { children: /* @__PURE__ */ e.jsx(Y, { children: "Create API Key" }) }),
127
- /* @__PURE__ */ e.jsx(Xe, { service: t, onOpenChange: s })
125
+ const i = /* @__PURE__ */ e.jsx(_, { variant: r, children: "Create API Key" });
126
+ return /* @__PURE__ */ e.jsxs(Z, { open: a, onOpenChange: s, children: [
127
+ /* @__PURE__ */ e.jsx(G, { asChild: !0, children: n ?? i }),
128
+ /* @__PURE__ */ e.jsxs(J, { children: [
129
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(U, { children: "Create API Key" }) }),
130
+ /* @__PURE__ */ e.jsx(We, { service: t, onOpenChange: s })
128
131
  ] })
129
132
  ] });
130
- }, tt = Q({});
133
+ }, et = Q({});
131
134
  function ue(t) {
132
135
  const a = A(null);
133
136
  return a.current === null && (a.current = t()), a.current;
134
137
  }
135
- const st = typeof window < "u", nt = st ? Ce : ie, fe = /* @__PURE__ */ Q(null);
136
- function it(t) {
138
+ const tt = typeof window < "u", st = tt ? Ce : re, pe = /* @__PURE__ */ Q(null);
139
+ function nt(t) {
137
140
  return typeof t == "object" && t !== null;
138
141
  }
139
- function rt(t) {
140
- return it(t) && "offsetHeight" in t;
142
+ function it(t) {
143
+ return nt(t) && "offsetHeight" in t;
141
144
  }
142
- const at = Q({
145
+ const rt = Q({
143
146
  transformPagePoint: (t) => t,
144
147
  isStatic: !1,
145
148
  reducedMotion: "never"
146
149
  });
147
- function se(t, a) {
150
+ function ne(t, a) {
148
151
  if (typeof t == "function")
149
152
  return t(a);
150
153
  t != null && (t.current = a);
151
154
  }
152
- function ot(...t) {
155
+ function at(...t) {
153
156
  return (a) => {
154
157
  let s = !1;
155
158
  const n = t.map((r) => {
156
- const i = se(r, a);
159
+ const i = ne(r, a);
157
160
  return !s && typeof i == "function" && (s = !0), i;
158
161
  });
159
162
  if (s)
160
163
  return () => {
161
164
  for (let r = 0; r < n.length; r++) {
162
165
  const i = n[r];
163
- typeof i == "function" ? i() : se(t[r], null);
166
+ typeof i == "function" ? i() : ne(t[r], null);
164
167
  }
165
168
  };
166
169
  };
167
170
  }
168
- function lt(...t) {
169
- return F.useCallback(ot(...t), t);
171
+ function ot(...t) {
172
+ return F.useCallback(at(...t), t);
170
173
  }
171
- class ct extends F.Component {
174
+ class lt extends F.Component {
172
175
  getSnapshotBeforeUpdate(a) {
173
176
  const s = this.props.childRef.current;
174
177
  if (s && a.isPresent && !this.props.isPresent) {
175
- const n = s.offsetParent, r = rt(n) && n.offsetWidth || 0, i = this.props.sizeRef.current;
178
+ const n = s.offsetParent, r = it(n) && n.offsetWidth || 0, i = this.props.sizeRef.current;
176
179
  i.height = s.offsetHeight || 0, i.width = s.offsetWidth || 0, i.top = s.offsetTop, i.left = s.offsetLeft, i.right = r - i.width - i.left;
177
180
  }
178
181
  return null;
@@ -186,17 +189,17 @@ class ct extends F.Component {
186
189
  return this.props.children;
187
190
  }
188
191
  }
189
- function dt({ children: t, isPresent: a, anchorX: s, root: n }) {
192
+ function ct({ children: t, isPresent: a, anchorX: s, root: n }) {
190
193
  const r = H(), i = A(null), o = A({
191
194
  width: 0,
192
195
  height: 0,
193
196
  top: 0,
194
197
  left: 0,
195
198
  right: 0
196
- }), { nonce: d } = V(at), c = lt(i, t?.ref);
199
+ }), { nonce: d } = V(rt), c = ot(i, t?.ref);
197
200
  return we(() => {
198
- const { width: u, height: p, top: f, left: m, right: g } = o.current;
199
- if (a || !i.current || !u || !p)
201
+ const { width: u, height: f, top: p, left: m, right: g } = o.current;
202
+ if (a || !i.current || !u || !f)
200
203
  return;
201
204
  const j = s === "left" ? `left: ${m}` : `right: ${g}`;
202
205
  i.current.dataset.motionPopId = r;
@@ -207,19 +210,19 @@ function dt({ children: t, isPresent: a, anchorX: s, root: n }) {
207
210
  [data-motion-pop-id="${r}"] {
208
211
  position: absolute !important;
209
212
  width: ${u}px !important;
210
- height: ${p}px !important;
213
+ height: ${f}px !important;
211
214
  ${j}px !important;
212
- top: ${f}px !important;
215
+ top: ${p}px !important;
213
216
  }
214
217
  `), () => {
215
218
  x.contains(l) && x.removeChild(l);
216
219
  };
217
- }, [a]), e.jsx(ct, { isPresent: a, childRef: i, sizeRef: o, children: F.cloneElement(t, { ref: c }) });
220
+ }, [a]), e.jsx(lt, { isPresent: a, childRef: i, sizeRef: o, children: F.cloneElement(t, { ref: c }) });
218
221
  }
219
- const ut = ({ children: t, initial: a, isPresent: s, onExitComplete: n, custom: r, presenceAffectsLayout: i, mode: o, anchorX: d, root: c }) => {
220
- const u = ue(ft), p = H();
221
- let f = !0, m = L(() => (f = !1, {
222
- id: p,
222
+ const dt = ({ children: t, initial: a, isPresent: s, onExitComplete: n, custom: r, presenceAffectsLayout: i, mode: o, anchorX: d, root: c }) => {
223
+ const u = ue(ut), f = H();
224
+ let p = !0, m = L(() => (p = !1, {
225
+ id: f,
223
226
  initial: a,
224
227
  isPresent: s,
225
228
  custom: r,
@@ -232,21 +235,21 @@ const ut = ({ children: t, initial: a, isPresent: s, onExitComplete: n, custom:
232
235
  },
233
236
  register: (g) => (u.set(g, !1), () => u.delete(g))
234
237
  }), [s, u, n]);
235
- return i && f && (m = { ...m }), L(() => {
238
+ return i && p && (m = { ...m }), L(() => {
236
239
  u.forEach((g, j) => u.set(j, !1));
237
240
  }, [s]), F.useEffect(() => {
238
241
  !s && !u.size && n && n();
239
- }, [s]), o === "popLayout" && (t = e.jsx(dt, { isPresent: s, anchorX: d, root: c, children: t })), e.jsx(fe.Provider, { value: m, children: t });
242
+ }, [s]), o === "popLayout" && (t = e.jsx(ct, { isPresent: s, anchorX: d, root: c, children: t })), e.jsx(pe.Provider, { value: m, children: t });
240
243
  };
241
- function ft() {
244
+ function ut() {
242
245
  return /* @__PURE__ */ new Map();
243
246
  }
244
247
  function pt(t = !0) {
245
- const a = V(fe);
248
+ const a = V(pe);
246
249
  if (a === null)
247
250
  return [!0, null];
248
251
  const { isPresent: s, onExitComplete: n, register: r } = a, i = H();
249
- ie(() => {
252
+ re(() => {
250
253
  if (t)
251
254
  return r(i);
252
255
  }, [t]);
@@ -254,61 +257,61 @@ function pt(t = !0) {
254
257
  return !s && n ? [!1, o] : [!0];
255
258
  }
256
259
  const R = (t) => t.key || "";
257
- function ne(t) {
260
+ function ie(t) {
258
261
  const a = [];
259
262
  return Ee.forEach(t, (s) => {
260
263
  Ie(s) && a.push(s);
261
264
  }), a;
262
265
  }
263
- const ht = ({ children: t, custom: a, initial: s = !0, onExitComplete: n, presenceAffectsLayout: r = !0, mode: i = "sync", propagate: o = !1, anchorX: d = "left", root: c }) => {
264
- const [u, p] = pt(o), f = L(() => ne(t), [t]), m = o && !u ? [] : f.map(R), g = A(!0), j = A(f), l = ue(() => /* @__PURE__ */ new Map()), [x, v] = I(f), [h, C] = I(f);
265
- nt(() => {
266
- g.current = !1, j.current = f;
266
+ const ft = ({ children: t, custom: a, initial: s = !0, onExitComplete: n, presenceAffectsLayout: r = !0, mode: i = "sync", propagate: o = !1, anchorX: d = "left", root: c }) => {
267
+ const [u, f] = pt(o), p = L(() => ie(t), [t]), m = o && !u ? [] : p.map(R), g = A(!0), j = A(p), l = ue(() => /* @__PURE__ */ new Map()), [x, v] = I(p), [h, C] = I(p);
268
+ st(() => {
269
+ g.current = !1, j.current = p;
267
270
  for (let w = 0; w < h.length; w++) {
268
271
  const y = R(h[w]);
269
272
  m.includes(y) ? l.delete(y) : l.get(y) !== !0 && l.set(y, !1);
270
273
  }
271
274
  }, [h, m.length, m.join("-")]);
272
275
  const K = [];
273
- if (f !== x) {
274
- let w = [...f];
276
+ if (p !== x) {
277
+ let w = [...p];
275
278
  for (let y = 0; y < h.length; y++) {
276
279
  const b = h[y], $ = R(b);
277
280
  m.includes($) || (w.splice(y, 0, b), K.push(b));
278
281
  }
279
- return i === "wait" && K.length && (w = K), C(ne(w)), v(f), null;
282
+ return i === "wait" && K.length && (w = K), C(ie(w)), v(p), null;
280
283
  }
281
284
  process.env.NODE_ENV !== "production" && i === "wait" && h.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.`);
282
- const { forceRender: pe } = V(tt);
285
+ const { forceRender: fe } = V(et);
283
286
  return e.jsx(e.Fragment, { children: h.map((w) => {
284
- const y = R(w), b = o && !u ? !1 : f === h || m.includes(y), $ = () => {
287
+ const y = R(w), b = o && !u ? !1 : p === h || m.includes(y), $ = () => {
285
288
  if (l.has(y))
286
289
  l.set(y, !0);
287
290
  else
288
291
  return;
289
- let X = !0;
292
+ let ee = !0;
290
293
  l.forEach((he) => {
291
- he || (X = !1);
292
- }), X && (pe?.(), C(j.current), o && p?.(), n && n());
294
+ he || (ee = !1);
295
+ }), ee && (fe?.(), C(j.current), o && f?.(), n && n());
293
296
  };
294
- return e.jsx(ut, { isPresent: b, initial: !g.current || s ? void 0 : !1, custom: a, presenceAffectsLayout: r, mode: i, root: c, onExitComplete: b ? void 0 : $, anchorX: d, children: w }, y);
297
+ return e.jsx(dt, { isPresent: b, initial: !g.current || s ? void 0 : !1, custom: a, presenceAffectsLayout: r, mode: i, root: c, onExitComplete: b ? void 0 : $, anchorX: d, children: w }, y);
295
298
  }) });
296
- }, mt = ({
299
+ }, ht = ({
297
300
  apiKey: t,
298
301
  onDeleteKey: a,
299
302
  className: s
300
303
  }) => {
301
304
  const [n, r] = I(!1), { key: i, createdOn: o, expiresOn: d } = t, c = d && new Date(d) < /* @__PURE__ */ new Date(), u = d ? Math.ceil(
302
305
  (new Date(d).getTime() - Date.now()) / (1e3 * 60 * 60 * 24)
303
- ) : 1 / 0, p = u <= 7 && !c;
304
- return /* @__PURE__ */ e.jsxs("div", { className: W("grid col-span-full grid-cols-subgrid p-6", s), children: [
306
+ ) : 1 / 0, f = u <= 7 && !c;
307
+ return /* @__PURE__ */ e.jsxs("div", { className: X("grid col-span-full grid-cols-subgrid p-6", s), children: [
305
308
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1", children: [
306
309
  /* @__PURE__ */ e.jsx(
307
- Je,
310
+ Ve,
308
311
  {
309
312
  className: "max-w-fit w-full",
310
313
  secret: i,
311
- status: c ? "expired" : p ? "expiring" : "active",
314
+ status: c ? "expired" : f ? "expiring" : "active",
312
315
  revealed: n,
313
316
  onReveal: r
314
317
  }
@@ -316,11 +319,11 @@ const ht = ({ children: t, custom: a, initial: s = !0, onExitComplete: n, presen
316
319
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1 mt-0.5 text-nowrap", children: [
317
320
  o && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-muted-foreground", children: [
318
321
  "Created ",
319
- xt(o),
322
+ mt(o),
320
323
  "."
321
324
  ] }),
322
325
  " ",
323
- d && p && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-primary", children: [
326
+ d && f && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-primary", children: [
324
327
  "Expires in ",
325
328
  u,
326
329
  " ",
@@ -334,14 +337,14 @@ const ht = ({ children: t, custom: a, initial: s = !0, onExitComplete: n, presen
334
337
  ] })
335
338
  ] })
336
339
  ] }),
337
- /* @__PURE__ */ e.jsx("div", { className: "flex justify-end", children: d && a && /* @__PURE__ */ e.jsxs(B, { children: [
338
- /* @__PURE__ */ e.jsx(Z, { asChild: !0, children: /* @__PURE__ */ e.jsx(k, { variant: "ghost", size: "icon", children: /* @__PURE__ */ e.jsx(me, { size: 16 }) }) }),
339
- /* @__PURE__ */ e.jsxs(G, { children: [
340
- /* @__PURE__ */ e.jsxs(J, { children: [
341
- /* @__PURE__ */ e.jsx(Y, { children: "Delete API Key" }),
342
- /* @__PURE__ */ e.jsx(oe, { children: "Are you sure you want to delete this API key?" })
340
+ /* @__PURE__ */ e.jsx("div", { className: "flex justify-end", children: d && a && /* @__PURE__ */ e.jsxs(Z, { children: [
341
+ /* @__PURE__ */ e.jsx(G, { asChild: !0, children: /* @__PURE__ */ e.jsx(k, { variant: "ghost", size: "icon", children: /* @__PURE__ */ e.jsx(me, { size: 16 }) }) }),
342
+ /* @__PURE__ */ e.jsxs(J, { children: [
343
+ /* @__PURE__ */ e.jsxs(Y, { children: [
344
+ /* @__PURE__ */ e.jsx(U, { children: "Delete API Key" }),
345
+ /* @__PURE__ */ e.jsx(le, { children: "Are you sure you want to delete this API key?" })
343
346
  ] }),
344
- /* @__PURE__ */ e.jsxs(_, { children: [
347
+ /* @__PURE__ */ e.jsxs(B, { children: [
345
348
  /* @__PURE__ */ e.jsx(S, { asChild: !0, children: /* @__PURE__ */ e.jsx(k, { variant: "outline", children: "Cancel" }) }),
346
349
  /* @__PURE__ */ e.jsx(S, { asChild: !0, children: /* @__PURE__ */ e.jsx(
347
350
  k,
@@ -356,23 +359,23 @@ const ht = ({ children: t, custom: a, initial: s = !0, onExitComplete: n, presen
356
359
  ] })
357
360
  ] }) })
358
361
  ] });
359
- }, xt = (t) => {
362
+ }, mt = (t) => {
360
363
  const a = /* @__PURE__ */ new Date(), s = new Date(t), n = Math.floor((a.getTime() - s.getTime()) / 1e3), r = new Intl.RelativeTimeFormat("en", { numeric: "auto" });
361
364
  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");
362
- }, yt = ({
365
+ }, xt = ({
363
366
  consumer: t,
364
367
  onUpdate: a,
365
368
  onRollKey: s,
366
369
  onDeleteKey: n
367
370
  }) => {
368
- const [r, i] = I(!1), [o, d] = I(t.label), c = ce(), u = U(), p = q({
371
+ const [r, i] = I(!1), [o, d] = I(t.label), c = ce(), u = W(), f = q({
369
372
  mutationFn: async (l) => {
370
373
  if (!s)
371
374
  throw new Error("rollKey not implemented");
372
375
  return await s?.(l, u);
373
376
  },
374
377
  onSuccess: () => void c.invalidateQueries({ queryKey: ["api-keys"] })
375
- }), f = q({
378
+ }), p = q({
376
379
  mutationFn: ({
377
380
  consumerId: l,
378
381
  keyId: x
@@ -429,28 +432,28 @@ const ht = ({ children: t, custom: a, initial: s = !0, onExitComplete: n, presen
429
432
  }), i(!1);
430
433
  };
431
434
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
432
- p.isError && /* @__PURE__ */ e.jsxs(D, { variant: "destructive", className: "mb-4", children: [
435
+ f.isError && /* @__PURE__ */ e.jsxs(D, { variant: "destructive", className: "mb-4", children: [
433
436
  /* @__PURE__ */ e.jsx(z, { size: 16 }),
434
- /* @__PURE__ */ e.jsx(P, { children: p.error.message })
437
+ /* @__PURE__ */ e.jsx(P, { children: f.error.message })
435
438
  ] }),
436
439
  m.isError && /* @__PURE__ */ e.jsxs(D, { variant: "destructive", className: "mb-4", children: [
437
440
  /* @__PURE__ */ e.jsx(z, { size: 16 }),
438
441
  /* @__PURE__ */ e.jsx(P, { children: m.error.message })
439
442
  ] }),
440
- f.isError && /* @__PURE__ */ e.jsxs(D, { variant: "destructive", className: "mb-4", children: [
443
+ p.isError && /* @__PURE__ */ e.jsxs(D, { variant: "destructive", className: "mb-4", children: [
441
444
  /* @__PURE__ */ e.jsx(z, { size: 16 }),
442
- /* @__PURE__ */ e.jsx(P, { children: f.error.message })
445
+ /* @__PURE__ */ e.jsx(P, { children: p.error.message })
443
446
  ] }),
444
447
  /* @__PURE__ */ e.jsxs(
445
- Ae,
448
+ De,
446
449
  {
447
450
  className: "grid grid-cols-subgrid col-span-full items-center mb-4 group",
448
451
  children: [
449
- /* @__PURE__ */ e.jsxs(Se, { className: "col-span-full flex-row items-start justify-between gap-4", children: [
452
+ /* @__PURE__ */ e.jsxs(Pe, { className: "col-span-full flex-row items-start justify-between gap-4", children: [
450
453
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1", children: [
451
454
  r ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
452
455
  /* @__PURE__ */ e.jsx(
453
- Ue,
456
+ Ye,
454
457
  {
455
458
  maxLength: 32,
456
459
  value: o,
@@ -482,8 +485,8 @@ const ht = ({ children: t, custom: a, initial: s = !0, onExitComplete: n, presen
482
485
  }
483
486
  )
484
487
  ] })
485
- ] }) : /* @__PURE__ */ e.jsx(Re, { children: t.label }),
486
- /* @__PURE__ */ e.jsxs(Ne, { children: [
488
+ ] }) : /* @__PURE__ */ e.jsx(Ae, { children: t.label }),
489
+ /* @__PURE__ */ e.jsxs(Se, { children: [
487
490
  t.createdOn && /* @__PURE__ */ e.jsxs("div", { children: [
488
491
  "Created on ",
489
492
  new Date(t.createdOn).toLocaleDateString()
@@ -500,7 +503,7 @@ const ht = ({ children: t, custom: a, initial: s = !0, onExitComplete: n, presen
500
503
  {
501
504
  variant: "ghost",
502
505
  onClick: g,
503
- className: W(
506
+ className: X(
504
507
  "flex gap-2",
505
508
  r && "opacity-0! pointer-events-none"
506
509
  ),
@@ -511,38 +514,38 @@ const ht = ({ children: t, custom: a, initial: s = !0, onExitComplete: n, presen
511
514
  ]
512
515
  }
513
516
  ),
514
- s && /* @__PURE__ */ e.jsxs(B, { children: [
515
- /* @__PURE__ */ e.jsx(Z, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
517
+ s && /* @__PURE__ */ e.jsxs(Z, { children: [
518
+ /* @__PURE__ */ e.jsx(G, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
516
519
  k,
517
520
  {
518
521
  title: "Roll this key",
519
522
  variant: "ghost",
520
- disabled: p.isPending,
523
+ disabled: f.isPending,
521
524
  className: "flex items-center gap-2",
522
525
  children: [
523
526
  /* @__PURE__ */ e.jsx(
524
527
  je,
525
528
  {
526
529
  size: 16,
527
- className: p.isPending ? "animate-spin" : void 0
530
+ className: f.isPending ? "animate-spin" : void 0
528
531
  }
529
532
  ),
530
533
  /* @__PURE__ */ e.jsx("span", { className: "hidden md:block", children: "Roll key" })
531
534
  ]
532
535
  }
533
536
  ) }),
534
- /* @__PURE__ */ e.jsxs(G, { children: [
535
- /* @__PURE__ */ e.jsxs(J, { children: [
536
- /* @__PURE__ */ e.jsx(Y, { children: "Roll API Key" }),
537
- /* @__PURE__ */ e.jsx(oe, { children: "Are you sure you want to roll this API key?" })
537
+ /* @__PURE__ */ e.jsxs(J, { children: [
538
+ /* @__PURE__ */ e.jsxs(Y, { children: [
539
+ /* @__PURE__ */ e.jsx(U, { children: "Roll API Key" }),
540
+ /* @__PURE__ */ e.jsx(le, { children: "Are you sure you want to roll this API key?" })
538
541
  ] }),
539
- /* @__PURE__ */ e.jsxs(_, { children: [
542
+ /* @__PURE__ */ e.jsxs(B, { children: [
540
543
  /* @__PURE__ */ e.jsx(S, { asChild: !0, children: /* @__PURE__ */ e.jsx(k, { variant: "outline", children: "Cancel" }) }),
541
544
  /* @__PURE__ */ e.jsx(S, { asChild: !0, children: /* @__PURE__ */ e.jsx(
542
545
  k,
543
546
  {
544
547
  onClick: () => {
545
- p.mutate(t.id);
548
+ f.mutate(t.id);
546
549
  },
547
550
  children: "Roll Key"
548
551
  }
@@ -552,17 +555,17 @@ const ht = ({ children: t, custom: a, initial: s = !0, onExitComplete: n, presen
552
555
  ] })
553
556
  ] })
554
557
  ] }),
555
- /* @__PURE__ */ e.jsx(Oe, { className: "p-0 grid grid-cols-subgrid col-span-full divide-y divide-border", children: /* @__PURE__ */ e.jsx(ht, { children: t.apiKeys.map((l) => /* @__PURE__ */ e.jsx(
556
- mt,
558
+ /* @__PURE__ */ e.jsx(Re, { className: "p-0 grid grid-cols-subgrid col-span-full divide-y divide-border", children: /* @__PURE__ */ e.jsx(ft, { children: t.apiKeys.map((l) => /* @__PURE__ */ e.jsx(
559
+ ht,
557
560
  {
558
561
  apiKey: l,
559
562
  onDeleteKey: () => {
560
- f.mutate({
563
+ p.mutate({
561
564
  consumerId: t.id,
562
565
  keyId: l.id
563
566
  });
564
567
  },
565
- className: f.variables?.keyId === l.id && f.isPending ? "opacity-10!" : void 0
568
+ className: p.variables?.keyId === l.id && p.isPending ? "opacity-10!" : void 0
566
569
  },
567
570
  l.id
568
571
  )) }) })
@@ -571,8 +574,8 @@ const ht = ({ children: t, custom: a, initial: s = !0, onExitComplete: n, presen
571
574
  t.id
572
575
  )
573
576
  ] });
574
- }, gt = ({ service: t }) => {
575
- const a = U(), { data: s } = ze({
577
+ }, yt = ({ service: t }) => {
578
+ const a = W(), { data: s } = Je({
576
579
  queryFn: async () => {
577
580
  try {
578
581
  return await t.getConsumers(a);
@@ -601,8 +604,8 @@ const ht = ({ children: t, custom: a, initial: s = !0, onExitComplete: n, presen
601
604
  onOpenChange: r
602
605
  }
603
606
  )
604
- ] }) : /* @__PURE__ */ e.jsx("ul", { className: W("grid grid-cols-[1fr_min-content] col-span-6"), children: s.map((i) => /* @__PURE__ */ e.jsx(
605
- yt,
607
+ ] }) : /* @__PURE__ */ e.jsx("ul", { className: X("grid grid-cols-[1fr_min-content] col-span-6"), children: s.map((i) => /* @__PURE__ */ e.jsx(
608
+ xt,
606
609
  {
607
610
  consumer: i,
608
611
  onUpdate: t.updateConsumer,
@@ -611,10 +614,10 @@ const ht = ({ children: t, custom: a, initial: s = !0, onExitComplete: n, presen
611
614
  },
612
615
  i.id
613
616
  )) }) });
614
- }, jt = ({ service: t }) => {
615
- const [a, s] = I(!1), n = re();
617
+ }, gt = ({ service: t }) => {
618
+ const [a, s] = I(!1), n = ae();
616
619
  return /* @__PURE__ */ e.jsxs("div", { className: "max-w-3xl h-full pt-(--padding-content-top) pb-(--padding-content-bottom)", children: [
617
- /* @__PURE__ */ e.jsx(ee.Target, { name: "api-keys-list-page" }),
620
+ /* @__PURE__ */ e.jsx(te.Target, { name: "api-keys-list-page" }),
618
621
  /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between pb-3", children: [
619
622
  /* @__PURE__ */ e.jsx("h1", { className: "font-medium text-2xl", children: "API Keys" }),
620
623
  t.createKey && /* @__PURE__ */ e.jsx(
@@ -627,22 +630,22 @@ const ht = ({ children: t, custom: a, initial: s = !0, onExitComplete: n, presen
627
630
  )
628
631
  ] }),
629
632
  /* @__PURE__ */ e.jsx("p", { children: "Create, manage, and monitor your API keys" }),
630
- /* @__PURE__ */ e.jsx(ee.Target, { name: "api-keys-list-page-before-keys" }),
631
- n.profile?.emailVerified === !1 ? /* @__PURE__ */ e.jsxs(Te, { variant: "outline", children: [
632
- /* @__PURE__ */ e.jsxs(qe, { children: [
633
- /* @__PURE__ */ e.jsx(Me, { children: "Verified email required" }),
634
- /* @__PURE__ */ e.jsx(Fe, { children: "You need to verify your email to access API keys." })
633
+ /* @__PURE__ */ e.jsx(te.Target, { name: "api-keys-list-page-before-keys" }),
634
+ n.profile?.emailVerified === !1 ? /* @__PURE__ */ e.jsxs(Ne, { variant: "outline", children: [
635
+ /* @__PURE__ */ e.jsxs(Oe, { children: [
636
+ /* @__PURE__ */ e.jsx(Te, { children: "Verified email required" }),
637
+ /* @__PURE__ */ e.jsx(qe, { children: "You need to verify your email to access API keys." })
635
638
  ] }),
636
- /* @__PURE__ */ e.jsx($e, { children: /* @__PURE__ */ e.jsx(De, { onClick: () => n.requestEmailVerification(), children: "Verify email" }) })
639
+ /* @__PURE__ */ e.jsx(Me, { children: /* @__PURE__ */ e.jsx(_, { onClick: () => n.requestEmailVerification(), children: "Verify email" }) })
637
640
  ] }) : /* @__PURE__ */ e.jsx(
638
- Pe,
641
+ Ke,
639
642
  {
640
- fallbackRender: ({ error: r }) => /* @__PURE__ */ e.jsx(We, { error: r }),
641
- children: /* @__PURE__ */ e.jsx(gt, { service: t })
643
+ fallbackRender: ({ error: r }) => /* @__PURE__ */ e.jsx(Ue, { error: r }),
644
+ children: /* @__PURE__ */ e.jsx(yt, { service: t })
642
645
  }
643
646
  )
644
647
  ] });
645
- }, N = "https://api.zuploedge.com/v2/client", vt = async (t) => {
648
+ }, N = "https://api.zuploedge.com/v2/client", jt = async (t) => {
646
649
  try {
647
650
  return await t.json();
648
651
  } catch {
@@ -651,14 +654,14 @@ const ht = ({ children: t, custom: a, initial: s = !0, onExitComplete: n, presen
651
654
  }, O = async (t) => {
652
655
  const a = t.headers.get("content-type");
653
656
  if (!t.ok && a?.includes("application/problem+json")) {
654
- const s = await vt(t);
657
+ const s = await jt(t);
655
658
  if (s.type && s.title)
656
659
  throw new Error(s.detail ?? s.title);
657
660
  }
658
661
  }, T = {
659
662
  developerHint: "This project is not linked to a Zuplo deployment. Run `zuplo link` to get started with API Keys.",
660
663
  title: "Not linked to a Zuplo deployment"
661
- }, Ct = ({
664
+ }, vt = ({
662
665
  deploymentName: t,
663
666
  ...a
664
667
  }) => ({
@@ -732,7 +735,7 @@ const ht = ({ children: t, custom: a, initial: s = !0, onExitComplete: n, presen
732
735
  }));
733
736
  },
734
737
  ...a
735
- }), Ht = (t) => t, Vt = ({
738
+ }), _t = (t) => t, Bt = ({
736
739
  deploymentName: t,
737
740
  isZuplo: a,
738
741
  ...s
@@ -740,7 +743,7 @@ const ht = ({ children: t, custom: a, initial: s = !0, onExitComplete: n, presen
740
743
  a && !t && console.warn(
741
744
  "This project is not linked to a Zuplo deployment. Run `zuplo link` to get started."
742
745
  );
743
- const n = a ? Ct({ deploymentName: t, ...s }) : s;
746
+ const n = a ? vt({ deploymentName: t, ...s }) : s;
744
747
  if (!n.getConsumers)
745
748
  throw new Error("getConsumers is required when using the apiKeyPlugin");
746
749
  const r = {
@@ -773,14 +776,14 @@ const ht = ({ children: t, custom: a, initial: s = !0, onExitComplete: n, presen
773
776
  getRoutes: () => [
774
777
  {
775
778
  path: "/settings/api-keys",
776
- element: /* @__PURE__ */ e.jsx(jt, { service: r })
779
+ element: /* @__PURE__ */ e.jsx(gt, { service: r })
777
780
  }
778
781
  ],
779
782
  getProtectedRoutes: () => ["/settings/api-keys"]
780
783
  };
781
784
  };
782
785
  export {
783
- Vt as apiKeyPlugin,
784
- Ht as createApiKeyService
786
+ Bt as apiKeyPlugin,
787
+ _t as createApiKeyService
785
788
  };
786
789
  //# sourceMappingURL=zudoku.plugin-api-keys.js.map