zudoku 0.62.0 → 0.63.1

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 (392) hide show
  1. package/dist/app/entry.server.js +14 -1
  2. package/dist/app/entry.server.js.map +1 -1
  3. package/dist/cli/cli.d.ts +9 -0
  4. package/dist/cli/cli.js +4 -10
  5. package/dist/cli/cli.js.map +1 -1
  6. package/dist/cli/common/version-check.d.ts +2 -0
  7. package/dist/cli/common/version-check.js +58 -0
  8. package/dist/cli/common/version-check.js.map +1 -0
  9. package/dist/config/config.d.ts +3 -0
  10. package/dist/config/validators/InputNavigationSchema.d.ts +64 -4
  11. package/dist/config/validators/icon-types.d.ts +1 -1
  12. package/dist/config/validators/icon-types.js +15 -0
  13. package/dist/config/validators/icon-types.js.map +1 -1
  14. package/dist/config/validators/validate.d.ts +29 -9
  15. package/dist/config/validators/validate.js +22 -0
  16. package/dist/config/validators/validate.js.map +1 -1
  17. package/dist/flat-config.d.ts +21 -2
  18. package/dist/lib/assets/language-icons/c.d.ts +3 -0
  19. package/dist/lib/assets/language-icons/c.js +4 -0
  20. package/dist/lib/assets/language-icons/c.js.map +1 -0
  21. package/dist/lib/assets/language-icons/commonlisp.d.ts +3 -0
  22. package/dist/lib/assets/language-icons/commonlisp.js +4 -0
  23. package/dist/lib/assets/language-icons/commonlisp.js.map +1 -0
  24. package/dist/lib/assets/language-icons/cpp.d.ts +3 -0
  25. package/dist/lib/assets/language-icons/cpp.js +4 -0
  26. package/dist/lib/assets/language-icons/cpp.js.map +1 -0
  27. package/dist/lib/assets/language-icons/dart.d.ts +3 -0
  28. package/dist/lib/assets/language-icons/dart.js +4 -0
  29. package/dist/lib/assets/language-icons/dart.js.map +1 -0
  30. package/dist/lib/assets/language-icons/elixir.d.ts +3 -0
  31. package/dist/lib/assets/language-icons/elixir.js +4 -0
  32. package/dist/lib/assets/language-icons/elixir.js.map +1 -0
  33. package/dist/lib/assets/language-icons/ocaml.d.ts +3 -0
  34. package/dist/lib/assets/language-icons/ocaml.js +4 -0
  35. package/dist/lib/assets/language-icons/ocaml.js.map +1 -0
  36. package/dist/lib/assets/language-icons/powershell.d.ts +3 -0
  37. package/dist/lib/assets/language-icons/powershell.js +4 -0
  38. package/dist/lib/assets/language-icons/powershell.js.map +1 -0
  39. package/dist/lib/assets/language-icons/scala.d.ts +3 -0
  40. package/dist/lib/assets/language-icons/scala.js +4 -0
  41. package/dist/lib/assets/language-icons/scala.js.map +1 -0
  42. package/dist/lib/assets/language-icons/zig.d.ts +3 -0
  43. package/dist/lib/assets/language-icons/zig.js +4 -0
  44. package/dist/lib/assets/language-icons/zig.js.map +1 -0
  45. package/dist/lib/authentication/authentication.d.ts +3 -0
  46. package/dist/lib/authentication/providers/auth0.js +7 -3
  47. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  48. package/dist/lib/components/Heading.js +1 -5
  49. package/dist/lib/components/Heading.js.map +1 -1
  50. package/dist/lib/components/LanguageIcon.js +45 -0
  51. package/dist/lib/components/LanguageIcon.js.map +1 -1
  52. package/dist/lib/components/Main.js +1 -1
  53. package/dist/lib/components/Main.js.map +1 -1
  54. package/dist/lib/components/cache.d.ts +3 -1
  55. package/dist/lib/components/cache.js +3 -5
  56. package/dist/lib/components/cache.js.map +1 -1
  57. package/dist/lib/components/context/ZudokuContext.js +10 -2
  58. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  59. package/dist/lib/components/index.d.ts +1 -2
  60. package/dist/lib/core/ZudokuContext.d.ts +1 -0
  61. package/dist/lib/core/ZudokuContext.js +2 -0
  62. package/dist/lib/core/ZudokuContext.js.map +1 -1
  63. package/dist/lib/hooks/index.d.ts +1 -1
  64. package/dist/lib/oas/graphql/index.js +17 -0
  65. package/dist/lib/oas/graphql/index.js.map +1 -1
  66. package/dist/lib/plugins/markdown/MdxPage.d.ts +2 -1
  67. package/dist/lib/plugins/markdown/MdxPage.js +28 -4
  68. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  69. package/dist/lib/plugins/markdown/assets/ChatGPTLogo.d.ts +2 -0
  70. package/dist/lib/plugins/markdown/assets/ChatGPTLogo.js +3 -0
  71. package/dist/lib/plugins/markdown/assets/ChatGPTLogo.js.map +1 -0
  72. package/dist/lib/plugins/markdown/assets/ClaudeLogo.d.ts +2 -0
  73. package/dist/lib/plugins/markdown/assets/ClaudeLogo.js +3 -0
  74. package/dist/lib/plugins/markdown/assets/ClaudeLogo.js.map +1 -0
  75. package/dist/lib/plugins/markdown/index.d.ts +3 -1
  76. package/dist/lib/plugins/markdown/index.js +1 -1
  77. package/dist/lib/plugins/markdown/index.js.map +1 -1
  78. package/dist/lib/plugins/openapi/OperationList.js +7 -2
  79. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  80. package/dist/lib/plugins/openapi/OperationListItem.d.ts +2 -2
  81. package/dist/lib/plugins/openapi/OperationListItem.js +6 -3
  82. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  83. package/dist/lib/plugins/openapi/Sidecar.d.ts +2 -1
  84. package/dist/lib/plugins/openapi/Sidecar.js +6 -9
  85. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  86. package/dist/lib/plugins/openapi/graphql/fragment-masking.js.map +1 -1
  87. package/dist/lib/plugins/openapi/graphql/gql.d.ts +1 -1
  88. package/dist/lib/plugins/openapi/graphql/gql.js +2 -1
  89. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  90. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +8 -2
  91. package/dist/lib/plugins/openapi/graphql/graphql.js +8 -0
  92. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  93. package/dist/lib/plugins/openapi/index.js +5 -10
  94. package/dist/lib/plugins/openapi/index.js.map +1 -1
  95. package/dist/lib/plugins/openapi/playground/Playground.js +1 -1
  96. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  97. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
  98. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  99. package/dist/lib/shiki.js +9 -0
  100. package/dist/lib/shiki.js.map +1 -1
  101. package/dist/lib/ui/Carousel.js.map +1 -1
  102. package/dist/lib/ui/Dialog.d.ts +12 -18
  103. package/dist/lib/ui/Dialog.js +30 -17
  104. package/dist/lib/ui/Dialog.js.map +1 -1
  105. package/dist/lib/util/pastellize.js +4 -4
  106. package/dist/lib/util/pastellize.js.map +1 -1
  107. package/dist/vite/api/SchemaManager.js.map +1 -1
  108. package/dist/vite/llms.d.ts +12 -0
  109. package/dist/vite/llms.js +66 -0
  110. package/dist/vite/llms.js.map +1 -0
  111. package/dist/vite/plugin-docs.d.ts +9 -0
  112. package/dist/vite/plugin-docs.js +68 -49
  113. package/dist/vite/plugin-docs.js.map +1 -1
  114. package/dist/vite/plugin-markdown-export.d.ts +21 -0
  115. package/dist/vite/plugin-markdown-export.js +141 -0
  116. package/dist/vite/plugin-markdown-export.js.map +1 -0
  117. package/dist/vite/plugin-navigation.js +4 -0
  118. package/dist/vite/plugin-navigation.js.map +1 -1
  119. package/dist/vite/plugin.js +2 -0
  120. package/dist/vite/plugin.js.map +1 -1
  121. package/dist/vite/prerender/prerender.js +30 -0
  122. package/dist/vite/prerender/prerender.js.map +1 -1
  123. package/lib/{Button-DTDRi4CT.js → Button-DmS4u8Lj.js} +2 -2
  124. package/lib/{Button-DTDRi4CT.js.map → Button-DmS4u8Lj.js.map} +1 -1
  125. package/lib/{Card-hTy9PAnh.js → Card-KFniaZn5.js} +2 -2
  126. package/lib/{Card-hTy9PAnh.js.map → Card-KFniaZn5.js.map} +1 -1
  127. package/lib/{CategoryHeading-BGCNu3VK.js → CategoryHeading-DhmodDcq.js} +2 -2
  128. package/lib/{CategoryHeading-BGCNu3VK.js.map → CategoryHeading-DhmodDcq.js.map} +1 -1
  129. package/lib/CodeBlock-CanTUJLl.js +221 -0
  130. package/lib/CodeBlock-CanTUJLl.js.map +1 -0
  131. package/lib/{Command-TEBTONf1.js → Command-CUcrW3qs.js} +3 -3
  132. package/lib/{Command-TEBTONf1.js.map → Command-CUcrW3qs.js.map} +1 -1
  133. package/lib/Dialog-BQciPiHN.js +144 -0
  134. package/lib/Dialog-BQciPiHN.js.map +1 -0
  135. package/lib/{Drawer-DM9wJUC6.js → Drawer-Ci7XwhqT.js} +2 -2
  136. package/lib/Drawer-Ci7XwhqT.js.map +1 -0
  137. package/lib/DropdownMenu-BZ2NKQ3K.js +126 -0
  138. package/lib/DropdownMenu-BZ2NKQ3K.js.map +1 -0
  139. package/lib/{ErrorAlert-xpVkFS_n.js → ErrorAlert-VBJ8aHH7.js} +100 -103
  140. package/lib/ErrorAlert-VBJ8aHH7.js.map +1 -0
  141. package/lib/MdxPage-1xaNI6q_.js +240 -0
  142. package/lib/MdxPage-1xaNI6q_.js.map +1 -0
  143. package/lib/{OAuthErrorPage-DCjFngGS.js → OAuthErrorPage-Du_4sFER.js} +7 -7
  144. package/lib/{OAuthErrorPage-DCjFngGS.js.map → OAuthErrorPage-Du_4sFER.js.map} +1 -1
  145. package/lib/{OasProvider-B6Co-6Vj.js → OasProvider-0xiB5cKH.js} +3 -3
  146. package/lib/{OasProvider-B6Co-6Vj.js.map → OasProvider-0xiB5cKH.js.map} +1 -1
  147. package/lib/{OperationList-uu04Ezta.js → OperationList-BzWKTkNq.js} +1328 -1319
  148. package/lib/OperationList-BzWKTkNq.js.map +1 -0
  149. package/lib/{Pagination-Cdi_qiXc.js → Pagination-DOcPyfy_.js} +3 -3
  150. package/lib/{Pagination-Cdi_qiXc.js.map → Pagination-DOcPyfy_.js.map} +1 -1
  151. package/lib/{RouteGuard-dji1UEYe.js → RouteGuard-Bg0Lu0OU.js} +5 -5
  152. package/lib/{RouteGuard-dji1UEYe.js.map → RouteGuard-Bg0Lu0OU.js.map} +1 -1
  153. package/lib/{RouterError-D1I15Qyy.js → RouterError-fm21cqlj.js} +4 -4
  154. package/lib/{RouterError-D1I15Qyy.js.map → RouterError-fm21cqlj.js.map} +1 -1
  155. package/lib/{SchemaList-BExl5RED.js → SchemaList-Dea2Skqv.js} +10 -10
  156. package/lib/{SchemaList-BExl5RED.js.map → SchemaList-Dea2Skqv.js.map} +1 -1
  157. package/lib/{SchemaView-BYH_AirG.js → SchemaView-H9glU5P7.js} +5 -5
  158. package/lib/{SchemaView-BYH_AirG.js.map → SchemaView-H9glU5P7.js.map} +1 -1
  159. package/lib/{Select-CegS9OKH.js → Select-CPoGZU_V.js} +4 -4
  160. package/lib/{Select-CegS9OKH.js.map → Select-CPoGZU_V.js.map} +1 -1
  161. package/lib/{SignUp-C-YP_Rxi.js → SignUp-DUZ4yUmQ.js} +9 -9
  162. package/lib/{SignUp-C-YP_Rxi.js.map → SignUp-DUZ4yUmQ.js.map} +1 -1
  163. package/lib/{Spinner-Cf6E803I.js → Spinner-CI6bRyZw.js} +2 -2
  164. package/lib/{Spinner-Cf6E803I.js.map → Spinner-CI6bRyZw.js.map} +1 -1
  165. package/lib/{SyntaxHighlight-CPF64UHi.js → SyntaxHighlight-B0laqAqK.js} +6 -6
  166. package/lib/{SyntaxHighlight-CPF64UHi.js.map → SyntaxHighlight-B0laqAqK.js.map} +1 -1
  167. package/lib/{Toc-Cf5UojVb.js → Toc-KzXCRqrX.js} +3 -3
  168. package/lib/{Toc-Cf5UojVb.js.map → Toc-KzXCRqrX.js.map} +1 -1
  169. package/lib/ZudokuContext-BXTZApgy.js +1506 -0
  170. package/lib/ZudokuContext-BXTZApgy.js.map +1 -0
  171. package/lib/c-B-NUhs61.js +46 -0
  172. package/lib/c-B-NUhs61.js.map +1 -0
  173. package/lib/chunk-PVWAREVJ-BO6B-RAk.js.map +1 -1
  174. package/lib/{circular-06Yrxzsw.js → circular-OGtD_zFg.js} +30 -30
  175. package/lib/{circular-06Yrxzsw.js.map → circular-OGtD_zFg.js.map} +1 -1
  176. package/lib/commonlisp-De080z23.js +28 -0
  177. package/lib/commonlisp-De080z23.js.map +1 -0
  178. package/lib/cpp-79Paht7T.js +53 -0
  179. package/lib/cpp-79Paht7T.js.map +1 -0
  180. package/lib/{createServer-BA0aitmR.js → createServer-DyUc5BPr.js} +1120 -1083
  181. package/lib/createServer-DyUc5BPr.js.map +1 -0
  182. package/lib/{csharp-rrJEDRrV.js → csharp-D8MIL50B.js} +2 -2
  183. package/lib/{csharp-rrJEDRrV.js.map → csharp-D8MIL50B.js.map} +1 -1
  184. package/lib/{css-Dpk9bCql.js → css-Bt6hr1td.js} +2 -2
  185. package/lib/{css-Dpk9bCql.js.map → css-Bt6hr1td.js.map} +1 -1
  186. package/lib/dart-B0vy1jWB.js +60 -0
  187. package/lib/dart-B0vy1jWB.js.map +1 -0
  188. package/lib/elixir-Ds8r0sF8.js +25 -0
  189. package/lib/elixir-Ds8r0sF8.js.map +1 -0
  190. package/lib/{errors-ouIp07AW.js → errors-7_i0Oyw4.js} +3 -3
  191. package/lib/{errors-ouIp07AW.js.map → errors-7_i0Oyw4.js.map} +1 -1
  192. package/lib/{go-D8SJIQ0Z.js → go-D2VsmIOS.js} +2 -2
  193. package/lib/{go-D8SJIQ0Z.js.map → go-D2VsmIOS.js.map} +1 -1
  194. package/lib/{graphql-aeVKJNa2.js → graphql-BtA6M4m5.js} +2 -2
  195. package/lib/{graphql-aeVKJNa2.js.map → graphql-BtA6M4m5.js.map} +1 -1
  196. package/lib/hook-CAebs2rv.js +31 -0
  197. package/lib/hook-CAebs2rv.js.map +1 -0
  198. package/lib/{html-D_7om-nA.js → html-MGnI2uzP.js} +2 -2
  199. package/lib/{html-D_7om-nA.js.map → html-MGnI2uzP.js.map} +1 -1
  200. package/lib/{index-DhL3LhWV.js → index-C5L4favO.js} +166 -50
  201. package/lib/index-C5L4favO.js.map +1 -0
  202. package/lib/{index-CVfG8Pb4.js → index-CLJGtw_S.js} +157 -156
  203. package/lib/index-CLJGtw_S.js.map +1 -0
  204. package/lib/index-CrcNWbel.js.map +1 -1
  205. package/lib/{index-BRQDtecD.js → index-PdgTSEkk.js} +779 -896
  206. package/lib/index-PdgTSEkk.js.map +1 -0
  207. package/lib/index.esm-BYObtETB.js +1294 -0
  208. package/lib/index.esm-BYObtETB.js.map +1 -0
  209. package/lib/index.esm-BnYHxCYC.js.map +1 -1
  210. package/lib/{java-DUh-EL8n.js → java-CVLzHfb1.js} +2 -2
  211. package/lib/{java-DUh-EL8n.js.map → java-CVLzHfb1.js.map} +1 -1
  212. package/lib/{javascript-CrY8dcGu.js → javascript-CcmIpL4G.js} +2 -2
  213. package/lib/{javascript-CrY8dcGu.js.map → javascript-CcmIpL4G.js.map} +1 -1
  214. package/lib/{json-DLK2_sdf.js → json-4AyP4uiY.js} +2 -2
  215. package/lib/{json-DLK2_sdf.js.map → json-4AyP4uiY.js.map} +1 -1
  216. package/lib/{jsx-runtime-DywqP_6a.js → jsx-runtime-BzflLqGi.js} +109 -111
  217. package/lib/jsx-runtime-BzflLqGi.js.map +1 -0
  218. package/lib/{kotlin-rJMOGl7D.js → kotlin-v2plddBQ.js} +2 -2
  219. package/lib/{kotlin-rJMOGl7D.js.map → kotlin-v2plddBQ.js.map} +1 -1
  220. package/lib/{markdown-BD9bIU5J.js → markdown-DYGWCmGQ.js} +2 -2
  221. package/lib/{markdown-BD9bIU5J.js.map → markdown-DYGWCmGQ.js.map} +1 -1
  222. package/lib/{mdx-G25UCvf3.js → mdx-CHwYvXd4.js} +2 -2
  223. package/lib/{mdx-G25UCvf3.js.map → mdx-CHwYvXd4.js.map} +1 -1
  224. package/lib/{mutation-De-1gXxl.js → mutation-CdGPxHNX.js} +2 -2
  225. package/lib/{mutation-De-1gXxl.js.map → mutation-CdGPxHNX.js.map} +1 -1
  226. package/lib/{objectivec-DDpj0aWX.js → objectivec-HZY8shkd.js} +2 -2
  227. package/lib/{objectivec-DDpj0aWX.js.map → objectivec-HZY8shkd.js.map} +1 -1
  228. package/lib/ocaml-DqsdDdwb.js +52 -0
  229. package/lib/ocaml-DqsdDdwb.js.map +1 -0
  230. package/lib/{php-BeG18bSy.js → php-rQXzo7K_.js} +2 -2
  231. package/lib/{php-BeG18bSy.js.map → php-rQXzo7K_.js.map} +1 -1
  232. package/lib/powershell-CQje9pm1.js +39 -0
  233. package/lib/powershell-CQje9pm1.js.map +1 -0
  234. package/lib/{python-BaF2byD-.js → python-QIQAE5Ei.js} +2 -2
  235. package/lib/{python-BaF2byD-.js.map → python-QIQAE5Ei.js.map} +1 -1
  236. package/lib/{react-CQvDN20M.js → react-DHpVpxRv.js} +2 -2
  237. package/lib/{react-CQvDN20M.js.map → react-DHpVpxRv.js.map} +1 -1
  238. package/lib/{ruby-CmxRVHMR.js → ruby-B2dU8Ny5.js} +2 -2
  239. package/lib/{ruby-CmxRVHMR.js.map → ruby-B2dU8Ny5.js.map} +1 -1
  240. package/lib/{rust-IfSC62c5.js → rust-DYnLHAi2.js} +2 -2
  241. package/lib/{rust-IfSC62c5.js.map → rust-DYnLHAi2.js.map} +1 -1
  242. package/lib/scala-CeKInBR8.js +25 -0
  243. package/lib/scala-CeKInBR8.js.map +1 -0
  244. package/lib/{shell-BFu0M6m4.js → shell-HUv9oVtp.js} +2 -2
  245. package/lib/{shell-BFu0M6m4.js.map → shell-HUv9oVtp.js.map} +1 -1
  246. package/lib/{swift-DckbsN4v.js → swift-B4z6ig1Z.js} +2 -2
  247. package/lib/{swift-DckbsN4v.js.map → swift-B4z6ig1Z.js.map} +1 -1
  248. package/lib/{toml-BJsCc8TC.js → toml-Co9mpdct.js} +2 -2
  249. package/lib/{toml-BJsCc8TC.js.map → toml-Co9mpdct.js.map} +1 -1
  250. package/lib/{typescript-7qOVMjOC.js → typescript-C26xdBDC.js} +2 -2
  251. package/lib/{typescript-7qOVMjOC.js.map → typescript-C26xdBDC.js.map} +1 -1
  252. package/lib/ui/Accordion.js +1 -1
  253. package/lib/ui/ActionButton.js +3 -3
  254. package/lib/ui/Alert.js +1 -1
  255. package/lib/ui/AlertDialog.js +1 -1
  256. package/lib/ui/Badge.js +1 -1
  257. package/lib/ui/Breadcrumb.js +1 -1
  258. package/lib/ui/Button.js +1 -1
  259. package/lib/ui/Callout.js +1 -1
  260. package/lib/ui/Card.js +1 -1
  261. package/lib/ui/Carousel.js +1 -1
  262. package/lib/ui/Carousel.js.map +1 -1
  263. package/lib/ui/Checkbox.js +1 -1
  264. package/lib/ui/CodeBlock.js +2 -2
  265. package/lib/ui/Command.js +2 -2
  266. package/lib/ui/Dialog.js +135 -105
  267. package/lib/ui/Dialog.js.map +1 -1
  268. package/lib/ui/Drawer.js +2 -2
  269. package/lib/ui/DropdownMenu.js +1 -1
  270. package/lib/ui/EmbeddedCodeBlock.js +1 -1
  271. package/lib/ui/Form.js +2 -2
  272. package/lib/ui/HoverCard.js +1 -1
  273. package/lib/ui/Input.js +1 -1
  274. package/lib/ui/Label.js +1 -1
  275. package/lib/ui/Pagination.js +1 -1
  276. package/lib/ui/Popover.js +1 -1
  277. package/lib/ui/Progress.js +1 -1
  278. package/lib/ui/RadioGroup.js +1 -1
  279. package/lib/ui/ReactComponentDoc.js +1 -1
  280. package/lib/ui/ScrollArea.js +1 -1
  281. package/lib/ui/Secret.js +1 -1
  282. package/lib/ui/Select.js +1 -1
  283. package/lib/ui/Skeleton.js +1 -1
  284. package/lib/ui/Slider.js +1 -1
  285. package/lib/ui/Stepper.js +1 -1
  286. package/lib/ui/Switch.js +1 -1
  287. package/lib/ui/SyntaxHighlight.js +4 -4
  288. package/lib/ui/Tabs.js +1 -1
  289. package/lib/ui/Textarea.js +1 -1
  290. package/lib/ui/Toggle.js +1 -1
  291. package/lib/ui/ToggleGroup.js +1 -1
  292. package/lib/ui/Tooltip.js +1 -1
  293. package/lib/ui/Value.js +1 -1
  294. package/lib/{useExposedProps-B8NHdNRq.js → useExposedProps-Cd7Yg_uG.js} +3 -3
  295. package/lib/useExposedProps-Cd7Yg_uG.js.map +1 -0
  296. package/lib/{xml-DAaTIkBX.js → xml-BQOOC04j.js} +2 -2
  297. package/lib/{xml-DAaTIkBX.js.map → xml-BQOOC04j.js.map} +1 -1
  298. package/lib/{yaml-DUi-dbfu.js → yaml-BGsJItKv.js} +2 -2
  299. package/lib/{yaml-DUi-dbfu.js.map → yaml-BGsJItKv.js.map} +1 -1
  300. package/lib/zig-CUV2sTct.js +35 -0
  301. package/lib/zig-CUV2sTct.js.map +1 -0
  302. package/lib/zudoku.__internal.js +1040 -937
  303. package/lib/zudoku.__internal.js.map +1 -1
  304. package/lib/zudoku.auth-auth0.js +22 -21
  305. package/lib/zudoku.auth-auth0.js.map +1 -1
  306. package/lib/zudoku.auth-azureb2c.js +14 -15
  307. package/lib/zudoku.auth-azureb2c.js.map +1 -1
  308. package/lib/zudoku.auth-clerk.js +3 -3
  309. package/lib/zudoku.auth-openid.js +57 -58
  310. package/lib/zudoku.auth-openid.js.map +1 -1
  311. package/lib/zudoku.auth-supabase.js +2 -2
  312. package/lib/zudoku.components.js +6 -6
  313. package/lib/zudoku.hooks.js +6 -6
  314. package/lib/zudoku.hooks.js.map +1 -1
  315. package/lib/zudoku.icons.js +1 -1
  316. package/lib/zudoku.plugin-api-catalog.js +27 -28
  317. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  318. package/lib/zudoku.plugin-api-keys.js +89 -89
  319. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  320. package/lib/zudoku.plugin-custom-pages.js +1 -1
  321. package/lib/zudoku.plugin-markdown.js +10 -9
  322. package/lib/zudoku.plugin-markdown.js.map +1 -1
  323. package/lib/zudoku.plugin-openapi.js +6 -7
  324. package/lib/zudoku.plugin-openapi.js.map +1 -1
  325. package/lib/zudoku.plugin-search-inkeep.js +1 -1
  326. package/lib/zudoku.plugin-search-pagefind.js +27 -28
  327. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  328. package/lib/zudoku.router.js +1 -1
  329. package/lib/zudoku.router.js.map +1 -1
  330. package/package.json +40 -40
  331. package/src/app/entry.server.tsx +16 -6
  332. package/src/app/main.css +42 -0
  333. package/src/lib/assets/language-icons/c.tsx +31 -0
  334. package/src/lib/assets/language-icons/commonlisp.tsx +22 -0
  335. package/src/lib/assets/language-icons/cpp.tsx +35 -0
  336. package/src/lib/assets/language-icons/dart.tsx +39 -0
  337. package/src/lib/assets/language-icons/elixir.tsx +19 -0
  338. package/src/lib/assets/language-icons/ocaml.tsx +34 -0
  339. package/src/lib/assets/language-icons/powershell.tsx +27 -0
  340. package/src/lib/assets/language-icons/scala.tsx +19 -0
  341. package/src/lib/assets/language-icons/zig.tsx +32 -0
  342. package/src/lib/authentication/authentication.ts +3 -1
  343. package/src/lib/authentication/providers/auth0.tsx +7 -3
  344. package/src/lib/components/Heading.tsx +2 -6
  345. package/src/lib/components/LanguageIcon.tsx +45 -0
  346. package/src/lib/components/Main.tsx +1 -1
  347. package/src/lib/components/cache.ts +9 -5
  348. package/src/lib/components/context/ZudokuContext.ts +11 -2
  349. package/src/lib/core/ZudokuContext.ts +3 -0
  350. package/src/lib/oas/graphql/index.ts +19 -0
  351. package/src/lib/plugins/markdown/MdxPage.tsx +125 -8
  352. package/src/lib/plugins/markdown/assets/ChatGPTLogo.tsx +11 -0
  353. package/src/lib/plugins/markdown/assets/ClaudeLogo.tsx +19 -0
  354. package/src/lib/plugins/markdown/index.tsx +5 -7
  355. package/src/lib/plugins/openapi/OperationList.tsx +9 -2
  356. package/src/lib/plugins/openapi/OperationListItem.tsx +10 -5
  357. package/src/lib/plugins/openapi/Sidecar.tsx +8 -8
  358. package/src/lib/plugins/openapi/graphql/fragment-masking.ts +1 -0
  359. package/src/lib/plugins/openapi/graphql/gql.ts +4 -3
  360. package/src/lib/plugins/openapi/graphql/graphql.ts +20 -3
  361. package/src/lib/plugins/openapi/index.tsx +10 -30
  362. package/src/lib/plugins/openapi/playground/Playground.tsx +1 -1
  363. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
  364. package/src/lib/shiki.ts +9 -0
  365. package/src/lib/ui/Carousel.tsx +0 -1
  366. package/src/lib/ui/Dialog.tsx +112 -106
  367. package/src/lib/util/pastellize.ts +4 -4
  368. package/src/shiki/langs/hurl.js +1 -0
  369. package/src/shiki/langs/kdl.js +1 -0
  370. package/src/shiki/langs/pkl.js +1 -0
  371. package/src/shiki/langs/rosmsg.js +1 -0
  372. package/lib/CodeBlock-i0BM_QFf.js +0 -176
  373. package/lib/CodeBlock-i0BM_QFf.js.map +0 -1
  374. package/lib/Dialog-VIMic7xI.js +0 -114
  375. package/lib/Dialog-VIMic7xI.js.map +0 -1
  376. package/lib/Drawer-DM9wJUC6.js.map +0 -1
  377. package/lib/ErrorAlert-xpVkFS_n.js.map +0 -1
  378. package/lib/MdxPage-Ud1w_GV-.js +0 -111
  379. package/lib/MdxPage-Ud1w_GV-.js.map +0 -1
  380. package/lib/OperationList-uu04Ezta.js.map +0 -1
  381. package/lib/ZudokuContext-BcqSiygJ.js +0 -1294
  382. package/lib/ZudokuContext-BcqSiygJ.js.map +0 -1
  383. package/lib/createServer-BA0aitmR.js.map +0 -1
  384. package/lib/hook-BkLXq8pm.js +0 -243
  385. package/lib/hook-BkLXq8pm.js.map +0 -1
  386. package/lib/index-BRQDtecD.js.map +0 -1
  387. package/lib/index-CVfG8Pb4.js.map +0 -1
  388. package/lib/index-DhL3LhWV.js.map +0 -1
  389. package/lib/index.esm-DpgNxKa2.js +0 -1267
  390. package/lib/index.esm-DpgNxKa2.js.map +0 -1
  391. package/lib/jsx-runtime-DywqP_6a.js.map +0 -1
  392. package/lib/useExposedProps-B8NHdNRq.js.map +0 -1
@@ -27,7 +27,7 @@ export const Main = ({ children }: PropsWithChildren) => {
27
27
  />
28
28
  )}
29
29
  {hasNavigation && (
30
- <div className="lg:hidden -mx-4 px-4 py-2 sticky bg-background/80 backdrop-blur-xs z-10 top-0 start-0 end-0 border-b">
30
+ <div className="lg:hidden m-0 p-0 md:-mx-4 md:px-4 py-2 sticky bg-background/80 backdrop-blur-xs z-10 top-0 start-0 end-0 border-b">
31
31
  <DrawerTrigger className="flex items-center gap-2 px-4">
32
32
  <PanelLeftIcon size={16} strokeWidth={1.5} />
33
33
  <span className="text-sm">Menu</span>
@@ -1,17 +1,21 @@
1
1
  import { useQueryClient } from "@tanstack/react-query";
2
+ import { useCallback } from "react";
2
3
 
3
4
  export const CACHE_KEYS = Object.freeze({
4
5
  API_IDENTITIES: ["api-identities"],
5
6
  });
6
7
 
8
+ type CacheKey = keyof typeof CACHE_KEYS;
9
+
7
10
  export const useCache = () => {
8
11
  const queryClient = useQueryClient();
12
+ const invalidateCache = useCallback(
13
+ (key: CacheKey) =>
14
+ queryClient.invalidateQueries({ queryKey: CACHE_KEYS[key] }),
15
+ [queryClient],
16
+ );
9
17
 
10
- return {
11
- invalidateCache: async (key: keyof typeof CACHE_KEYS) => {
12
- await queryClient.invalidateQueries({ queryKey: CACHE_KEYS[key] });
13
- },
14
- };
18
+ return { invalidateCache };
15
19
  };
16
20
 
17
21
  /**
@@ -1,10 +1,11 @@
1
1
  import { useQuery, useSuspenseQuery } from "@tanstack/react-query";
2
- import { createContext, useContext } from "react";
2
+ import { createContext, useContext, useEffect } from "react";
3
3
  import { matchPath, useLocation } from "react-router";
4
4
  import type { NavigationItem } from "../../../config/validators/NavigationSchema.js";
5
+ import { useAuthState } from "../../authentication/state.js";
5
6
  import type { ZudokuContext } from "../../core/ZudokuContext.js";
6
7
  import { joinUrl } from "../../util/joinUrl.js";
7
- import { CACHE_KEYS } from "../cache.js";
8
+ import { CACHE_KEYS, useCache } from "../cache.js";
8
9
  import { traverseNavigation } from "../navigation/utils.js";
9
10
 
10
11
  export const ZudokuReactContext = createContext<ZudokuContext | undefined>(
@@ -23,6 +24,14 @@ export const useZudoku = () => {
23
24
 
24
25
  export const useApiIdentities = () => {
25
26
  const { getApiIdentities } = useZudoku();
27
+ const { isAuthenticated } = useAuthState();
28
+ const { invalidateCache } = useCache();
29
+
30
+ useEffect(() => {
31
+ if (!isAuthenticated) {
32
+ invalidateCache("API_IDENTITIES");
33
+ }
34
+ }, [isAuthenticated, invalidateCache]);
26
35
 
27
36
  return useQuery({
28
37
  queryFn: getApiIdentities,
@@ -129,6 +129,7 @@ export class ZudokuContext {
129
129
  public meta: ZudokuContextOptions["metadata"];
130
130
  public site: ZudokuContextOptions["site"];
131
131
  public readonly authentication?: ZudokuContextOptions["authentication"];
132
+ public readonly getAuthState: () => AuthState;
132
133
  public readonly queryClient: QueryClient;
133
134
  public readonly options: ZudokuContextOptions;
134
135
  private readonly navigationPlugins: NavigationPlugin[];
@@ -156,6 +157,8 @@ export class ZudokuContext {
156
157
  this.navigation = options.navigation ?? [];
157
158
  this.navigationPlugins = this.plugins.filter(isNavigationPlugin);
158
159
  this.authentication = this.plugins.find(isAuthenticationPlugin);
160
+ this.getAuthState = useAuthState.getState;
161
+
159
162
  this.meta = options.metadata;
160
163
  this.site = options.site;
161
164
  this.plugins.forEach((plugin) => {
@@ -192,11 +192,21 @@ export const getAllOperations = (
192
192
  ...operationParameters,
193
193
  ];
194
194
 
195
+ // servers follow the OpenAPI 3.0 resolution hierarchy:
196
+ // 1. Operation-level servers (highest precedence)
197
+ // 2. Path-level servers
198
+ // 3. Global servers (handled at query time, lowest precedence)
199
+ const pathServers = value.servers ?? [];
200
+ const operationServers = operation.servers ?? [];
201
+ const servers =
202
+ operationServers.length > 0 ? operationServers : pathServers;
203
+
195
204
  return {
196
205
  ...operation,
197
206
  method,
198
207
  path,
199
208
  parameters,
209
+ servers,
200
210
  tags: operation.tags ?? [],
201
211
  } satisfies GraphQLOperationObject;
202
212
  }),
@@ -440,6 +450,15 @@ const OperationItem = builder
440
450
  type: [ParameterItem],
441
451
  nullable: true,
442
452
  }),
453
+ servers: t.field({
454
+ type: [ServerItem],
455
+ resolve: (parent, _, ctx) => {
456
+ // Return operation/path-level servers if defined, otherwise fall back to global servers
457
+ return parent.servers && parent.servers.length > 0
458
+ ? parent.servers
459
+ : (ctx.schema.servers ?? []);
460
+ },
461
+ }),
443
462
  requestBody: t.field({
444
463
  type: RequestBodyObject,
445
464
  resolve: (parent) => ({
@@ -1,9 +1,23 @@
1
1
  import { useMDXComponents } from "@mdx-js/react";
2
2
  import slugify from "@sindresorhus/slugify";
3
3
  import { Helmet } from "@zudoku/react-helmet-async";
4
- import { EditIcon } from "lucide-react";
5
- import { type PropsWithChildren, useEffect } from "react";
4
+ import {
5
+ CheckIcon,
6
+ ChevronDownIcon,
7
+ CopyIcon,
8
+ EditIcon,
9
+ ExternalLinkIcon,
10
+ Link2Icon,
11
+ } from "lucide-react";
12
+ import { type PropsWithChildren, useEffect, useState } from "react";
13
+ import { useLocation } from "react-router";
6
14
  import { Button } from "zudoku/ui/Button.js";
15
+ import {
16
+ DropdownMenu,
17
+ DropdownMenuContent,
18
+ DropdownMenuItem,
19
+ DropdownMenuTrigger,
20
+ } from "zudoku/ui/DropdownMenu.js";
7
21
  import { CategoryHeading } from "../../components/CategoryHeading.js";
8
22
  import { Heading } from "../../components/Heading.js";
9
23
  import { Toc } from "../../components/navigation/Toc.js";
@@ -13,7 +27,10 @@ import {
13
27
  } from "../../components/navigation/utils.js";
14
28
  import { Pagination } from "../../components/Pagination.js";
15
29
  import { Typography } from "../../components/Typography.js";
30
+ import { joinUrl } from "../../util/joinUrl.js";
16
31
  import type { MdxComponentsType } from "../../util/MdxComponents.js";
32
+ import { ChatGPTLogo } from "./assets/ChatGPTLogo.js";
33
+ import { ClaudeLogo } from "./assets/ClaudeLogo.js";
17
34
  import type { MarkdownPluginDefaultOptions, MDXImport } from "./index.js";
18
35
 
19
36
  declare global {
@@ -39,6 +56,7 @@ const MarkdownHeadings = {
39
56
 
40
57
  export const MdxPage = ({
41
58
  mdxComponent: MdxComponent,
59
+ basePath,
42
60
  frontmatter = {},
43
61
  defaultOptions,
44
62
  __filepath,
@@ -46,11 +64,14 @@ export const MdxPage = ({
46
64
  excerpt,
47
65
  }: PropsWithChildren<
48
66
  Omit<MDXImport, "default"> & {
67
+ basePath: string;
49
68
  mdxComponent: MDXImport["default"];
50
69
  defaultOptions?: MarkdownPluginDefaultOptions;
51
70
  }
52
71
  >) => {
53
72
  const categoryTitle = useCurrentItem()?.categoryLabel;
73
+ const location = useLocation();
74
+ const [isCopied, setIsCopied] = useState(false);
54
75
 
55
76
  const title = frontmatter.title;
56
77
  const description = frontmatter.description ?? excerpt;
@@ -80,6 +101,20 @@ export const MdxPage = ({
80
101
  : null;
81
102
  const editText = editConfig ? editConfig.text || "Edit this page" : null;
82
103
 
104
+ const copyMarkdownConfig =
105
+ frontmatter.copyPage !== false && defaultOptions?.copyPage !== false;
106
+
107
+ const markdownUrl = joinUrl(basePath, `${location.pathname}.md`);
108
+
109
+ const handleCopyMarkdown = async () => {
110
+ const response = await fetch(markdownUrl);
111
+ if (!response.ok) throw new Error("Failed to fetch markdown");
112
+ const markdown = await response.text();
113
+ void navigator.clipboard.writeText(markdown);
114
+ setIsCopied(true);
115
+ setTimeout(() => setIsCopied(false), 2000);
116
+ };
117
+
83
118
  const tocEntries =
84
119
  tableOfContents.find((item) => item.depth === 1)?.children ??
85
120
  // if `title` is provided by frontmatter it does not appear in the table of contents
@@ -115,15 +150,97 @@ export const MdxPage = ({
115
150
  </Helmet>
116
151
  <Typography className="max-w-full xl:w-full xl:max-w-3xl flex-1 shrink pt-(--padding-content-top)">
117
152
  {(category || title) && (
118
- <header>
119
- {category && <CategoryHeading>{category}</CategoryHeading>}
120
- {title && (
121
- <Heading level={1} id={slugify(title)}>
122
- {title}
123
- </Heading>
153
+ <header className="flex items-start justify-between gap-4">
154
+ <div className="flex-1">
155
+ {category && <CategoryHeading>{category}</CategoryHeading>}
156
+ {title && (
157
+ <Heading level={1} id={slugify(title)}>
158
+ {title}
159
+ </Heading>
160
+ )}
161
+ </div>
162
+ {copyMarkdownConfig && (
163
+ <div className="flex items-center border rounded-md">
164
+ <Button
165
+ variant="ghost"
166
+ size="sm"
167
+ onClick={handleCopyMarkdown}
168
+ className="rounded-r-none border-r gap-2 h-7"
169
+ >
170
+ {isCopied ? (
171
+ <CheckIcon size={14} className="text-emerald-600" />
172
+ ) : (
173
+ <CopyIcon size={14} />
174
+ )}
175
+ <span>Copy page</span>
176
+ </Button>
177
+ <DropdownMenu>
178
+ <DropdownMenuTrigger asChild>
179
+ <Button
180
+ variant="ghost"
181
+ size="icon-xs"
182
+ className="rounded-l-none"
183
+ >
184
+ <ChevronDownIcon size={14} />
185
+ </Button>
186
+ </DropdownMenuTrigger>
187
+ <DropdownMenuContent align="end">
188
+ <DropdownMenuItem
189
+ className="gap-2"
190
+ onClick={() =>
191
+ void navigator.clipboard.writeText(window.location.href)
192
+ }
193
+ >
194
+ <Link2Icon className="size-4" />
195
+ Copy link to page
196
+ </DropdownMenuItem>
197
+ <DropdownMenuItem className="gap-2" asChild>
198
+ <a
199
+ href={markdownUrl}
200
+ target="_blank"
201
+ rel="noopener noreferrer"
202
+ >
203
+ <ExternalLinkIcon className="size-4" />
204
+ Open Markdown page
205
+ </a>
206
+ </DropdownMenuItem>
207
+ <DropdownMenuItem
208
+ className="gap-2"
209
+ onClick={() => {
210
+ const prompt = encodeURIComponent(
211
+ `Help me understand this documentation page: ${window.location.href}`,
212
+ );
213
+ window.open(
214
+ `https://claude.ai/new?q=${prompt}`,
215
+ "_blank",
216
+ );
217
+ }}
218
+ >
219
+ <ClaudeLogo className="size-4" />
220
+ Open in Claude
221
+ </DropdownMenuItem>
222
+ <DropdownMenuItem
223
+ className="gap-2"
224
+ onClick={() => {
225
+ const prompt = encodeURIComponent(
226
+ `Help me understand this documentation page: ${window.location.href}`,
227
+ );
228
+ window.open(
229
+ `https://chatgpt.com/?q=${prompt}`,
230
+ "_blank",
231
+ );
232
+ }}
233
+ >
234
+ <ChatGPTLogo className="size-4" />
235
+ Open in ChatGPT
236
+ </DropdownMenuItem>
237
+ </DropdownMenuContent>
238
+ </DropdownMenu>
239
+ </div>
124
240
  )}
125
241
  </header>
126
242
  )}
243
+
127
244
  <MdxComponent
128
245
  components={{ ...useMDXComponents(), ...MarkdownHeadings }}
129
246
  />
@@ -0,0 +1,11 @@
1
+ import type { SVGProps } from "react";
2
+
3
+ export const ChatGPTLogo = (props: SVGProps<SVGSVGElement>) => (
4
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 320" {...props}>
5
+ <title>ChatGPT</title>
6
+ <path
7
+ fill="currentColor"
8
+ d="M297.06 130.97a79.712 79.712 0 0 0-6.85-65.48c-17.46-30.4-52.56-46.04-86.84-38.68A79.747 79.747 0 0 0 143.24 0C108.2-.08 77.11 22.48 66.33 55.82a79.754 79.754 0 0 0-53.31 38.67c-17.59 30.32-13.58 68.54 9.92 94.54a79.712 79.712 0 0 0 6.85 65.48c17.46 30.4 52.56 46.04 86.84 38.68a79.687 79.687 0 0 0 60.13 26.8c35.06.09 66.16-22.49 76.94-55.86a79.754 79.754 0 0 0 53.31-38.67c17.57-30.32 13.55-68.51-9.94-94.51zM176.78 299.08a59.77 59.77 0 0 1-38.39-13.88c.49-.26 1.34-.73 1.89-1.07l63.72-36.8a10.36 10.36 0 0 0 5.24-9.07v-89.83l26.93 15.55c.29.14.48.42.52.74v74.39c-.04 33.08-26.83 59.9-59.91 59.97zM47.94 244.05a59.71 59.71 0 0 1-7.15-40.18c.47.28 1.3.79 1.89 1.13l63.72 36.8c3.23 1.89 7.23 1.89 10.47 0l77.79-44.92v31.1c.02.32-.13.63-.38.83L129.87 266c-28.69 16.52-65.33 6.7-81.92-21.95zM31.17 104.96c7-12.16 18.05-21.46 31.21-26.29 0 .55-.03 1.52-.03 2.2v73.61c-.02 3.74 1.98 7.21 5.23 9.06l77.79 44.91L118.44 224c-.27.18-.61.21-.91.08l-64.42-37.22c-28.63-16.58-38.45-53.21-21.95-81.89zm221.26 51.49-77.79-44.92 26.93-15.54c.27-.18.61-.21.91-.08l64.42 37.19c28.68 16.57 38.51 53.26 21.94 81.94a59.94 59.94 0 0 1-31.2 26.28v-75.81c.03-3.74-1.96-7.2-5.2-9.06zm26.8-40.34c-.47-.29-1.3-.79-1.89-1.13l-63.72-36.8a10.375 10.375 0 0 0-10.47 0l-77.79 44.92V92c-.02-.32.13-.63.38-.83l64.41-37.16c28.69-16.55 65.37-6.7 81.91 22a59.95 59.95 0 0 1 7.15 40.1zm-168.51 55.43-26.94-15.55a.943.943 0 0 1-.52-.74V80.86c.02-33.12 26.89-59.96 60.01-59.94 14.01 0 27.57 4.92 38.34 13.88-.49.26-1.33.73-1.89 1.07L116 72.67a10.344 10.344 0 0 0-5.24 9.06l-.04 89.79zM125.35 140 160 119.99l34.65 20V180L160 200l-34.65-20z"
9
+ />
10
+ </svg>
11
+ );
@@ -0,0 +1,19 @@
1
+ import type { SVGProps } from "react";
2
+
3
+ export const ClaudeLogo = (props: SVGProps<SVGSVGElement>) => (
4
+ <svg
5
+ xmlns="http://www.w3.org/2000/svg"
6
+ width="1em"
7
+ height="1em"
8
+ fill="currentColor"
9
+ fillRule="evenodd"
10
+ viewBox="0 0 24 24"
11
+ {...props}
12
+ >
13
+ <title>Claude</title>
14
+ <path
15
+ fill="#D97757"
16
+ d="m4.709 15.955 4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 0 1-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312z"
17
+ />
18
+ </svg>
19
+ );
@@ -5,11 +5,12 @@ import type { ZudokuDocsConfig } from "../../../config/validators/validate.js";
5
5
  import type { ZudokuPlugin } from "../../core/plugins.js";
6
6
 
7
7
  export interface MarkdownPluginOptions extends ZudokuDocsConfig {
8
+ basePath: string;
8
9
  fileImports: Record<string, () => Promise<MDXImport>>;
9
10
  }
10
11
  export type MarkdownPluginDefaultOptions = Pick<
11
12
  Frontmatter,
12
- "toc" | "disablePager" | "showLastModified" | "suggestEdit"
13
+ "toc" | "disablePager" | "showLastModified" | "suggestEdit" | "copyPage"
13
14
  >;
14
15
 
15
16
  export type Frontmatter = {
@@ -21,12 +22,8 @@ export type Frontmatter = {
21
22
  disable_pager?: boolean;
22
23
  showLastModified?: boolean;
23
24
  lastModifiedTime?: number;
24
- suggestEdit?:
25
- | {
26
- url: string;
27
- text?: string;
28
- }
29
- | false;
25
+ suggestEdit?: { url: string; text?: string } | false;
26
+ copyPage?: boolean;
30
27
  };
31
28
 
32
29
  export type MDXImport = {
@@ -50,6 +47,7 @@ export const markdownPlugin = (
50
47
  return {
51
48
  element: (
52
49
  <MdxPage
50
+ basePath={options.basePath}
53
51
  mdxComponent={Component}
54
52
  {...props}
55
53
  defaultOptions={options.defaultOptions}
@@ -39,6 +39,10 @@ export const OperationsFragment = graphql(/* GraphQL */ `
39
39
  path
40
40
  deprecated
41
41
  extensions
42
+ servers {
43
+ url
44
+ description
45
+ }
42
46
  parameters {
43
47
  name
44
48
  in
@@ -161,7 +165,10 @@ export const OperationList = ({
161
165
  const {
162
166
  data: { schema },
163
167
  } = result;
164
- const { selectedServer } = useSelectedServer(schema.servers);
168
+ // Global server selection for the dropdown UI
169
+ const { selectedServer: globalSelectedServer } = useSelectedServer(
170
+ schema.servers,
171
+ );
165
172
  const title = schema.title;
166
173
  const summary = schema.summary;
167
174
  const description = schema.description;
@@ -328,8 +335,8 @@ export const OperationList = ({
328
335
  {operations.map((fragment) => (
329
336
  <div key={fragment.slug}>
330
337
  <OperationListItem
331
- serverUrl={selectedServer}
332
338
  operationFragment={fragment}
339
+ globalSelectedServer={globalSelectedServer}
333
340
  />
334
341
  <hr className="my-10" />
335
342
  </div>
@@ -22,10 +22,10 @@ export type ParameterGroup = (typeof PARAM_GROUPS)[number];
22
22
 
23
23
  export const OperationListItem = ({
24
24
  operationFragment,
25
- serverUrl,
25
+ globalSelectedServer,
26
26
  }: {
27
27
  operationFragment: FragmentType<typeof OperationsFragment>;
28
- serverUrl?: string;
28
+ globalSelectedServer?: string;
29
29
  }) => {
30
30
  const operation = useFragment(OperationsFragment, operationFragment);
31
31
  const groupedParameters = groupBy(
@@ -34,6 +34,10 @@ export const OperationListItem = ({
34
34
  );
35
35
  const { options } = useOasConfig();
36
36
 
37
+ // Manual server selection takes precedence over the server hierarchy.
38
+ // If no manual selection, fall back to operation's first server (already respects operation > path > global hierarchy)
39
+ const displayServerUrl = globalSelectedServer || operation.servers.at(0)?.url;
40
+
37
41
  const first = operation.responses.at(0);
38
42
  const [selectedResponse, setSelectedResponse] = useState(first?.statusCode);
39
43
  const isMCPEndpoint = operation.extensions?.["x-mcp-server"] !== undefined;
@@ -66,9 +70,9 @@ export const OperationListItem = ({
66
70
  {operation.method.toUpperCase()}
67
71
  </span>
68
72
  <SelectOnClick className="max-w-full truncate flex cursor-pointer">
69
- {serverUrl && (
73
+ {displayServerUrl && (
70
74
  <div className="text-neutral-400 dark:text-neutral-500 truncate">
71
- {serverUrl.replace(/\/$/, "")}
75
+ {displayServerUrl.replace(/\/$/, "")}
72
76
  </div>
73
77
  )}
74
78
  <div className="text-neutral-900 dark:text-neutral-200">
@@ -81,7 +85,7 @@ export const OperationListItem = ({
81
85
  {isMCPEndpoint ? (
82
86
  <div className="col-span-full">
83
87
  <MCPEndpoint
84
- serverUrl={serverUrl}
88
+ serverUrl={displayServerUrl}
85
89
  summary={operation.summary ?? undefined}
86
90
  data={operation.extensions?.["x-mcp-server"]}
87
91
  />
@@ -168,6 +172,7 @@ export const OperationListItem = ({
168
172
  selectedResponse={selectedResponse}
169
173
  onSelectResponse={setSelectedResponse}
170
174
  operation={operation}
175
+ globalSelectedServer={globalSelectedServer}
171
176
  />
172
177
  ))}
173
178
  </div>
@@ -1,4 +1,3 @@
1
- import { useSuspenseQuery } from "@tanstack/react-query";
2
1
  import { useMemo, useState, useTransition } from "react";
3
2
  import { useSearchParams } from "react-router";
4
3
  import { useZudoku } from "zudoku/hooks";
@@ -10,7 +9,6 @@ import { cn } from "../../util/cn.js";
10
9
  import { useOnScreen } from "../../util/useOnScreen.js";
11
10
  import { CollapsibleCode } from "./CollapsibleCode.js";
12
11
  import { ColorizedParam } from "./ColorizedParam.js";
13
- import { useCreateQuery } from "./client/useCreateQuery.js";
14
12
  import { useOasConfig } from "./context.js";
15
13
  import type { OperationsFragmentFragment } from "./graphql/graphql.js";
16
14
  import { graphql } from "./graphql/index.js";
@@ -19,7 +17,6 @@ import { RequestBodySidecarBox } from "./RequestBodySidecarBox.js";
19
17
  import { ResponsesSidecarBox } from "./ResponsesSidecarBox.js";
20
18
  import * as SidecarBox from "./SidecarBox.js";
21
19
  import { SimpleSelect } from "./SimpleSelect.js";
22
- import { useSelectedServer } from "./state.js";
23
20
  import { createHttpSnippet, getConverted } from "./util/createHttpSnippet.js";
24
21
  import { generateSchemaExample } from "./util/generateSchemaExample.js";
25
22
  import { methodForColor } from "./util/methodToColor.js";
@@ -53,15 +50,15 @@ export const Sidecar = ({
53
50
  operation,
54
51
  selectedResponse,
55
52
  onSelectResponse,
53
+ globalSelectedServer,
56
54
  }: {
57
55
  operation: OperationsFragmentFragment;
58
56
  selectedResponse?: string;
59
57
  onSelectResponse: (response: string) => void;
58
+ globalSelectedServer?: string;
60
59
  }) => {
61
- const { input, type, options } = useOasConfig();
60
+ const { options } = useOasConfig();
62
61
  const auth = useAuthState();
63
- const query = useCreateQuery(GetServerQuery, { input, type });
64
- const result = useSuspenseQuery(query);
65
62
  const context = useZudoku();
66
63
 
67
64
  const methodTextColor = methodForColor(operation.method);
@@ -102,7 +99,10 @@ export const Sidecar = ({
102
99
  />
103
100
  );
104
101
 
105
- const { selectedServer } = useSelectedServer(result.data.schema.servers);
102
+ // Manual server selection takes precedence over the server hierarchy.
103
+ // If no manual selection, fall back to operation's first server (already respects operation > path > global hierarchy)
104
+ const selectedServer =
105
+ globalSelectedServer || operation.servers.at(0)?.url || "";
106
106
 
107
107
  const code = useMemo(() => {
108
108
  const exampleBody =
@@ -159,7 +159,7 @@ export const Sidecar = ({
159
159
  </span>
160
160
  {showPlayground && (
161
161
  <PlaygroundDialogWrapper
162
- servers={result.data.schema.servers.map((server) => server.url)}
162
+ servers={operation.servers.map((server) => server.url)}
163
163
  operation={operation}
164
164
  examples={requestBodyContent ?? undefined}
165
165
  />
@@ -1,3 +1,4 @@
1
+ /* eslint-disable */
1
2
  import type {
2
3
  ResultOf,
3
4
  DocumentTypeDecoration,
@@ -1,3 +1,4 @@
1
+ /* eslint-disable */
1
2
  import * as types from "./graphql.js";
2
3
 
3
4
  /**
@@ -13,7 +14,7 @@ import * as types from "./graphql.js";
13
14
  */
14
15
  type Documents = {
15
16
  "\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": typeof types.ServersQueryDocument;
16
- "\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n deprecated\n extensions\n parameters {\n name\n in\n description\n required\n schema\n style\n explode\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n examples {\n name\n description\n externalValue\n value\n summary\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n examples {\n name\n description\n externalValue\n value\n summary\n }\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n": typeof types.OperationsFragmentFragmentDoc;
17
+ "\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n deprecated\n extensions\n servers {\n url\n description\n }\n parameters {\n name\n in\n description\n required\n schema\n style\n explode\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n examples {\n name\n description\n externalValue\n value\n summary\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n examples {\n name\n description\n externalValue\n value\n summary\n }\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n": typeof types.OperationsFragmentFragmentDoc;
17
18
  "\n query SchemaWarmup($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n openapi\n }\n }\n": typeof types.SchemaWarmupDocument;
18
19
  "\n query OperationsForTag(\n $input: JSON!\n $type: SchemaType!\n $tag: String\n $untagged: Boolean\n ) {\n schema(input: $input, type: $type) {\n servers {\n url\n }\n description\n summary\n title\n url\n version\n tag(slug: $tag, untagged: $untagged) {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n extensions\n next {\n name\n slug\n extensions\n }\n prev {\n name\n slug\n extensions\n }\n }\n }\n }\n": typeof types.OperationsForTagDocument;
19
20
  "\n query GetSchemas($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n title\n description\n summary\n components {\n schemas {\n name\n schema\n extensions\n }\n }\n }\n }\n": typeof types.GetSchemasDocument;
@@ -23,7 +24,7 @@ type Documents = {
23
24
  const documents: Documents = {
24
25
  "\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n":
25
26
  types.ServersQueryDocument,
26
- "\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n deprecated\n extensions\n parameters {\n name\n in\n description\n required\n schema\n style\n explode\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n examples {\n name\n description\n externalValue\n value\n summary\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n examples {\n name\n description\n externalValue\n value\n summary\n }\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n":
27
+ "\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n deprecated\n extensions\n servers {\n url\n description\n }\n parameters {\n name\n in\n description\n required\n schema\n style\n explode\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n examples {\n name\n description\n externalValue\n value\n summary\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n examples {\n name\n description\n externalValue\n value\n summary\n }\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n":
27
28
  types.OperationsFragmentFragmentDoc,
28
29
  "\n query SchemaWarmup($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n openapi\n }\n }\n":
29
30
  types.SchemaWarmupDocument,
@@ -47,7 +48,7 @@ export function graphql(
47
48
  * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
48
49
  */
49
50
  export function graphql(
50
- source: "\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n deprecated\n extensions\n parameters {\n name\n in\n description\n required\n schema\n style\n explode\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n examples {\n name\n description\n externalValue\n value\n summary\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n examples {\n name\n description\n externalValue\n value\n summary\n }\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n",
51
+ source: "\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n deprecated\n extensions\n servers {\n url\n description\n }\n parameters {\n name\n in\n description\n required\n schema\n style\n explode\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n examples {\n name\n description\n externalValue\n value\n summary\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n examples {\n name\n description\n externalValue\n value\n summary\n }\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n",
51
52
  ): typeof import("./graphql.js").OperationsFragmentFragmentDoc;
52
53
  /**
53
54
  * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
@@ -1,6 +1,7 @@
1
+ /* eslint-disable */
1
2
  import type { DocumentTypeDecoration } from "@graphql-typed-document-node/core";
2
3
  export type Maybe<T> = T | null;
3
- export type InputMaybe<T> = Maybe<T>;
4
+ export type InputMaybe<T> = T | null | undefined;
4
5
  export type Exact<T extends { [key: string]: unknown }> = {
5
6
  [K in keyof T]: T[K];
6
7
  };
@@ -78,6 +79,7 @@ export type OperationItem = {
78
79
  path: Scalars["String"]["output"];
79
80
  requestBody?: Maybe<RequestBodyObject>;
80
81
  responses: Array<ResponseItem>;
82
+ servers: Array<Server>;
81
83
  slug: Scalars["String"]["output"];
82
84
  summary?: Maybe<Scalars["String"]["output"]>;
83
85
  tags?: Maybe<Array<TagItem>>;
@@ -224,6 +226,11 @@ export type OperationsFragmentFragment = {
224
226
  path: string;
225
227
  deprecated?: boolean | null;
226
228
  extensions?: any | null;
229
+ servers: Array<{
230
+ __typename?: "Server";
231
+ url: string;
232
+ description?: string | null;
233
+ }>;
227
234
  parameters?: Array<{
228
235
  __typename?: "ParameterItem";
229
236
  name: string;
@@ -411,7 +418,9 @@ export class TypedDocumentString<TResult, TVariables>
411
418
  extends String
412
419
  implements DocumentTypeDecoration<TResult, TVariables>
413
420
  {
414
- __apiType?: DocumentTypeDecoration<TResult, TVariables>["__apiType"];
421
+ __apiType?: NonNullable<
422
+ DocumentTypeDecoration<TResult, TVariables>["__apiType"]
423
+ >;
415
424
  private value: string;
416
425
  public __meta__?: Record<string, any> | undefined;
417
426
 
@@ -421,7 +430,7 @@ export class TypedDocumentString<TResult, TVariables>
421
430
  this.__meta__ = __meta__;
422
431
  }
423
432
 
424
- toString(): string & DocumentTypeDecoration<TResult, TVariables> {
433
+ override toString(): string & DocumentTypeDecoration<TResult, TVariables> {
425
434
  return this.value;
426
435
  }
427
436
  }
@@ -437,6 +446,10 @@ export const OperationsFragmentFragmentDoc = new TypedDocumentString(
437
446
  path
438
447
  deprecated
439
448
  extensions
449
+ servers {
450
+ url
451
+ description
452
+ }
440
453
  parameters {
441
454
  name
442
455
  in
@@ -559,6 +572,10 @@ export const OperationsForTagDocument = new TypedDocumentString(`
559
572
  path
560
573
  deprecated
561
574
  extensions
575
+ servers {
576
+ url
577
+ description
578
+ }
562
579
  parameters {
563
580
  name
564
581
  in