zudoku 0.0.0-f3d517c → 0.0.0-f40ea27
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/ZuploBuildConfig.d.ts +11 -121
- package/dist/app/ZuploBuildConfig.js +8 -8
- package/dist/app/ZuploBuildConfig.js.map +1 -1
- package/dist/app/demo.js +6 -5
- package/dist/app/demo.js.map +1 -1
- package/dist/app/entry.client.d.ts +0 -2
- package/dist/app/entry.client.js +0 -2
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/entry.server.d.ts +0 -2
- package/dist/app/entry.server.js +0 -2
- package/dist/app/entry.server.js.map +1 -1
- package/dist/app/env.d.ts +7 -7
- package/dist/app/env.js +8 -0
- package/dist/app/env.js.map +1 -1
- package/dist/app/main.d.ts +1 -0
- package/dist/app/main.js +12 -11
- package/dist/app/main.js.map +1 -1
- package/dist/app/standalone.js +7 -6
- package/dist/app/standalone.js.map +1 -1
- package/dist/config/loader.js +2 -3
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/BuildSchema.d.ts +20 -44
- package/dist/config/validators/BuildSchema.js +3 -14
- package/dist/config/validators/BuildSchema.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.d.ts +7369 -0
- package/dist/config/validators/InputNavigationSchema.js +74 -0
- package/dist/config/validators/InputNavigationSchema.js.map +1 -0
- package/dist/config/validators/InputNavigationSchema.test-d.d.ts +1 -0
- package/dist/config/validators/InputNavigationSchema.test-d.js +146 -0
- package/dist/config/validators/InputNavigationSchema.test-d.js.map +1 -0
- package/dist/config/validators/NavigationSchema.d.ts +44 -0
- package/dist/config/validators/NavigationSchema.js +95 -0
- package/dist/config/validators/NavigationSchema.js.map +1 -0
- package/dist/config/validators/icon-types.d.ts +2 -1
- package/dist/config/validators/icon-types.js +1813 -1
- package/dist/config/validators/icon-types.js.map +1 -1
- package/dist/config/validators/validate.d.ts +471 -5556
- package/dist/config/validators/validate.js +80 -69
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/config/validators/validate.test.js +0 -2
- package/dist/config/validators/validate.test.js.map +1 -1
- package/dist/flat-config.d.ts +325 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/auth/issuer.js +4 -1
- package/dist/lib/auth/issuer.js.map +1 -1
- package/dist/lib/auth/issuer.test.js +14 -1
- package/dist/lib/auth/issuer.test.js.map +1 -1
- package/dist/lib/authentication/components/CallbackHandler.js +1 -1
- package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
- package/dist/lib/components/Autocomplete.js +2 -2
- package/dist/lib/components/Autocomplete.js.map +1 -1
- package/dist/lib/components/Banner.js +1 -1
- package/dist/lib/components/Banner.js.map +1 -1
- package/dist/lib/components/BuildCheck.js +1 -1
- package/dist/lib/components/BuildCheck.js.map +1 -1
- package/dist/lib/components/ErrorPage.js +2 -2
- package/dist/lib/components/ErrorPage.js.map +1 -1
- package/dist/lib/components/Footer.js +1 -1
- package/dist/lib/components/Footer.js.map +1 -1
- package/dist/lib/components/Framed.d.ts +7 -0
- package/dist/lib/components/Framed.js +26 -0
- package/dist/lib/components/Framed.js.map +1 -0
- package/dist/lib/components/Header.js +19 -18
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +6 -2
- package/dist/lib/components/Heading.js +2 -2
- package/dist/lib/components/Heading.js.map +1 -1
- package/dist/lib/components/Main.js +4 -4
- package/dist/lib/components/Main.js.map +1 -1
- package/dist/lib/components/Markdown.d.ts +0 -1
- package/dist/lib/components/Markdown.js +2 -3
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +6 -5
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/NotFoundPage.js +2 -2
- package/dist/lib/components/NotFoundPage.js.map +1 -1
- package/dist/lib/components/PageProgress.d.ts +1 -0
- package/dist/lib/components/PageProgress.js +20 -0
- package/dist/lib/components/PageProgress.js.map +1 -0
- package/dist/lib/components/Pagination.js +1 -1
- package/dist/lib/components/Pagination.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +2 -3
- package/dist/lib/components/TopNavigation.js +45 -44
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Typography.d.ts +5 -0
- package/dist/lib/components/Typography.js +8 -0
- package/dist/lib/components/Typography.js.map +1 -0
- package/dist/lib/components/context/ZudokuContext.d.ts +3 -7
- package/dist/lib/components/context/ZudokuContext.js +44 -26
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +4 -0
- package/dist/lib/components/index.js +2 -0
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/Navigation.d.ts +5 -0
- package/dist/lib/components/navigation/Navigation.js +12 -0
- package/dist/lib/components/navigation/Navigation.js.map +1 -0
- package/dist/lib/components/navigation/{SidebarBadge.d.ts → NavigationBadge.d.ts} +1 -1
- package/dist/lib/components/navigation/{SidebarBadge.js → NavigationBadge.js} +2 -2
- package/dist/lib/components/navigation/NavigationBadge.js.map +1 -0
- package/dist/lib/components/navigation/NavigationCategory.d.ts +5 -0
- package/dist/lib/components/navigation/{SidebarCategory.js → NavigationCategory.js} +14 -12
- package/dist/lib/components/navigation/NavigationCategory.js.map +1 -0
- package/dist/lib/components/navigation/NavigationItem.d.ts +6 -0
- package/dist/lib/components/navigation/NavigationItem.js +47 -0
- package/dist/lib/components/navigation/NavigationItem.js.map +1 -0
- package/dist/lib/components/navigation/{SidebarWrapper.d.ts → NavigationWrapper.d.ts} +1 -1
- package/dist/lib/components/navigation/{SidebarWrapper.js → NavigationWrapper.js} +4 -4
- package/dist/lib/components/navigation/NavigationWrapper.js.map +1 -0
- package/dist/lib/components/navigation/utils.d.ts +7 -9
- package/dist/lib/components/navigation/utils.js +17 -17
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +10 -12
- package/dist/lib/core/ZudokuContext.js +7 -9
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +2 -2
- package/dist/lib/errors/ErrorAlert.js +2 -3
- package/dist/lib/errors/ErrorAlert.js.map +1 -1
- package/dist/lib/hooks/useEvent.test.js +5 -3
- package/dist/lib/hooks/useEvent.test.js.map +1 -1
- package/dist/lib/hooks/useHotkey.d.ts +4 -0
- package/dist/lib/hooks/useHotkey.js +58 -0
- package/dist/lib/hooks/useHotkey.js.map +1 -0
- package/dist/lib/plugins/api-catalog/Catalog.d.ts +1 -1
- package/dist/lib/plugins/api-catalog/index.d.ts +6 -6
- package/dist/lib/plugins/api-catalog/index.js +10 -10
- package/dist/lib/plugins/api-catalog/index.js.map +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +12 -15
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.js +24 -5
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/custom-pages/index.d.ts +4 -6
- package/dist/lib/plugins/custom-pages/index.js +15 -10
- package/dist/lib/plugins/custom-pages/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.d.ts +1 -2
- package/dist/lib/plugins/markdown/MdxPage.js +28 -9
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +10 -2
- package/dist/lib/plugins/markdown/index.js +9 -26
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +2 -3
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +2 -2
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaList.js +2 -3
- package/dist/lib/plugins/openapi/SchemaList.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 +3 -3
- package/dist/lib/plugins/openapi/graphql/graphql.js +2 -2
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.d.ts +3 -3
- package/dist/lib/plugins/openapi/index.js +9 -9
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +3 -3
- package/dist/lib/plugins/openapi/playground/BodyPanel.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/BodyPanel.js +16 -12
- package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +11 -0
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +2 -2
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.d.ts +3 -2
- package/dist/lib/plugins/openapi/playground/Headers.js +52 -30
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js +2 -1
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js +1 -2
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/InlineInput.js +1 -1
- package/dist/lib/plugins/openapi/playground/InlineInput.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js +2 -2
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js +1 -2
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +47 -34
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/QueryParams.js +38 -23
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Spinner.d.ts +2 -0
- package/dist/lib/plugins/openapi/playground/Spinner.js +63 -0
- package/dist/lib/plugins/openapi/playground/Spinner.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.d.ts +3 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js +13 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js +12 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.d.ts +12 -0
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js +11 -0
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js +69 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +7 -4
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +25 -32
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +4 -2
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +8 -10
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +3 -3
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +2 -3
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js +5 -5
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/utils.js +3 -2
- package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
- package/dist/lib/plugins/openapi/util/createNavigationCategory.d.ts +9 -0
- package/dist/lib/plugins/openapi/util/{createSidebarCategory.js → createNavigationCategory.js} +5 -4
- package/dist/lib/plugins/openapi/util/createNavigationCategory.js.map +1 -0
- package/dist/lib/plugins/openapi/util/getRoutes.js +2 -2
- package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
- package/dist/lib/plugins/openapi/util/methodColorMap.d.ts +1 -1
- package/dist/lib/ui/Alert.d.ts +5 -4
- package/dist/lib/ui/Alert.js +12 -10
- package/dist/lib/ui/Alert.js.map +1 -1
- package/dist/lib/ui/CodeBlock.d.ts +1 -2
- package/dist/lib/ui/CodeBlock.js +10 -11
- package/dist/lib/ui/CodeBlock.js.map +1 -1
- package/dist/lib/ui/Dialog.js +1 -1
- package/dist/lib/ui/Dialog.js.map +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.d.ts +15 -0
- package/dist/lib/ui/EmbeddedCodeBlock.js +18 -0
- package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -0
- package/dist/lib/ui/Select.js +1 -1
- package/dist/lib/ui/SyntaxHighlight.d.ts +3 -1
- package/dist/lib/ui/SyntaxHighlight.js +3 -2
- package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
- package/dist/lib/util/MdxComponents.d.ts +9 -1
- package/dist/lib/util/MdxComponents.js +4 -2
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/os.d.ts +2 -0
- package/dist/lib/util/os.js +21 -0
- package/dist/lib/util/os.js.map +1 -0
- package/dist/lib/util/useCopyToClipboard.d.ts +1 -0
- package/dist/lib/util/useCopyToClipboard.js +11 -0
- package/dist/lib/util/useCopyToClipboard.js.map +1 -0
- package/dist/lib/util/useScrollToAnchor.js +3 -3
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/vite/api/SchemaManager.d.ts +4 -4
- package/dist/vite/api/SchemaManager.js +25 -21
- package/dist/vite/api/SchemaManager.js.map +1 -1
- package/dist/vite/api/SchemaManager.test.js +4 -4
- package/dist/vite/api/SchemaManager.test.js.map +1 -1
- package/dist/vite/api/schema-codegen.js +42 -11
- package/dist/vite/api/schema-codegen.js.map +1 -1
- package/dist/vite/api/schema-codegen.test.js +82 -0
- package/dist/vite/api/schema-codegen.test.js.map +1 -1
- package/dist/vite/build.js +1 -1
- package/dist/vite/config.js +12 -2
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/css/plugin.js +11 -0
- package/dist/vite/css/plugin.js.map +1 -1
- package/dist/vite/dev-server.js +1 -1
- package/dist/vite/mdx/remark-last-modified.d.ts +3 -0
- package/dist/vite/mdx/remark-last-modified.js +56 -0
- package/dist/vite/mdx/remark-last-modified.js.map +1 -0
- package/dist/vite/mdx/utils.d.ts +2 -0
- package/dist/vite/mdx/utils.js +31 -0
- package/dist/vite/mdx/utils.js.map +1 -0
- package/dist/vite/plugin-api.js +8 -8
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-config-reload.js +2 -0
- package/dist/vite/plugin-config-reload.js.map +1 -1
- package/dist/vite/plugin-custom-pages.js +2 -2
- package/dist/vite/plugin-custom-pages.js.map +1 -1
- package/dist/vite/plugin-docs.js +61 -59
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-frontmatter.js +6 -2
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-mdx.js +15 -35
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/{plugin-sidebar.d.ts → plugin-navigation.d.ts} +1 -1
- package/dist/vite/{plugin-sidebar.js → plugin-navigation.js} +20 -19
- package/dist/vite/plugin-navigation.js.map +1 -0
- package/dist/vite/plugin-theme.d.ts +8 -0
- package/dist/vite/plugin-theme.js +235 -0
- package/dist/vite/plugin-theme.js.map +1 -0
- package/dist/vite/plugin-theme.test.d.ts +1 -0
- package/dist/vite/plugin-theme.test.js +291 -0
- package/dist/vite/plugin-theme.test.js.map +1 -0
- package/dist/vite/plugin.js +4 -6
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/shadcn-registry.d.ts +45 -0
- package/dist/vite/shadcn-registry.js +29 -0
- package/dist/vite/shadcn-registry.js.map +1 -0
- package/lib/Alert-CT_ViLrJ.js +161 -0
- package/lib/Alert-CT_ViLrJ.js.map +1 -0
- package/lib/CodeBlock-DAKxs_Tu.js +85 -0
- package/lib/CodeBlock-DAKxs_Tu.js.map +1 -0
- package/lib/Command-xsbs2uhf.js +140 -0
- package/lib/Command-xsbs2uhf.js.map +1 -0
- package/lib/{Dialog-BxpuVLh9.js → Dialog-CiIdyz6a.js} +5 -5
- package/lib/Dialog-CiIdyz6a.js.map +1 -0
- package/lib/Drawer-BzkOKwgC.js.map +1 -1
- package/lib/MdxPage-swXPJ0gf.js +110 -0
- package/lib/MdxPage-swXPJ0gf.js.map +1 -0
- package/lib/OasProvider-CDAM3TB1.js +35 -0
- package/lib/OasProvider-CDAM3TB1.js.map +1 -0
- package/lib/{OperationList-BISd29LY.js → OperationList-C9Hb9ql8.js} +582 -569
- package/lib/OperationList-C9Hb9ql8.js.map +1 -0
- package/lib/Pagination-VGlgeCmS.js +36 -0
- package/lib/Pagination-VGlgeCmS.js.map +1 -0
- package/lib/RouteGuard-CbKd7_9h.js +737 -0
- package/lib/RouteGuard-CbKd7_9h.js.map +1 -0
- package/lib/{SchemaList-BqnRo5ov.js → SchemaList-BAbh1BXO.js} +32 -43
- package/lib/SchemaList-BAbh1BXO.js.map +1 -0
- package/lib/{SchemaView-CtYJpxQI.js → SchemaView-C2Io712T.js} +95 -104
- package/lib/SchemaView-C2Io712T.js.map +1 -0
- package/lib/{SignUp-CrjeBbqN.js → SignUp-5RUdVhnq.js} +13 -13
- package/lib/{SignUp-CrjeBbqN.js.map → SignUp-5RUdVhnq.js.map} +1 -1
- package/lib/{Markdown-BUE2ViaD.js → Slot-DwZlQ-vX.js} +3320 -2937
- package/lib/Slot-DwZlQ-vX.js.map +1 -0
- package/lib/{SyntaxHighlight-DtvR7RLF.js → SyntaxHighlight-CrjhGEwT.js} +717 -716
- package/lib/{SyntaxHighlight-DtvR7RLF.js.map → SyntaxHighlight-CrjhGEwT.js.map} +1 -1
- package/lib/{Toc-ClJBmdtI.js → Toc-WCmwFkX-.js} +2 -2
- package/lib/{Toc-ClJBmdtI.js.map → Toc-WCmwFkX-.js.map} +1 -1
- package/lib/{chunk-DQRVZFIR-BblmKnHy.js → chunk-DQRVZFIR-DHK7_Ilc.js} +7 -7
- package/lib/{chunk-DQRVZFIR-BblmKnHy.js.map → chunk-DQRVZFIR-DHK7_Ilc.js.map} +1 -1
- package/lib/{circular-pOdgLzpG.js → circular-B42RaanD.js} +2 -2
- package/lib/{circular-pOdgLzpG.js.map → circular-B42RaanD.js.map} +1 -1
- package/lib/clerk-BDZ31hjU.js +25190 -0
- package/lib/clerk-BDZ31hjU.js.map +1 -0
- package/lib/{createServer-qAtUf99r.js → createServer-BKFsRuuk.js} +6 -6
- package/lib/{createServer-qAtUf99r.js.map → createServer-BKFsRuuk.js.map} +1 -1
- package/lib/{errors-Bpodza84.js → errors-CF2X_x5o.js} +12 -12
- package/lib/{errors-Bpodza84.js.map → errors-CF2X_x5o.js.map} +1 -1
- package/lib/hook-Bd0yS8M0.js +1503 -0
- package/lib/hook-Bd0yS8M0.js.map +1 -0
- package/lib/index-B6Re5_cx.js +3469 -0
- package/lib/index-B6Re5_cx.js.map +1 -0
- package/lib/index-CLy1XyH0.js +3919 -0
- package/lib/index-CLy1XyH0.js.map +1 -0
- package/lib/{index-BvvmIczU.js → index-CcV90rin.js} +2 -2
- package/lib/{index-BvvmIczU.js.map → index-CcV90rin.js.map} +1 -1
- package/lib/index-ClhS5TxS.js +107 -0
- package/lib/index-ClhS5TxS.js.map +1 -0
- package/lib/index-CrcNWbel.js.map +1 -1
- package/lib/{index-zddirpDj.js → index-DmNq2fbN.js} +226 -221
- package/lib/index-DmNq2fbN.js.map +1 -0
- package/lib/ui/Alert.js +54 -38
- package/lib/ui/Alert.js.map +1 -1
- package/lib/ui/CodeBlock.js +6 -81
- package/lib/ui/CodeBlock.js.map +1 -1
- package/lib/ui/Command.js +1 -1
- package/lib/ui/Dialog.js +23 -23
- package/lib/ui/Dialog.js.map +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +80 -0
- package/lib/ui/EmbeddedCodeBlock.js.map +1 -0
- package/lib/ui/Select.js +1 -1
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +5 -4
- package/lib/ui/SyntaxHighlight.js.map +1 -1
- package/lib/{useExposedProps-BZQkZneR.js → useExposedProps-BIYjecPD.js} +2 -2
- package/lib/{useExposedProps-BZQkZneR.js.map → useExposedProps-BIYjecPD.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-azureb2c.js +2 -2
- package/lib/zudoku.auth-clerk.js +3 -3
- package/lib/zudoku.auth-openid.js +2 -2
- package/lib/zudoku.components.js +33 -4201
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +10 -11
- package/lib/zudoku.hooks.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +47 -47
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +292 -268
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +12 -18
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +19 -69
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +6 -6
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +201 -111
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/lib/zudoku.plugins.js.map +1 -1
- package/package.json +23 -19
- package/src/app/ZuploBuildConfig.ts +8 -8
- package/src/app/defaultTheme.css +68 -49
- package/src/app/demo.tsx +6 -5
- package/src/app/entry.client.tsx +0 -2
- package/src/app/entry.server.tsx +0 -2
- package/src/app/env.ts +8 -0
- package/src/app/main.css +10 -53
- package/src/app/main.tsx +13 -11
- package/src/app/standalone.tsx +7 -6
- package/src/lib/auth/issuer.test.ts +17 -1
- package/src/lib/auth/issuer.ts +4 -1
- package/src/lib/authentication/components/CallbackHandler.tsx +1 -1
- package/src/lib/components/Autocomplete.tsx +2 -1
- package/src/lib/components/Banner.tsx +1 -1
- package/src/lib/components/BuildCheck.tsx +1 -1
- package/src/lib/components/ErrorPage.tsx +3 -3
- package/src/lib/components/Footer.tsx +1 -1
- package/src/lib/components/Framed.tsx +51 -0
- package/src/lib/components/Header.tsx +20 -20
- package/src/lib/components/Heading.tsx +7 -3
- package/src/lib/components/Main.tsx +9 -9
- package/src/lib/components/Markdown.tsx +3 -5
- package/src/lib/components/MobileTopNavigation.tsx +18 -13
- package/src/lib/components/NotFoundPage.tsx +3 -3
- package/src/lib/components/PageProgress.tsx +28 -0
- package/src/lib/components/Pagination.tsx +4 -4
- package/src/lib/components/TopNavigation.tsx +57 -66
- package/src/lib/components/Typography.tsx +14 -0
- package/src/lib/components/context/ZudokuContext.ts +50 -32
- package/src/lib/components/index.ts +2 -0
- package/src/lib/components/navigation/{Sidebar.tsx → Navigation.tsx} +18 -16
- package/src/lib/components/navigation/{SidebarBadge.tsx → NavigationBadge.tsx} +1 -1
- package/src/lib/components/navigation/{SidebarCategory.tsx → NavigationCategory.tsx} +16 -14
- package/src/lib/components/navigation/{SidebarItem.tsx → NavigationItem.tsx} +23 -17
- package/src/lib/components/navigation/{SidebarWrapper.tsx → NavigationWrapper.tsx} +3 -3
- package/src/lib/components/navigation/utils.ts +27 -28
- package/src/lib/core/ZudokuContext.ts +14 -20
- package/src/lib/core/plugins.ts +2 -2
- package/src/lib/errors/ErrorAlert.tsx +3 -9
- package/src/lib/hooks/useEvent.test.tsx +7 -5
- package/src/lib/hooks/useHotkey.ts +70 -0
- package/src/lib/plugins/api-catalog/Catalog.tsx +1 -1
- package/src/lib/plugins/api-catalog/index.tsx +19 -19
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +41 -22
- package/src/lib/plugins/api-keys/index.tsx +27 -7
- package/src/lib/plugins/custom-pages/index.tsx +21 -16
- package/src/lib/plugins/markdown/MdxPage.tsx +72 -18
- package/src/lib/plugins/markdown/index.tsx +28 -41
- package/src/lib/plugins/openapi/OperationList.tsx +8 -18
- package/src/lib/plugins/openapi/OperationListItem.tsx +3 -3
- package/src/lib/plugins/openapi/ParameterListItem.tsx +6 -0
- package/src/lib/plugins/openapi/SchemaList.tsx +5 -11
- package/src/lib/plugins/openapi/Sidecar.tsx +1 -0
- package/src/lib/plugins/openapi/SidecarExamples.tsx +1 -0
- package/src/lib/plugins/openapi/graphql/gql.ts +5 -5
- package/src/lib/plugins/openapi/graphql/graphql.ts +6 -6
- package/src/lib/plugins/openapi/index.tsx +11 -11
- package/src/lib/plugins/openapi/interfaces.ts +3 -3
- package/src/lib/plugins/openapi/playground/BodyPanel.tsx +40 -31
- package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +47 -0
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +7 -3
- package/src/lib/plugins/openapi/playground/Headers.tsx +187 -89
- package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +3 -2
- package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +7 -12
- package/src/lib/plugins/openapi/playground/InlineInput.tsx +1 -1
- package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +2 -2
- package/src/lib/plugins/openapi/playground/PathParams.tsx +4 -5
- package/src/lib/plugins/openapi/playground/Playground.tsx +174 -125
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +104 -58
- package/src/lib/plugins/openapi/playground/Spinner.tsx +87 -0
- package/src/lib/plugins/openapi/playground/request-panel/UrlPath.tsx +31 -0
- package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +25 -0
- package/src/lib/plugins/openapi/playground/result-panel/Highlight.tsx +26 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.tsx +115 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +103 -97
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +68 -92
- package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +3 -3
- package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +2 -3
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +6 -11
- package/src/lib/plugins/openapi/schema/utils.ts +3 -2
- package/src/lib/plugins/openapi/util/{createSidebarCategory.tsx → createNavigationCategory.tsx} +6 -5
- package/src/lib/plugins/openapi/util/getRoutes.tsx +2 -2
- package/src/lib/plugins/openapi/util/methodColorMap.tsx +1 -1
- package/src/lib/ui/Alert.tsx +44 -38
- package/src/lib/ui/CodeBlock.tsx +40 -55
- package/src/lib/ui/Dialog.tsx +2 -2
- package/src/lib/ui/EmbeddedCodeBlock.tsx +94 -0
- package/src/lib/ui/Select.tsx +1 -1
- package/src/lib/ui/SyntaxHighlight.tsx +11 -3
- package/src/lib/util/MdxComponents.tsx +13 -2
- package/src/lib/util/os.ts +18 -0
- package/src/lib/util/useCopyToClipboard.ts +17 -0
- package/src/lib/util/useScrollToAnchor.ts +3 -3
- package/dist/config/validators/InputSidebarSchema.d.ts +0 -220
- package/dist/config/validators/InputSidebarSchema.js +0 -63
- package/dist/config/validators/InputSidebarSchema.js.map +0 -1
- package/dist/config/validators/SidebarSchema.d.ts +0 -46
- package/dist/config/validators/SidebarSchema.js +0 -118
- package/dist/config/validators/SidebarSchema.js.map +0 -1
- package/dist/lib/components/navigation/Sidebar.d.ts +0 -5
- package/dist/lib/components/navigation/Sidebar.js +0 -10
- package/dist/lib/components/navigation/Sidebar.js.map +0 -1
- package/dist/lib/components/navigation/SidebarBadge.js.map +0 -1
- package/dist/lib/components/navigation/SidebarCategory.d.ts +0 -5
- package/dist/lib/components/navigation/SidebarCategory.js.map +0 -1
- package/dist/lib/components/navigation/SidebarItem.d.ts +0 -6
- package/dist/lib/components/navigation/SidebarItem.js +0 -44
- package/dist/lib/components/navigation/SidebarItem.js.map +0 -1
- package/dist/lib/components/navigation/SidebarWrapper.js.map +0 -1
- package/dist/lib/plugins/custom-pages/CustomPage.d.ts +0 -2
- package/dist/lib/plugins/custom-pages/CustomPage.js +0 -11
- package/dist/lib/plugins/custom-pages/CustomPage.js.map +0 -1
- package/dist/lib/plugins/markdown/resolver.d.ts +0 -32
- package/dist/lib/plugins/markdown/resolver.js +0 -46
- package/dist/lib/plugins/markdown/resolver.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/UrlDisplay.d.ts +0 -4
- package/dist/lib/plugins/openapi/playground/UrlDisplay.js +0 -22
- package/dist/lib/plugins/openapi/playground/UrlDisplay.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.d.ts +0 -7
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +0 -11
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js.map +0 -1
- package/dist/lib/plugins/openapi/util/createSidebarCategory.d.ts +0 -9
- package/dist/lib/plugins/openapi/util/createSidebarCategory.js.map +0 -1
- package/dist/vite/plugin-configure-tailwind.d.ts +0 -2
- package/dist/vite/plugin-configure-tailwind.js +0 -38
- package/dist/vite/plugin-configure-tailwind.js.map +0 -1
- package/dist/vite/plugin-sidebar.js.map +0 -1
- package/dist/vite/plugin-theme-css.d.ts +0 -5
- package/dist/vite/plugin-theme-css.js +0 -77
- package/dist/vite/plugin-theme-css.js.map +0 -1
- package/lib/Callout-CoVxYafP.js +0 -231
- package/lib/Callout-CoVxYafP.js.map +0 -1
- package/lib/CategoryHeading-Cu2RwgjC.js +0 -10
- package/lib/CategoryHeading-Cu2RwgjC.js.map +0 -1
- package/lib/Dialog-BxpuVLh9.js.map +0 -1
- package/lib/Markdown-BUE2ViaD.js.map +0 -1
- package/lib/MdxPage-By4UkRkI.js +0 -84
- package/lib/MdxPage-By4UkRkI.js.map +0 -1
- package/lib/OasProvider-C6_Kx5O7.js +0 -33
- package/lib/OasProvider-C6_Kx5O7.js.map +0 -1
- package/lib/OperationList-BISd29LY.js.map +0 -1
- package/lib/Pagination-CCxhL836.js +0 -36
- package/lib/Pagination-CCxhL836.js.map +0 -1
- package/lib/RouteGuard-CgmsSw7T.js +0 -55
- package/lib/RouteGuard-CgmsSw7T.js.map +0 -1
- package/lib/SchemaList-BqnRo5ov.js.map +0 -1
- package/lib/SchemaView-CtYJpxQI.js.map +0 -1
- package/lib/Slot-DANV2b7_.js +0 -160
- package/lib/Slot-DANV2b7_.js.map +0 -1
- package/lib/clerk-yAKDC3Qz.js +0 -24812
- package/lib/clerk-yAKDC3Qz.js.map +0 -1
- package/lib/hook-wIlTGE-2.js +0 -1486
- package/lib/hook-wIlTGE-2.js.map +0 -1
- package/lib/index--oeBayMa.js +0 -86
- package/lib/index--oeBayMa.js.map +0 -1
- package/lib/index-Bn6Lc9tq.js +0 -9
- package/lib/index-Bn6Lc9tq.js.map +0 -1
- package/lib/index-QzXzw_ra.js +0 -24
- package/lib/index-QzXzw_ra.js.map +0 -1
- package/lib/index-RFzRn4fM.js +0 -3226
- package/lib/index-RFzRn4fM.js.map +0 -1
- package/lib/index-zddirpDj.js.map +0 -1
- package/lib/index.esm-BFcSKCe-.js +0 -683
- package/lib/index.esm-BFcSKCe-.js.map +0 -1
- package/lib/joinPath-B7kNnUX4.js +0 -8
- package/lib/joinPath-B7kNnUX4.js.map +0 -1
- package/lib/mutation-C-kdA_1r.js +0 -196
- package/lib/mutation-C-kdA_1r.js.map +0 -1
- package/lib/objectEntries-yMIkr2mI.js +0 -5
- package/lib/objectEntries-yMIkr2mI.js.map +0 -1
- package/lib/react-nprogress.esm-C2MPXjiJ.js +0 -389
- package/lib/react-nprogress.esm-C2MPXjiJ.js.map +0 -1
- package/lib/useLatest-hmRS46UF.js +0 -11
- package/lib/useLatest-hmRS46UF.js.map +0 -1
- package/lib/useMutation-3Ph3x6En.js +0 -97
- package/lib/useMutation-3Ph3x6En.js.map +0 -1
- package/src/lib/plugins/custom-pages/CustomPage.tsx +0 -18
- package/src/lib/plugins/markdown/resolver.ts +0 -59
- package/src/lib/plugins/openapi/playground/UrlDisplay.tsx +0 -32
- package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +0 -73
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { useQuery, useSuspenseQuery } from "@tanstack/react-query";
|
|
2
2
|
import { createContext, useContext } from "react";
|
|
3
3
|
import { matchPath, useLocation } from "react-router";
|
|
4
|
+
import { type NavigationItem } from "../../../config/validators/NavigationSchema.js";
|
|
4
5
|
import { useAuth } from "../../authentication/hook.js";
|
|
5
6
|
import type { ZudokuContext } from "../../core/ZudokuContext.js";
|
|
6
7
|
import { joinUrl } from "../../util/joinUrl.js";
|
|
7
8
|
import { CACHE_KEYS } from "../cache.js";
|
|
8
|
-
import {
|
|
9
|
+
import { traverseNavigation } from "../navigation/utils.js";
|
|
9
10
|
|
|
10
11
|
export const ZudokuReactContext = createContext<ZudokuContext | undefined>(
|
|
11
12
|
undefined,
|
|
@@ -30,8 +31,22 @@ export const useApiIdentities = () => {
|
|
|
30
31
|
});
|
|
31
32
|
};
|
|
32
33
|
|
|
34
|
+
const getItemPath = (item: NavigationItem) => {
|
|
35
|
+
switch (item.type) {
|
|
36
|
+
case "doc":
|
|
37
|
+
return joinUrl(item.path);
|
|
38
|
+
case "category":
|
|
39
|
+
return item.link ? joinUrl(item.link.path) : undefined;
|
|
40
|
+
case "link":
|
|
41
|
+
return item.to;
|
|
42
|
+
case "custom-page":
|
|
43
|
+
return item.path;
|
|
44
|
+
default:
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
33
48
|
export const useCurrentNavigation = () => {
|
|
34
|
-
const {
|
|
49
|
+
const { getPluginNavigation, navigation, options } = useZudoku();
|
|
35
50
|
const location = useLocation();
|
|
36
51
|
const auth = useAuth();
|
|
37
52
|
|
|
@@ -39,44 +54,47 @@ export const useCurrentNavigation = () => {
|
|
|
39
54
|
matchPath(route, location.pathname),
|
|
40
55
|
);
|
|
41
56
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
? joinUrl(item.id)
|
|
47
|
-
: item.type === "category" && item.link
|
|
48
|
-
? joinUrl(item.link.id)
|
|
49
|
-
: undefined;
|
|
50
|
-
|
|
51
|
-
if (itemId === location.pathname) {
|
|
52
|
-
return item;
|
|
53
|
-
}
|
|
54
|
-
});
|
|
57
|
+
const navItem = traverseNavigation(navigation, (item, parentCategories) => {
|
|
58
|
+
if (getItemPath(item) === location.pathname) {
|
|
59
|
+
return parentCategories.at(0) ?? item;
|
|
60
|
+
}
|
|
55
61
|
});
|
|
56
|
-
const currentTopNavItem =
|
|
57
|
-
topNavigation.find((t) => t.id === currentSidebarItem?.[0]) ??
|
|
58
|
-
topNavigation.find((item) => matchPath(item.id, location.pathname));
|
|
59
|
-
|
|
60
|
-
if (
|
|
61
|
-
currentTopNavItem &&
|
|
62
|
-
!currentSidebarItem &&
|
|
63
|
-
currentTopNavItem.id in sidebars
|
|
64
|
-
) {
|
|
65
|
-
currentSidebarItem = ["", sidebars[currentTopNavItem.id]!];
|
|
66
|
-
}
|
|
67
62
|
|
|
68
63
|
const { data } = useSuspenseQuery({
|
|
69
|
-
queryFn: () =>
|
|
70
|
-
queryKey: ["plugin-
|
|
64
|
+
queryFn: () => getPluginNavigation(location.pathname),
|
|
65
|
+
queryKey: ["plugin-navigation", location.pathname],
|
|
71
66
|
});
|
|
72
67
|
|
|
73
|
-
|
|
68
|
+
let topNavItem = navItem;
|
|
69
|
+
if (!navItem && data.length > 0) {
|
|
70
|
+
// Extract base paths from plugin navigation items
|
|
71
|
+
const pluginBasePaths = data.flatMap((item) => {
|
|
72
|
+
return getItemPath(item)?.split("?").at(0)?.split("#").at(0) ?? [];
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
// Find top-level nav item that matches any plugin base path
|
|
76
|
+
topNavItem = navigation
|
|
77
|
+
.flatMap((item) => {
|
|
78
|
+
const itemPath = getItemPath(item);
|
|
79
|
+
return itemPath ? [{ item, path: itemPath }] : [];
|
|
80
|
+
})
|
|
81
|
+
.sort((a, b) => b.path.length - a.path.length)
|
|
82
|
+
.find(({ path }) => {
|
|
83
|
+
return pluginBasePaths.some(
|
|
84
|
+
(basePath) =>
|
|
85
|
+
matchPath({ path, end: false }, basePath) ??
|
|
86
|
+
matchPath({ path: basePath, end: false }, path),
|
|
87
|
+
);
|
|
88
|
+
})?.item;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const hasNavigation =
|
|
74
92
|
auth.isAuthEnabled && !auth.isAuthenticated && isProtectedRoute;
|
|
75
93
|
|
|
76
94
|
return {
|
|
77
|
-
|
|
95
|
+
navigation: hasNavigation
|
|
78
96
|
? []
|
|
79
|
-
: [...(
|
|
80
|
-
topNavItem
|
|
97
|
+
: [...(navItem?.type === "category" ? navItem.items : []), ...data],
|
|
98
|
+
topNavItem,
|
|
81
99
|
};
|
|
82
100
|
};
|
|
@@ -23,6 +23,7 @@ import { Layout as LayoutImport } from "./Layout.js";
|
|
|
23
23
|
import { Markdown as MarkdownImport } from "./Markdown.js";
|
|
24
24
|
import { Spinner as SpinnerImport } from "./Spinner.js";
|
|
25
25
|
import { StatusPage as StatusPageImport } from "./StatusPage.js";
|
|
26
|
+
import { Typography as TypographyImport } from "./Typography.js";
|
|
26
27
|
import { Zudoku as ZudokuImport } from "./Zudoku.js";
|
|
27
28
|
|
|
28
29
|
export const Layout = /*@__PURE__*/ LayoutImport;
|
|
@@ -41,6 +42,7 @@ export const Button = /*@__PURE__*/ ButtonImport;
|
|
|
41
42
|
export const Link = /*@__PURE__*/ LinkImport;
|
|
42
43
|
export const BuildCheck = /*@__PURE__*/ BuildCheckImport;
|
|
43
44
|
export const Zudoku = /*@__PURE__*/ ZudokuImport;
|
|
45
|
+
export const Typography = /*@__PURE__*/ TypographyImport;
|
|
44
46
|
|
|
45
47
|
/** @deprecated Import from `zudoku/hooks` instead */
|
|
46
48
|
export const useMDXComponents = /*@__PURE__*/ useMDXComponentsImport;
|
|
@@ -1,42 +1,44 @@
|
|
|
1
1
|
import { VisuallyHidden } from "@radix-ui/react-visually-hidden";
|
|
2
|
-
import type {
|
|
2
|
+
import type { NavigationItem as NavigationItemType } from "../../../config/validators/NavigationSchema.js";
|
|
3
3
|
import { DrawerContent, DrawerTitle } from "../../ui/Drawer.js";
|
|
4
4
|
import { Slot } from "../Slot.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { NavigationItem } from "./NavigationItem.js";
|
|
6
|
+
import { NavigationWrapper } from "./NavigationWrapper.js";
|
|
7
7
|
|
|
8
|
-
export const
|
|
8
|
+
export const Navigation = ({
|
|
9
9
|
onRequestClose,
|
|
10
|
-
|
|
10
|
+
navigation,
|
|
11
11
|
}: {
|
|
12
12
|
onRequestClose?: () => void;
|
|
13
|
-
|
|
13
|
+
navigation: NavigationItemType[];
|
|
14
14
|
}) => (
|
|
15
15
|
<>
|
|
16
|
-
<
|
|
16
|
+
<NavigationWrapper>
|
|
17
17
|
<Slot.Target name="navigation-before" />
|
|
18
|
-
{
|
|
19
|
-
<
|
|
18
|
+
{navigation.map((item) => (
|
|
19
|
+
<NavigationItem
|
|
20
20
|
key={
|
|
21
|
-
|
|
22
|
-
(
|
|
23
|
-
item.
|
|
21
|
+
item.type +
|
|
22
|
+
(item.label ?? "") +
|
|
23
|
+
("path" in item ? item.path : "") +
|
|
24
|
+
("file" in item ? item.file : "") +
|
|
25
|
+
("to" in item ? item.to : "")
|
|
24
26
|
}
|
|
25
27
|
item={item}
|
|
26
28
|
/>
|
|
27
29
|
))}
|
|
28
30
|
<Slot.Target name="navigation-after" />
|
|
29
|
-
</
|
|
31
|
+
</NavigationWrapper>
|
|
30
32
|
<DrawerContent
|
|
31
33
|
className="lg:hidden h-[100dvh] start-0 w-[320px] rounded-none"
|
|
32
34
|
aria-describedby={undefined}
|
|
33
35
|
>
|
|
34
36
|
<div className="p-4 overflow-y-auto overscroll-none">
|
|
35
37
|
<VisuallyHidden>
|
|
36
|
-
<DrawerTitle>
|
|
38
|
+
<DrawerTitle>Navigation</DrawerTitle>
|
|
37
39
|
</VisuallyHidden>
|
|
38
|
-
{
|
|
39
|
-
<
|
|
40
|
+
{navigation.map((item) => (
|
|
41
|
+
<NavigationItem
|
|
40
42
|
key={item.label}
|
|
41
43
|
item={item}
|
|
42
44
|
onRequestClose={onRequestClose}
|
|
@@ -4,17 +4,17 @@ import { ChevronRightIcon } from "lucide-react";
|
|
|
4
4
|
import { memo, useEffect, useState } from "react";
|
|
5
5
|
import { NavLink, useLocation, useMatch } from "react-router";
|
|
6
6
|
import { Button } from "zudoku/ui/Button.js";
|
|
7
|
-
import type {
|
|
7
|
+
import type { NavigationCategory as NavigationCategoryType } from "../../../config/validators/NavigationSchema.js";
|
|
8
8
|
import { cn } from "../../util/cn.js";
|
|
9
9
|
import { joinUrl } from "../../util/joinUrl.js";
|
|
10
|
-
import {
|
|
10
|
+
import { NavigationItem } from "./NavigationItem.js";
|
|
11
11
|
import { navigationListItem, useIsCategoryOpen } from "./utils.js";
|
|
12
12
|
|
|
13
|
-
const
|
|
13
|
+
const NavigationCategoryInner = ({
|
|
14
14
|
category,
|
|
15
15
|
onRequestClose,
|
|
16
16
|
}: {
|
|
17
|
-
category:
|
|
17
|
+
category: NavigationCategoryType;
|
|
18
18
|
onRequestClose?: () => void;
|
|
19
19
|
}) => {
|
|
20
20
|
const isCategoryOpen = useIsCategoryOpen(category);
|
|
@@ -27,11 +27,11 @@ const SidebarCategoryInner = ({
|
|
|
27
27
|
!isCollapsible || !isCollapsed || isCategoryOpen,
|
|
28
28
|
);
|
|
29
29
|
const [open, setOpen] = useState(isDefaultOpen);
|
|
30
|
-
const isActive = useMatch(category.link?.
|
|
30
|
+
const isActive = useMatch(category.link?.path ?? "");
|
|
31
31
|
|
|
32
32
|
useEffect(() => {
|
|
33
|
-
// this is triggered when an item from the
|
|
34
|
-
// and the
|
|
33
|
+
// this is triggered when an item from the navigation is clicked
|
|
34
|
+
// and the navigation, enclosing this item, is not opened
|
|
35
35
|
if (isCategoryOpen) {
|
|
36
36
|
setOpen(true);
|
|
37
37
|
}
|
|
@@ -85,7 +85,7 @@ const SidebarCategoryInner = ({
|
|
|
85
85
|
{category.link?.type === "doc" ? (
|
|
86
86
|
<NavLink
|
|
87
87
|
to={{
|
|
88
|
-
pathname: joinUrl(category.link.
|
|
88
|
+
pathname: joinUrl(category.link.path),
|
|
89
89
|
search: location.search,
|
|
90
90
|
}}
|
|
91
91
|
className={styles}
|
|
@@ -123,11 +123,13 @@ const SidebarCategoryInner = ({
|
|
|
123
123
|
>
|
|
124
124
|
<ul className="relative after:absolute after:-start-(--padding-nav-item) after:translate-x-[1.5px] after:top-0 after:bottom-0 after:w-px after:bg-border">
|
|
125
125
|
{category.items.map((item) => (
|
|
126
|
-
<
|
|
126
|
+
<NavigationItem
|
|
127
127
|
key={
|
|
128
|
-
|
|
129
|
-
(
|
|
130
|
-
item.
|
|
128
|
+
item.type +
|
|
129
|
+
(item.label ?? "") +
|
|
130
|
+
("path" in item ? item.path : "") +
|
|
131
|
+
("file" in item ? item.file : "") +
|
|
132
|
+
("to" in item ? item.to : "")
|
|
131
133
|
}
|
|
132
134
|
onRequestClose={onRequestClose}
|
|
133
135
|
item={item}
|
|
@@ -139,6 +141,6 @@ const SidebarCategoryInner = ({
|
|
|
139
141
|
);
|
|
140
142
|
};
|
|
141
143
|
|
|
142
|
-
export const
|
|
144
|
+
export const NavigationCategory = memo(NavigationCategoryInner, deepEqual);
|
|
143
145
|
|
|
144
|
-
|
|
146
|
+
NavigationCategory.displayName = "NavigationCategory";
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
TooltipProvider,
|
|
9
9
|
TooltipTrigger,
|
|
10
10
|
} from "zudoku/ui/Tooltip.js";
|
|
11
|
-
import type {
|
|
11
|
+
import type { NavigationItem as NavigationItemType } from "../../../config/validators/NavigationSchema.js";
|
|
12
12
|
import { cn } from "../../util/cn.js";
|
|
13
13
|
import { joinUrl } from "../../util/joinUrl.js";
|
|
14
14
|
import { AnchorLink } from "../AnchorLink.js";
|
|
15
15
|
import { useViewportAnchor } from "../context/ViewportAnchorContext.js";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
16
|
+
import { NavigationBadge } from "./NavigationBadge.js";
|
|
17
|
+
import { NavigationCategory } from "./NavigationCategory.js";
|
|
18
18
|
import { navigationListItem } from "./utils.js";
|
|
19
19
|
|
|
20
20
|
const TruncatedLabel = ({
|
|
@@ -65,11 +65,11 @@ const TruncatedLabel = ({
|
|
|
65
65
|
|
|
66
66
|
export const DATA_ANCHOR_ATTR = "data-anchor";
|
|
67
67
|
|
|
68
|
-
export const
|
|
68
|
+
export const NavigationItem = ({
|
|
69
69
|
item,
|
|
70
70
|
onRequestClose,
|
|
71
71
|
}: {
|
|
72
|
-
item:
|
|
72
|
+
item: NavigationItemType;
|
|
73
73
|
onRequestClose?: () => void;
|
|
74
74
|
}) => {
|
|
75
75
|
const location = useLocation();
|
|
@@ -78,23 +78,26 @@ export const SidebarItem = ({
|
|
|
78
78
|
switch (item.type) {
|
|
79
79
|
case "category":
|
|
80
80
|
return (
|
|
81
|
-
<
|
|
81
|
+
<NavigationCategory category={item} onRequestClose={onRequestClose} />
|
|
82
82
|
);
|
|
83
83
|
case "doc":
|
|
84
84
|
return (
|
|
85
85
|
<NavLink
|
|
86
|
+
viewTransition
|
|
86
87
|
className={({ isActive, isPending }) =>
|
|
87
88
|
navigationListItem({ isActive, isPending })
|
|
88
89
|
}
|
|
89
|
-
to={joinUrl(item.
|
|
90
|
+
to={joinUrl(item.path)}
|
|
90
91
|
onClick={onRequestClose}
|
|
91
92
|
end
|
|
92
93
|
>
|
|
93
94
|
{item.icon && <item.icon size={16} className="align-[-0.125em]" />}
|
|
94
95
|
{item.badge ? (
|
|
95
96
|
<>
|
|
96
|
-
|
|
97
|
-
|
|
97
|
+
{item.label && (
|
|
98
|
+
<TruncatedLabel label={item.label} className="flex-1" />
|
|
99
|
+
)}
|
|
100
|
+
<NavigationBadge {...item.badge} />
|
|
98
101
|
</>
|
|
99
102
|
) : (
|
|
100
103
|
item.label
|
|
@@ -102,24 +105,26 @@ export const SidebarItem = ({
|
|
|
102
105
|
</NavLink>
|
|
103
106
|
);
|
|
104
107
|
case "link":
|
|
105
|
-
|
|
108
|
+
case "custom-page": {
|
|
109
|
+
const href = item.type === "link" ? item.to : item.path;
|
|
110
|
+
return !href.startsWith("http") ? (
|
|
106
111
|
<AnchorLink
|
|
107
112
|
to={{
|
|
108
|
-
pathname:
|
|
109
|
-
hash:
|
|
113
|
+
pathname: href.split("#")[0],
|
|
114
|
+
hash: href.split("#")[1],
|
|
110
115
|
search: location.search,
|
|
111
116
|
}}
|
|
112
|
-
{...{ [DATA_ANCHOR_ATTR]:
|
|
117
|
+
{...{ [DATA_ANCHOR_ATTR]: href.split("#")[1] }}
|
|
113
118
|
className={navigationListItem({
|
|
114
|
-
isActive:
|
|
119
|
+
isActive: href === [location.pathname, activeAnchor].join("#"),
|
|
115
120
|
})}
|
|
116
121
|
onClick={onRequestClose}
|
|
117
122
|
>
|
|
118
123
|
{item.icon && <item.icon size={16} className="align-[-0.125em]" />}
|
|
119
124
|
{item.badge ? (
|
|
120
125
|
<>
|
|
121
|
-
<TruncatedLabel label={item.label} />
|
|
122
|
-
<
|
|
126
|
+
{item.label && <TruncatedLabel label={item.label} />}
|
|
127
|
+
<NavigationBadge {...item.badge} />
|
|
123
128
|
</>
|
|
124
129
|
) : (
|
|
125
130
|
<span className="break-all">{item.label}</span>
|
|
@@ -128,7 +133,7 @@ export const SidebarItem = ({
|
|
|
128
133
|
) : (
|
|
129
134
|
<a
|
|
130
135
|
className={navigationListItem()}
|
|
131
|
-
href={
|
|
136
|
+
href={href}
|
|
132
137
|
target="_blank"
|
|
133
138
|
rel="noopener noreferrer"
|
|
134
139
|
onClick={onRequestClose}
|
|
@@ -141,5 +146,6 @@ export const SidebarItem = ({
|
|
|
141
146
|
</span>
|
|
142
147
|
</a>
|
|
143
148
|
);
|
|
149
|
+
}
|
|
144
150
|
}
|
|
145
151
|
};
|
|
@@ -4,7 +4,7 @@ import { scrollIntoViewIfNeeded } from "../../util/scrollIntoViewIfNeeded.js";
|
|
|
4
4
|
import { useZudoku } from "../context/ZudokuContext.js";
|
|
5
5
|
import { PoweredByZudoku } from "./PoweredByZudoku.js";
|
|
6
6
|
|
|
7
|
-
export const
|
|
7
|
+
export const NavigationWrapper = ({
|
|
8
8
|
children,
|
|
9
9
|
className,
|
|
10
10
|
}: PropsWithChildren<{
|
|
@@ -37,10 +37,10 @@ export const SidebarWrapper = ({
|
|
|
37
37
|
</nav>
|
|
38
38
|
|
|
39
39
|
<div className="bg-background border-t p-2 mx-5 gap-2 items-center mt-2 drop-shadow-[0_-3px_1px_rgba(0,0,0,0.015)] hidden lg:[&:has(>_:nth-child(1):last-child)]:flex">
|
|
40
|
-
{options.
|
|
40
|
+
{options.site?.showPoweredBy !== false && <PoweredByZudoku />}
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
43
43
|
);
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
NavigationWrapper.displayName = "NavigationWrapper";
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
2
|
import { useLocation } from "react-router";
|
|
3
3
|
import type {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} from "../../../config/validators/
|
|
4
|
+
NavigationCategory,
|
|
5
|
+
NavigationItem,
|
|
6
|
+
} from "../../../config/validators/NavigationSchema.js";
|
|
7
7
|
import { joinUrl } from "../../util/joinUrl.js";
|
|
8
8
|
import { useCurrentNavigation } from "../context/ZudokuContext.js";
|
|
9
9
|
|
|
10
10
|
export type TraverseCallback<T> = (
|
|
11
|
-
item:
|
|
12
|
-
parentCategories:
|
|
11
|
+
item: NavigationItem,
|
|
12
|
+
parentCategories: NavigationItem[],
|
|
13
13
|
) => T | void;
|
|
14
14
|
|
|
15
|
-
export const
|
|
16
|
-
|
|
15
|
+
export const traverseNavigation = <T>(
|
|
16
|
+
navigation: NavigationItem[],
|
|
17
17
|
callback: TraverseCallback<T>,
|
|
18
18
|
): T | undefined => {
|
|
19
|
-
for (const item of
|
|
20
|
-
const result =
|
|
19
|
+
for (const item of navigation) {
|
|
20
|
+
const result = traverseNavigationItem(item, callback);
|
|
21
21
|
if (result !== undefined) return result;
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
export const
|
|
26
|
-
item:
|
|
25
|
+
export const traverseNavigationItem = <T>(
|
|
26
|
+
item: NavigationItem,
|
|
27
27
|
callback: TraverseCallback<T>,
|
|
28
|
-
parentCategories:
|
|
28
|
+
parentCategories: NavigationItem[] = [],
|
|
29
29
|
): T | undefined => {
|
|
30
30
|
const result = callback(item, parentCategories);
|
|
31
31
|
if (result !== undefined) return result;
|
|
32
32
|
|
|
33
33
|
if (item.type === "category") {
|
|
34
34
|
for (const child of item.items) {
|
|
35
|
-
const childResult =
|
|
35
|
+
const childResult = traverseNavigationItem(child, callback, [
|
|
36
36
|
...parentCategories,
|
|
37
37
|
item,
|
|
38
38
|
]);
|
|
@@ -43,30 +43,28 @@ export const traverseSidebarItem = <T>(
|
|
|
43
43
|
|
|
44
44
|
export const useCurrentItem = () => {
|
|
45
45
|
const location = useLocation();
|
|
46
|
-
const
|
|
46
|
+
const { navigation } = useCurrentNavigation();
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return traverseSidebar(currentSidebar, (item) => {
|
|
51
|
-
if (item.type === "doc" && joinUrl(item.id) === location.pathname) {
|
|
48
|
+
return traverseNavigation(navigation, (item) => {
|
|
49
|
+
if (item.type === "doc" && joinUrl(item.path) === location.pathname) {
|
|
52
50
|
return item;
|
|
53
51
|
}
|
|
54
52
|
});
|
|
55
53
|
};
|
|
56
54
|
|
|
57
|
-
export const useIsCategoryOpen = (category:
|
|
55
|
+
export const useIsCategoryOpen = (category: NavigationCategory) => {
|
|
58
56
|
const location = useLocation();
|
|
59
57
|
|
|
60
|
-
return
|
|
58
|
+
return traverseNavigationItem(category, (item) => {
|
|
61
59
|
if (item.type === "category" && item.link) {
|
|
62
|
-
const categoryLinkPath = joinUrl(item.link.
|
|
60
|
+
const categoryLinkPath = joinUrl(item.link.path);
|
|
63
61
|
if (categoryLinkPath === location.pathname) {
|
|
64
62
|
return true;
|
|
65
63
|
}
|
|
66
64
|
}
|
|
67
65
|
|
|
68
66
|
if (item.type === "doc") {
|
|
69
|
-
const docPath = joinUrl(item.
|
|
67
|
+
const docPath = joinUrl(item.path);
|
|
70
68
|
if (docPath === location.pathname) {
|
|
71
69
|
return true;
|
|
72
70
|
}
|
|
@@ -79,20 +77,19 @@ export const usePrevNext = (): {
|
|
|
79
77
|
next?: { label: string; id: string };
|
|
80
78
|
} => {
|
|
81
79
|
const currentId = useLocation().pathname;
|
|
82
|
-
const
|
|
83
|
-
const currentSidebar = nav.sidebar;
|
|
80
|
+
const { navigation } = useCurrentNavigation();
|
|
84
81
|
|
|
85
82
|
let prev;
|
|
86
83
|
let next;
|
|
87
84
|
|
|
88
85
|
let foundCurrent = false;
|
|
89
86
|
|
|
90
|
-
|
|
87
|
+
traverseNavigation(navigation, (item) => {
|
|
91
88
|
const itemId =
|
|
92
89
|
item.type === "doc"
|
|
93
|
-
? joinUrl(item.
|
|
90
|
+
? joinUrl(item.path)
|
|
94
91
|
: item.type === "category" && item.link
|
|
95
|
-
? joinUrl(item.link.
|
|
92
|
+
? joinUrl(item.link.path)
|
|
96
93
|
: undefined;
|
|
97
94
|
|
|
98
95
|
if (!itemId) return;
|
|
@@ -137,8 +134,10 @@ export const navigationListItem = cva(
|
|
|
137
134
|
|
|
138
135
|
export const isHiddenItem =
|
|
139
136
|
(isAuthenticated?: boolean) =>
|
|
140
|
-
(item:
|
|
137
|
+
(item: NavigationItem): boolean => {
|
|
141
138
|
if (item.display === "hide") return false;
|
|
139
|
+
if (!item.label) return false;
|
|
140
|
+
|
|
142
141
|
return (
|
|
143
142
|
(item.display === "auth" && isAuthenticated) ||
|
|
144
143
|
(item.display === "anon" && !isAuthenticated) ||
|
|
@@ -3,17 +3,14 @@ import { createNanoEvents } from "nanoevents";
|
|
|
3
3
|
import type { ReactNode } from "react";
|
|
4
4
|
import type { Location } from "react-router";
|
|
5
5
|
import type { BundledTheme, HighlighterCore } from "shiki";
|
|
6
|
-
import type { z } from "zod";
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
9
|
-
FooterSchema,
|
|
10
|
-
TopNavigationItem,
|
|
11
|
-
} from "../../config/validators/validate.js";
|
|
6
|
+
import type { z } from "zod/v4";
|
|
7
|
+
import type { Navigation } from "../../config/validators/NavigationSchema.js";
|
|
8
|
+
import type { FooterSchema } from "../../config/validators/validate.js";
|
|
12
9
|
import type { AuthenticationPlugin } from "../authentication/authentication.js";
|
|
13
10
|
import { type AuthState, useAuthState } from "../authentication/state.js";
|
|
14
11
|
import type { ComponentsContextType } from "../components/context/ComponentsContext.js";
|
|
15
12
|
import type { SlotType } from "../components/context/SlotProvider.js";
|
|
16
|
-
import {
|
|
13
|
+
import { joinUrl } from "../util/joinUrl.js";
|
|
17
14
|
import type { MdxComponentsType } from "../util/MdxComponents.js";
|
|
18
15
|
import { objectEntries } from "../util/objectEntries.js";
|
|
19
16
|
import {
|
|
@@ -57,10 +54,10 @@ type Metadata = Partial<{
|
|
|
57
54
|
publisher: string;
|
|
58
55
|
}>;
|
|
59
56
|
|
|
60
|
-
type
|
|
57
|
+
type Site = Partial<{
|
|
61
58
|
dir?: "ltr" | "rtl";
|
|
62
59
|
showPoweredBy?: boolean;
|
|
63
|
-
|
|
60
|
+
title?: string;
|
|
64
61
|
logo?: {
|
|
65
62
|
src: {
|
|
66
63
|
light: string;
|
|
@@ -81,10 +78,9 @@ export type ZudokuContextOptions = {
|
|
|
81
78
|
basePath?: string;
|
|
82
79
|
canonicalUrlOrigin?: string;
|
|
83
80
|
metadata?: Metadata;
|
|
84
|
-
|
|
81
|
+
site?: Site;
|
|
85
82
|
authentication?: AuthenticationPlugin;
|
|
86
|
-
|
|
87
|
-
sidebars?: SidebarConfig;
|
|
83
|
+
navigation?: Navigation;
|
|
88
84
|
plugins?: ZudokuPlugin[];
|
|
89
85
|
slots?: Record<string, SlotType>;
|
|
90
86
|
/**
|
|
@@ -104,10 +100,9 @@ export type ZudokuContextOptions = {
|
|
|
104
100
|
|
|
105
101
|
export class ZudokuContext {
|
|
106
102
|
public plugins: NonNullable<ZudokuContextOptions["plugins"]>;
|
|
107
|
-
public
|
|
108
|
-
public topNavigation: NonNullable<ZudokuContextOptions["topNavigation"]>;
|
|
103
|
+
public navigation: Navigation;
|
|
109
104
|
public meta: ZudokuContextOptions["metadata"];
|
|
110
|
-
public
|
|
105
|
+
public site: ZudokuContextOptions["site"];
|
|
111
106
|
public readonly authentication?: ZudokuContextOptions["authentication"];
|
|
112
107
|
public readonly queryClient: QueryClient;
|
|
113
108
|
public readonly options: ZudokuContextOptions;
|
|
@@ -124,12 +119,11 @@ export class ZudokuContext {
|
|
|
124
119
|
this.queryClient = queryClient;
|
|
125
120
|
this.options = { ...options, protectedRoutes };
|
|
126
121
|
this.plugins = options.plugins ?? [];
|
|
127
|
-
this.
|
|
128
|
-
this.sidebars = options.sidebars ?? {};
|
|
122
|
+
this.navigation = options.navigation ?? [];
|
|
129
123
|
this.navigationPlugins = this.plugins.filter(isNavigationPlugin);
|
|
130
124
|
this.authentication = this.plugins.find(isAuthenticationPlugin);
|
|
131
125
|
this.meta = options.metadata;
|
|
132
|
-
this.
|
|
126
|
+
this.site = options.site;
|
|
133
127
|
this.plugins.forEach((plugin) => {
|
|
134
128
|
if (!isEventConsumerPlugin(plugin)) return;
|
|
135
129
|
|
|
@@ -178,10 +172,10 @@ export class ZudokuContext {
|
|
|
178
172
|
return this.emitter.emit(event, ...data);
|
|
179
173
|
};
|
|
180
174
|
|
|
181
|
-
|
|
175
|
+
getPluginNavigation = async (path: string) => {
|
|
182
176
|
const navigations = await Promise.all(
|
|
183
177
|
this.navigationPlugins.map((plugin) =>
|
|
184
|
-
plugin.
|
|
178
|
+
plugin.getNavigation?.(joinUrl(path), this),
|
|
185
179
|
),
|
|
186
180
|
);
|
|
187
181
|
|
package/src/lib/core/plugins.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { LucideIcon } from "lucide-react";
|
|
2
2
|
import type { ReactElement } from "react";
|
|
3
3
|
import type { Location, RouteObject } from "react-router";
|
|
4
|
-
import type {
|
|
4
|
+
import type { Navigation } from "../../config/validators/NavigationSchema.js";
|
|
5
5
|
import type { AuthenticationPlugin } from "../authentication/authentication.js";
|
|
6
6
|
import type { MdxComponentsType } from "../util/MdxComponents.js";
|
|
7
7
|
import type {
|
|
@@ -23,7 +23,7 @@ export type { AuthenticationPlugin, RouteObject };
|
|
|
23
23
|
|
|
24
24
|
export interface NavigationPlugin {
|
|
25
25
|
getRoutes: () => RouteObject[];
|
|
26
|
-
|
|
26
|
+
getNavigation?: (path: string, context: ZudokuContext) => Promise<Navigation>;
|
|
27
27
|
getProtectedRoutes?: () => string[];
|
|
28
28
|
}
|
|
29
29
|
|