zudoku 0.0.0-f62edde → 0.0.0-f687ed1

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