zudoku 0.0.0-f9d5b02 → 0.0.0-fabd0c1
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/client.d.ts +7 -0
- package/dist/app/demo.js +1 -1
- package/dist/app/demo.js.map +1 -1
- package/dist/app/entry.client.d.ts +1 -0
- package/dist/app/entry.client.js +14 -1
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/entry.server.d.ts +1 -0
- package/dist/app/entry.server.js +2 -2
- package/dist/app/entry.server.js.map +1 -1
- package/dist/app/main.d.ts +1 -1
- package/dist/app/main.js +2 -1
- package/dist/app/main.js.map +1 -1
- package/dist/app/sentry.d.ts +3 -0
- package/dist/app/sentry.js +19 -0
- package/dist/app/sentry.js.map +1 -0
- package/dist/app/standalone.js +1 -1
- package/dist/app/standalone.js.map +1 -1
- package/dist/app/tailwind.d.ts +2 -1
- package/dist/app/tailwind.js +64 -52
- package/dist/app/tailwind.js.map +1 -1
- package/dist/cli/cli.js +0 -2
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/cmds/build.js +1 -0
- package/dist/cli/cmds/build.js.map +1 -1
- package/dist/cli/common/logger.js +9 -0
- package/dist/cli/common/logger.js.map +1 -1
- package/dist/cli/common/outdated.js +2 -1
- package/dist/cli/common/outdated.js.map +1 -1
- package/dist/config/common.d.ts +8 -0
- package/dist/config/common.js +2 -0
- package/dist/config/common.js.map +1 -0
- package/dist/config/config.d.ts +3 -2
- package/dist/config/loader.d.ts +20 -0
- package/dist/config/loader.js +154 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/validators/InputSidebarSchema.d.ts +14 -13
- package/dist/config/validators/InputSidebarSchema.js.map +1 -1
- package/dist/config/validators/common.d.ts +4945 -0
- package/dist/config/validators/common.js +280 -0
- package/dist/config/validators/common.js.map +1 -0
- package/dist/config/validators/icon-types.d.ts +1 -0
- package/dist/config/validators/icon-types.js +2 -0
- package/dist/config/validators/icon-types.js.map +1 -0
- package/dist/config/validators/validate.d.ts +800 -530
- package/dist/config/validators/validate.js +9 -228
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/lib/authentication/AuthenticationPlugin.d.ts +4 -2
- package/dist/lib/authentication/AuthenticationPlugin.js +3 -0
- package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -1
- package/dist/lib/authentication/authentication.d.ts +1 -1
- package/dist/lib/authentication/components/CallbackHandler.js +1 -1
- package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
- package/dist/lib/authentication/components/SignIn.js +1 -1
- package/dist/lib/authentication/components/SignIn.js.map +1 -1
- package/dist/lib/authentication/components/SignOut.js +1 -1
- package/dist/lib/authentication/components/SignOut.js.map +1 -1
- package/dist/lib/authentication/hook.d.ts +5 -4
- package/dist/lib/authentication/hook.js +1 -3
- package/dist/lib/authentication/hook.js.map +1 -1
- package/dist/lib/authentication/providers/auth0.js +2 -2
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +7 -1
- package/dist/lib/authentication/providers/openid.js +18 -27
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/authentication/state.d.ts +25 -4
- package/dist/lib/authentication/state.js +28 -5
- package/dist/lib/authentication/state.js.map +1 -1
- package/dist/lib/components/AnchorLink.d.ts +1 -1
- package/dist/lib/components/AnchorLink.js +1 -1
- package/dist/lib/components/AnchorLink.js.map +1 -1
- package/dist/lib/components/Bootstrap.d.ts +1 -2
- package/dist/lib/components/Bootstrap.js +11 -7
- package/dist/lib/components/Bootstrap.js.map +1 -1
- package/dist/lib/components/Header.js +14 -6
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +4 -4
- package/dist/lib/components/Heading.js +1 -1
- package/dist/lib/components/Heading.js.map +1 -1
- package/dist/lib/components/Layout.js +14 -5
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/Markdown.js +1 -1
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +5 -7
- 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/ReactMarkdown.d.ts +29 -0
- package/dist/lib/components/ReactMarkdown.js +182 -0
- package/dist/lib/components/ReactMarkdown.js.map +1 -0
- package/dist/lib/components/Search.d.ts +3 -1
- package/dist/lib/components/Search.js +3 -3
- package/dist/lib/components/Search.js.map +1 -1
- package/dist/lib/components/SlotletProvider.d.ts +2 -2
- package/dist/lib/components/SyntaxHighlight.js +2 -6
- package/dist/lib/components/SyntaxHighlight.js.map +1 -1
- package/dist/lib/components/ThemeSwitch.js +5 -3
- package/dist/lib/components/ThemeSwitch.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +2 -0
- package/dist/lib/components/TopNavigation.js +13 -7
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Zudoku.js +1 -1
- package/dist/lib/components/Zudoku.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.js +1 -1
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +15 -5
- package/dist/lib/components/index.js +1 -1
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/Sidebar.d.ts +3 -1
- package/dist/lib/components/navigation/Sidebar.js +2 -2
- package/dist/lib/components/navigation/Sidebar.js.map +1 -1
- package/dist/lib/components/navigation/SidebarBadge.d.ts +0 -9
- package/dist/lib/components/navigation/SidebarBadge.js +0 -9
- package/dist/lib/components/navigation/SidebarBadge.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.d.ts +2 -2
- package/dist/lib/components/navigation/SidebarCategory.js +4 -5
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.d.ts +2 -4
- package/dist/lib/components/navigation/SidebarItem.js +6 -11
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.js +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
- package/dist/lib/components/navigation/utils.js +1 -1
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +1 -1
- package/dist/lib/core/plugins.d.ts +5 -1
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/errors/RouterError.js +1 -1
- package/dist/lib/errors/RouterError.js.map +1 -1
- package/dist/lib/oas/graphql/index.js +4 -1
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/oas/parser/upgrade/index.d.ts +2 -2
- package/dist/lib/oas/parser/upgrade/index.js +3 -20
- package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
- package/dist/lib/plugins/api-catalog/Catalog.d.ts +2 -0
- package/dist/lib/plugins/api-catalog/Catalog.js +36 -0
- package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -0
- package/dist/lib/plugins/api-catalog/index.d.ts +30 -0
- package/dist/lib/plugins/api-catalog/index.js +15 -0
- package/dist/lib/plugins/api-catalog/index.js.map +1 -0
- package/dist/lib/plugins/api-keys/CreateApiKey.js +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
- package/dist/lib/plugins/api-keys/ProtectedRoute.js +1 -1
- package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.js +3 -0
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.d.ts +9 -1
- package/dist/lib/plugins/markdown/MdxPage.js +16 -3
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +3 -1
- package/dist/lib/plugins/markdown/index.js +1 -1
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/markdown/resolver.js.map +1 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js +2 -2
- package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +24 -3
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.d.ts +2 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +14 -4
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/Route.d.ts +4 -2
- package/dist/lib/plugins/openapi/Route.js +25 -2
- package/dist/lib/plugins/openapi/Route.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +3 -13
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/client/GraphQLClient.js +12 -0
- package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -1
- package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +1 -1
- package/dist/lib/plugins/openapi/client/useCreateQuery.js +4 -2
- package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
- package/dist/lib/plugins/openapi/context.d.ts +3 -3
- 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 +2 -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 +13 -13
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +20 -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/post-processors/removeExtensions.d.ts +6 -0
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.js +14 -0
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.js.map +1 -0
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.d.ts +1 -0
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js +125 -0
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js.map +1 -0
- package/dist/lib/plugins/openapi/post-processors/removePaths.d.ts +11 -0
- package/dist/lib/plugins/openapi/post-processors/removePaths.js +33 -0
- package/dist/lib/plugins/openapi/post-processors/removePaths.js.map +1 -0
- package/dist/lib/plugins/openapi/post-processors/removePaths.test.d.ts +1 -0
- package/dist/lib/plugins/openapi/post-processors/removePaths.test.js +104 -0
- package/dist/lib/plugins/openapi/post-processors/removePaths.test.js.map +1 -0
- package/dist/lib/plugins/openapi/post-processors/traverse.d.ts +1 -0
- package/dist/lib/plugins/openapi/post-processors/traverse.js +2 -0
- package/dist/lib/plugins/openapi/post-processors/traverse.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/util/methodToColor.d.ts +20 -0
- package/dist/lib/plugins/openapi/util/methodToColor.js +24 -0
- package/dist/lib/plugins/openapi/util/methodToColor.js.map +1 -0
- package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.d.ts +1 -0
- package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.js +27 -0
- package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.js.map +1 -0
- package/dist/lib/plugins/redirect/index.d.ts +1 -1
- package/dist/lib/plugins/redirect/index.js +1 -1
- package/dist/lib/plugins/redirect/index.js.map +1 -1
- package/dist/lib/plugins/search-inkeep/index.d.ts +22 -3
- package/dist/lib/plugins/search-inkeep/index.js +41 -5
- package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
- package/dist/lib/plugins/search-inkeep/inkeep.d.ts +3 -4
- package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -1
- package/dist/lib/ui/Button.d.ts +1 -1
- package/dist/lib/ui/Command.d.ts +1 -1
- package/dist/lib/util/MdxComponents.d.ts +18 -19
- package/dist/lib/util/MdxComponents.js +1 -3
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/createVariantComponent.d.ts +2 -2
- package/dist/lib/util/traverse.d.ts +2 -0
- package/dist/lib/util/traverse.js +18 -0
- package/dist/lib/util/traverse.js.map +1 -0
- package/dist/lib/util/useExposedProps.js +1 -1
- package/dist/lib/util/useExposedProps.js.map +1 -1
- package/dist/lib/util/useOnScreen.d.ts +1 -1
- package/dist/lib/util/useScrollToAnchor.js +1 -1
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/lib/util/useScrollToTop.js +1 -1
- package/dist/lib/util/useScrollToTop.js.map +1 -1
- package/dist/vite/build.js +15 -3
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.d.ts +6 -4
- package/dist/vite/config.js +70 -23
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/config.test.js +7 -5
- package/dist/vite/config.test.js.map +1 -1
- package/dist/vite/css/collect.d.ts +2 -0
- package/dist/vite/css/collect.js +27 -0
- package/dist/vite/css/collect.js.map +1 -0
- package/dist/vite/css/plugin.d.ts +5 -0
- package/dist/vite/css/plugin.js +79 -0
- package/dist/vite/css/plugin.js.map +1 -0
- package/dist/vite/dev-server.js +19 -6
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/output.d.ts +1 -1
- package/dist/vite/output.js +39 -10
- package/dist/vite/output.js.map +1 -1
- package/dist/vite/plugin-api.js +93 -20
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-component.js +15 -19
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/plugin-config-reload.d.ts +1 -2
- package/dist/vite/plugin-config-reload.js.map +1 -1
- package/dist/vite/plugin-config.js +20 -0
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-docs.test.js +15 -23
- package/dist/vite/plugin-docs.test.js.map +1 -1
- package/dist/vite/plugin-mdx.js +60 -4
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/{plugin-custom-css.d.ts → plugin-theme-css.d.ts} +2 -2
- package/dist/vite/{plugin-custom-css.js → plugin-theme-css.js} +10 -3
- package/dist/vite/plugin-theme-css.js.map +1 -0
- package/dist/vite/plugin.d.ts +1 -2
- package/dist/vite/plugin.js +6 -2
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender.d.ts +2 -1
- package/dist/vite/prerender.js +2 -2
- package/dist/vite/prerender.js.map +1 -1
- package/dist/vite/remarkStaticGeneration.js +5 -5
- package/dist/vite/remarkStaticGeneration.js.map +1 -1
- package/dist/vite/sitemap.d.ts +1 -1
- package/dist/zuplo/env.d.ts +6 -0
- package/dist/zuplo/env.js +9 -0
- package/dist/zuplo/env.js.map +1 -0
- package/dist/zuplo/with-zuplo.d.ts +3 -0
- package/dist/zuplo/with-zuplo.js +28 -0
- package/dist/zuplo/with-zuplo.js.map +1 -0
- package/lib/AnchorLink-DFZZbmvr.js +34 -0
- package/lib/AnchorLink-DFZZbmvr.js.map +1 -0
- package/lib/{AuthenticationPlugin-DeGDVa1r.js → AuthenticationPlugin-fB7viE7A.js} +23 -21
- package/lib/AuthenticationPlugin-fB7viE7A.js.map +1 -0
- package/lib/{Button-jK0EsymC.js → Button-DeAoTouo.js} +4 -4
- package/lib/{Button-jK0EsymC.js.map → Button-DeAoTouo.js.map} +1 -1
- package/lib/{CategoryHeading-Bb9dqxD3.js → CategoryHeading-CBconmtI.js} +3 -3
- package/lib/{CategoryHeading-Bb9dqxD3.js.map → CategoryHeading-CBconmtI.js.map} +1 -1
- package/lib/ClientOnly-E7hGysn1.js.map +1 -1
- package/lib/{Dialog-k70Qfukb.js → Dialog-Bxv1yEIg.js} +3 -3
- package/lib/{Dialog-k70Qfukb.js.map → Dialog-Bxv1yEIg.js.map} +1 -1
- package/lib/{Markdown-BorQdbxW.js → Markdown-CZDLNOFc.js} +13227 -13217
- package/lib/Markdown-CZDLNOFc.js.map +1 -0
- package/lib/MdxPage-CPBw4_lf.js +188 -0
- package/lib/MdxPage-CPBw4_lf.js.map +1 -0
- package/lib/OperationList-n4U_BHmO.js +5062 -0
- package/lib/OperationList-n4U_BHmO.js.map +1 -0
- package/lib/Route-C8nwd9A2.js +37 -0
- package/lib/Route-C8nwd9A2.js.map +1 -0
- package/lib/{Select-DP74t8Yy.js → Select-D3XuKKuH.js} +5 -5
- package/lib/{Select-DP74t8Yy.js.map → Select-D3XuKKuH.js.map} +1 -1
- package/lib/SlotletProvider-pfc9oejW.js +221 -0
- package/lib/SlotletProvider-pfc9oejW.js.map +1 -0
- package/lib/{Spinner-3cQDBVGr.js → Spinner-DuxJLLNE.js} +2 -2
- package/lib/{Spinner-3cQDBVGr.js.map → Spinner-DuxJLLNE.js.map} +1 -1
- package/lib/StaggeredRender-DgsamH_G.js +17 -0
- package/lib/StaggeredRender-DgsamH_G.js.map +1 -0
- package/lib/{SyntaxHighlight-CBmwwKoM.js → SyntaxHighlight-Bz-lOJtH.js} +9 -13
- package/lib/{SyntaxHighlight-CBmwwKoM.js.map → SyntaxHighlight-Bz-lOJtH.js.map} +1 -1
- package/lib/assets/{index-B_Jk_Yzp.js → index-C7jnHK4b.js} +218 -197
- package/lib/assets/index-C7jnHK4b.js.map +1 -0
- package/lib/assets/{worker-CPsGZsve.js → worker-D2kRl-cG.js} +5326 -4949
- package/lib/assets/worker-D2kRl-cG.js.map +1 -0
- package/lib/chunk-D52XG6IA-Dl7HLe6j.js +1823 -0
- package/lib/chunk-D52XG6IA-Dl7HLe6j.js.map +1 -0
- package/lib/{cn-BmFQLtkS.js → cn-qaFjX9_3.js} +2 -2
- package/lib/cn-qaFjX9_3.js.map +1 -0
- package/lib/{context-D1nXWxm7.js → context-h_UkBLvr.js} +2 -2
- package/lib/context-h_UkBLvr.js.map +1 -0
- package/lib/{createServer-DK-g7kbB.js → createServer-69sLlmQA.js} +5350 -5760
- package/lib/createServer-69sLlmQA.js.map +1 -0
- package/lib/{hook-Diu0rqp-.js → hook-DgGeo5iL.js} +12 -14
- package/lib/{hook-Diu0rqp-.js.map → hook-DgGeo5iL.js.map} +1 -1
- package/lib/{index-CkwDvuPt.js → index-CBXSgjaE.js} +259 -238
- package/lib/index-CBXSgjaE.js.map +1 -0
- package/lib/index-CPNSgwSb.js +36 -0
- package/lib/index-CPNSgwSb.js.map +1 -0
- package/lib/index-DStSNvP-.js +1284 -0
- package/lib/index-DStSNvP-.js.map +1 -0
- package/lib/index-LNp6rxyU.js.map +1 -1
- package/lib/index.esm-BSV1C092.js +692 -0
- package/lib/index.esm-BSV1C092.js.map +1 -0
- package/lib/index.esm-BnnBRKJX.js +1214 -0
- package/lib/index.esm-BnnBRKJX.js.map +1 -0
- package/lib/invariant-Caa8-XvF.js.map +1 -1
- package/lib/jsx-runtime-Dx-03ztt.js +446 -0
- package/lib/jsx-runtime-Dx-03ztt.js.map +1 -0
- package/lib/object_hash-BNWPnMN9.js +787 -0
- package/lib/object_hash-BNWPnMN9.js.map +1 -0
- package/lib/post-processors/removeExtensions.js +11 -0
- package/lib/post-processors/removeExtensions.js.map +1 -0
- package/lib/post-processors/removePaths.js +28 -0
- package/lib/post-processors/removePaths.js.map +1 -0
- package/lib/post-processors/traverse.js +12 -0
- package/lib/post-processors/traverse.js.map +1 -0
- package/lib/prism-csharp.min-DUwvItt4.js +63 -0
- package/lib/{prism-csharp.min-Yizuc34Y.js.map → prism-csharp.min-DUwvItt4.js.map} +1 -1
- package/lib/prism-java.min-BtgBR4yd.js +35 -0
- package/lib/{prism-java.min-d5iT_mOd.js.map → prism-java.min-BtgBR4yd.js.map} +1 -1
- package/lib/prism-markup-BNGj0Tvm.js.map +1 -1
- package/lib/prism-ruby.min-DeDXCp1r.js +38 -0
- package/lib/{prism-ruby.min-C7LwcKyz.js.map → prism-ruby.min-DeDXCp1r.js.map} +1 -1
- package/lib/prism-typescript.min-CD7H2IYQ.js +34 -0
- package/lib/{prism-typescript.min-oSVeWCAd.js.map → prism-typescript.min-CD7H2IYQ.js.map} +1 -1
- package/lib/state-CFQsUZUP.js +202 -0
- package/lib/state-CFQsUZUP.js.map +1 -0
- package/lib/ui/Accordion.js +2 -2
- package/lib/ui/Accordion.js.map +1 -1
- package/lib/ui/ActionButton.js +4 -4
- package/lib/ui/ActionButton.js.map +1 -1
- package/lib/ui/Alert.js +3 -3
- package/lib/ui/Alert.js.map +1 -1
- package/lib/ui/AlertDialog.js +2 -2
- package/lib/ui/AlertDialog.js.map +1 -1
- package/lib/ui/Badge.js +3 -3
- package/lib/ui/Badge.js.map +1 -1
- package/lib/ui/Breadcrumb.js +2 -2
- package/lib/ui/Breadcrumb.js.map +1 -1
- package/lib/ui/Button.js +3 -3
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/Callout.js +2 -2
- package/lib/ui/Callout.js.map +1 -1
- package/lib/ui/Card.js +2 -2
- package/lib/ui/Card.js.map +1 -1
- package/lib/ui/Carousel.js +407 -401
- package/lib/ui/Carousel.js.map +1 -1
- package/lib/ui/Checkbox.js +2 -2
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/Command.js +111 -108
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Dialog.js +2 -2
- package/lib/ui/Dialog.js.map +1 -1
- package/lib/ui/Drawer.js +81 -81
- package/lib/ui/Drawer.js.map +1 -1
- package/lib/ui/DropdownMenu.js +2 -2
- package/lib/ui/DropdownMenu.js.map +1 -1
- package/lib/ui/Form.js +3 -3
- package/lib/ui/Form.js.map +1 -1
- package/lib/ui/HoverCard.js +2 -2
- package/lib/ui/Input.js +2 -2
- package/lib/ui/Input.js.map +1 -1
- package/lib/ui/Label.js +3 -3
- package/lib/ui/Pagination.js +2 -2
- package/lib/ui/Pagination.js.map +1 -1
- package/lib/ui/Popover.js +2 -2
- package/lib/ui/Popover.js.map +1 -1
- package/lib/ui/Progress.js +2 -2
- package/lib/ui/Progress.js.map +1 -1
- package/lib/ui/RadioGroup.js +2 -2
- package/lib/ui/RadioGroup.js.map +1 -1
- package/lib/ui/ScrollArea.js +2 -2
- package/lib/ui/ScrollArea.js.map +1 -1
- package/lib/ui/Select.js +2 -2
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Skeleton.js +2 -2
- package/lib/ui/Skeleton.js.map +1 -1
- package/lib/ui/Slider.js +2 -2
- package/lib/ui/Switch.js +2 -2
- package/lib/ui/Switch.js.map +1 -1
- package/lib/ui/Tabs.js +2 -2
- package/lib/ui/Textarea.js +2 -2
- package/lib/ui/Textarea.js.map +1 -1
- package/lib/ui/Toggle.js +3 -3
- package/lib/ui/Toggle.js.map +1 -1
- package/lib/ui/ToggleGroup.js +2 -2
- package/lib/ui/ToggleGroup.js.map +1 -1
- package/lib/ui/Tooltip.js +2 -2
- package/lib/useExposedProps-DE9lR6MF.js +9 -0
- package/lib/useExposedProps-DE9lR6MF.js.map +1 -0
- package/lib/{utils-DcpDOncX.js → utils-B4O1uet5.js} +35 -36
- package/lib/{utils-DcpDOncX.js.map → utils-B4O1uet5.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +9 -8
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +365 -371
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +814 -967
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.openapi-worker.js +1 -1
- package/lib/zudoku.openapi-worker.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +123 -0
- package/lib/zudoku.plugin-api-catalog.js.map +1 -0
- package/lib/zudoku.plugin-api-keys.js +40 -39
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +4 -4
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +16 -15
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +5 -5
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-redirect.js.map +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +53 -24
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/package.json +74 -51
- package/src/app/demo.tsx +1 -1
- package/src/app/entry.client.tsx +16 -1
- package/src/app/entry.server.tsx +3 -2
- package/src/app/main.tsx +6 -2
- package/src/app/sentry.ts +24 -0
- package/src/app/standalone.tsx +1 -1
- package/src/app/tailwind.ts +67 -52
- package/src/lib/authentication/AuthenticationPlugin.tsx +4 -1
- package/src/lib/authentication/authentication.ts +1 -1
- package/src/lib/authentication/components/CallbackHandler.tsx +1 -1
- package/src/lib/authentication/components/SignIn.tsx +1 -1
- package/src/lib/authentication/components/SignOut.tsx +1 -1
- package/src/lib/authentication/hook.ts +1 -3
- package/src/lib/authentication/providers/auth0.tsx +3 -2
- package/src/lib/authentication/providers/openid.tsx +22 -33
- package/src/lib/authentication/state.ts +44 -10
- package/src/lib/components/AnchorLink.tsx +1 -1
- package/src/lib/components/Bootstrap.tsx +25 -20
- package/src/lib/components/Header.tsx +44 -11
- package/src/lib/components/Heading.tsx +13 -13
- package/src/lib/components/Layout.tsx +55 -38
- package/src/lib/components/Markdown.tsx +1 -1
- package/src/lib/components/MobileTopNavigation.tsx +26 -33
- package/src/lib/components/NotFoundPage.tsx +1 -1
- package/src/lib/components/ReactMarkdown.license.txt +21 -0
- package/src/lib/components/ReactMarkdown.tsx +264 -0
- package/src/lib/components/Search.tsx +3 -3
- package/src/lib/components/SlotletProvider.tsx +1 -1
- package/src/lib/components/SyntaxHighlight.tsx +3 -6
- package/src/lib/components/ThemeSwitch.tsx +6 -4
- package/src/lib/components/TopNavigation.tsx +26 -18
- package/src/lib/components/Zudoku.tsx +1 -1
- package/src/lib/components/context/ZudokuContext.ts +1 -1
- package/src/lib/components/index.ts +1 -1
- package/src/lib/components/navigation/Sidebar.tsx +18 -8
- package/src/lib/components/navigation/SidebarBadge.tsx +0 -10
- package/src/lib/components/navigation/SidebarCategory.tsx +11 -10
- package/src/lib/components/navigation/SidebarItem.tsx +11 -14
- package/src/lib/components/navigation/SidebarWrapper.tsx +1 -1
- package/src/lib/components/navigation/utils.ts +1 -1
- package/src/lib/core/ZudokuContext.ts +1 -1
- package/src/lib/core/plugins.ts +5 -1
- package/src/lib/errors/RouterError.tsx +1 -1
- package/src/lib/oas/graphql/index.ts +4 -1
- package/src/lib/oas/parser/upgrade/index.ts +4 -27
- package/src/lib/plugins/api-catalog/Catalog.tsx +123 -0
- package/src/lib/plugins/api-catalog/index.tsx +64 -0
- package/src/lib/plugins/api-keys/CreateApiKey.tsx +1 -1
- package/src/lib/plugins/api-keys/ProtectedRoute.tsx +1 -1
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +1 -1
- package/src/lib/plugins/api-keys/index.tsx +4 -1
- package/src/lib/plugins/custom-pages/index.tsx +1 -1
- package/src/lib/plugins/markdown/MdxPage.tsx +28 -2
- package/src/lib/plugins/markdown/index.tsx +5 -2
- package/src/lib/plugins/markdown/resolver.ts +2 -4
- package/src/lib/plugins/openapi/ColorizedParam.tsx +2 -2
- package/src/lib/plugins/openapi/OperationList.tsx +64 -8
- package/src/lib/plugins/openapi/OperationListItem.tsx +31 -2
- package/src/lib/plugins/openapi/Route.tsx +45 -9
- package/src/lib/plugins/openapi/Sidecar.tsx +3 -17
- package/src/lib/plugins/openapi/client/GraphQLClient.tsx +17 -0
- package/src/lib/plugins/openapi/client/useCreateQuery.ts +5 -2
- package/src/lib/plugins/openapi/context.tsx +2 -2
- package/src/lib/plugins/openapi/graphql/gql.ts +2 -2
- package/src/lib/plugins/openapi/graphql/graphql.ts +3 -0
- package/src/lib/plugins/openapi/index.tsx +35 -28
- package/src/lib/plugins/openapi/interfaces.ts +22 -1
- package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -0
- package/src/lib/plugins/openapi/post-processors/removeExtensions.test.ts +144 -0
- package/src/lib/plugins/openapi/post-processors/removeExtensions.ts +24 -0
- package/src/lib/plugins/openapi/post-processors/removePaths.test.ts +126 -0
- package/src/lib/plugins/openapi/post-processors/removePaths.ts +55 -0
- package/src/lib/plugins/openapi/post-processors/traverse.ts +1 -0
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +1 -1
- package/src/lib/plugins/openapi/util/methodToColor.ts +27 -0
- package/src/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.tsx +32 -0
- package/src/lib/plugins/redirect/index.tsx +2 -2
- package/src/lib/plugins/search-inkeep/index.tsx +78 -23
- package/src/lib/plugins/search-inkeep/inkeep.ts +3 -9
- package/src/lib/util/MdxComponents.tsx +3 -8
- package/src/lib/util/createVariantComponent.tsx +2 -2
- package/src/lib/util/traverse.ts +25 -0
- package/src/lib/util/useExposedProps.tsx +1 -1
- package/src/lib/util/useScrollToAnchor.ts +1 -1
- package/src/lib/util/useScrollToTop.ts +1 -1
- package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.d.ts +0 -2
- package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js +0 -3
- package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js.map +0 -1
- package/dist/vite/plugin-custom-css.js.map +0 -1
- package/lib/AnchorLink-CDlhr8gL.js +0 -706
- package/lib/AnchorLink-CDlhr8gL.js.map +0 -1
- package/lib/AuthenticationPlugin-DeGDVa1r.js.map +0 -1
- package/lib/InkeepCustomTrigger-CE5-K5ex.js +0 -6
- package/lib/InkeepCustomTrigger-CE5-K5ex.js.map +0 -1
- package/lib/Markdown-BorQdbxW.js.map +0 -1
- package/lib/MdxPage-DFlbtJWi.js +0 -174
- package/lib/MdxPage-DFlbtJWi.js.map +0 -1
- package/lib/OperationList-KshJrrLL.js +0 -4691
- package/lib/OperationList-KshJrrLL.js.map +0 -1
- package/lib/Route-DlG_HTMu.js +0 -11
- package/lib/Route-DlG_HTMu.js.map +0 -1
- package/lib/SidebarBadge-DxFJcJ6V.js +0 -51
- package/lib/SidebarBadge-DxFJcJ6V.js.map +0 -1
- package/lib/SlotletProvider-D2v6rJy1.js +0 -252
- package/lib/SlotletProvider-D2v6rJy1.js.map +0 -1
- package/lib/assets/index-B_Jk_Yzp.js.map +0 -1
- package/lib/assets/worker-CPsGZsve.js.map +0 -1
- package/lib/cn-BmFQLtkS.js.map +0 -1
- package/lib/context-D1nXWxm7.js.map +0 -1
- package/lib/createServer-DK-g7kbB.js.map +0 -1
- package/lib/index-BcesIHH4.js +0 -1273
- package/lib/index-BcesIHH4.js.map +0 -1
- package/lib/index-BuAyrJe3.js +0 -46
- package/lib/index-BuAyrJe3.js.map +0 -1
- package/lib/index-CkwDvuPt.js.map +0 -1
- package/lib/index-Czzd9rjU.js +0 -899
- package/lib/index-Czzd9rjU.js.map +0 -1
- package/lib/index-Yn8c3UWE.js +0 -921
- package/lib/index-Yn8c3UWE.js.map +0 -1
- package/lib/index.esm-C5mr_sKO.js +0 -1193
- package/lib/index.esm-C5mr_sKO.js.map +0 -1
- package/lib/jsx-runtime-B6kdoens.js +0 -635
- package/lib/jsx-runtime-B6kdoens.js.map +0 -1
- package/lib/prism-csharp.min-Yizuc34Y.js +0 -35
- package/lib/prism-java.min-d5iT_mOd.js +0 -7
- package/lib/prism-markup-templating-DZrrEs0A.js +0 -62
- package/lib/prism-markup-templating-DZrrEs0A.js.map +0 -1
- package/lib/prism-php.min-o7FpoMP_.js +0 -11
- package/lib/prism-php.min-o7FpoMP_.js.map +0 -1
- package/lib/prism-ruby.min-C7LwcKyz.js +0 -10
- package/lib/prism-typescript.min-oSVeWCAd.js +0 -6
- package/lib/router-lfyopgBI.js +0 -3024
- package/lib/router-lfyopgBI.js.map +0 -1
- package/lib/state-BsPrOUAh.js +0 -252
- package/lib/state-BsPrOUAh.js.map +0 -1
- package/lib/useExposedProps-CTPtylCV.js +0 -10
- package/lib/useExposedProps-CTPtylCV.js.map +0 -1
- package/src/lib/plugins/search-inkeep/InkeepCustomTrigger.tsx +0 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ComponentType, type ReactNode } from "react";
|
|
2
|
-
import type { RouteObject } from "react-router
|
|
2
|
+
import type { RouteObject } from "react-router";
|
|
3
3
|
import { type ExposedComponentProps } from "../../components/SlotletProvider.js";
|
|
4
4
|
import type { NavigationPlugin, ZudokuPlugin } from "../../core/plugins.js";
|
|
5
5
|
import { CustomPage } from "./CustomPage.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useMDXComponents } from "@mdx-js/react";
|
|
2
2
|
import slugify from "@sindresorhus/slugify";
|
|
3
3
|
import { Helmet } from "@zudoku/react-helmet-async";
|
|
4
|
-
import { type PropsWithChildren } from "react";
|
|
5
|
-
import { Link } from "react-router
|
|
4
|
+
import { type PropsWithChildren, useEffect } from "react";
|
|
5
|
+
import { Link } from "react-router";
|
|
6
6
|
import { CategoryHeading } from "../../components/CategoryHeading.js";
|
|
7
7
|
import { Heading } from "../../components/Heading.js";
|
|
8
8
|
import { ProseClasses } from "../../components/Markdown.js";
|
|
@@ -15,6 +15,14 @@ import { cn } from "../../util/cn.js";
|
|
|
15
15
|
import { Toc } from "./Toc.js";
|
|
16
16
|
import { MarkdownPluginDefaultOptions, MDXImport } from "./index.js";
|
|
17
17
|
|
|
18
|
+
declare global {
|
|
19
|
+
interface Window {
|
|
20
|
+
__getReactRefreshIgnoredExports?: (args: {
|
|
21
|
+
id: string;
|
|
22
|
+
}) => string[] | undefined;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
18
26
|
const MarkdownHeadings = {
|
|
19
27
|
h2: ({ children, id }) => (
|
|
20
28
|
<Heading level={2} id={id} registerSidebarAnchor>
|
|
@@ -30,11 +38,14 @@ const MarkdownHeadings = {
|
|
|
30
38
|
|
|
31
39
|
export const MdxPage = ({
|
|
32
40
|
mdxComponent: MdxComponent,
|
|
41
|
+
file,
|
|
33
42
|
frontmatter = {},
|
|
34
43
|
defaultOptions,
|
|
35
44
|
tableOfContents,
|
|
45
|
+
excerpt,
|
|
36
46
|
}: PropsWithChildren<
|
|
37
47
|
Omit<MDXImport, "default"> & {
|
|
48
|
+
file: string;
|
|
38
49
|
mdxComponent: MDXImport["default"];
|
|
39
50
|
defaultOptions?: MarkdownPluginDefaultOptions;
|
|
40
51
|
}
|
|
@@ -57,10 +68,25 @@ export const MdxPage = ({
|
|
|
57
68
|
|
|
58
69
|
const { prev, next } = usePrevNext();
|
|
59
70
|
|
|
71
|
+
useEffect(() => {
|
|
72
|
+
if (process.env.NODE_ENV === "development") {
|
|
73
|
+
window.__getReactRefreshIgnoredExports = ({ id }) => {
|
|
74
|
+
if (!id.endsWith(file)) return;
|
|
75
|
+
|
|
76
|
+
return ["frontmatter", "tableOfContents"];
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
return () => {
|
|
80
|
+
window.__getReactRefreshIgnoredExports = undefined;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
}, [file]);
|
|
84
|
+
|
|
60
85
|
return (
|
|
61
86
|
<div className="xl:grid grid-cols-[--sidecar-grid-cols] gap-8 justify-between">
|
|
62
87
|
<Helmet>
|
|
63
88
|
<title>{pageTitle}</title>
|
|
89
|
+
{excerpt && <meta name="description" content={excerpt} />}
|
|
64
90
|
</Helmet>
|
|
65
91
|
<div
|
|
66
92
|
className={cn(
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Toc } from "@stefanprobst/rehype-extract-toc";
|
|
2
2
|
import type { MDXProps } from "mdx/types.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { type JSX } from "react";
|
|
4
|
+
import { RouteObject } from "react-router";
|
|
5
|
+
import { ZudokuDocsConfig } from "../../../config/validators/common.js";
|
|
5
6
|
import type { ZudokuPlugin } from "../../core/plugins.js";
|
|
6
7
|
import { DocResolver } from "./resolver.js";
|
|
7
8
|
|
|
@@ -24,6 +25,7 @@ export type Frontmatter = {
|
|
|
24
25
|
export type MDXImport = {
|
|
25
26
|
tableOfContents: Toc;
|
|
26
27
|
frontmatter: Frontmatter;
|
|
28
|
+
excerpt?: string;
|
|
27
29
|
default: (props: MDXProps) => JSX.Element;
|
|
28
30
|
};
|
|
29
31
|
|
|
@@ -57,6 +59,7 @@ export const markdownPlugin = (
|
|
|
57
59
|
return {
|
|
58
60
|
element: (
|
|
59
61
|
<MdxPage
|
|
62
|
+
file={file}
|
|
60
63
|
mdxComponent={Component}
|
|
61
64
|
{...props}
|
|
62
65
|
defaultOptions={defaultOptions}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
2
|
import path from "path";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
ZudokuDocsConfig,
|
|
6
|
-
} from "../../../config/validators/validate.js";
|
|
3
|
+
import { ZudokuDocsConfig } from "../../../config/validators/common.js";
|
|
4
|
+
import { ZudokuConfig } from "../../../config/validators/validate.js";
|
|
7
5
|
|
|
8
6
|
const DEFAULT_DOCS_FILES = "/pages/**/*.{md,mdx}";
|
|
9
7
|
|
|
@@ -6,10 +6,10 @@ import { pastellize } from "../../util/pastellize.js";
|
|
|
6
6
|
export const DATA_ATTR = "data-linked-param";
|
|
7
7
|
|
|
8
8
|
export const usePastellizedColor = (name: string) => {
|
|
9
|
-
const {
|
|
9
|
+
const { resolvedTheme } = useTheme();
|
|
10
10
|
return pastellize(
|
|
11
11
|
name,
|
|
12
|
-
|
|
12
|
+
resolvedTheme === "light" ? { saturation: 85, lightness: 50 } : undefined,
|
|
13
13
|
);
|
|
14
14
|
};
|
|
15
15
|
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import { ResultOf } from "@graphql-typed-document-node/core";
|
|
2
2
|
import { useSuspenseQuery } from "@tanstack/react-query";
|
|
3
|
+
import { Helmet } from "@zudoku/react-helmet-async";
|
|
4
|
+
import { useNavigate } from "react-router";
|
|
5
|
+
import {
|
|
6
|
+
Select,
|
|
7
|
+
SelectContent,
|
|
8
|
+
SelectItem,
|
|
9
|
+
SelectTrigger,
|
|
10
|
+
SelectValue,
|
|
11
|
+
} from "zudoku/ui/Select.js";
|
|
12
|
+
import { useSelectedServerStore } from "../../authentication/state.js";
|
|
3
13
|
import { CategoryHeading } from "../../components/CategoryHeading.js";
|
|
4
14
|
import { Heading } from "../../components/Heading.js";
|
|
5
15
|
import { Markdown, ProseClasses } from "../../components/Markdown.js";
|
|
@@ -10,6 +20,7 @@ import StaggeredRender from "./StaggeredRender.js";
|
|
|
10
20
|
import { useCreateQuery } from "./client/useCreateQuery.js";
|
|
11
21
|
import { useOasConfig } from "./context.js";
|
|
12
22
|
import { graphql } from "./graphql/index.js";
|
|
23
|
+
import { sanitizeMarkdownForMetatag } from "./util/sanitizeMarkdownForMetatag.js";
|
|
13
24
|
|
|
14
25
|
export const OperationsFragment = graphql(/* GraphQL */ `
|
|
15
26
|
fragment OperationsFragment on OperationItem {
|
|
@@ -81,6 +92,7 @@ const AllOperationsQuery = graphql(/* GraphQL */ `
|
|
|
81
92
|
query AllOperations($input: JSON!, $type: SchemaType!) {
|
|
82
93
|
schema(input: $input, type: $type) {
|
|
83
94
|
description
|
|
95
|
+
summary
|
|
84
96
|
title
|
|
85
97
|
url
|
|
86
98
|
version
|
|
@@ -97,30 +109,73 @@ const AllOperationsQuery = graphql(/* GraphQL */ `
|
|
|
97
109
|
`);
|
|
98
110
|
|
|
99
111
|
export const OperationList = () => {
|
|
100
|
-
const { input, type } = useOasConfig();
|
|
112
|
+
const { input, type, versions, version } = useOasConfig();
|
|
101
113
|
const query = useCreateQuery(AllOperationsQuery, { input, type });
|
|
114
|
+
const { selectedServer } = useSelectedServerStore();
|
|
102
115
|
const result = useSuspenseQuery(query);
|
|
116
|
+
const title = result.data.schema.title;
|
|
117
|
+
const summary = result.data.schema.summary;
|
|
118
|
+
const description = result.data.schema.description;
|
|
119
|
+
const navigate = useNavigate();
|
|
120
|
+
|
|
121
|
+
// The summary property is preferable here as it is a short description of
|
|
122
|
+
// the API, whereas the description property is typically longer and supports
|
|
123
|
+
// commonmark formatting, making it ill-suited for use in the meta description
|
|
124
|
+
const metaDescription = summary
|
|
125
|
+
? summary
|
|
126
|
+
: description
|
|
127
|
+
? sanitizeMarkdownForMetatag(description)
|
|
128
|
+
: undefined;
|
|
103
129
|
|
|
104
130
|
return (
|
|
105
131
|
<div className="pt-[--padding-content-top]">
|
|
132
|
+
<Helmet>
|
|
133
|
+
<title>{title}</title>
|
|
134
|
+
{metaDescription && (
|
|
135
|
+
<meta name="description" content={metaDescription} />
|
|
136
|
+
)}
|
|
137
|
+
</Helmet>
|
|
106
138
|
<div
|
|
107
139
|
className={cn(ProseClasses, "mb-16 max-w-full prose-img:max-w-prose")}
|
|
108
140
|
>
|
|
109
|
-
<
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
141
|
+
<div className="flex">
|
|
142
|
+
<div className="flex-1">
|
|
143
|
+
<CategoryHeading>Overview</CategoryHeading>
|
|
144
|
+
<Heading level={1} id="description" registerSidebarAnchor>
|
|
145
|
+
{title}
|
|
146
|
+
</Heading>
|
|
147
|
+
</div>
|
|
148
|
+
<div>
|
|
149
|
+
{Object.entries(versions).length > 1 && (
|
|
150
|
+
<Select
|
|
151
|
+
onValueChange={(version) => navigate(versions[version]!)}
|
|
152
|
+
defaultValue={version}
|
|
153
|
+
>
|
|
154
|
+
<SelectTrigger className="w-[180px]">
|
|
155
|
+
<SelectValue placeholder="Select version" />
|
|
156
|
+
</SelectTrigger>
|
|
157
|
+
<SelectContent>
|
|
158
|
+
{Object.entries(versions).map(([version]) => (
|
|
159
|
+
<SelectItem key={version} value={version}>
|
|
160
|
+
{version}
|
|
161
|
+
</SelectItem>
|
|
162
|
+
))}
|
|
163
|
+
</SelectContent>
|
|
164
|
+
</Select>
|
|
165
|
+
)}
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
113
168
|
<Markdown content={result.data.schema.description ?? ""} />
|
|
114
169
|
</div>
|
|
115
170
|
<hr />
|
|
116
|
-
<div className="my-4 flex justify-end">
|
|
171
|
+
<div className="my-4 flex items-center justify-end gap-4">
|
|
117
172
|
<Endpoint />
|
|
118
173
|
</div>
|
|
119
|
-
|
|
120
174
|
{result.data.schema.tags
|
|
121
175
|
.filter((tag) => tag.operations.length > 0)
|
|
122
176
|
.map((tag) => (
|
|
123
|
-
|
|
177
|
+
// px, -mx is so that `content-visibility` doesn't cut off overflown heading anchor links '#'
|
|
178
|
+
<div key={tag.name} className="px-6 -mx-6 [content-visibility:auto]">
|
|
124
179
|
{tag.name && <CategoryHeading>{tag.name}</CategoryHeading>}
|
|
125
180
|
{tag.description && (
|
|
126
181
|
<Markdown
|
|
@@ -132,6 +187,7 @@ export const OperationList = () => {
|
|
|
132
187
|
<StaggeredRender>
|
|
133
188
|
{tag.operations.map((fragment) => (
|
|
134
189
|
<OperationListItem
|
|
190
|
+
serverUrl={selectedServer ?? result.data.schema.url}
|
|
135
191
|
key={fragment.slug}
|
|
136
192
|
operationFragment={fragment}
|
|
137
193
|
/>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useState } from "react";
|
|
1
|
+
import { useRef, useState } from "react";
|
|
2
2
|
import { Heading } from "../../components/Heading.js";
|
|
3
3
|
import { Markdown, ProseClasses } from "../../components/Markdown.js";
|
|
4
4
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from "../../ui/Tabs.js";
|
|
@@ -9,20 +9,24 @@ import { ParameterList } from "./ParameterList.js";
|
|
|
9
9
|
import { Sidecar } from "./Sidecar.js";
|
|
10
10
|
import { FragmentType, useFragment } from "./graphql/index.js";
|
|
11
11
|
import { SchemaView } from "./schema/SchemaView.js";
|
|
12
|
+
import { methodForColor } from "./util/methodToColor.js";
|
|
12
13
|
|
|
13
14
|
export const PARAM_GROUPS = ["path", "query", "header", "cookie"] as const;
|
|
14
15
|
export type ParameterGroup = (typeof PARAM_GROUPS)[number];
|
|
15
16
|
|
|
16
17
|
export const OperationListItem = ({
|
|
17
18
|
operationFragment,
|
|
19
|
+
serverUrl,
|
|
18
20
|
}: {
|
|
19
21
|
operationFragment: FragmentType<typeof OperationsFragment>;
|
|
22
|
+
serverUrl?: string;
|
|
20
23
|
}) => {
|
|
21
24
|
const operation = useFragment(OperationsFragment, operationFragment);
|
|
22
25
|
const groupedParameters = groupBy(
|
|
23
26
|
operation.parameters ?? [],
|
|
24
27
|
(param) => param.in,
|
|
25
28
|
);
|
|
29
|
+
const parentRef = useRef<HTMLDivElement>(null);
|
|
26
30
|
|
|
27
31
|
const first = operation.responses.at(0);
|
|
28
32
|
const [selectedResponse, setSelectedResponse] = useState(first?.statusCode);
|
|
@@ -30,12 +34,37 @@ export const OperationListItem = ({
|
|
|
30
34
|
return (
|
|
31
35
|
<div
|
|
32
36
|
key={operation.operationId}
|
|
33
|
-
className="grid grid-cols-1 lg:grid-cols-[
|
|
37
|
+
className="grid grid-cols-1 lg:grid-cols-[minmax(0,4fr)_minmax(0,3fr)] gap-8 items-start border-b-2 mb-16 pb-16"
|
|
34
38
|
>
|
|
35
39
|
<div className="flex flex-col gap-4">
|
|
36
40
|
<Heading level={2} id={operation.slug} registerSidebarAnchor>
|
|
37
41
|
{operation.summary}
|
|
38
42
|
</Heading>
|
|
43
|
+
<div className="text-sm flex gap-2 font-mono">
|
|
44
|
+
<span className={methodForColor(operation.method)}>
|
|
45
|
+
{operation.method.toUpperCase()}
|
|
46
|
+
</span>
|
|
47
|
+
<div
|
|
48
|
+
ref={parentRef}
|
|
49
|
+
className="max-w-full truncate flex cursor-pointer"
|
|
50
|
+
onClick={() => {
|
|
51
|
+
if (parentRef.current) {
|
|
52
|
+
const range = document.createRange();
|
|
53
|
+
range.selectNodeContents(parentRef.current);
|
|
54
|
+
const selection = window.getSelection();
|
|
55
|
+
selection?.removeAllRanges();
|
|
56
|
+
selection?.addRange(range);
|
|
57
|
+
}
|
|
58
|
+
}}
|
|
59
|
+
>
|
|
60
|
+
<div className="text-neutral-400 dark:text-neutral-500 truncate">
|
|
61
|
+
{serverUrl}
|
|
62
|
+
</div>
|
|
63
|
+
<div className="text-neutral-900 dark:text-neutral-200">
|
|
64
|
+
{operation.path}
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
39
68
|
{operation.description && (
|
|
40
69
|
<Markdown
|
|
41
70
|
className={`${ProseClasses} max-w-full prose-img:max-w-prose`}
|
|
@@ -1,19 +1,55 @@
|
|
|
1
|
-
import { Outlet } from "react-router
|
|
1
|
+
import { Outlet, useParams } from "react-router";
|
|
2
|
+
import { joinPath } from "../../util/joinPath.js";
|
|
2
3
|
import type { GraphQLClient } from "./client/GraphQLClient.js";
|
|
3
4
|
import { GraphQLProvider } from "./client/GraphQLContext.js";
|
|
4
5
|
import { OasConfigProvider } from "./context.js";
|
|
5
|
-
import { OasPluginConfig } from "./interfaces.js";
|
|
6
|
+
import { type OasPluginConfig } from "./interfaces.js";
|
|
6
7
|
|
|
7
8
|
export const OpenApiRoute = ({
|
|
9
|
+
basePath,
|
|
10
|
+
versions,
|
|
8
11
|
config,
|
|
9
12
|
client,
|
|
10
13
|
}: {
|
|
14
|
+
basePath: string;
|
|
15
|
+
versions: string[];
|
|
11
16
|
config: OasPluginConfig;
|
|
12
17
|
client: GraphQLClient;
|
|
13
|
-
}) =>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
}) => {
|
|
19
|
+
const { version } = useParams<"version">();
|
|
20
|
+
|
|
21
|
+
const input =
|
|
22
|
+
config.type === "file"
|
|
23
|
+
? {
|
|
24
|
+
type: config.type,
|
|
25
|
+
input: version
|
|
26
|
+
? config.input[version]!
|
|
27
|
+
: Object.values(config.input).at(0)!,
|
|
28
|
+
}
|
|
29
|
+
: { type: config.type, input: config.input };
|
|
30
|
+
|
|
31
|
+
const currentVersion = version ?? versions.at(0);
|
|
32
|
+
|
|
33
|
+
if (!currentVersion) {
|
|
34
|
+
throw new Error("No version found");
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<OasConfigProvider
|
|
39
|
+
value={{
|
|
40
|
+
config: {
|
|
41
|
+
...config,
|
|
42
|
+
version: currentVersion,
|
|
43
|
+
versions: Object.fromEntries(
|
|
44
|
+
versions.map((version) => [version, joinPath(basePath, version)]),
|
|
45
|
+
),
|
|
46
|
+
...input,
|
|
47
|
+
},
|
|
48
|
+
}}
|
|
49
|
+
>
|
|
50
|
+
<GraphQLProvider client={client}>
|
|
51
|
+
<Outlet />
|
|
52
|
+
</GraphQLProvider>
|
|
53
|
+
</OasConfigProvider>
|
|
54
|
+
);
|
|
55
|
+
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { useSuspenseQuery } from "@tanstack/react-query";
|
|
2
2
|
import { HTTPSnippet } from "@zudoku/httpsnippet";
|
|
3
3
|
import { Fragment, useMemo, useTransition } from "react";
|
|
4
|
-
import { useSearchParams } from "react-router
|
|
4
|
+
import { useSearchParams } from "react-router";
|
|
5
5
|
import { useSelectedServerStore } from "../../authentication/state.js";
|
|
6
|
-
import { TextColorMap } from "../../components/navigation/SidebarBadge.js";
|
|
7
6
|
import { SyntaxHighlight } from "../../components/SyntaxHighlight.js";
|
|
8
7
|
import type { SchemaObject } from "../../oas/parser/index.js";
|
|
9
8
|
import { cn } from "../../util/cn.js";
|
|
@@ -20,6 +19,7 @@ import { ResponsesSidecarBox } from "./ResponsesSidecarBox.js";
|
|
|
20
19
|
import * as SidecarBox from "./SidecarBox.js";
|
|
21
20
|
import { SimpleSelect } from "./SimpleSelect.js";
|
|
22
21
|
import { generateSchemaExample } from "./util/generateSchemaExample.js";
|
|
22
|
+
import { methodForColor } from "./util/methodToColor.js";
|
|
23
23
|
|
|
24
24
|
const getConverted = (snippet: HTTPSnippet, option: string) => {
|
|
25
25
|
let converted;
|
|
@@ -76,17 +76,6 @@ export const GetServerQuery = graphql(/* GraphQL */ `
|
|
|
76
76
|
}
|
|
77
77
|
`);
|
|
78
78
|
|
|
79
|
-
const methodToColor = {
|
|
80
|
-
get: TextColorMap.green,
|
|
81
|
-
post: TextColorMap.blue,
|
|
82
|
-
put: TextColorMap.yellow,
|
|
83
|
-
delete: TextColorMap.red,
|
|
84
|
-
patch: TextColorMap.purple,
|
|
85
|
-
options: TextColorMap.indigo,
|
|
86
|
-
head: TextColorMap.gray,
|
|
87
|
-
trace: TextColorMap.gray,
|
|
88
|
-
};
|
|
89
|
-
|
|
90
79
|
const EXAMPLE_LANGUAGES = [
|
|
91
80
|
{ value: "shell", label: "cURL" },
|
|
92
81
|
{ value: "js", label: "JavaScript" },
|
|
@@ -114,10 +103,7 @@ export const Sidecar = ({
|
|
|
114
103
|
const query = useCreateQuery(GetServerQuery, { input, type });
|
|
115
104
|
const result = useSuspenseQuery(query);
|
|
116
105
|
|
|
117
|
-
const methodTextColor =
|
|
118
|
-
methodToColor[
|
|
119
|
-
operation.method.toLocaleLowerCase() as keyof typeof methodToColor
|
|
120
|
-
] ?? TextColorMap.gray;
|
|
106
|
+
const methodTextColor = methodForColor(operation.method);
|
|
121
107
|
|
|
122
108
|
const [searchParams, setSearchParams] = useSearchParams();
|
|
123
109
|
const [, startTransition] = useTransition();
|
|
@@ -15,6 +15,20 @@ type GraphQLResponse<TResult> = {
|
|
|
15
15
|
data: TResult;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
+
const resolveVariables = async (variables?: unknown) => {
|
|
19
|
+
if (!variables) return;
|
|
20
|
+
|
|
21
|
+
if (
|
|
22
|
+
typeof variables === "object" &&
|
|
23
|
+
"type" in variables &&
|
|
24
|
+
variables.type === "file" &&
|
|
25
|
+
"input" in variables &&
|
|
26
|
+
typeof variables.input === "function"
|
|
27
|
+
) {
|
|
28
|
+
variables.input = await variables.input();
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
18
32
|
const throwIfError = (response: GraphQLResponse<unknown>) => {
|
|
19
33
|
if (!response.errors?.[0]) return;
|
|
20
34
|
|
|
@@ -47,6 +61,9 @@ export class GraphQLClient {
|
|
|
47
61
|
...[variables]: TVariables extends Record<string, never> ? [] : [TVariables]
|
|
48
62
|
) => {
|
|
49
63
|
const operationName = query.match(/query (\w+)/)?.[1];
|
|
64
|
+
|
|
65
|
+
await resolveVariables(variables);
|
|
66
|
+
|
|
50
67
|
const body = JSON.stringify({ query, variables, operationName });
|
|
51
68
|
|
|
52
69
|
switch (this.#mode) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import hashit from "object-hash";
|
|
2
|
+
import { useContext, useMemo } from "react";
|
|
2
3
|
import type { TypedDocumentString } from "../graphql/graphql.js";
|
|
3
4
|
import { GraphQLContext } from "./GraphQLContext.js";
|
|
4
5
|
|
|
@@ -11,8 +12,10 @@ export const useCreateQuery = <TResult, TVariables>(
|
|
|
11
12
|
throw new Error("useGraphQL must be used within a GraphQLProvider");
|
|
12
13
|
}
|
|
13
14
|
|
|
15
|
+
const hash = useMemo(() => hashit(variables[0] ?? {}), [variables]);
|
|
16
|
+
|
|
14
17
|
return {
|
|
15
18
|
queryFn: () => graphQLClient.fetch(query, ...variables),
|
|
16
|
-
queryKey: [query,
|
|
19
|
+
queryKey: [query, hash],
|
|
17
20
|
} as const;
|
|
18
21
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createContext, useContext } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { OasPluginContext } from "./interfaces.js";
|
|
3
3
|
|
|
4
|
-
const OasContext = createContext<{ config:
|
|
4
|
+
const OasContext = createContext<{ config: OasPluginContext } | undefined>(
|
|
5
5
|
undefined,
|
|
6
6
|
);
|
|
7
7
|
|
|
@@ -17,7 +17,7 @@ const documents = {
|
|
|
17
17
|
types.ServersQueryDocument,
|
|
18
18
|
"\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n examples {\n name\n description\n externalValue\n value\n summary\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n examples {\n name\n description\n externalValue\n value\n summary\n }\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n":
|
|
19
19
|
types.OperationsFragmentFragmentDoc,
|
|
20
|
-
"\n query AllOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n description\n title\n url\n version\n tags {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n }\n }\n }\n":
|
|
20
|
+
"\n query AllOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n description\n summary\n title\n url\n version\n tags {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n }\n }\n }\n":
|
|
21
21
|
types.AllOperationsDocument,
|
|
22
22
|
"\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n":
|
|
23
23
|
types.GetServerQueryDocument,
|
|
@@ -41,7 +41,7 @@ export function graphql(
|
|
|
41
41
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
42
42
|
*/
|
|
43
43
|
export function graphql(
|
|
44
|
-
source: "\n query AllOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n description\n title\n url\n version\n tags {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n }\n }\n }\n",
|
|
44
|
+
source: "\n query AllOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n description\n summary\n title\n url\n version\n tags {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n }\n }\n }\n",
|
|
45
45
|
): typeof import("./graphql.js").AllOperationsDocument;
|
|
46
46
|
/**
|
|
47
47
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
@@ -136,6 +136,7 @@ export type Schema = {
|
|
|
136
136
|
title: Scalars["String"]["output"];
|
|
137
137
|
url: Scalars["String"]["output"];
|
|
138
138
|
version: Scalars["String"]["output"];
|
|
139
|
+
summary?: Maybe<Scalars["String"]["output"]>;
|
|
139
140
|
};
|
|
140
141
|
|
|
141
142
|
export type SchemaOperationsArgs = {
|
|
@@ -261,6 +262,7 @@ export type AllOperationsQuery = {
|
|
|
261
262
|
schema: {
|
|
262
263
|
__typename?: "Schema";
|
|
263
264
|
description?: string | null;
|
|
265
|
+
summary?: string | null;
|
|
264
266
|
title: string;
|
|
265
267
|
url: string;
|
|
266
268
|
version: string;
|
|
@@ -419,6 +421,7 @@ export const AllOperationsDocument = new TypedDocumentString(`
|
|
|
419
421
|
query AllOperations($input: JSON!, $type: SchemaType!) {
|
|
420
422
|
schema(input: $input, type: $type) {
|
|
421
423
|
description
|
|
424
|
+
summary
|
|
422
425
|
title
|
|
423
426
|
url
|
|
424
427
|
version
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { matchPath
|
|
1
|
+
import { matchPath } from "react-router";
|
|
2
2
|
import { type ZudokuPlugin } from "../../core/plugins.js";
|
|
3
3
|
import { graphql } from "./graphql/index.js";
|
|
4
4
|
|
|
@@ -52,6 +52,8 @@ export type OpenApiPluginOptions = OasPluginConfig & InternalOasPluginConfig;
|
|
|
52
52
|
export const openApiPlugin = (config: OpenApiPluginOptions): ZudokuPlugin => {
|
|
53
53
|
const basePath = joinPath(config.navigationId ?? "/reference");
|
|
54
54
|
|
|
55
|
+
const versions = config.type === "file" ? Object.keys(config.input) : [];
|
|
56
|
+
|
|
55
57
|
const client = new GraphQLClient(config);
|
|
56
58
|
|
|
57
59
|
return {
|
|
@@ -125,9 +127,14 @@ export const openApiPlugin = (config: OpenApiPluginOptions): ZudokuPlugin => {
|
|
|
125
127
|
}
|
|
126
128
|
|
|
127
129
|
try {
|
|
130
|
+
const version =
|
|
131
|
+
versions.find((v) => path === joinPath(basePath, v)) ??
|
|
132
|
+
Object.keys(config.input).at(0);
|
|
133
|
+
|
|
128
134
|
const data = await client.fetch(GetCategoriesQuery, {
|
|
129
135
|
type: config.type,
|
|
130
|
-
input: config.input,
|
|
136
|
+
input: config.type === "file" ? config.input[version!] : config.input,
|
|
137
|
+
version,
|
|
131
138
|
});
|
|
132
139
|
|
|
133
140
|
const categories = data.schema.tags
|
|
@@ -159,32 +166,32 @@ export const openApiPlugin = (config: OpenApiPluginOptions): ZudokuPlugin => {
|
|
|
159
166
|
return [];
|
|
160
167
|
}
|
|
161
168
|
},
|
|
162
|
-
getRoutes: () =>
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
async lazy() {
|
|
178
|
-
const { OperationList } = await import(
|
|
179
|
-
"./OperationList.js"
|
|
180
|
-
);
|
|
181
|
-
return { element: <OperationList /> };
|
|
182
|
-
},
|
|
183
|
-
},
|
|
184
|
-
],
|
|
185
|
-
},
|
|
186
|
-
],
|
|
169
|
+
getRoutes: () => [
|
|
170
|
+
{
|
|
171
|
+
path: basePath + "/:version?",
|
|
172
|
+
async lazy() {
|
|
173
|
+
const { OpenApiRoute } = await import("./Route.js");
|
|
174
|
+
return {
|
|
175
|
+
element: (
|
|
176
|
+
<OpenApiRoute
|
|
177
|
+
basePath={basePath}
|
|
178
|
+
versions={versions}
|
|
179
|
+
client={client}
|
|
180
|
+
config={config}
|
|
181
|
+
/>
|
|
182
|
+
),
|
|
183
|
+
};
|
|
187
184
|
},
|
|
188
|
-
|
|
185
|
+
children: [
|
|
186
|
+
{
|
|
187
|
+
index: true,
|
|
188
|
+
async lazy() {
|
|
189
|
+
const { OperationList } = await import("./OperationList.js");
|
|
190
|
+
return { element: <OperationList /> };
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
],
|
|
194
|
+
},
|
|
195
|
+
],
|
|
189
196
|
};
|
|
190
197
|
};
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
type OasSource =
|
|
2
2
|
| { type: "url"; input: string }
|
|
3
|
-
| {
|
|
3
|
+
| {
|
|
4
|
+
type: "file";
|
|
5
|
+
input: {
|
|
6
|
+
[version: string]: () => Promise<unknown>;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
| { type: "raw"; input: string };
|
|
10
|
+
|
|
11
|
+
export type ContextOasSource =
|
|
12
|
+
| { type: "url"; input: string }
|
|
13
|
+
| {
|
|
14
|
+
type: "file";
|
|
15
|
+
input: () => Promise<unknown>;
|
|
16
|
+
}
|
|
4
17
|
| { type: "raw"; input: string };
|
|
5
18
|
|
|
6
19
|
export type OasPluginConfig = {
|
|
@@ -8,3 +21,11 @@ export type OasPluginConfig = {
|
|
|
8
21
|
navigationId?: string;
|
|
9
22
|
skipPreload?: boolean;
|
|
10
23
|
} & OasSource;
|
|
24
|
+
|
|
25
|
+
export type OasPluginContext = {
|
|
26
|
+
server?: string;
|
|
27
|
+
navigationId?: string;
|
|
28
|
+
skipPreload?: boolean;
|
|
29
|
+
version: string;
|
|
30
|
+
versions: Record<string, string>;
|
|
31
|
+
} & ContextOasSource;
|