zudoku 0.0.0-fix-downgrade-openapi-parser.aac00796 → 0.0.0-fix-firebase-export.2e421fda

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 (566) hide show
  1. package/dist/app/main.d.ts +91 -1
  2. package/dist/app/main.js +5 -1
  3. package/dist/app/main.js.map +1 -1
  4. package/dist/app/sentry.js +1 -1
  5. package/dist/config/config.d.ts +15 -46
  6. package/dist/config/validators/BuildSchema.js +18 -3
  7. package/dist/config/validators/BuildSchema.js.map +1 -1
  8. package/dist/config/validators/InputNavigationSchema.d.ts +61 -61
  9. package/dist/config/validators/NavigationSchema.js +2 -4
  10. package/dist/config/validators/NavigationSchema.js.map +1 -1
  11. package/dist/config/validators/ProtectedRoutesSchema.d.ts +1 -1
  12. package/dist/config/validators/validate.d.ts +203 -5
  13. package/dist/config/validators/validate.js +44 -1
  14. package/dist/config/validators/validate.js.map +1 -1
  15. package/dist/config/validators/validate.test.js +43 -0
  16. package/dist/config/validators/validate.test.js.map +1 -1
  17. package/dist/flat-config.d.ts +31 -2
  18. package/dist/lib/auth/issuer.js +3 -0
  19. package/dist/lib/auth/issuer.js.map +1 -1
  20. package/dist/lib/authentication/authentication.d.ts +1 -1
  21. package/dist/lib/authentication/providers/auth0.js +6 -1
  22. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  23. package/dist/lib/authentication/providers/firebase.d.ts +4 -0
  24. package/dist/lib/authentication/providers/firebase.js +215 -0
  25. package/dist/lib/authentication/providers/firebase.js.map +1 -0
  26. package/dist/lib/authentication/providers/supabase.js +1 -6
  27. package/dist/lib/authentication/providers/supabase.js.map +1 -1
  28. package/dist/lib/authentication/ui/ZudokuAuthUi.d.ts +24 -0
  29. package/dist/lib/authentication/ui/ZudokuAuthUi.js +124 -0
  30. package/dist/lib/authentication/ui/ZudokuAuthUi.js.map +1 -0
  31. package/dist/lib/authentication/ui/icons/Apple.d.ts +3 -0
  32. package/dist/lib/authentication/ui/icons/Apple.js +4 -0
  33. package/dist/lib/authentication/ui/icons/Apple.js.map +1 -0
  34. package/dist/lib/authentication/ui/icons/Facebook.d.ts +3 -0
  35. package/dist/lib/authentication/ui/icons/Facebook.js +4 -0
  36. package/dist/lib/authentication/ui/icons/Facebook.js.map +1 -0
  37. package/dist/lib/authentication/ui/icons/Github.d.ts +3 -0
  38. package/dist/lib/authentication/ui/icons/Github.js +4 -0
  39. package/dist/lib/authentication/ui/icons/Github.js.map +1 -0
  40. package/dist/lib/authentication/ui/icons/Google.d.ts +3 -0
  41. package/dist/lib/authentication/ui/icons/Google.js +4 -0
  42. package/dist/lib/authentication/ui/icons/Google.js.map +1 -0
  43. package/dist/lib/authentication/ui/icons/Microsoft.d.ts +3 -0
  44. package/dist/lib/authentication/ui/icons/Microsoft.js +4 -0
  45. package/dist/lib/authentication/ui/icons/Microsoft.js.map +1 -0
  46. package/dist/lib/authentication/ui/icons/X.d.ts +3 -0
  47. package/dist/lib/authentication/ui/icons/X.js +4 -0
  48. package/dist/lib/authentication/ui/icons/X.js.map +1 -0
  49. package/dist/lib/components/Autocomplete.d.ts +3 -1
  50. package/dist/lib/components/Autocomplete.js +6 -2
  51. package/dist/lib/components/Autocomplete.js.map +1 -1
  52. package/dist/lib/components/Heading.d.ts +1 -1
  53. package/dist/lib/components/Layout.js +3 -2
  54. package/dist/lib/components/Layout.js.map +1 -1
  55. package/dist/lib/components/Mermaid.d.ts +7 -0
  56. package/dist/lib/components/Mermaid.js +42 -0
  57. package/dist/lib/components/Mermaid.js.map +1 -0
  58. package/dist/lib/components/PagefindSearchMeta.d.ts +8 -0
  59. package/dist/lib/components/PagefindSearchMeta.js +7 -0
  60. package/dist/lib/components/PagefindSearchMeta.js.map +1 -0
  61. package/dist/lib/components/Zudoku.js +2 -5
  62. package/dist/lib/components/Zudoku.js.map +1 -1
  63. package/dist/lib/components/navigation/NavigationItem.js +2 -2
  64. package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
  65. package/dist/lib/core/RouteGuard.js +7 -7
  66. package/dist/lib/core/RouteGuard.js.map +1 -1
  67. package/dist/lib/core/plugins.d.ts +3 -3
  68. package/dist/lib/errors/ErrorAlert.js +1 -1
  69. package/dist/lib/errors/RouterError.d.ts +3 -1
  70. package/dist/lib/errors/RouterError.js +3 -2
  71. package/dist/lib/errors/RouterError.js.map +1 -1
  72. package/dist/lib/oas/parser/index.d.ts +1 -0
  73. package/dist/lib/oas/parser/index.js +7 -3
  74. package/dist/lib/oas/parser/index.js.map +1 -1
  75. package/dist/lib/plugins/api-keys/ProtectedRoute.js +4 -1
  76. package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -1
  77. package/dist/lib/plugins/openapi/CollapsibleCode.d.ts +1 -0
  78. package/dist/lib/plugins/openapi/CollapsibleCode.js +2 -1
  79. package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -1
  80. package/dist/lib/plugins/openapi/DownloadSchemaButton.d.ts +3 -0
  81. package/dist/lib/plugins/openapi/DownloadSchemaButton.js +47 -0
  82. package/dist/lib/plugins/openapi/DownloadSchemaButton.js.map +1 -0
  83. package/dist/lib/plugins/openapi/Endpoint.js +3 -6
  84. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  85. package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.d.ts +5 -0
  86. package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js +10 -0
  87. package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js.map +1 -0
  88. package/dist/lib/plugins/openapi/OasProvider.js +22 -13
  89. package/dist/lib/plugins/openapi/OasProvider.js.map +1 -1
  90. package/dist/lib/plugins/openapi/OperationList.js +16 -6
  91. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  92. package/dist/lib/plugins/openapi/OperationListItem.d.ts +2 -1
  93. package/dist/lib/plugins/openapi/OperationListItem.js +4 -3
  94. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  95. package/dist/lib/plugins/openapi/ParameterList.js +7 -4
  96. package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
  97. package/dist/lib/plugins/openapi/ParameterListItem.js +17 -6
  98. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  99. package/dist/lib/plugins/openapi/RequestBodySidecarBox.d.ts +9 -2
  100. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +5 -2
  101. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  102. package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +4 -2
  103. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +26 -4
  104. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  105. package/dist/lib/plugins/openapi/SchemaList.js +2 -1
  106. package/dist/lib/plugins/openapi/SchemaList.js.map +1 -1
  107. package/dist/lib/plugins/openapi/Sidecar.d.ts +2 -2
  108. package/dist/lib/plugins/openapi/Sidecar.js +61 -26
  109. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  110. package/dist/lib/plugins/openapi/SidecarBox.js +4 -4
  111. package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
  112. package/dist/lib/plugins/openapi/SidecarExamples.d.ts +9 -2
  113. package/dist/lib/plugins/openapi/SidecarExamples.js +24 -43
  114. package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
  115. package/dist/lib/plugins/openapi/components/ConstValue.js +1 -1
  116. package/dist/lib/plugins/openapi/components/ConstValue.js.map +1 -1
  117. package/dist/lib/plugins/openapi/components/EnumValues.js +1 -1
  118. package/dist/lib/plugins/openapi/components/EnumValues.js.map +1 -1
  119. package/dist/lib/plugins/openapi/components/NonHighlightedCode.d.ts +4 -0
  120. package/dist/lib/plugins/openapi/components/NonHighlightedCode.js +5 -0
  121. package/dist/lib/plugins/openapi/components/NonHighlightedCode.js.map +1 -0
  122. package/dist/lib/plugins/openapi/components/ResponseContent.js +5 -6
  123. package/dist/lib/plugins/openapi/components/ResponseContent.js.map +1 -1
  124. package/dist/lib/plugins/openapi/index.js +11 -5
  125. package/dist/lib/plugins/openapi/index.js.map +1 -1
  126. package/dist/lib/plugins/openapi/interfaces.d.ts +29 -13
  127. package/dist/lib/plugins/openapi/playground/BodyPanel.js +67 -15
  128. package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -1
  129. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +2 -2
  130. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -1
  131. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +1 -1
  132. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
  133. package/dist/lib/plugins/openapi/playground/Headers.js +23 -83
  134. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  135. package/dist/lib/plugins/openapi/playground/ParamsGrid.d.ts +10 -2
  136. package/dist/lib/plugins/openapi/playground/ParamsGrid.js +8 -1
  137. package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -1
  138. package/dist/lib/plugins/openapi/playground/PathParams.js +2 -3
  139. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  140. package/dist/lib/plugins/openapi/playground/Playground.d.ts +7 -0
  141. package/dist/lib/plugins/openapi/playground/Playground.js +58 -26
  142. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  143. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +3 -2
  144. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  145. package/dist/lib/plugins/openapi/playground/QueryParams.js +16 -40
  146. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  147. package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.d.ts +8 -0
  148. package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.js +19 -0
  149. package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.js.map +1 -0
  150. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js +1 -1
  151. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js.map +1 -1
  152. package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.d.ts +1 -0
  153. package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.js +540 -0
  154. package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.js.map +1 -0
  155. package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.d.ts +40 -0
  156. package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.js +205 -0
  157. package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.js.map +1 -0
  158. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +2 -2
  159. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
  160. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +1 -1
  161. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -1
  162. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +17 -8
  163. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
  164. package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +1 -1
  165. package/dist/lib/plugins/openapi/schema/SchemaView.js +31 -16
  166. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  167. package/dist/lib/plugins/openapi/schema/UnionView.js +2 -5
  168. package/dist/lib/plugins/openapi/schema/UnionView.js.map +1 -1
  169. package/dist/lib/plugins/openapi/schema/union-helpers.js +0 -1
  170. package/dist/lib/plugins/openapi/schema/union-helpers.js.map +1 -1
  171. package/dist/lib/plugins/openapi/schema/utils.d.ts +2 -2
  172. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  173. package/dist/lib/plugins/openapi/util/generateSchemaExample.js +9 -11
  174. package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
  175. package/dist/lib/plugins/openapi/util/getRoutes.d.ts +6 -1
  176. package/dist/lib/plugins/openapi/util/getRoutes.js +29 -2
  177. package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
  178. package/dist/lib/plugins/search-pagefind/IndexingDialog.d.ts +3 -0
  179. package/dist/lib/plugins/search-pagefind/IndexingDialog.js +64 -0
  180. package/dist/lib/plugins/search-pagefind/IndexingDialog.js.map +1 -0
  181. package/dist/lib/plugins/search-pagefind/PagefindSearch.js +22 -5
  182. package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
  183. package/dist/lib/plugins/search-pagefind/ResultList.js +5 -4
  184. package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
  185. package/dist/lib/shiki.d.ts +1 -1
  186. package/dist/lib/shiki.js +18 -12
  187. package/dist/lib/shiki.js.map +1 -1
  188. package/dist/lib/ui/Badge.d.ts +3 -3
  189. package/dist/lib/ui/Badge.js +9 -7
  190. package/dist/lib/ui/Badge.js.map +1 -1
  191. package/dist/lib/ui/Button.d.ts +2 -2
  192. package/dist/lib/ui/Button.js +9 -7
  193. package/dist/lib/ui/Button.js.map +1 -1
  194. package/dist/lib/ui/ButtonGroup.d.ts +11 -0
  195. package/dist/lib/ui/ButtonGroup.js +28 -0
  196. package/dist/lib/ui/ButtonGroup.js.map +1 -0
  197. package/dist/lib/ui/Checkbox.d.ts +2 -2
  198. package/dist/lib/ui/Checkbox.js +4 -4
  199. package/dist/lib/ui/Checkbox.js.map +1 -1
  200. package/dist/lib/ui/CodeBlock.d.ts +0 -1
  201. package/dist/lib/ui/CodeBlock.js +1 -1
  202. package/dist/lib/ui/CodeBlock.js.map +1 -1
  203. package/dist/lib/ui/Collapsible.d.ts +4 -4
  204. package/dist/lib/ui/Collapsible.js +11 -4
  205. package/dist/lib/ui/Collapsible.js.map +1 -1
  206. package/dist/lib/ui/Command.d.ts +3 -3
  207. package/dist/lib/ui/Command.js +2 -2
  208. package/dist/lib/ui/Command.js.map +1 -1
  209. package/dist/lib/ui/DropdownMenu.d.ts +21 -23
  210. package/dist/lib/ui/DropdownMenu.js +47 -32
  211. package/dist/lib/ui/DropdownMenu.js.map +1 -1
  212. package/dist/lib/ui/EmbeddedCodeBlock.d.ts +0 -1
  213. package/dist/lib/ui/EmbeddedCodeBlock.js +3 -2
  214. package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
  215. package/dist/lib/ui/Frame.d.ts +8 -0
  216. package/dist/lib/ui/Frame.js +22 -0
  217. package/dist/lib/ui/Frame.js.map +1 -0
  218. package/dist/lib/ui/Item.d.ts +23 -0
  219. package/dist/lib/ui/Item.js +67 -0
  220. package/dist/lib/ui/Item.js.map +1 -0
  221. package/dist/lib/ui/Kbd.d.ts +3 -0
  222. package/dist/lib/ui/Kbd.js +10 -0
  223. package/dist/lib/ui/Kbd.js.map +1 -0
  224. package/dist/lib/ui/NativeSelect.d.ts +5 -0
  225. package/dist/lib/ui/NativeSelect.js +14 -0
  226. package/dist/lib/ui/NativeSelect.js.map +1 -0
  227. package/dist/lib/ui/Select.d.ts +13 -11
  228. package/dist/lib/ui/Select.js +34 -23
  229. package/dist/lib/ui/Select.js.map +1 -1
  230. package/dist/lib/ui/Separator.d.ts +4 -0
  231. package/dist/lib/ui/Separator.js +8 -0
  232. package/dist/lib/ui/Separator.js.map +1 -0
  233. package/dist/lib/ui/Tooltip.d.ts +7 -7
  234. package/dist/lib/ui/Tooltip.js +16 -10
  235. package/dist/lib/ui/Tooltip.js.map +1 -1
  236. package/dist/lib/util/MdxComponents.d.ts +1 -0
  237. package/dist/lib/util/MdxComponents.js +2 -0
  238. package/dist/lib/util/MdxComponents.js.map +1 -1
  239. package/dist/lib/util/createVariantComponent.d.ts +5 -2
  240. package/dist/lib/util/createVariantComponent.js +5 -2
  241. package/dist/lib/util/createVariantComponent.js.map +1 -1
  242. package/dist/lib/util/flattenAllOf.d.ts +4 -0
  243. package/dist/lib/util/flattenAllOf.js +88 -0
  244. package/dist/lib/util/flattenAllOf.js.map +1 -0
  245. package/dist/lib/util/flattenAllOf.test.d.ts +1 -0
  246. package/dist/lib/util/flattenAllOf.test.js +587 -0
  247. package/dist/lib/util/flattenAllOf.test.js.map +1 -0
  248. package/dist/lib/util/readFrontmatter.d.ts +6 -0
  249. package/dist/lib/util/readFrontmatter.js +12 -0
  250. package/dist/lib/util/readFrontmatter.js.map +1 -0
  251. package/dist/vite/api/SchemaManager.d.ts +5 -0
  252. package/dist/vite/api/SchemaManager.js +30 -18
  253. package/dist/vite/api/SchemaManager.js.map +1 -1
  254. package/dist/vite/api/SchemaManager.test.js +67 -0
  255. package/dist/vite/api/SchemaManager.test.js.map +1 -1
  256. package/dist/vite/config.js +8 -2
  257. package/dist/vite/config.js.map +1 -1
  258. package/dist/vite/dev-server.js +25 -0
  259. package/dist/vite/dev-server.js.map +1 -1
  260. package/dist/vite/mdx/remark-last-modified.js +57 -3
  261. package/dist/vite/mdx/remark-last-modified.js.map +1 -1
  262. package/dist/vite/pagefind-dev-index.d.ts +16 -0
  263. package/dist/vite/pagefind-dev-index.js +68 -0
  264. package/dist/vite/pagefind-dev-index.js.map +1 -0
  265. package/dist/vite/plugin-api.js +41 -3
  266. package/dist/vite/plugin-api.js.map +1 -1
  267. package/dist/vite/plugin-frontmatter.js +3 -5
  268. package/dist/vite/plugin-frontmatter.js.map +1 -1
  269. package/dist/vite/plugin-markdown-export.js +3 -4
  270. package/dist/vite/plugin-markdown-export.js.map +1 -1
  271. package/dist/vite/plugin-theme.js +10 -1
  272. package/dist/vite/plugin-theme.js.map +1 -1
  273. package/dist/vite/prerender/prerender.js +1 -19
  274. package/dist/vite/prerender/prerender.js.map +1 -1
  275. package/dist/vite/prerender/utils.d.ts +2 -0
  276. package/dist/vite/prerender/utils.js +24 -0
  277. package/dist/vite/prerender/utils.js.map +1 -0
  278. package/lib/ActionButton-DUgvSylL.js +25 -0
  279. package/lib/ActionButton-DUgvSylL.js.map +1 -0
  280. package/lib/Button-CynVW1JV.js +53 -0
  281. package/lib/Button-CynVW1JV.js.map +1 -0
  282. package/lib/ClaudeLogo-B4Xxt-x_.js +69 -0
  283. package/lib/ClaudeLogo-B4Xxt-x_.js.map +1 -0
  284. package/lib/{Command-CUcrW3qs.js → Command-BpT1iBE6.js} +25 -25
  285. package/lib/Command-BpT1iBE6.js.map +1 -0
  286. package/lib/Drawer-Ci7XwhqT.js.map +1 -1
  287. package/lib/DropdownMenu-C8SX_-S_.js +104 -0
  288. package/lib/DropdownMenu-C8SX_-S_.js.map +1 -0
  289. package/lib/{ErrorAlert-DE3Sf66a.js → ErrorAlert-DrOR8w3f.js} +475 -456
  290. package/lib/ErrorAlert-DrOR8w3f.js.map +1 -0
  291. package/lib/IndexingDialog-B5zCiUKr.js +100 -0
  292. package/lib/IndexingDialog-B5zCiUKr.js.map +1 -0
  293. package/lib/MdxPage-BagO2c-n.js +210 -0
  294. package/lib/MdxPage-BagO2c-n.js.map +1 -0
  295. package/lib/Mermaid-D_VSX7_Q.js +102 -0
  296. package/lib/Mermaid-D_VSX7_Q.js.map +1 -0
  297. package/lib/{OAuthErrorPage-BycMozgn.js → OAuthErrorPage-Fq54RLgt.js} +7 -7
  298. package/lib/{OAuthErrorPage-BycMozgn.js.map → OAuthErrorPage-Fq54RLgt.js.map} +1 -1
  299. package/lib/OasProvider-DPH8mwDa.js +40 -0
  300. package/lib/OasProvider-DPH8mwDa.js.map +1 -0
  301. package/lib/OperationList-C0jiEaG5.js +5805 -0
  302. package/lib/OperationList-C0jiEaG5.js.map +1 -0
  303. package/lib/RouteGuard-9wjejsKm.js +77 -0
  304. package/lib/RouteGuard-9wjejsKm.js.map +1 -0
  305. package/lib/RouterError-DSLXagd5.js +42 -0
  306. package/lib/RouterError-DSLXagd5.js.map +1 -0
  307. package/lib/{SchemaList-xZSf3IMh.js → SchemaList-BU0zCHn9.js} +28 -27
  308. package/lib/SchemaList-BU0zCHn9.js.map +1 -0
  309. package/lib/SchemaView-DVae4RO2.js +597 -0
  310. package/lib/SchemaView-DVae4RO2.js.map +1 -0
  311. package/lib/Select-CkxXP5I7.js +243 -0
  312. package/lib/Select-CkxXP5I7.js.map +1 -0
  313. package/lib/Separator-CTPSeW1S.js +27 -0
  314. package/lib/Separator-CTPSeW1S.js.map +1 -0
  315. package/lib/{SignUp-6SGx9Yyq.js → SignUp-BjS4ozA7.js} +13 -13
  316. package/lib/{SignUp-6SGx9Yyq.js.map → SignUp-BjS4ozA7.js.map} +1 -1
  317. package/lib/{SyntaxHighlight-zvlnSnHB.js → SyntaxHighlight-Kdyskw3C.js} +710 -662
  318. package/lib/{SyntaxHighlight-zvlnSnHB.js.map → SyntaxHighlight-Kdyskw3C.js.map} +1 -1
  319. package/lib/{Toc-Da9yp7lo.js → Toc-DJxFPfcS.js} +2 -2
  320. package/lib/{Toc-Da9yp7lo.js.map → Toc-DJxFPfcS.js.map} +1 -1
  321. package/lib/{ZudokuContext-BUZ5hkWB.js → ZudokuContext-BXldanA8.js} +11 -11
  322. package/lib/{ZudokuContext-BUZ5hkWB.js.map → ZudokuContext-BXldanA8.js.map} +1 -1
  323. package/lib/___vite-browser-external_commonjs-proxy-Cga3HsWk.js +9 -0
  324. package/lib/___vite-browser-external_commonjs-proxy-Cga3HsWk.js.map +1 -0
  325. package/lib/{chunk-PVWAREVJ-BMhpCH5D.js → chunk-PVWAREVJ-dLIqswPy.js} +5 -5
  326. package/lib/{chunk-PVWAREVJ-BMhpCH5D.js.map → chunk-PVWAREVJ-dLIqswPy.js.map} +1 -1
  327. package/lib/{circular-DvuimBGQ.js → circular-CzWF1hj5.js} +6360 -5953
  328. package/lib/circular-CzWF1hj5.js.map +1 -0
  329. package/lib/createServer-BIr2_tGn.js +16693 -0
  330. package/lib/createServer-BIr2_tGn.js.map +1 -0
  331. package/lib/createVariantComponent-B9_dVBvu.js +35 -0
  332. package/lib/createVariantComponent-B9_dVBvu.js.map +1 -0
  333. package/lib/{errors-CuGgh3hf.js → errors-Bs4duWDy.js} +3 -3
  334. package/lib/{errors-CuGgh3hf.js.map → errors-Bs4duWDy.js.map} +1 -1
  335. package/lib/firebase-Cax7HPzn.js +7360 -0
  336. package/lib/firebase-Cax7HPzn.js.map +1 -0
  337. package/lib/{hook-CMeoxziF.js → hook-BNxidGQq.js} +3 -3
  338. package/lib/{hook-CMeoxziF.js.map → hook-BNxidGQq.js.map} +1 -1
  339. package/lib/index-0oT9beQN.js +3676 -0
  340. package/lib/index-0oT9beQN.js.map +1 -0
  341. package/lib/{index-rYHsvtTo.js → index-Bh-MffiL.js} +2 -2
  342. package/lib/{index-rYHsvtTo.js.map → index-Bh-MffiL.js.map} +1 -1
  343. package/lib/{index-B1rmok4X.js → index-CCmMJp02.js} +10 -10
  344. package/lib/{index-B1rmok4X.js.map → index-CCmMJp02.js.map} +1 -1
  345. package/lib/index-CrcNWbel.js.map +1 -1
  346. package/lib/index-Css56y3F.js +133 -0
  347. package/lib/index-Css56y3F.js.map +1 -0
  348. package/lib/index.esm-DDENMN4y.js +32 -0
  349. package/lib/index.esm-DDENMN4y.js.map +1 -0
  350. package/lib/{index.esm-BnYHxCYC.js → index.esm-DtzT_KoE.js} +20 -20
  351. package/lib/{index.esm-BnYHxCYC.js.map → index.esm-DtzT_KoE.js.map} +1 -1
  352. package/lib/{invariant-Bm-FVUQE.js → invariant-CGOLuIIz.js} +3 -3
  353. package/lib/{invariant-Bm-FVUQE.js.map → invariant-CGOLuIIz.js.map} +1 -1
  354. package/lib/{mutation-BSU0xu4m.js → mutation-BoVlx8yA.js} +2 -2
  355. package/lib/{mutation-BSU0xu4m.js.map → mutation-BoVlx8yA.js.map} +1 -1
  356. package/lib/ui/ActionButton.js +1 -1
  357. package/lib/ui/Badge.js +27 -13
  358. package/lib/ui/Badge.js.map +1 -1
  359. package/lib/ui/Button.js +26 -24
  360. package/lib/ui/Button.js.map +1 -1
  361. package/lib/ui/ButtonGroup.js +77 -0
  362. package/lib/ui/ButtonGroup.js.map +1 -0
  363. package/lib/ui/Checkbox.js +29 -26
  364. package/lib/ui/Checkbox.js.map +1 -1
  365. package/lib/ui/CodeBlock.js +7 -7
  366. package/lib/ui/CodeBlock.js.map +1 -1
  367. package/lib/ui/Collapsible.js +32 -5
  368. package/lib/ui/Collapsible.js.map +1 -1
  369. package/lib/ui/Command.js +3 -3
  370. package/lib/ui/Command.js.map +1 -1
  371. package/lib/ui/DropdownMenu.js +227 -140
  372. package/lib/ui/DropdownMenu.js.map +1 -1
  373. package/lib/ui/EmbeddedCodeBlock.js +26 -25
  374. package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
  375. package/lib/ui/Frame.js +81 -0
  376. package/lib/ui/Frame.js.map +1 -0
  377. package/lib/ui/Item.js +188 -0
  378. package/lib/ui/Item.js.map +1 -0
  379. package/lib/ui/Kbd.js +32 -0
  380. package/lib/ui/Kbd.js.map +1 -0
  381. package/lib/ui/NativeSelect.js +57 -0
  382. package/lib/ui/NativeSelect.js.map +1 -0
  383. package/lib/ui/Select.js +166 -116
  384. package/lib/ui/Select.js.map +1 -1
  385. package/lib/ui/Separator.js +27 -0
  386. package/lib/ui/Separator.js.map +1 -0
  387. package/lib/ui/SyntaxHighlight.js +3 -3
  388. package/lib/ui/Tabs.js +10 -10
  389. package/lib/ui/Tooltip.js +55 -28
  390. package/lib/ui/Tooltip.js.map +1 -1
  391. package/lib/useMutation-C6RqWmTS.js +97 -0
  392. package/lib/useMutation-C6RqWmTS.js.map +1 -0
  393. package/lib/zudoku.__internal.js +349 -349
  394. package/lib/zudoku.__internal.js.map +1 -1
  395. package/lib/zudoku.auth-auth0.js +7 -7
  396. package/lib/zudoku.auth-auth0.js.map +1 -1
  397. package/lib/zudoku.auth-azureb2c.js +4 -4
  398. package/lib/zudoku.auth-clerk.js +2 -2
  399. package/lib/zudoku.auth-firebase.js +9 -0
  400. package/lib/zudoku.auth-firebase.js.map +1 -0
  401. package/lib/zudoku.auth-openid.js +5 -5
  402. package/lib/zudoku.auth-supabase.js +31 -34
  403. package/lib/zudoku.auth-supabase.js.map +1 -1
  404. package/lib/zudoku.components.js +7 -7
  405. package/lib/zudoku.hooks.js +11 -24
  406. package/lib/zudoku.hooks.js.map +1 -1
  407. package/lib/zudoku.mermaid.js +10 -0
  408. package/lib/zudoku.mermaid.js.map +1 -0
  409. package/lib/zudoku.plugin-api-catalog.js +6 -6
  410. package/lib/zudoku.plugin-api-keys.js +225 -216
  411. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  412. package/lib/zudoku.plugin-custom-pages.js +1 -1
  413. package/lib/zudoku.plugin-markdown.js +1 -1
  414. package/lib/zudoku.plugin-openapi.js +3 -3
  415. package/lib/zudoku.plugin-redirect.js +1 -1
  416. package/lib/zudoku.plugin-search-pagefind.js +184 -226
  417. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  418. package/lib/zudoku.plugins.js.map +1 -1
  419. package/lib/zudoku.router.js +2 -2
  420. package/package.json +44 -27
  421. package/src/app/main.css +1 -1
  422. package/src/app/main.tsx +5 -1
  423. package/src/app/sentry.ts +1 -1
  424. package/src/lib/auth/issuer.ts +3 -0
  425. package/src/lib/authentication/authentication.ts +1 -1
  426. package/src/lib/authentication/providers/auth0.tsx +6 -1
  427. package/src/lib/authentication/providers/firebase.tsx +284 -0
  428. package/src/lib/authentication/providers/supabase.tsx +2 -7
  429. package/src/lib/authentication/ui/ZudokuAuthUi.tsx +335 -0
  430. package/src/lib/authentication/ui/icons/Apple.tsx +10 -0
  431. package/src/lib/authentication/ui/icons/Facebook.tsx +15 -0
  432. package/src/lib/authentication/ui/icons/Github.tsx +16 -0
  433. package/src/lib/authentication/ui/icons/Google.tsx +16 -0
  434. package/src/lib/authentication/ui/icons/Microsoft.tsx +12 -0
  435. package/src/lib/authentication/ui/icons/X.tsx +10 -0
  436. package/src/lib/components/Autocomplete.tsx +11 -2
  437. package/src/lib/components/Layout.tsx +3 -2
  438. package/src/lib/components/Mermaid.tsx +68 -0
  439. package/src/lib/components/PagefindSearchMeta.tsx +14 -0
  440. package/src/lib/components/Zudoku.tsx +4 -7
  441. package/src/lib/components/navigation/NavigationItem.tsx +7 -20
  442. package/src/lib/core/RouteGuard.tsx +9 -9
  443. package/src/lib/core/plugins.ts +2 -2
  444. package/src/lib/errors/ErrorAlert.tsx +1 -1
  445. package/src/lib/errors/RouterError.tsx +7 -2
  446. package/src/lib/oas/parser/index.ts +10 -3
  447. package/src/lib/plugins/api-keys/ProtectedRoute.tsx +11 -7
  448. package/src/lib/plugins/openapi/CollapsibleCode.tsx +5 -3
  449. package/src/lib/plugins/openapi/DownloadSchemaButton.tsx +115 -0
  450. package/src/lib/plugins/openapi/Endpoint.tsx +20 -27
  451. package/src/lib/plugins/openapi/GeneratedExampleSidecarBox.tsx +52 -0
  452. package/src/lib/plugins/openapi/OasProvider.tsx +30 -17
  453. package/src/lib/plugins/openapi/OperationList.tsx +46 -21
  454. package/src/lib/plugins/openapi/OperationListItem.tsx +15 -12
  455. package/src/lib/plugins/openapi/ParameterList.tsx +37 -23
  456. package/src/lib/plugins/openapi/ParameterListItem.tsx +105 -54
  457. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +48 -7
  458. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +101 -33
  459. package/src/lib/plugins/openapi/SchemaList.tsx +4 -0
  460. package/src/lib/plugins/openapi/Sidecar.tsx +145 -65
  461. package/src/lib/plugins/openapi/SidecarBox.tsx +26 -4
  462. package/src/lib/plugins/openapi/SidecarExamples.tsx +91 -79
  463. package/src/lib/plugins/openapi/components/ConstValue.tsx +1 -1
  464. package/src/lib/plugins/openapi/components/EnumValues.tsx +2 -2
  465. package/src/lib/plugins/openapi/components/NonHighlightedCode.tsx +22 -0
  466. package/src/lib/plugins/openapi/components/ResponseContent.tsx +63 -53
  467. package/src/lib/plugins/openapi/index.tsx +16 -7
  468. package/src/lib/plugins/openapi/interfaces.ts +28 -7
  469. package/src/lib/plugins/openapi/playground/BodyPanel.tsx +246 -30
  470. package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +10 -6
  471. package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +3 -2
  472. package/src/lib/plugins/openapi/playground/Headers.tsx +103 -219
  473. package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +33 -1
  474. package/src/lib/plugins/openapi/playground/PathParams.tsx +26 -34
  475. package/src/lib/plugins/openapi/playground/Playground.tsx +75 -33
  476. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +9 -30
  477. package/src/lib/plugins/openapi/playground/QueryParams.tsx +82 -136
  478. package/src/lib/plugins/openapi/playground/request-panel/MultipartField.tsx +91 -0
  479. package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +1 -1
  480. package/src/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.tsx +872 -0
  481. package/src/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.ts +349 -0
  482. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +2 -6
  483. package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +1 -1
  484. package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +89 -55
  485. package/src/lib/plugins/openapi/schema/SchemaView.tsx +98 -60
  486. package/src/lib/plugins/openapi/schema/UnionView.tsx +6 -17
  487. package/src/lib/plugins/openapi/schema/union-helpers.ts +0 -1
  488. package/src/lib/plugins/openapi/schema/utils.ts +5 -2
  489. package/src/lib/plugins/openapi/util/generateSchemaExample.ts +11 -11
  490. package/src/lib/plugins/openapi/util/getRoutes.tsx +35 -3
  491. package/src/lib/plugins/search-pagefind/IndexingDialog.tsx +163 -0
  492. package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +61 -22
  493. package/src/lib/plugins/search-pagefind/ResultList.tsx +8 -3
  494. package/src/lib/shiki.ts +21 -12
  495. package/src/lib/ui/Badge.tsx +21 -12
  496. package/src/lib/ui/Button.tsx +10 -9
  497. package/src/lib/ui/ButtonGroup.tsx +82 -0
  498. package/src/lib/ui/Checkbox.tsx +23 -24
  499. package/src/lib/ui/CodeBlock.tsx +3 -4
  500. package/src/lib/ui/Collapsible.tsx +26 -4
  501. package/src/lib/ui/Command.tsx +3 -3
  502. package/src/lib/ui/DropdownMenu.tsx +226 -170
  503. package/src/lib/ui/EmbeddedCodeBlock.tsx +21 -19
  504. package/src/lib/ui/Frame.tsx +81 -0
  505. package/src/lib/ui/Item.tsx +192 -0
  506. package/src/lib/ui/Kbd.tsx +28 -0
  507. package/src/lib/ui/NativeSelect.tsx +47 -0
  508. package/src/lib/ui/Select.tsx +153 -126
  509. package/src/lib/ui/Separator.tsx +25 -0
  510. package/src/lib/ui/Tooltip.tsx +54 -32
  511. package/src/lib/util/MdxComponents.tsx +2 -0
  512. package/src/lib/util/createVariantComponent.tsx +31 -5
  513. package/src/lib/util/flattenAllOf.test.ts +689 -0
  514. package/src/lib/util/flattenAllOf.ts +122 -0
  515. package/src/lib/util/readFrontmatter.ts +13 -0
  516. package/src/shiki/langs/markdown-nix.js +1 -0
  517. package/src/shiki/langs/openscad.js +1 -0
  518. package/dist/lib/plugins/openapi/playground/InlineInput.d.ts +0 -4
  519. package/dist/lib/plugins/openapi/playground/InlineInput.js +0 -3
  520. package/dist/lib/plugins/openapi/playground/InlineInput.js.map +0 -1
  521. package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.d.ts +0 -5
  522. package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.js +0 -7
  523. package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.js.map +0 -1
  524. package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.d.ts +0 -4
  525. package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.js +0 -10
  526. package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.js.map +0 -1
  527. package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.d.ts +0 -5
  528. package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.js +0 -16
  529. package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.js.map +0 -1
  530. package/dist/vite/create-pagefind-index.d.ts +0 -4
  531. package/dist/vite/create-pagefind-index.js +0 -12
  532. package/dist/vite/create-pagefind-index.js.map +0 -1
  533. package/lib/Button-DmS4u8Lj.js +0 -51
  534. package/lib/Button-DmS4u8Lj.js.map +0 -1
  535. package/lib/Command-CUcrW3qs.js.map +0 -1
  536. package/lib/DropdownMenu-BZ2NKQ3K.js +0 -126
  537. package/lib/DropdownMenu-BZ2NKQ3K.js.map +0 -1
  538. package/lib/ErrorAlert-DE3Sf66a.js.map +0 -1
  539. package/lib/MdxPage-DZfeC0QY.js +0 -240
  540. package/lib/MdxPage-DZfeC0QY.js.map +0 -1
  541. package/lib/OasProvider-Bf5zBDBY.js +0 -36
  542. package/lib/OasProvider-Bf5zBDBY.js.map +0 -1
  543. package/lib/OperationList-Cmiw1xm2.js +0 -5446
  544. package/lib/OperationList-Cmiw1xm2.js.map +0 -1
  545. package/lib/Pagination-CJszmeSA.js +0 -37
  546. package/lib/Pagination-CJszmeSA.js.map +0 -1
  547. package/lib/RouteGuard-DhU3LRr1.js +0 -81
  548. package/lib/RouteGuard-DhU3LRr1.js.map +0 -1
  549. package/lib/RouterError-VDLnrFqF.js +0 -41
  550. package/lib/RouterError-VDLnrFqF.js.map +0 -1
  551. package/lib/SchemaList-xZSf3IMh.js.map +0 -1
  552. package/lib/SchemaView-tHXTm5oM.js +0 -458
  553. package/lib/SchemaView-tHXTm5oM.js.map +0 -1
  554. package/lib/Select-C1DeCqKv.js +0 -372
  555. package/lib/Select-C1DeCqKv.js.map +0 -1
  556. package/lib/circular-DvuimBGQ.js.map +0 -1
  557. package/lib/createServer-D9UvCoDf.js +0 -12559
  558. package/lib/createServer-D9UvCoDf.js.map +0 -1
  559. package/lib/index-Cr9_YzOZ.js +0 -3364
  560. package/lib/index-Cr9_YzOZ.js.map +0 -1
  561. package/lib/useExposedProps-U3pmsHaG.js +0 -113
  562. package/lib/useExposedProps-U3pmsHaG.js.map +0 -1
  563. package/src/lib/plugins/openapi/playground/InlineInput.tsx +0 -6
  564. package/src/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.tsx +0 -36
  565. package/src/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.tsx +0 -25
  566. package/src/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.tsx +0 -42
@@ -1,5 +1,5 @@
1
1
  import type { LucideIcon } from "lucide-react";
2
- import type { ReactElement } from "react";
2
+ import type { ReactNode } from "react";
3
3
  import type { Location, RouteObject } from "react-router";
4
4
  import type { Navigation } from "../../config/validators/NavigationSchema.js";
5
5
  import type { ProtectedRoutesInput } from "../../config/validators/ProtectedRoutesSchema.js";
@@ -64,7 +64,7 @@ export interface CommonPlugin {
64
64
  initialize?: (
65
65
  context: ZudokuContext,
66
66
  ) => Promise<void | boolean> | void | boolean;
67
- getHead?: ({ location }: { location: Location }) => ReactElement | undefined;
67
+ getHead?: (args: { location: Location }) => ReactNode | undefined;
68
68
  getMdxComponents?: () => MdxComponentsType;
69
69
  }
70
70
 
@@ -17,7 +17,7 @@ export function ErrorAlert({ error }: { error: unknown }) {
17
17
  const stringError = cause instanceof Error ? String(cause.stack) : stack;
18
18
 
19
19
  return (
20
- <Typography className="grid grid-cols-1 !max-w-none pt-(--padding-content-top)">
20
+ <Typography className="grid grid-cols-1 max-w-none! pt-(--padding-content-top)">
21
21
  <Heading level={1}>{title}</Heading>
22
22
  Error: {message}
23
23
  {hint && <DeveloperHint className="mb-4">{hint}</DeveloperHint>}
@@ -1,13 +1,18 @@
1
1
  import { isRouteErrorResponse, useRouteError } from "react-router";
2
2
  import { NotFoundPage } from "../components/NotFoundPage.js";
3
+ import { cn } from "../util/cn.js";
3
4
  import { ErrorAlert } from "./ErrorAlert.js";
4
5
 
5
- export function RouterError() {
6
+ export function RouterError({ className }: { className?: string }) {
6
7
  const error = useRouteError();
7
8
 
8
9
  if (isRouteErrorResponse(error) && error.status === 404) {
9
10
  return <NotFoundPage />;
10
11
  }
11
12
 
12
- return <ErrorAlert error={error} />;
13
+ return (
14
+ <div className={cn("mx-4 max-w-2xl", className)}>
15
+ <ErrorAlert error={error} />
16
+ </div>
17
+ );
13
18
  }
@@ -1,6 +1,6 @@
1
- import { merge as mergeAllOf } from "allof-merge";
2
1
  import { GraphQLError } from "graphql/error/index.js";
3
2
  import { OpenAPIV3, type OpenAPIV3_1 } from "openapi-types";
3
+ import { flattenAllOfProcessor } from "../../util/flattenAllOf.js";
4
4
  import { dereference, type JSONSchema } from "./dereference/index.js";
5
5
  import { upgradeSchema } from "./upgrade/index.js";
6
6
 
@@ -25,6 +25,8 @@ export type TagObject = DeepOmitReference<OpenAPIV3_1.TagObject>;
25
25
  export type ExampleObject = DeepOmitReference<OpenAPIV3_1.ExampleObject>;
26
26
  export type EncodingObject = DeepOmitReference<OpenAPIV3_1.EncodingObject>;
27
27
  export type SchemaObject = DeepOmitReference<OpenAPIV3_1.SchemaObject>;
28
+ export type ArraySchemaObject =
29
+ DeepOmitReference<OpenAPIV3_1.ArraySchemaObject>;
28
30
  export type ServerObject = DeepOmitReference<OpenAPIV3_1.ServerObject>;
29
31
 
30
32
  export const HttpMethods = Object.values(OpenAPIV3.HttpMethods);
@@ -101,7 +103,12 @@ export const validate = async (schemaInput: unknown) => {
101
103
 
102
104
  const dereferenced = await dereference(schema);
103
105
  const upgraded = upgradeSchema(dereferenced);
104
- const merged = mergeAllOf(upgraded) as OpenAPIDocument;
105
106
 
106
- return merged;
107
+ const flattened = await flattenAllOfProcessor({
108
+ schema: upgraded,
109
+ file: "schema.json",
110
+ dereference: async (schema) => schema,
111
+ });
112
+
113
+ return flattened;
107
114
  };
@@ -11,15 +11,19 @@ export const ProtectedRoute = () => {
11
11
  return null;
12
12
  }
13
13
 
14
+ if (!auth.isAuthEnabled) {
15
+ return (
16
+ <div className="flex flex-col justify-center gap-2 items-center h-1/2">
17
+ <DeveloperHint className="max-w-[600px]">
18
+ Authentication needs to be enabled for API keys to work. Enable it in
19
+ your Zudoku configuration under <code>authentication</code>.
20
+ </DeveloperHint>
21
+ </div>
22
+ );
23
+ }
24
+
14
25
  return auth.isAuthenticated ? (
15
26
  <Outlet />
16
- ) : !auth.isAuthEnabled ? (
17
- <div className="flex flex-col justify-center gap-2 items-center h-1/2">
18
- <DeveloperHint className="max-w-[600px]">
19
- Authentication needs to be enabled for API keys to work. Enable it in
20
- your Zudoku configuration under <code>authentication</code>.
21
- </DeveloperHint>
22
- </div>
23
27
  ) : (
24
28
  <div className="flex flex-col justify-center gap-2 items-center h-1/2">
25
29
  Please login first to view this page
@@ -9,6 +9,10 @@ import {
9
9
  import { cn } from "../../util/cn.js";
10
10
  import useIsomorphicLayoutEffect from "../../util/useIsomorphicLayoutEffect.js";
11
11
 
12
+ export const OverflowOverlay = () => (
13
+ <div className="absolute inset-0 bg-linear-to-b from-transparent to-zinc-50/60 dark:to-zinc-950/90 z-10 transition-all group-hover:to-transparent" />
14
+ );
15
+
12
16
  export const CollapsibleCode = ({
13
17
  children,
14
18
  maxHeight = 250,
@@ -48,9 +52,7 @@ export const CollapsibleCode = ({
48
52
  !open && isOverflowing && "max-h-(--max-height)",
49
53
  )}
50
54
  >
51
- {!open && isOverflowing && (
52
- <div className=" absolute inset-0 bg-gradient-to-b from-transparent to-zinc-50/60 dark:to-zinc-950/90 z-10 transition-all group-hover:to-transparent"></div>
53
- )}
55
+ {!open && isOverflowing && <OverflowOverlay />}
54
56
  <div ref={contentRef}>{children}</div>
55
57
  {!open && isOverflowing && (
56
58
  <CollapsibleTrigger
@@ -0,0 +1,115 @@
1
+ import {
2
+ ChevronDownIcon,
3
+ CopyIcon,
4
+ DownloadIcon,
5
+ ExternalLinkIcon,
6
+ } from "lucide-react";
7
+ import type { MouseEventHandler } from "react";
8
+ import { Button } from "zudoku/components";
9
+ import { ButtonGroup } from "zudoku/ui/ButtonGroup.js";
10
+ import {
11
+ DropdownMenu,
12
+ DropdownMenuContent,
13
+ DropdownMenuItem,
14
+ DropdownMenuTrigger,
15
+ } from "zudoku/ui/DropdownMenu.js";
16
+ import { useCopyToClipboard } from "../../util/useCopyToClipboard.js";
17
+ import { ChatGPTLogo } from "../markdown/assets/ChatGPTLogo.js";
18
+ import { ClaudeLogo } from "../markdown/assets/ClaudeLogo.js";
19
+
20
+ export const DownloadSchemaButton = ({
21
+ downloadUrl,
22
+ }: {
23
+ downloadUrl: string;
24
+ }) => {
25
+ const [, copyToClipboard] = useCopyToClipboard();
26
+
27
+ const handleDownload: MouseEventHandler<HTMLAnchorElement> = async (e) => {
28
+ const isExternal = downloadUrl.includes("://");
29
+
30
+ if (!isExternal) return;
31
+
32
+ e.preventDefault();
33
+ try {
34
+ const response = await fetch(downloadUrl);
35
+ if (!response.ok)
36
+ throw new Error(`Failed to fetch: ${response.statusText}`);
37
+
38
+ const blob = await response.blob();
39
+ const url = window.URL.createObjectURL(blob);
40
+ const a = document.createElement("a");
41
+ a.href = url;
42
+ a.download = downloadUrl.split("/").pop() || "schema.json";
43
+ document.body.appendChild(a);
44
+ a.click();
45
+ document.body.removeChild(a);
46
+ window.URL.revokeObjectURL(url);
47
+ } catch (error) {
48
+ // biome-ignore lint/suspicious/noConsole: Logging error
49
+ console.error("Failed to download schema:", error);
50
+ }
51
+ };
52
+
53
+ return (
54
+ <ButtonGroup>
55
+ <Button
56
+ variant="outline"
57
+ size="sm"
58
+ className="flex items-center gap-1.5"
59
+ asChild
60
+ >
61
+ <a href={downloadUrl} download onClick={handleDownload}>
62
+ <DownloadIcon size={14} />
63
+ Download schema
64
+ </a>
65
+ </Button>
66
+ <DropdownMenu>
67
+ <DropdownMenuTrigger asChild>
68
+ <Button size="sm" variant="outline" className="px-1.5">
69
+ <ChevronDownIcon size={14} />
70
+ </Button>
71
+ </DropdownMenuTrigger>
72
+ <DropdownMenuContent align="end">
73
+ <DropdownMenuItem asChild>
74
+ <a href={downloadUrl} target="_blank" rel="noopener noreferrer">
75
+ <ExternalLinkIcon size={14} />
76
+ Open in new tab
77
+ </a>
78
+ </DropdownMenuItem>
79
+ <DropdownMenuItem
80
+ onClick={async () => {
81
+ const response = await fetch(downloadUrl);
82
+ const schema = await response.text();
83
+ copyToClipboard(schema);
84
+ }}
85
+ >
86
+ <CopyIcon size={14} />
87
+ Copy to clipboard
88
+ </DropdownMenuItem>
89
+ <DropdownMenuItem
90
+ onClick={() => {
91
+ const prompt = encodeURIComponent(
92
+ `Help me understand this API: ${new URL(downloadUrl, window.location.href).href}`,
93
+ );
94
+ window.open(`https://claude.ai/new?q=${prompt}`, "_blank");
95
+ }}
96
+ >
97
+ <ClaudeLogo className="size-4" />
98
+ Use in Claude
99
+ </DropdownMenuItem>
100
+ <DropdownMenuItem
101
+ onClick={() => {
102
+ const prompt = encodeURIComponent(
103
+ `Help me understand this API: ${new URL(downloadUrl, window.location.href).href}`,
104
+ );
105
+ window.open(`https://chatgpt.com/?q=${prompt}`, "_blank");
106
+ }}
107
+ >
108
+ <ChatGPTLogo className="size-4" />
109
+ Use in ChatGPT
110
+ </DropdownMenuItem>
111
+ </DropdownMenuContent>
112
+ </DropdownMenu>
113
+ </ButtonGroup>
114
+ );
115
+ };
@@ -32,7 +32,7 @@ const CopyButton = ({ url }: { url: string }) => {
32
32
  });
33
33
  }}
34
34
  variant="ghost"
35
- size="icon"
35
+ size="icon-xs"
36
36
  >
37
37
  {isCopied ? (
38
38
  <CheckIcon className="text-green-600" size={14} />
@@ -53,40 +53,33 @@ export const Endpoint = () => {
53
53
  );
54
54
 
55
55
  const { servers } = result.data.schema;
56
-
57
56
  const firstServer = servers.at(0);
58
57
 
59
58
  if (!firstServer) return null;
60
59
 
61
- if (servers.length === 1) {
62
- return (
63
- <div className="flex items-center gap-2">
64
- <span className="font-medium text-sm">Endpoint:</span>
60
+ return (
61
+ <div className="flex items-center gap-1.5 flex-nowrap">
62
+ <span className="font-medium text-sm">Endpoint</span>
63
+ {servers.length > 1 ? (
64
+ <SimpleSelect
65
+ className="font-mono text-xs border-input bg-transparent dark:bg-input/30 dark:hover:bg-input/50 py-1.5 max-w-[450px] truncate"
66
+ onChange={(e) =>
67
+ startTransition(() => setSelectedServer(e.target.value))
68
+ }
69
+ value={selectedServer}
70
+ showChevrons={servers.length > 1}
71
+ options={servers.map((server) => ({
72
+ value: server.url,
73
+ label: server.url,
74
+ }))}
75
+ />
76
+ ) : (
65
77
  <InlineCode className="text-xs px-2 py-1.5" selectOnClick>
66
78
  {firstServer.url}
67
79
  </InlineCode>
68
- <CopyButton url={firstServer.url} />
69
- </div>
70
- );
71
- }
72
-
73
- return (
74
- <div className="flex flex-wrap items-center gap-2">
75
- <span className="font-medium text-sm">Endpoint</span>
80
+ )}
76
81
 
77
- <SimpleSelect
78
- className="font-mono text-xs bg-border/50 dark:bg-border/70 py-1.5 max-w-[450px] truncate"
79
- onChange={(e) =>
80
- startTransition(() => setSelectedServer(e.target.value))
81
- }
82
- value={selectedServer}
83
- showChevrons={servers.length > 1}
84
- options={servers.map((server) => ({
85
- value: server.url,
86
- label: server.url,
87
- }))}
88
- />
89
- <CopyButton url={selectedServer} />
82
+ <CopyButton url={servers.length > 1 ? selectedServer : firstServer.url} />
90
83
  </div>
91
84
  );
92
85
  };
@@ -0,0 +1,52 @@
1
+ import { InfoIcon } from "lucide-react";
2
+ import { SyntaxHighlight } from "zudoku/ui/SyntaxHighlight.js";
3
+ import {
4
+ Tooltip,
5
+ TooltipContent,
6
+ TooltipProvider,
7
+ TooltipTrigger,
8
+ } from "zudoku/ui/Tooltip.js";
9
+ import { NonHighlightedCode } from "./components/NonHighlightedCode.js";
10
+ import * as SidecarBox from "./SidecarBox.js";
11
+
12
+ export const GeneratedExampleSidecarBox = ({
13
+ code,
14
+ isOnScreen,
15
+ shouldLazyHighlight,
16
+ }: {
17
+ code: string;
18
+ isOnScreen: boolean;
19
+ shouldLazyHighlight?: boolean;
20
+ }) => {
21
+ return (
22
+ <SidecarBox.Root>
23
+ <SidecarBox.Head className="text-xs flex justify-between items-center">
24
+ <div className="flex items-center gap-1.5">
25
+ <span className="font-medium">Example Request Body</span>
26
+ <TooltipProvider>
27
+ <Tooltip>
28
+ <TooltipTrigger asChild>
29
+ <InfoIcon size={13} />
30
+ </TooltipTrigger>
31
+ <TooltipContent>
32
+ This example is auto-generated from the schema.
33
+ </TooltipContent>
34
+ </Tooltip>
35
+ </TooltipProvider>
36
+ </div>
37
+ </SidecarBox.Head>
38
+ <SidecarBox.Body className="p-0">
39
+ {shouldLazyHighlight && !isOnScreen ? (
40
+ <NonHighlightedCode code={code} />
41
+ ) : (
42
+ <SyntaxHighlight
43
+ embedded
44
+ language="json"
45
+ code={code}
46
+ className="[--scrollbar-color:gray] rounded-none text-xs max-h-[200px]"
47
+ />
48
+ )}
49
+ </SidecarBox.Body>
50
+ </SidecarBox.Root>
51
+ );
52
+ };
@@ -1,11 +1,11 @@
1
1
  import { useMemo } from "react";
2
2
  import { Outlet } from "react-router";
3
- import { joinPath } from "../../util/joinPath.js";
3
+ import { joinUrl } from "../../util/joinUrl.js";
4
4
  import type { GraphQLClient } from "./client/GraphQLClient.js";
5
5
  import { GraphQLProvider } from "./client/GraphQLContext.js";
6
6
  import { OasConfigProvider } from "./context.js";
7
7
  import type { OasPluginConfig } from "./interfaces.js";
8
- import { getVersions } from "./util/getRoutes.js";
8
+ import { getVersionMetadata } from "./util/getRoutes.js";
9
9
 
10
10
  export const OasProvider = ({
11
11
  basePath,
@@ -19,25 +19,38 @@ export const OasProvider = ({
19
19
  client: GraphQLClient;
20
20
  }) => {
21
21
  const value = useMemo(() => {
22
- const versions = getVersions(config);
23
- const firstVersion = Object.values(config.input).at(0);
24
- const input =
25
- config.type === "file"
26
- ? {
27
- type: config.type,
28
- // biome-ignore lint/style/noNonNullAssertion: is guaranteed to be defined
29
- input: version ? config.input[version]! : firstVersion!,
30
- }
31
- : { type: config.type, input: config.input };
22
+ const { versions: availableVersions, labels } = getVersionMetadata(config);
23
+ const currentVersion = version ?? availableVersions.at(0);
24
+
25
+ const versionLinks = Object.fromEntries(
26
+ availableVersions.map((id) => [
27
+ id,
28
+ { path: joinUrl(basePath, id), label: labels[id] ?? id },
29
+ ]),
30
+ );
31
+
32
+ const resolveInput = (): string | (() => Promise<unknown>) => {
33
+ if (!Array.isArray(config.input)) {
34
+ return config.input;
35
+ }
36
+
37
+ const versionConfig = currentVersion
38
+ ? config.input.find((v) => v.path === currentVersion)
39
+ : config.input[0];
40
+
41
+ if (!versionConfig) {
42
+ throw new Error(`No input found for version: ${currentVersion}`);
43
+ }
44
+
45
+ return versionConfig.input;
46
+ };
32
47
 
33
48
  return {
34
49
  config: {
35
50
  ...config,
36
- version: version ?? versions.at(0),
37
- versions: Object.fromEntries(
38
- versions.map((version) => [version, joinPath(basePath, version)]),
39
- ),
40
- ...input,
51
+ version: currentVersion,
52
+ versions: versionLinks,
53
+ input: resolveInput(),
41
54
  },
42
55
  };
43
56
  }, [config, basePath, version]);
@@ -18,9 +18,12 @@ import { CategoryHeading } from "../../components/CategoryHeading.js";
18
18
  import { useApiIdentities } from "../../components/context/ZudokuContext.js";
19
19
  import { Heading } from "../../components/Heading.js";
20
20
  import { Markdown } from "../../components/Markdown.js";
21
+ import { PagefindSearchMeta } from "../../components/PagefindSearchMeta.js";
21
22
  import { Pagination } from "../../components/Pagination.js";
23
+ import { joinUrl } from "../../util/joinUrl.js";
22
24
  import { useCreateQuery } from "./client/useCreateQuery.js";
23
25
  import { useOasConfig } from "./context.js";
26
+ import { DownloadSchemaButton } from "./DownloadSchemaButton.js";
24
27
  import { Endpoint } from "./Endpoint.js";
25
28
  import { graphql } from "./graphql/index.js";
26
29
  import { UNTAGGED_PATH } from "./index.js";
@@ -146,6 +149,8 @@ const OperationsForTagQuery = graphql(/* GraphQL */ `
146
149
  }
147
150
  `);
148
151
 
152
+ const LAZY_OPERATION_LIST_THRESHOLD = 30;
153
+
149
154
  export const OperationList = ({
150
155
  tag,
151
156
  untagged,
@@ -153,7 +158,7 @@ export const OperationList = ({
153
158
  tag?: string;
154
159
  untagged?: boolean;
155
160
  }) => {
156
- const { input, type, versions, version, options } = useOasConfig();
161
+ const { path, input, type, versions, version, options } = useOasConfig();
157
162
  const { tag: tagFromParams } = useParams<"tag">();
158
163
  const query = useCreateQuery(OperationsForTagQuery, {
159
164
  input,
@@ -200,6 +205,10 @@ export const OperationList = ({
200
205
 
201
206
  const { operations, next, prev, description: tagDescription } = schema.tag;
202
207
 
208
+ // Simple heuristic to determine if we should lazy highlight the code
209
+ // This is to avoid the performance issues when there are a lot of operations
210
+ const shouldLazyHighlight = operations.length > LAZY_OPERATION_LIST_THRESHOLD;
211
+
203
212
  // The summary property is preferable here as it is a short description of
204
213
  // the API, whereas the description property is typically longer and supports
205
214
  // commonmark formatting, making it ill-suited for use in the meta description
@@ -238,12 +247,20 @@ export const OperationList = ({
238
247
  const tagTitle = schema.tag.extensions?.["x-displayName"] ?? schema.tag.name;
239
248
  const helmetTitle = [tagTitle, title].filter(Boolean).join(" - ");
240
249
 
250
+ const downloadUrl =
251
+ typeof input === "string"
252
+ ? type === "url"
253
+ ? input
254
+ : joinUrl(path, version, input.split("/").pop())
255
+ : undefined;
256
+
241
257
  return (
242
258
  <div
243
259
  className="pt-(--padding-content-top)"
244
260
  data-pagefind-filter="section:openapi"
245
261
  data-pagefind-meta="section:openapi"
246
262
  >
263
+ <PagefindSearchMeta name="category">{title}</PagefindSearchMeta>
247
264
  <Helmet>
248
265
  {helmetTitle && <title>{helmetTitle}</title>}
249
266
  {metaDescription && (
@@ -256,7 +273,7 @@ export const OperationList = ({
256
273
  className="w-full"
257
274
  defaultOpen={options?.expandApiInformation}
258
275
  >
259
- <div className="flex flex-col gap-y-4 sm:flex-row justify-around items-start sm:items-end">
276
+ <div className="flex flex-col gap-4 sm:flex-row justify-around items-start sm:items-end">
260
277
  <div className="flex flex-col flex-1 gap-2">
261
278
  <CategoryHeading>{title}</CategoryHeading>
262
279
  <Heading
@@ -276,25 +293,32 @@ export const OperationList = ({
276
293
  <Endpoint />
277
294
  </div>
278
295
  <div className="flex flex-col gap-4 sm:items-end">
279
- {showVersions && (
280
- <Select
281
- // biome-ignore lint/style/noNonNullAssertion: is guaranteed to be defined
282
- onValueChange={(version) => navigate(versions[version]!)}
283
- defaultValue={version}
284
- disabled={!hasMultipleVersions}
285
- >
286
- <SelectTrigger className="w-[180px]">
287
- <SelectValue placeholder="Select version" />
288
- </SelectTrigger>
289
- <SelectContent>
290
- {Object.entries(versions).map(([version]) => (
291
- <SelectItem key={version} value={version}>
292
- {version}
293
- </SelectItem>
294
- ))}
295
- </SelectContent>
296
- </Select>
297
- )}
296
+ <div className="flex gap-2 items-center">
297
+ {showVersions && (
298
+ <Select
299
+ onValueChange={(version) =>
300
+ // biome-ignore lint/style/noNonNullAssertion: is guaranteed to be defined
301
+ navigate(versions[version]!.path)
302
+ }
303
+ defaultValue={version}
304
+ disabled={!hasMultipleVersions}
305
+ >
306
+ <SelectTrigger className="w-[180px]" size="sm">
307
+ <SelectValue placeholder="Select version" />
308
+ </SelectTrigger>
309
+ <SelectContent>
310
+ {Object.entries(versions).map(([version, { label }]) => (
311
+ <SelectItem key={version} value={version}>
312
+ {label}
313
+ </SelectItem>
314
+ ))}
315
+ </SelectContent>
316
+ </Select>
317
+ )}
318
+ {options?.schemaDownload?.enabled && downloadUrl && (
319
+ <DownloadSchemaButton downloadUrl={downloadUrl} />
320
+ )}
321
+ </div>
298
322
  {schema.description && (
299
323
  <CollapsibleTrigger className="flex items-center gap-1 text-sm font-medium text-muted-foreground group">
300
324
  <span>API information</span>
@@ -337,6 +361,7 @@ export const OperationList = ({
337
361
  <OperationListItem
338
362
  operationFragment={fragment}
339
363
  globalSelectedServer={globalSelectedServer}
364
+ shouldLazyHighlight={shouldLazyHighlight}
340
365
  />
341
366
  <hr className="my-10" />
342
367
  </div>
@@ -1,8 +1,9 @@
1
- import { VisuallyHidden } from "@radix-ui/react-visually-hidden";
2
1
  import { useState } from "react";
3
2
  import { Badge } from "zudoku/ui/Badge.js";
3
+ import { Separator } from "zudoku/ui/Separator.js";
4
4
  import { Heading } from "../../components/Heading.js";
5
5
  import { Markdown } from "../../components/Markdown.js";
6
+ import { PagefindSearchMeta } from "../../components/PagefindSearchMeta.js";
6
7
  import { cn } from "../../util/cn.js";
7
8
  import { groupBy } from "../../util/groupBy.js";
8
9
  import { renderIf } from "../../util/renderIf.js";
@@ -23,9 +24,11 @@ export type ParameterGroup = (typeof PARAM_GROUPS)[number];
23
24
  export const OperationListItem = ({
24
25
  operationFragment,
25
26
  globalSelectedServer,
27
+ shouldLazyHighlight,
26
28
  }: {
27
29
  operationFragment: FragmentType<typeof OperationsFragment>;
28
30
  globalSelectedServer?: string;
31
+ shouldLazyHighlight?: boolean;
29
32
  }) => {
30
33
  const operation = useFragment(OperationsFragment, operationFragment);
31
34
  const groupedParameters = groupBy(
@@ -118,19 +121,22 @@ export const OperationListItem = ({
118
121
  []
119
122
  ),
120
123
  )}
124
+ {renderIf(operation.requestBody?.content?.at(0)?.schema, () => (
125
+ <Separator className="my-4" />
126
+ ))}
121
127
  {renderIf(
122
128
  operation.requestBody?.content?.at(0)?.schema,
123
129
  (schema) => (
124
- <div className="mt-4 flex flex-col gap-4">
130
+ <div className="flex flex-col gap-4">
125
131
  <Heading
126
132
  level={3}
127
133
  className="capitalize flex items-center gap-2"
128
134
  id={`${operation.slug}/request-body`}
129
135
  >
130
136
  {operation.summary && (
131
- <VisuallyHidden>
137
+ <PagefindSearchMeta>
132
138
  {operation.summary} &rsaquo;{" "}
133
- </VisuallyHidden>
139
+ </PagefindSearchMeta>
134
140
  )}
135
141
  Request Body{" "}
136
142
  {operation.requestBody?.required === false ? (
@@ -143,17 +149,14 @@ export const OperationListItem = ({
143
149
  </div>
144
150
  ),
145
151
  )}
152
+ <Separator className="my-4" />
146
153
  {operation.responses.length > 0 && (
147
154
  <>
148
- <Heading
149
- level={3}
150
- className="capitalize mt-8 pt-8 border-t"
151
- id={`${operation.slug}/responses`}
152
- >
155
+ <Heading level={3} id={`${operation.slug}/responses`}>
153
156
  {operation.summary && (
154
- <VisuallyHidden>
157
+ <PagefindSearchMeta>
155
158
  {operation.summary} &rsaquo;{" "}
156
- </VisuallyHidden>
159
+ </PagefindSearchMeta>
157
160
  )}
158
161
  Responses
159
162
  </Heading>
@@ -170,9 +173,9 @@ export const OperationListItem = ({
170
173
  {renderIf(!options?.disableSidecar && !isMCPEndpoint, () => (
171
174
  <Sidecar
172
175
  selectedResponse={selectedResponse}
173
- onSelectResponse={setSelectedResponse}
174
176
  operation={operation}
175
177
  globalSelectedServer={globalSelectedServer}
178
+ shouldLazyHighlight={shouldLazyHighlight}
176
179
  />
177
180
  ))}
178
181
  </div>