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.
- package/dist/app/demo.js +1 -1
- package/dist/app/entry.client.js +1 -1
- package/dist/app/entry.server.js +1 -1
- package/dist/app/main.d.ts +1 -1
- package/dist/app/main.js +12 -6
- package/dist/app/main.js.map +1 -1
- package/dist/app/standalone.js +1 -1
- package/dist/config/config.d.ts +1 -0
- package/dist/config/validators/InputNavigationSchema.d.ts +251 -156
- package/dist/config/validators/InputNavigationSchema.js +5 -4
- package/dist/config/validators/InputNavigationSchema.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.test-d.js +0 -1
- package/dist/config/validators/InputNavigationSchema.test-d.js.map +1 -1
- package/dist/config/validators/NavigationSchema.js +6 -3
- package/dist/config/validators/NavigationSchema.js.map +1 -1
- package/dist/config/validators/ProtectedRoutesSchema.d.ts +13 -0
- package/dist/config/validators/ProtectedRoutesSchema.js +10 -0
- package/dist/config/validators/ProtectedRoutesSchema.js.map +1 -0
- package/dist/config/validators/icon-types.d.ts +1 -1
- package/dist/config/validators/icon-types.js +16 -0
- package/dist/config/validators/icon-types.js.map +1 -1
- package/dist/config/validators/validate.d.ts +44 -30
- package/dist/config/validators/validate.js +8 -2
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/flat-config.d.ts +11 -7
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/authentication/components/CallbackHandler.js +11 -9
- package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
- package/dist/lib/authentication/components/OAuthErrorPage.d.ts +3 -0
- package/dist/lib/authentication/components/OAuthErrorPage.js +99 -0
- package/dist/lib/authentication/components/OAuthErrorPage.js.map +1 -0
- package/dist/lib/authentication/errors.d.ts +6 -12
- package/dist/lib/authentication/errors.js +2 -1
- package/dist/lib/authentication/errors.js.map +1 -1
- package/dist/lib/authentication/hook.d.ts +1 -0
- package/dist/lib/authentication/hook.js.map +1 -1
- package/dist/lib/authentication/providers/azureb2c.js +4 -2
- package/dist/lib/authentication/providers/azureb2c.js.map +1 -1
- package/dist/lib/authentication/providers/clerk.js +4 -2
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/providers/openid.js +3 -1
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/components/BuildCheck.d.ts +2 -1
- package/dist/lib/components/BuildCheck.js +9 -3
- package/dist/lib/components/BuildCheck.js.map +1 -1
- package/dist/lib/components/Header.js +1 -1
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.js +1 -1
- package/dist/lib/components/Heading.js.map +1 -1
- package/dist/lib/components/Layout.js +4 -7
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/Markdown.js +2 -2
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/Meta.d.ts +2 -0
- package/dist/lib/components/Meta.js +11 -0
- package/dist/lib/components/Meta.js.map +1 -0
- package/dist/lib/components/MobileTopNavigation.js +5 -3
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/NotFoundPage.js +1 -1
- package/dist/lib/components/NotFoundPage.js.map +1 -1
- package/dist/lib/components/TopNavigation.js +4 -3
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Typography.d.ts +1 -1
- package/dist/lib/components/Typography.js +1 -1
- package/dist/lib/components/Typography.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.js +22 -14
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +0 -27
- package/dist/lib/components/index.js +0 -15
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/NavigationCategory.js +1 -1
- package/dist/lib/components/navigation/NavigationCategory.js.map +1 -1
- package/dist/lib/components/navigation/NavigationItem.d.ts +1 -1
- package/dist/lib/components/navigation/NavigationItem.js +11 -3
- package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
- package/dist/lib/components/navigation/utils.d.ts +3 -1
- package/dist/lib/components/navigation/utils.js +18 -14
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/RouteGuard.js +9 -9
- package/dist/lib/core/RouteGuard.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +5 -1
- package/dist/lib/core/ZudokuContext.js +23 -1
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/__internal.d.ts +37 -0
- package/dist/lib/core/__internal.js +26 -0
- package/dist/lib/core/__internal.js.map +1 -0
- package/dist/lib/core/plugins.d.ts +2 -1
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/core/router.d.ts +1 -0
- package/dist/lib/core/router.js +2 -0
- package/dist/lib/core/router.js.map +1 -0
- package/dist/lib/errors/ErrorAlert.js +1 -1
- package/dist/lib/errors/ErrorAlert.js.map +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.js +13 -3
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +3 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.d.ts +9 -4
- package/dist/lib/plugins/api-keys/index.js +3 -7
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/custom-pages/index.js +3 -0
- package/dist/lib/plugins/custom-pages/index.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +1 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js +1 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +42 -10
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +4 -2
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/shiki.d.ts +4 -0
- package/dist/lib/shiki.js +2 -0
- package/dist/lib/shiki.js.map +1 -1
- package/dist/lib/ui/ActionButton.js +1 -1
- package/dist/lib/ui/ActionButton.js.map +1 -1
- package/dist/lib/ui/Badge.d.ts +1 -1
- package/dist/lib/ui/Button.d.ts +2 -2
- package/dist/lib/ui/CodeBlock.js +30 -4
- package/dist/lib/ui/CodeBlock.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +1 -1
- package/dist/lib/ui/Dialog.js +2 -2
- package/dist/lib/ui/Dialog.js.map +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/dist/lib/util/invariant.d.ts +6 -5
- package/dist/lib/util/invariant.js +1 -1
- package/dist/lib/util/invariant.js.map +1 -1
- package/dist/vite/config.js +6 -1
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/dev-server.js +9 -1
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/mdx/remark-inject-filepath.d.ts +3 -0
- package/dist/vite/mdx/remark-inject-filepath.js +6 -0
- package/dist/vite/mdx/remark-inject-filepath.js.map +1 -0
- package/dist/vite/mdx/remark-link-rewrite.d.ts +2 -0
- package/dist/vite/mdx/remark-link-rewrite.js +20 -0
- package/dist/vite/mdx/remark-link-rewrite.js.map +1 -0
- package/dist/vite/mdx/remark-normalize-image-url.d.ts +2 -0
- package/dist/vite/mdx/remark-normalize-image-url.js +12 -0
- package/dist/vite/mdx/remark-normalize-image-url.js.map +1 -0
- package/dist/vite/{remarkStaticGeneration.d.ts → mdx/remark-static-generation.d.ts} +2 -2
- package/dist/vite/{remarkStaticGeneration.js → mdx/remark-static-generation.js} +1 -1
- package/dist/vite/mdx/remark-static-generation.js.map +1 -0
- package/dist/vite/plugin-config.d.ts +1 -1
- package/dist/vite/plugin-config.js +2 -1
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-docs.js +18 -13
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-mdx.js +6 -23
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-theme.js +80 -40
- package/dist/vite/plugin-theme.js.map +1 -1
- package/dist/vite/prerender/worker.js +5 -1
- package/dist/vite/prerender/worker.js.map +1 -1
- package/dist/vite/shadcn-registry.d.ts +4 -4
- package/dist/vite/sitemap.js +10 -9
- package/dist/vite/sitemap.js.map +1 -1
- package/lib/Button-B3o-2Xdf.js.map +1 -1
- package/lib/Card-CMDQUPM4.js.map +1 -1
- package/lib/CategoryHeading-DCpZu3yG.js +17 -0
- package/lib/CategoryHeading-DCpZu3yG.js.map +1 -0
- package/lib/ClientOnly-E7hGysn1.js.map +1 -1
- package/lib/CodeBlock-yJjjRwj-.js +98 -0
- package/lib/CodeBlock-yJjjRwj-.js.map +1 -0
- package/lib/{Command-C9AC5cf-.js → Command-CDn17s8X.js} +2 -2
- package/lib/{Command-C9AC5cf-.js.map → Command-CDn17s8X.js.map} +1 -1
- package/lib/Dialog-BrIjMmUK.js +114 -0
- package/lib/Dialog-BrIjMmUK.js.map +1 -0
- package/lib/{Drawer-DXGPOKPx.js → Drawer-DJ05s2pH.js} +86 -86
- package/lib/{Drawer-DXGPOKPx.js.map → Drawer-DJ05s2pH.js.map} +1 -1
- package/lib/{MdxPage-BI0vLjSn.js → MdxPage-BmOQ5m5g.js} +19 -18
- package/lib/{MdxPage-BI0vLjSn.js.map → MdxPage-BmOQ5m5g.js.map} +1 -1
- package/lib/OAuthErrorPage-Jv3r8wnL.js +150 -0
- package/lib/OAuthErrorPage-Jv3r8wnL.js.map +1 -0
- package/lib/{OasProvider-CK4C2QI3.js → OasProvider-CA_lpILt.js} +3 -3
- package/lib/{OasProvider-CK4C2QI3.js.map → OasProvider-CA_lpILt.js.map} +1 -1
- package/lib/{OperationList-DhA6x6qm.js → OperationList-C-TObVw6.js} +47 -44
- package/lib/OperationList-C-TObVw6.js.map +1 -0
- package/lib/{Pagination-YjKVdgm9.js → Pagination-CBiRGddW.js} +3 -3
- package/lib/{Pagination-YjKVdgm9.js.map → Pagination-CBiRGddW.js.map} +1 -1
- package/lib/RouteGuard-JLH6tCY8.js +56 -0
- package/lib/RouteGuard-JLH6tCY8.js.map +1 -0
- package/lib/RouterError-DcVonMP1.js +41 -0
- package/lib/RouterError-DcVonMP1.js.map +1 -0
- package/lib/{SchemaList-Cx9MS7Wf.js → SchemaList-BeYWvBC7.js} +15 -14
- package/lib/{SchemaList-Cx9MS7Wf.js.map → SchemaList-BeYWvBC7.js.map} +1 -1
- package/lib/{SchemaView-C6sTKWyS.js → SchemaView-CRcShewo.js} +4 -4
- package/lib/{SchemaView-C6sTKWyS.js.map → SchemaView-CRcShewo.js.map} +1 -1
- package/lib/Select-C3efYI1n.js +273 -0
- package/lib/Select-C3efYI1n.js.map +1 -0
- package/lib/{SignUp-DiDmVb3x.js → SignUp-CxBGHgba.js} +6 -6
- package/lib/{SignUp-DiDmVb3x.js.map → SignUp-CxBGHgba.js.map} +1 -1
- package/lib/{Slot-CrCBhP3G.js → Slot-DOtTvoyj.js} +2050 -2288
- package/lib/{Slot-CrCBhP3G.js.map → Slot-DOtTvoyj.js.map} +1 -1
- package/lib/Spinner-mNLZ6awP.js.map +1 -1
- package/lib/{SyntaxHighlight-CVe58ZSY.js → SyntaxHighlight-GR0eix_L.js} +411 -409
- package/lib/SyntaxHighlight-GR0eix_L.js.map +1 -0
- package/lib/{Toc-CpsFSXeD.js → Toc-BlcGIkXc.js} +2 -2
- package/lib/{Toc-CpsFSXeD.js.map → Toc-BlcGIkXc.js.map} +1 -1
- package/lib/ZudokuContext-BuJD7yIX.js +1286 -0
- package/lib/ZudokuContext-BuJD7yIX.js.map +1 -0
- package/lib/chunk-QMGIS6GS-DqecZ6nq.js +9204 -0
- package/lib/chunk-QMGIS6GS-DqecZ6nq.js.map +1 -0
- package/lib/{circular-OvXQH6UK.js → circular-CGTcsqA3.js} +2 -2
- package/lib/{circular-OvXQH6UK.js.map → circular-CGTcsqA3.js.map} +1 -1
- package/lib/cn-dYga0KKN.js.map +1 -1
- package/lib/{createServer-B5U_8E3S.js → createServer-DjgpuLne.js} +5 -5
- package/lib/{createServer-B5U_8E3S.js.map → createServer-DjgpuLne.js.map} +1 -1
- package/lib/errors-CrI3s7mR.js +45 -0
- package/lib/errors-CrI3s7mR.js.map +1 -0
- package/lib/hook-bv3iuX7X.js +247 -0
- package/lib/hook-bv3iuX7X.js.map +1 -0
- package/lib/index-CrcNWbel.js.map +1 -1
- package/lib/{index-BzcS9JBW.js → index-CvTWnHZF.js} +860 -938
- package/lib/index-CvTWnHZF.js.map +1 -0
- package/lib/index-DI5SPFK9.js.map +1 -1
- package/lib/index-DmNq2fbN.js.map +1 -1
- package/lib/index-DzO-Qh6S.js +1061 -0
- package/lib/index-DzO-Qh6S.js.map +1 -0
- package/lib/{index-4XtG1tlD.js → index-HarEI51d.js} +2 -2
- package/lib/{index-4XtG1tlD.js.map → index-HarEI51d.js.map} +1 -1
- package/lib/index.esm-BnYHxCYC.js +683 -0
- package/lib/index.esm-BnYHxCYC.js.map +1 -0
- package/lib/index.esm-CdzlRw50.js +1254 -0
- package/lib/index.esm-CdzlRw50.js.map +1 -0
- package/lib/{invariant-DAFpPywt.js → invariant-Bm-FVUQE.js} +2 -6
- package/lib/invariant-Bm-FVUQE.js.map +1 -0
- package/lib/jsx-runtime-C5mzlN2N.js.map +1 -1
- package/lib/mutation-Dy_5up8v.js +196 -0
- package/lib/mutation-Dy_5up8v.js.map +1 -0
- package/lib/processors/removeExtensions.js.map +1 -1
- package/lib/processors/removeParameters.js.map +1 -1
- package/lib/processors/removePaths.js.map +1 -1
- package/lib/processors/traverse.js.map +1 -1
- package/lib/ui/Accordion.js.map +1 -1
- package/lib/ui/ActionButton.js +9 -9
- package/lib/ui/ActionButton.js.map +1 -1
- package/lib/ui/Alert.js.map +1 -1
- package/lib/ui/AlertDialog.js.map +1 -1
- package/lib/ui/Badge.js.map +1 -1
- package/lib/ui/Breadcrumb.js.map +1 -1
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/Callout.js.map +1 -1
- package/lib/ui/Card.js.map +1 -1
- package/lib/ui/Carousel.js.map +1 -1
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/CodeBlock.js +1 -1
- package/lib/ui/Command.js +1 -1
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Dialog.js +56 -41
- package/lib/ui/Dialog.js.map +1 -1
- package/lib/ui/Drawer.js +1 -1
- package/lib/ui/DropdownMenu.js.map +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +1 -1
- package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/lib/ui/Form.js +1 -1
- package/lib/ui/Form.js.map +1 -1
- package/lib/ui/HoverCard.js.map +1 -1
- package/lib/ui/Input.js.map +1 -1
- package/lib/ui/Label.js.map +1 -1
- package/lib/ui/Pagination.js.map +1 -1
- package/lib/ui/Popover.js.map +1 -1
- package/lib/ui/Progress.js.map +1 -1
- package/lib/ui/RadioGroup.js.map +1 -1
- package/lib/ui/ScrollArea.js.map +1 -1
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Skeleton.js.map +1 -1
- package/lib/ui/Slider.js.map +1 -1
- package/lib/ui/Stepper.js.map +1 -1
- package/lib/ui/Switch.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +4 -4
- package/lib/ui/Tabs.js.map +1 -1
- package/lib/ui/Textarea.js.map +1 -1
- package/lib/ui/Toggle.js.map +1 -1
- package/lib/ui/ToggleGroup.js.map +1 -1
- package/lib/ui/Tooltip.js.map +1 -1
- package/lib/useExposedProps-BH9aq4MD.js +113 -0
- package/lib/useExposedProps-BH9aq4MD.js.map +1 -0
- package/lib/useLatest-hmRS46UF.js +11 -0
- package/lib/useLatest-hmRS46UF.js.map +1 -0
- package/lib/zudoku.__internal.js +2965 -0
- package/lib/zudoku.__internal.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-azureb2c.js +46 -9880
- package/lib/zudoku.auth-azureb2c.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +25 -22
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +204 -195
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.auth-supabase.js +97 -0
- package/lib/zudoku.auth-supabase.js.map +1 -0
- package/lib/zudoku.components.js +21 -28
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +7 -7
- package/lib/zudoku.hooks.js.map +1 -1
- package/lib/zudoku.icons.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +23 -22
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +410 -295
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +8 -5
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +7 -6
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/lib/zudoku.plugin-redirect.js +3 -3
- package/lib/zudoku.plugin-redirect.js.map +1 -1
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +28 -27
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/lib/zudoku.plugins.js.map +1 -1
- package/lib/zudoku.router.js +123 -0
- package/lib/zudoku.router.js.map +1 -0
- package/package.json +31 -23
- package/src/app/demo.tsx +1 -1
- package/src/app/entry.client.tsx +1 -1
- package/src/app/entry.server.tsx +1 -1
- package/src/app/main.css +22 -5
- package/src/app/main.tsx +23 -11
- package/src/app/standalone.tsx +1 -1
- package/src/lib/authentication/components/CallbackHandler.tsx +22 -15
- package/src/lib/authentication/components/OAuthErrorPage.tsx +171 -0
- package/src/lib/authentication/errors.ts +27 -13
- package/src/lib/authentication/hook.ts +2 -0
- package/src/lib/authentication/providers/azureb2c.tsx +8 -3
- package/src/lib/authentication/providers/clerk.tsx +4 -1
- package/src/lib/authentication/providers/openid.tsx +7 -1
- package/src/lib/components/BuildCheck.tsx +13 -3
- package/src/lib/components/Header.tsx +4 -3
- package/src/lib/components/Heading.tsx +1 -1
- package/src/lib/components/Layout.tsx +2 -21
- package/src/lib/components/Markdown.tsx +3 -3
- package/src/lib/components/Meta.tsx +32 -0
- package/src/lib/components/MobileTopNavigation.tsx +6 -3
- package/src/lib/components/NotFoundPage.tsx +3 -2
- package/src/lib/components/TopNavigation.tsx +4 -4
- package/src/lib/components/Typography.tsx +1 -1
- package/src/lib/components/context/ZudokuContext.ts +26 -19
- package/src/lib/components/index.ts +0 -18
- package/src/lib/components/navigation/NavigationCategory.tsx +1 -1
- package/src/lib/components/navigation/NavigationItem.tsx +13 -3
- package/src/lib/components/navigation/utils.ts +21 -15
- package/src/lib/core/RouteGuard.tsx +13 -13
- package/src/lib/core/ZudokuContext.ts +37 -5
- package/src/lib/core/__internal.tsx +30 -0
- package/src/lib/core/plugins.ts +2 -1
- package/src/lib/core/router.ts +1 -0
- package/src/lib/errors/ErrorAlert.tsx +5 -7
- package/src/lib/plugins/api-keys/CreateApiKey.tsx +17 -3
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +21 -3
- package/src/lib/plugins/api-keys/index.tsx +16 -11
- package/src/lib/plugins/custom-pages/index.tsx +3 -0
- package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
- package/src/lib/plugins/openapi/SidecarExamples.tsx +1 -1
- package/src/lib/plugins/openapi/graphql/gql.ts +3 -3
- package/src/lib/plugins/openapi/graphql/graphql.ts +2 -0
- package/src/lib/plugins/openapi/index.tsx +66 -16
- package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -1
- package/src/lib/plugins/openapi/playground/Playground.tsx +8 -2
- package/src/lib/shiki.ts +2 -0
- package/src/lib/ui/ActionButton.tsx +3 -1
- package/src/lib/ui/CodeBlock.tsx +38 -13
- package/src/lib/ui/Dialog.tsx +12 -3
- package/src/lib/ui/EmbeddedCodeBlock.tsx +1 -1
- package/src/lib/util/invariant.ts +7 -5
- package/src/shiki/langs/vue-vine.js +1 -0
- package/dist/vite/remarkStaticGeneration.js.map +0 -1
- package/lib/Alert-Cig_8hW6.js +0 -161
- package/lib/Alert-Cig_8hW6.js.map +0 -1
- package/lib/CodeBlock-BaBgX9Wy.js +0 -85
- package/lib/CodeBlock-BaBgX9Wy.js.map +0 -1
- package/lib/Dialog-DMWw1doX.js +0 -99
- package/lib/Dialog-DMWw1doX.js.map +0 -1
- package/lib/OperationList-DhA6x6qm.js.map +0 -1
- package/lib/RouteGuard-Vnlz_t51.js +0 -737
- package/lib/RouteGuard-Vnlz_t51.js.map +0 -1
- package/lib/SyntaxHighlight-CVe58ZSY.js.map +0 -1
- package/lib/chunk-DQRVZFIR-DHK7_Ilc.js +0 -1839
- package/lib/chunk-DQRVZFIR-DHK7_Ilc.js.map +0 -1
- package/lib/clerk-BDZ31hjU.js +0 -25190
- package/lib/clerk-BDZ31hjU.js.map +0 -1
- package/lib/errors-DOCWNkkS.js +0 -78
- package/lib/errors-DOCWNkkS.js.map +0 -1
- package/lib/hook-CZjW2buS.js +0 -1510
- package/lib/hook-CZjW2buS.js.map +0 -1
- package/lib/index-Bm35Tkgf.js +0 -107
- package/lib/index-Bm35Tkgf.js.map +0 -1
- package/lib/index-BzcS9JBW.js.map +0 -1
- package/lib/index-Sb7nQNHJ.js +0 -3980
- package/lib/index-Sb7nQNHJ.js.map +0 -1
- package/lib/index.esm-Cp4wkyud.js +0 -1236
- package/lib/index.esm-Cp4wkyud.js.map +0 -1
- package/lib/invariant-DAFpPywt.js.map +0 -1
- package/lib/useExposedProps-BIYjecPD.js +0 -9
- 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
|
|
31
|
-
context
|
|
32
|
-
|
|
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 = (
|
|
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
|
];
|
|
@@ -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]
|
|
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]
|
|
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
|
|
143
|
-
|
|
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
|
-
|
|
173
|
+
const tagGroups =
|
|
174
|
+
(data.schema.extensions?.["x-tagGroups"] as
|
|
175
|
+
| { name: string; tags: string[] }[]
|
|
176
|
+
| undefined) ?? [];
|
|
146
177
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
178
|
+
const groupedTags = new Set(
|
|
179
|
+
tagGroups.flatMap((group) =>
|
|
180
|
+
group.tags.filter((name) => tagCategories.has(name)),
|
|
181
|
+
),
|
|
182
|
+
);
|
|
152
183
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
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,
|
|
@@ -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:
|
|
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
|
-
{
|
|
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
|
-
<
|
|
22
|
+
<span className={cn("block", isPending && "invisible")}>
|
|
23
|
+
{children}
|
|
24
|
+
</span>
|
|
23
25
|
</Button>
|
|
24
26
|
);
|
|
25
27
|
},
|
package/src/lib/ui/CodeBlock.tsx
CHANGED
|
@@ -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
|
|
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-
|
|
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
|
-
"
|
|
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-
|
|
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}
|
package/src/lib/ui/Dialog.tsx
CHANGED
|
@@ -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
|
-
<
|
|
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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"}
|
package/lib/Alert-Cig_8hW6.js
DELETED
|
@@ -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
|