zudoku 0.0.0-fd0986c → 0.0.0-fdf886de

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 (407) hide show
  1. package/dist/app/demo.js +1 -1
  2. package/dist/app/entry.client.js +1 -1
  3. package/dist/app/entry.server.js +1 -1
  4. package/dist/app/main.d.ts +1 -1
  5. package/dist/app/main.js +12 -6
  6. package/dist/app/main.js.map +1 -1
  7. package/dist/app/standalone.js +1 -1
  8. package/dist/config/config.d.ts +1 -0
  9. package/dist/config/validators/InputNavigationSchema.d.ts +251 -156
  10. package/dist/config/validators/InputNavigationSchema.js +5 -4
  11. package/dist/config/validators/InputNavigationSchema.js.map +1 -1
  12. package/dist/config/validators/InputNavigationSchema.test-d.js +0 -1
  13. package/dist/config/validators/InputNavigationSchema.test-d.js.map +1 -1
  14. package/dist/config/validators/NavigationSchema.js +6 -3
  15. package/dist/config/validators/NavigationSchema.js.map +1 -1
  16. package/dist/config/validators/ProtectedRoutesSchema.d.ts +13 -0
  17. package/dist/config/validators/ProtectedRoutesSchema.js +10 -0
  18. package/dist/config/validators/ProtectedRoutesSchema.js.map +1 -0
  19. package/dist/config/validators/icon-types.d.ts +1 -1
  20. package/dist/config/validators/icon-types.js +16 -0
  21. package/dist/config/validators/icon-types.js.map +1 -1
  22. package/dist/config/validators/validate.d.ts +44 -30
  23. package/dist/config/validators/validate.js +8 -2
  24. package/dist/config/validators/validate.js.map +1 -1
  25. package/dist/flat-config.d.ts +11 -7
  26. package/dist/index.d.ts +1 -0
  27. package/dist/index.js +1 -0
  28. package/dist/index.js.map +1 -1
  29. package/dist/lib/authentication/components/CallbackHandler.js +11 -9
  30. package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
  31. package/dist/lib/authentication/components/OAuthErrorPage.d.ts +3 -0
  32. package/dist/lib/authentication/components/OAuthErrorPage.js +99 -0
  33. package/dist/lib/authentication/components/OAuthErrorPage.js.map +1 -0
  34. package/dist/lib/authentication/errors.d.ts +6 -12
  35. package/dist/lib/authentication/errors.js +2 -1
  36. package/dist/lib/authentication/errors.js.map +1 -1
  37. package/dist/lib/authentication/hook.d.ts +1 -0
  38. package/dist/lib/authentication/hook.js.map +1 -1
  39. package/dist/lib/authentication/providers/azureb2c.js +4 -2
  40. package/dist/lib/authentication/providers/azureb2c.js.map +1 -1
  41. package/dist/lib/authentication/providers/clerk.js +4 -2
  42. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  43. package/dist/lib/authentication/providers/openid.js +3 -1
  44. package/dist/lib/authentication/providers/openid.js.map +1 -1
  45. package/dist/lib/components/BuildCheck.d.ts +2 -1
  46. package/dist/lib/components/BuildCheck.js +9 -3
  47. package/dist/lib/components/BuildCheck.js.map +1 -1
  48. package/dist/lib/components/Header.js +1 -1
  49. package/dist/lib/components/Header.js.map +1 -1
  50. package/dist/lib/components/Heading.js +1 -1
  51. package/dist/lib/components/Heading.js.map +1 -1
  52. package/dist/lib/components/Layout.js +4 -7
  53. package/dist/lib/components/Layout.js.map +1 -1
  54. package/dist/lib/components/Markdown.js +2 -2
  55. package/dist/lib/components/Markdown.js.map +1 -1
  56. package/dist/lib/components/Meta.d.ts +2 -0
  57. package/dist/lib/components/Meta.js +11 -0
  58. package/dist/lib/components/Meta.js.map +1 -0
  59. package/dist/lib/components/MobileTopNavigation.js +5 -3
  60. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  61. package/dist/lib/components/NotFoundPage.js +1 -1
  62. package/dist/lib/components/NotFoundPage.js.map +1 -1
  63. package/dist/lib/components/TopNavigation.js +4 -3
  64. package/dist/lib/components/TopNavigation.js.map +1 -1
  65. package/dist/lib/components/Typography.d.ts +1 -1
  66. package/dist/lib/components/Typography.js +1 -1
  67. package/dist/lib/components/Typography.js.map +1 -1
  68. package/dist/lib/components/context/ZudokuContext.js +22 -14
  69. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  70. package/dist/lib/components/index.d.ts +0 -27
  71. package/dist/lib/components/index.js +0 -15
  72. package/dist/lib/components/index.js.map +1 -1
  73. package/dist/lib/components/navigation/NavigationCategory.js +1 -1
  74. package/dist/lib/components/navigation/NavigationCategory.js.map +1 -1
  75. package/dist/lib/components/navigation/NavigationItem.d.ts +1 -1
  76. package/dist/lib/components/navigation/NavigationItem.js +11 -3
  77. package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
  78. package/dist/lib/components/navigation/utils.d.ts +3 -1
  79. package/dist/lib/components/navigation/utils.js +18 -14
  80. package/dist/lib/components/navigation/utils.js.map +1 -1
  81. package/dist/lib/core/RouteGuard.js +9 -9
  82. package/dist/lib/core/RouteGuard.js.map +1 -1
  83. package/dist/lib/core/ZudokuContext.d.ts +5 -1
  84. package/dist/lib/core/ZudokuContext.js +23 -1
  85. package/dist/lib/core/ZudokuContext.js.map +1 -1
  86. package/dist/lib/core/__internal.d.ts +37 -0
  87. package/dist/lib/core/__internal.js +26 -0
  88. package/dist/lib/core/__internal.js.map +1 -0
  89. package/dist/lib/core/plugins.d.ts +2 -1
  90. package/dist/lib/core/plugins.js.map +1 -1
  91. package/dist/lib/core/router.d.ts +1 -0
  92. package/dist/lib/core/router.js +2 -0
  93. package/dist/lib/core/router.js.map +1 -0
  94. package/dist/lib/errors/ErrorAlert.js +1 -1
  95. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  96. package/dist/lib/plugins/api-keys/CreateApiKey.js +13 -3
  97. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
  98. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +3 -1
  99. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  100. package/dist/lib/plugins/api-keys/index.d.ts +9 -4
  101. package/dist/lib/plugins/api-keys/index.js +3 -7
  102. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  103. package/dist/lib/plugins/custom-pages/index.js +3 -0
  104. package/dist/lib/plugins/custom-pages/index.js.map +1 -1
  105. package/dist/lib/plugins/openapi/Sidecar.js +1 -1
  106. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  107. package/dist/lib/plugins/openapi/SidecarExamples.js +1 -1
  108. package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
  109. package/dist/lib/plugins/openapi/graphql/gql.d.ts +1 -1
  110. package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
  111. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  112. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +1 -0
  113. package/dist/lib/plugins/openapi/graphql/graphql.js +1 -0
  114. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  115. package/dist/lib/plugins/openapi/index.js +42 -10
  116. package/dist/lib/plugins/openapi/index.js.map +1 -1
  117. package/dist/lib/plugins/openapi/playground/PathParams.js +1 -1
  118. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  119. package/dist/lib/plugins/openapi/playground/Playground.js +4 -2
  120. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  121. package/dist/lib/shiki.d.ts +4 -0
  122. package/dist/lib/shiki.js +2 -0
  123. package/dist/lib/shiki.js.map +1 -1
  124. package/dist/lib/ui/ActionButton.js +1 -1
  125. package/dist/lib/ui/ActionButton.js.map +1 -1
  126. package/dist/lib/ui/Badge.d.ts +1 -1
  127. package/dist/lib/ui/Button.d.ts +2 -2
  128. package/dist/lib/ui/CodeBlock.js +30 -4
  129. package/dist/lib/ui/CodeBlock.js.map +1 -1
  130. package/dist/lib/ui/Command.d.ts +1 -1
  131. package/dist/lib/ui/Dialog.js +2 -2
  132. package/dist/lib/ui/Dialog.js.map +1 -1
  133. package/dist/lib/ui/EmbeddedCodeBlock.js +1 -1
  134. package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
  135. package/dist/lib/util/invariant.d.ts +6 -5
  136. package/dist/lib/util/invariant.js +1 -1
  137. package/dist/lib/util/invariant.js.map +1 -1
  138. package/dist/vite/config.js +6 -1
  139. package/dist/vite/config.js.map +1 -1
  140. package/dist/vite/dev-server.js +9 -1
  141. package/dist/vite/dev-server.js.map +1 -1
  142. package/dist/vite/mdx/remark-inject-filepath.d.ts +3 -0
  143. package/dist/vite/mdx/remark-inject-filepath.js +6 -0
  144. package/dist/vite/mdx/remark-inject-filepath.js.map +1 -0
  145. package/dist/vite/mdx/remark-link-rewrite.d.ts +2 -0
  146. package/dist/vite/mdx/remark-link-rewrite.js +20 -0
  147. package/dist/vite/mdx/remark-link-rewrite.js.map +1 -0
  148. package/dist/vite/mdx/remark-normalize-image-url.d.ts +2 -0
  149. package/dist/vite/mdx/remark-normalize-image-url.js +12 -0
  150. package/dist/vite/mdx/remark-normalize-image-url.js.map +1 -0
  151. package/dist/vite/{remarkStaticGeneration.d.ts → mdx/remark-static-generation.d.ts} +2 -2
  152. package/dist/vite/{remarkStaticGeneration.js → mdx/remark-static-generation.js} +1 -1
  153. package/dist/vite/mdx/remark-static-generation.js.map +1 -0
  154. package/dist/vite/plugin-config.d.ts +1 -1
  155. package/dist/vite/plugin-config.js +2 -1
  156. package/dist/vite/plugin-config.js.map +1 -1
  157. package/dist/vite/plugin-docs.js +18 -13
  158. package/dist/vite/plugin-docs.js.map +1 -1
  159. package/dist/vite/plugin-mdx.js +6 -23
  160. package/dist/vite/plugin-mdx.js.map +1 -1
  161. package/dist/vite/plugin-theme.js +80 -40
  162. package/dist/vite/plugin-theme.js.map +1 -1
  163. package/dist/vite/prerender/worker.js +5 -1
  164. package/dist/vite/prerender/worker.js.map +1 -1
  165. package/dist/vite/shadcn-registry.d.ts +4 -4
  166. package/dist/vite/sitemap.js +10 -9
  167. package/dist/vite/sitemap.js.map +1 -1
  168. package/lib/Button-B3o-2Xdf.js.map +1 -1
  169. package/lib/Card-CMDQUPM4.js.map +1 -1
  170. package/lib/CategoryHeading-DCpZu3yG.js +17 -0
  171. package/lib/CategoryHeading-DCpZu3yG.js.map +1 -0
  172. package/lib/ClientOnly-E7hGysn1.js.map +1 -1
  173. package/lib/CodeBlock-yJjjRwj-.js +98 -0
  174. package/lib/CodeBlock-yJjjRwj-.js.map +1 -0
  175. package/lib/{Command-C9AC5cf-.js → Command-CDn17s8X.js} +2 -2
  176. package/lib/{Command-C9AC5cf-.js.map → Command-CDn17s8X.js.map} +1 -1
  177. package/lib/Dialog-BrIjMmUK.js +114 -0
  178. package/lib/Dialog-BrIjMmUK.js.map +1 -0
  179. package/lib/{Drawer-DXGPOKPx.js → Drawer-DJ05s2pH.js} +86 -86
  180. package/lib/{Drawer-DXGPOKPx.js.map → Drawer-DJ05s2pH.js.map} +1 -1
  181. package/lib/{MdxPage-BI0vLjSn.js → MdxPage-BmOQ5m5g.js} +19 -18
  182. package/lib/{MdxPage-BI0vLjSn.js.map → MdxPage-BmOQ5m5g.js.map} +1 -1
  183. package/lib/OAuthErrorPage-Jv3r8wnL.js +150 -0
  184. package/lib/OAuthErrorPage-Jv3r8wnL.js.map +1 -0
  185. package/lib/{OasProvider-CK4C2QI3.js → OasProvider-CA_lpILt.js} +3 -3
  186. package/lib/{OasProvider-CK4C2QI3.js.map → OasProvider-CA_lpILt.js.map} +1 -1
  187. package/lib/{OperationList-DhA6x6qm.js → OperationList-C-TObVw6.js} +47 -44
  188. package/lib/OperationList-C-TObVw6.js.map +1 -0
  189. package/lib/{Pagination-YjKVdgm9.js → Pagination-CBiRGddW.js} +3 -3
  190. package/lib/{Pagination-YjKVdgm9.js.map → Pagination-CBiRGddW.js.map} +1 -1
  191. package/lib/RouteGuard-JLH6tCY8.js +56 -0
  192. package/lib/RouteGuard-JLH6tCY8.js.map +1 -0
  193. package/lib/RouterError-DcVonMP1.js +41 -0
  194. package/lib/RouterError-DcVonMP1.js.map +1 -0
  195. package/lib/{SchemaList-Cx9MS7Wf.js → SchemaList-BeYWvBC7.js} +15 -14
  196. package/lib/{SchemaList-Cx9MS7Wf.js.map → SchemaList-BeYWvBC7.js.map} +1 -1
  197. package/lib/{SchemaView-C6sTKWyS.js → SchemaView-CRcShewo.js} +4 -4
  198. package/lib/{SchemaView-C6sTKWyS.js.map → SchemaView-CRcShewo.js.map} +1 -1
  199. package/lib/Select-C3efYI1n.js +273 -0
  200. package/lib/Select-C3efYI1n.js.map +1 -0
  201. package/lib/{SignUp-DiDmVb3x.js → SignUp-CxBGHgba.js} +6 -6
  202. package/lib/{SignUp-DiDmVb3x.js.map → SignUp-CxBGHgba.js.map} +1 -1
  203. package/lib/{Slot-CrCBhP3G.js → Slot-DOtTvoyj.js} +2050 -2288
  204. package/lib/{Slot-CrCBhP3G.js.map → Slot-DOtTvoyj.js.map} +1 -1
  205. package/lib/Spinner-mNLZ6awP.js.map +1 -1
  206. package/lib/{SyntaxHighlight-CVe58ZSY.js → SyntaxHighlight-GR0eix_L.js} +411 -409
  207. package/lib/SyntaxHighlight-GR0eix_L.js.map +1 -0
  208. package/lib/{Toc-CpsFSXeD.js → Toc-BlcGIkXc.js} +2 -2
  209. package/lib/{Toc-CpsFSXeD.js.map → Toc-BlcGIkXc.js.map} +1 -1
  210. package/lib/ZudokuContext-BuJD7yIX.js +1286 -0
  211. package/lib/ZudokuContext-BuJD7yIX.js.map +1 -0
  212. package/lib/chunk-QMGIS6GS-DqecZ6nq.js +9204 -0
  213. package/lib/chunk-QMGIS6GS-DqecZ6nq.js.map +1 -0
  214. package/lib/{circular-OvXQH6UK.js → circular-CGTcsqA3.js} +2 -2
  215. package/lib/{circular-OvXQH6UK.js.map → circular-CGTcsqA3.js.map} +1 -1
  216. package/lib/cn-dYga0KKN.js.map +1 -1
  217. package/lib/{createServer-B5U_8E3S.js → createServer-DjgpuLne.js} +5 -5
  218. package/lib/{createServer-B5U_8E3S.js.map → createServer-DjgpuLne.js.map} +1 -1
  219. package/lib/errors-CrI3s7mR.js +45 -0
  220. package/lib/errors-CrI3s7mR.js.map +1 -0
  221. package/lib/hook-bv3iuX7X.js +247 -0
  222. package/lib/hook-bv3iuX7X.js.map +1 -0
  223. package/lib/index-CrcNWbel.js.map +1 -1
  224. package/lib/{index-BzcS9JBW.js → index-CvTWnHZF.js} +860 -938
  225. package/lib/index-CvTWnHZF.js.map +1 -0
  226. package/lib/index-DI5SPFK9.js.map +1 -1
  227. package/lib/index-DmNq2fbN.js.map +1 -1
  228. package/lib/index-DzO-Qh6S.js +1061 -0
  229. package/lib/index-DzO-Qh6S.js.map +1 -0
  230. package/lib/{index-4XtG1tlD.js → index-HarEI51d.js} +2 -2
  231. package/lib/{index-4XtG1tlD.js.map → index-HarEI51d.js.map} +1 -1
  232. package/lib/index.esm-BnYHxCYC.js +683 -0
  233. package/lib/index.esm-BnYHxCYC.js.map +1 -0
  234. package/lib/index.esm-CdzlRw50.js +1254 -0
  235. package/lib/index.esm-CdzlRw50.js.map +1 -0
  236. package/lib/{invariant-DAFpPywt.js → invariant-Bm-FVUQE.js} +2 -6
  237. package/lib/invariant-Bm-FVUQE.js.map +1 -0
  238. package/lib/jsx-runtime-C5mzlN2N.js.map +1 -1
  239. package/lib/mutation-Dy_5up8v.js +196 -0
  240. package/lib/mutation-Dy_5up8v.js.map +1 -0
  241. package/lib/processors/removeExtensions.js.map +1 -1
  242. package/lib/processors/removeParameters.js.map +1 -1
  243. package/lib/processors/removePaths.js.map +1 -1
  244. package/lib/processors/traverse.js.map +1 -1
  245. package/lib/ui/Accordion.js.map +1 -1
  246. package/lib/ui/ActionButton.js +9 -9
  247. package/lib/ui/ActionButton.js.map +1 -1
  248. package/lib/ui/Alert.js.map +1 -1
  249. package/lib/ui/AlertDialog.js.map +1 -1
  250. package/lib/ui/Badge.js.map +1 -1
  251. package/lib/ui/Breadcrumb.js.map +1 -1
  252. package/lib/ui/Button.js.map +1 -1
  253. package/lib/ui/Callout.js.map +1 -1
  254. package/lib/ui/Card.js.map +1 -1
  255. package/lib/ui/Carousel.js.map +1 -1
  256. package/lib/ui/Checkbox.js.map +1 -1
  257. package/lib/ui/CodeBlock.js +1 -1
  258. package/lib/ui/Command.js +1 -1
  259. package/lib/ui/Command.js.map +1 -1
  260. package/lib/ui/Dialog.js +56 -41
  261. package/lib/ui/Dialog.js.map +1 -1
  262. package/lib/ui/Drawer.js +1 -1
  263. package/lib/ui/DropdownMenu.js.map +1 -1
  264. package/lib/ui/EmbeddedCodeBlock.js +1 -1
  265. package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
  266. package/lib/ui/Form.js +1 -1
  267. package/lib/ui/Form.js.map +1 -1
  268. package/lib/ui/HoverCard.js.map +1 -1
  269. package/lib/ui/Input.js.map +1 -1
  270. package/lib/ui/Label.js.map +1 -1
  271. package/lib/ui/Pagination.js.map +1 -1
  272. package/lib/ui/Popover.js.map +1 -1
  273. package/lib/ui/Progress.js.map +1 -1
  274. package/lib/ui/RadioGroup.js.map +1 -1
  275. package/lib/ui/ScrollArea.js.map +1 -1
  276. package/lib/ui/Select.js.map +1 -1
  277. package/lib/ui/Skeleton.js.map +1 -1
  278. package/lib/ui/Slider.js.map +1 -1
  279. package/lib/ui/Stepper.js.map +1 -1
  280. package/lib/ui/Switch.js.map +1 -1
  281. package/lib/ui/SyntaxHighlight.js +4 -4
  282. package/lib/ui/Tabs.js.map +1 -1
  283. package/lib/ui/Textarea.js.map +1 -1
  284. package/lib/ui/Toggle.js.map +1 -1
  285. package/lib/ui/ToggleGroup.js.map +1 -1
  286. package/lib/ui/Tooltip.js.map +1 -1
  287. package/lib/useExposedProps-BH9aq4MD.js +113 -0
  288. package/lib/useExposedProps-BH9aq4MD.js.map +1 -0
  289. package/lib/useLatest-hmRS46UF.js +11 -0
  290. package/lib/useLatest-hmRS46UF.js.map +1 -0
  291. package/lib/zudoku.__internal.js +2965 -0
  292. package/lib/zudoku.__internal.js.map +1 -0
  293. package/lib/zudoku.auth-auth0.js +1 -1
  294. package/lib/zudoku.auth-auth0.js.map +1 -1
  295. package/lib/zudoku.auth-azureb2c.js +46 -9880
  296. package/lib/zudoku.auth-azureb2c.js.map +1 -1
  297. package/lib/zudoku.auth-clerk.js +25 -22
  298. package/lib/zudoku.auth-clerk.js.map +1 -1
  299. package/lib/zudoku.auth-openid.js +204 -195
  300. package/lib/zudoku.auth-openid.js.map +1 -1
  301. package/lib/zudoku.auth-supabase.js +97 -0
  302. package/lib/zudoku.auth-supabase.js.map +1 -0
  303. package/lib/zudoku.components.js +21 -28
  304. package/lib/zudoku.components.js.map +1 -1
  305. package/lib/zudoku.hooks.js +7 -7
  306. package/lib/zudoku.hooks.js.map +1 -1
  307. package/lib/zudoku.icons.js.map +1 -1
  308. package/lib/zudoku.plugin-api-catalog.js +23 -22
  309. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  310. package/lib/zudoku.plugin-api-keys.js +410 -295
  311. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  312. package/lib/zudoku.plugin-custom-pages.js +8 -5
  313. package/lib/zudoku.plugin-custom-pages.js.map +1 -1
  314. package/lib/zudoku.plugin-markdown.js +1 -1
  315. package/lib/zudoku.plugin-markdown.js.map +1 -1
  316. package/lib/zudoku.plugin-openapi.js +7 -6
  317. package/lib/zudoku.plugin-openapi.js.map +1 -1
  318. package/lib/zudoku.plugin-redirect.js +3 -3
  319. package/lib/zudoku.plugin-redirect.js.map +1 -1
  320. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  321. package/lib/zudoku.plugin-search-pagefind.js +28 -27
  322. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  323. package/lib/zudoku.plugins.js.map +1 -1
  324. package/lib/zudoku.router.js +123 -0
  325. package/lib/zudoku.router.js.map +1 -0
  326. package/package.json +31 -23
  327. package/src/app/demo.tsx +1 -1
  328. package/src/app/entry.client.tsx +1 -1
  329. package/src/app/entry.server.tsx +1 -1
  330. package/src/app/main.css +22 -5
  331. package/src/app/main.tsx +23 -11
  332. package/src/app/standalone.tsx +1 -1
  333. package/src/lib/authentication/components/CallbackHandler.tsx +22 -15
  334. package/src/lib/authentication/components/OAuthErrorPage.tsx +171 -0
  335. package/src/lib/authentication/errors.ts +27 -13
  336. package/src/lib/authentication/hook.ts +2 -0
  337. package/src/lib/authentication/providers/azureb2c.tsx +8 -3
  338. package/src/lib/authentication/providers/clerk.tsx +4 -1
  339. package/src/lib/authentication/providers/openid.tsx +7 -1
  340. package/src/lib/components/BuildCheck.tsx +13 -3
  341. package/src/lib/components/Header.tsx +4 -3
  342. package/src/lib/components/Heading.tsx +1 -1
  343. package/src/lib/components/Layout.tsx +2 -21
  344. package/src/lib/components/Markdown.tsx +3 -3
  345. package/src/lib/components/Meta.tsx +32 -0
  346. package/src/lib/components/MobileTopNavigation.tsx +6 -3
  347. package/src/lib/components/NotFoundPage.tsx +3 -2
  348. package/src/lib/components/TopNavigation.tsx +4 -4
  349. package/src/lib/components/Typography.tsx +1 -1
  350. package/src/lib/components/context/ZudokuContext.ts +26 -19
  351. package/src/lib/components/index.ts +0 -18
  352. package/src/lib/components/navigation/NavigationCategory.tsx +1 -1
  353. package/src/lib/components/navigation/NavigationItem.tsx +13 -3
  354. package/src/lib/components/navigation/utils.ts +21 -15
  355. package/src/lib/core/RouteGuard.tsx +13 -13
  356. package/src/lib/core/ZudokuContext.ts +37 -5
  357. package/src/lib/core/__internal.tsx +30 -0
  358. package/src/lib/core/plugins.ts +2 -1
  359. package/src/lib/core/router.ts +1 -0
  360. package/src/lib/errors/ErrorAlert.tsx +5 -7
  361. package/src/lib/plugins/api-keys/CreateApiKey.tsx +17 -3
  362. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +21 -3
  363. package/src/lib/plugins/api-keys/index.tsx +16 -11
  364. package/src/lib/plugins/custom-pages/index.tsx +3 -0
  365. package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
  366. package/src/lib/plugins/openapi/SidecarExamples.tsx +1 -1
  367. package/src/lib/plugins/openapi/graphql/gql.ts +3 -3
  368. package/src/lib/plugins/openapi/graphql/graphql.ts +2 -0
  369. package/src/lib/plugins/openapi/index.tsx +66 -16
  370. package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -1
  371. package/src/lib/plugins/openapi/playground/Playground.tsx +8 -2
  372. package/src/lib/shiki.ts +2 -0
  373. package/src/lib/ui/ActionButton.tsx +3 -1
  374. package/src/lib/ui/CodeBlock.tsx +38 -13
  375. package/src/lib/ui/Dialog.tsx +12 -3
  376. package/src/lib/ui/EmbeddedCodeBlock.tsx +1 -1
  377. package/src/lib/util/invariant.ts +7 -5
  378. package/src/shiki/langs/vue-vine.js +1 -0
  379. package/dist/vite/remarkStaticGeneration.js.map +0 -1
  380. package/lib/Alert-Cig_8hW6.js +0 -161
  381. package/lib/Alert-Cig_8hW6.js.map +0 -1
  382. package/lib/CodeBlock-BaBgX9Wy.js +0 -85
  383. package/lib/CodeBlock-BaBgX9Wy.js.map +0 -1
  384. package/lib/Dialog-DMWw1doX.js +0 -99
  385. package/lib/Dialog-DMWw1doX.js.map +0 -1
  386. package/lib/OperationList-DhA6x6qm.js.map +0 -1
  387. package/lib/RouteGuard-Vnlz_t51.js +0 -737
  388. package/lib/RouteGuard-Vnlz_t51.js.map +0 -1
  389. package/lib/SyntaxHighlight-CVe58ZSY.js.map +0 -1
  390. package/lib/chunk-DQRVZFIR-DHK7_Ilc.js +0 -1839
  391. package/lib/chunk-DQRVZFIR-DHK7_Ilc.js.map +0 -1
  392. package/lib/clerk-BDZ31hjU.js +0 -25190
  393. package/lib/clerk-BDZ31hjU.js.map +0 -1
  394. package/lib/errors-DOCWNkkS.js +0 -78
  395. package/lib/errors-DOCWNkkS.js.map +0 -1
  396. package/lib/hook-CZjW2buS.js +0 -1510
  397. package/lib/hook-CZjW2buS.js.map +0 -1
  398. package/lib/index-Bm35Tkgf.js +0 -107
  399. package/lib/index-Bm35Tkgf.js.map +0 -1
  400. package/lib/index-BzcS9JBW.js.map +0 -1
  401. package/lib/index-Sb7nQNHJ.js +0 -3980
  402. package/lib/index-Sb7nQNHJ.js.map +0 -1
  403. package/lib/index.esm-Cp4wkyud.js +0 -1236
  404. package/lib/index.esm-Cp4wkyud.js.map +0 -1
  405. package/lib/invariant-DAFpPywt.js.map +0 -1
  406. package/lib/useExposedProps-BIYjecPD.js +0 -9
  407. package/lib/useExposedProps-BIYjecPD.js.map +0 -1
@@ -1,5 +1,6 @@
1
1
  import { KeyRoundIcon } from "lucide-react";
2
2
  import { type RouteObject } from "react-router";
3
+ import { UseAuthReturn } from "../../authentication/hook.js";
3
4
  import { type ZudokuContext } from "../../core/ZudokuContext.js";
4
5
  import {
5
6
  type ApiIdentityPlugin,
@@ -26,10 +27,15 @@ export type ApiKeyService = {
26
27
  context: ZudokuContext,
27
28
  ) => Promise<void>;
28
29
  getUsage?: (apiKeys: string[], context: ZudokuContext) => Promise<void>;
29
- createKey?: (
30
- apiKey: { description: string; expiresOn?: string },
31
- context: ZudokuContext,
32
- ) => Promise<void>;
30
+ createKey?: ({
31
+ apiKey,
32
+ context,
33
+ auth,
34
+ }: {
35
+ apiKey: { description: string; expiresOn?: string };
36
+ context: ZudokuContext;
37
+ auth: UseAuthReturn;
38
+ }) => Promise<void>;
33
39
  };
34
40
 
35
41
  export type ApiKeyPluginOptions =
@@ -74,7 +80,10 @@ const throwIfProblemJson = async (response: Response) => {
74
80
  }
75
81
  };
76
82
 
77
- const createDefaultHandler = (deploymentName: string): ApiKeyService => {
83
+ const createDefaultHandler = (
84
+ deploymentName: string,
85
+ options: ApiKeyPluginOptions,
86
+ ): ApiKeyService => {
78
87
  return {
79
88
  deleteKey: async (consumerId, keyId, context) => {
80
89
  const request = new Request(
@@ -159,6 +168,7 @@ const createDefaultHandler = (deploymentName: string): ApiKeyService => {
159
168
  key: consumer.apiKeys.data.at(0),
160
169
  }));
161
170
  },
171
+ ...options,
162
172
  };
163
173
  };
164
174
 
@@ -170,7 +180,7 @@ export const apiKeyPlugin = (
170
180
  ): ZudokuPlugin & ApiIdentityPlugin & ProfileMenuPlugin => {
171
181
  const service: ApiKeyService =
172
182
  "deploymentName" in options
173
- ? createDefaultHandler(options.deploymentName)
183
+ ? createDefaultHandler(options.deploymentName, options)
174
184
  : options;
175
185
 
176
186
  return {
@@ -203,7 +213,6 @@ export const apiKeyPlugin = (
203
213
  }
204
214
  },
205
215
  getRoutes: (): RouteObject[] => {
206
- // TODO: Make lazy
207
216
  return [
208
217
  {
209
218
  element: <ProtectedRoute />,
@@ -213,10 +222,6 @@ export const apiKeyPlugin = (
213
222
  path: "/settings/api-keys",
214
223
  element: <SettingsApiKeys service={service} />,
215
224
  },
216
- // {
217
- // path: "/settings/api-keys/new",
218
- // element: <CreateApiKey service={service} />,
219
- // },
220
225
  ],
221
226
  },
222
227
  ];
@@ -20,6 +20,9 @@ export const customPagesPlugin = (
20
20
  customPages.push({
21
21
  path: item.path,
22
22
  element: item.element,
23
+ handle: {
24
+ layout: item.layout ?? "default",
25
+ },
23
26
  });
24
27
  }
25
28
  });
@@ -173,7 +173,7 @@ export const Sidecar = ({
173
173
  embedded
174
174
  language={selectedLang}
175
175
  noBackground
176
- className="[--scrollbar-color:gray] rounded-none text-xs max-h-[500px] p-2"
176
+ className="[--scrollbar-color:gray] rounded-none text-xs max-h-[500px]"
177
177
  code={code!}
178
178
  />
179
179
  </CollapsibleCode>
@@ -104,7 +104,7 @@ export const SidecarExamples = ({
104
104
  embedded
105
105
  language={language}
106
106
  noBackground
107
- className="[--scrollbar-color:gray] rounded-none text-xs max-h-[500px] p-2"
107
+ className="[--scrollbar-color:gray] rounded-none text-xs max-h-[500px]"
108
108
  code={formattedExample}
109
109
  />
110
110
  </CollapsibleCode>
@@ -19,7 +19,7 @@ type Documents = {
19
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 next {\n name\n slug\n }\n prev {\n name\n slug\n }\n }\n }\n }\n": typeof types.OperationsForTagDocument;
20
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;
21
21
  "\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": typeof types.GetServerQueryDocument;
22
- "\n query GetNavigationOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n tags {\n slug\n name\n extensions\n operations {\n summary\n slug\n method\n operationId\n path\n }\n }\n components {\n schemas {\n __typename\n }\n }\n }\n }\n": typeof types.GetNavigationOperationsDocument;
22
+ "\n query GetNavigationOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n extensions\n tags {\n slug\n name\n extensions\n operations {\n summary\n slug\n method\n operationId\n path\n }\n }\n components {\n schemas {\n __typename\n }\n }\n }\n }\n": typeof types.GetNavigationOperationsDocument;
23
23
  };
24
24
  const documents: Documents = {
25
25
  "\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n":
@@ -34,7 +34,7 @@ const documents: Documents = {
34
34
  types.GetSchemasDocument,
35
35
  "\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n":
36
36
  types.GetServerQueryDocument,
37
- "\n query GetNavigationOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n tags {\n slug\n name\n extensions\n operations {\n summary\n slug\n method\n operationId\n path\n }\n }\n components {\n schemas {\n __typename\n }\n }\n }\n }\n":
37
+ "\n query GetNavigationOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n extensions\n tags {\n slug\n name\n extensions\n operations {\n summary\n slug\n method\n operationId\n path\n }\n }\n components {\n schemas {\n __typename\n }\n }\n }\n }\n":
38
38
  types.GetNavigationOperationsDocument,
39
39
  };
40
40
 
@@ -78,7 +78,7 @@ export function graphql(
78
78
  * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
79
79
  */
80
80
  export function graphql(
81
- source: "\n query GetNavigationOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n tags {\n slug\n name\n extensions\n operations {\n summary\n slug\n method\n operationId\n path\n }\n }\n components {\n schemas {\n __typename\n }\n }\n }\n }\n",
81
+ source: "\n query GetNavigationOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n extensions\n tags {\n slug\n name\n extensions\n operations {\n summary\n slug\n method\n operationId\n path\n }\n }\n components {\n schemas {\n __typename\n }\n }\n }\n }\n",
82
82
  ): typeof import("./graphql.js").GetNavigationOperationsDocument;
83
83
 
84
84
  export function graphql(source: string) {
@@ -383,6 +383,7 @@ export type GetNavigationOperationsQuery = {
383
383
  __typename?: "Query";
384
384
  schema: {
385
385
  __typename?: "Schema";
386
+ extensions?: any | null;
386
387
  tags: Array<{
387
388
  __typename?: "SchemaTag";
388
389
  slug?: string | null;
@@ -645,6 +646,7 @@ export const GetServerQueryDocument = new TypedDocumentString(`
645
646
  export const GetNavigationOperationsDocument = new TypedDocumentString(`
646
647
  query GetNavigationOperations($input: JSON!, $type: SchemaType!) {
647
648
  schema(input: $input, type: $type) {
649
+ extensions
648
650
  tags {
649
651
  slug
650
652
  name
@@ -1,6 +1,7 @@
1
1
  import { CirclePlayIcon, LogInIcon } from "lucide-react";
2
2
  import { type ReactNode } from "react";
3
3
  import { matchPath } from "react-router";
4
+ import type { NavigationItem } from "../../../config/validators/NavigationSchema.js";
4
5
  import { useAuth } from "../../authentication/hook.js";
5
6
  import { type ZudokuPlugin } from "../../core/plugins.js";
6
7
  import { Button } from "../../ui/Button.js";
@@ -18,6 +19,7 @@ import { getRoutes, getVersions } from "./util/getRoutes.js";
18
19
  export const GetNavigationOperationsQuery = graphql(`
19
20
  query GetNavigationOperations($input: JSON!, $type: SchemaType!) {
20
21
  schema(input: $input, type: $type) {
22
+ extensions
21
23
  tags {
22
24
  slug
23
25
  name
@@ -139,25 +141,73 @@ export const openApiPlugin = (config: OasPluginConfig): ZudokuPlugin => {
139
141
  });
140
142
  const data = await context.queryClient.ensureQueryData(query);
141
143
 
142
- const categories = data.schema.tags.flatMap((tag) => {
143
- if (!tag.name || tag.operations.length === 0) return [];
144
+ const tagCategories = new Map(
145
+ data.schema.tags
146
+ .filter((tag) => tag.name && tag.operations.length > 0)
147
+ .map((tag) => {
148
+ if (!tag.name) {
149
+ throw new Error(`Tag ${tag.slug} has no name`);
150
+ }
151
+
152
+ const categoryPath = joinUrl(basePath, versionParam, tag.slug);
153
+
154
+ const isCollapsed =
155
+ tag.extensions?.["x-zudoku-collapsed"] ??
156
+ !config.options?.expandAllTags;
157
+ const isCollapsible =
158
+ tag.extensions?.["x-zudoku-collapsible"] ?? true;
159
+
160
+ return [
161
+ tag.name,
162
+ createNavigationCategory({
163
+ label: tag.name,
164
+ path: categoryPath,
165
+ operations: tag.operations,
166
+ collapsed: isCollapsed,
167
+ collapsible: isCollapsible,
168
+ }),
169
+ ];
170
+ }),
171
+ );
144
172
 
145
- const categoryPath = joinUrl(basePath, versionParam, tag.slug);
173
+ const tagGroups =
174
+ (data.schema.extensions?.["x-tagGroups"] as
175
+ | { name: string; tags: string[] }[]
176
+ | undefined) ?? [];
146
177
 
147
- const isCollapsed =
148
- tag.extensions?.["x-zudoku-collapsed"] ??
149
- !config.options?.expandAllTags;
150
- const isCollapsible =
151
- tag.extensions?.["x-zudoku-collapsible"] ?? true;
178
+ const groupedTags = new Set(
179
+ tagGroups.flatMap((group) =>
180
+ group.tags.filter((name) => tagCategories.has(name)),
181
+ ),
182
+ );
152
183
 
153
- return createNavigationCategory({
154
- label: tag.name,
155
- path: categoryPath,
156
- operations: tag.operations,
157
- collapsed: isCollapsed,
158
- collapsible: isCollapsible,
159
- });
160
- });
184
+ const groupedCategories: NavigationItem[] = tagGroups.flatMap(
185
+ (group) => {
186
+ const items = group.tags
187
+ .map((name) => tagCategories.get(name))
188
+ .filter(Boolean) as NavigationItem[];
189
+
190
+ if (items.length === 0) {
191
+ return [];
192
+ }
193
+ return [
194
+ {
195
+ type: "category",
196
+ label: group.name,
197
+ items,
198
+ collapsible: true,
199
+ collapsed: !config.options?.expandAllTags,
200
+ },
201
+ ];
202
+ },
203
+ );
204
+
205
+ const categories: NavigationItem[] = [
206
+ ...groupedCategories,
207
+ ...Array.from(tagCategories.entries())
208
+ .filter(([name]) => !groupedTags.has(name))
209
+ .map(([, cat]) => cat),
210
+ ];
161
211
 
162
212
  const untaggedOperations = data.schema.tags.find(
163
213
  (tag) => !tag.name,
@@ -39,7 +39,7 @@ export const PathParams = ({
39
39
  )}
40
40
  />
41
41
 
42
- <div className="flex justify-between items-center">
42
+ <div className="flex justify-between items-center col-span-2">
43
43
  <Controller
44
44
  control={control}
45
45
  name={`pathParams.${i}.value`}
@@ -154,6 +154,12 @@ export const Playground = ({
154
154
  formRef.current?.requestSubmit();
155
155
  });
156
156
 
157
+ const pathParamOrder =
158
+ url.match(/\{([^}]+)\}/g)?.map((match) => match.slice(1, -1)) ?? [];
159
+ const sortedPathParams = [...pathParams].sort(
160
+ (a, b) => pathParamOrder.indexOf(a.name) - pathParamOrder.indexOf(b.name),
161
+ );
162
+
157
163
  const { register, control, handleSubmit, watch, setValue, ...form } =
158
164
  useForm<PlaygroundForm>({
159
165
  defaultValues: {
@@ -174,7 +180,7 @@ export const Playground = ({
174
180
  enum: [],
175
181
  },
176
182
  ],
177
- pathParams: pathParams.map((param) => ({
183
+ pathParams: sortedPathParams.map((param) => ({
178
184
  name: param.name,
179
185
  value: param.defaultValue ?? "",
180
186
  })),
@@ -472,7 +478,7 @@ export const Playground = ({
472
478
  </Collapsible>
473
479
  )}
474
480
 
475
- {pathParams.length > 0 && (
481
+ {sortedPathParams.length > 0 && (
476
482
  <Collapsible defaultOpen>
477
483
  <CollapsibleHeaderTrigger>
478
484
  <ShapesIcon size={16} />
package/src/lib/shiki.ts CHANGED
@@ -43,6 +43,8 @@ export const defaultHighlightOptions = {
43
43
  dark: "github-dark",
44
44
  },
45
45
  defaultColor: false,
46
+ defaultLanguage: "text",
47
+ fallbackLanguage: "text",
46
48
  inline: "tailing-curly-colon",
47
49
  addLanguageClass: true,
48
50
  transformers: [transformerMetaHighlight(), transformerMetaWordHighlight()],
@@ -19,7 +19,9 @@ export const ActionButton = forwardRef<HTMLButtonElement, ActionButtonProps>(
19
19
  <Spinner />
20
20
  </div>
21
21
  )}
22
- <div className={cn(isPending && "invisible")}>{children}</div>
22
+ <span className={cn("block", isPending && "invisible")}>
23
+ {children}
24
+ </span>
23
25
  </Button>
24
26
  );
25
27
  },
@@ -18,12 +18,41 @@ export type CodeBlockProps = {
18
18
  showLineNumbers?: boolean;
19
19
  };
20
20
 
21
+ const IconToLanguageMap: Record<string, RegExp> = {
22
+ typescript: /(tsx?|typescript)/,
23
+ javascript: /(jsx?|javascript)/,
24
+ markdown: /(md|markdown)/,
25
+ mdx: /mdx/,
26
+ json: /json/,
27
+ yaml: /yaml/,
28
+ toml: /toml/,
29
+ gnubash: /(shell|bash|sh|zsh)/,
30
+ python: /(py|python)/,
31
+ dotnet: /(^cs$|csharp|vb)/,
32
+ rust: /(rs|rust)/,
33
+ ruby: /(rb|ruby)/,
34
+ php: /php/,
35
+ html5: /html?/,
36
+ css: /css/,
37
+ };
38
+
39
+ const getIconUrl = (language?: string) => {
40
+ if (!language) return undefined;
41
+
42
+ const icon = Object.entries(IconToLanguageMap).find(([_, regex]) =>
43
+ regex.test(language),
44
+ );
45
+ return icon
46
+ ? `https://cdn.simpleicons.org/${icon[0]}/000/fff?viewbox=auto`
47
+ : undefined;
48
+ };
49
+
21
50
  export const CodeBlock = ({
22
51
  children,
23
52
  title = "Code",
24
53
  language,
25
54
  showCopy = "hover",
26
- showLanguageIndicator = false,
55
+ showLanguageIndicator,
27
56
  showLineNumbers,
28
57
  ...props
29
58
  }: CodeBlockProps) => {
@@ -32,6 +61,8 @@ export const CodeBlock = ({
32
61
 
33
62
  if (!children) return null;
34
63
 
64
+ const iconUrl = showLanguageIndicator ? getIconUrl(language) : undefined;
65
+
35
66
  return (
36
67
  <div
37
68
  className={cn(
@@ -40,11 +71,9 @@ export const CodeBlock = ({
40
71
  )}
41
72
  >
42
73
  <div className="border-b flex items-center h-10 font-sans bg-black/2">
43
- <div className="flex-1 text-sm w-full px-4">
74
+ <div className="flex items-center gap-2 flex-1 text-sm w-full px-3">
75
+ {iconUrl && <img src={iconUrl} className="h-3 max-w-4" />}
44
76
  {title}
45
- {showLanguageIndicator && language && (
46
- <span className="text-muted-foreground ml-2">({language})</span>
47
- )}
48
77
  </div>{" "}
49
78
  {showCopy !== "never" && (
50
79
  <button
@@ -52,7 +81,8 @@ export const CodeBlock = ({
52
81
  aria-label="Copy code"
53
82
  title="Copy code"
54
83
  className={cn(
55
- "cursor:pointer h-full hover:border-l-border active:shadow-none active:inset-shadow-xs hover:inset-shadow-xs flex items-center gap-2 px-4 outline-border text-sm hover:bg-black/5 transition-all",
84
+ "transition px-2 py-2 mx-1 rounded-sm",
85
+ !isCopied && "hover:bg-accent hover:brightness-95",
56
86
  )}
57
87
  disabled={isCopied}
58
88
  onClick={() => {
@@ -62,12 +92,7 @@ export const CodeBlock = ({
62
92
  }}
63
93
  >
64
94
  {isCopied ? (
65
- <CheckIcon
66
- className="text-emerald-600"
67
- size={14}
68
- strokeWidth={2.5}
69
- absoluteStrokeWidth
70
- />
95
+ <CheckIcon className="text-emerald-600" size={14} />
71
96
  ) : (
72
97
  <CopyIcon size={14} />
73
98
  )}
@@ -76,7 +101,7 @@ export const CodeBlock = ({
76
101
  </div>
77
102
  <div
78
103
  className={cn(
79
- "code-block text-sm not-prose scrollbar overflow-x-auto scrollbar p-4",
104
+ "code-block text-sm not-prose scrollbar overflow-x-auto scrollbar [&_code]:p-3 [&_code]:py-2",
80
105
  props.className,
81
106
  )}
82
107
  ref={ref}
@@ -1,7 +1,7 @@
1
1
  import * as DialogPrimitive from "@radix-ui/react-dialog";
2
2
  import * as React from "react";
3
3
 
4
- import { XIcon } from "lucide-react";
4
+ import { CircleIcon, XIcon } from "lucide-react";
5
5
  import { cn } from "../util/cn.js";
6
6
 
7
7
  const Dialog = DialogPrimitive.Root;
@@ -45,8 +45,17 @@ const DialogContent = React.forwardRef<
45
45
  >
46
46
  {children}
47
47
  {showCloseButton && (
48
- <DialogPrimitive.Close className="absolute left-1 top-1 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
49
- <XIcon className="h-3 w-3" strokeWidth={2} />
48
+ <DialogPrimitive.Close className="absolute p-3 group -left-1.5 -top-1.5 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
49
+ <CircleIcon
50
+ className="h-2 w-2 transition-all border border-transparent group-hover:border-white/20 rounded-full group-hover:scale-180 group-hover:text-red-400"
51
+ strokeWidth={2}
52
+ fill="currentColor"
53
+ />
54
+ <XIcon
55
+ className="h-2 w-2 absolute top-3 left-3 text-transparent group-hover:text-red-800 transition-colors"
56
+ strokeWidth={2}
57
+ fill="currentColor"
58
+ />
50
59
  <span className="sr-only">Close</span>
51
60
  </DialogPrimitive.Close>
52
61
  )}
@@ -40,7 +40,7 @@ export const EmbeddedCodeBlock = ({
40
40
  >
41
41
  <div
42
42
  className={cn(
43
- "code-block text-sm not-prose scrollbar overflow-x-auto scrollbar p-4",
43
+ "code-block text-sm not-prose scrollbar overflow-x-auto scrollbar [&>pre]:p-4",
44
44
  props.className,
45
45
  )}
46
46
  ref={ref}
@@ -18,17 +18,19 @@ export default function invariant(
18
18
  throw new ZudokuError(provided ?? "Invariant failed");
19
19
  }
20
20
 
21
+ export type ZudokuErrorOptions = {
22
+ developerHint?: string;
23
+ title?: string;
24
+ cause?: Error;
25
+ };
26
+
21
27
  export class ZudokuError extends Error {
22
28
  public developerHint: string | undefined;
23
29
  public title: string | undefined;
24
30
 
25
31
  constructor(
26
32
  message: string,
27
- {
28
- developerHint,
29
- title,
30
- cause,
31
- }: { developerHint?: string; title?: string; cause?: Error } = {},
33
+ { developerHint, title, cause }: ZudokuErrorOptions = {},
32
34
  ) {
33
35
  super(message, { cause });
34
36
  this.name = "ZudokuError";
@@ -0,0 +1 @@
1
+ export { default } from "@shikijs/langs/vue-vine";
@@ -1 +0,0 @@
1
- {"version":3,"file":"remarkStaticGeneration.js","sourceRoot":"","sources":["../../src/vite/remarkStaticGeneration.ts"],"names":[],"mappings":"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"}
@@ -1,161 +0,0 @@
1
- import * as a from "react";
2
- import { g as p } from "./Slot-CrCBhP3G.js";
3
- import { S as m, s as f, h, n as l, g as v, i as g, k as b } from "./hook-CZjW2buS.js";
4
- import { j as n } from "./jsx-runtime-C5mzlN2N.js";
5
- import { c as x } from "./index-DI5SPFK9.js";
6
- import { c as u } from "./cn-dYga0KKN.js";
7
- var y = class extends m {
8
- #e;
9
- #r = void 0;
10
- #t;
11
- #s;
12
- constructor(t, s) {
13
- super(), this.#e = t, this.setOptions(s), this.bindMethods(), this.#i();
14
- }
15
- bindMethods() {
16
- this.mutate = this.mutate.bind(this), this.reset = this.reset.bind(this);
17
- }
18
- setOptions(t) {
19
- const s = this.options;
20
- this.options = this.#e.defaultMutationOptions(t), f(this.options, s) || this.#e.getMutationCache().notify({
21
- type: "observerOptionsUpdated",
22
- mutation: this.#t,
23
- observer: this
24
- }), s?.mutationKey && this.options.mutationKey && h(s.mutationKey) !== h(this.options.mutationKey) ? this.reset() : this.#t?.state.status === "pending" && this.#t.setOptions(this.options);
25
- }
26
- onUnsubscribe() {
27
- this.hasListeners() || this.#t?.removeObserver(this);
28
- }
29
- onMutationUpdate(t) {
30
- this.#i(), this.#a(t);
31
- }
32
- getCurrentResult() {
33
- return this.#r;
34
- }
35
- reset() {
36
- this.#t?.removeObserver(this), this.#t = void 0, this.#i(), this.#a();
37
- }
38
- mutate(t, s) {
39
- return this.#s = s, this.#t?.removeObserver(this), this.#t = this.#e.getMutationCache().build(this.#e, this.options), this.#t.addObserver(this), this.#t.execute(t);
40
- }
41
- #i() {
42
- const t = this.#t?.state ?? p();
43
- this.#r = {
44
- ...t,
45
- isPending: t.status === "pending",
46
- isSuccess: t.status === "success",
47
- isError: t.status === "error",
48
- isIdle: t.status === "idle",
49
- mutate: this.mutate,
50
- reset: this.reset
51
- };
52
- }
53
- #a(t) {
54
- l.batch(() => {
55
- if (this.#s && this.hasListeners()) {
56
- const s = this.#r.variables, r = this.#r.context;
57
- t?.type === "success" ? (this.#s.onSuccess?.(t.data, s, r), this.#s.onSettled?.(t.data, null, s, r)) : t?.type === "error" && (this.#s.onError?.(t.error, s, r), this.#s.onSettled?.(
58
- void 0,
59
- t.error,
60
- s,
61
- r
62
- ));
63
- }
64
- this.listeners.forEach((s) => {
65
- s(this.#r);
66
- });
67
- });
68
- }
69
- };
70
- function R(t, s) {
71
- const r = v(s), [e] = a.useState(
72
- () => new y(
73
- r,
74
- t
75
- )
76
- );
77
- a.useEffect(() => {
78
- e.setOptions(t);
79
- }, [e, t]);
80
- const i = a.useSyncExternalStore(
81
- a.useCallback(
82
- (o) => e.subscribe(l.batchCalls(o)),
83
- [e]
84
- ),
85
- () => e.getCurrentResult(),
86
- () => e.getCurrentResult()
87
- ), c = a.useCallback(
88
- (o, d) => {
89
- e.mutate(o, d).catch(g);
90
- },
91
- [e]
92
- );
93
- if (i.error && b(e.options.throwOnError, [i.error]))
94
- throw i.error;
95
- return { ...i, mutate: c, mutateAsync: i.mutate };
96
- }
97
- const O = x(
98
- "relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
99
- {
100
- variants: {
101
- variant: {
102
- default: "bg-card text-card-foreground",
103
- destructive: "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"
104
- }
105
- },
106
- defaultVariants: {
107
- variant: "default"
108
- }
109
- }
110
- );
111
- function w({
112
- className: t,
113
- variant: s,
114
- ...r
115
- }) {
116
- return /* @__PURE__ */ n.jsx(
117
- "div",
118
- {
119
- "data-slot": "alert",
120
- role: "alert",
121
- className: u(O({ variant: s }), t),
122
- ...r
123
- }
124
- );
125
- }
126
- function A({ className: t, ...s }) {
127
- return /* @__PURE__ */ n.jsx(
128
- "div",
129
- {
130
- "data-slot": "alert-title",
131
- className: u(
132
- "col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
133
- t
134
- ),
135
- ...s
136
- }
137
- );
138
- }
139
- function K({
140
- className: t,
141
- ...s
142
- }) {
143
- return /* @__PURE__ */ n.jsx(
144
- "div",
145
- {
146
- "data-slot": "alert-description",
147
- className: u(
148
- "text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
149
- t
150
- ),
151
- ...s
152
- }
153
- );
154
- }
155
- export {
156
- w as A,
157
- A as a,
158
- K as b,
159
- R as u
160
- };
161
- //# sourceMappingURL=Alert-Cig_8hW6.js.map