zudoku 0.0.0-f90a252 → 0.0.0-f9211eb
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/README.md +1 -1
- package/cli.js +3 -0
- package/dist/app/entry.client.d.ts +5 -0
- package/dist/app/entry.client.js +1 -0
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/entry.server.d.ts +8 -6
- package/dist/app/entry.server.js +12 -8
- package/dist/app/entry.server.js.map +1 -1
- package/dist/app/main.js +3 -1
- package/dist/app/main.js.map +1 -1
- package/dist/app/tailwind.js +20 -0
- package/dist/app/tailwind.js.map +1 -1
- package/dist/cli/build/handler.d.ts +1 -3
- package/dist/cli/build/handler.js +9 -1
- package/dist/cli/build/handler.js.map +1 -1
- package/dist/cli/cli.js +5 -0
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/cmds/build.d.ts +11 -3
- package/dist/cli/cmds/build.js +20 -13
- package/dist/cli/cmds/build.js.map +1 -1
- package/dist/cli/cmds/dev.d.ts +1 -1
- package/dist/cli/cmds/dev.js.map +1 -1
- package/dist/cli/cmds/preview.d.ts +16 -0
- package/dist/cli/cmds/preview.js +25 -0
- package/dist/cli/cmds/preview.js.map +1 -0
- package/dist/cli/dev/handler.js +2 -1
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/cli/preview/handler.d.ts +3 -0
- package/dist/cli/preview/handler.js +35 -0
- package/dist/cli/preview/handler.js.map +1 -0
- package/dist/config/common.d.ts +5 -3
- package/dist/config/config.d.ts +15 -15
- package/dist/config/loader.d.ts +6 -6
- package/dist/config/loader.js +20 -28
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/InputSidebarSchema.d.ts +15 -15
- package/dist/config/validators/InputSidebarSchema.js +10 -1
- package/dist/config/validators/InputSidebarSchema.js.map +1 -1
- package/dist/config/validators/common.d.ts +2993 -599
- package/dist/config/validators/common.js +107 -12
- package/dist/config/validators/common.js.map +1 -1
- package/dist/config/validators/icon-types.d.ts +1 -1
- package/dist/config/validators/validate.d.ts +1127 -284
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/authentication/authentication.d.ts +1 -0
- package/dist/lib/authentication/hook.d.ts +1 -0
- package/dist/lib/authentication/hook.js +11 -1
- package/dist/lib/authentication/hook.js.map +1 -1
- package/dist/lib/authentication/providers/auth0.d.ts +2 -2
- package/dist/lib/authentication/providers/auth0.js +1 -0
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/clerk.d.ts +2 -2
- package/dist/lib/authentication/providers/clerk.js +25 -6
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +5 -3
- package/dist/lib/authentication/providers/openid.js +24 -10
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/authentication/providers/supabase.d.ts +4 -0
- package/dist/lib/authentication/providers/supabase.js +117 -0
- package/dist/lib/authentication/providers/supabase.js.map +1 -0
- package/dist/lib/authentication/state.d.ts +0 -26
- package/dist/lib/authentication/state.js +9 -18
- package/dist/lib/authentication/state.js.map +1 -1
- package/dist/lib/components/AnchorLink.d.ts +2 -2
- package/dist/lib/components/AnchorLink.js +5 -4
- package/dist/lib/components/AnchorLink.js.map +1 -1
- package/dist/lib/components/Banner.js +1 -1
- package/dist/lib/components/Banner.js.map +1 -1
- package/dist/lib/components/Bootstrap.d.ts +2 -1
- package/dist/lib/components/Bootstrap.js +3 -2
- package/dist/lib/components/Bootstrap.js.map +1 -1
- package/dist/lib/components/Footer.d.ts +1 -0
- package/dist/lib/components/Footer.js +32 -0
- package/dist/lib/components/Footer.js.map +1 -0
- package/dist/lib/components/Header.js +4 -4
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +2 -2
- package/dist/lib/components/InlineCode.d.ts +2 -1
- package/dist/lib/components/InlineCode.js +2 -9
- package/dist/lib/components/InlineCode.js.map +1 -1
- package/dist/lib/components/Layout.js +8 -29
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/Main.d.ts +2 -0
- package/dist/lib/components/Main.js +17 -0
- package/dist/lib/components/Main.js.map +1 -0
- package/dist/lib/components/MobileTopNavigation.js +6 -3
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/Pagination.d.ts +11 -0
- package/dist/lib/components/Pagination.js +10 -0
- package/dist/lib/components/Pagination.js.map +1 -0
- package/dist/lib/components/ThemeSwitch.js +1 -1
- package/dist/lib/components/ThemeSwitch.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +3 -2
- package/dist/lib/components/TopNavigation.js +28 -14
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Zudoku.d.ts +1 -1
- package/dist/lib/components/Zudoku.js +15 -8
- package/dist/lib/components/Zudoku.js.map +1 -1
- package/dist/lib/components/cache.d.ts +7 -0
- package/dist/lib/components/cache.js +7 -0
- package/dist/lib/components/cache.js.map +1 -1
- package/dist/lib/components/context/BypassProtectedRoutesContext.d.ts +1 -0
- package/dist/lib/components/context/BypassProtectedRoutesContext.js +3 -0
- package/dist/lib/components/context/BypassProtectedRoutesContext.js.map +1 -0
- package/dist/lib/components/context/RouterEventsEmitter.d.ts +1 -0
- package/dist/lib/components/context/RouterEventsEmitter.js +17 -0
- package/dist/lib/components/context/RouterEventsEmitter.js.map +1 -0
- package/dist/lib/components/context/ViewportAnchorContext.d.ts +2 -4
- package/dist/lib/components/context/ViewportAnchorContext.js +5 -10
- package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.d.ts +2 -2
- package/dist/lib/components/context/ZudokuContext.js +13 -7
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +7 -3
- package/dist/lib/components/index.js +2 -0
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/PoweredByZudoku.d.ts +3 -0
- package/dist/lib/components/navigation/PoweredByZudoku.js +6 -0
- package/dist/lib/components/navigation/PoweredByZudoku.js.map +1 -0
- package/dist/lib/components/navigation/Sidebar.d.ts +3 -1
- package/dist/lib/components/navigation/Sidebar.js +1 -12
- package/dist/lib/components/navigation/Sidebar.js.map +1 -1
- package/dist/lib/components/navigation/SidebarBadge.d.ts +2 -0
- package/dist/lib/components/navigation/SidebarBadge.js +3 -1
- 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 +10 -6
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.d.ts +1 -0
- package/dist/lib/components/navigation/SidebarItem.js +17 -11
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.d.ts +7 -6
- package/dist/lib/components/navigation/SidebarWrapper.js +18 -3
- package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
- package/dist/lib/{plugins/markdown → components/navigation}/Toc.js +5 -7
- package/dist/lib/components/navigation/Toc.js.map +1 -0
- package/dist/lib/components/navigation/ZudokuLogo.d.ts +6 -0
- package/dist/lib/components/navigation/ZudokuLogo.js +5 -0
- package/dist/lib/components/navigation/ZudokuLogo.js.map +1 -0
- package/dist/lib/core/RouteGuard.d.ts +2 -1
- package/dist/lib/core/RouteGuard.js +31 -11
- package/dist/lib/core/RouteGuard.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +32 -6
- package/dist/lib/core/ZudokuContext.js +29 -6
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +15 -7
- package/dist/lib/core/plugins.js +1 -0
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/errors/ErrorAlert.js +6 -1
- package/dist/lib/errors/ErrorAlert.js.map +1 -1
- package/dist/lib/hooks/index.d.ts +3 -0
- package/dist/lib/hooks/index.js +5 -0
- package/dist/lib/hooks/index.js.map +1 -0
- package/dist/lib/hooks/useEvent.d.ts +11 -0
- package/dist/lib/hooks/useEvent.js +19 -0
- package/dist/lib/hooks/useEvent.js.map +1 -0
- package/dist/lib/hooks/useEvent.test.js +100 -0
- package/dist/lib/hooks/useEvent.test.js.map +1 -0
- package/dist/lib/oas/graphql/index.d.ts +17 -4
- package/dist/lib/oas/graphql/index.js +151 -39
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/oas/parser/dereference/index.js +2 -0
- package/dist/lib/oas/parser/dereference/index.js.map +1 -1
- package/dist/lib/oas/parser/index.d.ts +5 -3
- package/dist/lib/oas/parser/index.js +0 -22
- package/dist/lib/oas/parser/index.js.map +1 -1
- package/dist/lib/plugins/api-catalog/Catalog.d.ts +4 -2
- package/dist/lib/plugins/api-catalog/Catalog.js +16 -26
- package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -1
- package/dist/lib/plugins/api-catalog/index.d.ts +1 -0
- package/dist/lib/plugins/api-catalog/index.js +39 -8
- package/dist/lib/plugins/api-catalog/index.js.map +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.js +7 -3
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.d.ts +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +3 -9
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js +1 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
- package/dist/lib/plugins/openapi/Endpoint.js +1 -1
- package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.d.ts +2 -2
- package/dist/lib/plugins/openapi/OperationList.js +63 -18
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.d.ts +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +7 -12
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParamInfos.d.ts +6 -0
- package/dist/lib/plugins/openapi/ParamInfos.js +42 -0
- package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -0
- package/dist/lib/plugins/openapi/ParameterList.d.ts +2 -1
- package/dist/lib/plugins/openapi/ParameterList.js +3 -2
- package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +9 -4
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +3 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaList.d.ts +1 -0
- package/dist/lib/plugins/openapi/SchemaList.js +52 -0
- package/dist/lib/plugins/openapi/SchemaList.js.map +1 -0
- package/dist/lib/plugins/openapi/Sidecar.js +39 -10
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js +2 -2
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/SimpleSelect.js +1 -1
- package/dist/lib/plugins/openapi/SimpleSelect.js.map +1 -1
- package/dist/lib/plugins/openapi/client/GraphQLClient.d.ts +1 -1
- package/dist/lib/plugins/openapi/client/GraphQLClient.js +1 -1
- package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -1
- package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +6 -2
- package/dist/lib/plugins/openapi/client/useCreateQuery.js +6 -5
- package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
- package/dist/lib/plugins/openapi/components/EnumValues.d.ts +5 -0
- package/dist/lib/plugins/openapi/components/EnumValues.js +15 -0
- package/dist/lib/plugins/openapi/components/EnumValues.js.map +1 -0
- package/dist/lib/plugins/openapi/components/SelectOnClick.d.ts +5 -0
- package/dist/lib/plugins/openapi/components/SelectOnClick.js +16 -0
- package/dist/lib/plugins/openapi/components/SelectOnClick.js.map +1 -0
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +9 -5
- package/dist/lib/plugins/openapi/graphql/gql.js +5 -15
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +108 -55
- package/dist/lib/plugins/openapi/graphql/graphql.js +59 -34
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.d.ts +6 -11
- package/dist/lib/plugins/openapi/index.js +41 -60
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +36 -10
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +1 -5
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
- 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/IdentityDialog.d.ts +11 -0
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js +14 -0
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/IdentitySelector.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js +10 -0
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/PathParams.d.ts +3 -2
- package/dist/lib/plugins/openapi/playground/PathParams.js +3 -2
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +13 -2
- package/dist/lib/plugins/openapi/playground/Playground.js +81 -27
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js +8 -0
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.d.ts +17 -0
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.js +11 -0
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +20 -14
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +6 -4
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +4 -3
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.d.ts +1 -2
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js +2 -2
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.d.ts +2 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js +2 -2
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.d.ts +0 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js +1 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.d.ts +4 -0
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +12 -0
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.d.ts +2 -4
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +18 -13
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +1 -2
- package/dist/lib/plugins/openapi/schema/SchemaView.js +33 -48
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/utils.d.ts +1 -0
- package/dist/lib/plugins/openapi/schema/utils.js +3 -1
- package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
- package/dist/lib/plugins/openapi/state.d.ts +25 -0
- package/dist/lib/plugins/openapi/state.js +18 -0
- package/dist/lib/plugins/openapi/state.js.map +1 -0
- package/dist/lib/plugins/openapi/util/createSidebarCategory.js +5 -7
- package/dist/lib/plugins/openapi/util/createSidebarCategory.js.map +1 -1
- package/dist/lib/plugins/openapi/util/getRoutes.js +9 -3
- package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/PagefindSearch.d.ts +6 -0
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js +80 -0
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/ResultList.d.ts +8 -0
- package/dist/lib/plugins/search-pagefind/ResultList.js +32 -0
- package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/get-results.d.ts +10 -0
- package/dist/lib/plugins/search-pagefind/get-results.js +42 -0
- package/dist/lib/plugins/search-pagefind/get-results.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/index.d.ts +6 -0
- package/dist/lib/plugins/search-pagefind/index.js +9 -0
- package/dist/lib/plugins/search-pagefind/index.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/types.d.ts +85 -0
- package/dist/lib/plugins/search-pagefind/types.js +2 -0
- package/dist/lib/plugins/search-pagefind/types.js.map +1 -0
- package/dist/lib/ui/Badge.d.ts +1 -1
- package/dist/lib/ui/Button.d.ts +2 -2
- package/dist/lib/ui/Button.js +2 -1
- package/dist/lib/ui/Button.js.map +1 -1
- package/dist/lib/ui/Callout.d.ts +2 -1
- package/dist/lib/ui/Callout.js +3 -2
- package/dist/lib/ui/Callout.js.map +1 -1
- package/dist/lib/ui/Checkbox.d.ts +2 -8
- package/dist/lib/ui/Checkbox.js +1 -13
- package/dist/lib/ui/Checkbox.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +7 -1
- package/dist/lib/ui/Command.js +2 -2
- package/dist/lib/ui/Command.js.map +1 -1
- package/dist/lib/ui/Select.js +1 -1
- package/dist/lib/ui/Select.js.map +1 -1
- package/dist/lib/ui/Stepper.d.ts +3 -0
- package/dist/lib/ui/Stepper.js +7 -0
- package/dist/lib/ui/Stepper.js.map +1 -0
- package/dist/lib/ui/SyntaxHighlight.d.ts +15 -0
- package/dist/lib/ui/SyntaxHighlight.js +62 -0
- package/dist/lib/ui/SyntaxHighlight.js.map +1 -0
- package/dist/lib/ui/util.d.ts +2 -0
- package/dist/lib/ui/util.js +3 -0
- package/dist/lib/ui/util.js.map +1 -0
- package/dist/lib/util/MdxComponents.d.ts +5 -2
- package/dist/lib/util/MdxComponents.js +6 -3
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/joinPath.d.ts +3 -0
- package/dist/lib/util/joinPath.js +3 -0
- package/dist/lib/util/joinPath.js.map +1 -1
- package/dist/lib/util/traverse.d.ts +2 -8
- package/dist/lib/util/traverse.js +2 -2
- package/dist/lib/util/traverse.js.map +1 -1
- package/dist/lib/util/types.d.ts +7 -0
- package/dist/lib/util/types.js +2 -0
- package/dist/lib/util/types.js.map +1 -0
- package/dist/lib/util/useOnScreen.d.ts +3 -2
- package/dist/lib/util/useOnScreen.js +3 -3
- package/dist/lib/util/useOnScreen.js.map +1 -1
- package/dist/lib/util/useScrollToAnchor.js +26 -20
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/vite/api/schema-codegen.d.ts +1 -1
- package/dist/vite/api/schema-codegen.js +31 -9
- package/dist/vite/api/schema-codegen.js.map +1 -1
- package/dist/vite/api/schema-codegen.test.js +66 -0
- package/dist/vite/api/schema-codegen.test.js.map +1 -1
- package/dist/vite/build.js +2 -0
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.d.ts +2 -5
- package/dist/vite/config.js +39 -56
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/config.test.js +1 -1
- package/dist/vite/config.test.js.map +1 -1
- package/dist/vite/create-pagefind-index.d.ts +4 -0
- package/dist/vite/create-pagefind-index.js +12 -0
- package/dist/vite/create-pagefind-index.js.map +1 -0
- package/dist/vite/css/plugin.d.ts +2 -2
- package/dist/vite/css/plugin.js.map +1 -1
- package/dist/vite/dev-server.js +12 -4
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/plugin-api-keys.d.ts +2 -2
- package/dist/vite/plugin-api-keys.js +3 -3
- package/dist/vite/plugin-api-keys.js.map +1 -1
- package/dist/vite/plugin-api.d.ts +2 -2
- package/dist/vite/plugin-api.js +42 -35
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.d.ts +2 -2
- package/dist/vite/plugin-auth.js +3 -3
- package/dist/vite/plugin-auth.js.map +1 -1
- package/dist/vite/plugin-component.d.ts +2 -2
- package/dist/vite/plugin-component.js +7 -2
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/plugin-config-reload.d.ts +4 -3
- package/dist/vite/plugin-config-reload.js +13 -6
- package/dist/vite/plugin-config-reload.js.map +1 -1
- package/dist/vite/plugin-config.d.ts +2 -2
- package/dist/vite/plugin-config.js +7 -4
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-custom-pages.d.ts +2 -2
- package/dist/vite/plugin-custom-pages.js +3 -3
- package/dist/vite/plugin-custom-pages.js.map +1 -1
- package/dist/vite/plugin-docs.d.ts +3 -3
- package/dist/vite/plugin-docs.js +23 -6
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-frontmatter.d.ts +2 -2
- package/dist/vite/plugin-frontmatter.js +5 -4
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-mdx.d.ts +2 -2
- package/dist/vite/plugin-mdx.js +1 -1
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-redirect.d.ts +2 -2
- package/dist/vite/plugin-redirect.js +3 -3
- package/dist/vite/plugin-redirect.js.map +1 -1
- package/dist/vite/plugin-search.d.ts +2 -2
- package/dist/vite/plugin-search.js +5 -1
- package/dist/vite/plugin-search.js.map +1 -1
- package/dist/vite/plugin-sidebar.d.ts +2 -2
- package/dist/vite/plugin-sidebar.js +2 -2
- package/dist/vite/plugin-sidebar.js.map +1 -1
- package/dist/vite/plugin-theme-css.d.ts +2 -2
- package/dist/vite/plugin-theme-css.js.map +1 -1
- package/dist/vite/plugin.d.ts +2 -2
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender/FileWritingResponse.d.ts +11 -6
- package/dist/vite/prerender/FileWritingResponse.js +9 -6
- package/dist/vite/prerender/FileWritingResponse.js.map +1 -1
- package/dist/vite/prerender/InMemoryResponse.d.ts +16 -0
- package/dist/vite/prerender/InMemoryResponse.js +32 -0
- package/dist/vite/prerender/InMemoryResponse.js.map +1 -0
- package/dist/vite/prerender/PrerenderResponse.d.ts +10 -0
- package/dist/vite/prerender/PrerenderResponse.js +2 -0
- package/dist/vite/prerender/PrerenderResponse.js.map +1 -0
- package/dist/vite/prerender/prerender.d.ts +1 -0
- package/dist/vite/prerender/prerender.js +34 -28
- package/dist/vite/prerender/prerender.js.map +1 -1
- package/dist/vite/prerender/worker.d.ts +1 -1
- package/dist/vite/prerender/worker.js +42 -12
- package/dist/vite/prerender/worker.js.map +1 -1
- package/dist/vite/sitemap.js +2 -1
- package/dist/vite/sitemap.js.map +1 -1
- package/dist/zuplo/with-zuplo.js +4 -0
- package/dist/zuplo/with-zuplo.js.map +1 -1
- package/lib/{AuthenticationPlugin-_YVa673u.js → AuthenticationPlugin-foqdvvkf.js} +4 -4
- package/lib/{AuthenticationPlugin-_YVa673u.js.map → AuthenticationPlugin-foqdvvkf.js.map} +1 -1
- package/lib/Button-Fp19CMUr.js +49 -0
- package/lib/Button-Fp19CMUr.js.map +1 -0
- package/lib/Callout-B2vsR09t.js +229 -0
- package/lib/Callout-B2vsR09t.js.map +1 -0
- package/lib/{CategoryHeading-MYL1u_6K.js → CategoryHeading-DpB47wvk.js} +3 -3
- package/lib/{CategoryHeading-MYL1u_6K.js.map → CategoryHeading-DpB47wvk.js.map} +1 -1
- package/lib/Dialog-sbgekbjb.js +98 -0
- package/lib/Dialog-sbgekbjb.js.map +1 -0
- package/lib/Drawer-kDAfOq_2.js +1133 -0
- package/lib/Drawer-kDAfOq_2.js.map +1 -0
- package/lib/{Markdown-8mv9nhGd.js → Markdown-aF5FdsNi.js} +7822 -6052
- package/lib/Markdown-aF5FdsNi.js.map +1 -0
- package/lib/MdxPage-Vw_dc9Yz.js +85 -0
- package/lib/MdxPage-Vw_dc9Yz.js.map +1 -0
- package/lib/{OasProvider-IS9wBrb7.js → OasProvider-CjXTP-nz.js} +6 -6
- package/lib/{OasProvider-IS9wBrb7.js.map → OasProvider-CjXTP-nz.js.map} +1 -1
- package/lib/OperationList-BYemrDYk.js +5068 -0
- package/lib/OperationList-BYemrDYk.js.map +1 -0
- package/lib/Pagination-SdlocK96.js +48 -0
- package/lib/Pagination-SdlocK96.js.map +1 -0
- package/lib/{index.esm-9-TF9KQB.js → RouteGuard-CqZPoZYJ.js} +196 -144
- package/lib/RouteGuard-CqZPoZYJ.js.map +1 -0
- package/lib/SchemaList-CAeKy9pV.js +148 -0
- package/lib/SchemaList-CAeKy9pV.js.map +1 -0
- package/lib/SchemaView-B3fOPR4V.js +357 -0
- package/lib/SchemaView-B3fOPR4V.js.map +1 -0
- package/lib/{Select-D9CKL33X.js → Select-DVFRKf1R.js} +71 -71
- package/lib/{Select-D9CKL33X.js.map → Select-DVFRKf1R.js.map} +1 -1
- package/lib/SlotletProvider-DXvc0aY6.js +338 -0
- package/lib/SlotletProvider-DXvc0aY6.js.map +1 -0
- package/lib/Spinner-CE68iCm0.js +7 -0
- package/lib/Spinner-CE68iCm0.js.map +1 -0
- package/lib/{SyntaxHighlight-B0L4SC_N.js → SyntaxHighlight-BEoSoPEo.js} +496 -592
- package/lib/SyntaxHighlight-BEoSoPEo.js.map +1 -0
- package/lib/Toc-YBsgI72s.js +92 -0
- package/lib/Toc-YBsgI72s.js.map +1 -0
- package/lib/{chunk-SYFQ2XB5-QijJrSf0.js → chunk-HA7DTUK3-C4gP41vD.js} +560 -560
- package/lib/chunk-HA7DTUK3-C4gP41vD.js.map +1 -0
- package/lib/{circular-DxaIIlWD.js → circular-ByJI6Mci.js} +5461 -4993
- package/lib/circular-ByJI6Mci.js.map +1 -0
- package/lib/context-DLCwaMXN.js +22 -0
- package/lib/{context-rwLGh-6_.js.map → context-DLCwaMXN.js.map} +1 -1
- package/lib/{createServer-DSQiPwjN.js → createServer-mYvGvmc0.js} +5062 -5209
- package/lib/createServer-mYvGvmc0.js.map +1 -0
- package/lib/{hook-C_t2ISLC.js → hook-CqpVYDqN.js} +495 -467
- package/lib/hook-CqpVYDqN.js.map +1 -0
- package/lib/index-Bn6Lc9tq.js +9 -0
- package/lib/index-Bn6Lc9tq.js.map +1 -0
- package/lib/index-C1OzjGUK.js +2227 -0
- package/lib/index-C1OzjGUK.js.map +1 -0
- package/lib/index-CPNSgwSb.js +36 -0
- package/lib/{index-Djenk2Hj.js.map → index-CPNSgwSb.js.map} +1 -1
- package/lib/index-D48iOQvJ.js +1973 -0
- package/lib/index-D48iOQvJ.js.map +1 -0
- package/lib/index-DwT-v3zK.js +86 -0
- package/lib/index-DwT-v3zK.js.map +1 -0
- package/lib/{index-CjJS0l4l.js → index-LNp6rxyU.js} +2 -2
- package/lib/{index-CjJS0l4l.js.map → index-LNp6rxyU.js.map} +1 -1
- package/lib/index-gQD2h1wX.js +447 -0
- package/lib/index-gQD2h1wX.js.map +1 -0
- package/lib/{index.esm-CrSoEshU.js → index.esm--gIChbWs.js} +3 -3
- package/lib/{index.esm-CrSoEshU.js.map → index.esm--gIChbWs.js.map} +1 -1
- package/lib/{jsx-runtime-Bdg6XQ1m.js → jsx-runtime-CYK1ROHF.js} +99 -99
- package/lib/{jsx-runtime-Bdg6XQ1m.js.map → jsx-runtime-CYK1ROHF.js.map} +1 -1
- package/lib/{mutation-Cm3O9f3X.js → mutation-8LjrN7uz.js} +26 -26
- package/lib/{mutation-Cm3O9f3X.js.map → mutation-8LjrN7uz.js.map} +1 -1
- package/lib/objectEntries-yMIkr2mI.js +5 -0
- package/lib/objectEntries-yMIkr2mI.js.map +1 -0
- package/lib/post-processors/removeExtensions.js +4 -4
- package/lib/post-processors/traverse.js +2 -2
- package/lib/post-processors/traverse.js.map +1 -1
- package/lib/prism-bash.min-HHIMdNJ_.js.map +1 -1
- package/lib/prism-csharp.min-bQAo2pmx.js.map +1 -1
- package/lib/prism-java.min-BpvsOuIa.js.map +1 -1
- package/lib/prism-javascript.min-CEqHqgbm.js.map +1 -1
- package/lib/prism-json.min-B1GJqK1k.js.map +1 -1
- package/lib/prism-jsstacktrace.min-BfobCF2F.js +2 -0
- package/lib/prism-jsstacktrace.min-BfobCF2F.js.map +1 -0
- package/lib/prism-markdown.min-C0Qn0m-5.js.map +1 -1
- package/lib/prism-markup-BNGj0Tvm.js.map +1 -1
- package/lib/prism-objectivec.min-BXSWqpJJ.js.map +1 -1
- package/lib/prism-ruby.min-Dx9KO9ds.js.map +1 -1
- package/lib/prism-typescript.min-CD7H2IYQ.js.map +1 -1
- package/lib/ui/Accordion.js +1 -1
- package/lib/ui/ActionButton.js +11 -10
- package/lib/ui/ActionButton.js.map +1 -1
- package/lib/ui/Alert.js +2 -2
- package/lib/ui/AlertDialog.js +1 -1
- package/lib/ui/Badge.js +2 -2
- package/lib/ui/Breadcrumb.js +4 -4
- package/lib/ui/Button.js +13 -12
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/Callout.js +39 -21
- package/lib/ui/Callout.js.map +1 -1
- package/lib/ui/Card.js +1 -1
- package/lib/ui/Carousel.js +1 -1
- package/lib/ui/Checkbox.js +16 -26
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/Command.js +105 -78
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Dialog.js +1 -1
- package/lib/ui/Drawer.js +14 -1151
- package/lib/ui/Drawer.js.map +1 -1
- package/lib/ui/DropdownMenu.js +1 -1
- package/lib/ui/Form.js +5 -5
- package/lib/ui/HoverCard.js +1 -1
- package/lib/ui/Input.js +1 -1
- package/lib/ui/Label.js +2 -2
- package/lib/ui/Pagination.js +10 -10
- package/lib/ui/Popover.js +1 -1
- package/lib/ui/Progress.js +1 -1
- package/lib/ui/RadioGroup.js +1 -1
- package/lib/ui/ScrollArea.js +1 -1
- package/lib/ui/Select.js +2 -2
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Skeleton.js +1 -1
- package/lib/ui/Slider.js +1 -1
- package/lib/ui/Stepper.js +6 -0
- package/lib/ui/Stepper.js.map +1 -0
- package/lib/ui/Switch.js +1 -1
- package/lib/ui/SyntaxHighlight.js +11 -0
- package/lib/ui/SyntaxHighlight.js.map +1 -0
- package/lib/ui/Tabs.js +1 -1
- package/lib/ui/Textarea.js +1 -1
- package/lib/ui/Toggle.js +2 -2
- package/lib/ui/ToggleGroup.js +1 -1
- package/lib/ui/Tooltip.js +1 -1
- package/lib/ui/util.js +6 -0
- package/lib/ui/util.js.map +1 -0
- package/lib/{useExposedProps-Bbf99zic.js → useExposedProps-B9qXJedG.js} +2 -2
- package/lib/{useExposedProps-Bbf99zic.js.map → useExposedProps-B9qXJedG.js.map} +1 -1
- package/lib/useLatest-hmRS46UF.js +11 -0
- package/lib/useLatest-hmRS46UF.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +15 -14
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +67 -49
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +370 -404
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +32 -1334
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +19 -0
- package/lib/zudoku.hooks.js.map +1 -0
- package/lib/zudoku.icons.js +1 -1
- package/lib/zudoku.plugin-api-catalog.js +106 -111
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +108 -106
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +3 -3
- package/lib/zudoku.plugin-markdown.js +2 -2
- package/lib/zudoku.plugin-openapi.js +6 -8
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +9 -9
- package/lib/zudoku.plugin-search-pagefind.js +233 -0
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -0
- package/lib/zudoku.plugins.js +9 -8
- package/lib/zudoku.plugins.js.map +1 -1
- package/package.json +76 -56
- package/src/app/entry.client.tsx +8 -0
- package/src/app/entry.server.tsx +23 -13
- package/src/app/main.css +98 -57
- package/src/app/main.tsx +3 -1
- package/src/app/tailwind.ts +20 -0
- package/src/lib/authentication/authentication.ts +2 -0
- package/src/lib/authentication/hook.ts +12 -1
- package/src/lib/authentication/providers/auth0.tsx +3 -2
- package/src/lib/authentication/providers/clerk.tsx +32 -8
- package/src/lib/authentication/providers/openid.tsx +31 -15
- package/src/lib/authentication/providers/supabase.tsx +157 -0
- package/src/lib/authentication/state.ts +9 -37
- package/src/lib/components/AnchorLink.tsx +9 -7
- package/src/lib/components/Banner.tsx +1 -0
- package/src/lib/components/Bootstrap.tsx +13 -6
- package/src/lib/components/Footer.tsx +136 -0
- package/src/lib/components/Header.tsx +12 -8
- package/src/lib/components/Heading.tsx +1 -1
- package/src/lib/components/InlineCode.tsx +13 -16
- package/src/lib/components/Layout.tsx +22 -67
- package/src/lib/components/Main.tsx +50 -0
- package/src/lib/components/MobileTopNavigation.tsx +27 -18
- package/src/lib/components/Pagination.tsx +50 -0
- package/src/lib/components/ThemeSwitch.tsx +1 -1
- package/src/lib/components/TopNavigation.tsx +51 -24
- package/src/lib/components/Zudoku.tsx +20 -7
- package/src/lib/components/cache.ts +8 -0
- package/src/lib/components/context/BypassProtectedRoutesContext.ts +3 -0
- package/src/lib/components/context/RouterEventsEmitter.tsx +19 -0
- package/src/lib/components/context/ViewportAnchorContext.tsx +6 -15
- package/src/lib/components/context/ZudokuContext.ts +17 -8
- package/src/lib/components/index.ts +2 -0
- package/src/lib/components/navigation/PoweredByZudoku.tsx +23 -0
- package/src/lib/components/navigation/Sidebar.tsx +30 -44
- package/src/lib/components/navigation/SidebarBadge.tsx +4 -1
- package/src/lib/components/navigation/SidebarCategory.tsx +15 -12
- package/src/lib/components/navigation/SidebarItem.tsx +22 -29
- package/src/lib/components/navigation/SidebarWrapper.tsx +42 -23
- package/src/lib/{plugins/markdown → components/navigation}/Toc.tsx +5 -14
- package/src/lib/components/navigation/ZudokuLogo.tsx +25 -0
- package/src/lib/core/RouteGuard.tsx +69 -12
- package/src/lib/core/ZudokuContext.ts +63 -12
- package/src/lib/core/plugins.ts +21 -7
- package/src/lib/errors/ErrorAlert.tsx +24 -17
- package/src/lib/hooks/index.ts +5 -0
- package/src/lib/hooks/useEvent.test.tsx +149 -0
- package/src/lib/hooks/useEvent.ts +41 -0
- package/src/lib/oas/graphql/index.ts +206 -55
- package/src/lib/oas/parser/dereference/index.ts +2 -0
- package/src/lib/oas/parser/index.ts +7 -29
- package/src/lib/plugins/api-catalog/Catalog.tsx +50 -100
- package/src/lib/plugins/api-catalog/index.tsx +66 -15
- package/src/lib/plugins/api-keys/CreateApiKey.tsx +7 -3
- package/src/lib/plugins/markdown/MdxPage.tsx +15 -47
- package/src/lib/plugins/openapi/ColorizedParam.tsx +1 -1
- package/src/lib/plugins/openapi/Endpoint.tsx +1 -1
- package/src/lib/plugins/openapi/OperationList.tsx +171 -81
- package/src/lib/plugins/openapi/OperationListItem.tsx +118 -104
- package/src/lib/plugins/openapi/ParamInfos.tsx +87 -0
- package/src/lib/plugins/openapi/ParameterList.tsx +4 -0
- package/src/lib/plugins/openapi/ParameterListItem.tsx +35 -23
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +7 -0
- package/src/lib/plugins/openapi/SchemaList.tsx +151 -0
- package/src/lib/plugins/openapi/Sidecar.tsx +50 -13
- package/src/lib/plugins/openapi/SidecarExamples.tsx +1 -2
- package/src/lib/plugins/openapi/SimpleSelect.tsx +1 -1
- package/src/lib/plugins/openapi/client/GraphQLClient.tsx +1 -1
- package/src/lib/plugins/openapi/client/useCreateQuery.ts +13 -5
- package/src/lib/plugins/openapi/components/EnumValues.tsx +58 -0
- package/src/lib/plugins/openapi/components/SelectOnClick.tsx +29 -0
- package/src/lib/plugins/openapi/graphql/gql.ts +34 -17
- package/src/lib/plugins/openapi/graphql/graphql.ts +172 -86
- package/src/lib/plugins/openapi/index.tsx +55 -87
- package/src/lib/plugins/openapi/interfaces.ts +44 -15
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +30 -32
- package/src/lib/plugins/openapi/playground/Headers.tsx +0 -1
- package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +74 -0
- package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +54 -0
- package/src/lib/plugins/openapi/playground/PathParams.tsx +8 -2
- package/src/lib/plugins/openapi/playground/Playground.tsx +176 -89
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +0 -1
- package/src/lib/plugins/openapi/playground/RequestLoginDialog.tsx +51 -0
- package/src/lib/plugins/openapi/playground/rememberedIdentity.ts +26 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +25 -5
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +67 -45
- package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.tsx +1 -8
- package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.tsx +3 -0
- package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.tsx +6 -3
- package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +36 -0
- package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +47 -50
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +84 -138
- package/src/lib/plugins/openapi/schema/utils.ts +7 -1
- package/src/lib/plugins/openapi/state.ts +36 -0
- package/src/lib/plugins/openapi/util/createSidebarCategory.tsx +5 -7
- package/src/lib/plugins/openapi/util/getRoutes.tsx +9 -6
- package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +164 -0
- package/src/lib/plugins/search-pagefind/ResultList.tsx +105 -0
- package/src/lib/plugins/search-pagefind/get-results.tsx +75 -0
- package/src/lib/plugins/search-pagefind/index.tsx +21 -0
- package/src/lib/plugins/search-pagefind/types.ts +118 -0
- package/src/lib/ui/Button.tsx +4 -2
- package/src/lib/ui/Callout.tsx +28 -10
- package/src/lib/ui/Checkbox.tsx +8 -24
- package/src/lib/ui/Command.tsx +25 -3
- package/src/lib/ui/Select.tsx +1 -1
- package/src/lib/ui/Stepper.tsx +8 -0
- package/src/lib/ui/SyntaxHighlight.tsx +186 -0
- package/src/lib/ui/util.tsx +3 -0
- package/src/lib/util/MdxComponents.tsx +7 -4
- package/src/lib/util/joinPath.tsx +3 -0
- package/src/lib/util/traverse.ts +4 -8
- package/src/lib/util/types.ts +7 -0
- package/src/lib/util/useOnScreen.ts +6 -4
- package/src/lib/util/useScrollToAnchor.ts +30 -20
- package/dist/lib/components/SyntaxHighlight.d.ts +0 -12
- package/dist/lib/components/SyntaxHighlight.js +0 -53
- package/dist/lib/components/SyntaxHighlight.js.map +0 -1
- package/dist/lib/components/context/PluginSystem.js +0 -2
- package/dist/lib/components/context/PluginSystem.js.map +0 -1
- package/dist/lib/plugins/markdown/Toc.js.map +0 -1
- package/lib/Markdown-8mv9nhGd.js.map +0 -1
- package/lib/MdxPage-GM1T5jmO.js +0 -193
- package/lib/MdxPage-GM1T5jmO.js.map +0 -1
- package/lib/OperationList-BTmRbbXk.js +0 -5179
- package/lib/OperationList-BTmRbbXk.js.map +0 -1
- package/lib/SlotletProvider-D0mFmGJu.js +0 -221
- package/lib/SlotletProvider-D0mFmGJu.js.map +0 -1
- package/lib/Spinner-BlzrEEk1.js +0 -51
- package/lib/Spinner-BlzrEEk1.js.map +0 -1
- package/lib/SyntaxHighlight-B0L4SC_N.js.map +0 -1
- package/lib/chunk-SYFQ2XB5-QijJrSf0.js.map +0 -1
- package/lib/circular-DxaIIlWD.js.map +0 -1
- package/lib/context-rwLGh-6_.js +0 -22
- package/lib/createServer-DSQiPwjN.js.map +0 -1
- package/lib/hook-C_t2ISLC.js.map +0 -1
- package/lib/index-B7mqiOei.js +0 -509
- package/lib/index-B7mqiOei.js.map +0 -1
- package/lib/index-BANyVRgL.js +0 -2098
- package/lib/index-BANyVRgL.js.map +0 -1
- package/lib/index-Djenk2Hj.js +0 -36
- package/lib/index.esm-9-TF9KQB.js.map +0 -1
- package/lib/joinUrl-nLx9pD-Z.js +0 -20
- package/lib/joinUrl-nLx9pD-Z.js.map +0 -1
- package/lib/useScrollToAnchor-BGEcH3HM.js +0 -286
- package/lib/useScrollToAnchor-BGEcH3HM.js.map +0 -1
- package/src/lib/components/SyntaxHighlight.tsx +0 -171
- package/src/lib/components/context/PluginSystem.ts +0 -0
- /package/dist/lib/{plugins/markdown → components/navigation}/Toc.d.ts +0 -0
- /package/dist/lib/{components/context/PluginSystem.d.ts → hooks/useEvent.test.d.ts} +0 -0
|
@@ -35,6 +35,11 @@ export type Scalars = {
|
|
|
35
35
|
JSONSchema: { input: any; output: any };
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
+
export type Components = {
|
|
39
|
+
__typename?: "Components";
|
|
40
|
+
schemas?: Maybe<Array<SchemaItem>>;
|
|
41
|
+
};
|
|
42
|
+
|
|
38
43
|
export type EncodingItem = {
|
|
39
44
|
__typename?: "EncodingItem";
|
|
40
45
|
allowReserved?: Maybe<Scalars["Boolean"]["output"]>;
|
|
@@ -67,6 +72,7 @@ export type OperationItem = {
|
|
|
67
72
|
contentTypes: Array<Scalars["String"]["output"]>;
|
|
68
73
|
deprecated?: Maybe<Scalars["Boolean"]["output"]>;
|
|
69
74
|
description?: Maybe<Scalars["String"]["output"]>;
|
|
75
|
+
extensions?: Maybe<Scalars["JSONObject"]["output"]>;
|
|
70
76
|
method: Scalars["String"]["output"];
|
|
71
77
|
operationId?: Maybe<Scalars["String"]["output"]>;
|
|
72
78
|
parameters?: Maybe<Array<ParameterItem>>;
|
|
@@ -88,6 +94,7 @@ export type ParameterItem = {
|
|
|
88
94
|
description?: Maybe<Scalars["String"]["output"]>;
|
|
89
95
|
examples?: Maybe<Array<ExampleItem>>;
|
|
90
96
|
explode?: Maybe<Scalars["Boolean"]["output"]>;
|
|
97
|
+
extensions?: Maybe<Scalars["JSONObject"]["output"]>;
|
|
91
98
|
in: ParameterIn;
|
|
92
99
|
name: Scalars["String"]["output"];
|
|
93
100
|
required?: Maybe<Scalars["Boolean"]["output"]>;
|
|
@@ -122,6 +129,7 @@ export type ResponseItem = {
|
|
|
122
129
|
__typename?: "ResponseItem";
|
|
123
130
|
content?: Maybe<Array<MediaTypeObject>>;
|
|
124
131
|
description?: Maybe<Scalars["String"]["output"]>;
|
|
132
|
+
extensions?: Maybe<Scalars["JSONObject"]["output"]>;
|
|
125
133
|
headers?: Maybe<Scalars["JSON"]["output"]>;
|
|
126
134
|
links?: Maybe<Scalars["JSON"]["output"]>;
|
|
127
135
|
statusCode: Scalars["String"]["output"];
|
|
@@ -129,12 +137,15 @@ export type ResponseItem = {
|
|
|
129
137
|
|
|
130
138
|
export type Schema = {
|
|
131
139
|
__typename?: "Schema";
|
|
140
|
+
components?: Maybe<Components>;
|
|
132
141
|
description?: Maybe<Scalars["String"]["output"]>;
|
|
142
|
+
extensions?: Maybe<Scalars["JSONObject"]["output"]>;
|
|
133
143
|
openapi: Scalars["String"]["output"];
|
|
134
144
|
operations: Array<OperationItem>;
|
|
135
145
|
paths: Array<PathItem>;
|
|
136
146
|
servers: Array<Server>;
|
|
137
147
|
summary?: Maybe<Scalars["String"]["output"]>;
|
|
148
|
+
tag?: Maybe<SchemaTag>;
|
|
138
149
|
tags: Array<SchemaTag>;
|
|
139
150
|
title: Scalars["String"]["output"];
|
|
140
151
|
url?: Maybe<Scalars["String"]["output"]>;
|
|
@@ -149,15 +160,29 @@ export type SchemaOperationsArgs = {
|
|
|
149
160
|
untagged?: InputMaybe<Scalars["Boolean"]["input"]>;
|
|
150
161
|
};
|
|
151
162
|
|
|
152
|
-
export type
|
|
163
|
+
export type SchemaTagArgs = {
|
|
153
164
|
name?: InputMaybe<Scalars["String"]["input"]>;
|
|
165
|
+
slug?: InputMaybe<Scalars["String"]["input"]>;
|
|
166
|
+
untagged?: InputMaybe<Scalars["Boolean"]["input"]>;
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
export type SchemaItem = {
|
|
170
|
+
__typename?: "SchemaItem";
|
|
171
|
+
extensions?: Maybe<Scalars["JSONObject"]["output"]>;
|
|
172
|
+
name: Scalars["String"]["output"];
|
|
173
|
+
schema: Scalars["JSONSchema"]["output"];
|
|
154
174
|
};
|
|
155
175
|
|
|
156
176
|
export type SchemaTag = {
|
|
157
177
|
__typename?: "SchemaTag";
|
|
158
178
|
description?: Maybe<Scalars["String"]["output"]>;
|
|
159
|
-
|
|
179
|
+
extensions?: Maybe<Scalars["JSONObject"]["output"]>;
|
|
180
|
+
isUntagged: Scalars["Boolean"]["output"];
|
|
181
|
+
name?: Maybe<Scalars["String"]["output"]>;
|
|
182
|
+
next?: Maybe<SchemaTag>;
|
|
160
183
|
operations: Array<OperationItem>;
|
|
184
|
+
prev?: Maybe<SchemaTag>;
|
|
185
|
+
slug?: Maybe<Scalars["String"]["output"]>;
|
|
161
186
|
};
|
|
162
187
|
|
|
163
188
|
export type SchemaType = "file" | "raw" | "url";
|
|
@@ -171,6 +196,7 @@ export type Server = {
|
|
|
171
196
|
export type TagItem = {
|
|
172
197
|
__typename?: "TagItem";
|
|
173
198
|
description?: Maybe<Scalars["String"]["output"]>;
|
|
199
|
+
extensions?: Maybe<Scalars["JSONObject"]["output"]>;
|
|
174
200
|
name: Scalars["String"]["output"];
|
|
175
201
|
};
|
|
176
202
|
|
|
@@ -197,6 +223,8 @@ export type OperationsFragmentFragment = {
|
|
|
197
223
|
operationId?: string | null;
|
|
198
224
|
contentTypes: Array<string>;
|
|
199
225
|
path: string;
|
|
226
|
+
deprecated?: boolean | null;
|
|
227
|
+
extensions?: any | null;
|
|
200
228
|
parameters?: Array<{
|
|
201
229
|
__typename?: "ParameterItem";
|
|
202
230
|
name: string;
|
|
@@ -205,6 +233,7 @@ export type OperationsFragmentFragment = {
|
|
|
205
233
|
required?: boolean | null;
|
|
206
234
|
schema?: any | null;
|
|
207
235
|
style?: string | null;
|
|
236
|
+
explode?: boolean | null;
|
|
208
237
|
examples?: Array<{
|
|
209
238
|
__typename?: "ExampleItem";
|
|
210
239
|
name: string;
|
|
@@ -255,14 +284,24 @@ export type OperationsFragmentFragment = {
|
|
|
255
284
|
}>;
|
|
256
285
|
} & { " $fragmentName"?: "OperationsFragmentFragment" };
|
|
257
286
|
|
|
258
|
-
export type
|
|
287
|
+
export type SchemaWarmupQueryVariables = Exact<{
|
|
288
|
+
input: Scalars["JSON"]["input"];
|
|
289
|
+
type: SchemaType;
|
|
290
|
+
}>;
|
|
291
|
+
|
|
292
|
+
export type SchemaWarmupQuery = {
|
|
293
|
+
__typename?: "Query";
|
|
294
|
+
schema: { __typename?: "Schema"; openapi: string };
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
export type OperationsForTagQueryVariables = Exact<{
|
|
259
298
|
input: Scalars["JSON"]["input"];
|
|
260
299
|
type: SchemaType;
|
|
261
300
|
tag?: InputMaybe<Scalars["String"]["input"]>;
|
|
262
301
|
untagged?: InputMaybe<Scalars["Boolean"]["input"]>;
|
|
263
302
|
}>;
|
|
264
303
|
|
|
265
|
-
export type
|
|
304
|
+
export type OperationsForTagQuery = {
|
|
266
305
|
__typename?: "Query";
|
|
267
306
|
schema: {
|
|
268
307
|
__typename?: "Schema";
|
|
@@ -272,78 +311,96 @@ export type AllOperationsQuery = {
|
|
|
272
311
|
url?: string | null;
|
|
273
312
|
version: string;
|
|
274
313
|
servers: Array<{ __typename?: "Server"; url: string }>;
|
|
275
|
-
|
|
314
|
+
tag?: {
|
|
276
315
|
__typename?: "SchemaTag";
|
|
277
|
-
name
|
|
316
|
+
name?: string | null;
|
|
278
317
|
description?: string | null;
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
|
|
318
|
+
operations: Array<
|
|
319
|
+
{ __typename?: "OperationItem"; slug: string } & {
|
|
320
|
+
" $fragmentRefs"?: {
|
|
321
|
+
OperationsFragmentFragment: OperationsFragmentFragment;
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
>;
|
|
325
|
+
next?: {
|
|
326
|
+
__typename?: "SchemaTag";
|
|
327
|
+
name?: string | null;
|
|
328
|
+
slug?: string | null;
|
|
329
|
+
} | null;
|
|
330
|
+
prev?: {
|
|
331
|
+
__typename?: "SchemaTag";
|
|
332
|
+
name?: string | null;
|
|
333
|
+
slug?: string | null;
|
|
334
|
+
} | null;
|
|
335
|
+
} | null;
|
|
287
336
|
};
|
|
288
337
|
};
|
|
289
338
|
|
|
290
|
-
export type
|
|
339
|
+
export type GetSchemasQueryVariables = Exact<{
|
|
291
340
|
input: Scalars["JSON"]["input"];
|
|
292
341
|
type: SchemaType;
|
|
293
342
|
}>;
|
|
294
343
|
|
|
295
|
-
export type
|
|
344
|
+
export type GetSchemasQuery = {
|
|
296
345
|
__typename?: "Query";
|
|
297
346
|
schema: {
|
|
298
347
|
__typename?: "Schema";
|
|
299
|
-
|
|
300
|
-
|
|
348
|
+
title: string;
|
|
349
|
+
description?: string | null;
|
|
350
|
+
summary?: string | null;
|
|
351
|
+
components?: {
|
|
352
|
+
__typename?: "Components";
|
|
353
|
+
schemas?: Array<{
|
|
354
|
+
__typename?: "SchemaItem";
|
|
355
|
+
name: string;
|
|
356
|
+
schema: any;
|
|
357
|
+
extensions?: any | null;
|
|
358
|
+
}> | null;
|
|
359
|
+
} | null;
|
|
301
360
|
};
|
|
302
361
|
};
|
|
303
362
|
|
|
304
|
-
export type
|
|
363
|
+
export type GetServerQueryQueryVariables = Exact<{
|
|
305
364
|
input: Scalars["JSON"]["input"];
|
|
306
365
|
type: SchemaType;
|
|
307
366
|
}>;
|
|
308
367
|
|
|
309
|
-
export type
|
|
368
|
+
export type GetServerQueryQuery = {
|
|
310
369
|
__typename?: "Query";
|
|
311
370
|
schema: {
|
|
312
371
|
__typename?: "Schema";
|
|
313
372
|
url?: string | null;
|
|
314
|
-
|
|
373
|
+
servers: Array<{ __typename?: "Server"; url: string }>;
|
|
315
374
|
};
|
|
316
375
|
};
|
|
317
376
|
|
|
318
|
-
export type
|
|
377
|
+
export type GetSidebarOperationsQueryVariables = Exact<{
|
|
319
378
|
input: Scalars["JSON"]["input"];
|
|
320
379
|
type: SchemaType;
|
|
321
|
-
tag?: InputMaybe<Scalars["String"]["input"]>;
|
|
322
380
|
}>;
|
|
323
381
|
|
|
324
|
-
export type
|
|
382
|
+
export type GetSidebarOperationsQuery = {
|
|
325
383
|
__typename?: "Query";
|
|
326
384
|
schema: {
|
|
327
385
|
__typename?: "Schema";
|
|
328
|
-
|
|
329
|
-
__typename?: "
|
|
330
|
-
slug
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
deprecated?: boolean | null;
|
|
342
|
-
method: string;
|
|
343
|
-
summary?: string | null;
|
|
344
|
-
operationId?: string | null;
|
|
345
|
-
path: string;
|
|
386
|
+
tags: Array<{
|
|
387
|
+
__typename?: "SchemaTag";
|
|
388
|
+
slug?: string | null;
|
|
389
|
+
name?: string | null;
|
|
390
|
+
extensions?: any | null;
|
|
391
|
+
operations: Array<{
|
|
392
|
+
__typename?: "OperationItem";
|
|
393
|
+
summary?: string | null;
|
|
394
|
+
slug: string;
|
|
395
|
+
method: string;
|
|
396
|
+
operationId?: string | null;
|
|
397
|
+
path: string;
|
|
398
|
+
}>;
|
|
346
399
|
}>;
|
|
400
|
+
components?: {
|
|
401
|
+
__typename?: "Components";
|
|
402
|
+
schemas?: Array<{ __typename: "SchemaItem" }> | null;
|
|
403
|
+
} | null;
|
|
347
404
|
};
|
|
348
405
|
};
|
|
349
406
|
|
|
@@ -352,12 +409,13 @@ export class TypedDocumentString<TResult, TVariables>
|
|
|
352
409
|
implements DocumentTypeDecoration<TResult, TVariables>
|
|
353
410
|
{
|
|
354
411
|
__apiType?: DocumentTypeDecoration<TResult, TVariables>["__apiType"];
|
|
412
|
+
private value: string;
|
|
413
|
+
public __meta__?: Record<string, any> | undefined;
|
|
355
414
|
|
|
356
|
-
constructor(
|
|
357
|
-
private value: string,
|
|
358
|
-
public __meta__?: Record<string, any> | undefined,
|
|
359
|
-
) {
|
|
415
|
+
constructor(value: string, __meta__?: Record<string, any> | undefined) {
|
|
360
416
|
super(value);
|
|
417
|
+
this.value = value;
|
|
418
|
+
this.__meta__ = __meta__;
|
|
361
419
|
}
|
|
362
420
|
|
|
363
421
|
toString(): string & DocumentTypeDecoration<TResult, TVariables> {
|
|
@@ -374,6 +432,8 @@ export const OperationsFragmentFragmentDoc = new TypedDocumentString(
|
|
|
374
432
|
operationId
|
|
375
433
|
contentTypes
|
|
376
434
|
path
|
|
435
|
+
deprecated
|
|
436
|
+
extensions
|
|
377
437
|
parameters {
|
|
378
438
|
name
|
|
379
439
|
in
|
|
@@ -381,6 +441,7 @@ export const OperationsFragmentFragmentDoc = new TypedDocumentString(
|
|
|
381
441
|
required
|
|
382
442
|
schema
|
|
383
443
|
style
|
|
444
|
+
explode
|
|
384
445
|
examples {
|
|
385
446
|
name
|
|
386
447
|
description
|
|
@@ -443,8 +504,18 @@ export const ServersQueryDocument = new TypedDocumentString(`
|
|
|
443
504
|
ServersQueryQuery,
|
|
444
505
|
ServersQueryQueryVariables
|
|
445
506
|
>;
|
|
446
|
-
export const
|
|
447
|
-
query
|
|
507
|
+
export const SchemaWarmupDocument = new TypedDocumentString(`
|
|
508
|
+
query SchemaWarmup($input: JSON!, $type: SchemaType!) {
|
|
509
|
+
schema(input: $input, type: $type) {
|
|
510
|
+
openapi
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
`) as unknown as TypedDocumentString<
|
|
514
|
+
SchemaWarmupQuery,
|
|
515
|
+
SchemaWarmupQueryVariables
|
|
516
|
+
>;
|
|
517
|
+
export const OperationsForTagDocument = new TypedDocumentString(`
|
|
518
|
+
query OperationsForTag($input: JSON!, $type: SchemaType!, $tag: String, $untagged: Boolean) {
|
|
448
519
|
schema(input: $input, type: $type) {
|
|
449
520
|
servers {
|
|
450
521
|
url
|
|
@@ -454,13 +525,21 @@ export const AllOperationsDocument = new TypedDocumentString(`
|
|
|
454
525
|
title
|
|
455
526
|
url
|
|
456
527
|
version
|
|
457
|
-
|
|
528
|
+
tag(slug: $tag, untagged: $untagged) {
|
|
458
529
|
name
|
|
459
530
|
description
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
531
|
+
operations {
|
|
532
|
+
slug
|
|
533
|
+
...OperationsFragment
|
|
534
|
+
}
|
|
535
|
+
next {
|
|
536
|
+
name
|
|
537
|
+
slug
|
|
538
|
+
}
|
|
539
|
+
prev {
|
|
540
|
+
name
|
|
541
|
+
slug
|
|
542
|
+
}
|
|
464
543
|
}
|
|
465
544
|
}
|
|
466
545
|
}
|
|
@@ -472,6 +551,8 @@ export const AllOperationsDocument = new TypedDocumentString(`
|
|
|
472
551
|
operationId
|
|
473
552
|
contentTypes
|
|
474
553
|
path
|
|
554
|
+
deprecated
|
|
555
|
+
extensions
|
|
475
556
|
parameters {
|
|
476
557
|
name
|
|
477
558
|
in
|
|
@@ -479,6 +560,7 @@ export const AllOperationsDocument = new TypedDocumentString(`
|
|
|
479
560
|
required
|
|
480
561
|
schema
|
|
481
562
|
style
|
|
563
|
+
explode
|
|
482
564
|
examples {
|
|
483
565
|
name
|
|
484
566
|
description
|
|
@@ -525,8 +607,27 @@ export const AllOperationsDocument = new TypedDocumentString(`
|
|
|
525
607
|
}
|
|
526
608
|
}
|
|
527
609
|
}`) as unknown as TypedDocumentString<
|
|
528
|
-
|
|
529
|
-
|
|
610
|
+
OperationsForTagQuery,
|
|
611
|
+
OperationsForTagQueryVariables
|
|
612
|
+
>;
|
|
613
|
+
export const GetSchemasDocument = new TypedDocumentString(`
|
|
614
|
+
query GetSchemas($input: JSON!, $type: SchemaType!) {
|
|
615
|
+
schema(input: $input, type: $type) {
|
|
616
|
+
title
|
|
617
|
+
description
|
|
618
|
+
summary
|
|
619
|
+
components {
|
|
620
|
+
schemas {
|
|
621
|
+
name
|
|
622
|
+
schema
|
|
623
|
+
extensions
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
`) as unknown as TypedDocumentString<
|
|
629
|
+
GetSchemasQuery,
|
|
630
|
+
GetSchemasQueryVariables
|
|
530
631
|
>;
|
|
531
632
|
export const GetServerQueryDocument = new TypedDocumentString(`
|
|
532
633
|
query getServerQuery($input: JSON!, $type: SchemaType!) {
|
|
@@ -541,44 +642,29 @@ export const GetServerQueryDocument = new TypedDocumentString(`
|
|
|
541
642
|
GetServerQueryQuery,
|
|
542
643
|
GetServerQueryQueryVariables
|
|
543
644
|
>;
|
|
544
|
-
export const
|
|
545
|
-
query
|
|
645
|
+
export const GetSidebarOperationsDocument = new TypedDocumentString(`
|
|
646
|
+
query GetSidebarOperations($input: JSON!, $type: SchemaType!) {
|
|
546
647
|
schema(input: $input, type: $type) {
|
|
547
|
-
url
|
|
548
648
|
tags {
|
|
549
|
-
name
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
`) as unknown as TypedDocumentString<
|
|
554
|
-
GetCategoriesQuery,
|
|
555
|
-
GetCategoriesQueryVariables
|
|
556
|
-
>;
|
|
557
|
-
export const GetOperationsDocument = new TypedDocumentString(`
|
|
558
|
-
query GetOperations($input: JSON!, $type: SchemaType!, $tag: String) {
|
|
559
|
-
schema(input: $input, type: $type) {
|
|
560
|
-
operations(tag: $tag) {
|
|
561
649
|
slug
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
650
|
+
name
|
|
651
|
+
extensions
|
|
652
|
+
operations {
|
|
653
|
+
summary
|
|
654
|
+
slug
|
|
655
|
+
method
|
|
656
|
+
operationId
|
|
657
|
+
path
|
|
569
658
|
}
|
|
570
659
|
}
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
summary
|
|
576
|
-
operationId
|
|
577
|
-
path
|
|
660
|
+
components {
|
|
661
|
+
schemas {
|
|
662
|
+
__typename
|
|
663
|
+
}
|
|
578
664
|
}
|
|
579
665
|
}
|
|
580
666
|
}
|
|
581
667
|
`) as unknown as TypedDocumentString<
|
|
582
|
-
|
|
583
|
-
|
|
668
|
+
GetSidebarOperationsQuery,
|
|
669
|
+
GetSidebarOperationsQueryVariables
|
|
584
670
|
>;
|
|
@@ -1,69 +1,51 @@
|
|
|
1
|
-
import type { ResultOf } from "@graphql-typed-document-node/core";
|
|
2
|
-
import slugify from "@sindresorhus/slugify";
|
|
3
1
|
import { CirclePlayIcon, LogInIcon } from "lucide-react";
|
|
4
|
-
import { ReactNode } from "react";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
5
3
|
import { matchPath } from "react-router";
|
|
6
4
|
import { useAuth } from "../../authentication/hook.js";
|
|
7
5
|
import { type ZudokuPlugin } from "../../core/plugins.js";
|
|
8
|
-
import type { SchemaImports } from "../../oas/graphql/index.js";
|
|
9
6
|
import { Button } from "../../ui/Button.js";
|
|
10
7
|
import { joinUrl } from "../../util/joinUrl.js";
|
|
11
8
|
import { GraphQLClient } from "./client/GraphQLClient.js";
|
|
9
|
+
import type { GetSidebarOperationsQuery } from "./graphql/graphql.js";
|
|
12
10
|
import { graphql } from "./graphql/index.js";
|
|
13
|
-
import { OasPluginConfig } from "./interfaces.js";
|
|
11
|
+
import { type OasPluginConfig } from "./interfaces.js";
|
|
14
12
|
import type { PlaygroundContentProps } from "./playground/Playground.js";
|
|
15
13
|
import { PlaygroundDialog } from "./playground/PlaygroundDialog.js";
|
|
16
14
|
import { createSidebarCategory } from "./util/createSidebarCategory.js";
|
|
17
15
|
import { getRoutes, getVersions } from "./util/getRoutes.js";
|
|
18
16
|
|
|
19
|
-
const
|
|
20
|
-
query
|
|
17
|
+
const GetSidebarOperationsQuery = graphql(`
|
|
18
|
+
query GetSidebarOperations($input: JSON!, $type: SchemaType!) {
|
|
21
19
|
schema(input: $input, type: $type) {
|
|
22
|
-
url
|
|
23
20
|
tags {
|
|
24
|
-
name
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
`);
|
|
29
|
-
|
|
30
|
-
const GetOperationsQuery = graphql(`
|
|
31
|
-
query GetOperations($input: JSON!, $type: SchemaType!, $tag: String) {
|
|
32
|
-
schema(input: $input, type: $type) {
|
|
33
|
-
operations(tag: $tag) {
|
|
34
21
|
slug
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
22
|
+
name
|
|
23
|
+
extensions
|
|
24
|
+
operations {
|
|
25
|
+
summary
|
|
26
|
+
slug
|
|
27
|
+
method
|
|
28
|
+
operationId
|
|
29
|
+
path
|
|
42
30
|
}
|
|
43
31
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
summary
|
|
49
|
-
operationId
|
|
50
|
-
path
|
|
32
|
+
components {
|
|
33
|
+
schemas {
|
|
34
|
+
__typename
|
|
35
|
+
}
|
|
51
36
|
}
|
|
52
37
|
}
|
|
53
38
|
}
|
|
54
39
|
`);
|
|
55
40
|
|
|
56
|
-
export type OperationResult =
|
|
57
|
-
|
|
58
|
-
>["schema"]["operations"][number];
|
|
41
|
+
export type OperationResult =
|
|
42
|
+
GetSidebarOperationsQuery["schema"]["tags"][number]["operations"][number];
|
|
59
43
|
|
|
60
|
-
type
|
|
61
|
-
|
|
62
|
-
export type OpenApiPluginOptions = OasPluginConfig & InternalOasPluginConfig;
|
|
44
|
+
export type OpenApiPluginOptions = OasPluginConfig;
|
|
63
45
|
|
|
64
46
|
export const UNTAGGED_PATH = "~endpoints";
|
|
65
47
|
|
|
66
|
-
export const openApiPlugin = (config:
|
|
48
|
+
export const openApiPlugin = (config: OasPluginConfig): ZudokuPlugin => {
|
|
67
49
|
const basePath = joinUrl(config.navigationId ?? "/reference");
|
|
68
50
|
const client = new GraphQLClient(config);
|
|
69
51
|
|
|
@@ -134,7 +116,7 @@ export const openApiPlugin = (config: OpenApiPluginOptions): ZudokuPlugin => {
|
|
|
134
116
|
);
|
|
135
117
|
},
|
|
136
118
|
}),
|
|
137
|
-
getSidebar: async (path
|
|
119
|
+
getSidebar: async (path, context) => {
|
|
138
120
|
if (!matchPath({ path: basePath, end: false }, path)) {
|
|
139
121
|
return [];
|
|
140
122
|
}
|
|
@@ -147,72 +129,58 @@ export const openApiPlugin = (config: OpenApiPluginOptions): ZudokuPlugin => {
|
|
|
147
129
|
try {
|
|
148
130
|
const versionParam = match?.params.version;
|
|
149
131
|
const version = versionParam ?? getVersions(config).at(0);
|
|
150
|
-
const type = config
|
|
151
|
-
const input =
|
|
152
|
-
config.type === "file" ? config.input[version!] : config.input;
|
|
153
|
-
|
|
154
|
-
const collapsible = config.loadTags === true || config.type === "url";
|
|
155
|
-
const collapsed = !config.loadTags && config.type !== "url";
|
|
132
|
+
const { type } = config;
|
|
133
|
+
const input = type === "file" ? config.input[version!] : config.input;
|
|
156
134
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
(
|
|
160
|
-
|
|
135
|
+
const data = await context.queryClient.ensureQueryData({
|
|
136
|
+
queryKey: ["sidebar-operations-query", input],
|
|
137
|
+
queryFn: () =>
|
|
138
|
+
client.fetch(GetSidebarOperationsQuery, { type, input }),
|
|
139
|
+
});
|
|
161
140
|
|
|
162
|
-
const
|
|
163
|
-
|
|
164
|
-
client.fetch(GetOperationsQuery, {
|
|
165
|
-
type,
|
|
166
|
-
input,
|
|
167
|
-
tag: !config.loadTags ? tagName : undefined,
|
|
168
|
-
}),
|
|
169
|
-
]);
|
|
170
|
-
|
|
171
|
-
const categories = tagData.schema.tags.flatMap((tag) => {
|
|
172
|
-
const categoryPath = joinUrl(
|
|
173
|
-
basePath,
|
|
174
|
-
versionParam,
|
|
175
|
-
slugify(tag.name),
|
|
176
|
-
);
|
|
141
|
+
const categories = data.schema.tags.flatMap((tag) => {
|
|
142
|
+
if (!tag.name || tag.operations.length === 0) return [];
|
|
177
143
|
|
|
178
|
-
const
|
|
179
|
-
(operation) =>
|
|
180
|
-
operation.tags?.length !== 0 &&
|
|
181
|
-
operation.tags?.map((t) => t.name).includes(tag.name),
|
|
182
|
-
);
|
|
144
|
+
const categoryPath = joinUrl(basePath, versionParam, tag.slug);
|
|
183
145
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
146
|
+
const isCollapsed =
|
|
147
|
+
tag.extensions?.["x-zudoku-collapsed"] ??
|
|
148
|
+
!config.options?.expandAllTags;
|
|
149
|
+
const isCollapsible =
|
|
150
|
+
tag.extensions?.["x-zudoku-collapsible"] ?? true;
|
|
188
151
|
|
|
189
152
|
return createSidebarCategory({
|
|
190
153
|
label: tag.name,
|
|
191
154
|
path: categoryPath,
|
|
192
|
-
operations:
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
: [],
|
|
196
|
-
collapsible,
|
|
197
|
-
collapsed,
|
|
155
|
+
operations: tag.operations,
|
|
156
|
+
collapsed: isCollapsed,
|
|
157
|
+
collapsible: isCollapsible,
|
|
198
158
|
});
|
|
199
159
|
});
|
|
200
160
|
|
|
201
|
-
|
|
161
|
+
const untaggedOperations = data.schema.tags.find(
|
|
162
|
+
(tag) => !tag.name,
|
|
163
|
+
)?.operations;
|
|
164
|
+
|
|
165
|
+
if (untaggedOperations) {
|
|
202
166
|
categories.push(
|
|
203
167
|
createSidebarCategory({
|
|
204
168
|
label: "Other endpoints",
|
|
205
169
|
path: joinUrl(basePath, versionParam, UNTAGGED_PATH),
|
|
206
|
-
operations:
|
|
207
|
-
|
|
208
|
-
? operationsData.schema.untagged
|
|
209
|
-
: [],
|
|
210
|
-
collapsible,
|
|
211
|
-
collapsed,
|
|
170
|
+
operations: untaggedOperations,
|
|
171
|
+
collapsed: !config.options?.expandAllTags,
|
|
212
172
|
}),
|
|
213
173
|
);
|
|
214
174
|
}
|
|
215
175
|
|
|
176
|
+
if (data.schema.components?.schemas?.length) {
|
|
177
|
+
categories.push({
|
|
178
|
+
type: "link" as const,
|
|
179
|
+
label: "Schemas",
|
|
180
|
+
href: joinUrl(basePath, versionParam, "~schemas"),
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
|
|
216
184
|
return categories;
|
|
217
185
|
} catch {
|
|
218
186
|
return [];
|