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
package/src/app/main.css
CHANGED
|
@@ -121,6 +121,10 @@
|
|
|
121
121
|
.shiki {
|
|
122
122
|
counter-reset: line;
|
|
123
123
|
@apply leading-normal;
|
|
124
|
+
background-color: var(--shiki-light-bg) !important;
|
|
125
|
+
}
|
|
126
|
+
.dark .shiki {
|
|
127
|
+
background-color: var(--shiki-dark-bg) !important;
|
|
124
128
|
}
|
|
125
129
|
.code-block .shiki {
|
|
126
130
|
@apply grid grid-rows-1;
|
|
@@ -149,17 +153,30 @@
|
|
|
149
153
|
@apply tabular-nums inline-flex items-baseline justify-end me-4 w-3 text-muted-foreground/25;
|
|
150
154
|
}
|
|
151
155
|
|
|
152
|
-
.shiki.not-inline .line {
|
|
156
|
+
.light .shiki.not-inline .line {
|
|
153
157
|
@apply block -mx-4 px-4 w-[calc(100%+2rem)];
|
|
154
|
-
--highlighted-bg: hsl(
|
|
155
|
-
from var(--muted) h s calc(l + 4 * var(--dark)) / 50%
|
|
156
|
-
);
|
|
158
|
+
--highlighted-bg: hsl(from var(--shiki-light-bg) h s calc(l - 6));
|
|
157
159
|
}
|
|
160
|
+
.dark .shiki.not-inline .line {
|
|
161
|
+
@apply block -mx-4 px-4 w-[calc(100%+2rem)];
|
|
162
|
+
--highlighted-bg: hsl(from var(--shiki-dark-bg) h s calc(l + 10));
|
|
163
|
+
}
|
|
164
|
+
|
|
158
165
|
.shiki .line.highlighted {
|
|
159
|
-
@apply bg-(--highlighted-bg);
|
|
166
|
+
@apply bg-(--highlighted-bg) relative;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.shiki .line.highlighted::after {
|
|
170
|
+
@apply absolute left-0 top-0 bottom-0 right-auto translate-x-full content-[''];
|
|
171
|
+
border-left: 3px solid
|
|
172
|
+
hsl(from var(--highlighted-bg) h s calc(l + 4 * var(--dark)));
|
|
160
173
|
}
|
|
161
174
|
|
|
162
175
|
.shiki .highlighted-word {
|
|
176
|
+
--highlighted-bg: hsl(
|
|
177
|
+
from var(--muted) h s calc(l + 4 * var(--dark)) / 50%
|
|
178
|
+
);
|
|
179
|
+
|
|
163
180
|
@apply bg-(--highlighted-bg) px-0.5 rounded;
|
|
164
181
|
box-shadow: 0 0 0 4px var(--highlighted-bg);
|
|
165
182
|
}
|
package/src/app/main.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { RouteObject } from "react-router";
|
|
2
2
|
import { configuredApiKeysPlugin } from "virtual:zudoku-api-keys-plugin";
|
|
3
3
|
import {
|
|
4
4
|
configuredApiCatalogPlugins,
|
|
@@ -15,11 +15,13 @@ import "virtual:zudoku-theme.css";
|
|
|
15
15
|
import {
|
|
16
16
|
BuildCheck,
|
|
17
17
|
Layout,
|
|
18
|
+
Meta,
|
|
18
19
|
RouteGuard,
|
|
19
20
|
RouterError,
|
|
20
21
|
StatusPage,
|
|
21
|
-
|
|
22
|
-
} from "zudoku/components";
|
|
22
|
+
} from "zudoku/__internal";
|
|
23
|
+
import { Zudoku } from "zudoku/components";
|
|
24
|
+
import { Outlet } from "zudoku/router";
|
|
23
25
|
import type { ZudokuConfig } from "../config/config.js";
|
|
24
26
|
import type { ZudokuContextOptions } from "../lib/core/ZudokuContext.js";
|
|
25
27
|
import { isNavigationPlugin } from "../lib/core/plugins.js";
|
|
@@ -107,23 +109,33 @@ export const getRoutesByConfig = (config: ZudokuConfig): RouteObject[] => {
|
|
|
107
109
|
element: (
|
|
108
110
|
<Zudoku {...options}>
|
|
109
111
|
<BuildCheck
|
|
110
|
-
buildId={
|
|
111
|
-
|
|
112
|
-
? import.meta.env.ZUPLO_BUILD_ID
|
|
113
|
-
: undefined
|
|
114
|
-
}
|
|
112
|
+
buildId={import.meta.env.ZUPLO_BUILD_ID}
|
|
113
|
+
environmentType={import.meta.env.ZUPLO_ENVIRONMENT_TYPE}
|
|
115
114
|
/>
|
|
116
|
-
<
|
|
115
|
+
<Outlet />
|
|
117
116
|
</Zudoku>
|
|
118
117
|
),
|
|
119
118
|
hydrateFallbackElement: <div>Loading...</div>,
|
|
120
119
|
children: [
|
|
121
120
|
{
|
|
122
|
-
element:
|
|
121
|
+
element: (
|
|
122
|
+
<Meta>
|
|
123
|
+
<RouteGuard />
|
|
124
|
+
</Meta>
|
|
125
|
+
),
|
|
123
126
|
errorElement: <RouterError />,
|
|
124
|
-
children: routes
|
|
127
|
+
children: routes.map((r) =>
|
|
128
|
+
r.handle?.layout === "none" ? r : wrapWithLayout(r),
|
|
129
|
+
),
|
|
125
130
|
},
|
|
126
131
|
],
|
|
127
132
|
},
|
|
128
133
|
];
|
|
129
134
|
};
|
|
135
|
+
|
|
136
|
+
const wrapWithLayout = (route: RouteObject) => {
|
|
137
|
+
return {
|
|
138
|
+
element: <Layout />,
|
|
139
|
+
children: [route],
|
|
140
|
+
};
|
|
141
|
+
};
|
package/src/app/standalone.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRoot } from "react-dom/client";
|
|
2
2
|
import { createBrowserRouter } from "react-router";
|
|
3
|
-
import { Bootstrap } from "zudoku/
|
|
3
|
+
import { Bootstrap } from "zudoku/__internal";
|
|
4
4
|
import type { ZudokuConfig } from "../config/validators/validate.js";
|
|
5
5
|
import { openApiPlugin } from "../lib/plugins/openapi/index.js";
|
|
6
6
|
import "../lib/util/logInit.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useSuspenseQuery } from "@tanstack/react-query";
|
|
2
2
|
import { Navigate } from "react-router";
|
|
3
3
|
import { useZudoku } from "zudoku/components";
|
|
4
|
-
import { ZudokuError } from "../../util/invariant.js";
|
|
5
4
|
import { joinUrl } from "../../util/joinUrl.js";
|
|
6
5
|
import { normalizeRedirectUrl } from "../../util/url.js";
|
|
6
|
+
import { OAuthAuthorizationError, type OAuthErrorType } from "../errors.js";
|
|
7
7
|
|
|
8
8
|
export function CallbackHandler({
|
|
9
9
|
handleCallback,
|
|
@@ -15,22 +15,29 @@ export function CallbackHandler({
|
|
|
15
15
|
retry: false,
|
|
16
16
|
queryKey: ["oauth-callback"],
|
|
17
17
|
queryFn: async () => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
const url = new URL(window.location.href);
|
|
19
|
+
|
|
20
|
+
const errorParam = url.searchParams.get("error");
|
|
21
|
+
const errorDescription =
|
|
22
|
+
url.searchParams.get("error_description") ?? undefined;
|
|
23
|
+
const errorUri = url.searchParams.get("error_uri") ?? undefined;
|
|
24
|
+
if (errorParam) {
|
|
25
|
+
throw new OAuthAuthorizationError(
|
|
26
|
+
`OAuth error '${errorParam}': ${errorDescription}`,
|
|
27
|
+
{
|
|
28
|
+
error: errorParam as OAuthErrorType,
|
|
29
|
+
error_description: errorDescription,
|
|
30
|
+
error_uri: errorUri,
|
|
31
|
+
},
|
|
25
32
|
);
|
|
26
|
-
} catch (error) {
|
|
27
|
-
throw new ZudokuError("Could not validate user", {
|
|
28
|
-
cause: error,
|
|
29
|
-
title: "Authentication Error",
|
|
30
|
-
developerHint:
|
|
31
|
-
"Check the configuration of your authorization provider and ensure all settings such as the callback URL are configured correctly.",
|
|
32
|
-
});
|
|
33
33
|
}
|
|
34
|
+
return joinUrl(
|
|
35
|
+
normalizeRedirectUrl(
|
|
36
|
+
await handleCallback(),
|
|
37
|
+
window.location.origin,
|
|
38
|
+
options.basePath,
|
|
39
|
+
),
|
|
40
|
+
);
|
|
34
41
|
},
|
|
35
42
|
});
|
|
36
43
|
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { HomeIcon } from "lucide-react";
|
|
2
|
+
import { Link } from "react-router";
|
|
3
|
+
import { Heading } from "../../components/Heading.js";
|
|
4
|
+
import { Typography } from "../../components/Typography.js";
|
|
5
|
+
import { Button } from "../../ui/Button.js";
|
|
6
|
+
import { OAuthAuthorizationError } from "../errors.js";
|
|
7
|
+
import { useAuth } from "../hook.js";
|
|
8
|
+
|
|
9
|
+
const errorDetailsMap: Record<string, { message: string }> = {
|
|
10
|
+
invalid_request: {
|
|
11
|
+
message:
|
|
12
|
+
"The authentication request was invalid. Please try signing in again.",
|
|
13
|
+
},
|
|
14
|
+
unauthorized_client: {
|
|
15
|
+
message:
|
|
16
|
+
"This application is not authorized to access your account. Please contact support.",
|
|
17
|
+
},
|
|
18
|
+
access_denied: {
|
|
19
|
+
message:
|
|
20
|
+
"You denied access to this application. To continue, please sign in and grant access.",
|
|
21
|
+
},
|
|
22
|
+
unsupported_response_type: {
|
|
23
|
+
message:
|
|
24
|
+
"The authentication method is not supported. Please contact support.",
|
|
25
|
+
},
|
|
26
|
+
invalid_scope: {
|
|
27
|
+
message: "The requested permissions are invalid. Please contact support.",
|
|
28
|
+
},
|
|
29
|
+
server_error: {
|
|
30
|
+
message:
|
|
31
|
+
"The authentication server encountered an error. Please try again in a few moments.",
|
|
32
|
+
},
|
|
33
|
+
temporarily_unavailable: {
|
|
34
|
+
message:
|
|
35
|
+
"The authentication service is temporarily unavailable. Please try again in a few moments.",
|
|
36
|
+
},
|
|
37
|
+
// Token errors
|
|
38
|
+
invalid_client: {
|
|
39
|
+
message: "Invalid application credentials. Please contact support.",
|
|
40
|
+
},
|
|
41
|
+
invalid_grant: {
|
|
42
|
+
message:
|
|
43
|
+
"The authentication code has expired or is invalid. Please sign in again.",
|
|
44
|
+
},
|
|
45
|
+
unsupported_grant_type: {
|
|
46
|
+
message:
|
|
47
|
+
"The authentication method is not supported. Please contact support.",
|
|
48
|
+
},
|
|
49
|
+
// Custom errors
|
|
50
|
+
invalid_state: {
|
|
51
|
+
message:
|
|
52
|
+
"Security validation failed. This may be due to a potential security attack. Please try signing in again.",
|
|
53
|
+
},
|
|
54
|
+
missing_code_verifier: {
|
|
55
|
+
message:
|
|
56
|
+
"Authentication security information is missing. Please clear your browser cache and try again.",
|
|
57
|
+
},
|
|
58
|
+
network_error: {
|
|
59
|
+
message:
|
|
60
|
+
"A network error occurred during authentication. Please check your connection and try again.",
|
|
61
|
+
},
|
|
62
|
+
token_expired: {
|
|
63
|
+
message: "Your authentication session has expired. Please sign in again.",
|
|
64
|
+
},
|
|
65
|
+
configuration_error: {
|
|
66
|
+
message:
|
|
67
|
+
"There is an issue with the authentication configuration. Please contact support.",
|
|
68
|
+
},
|
|
69
|
+
unknown_error: {
|
|
70
|
+
message:
|
|
71
|
+
"An unexpected error occurred during authentication. Please try again or contact support.",
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export function OAuthErrorPage({ error }: { error: any }) {
|
|
76
|
+
const { login } = useAuth();
|
|
77
|
+
|
|
78
|
+
if (!(error instanceof OAuthAuthorizationError)) {
|
|
79
|
+
throw error;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const oauthError = error.error;
|
|
83
|
+
const type = oauthError.error;
|
|
84
|
+
|
|
85
|
+
const details = errorDetailsMap[type] ?? errorDetailsMap.unknown_error;
|
|
86
|
+
|
|
87
|
+
return (
|
|
88
|
+
<div className="min-h-[400px] flex items-center justify-center p-4">
|
|
89
|
+
<div className="max-w-md w-full text-center space-y-6">
|
|
90
|
+
<div className="space-y-4 items-center">
|
|
91
|
+
<Heading level={2} className="text-2xl inline-block font-bold">
|
|
92
|
+
{titles[type] || "Authentication Error"}
|
|
93
|
+
</Heading>
|
|
94
|
+
|
|
95
|
+
<Typography className="text-gray-600 dark:text-gray-300 leading-relaxed">
|
|
96
|
+
{details?.message}
|
|
97
|
+
</Typography>
|
|
98
|
+
|
|
99
|
+
{/* Technical details for developers (only in development) */}
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
{/* Action Buttons */}
|
|
103
|
+
<div className="space-y-3 pt-4">
|
|
104
|
+
<div className="space-y-2">
|
|
105
|
+
{(type === "access_denied" ||
|
|
106
|
+
type === "invalid_grant" ||
|
|
107
|
+
type === "token_expired") && (
|
|
108
|
+
<Button
|
|
109
|
+
onClick={login}
|
|
110
|
+
className="w-full capitalize"
|
|
111
|
+
variant={"default"}
|
|
112
|
+
>
|
|
113
|
+
Sign in again
|
|
114
|
+
</Button>
|
|
115
|
+
)}
|
|
116
|
+
</div>
|
|
117
|
+
|
|
118
|
+
<div className="flex gap-2">
|
|
119
|
+
<Button asChild className="flex-1" variant="outline">
|
|
120
|
+
<Link to="/">
|
|
121
|
+
<HomeIcon className="w-4 h-4 mr-2" />
|
|
122
|
+
Go Home
|
|
123
|
+
</Link>
|
|
124
|
+
</Button>
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
|
|
128
|
+
{/* Additional Help */}
|
|
129
|
+
{helpMessages[type] && (
|
|
130
|
+
<Typography className="text-sm text-gray-500 dark:text-gray-400">
|
|
131
|
+
{helpMessages[type]}
|
|
132
|
+
</Typography>
|
|
133
|
+
)}
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
const titles: Record<string, string> = {
|
|
140
|
+
access_denied: "Access Denied",
|
|
141
|
+
invalid_request: "Invalid Request",
|
|
142
|
+
unauthorized_client: "Unauthorized Application",
|
|
143
|
+
unsupported_response_type: "Unsupported Method",
|
|
144
|
+
invalid_scope: "Invalid Permissions",
|
|
145
|
+
server_error: "Server Error",
|
|
146
|
+
temporarily_unavailable: "Service Unavailable",
|
|
147
|
+
invalid_client: "Invalid Credentials",
|
|
148
|
+
invalid_grant: "Authentication Expired",
|
|
149
|
+
unsupported_grant_type: "Unsupported Authentication",
|
|
150
|
+
invalid_state: "Security Check Failed",
|
|
151
|
+
missing_code_verifier: "Security Information Missing",
|
|
152
|
+
network_error: "Network Error",
|
|
153
|
+
token_expired: "Session Expired",
|
|
154
|
+
configuration_error: "Configuration Error",
|
|
155
|
+
unknown_error: "Authentication Failed",
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
const helpMessages: Record<string, string> = {
|
|
159
|
+
access_denied:
|
|
160
|
+
"If you changed your mind, you can try signing in again to grant access.",
|
|
161
|
+
invalid_state:
|
|
162
|
+
"This error can occur if you have multiple tabs open or if your session was compromised.",
|
|
163
|
+
missing_code_verifier:
|
|
164
|
+
"Try clearing your browser's cache and cookies for this site.",
|
|
165
|
+
network_error:
|
|
166
|
+
"Check your internet connection and ensure you can access other websites.",
|
|
167
|
+
server_error:
|
|
168
|
+
"The issue is on our end. Our team has been notified and is working to fix it.",
|
|
169
|
+
temporarily_unavailable:
|
|
170
|
+
"This is usually temporary. Try again in a few minutes.",
|
|
171
|
+
};
|
|
@@ -1,21 +1,35 @@
|
|
|
1
|
-
|
|
1
|
+
import type { OAuth2Error } from "oauth4webapi";
|
|
2
|
+
import { ZudokuError, type ZudokuErrorOptions } from "../util/invariant.js";
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
readonly error: string;
|
|
5
|
-
readonly error_description?: string;
|
|
6
|
-
readonly error_uri?: string;
|
|
7
|
-
readonly algs?: string;
|
|
8
|
-
readonly scope?: string;
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10
|
-
readonly [parameter: string]: any | undefined;
|
|
11
|
-
}
|
|
4
|
+
export class AuthorizationError extends Error {}
|
|
12
5
|
|
|
13
|
-
export class OAuthAuthorizationError extends
|
|
6
|
+
export class OAuthAuthorizationError extends ZudokuError {
|
|
14
7
|
constructor(
|
|
15
8
|
message: string,
|
|
16
|
-
public error:
|
|
17
|
-
options?:
|
|
9
|
+
public error: OAuth2Error,
|
|
10
|
+
options?: ZudokuErrorOptions,
|
|
18
11
|
) {
|
|
19
12
|
super(message, options);
|
|
20
13
|
}
|
|
21
14
|
}
|
|
15
|
+
|
|
16
|
+
export type OAuthErrorType =
|
|
17
|
+
// Authorization errors
|
|
18
|
+
| "invalid_request"
|
|
19
|
+
| "unauthorized_client"
|
|
20
|
+
| "access_denied"
|
|
21
|
+
| "unsupported_response_type"
|
|
22
|
+
| "invalid_scope"
|
|
23
|
+
| "server_error"
|
|
24
|
+
| "temporarily_unavailable"
|
|
25
|
+
// Token errors
|
|
26
|
+
| "invalid_client"
|
|
27
|
+
| "invalid_grant"
|
|
28
|
+
| "unsupported_grant_type"
|
|
29
|
+
// Custom errors
|
|
30
|
+
| "invalid_state"
|
|
31
|
+
| "missing_code_verifier"
|
|
32
|
+
| "network_error"
|
|
33
|
+
| "token_expired"
|
|
34
|
+
| "configuration_error"
|
|
35
|
+
| "unknown_error";
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { useZudoku } from "../components/context/ZudokuContext.js";
|
|
2
2
|
import { useAuthState } from "./state.js";
|
|
3
3
|
|
|
4
|
+
export type UseAuthReturn = ReturnType<typeof useAuth>;
|
|
5
|
+
|
|
4
6
|
export const useAuth = () => {
|
|
5
7
|
const { authentication } = useZudoku();
|
|
6
8
|
const authState = useAuthState();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AuthenticationResult, EventMessage } from "@azure/msal-browser";
|
|
2
2
|
import { EventType, PublicClientApplication } from "@azure/msal-browser";
|
|
3
|
+
import { ErrorBoundary } from "react-error-boundary";
|
|
3
4
|
import { type AzureB2CAuthenticationConfig } from "../../../config/config.js";
|
|
4
5
|
import { ClientOnly } from "../../components/ClientOnly.js";
|
|
5
6
|
import { joinUrl } from "../../util/joinUrl.js";
|
|
@@ -7,12 +8,12 @@ import {
|
|
|
7
8
|
type AuthenticationPlugin,
|
|
8
9
|
type AuthenticationProviderInitializer,
|
|
9
10
|
} from "../authentication.js";
|
|
11
|
+
import { CoreAuthenticationPlugin } from "../AuthenticationPlugin.js";
|
|
10
12
|
import { CallbackHandler } from "../components/CallbackHandler.js";
|
|
13
|
+
import { OAuthErrorPage } from "../components/OAuthErrorPage.js";
|
|
11
14
|
import { AuthorizationError } from "../errors.js";
|
|
12
15
|
import { useAuthState } from "../state.js";
|
|
13
16
|
|
|
14
|
-
import { CoreAuthenticationPlugin } from "../AuthenticationPlugin.js";
|
|
15
|
-
|
|
16
17
|
const AZUREB2C_CALLBACK_PATH = "/oauth/callback";
|
|
17
18
|
|
|
18
19
|
export class AzureB2CAuthPlugin
|
|
@@ -181,7 +182,11 @@ export class AzureB2CAuthPlugin
|
|
|
181
182
|
path: AZUREB2C_CALLBACK_PATH,
|
|
182
183
|
element: (
|
|
183
184
|
<ClientOnly>
|
|
184
|
-
<
|
|
185
|
+
<ErrorBoundary
|
|
186
|
+
fallbackRender={({ error }) => <OAuthErrorPage error={error} />}
|
|
187
|
+
>
|
|
188
|
+
<CallbackHandler handleCallback={this.handleCallback} />
|
|
189
|
+
</ErrorBoundary>
|
|
185
190
|
</ClientOnly>
|
|
186
191
|
),
|
|
187
192
|
},
|
|
@@ -15,6 +15,7 @@ const clerkAuth: AuthenticationProviderInitializer<
|
|
|
15
15
|
ClerkAuthenticationConfig
|
|
16
16
|
> = ({
|
|
17
17
|
clerkPubKey,
|
|
18
|
+
jwtTemplateName,
|
|
18
19
|
redirectToAfterSignOut = "/",
|
|
19
20
|
redirectToAfterSignUp,
|
|
20
21
|
redirectToAfterSignIn,
|
|
@@ -61,7 +62,9 @@ const clerkAuth: AuthenticationProviderInitializer<
|
|
|
61
62
|
if (!clerkApi?.session) {
|
|
62
63
|
throw new Error("No session available");
|
|
63
64
|
}
|
|
64
|
-
const response = await clerkApi.session.getToken(
|
|
65
|
+
const response = await clerkApi.session.getToken({
|
|
66
|
+
template: jwtTemplateName,
|
|
67
|
+
});
|
|
65
68
|
if (!response) {
|
|
66
69
|
throw new Error("Could not get access token from Clerk");
|
|
67
70
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import logger from "loglevel";
|
|
2
2
|
import * as oauth from "oauth4webapi";
|
|
3
|
+
import { ErrorBoundary } from "react-error-boundary";
|
|
3
4
|
import { type OpenIDAuthenticationConfig } from "../../../config/config.js";
|
|
4
5
|
import { ClientOnly } from "../../components/ClientOnly.js";
|
|
5
6
|
import { joinUrl } from "../../util/joinUrl.js";
|
|
@@ -9,6 +10,7 @@ import {
|
|
|
9
10
|
} from "../authentication.js";
|
|
10
11
|
import { CoreAuthenticationPlugin } from "../AuthenticationPlugin.js";
|
|
11
12
|
import { CallbackHandler } from "../components/CallbackHandler.js";
|
|
13
|
+
import { OAuthErrorPage } from "../components/OAuthErrorPage.js";
|
|
12
14
|
import { AuthorizationError, OAuthAuthorizationError } from "../errors.js";
|
|
13
15
|
import { useAuthState, type UserProfile } from "../state.js";
|
|
14
16
|
|
|
@@ -442,7 +444,11 @@ export class OpenIDAuthenticationProvider
|
|
|
442
444
|
path: OPENID_CALLBACK_PATH,
|
|
443
445
|
element: (
|
|
444
446
|
<ClientOnly>
|
|
445
|
-
<
|
|
447
|
+
<ErrorBoundary
|
|
448
|
+
fallbackRender={({ error }) => <OAuthErrorPage error={error} />}
|
|
449
|
+
>
|
|
450
|
+
<CallbackHandler handleCallback={this.handleCallback} />
|
|
451
|
+
</ErrorBoundary>
|
|
446
452
|
</ClientOnly>
|
|
447
453
|
),
|
|
448
454
|
},
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useQuery } from "@tanstack/react-query";
|
|
2
2
|
import { CircleFadingArrowUpIcon, LoaderCircleIcon } from "lucide-react";
|
|
3
|
+
import { useEffect } from "react";
|
|
3
4
|
import { z } from "zod/v4";
|
|
4
5
|
import { Button } from "../ui/Button.js";
|
|
5
6
|
|
|
@@ -11,17 +12,17 @@ const BuildStatusSchema = z.object({
|
|
|
11
12
|
|
|
12
13
|
export const BuildCheck = ({
|
|
13
14
|
buildId,
|
|
15
|
+
environmentType,
|
|
14
16
|
endpoint = "/__zuplo/docs",
|
|
15
17
|
}: {
|
|
16
18
|
buildId?: string;
|
|
19
|
+
environmentType?: string;
|
|
17
20
|
endpoint?: string;
|
|
18
21
|
}) => {
|
|
19
22
|
const buildStatusQuery = useQuery({
|
|
20
23
|
queryKey: ["zuplo-build-check", buildId, endpoint],
|
|
21
24
|
refetchInterval: 3000,
|
|
22
|
-
enabled:
|
|
23
|
-
typeof buildId !== "undefined" &&
|
|
24
|
-
import.meta.env.ZUPLO_ENVIRONMENT_TYPE === "WORKING_COPY",
|
|
25
|
+
enabled: buildId !== undefined && environmentType === "WORKING_COPY",
|
|
25
26
|
retry: false,
|
|
26
27
|
queryFn: () =>
|
|
27
28
|
fetch(endpoint, { signal: AbortSignal.timeout(2000) })
|
|
@@ -32,6 +33,15 @@ export const BuildCheck = ({
|
|
|
32
33
|
.then((data) => BuildStatusSchema.parse(data)),
|
|
33
34
|
});
|
|
34
35
|
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
if (
|
|
38
|
+
buildStatusQuery.data?.status === "success" &&
|
|
39
|
+
buildStatusQuery.data.buildId
|
|
40
|
+
) {
|
|
41
|
+
document.cookie = `zuplo-build=${buildStatusQuery.data.buildId}; path=/; max-age=300; secure; SameSite=None`;
|
|
42
|
+
}
|
|
43
|
+
}, [buildStatusQuery.data]);
|
|
44
|
+
|
|
35
45
|
if (
|
|
36
46
|
buildStatusQuery.isError ||
|
|
37
47
|
!buildStatusQuery.data ||
|
|
@@ -90,9 +90,9 @@ export const Header = memo(function HeaderInner() {
|
|
|
90
90
|
<PageProgress />
|
|
91
91
|
<div className="max-w-screen-2xl mx-auto flex items-center justify-between h-(--top-header-height) px-4 lg:px-8 border-transparent">
|
|
92
92
|
<div className="flex">
|
|
93
|
-
<Link to="/">
|
|
93
|
+
<Link to={site?.logo?.href ?? "/"}>
|
|
94
94
|
<div className="flex items-center gap-3.5">
|
|
95
|
-
{site?.logo
|
|
95
|
+
{site?.logo ? (
|
|
96
96
|
<>
|
|
97
97
|
<img
|
|
98
98
|
src={logoLightSrc}
|
|
@@ -109,8 +109,9 @@ export const Header = memo(function HeaderInner() {
|
|
|
109
109
|
loading="lazy"
|
|
110
110
|
/>
|
|
111
111
|
</>
|
|
112
|
+
) : (
|
|
113
|
+
<span className="font-semibold text-2xl">{site?.title}</span>
|
|
112
114
|
)}
|
|
113
|
-
<span className="font-semibold text-2xl">{site?.title}</span>
|
|
114
115
|
</div>
|
|
115
116
|
</Link>
|
|
116
117
|
</div>
|
|
@@ -66,7 +66,7 @@ export const Heading = ({
|
|
|
66
66
|
return (
|
|
67
67
|
<Component
|
|
68
68
|
className={heading({
|
|
69
|
-
className: cn(
|
|
69
|
+
className: cn("flex items-center gap-[0.33em]", className),
|
|
70
70
|
level,
|
|
71
71
|
})}
|
|
72
72
|
ref={registerNavigationAnchor ? ref : undefined}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { Helmet } from "@zudoku/react-helmet-async";
|
|
2
1
|
import { Suspense, useEffect, type ReactNode } from "react";
|
|
3
|
-
import { Outlet
|
|
2
|
+
import { Outlet } from "react-router";
|
|
4
3
|
import { cn } from "../util/cn.js";
|
|
5
|
-
import { joinUrl } from "../util/joinUrl.js";
|
|
6
4
|
import { useScrollToAnchor } from "../util/useScrollToAnchor.js";
|
|
7
5
|
import { useScrollToTop } from "../util/useScrollToTop.js";
|
|
8
6
|
import { useZudoku } from "./context/ZudokuContext.js";
|
|
@@ -19,8 +17,7 @@ const LoadingFallback = () => (
|
|
|
19
17
|
);
|
|
20
18
|
|
|
21
19
|
export const Layout = ({ children }: { children?: ReactNode }) => {
|
|
22
|
-
const {
|
|
23
|
-
const location = useLocation();
|
|
20
|
+
const { authentication } = useZudoku();
|
|
24
21
|
|
|
25
22
|
useScrollToAnchor();
|
|
26
23
|
useScrollToTop();
|
|
@@ -32,22 +29,6 @@ export const Layout = ({ children }: { children?: ReactNode }) => {
|
|
|
32
29
|
|
|
33
30
|
return (
|
|
34
31
|
<>
|
|
35
|
-
<Helmet titleTemplate={meta?.title}>
|
|
36
|
-
{options.canonicalUrlOrigin && (
|
|
37
|
-
<link
|
|
38
|
-
rel="canonical"
|
|
39
|
-
href={joinUrl(
|
|
40
|
-
options.canonicalUrlOrigin,
|
|
41
|
-
options.basePath,
|
|
42
|
-
location.pathname,
|
|
43
|
-
)}
|
|
44
|
-
/>
|
|
45
|
-
)}
|
|
46
|
-
{meta?.description && (
|
|
47
|
-
<meta name="description" content={meta.description} />
|
|
48
|
-
)}
|
|
49
|
-
{meta?.favicon && <link rel="icon" href={meta.favicon} />}
|
|
50
|
-
</Helmet>
|
|
51
32
|
<Slot.Target name="layout-before-head" />
|
|
52
33
|
<Header />
|
|
53
34
|
<Slot.Target name="layout-after-head" />
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { memo, useMemo } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import ReactMarkdown, { type Components } from "react-markdown";
|
|
3
3
|
import rehypeRaw from "rehype-raw";
|
|
4
4
|
import remarkGfm from "remark-gfm";
|
|
5
5
|
import { createConfiguredShikiRehypePlugins } from "../shiki.js";
|
|
@@ -35,13 +35,13 @@ export const Markdown = memo(
|
|
|
35
35
|
|
|
36
36
|
return (
|
|
37
37
|
<Typography className={className}>
|
|
38
|
-
<
|
|
38
|
+
<ReactMarkdown
|
|
39
39
|
remarkPlugins={remarkPlugins}
|
|
40
40
|
rehypePlugins={rehypePlugins}
|
|
41
41
|
components={mdComponents}
|
|
42
42
|
>
|
|
43
43
|
{content}
|
|
44
|
-
</
|
|
44
|
+
</ReactMarkdown>
|
|
45
45
|
</Typography>
|
|
46
46
|
);
|
|
47
47
|
},
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Helmet } from "@zudoku/react-helmet-async";
|
|
2
|
+
import type { PropsWithChildren } from "react";
|
|
3
|
+
import { useLocation } from "react-router";
|
|
4
|
+
import { joinUrl } from "../util/joinUrl.js";
|
|
5
|
+
import { useZudoku } from "./context/ZudokuContext.js";
|
|
6
|
+
|
|
7
|
+
export const Meta = ({ children }: PropsWithChildren) => {
|
|
8
|
+
const { meta, options } = useZudoku();
|
|
9
|
+
const location = useLocation();
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<>
|
|
13
|
+
<Helmet titleTemplate={meta?.title} defaultTitle={meta?.defaultTitle}>
|
|
14
|
+
{options.canonicalUrlOrigin && (
|
|
15
|
+
<link
|
|
16
|
+
rel="canonical"
|
|
17
|
+
href={joinUrl(
|
|
18
|
+
options.canonicalUrlOrigin,
|
|
19
|
+
options.basePath,
|
|
20
|
+
location.pathname,
|
|
21
|
+
)}
|
|
22
|
+
/>
|
|
23
|
+
)}
|
|
24
|
+
{meta?.description && (
|
|
25
|
+
<meta name="description" content={meta.description} />
|
|
26
|
+
)}
|
|
27
|
+
{meta?.favicon && <link rel="icon" href={meta.favicon} />}
|
|
28
|
+
</Helmet>
|
|
29
|
+
{children}
|
|
30
|
+
</>
|
|
31
|
+
);
|
|
32
|
+
};
|