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,32 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ChevronDownIcon,
|
|
3
|
-
CircleDotIcon,
|
|
4
|
-
CircleFadingPlusIcon,
|
|
5
|
-
CircleIcon,
|
|
6
|
-
} from "lucide-react";
|
|
1
|
+
import { ChevronDownIcon, CircleFadingPlusIcon } from "lucide-react";
|
|
7
2
|
import { cn } from "../../../../util/cn.js";
|
|
8
3
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const iconMap = {
|
|
12
|
-
AND: <CircleFadingPlusIcon size={16} className="fill-card" />,
|
|
13
|
-
OR: <CircleDotIcon size={16} className="fill-card" />,
|
|
14
|
-
ONE: <CircleIcon size={14} className="fill-card" />,
|
|
15
|
-
} as const;
|
|
16
|
-
|
|
17
|
-
const colorClass = {
|
|
18
|
-
AND: "text-green-500 dark:text-green-300/60",
|
|
19
|
-
OR: "text-blue-400 dark:text-blue-500",
|
|
20
|
-
ONE: "text-purple-500 dark:text-purple-300/60",
|
|
21
|
-
} as const;
|
|
22
|
-
|
|
23
|
-
export const LogicalGroupConnector = ({
|
|
24
|
-
type,
|
|
4
|
+
export const AllOfGroupConnector = ({
|
|
25
5
|
isOpen,
|
|
26
6
|
className,
|
|
27
7
|
schemeName,
|
|
28
8
|
}: {
|
|
29
|
-
type: LogicalGroupType;
|
|
30
9
|
isOpen: boolean;
|
|
31
10
|
className?: string;
|
|
32
11
|
schemeName?: string;
|
|
@@ -34,14 +13,14 @@ export const LogicalGroupConnector = ({
|
|
|
34
13
|
return (
|
|
35
14
|
<div
|
|
36
15
|
className={cn(
|
|
37
|
-
|
|
16
|
+
"text-green-500 dark:text-green-300/60",
|
|
38
17
|
"relative text-sm flex py-2",
|
|
39
18
|
"before:border-l before:absolute before:-top-2 before:-bottom-2 before:border-border before:border-dashed before:content-['']",
|
|
40
19
|
className,
|
|
41
20
|
)}
|
|
42
21
|
>
|
|
43
22
|
<div className="-translate-x-[7px] flex gap-1 items-center">
|
|
44
|
-
{
|
|
23
|
+
<CircleFadingPlusIcon size={16} className="fill-card" />
|
|
45
24
|
<div
|
|
46
25
|
className={cn(
|
|
47
26
|
"translate-y-px mx-px opacity-0 group-hover:opacity-100 transition",
|
|
@@ -2,13 +2,9 @@ import * as Collapsible from "@radix-ui/react-collapsible";
|
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import type { SchemaObject } from "../../../../oas/parser/index.js";
|
|
4
4
|
import { SchemaView } from "../SchemaView.js";
|
|
5
|
-
import
|
|
6
|
-
import { LogicalGroupConnector } from "./LogicalGroupConnector.js";
|
|
5
|
+
import { AllOfGroupConnector } from "./AllOfGroupConnector.js";
|
|
7
6
|
|
|
8
|
-
export const
|
|
9
|
-
type: LogicalGroupType;
|
|
10
|
-
schema: SchemaObject;
|
|
11
|
-
}) => {
|
|
7
|
+
export const AllOfGroupItem = (props: { schema: SchemaObject }) => {
|
|
12
8
|
const [isOpen, setIsOpen] = useState(true);
|
|
13
9
|
|
|
14
10
|
return (
|
|
@@ -18,11 +14,7 @@ export const LogicalGroupItem = (props: {
|
|
|
18
14
|
className="group"
|
|
19
15
|
>
|
|
20
16
|
<Collapsible.Trigger>
|
|
21
|
-
<
|
|
22
|
-
type={props.type}
|
|
23
|
-
isOpen={isOpen}
|
|
24
|
-
schemeName={props.schema.title}
|
|
25
|
-
/>
|
|
17
|
+
<AllOfGroupConnector isOpen={isOpen} schemeName={props.schema.title} />
|
|
26
18
|
</Collapsible.Trigger>
|
|
27
19
|
{!isOpen && <div className="wavy-line bg-border translate-y-1" />}
|
|
28
20
|
<Collapsible.Content>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as Collapsible from "@radix-ui/react-collapsible";
|
|
2
|
+
import { SquareMinusIcon, SquarePlusIcon } from "lucide-react";
|
|
3
|
+
import { useCallback, useState } from "react";
|
|
4
|
+
import type { SchemaObject } from "../../../../oas/parser/index.js";
|
|
5
|
+
import { Card } from "../../../../ui/Card.js";
|
|
6
|
+
import { AllOfGroupItem } from "./AllOfGroupItem.js";
|
|
7
|
+
|
|
8
|
+
export const AllOfGroupView = ({ schema }: { schema: SchemaObject }) => {
|
|
9
|
+
const [isOpen, setIsOpen] = useState(true);
|
|
10
|
+
const toggleOpen = useCallback(() => setIsOpen((prev) => !prev), []);
|
|
11
|
+
|
|
12
|
+
if (!schema.allOf) return null;
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<Collapsible.Root open={isOpen} onOpenChange={toggleOpen} asChild>
|
|
16
|
+
<Card className="px-6">
|
|
17
|
+
<Collapsible.Trigger className="flex gap-2 items-center py-2 w-full text-sm text-muted-foreground -translate-x-1.5">
|
|
18
|
+
{isOpen ? (
|
|
19
|
+
<SquareMinusIcon size={14} />
|
|
20
|
+
) : (
|
|
21
|
+
<SquarePlusIcon size={14} />
|
|
22
|
+
)}
|
|
23
|
+
<span>All of</span>
|
|
24
|
+
</Collapsible.Trigger>
|
|
25
|
+
|
|
26
|
+
<Collapsible.Content className="pb-4">
|
|
27
|
+
{schema.allOf.map((subSchema, index) => (
|
|
28
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: Index needed for key
|
|
29
|
+
<AllOfGroupItem key={index} schema={subSchema} />
|
|
30
|
+
))}
|
|
31
|
+
</Collapsible.Content>
|
|
32
|
+
</Card>
|
|
33
|
+
</Collapsible.Root>
|
|
34
|
+
);
|
|
35
|
+
};
|
|
@@ -1,46 +1,25 @@
|
|
|
1
1
|
import * as Collapsible from "@radix-ui/react-collapsible";
|
|
2
2
|
import { MinusIcon, PlusIcon, RefreshCcwDotIcon } from "lucide-react";
|
|
3
|
-
import {
|
|
3
|
+
import { useState } from "react";
|
|
4
4
|
import { InlineCode } from "../../../components/InlineCode.js";
|
|
5
5
|
import { Markdown } from "../../../components/Markdown.js";
|
|
6
6
|
import type { SchemaObject } from "../../../oas/parser/index.js";
|
|
7
7
|
import { Button } from "../../../ui/Button.js";
|
|
8
|
-
import { objectEntries } from "../../../util/objectEntries.js";
|
|
9
8
|
import { ConstValue } from "../components/ConstValue.js";
|
|
10
9
|
import { EnumValues } from "../components/EnumValues.js";
|
|
11
10
|
import { SelectOnClick } from "../components/SelectOnClick.js";
|
|
12
11
|
import { ParamInfos } from "../ParamInfos.js";
|
|
13
|
-
import {
|
|
12
|
+
import { AllOfGroupView } from "./AllOfGroup/AllOfGroupView.js";
|
|
14
13
|
import { SchemaExampleAndDefault } from "./SchemaExampleAndDefault.js";
|
|
15
14
|
import { SchemaView } from "./SchemaView.js";
|
|
16
15
|
import {
|
|
17
16
|
extractCircularRefInfo,
|
|
18
|
-
hasLogicalGroupings,
|
|
19
17
|
isArrayCircularRef,
|
|
20
18
|
isArrayType,
|
|
21
19
|
isCircularRef,
|
|
22
20
|
isComplexType,
|
|
23
|
-
LogicalSchemaTypeMap,
|
|
24
21
|
} from "./utils.js";
|
|
25
22
|
|
|
26
|
-
export const SchemaLogicalGroup = ({ schema }: { schema: SchemaObject }) => {
|
|
27
|
-
const [isOpen, setIsOpen] = useState(true);
|
|
28
|
-
const toggleOpen = useCallback(() => setIsOpen((prev) => !prev), []);
|
|
29
|
-
|
|
30
|
-
for (const [key, type] of objectEntries(LogicalSchemaTypeMap)) {
|
|
31
|
-
if (!schema[key]) continue;
|
|
32
|
-
|
|
33
|
-
return (
|
|
34
|
-
<LogicalGroup
|
|
35
|
-
schemas={schema[key]}
|
|
36
|
-
type={type}
|
|
37
|
-
isOpen={isOpen}
|
|
38
|
-
toggleOpen={toggleOpen}
|
|
39
|
-
/>
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
|
|
44
23
|
const RecursiveIndicator = ({ circularProp }: { circularProp?: string }) => (
|
|
45
24
|
<InlineCode
|
|
46
25
|
className="inline-flex items-center gap-1.5 italic text-xs translate-y-0.5"
|
|
@@ -84,7 +63,9 @@ export const SchemaPropertyItem = ({
|
|
|
84
63
|
}
|
|
85
64
|
|
|
86
65
|
const isCollapsible = Boolean(
|
|
87
|
-
(
|
|
66
|
+
(schema.allOf ||
|
|
67
|
+
schema.anyOf ||
|
|
68
|
+
schema.oneOf ||
|
|
88
69
|
isComplexType(schema) ||
|
|
89
70
|
(isArrayType(schema) &&
|
|
90
71
|
"items" in schema &&
|
|
@@ -126,6 +107,7 @@ export const SchemaPropertyItem = ({
|
|
|
126
107
|
{schema.const && <ConstValue schema={schema} hideDescription />}
|
|
127
108
|
{schema.enum && <EnumValues values={schema.enum} />}
|
|
128
109
|
<SchemaExampleAndDefault schema={schema} />
|
|
110
|
+
|
|
129
111
|
{isCollapsible && (
|
|
130
112
|
<Collapsible.Root
|
|
131
113
|
defaultOpen={defaultOpen}
|
|
@@ -142,9 +124,9 @@ export const SchemaPropertyItem = ({
|
|
|
142
124
|
)}
|
|
143
125
|
<Collapsible.Content>
|
|
144
126
|
<div className="mt-2">
|
|
145
|
-
{
|
|
146
|
-
<
|
|
147
|
-
) : schema.type === "object" ? (
|
|
127
|
+
{schema.allOf ? (
|
|
128
|
+
<AllOfGroupView schema={schema} />
|
|
129
|
+
) : schema.anyOf || schema.oneOf || schema.type === "object" ? (
|
|
148
130
|
<SchemaView schema={schema} />
|
|
149
131
|
) : isArrayType(schema) && "items" in schema ? (
|
|
150
132
|
<SchemaView schema={schema.items} />
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import { InfoIcon } from "lucide-react";
|
|
2
2
|
import { Markdown } from "../../../components/Markdown.js";
|
|
3
|
-
import { Typography } from "../../../components/Typography.js";
|
|
4
3
|
import type { SchemaObject } from "../../../oas/parser/index.js";
|
|
5
4
|
import { Card } from "../../../ui/Card.js";
|
|
6
5
|
import { groupBy } from "../../../util/groupBy.js";
|
|
7
6
|
import { ConstValue } from "../components/ConstValue.js";
|
|
8
7
|
import { EnumValues } from "../components/EnumValues.js";
|
|
9
8
|
import { ParamInfos } from "../ParamInfos.js";
|
|
9
|
+
import { AllOfGroupView } from "./AllOfGroup/AllOfGroupView.js";
|
|
10
10
|
import { SchemaExampleAndDefault } from "./SchemaExampleAndDefault.js";
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} from "./SchemaPropertyItem.js";
|
|
15
|
-
import { hasLogicalGroupings, isBasicType } from "./utils.js";
|
|
11
|
+
import { SchemaPropertyItem } from "./SchemaPropertyItem.js";
|
|
12
|
+
import { UnionView } from "./UnionView.js";
|
|
13
|
+
import { isBasicType } from "./utils.js";
|
|
16
14
|
|
|
17
15
|
const renderMarkdown = (content?: string) =>
|
|
18
16
|
content && (
|
|
@@ -37,10 +35,12 @@ export const SchemaView = ({
|
|
|
37
35
|
schema,
|
|
38
36
|
defaultOpen = false,
|
|
39
37
|
cardHeader,
|
|
38
|
+
embedded,
|
|
40
39
|
}: {
|
|
41
40
|
schema?: SchemaObject | null;
|
|
42
41
|
defaultOpen?: boolean;
|
|
43
42
|
cardHeader?: React.ReactNode;
|
|
43
|
+
embedded?: boolean;
|
|
44
44
|
}) => {
|
|
45
45
|
if (!schema || Object.keys(schema).length === 0) {
|
|
46
46
|
return (
|
|
@@ -57,8 +57,12 @@ export const SchemaView = ({
|
|
|
57
57
|
return <ConstValue schema={schema} />;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
if (
|
|
61
|
-
return <
|
|
60
|
+
if (Array.isArray(schema.oneOf) || Array.isArray(schema.anyOf)) {
|
|
61
|
+
return <UnionView schema={schema} />;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (Array.isArray(schema.allOf)) {
|
|
65
|
+
return <AllOfGroupView schema={schema} />;
|
|
62
66
|
}
|
|
63
67
|
|
|
64
68
|
if (isBasicType(schema.type)) {
|
|
@@ -84,9 +88,9 @@ export const SchemaView = ({
|
|
|
84
88
|
|
|
85
89
|
const additionalProperties =
|
|
86
90
|
typeof schema.additionalProperties === "object" ? (
|
|
87
|
-
<SchemaView schema={schema.additionalProperties} />
|
|
91
|
+
<SchemaView schema={schema.additionalProperties} embedded />
|
|
88
92
|
) : schema.additionalProperties === true ? (
|
|
89
|
-
<
|
|
93
|
+
<div className="text-sm p-4 bg-border/20 hover:bg-border/30 flex items-center gap-1">
|
|
90
94
|
<span>Additional properties are allowed</span>
|
|
91
95
|
<a
|
|
92
96
|
className="p-0.5 -m-0.5"
|
|
@@ -96,11 +100,13 @@ export const SchemaView = ({
|
|
|
96
100
|
>
|
|
97
101
|
<InfoIcon size={14} />
|
|
98
102
|
</a>
|
|
99
|
-
</
|
|
103
|
+
</div>
|
|
100
104
|
) : null;
|
|
101
105
|
|
|
106
|
+
const Component = embedded ? "div" : Card;
|
|
107
|
+
|
|
102
108
|
return (
|
|
103
|
-
<
|
|
109
|
+
<Component className="divide-y overflow-hidden">
|
|
104
110
|
{cardHeader}
|
|
105
111
|
{groupNames.map(
|
|
106
112
|
(group) =>
|
|
@@ -119,7 +125,7 @@ export const SchemaView = ({
|
|
|
119
125
|
),
|
|
120
126
|
)}
|
|
121
127
|
{additionalProperties}
|
|
122
|
-
</
|
|
128
|
+
</Component>
|
|
123
129
|
);
|
|
124
130
|
}
|
|
125
131
|
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import type { SchemaObject } from "../../../oas/parser/index.js";
|
|
2
|
+
import { Badge } from "../../../ui/Badge.js";
|
|
3
|
+
import { Card } from "../../../ui/Card.js";
|
|
4
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from "../../../ui/Tabs.js";
|
|
5
|
+
import { SchemaView } from "./SchemaView.js";
|
|
6
|
+
import {
|
|
7
|
+
decideExclusivity,
|
|
8
|
+
labelForVariant,
|
|
9
|
+
quickGuards,
|
|
10
|
+
unionVariants,
|
|
11
|
+
} from "./union-helpers.js";
|
|
12
|
+
|
|
13
|
+
const DecisionTable = ({
|
|
14
|
+
variants,
|
|
15
|
+
schema,
|
|
16
|
+
}: {
|
|
17
|
+
variants: SchemaObject[];
|
|
18
|
+
schema: SchemaObject;
|
|
19
|
+
}) => {
|
|
20
|
+
const rows = variants.map((v, i) => ({
|
|
21
|
+
label: labelForVariant(i, v),
|
|
22
|
+
guards: quickGuards(v, schema),
|
|
23
|
+
}));
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<div className="flex flex-col gap-2 text-sm">
|
|
27
|
+
<h4 className="font-medium">Decision Table</h4>
|
|
28
|
+
<div className="border rounded-md overflow-hidden">
|
|
29
|
+
<table className="w-full">
|
|
30
|
+
<thead>
|
|
31
|
+
<tr className="border-b bg-muted/50">
|
|
32
|
+
<th className="text-left p-2 font-medium">Variant</th>
|
|
33
|
+
<th className="text-left p-2 font-medium">Matching Criteria</th>
|
|
34
|
+
</tr>
|
|
35
|
+
</thead>
|
|
36
|
+
<tbody className="divide-y">
|
|
37
|
+
{rows.map((row) => (
|
|
38
|
+
<tr key={row.label} className="hover:bg-muted/30">
|
|
39
|
+
<td className="p-2 font-medium">{row.label}</td>
|
|
40
|
+
<td className="p-2 text-muted-foreground text-xs">
|
|
41
|
+
{row.guards.length > 0
|
|
42
|
+
? row.guards.join(" · ")
|
|
43
|
+
: "No specific criteria"}
|
|
44
|
+
</td>
|
|
45
|
+
</tr>
|
|
46
|
+
))}
|
|
47
|
+
</tbody>
|
|
48
|
+
</table>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const VariantPanel = ({ variant }: { variant: SchemaObject }) => (
|
|
55
|
+
<div className="my-4">
|
|
56
|
+
{variant.description && (
|
|
57
|
+
<p className="text-sm text-muted-foreground">{variant.description}</p>
|
|
58
|
+
)}
|
|
59
|
+
<SchemaView schema={variant} />
|
|
60
|
+
</div>
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
export const UnionView = ({ schema }: { schema: SchemaObject }) => {
|
|
64
|
+
const mode = Array.isArray(schema.oneOf)
|
|
65
|
+
? "oneOf"
|
|
66
|
+
: Array.isArray(schema.anyOf)
|
|
67
|
+
? "anyOf"
|
|
68
|
+
: undefined;
|
|
69
|
+
|
|
70
|
+
if (!mode) return null;
|
|
71
|
+
|
|
72
|
+
const exclusivity = decideExclusivity(schema);
|
|
73
|
+
const variants = unionVariants(schema);
|
|
74
|
+
|
|
75
|
+
const semanticsMessage =
|
|
76
|
+
exclusivity === "exactly-one" ? (
|
|
77
|
+
<>
|
|
78
|
+
Exactly one variant <b>must match</b>.
|
|
79
|
+
</>
|
|
80
|
+
) : (
|
|
81
|
+
<>
|
|
82
|
+
At least one variant <b>must match</b>. Multiple variants{" "}
|
|
83
|
+
<i>may match</i> simultaneously.
|
|
84
|
+
</>
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
return (
|
|
88
|
+
<Card className="overflow-hidden">
|
|
89
|
+
<div className="flex flex-col gap-4 p-4">
|
|
90
|
+
<div className="flex items-center gap-2">
|
|
91
|
+
<Badge variant="outline">{mode}</Badge>
|
|
92
|
+
<div className="flex-1 p-2">
|
|
93
|
+
<span className="text-sm">{semanticsMessage}</span>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
<DecisionTable variants={variants} schema={schema} />
|
|
98
|
+
</div>
|
|
99
|
+
<Tabs defaultValue="0" className="w-full px-4">
|
|
100
|
+
<TabsList className="flex w-full">
|
|
101
|
+
{variants.map((v, i) => (
|
|
102
|
+
<TabsTrigger
|
|
103
|
+
key={labelForVariant(i, v)}
|
|
104
|
+
value={String(i)}
|
|
105
|
+
className="flex-1"
|
|
106
|
+
>
|
|
107
|
+
{labelForVariant(i, v)}
|
|
108
|
+
</TabsTrigger>
|
|
109
|
+
))}
|
|
110
|
+
</TabsList>
|
|
111
|
+
{variants.map((v, i) => (
|
|
112
|
+
<TabsContent
|
|
113
|
+
key={labelForVariant(i, v)}
|
|
114
|
+
value={String(i)}
|
|
115
|
+
className="px-2"
|
|
116
|
+
>
|
|
117
|
+
<VariantPanel variant={v} />
|
|
118
|
+
</TabsContent>
|
|
119
|
+
))}
|
|
120
|
+
</Tabs>
|
|
121
|
+
</Card>
|
|
122
|
+
);
|
|
123
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { SchemaObject } from "../../../oas/parser/index.js";
|
|
2
|
+
|
|
3
|
+
export type FieldSignature = {
|
|
4
|
+
type?: SchemaObject["type"];
|
|
5
|
+
const?: unknown;
|
|
6
|
+
enum?: unknown[];
|
|
7
|
+
format?: string;
|
|
8
|
+
pattern?: string;
|
|
9
|
+
minimum?: number;
|
|
10
|
+
maximum?: number;
|
|
11
|
+
exclusiveMinimum?: boolean | number;
|
|
12
|
+
exclusiveMaximum?: boolean | number;
|
|
13
|
+
minLength?: number;
|
|
14
|
+
maxLength?: number;
|
|
15
|
+
minItems?: number;
|
|
16
|
+
maxItems?: number;
|
|
17
|
+
itemsType?: string | string[];
|
|
18
|
+
additionalProps?: "true" | "false" | "schema";
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export type FieldDoc = {
|
|
22
|
+
name: string;
|
|
23
|
+
humanType: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
requiredInAll: boolean;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const unionVariants = (schema: SchemaObject) =>
|
|
29
|
+
(schema.oneOf ?? schema.anyOf ?? []) as SchemaObject[];
|
|
30
|
+
|
|
31
|
+
export const decideExclusivity = (
|
|
32
|
+
schema: SchemaObject,
|
|
33
|
+
): "exactly-one" | "at-least-one" => {
|
|
34
|
+
if (Array.isArray(schema.oneOf)) return "exactly-one";
|
|
35
|
+
|
|
36
|
+
const discriminator = schema.discriminator?.propertyName;
|
|
37
|
+
if (!discriminator) return "at-least-one";
|
|
38
|
+
|
|
39
|
+
const variants = unionVariants(schema);
|
|
40
|
+
const seen = new Set<string>();
|
|
41
|
+
|
|
42
|
+
for (const variant of variants) {
|
|
43
|
+
const prop = variant.properties?.[discriminator];
|
|
44
|
+
|
|
45
|
+
const value =
|
|
46
|
+
prop?.const ??
|
|
47
|
+
(Array.isArray(prop?.enum) && prop.enum.length === 1
|
|
48
|
+
? String(prop.enum[0])
|
|
49
|
+
: undefined);
|
|
50
|
+
|
|
51
|
+
if (value == null || seen.has(String(value))) return "at-least-one";
|
|
52
|
+
seen.add(String(value));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return "exactly-one";
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export const labelForVariant = (index: number, variant: SchemaObject) =>
|
|
59
|
+
variant.title?.trim() || `Variant ${index + 1}`;
|
|
60
|
+
|
|
61
|
+
export const quickGuards = (variant: SchemaObject, root?: SchemaObject) => {
|
|
62
|
+
const guards: string[] = [];
|
|
63
|
+
|
|
64
|
+
if (variant.type) {
|
|
65
|
+
guards.push(
|
|
66
|
+
`type = ${Array.isArray(variant.type) ? variant.type.join("|") : variant.type}`,
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const discriminator = root?.discriminator?.propertyName;
|
|
71
|
+
if (discriminator) {
|
|
72
|
+
const discriminatorProp = variant.properties?.[discriminator] as
|
|
73
|
+
| SchemaObject
|
|
74
|
+
| undefined;
|
|
75
|
+
|
|
76
|
+
const discriminatorValue =
|
|
77
|
+
discriminatorProp?.const ??
|
|
78
|
+
(Array.isArray(discriminatorProp?.enum) &&
|
|
79
|
+
discriminatorProp.enum.length === 1
|
|
80
|
+
? discriminatorProp.enum[0]
|
|
81
|
+
: undefined);
|
|
82
|
+
|
|
83
|
+
if (discriminatorValue !== undefined) {
|
|
84
|
+
guards.push(`${discriminator}=${JSON.stringify(discriminatorValue)}`);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const required = (variant.required ?? []).filter((k) => k !== discriminator);
|
|
89
|
+
if (required.length) {
|
|
90
|
+
const head = required.slice(0, 3).join(", ");
|
|
91
|
+
const more = required.length > 3 ? ` +${required.length - 3} more` : "";
|
|
92
|
+
guards.push(`requires: ${head}${more}`);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return guards;
|
|
96
|
+
};
|
|
@@ -21,17 +21,6 @@ export const isComplexType = (value?: SchemaObject) =>
|
|
|
21
21
|
typeof value.items === "object" &&
|
|
22
22
|
(!value.items.type || value.items.type === "object")));
|
|
23
23
|
|
|
24
|
-
export const hasLogicalGroupings = (value: SchemaObject) =>
|
|
25
|
-
Boolean(value.oneOf ?? value.allOf ?? value.anyOf);
|
|
26
|
-
|
|
27
|
-
export const LogicalSchemaTypeMap = {
|
|
28
|
-
allOf: "AND",
|
|
29
|
-
anyOf: "OR",
|
|
30
|
-
oneOf: "ONE",
|
|
31
|
-
} as const;
|
|
32
|
-
|
|
33
|
-
export type LogicalGroupType = "AND" | "OR" | "ONE";
|
|
34
|
-
|
|
35
24
|
export const isCircularRef = (schema: unknown): schema is string =>
|
|
36
25
|
typeof schema === "string" && schema.startsWith(CIRCULAR_REF);
|
|
37
26
|
|
|
@@ -17,7 +17,6 @@ export const createHttpSnippet = ({
|
|
|
17
17
|
method: operation.method.toUpperCase(),
|
|
18
18
|
url:
|
|
19
19
|
selectedServer + operation.path.replaceAll("{", ":").replaceAll("}", ""),
|
|
20
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
20
|
postData: exampleBody,
|
|
22
21
|
headers: [
|
|
23
22
|
...(exampleBody.text
|
|
@@ -63,7 +62,8 @@ export const createHttpSnippet = ({
|
|
|
63
62
|
};
|
|
64
63
|
|
|
65
64
|
export const getConverted = (snippet: HTTPSnippet, option: string) => {
|
|
66
|
-
|
|
65
|
+
// biome-ignore lint/suspicious/noExplicitAny: Allow any type
|
|
66
|
+
let converted: any;
|
|
67
67
|
switch (option) {
|
|
68
68
|
case "shell":
|
|
69
69
|
converted = snippet.convert("shell", "curl");
|
|
@@ -31,6 +31,7 @@ export const createNavigationCategory = ({
|
|
|
31
31
|
to: `${path}#${operation.slug}`,
|
|
32
32
|
badge: {
|
|
33
33
|
label: operation.method,
|
|
34
|
+
// biome-ignore lint/style/noNonNullAssertion: is guaranteed to be defined
|
|
34
35
|
color: MethodColorMap[operation.method.toLowerCase()]!,
|
|
35
36
|
invert: true,
|
|
36
37
|
},
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { SchemaObject } from "../../../oas/graphql/index.js";
|
|
2
2
|
import { isCircularRef } from "../schema/utils.js";
|
|
3
3
|
|
|
4
4
|
export const generateSchemaExample = (
|
|
5
5
|
schema?: SchemaObject,
|
|
6
6
|
name?: string,
|
|
7
|
-
//
|
|
7
|
+
// biome-ignore lint/suspicious/noExplicitAny: Allow any type
|
|
8
8
|
): any => {
|
|
9
9
|
if (!schema || isCircularRef(schema)) {
|
|
10
10
|
return null;
|
|
@@ -36,6 +36,7 @@ export const generateSchemaExample = (
|
|
|
36
36
|
|
|
37
37
|
// For object schemas with properties
|
|
38
38
|
if (schema.type === "object" && schema.properties) {
|
|
39
|
+
// biome-ignore lint/suspicious/noExplicitAny: Allow any type
|
|
39
40
|
const example: Record<string, any> = {};
|
|
40
41
|
|
|
41
42
|
for (const [key, propSchema] of Object.entries(schema.properties)) {
|
|
@@ -53,7 +54,6 @@ export const generateSchemaExample = (
|
|
|
53
54
|
generateSchemaExample(itemSchema as SchemaObject),
|
|
54
55
|
);
|
|
55
56
|
}
|
|
56
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- OpenAPI schemas don't always adhere to spec
|
|
57
57
|
if (schema.items) {
|
|
58
58
|
return [generateSchemaExample(schema.items as SchemaObject)];
|
|
59
59
|
}
|
|
@@ -116,7 +116,6 @@ export const generateSchemaExample = (
|
|
|
116
116
|
return null;
|
|
117
117
|
case "object":
|
|
118
118
|
return {};
|
|
119
|
-
case undefined:
|
|
120
119
|
default:
|
|
121
120
|
return {};
|
|
122
121
|
}
|
|
@@ -2,8 +2,8 @@ import { useSuspenseQuery } from "@tanstack/react-query";
|
|
|
2
2
|
import {
|
|
3
3
|
generatePath,
|
|
4
4
|
Navigate,
|
|
5
|
-
redirect,
|
|
6
5
|
type RouteObject,
|
|
6
|
+
redirect,
|
|
7
7
|
useLocation,
|
|
8
8
|
useParams,
|
|
9
9
|
} from "react-router";
|
|
@@ -170,7 +170,7 @@ export const getRoutes = ({
|
|
|
170
170
|
basePath,
|
|
171
171
|
routePath: basePath,
|
|
172
172
|
routes: [
|
|
173
|
-
createNonTagPagesRoute({ path: basePath
|
|
173
|
+
createNonTagPagesRoute({ path: `${basePath}/:tag?` }),
|
|
174
174
|
...createAdditionalRoutes(basePath),
|
|
175
175
|
],
|
|
176
176
|
client,
|
|
@@ -38,7 +38,7 @@ const InkeepSearch = ({
|
|
|
38
38
|
sync: {
|
|
39
39
|
target: "html",
|
|
40
40
|
attributes: ["class"],
|
|
41
|
-
isDarkMode: (attrs) => attrs
|
|
41
|
+
isDarkMode: (attrs) => attrs.class?.includes("dark") ?? false,
|
|
42
42
|
},
|
|
43
43
|
},
|
|
44
44
|
},
|
|
@@ -57,7 +57,7 @@ const InkeepSearch = ({
|
|
|
57
57
|
InkeepComponentInstance | undefined
|
|
58
58
|
>(
|
|
59
59
|
typeof window !== "undefined" && window.Inkeep?.ModalSearchAndChat
|
|
60
|
-
? window.Inkeep.ModalSearchAndChat(config)
|
|
60
|
+
? window.Inkeep.ModalSearchAndChat(config)
|
|
61
61
|
: undefined,
|
|
62
62
|
);
|
|
63
63
|
|
|
@@ -66,7 +66,7 @@ const InkeepSearch = ({
|
|
|
66
66
|
|
|
67
67
|
const checkInkeep = setInterval(() => {
|
|
68
68
|
if (typeof window !== "undefined" && window.Inkeep?.ModalSearchAndChat) {
|
|
69
|
-
const inkeep = window.Inkeep.ModalSearchAndChat(config)
|
|
69
|
+
const inkeep = window.Inkeep.ModalSearchAndChat(config);
|
|
70
70
|
setSearchInstance(inkeep);
|
|
71
71
|
clearInterval(checkInkeep);
|
|
72
72
|
}
|
|
@@ -63,7 +63,7 @@ const usePagefind = (options: PagefindOptions) => {
|
|
|
63
63
|
});
|
|
64
64
|
|
|
65
65
|
if (result.isError && result.error.message !== "NOT_BUILT_YET") {
|
|
66
|
-
//
|
|
66
|
+
// biome-ignore lint/suspicious/noConsole: Logging allowed here
|
|
67
67
|
console.error(result.error);
|
|
68
68
|
}
|
|
69
69
|
|
|
@@ -141,9 +141,7 @@ export const PagefindSearch = ({
|
|
|
141
141
|
<Callout type="info">
|
|
142
142
|
Search is currently not available in development mode by default.
|
|
143
143
|
<br />
|
|
144
|
-
To still use search in development, run <code>
|
|
145
|
-
zudoku build
|
|
146
|
-
</code>{" "}
|
|
144
|
+
To still use search in development, run <code>zudoku build</code>{" "}
|
|
147
145
|
and copy the <code>dist/pagefind</code> directory to your{" "}
|
|
148
146
|
<code>public</code> directory.
|
|
149
147
|
</Callout>
|