zudoku 0.0.0-fix-firebase-export.2e421fda → 0.0.0-fix-circular-ref-false-positives.zbe02c6a6

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 (380) hide show
  1. package/dist/app/main.d.ts +6 -6
  2. package/dist/cli/common/version-check.js +12 -3
  3. package/dist/cli/common/version-check.js.map +1 -1
  4. package/dist/config/loader.js +3 -1
  5. package/dist/config/loader.js.map +1 -1
  6. package/dist/config/validators/InputNavigationSchema.d.ts +77 -75
  7. package/dist/config/validators/InputNavigationSchema.js +1 -0
  8. package/dist/config/validators/InputNavigationSchema.js.map +1 -1
  9. package/dist/config/validators/NavigationSchema.js +6 -1
  10. package/dist/config/validators/NavigationSchema.js.map +1 -1
  11. package/dist/config/validators/validate.d.ts +59 -14
  12. package/dist/config/validators/validate.js +7 -5
  13. package/dist/config/validators/validate.js.map +1 -1
  14. package/dist/flat-config.d.ts +29 -27
  15. package/dist/index.d.ts +2 -1
  16. package/dist/index.js +2 -1
  17. package/dist/index.js.map +1 -1
  18. package/dist/lib/auth/issuer.js +1 -1
  19. package/dist/lib/auth/issuer.js.map +1 -1
  20. package/dist/lib/authentication/authentication.d.ts +3 -2
  21. package/dist/lib/authentication/components/CallbackHandler.js +1 -1
  22. package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
  23. package/dist/lib/authentication/components/SignIn.js +4 -2
  24. package/dist/lib/authentication/components/SignIn.js.map +1 -1
  25. package/dist/lib/authentication/components/SignUp.js +4 -2
  26. package/dist/lib/authentication/components/SignUp.js.map +1 -1
  27. package/dist/lib/authentication/hook.d.ts +2 -0
  28. package/dist/lib/authentication/hook.js +10 -0
  29. package/dist/lib/authentication/hook.js.map +1 -1
  30. package/dist/lib/authentication/providers/auth0.js +11 -7
  31. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  32. package/dist/lib/authentication/providers/clerk.js +0 -22
  33. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  34. package/dist/lib/authentication/providers/firebase.js +67 -9
  35. package/dist/lib/authentication/providers/firebase.js.map +1 -1
  36. package/dist/lib/authentication/providers/supabase.js +6 -15
  37. package/dist/lib/authentication/providers/supabase.js.map +1 -1
  38. package/dist/lib/authentication/ui/EmailVerificationUi.d.ts +4 -0
  39. package/dist/lib/authentication/ui/EmailVerificationUi.js +34 -0
  40. package/dist/lib/authentication/ui/EmailVerificationUi.js.map +1 -0
  41. package/dist/lib/authentication/ui/ZudokuAuthUi.d.ts +7 -2
  42. package/dist/lib/authentication/ui/ZudokuAuthUi.js +48 -12
  43. package/dist/lib/authentication/ui/ZudokuAuthUi.js.map +1 -1
  44. package/dist/lib/authentication/utils/relativeRedirectUrl.d.ts +1 -0
  45. package/dist/lib/authentication/utils/relativeRedirectUrl.js +8 -0
  46. package/dist/lib/authentication/utils/relativeRedirectUrl.js.map +1 -0
  47. package/dist/lib/components/Pagination.js +2 -2
  48. package/dist/lib/components/Pagination.js.map +1 -1
  49. package/dist/lib/components/index.d.ts +5 -0
  50. package/dist/lib/components/index.js +4 -0
  51. package/dist/lib/components/index.js.map +1 -1
  52. package/dist/lib/components/navigation/NavigationItem.js +2 -2
  53. package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
  54. package/dist/lib/core/RouteGuard.js +12 -7
  55. package/dist/lib/core/RouteGuard.js.map +1 -1
  56. package/dist/lib/core/plugins.d.ts +11 -1
  57. package/dist/lib/core/plugins.js +1 -0
  58. package/dist/lib/core/plugins.js.map +1 -1
  59. package/dist/lib/core/react-query.d.ts +1 -0
  60. package/dist/lib/core/react-query.js +2 -0
  61. package/dist/lib/core/react-query.js.map +1 -0
  62. package/dist/lib/core/transform-config.d.ts +2 -0
  63. package/dist/lib/core/transform-config.js +22 -0
  64. package/dist/lib/core/transform-config.js.map +1 -0
  65. package/dist/lib/errors/ErrorMessage.d.ts +3 -0
  66. package/dist/lib/errors/ErrorMessage.js +16 -0
  67. package/dist/lib/errors/ErrorMessage.js.map +1 -0
  68. package/dist/lib/hooks/index.d.ts +2 -0
  69. package/dist/lib/oas/graphql/circular.d.ts +2 -0
  70. package/dist/lib/oas/graphql/circular.js +21 -16
  71. package/dist/lib/oas/graphql/circular.js.map +1 -1
  72. package/dist/lib/oas/graphql/circular.test.d.ts +1 -0
  73. package/dist/lib/oas/graphql/circular.test.js +183 -0
  74. package/dist/lib/oas/graphql/circular.test.js.map +1 -0
  75. package/dist/lib/oas/graphql/index.js +7 -3
  76. package/dist/lib/oas/graphql/index.js.map +1 -1
  77. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +9 -172
  78. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  79. package/dist/lib/plugins/api-keys/index.d.ts +11 -4
  80. package/dist/lib/plugins/api-keys/index.js +36 -22
  81. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  82. package/dist/lib/plugins/api-keys/settings/ApiKeyItem.d.ts +12 -0
  83. package/dist/lib/plugins/api-keys/settings/ApiKeyItem.js +133 -0
  84. package/dist/lib/plugins/api-keys/settings/ApiKeyItem.js.map +1 -0
  85. package/dist/lib/plugins/api-keys/settings/ApiKeyList.d.ts +4 -0
  86. package/dist/lib/plugins/api-keys/settings/ApiKeyList.js +33 -0
  87. package/dist/lib/plugins/api-keys/settings/ApiKeyList.js.map +1 -0
  88. package/dist/lib/plugins/api-keys/settings/RevealApiKey.d.ts +6 -0
  89. package/dist/lib/plugins/api-keys/settings/RevealApiKey.js +39 -0
  90. package/dist/lib/plugins/api-keys/settings/RevealApiKey.js.map +1 -0
  91. package/dist/lib/plugins/openapi/OasProvider.js +6 -2
  92. package/dist/lib/plugins/openapi/OasProvider.js.map +1 -1
  93. package/dist/lib/plugins/openapi/OperationList.js +4 -4
  94. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  95. package/dist/lib/plugins/openapi/ParamInfos.js +1 -0
  96. package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -1
  97. package/dist/lib/plugins/openapi/Sidecar.js +3 -2
  98. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  99. package/dist/lib/plugins/openapi/interfaces.d.ts +3 -0
  100. package/dist/lib/plugins/openapi/schema/SchemaView.js +1 -1
  101. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  102. package/dist/lib/plugins/openapi/schema/utils.js +11 -3
  103. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  104. package/dist/lib/plugins/openapi/util/createHttpSnippet.js +24 -1
  105. package/dist/lib/plugins/openapi/util/createHttpSnippet.js.map +1 -1
  106. package/dist/lib/plugins/openapi/util/getRoutes.d.ts +3 -0
  107. package/dist/lib/plugins/openapi/util/getRoutes.js +2 -1
  108. package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
  109. package/dist/lib/ui/Button.js +1 -1
  110. package/dist/lib/ui/Button.js.map +1 -1
  111. package/dist/lib/ui/Command.d.ts +3 -3
  112. package/dist/lib/util/invariant.d.ts +1 -1
  113. package/dist/lib/util/invariant.js +2 -2
  114. package/dist/lib/util/invariant.js.map +1 -1
  115. package/dist/vite/api/SchemaManager.d.ts +12 -1
  116. package/dist/vite/api/SchemaManager.js +31 -14
  117. package/dist/vite/api/SchemaManager.js.map +1 -1
  118. package/dist/vite/api/SchemaManager.test.js +44 -0
  119. package/dist/vite/api/SchemaManager.test.js.map +1 -1
  120. package/dist/vite/config.js +10 -4
  121. package/dist/vite/config.js.map +1 -1
  122. package/dist/vite/error-handler.js +1 -5
  123. package/dist/vite/error-handler.js.map +1 -1
  124. package/dist/vite/mdx/remark-link-rewrite.js +1 -1
  125. package/dist/vite/plugin-api-keys.js +5 -1
  126. package/dist/vite/plugin-api-keys.js.map +1 -1
  127. package/dist/vite/plugin-api.js +5 -3
  128. package/dist/vite/plugin-api.js.map +1 -1
  129. package/dist/vite/plugin-markdown-export.js +1 -1
  130. package/dist/vite/plugin-markdown-export.js.map +1 -1
  131. package/dist/vite/prerender/utils.js +9 -3
  132. package/dist/vite/prerender/utils.js.map +1 -1
  133. package/dist/vite/prerender/worker.js +3 -0
  134. package/dist/vite/prerender/worker.js.map +1 -1
  135. package/dist/vite/zuplo.d.ts +13 -0
  136. package/dist/vite/zuplo.js +15 -0
  137. package/dist/vite/zuplo.js.map +1 -0
  138. package/lib/{ActionButton-DUgvSylL.js → ActionButton-B0CXL1Lq.js} +3 -3
  139. package/lib/{ActionButton-DUgvSylL.js.map → ActionButton-B0CXL1Lq.js.map} +1 -1
  140. package/lib/{Button-CynVW1JV.js → Button-GUVe7pmt.js} +8 -7
  141. package/lib/{Button-CynVW1JV.js.map → Button-GUVe7pmt.js.map} +1 -1
  142. package/lib/{Card-KFniaZn5.js → Card-DCdq37aA.js} +2 -2
  143. package/lib/{Card-KFniaZn5.js.map → Card-DCdq37aA.js.map} +1 -1
  144. package/lib/{ClaudeLogo-B4Xxt-x_.js → ClaudeLogo-DJ9bU-sO.js} +22 -22
  145. package/lib/ClaudeLogo-DJ9bU-sO.js.map +1 -0
  146. package/lib/{Command-BpT1iBE6.js → Command-N6VujV30.js} +3 -3
  147. package/lib/{Command-BpT1iBE6.js.map → Command-N6VujV30.js.map} +1 -1
  148. package/lib/{Dialog-BQciPiHN.js → Dialog-hlvmmQ_c.js} +2 -2
  149. package/lib/{Dialog-BQciPiHN.js.map → Dialog-hlvmmQ_c.js.map} +1 -1
  150. package/lib/{Drawer-Ci7XwhqT.js → Drawer-Ch7927PF.js} +7 -7
  151. package/lib/{Drawer-Ci7XwhqT.js.map → Drawer-Ch7927PF.js.map} +1 -1
  152. package/lib/{DropdownMenu-C8SX_-S_.js → DropdownMenu-DN0jNrjj.js} +2 -2
  153. package/lib/{DropdownMenu-C8SX_-S_.js.map → DropdownMenu-DN0jNrjj.js.map} +1 -1
  154. package/lib/Frame-DKlOmSkU.js +205 -0
  155. package/lib/Frame-DKlOmSkU.js.map +1 -0
  156. package/lib/HydrationBoundary-CNF2ZV3E.js +601 -0
  157. package/lib/HydrationBoundary-CNF2ZV3E.js.map +1 -0
  158. package/lib/{IndexingDialog-B5zCiUKr.js → IndexingDialog-D0YdGfbn.js} +3 -3
  159. package/lib/{IndexingDialog-B5zCiUKr.js.map → IndexingDialog-D0YdGfbn.js.map} +1 -1
  160. package/lib/Input-Cx-GeKoF.js +22 -0
  161. package/lib/Input-Cx-GeKoF.js.map +1 -0
  162. package/lib/{MdxPage-BagO2c-n.js → MdxPage-stpAoBtx.js} +11 -11
  163. package/lib/{MdxPage-BagO2c-n.js.map → MdxPage-stpAoBtx.js.map} +1 -1
  164. package/lib/{Mermaid-D_VSX7_Q.js → Mermaid-Koc3z8mU.js} +4 -4
  165. package/lib/{Mermaid-D_VSX7_Q.js.map → Mermaid-Koc3z8mU.js.map} +1 -1
  166. package/lib/{OAuthErrorPage-Fq54RLgt.js → OAuthErrorPage-DJ811Bn_.js} +15 -15
  167. package/lib/OAuthErrorPage-DJ811Bn_.js.map +1 -0
  168. package/lib/OasProvider-B2KxIBsI.js +48 -0
  169. package/lib/OasProvider-B2KxIBsI.js.map +1 -0
  170. package/lib/{OperationList-C0jiEaG5.js → OperationList-C2tAfThO.js} +1558 -1543
  171. package/lib/{OperationList-C0jiEaG5.js.map → OperationList-C2tAfThO.js.map} +1 -1
  172. package/lib/RouteGuard--A04ESy8.js +77 -0
  173. package/lib/RouteGuard--A04ESy8.js.map +1 -0
  174. package/lib/{SchemaList-BU0zCHn9.js → SchemaList-Ep8DleP_.js} +9 -9
  175. package/lib/{SchemaList-BU0zCHn9.js.map → SchemaList-Ep8DleP_.js.map} +1 -1
  176. package/lib/SchemaView-BpaEKRYx.js +438 -0
  177. package/lib/SchemaView-BpaEKRYx.js.map +1 -0
  178. package/lib/{Select-CkxXP5I7.js → Secret-BDBqq4p3.js} +122 -122
  179. package/lib/Secret-BDBqq4p3.js.map +1 -0
  180. package/lib/{Separator-CTPSeW1S.js → Separator-BXt1LYnm.js} +2 -2
  181. package/lib/{Separator-CTPSeW1S.js.map → Separator-BXt1LYnm.js.map} +1 -1
  182. package/lib/SignUp-DCBViNUi.js +50 -0
  183. package/lib/SignUp-DCBViNUi.js.map +1 -0
  184. package/lib/{SyntaxHighlight-Kdyskw3C.js → SyntaxHighlight-Dshjn3Zf.js} +1749 -1723
  185. package/lib/SyntaxHighlight-Dshjn3Zf.js.map +1 -0
  186. package/lib/{Toc-DJxFPfcS.js → Toc-Cgz6CPiE.js} +3 -3
  187. package/lib/{Toc-DJxFPfcS.js.map → Toc-Cgz6CPiE.js.map} +1 -1
  188. package/lib/ZudokuContext-BZB1TWdT.js +387 -0
  189. package/lib/ZudokuContext-BZB1TWdT.js.map +1 -0
  190. package/lib/{___vite-browser-external_commonjs-proxy-Cga3HsWk.js → ___vite-browser-external_commonjs-proxy-BttVsNON.js} +2 -2
  191. package/lib/___vite-browser-external_commonjs-proxy-BttVsNON.js.map +1 -0
  192. package/lib/chunk-EPOLDU6W-C6C8jAwd.js +8558 -0
  193. package/lib/chunk-EPOLDU6W-C6C8jAwd.js.map +1 -0
  194. package/lib/{circular-CzWF1hj5.js → circular-CG3e0_Uz.js} +1689 -1686
  195. package/lib/{circular-CzWF1hj5.js.map → circular-CG3e0_Uz.js.map} +1 -1
  196. package/lib/{cn-dYga0KKN.js → cn-5-Gd1Dss.js} +531 -498
  197. package/lib/cn-5-Gd1Dss.js.map +1 -0
  198. package/lib/{createServer-BIr2_tGn.js → createServer-CNeRqj98.js} +12 -12
  199. package/lib/{createServer-BIr2_tGn.js.map → createServer-CNeRqj98.js.map} +1 -1
  200. package/lib/createVariantComponent-Dc0vtOvr.js +18 -0
  201. package/lib/createVariantComponent-Dc0vtOvr.js.map +1 -0
  202. package/lib/{errors-Bs4duWDy.js → errors-b9I-fAOY.js} +3 -3
  203. package/lib/{errors-Bs4duWDy.js.map → errors-b9I-fAOY.js.map} +1 -1
  204. package/lib/{firebase-Cax7HPzn.js → firebase-BCXX7Qv5.js} +1579 -1325
  205. package/lib/firebase-BCXX7Qv5.js.map +1 -0
  206. package/lib/hook-BGlHBdET.js +52 -0
  207. package/lib/hook-BGlHBdET.js.map +1 -0
  208. package/lib/{ErrorAlert-DrOR8w3f.js → index-CL8eDnQW.js} +5473 -4433
  209. package/lib/index-CL8eDnQW.js.map +1 -0
  210. package/lib/index-CrcNWbel.js.map +1 -1
  211. package/lib/{index-Css56y3F.js → index-DBjOT2H1.js} +4 -4
  212. package/lib/{index-Css56y3F.js.map → index-DBjOT2H1.js.map} +1 -1
  213. package/lib/{index-0oT9beQN.js → index-I3kmZ7tG.js} +152 -148
  214. package/lib/{index-0oT9beQN.js.map → index-I3kmZ7tG.js.map} +1 -1
  215. package/lib/{index-Bh-MffiL.js → index-UOLtazB8.js} +2 -2
  216. package/lib/{index-Bh-MffiL.js.map → index-UOLtazB8.js.map} +1 -1
  217. package/lib/index.esm-BYObtETB.js.map +1 -1
  218. package/lib/{index.esm-DtzT_KoE.js → index.esm-B_0dvNjB.js} +2 -2
  219. package/lib/{index.esm-DtzT_KoE.js.map → index.esm-B_0dvNjB.js.map} +1 -1
  220. package/lib/{index.esm-DDENMN4y.js → index.esm-C5CBsVzN.js} +16 -14
  221. package/lib/index.esm-C5CBsVzN.js.map +1 -0
  222. package/lib/{invariant-CGOLuIIz.js → invariant-BJAl77rw.js} +4 -4
  223. package/lib/invariant-BJAl77rw.js.map +1 -0
  224. package/lib/jsx-runtime-BzflLqGi.js.map +1 -1
  225. package/lib/{mutation-BoVlx8yA.js → mutation-BISOc7OM.js} +70 -44
  226. package/lib/mutation-BISOc7OM.js.map +1 -0
  227. package/lib/ui/Accordion.js +1 -1
  228. package/lib/ui/ActionButton.js +2 -2
  229. package/lib/ui/Alert.js +1 -1
  230. package/lib/ui/AlertDialog.js +1 -1
  231. package/lib/ui/Badge.js +1 -1
  232. package/lib/ui/Breadcrumb.js +1 -1
  233. package/lib/ui/Button.js +7 -6
  234. package/lib/ui/Button.js.map +1 -1
  235. package/lib/ui/ButtonGroup.js +1 -1
  236. package/lib/ui/Callout.js +1 -1
  237. package/lib/ui/Card.js +1 -1
  238. package/lib/ui/Carousel.js +1 -1
  239. package/lib/ui/Carousel.js.map +1 -1
  240. package/lib/ui/Checkbox.js +1 -1
  241. package/lib/ui/CodeBlock.js +1 -1
  242. package/lib/ui/Command.js +2 -2
  243. package/lib/ui/Dialog.js +1 -1
  244. package/lib/ui/Drawer.js +3 -3
  245. package/lib/ui/DropdownMenu.js +1 -1
  246. package/lib/ui/EmbeddedCodeBlock.js +1 -1
  247. package/lib/ui/Form.js +1 -1
  248. package/lib/ui/Frame.js +1 -1
  249. package/lib/ui/HoverCard.js +1 -1
  250. package/lib/ui/Input.js +1 -1
  251. package/lib/ui/Item.js +1 -1
  252. package/lib/ui/Label.js +1 -1
  253. package/lib/ui/NativeSelect.js +1 -1
  254. package/lib/ui/Pagination.js +1 -1
  255. package/lib/ui/Popover.js +1 -1
  256. package/lib/ui/Progress.js +1 -1
  257. package/lib/ui/RadioGroup.js +1 -1
  258. package/lib/ui/ScrollArea.js +1 -1
  259. package/lib/ui/Secret.js +1 -1
  260. package/lib/ui/Separator.js +1 -1
  261. package/lib/ui/Skeleton.js +1 -1
  262. package/lib/ui/Slider.js +1 -1
  263. package/lib/ui/Switch.js +1 -1
  264. package/lib/ui/SyntaxHighlight.js +3 -3
  265. package/lib/ui/Tabs.js +1 -1
  266. package/lib/ui/Textarea.js +1 -1
  267. package/lib/ui/Toggle.js +1 -1
  268. package/lib/ui/ToggleGroup.js +1 -1
  269. package/lib/ui/Value.js +1 -1
  270. package/lib/ui/util.js +1 -1
  271. package/lib/{useMutation-C6RqWmTS.js → useMutation-CFMGlAMW.js} +39 -17
  272. package/lib/useMutation-CFMGlAMW.js.map +1 -0
  273. package/lib/useSuspenseQuery-CSB_rVek.js +1226 -0
  274. package/lib/useSuspenseQuery-CSB_rVek.js.map +1 -0
  275. package/lib/zudoku.__internal.js +826 -1325
  276. package/lib/zudoku.__internal.js.map +1 -1
  277. package/lib/zudoku.auth-auth0.js +16 -16
  278. package/lib/zudoku.auth-auth0.js.map +1 -1
  279. package/lib/zudoku.auth-azureb2c.js +4 -4
  280. package/lib/zudoku.auth-clerk.js +52 -75
  281. package/lib/zudoku.auth-clerk.js.map +1 -1
  282. package/lib/zudoku.auth-firebase.js +6 -5
  283. package/lib/zudoku.auth-firebase.js.map +1 -1
  284. package/lib/zudoku.auth-openid.js +5 -5
  285. package/lib/zudoku.auth-supabase.js +31 -40
  286. package/lib/zudoku.auth-supabase.js.map +1 -1
  287. package/lib/zudoku.components.js +23 -21
  288. package/lib/zudoku.hooks.js +3 -3
  289. package/lib/zudoku.mermaid.js +3 -3
  290. package/lib/zudoku.plugin-api-catalog.js +8 -8
  291. package/lib/zudoku.plugin-api-keys.js +607 -552
  292. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  293. package/lib/zudoku.plugin-custom-pages.js +1 -1
  294. package/lib/zudoku.plugin-markdown.js +1 -1
  295. package/lib/zudoku.plugin-openapi.js +3 -3
  296. package/lib/zudoku.plugin-redirect.js +1 -1
  297. package/lib/zudoku.plugin-search-pagefind.js +30 -29
  298. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  299. package/lib/zudoku.plugins.js +9 -8
  300. package/lib/zudoku.plugins.js.map +1 -1
  301. package/lib/zudoku.react-query.js +440 -0
  302. package/lib/zudoku.react-query.js.map +1 -0
  303. package/lib/zudoku.router.js +1130 -1404
  304. package/lib/zudoku.router.js.map +1 -1
  305. package/package.json +28 -21
  306. package/src/lib/auth/issuer.ts +1 -1
  307. package/src/lib/authentication/authentication.ts +8 -2
  308. package/src/lib/authentication/components/CallbackHandler.tsx +1 -1
  309. package/src/lib/authentication/components/SignIn.tsx +5 -2
  310. package/src/lib/authentication/components/SignUp.tsx +5 -2
  311. package/src/lib/authentication/hook.ts +16 -0
  312. package/src/lib/authentication/providers/auth0.tsx +15 -9
  313. package/src/lib/authentication/providers/clerk.tsx +0 -26
  314. package/src/lib/authentication/providers/firebase.tsx +98 -6
  315. package/src/lib/authentication/providers/supabase.tsx +6 -15
  316. package/src/lib/authentication/ui/EmailVerificationUi.tsx +129 -0
  317. package/src/lib/authentication/ui/ZudokuAuthUi.tsx +181 -39
  318. package/src/lib/authentication/utils/relativeRedirectUrl.ts +12 -0
  319. package/src/lib/components/Pagination.tsx +4 -5
  320. package/src/lib/components/index.ts +4 -0
  321. package/src/lib/components/navigation/NavigationItem.tsx +9 -3
  322. package/src/lib/core/RouteGuard.tsx +30 -24
  323. package/src/lib/core/plugins.ts +21 -1
  324. package/src/lib/core/react-query.ts +1 -0
  325. package/src/lib/core/transform-config.ts +29 -0
  326. package/src/lib/errors/ErrorMessage.tsx +38 -0
  327. package/src/lib/oas/graphql/circular.test.ts +221 -0
  328. package/src/lib/oas/graphql/circular.ts +31 -18
  329. package/src/lib/oas/graphql/index.ts +7 -3
  330. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +36 -476
  331. package/src/lib/plugins/api-keys/index.tsx +76 -32
  332. package/src/lib/plugins/api-keys/settings/ApiKeyItem.tsx +342 -0
  333. package/src/lib/plugins/api-keys/settings/ApiKeyList.tsx +67 -0
  334. package/src/lib/plugins/api-keys/settings/RevealApiKey.tsx +124 -0
  335. package/src/lib/plugins/openapi/OasProvider.tsx +10 -2
  336. package/src/lib/plugins/openapi/OperationList.tsx +4 -4
  337. package/src/lib/plugins/openapi/ParamInfos.tsx +1 -0
  338. package/src/lib/plugins/openapi/Sidecar.tsx +3 -2
  339. package/src/lib/plugins/openapi/interfaces.ts +6 -1
  340. package/src/lib/plugins/openapi/schema/SchemaView.tsx +6 -4
  341. package/src/lib/plugins/openapi/schema/utils.ts +15 -4
  342. package/src/lib/plugins/openapi/util/createHttpSnippet.ts +29 -1
  343. package/src/lib/plugins/openapi/util/getRoutes.tsx +4 -1
  344. package/src/lib/ui/Button.tsx +1 -0
  345. package/src/lib/util/invariant.ts +2 -1
  346. package/src/shiki/langs/c3.js +1 -0
  347. package/src/shiki/langs/gn.js +1 -0
  348. package/src/shiki/langs/moonbit.js +1 -0
  349. package/lib/ClaudeLogo-B4Xxt-x_.js.map +0 -1
  350. package/lib/ErrorAlert-DrOR8w3f.js.map +0 -1
  351. package/lib/OAuthErrorPage-Fq54RLgt.js.map +0 -1
  352. package/lib/OasProvider-DPH8mwDa.js +0 -40
  353. package/lib/OasProvider-DPH8mwDa.js.map +0 -1
  354. package/lib/RouteGuard-9wjejsKm.js +0 -77
  355. package/lib/RouteGuard-9wjejsKm.js.map +0 -1
  356. package/lib/RouterError-DSLXagd5.js +0 -42
  357. package/lib/RouterError-DSLXagd5.js.map +0 -1
  358. package/lib/SchemaView-DVae4RO2.js +0 -597
  359. package/lib/SchemaView-DVae4RO2.js.map +0 -1
  360. package/lib/Select-CkxXP5I7.js.map +0 -1
  361. package/lib/SignUp-BjS4ozA7.js +0 -50
  362. package/lib/SignUp-BjS4ozA7.js.map +0 -1
  363. package/lib/SyntaxHighlight-Kdyskw3C.js.map +0 -1
  364. package/lib/ZudokuContext-BXldanA8.js +0 -1508
  365. package/lib/ZudokuContext-BXldanA8.js.map +0 -1
  366. package/lib/___vite-browser-external_commonjs-proxy-Cga3HsWk.js.map +0 -1
  367. package/lib/chunk-PVWAREVJ-dLIqswPy.js +0 -7965
  368. package/lib/chunk-PVWAREVJ-dLIqswPy.js.map +0 -1
  369. package/lib/cn-dYga0KKN.js.map +0 -1
  370. package/lib/createVariantComponent-B9_dVBvu.js +0 -35
  371. package/lib/createVariantComponent-B9_dVBvu.js.map +0 -1
  372. package/lib/firebase-Cax7HPzn.js.map +0 -1
  373. package/lib/hook-BNxidGQq.js +0 -40
  374. package/lib/hook-BNxidGQq.js.map +0 -1
  375. package/lib/index-CCmMJp02.js +0 -1059
  376. package/lib/index-CCmMJp02.js.map +0 -1
  377. package/lib/index.esm-DDENMN4y.js.map +0 -1
  378. package/lib/invariant-CGOLuIIz.js.map +0 -1
  379. package/lib/mutation-BoVlx8yA.js.map +0 -1
  380. package/lib/useMutation-C6RqWmTS.js.map +0 -1
@@ -0,0 +1,29 @@
1
+ import createDeepmerge from "@fastify/deepmerge";
2
+ import type { ConfigWithMeta } from "../../config/loader.js";
3
+ import { type ConfigHookContext, isTransformConfigPlugin } from "./plugins.js";
4
+
5
+ const mergeConfig = createDeepmerge({
6
+ mergeArray: (opt) => (_, source) => opt.clone(source),
7
+ });
8
+
9
+ export const runTransformConfigHooks = async (
10
+ config: ConfigWithMeta,
11
+ ): Promise<ConfigWithMeta> => {
12
+ const ctx = {
13
+ mode: config.__meta.mode,
14
+ rootDir: config.__meta.rootDir,
15
+ configPath: config.__meta.configPath,
16
+ } satisfies ConfigHookContext;
17
+ const plugins = config.plugins ?? [];
18
+
19
+ let result = config;
20
+
21
+ for (const plugin of plugins.filter(isTransformConfigPlugin)) {
22
+ const partial = await plugin.transformConfig?.(result, ctx);
23
+ if (!partial) continue;
24
+
25
+ result = mergeConfig(result, partial) as ConfigWithMeta;
26
+ }
27
+
28
+ return result;
29
+ };
@@ -0,0 +1,38 @@
1
+ import { Alert, AlertDescription, AlertTitle } from "zudoku/ui/Alert.js";
2
+ import { SyntaxHighlight } from "zudoku/ui/SyntaxHighlight.js";
3
+ import { DeveloperHint } from "../components/DeveloperHint.js";
4
+ import { ZudokuError } from "../util/invariant.js";
5
+
6
+ export function ErrorMessage({ error }: { error: unknown }) {
7
+ const message =
8
+ error instanceof Error ? error.message : "Something went wrong";
9
+
10
+ const showDeveloperHints = process.env.NODE_ENV === "development";
11
+
12
+ const hint = error instanceof ZudokuError ? error.developerHint : undefined;
13
+ const title =
14
+ error instanceof ZudokuError ? error.title : "Something went wrong";
15
+ const stack = error instanceof Error ? error.stack : undefined;
16
+ const cause = error instanceof Error ? error.cause : undefined;
17
+
18
+ const stringError = cause instanceof Error ? String(cause.stack) : stack;
19
+
20
+ return (
21
+ <>
22
+ <Alert variant="destructive">
23
+ <AlertTitle>{title}</AlertTitle>
24
+ <AlertDescription>{message}</AlertDescription>
25
+ </Alert>
26
+ {showDeveloperHints && hint && (
27
+ <DeveloperHint className="mb-4">{hint}</DeveloperHint>
28
+ )}
29
+ {showDeveloperHints && stringError && (
30
+ <SyntaxHighlight
31
+ className="max-h-[400px] [&>pre]:p-4"
32
+ language="js"
33
+ code={stringError}
34
+ />
35
+ )}
36
+ </>
37
+ );
38
+ }
@@ -0,0 +1,221 @@
1
+ import { describe, expect, it } from "vitest";
2
+ import {
3
+ CIRCULAR_REF,
4
+ handleCircularRefs,
5
+ SCHEMA_REF_PREFIX,
6
+ } from "./circular.js";
7
+
8
+ describe("handleCircularRefs", () => {
9
+ it("should return primitives unchanged", () => {
10
+ expect(handleCircularRefs(null)).toBe(null);
11
+ expect(handleCircularRefs(undefined)).toBe(undefined);
12
+ expect(handleCircularRefs(42)).toBe(42);
13
+ expect(handleCircularRefs("hello")).toBe("hello");
14
+ expect(handleCircularRefs(true)).toBe(true);
15
+ });
16
+
17
+ it("should handle simple objects without refs", () => {
18
+ const obj = { type: "string", description: "A string" };
19
+ const result = handleCircularRefs(obj);
20
+ expect(result).toEqual(obj);
21
+ });
22
+
23
+ it("should handle arrays", () => {
24
+ const arr = [{ type: "string" }, { type: "number" }];
25
+ const result = handleCircularRefs(arr);
26
+ expect(result).toEqual(arr);
27
+ });
28
+
29
+ it("should detect true circular references via object identity", () => {
30
+ const obj: Record<string, unknown> = { type: "object" };
31
+ obj.self = obj;
32
+
33
+ const result = handleCircularRefs(obj);
34
+ expect(result.type).toBe("object");
35
+ expect(result.self).toContain(CIRCULAR_REF);
36
+ });
37
+
38
+ it("should detect circular refs via __$ref path", () => {
39
+ const inner = { __$ref: "#/components/schemas/Node", type: "object" };
40
+ const obj = {
41
+ __$ref: "#/components/schemas/Node",
42
+ type: "object",
43
+ properties: {
44
+ child: inner,
45
+ },
46
+ };
47
+ (inner as Record<string, unknown>).properties = { parent: obj };
48
+
49
+ const result = handleCircularRefs(obj);
50
+ expect(result.properties.child).toBe(
51
+ `${SCHEMA_REF_PREFIX}#/components/schemas/Node`,
52
+ );
53
+ });
54
+
55
+ // Regression test for #1869
56
+ it("should NOT mark sibling refs to the same schema as circular", () => {
57
+ const timestampSchema1 = {
58
+ __$ref: "#/components/schemas/timestamp",
59
+ type: "string",
60
+ format: "date-time",
61
+ };
62
+ const timestampSchema2 = {
63
+ __$ref: "#/components/schemas/timestamp",
64
+ type: "string",
65
+ format: "date-time",
66
+ };
67
+
68
+ const obj = {
69
+ type: "object",
70
+ properties: {
71
+ created_at: timestampSchema1,
72
+ updated_at: timestampSchema2,
73
+ },
74
+ };
75
+
76
+ const result = handleCircularRefs(obj);
77
+
78
+ expect(result.properties.created_at).toEqual({
79
+ __$ref: "#/components/schemas/timestamp",
80
+ type: "string",
81
+ format: "date-time",
82
+ });
83
+ expect(result.properties.updated_at).toEqual({
84
+ __$ref: "#/components/schemas/timestamp",
85
+ type: "string",
86
+ format: "date-time",
87
+ });
88
+ });
89
+
90
+ it("should allow same ref path in different branches of the tree", () => {
91
+ const obj = {
92
+ type: "object",
93
+ properties: {
94
+ user: {
95
+ type: "object",
96
+ properties: {
97
+ id: { __$ref: "#/components/schemas/identifier", type: "string" },
98
+ name: { type: "string" },
99
+ },
100
+ },
101
+ post: {
102
+ type: "object",
103
+ properties: {
104
+ id: { __$ref: "#/components/schemas/identifier", type: "string" },
105
+ title: { type: "string" },
106
+ },
107
+ },
108
+ },
109
+ };
110
+
111
+ const result = handleCircularRefs(obj);
112
+
113
+ expect(result.properties.user.properties.id.type).toBe("string");
114
+ expect(result.properties.post.properties.id.type).toBe("string");
115
+ expect(result.properties.user.properties.id).not.toBe(
116
+ expect.stringContaining(SCHEMA_REF_PREFIX),
117
+ );
118
+ expect(result.properties.post.properties.id).not.toBe(
119
+ expect.stringContaining(SCHEMA_REF_PREFIX),
120
+ );
121
+ });
122
+
123
+ it("should handle shared object instances (same object, multiple references)", () => {
124
+ const sharedSchema = { type: "string", description: "Shared" };
125
+ const obj = {
126
+ type: "object",
127
+ properties: { field1: sharedSchema, field2: sharedSchema },
128
+ };
129
+
130
+ const result = handleCircularRefs(obj);
131
+
132
+ expect(result.properties.field1).toEqual({
133
+ type: "string",
134
+ description: "Shared",
135
+ });
136
+ expect(result.properties.field2).toEqual({
137
+ type: "string",
138
+ description: "Shared",
139
+ });
140
+ });
141
+
142
+ it("should handle nested arrays with refs", () => {
143
+ const obj = {
144
+ type: "object",
145
+ allOf: [
146
+ { __$ref: "#/components/schemas/Base", type: "object" },
147
+ { type: "object", properties: { extra: { type: "string" } } },
148
+ ],
149
+ };
150
+
151
+ const result = handleCircularRefs(obj);
152
+
153
+ expect(result.allOf[0]).toEqual({
154
+ __$ref: "#/components/schemas/Base",
155
+ type: "object",
156
+ });
157
+ });
158
+
159
+ it("should handle shared object instances with __$ref without marking circular", () => {
160
+ const shared = { __$ref: "#/components/schemas/Foo", type: "string" };
161
+ const obj = { a: shared, b: shared };
162
+ const result = handleCircularRefs(obj);
163
+
164
+ // Both should return the cached result, not mark as circular
165
+ expect(result.a).toEqual({
166
+ __$ref: "#/components/schemas/Foo",
167
+ type: "string",
168
+ });
169
+ expect(result.b).toEqual({
170
+ __$ref: "#/components/schemas/Foo",
171
+ type: "string",
172
+ });
173
+ });
174
+
175
+ it("should mark circular ref with property name from path", () => {
176
+ const parent: Record<string, unknown> = {
177
+ type: "object",
178
+ properties: {} as Record<string, unknown>,
179
+ };
180
+ const child: Record<string, unknown> = {
181
+ type: "object",
182
+ properties: { back: parent },
183
+ };
184
+ (parent.properties as Record<string, unknown>).child = child;
185
+
186
+ const result = handleCircularRefs(parent);
187
+
188
+ expect(result.properties.child.properties.back).toContain(CIRCULAR_REF);
189
+ });
190
+
191
+ // Exact reproduction of #1869 - shared object instances with __$ref
192
+ it("should NOT mark shared object instances with __$ref as circular (issue #1869)", () => {
193
+ // When dereferencing, the SAME object instance is returned for all refs to the same schema
194
+ const timestampSchema = {
195
+ __$ref: "#/components/schemas/timestamp",
196
+ type: "string",
197
+ format: "date-time",
198
+ };
199
+
200
+ // Both created_at and updated_at point to the SAME object instance
201
+ const obj = {
202
+ type: "object",
203
+ properties: {
204
+ created_at: timestampSchema,
205
+ updated_at: timestampSchema,
206
+ },
207
+ };
208
+
209
+ const result = handleCircularRefs(obj);
210
+
211
+ // The first one should be fully expanded
212
+ expect(result.properties.created_at).toEqual({
213
+ __$ref: "#/components/schemas/timestamp",
214
+ type: "string",
215
+ format: "date-time",
216
+ });
217
+ // The second one should ALSO be fully expanded (not marked as circular)
218
+ expect(typeof result.properties.updated_at).toBe("object");
219
+ expect(result.properties.updated_at).not.toContain(CIRCULAR_REF);
220
+ });
221
+ });
@@ -1,8 +1,8 @@
1
1
  import { GraphQLScalarType } from "graphql/index.js";
2
2
  import { GraphQLJSON } from "graphql-type-json";
3
- import type { RecordAny } from "../../util/traverse.js";
4
3
 
5
4
  export const CIRCULAR_REF = "$[Circular Reference]";
5
+ export const SCHEMA_REF_PREFIX = "$ref:";
6
6
 
7
7
  const OPENAPI_PROPS = new Set([
8
8
  "properties",
@@ -13,39 +13,52 @@ const OPENAPI_PROPS = new Set([
13
13
  "oneOf",
14
14
  ]);
15
15
 
16
- const handleCircularRefs = (
16
+ export const handleCircularRefs = (
17
17
  // biome-ignore lint/suspicious/noExplicitAny: Allow any type
18
18
  obj: any,
19
- visited = new WeakSet(),
19
+ currentPath = new WeakSet(),
20
20
  refs = new WeakMap(),
21
21
  path: string[] = [],
22
+ currentRefPaths = new Set<string>(),
22
23
  // biome-ignore lint/suspicious/noExplicitAny: Allow any type
23
24
  ): any => {
24
25
  if (obj === null || typeof obj !== "object") return obj;
25
26
 
26
- if (visited.has(obj)) {
27
- const cached = refs.get(obj);
28
- if (cached) return cached;
29
- const circularProp = path.find((p) => !OPENAPI_PROPS.has(p)) || path[0];
27
+ const refPath = obj.__$ref;
28
+ const isCircular =
29
+ currentPath.has(obj) ||
30
+ (typeof refPath === "string" && currentRefPaths.has(refPath));
30
31
 
32
+ if (isCircular) {
33
+ if (typeof refPath === "string") return SCHEMA_REF_PREFIX + refPath;
34
+ const circularProp = path.find((p) => !OPENAPI_PROPS.has(p)) || path[0];
31
35
  return [CIRCULAR_REF, circularProp].filter(Boolean).join(":");
32
36
  }
33
37
 
34
- visited.add(obj);
38
+ if (refs.has(obj)) return refs.get(obj);
35
39
 
36
- if (Array.isArray(obj)) {
37
- const result = obj.map((item, index) =>
38
- handleCircularRefs(item, visited, refs, [...path, index.toString()]),
40
+ currentPath.add(obj);
41
+ if (typeof refPath === "string") currentRefPaths.add(refPath);
42
+
43
+ const recurse = (value: unknown, key: string) =>
44
+ handleCircularRefs(
45
+ value,
46
+ currentPath,
47
+ refs,
48
+ [...path, key],
49
+ currentRefPaths,
39
50
  );
40
- refs.set(obj, result);
41
- return result;
42
- }
43
51
 
44
- const result: RecordAny = {};
45
- for (const [key, value] of Object.entries(obj)) {
46
- result[key] = handleCircularRefs(value, visited, refs, [...path, key]);
47
- }
52
+ const result = Array.isArray(obj)
53
+ ? obj.map((item, i) => recurse(item, i.toString()))
54
+ : Object.fromEntries(
55
+ Object.entries(obj).map(([k, v]) => [k, recurse(v, k)]),
56
+ );
57
+
48
58
  refs.set(obj, result);
59
+ currentPath.delete(obj);
60
+ if (typeof refPath === "string") currentRefPaths.delete(refPath);
61
+
49
62
  return result;
50
63
  };
51
64
 
@@ -473,7 +473,9 @@ const OperationItem = builder
473
473
  name,
474
474
  ...(typeof value === "string" ? { value } : value),
475
475
  }))
476
- : [],
476
+ : content.example !== undefined
477
+ ? [{ name: "", value: content.example }]
478
+ : [],
477
479
  encoding: Object.entries(content.encoding ?? {}).map(
478
480
  ([name, value]) => ({ name, ...value }),
479
481
  ),
@@ -490,7 +492,7 @@ const OperationItem = builder
490
492
  statusCode,
491
493
  description: response.description,
492
494
  content: Object.entries(response.content ?? {}).map(
493
- ([mediaType, { schema, examples }]) => ({
495
+ ([mediaType, { schema, examples, example }]) => ({
494
496
  mediaType,
495
497
  schema,
496
498
  examples: examples
@@ -498,7 +500,9 @@ const OperationItem = builder
498
500
  name,
499
501
  ...(typeof value === "string" ? { value } : value),
500
502
  }))
501
- : [],
503
+ : example !== undefined
504
+ ? [{ name: "", value: example }]
505
+ : [],
502
506
  }),
503
507
  ),
504
508
  headers: response.headers,