zudoku 0.0.0-fix-image-base-path.c9e0e61c → 0.0.0-fix-create-zudoku-copy-templates.1ca222e6
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 +1 -0
- package/dist/app/ZuploBuildConfig.d.ts +1 -1
- package/dist/app/ZuploBuildConfig.js +1 -1
- package/dist/app/ZuploBuildConfig.js.map +1 -1
- package/dist/app/demo.js +1 -1
- package/dist/app/entry.client.js +6 -5
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/entry.server.js +3 -3
- package/dist/app/entry.server.js.map +1 -1
- package/dist/app/env.js +6 -6
- package/dist/app/env.js.map +1 -1
- package/dist/app/main.js +12 -4
- package/dist/app/main.js.map +1 -1
- package/dist/app/standalone.js +5 -2
- package/dist/app/standalone.js.map +1 -1
- package/dist/cli/cli.js +2 -1
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/cmds/build.d.ts +1 -1
- package/dist/cli/cmds/dev.d.ts +1 -1
- package/dist/cli/cmds/preview.d.ts +1 -1
- package/dist/cli/common/analytics/lib.js +1 -1
- package/dist/cli/common/analytics/lib.js.map +1 -1
- package/dist/cli/common/logger.js +0 -1
- package/dist/cli/common/logger.js.map +1 -1
- package/dist/cli/common/machine-id/lib.js +3 -2
- package/dist/cli/common/machine-id/lib.js.map +1 -1
- package/dist/cli/common/outdated.js +2 -1
- package/dist/cli/common/outdated.js.map +1 -1
- package/dist/cli/common/output.js +2 -3
- package/dist/cli/common/output.js.map +1 -1
- package/dist/cli/common/utils/box.js +2 -2
- package/dist/cli/common/utils/box.js.map +1 -1
- package/dist/cli/common/validators/lib.js +1 -1
- package/dist/cli/common/validators/lib.js.map +1 -1
- package/dist/cli/dev/handler.js +0 -4
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/codegen.js +2 -2
- package/dist/codegen.js.map +1 -1
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/BuildSchema.d.ts +1 -1
- package/dist/config/validators/BuildSchema.js +3 -3
- package/dist/config/validators/BuildSchema.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.d.ts +27 -1
- package/dist/config/validators/InputNavigationSchema.js +5 -2
- package/dist/config/validators/InputNavigationSchema.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.test-d.js +2 -1
- package/dist/config/validators/InputNavigationSchema.test-d.js.map +1 -1
- package/dist/config/validators/NavigationSchema.d.ts +1 -1
- package/dist/config/validators/NavigationSchema.js +2 -2
- package/dist/config/validators/NavigationSchema.js.map +1 -1
- package/dist/config/validators/ProtectedRoutesSchema.d.ts +6 -5
- package/dist/config/validators/ProtectedRoutesSchema.js +5 -14
- package/dist/config/validators/ProtectedRoutesSchema.js.map +1 -1
- package/dist/config/validators/auth.d.ts +2 -2
- package/dist/config/validators/auth.js +1 -1
- package/dist/config/validators/auth.js.map +1 -1
- package/dist/config/validators/icon-types.d.ts +1 -1
- package/dist/config/validators/icon-types.js +4 -0
- package/dist/config/validators/icon-types.js.map +1 -1
- package/dist/config/validators/validate.d.ts +3 -14
- package/dist/config/validators/validate.js +4 -3
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/config/validators/validate.test.js +1 -2
- package/dist/config/validators/validate.test.js.map +1 -1
- package/dist/flat-config.d.ts +331 -0
- package/dist/index.d.ts +6 -5
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/MissingIcon.d.ts +1 -1
- package/dist/lib/MissingIcon.js.map +1 -1
- package/dist/lib/auth/issuer.test.js +1 -0
- package/dist/lib/auth/issuer.test.js.map +1 -1
- package/dist/lib/authentication/AuthenticationPlugin.d.ts +1 -1
- package/dist/lib/authentication/authentication.d.ts +1 -3
- package/dist/lib/authentication/components/OAuthErrorPage.d.ts +1 -1
- package/dist/lib/authentication/components/OAuthErrorPage.js.map +1 -1
- package/dist/lib/authentication/components/SignOut.js +1 -1
- package/dist/lib/authentication/components/SignOut.js.map +1 -1
- package/dist/lib/authentication/providers/auth0.d.ts +2 -2
- package/dist/lib/authentication/providers/auth0.js +1 -1
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/azureb2c.d.ts +2 -2
- package/dist/lib/authentication/providers/azureb2c.js.map +1 -1
- package/dist/lib/authentication/providers/clerk.d.ts +2 -2
- package/dist/lib/authentication/providers/openid.d.ts +2 -2
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/authentication/providers/supabase.d.ts +2 -2
- package/dist/lib/authentication/providers/supabase.js +1 -0
- package/dist/lib/authentication/providers/supabase.js.map +1 -1
- package/dist/lib/authentication/use-broadcast/shared.d.ts +1 -1
- package/dist/lib/authentication/use-broadcast/shared.js +3 -3
- package/dist/lib/authentication/use-broadcast/shared.js.map +1 -1
- package/dist/lib/authentication/use-broadcast/useBroadcast.js +2 -2
- package/dist/lib/authentication/use-broadcast/useBroadcast.js.map +1 -1
- package/dist/lib/components/Autocomplete.js.map +1 -1
- package/dist/lib/components/Bootstrap.js.map +1 -1
- package/dist/lib/components/BuildCheck.js +9 -1
- package/dist/lib/components/BuildCheck.js.map +1 -1
- package/dist/lib/components/Header.js +2 -4
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +1 -1
- package/dist/lib/components/Heading.js +1 -1
- package/dist/lib/components/Heading.js.map +1 -1
- package/dist/lib/components/Layout.js +4 -7
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/Markdown.js +2 -2
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/Meta.d.ts +2 -0
- package/dist/lib/components/Meta.js +11 -0
- package/dist/lib/components/Meta.js.map +1 -0
- package/dist/lib/components/MobileTopNavigation.js +4 -4
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/PathRenderer.js +1 -1
- package/dist/lib/components/PathRenderer.js.map +1 -1
- package/dist/lib/components/Search.js +1 -1
- package/dist/lib/components/Search.js.map +1 -1
- package/dist/lib/components/Slot.js.map +1 -1
- package/dist/lib/components/Slot.test.js +7 -3
- package/dist/lib/components/Slot.test.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +1 -1
- package/dist/lib/components/TopNavigation.js +2 -2
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Zudoku.js +2 -2
- package/dist/lib/components/Zudoku.js.map +1 -1
- package/dist/lib/components/context/ComponentsContext.js.map +1 -1
- package/dist/lib/components/context/RouterEventsEmitter.js.map +1 -1
- package/dist/lib/components/context/SlotProvider.js.map +1 -1
- package/dist/lib/components/context/ViewportAnchorContext.js +1 -1
- package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.d.ts +1 -1
- package/dist/lib/components/context/ZudokuProvider.d.ts +1 -1
- package/dist/lib/components/index.d.ts +0 -28
- package/dist/lib/components/index.js +1 -16
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/NavigationCategory.js +6 -1
- package/dist/lib/components/navigation/NavigationCategory.js.map +1 -1
- package/dist/lib/components/navigation/NavigationItem.js +2 -2
- package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
- package/dist/lib/components/navigation/NavigationWrapper.js.map +1 -1
- package/dist/lib/components/navigation/Toc.js.map +1 -1
- package/dist/lib/components/navigation/ZudokuLogo.d.ts +1 -1
- package/dist/lib/components/navigation/utils.d.ts +3 -3
- package/dist/lib/components/navigation/utils.js +1 -2
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +4 -2
- package/dist/lib/core/ZudokuContext.js +14 -3
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/__internal.d.ts +37 -0
- package/dist/lib/core/__internal.js +26 -0
- package/dist/lib/core/__internal.js.map +1 -0
- package/dist/lib/core/router.d.ts +1 -0
- package/dist/lib/core/router.js +2 -0
- package/dist/lib/core/router.js.map +1 -0
- package/dist/lib/errors/ErrorAlert.js +0 -1
- package/dist/lib/errors/ErrorAlert.js.map +1 -1
- package/dist/lib/errors/TopLevelError.d.ts +2 -2
- package/dist/lib/errors/TopLevelError.js +1 -2
- package/dist/lib/errors/TopLevelError.js.map +1 -1
- package/dist/lib/oas/graphql/circular.js +2 -2
- package/dist/lib/oas/graphql/circular.js.map +1 -1
- package/dist/lib/oas/graphql/index.js +2 -1
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/oas/parser/dereference/index.js +2 -1
- package/dist/lib/oas/parser/dereference/index.js.map +1 -1
- package/dist/lib/oas/parser/dereference/resolveRef.js +3 -3
- package/dist/lib/oas/parser/dereference/resolveRef.js.map +1 -1
- package/dist/lib/oas/parser/index.js +1 -1
- package/dist/lib/oas/parser/index.js.map +1 -1
- package/dist/lib/oas/parser/upgrade/index.js +2 -1
- package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.d.ts +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.d.ts +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +5 -6
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.d.ts +3 -3
- package/dist/lib/plugins/api-keys/index.js +1 -1
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/custom-pages/index.d.ts +1 -1
- package/dist/lib/plugins/custom-pages/index.js +3 -0
- package/dist/lib/plugins/custom-pages/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.d.ts +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +3 -3
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +1 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js +4 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
- package/dist/lib/plugins/openapi/Endpoint.js +2 -2
- package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
- package/dist/lib/plugins/openapi/OasProvider.d.ts +1 -1
- package/dist/lib/plugins/openapi/OasProvider.js +1 -0
- package/dist/lib/plugins/openapi/OasProvider.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.d.ts +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +8 -4
- 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 +6 -4
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParamInfos.d.ts +1 -1
- package/dist/lib/plugins/openapi/ParamInfos.js +11 -9
- package/dist/lib/plugins/openapi/ParamInfos.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/PlaygroundDialogWrapper.d.ts +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +2 -2
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +4 -2
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/StaggeredRender.d.ts +1 -1
- package/dist/lib/plugins/openapi/client/GraphQLContext.d.ts +1 -1
- package/dist/lib/plugins/openapi/client/createServer.js +1 -2
- package/dist/lib/plugins/openapi/client/createServer.js.map +1 -1
- package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
- package/dist/lib/plugins/openapi/context.d.ts +1 -1
- package/dist/lib/plugins/openapi/graphql/fragment-masking.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js +0 -1
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.d.ts +2 -2
- package/dist/lib/plugins/openapi/index.js +2 -1
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +3 -3
- package/dist/lib/plugins/openapi/playground/BodyPanel.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/IdentityDialog.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/IdentitySelector.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js +3 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js.map +1 -1
- package/dist/lib/plugins/openapi/processors/removeExtensions.test.js +1 -0
- package/dist/lib/plugins/openapi/processors/removeExtensions.test.js.map +1 -1
- package/dist/lib/plugins/openapi/processors/removeParameters.test.js +1 -0
- package/dist/lib/plugins/openapi/processors/removeParameters.test.js.map +1 -1
- package/dist/lib/plugins/openapi/processors/traverse.d.ts +1 -1
- package/dist/lib/plugins/openapi/processors/traverse.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.d.ts +5 -0
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.js +7 -0
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/{LogicalGroup/LogicalGroupItem.d.ts → AllOfGroup/AllOfGroupItem.d.ts} +1 -3
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.js +10 -0
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.d.ts +4 -0
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.js +16 -0
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.d.ts +0 -3
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +7 -15
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +2 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js +13 -8
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/UnionView.d.ts +4 -0
- package/dist/lib/plugins/openapi/schema/UnionView.js +30 -0
- package/dist/lib/plugins/openapi/schema/UnionView.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/union-helpers.d.ts +28 -0
- package/dist/lib/plugins/openapi/schema/union-helpers.js +48 -0
- package/dist/lib/plugins/openapi/schema/union-helpers.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/utils.d.ts +0 -7
- package/dist/lib/plugins/openapi/schema/utils.js +0 -6
- package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
- package/dist/lib/plugins/openapi/util/createHttpSnippet.d.ts +1 -1
- package/dist/lib/plugins/openapi/util/createHttpSnippet.js +1 -1
- package/dist/lib/plugins/openapi/util/createHttpSnippet.js.map +1 -1
- package/dist/lib/plugins/openapi/util/createNavigationCategory.js +1 -0
- package/dist/lib/plugins/openapi/util/createNavigationCategory.js.map +1 -1
- package/dist/lib/plugins/openapi/util/generateSchemaExample.d.ts +1 -1
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js +1 -2
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
- package/dist/lib/plugins/openapi/util/getRoutes.js +1 -1
- package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
- package/dist/lib/plugins/openapi/util/methodColorMap.d.ts +1 -1
- package/dist/lib/plugins/search-inkeep/index.js +1 -1
- package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js +1 -1
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/ResultList.d.ts +1 -1
- package/dist/lib/plugins/search-pagefind/ResultList.js +4 -1
- package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/get-results.js +0 -1
- package/dist/lib/plugins/search-pagefind/get-results.js.map +1 -1
- package/dist/lib/shiki.d.ts +2 -5
- package/dist/lib/shiki.js +3 -6
- package/dist/lib/shiki.js.map +1 -1
- package/dist/lib/ui/Breadcrumb.js +1 -1
- package/dist/lib/ui/Breadcrumb.js.map +1 -1
- package/dist/lib/ui/Carousel.js.map +1 -1
- package/dist/lib/ui/CodeBlock.js +3 -3
- package/dist/lib/ui/CodeBlock.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +2 -2
- package/dist/lib/ui/Command.js +2 -6
- package/dist/lib/ui/Command.js.map +1 -1
- package/dist/lib/ui/Dialog.js +2 -2
- package/dist/lib/ui/Dialog.js.map +1 -1
- package/dist/lib/ui/Form.d.ts +2 -2
- package/dist/lib/ui/Pagination.d.ts +1 -1
- package/dist/lib/ui/Pagination.js +1 -1
- package/dist/lib/ui/Pagination.js.map +1 -1
- package/dist/lib/ui/ToggleGroup.d.ts +1 -1
- package/dist/lib/util/MdxComponents.d.ts +1 -1
- package/dist/lib/util/MdxComponents.js +4 -2
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/cn.js.map +1 -1
- package/dist/lib/util/createVariantComponent.d.ts +2 -2
- package/dist/lib/util/createVariantComponent.js.map +1 -1
- package/dist/lib/util/groupBy.js +1 -0
- package/dist/lib/util/groupBy.js.map +1 -1
- package/dist/lib/util/humanFileSize.js +1 -1
- package/dist/lib/util/humanFileSize.js.map +1 -1
- package/dist/lib/util/invariant.js +3 -1
- package/dist/lib/util/invariant.js.map +1 -1
- package/dist/lib/util/pastellize.js +2 -2
- package/dist/lib/util/pastellize.js.map +1 -1
- package/dist/lib/util/useIsomorphicLayoutEffect.js.map +1 -1
- package/dist/lib/util/useScrollToAnchor.js +2 -0
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/ts.js +3 -3
- package/dist/ts.js.map +1 -1
- package/dist/vite/api/SchemaManager.js +6 -6
- package/dist/vite/api/SchemaManager.js.map +1 -1
- package/dist/vite/api/schema-codegen.js +1 -2
- package/dist/vite/api/schema-codegen.js.map +1 -1
- package/dist/vite/api/schema-codegen.test.js +1 -1
- package/dist/vite/api/schema-codegen.test.js.map +1 -1
- package/dist/vite/build.js +1 -1
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/dev-server.js +2 -2
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/error-handler.d.ts +2 -2
- package/dist/vite/error-handler.js.map +1 -1
- package/dist/vite/mdx/remark-inject-filepath.js.map +1 -1
- package/dist/vite/mdx/remark-last-modified.js +0 -1
- package/dist/vite/mdx/remark-last-modified.js.map +1 -1
- package/dist/vite/mdx/remark-link-rewrite.js +1 -1
- package/dist/vite/mdx/remark-link-rewrite.js.map +1 -1
- package/dist/vite/mdx/remark-static-generation.js +1 -1
- package/dist/vite/mdx/remark-static-generation.js.map +1 -1
- package/dist/vite/output.d.ts +1 -1
- package/dist/vite/output.js +1 -1
- package/dist/vite/output.js.map +1 -1
- package/dist/vite/plugin-api-keys.d.ts +1 -1
- package/dist/vite/plugin-api-keys.js +1 -1
- package/dist/vite/plugin-api-keys.js.map +1 -1
- package/dist/vite/plugin-api.js +4 -4
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.d.ts +1 -1
- package/dist/vite/plugin-auth.js +1 -1
- package/dist/vite/plugin-auth.js.map +1 -1
- package/dist/vite/plugin-component.d.ts +1 -1
- package/dist/vite/plugin-config-reload.d.ts +1 -1
- package/dist/vite/plugin-custom-pages.d.ts +1 -1
- package/dist/vite/plugin-custom-pages.js +1 -1
- package/dist/vite/plugin-custom-pages.js.map +1 -1
- package/dist/vite/plugin-docs.js +2 -2
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-frontmatter.js +1 -1
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-mdx.d.ts +1 -1
- package/dist/vite/plugin-mdx.js +3 -2
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-metadata.d.ts +1 -1
- package/dist/vite/plugin-navigation.d.ts +2 -2
- package/dist/vite/plugin-navigation.js +34 -35
- package/dist/vite/plugin-navigation.js.map +1 -1
- package/dist/vite/plugin-redirect.d.ts +1 -1
- package/dist/vite/plugin-redirect.js +1 -1
- package/dist/vite/plugin-redirect.js.map +1 -1
- package/dist/vite/plugin-search.d.ts +1 -1
- package/dist/vite/plugin-search.js +1 -1
- package/dist/vite/plugin-search.js.map +1 -1
- package/dist/vite/plugin-shiki-register.js +1 -1
- package/dist/vite/plugin-shiki-register.js.map +1 -1
- package/dist/vite/plugin-theme.js +6 -6
- package/dist/vite/plugin-theme.js.map +1 -1
- package/dist/vite/plugin-theme.test.js +2 -0
- package/dist/vite/plugin-theme.test.js.map +1 -1
- package/dist/vite/plugin.d.ts +1 -1
- package/dist/vite/plugin.js +2 -2
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender/FileWritingResponse.js +5 -3
- package/dist/vite/prerender/FileWritingResponse.js.map +1 -1
- package/dist/vite/prerender/InMemoryResponse.js +3 -1
- package/dist/vite/prerender/InMemoryResponse.js.map +1 -1
- package/dist/vite/prerender/prerender.js +1 -1
- package/dist/vite/prerender/prerender.js.map +1 -1
- package/dist/vite/prerender/worker.d.ts +1 -1
- package/dist/vite/prerender/worker.js.map +1 -1
- package/dist/vite/reporter.js +2 -2
- package/dist/vite/reporter.js.map +1 -1
- package/dist/vite/shadcn-registry.d.ts +8 -33
- package/dist/vite/sitemap.js +14 -13
- package/dist/vite/sitemap.js.map +1 -1
- package/dist/zuplo/enrich-with-zuplo.js +3 -3
- package/dist/zuplo/enrich-with-zuplo.js.map +1 -1
- package/dist/zuplo/policy-types.js +0 -1
- package/dist/zuplo/policy-types.js.map +1 -1
- package/dist/zuplo/with-zuplo.js +1 -1
- package/dist/zuplo/with-zuplo.js.map +1 -1
- package/lib/CategoryHeading-DCpZu3yG.js +17 -0
- package/lib/CategoryHeading-DCpZu3yG.js.map +1 -0
- package/lib/{CodeBlock-CVT6z0PP.js → CodeBlock-CX_J17Hf.js} +12 -12
- package/lib/CodeBlock-CX_J17Hf.js.map +1 -0
- package/lib/{Command-BYukybsa.js → Command-CUSlH0gJ.js} +21 -27
- package/lib/Command-CUSlH0gJ.js.map +1 -0
- package/lib/Dialog-BmgXWOaz.js +114 -0
- package/lib/Dialog-BmgXWOaz.js.map +1 -0
- package/lib/{MdxPage-plD-n8fm.js → MdxPage-yXbTtcWf.js} +19 -18
- package/lib/MdxPage-yXbTtcWf.js.map +1 -0
- package/lib/{OAuthErrorPage-BTP-t8Fq.js → OAuthErrorPage-rAKHHveX.js} +7 -7
- package/lib/OAuthErrorPage-rAKHHveX.js.map +1 -0
- package/lib/{OasProvider-CYf5xe1a.js → OasProvider-BW4OzAuR.js} +4 -3
- package/lib/OasProvider-BW4OzAuR.js.map +1 -0
- package/lib/{OperationList-C_-vAmhs.js → OperationList-CWxpdIbO.js} +309 -312
- package/lib/OperationList-CWxpdIbO.js.map +1 -0
- package/lib/{Pagination-BAO0V4os.js → Pagination-ZI2yyuxj.js} +3 -3
- package/lib/{Pagination-BAO0V4os.js.map → Pagination-ZI2yyuxj.js.map} +1 -1
- package/lib/RouteGuard-BIksrt_C.js +56 -0
- package/lib/RouteGuard-BIksrt_C.js.map +1 -0
- package/lib/RouterError-BYHrbLtD.js +41 -0
- package/lib/RouterError-BYHrbLtD.js.map +1 -0
- package/lib/{SchemaList-B8Ws7y1f.js → SchemaList-C4Sk-tLI.js} +15 -14
- package/lib/{SchemaList-B8Ws7y1f.js.map → SchemaList-C4Sk-tLI.js.map} +1 -1
- package/lib/SchemaView-B2BeAuci.js +429 -0
- package/lib/SchemaView-B2BeAuci.js.map +1 -0
- package/lib/{Select-ByPbK6BU.js → Select-DWh0wSay.js} +8 -8
- package/lib/{Select-ByPbK6BU.js.map → Select-DWh0wSay.js.map} +1 -1
- package/lib/{SignUp-BXxkBCGy.js → SignUp-CznaQsRx.js} +12 -12
- package/lib/SignUp-CznaQsRx.js.map +1 -0
- package/lib/{Slot-DDNiyFIv.js → Slot-BbdqiRXo.js} +1923 -2129
- package/lib/{Slot-DDNiyFIv.js.map → Slot-BbdqiRXo.js.map} +1 -1
- package/lib/{SyntaxHighlight-jSFm3PeK.js → SyntaxHighlight-CvzJ7DNa.js} +6 -9
- package/lib/{SyntaxHighlight-jSFm3PeK.js.map → SyntaxHighlight-CvzJ7DNa.js.map} +1 -1
- package/lib/{Toc-CKEI04R5.js → Toc-BAa-kpqN.js} +2 -2
- package/lib/{Toc-CKEI04R5.js.map → Toc-BAa-kpqN.js.map} +1 -1
- package/lib/{ZudokuContext-mDDq1hft.js → ZudokuContext-BR-lnR7O.js} +42 -43
- package/lib/{ZudokuContext-mDDq1hft.js.map → ZudokuContext-BR-lnR7O.js.map} +1 -1
- package/lib/chunk-QMGIS6GS-DqecZ6nq.js +9204 -0
- package/lib/chunk-QMGIS6GS-DqecZ6nq.js.map +1 -0
- package/lib/{circular-CyP38iiX.js → circular-BFte5TUt.js} +2 -2
- package/lib/{circular-CyP38iiX.js.map → circular-BFte5TUt.js.map} +1 -1
- package/lib/cn-dYga0KKN.js.map +1 -1
- package/lib/{createServer-B4w9HCV7.js → createServer-B4giw6jv.js} +12 -27
- package/lib/createServer-B4giw6jv.js.map +1 -0
- package/lib/{errors-v4zc7txj.js → errors-CjmCml50.js} +2 -2
- package/lib/errors-CjmCml50.js.map +1 -0
- package/lib/{hook-CGx8MPrU.js → hook-B4Q30zMI.js} +2 -2
- package/lib/{hook-CGx8MPrU.js.map → hook-B4Q30zMI.js.map} +1 -1
- package/lib/index-BuKx9nrj.js +1057 -0
- package/lib/index-BuKx9nrj.js.map +1 -0
- package/lib/{index-C5fXNRSh.js → index-CQGi1b3U.js} +2 -2
- package/lib/{index-C5fXNRSh.js.map → index-CQGi1b3U.js.map} +1 -1
- package/lib/{index-DnkZAg98.js → index-Dp3Fmnfq.js} +58 -55
- package/lib/index-Dp3Fmnfq.js.map +1 -0
- package/lib/{RouteGuard-gznKADdm.js → index.esm-BnYHxCYC.js} +226 -281
- package/lib/index.esm-BnYHxCYC.js.map +1 -0
- package/lib/invariant-Bm-FVUQE.js.map +1 -1
- package/lib/mutation-CiMUdKRU.js +196 -0
- package/lib/mutation-CiMUdKRU.js.map +1 -0
- package/lib/ui/Breadcrumb.js +22 -21
- package/lib/ui/Breadcrumb.js.map +1 -1
- package/lib/ui/Carousel.js.map +1 -1
- package/lib/ui/CodeBlock.js +1 -1
- package/lib/ui/Command.js +20 -26
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Dialog.js +56 -41
- package/lib/ui/Dialog.js.map +1 -1
- package/lib/ui/Form.js.map +1 -1
- package/lib/ui/Pagination.js +28 -29
- package/lib/ui/Pagination.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +3 -3
- package/lib/ui/ToggleGroup.js.map +1 -1
- package/lib/{useExposedProps-DUoV7MCU.js → useExposedProps-BH9aq4MD.js} +32 -32
- package/lib/{useExposedProps-DUoV7MCU.js.map → useExposedProps-BH9aq4MD.js.map} +1 -1
- package/lib/useLatest-hmRS46UF.js +11 -0
- package/lib/useLatest-hmRS46UF.js.map +1 -0
- package/lib/zudoku.__internal.js +2974 -0
- package/lib/zudoku.__internal.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-azureb2c.js +5 -5
- package/lib/zudoku.auth-azureb2c.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +5 -5
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.auth-supabase.js +3 -2
- package/lib/zudoku.auth-supabase.js.map +1 -1
- package/lib/zudoku.components.js +20 -28
- package/lib/zudoku.hooks.js +4 -4
- package/lib/zudoku.icons.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +18 -18
- package/lib/zudoku.plugin-api-keys.js +60 -59
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +8 -5
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +4 -4
- package/lib/zudoku.plugin-redirect.js +3 -3
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +15 -15
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/lib/zudoku.router.js +123 -0
- package/lib/zudoku.router.js.map +1 -0
- package/package.json +17 -24
- package/src/app/ZuploBuildConfig.ts +1 -1
- package/src/app/demo.tsx +1 -1
- package/src/app/entry.client.tsx +7 -6
- package/src/app/entry.server.tsx +4 -4
- package/src/app/env.ts +6 -6
- package/src/app/main.tsx +22 -7
- package/src/app/standalone.tsx +8 -3
- package/src/lib/MissingIcon.tsx +1 -1
- package/src/lib/auth/issuer.test.ts +1 -0
- package/src/lib/authentication/AuthenticationPlugin.tsx +4 -4
- package/src/lib/authentication/authentication.ts +3 -3
- package/src/lib/authentication/components/OAuthErrorPage.tsx +1 -1
- package/src/lib/authentication/components/SignOut.tsx +1 -1
- package/src/lib/authentication/providers/auth0.tsx +5 -5
- package/src/lib/authentication/providers/azureb2c.tsx +5 -5
- package/src/lib/authentication/providers/clerk.tsx +5 -5
- package/src/lib/authentication/providers/openid.tsx +6 -6
- package/src/lib/authentication/providers/supabase.tsx +7 -6
- package/src/lib/authentication/use-broadcast/shared.ts +4 -4
- package/src/lib/authentication/use-broadcast/useBroadcast.ts +2 -2
- package/src/lib/components/AnchorLink.tsx +1 -1
- package/src/lib/components/Autocomplete.tsx +1 -1
- package/src/lib/components/Bootstrap.tsx +1 -0
- package/src/lib/components/BuildCheck.tsx +12 -1
- package/src/lib/components/Header.tsx +5 -5
- package/src/lib/components/Heading.tsx +2 -3
- package/src/lib/components/Layout.tsx +3 -22
- package/src/lib/components/Markdown.tsx +5 -2
- package/src/lib/components/Meta.tsx +32 -0
- package/src/lib/components/MobileTopNavigation.tsx +11 -13
- package/src/lib/components/PathRenderer.tsx +2 -2
- package/src/lib/components/Search.tsx +1 -1
- package/src/lib/components/Slot.test.tsx +8 -8
- package/src/lib/components/Slot.tsx +2 -2
- package/src/lib/components/TopNavigation.tsx +3 -3
- package/src/lib/components/Zudoku.tsx +2 -2
- package/src/lib/components/context/ComponentsContext.tsx +2 -2
- package/src/lib/components/context/RouterEventsEmitter.tsx +1 -1
- package/src/lib/components/context/SlotProvider.tsx +4 -4
- package/src/lib/components/context/ViewportAnchorContext.tsx +2 -2
- package/src/lib/components/context/ZudokuContext.ts +1 -1
- package/src/lib/components/context/ZudokuProvider.tsx +1 -1
- package/src/lib/components/index.ts +1 -19
- package/src/lib/components/navigation/NavigationCategory.tsx +8 -1
- package/src/lib/components/navigation/NavigationItem.tsx +2 -2
- package/src/lib/components/navigation/NavigationWrapper.tsx +1 -1
- package/src/lib/components/navigation/Toc.tsx +2 -2
- package/src/lib/components/navigation/ZudokuLogo.tsx +1 -1
- package/src/lib/components/navigation/utils.ts +5 -6
- package/src/lib/core/ZudokuContext.ts +25 -6
- package/src/lib/core/__internal.tsx +30 -0
- package/src/lib/core/router.ts +1 -0
- package/src/lib/errors/ErrorAlert.tsx +0 -1
- package/src/lib/errors/TopLevelError.tsx +2 -4
- package/src/lib/hooks/useEvent.test.tsx +2 -2
- package/src/lib/oas/graphql/circular.ts +3 -3
- package/src/lib/oas/graphql/index.ts +2 -1
- package/src/lib/oas/parser/dereference/index.ts +2 -1
- package/src/lib/oas/parser/dereference/resolveRef.ts +4 -4
- package/src/lib/oas/parser/index.ts +2 -2
- package/src/lib/oas/parser/upgrade/index.ts +2 -1
- package/src/lib/plugins/api-keys/CreateApiKey.tsx +1 -1
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +5 -6
- package/src/lib/plugins/api-keys/index.tsx +8 -8
- package/src/lib/plugins/custom-pages/index.tsx +4 -1
- package/src/lib/plugins/markdown/MdxPage.tsx +5 -5
- package/src/lib/plugins/markdown/index.tsx +1 -1
- package/src/lib/plugins/openapi/ColorizedParam.tsx +3 -1
- package/src/lib/plugins/openapi/Endpoint.tsx +2 -2
- package/src/lib/plugins/openapi/OasProvider.tsx +2 -1
- package/src/lib/plugins/openapi/OperationList.tsx +5 -4
- package/src/lib/plugins/openapi/OperationListItem.tsx +18 -20
- package/src/lib/plugins/openapi/ParamInfos.tsx +10 -9
- package/src/lib/plugins/openapi/ParameterListItem.tsx +3 -3
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +3 -3
- package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +1 -1
- package/src/lib/plugins/openapi/Sidecar.tsx +2 -1
- package/src/lib/plugins/openapi/SidecarExamples.tsx +1 -1
- package/src/lib/plugins/openapi/StaggeredRender.tsx +1 -1
- package/src/lib/plugins/openapi/client/GraphQLContext.tsx +1 -1
- package/src/lib/plugins/openapi/client/createServer.ts +1 -2
- package/src/lib/plugins/openapi/client/useCreateQuery.ts +3 -2
- package/src/lib/plugins/openapi/context.tsx +1 -1
- package/src/lib/plugins/openapi/graphql/fragment-masking.ts +0 -1
- package/src/lib/plugins/openapi/graphql/gql.ts +0 -1
- package/src/lib/plugins/openapi/graphql/graphql.ts +0 -1
- package/src/lib/plugins/openapi/index.tsx +5 -4
- package/src/lib/plugins/openapi/interfaces.ts +5 -3
- package/src/lib/plugins/openapi/playground/BodyPanel.tsx +2 -2
- package/src/lib/plugins/openapi/playground/Headers.tsx +1 -1
- package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +1 -1
- package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +1 -1
- package/src/lib/plugins/openapi/playground/Playground.tsx +2 -2
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +1 -1
- package/src/lib/plugins/openapi/playground/request-panel/UrlPath.tsx +1 -1
- package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +1 -1
- package/src/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.tsx +3 -1
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +3 -3
- package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.ts +1 -1
- package/src/lib/plugins/openapi/processors/removeExtensions.test.ts +1 -0
- package/src/lib/plugins/openapi/processors/removeParameters.test.ts +1 -0
- package/src/lib/plugins/openapi/processors/traverse.ts +1 -1
- package/src/lib/plugins/openapi/schema/{LogicalGroup/LogicalGroupConnector.tsx → AllOfGroup/AllOfGroupConnector.tsx} +4 -25
- package/src/lib/plugins/openapi/schema/{LogicalGroup/LogicalGroupItem.tsx → AllOfGroup/AllOfGroupItem.tsx} +3 -11
- package/src/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.tsx +35 -0
- package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +9 -27
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +19 -13
- package/src/lib/plugins/openapi/schema/UnionView.tsx +123 -0
- package/src/lib/plugins/openapi/schema/union-helpers.ts +96 -0
- package/src/lib/plugins/openapi/schema/utils.ts +0 -11
- package/src/lib/plugins/openapi/util/createHttpSnippet.ts +2 -2
- package/src/lib/plugins/openapi/util/createNavigationCategory.tsx +1 -0
- package/src/lib/plugins/openapi/util/generateSchemaExample.ts +3 -4
- package/src/lib/plugins/openapi/util/getRoutes.tsx +2 -2
- package/src/lib/plugins/openapi/util/methodColorMap.tsx +1 -1
- package/src/lib/plugins/search-inkeep/index.tsx +3 -3
- package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +2 -4
- package/src/lib/plugins/search-pagefind/ResultList.tsx +3 -4
- package/src/lib/plugins/search-pagefind/get-results.tsx +0 -1
- package/src/lib/shiki.ts +6 -6
- package/src/lib/ui/Breadcrumb.tsx +1 -0
- package/src/lib/ui/Carousel.tsx +1 -0
- package/src/lib/ui/CodeBlock.tsx +5 -3
- package/src/lib/ui/Command.tsx +2 -4
- package/src/lib/ui/Dialog.tsx +12 -4
- package/src/lib/ui/Form.tsx +4 -4
- package/src/lib/ui/Pagination.tsx +1 -2
- package/src/lib/ui/ToggleGroup.tsx +1 -1
- package/src/lib/util/MdxComponents.tsx +9 -2
- package/src/lib/util/cn.ts +1 -1
- package/src/lib/util/createVariantComponent.tsx +2 -2
- package/src/lib/util/groupBy.ts +1 -0
- package/src/lib/util/humanFileSize.ts +2 -3
- package/src/lib/util/invariant.ts +1 -0
- package/src/lib/util/pastellize.ts +2 -2
- package/src/lib/util/types.ts +1 -1
- package/src/lib/util/useIsomorphicLayoutEffect.ts +1 -0
- package/src/lib/util/useScrollToAnchor.ts +3 -1
- package/src/shiki/langs/vue-vine.js +1 -0
- package/dist/lib/components/ReactMarkdown.d.ts +0 -29
- package/dist/lib/components/ReactMarkdown.js +0 -182
- package/dist/lib/components/ReactMarkdown.js.map +0 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.d.ts +0 -8
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js +0 -14
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js.map +0 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.d.ts +0 -7
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js +0 -17
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js.map +0 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js +0 -10
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js.map +0 -1
- package/lib/CodeBlock-CVT6z0PP.js.map +0 -1
- package/lib/Command-BYukybsa.js.map +0 -1
- package/lib/Dialog-u9Uz9sTt.js +0 -99
- package/lib/Dialog-u9Uz9sTt.js.map +0 -1
- package/lib/MdxPage-plD-n8fm.js.map +0 -1
- package/lib/OAuthErrorPage-BTP-t8Fq.js.map +0 -1
- package/lib/OasProvider-CYf5xe1a.js.map +0 -1
- package/lib/OperationList-C_-vAmhs.js.map +0 -1
- package/lib/RouteGuard-gznKADdm.js.map +0 -1
- package/lib/SchemaView-CHb3DJ6D.js +0 -366
- package/lib/SchemaView-CHb3DJ6D.js.map +0 -1
- package/lib/SignUp-BXxkBCGy.js.map +0 -1
- package/lib/chunk-QMGIS6GS-CdEm9pzB.js +0 -1839
- package/lib/chunk-QMGIS6GS-CdEm9pzB.js.map +0 -1
- package/lib/createServer-B4w9HCV7.js.map +0 -1
- package/lib/errors-v4zc7txj.js.map +0 -1
- package/lib/index-D1LmO5Bn.js +0 -4082
- package/lib/index-D1LmO5Bn.js.map +0 -1
- package/lib/index-DnkZAg98.js.map +0 -1
- package/src/lib/components/ReactMarkdown.license.txt +0 -21
- package/src/lib/components/ReactMarkdown.tsx +0 -264
- package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.tsx +0 -40
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useId, useLayoutEffect
|
|
1
|
+
import { type ReactNode, useId, useLayoutEffect } from "react";
|
|
2
2
|
import {
|
|
3
|
+
type SlotType,
|
|
3
4
|
useRenderSlot,
|
|
4
5
|
useSlotContext,
|
|
5
|
-
type SlotType,
|
|
6
6
|
} from "./context/SlotProvider.js";
|
|
7
7
|
|
|
8
8
|
// This is to augment the type of the Slot component with custom slot names
|
|
@@ -2,18 +2,18 @@ import { cx } from "class-variance-authority";
|
|
|
2
2
|
import { deepEqual } from "fast-equals";
|
|
3
3
|
import { Suspense } from "react";
|
|
4
4
|
import { NavLink, type NavLinkProps } from "react-router";
|
|
5
|
-
import {
|
|
5
|
+
import type { NavigationItem } from "../../config/validators/NavigationSchema.js";
|
|
6
6
|
import { useAuth } from "../authentication/hook.js";
|
|
7
7
|
import { joinUrl } from "../util/joinUrl.js";
|
|
8
8
|
import { useCurrentNavigation, useZudoku } from "./context/ZudokuContext.js";
|
|
9
|
-
import {
|
|
9
|
+
import { shouldShowItem, traverseNavigationItem } from "./navigation/utils.js";
|
|
10
10
|
import { Slot } from "./Slot.js";
|
|
11
11
|
|
|
12
12
|
export const TopNavigation = () => {
|
|
13
13
|
const context = useZudoku();
|
|
14
14
|
const { navigation } = context;
|
|
15
15
|
const auth = useAuth();
|
|
16
|
-
const filteredItems = navigation.filter(
|
|
16
|
+
const filteredItems = navigation.filter(shouldShowItem(auth, context));
|
|
17
17
|
|
|
18
18
|
if (filteredItems.length === 0 || import.meta.env.MODE === "standalone") {
|
|
19
19
|
return <style>{`:root { --top-nav-height: 0px; }`}</style>;
|
|
@@ -66,7 +66,7 @@ const ZudokoInner = memo(
|
|
|
66
66
|
const queryClient = useQueryClient();
|
|
67
67
|
|
|
68
68
|
useEffect(() => {
|
|
69
|
-
if (didNavigate) {
|
|
69
|
+
if (didNavigate || !navigation.location) {
|
|
70
70
|
return;
|
|
71
71
|
}
|
|
72
72
|
setDidNavigate(true);
|
|
@@ -78,7 +78,7 @@ const ZudokoInner = memo(
|
|
|
78
78
|
?.flatMap((plugin) =>
|
|
79
79
|
hasHead(plugin) ? (plugin.getHead?.({ location }) ?? []) : [],
|
|
80
80
|
)
|
|
81
|
-
//
|
|
81
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: No other key is available
|
|
82
82
|
.map((entry, i) => <Helmet key={i}>{entry}</Helmet>);
|
|
83
83
|
|
|
84
84
|
return (
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
|
+
type ComponentType,
|
|
2
3
|
createContext,
|
|
3
4
|
Fragment,
|
|
5
|
+
type PropsWithChildren,
|
|
6
|
+
type ReactNode,
|
|
4
7
|
use,
|
|
5
8
|
useMemo,
|
|
6
9
|
useRef,
|
|
7
|
-
type ComponentType,
|
|
8
|
-
type PropsWithChildren,
|
|
9
|
-
type ReactNode,
|
|
10
10
|
} from "react";
|
|
11
11
|
import { createStore, useStore } from "zustand";
|
|
12
12
|
import {
|
|
13
|
-
useExposedProps,
|
|
14
13
|
type ExposedComponentProps,
|
|
14
|
+
useExposedProps,
|
|
15
15
|
} from "../../util/useExposedProps.js";
|
|
16
16
|
|
|
17
17
|
export type SlotType = ReactNode | ComponentType<ExposedComponentProps>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createContext,
|
|
3
|
+
type PropsWithChildren,
|
|
3
4
|
use,
|
|
4
5
|
useCallback,
|
|
5
6
|
useEffect,
|
|
6
7
|
useMemo,
|
|
7
8
|
useRef,
|
|
8
9
|
useState,
|
|
9
|
-
type PropsWithChildren,
|
|
10
10
|
} from "react";
|
|
11
11
|
|
|
12
12
|
type AnchorContextType = {
|
|
@@ -128,7 +128,7 @@ export const ViewportAnchorProvider = ({ children }: PropsWithChildren) => {
|
|
|
128
128
|
|
|
129
129
|
const value = useMemo(
|
|
130
130
|
() => ({ activeAnchor, setActiveAnchor, ...observeFns }),
|
|
131
|
-
[activeAnchor,
|
|
131
|
+
[activeAnchor, observeFns],
|
|
132
132
|
);
|
|
133
133
|
|
|
134
134
|
return (
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useQuery, useSuspenseQuery } from "@tanstack/react-query";
|
|
2
2
|
import { createContext, useContext } from "react";
|
|
3
3
|
import { matchPath, useLocation } from "react-router";
|
|
4
|
-
import {
|
|
4
|
+
import type { NavigationItem } from "../../../config/validators/NavigationSchema.js";
|
|
5
5
|
import type { ZudokuContext } from "../../core/ZudokuContext.js";
|
|
6
6
|
import { joinUrl } from "../../util/joinUrl.js";
|
|
7
7
|
import { CACHE_KEYS } from "../cache.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useSuspenseQuery } from "@tanstack/react-query";
|
|
2
2
|
import type { PropsWithChildren } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import type { ZudokuContext } from "../../core/ZudokuContext.js";
|
|
4
4
|
import { NO_DEHYDRATE } from "../cache.js";
|
|
5
5
|
import { ZudokuReactContext } from "./ZudokuContext.js";
|
|
6
6
|
|
|
@@ -3,44 +3,26 @@ import { Helmet } from "@zudoku/react-helmet-async";
|
|
|
3
3
|
import { useTheme as useThemeImport } from "next-themes";
|
|
4
4
|
import { Link as LinkImport } from "react-router";
|
|
5
5
|
import { useAuth as useAuthImport } from "../authentication/hook.js";
|
|
6
|
-
import { RouteGuard as RouteGuardImport } from "../core/RouteGuard.js";
|
|
7
|
-
import { RouterError as RouterErrorImport } from "../errors/RouterError.js";
|
|
8
|
-
import { ServerError as ServerErrorImport } from "../errors/ServerError.js";
|
|
9
6
|
import { Button as ButtonImport } from "../ui/Button.js";
|
|
10
7
|
import { Callout as CalloutImport } from "../ui/Callout.js";
|
|
11
|
-
import {
|
|
12
|
-
Bootstrap as BootstrapImport,
|
|
13
|
-
BootstrapStatic as BootstrapStaticImport,
|
|
14
|
-
} from "./Bootstrap.js";
|
|
15
|
-
import { BuildCheck as BuildCheckImport } from "./BuildCheck.js";
|
|
8
|
+
import { ClientOnly as ClientOnlyImport } from "./ClientOnly.js";
|
|
16
9
|
import {
|
|
17
10
|
CACHE_KEYS as CACHE_KEYS_IMPORT,
|
|
18
11
|
useCache as useCacheImport,
|
|
19
12
|
} from "./cache.js";
|
|
20
|
-
import { ClientOnly as ClientOnlyImport } from "./ClientOnly.js";
|
|
21
13
|
import { useZudoku as useZudokuImport } from "./context/ZudokuContext.js";
|
|
22
|
-
import { Layout as LayoutImport } from "./Layout.js";
|
|
23
14
|
import { Markdown as MarkdownImport } from "./Markdown.js";
|
|
24
15
|
import { Spinner as SpinnerImport } from "./Spinner.js";
|
|
25
|
-
import { StatusPage as StatusPageImport } from "./StatusPage.js";
|
|
26
16
|
import { Typography as TypographyImport } from "./Typography.js";
|
|
27
17
|
import { Zudoku as ZudokuImport } from "./Zudoku.js";
|
|
28
18
|
|
|
29
|
-
export const Layout = /*@__PURE__*/ LayoutImport;
|
|
30
|
-
export const RouterError = /*@__PURE__*/ RouterErrorImport;
|
|
31
|
-
export const ServerError = /*@__PURE__*/ ServerErrorImport;
|
|
32
|
-
export const Bootstrap = /*@__PURE__*/ BootstrapImport;
|
|
33
|
-
export const BootstrapStatic = /*@__PURE__*/ BootstrapStaticImport;
|
|
34
|
-
export const RouteGuard = /*@__PURE__*/ RouteGuardImport;
|
|
35
19
|
export const Head = /*@__PURE__*/ Helmet;
|
|
36
|
-
export const StatusPage = /*@__PURE__*/ StatusPageImport;
|
|
37
20
|
export const Callout = /*@__PURE__*/ CalloutImport;
|
|
38
21
|
export const Markdown = /*@__PURE__*/ MarkdownImport;
|
|
39
22
|
export const Spinner = /*@__PURE__*/ SpinnerImport;
|
|
40
23
|
export const ClientOnly = /*@__PURE__*/ ClientOnlyImport;
|
|
41
24
|
export const Button = /*@__PURE__*/ ButtonImport;
|
|
42
25
|
export const Link = /*@__PURE__*/ LinkImport;
|
|
43
|
-
export const BuildCheck = /*@__PURE__*/ BuildCheckImport;
|
|
44
26
|
export const Zudoku = /*@__PURE__*/ ZudokuImport;
|
|
45
27
|
export const Typography = /*@__PURE__*/ TypographyImport;
|
|
46
28
|
|
|
@@ -104,7 +104,14 @@ const NavigationCategoryInner = ({
|
|
|
104
104
|
</div>
|
|
105
105
|
</NavLink>
|
|
106
106
|
) : (
|
|
107
|
-
|
|
107
|
+
// biome-ignore lint/a11y/noStaticElementInteractions: This is only to track if the user has interacted
|
|
108
|
+
<div
|
|
109
|
+
onClick={() => setHasInteracted(true)}
|
|
110
|
+
onKeyUp={(e) => {
|
|
111
|
+
if (e.key === "Enter" || e.key === " ") setHasInteracted(true);
|
|
112
|
+
}}
|
|
113
|
+
className={styles}
|
|
114
|
+
>
|
|
108
115
|
{icon}
|
|
109
116
|
<div className="flex items-center justify-between w-full">
|
|
110
117
|
<div className="flex gap-2 truncate w-full">{category.label}</div>
|
|
@@ -17,7 +17,7 @@ import { useViewportAnchor } from "../context/ViewportAnchorContext.js";
|
|
|
17
17
|
import { useZudoku } from "../context/ZudokuContext.js";
|
|
18
18
|
import { NavigationBadge } from "./NavigationBadge.js";
|
|
19
19
|
import { NavigationCategory } from "./NavigationCategory.js";
|
|
20
|
-
import {
|
|
20
|
+
import { navigationListItem, shouldShowItem } from "./utils.js";
|
|
21
21
|
|
|
22
22
|
const TruncatedLabel = ({
|
|
23
23
|
label,
|
|
@@ -79,7 +79,7 @@ export const NavigationItem = ({
|
|
|
79
79
|
const auth = useAuth();
|
|
80
80
|
const context = useZudoku();
|
|
81
81
|
|
|
82
|
-
if (!
|
|
82
|
+
if (!shouldShowItem(auth, context)(item)) {
|
|
83
83
|
return null;
|
|
84
84
|
}
|
|
85
85
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useEffect, useRef
|
|
1
|
+
import { type PropsWithChildren, useEffect, useRef } from "react";
|
|
2
2
|
import { cn } from "../../util/cn.js";
|
|
3
3
|
import { scrollIntoViewIfNeeded } from "../../util/scrollIntoViewIfNeeded.js";
|
|
4
4
|
import { useZudoku } from "../context/ZudokuContext.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { TocEntry } from "@stefanprobst/rehype-extract-toc";
|
|
2
2
|
import { ListTreeIcon } from "lucide-react";
|
|
3
3
|
import {
|
|
4
|
+
type CSSProperties,
|
|
5
|
+
type PropsWithChildren,
|
|
4
6
|
useEffect,
|
|
5
7
|
useRef,
|
|
6
8
|
useState,
|
|
7
|
-
type CSSProperties,
|
|
8
|
-
type PropsWithChildren,
|
|
9
9
|
} from "react";
|
|
10
10
|
import { cn } from "../../util/cn.js";
|
|
11
11
|
import { AnchorLink } from "../AnchorLink.js";
|
|
@@ -67,7 +67,6 @@ export const useIsCategoryOpen = (category: NavigationCategory) => {
|
|
|
67
67
|
case "custom-page":
|
|
68
68
|
case "doc":
|
|
69
69
|
return joinUrl(item.path) === location.pathname ? true : undefined;
|
|
70
|
-
case "link":
|
|
71
70
|
default:
|
|
72
71
|
return undefined;
|
|
73
72
|
}
|
|
@@ -75,14 +74,14 @@ export const useIsCategoryOpen = (category: NavigationCategory) => {
|
|
|
75
74
|
};
|
|
76
75
|
|
|
77
76
|
export const usePrevNext = (): {
|
|
78
|
-
prev?: { label
|
|
79
|
-
next?: { label
|
|
77
|
+
prev?: { label?: string; id: string };
|
|
78
|
+
next?: { label?: string; id: string };
|
|
80
79
|
} => {
|
|
81
80
|
const currentId = useLocation().pathname;
|
|
82
81
|
const { navigation } = useCurrentNavigation();
|
|
83
82
|
|
|
84
|
-
let prev;
|
|
85
|
-
let next;
|
|
83
|
+
let prev: { label?: string; id: string } | undefined;
|
|
84
|
+
let next: { label?: string; id: string } | undefined;
|
|
86
85
|
|
|
87
86
|
let foundCurrent = false;
|
|
88
87
|
|
|
@@ -134,7 +133,7 @@ export const navigationListItem = cva(
|
|
|
134
133
|
},
|
|
135
134
|
);
|
|
136
135
|
|
|
137
|
-
export const
|
|
136
|
+
export const shouldShowItem =
|
|
138
137
|
(auth: UseAuthReturn, context: ZudokuContext) =>
|
|
139
138
|
(item: NavigationItem): boolean => {
|
|
140
139
|
if (typeof item.display === "function") {
|
|
@@ -3,11 +3,11 @@ import { createNanoEvents } from "nanoevents";
|
|
|
3
3
|
import type { ReactNode } from "react";
|
|
4
4
|
import type { Location } from "react-router";
|
|
5
5
|
import type { BundledTheme, HighlighterCore } from "shiki";
|
|
6
|
-
import type { z } from "zod
|
|
6
|
+
import type { z } from "zod";
|
|
7
7
|
import type { Navigation } from "../../config/validators/NavigationSchema.js";
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
import type {
|
|
9
|
+
CallbackContext,
|
|
10
|
+
ProtectedRoutesInput,
|
|
11
11
|
} from "../../config/validators/ProtectedRoutesSchema.js";
|
|
12
12
|
import type { FooterSchema } from "../../config/validators/validate.js";
|
|
13
13
|
import type { AuthenticationPlugin } from "../authentication/authentication.js";
|
|
@@ -48,6 +48,7 @@ export type ApiKeyCache = "api-keys";
|
|
|
48
48
|
|
|
49
49
|
type Metadata = Partial<{
|
|
50
50
|
title: string;
|
|
51
|
+
defaultTitle?: string;
|
|
51
52
|
description: string;
|
|
52
53
|
logo: string;
|
|
53
54
|
favicon: string;
|
|
@@ -105,6 +106,23 @@ export type ZudokuContextOptions = {
|
|
|
105
106
|
};
|
|
106
107
|
};
|
|
107
108
|
|
|
109
|
+
export const transformProtectedRoutes = (
|
|
110
|
+
val: ProtectedRoutesInput,
|
|
111
|
+
): Record<string, (c: CallbackContext) => boolean> | undefined => {
|
|
112
|
+
if (!val) return undefined;
|
|
113
|
+
|
|
114
|
+
if (Array.isArray(val)) {
|
|
115
|
+
return Object.fromEntries(
|
|
116
|
+
val.map((route) => [
|
|
117
|
+
route,
|
|
118
|
+
(c: CallbackContext) => c.auth.isAuthenticated,
|
|
119
|
+
]),
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
return val;
|
|
124
|
+
};
|
|
125
|
+
|
|
108
126
|
export class ZudokuContext {
|
|
109
127
|
public plugins: NonNullable<ZudokuContextOptions["plugins"]>;
|
|
110
128
|
public navigation: Navigation;
|
|
@@ -123,13 +141,13 @@ export class ZudokuContext {
|
|
|
123
141
|
const routes = plugin.getProtectedRoutes?.();
|
|
124
142
|
if (!routes) return [];
|
|
125
143
|
|
|
126
|
-
return Object.entries(
|
|
144
|
+
return Object.entries(transformProtectedRoutes(routes) ?? {});
|
|
127
145
|
}),
|
|
128
146
|
);
|
|
129
147
|
|
|
130
148
|
const protectedRoutes = {
|
|
131
149
|
...pluginProtectedRoutes,
|
|
132
|
-
...
|
|
150
|
+
...transformProtectedRoutes(options.protectedRoutes),
|
|
133
151
|
};
|
|
134
152
|
|
|
135
153
|
this.queryClient = queryClient;
|
|
@@ -144,6 +162,7 @@ export class ZudokuContext {
|
|
|
144
162
|
if (!isEventConsumerPlugin(plugin)) return;
|
|
145
163
|
|
|
146
164
|
objectEntries(plugin.events).forEach(([event, handler]) => {
|
|
165
|
+
// biome-ignore lint/style/noNonNullAssertion: handler is guaranteed to be defined
|
|
147
166
|
this.emitter.on(event, handler!);
|
|
148
167
|
});
|
|
149
168
|
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ⚠️
|
|
3
|
+
* These are re-exports consumed from the main entry point in `src/app/main.tsx`
|
|
4
|
+
* This is to ensure that they share the exact same context in React.
|
|
5
|
+
* ⚠️
|
|
6
|
+
**/
|
|
7
|
+
|
|
8
|
+
import { Helmet } from "@zudoku/react-helmet-async";
|
|
9
|
+
import {
|
|
10
|
+
Bootstrap as BootstrapImport,
|
|
11
|
+
BootstrapStatic as BootstrapStaticImport,
|
|
12
|
+
} from "../components/Bootstrap.js";
|
|
13
|
+
import { BuildCheck as BuildCheckImport } from "../components/BuildCheck.js";
|
|
14
|
+
import { Layout as LayoutImport } from "../components/Layout.js";
|
|
15
|
+
import { Meta as MetaImport } from "../components/Meta.js";
|
|
16
|
+
import { StatusPage as StatusPageImport } from "../components/StatusPage.js";
|
|
17
|
+
import { RouterError as RouterErrorImport } from "../errors/RouterError.js";
|
|
18
|
+
import { ServerError as ServerErrorImport } from "../errors/ServerError.js";
|
|
19
|
+
import { RouteGuard as RouteGuardImport } from "./RouteGuard.js";
|
|
20
|
+
|
|
21
|
+
export const Layout = LayoutImport;
|
|
22
|
+
export const RouterError = RouterErrorImport;
|
|
23
|
+
export const ServerError = ServerErrorImport;
|
|
24
|
+
export const Bootstrap = BootstrapImport;
|
|
25
|
+
export const BootstrapStatic = BootstrapStaticImport;
|
|
26
|
+
export const RouteGuard = RouteGuardImport;
|
|
27
|
+
export const Head = Helmet;
|
|
28
|
+
export const StatusPage = StatusPageImport;
|
|
29
|
+
export const BuildCheck = BuildCheckImport;
|
|
30
|
+
export const Meta = MetaImport;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "react-router";
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { FallbackProps } from "react-error-boundary";
|
|
1
|
+
import type { FallbackProps } from "react-error-boundary";
|
|
2
2
|
import { ErrorAlert } from "./ErrorAlert.js";
|
|
3
3
|
|
|
4
|
-
export function TopLevelError({ error
|
|
5
|
-
// Call resetErrorBoundary() to reset the error boundary and retry the render.
|
|
6
|
-
|
|
4
|
+
export function TopLevelError({ error }: FallbackProps) {
|
|
7
5
|
return <ErrorAlert error={error} />;
|
|
8
6
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
2
2
|
import { act, renderHook, waitFor } from "@testing-library/react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import type { PropsWithChildren } from "react";
|
|
4
|
+
import type { Location } from "react-router";
|
|
5
5
|
import { assertType, describe, expect, it, vi } from "vitest";
|
|
6
6
|
import { ZudokuProvider } from "../components/context/ZudokuProvider.js";
|
|
7
7
|
import { ZudokuContext, type ZudokuEvents } from "../core/ZudokuContext.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GraphQLJSON } from "graphql-type-json";
|
|
2
1
|
import { GraphQLScalarType } from "graphql/index.js";
|
|
2
|
+
import { GraphQLJSON } from "graphql-type-json";
|
|
3
3
|
import type { RecordAny } from "../../util/traverse.js";
|
|
4
4
|
|
|
5
5
|
export const CIRCULAR_REF = "$[Circular Reference]";
|
|
@@ -14,12 +14,12 @@ const OPENAPI_PROPS = new Set([
|
|
|
14
14
|
]);
|
|
15
15
|
|
|
16
16
|
const handleCircularRefs = (
|
|
17
|
-
//
|
|
17
|
+
// biome-ignore lint/suspicious/noExplicitAny: Allow any type
|
|
18
18
|
obj: any,
|
|
19
19
|
visited = new WeakSet(),
|
|
20
20
|
refs = new WeakMap(),
|
|
21
21
|
path: string[] = [],
|
|
22
|
-
//
|
|
22
|
+
// biome-ignore lint/suspicious/noExplicitAny: Allow any type
|
|
23
23
|
): any => {
|
|
24
24
|
if (obj === null || typeof obj !== "object") return obj;
|
|
25
25
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// biome-ignore-all lint/suspicious/noExplicitAny: Allow any type
|
|
2
2
|
import SchemaBuilder from "@pothos/core";
|
|
3
3
|
import {
|
|
4
4
|
type CountableSlugify,
|
|
@@ -554,6 +554,7 @@ const Schema = builder.objectRef<OpenAPIDocument>("Schema").implement({
|
|
|
554
554
|
resolve: (root) =>
|
|
555
555
|
Object.entries(root.paths ?? {}).map(([path, value]) => ({
|
|
556
556
|
path,
|
|
557
|
+
// biome-ignore lint/style/noNonNullAssertion: value is guaranteed to be defined
|
|
557
558
|
methods: Object.keys(value!) as typeof HttpMethods,
|
|
558
559
|
})),
|
|
559
560
|
}),
|
|
@@ -8,7 +8,7 @@ type CustomResolver = (ref: string) => Promise<JSONSchema | undefined>;
|
|
|
8
8
|
|
|
9
9
|
const cache = new Map<JSONSchema, JSONSchema>();
|
|
10
10
|
|
|
11
|
-
//
|
|
11
|
+
// biome-ignore lint/suspicious/noExplicitAny: Allow any type
|
|
12
12
|
const isIndexableObject = (obj: any): obj is Record<string, any> =>
|
|
13
13
|
obj !== null && typeof obj === "object";
|
|
14
14
|
|
|
@@ -18,6 +18,7 @@ export const dereference = async (
|
|
|
18
18
|
resolvers: CustomResolver[] = [],
|
|
19
19
|
) => {
|
|
20
20
|
if (cache.has(schema)) {
|
|
21
|
+
// biome-ignore lint/style/noNonNullAssertion: Cache is guaranteed to have a value
|
|
21
22
|
return cache.get(schema)!;
|
|
22
23
|
}
|
|
23
24
|
|
|
@@ -11,13 +11,13 @@ export const resolveLocalRef = (schema: JSONSchema, ref: string): unknown => {
|
|
|
11
11
|
}
|
|
12
12
|
const schemaCache = cache.get(schema);
|
|
13
13
|
|
|
14
|
-
if (schemaCache
|
|
15
|
-
return schemaCache
|
|
14
|
+
if (schemaCache?.has(ref)) {
|
|
15
|
+
return schemaCache.get(ref);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
const path = ref.split("/").slice(1);
|
|
19
19
|
|
|
20
|
-
//
|
|
20
|
+
// biome-ignore lint/suspicious/noExplicitAny: Allow any type
|
|
21
21
|
let current: any = schema;
|
|
22
22
|
for (const segment of path) {
|
|
23
23
|
if (!current || typeof current !== "object") {
|
|
@@ -27,6 +27,6 @@ export const resolveLocalRef = (schema: JSONSchema, ref: string): unknown => {
|
|
|
27
27
|
current = current[segment] ?? null;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
schemaCache
|
|
30
|
+
schemaCache?.set(ref, current);
|
|
31
31
|
return current;
|
|
32
32
|
};
|
|
@@ -43,7 +43,7 @@ const parseSchemaInput = async (
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
if (schemaInput.includes("://")) {
|
|
46
|
-
let response;
|
|
46
|
+
let response: Response;
|
|
47
47
|
try {
|
|
48
48
|
response = await fetch(schemaInput, {
|
|
49
49
|
cache: "force-cache",
|
|
@@ -83,7 +83,7 @@ const parseSchemaInput = async (
|
|
|
83
83
|
|
|
84
84
|
if (typeof schemaInput === "object") return schemaInput as JSONSchema;
|
|
85
85
|
|
|
86
|
-
throw new GraphQLError(
|
|
86
|
+
throw new GraphQLError(`Unsupported schema input: ${schemaInput}`);
|
|
87
87
|
};
|
|
88
88
|
|
|
89
89
|
/**
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
1
|
import { type RecordAny, traverse } from "../../../util/traverse.js";
|
|
3
2
|
import type { OpenAPIDocument } from "../index.js";
|
|
4
3
|
/**
|
|
@@ -71,6 +70,7 @@ export const upgradeSchema = (schema: RecordAny): OpenAPIDocument => {
|
|
|
71
70
|
|
|
72
71
|
if (isMultipart) {
|
|
73
72
|
// Types
|
|
73
|
+
// biome-ignore lint/suspicious/noExplicitAny: Allow any type
|
|
74
74
|
const entries: [string, any][] = Object.entries(schema.properties);
|
|
75
75
|
|
|
76
76
|
for (const [, value] of entries) {
|
|
@@ -110,6 +110,7 @@ export const upgradeSchema = (schema: RecordAny): OpenAPIDocument => {
|
|
|
110
110
|
|
|
111
111
|
schema = traverse(schema, (sub) => {
|
|
112
112
|
if (sub.type === "string" && sub.format === "binary") {
|
|
113
|
+
// biome-ignore lint/suspicious/noExplicitAny: Allow any type
|
|
113
114
|
return undefined as any;
|
|
114
115
|
}
|
|
115
116
|
|
|
@@ -16,7 +16,7 @@ import { useZudoku } from "../../components/context/ZudokuContext.js";
|
|
|
16
16
|
import { useAuth } from "../../hooks/index.js";
|
|
17
17
|
import { Button } from "../../ui/Button.js";
|
|
18
18
|
import { Input } from "../../ui/Input.js";
|
|
19
|
-
import {
|
|
19
|
+
import type { ApiKeyService } from "./index.js";
|
|
20
20
|
|
|
21
21
|
type CreateApiKey = { description?: string; expiresOn?: string };
|
|
22
22
|
|
|
@@ -36,7 +36,7 @@ import { Input } from "../../ui/Input.js";
|
|
|
36
36
|
import { cn } from "../../util/cn.js";
|
|
37
37
|
import { useCopyToClipboard } from "../../util/useCopyToClipboard.js";
|
|
38
38
|
import { CreateApiKey } from "./CreateApiKey.js";
|
|
39
|
-
import {
|
|
39
|
+
import type { ApiConsumer, ApiKey, ApiKeyService } from "./index.js";
|
|
40
40
|
|
|
41
41
|
export const SettingsApiKeys = ({ service }: { service: ApiKeyService }) => {
|
|
42
42
|
const context = useZudoku();
|
|
@@ -90,7 +90,7 @@ export const SettingsApiKeys = ({ service }: { service: ApiKeyService }) => {
|
|
|
90
90
|
|
|
91
91
|
return { previousData };
|
|
92
92
|
},
|
|
93
|
-
onError: (
|
|
93
|
+
onError: (_err, _variables, context) => {
|
|
94
94
|
if (context?.previousData) {
|
|
95
95
|
queryClient.setQueryData(["api-keys"], context.previousData);
|
|
96
96
|
}
|
|
@@ -136,7 +136,7 @@ export const SettingsApiKeys = ({ service }: { service: ApiKeyService }) => {
|
|
|
136
136
|
|
|
137
137
|
return { previousData };
|
|
138
138
|
},
|
|
139
|
-
onError: (
|
|
139
|
+
onError: (_err, _variables, context) => {
|
|
140
140
|
if (context?.previousData) {
|
|
141
141
|
queryClient.setQueryData(["api-keys"], context.previousData);
|
|
142
142
|
}
|
|
@@ -290,7 +290,7 @@ export const SettingsApiKeys = ({ service }: { service: ApiKeyService }) => {
|
|
|
290
290
|
</div>
|
|
291
291
|
</div>
|
|
292
292
|
) : (
|
|
293
|
-
|
|
293
|
+
consumers.label
|
|
294
294
|
)}
|
|
295
295
|
<div className="text-muted-foreground text-xs">
|
|
296
296
|
{consumers.createdOn}
|
|
@@ -444,8 +444,7 @@ const RevealApiKey = ({
|
|
|
444
444
|
const isExpired = expiresOn && new Date(expiresOn) < new Date();
|
|
445
445
|
const daysUntilExpiry = expiresOn
|
|
446
446
|
? Math.ceil(
|
|
447
|
-
(new Date(expiresOn).getTime() -
|
|
448
|
-
(1000 * 60 * 60 * 24),
|
|
447
|
+
(new Date(expiresOn).getTime() - Date.now()) / (1000 * 60 * 60 * 24),
|
|
449
448
|
)
|
|
450
449
|
: Infinity;
|
|
451
450
|
const expiresSoon = daysUntilExpiry <= 7 && !isExpired;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { KeyRoundIcon } from "lucide-react";
|
|
2
|
-
import {
|
|
3
|
-
import { UseAuthReturn } from "../../authentication/hook.js";
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
type ZudokuPlugin,
|
|
2
|
+
import type { RouteObject } from "react-router";
|
|
3
|
+
import type { UseAuthReturn } from "../../authentication/hook.js";
|
|
4
|
+
import type {
|
|
5
|
+
ApiIdentityPlugin,
|
|
6
|
+
ProfileMenuPlugin,
|
|
7
|
+
ZudokuPlugin,
|
|
9
8
|
} from "../../core/plugins.js";
|
|
9
|
+
import type { ZudokuContext } from "../../core/ZudokuContext.js";
|
|
10
10
|
import { RouterError } from "../../errors/RouterError.js";
|
|
11
11
|
import invariant from "../../util/invariant.js";
|
|
12
12
|
import { ProtectedRoute } from "./ProtectedRoute.js";
|
|
@@ -140,7 +140,7 @@ const createDefaultHandler = (
|
|
|
140
140
|
},
|
|
141
141
|
getConsumers: async (context) => {
|
|
142
142
|
const request = new Request(
|
|
143
|
-
DEFAULT_API_KEY_ENDPOINT
|
|
143
|
+
`${DEFAULT_API_KEY_ENDPOINT}/${deploymentName}/consumers`,
|
|
144
144
|
);
|
|
145
145
|
await context.signRequest(request);
|
|
146
146
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
2
|
import type { RouteObject } from "react-router";
|
|
3
3
|
import type { NavigationItem } from "../../../config/validators/NavigationSchema.js";
|
|
4
4
|
import { traverseNavigation } from "../../components/navigation/utils.js";
|
|
@@ -20,6 +20,9 @@ export const customPagesPlugin = (
|
|
|
20
20
|
customPages.push({
|
|
21
21
|
path: item.path,
|
|
22
22
|
element: item.element,
|
|
23
|
+
handle: {
|
|
24
|
+
layout: item.layout ?? "default",
|
|
25
|
+
},
|
|
23
26
|
});
|
|
24
27
|
}
|
|
25
28
|
});
|