zudoku 0.3.0-dev.9 → 0.3.0-dev.91
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/cli.js +5 -1
- package/dist/app/App.d.ts +1 -2
- package/dist/app/App.js +1 -29
- package/dist/app/App.js.map +1 -1
- package/dist/app/demo.d.ts +2 -0
- package/dist/app/demo.js +33 -0
- package/dist/app/demo.js.map +1 -0
- package/dist/app/entry.client.d.ts +2 -0
- package/dist/app/entry.client.js +35 -0
- package/dist/app/entry.client.js.map +1 -0
- package/dist/app/entry.server.d.ts +14 -0
- package/dist/app/entry.server.js +105 -0
- package/dist/app/entry.server.js.map +1 -0
- package/dist/app/main.d.ts +6 -1
- package/dist/app/main.js +74 -12
- package/dist/app/main.js.map +1 -1
- package/dist/app/standalone.d.ts +2 -0
- package/dist/app/standalone.js +38 -0
- package/dist/app/standalone.js.map +1 -0
- package/dist/app/tailwind.d.ts +1 -1
- package/dist/app/tailwind.js +0 -4
- package/dist/app/tailwind.js.map +1 -1
- package/dist/cli/cmds/dev.js +5 -0
- package/dist/cli/cmds/dev.js.map +1 -1
- package/dist/cli/dev/handler.d.ts +1 -0
- package/dist/cli/dev/handler.js +3 -1
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/config/config.d.ts +21 -46
- package/dist/config/validators/InputSidebarSchema.d.ts +176 -0
- package/dist/config/validators/InputSidebarSchema.js +71 -0
- package/dist/config/validators/InputSidebarSchema.js.map +1 -0
- package/dist/config/validators/SidebarSchema.d.ts +17 -0
- package/dist/config/validators/SidebarSchema.js +76 -0
- package/dist/config/validators/SidebarSchema.js.map +1 -0
- package/dist/config/validators/validate.d.ts +1263 -2
- package/dist/config/validators/validate.js +170 -1
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/internal.d.ts +1 -0
- package/dist/internal.js +2 -0
- package/dist/internal.js.map +1 -0
- package/dist/lib/authentication/AuthenticationPlugin.d.ts +13 -0
- package/dist/lib/authentication/AuthenticationPlugin.js +31 -0
- package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -0
- package/dist/lib/authentication/authentication.d.ts +10 -9
- package/dist/lib/authentication/components/SignIn.d.ts +1 -0
- package/dist/lib/authentication/components/SignIn.js +14 -0
- package/dist/lib/authentication/components/SignIn.js.map +1 -0
- package/dist/lib/authentication/components/SignOut.d.ts +1 -0
- package/dist/lib/authentication/components/SignOut.js +12 -0
- package/dist/lib/authentication/components/SignOut.js.map +1 -0
- package/dist/lib/authentication/components/SignUp.d.ts +1 -0
- package/dist/lib/authentication/components/SignUp.js +10 -0
- package/dist/lib/authentication/components/SignUp.js.map +1 -0
- package/dist/lib/authentication/hook.js +4 -4
- package/dist/lib/authentication/hook.js.map +1 -1
- package/dist/lib/authentication/providers/auth0.js +11 -6
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/clerk.js +59 -30
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +30 -7
- package/dist/lib/authentication/providers/openid.js +79 -29
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/authentication/state.js +1 -1
- package/dist/lib/authentication/state.js.map +1 -1
- package/dist/lib/components/Bootstrap.d.ts +13 -0
- package/dist/lib/components/Bootstrap.js +12 -0
- package/dist/lib/components/Bootstrap.js.map +1 -0
- package/dist/lib/components/DevPortal.d.ts +5 -23
- package/dist/lib/components/DevPortal.js +43 -20
- package/dist/lib/components/DevPortal.js.map +1 -1
- package/dist/lib/components/DeveloperHint.d.ts +5 -0
- package/dist/lib/components/DeveloperHint.js +10 -0
- package/dist/lib/components/DeveloperHint.js.map +1 -0
- package/dist/lib/components/ErrorPage.d.ts +6 -0
- package/dist/lib/components/ErrorPage.js +9 -0
- package/dist/lib/components/ErrorPage.js.map +1 -0
- package/dist/lib/components/Header.js +23 -4
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +9 -4
- package/dist/lib/components/Heading.js +17 -2
- package/dist/lib/components/Heading.js.map +1 -1
- package/dist/lib/components/InlineCode.d.ts +5 -0
- package/dist/lib/components/InlineCode.js +4 -0
- package/dist/lib/components/InlineCode.js.map +1 -0
- package/dist/lib/components/Layout.js +7 -5
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/NotFoundPage.d.ts +1 -0
- package/dist/lib/components/NotFoundPage.js +12 -0
- package/dist/lib/components/NotFoundPage.js.map +1 -0
- package/dist/lib/components/SlotletProvider.d.ts +9 -0
- package/dist/lib/components/SlotletProvider.js +11 -0
- package/dist/lib/components/SlotletProvider.js.map +1 -0
- package/dist/lib/components/SyntaxHighlight.d.ts +3 -2
- package/dist/lib/components/SyntaxHighlight.js +24 -22
- package/dist/lib/components/SyntaxHighlight.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +1 -1
- package/dist/lib/components/TopNavigation.js +8 -4
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/context/ThemeContext.d.ts +1 -4
- package/dist/lib/components/context/ThemeContext.js +3 -29
- package/dist/lib/components/context/ThemeContext.js.map +1 -1
- package/dist/lib/components/context/ThemeProvider.d.ts +4 -0
- package/dist/lib/components/context/ThemeProvider.js +23 -0
- package/dist/lib/components/context/ThemeProvider.js.map +1 -0
- package/dist/lib/components/context/ZudokuContext.d.ts +15 -0
- package/dist/lib/components/context/ZudokuContext.js +46 -0
- package/dist/lib/components/context/ZudokuContext.js.map +1 -0
- package/dist/lib/components/context/ZudokuProvider.d.ts +5 -0
- package/dist/lib/components/context/ZudokuProvider.js +16 -0
- package/dist/lib/components/context/ZudokuProvider.js.map +1 -0
- package/dist/lib/components/index.d.ts +32 -3
- package/dist/lib/components/index.js +21 -3
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/Sidebar.d.ts +1 -0
- package/dist/lib/components/navigation/Sidebar.js +12 -0
- package/dist/lib/components/navigation/Sidebar.js.map +1 -0
- package/dist/lib/components/navigation/SidebarBadge.d.ts +22 -0
- package/dist/lib/components/navigation/SidebarBadge.js +24 -0
- package/dist/lib/components/navigation/SidebarBadge.js.map +1 -0
- package/dist/lib/components/navigation/SidebarCategory.d.ts +5 -0
- package/dist/lib/components/navigation/SidebarCategory.js +33 -0
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -0
- package/dist/lib/components/navigation/SidebarItem.d.ts +12 -0
- package/dist/lib/components/navigation/SidebarItem.js +42 -0
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -0
- package/dist/lib/components/navigation/{SideNavigationWrapper.d.ts → SidebarWrapper.d.ts} +1 -1
- package/dist/lib/components/navigation/{SideNavigationWrapper.js → SidebarWrapper.js} +2 -2
- package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -0
- package/dist/lib/components/navigation/utils.d.ts +16 -0
- package/dist/lib/components/navigation/utils.js +85 -0
- package/dist/lib/components/navigation/utils.js.map +1 -0
- package/dist/lib/core/DevPortalContext.d.ts +58 -42
- package/dist/lib/core/DevPortalContext.js +18 -19
- package/dist/lib/core/DevPortalContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +25 -10
- package/dist/lib/core/plugins.js +3 -0
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/errors/ErrorAlert.d.ts +3 -0
- package/dist/lib/errors/ErrorAlert.js +8 -0
- package/dist/lib/errors/ErrorAlert.js.map +1 -0
- package/dist/lib/errors/RouterError.d.ts +1 -0
- package/dist/lib/errors/RouterError.js +12 -0
- package/dist/lib/errors/RouterError.js.map +1 -0
- package/dist/lib/errors/ServerError.d.ts +3 -0
- package/dist/lib/errors/ServerError.js +6 -0
- package/dist/lib/errors/ServerError.js.map +1 -0
- package/dist/lib/errors/TopLevelError.d.ts +2 -0
- package/dist/lib/errors/TopLevelError.js +7 -0
- package/dist/lib/errors/TopLevelError.js.map +1 -0
- package/dist/lib/oas/graphql/index.js +8 -5
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/oas/parser/index.d.ts +1 -1
- package/dist/lib/oas/parser/index.js +38 -12
- package/dist/lib/oas/parser/index.js.map +1 -1
- package/dist/lib/plugins/{api-key → api-keys}/CreateApiKey.js +4 -4
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -0
- package/dist/lib/plugins/api-keys/ProtectedRoute.d.ts +1 -0
- package/dist/lib/plugins/api-keys/ProtectedRoute.js +14 -0
- package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -0
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +54 -0
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -0
- package/dist/lib/plugins/{api-key → api-keys}/index.d.ts +4 -5
- package/dist/lib/plugins/{api-key → api-keys}/index.js +18 -20
- package/dist/lib/plugins/api-keys/index.js.map +1 -0
- package/dist/lib/plugins/custom-page/index.d.ts +8 -0
- package/dist/lib/plugins/custom-page/index.js +12 -0
- package/dist/lib/plugins/custom-page/index.js.map +1 -0
- package/dist/lib/plugins/markdown/MdxPage.d.ts +3 -2
- package/dist/lib/plugins/markdown/MdxPage.js +10 -40
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/Toc.js +17 -9
- package/dist/lib/plugins/markdown/Toc.js.map +1 -1
- package/dist/lib/plugins/markdown/generateRoutes.d.ts +3 -3
- package/dist/lib/plugins/markdown/generateRoutes.js +20 -43
- package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +4 -1
- package/dist/lib/plugins/markdown/index.js +3 -7
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/openapi/ColorizedParam.d.ts +2 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js +14 -9
- package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +17 -5
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +11 -5
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterList.js +2 -1
- package/dist/lib/plugins/openapi/ParameterList.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/{MakeRequest.d.ts → PlaygroundDialogWrapper.d.ts} +2 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +23 -0
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -0
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +3 -9
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +1 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/Route.d.ts +6 -0
- package/dist/lib/plugins/openapi/Route.js +8 -0
- package/dist/lib/plugins/openapi/Route.js.map +1 -0
- package/dist/lib/plugins/openapi/SchemaListView.js +10 -26
- package/dist/lib/plugins/openapi/SchemaListView.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaListViewItem.d.ts +8 -0
- package/dist/lib/plugins/openapi/SchemaListViewItem.js +25 -0
- package/dist/lib/plugins/openapi/SchemaListViewItem.js.map +1 -0
- package/dist/lib/plugins/openapi/SchemaListViewItemGroup.d.ts +8 -0
- package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js +17 -0
- package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js.map +1 -0
- package/dist/lib/plugins/openapi/Sidecar.d.ts +4 -0
- package/dist/lib/plugins/openapi/Sidecar.js +55 -21
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarBox.d.ts +1 -0
- package/dist/lib/plugins/openapi/SidecarBox.js +3 -2
- package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/{Select.d.ts → SimpleSelect.d.ts} +3 -2
- package/dist/lib/plugins/openapi/SimpleSelect.js +5 -0
- package/dist/lib/plugins/openapi/SimpleSelect.js.map +1 -0
- package/dist/lib/plugins/openapi/StaggeredRender.d.ts +8 -0
- package/dist/lib/plugins/openapi/StaggeredRender.js +18 -0
- package/dist/lib/plugins/openapi/StaggeredRender.js.map +1 -0
- package/dist/lib/plugins/openapi/client/createMemoryClient.d.ts +12 -0
- package/dist/lib/plugins/openapi/client/createMemoryClient.js +46 -0
- package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +1 -0
- package/dist/lib/plugins/openapi/client/createServer.d.ts +4 -0
- package/dist/lib/plugins/openapi/client/createServer.js +30 -0
- package/dist/lib/plugins/openapi/client/createServer.js.map +1 -0
- package/dist/lib/plugins/openapi/client/createWorkerClient.d.ts +10 -0
- package/dist/lib/plugins/openapi/{worker/createSharedWorkerClient.js → client/createWorkerClient.js} +15 -2
- package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +1 -0
- package/dist/lib/plugins/openapi/client/interfaces.d.ts +4 -0
- package/dist/lib/plugins/openapi/client/interfaces.js +2 -0
- package/dist/lib/plugins/openapi/client/interfaces.js.map +1 -0
- package/dist/lib/plugins/openapi/{worker → client}/worker.js +2 -2
- package/dist/lib/plugins/openapi/client/worker.js.map +1 -0
- package/dist/lib/plugins/openapi/context.d.ts +5 -0
- package/dist/lib/plugins/openapi/context.js +11 -0
- package/dist/lib/plugins/openapi/context.js.map +1 -0
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +6 -6
- 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 +15 -15
- package/dist/lib/plugins/openapi/graphql/graphql.js +67 -67
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.d.ts +4 -18
- package/dist/lib/plugins/openapi/index.js +76 -32
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +16 -0
- package/dist/lib/plugins/openapi/interfaces.js +2 -0
- package/dist/lib/plugins/openapi/interfaces.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/Headers.js +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.d.ts +4 -5
- package/dist/lib/plugins/openapi/playground/PathParams.js +9 -13
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +26 -14
- package/dist/lib/plugins/openapi/playground/Playground.js +54 -26
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.d.ts +5 -0
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +12 -0
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +4 -3
- package/dist/lib/plugins/openapi/playground/QueryParams.js +21 -12
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ResponseTab.d.ts +4 -0
- package/dist/lib/plugins/openapi/playground/ResponseTab.js +40 -0
- package/dist/lib/plugins/openapi/playground/ResponseTab.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/createUrl.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/createUrl.js +5 -9
- package/dist/lib/plugins/openapi/playground/createUrl.js.map +1 -1
- package/dist/lib/plugins/openapi/util/prose.d.ts +1 -0
- package/dist/lib/plugins/openapi/util/prose.js +4 -0
- package/dist/lib/plugins/openapi/util/prose.js.map +1 -0
- package/dist/lib/plugins/openapi-worker.d.ts +1 -1
- package/dist/lib/plugins/openapi-worker.js +1 -1
- package/dist/lib/plugins/openapi-worker.js.map +1 -1
- package/dist/lib/plugins/redirect/index.d.ts +0 -1
- package/dist/lib/plugins/redirect/index.js +3 -4
- package/dist/lib/plugins/redirect/index.js.map +1 -1
- package/dist/lib/ui/Button.d.ts +5 -1
- package/dist/lib/ui/Button.js +24 -1
- package/dist/lib/ui/Button.js.map +1 -1
- package/dist/lib/ui/Callout.js +2 -2
- package/dist/lib/ui/Callout.js.map +1 -1
- package/dist/lib/ui/Card.js +1 -1
- package/dist/lib/ui/Card.js.map +1 -1
- package/dist/lib/ui/DropdownMenu.d.ts +27 -0
- package/dist/lib/ui/DropdownMenu.js +36 -0
- package/dist/lib/ui/DropdownMenu.js.map +1 -0
- package/dist/lib/ui/Input.js.map +1 -0
- package/dist/lib/util/MdxComponents.d.ts +2 -2
- package/dist/lib/util/MdxComponents.js +7 -5
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/fetchTimeout.d.ts +1 -0
- package/dist/lib/util/fetchTimeout.js +14 -0
- package/dist/lib/util/fetchTimeout.js.map +1 -0
- package/dist/lib/util/groupBy.d.ts +1 -6
- package/dist/lib/util/groupBy.js +10 -8
- package/dist/lib/util/groupBy.js.map +1 -1
- package/dist/lib/util/invariant.d.ts +6 -0
- package/dist/lib/util/invariant.js +21 -0
- package/dist/lib/util/invariant.js.map +1 -0
- package/dist/lib/util/joinPath.js +2 -1
- package/dist/lib/util/joinPath.js.map +1 -1
- package/dist/lib/util/logInit.d.ts +1 -0
- package/dist/lib/util/logInit.js +9 -0
- package/dist/lib/util/logInit.js.map +1 -0
- package/dist/lib/util/objectEntries.d.ts +4 -0
- package/dist/lib/util/objectEntries.js +2 -0
- package/dist/lib/util/objectEntries.js.map +1 -0
- package/dist/lib/util/renderIf.d.ts +1 -0
- package/dist/lib/util/renderIf.js +2 -0
- package/dist/lib/util/renderIf.js.map +1 -0
- package/dist/lib/util/requestIdleCallbackPolyfill.d.ts +1 -0
- package/dist/lib/util/requestIdleCallbackPolyfill.js +7 -0
- package/dist/lib/util/requestIdleCallbackPolyfill.js.map +1 -0
- package/dist/lib/util/useScrollToAnchor.js +31 -17
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/vite/build.js +30 -7
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.d.ts +20 -12
- package/dist/vite/config.js +107 -55
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/config.test.js +6 -3
- package/dist/vite/config.test.js.map +1 -1
- package/dist/vite/dev-server.d.ts +2 -1
- package/dist/vite/dev-server.js +44 -15
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/html.js +18 -5
- package/dist/vite/html.js.map +1 -1
- package/dist/vite/plugin-api-keys.js +7 -8
- package/dist/vite/plugin-api-keys.js.map +1 -1
- package/dist/vite/plugin-api.js +9 -20
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.js +5 -6
- package/dist/vite/plugin-auth.js.map +1 -1
- package/dist/vite/plugin-component.js +5 -2
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/plugin-config.d.ts +3 -6
- package/dist/vite/plugin-config.js +5 -8
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-custom-css.d.ts +6 -0
- package/dist/vite/plugin-custom-css.js +54 -0
- package/dist/vite/plugin-custom-css.js.map +1 -0
- package/dist/vite/plugin-docs.js +11 -5
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-mdx.d.ts +3 -1
- package/dist/vite/plugin-mdx.js +5 -5
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-metadata.js +1 -1
- package/dist/vite/plugin-metadata.js.map +1 -1
- package/dist/vite/plugin-redirect.js +10 -10
- package/dist/vite/plugin-redirect.js.map +1 -1
- package/dist/vite/plugin-sidebar.d.ts +3 -0
- package/dist/vite/plugin-sidebar.js +23 -0
- package/dist/vite/plugin-sidebar.js.map +1 -0
- package/dist/vite/plugin.js +5 -5
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender.d.ts +17 -0
- package/dist/vite/prerender.js +79 -0
- package/dist/vite/prerender.js.map +1 -0
- package/lib/AuthenticationPlugin-CH5NSVOu.js +55 -0
- package/lib/AuthenticationPlugin-CH5NSVOu.js.map +1 -0
- package/lib/CategoryHeading-BWq12Bfa.js +10 -0
- package/lib/CategoryHeading-BWq12Bfa.js.map +1 -0
- package/lib/Combination-D-9IH0zy.js +2789 -0
- package/lib/Combination-D-9IH0zy.js.map +1 -0
- package/lib/DeveloperHint-BQSFXH01.js +10 -0
- package/lib/DeveloperHint-BQSFXH01.js.map +1 -0
- package/lib/Input-HmAaR6kw.js +2239 -0
- package/lib/Input-HmAaR6kw.js.map +1 -0
- package/lib/Markdown-B_Gax7at.js +14108 -0
- package/lib/Markdown-B_Gax7at.js.map +1 -0
- package/lib/MdxPage-3-PenZs2.js +187 -0
- package/lib/MdxPage-3-PenZs2.js.map +1 -0
- package/lib/OperationList-DvKqvB16.js +448 -0
- package/lib/OperationList-DvKqvB16.js.map +1 -0
- package/lib/Route-CnmaDun4.js +14 -0
- package/lib/Route-CnmaDun4.js.map +1 -0
- package/lib/SlotletProvider-CzMAO73_.js +82 -0
- package/lib/SlotletProvider-CzMAO73_.js.map +1 -0
- package/lib/Spinner-D99Tq0hv.js +274 -0
- package/lib/Spinner-D99Tq0hv.js.map +1 -0
- package/lib/ZudokuContext-BIZ8zHbZ.js +1084 -0
- package/lib/ZudokuContext-BIZ8zHbZ.js.map +1 -0
- package/lib/_commonjsHelpers-BVfed4GL.js +29 -0
- package/lib/_commonjsHelpers-BVfed4GL.js.map +1 -0
- package/lib/assets/index-BPdJm2ty.js +1 -0
- package/lib/assets/index-BPdJm2ty.js.map +1 -0
- package/lib/assets/{worker-BCcpCNJ7.js → worker-CyHZIIfE.js} +10727 -10300
- package/lib/assets/worker-CyHZIIfE.js.map +1 -0
- package/lib/index-7kcHaXD6.js +1771 -0
- package/lib/index-7kcHaXD6.js.map +1 -0
- package/lib/index-7nswqEVR.js +124 -0
- package/lib/index-7nswqEVR.js.map +1 -0
- package/lib/index-DjaqWcmv.js +5934 -0
- package/lib/index-DjaqWcmv.js.map +1 -0
- package/lib/index-pI9JkN46.js +4765 -0
- package/lib/index-pI9JkN46.js.map +1 -0
- package/lib/joinPath-VeNuJa7y.js +8 -0
- package/lib/joinPath-VeNuJa7y.js.map +1 -0
- package/lib/jsx-runtime-B6kdoens.js +635 -0
- package/lib/jsx-runtime-B6kdoens.js.map +1 -0
- package/lib/prism-bash.min-DadFsM4Z.js +1 -0
- package/lib/prism-bash.min-DadFsM4Z.js.map +1 -0
- package/lib/prism-csharp.min-Yizuc34Y.js +1 -0
- package/lib/prism-csharp.min-Yizuc34Y.js.map +1 -0
- package/lib/prism-java.min-d5iT_mOd.js +1 -0
- package/lib/prism-java.min-d5iT_mOd.js.map +1 -0
- package/lib/prism-json.min-B1GJqK1k.js +1 -0
- package/lib/prism-json.min-B1GJqK1k.js.map +1 -0
- package/lib/prism-markup-templating-DZrrEs0A.js +1 -0
- package/lib/prism-markup-templating-DZrrEs0A.js.map +1 -0
- package/lib/prism-objectivec.min-BXSWqpJJ.js +1 -0
- package/lib/prism-objectivec.min-BXSWqpJJ.js.map +1 -0
- package/lib/prism-php.min-o7FpoMP_.js +1 -0
- package/lib/prism-php.min-o7FpoMP_.js.map +1 -0
- package/lib/prism-ruby.min-C7LwcKyz.js +1 -0
- package/lib/prism-ruby.min-C7LwcKyz.js.map +1 -0
- package/lib/router-BiRCp01d.js +2971 -0
- package/lib/router-BiRCp01d.js.map +1 -0
- package/lib/slugify-CiPVjteN.js +28 -0
- package/lib/slugify-CiPVjteN.js.map +1 -0
- package/lib/state-DsXXkBLH.js +288 -0
- package/lib/state-DsXXkBLH.js.map +1 -0
- package/lib/{urql-DMlBWUKL.js → urql-DrBfkb92.js} +2 -2
- package/lib/urql-DrBfkb92.js.map +1 -0
- package/lib/utils-D3g3xyZM.js +749 -0
- package/lib/utils-D3g3xyZM.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +31 -20
- package/lib/zudoku.auth-auth0.js.map +1 -0
- package/lib/zudoku.auth-clerk.js +59 -29
- package/lib/zudoku.auth-clerk.js.map +1 -0
- package/lib/zudoku.auth-openid.js +742 -573
- package/lib/zudoku.auth-openid.js.map +1 -0
- package/lib/zudoku.components.js +2008 -684
- package/lib/zudoku.components.js.map +1 -0
- package/lib/zudoku.openapi-worker.js +15035 -146
- package/lib/zudoku.openapi-worker.js.map +1 -0
- package/lib/zudoku.plugin-api-keys.js +325 -0
- package/lib/zudoku.plugin-api-keys.js.map +1 -0
- package/lib/zudoku.plugin-custom-page.js +13 -0
- package/lib/zudoku.plugin-custom-page.js.map +1 -0
- package/lib/zudoku.plugin-markdown.js +31 -0
- package/lib/zudoku.plugin-markdown.js.map +1 -0
- package/lib/zudoku.plugin-openapi.js +14 -0
- package/lib/zudoku.plugin-openapi.js.map +1 -0
- package/lib/zudoku.plugin-redirect.js +11 -0
- package/lib/zudoku.plugin-redirect.js.map +1 -0
- package/package.json +64 -25
- package/src/app/App.tsx +0 -41
- package/src/app/demo-cdn.html +26 -0
- package/src/app/demo.html +18 -0
- package/src/app/demo.tsx +46 -0
- package/src/app/entry.client.tsx +47 -0
- package/src/app/entry.server.tsx +160 -0
- package/src/app/main.css +83 -3
- package/src/app/main.tsx +87 -15
- package/src/app/standalone.html +20 -0
- package/src/app/standalone.tsx +52 -0
- package/src/app/tailwind.ts +2 -6
- package/src/lib/authentication/AuthenticationPlugin.tsx +38 -0
- package/src/lib/authentication/authentication.ts +6 -12
- package/src/lib/authentication/components/SignIn.tsx +15 -0
- package/src/lib/authentication/components/SignOut.tsx +13 -0
- package/src/lib/authentication/components/SignUp.tsx +11 -0
- package/src/lib/authentication/hook.ts +4 -4
- package/src/lib/authentication/providers/auth0.tsx +16 -6
- package/src/lib/authentication/providers/clerk.tsx +63 -31
- package/src/lib/authentication/providers/openid.tsx +104 -34
- package/src/lib/authentication/state.ts +1 -1
- package/src/lib/components/Bootstrap.tsx +44 -0
- package/src/lib/components/DevPortal.tsx +75 -66
- package/src/lib/components/DeveloperHint.tsx +25 -0
- package/src/lib/components/ErrorPage.tsx +28 -0
- package/src/lib/components/Header.tsx +106 -31
- package/src/lib/components/Heading.tsx +26 -7
- package/src/lib/components/InlineCode.tsx +19 -0
- package/src/lib/components/Layout.tsx +16 -11
- package/src/lib/components/NotFoundPage.tsx +33 -0
- package/src/lib/components/SlotletProvider.tsx +25 -0
- package/src/lib/components/SyntaxHighlight.tsx +53 -44
- package/src/lib/components/TopNavigation.tsx +10 -5
- package/src/lib/components/context/ThemeContext.tsx +3 -41
- package/src/lib/components/context/ThemeProvider.tsx +27 -0
- package/src/lib/components/context/ZudokuContext.ts +58 -0
- package/src/lib/components/context/ZudokuProvider.tsx +26 -0
- package/src/lib/components/index.ts +25 -3
- package/src/lib/components/navigation/Sidebar.tsx +24 -0
- package/src/lib/components/navigation/SidebarBadge.tsx +40 -0
- package/src/lib/components/navigation/SidebarCategory.tsx +105 -0
- package/src/lib/components/navigation/SidebarItem.tsx +100 -0
- package/src/lib/components/navigation/{SideNavigationWrapper.tsx → SidebarWrapper.tsx} +1 -1
- package/src/lib/components/navigation/utils.ts +117 -0
- package/src/lib/core/DevPortalContext.ts +72 -68
- package/src/lib/core/plugins.ts +40 -16
- package/src/lib/errors/ErrorAlert.tsx +21 -0
- package/src/lib/errors/RouterError.tsx +13 -0
- package/src/lib/errors/ServerError.tsx +5 -0
- package/src/lib/errors/TopLevelError.tsx +8 -0
- package/src/lib/oas/graphql/index.ts +11 -6
- package/src/lib/oas/parser/index.ts +41 -20
- package/src/lib/plugins/{api-key → api-keys}/CreateApiKey.tsx +4 -4
- package/src/lib/plugins/api-keys/ProtectedRoute.tsx +29 -0
- package/src/lib/plugins/{api-key → api-keys}/SettingsApiKeys.tsx +49 -16
- package/src/lib/plugins/{api-key → api-keys}/index.tsx +27 -41
- package/src/lib/plugins/custom-page/index.tsx +22 -0
- package/src/lib/plugins/markdown/MdxPage.tsx +54 -73
- package/src/lib/plugins/markdown/Toc.tsx +53 -40
- package/src/lib/plugins/markdown/generateRoutes.tsx +35 -53
- package/src/lib/plugins/markdown/index.tsx +10 -7
- package/src/lib/plugins/openapi/ColorizedParam.tsx +23 -16
- package/src/lib/plugins/openapi/OperationList.tsx +46 -10
- package/src/lib/plugins/openapi/OperationListItem.tsx +51 -30
- package/src/lib/plugins/openapi/ParameterList.tsx +13 -10
- package/src/lib/plugins/openapi/ParameterListItem.tsx +3 -4
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +39 -0
- package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +3 -15
- package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +3 -2
- package/src/lib/plugins/openapi/Route.tsx +21 -0
- package/src/lib/plugins/openapi/SchemaListView.tsx +39 -192
- package/src/lib/plugins/openapi/SchemaListViewItem.tsx +125 -0
- package/src/lib/plugins/openapi/SchemaListViewItemGroup.tsx +63 -0
- package/src/lib/plugins/openapi/Sidecar.tsx +77 -30
- package/src/lib/plugins/openapi/SidecarBox.tsx +13 -2
- package/src/lib/plugins/openapi/{Select.tsx → SimpleSelect.tsx} +6 -3
- package/src/lib/plugins/openapi/StaggeredRender.tsx +31 -0
- package/src/lib/plugins/openapi/client/createMemoryClient.ts +56 -0
- package/src/lib/plugins/openapi/client/createServer.ts +33 -0
- package/src/lib/plugins/openapi/{worker/createSharedWorkerClient.ts → client/createWorkerClient.ts} +21 -2
- package/src/lib/plugins/openapi/client/interfaces.ts +5 -0
- package/src/lib/plugins/openapi/{worker → client}/worker.ts +3 -3
- package/src/lib/plugins/openapi/context.tsx +16 -0
- package/src/lib/plugins/openapi/graphql/gql.ts +8 -8
- package/src/lib/plugins/openapi/graphql/graphql.ts +80 -80
- package/src/lib/plugins/openapi/index.tsx +134 -76
- package/src/lib/plugins/openapi/interfaces.ts +10 -0
- package/src/lib/plugins/openapi/playground/Headers.tsx +1 -1
- package/src/lib/plugins/openapi/playground/PathParams.tsx +76 -50
- package/src/lib/plugins/openapi/playground/Playground.tsx +240 -230
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +40 -0
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +107 -66
- package/src/lib/plugins/openapi/playground/ResponseTab.tsx +76 -0
- package/src/lib/plugins/openapi/playground/createUrl.ts +12 -15
- package/src/lib/plugins/openapi/util/prose.ts +7 -0
- package/src/lib/plugins/openapi-worker.ts +1 -1
- package/src/lib/plugins/redirect/index.tsx +3 -4
- package/src/lib/ui/Button.tsx +32 -2
- package/src/lib/ui/Callout.tsx +4 -4
- package/src/lib/ui/Card.tsx +1 -1
- package/src/lib/ui/DropdownMenu.tsx +199 -0
- package/src/lib/util/MdxComponents.tsx +7 -15
- package/src/lib/util/fetchTimeout.tsx +21 -0
- package/src/lib/util/groupBy.ts +7 -12
- package/src/lib/util/invariant.ts +26 -0
- package/src/lib/util/joinPath.tsx +2 -1
- package/src/lib/util/logInit.ts +9 -0
- package/src/lib/util/objectEntries.ts +5 -0
- package/src/lib/util/renderIf.ts +4 -0
- package/src/lib/util/requestIdleCallbackPolyfill.ts +6 -0
- package/src/lib/util/useScrollToAnchor.ts +39 -18
- package/dist/lib/authentication/Callback.d.ts +0 -3
- package/dist/lib/authentication/Callback.js +0 -34
- package/dist/lib/authentication/Callback.js.map +0 -1
- package/dist/lib/components/Input.js.map +0 -1
- package/dist/lib/components/Link.d.ts +0 -1
- package/dist/lib/components/Link.js +0 -2
- package/dist/lib/components/Link.js.map +0 -1
- package/dist/lib/components/Router.d.ts +0 -4
- package/dist/lib/components/Router.js +0 -20
- package/dist/lib/components/Router.js.map +0 -1
- package/dist/lib/components/context/DevPortalProvider.d.ts +0 -9
- package/dist/lib/components/context/DevPortalProvider.js +0 -39
- package/dist/lib/components/context/DevPortalProvider.js.map +0 -1
- package/dist/lib/components/navigation/SideNavigation.d.ts +0 -1
- package/dist/lib/components/navigation/SideNavigation.js +0 -11
- package/dist/lib/components/navigation/SideNavigation.js.map +0 -1
- package/dist/lib/components/navigation/SideNavigationCategory.d.ts +0 -4
- package/dist/lib/components/navigation/SideNavigationCategory.js +0 -26
- package/dist/lib/components/navigation/SideNavigationCategory.js.map +0 -1
- package/dist/lib/components/navigation/SideNavigationItem.d.ts +0 -13
- package/dist/lib/components/navigation/SideNavigationItem.js +0 -44
- package/dist/lib/components/navigation/SideNavigationItem.js.map +0 -1
- package/dist/lib/components/navigation/SideNavigationWrapper.js.map +0 -1
- package/dist/lib/components/navigation/useNavigationCollapsibleState.d.ts +0 -6
- package/dist/lib/components/navigation/useNavigationCollapsibleState.js +0 -16
- package/dist/lib/components/navigation/useNavigationCollapsibleState.js.map +0 -1
- package/dist/lib/components/navigation/util.d.ts +0 -8
- package/dist/lib/components/navigation/util.js +0 -15
- package/dist/lib/components/navigation/util.js.map +0 -1
- package/dist/lib/core/helmet.d.ts +0 -4
- package/dist/lib/core/helmet.js +0 -5
- package/dist/lib/core/helmet.js.map +0 -1
- package/dist/lib/core/icons.d.ts +0 -1
- package/dist/lib/core/icons.js +0 -2
- package/dist/lib/core/icons.js.map +0 -1
- package/dist/lib/core/router.d.ts +0 -1
- package/dist/lib/core/router.js +0 -2
- package/dist/lib/core/router.js.map +0 -1
- package/dist/lib/plugins/api-key/CreateApiKey.js.map +0 -1
- package/dist/lib/plugins/api-key/SettingsApiKeys.js +0 -38
- package/dist/lib/plugins/api-key/SettingsApiKeys.js.map +0 -1
- package/dist/lib/plugins/api-key/index.js.map +0 -1
- package/dist/lib/plugins/index.d.ts +0 -4
- package/dist/lib/plugins/index.js +0 -5
- package/dist/lib/plugins/index.js.map +0 -1
- package/dist/lib/plugins/openapi/MakeRequest.js +0 -43
- package/dist/lib/plugins/openapi/MakeRequest.js.map +0 -1
- package/dist/lib/plugins/openapi/MethodBadge.d.ts +0 -13
- package/dist/lib/plugins/openapi/MethodBadge.js +0 -26
- package/dist/lib/plugins/openapi/MethodBadge.js.map +0 -1
- package/dist/lib/plugins/openapi/Select.js +0 -5
- package/dist/lib/plugins/openapi/Select.js.map +0 -1
- package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.d.ts +0 -5
- package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.js.map +0 -1
- package/dist/lib/plugins/openapi/worker/shared-worker.d.ts +0 -1
- package/dist/lib/plugins/openapi/worker/shared-worker.js +0 -6
- package/dist/lib/plugins/openapi/worker/shared-worker.js.map +0 -1
- package/dist/lib/plugins/openapi/worker/worker.js.map +0 -1
- package/dist/lib/ui/button-variants.d.ts +0 -4
- package/dist/lib/ui/button-variants.js +0 -24
- package/dist/lib/ui/button-variants.js.map +0 -1
- package/dist/lib/util/traverseNavigation.d.ts +0 -6
- package/dist/lib/util/traverseNavigation.js +0 -30
- package/dist/lib/util/traverseNavigation.js.map +0 -1
- package/dist/vite/common.d.ts +0 -1
- package/dist/vite/common.js +0 -5
- package/dist/vite/common.js.map +0 -1
- package/dist/vite/plugin-html.d.ts +0 -3
- package/dist/vite/plugin-html.js +0 -47
- package/dist/vite/plugin-html.js.map +0 -1
- package/dist/vite/plugin-openapi-worker.d.ts +0 -4
- package/dist/vite/plugin-openapi-worker.js +0 -28
- package/dist/vite/plugin-openapi-worker.js.map +0 -1
- package/lib/Spinner-BewqqUU-.js +0 -8413
- package/lib/clerk-Wslx_mPo.js +0 -19685
- package/lib/index-PyGcnQFX.js +0 -3462
- package/lib/loglevel-CoH7VSwE.js +0 -152
- package/lib/state-2Hu1renZ.js +0 -313
- package/lib/zudoku.plugins.js +0 -19904
- package/src/lib/authentication/Callback.tsx +0 -60
- package/src/lib/components/Link.tsx +0 -1
- package/src/lib/components/Router.tsx +0 -28
- package/src/lib/components/context/DevPortalProvider.ts +0 -54
- package/src/lib/components/navigation/SideNavigation.tsx +0 -21
- package/src/lib/components/navigation/SideNavigationCategory.tsx +0 -76
- package/src/lib/components/navigation/SideNavigationItem.tsx +0 -152
- package/src/lib/components/navigation/useNavigationCollapsibleState.ts +0 -27
- package/src/lib/components/navigation/util.ts +0 -38
- package/src/lib/core/helmet.ts +0 -5
- package/src/lib/core/icons.tsx +0 -1
- package/src/lib/core/router.tsx +0 -1
- package/src/lib/plugins/index.ts +0 -4
- package/src/lib/plugins/openapi/MakeRequest.tsx +0 -63
- package/src/lib/plugins/openapi/MethodBadge.tsx +0 -36
- package/src/lib/plugins/openapi/worker/shared-worker.ts +0 -5
- package/src/lib/ui/button-variants.ts +0 -31
- package/src/lib/util/traverseNavigation.ts +0 -55
- /package/dist/lib/plugins/{api-key → api-keys}/CreateApiKey.d.ts +0 -0
- /package/dist/lib/plugins/{api-key → api-keys}/SettingsApiKeys.d.ts +0 -0
- /package/dist/lib/plugins/openapi/{worker → client}/worker.d.ts +0 -0
- /package/dist/lib/{components → ui}/Input.d.ts +0 -0
- /package/dist/lib/{components → ui}/Input.js +0 -0
- /package/src/lib/{components → ui}/Input.tsx +0 -0
|
@@ -57,7 +57,7 @@ export type MediaTypeObject = {
|
|
|
57
57
|
encoding?: Maybe<Array<EncodingItem>>;
|
|
58
58
|
examples?: Maybe<Array<ExampleItem>>;
|
|
59
59
|
mediaType: Scalars["String"]["output"];
|
|
60
|
-
schema
|
|
60
|
+
schema?: Maybe<Scalars["JSON"]["output"]>;
|
|
61
61
|
};
|
|
62
62
|
|
|
63
63
|
export type OperationItem = {
|
|
@@ -163,16 +163,6 @@ export type TagItem = {
|
|
|
163
163
|
name: Scalars["String"]["output"];
|
|
164
164
|
};
|
|
165
165
|
|
|
166
|
-
export type GetServerQueryQueryVariables = Exact<{
|
|
167
|
-
input: Scalars["JSON"]["input"];
|
|
168
|
-
type: SchemaType;
|
|
169
|
-
}>;
|
|
170
|
-
|
|
171
|
-
export type GetServerQueryQuery = {
|
|
172
|
-
__typename?: "Query";
|
|
173
|
-
schema: { __typename?: "Schema"; url: string };
|
|
174
|
-
};
|
|
175
|
-
|
|
176
166
|
export type OperationsFragmentFragment = {
|
|
177
167
|
__typename?: "OperationItem";
|
|
178
168
|
slug: string;
|
|
@@ -206,7 +196,7 @@ export type OperationsFragmentFragment = {
|
|
|
206
196
|
content?: Array<{
|
|
207
197
|
__typename?: "MediaTypeObject";
|
|
208
198
|
mediaType: string;
|
|
209
|
-
schema
|
|
199
|
+
schema?: any | null;
|
|
210
200
|
encoding?: Array<{ __typename?: "EncodingItem"; name: string }> | null;
|
|
211
201
|
}> | null;
|
|
212
202
|
} | null;
|
|
@@ -218,7 +208,7 @@ export type OperationsFragmentFragment = {
|
|
|
218
208
|
content?: Array<{
|
|
219
209
|
__typename?: "MediaTypeObject";
|
|
220
210
|
mediaType: string;
|
|
221
|
-
schema
|
|
211
|
+
schema?: any | null;
|
|
222
212
|
encoding?: Array<{ __typename?: "EncodingItem"; name: string }> | null;
|
|
223
213
|
}> | null;
|
|
224
214
|
}>;
|
|
@@ -252,6 +242,16 @@ export type AllOperationsQuery = {
|
|
|
252
242
|
};
|
|
253
243
|
};
|
|
254
244
|
|
|
245
|
+
export type GetServerQueryQueryVariables = Exact<{
|
|
246
|
+
input: Scalars["JSON"]["input"];
|
|
247
|
+
type: SchemaType;
|
|
248
|
+
}>;
|
|
249
|
+
|
|
250
|
+
export type GetServerQueryQuery = {
|
|
251
|
+
__typename?: "Query";
|
|
252
|
+
schema: { __typename?: "Schema"; url: string };
|
|
253
|
+
};
|
|
254
|
+
|
|
255
255
|
export type GetCategoriesQueryVariables = Exact<{
|
|
256
256
|
input: Scalars["JSON"]["input"];
|
|
257
257
|
type: SchemaType;
|
|
@@ -423,73 +423,6 @@ export const OperationsFragmentFragmentDoc = {
|
|
|
423
423
|
},
|
|
424
424
|
],
|
|
425
425
|
} as unknown as DocumentNode<OperationsFragmentFragment, unknown>;
|
|
426
|
-
export const GetServerQueryDocument = {
|
|
427
|
-
kind: "Document",
|
|
428
|
-
definitions: [
|
|
429
|
-
{
|
|
430
|
-
kind: "OperationDefinition",
|
|
431
|
-
operation: "query",
|
|
432
|
-
name: { kind: "Name", value: "getServerQuery" },
|
|
433
|
-
variableDefinitions: [
|
|
434
|
-
{
|
|
435
|
-
kind: "VariableDefinition",
|
|
436
|
-
variable: {
|
|
437
|
-
kind: "Variable",
|
|
438
|
-
name: { kind: "Name", value: "input" },
|
|
439
|
-
},
|
|
440
|
-
type: {
|
|
441
|
-
kind: "NonNullType",
|
|
442
|
-
type: { kind: "NamedType", name: { kind: "Name", value: "JSON" } },
|
|
443
|
-
},
|
|
444
|
-
},
|
|
445
|
-
{
|
|
446
|
-
kind: "VariableDefinition",
|
|
447
|
-
variable: { kind: "Variable", name: { kind: "Name", value: "type" } },
|
|
448
|
-
type: {
|
|
449
|
-
kind: "NonNullType",
|
|
450
|
-
type: {
|
|
451
|
-
kind: "NamedType",
|
|
452
|
-
name: { kind: "Name", value: "SchemaType" },
|
|
453
|
-
},
|
|
454
|
-
},
|
|
455
|
-
},
|
|
456
|
-
],
|
|
457
|
-
selectionSet: {
|
|
458
|
-
kind: "SelectionSet",
|
|
459
|
-
selections: [
|
|
460
|
-
{
|
|
461
|
-
kind: "Field",
|
|
462
|
-
name: { kind: "Name", value: "schema" },
|
|
463
|
-
arguments: [
|
|
464
|
-
{
|
|
465
|
-
kind: "Argument",
|
|
466
|
-
name: { kind: "Name", value: "input" },
|
|
467
|
-
value: {
|
|
468
|
-
kind: "Variable",
|
|
469
|
-
name: { kind: "Name", value: "input" },
|
|
470
|
-
},
|
|
471
|
-
},
|
|
472
|
-
{
|
|
473
|
-
kind: "Argument",
|
|
474
|
-
name: { kind: "Name", value: "type" },
|
|
475
|
-
value: {
|
|
476
|
-
kind: "Variable",
|
|
477
|
-
name: { kind: "Name", value: "type" },
|
|
478
|
-
},
|
|
479
|
-
},
|
|
480
|
-
],
|
|
481
|
-
selectionSet: {
|
|
482
|
-
kind: "SelectionSet",
|
|
483
|
-
selections: [
|
|
484
|
-
{ kind: "Field", name: { kind: "Name", value: "url" } },
|
|
485
|
-
],
|
|
486
|
-
},
|
|
487
|
-
},
|
|
488
|
-
],
|
|
489
|
-
},
|
|
490
|
-
},
|
|
491
|
-
],
|
|
492
|
-
} as unknown as DocumentNode<GetServerQueryQuery, GetServerQueryQueryVariables>;
|
|
493
426
|
export const AllOperationsDocument = {
|
|
494
427
|
kind: "Document",
|
|
495
428
|
definitions: [
|
|
@@ -735,6 +668,73 @@ export const AllOperationsDocument = {
|
|
|
735
668
|
},
|
|
736
669
|
],
|
|
737
670
|
} as unknown as DocumentNode<AllOperationsQuery, AllOperationsQueryVariables>;
|
|
671
|
+
export const GetServerQueryDocument = {
|
|
672
|
+
kind: "Document",
|
|
673
|
+
definitions: [
|
|
674
|
+
{
|
|
675
|
+
kind: "OperationDefinition",
|
|
676
|
+
operation: "query",
|
|
677
|
+
name: { kind: "Name", value: "getServerQuery" },
|
|
678
|
+
variableDefinitions: [
|
|
679
|
+
{
|
|
680
|
+
kind: "VariableDefinition",
|
|
681
|
+
variable: {
|
|
682
|
+
kind: "Variable",
|
|
683
|
+
name: { kind: "Name", value: "input" },
|
|
684
|
+
},
|
|
685
|
+
type: {
|
|
686
|
+
kind: "NonNullType",
|
|
687
|
+
type: { kind: "NamedType", name: { kind: "Name", value: "JSON" } },
|
|
688
|
+
},
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
kind: "VariableDefinition",
|
|
692
|
+
variable: { kind: "Variable", name: { kind: "Name", value: "type" } },
|
|
693
|
+
type: {
|
|
694
|
+
kind: "NonNullType",
|
|
695
|
+
type: {
|
|
696
|
+
kind: "NamedType",
|
|
697
|
+
name: { kind: "Name", value: "SchemaType" },
|
|
698
|
+
},
|
|
699
|
+
},
|
|
700
|
+
},
|
|
701
|
+
],
|
|
702
|
+
selectionSet: {
|
|
703
|
+
kind: "SelectionSet",
|
|
704
|
+
selections: [
|
|
705
|
+
{
|
|
706
|
+
kind: "Field",
|
|
707
|
+
name: { kind: "Name", value: "schema" },
|
|
708
|
+
arguments: [
|
|
709
|
+
{
|
|
710
|
+
kind: "Argument",
|
|
711
|
+
name: { kind: "Name", value: "input" },
|
|
712
|
+
value: {
|
|
713
|
+
kind: "Variable",
|
|
714
|
+
name: { kind: "Name", value: "input" },
|
|
715
|
+
},
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
kind: "Argument",
|
|
719
|
+
name: { kind: "Name", value: "type" },
|
|
720
|
+
value: {
|
|
721
|
+
kind: "Variable",
|
|
722
|
+
name: { kind: "Name", value: "type" },
|
|
723
|
+
},
|
|
724
|
+
},
|
|
725
|
+
],
|
|
726
|
+
selectionSet: {
|
|
727
|
+
kind: "SelectionSet",
|
|
728
|
+
selections: [
|
|
729
|
+
{ kind: "Field", name: { kind: "Name", value: "url" } },
|
|
730
|
+
],
|
|
731
|
+
},
|
|
732
|
+
},
|
|
733
|
+
],
|
|
734
|
+
},
|
|
735
|
+
},
|
|
736
|
+
],
|
|
737
|
+
} as unknown as DocumentNode<GetServerQueryQuery, GetServerQueryQueryVariables>;
|
|
738
738
|
export const GetCategoriesDocument = {
|
|
739
739
|
kind: "Document",
|
|
740
740
|
definitions: [
|
|
@@ -1,61 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
type DevPortalPlugin,
|
|
4
|
-
type PluginNavigationCategory,
|
|
5
|
-
} from "../../core/plugins.js";
|
|
6
|
-
import { Outlet, matchPath, type RouteObject } from "../../core/router.js";
|
|
7
|
-
import { MethodBadge } from "./MethodBadge.js";
|
|
8
|
-
import { OperationList } from "./OperationList.js";
|
|
1
|
+
import { matchPath, useRouteError, type RouteObject } from "react-router-dom";
|
|
2
|
+
import { type DevPortalPlugin } from "../../core/plugins.js";
|
|
9
3
|
import { graphql } from "./graphql/index.js";
|
|
10
4
|
import {
|
|
11
|
-
Provider,
|
|
12
5
|
Client as UrqlClient,
|
|
13
6
|
cacheExchange,
|
|
14
7
|
fetchExchange,
|
|
15
8
|
} from "./util/urql.js";
|
|
16
9
|
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
return ctx.config;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
type OasSource =
|
|
35
|
-
| { type: "url"; input: string }
|
|
36
|
-
| { type: "yaml"; input: string }
|
|
37
|
-
| { type: "json"; input: object };
|
|
38
|
-
|
|
39
|
-
export type OasPluginConfig = {
|
|
40
|
-
server?: string;
|
|
41
|
-
path?: string;
|
|
42
|
-
} & OasSource;
|
|
43
|
-
|
|
44
|
-
const OasContextProvider = ({
|
|
45
|
-
config,
|
|
46
|
-
client,
|
|
47
|
-
}: {
|
|
48
|
-
config: OasPluginConfig;
|
|
49
|
-
client: typeof UrqlClient;
|
|
50
|
-
}) => {
|
|
51
|
-
return (
|
|
52
|
-
<Provider value={client}>
|
|
53
|
-
<OasConfigProvider value={{ config }}>
|
|
54
|
-
<Outlet />
|
|
55
|
-
</OasConfigProvider>
|
|
56
|
-
</Provider>
|
|
57
|
-
);
|
|
58
|
-
};
|
|
10
|
+
import { useQuery } from "@tanstack/react-query";
|
|
11
|
+
import { CirclePlayIcon, LogInIcon } from "lucide-react";
|
|
12
|
+
import { createClient } from "zudoku/openapi-worker";
|
|
13
|
+
import type { SidebarItem } from "../../../config/validators/SidebarSchema.js";
|
|
14
|
+
import { useAuth } from "../../authentication/hook.js";
|
|
15
|
+
import { ErrorPage } from "../../components/ErrorPage.js";
|
|
16
|
+
import { SyntaxHighlight } from "../../components/SyntaxHighlight.js";
|
|
17
|
+
import { Button } from "../../ui/Button.js";
|
|
18
|
+
import { joinPath } from "../../util/joinPath.js";
|
|
19
|
+
import { OasPluginConfig } from "./interfaces.js";
|
|
20
|
+
import type { PlaygroundContentProps } from "./playground/Playground.js";
|
|
21
|
+
import { PlaygroundDialog } from "./playground/PlaygroundDialog.js";
|
|
22
|
+
import { GetServerQuery } from "./Sidecar.js";
|
|
59
23
|
|
|
60
24
|
const GetCategoriesQuery = graphql(`
|
|
61
25
|
query GetCategories($input: JSON!, $type: SchemaType!) {
|
|
@@ -77,20 +41,102 @@ const GetCategoriesQuery = graphql(`
|
|
|
77
41
|
}
|
|
78
42
|
`);
|
|
79
43
|
|
|
80
|
-
|
|
81
|
-
const
|
|
44
|
+
const OpenApiErrorPage = () => {
|
|
45
|
+
const error = useRouteError();
|
|
46
|
+
const message =
|
|
47
|
+
error instanceof Error ? (
|
|
48
|
+
<SyntaxHighlight code={error.message} />
|
|
49
|
+
) : (
|
|
50
|
+
"An unknown error occurred"
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<ErrorPage category="Error" title="An error occurred" message={message} />
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
type InternalOasPluginConfig = { inMemory?: boolean };
|
|
59
|
+
|
|
60
|
+
export const openApiPlugin = (
|
|
61
|
+
config: OasPluginConfig & InternalOasPluginConfig,
|
|
62
|
+
): DevPortalPlugin => {
|
|
63
|
+
const basePath = joinPath(config.navigationId ?? "/reference");
|
|
82
64
|
|
|
83
65
|
const client = config.server
|
|
84
66
|
? new UrqlClient({
|
|
85
67
|
url: config.server,
|
|
86
68
|
exchanges: [cacheExchange, fetchExchange],
|
|
87
69
|
})
|
|
88
|
-
: (
|
|
89
|
-
typeof createSharedWorkerClientType
|
|
90
|
-
>);
|
|
70
|
+
: createClient({ useMemoryClient: config.inMemory ?? false });
|
|
91
71
|
|
|
92
72
|
return {
|
|
93
|
-
|
|
73
|
+
getHead: () => {
|
|
74
|
+
if (config.type === "url" && !config.skipPreload) {
|
|
75
|
+
return (
|
|
76
|
+
<link
|
|
77
|
+
rel="preload"
|
|
78
|
+
href={config.input}
|
|
79
|
+
as="fetch"
|
|
80
|
+
crossOrigin="anonymous"
|
|
81
|
+
/>
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (config.server) {
|
|
86
|
+
return <link rel="preconnect" href={config.server} />;
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
getMdxComponents: () => ({
|
|
90
|
+
OpenPlaygroundButton: ({
|
|
91
|
+
requireAuth,
|
|
92
|
+
server,
|
|
93
|
+
method,
|
|
94
|
+
url,
|
|
95
|
+
...props
|
|
96
|
+
}: Partial<PlaygroundContentProps> & { requireAuth: boolean }) => {
|
|
97
|
+
const auth = useAuth();
|
|
98
|
+
const serverQuery = useQuery({
|
|
99
|
+
queryFn: async () => {
|
|
100
|
+
const result = await client.query(GetServerQuery, {
|
|
101
|
+
type: config.type,
|
|
102
|
+
input: config.input,
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
return result.data;
|
|
106
|
+
},
|
|
107
|
+
enabled: !server,
|
|
108
|
+
queryKey: ["playground-server"],
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
if (requireAuth && !auth.isAuthenticated) {
|
|
112
|
+
return (
|
|
113
|
+
<Button
|
|
114
|
+
className="gap-2 items-center"
|
|
115
|
+
variant="outline"
|
|
116
|
+
onClick={auth.login}
|
|
117
|
+
>
|
|
118
|
+
Login to open in Playground <LogInIcon size={16} />
|
|
119
|
+
</Button>
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
return (
|
|
124
|
+
<PlaygroundDialog
|
|
125
|
+
url={url ?? "/"}
|
|
126
|
+
method={method ?? "get"}
|
|
127
|
+
server={
|
|
128
|
+
server ?? serverQuery.data?.schema.url ?? "https://example.com"
|
|
129
|
+
}
|
|
130
|
+
{...props}
|
|
131
|
+
>
|
|
132
|
+
<Button className="gap-2 items-center" variant="outline">
|
|
133
|
+
Open in Playground <CirclePlayIcon size={16} />
|
|
134
|
+
</Button>
|
|
135
|
+
</PlaygroundDialog>
|
|
136
|
+
);
|
|
137
|
+
},
|
|
138
|
+
}),
|
|
139
|
+
getSidebar: async (path: string) => {
|
|
94
140
|
if (!matchPath({ path: basePath, end: false }, path)) {
|
|
95
141
|
return [];
|
|
96
142
|
}
|
|
@@ -104,30 +150,26 @@ export const openApiPlugin = (config: OasPluginConfig): DevPortalPlugin => {
|
|
|
104
150
|
|
|
105
151
|
const categories = data.schema.tags
|
|
106
152
|
.filter((tag) => tag.operations.length > 0)
|
|
107
|
-
.map<
|
|
108
|
-
|
|
153
|
+
.map<SidebarItem>((tag) => ({
|
|
154
|
+
type: "category",
|
|
109
155
|
label: tag.name ?? "",
|
|
110
156
|
collapsible: false,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
<MethodBadge method={operation.method} />
|
|
121
|
-
</div>
|
|
122
|
-
),
|
|
157
|
+
collapsed: false,
|
|
158
|
+
items: tag.operations.map((operation) => ({
|
|
159
|
+
type: "link",
|
|
160
|
+
label: operation.summary ?? operation.path,
|
|
161
|
+
href: `#${operation.slug}`,
|
|
162
|
+
badge: {
|
|
163
|
+
label: operation.method,
|
|
164
|
+
color: "green",
|
|
165
|
+
},
|
|
123
166
|
})),
|
|
124
167
|
}));
|
|
125
168
|
|
|
126
169
|
categories.unshift({
|
|
127
|
-
|
|
170
|
+
type: "link",
|
|
128
171
|
label: "Overview",
|
|
129
|
-
|
|
130
|
-
children: [{ path: "#description", label: "Description" }],
|
|
172
|
+
href: "#description",
|
|
131
173
|
});
|
|
132
174
|
|
|
133
175
|
return categories;
|
|
@@ -135,11 +177,27 @@ export const openApiPlugin = (config: OasPluginConfig): DevPortalPlugin => {
|
|
|
135
177
|
getRoutes: () =>
|
|
136
178
|
[
|
|
137
179
|
{
|
|
138
|
-
|
|
180
|
+
async lazy() {
|
|
181
|
+
const { OpenApiRoute } = await import("./Route.js");
|
|
182
|
+
return {
|
|
183
|
+
element: <OpenApiRoute client={client} config={config} />,
|
|
184
|
+
};
|
|
185
|
+
},
|
|
186
|
+
errorElement: <OpenApiErrorPage />,
|
|
139
187
|
children: [
|
|
140
188
|
{
|
|
141
189
|
path: basePath,
|
|
142
|
-
children: [
|
|
190
|
+
children: [
|
|
191
|
+
{
|
|
192
|
+
index: true,
|
|
193
|
+
async lazy() {
|
|
194
|
+
const { OperationList } = await import(
|
|
195
|
+
"./OperationList.js"
|
|
196
|
+
);
|
|
197
|
+
return { element: <OperationList /> };
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
],
|
|
143
201
|
},
|
|
144
202
|
],
|
|
145
203
|
},
|
|
@@ -1,36 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Control,
|
|
1
|
+
import { EraserIcon } from "lucide-react";
|
|
2
|
+
import { Control, Controller, useFieldArray } from "react-hook-form";
|
|
3
|
+
import { Button } from "../../../ui/Button.js";
|
|
4
|
+
import { Input } from "../../../ui/Input.js";
|
|
3
5
|
import { cn } from "../../../util/cn.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { PlaygroundForm } from "./Playground.js";
|
|
7
|
-
|
|
8
|
-
type ParameterValueProps = {
|
|
9
|
-
part: string;
|
|
10
|
-
} & InputHTMLAttributes<HTMLInputElement>;
|
|
11
|
-
|
|
12
|
-
const ParameterValue = forwardRef<HTMLInputElement, ParameterValueProps>(
|
|
13
|
-
function ParameterValue({ part, className, ...props }, ref) {
|
|
14
|
-
const color = usePastellizedColor(part);
|
|
15
|
-
return (
|
|
16
|
-
<InlineInput
|
|
17
|
-
{...props}
|
|
18
|
-
ref={ref}
|
|
19
|
-
className={cn(className, "opacity-80 data-[active=true]:opacity-100")}
|
|
20
|
-
style={{
|
|
21
|
-
// color: `hsl(${color})`,
|
|
22
|
-
outlineColor: `hsl(${color})`,
|
|
23
|
-
}}
|
|
24
|
-
/>
|
|
25
|
-
);
|
|
26
|
-
},
|
|
27
|
-
);
|
|
6
|
+
import { ColorizedParam } from "../ColorizedParam.js";
|
|
7
|
+
import type { PlaygroundForm } from "./Playground.js";
|
|
28
8
|
|
|
29
9
|
export const PathParams = ({
|
|
30
10
|
control,
|
|
31
|
-
register,
|
|
32
11
|
}: {
|
|
33
|
-
register: UseFormRegister<PlaygroundForm>;
|
|
34
12
|
control: Control<PlaygroundForm>;
|
|
35
13
|
}) => {
|
|
36
14
|
const { fields } = useFieldArray<PlaygroundForm>({
|
|
@@ -38,26 +16,74 @@ export const PathParams = ({
|
|
|
38
16
|
name: "pathParams",
|
|
39
17
|
});
|
|
40
18
|
|
|
41
|
-
return
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
19
|
+
return (
|
|
20
|
+
<table className="w-full table-auto [&_td]:border [&_td]:py-1 [&_td]:px-2">
|
|
21
|
+
<tbody>
|
|
22
|
+
{fields.map((part, i) => (
|
|
23
|
+
<tr key={part.id} className="hover:bg-accent/40">
|
|
24
|
+
<td>
|
|
25
|
+
<Controller
|
|
26
|
+
control={control}
|
|
27
|
+
name={`pathParams.${i}.value`}
|
|
28
|
+
render={({ field }) => (
|
|
29
|
+
<div>
|
|
30
|
+
<ColorizedParam
|
|
31
|
+
slug={part.name}
|
|
32
|
+
name={part.name}
|
|
33
|
+
backgroundOpacity="25%"
|
|
34
|
+
borderOpacity={field.value ? "100%" : "0"}
|
|
35
|
+
className={cn(
|
|
36
|
+
"font-mono text-xs m-2",
|
|
37
|
+
!field.value && "opacity-60",
|
|
38
|
+
)}
|
|
39
|
+
/>
|
|
40
|
+
*
|
|
41
|
+
</div>
|
|
42
|
+
)}
|
|
43
|
+
/>
|
|
44
|
+
</td>
|
|
45
|
+
<td>
|
|
46
|
+
<div className="flex justify-between items-center">
|
|
47
|
+
<Controller
|
|
48
|
+
control={control}
|
|
49
|
+
name={`pathParams.${i}.value`}
|
|
50
|
+
render={({ field }) => (
|
|
51
|
+
<Input
|
|
52
|
+
{...field}
|
|
53
|
+
placeholder="Enter value"
|
|
54
|
+
className={cn(
|
|
55
|
+
"border-0 shadow-none ring-0 font-mono text-xs",
|
|
56
|
+
)}
|
|
57
|
+
/>
|
|
58
|
+
)}
|
|
59
|
+
/>
|
|
60
|
+
<Controller
|
|
61
|
+
control={control}
|
|
62
|
+
name={`pathParams.${i}.value`}
|
|
63
|
+
render={({ field }) => (
|
|
64
|
+
<Button
|
|
65
|
+
size="icon"
|
|
66
|
+
type="button"
|
|
67
|
+
variant="ghost"
|
|
68
|
+
aria-label="Clear value"
|
|
69
|
+
className={cn(
|
|
70
|
+
"ms-2",
|
|
71
|
+
field.value.length === 0
|
|
72
|
+
? "opacity-0 pointer-events-none"
|
|
73
|
+
: "opacity-100",
|
|
74
|
+
)}
|
|
75
|
+
title="Clear value"
|
|
76
|
+
onClick={() => field.onChange("")}
|
|
77
|
+
>
|
|
78
|
+
<EraserIcon size={16} />
|
|
79
|
+
</Button>
|
|
80
|
+
)}
|
|
81
|
+
/>
|
|
82
|
+
</div>
|
|
83
|
+
</td>
|
|
84
|
+
</tr>
|
|
85
|
+
))}
|
|
86
|
+
</tbody>
|
|
87
|
+
</table>
|
|
88
|
+
);
|
|
63
89
|
};
|