@redocly/framework 1.0.0-next.1 → 1.0.0-next.11
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/dist/bundler/build/output-metadata.js +1 -1
- package/dist/bundler/build/run.js +1 -1
- package/dist/bundler/build/theme-global-style-compiler.js +1 -0
- package/dist/bundler/build/theme-global-stylesheets.js +1 -0
- package/dist/bundler/build/vite-config.js +2 -2
- package/dist/bundler/dev/dev-content-build.js +1 -0
- package/dist/bundler/dev/dev-problems.js +1 -1
- package/dist/bundler/dev/dev-reporter.js +1 -1
- package/dist/bundler/dev/routes/dev-content-build-route.js +1 -0
- package/dist/bundler/dev/routes/dev-problems-route.js +1 -1
- package/dist/bundler/dev/run.js +1 -1
- package/dist/bundler/dev/runtime-app.js +1 -1
- package/dist/bundler/dev/vite-config.js +1 -1
- package/dist/bundler/node-bundle.js +1 -0
- package/dist/bundler/runtime-files.js +1 -1
- package/dist/bundler/user-markdoc-schema.js +1 -1
- package/dist/bundler/vite-config.base.js +12 -12
- package/dist/cli/api-docs-build-event.js +1 -0
- package/dist/cli/commands/build.js +1 -1
- package/dist/cli/commands/ingest.js +1 -1
- package/dist/cli/commands/translate.js +1 -1
- package/dist/cli/dev-console/{sweep.js → content-build.js} +1 -1
- package/dist/cli/dev-console/index.js +1 -1
- package/dist/cli/dev-console/lines.js +2 -2
- package/dist/cli/dev-console/plain.js +1 -1
- package/dist/cli/dev-console/tui.js +2 -2
- package/dist/cli/output.js +12 -12
- package/dist/cli/validate-react-pages.js +1 -1
- package/dist/client/ApiAccess.js +3 -0
- package/dist/client/NavigationProgress.js +1 -1
- package/dist/client/ProductsProvider.js +1 -1
- package/dist/client/RouteErrorBoundary.js +1 -1
- package/dist/client/RuntimeLink.js +1 -0
- package/dist/client/ThemeGlobalStyle.js +1 -0
- package/dist/client/UnversionedVersionButton.js +1 -1
- package/dist/client/app.js +2 -7
- package/dist/client/client-entry.js +1 -1
- package/dist/client/dev-problems/ProblemsBar.js +75 -15
- package/dist/client/dev-problems/ProblemsModal.js +15 -15
- package/dist/client/dev-problems/build-segment.js +1 -0
- package/dist/client/dev-problems/index.js +1 -1
- package/dist/client/dev-problems/use-dev-problems.js +1 -1
- package/dist/client/experiments/runtime.js +1 -1
- package/dist/client/history-mount.js +1 -0
- package/dist/client/l10n/use-l10n-config.js +1 -1
- package/dist/client/l10n/use-l10n-href.js +1 -1
- package/dist/client/l10n/use-translate.js +1 -1
- package/dist/client/products.js +1 -1
- package/dist/client/review/ReviewBar.js +163 -69
- package/dist/client/review/login-url.js +1 -0
- package/dist/client/revisions-history.js +1 -1
- package/dist/client/sidebar/PoweredByRedocly.js +2 -2
- package/dist/client/ssr.js +1 -1
- package/dist/client/telemetry/report-preload-failure.js +1 -0
- package/dist/client/templates/dev-login.js +4 -4
- package/dist/client/templates/unauthorized.js +5 -5
- package/dist/client/theme-global-css.js +1 -0
- package/dist/client/use-banner.js +1 -1
- package/dist/client/use-bar-position.js +1 -0
- package/dist/client/use-page-versions.js +1 -1
- package/dist/client/use-router-for-local-links.js +1 -1
- package/dist/client/use-search.js +1 -1
- package/dist/client/utils/routes/is-router-path.js +1 -0
- package/dist/client/webmcp/tools/shared.js +1 -1
- package/dist/content-layer/allowed-packages.js +1 -1
- package/dist/content-layer/api-outputs.js +1 -1
- package/dist/content-layer/config-schema.d.ts +12 -3
- package/dist/content-layer/config-schema.js +1 -1
- package/dist/content-layer/config.d.ts +30 -12
- package/dist/content-layer/config.js +1 -1
- package/dist/content-layer/context.d.ts +2 -0
- package/dist/content-layer/context.js +1 -1
- package/dist/content-layer/database/adapters/node-sqlite-client.js +1 -1
- package/dist/content-layer/database/assets.js +1 -1
- package/dist/content-layer/database/blobs.js +1 -1
- package/dist/content-layer/database/connection.js +1 -1
- package/dist/content-layer/database/entity-store.d.ts +24 -3
- package/dist/content-layer/database/entity-store.js +1 -1
- package/dist/content-layer/database/files.js +1 -1
- package/dist/content-layer/database/finalize.js +1 -1
- package/dist/content-layer/database/invalidation.d.ts +6 -0
- package/dist/content-layer/database/invalidation.js +26 -26
- package/dist/content-layer/database/link-refs.js +1 -1
- package/dist/content-layer/database/origins.d.ts +2 -4
- package/dist/content-layer/database/origins.js +1 -1
- package/dist/content-layer/database/problems.d.ts +2 -0
- package/dist/content-layer/database/problems.js +1 -1
- package/dist/content-layer/database/reset.js +1 -1
- package/dist/content-layer/database/route-query-deps.js +1 -1
- package/dist/content-layer/database/schema.d.ts +50 -0
- package/dist/content-layer/database/schema.js +1 -1
- package/dist/content-layer/database/search-vocab.js +2 -2
- package/dist/content-layer/database/site-config.d.ts +23 -0
- package/dist/content-layer/database/site-config.js +1 -1
- package/dist/content-layer/database/static-files.js +1 -1
- package/dist/content-layer/ingest/extract-all-phase.js +1 -1
- package/dist/content-layer/ingest/finalize-phase.js +1 -1
- package/dist/content-layer/ingest/git-last-modified.js +3 -3
- package/dist/content-layer/ingest/hash.js +1 -1
- package/dist/content-layer/ingest/hook-inputs.js +1 -1
- package/dist/content-layer/ingest/l10n-warnings.js +1 -1
- package/dist/content-layer/ingest/markdoc-schema-problem.js +1 -0
- package/dist/content-layer/ingest/rbac-teams.js +1 -1
- package/dist/content-layer/ingest/run.js +1 -1
- package/dist/content-layer/ingest/scan.d.ts +1 -1
- package/dist/content-layer/ingest/scan.js +1 -1
- package/dist/content-layer/ingest/search-sync.js +1 -1
- package/dist/content-layer/ingest/slugger/resolve-final-slugs.js +1 -1
- package/dist/content-layer/ingest/sync.js +1 -1
- package/dist/content-layer/link-checker/delta.js +1 -1
- package/dist/content-layer/link-checker/fingerprint.js +1 -1
- package/dist/content-layer/link-checker/load-view.js +1 -1
- package/dist/content-layer/link-checker/run-build.js +1 -1
- package/dist/content-layer/link-checker/validate.js +1 -1
- package/dist/content-layer/link-checker/view.js +1 -1
- package/dist/content-layer/loaders/context.js +1 -1
- package/dist/content-layer/loaders/define.d.ts +3 -0
- package/dist/content-layer/markdown/client/JsonSchemaTag.js +1 -1
- package/dist/content-layer/markdown/client/OpenapiTagComponents.js +2 -2
- package/dist/content-layer/markdown/client/code-highlight-notation.js +3 -3
- package/dist/content-layer/markdown/client/dynamic-components.js +1 -1
- package/dist/content-layer/markdown/client/markdoc-components.js +2 -2
- package/dist/content-layer/markdown/constants/builtin-tags.js +1 -1
- package/dist/content-layer/markdown/constants/markdown-text-tag-set.js +1 -1
- package/dist/content-layer/markdown/constants/tag-sets.d.ts +20 -5
- package/dist/content-layer/markdown/constants/tag-sets.js +1 -1
- package/dist/content-layer/markdown/nodes/fence.js +1 -1
- package/dist/content-layer/markdown/nodes/heading.js +1 -1
- package/dist/content-layer/markdown/nodes/table.js +1 -1
- package/dist/content-layer/markdown/resolve/ast.js +1 -1
- package/dist/content-layer/markdown/resolve/attribute-resolver-key.d.ts +8 -1
- package/dist/content-layer/markdown/resolve/attribute-resolver-key.js +1 -1
- package/dist/content-layer/markdown/resolve/audience-tag.d.ts +2 -6
- package/dist/content-layer/markdown/resolve/audience-tag.js +1 -1
- package/dist/content-layer/markdown/resolve/markdoc-resolvers/code-snippet.js +5 -4
- package/dist/content-layer/markdown/resolve/markdoc-resolvers/code-walkthrough/filesets.js +1 -1
- package/dist/content-layer/markdown/resolve/markdoc-resolvers/diagram-file.js +1 -1
- package/dist/content-layer/markdown/resolve/markdoc-resolvers/file-reference.js +1 -1
- package/dist/content-layer/markdown/resolve/markdoc-resolvers/json-schema.d.ts +2 -1
- package/dist/content-layer/markdown/resolve/markdoc-resolvers/json-schema.js +1 -1
- package/dist/content-layer/markdown/resolve/markdoc-resolvers/operation-samples.d.ts +1 -1
- package/dist/content-layer/markdown/resolve/markdoc-resolvers/operation-samples.js +1 -1
- package/dist/content-layer/markdown/resolve/markdoc-resolvers/partial.js +1 -1
- package/dist/content-layer/markdown/resolve/markdoc-resolvers/svg-content.js +1 -1
- package/dist/content-layer/markdown/resolve/markdoc.d.ts +2 -1
- package/dist/content-layer/markdown/resolve/markdoc.js +1 -1
- package/dist/content-layer/markdown/resolve/raw-partials.d.ts +2 -1
- package/dist/content-layer/markdown/resolve/raw-partials.js +1 -1
- package/dist/content-layer/markdown/resolve/references.d.ts +3 -1
- package/dist/content-layer/markdown/resolve/references.js +1 -1
- package/dist/content-layer/markdown/resolve/render-diagrams.d.ts +8 -1
- package/dist/content-layer/markdown/resolve/render-diagrams.js +1 -1
- package/dist/content-layer/markdown/search/to-markdown.js +2 -2
- package/dist/content-layer/markdown/search/to-sections.d.ts +8 -3
- package/dist/content-layer/markdown/search/to-sections.js +1 -1
- package/dist/content-layer/markdown/search/to-text.d.ts +4 -1
- package/dist/content-layer/markdown/search/to-text.js +5 -5
- package/dist/content-layer/markdown/server/render.d.ts +4 -2
- package/dist/content-layer/markdown/server/render.js +1 -1
- package/dist/content-layer/markdown/service.js +1 -1
- package/dist/content-layer/markdown/tags/html.d.ts +5 -2
- package/dist/content-layer/markdown/tags/html.js +1 -1
- package/dist/content-layer/markdown/tags/markdoc-error.d.ts +8 -0
- package/dist/content-layer/markdown/tags/markdoc-error.js +1 -1
- package/dist/content-layer/markdown/tags/openapi.d.ts +1 -1
- package/dist/content-layer/markdown/tags/openapi.js +1 -1
- package/dist/content-layer/markdown/tags/partial.d.ts +9 -3
- package/dist/content-layer/markdown/tags/partial.js +1 -1
- package/dist/content-layer/markdown/tags/variant.d.ts +6 -0
- package/dist/content-layer/markdown/tags/variant.js +1 -0
- package/dist/content-layer/markdown/types/service.d.ts +6 -0
- package/dist/content-layer/markdown/utils/collect-anchors.js +1 -1
- package/dist/content-layer/markdown/utils/collect-headings.d.ts +3 -1
- package/dist/content-layer/markdown/utils/collect-headings.js +1 -1
- package/dist/content-layer/markdown/utils/first-heading.js +1 -1
- package/dist/content-layer/markdown/utils/heading-slugger.d.ts +8 -0
- package/dist/content-layer/markdown/utils/heading-slugger.js +1 -1
- package/dist/content-layer/markdown/utils/node-source-range.d.ts +3 -3
- package/dist/content-layer/markdown/utils/node-source-range.js +1 -1
- package/dist/content-layer/markdown/utils/parse-cache.js +1 -1
- package/dist/content-layer/markdown/utils/reparse-example-fences.d.ts +4 -1
- package/dist/content-layer/markdown/utils/reparse-example-fences.js +1 -1
- package/dist/content-layer/markdown/utils/substitute-variables.js +1 -1
- package/dist/content-layer/markdown/utils/walk-markdoc-ast.d.ts +2 -2
- package/dist/content-layer/markdown/utils/walk-markdoc-ast.js +1 -1
- package/dist/content-layer/materialization/asset-reconcile.js +1 -1
- package/dist/content-layer/materialization/entity.js +1 -1
- package/dist/content-layer/materialization/materializer.js +1 -0
- package/dist/content-layer/materialization/static-files.js +1 -1
- package/dist/content-layer/plan-gates.d.ts +3 -2
- package/dist/content-layer/plan-gates.js +1 -1
- package/dist/content-layer/plugins/execute.js +1 -1
- package/dist/content-layer/plugins/index.js +1 -1
- package/dist/content-layer/plugins/internal/api-docs/client/event-handlers.js +1 -1
- package/dist/content-layer/plugins/internal/api-docs/client/rebase-item-links.js +1 -1
- package/dist/content-layer/plugins/internal/api-docs/client/template.js +12 -4
- package/dist/content-layer/plugins/internal/api-docs/index.js +1 -1
- package/dist/content-layer/plugins/internal/api-docs/server/build-definition.d.ts +28 -13
- package/dist/content-layer/plugins/internal/api-docs/server/build-definition.js +1 -1
- package/dist/content-layer/plugins/internal/api-docs/server/build-sidebar.js +1 -1
- package/dist/content-layer/plugins/internal/api-docs/server/declares-proto-service.d.ts +2 -0
- package/dist/content-layer/plugins/internal/api-docs/server/declares-proto-service.js +3 -0
- package/dist/content-layer/plugins/internal/api-docs/server/markdown-copy.d.ts +14 -0
- package/dist/content-layer/plugins/internal/api-docs/server/markdown-copy.js +23 -0
- package/dist/content-layer/plugins/internal/api-docs/server/markdown-decorator.d.ts +1 -4
- package/dist/content-layer/plugins/internal/api-docs/server/markdown-decorator.js +1 -1
- package/dist/content-layer/plugins/internal/api-docs/server/options.d.ts +4 -2
- package/dist/content-layer/plugins/internal/api-docs/server/options.js +1 -1
- package/dist/content-layer/plugins/internal/api-docs/server/search-documents.d.ts +1 -1
- package/dist/content-layer/plugins/internal/api-docs/server/search-documents.js +1 -1
- package/dist/content-layer/plugins/internal/api-docs/server/spec-download.js +1 -1
- package/dist/content-layer/plugins/internal/api-functions/index.js +1 -1
- package/dist/content-layer/plugins/internal/api-functions/server/access.js +1 -1
- package/dist/content-layer/plugins/internal/api-functions/server/api-function-telemetry.js +1 -0
- package/dist/content-layer/plugins/internal/api-functions/server/dispatch.js +1 -1
- package/dist/content-layer/plugins/internal/app-data/banner.js +1 -1
- package/dist/content-layer/plugins/internal/app-data/index.d.ts +1 -1
- package/dist/content-layer/plugins/internal/app-data/index.js +1 -1
- package/dist/content-layer/plugins/internal/app-data/products.d.ts +2 -0
- package/dist/content-layer/plugins/internal/app-data/products.js +1 -1
- package/dist/content-layer/plugins/internal/catalog-classic/client/catalog-filtering.js +1 -1
- package/dist/content-layer/plugins/internal/catalog-classic/index.js +1 -1
- package/dist/content-layer/plugins/internal/catalog-classic/resolve-items.d.ts +1 -1
- package/dist/content-layer/plugins/internal/catalog-classic/resolve-items.js +1 -1
- package/dist/content-layer/plugins/internal/catalog-classic/sidebars.d.ts +1 -1
- package/dist/content-layer/plugins/internal/index.js +1 -1
- package/dist/content-layer/plugins/internal/l10n/index.js +1 -1
- package/dist/content-layer/plugins/internal/l10n/translations-loader.js +1 -1
- package/dist/content-layer/plugins/internal/markdoc/client/template.js +1 -1
- package/dist/content-layer/plugins/internal/markdoc/index.js +1 -1
- package/dist/content-layer/plugins/internal/markdoc/server/shared.d.ts +1 -1
- package/dist/content-layer/plugins/internal/mcp/constants.d.ts +20 -0
- package/dist/content-layer/plugins/internal/mcp/constants.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/content-tools.d.ts +4 -1
- package/dist/content-layer/plugins/internal/mcp/content-tools.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/index.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/agent-card.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/audit.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/auth.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/code-credentials.js +2 -2
- package/dist/content-layer/plugins/internal/mcp/server/codemode/capabilities.js +6 -6
- package/dist/content-layer/plugins/internal/mcp/server/codemode/constants.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/codemode/discover.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/codemode/execute-schema.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/codemode/index.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/codemode/prompts.js +8 -8
- package/dist/content-layer/plugins/internal/mcp/server/config-gate.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/custom-tools.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/gateway/allowed-http-methods.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/gateway/api-call-operations.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/gateway/call-api.js +2 -0
- package/dist/content-layer/plugins/internal/mcp/server/gateway/credentials-page/form-page.js +10 -10
- package/dist/content-layer/plugins/internal/mcp/server/gateway/credentials-page/outcome-pages.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/gateway/credentials.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/gateway/elicitation.js +7 -6
- package/dist/content-layer/plugins/internal/mcp/server/gateway/fetch/allowed-hosts.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/gateway/fetch/fetch-bridge.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/gateway/fetch/fetch-errors.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/gateway/fetch/ssrf-guard.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/gateway/fetch/upstream-detail.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/gateway/index.js +3 -3
- package/dist/content-layer/plugins/internal/mcp/server/gateway/secret-store.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/gateway/tool-list.js +1 -0
- package/dist/content-layer/plugins/internal/mcp/server/gateway/tools.js +4 -4
- package/dist/content-layer/plugins/internal/mcp/server/gateway/upstream-auth-scheme.js +2 -2
- package/dist/content-layer/plugins/internal/mcp/server/handler.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/mcp-server.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/mcp-telemetry.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/oauth/authorize.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/oauth/discovery.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/rate-limit.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/server-card.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/skills-resources.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/tools/graphql-catalog.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/tools/openapi-catalog.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/tools/openapi-document.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/tools/openapi-refs.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/tools/openapi.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/tools/pages-navigation.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/tools/pages.js +2 -2
- package/dist/content-layer/plugins/internal/mcp/server/tools/schemas.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/workflows/catalog.js +1 -0
- package/dist/content-layer/plugins/internal/mcp/server/workflows/document-resolver.js +1 -0
- package/dist/content-layer/plugins/internal/mcp/server/workflows/operations-subset.js +1 -0
- package/dist/content-layer/plugins/internal/mcp/server/workflows/resolve-workflows.js +1 -0
- package/dist/content-layer/plugins/internal/mcp/server/workflows/run-workflow.js +1 -0
- package/dist/content-layer/plugins/internal/mcp/server/workflows/schemas.js +1 -0
- package/dist/content-layer/plugins/internal/mcp/server/workflows/tools.js +1 -0
- package/dist/content-layer/plugins/internal/mcp/server/workflows/types.js +1 -0
- package/dist/content-layer/plugins/internal/mcp/server/workflows/workflow-references.js +1 -0
- package/dist/content-layer/plugins/internal/mock/server/handler.js +1 -1
- package/dist/content-layer/plugins/internal/react-page/index.d.ts +3 -2
- package/dist/content-layer/plugins/internal/react-page/index.js +1 -1
- package/dist/content-layer/plugins/internal/scorecard-classic/client/Grid.js +11 -11
- package/dist/content-layer/plugins/internal/scorecard-classic/client/ScorecardViews.js +1 -1
- package/dist/content-layer/plugins/internal/scorecard-classic/client/ScorecardWidgets.js +7 -7
- package/dist/content-layer/plugins/internal/scorecard-classic/client/template.js +2 -2
- package/dist/content-layer/plugins/internal/sidebar/bundle.d.ts +18 -17
- package/dist/content-layer/plugins/internal/sidebar/bundle.js +1 -1
- package/dist/content-layer/plugins/internal/sidebar/index.d.ts +5 -3
- package/dist/content-layer/plugins/internal/sidebar/index.js +2 -2
- package/dist/content-layer/plugins/internal/sidebar/subtree.js +1 -1
- package/dist/content-layer/plugins/internal/skills/index.js +1 -1
- package/dist/content-layer/plugins/internal/skills/server/routes.js +1 -1
- package/dist/content-layer/plugins/internal/versions/index.js +1 -1
- package/dist/content-layer/plugins/project/load.js +2 -2
- package/dist/content-layer/plugins/registry.js +1 -1
- package/dist/content-layer/plugins/request-context.d.ts +5 -0
- package/dist/content-layer/plugins/types/api-entity.d.ts +2 -6
- package/dist/content-layer/plugins/types/api-entity.js +1 -1
- package/dist/content-layer/plugins/types/markdoc.d.ts +2 -0
- package/dist/content-layer/plugins/types/plugin.d.ts +13 -0
- package/dist/content-layer/plugins/types/search.d.ts +14 -3
- package/dist/content-layer/plugins/utils/link-access.d.ts +2 -0
- package/dist/content-layer/plugins/utils/link-access.js +1 -1
- package/dist/content-layer/plugins/utils/route-index.d.ts +1 -1
- package/dist/content-layer/plugins/utils/route-index.js +1 -1
- package/dist/content-layer/plugins/utils/sidebar-label.d.ts +4 -1
- package/dist/content-layer/plugins/utils/sidebar-label.js +1 -1
- package/dist/content-layer/plugins/utils/version-path.js +1 -1
- package/dist/content-layer/plugins/work-time.js +1 -0
- package/dist/content-layer/problems/codes.d.ts +10 -0
- package/dist/content-layer/problems/codes.js +1 -1
- package/dist/content-layer/revisions/config.js +1 -1
- package/dist/content-layer/revisions/delete.js +1 -1
- package/dist/content-layer/search/engine/core/content-parser.js +1 -1
- package/dist/content-layer/search/engine/core/search-engine.js +1 -1
- package/dist/content-layer/search/facet-rows.js +1 -1
- package/dist/content-layer/search/keywords.d.ts +18 -0
- package/dist/content-layer/search/keywords.js +1 -0
- package/dist/content-layer/search/postings/fragment-field.d.ts +2 -0
- package/dist/content-layer/search/postings/fragment-field.js +1 -1
- package/dist/content-layer/search/postings/postings-store.d.ts +14 -0
- package/dist/content-layer/search/postings/postings-store.js +1 -1
- package/dist/content-layer/search/store.d.ts +14 -1
- package/dist/content-layer/server/context.js +1 -1
- package/dist/content-layer/server/database.js +1 -1
- package/dist/content-layer/server/materialize.js +1 -1
- package/dist/content-layer/static/audience.js +1 -1
- package/dist/content-layer/static/registry.js +1 -1
- package/dist/content-layer/templates/template-set.js +1 -1
- package/dist/content-layer/versions/group-info.d.ts +21 -0
- package/dist/content-layer/versions/group-info.js +1 -0
- package/dist/content-layer/versions/redirect.d.ts +24 -17
- package/dist/content-layer/versions/redirect.js +1 -1
- package/dist/content-layer/versions/resolve.d.ts +1 -21
- package/dist/content-layer/versions/resolve.js +1 -1
- package/dist/content-layer/versions/version-groups.d.ts +5 -1
- package/dist/content-layer/versions/version-groups.js +1 -1
- package/dist/plugin-api.d.ts +3 -0
- package/dist/plugin-api.js +1 -1
- package/dist/server/analytics-tags.js +1 -1
- package/dist/server/app.js +3 -3
- package/dist/server/ask-ai/feature-gate.js +1 -1
- package/dist/server/ask-ai/route.js +1 -1
- package/dist/server/auth/access-config.js +1 -1
- package/dist/server/auth/gate.js +1 -1
- package/dist/server/auth/middleware.js +1 -1
- package/dist/server/auth/oidc.js +1 -1
- package/dist/server/auth/request.js +1 -1
- package/dist/server/auth/routes.js +1 -1
- package/dist/server/auth/runtime.js +1 -1
- package/dist/server/content-assets/access.js +1 -1
- package/dist/server/content.js +14 -13
- package/dist/server/feedback/route.js +1 -1
- package/dist/server/html-tags.js +2 -1
- package/dist/server/lambda-entry.js +1 -1
- package/dist/server/llms-txt.js +1 -1
- package/dist/server/manifest-assets.js +2 -2
- package/dist/server/metrics/request-metrics.js +1 -1
- package/dist/server/node-entry.js +1 -1
- package/dist/server/page-handlers.js +1 -1
- package/dist/server/plugin-context.js +1 -1
- package/dist/server/plugin-routes.js +1 -1
- package/dist/server/public-url.js +1 -0
- package/dist/server/rbac/content-asset-access.js +1 -1
- package/dist/server/redirects.js +1 -1
- package/dist/server/replay-oauth2/route.js +1 -1
- package/dist/server/review/route.js +1 -1
- package/dist/server/runtime-config.js +1 -1
- package/dist/server/search/cache.js +1 -0
- package/dist/server/search/route.js +1 -1
- package/dist/server/search/search-telemetry.js +1 -0
- package/dist/server/seo-tags.js +2 -2
- package/dist/server/ssrf/ssrf-blocklist.js +1 -1
- package/dist/server/static-files/serve.js +1 -1
- package/dist/server/subprocess/runner.js +1 -1
- package/dist/server/telemetry/mock-server-events.js +1 -0
- package/dist/server/telemetry/redirect-event.js +1 -0
- package/dist/server/telemetry/route.js +1 -1
- package/dist/server/telemetry/sender.js +1 -1
- package/dist/server/telemetry/server-events.js +1 -1
- package/dist/server/template-ids.js +1 -1
- package/dist/shared/constants/api-spec-kinds.d.ts +7 -0
- package/dist/shared/constants/api-spec-kinds.js +1 -0
- package/dist/shared/constants/content-update.js +1 -1
- package/dist/shared/constants/dependency-pack.js +1 -1
- package/dist/shared/constants/dev-content-build.js +1 -0
- package/dist/shared/constants/dev-problems.js +1 -1
- package/dist/shared/constants/dev-source-sync.js +1 -1
- package/dist/shared/constants/l10n/langs/ar.js +1 -1
- package/dist/shared/constants/l10n/langs/de.js +1 -1
- package/dist/shared/constants/l10n/langs/en.js +1 -1
- package/dist/shared/constants/l10n/langs/es.js +1 -1
- package/dist/shared/constants/l10n/langs/fr.js +1 -1
- package/dist/shared/constants/l10n/langs/hi.js +1 -1
- package/dist/shared/constants/l10n/langs/it.js +1 -1
- package/dist/shared/constants/l10n/langs/ja.js +1 -1
- package/dist/shared/constants/l10n/langs/ko.js +1 -1
- package/dist/shared/constants/l10n/langs/pl.js +1 -1
- package/dist/shared/constants/l10n/langs/pt-br.js +1 -1
- package/dist/shared/constants/l10n/langs/pt.js +1 -1
- package/dist/shared/constants/l10n/langs/ru.js +1 -1
- package/dist/shared/constants/l10n/langs/uk.js +1 -1
- package/dist/shared/constants/l10n/langs/zh.js +1 -1
- package/dist/shared/constants/manifest-version.d.ts +3 -1
- package/dist/shared/constants/openapi-operation-methods.d.ts +2 -0
- package/dist/shared/constants/openapi-operation-methods.js +1 -0
- package/dist/shared/constants/review.d.ts +5 -0
- package/dist/shared/constants/review.js +1 -1
- package/dist/{server → shared}/constants/system-routes.d.ts +1 -1
- package/dist/shared/constants/system-routes.js +1 -0
- package/dist/shared/constants/versions.d.ts +2 -0
- package/dist/shared/constants/versions.js +1 -1
- package/dist/shared/experiments.js +1 -1
- package/dist/shared/load-dot-env.js +1 -1
- package/dist/shared/plan-gates.d.ts +9 -3
- package/dist/shared/plan-gates.js +1 -1
- package/dist/shared/products.js +1 -1
- package/dist/shared/project-env.d.ts +12 -0
- package/dist/shared/project-env.js +1 -0
- package/dist/shared/public-env.d.ts +9 -0
- package/dist/shared/public-env.js +1 -1
- package/dist/{server → shared}/rbac/api-docs.d.ts +3 -2
- package/dist/shared/rbac/api-docs.js +1 -0
- package/dist/{server → shared}/rbac/engine.d.ts +13 -10
- package/dist/shared/rbac/engine.js +0 -0
- package/dist/{server → shared}/rbac/filter.d.ts +2 -0
- package/dist/shared/rbac/filter.js +1 -0
- package/dist/{server → shared}/rbac/l10n-rules.d.ts +1 -1
- package/dist/shared/rbac/l10n-rules.js +1 -0
- package/dist/{server → shared}/rbac/route-scope.d.ts +1 -1
- package/dist/shared/rbac/route-scope.js +1 -0
- package/dist/{server → shared}/rbac/team-templates.d.ts +6 -2
- package/dist/shared/rbac/team-templates.js +1 -0
- package/dist/{server → shared}/rbac/teams.d.ts +1 -1
- package/dist/shared/rbac/types.js +1 -0
- package/dist/shared/search/facets.d.ts +5 -0
- package/dist/shared/search/facets.js +1 -1
- package/dist/shared/types/auth.d.ts +1 -0
- package/dist/shared/types/config.d.ts +5 -0
- package/dist/shared/types/search.d.ts +8 -2
- package/dist/shared/types/sidebar.d.ts +1 -0
- package/dist/shared/utils/l10n.js +1 -1
- package/dist/shared/utils/redirect-match.js +1 -0
- package/dist/shared/utils/routes/markdown-copy-url.js +1 -0
- package/drizzle/20261103061150_site_config_effective_hash/migration.sql +1 -0
- package/drizzle/20261105151816_search_http_path_tokens/migration.sql +1 -0
- package/drizzle/20261111152552_page_markdown_rbac_scope/migration.sql +1 -0
- package/package.json +37 -13
- package/dist/bundler/dev/__tests__/reset-content-update-state.js +0 -1
- package/dist/bundler/dev/materialization-sweeper.js +0 -1
- package/dist/client/dev-problems/sweep-segment.js +0 -1
- package/dist/client/review/use-bar-position.js +0 -1
- package/dist/content-layer/plugins/internal/api-docs/server/markdown-docs.d.ts +0 -5
- package/dist/content-layer/plugins/internal/api-docs/server/markdown-docs.js +0 -26
- package/dist/content-layer/plugins/internal/mcp/server/gateway/__tests__/fake-kv.js +0 -1
- package/dist/content-layer/server/config.js +0 -1
- package/dist/server/__tests__/rbac-fixture.js +0 -1
- package/dist/server/__tests__/test-session.js +0 -1
- package/dist/server/constants/system-routes.js +0 -1
- package/dist/server/rbac/api-docs.js +0 -1
- package/dist/server/rbac/engine.js +0 -0
- package/dist/server/rbac/filter.js +0 -1
- package/dist/server/rbac/l10n-rules.js +0 -1
- package/dist/server/rbac/route-scope.js +0 -1
- package/dist/server/rbac/team-templates.js +0 -1
- package/dist/server/rbac/types.js +0 -1
- package/dist/shared/utils/routes/markdown-path.js +0 -1
- /package/dist/{server → shared}/rbac/entity-scope.js +0 -0
- /package/dist/{server → shared}/rbac/teams.js +0 -0
- /package/dist/{server → shared}/rbac/types.d.ts +0 -0
- /package/dist/{content-layer/markdown → shared}/utils/packed-ast.d.ts +0 -0
- /package/dist/{content-layer/markdown → shared}/utils/packed-ast.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getPathPrefix as e}from"../../shared/path-prefix.js";import{DATA_UPDATE_HMR_EVENT as t}from"../../shared/constants/content-update.js";import{
|
|
1
|
+
import{getPathPrefix as e}from"../../shared/path-prefix.js";import{DATA_UPDATE_HMR_EVENT as t}from"../../shared/constants/content-update.js";import{CONTENT_BUILD_PROGRESS_HMR_EVENT as n,DEV_CONTENT_BUILD_PATH as r}from"../../shared/constants/dev-content-build.js";import{DEV_PROBLEMS_PATH as i}from"../../shared/constants/dev-problems.js";import{useEffect as a,useRef as o,useState as s}from"react";import{useLocation as c}from"react-router";async function l(t){let n=await fetch(`${e()}${t}`);if(!n.ok)throw Error(`Failed to load ${t} (${n.status})`);return await n.json()}function u(){return l(i)}function d(){return l(`${i}?list=1`)}function f(){return l(r)}async function p(t){let n=await fetch(`${e()}${r}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({state:t})});if(!n.ok)throw Error(`Failed to update the content build (${n.status})`);return await n.json()}function m(e,t){return e===t?!0:!e||!t?!1:e.state===t.state&&e.done===t.done&&e.total===t.total&&e.failed===t.failed&&e.pending===t.pending}var h=class{deps;snapshot={summary:null,contentBuild:null,list:null,modalOpen:!1};listeners=/* @__PURE__ */ new Set;disposeHmrListener=null;disposeContentBuildProgressListener=null;constructor(e){this.deps=e}getSnapshot=()=>this.snapshot;subscribe=e=>(this.listeners.add(e),()=>this.listeners.delete(e));init(){this.disposeHmrListener||=this.deps.onHmrUpdate(()=>this.refetch()),this.disposeContentBuildProgressListener||=this.deps.onContentBuildProgress(()=>this.refetch()),this.refetch()}dispose(){this.disposeHmrListener?.(),this.disposeHmrListener=null,this.disposeContentBuildProgressListener?.(),this.disposeContentBuildProgressListener=null}refetch=()=>{this.refetchSummary(),this.refetchContentBuild()};refetchSummary(){this.deps.fetchSummary().then(e=>{let t=this.snapshot.summary;(t===null||t.generation!==e.generation||t.errors!==e.errors||t.warnings!==e.warnings)&&(this.patch({summary:e}),this.snapshot.modalOpen&&this.refetchList())},()=>{})}refetchContentBuild(){this.deps.fetchContentBuild().then(e=>this.applyContentBuild(e),()=>{})}startBuild=()=>{this.updateContentBuild(`running`)};pauseBuild=()=>{this.updateContentBuild(`paused`)};updateContentBuild(e){this.deps.updateContentBuild(e).then(e=>this.applyContentBuild(e),()=>{})}applyContentBuild(e){m(this.snapshot.contentBuild,e)||this.patch({contentBuild:e})}openModal=()=>{this.patch({modalOpen:!0}),this.refetchList()};refetchList(){this.deps.fetchList().then(e=>this.patch({list:e}),()=>{})}closeModal=()=>{this.patch({modalOpen:!1})};patch(e){this.snapshot={...this.snapshot,...e},this.listeners.forEach(e=>e())}};function g(){let e=c(),r=o(null);r.current||=new h({fetchSummary:u,fetchList:d,onHmrUpdate:e=>(import.meta.hot?.on(t,e),()=>import.meta.hot?.off(t,e)),onContentBuildProgress:e=>(import.meta.hot?.on(n,e),()=>import.meta.hot?.off(n,e)),fetchContentBuild:f,updateContentBuild:p});let i=r.current,[l,m]=s(i.getSnapshot);a(()=>{let e=i.subscribe(()=>m(i.getSnapshot()));return i.init(),()=>{e(),i.dispose()}},[i]);let g=o(!0);return a(()=>{if(g.current){g.current=!1;return}i.refetch()},[e.pathname,i]),{...l,openModal:i.openModal,closeModal:i.closeModal,startBuild:i.startBuild,pauseBuild:i.pauseBuild}}export{h as DevProblemsStore,g as useDevProblems};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isObject as e}from"../../shared/utils/is-object.js";import{telemetry as t}from"../telemetry/telemetry.js";import{getConsentRuntime as n}from"../use-consent.js";import{
|
|
1
|
+
import{isObject as e}from"../../shared/utils/is-object.js";import{telemetry as t}from"../telemetry/telemetry.js";import{getConsentRuntime as n}from"../use-consent.js";import{storeExperiments as r}from"../../shared/experiments.js";import{experimentExposedData as i}from"./events.js";import{CONTROL as a,EXPERIMENT_NAME_PATTERN as o}from"@redocly/theme/core/constants/experiments";const s=`redocly-experiments-visitor`;let c,l,u=[];const d={enabled:!0,setId:g,assignExperiments:_};function f(){let e=n();e&&(x(e)&&v(),e.on(`change`,()=>{x(e)&&v()}))}function p(){u=[]}function m(e,t){u.push({flag:e,variant:t}),h()}function h(){let e=l;if(!e?.visitorId||!b())return;let{visitorId:n,variants:r}=e;u=u.filter(({flag:e,variant:a})=>{let o=r[e];return o?.variant!==a||!o.exposure||(t.sendExperimentExposedMessage(i(o.exposure,n)),!1)})}function g(e){if(!b()){S(`Realm ignores setId while the consent runtime denies analytics.`);return}if(e===null){v();return}if(typeof e!=`string`||e===``||e===c)return;let t=C(s),n=c!==void 0||!l&&t!==null&&t!==e;c=e,w(s,e),n?(l=void 0,r({})):l&&(l={...l,visitorId:e},h())}function _(t){if(!b()){S(`Realm ignores assignExperiments while the consent runtime denies analytics.`);return}if(!e(t))return;let n={};for(let[r,i]of Object.entries(t)){if(!o.test(r)||!e(i))continue;let{variant:t,exposure:a}=i;if(typeof t!=`string`||!o.test(t))continue;let s=a===void 0?void 0:y(a,t);n[r]=s?{variant:t,exposure:s}:{variant:t},a!==void 0&&!s&&S(`Experiment "${r}": the exposure is invalid, so Realm sends none.`)}l={visitorId:c,variants:n},r(Object.fromEntries(Object.entries(n).map(([e,{variant:t}])=>[e,t]))),h()}function v(){c=void 0,l=void 0,u=[],r({}),T(s)}function y(t,n){if(!e(t))return;let{experimentKey:r,variationId:i,variationKey:o,variationName:s,featureKey:c}=t;if(typeof r==`string`&&r!==``&&typeof i==`number`&&Number.isInteger(i)&&i>=0&&n===a==(i===0)&&typeof o==`string`&&(s===void 0||typeof s==`string`)&&(c===void 0||typeof c==`string`))return{experimentKey:r,variationId:i,variationKey:o,...s?{variationName:s}:{},...c?{featureKey:c}:{}}}function b(){let e=n();return!e||e.state.analytics===!0}function x(e){return e.decided&&!e.state.analytics}function S(e){process.env.NODE_ENV!==`production`&&console.warn(e)}function C(e){try{return localStorage.getItem(e)}catch{return null}}function w(e,t){try{localStorage.setItem(e,t)}catch{}}function T(e){try{localStorage.removeItem(e)}catch{}}export{m as reportVariantShown,p as startPageView,d as visitorRuntime,f as watchAnalyticsRefusal};
|
|
@@ -3,4 +3,5 @@ import e from"styled-components";const t=e.div`
|
|
|
3
3
|
--catalog-history-button-width: auto;
|
|
4
4
|
--catalog-history-sidebar-padding: var(--sidebar-offset-top) var(--sidebar-margin-horizontal) 0;
|
|
5
5
|
--catalog-history-separator-margin: var(--spacing-sm) 0 0;
|
|
6
|
+
--catalog-history-pill-icon-color: var(--catalog-history-pill-text-color);
|
|
6
7
|
`;export{t as HistoryMount};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DEFAULT_LOCALE_PLACEHOLDER as e}from"../../shared/constants/l10n/defaults.js";import"../../shared/utils/l10n.js";import{
|
|
1
|
+
import{DEFAULT_LOCALE_PLACEHOLDER as e}from"../../shared/constants/l10n/defaults.js";import"../../shared/utils/l10n.js";import{readAppData as t}from"../../shared/utils/app-data.js";import{LoaderDataContext as n}from"../contexts.js";import{routableLocales as r}from"../../shared/utils/l10n/routable-locales.js";import{useContext as i,useMemo as a}from"react";import{UNSAFE_LocationContext as o,useLocation as s}from"react-router";import{getLocaleFromPathname as c}from"@redocly/theme/core/utils";const l=[];function u(e){return t(e).l10n}function d(t){let o=s(),d=i(n),f=u(t??d),p=f?.locales??l,m=f?.defaultLocale??e,h=a(()=>r(f),[f]);return{currentLocale:a(()=>c(o.pathname,m,h),[o,h,m]),defaultLocale:m,locales:p}}function f(){let e=i(o)?.location,t=u(i(n));return a(()=>e&&t?p(t,e.pathname):void 0,[e,t])}function p(t,n){let i=typeof t.defaultLocale==`string`?t.defaultLocale:e;return c(n,i,r(t))}export{u as getL10nAppData,p as localeOfPathname,d as useL10nConfig,f as useRouteLocale};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{LoaderDataContext as e}from"../contexts.js";import{routableLocales as t}from"../../shared/utils/l10n/routable-locales.js";import{getL10nAppData as n,useL10nConfig as r}from"./use-l10n-config.js";import{normalizeInternalHref as i}from"../utils/routes/normalize-internal-href.js";import{normalizePageSlug as a}from"../utils/routes/normalize-page-slug.js";import{useCallback as o,useContext as s,useMemo as c}from"react";import{getLocaleFromPathname as l,getPathnameForLocale as u}from"@redocly/theme/core/utils";const d={};function f(f){let{currentLocale:p,defaultLocale:m}=r(f),h=s(e),g=n(f??h),_=c(()=>t(g),[g]),v=g?.slugOverrides[p]??d;return o(e=>{if(p===m||!e.startsWith(`/`)||e.startsWith(`//`))return e;let t=e.search(/[?#]/),n=t===-1?e:e.slice(0,t),r=t===-1?``:e.slice(t);if(l(n,m,_)!==m)return e;let o=v[a(n)];return i(o===void 0?`${u(n,m,p,_)}${r}`:`${o}${r}`)},[p,m,_,v])}export{f as useL10nHref};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{createTranslate as e}from"../../shared/utils/l10n/create-translate.js";import{L10nContext as t}from"./l10n-context.js";import{useL10n as n}from"./use-l10n.js";import{useRouteLocale as r}from"./use-l10n-config.js";import{useContext as i,useMemo as a}from"react";import o from"i18next";const s=()=>{let s=i(t),{lang:c}=n(),l=r(),u=a(()=>e(l?o.getFixedT(l):o.t),[c,l]);return{translate:s?.translate??u}};export{s as useTranslate};
|
package/dist/client/products.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DEFAULT_LOCALE_PLACEHOLDER as e}from"../shared/constants/l10n/defaults.js";import"../shared/utils/l10n.js";import{withPathPrefix as t}from"../shared/path-prefix.js";import{
|
|
1
|
+
import{DEFAULT_LOCALE_PLACEHOLDER as e}from"../shared/constants/l10n/defaults.js";import"../shared/utils/l10n.js";import{withPathPrefix as t}from"../shared/path-prefix.js";import{readAppData as n}from"../shared/utils/app-data.js";import{routableLocales as r}from"../shared/utils/l10n/routable-locales.js";import{getL10nAppData as i}from"./l10n/use-l10n-config.js";import{findProductForSlug as a}from"../shared/products.js";import{getPathnameForLocale as o}from"@redocly/theme/core/utils";function s(e,t,n){let r=o(t,n.defaultLocale,n.defaultLocale,n.locales);return a(e,r)}function c(t,a){let o=i(t);return s(n(t).pageProducts??[],a,{defaultLocale:o?.defaultLocale||e,locales:r(o)})}function l(e,n,r){return Object.values(e.products??{}).map(i=>{let a={name:i.name,folder:i.folder,slug:i.slug,link:n(i.link)};if(i.icon!==void 0&&(a.icon=t(i.icon)),i.configOverride){let t=r({...e,...i.configOverride});a.configOverride=Object.fromEntries(Object.keys(i.configOverride).map(e=>[e,t[e]]))}return a})}export{s as findCurrentProduct,c as findPageProduct,l as toProductUiConfigs};
|
|
@@ -1,10 +1,32 @@
|
|
|
1
|
-
import{withPathPrefix as e}from"../../shared/path-prefix.js";import{PageContext as t}from"../contexts.js";import{changedPageNavigation as n,filterChangedPages as r,isSamePage as i}from"./changed-pages.js";import{reviewTimeline as a}from"./timeline.js";import{useBarPosition as o}from"./use-bar-position.js";import{useReview as s}from"./use-review.js";import{createContext as c,useContext as l,useEffect as u,useRef as d,useState as f}from"react";import{Fragment as p,jsx as m,jsxs as h}from"react/jsx-runtime";import{breakpoints as g}from"@redocly/theme/core/utils";import _,{css as v}from"styled-components";import{useTimeAgo as y}from"@redocly/theme/core/hooks";import{Button as b}from"@redocly/theme/components/Button/Button";import{Spinner as x}from"@redocly/theme/icons/Spinner/Spinner";import{Link as S}from"@redocly/theme/components/Link/Link";import{linkCss as C}from"@redocly/theme/components/Markdown/styles/links";import{Segmented as w}from"@redocly/theme/components/Segmented/Segmented";import{Tag as T}from"@redocly/theme/components/Tag/Tag";import{Tooltip as E}from"@redocly/theme/components/Tooltip/Tooltip";import{ChatIcon as ee}from"@redocly/theme/icons/ChatIcon/ChatIcon";import{CheckmarkIcon as te}from"@redocly/theme/icons/CheckmarkIcon/CheckmarkIcon";import{CloseIcon as D}from"@redocly/theme/icons/CloseIcon/CloseIcon";import{ChevronLeftIcon as O}from"@redocly/theme/icons/ChevronLeftIcon/ChevronLeftIcon";import{ChevronRightIcon as k}from"@redocly/theme/icons/ChevronRightIcon/ChevronRightIcon";import{DraggableIcon as ne}from"@redocly/theme/icons/DraggableIcon/DraggableIcon";import{SearchIcon as A}from"@redocly/theme/icons/SearchIcon/SearchIcon";import{TrashCanIcon as j}from"@redocly/theme/icons/TrashCanIcon/TrashCanIcon";import{WarningAltIcon as re}from"@redocly/theme/icons/WarningAltIcon/WarningAltIcon";const M=[{value:`all`,label:`All`},{value:`modified`,label:`Modified`},{value:`added`,label:`Added`},{value:`removed`,label:`Removed`}],N=/Mac|iPhone|iPad/.test(navigator.platform)?`⌘ Enter`:`Ctrl Enter`,P={added:`Added`,modified:`Modified`,removed:`Removed`},F={APPROVED:`approved`,REQUESTED_CHANGES:`requested changes on`,COMMENTED:`commented on`},I=c(`middle`);function L({children:e,...t}){let n=l(I);return/* @__PURE__ */ m(E,{...t,placement:`top`,fallbackPlacements:[],arrowPosition:n===`middle`?`center`:n,children:e})}function R(){let n=l(t),{state:r,error:a,submitting:c,addComment:d,deleteComment:g}=s(),{barRef:_,slot:v,dragging:y,style:S,onDragStart:C}=o(),[w,T]=f(!1),[E,O]=f(!1),[k,A]=f(0);if(u(()=>{if(!w&&!E)return;let e=e=>{e.key===`Escape`&&(E?O(!1):T(!1))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[w,E]),window.self!==window.top)return null;let j=n?.slug??`/`,M=n?.auth?.loginUrl,N=r?.signedIn?r.pullRequest:null,P=w&&N!==null,F=N?.pageComments.filter(e=>!e.replyToId&&!e.isResolved&&i(e.pageSlug,j)).length??0,R=/* @__PURE__ */ h(p,{children:[/* @__PURE__ */ m(B,{children:/* @__PURE__ */ m(L,{tip:`Drag to move`,disabled:y,children:/* @__PURE__ */ m(pe,{type:`button`,"aria-label":`Drag the review bar`,onPointerDown:C,$dragging:y,children:/* @__PURE__ */ m(ne,{size:`16px`,color:`var(--icon-color-secondary)`})})})}),r===null&&!a&&/* @__PURE__ */ m(V,{children:/* @__PURE__ */ m(x,{size:`16px`,color:`var(--icon-color-secondary)`})}),r?.signedIn===!1&&M&&/* @__PURE__ */ m(b,{variant:`primary`,onClick:()=>window.location.assign(e(`${M}?redirectTo=${encodeURIComponent(n?.path??`/`)}`)),children:`Log in to review`}),r?.signedIn&&!N&&/* @__PURE__ */ m(U,{children:`No open pull request`}),N&&/* @__PURE__ */ h(p,{children:[/* @__PURE__ */ h(B,{children:[/* @__PURE__ */ m(L,{tip:`${N.title} — open in Platform`,children:/* @__PURE__ */ h(b,{variant:`text`,to:N.url,external:!0,children:[`#`,N.number]})}),/* @__PURE__ */ m(H,{})]}),/* @__PURE__ */ m(se,{pullRequest:N,currentSlug:j,open:E,onToggle:()=>{A(_.current?.getBoundingClientRect().top??0),O(e=>!e)}}),P?/* @__PURE__ */ h(p,{children:[/* @__PURE__ */ m(de,{}),/* @__PURE__ */ m(L,{tip:`Close`,children:/* @__PURE__ */ m(b,{variant:`text`,icon:/* @__PURE__ */ m(D,{color:`currentColor`}),"aria-label":`Close the review`,onClick:()=>T(!1)})})]}):/* @__PURE__ */ h(p,{children:[/* @__PURE__ */ m(H,{}),/* @__PURE__ */ m(L,{tip:N.decision===`APPROVED`?`You approved`:N.decision===`REQUESTED_CHANGES`?`You requested changes`:`Comment on pages, then finish your review in Platform`,children:/* @__PURE__ */ h(b,{variant:`primary`,"aria-expanded":!1,onClick:()=>{O(!1),T(!0)},icon:N.decision===`APPROVED`?/* @__PURE__ */ m(te,{color:`currentColor`}):N.decision===`REQUESTED_CHANGES`?/* @__PURE__ */ m(D,{color:`currentColor`}):void 0,children:[`Review`,F>0&&/* @__PURE__ */ h(Oe,{"aria-label":`${F} open comments on this page`,children:[/* @__PURE__ */ m(ee,{size:`12px`,color:`currentColor`}),F]})]})})]})]}),a&&/* @__PURE__ */ m(L,{tip:a,children:/* @__PURE__ */ m(V,{role:`alert`,"aria-label":a,children:/* @__PURE__ */ m(re,{size:`16px`,color:`var(--color-error-base)`})})})]});return/* @__PURE__ */ m(I.Provider,{value:v,children:/* @__PURE__ */ h(le,{ref:_,style:S,$dragging:y,$expanded:P,"data-testid":`review-bar`,children:[P?/* @__PURE__ */ h(p,{children:[/* @__PURE__ */ m(ue,{children:R}),/* @__PURE__ */ m(fe,{children:/* @__PURE__ */ m(ie,{pullRequest:N,currentSlug:j,submitting:c,onComment:e=>d({pageSlug:j,text:e}),onDelete:g})})]}):R,E&&N&&/* @__PURE__ */ m(he,{$slot:v,style:{maxHeight:`min(50vh, calc(${k}px - 2 * var(--spacing-xs)))`},children:/* @__PURE__ */ m(ce,{pages:N.changedPages??[],currentSlug:j,onOpen:()=>O(!1)})})]})})}function ie({pullRequest:e,currentSlug:t,submitting:n,onComment:r,onDelete:i}){let a=e.pageComments.filter(e=>e.isPending).length;return/* @__PURE__ */ h(p,{children:[/* @__PURE__ */ m(ae,{pullRequest:e,currentSlug:t,submitting:n,onSubmit:r,onDelete:i}),/* @__PURE__ */ h(De,{children:[/* @__PURE__ */ m(q,{children:a===0?`Comments are posted when you finish your review.`:`${a} pending ${a===1?`comment`:`comments`}`}),e.url&&/* @__PURE__ */ m(L,{tip:`Approve or request changes in Platform`,children:/* @__PURE__ */ m(b,{variant:`primary`,to:`${e.url}/review?finishReview=true`,external:!0,children:`Finish review`})})]})]})}function ae({pullRequest:e,currentSlug:t,submitting:n,onSubmit:r,onDelete:o}){let[s,c]=f(``),[l,g]=f(!1),_=d(null),v=!n&&s.trim()!==``,y=a(e).filter(e=>l||e.kind===`comment`&&i(e.comment.pageSlug,t));u(()=>{_.current?.scrollTo({top:_.current.scrollHeight})},[y.length]);let x=n=>{if(i(n,t))return/* @__PURE__ */ m(X,{children:`this page`});let r=e.changedPages?.find(e=>i(e.slug,n));return/* @__PURE__ */ m(Be,{to:n,languageInsensitive:!0,children:r?.name||n})};return/* @__PURE__ */ h(p,{children:[/* @__PURE__ */ m(ke,{children:/* @__PURE__ */ m(w,{size:`small`,value:l,onChange:({value:e})=>g(e),options:[{value:!1,label:`This page`},{value:!0,label:`All pages`}]})}),y.length===0?/* @__PURE__ */ m(Ae,{children:l?`No reviews or comments yet.`:`No comments on this page yet.`}):/* @__PURE__ */ m(je,{ref:_,children:y.map(e=>e.kind===`review`?/* @__PURE__ */ m(z,{author:e.review.author,createdAt:e.review.createdAt,action:/* @__PURE__ */ h(p,{children:[F[e.review.status],` `,/* @__PURE__ */ m(X,{children:`the pull request`})]}),text:e.review.comment},e.review.id):/* @__PURE__ */ m(z,{author:e.comment.author,createdAt:e.comment.createdAt,action:/* @__PURE__ */ h(p,{children:[`commented on `,x(e.comment.pageSlug)]}),text:e.comment.comment,tag:e.comment.isPending?/* @__PURE__ */ m(T,{children:`Pending`}):e.comment.isResolved&&/* @__PURE__ */ m(T,{children:`Resolved`}),aside:e.comment.isPending&&/* @__PURE__ */ m(L,{tip:`Delete pending comment`,children:/* @__PURE__ */ m(b,{variant:`text`,size:`small`,icon:/* @__PURE__ */ m(j,{color:`currentColor`}),"aria-label":`Delete pending comment`,disabled:n,onClick:()=>void o(e.comment.id)})}),children:e.replies.length>0&&/* @__PURE__ */ m(Me,{children:e.replies.map(e=>/* @__PURE__ */ m(z,{author:e.author,createdAt:e.createdAt,action:`replied`,text:e.comment},e.id))})},e.comment.id))}),/* @__PURE__ */ m(ge,{onSubmit:async e=>{e.preventDefault(),v&&await r(s.trim())&&c(``)},children:/* @__PURE__ */ h(_e,{children:[/* @__PURE__ */ m(ve,{autoFocus:!0,rows:2,placeholder:`Comment on this page`,value:s,onChange:e=>c(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),e.currentTarget.form?.requestSubmit())}}),/* @__PURE__ */ h(ye,{children:[/* @__PURE__ */ m(q,{children:N}),/* @__PURE__ */ m(b,{type:`submit`,size:`small`,disabled:!v,children:`Comment`})]})]})})]})}function z({author:e,createdAt:t,action:n,text:r,tag:i,aside:a,children:o}){let{format:s}=y();return/* @__PURE__ */ h(Ne,{children:[e.avatarUrl?/* @__PURE__ */ m(Pe,{src:e.avatarUrl,alt:``}):/* @__PURE__ */ m(Fe,{"aria-hidden":!0,children:oe(e.name)}),/* @__PURE__ */ h(Ie,{children:[/* @__PURE__ */ h(Le,{children:[/* @__PURE__ */ m(`strong`,{children:e.name||`Someone`}),/* @__PURE__ */ m(Re,{dateTime:t,children:s(new Date(t))}),i]}),/* @__PURE__ */ m(ze,{children:n}),r&&/* @__PURE__ */ m(Ve,{children:r}),o]}),a]})}function oe(e){return e.split(/\s+/).filter(Boolean).slice(0,2).map(e=>e.charAt(0).toUpperCase()).join(``)||`?`}function se({pullRequest:e,currentSlug:t,open:r,onToggle:i}){if(e.changedPages===null)return/* @__PURE__ */ m(L,{tip:`Platform has not compared this preview with production yet`,children:/* @__PURE__ */ m(U,{children:`…`})});if(e.changedPages.length===0)return/* @__PURE__ */ m(L,{tip:`No page content changed; navigation, styles, or config can still differ`,children:/* @__PURE__ */ m(U,{children:`No changed pages`})});let{openable:a,index:o,previous:s,next:c}=n(e.changedPages,t);return/* @__PURE__ */ h(me,{children:[/* @__PURE__ */ m(L,{tip:s?`Previous: ${s.name||s.slug}`:``,disabled:!s,children:/* @__PURE__ */ m(b,{variant:`text`,icon:/* @__PURE__ */ m(O,{color:`currentColor`}),to:s?.slug,languageInsensitive:!0,disabled:!s,"aria-label":`Previous changed page`})}),/* @__PURE__ */ m(L,{tip:`Changed pages`,disabled:r,children:/* @__PURE__ */ m(b,{variant:`text`,onClick:i,"aria-expanded":r,children:o>=0?`${o+1}/${a.length}`:`${a.length} changed`})}),/* @__PURE__ */ m(L,{tip:c?`Next: ${c.name||c.slug}`:``,disabled:!c,children:/* @__PURE__ */ m(b,{variant:`text`,icon:/* @__PURE__ */ m(k,{color:`currentColor`}),to:c?.slug,languageInsensitive:!0,disabled:!c,"aria-label":`Next changed page`})})]})}function ce({pages:e,currentSlug:t,onOpen:a}){let[o,s]=f(``),[c,l]=f(`all`),g=e.length>5,_=r(e,c,o),v=_.slice(0,500),[y,b]=f(()=>Math.max(v.findIndex(e=>i(e.slug,t)),0)),x=d(null),{openable:S,index:C}=n(e,t);return u(()=>{x.current?.querySelector(`[data-active]`)?.scrollIntoView({block:`nearest`})},[y,o,c]),/* @__PURE__ */ h(p,{children:[g&&/* @__PURE__ */ h(be,{children:[/* @__PURE__ */ h(xe,{children:[/* @__PURE__ */ m(A,{size:`16px`,color:`var(--icon-color-secondary)`}),/* @__PURE__ */ m(Se,{autoFocus:!0,"aria-label":`Search changed pages`,placeholder:`Search ${e.length} changed pages`,value:o,onChange:e=>{s(e.target.value),b(0)},onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let t=e.key===`ArrowDown`?1:-1;b(e=>Math.min(Math.max(e+t,0),v.length-1))}else e.key===`Enter`&&(e.preventDefault(),x.current?.querySelector(`[data-active] a`)?.click())}})]}),/* @__PURE__ */ m(Ce,{children:/* @__PURE__ */ m(w,{size:`small`,value:c,onChange:({value:e})=>{l(e),b(0)},options:M.map(({value:t,label:n})=>({value:t,label:n,element:/* @__PURE__ */ h(p,{children:[n,` `,/* @__PURE__ */ m(we,{children:r(e,t,``).length})]})}))})})]}),/* @__PURE__ */ h(He,{ref:x,children:[v.map((e,n)=>{let r=i(e.slug,t),o=/* @__PURE__ */ h(p,{children:[/* @__PURE__ */ h(We,{children:[/* @__PURE__ */ m(Q,{children:e.name||e.slug}),e.name&&e.name!==e.slug&&/* @__PURE__ */ m(Ge,{children:e.slug})]}),r?/* @__PURE__ */ m($,{children:`Current`}):!g&&e.mode&&/* @__PURE__ */ m($,{children:P[e.mode]})]});return/* @__PURE__ */ m(`li`,{"data-active":g&&n===y?``:void 0,children:e.mode===`removed`?/* @__PURE__ */ m(Ke,{children:o}):/* @__PURE__ */ m(Ue,{to:e.slug,languageInsensitive:!0,onClick:a,$current:r,children:o})},e.slug)}),v.length===0&&/* @__PURE__ */ m(J,{children:`No changed pages match.`})]}),_.length>v.length&&/* @__PURE__ */ h(J,{children:[`Showing `,v.length,` of `,_.length,` changed pages. Search to narrow them down.`]}),g&&/* @__PURE__ */ h(Te,{children:[/* @__PURE__ */ m(`span`,{children:C>=0?`Page ${C+1} of ${S.length}`:`${S.length} changed pages`}),/* @__PURE__ */ m(B,{children:/* @__PURE__ */ h(Ee,{children:[/* @__PURE__ */ m(K,{children:`↑`}),` `,/* @__PURE__ */ m(K,{children:`↓`}),` to move · `,/* @__PURE__ */ m(K,{children:`Enter`}),` to open`]})})]})]})}const le=_.div`
|
|
1
|
+
import{PageContext as e}from"../contexts.js";import{useBarPosition as t}from"../use-bar-position.js";import{changedPageNavigation as n,filterChangedPages as r,isSamePage as i}from"./changed-pages.js";import{reviewLoginUrl as a}from"./login-url.js";import{reviewTimeline as o}from"./timeline.js";import{useReview as s}from"./use-review.js";import{createContext as c,useCallback as l,useContext as u,useEffect as d,useRef as f,useState as p}from"react";import m,{css as h,keyframes as g}from"styled-components";import{Button as _}from"@redocly/theme/components/Button/Button";import{breakpoints as v,hiddenWhileMobileMenuOpen as y}from"@redocly/theme/core/utils";import{Fragment as b,jsx as x,jsxs as S}from"react/jsx-runtime";import{useTimeAgo as C}from"@redocly/theme/core/hooks";import{DraggableIcon as ee}from"@redocly/theme/icons/DraggableIcon/DraggableIcon";import{Spinner as te}from"@redocly/theme/icons/Spinner/Spinner";import{Link as w}from"@redocly/theme/components/Link/Link";import{linkCss as T}from"@redocly/theme/components/Markdown/styles/links";import{Segmented as E}from"@redocly/theme/components/Segmented/Segmented";import{Tag as D}from"@redocly/theme/components/Tag/Tag";import{Tooltip as O}from"@redocly/theme/components/Tooltip/Tooltip";import{ChatIcon as ne}from"@redocly/theme/icons/ChatIcon/ChatIcon";import{CheckmarkIcon as re}from"@redocly/theme/icons/CheckmarkIcon/CheckmarkIcon";import{CloseIcon as k}from"@redocly/theme/icons/CloseIcon/CloseIcon";import{ChevronLeftIcon as A}from"@redocly/theme/icons/ChevronLeftIcon/ChevronLeftIcon";import{ChevronRightIcon as ie}from"@redocly/theme/icons/ChevronRightIcon/ChevronRightIcon";import{MinimizeIcon as ae}from"@redocly/theme/icons/MinimizeIcon/MinimizeIcon";import{SearchIcon as oe}from"@redocly/theme/icons/SearchIcon/SearchIcon";import{TrashCanIcon as j}from"@redocly/theme/icons/TrashCanIcon/TrashCanIcon";import{WarningAltIcon as se}from"@redocly/theme/icons/WarningAltIcon/WarningAltIcon";const M=`realm.review-bar-used`,N=[{value:`all`,label:`All`},{value:`modified`,label:`Modified`},{value:`added`,label:`Added`},{value:`removed`,label:`Removed`}],P=/Mac|iPhone|iPad/.test(navigator.platform)?`⌘ Enter`:`Ctrl Enter`,F={added:`Added`,modified:`Modified`,removed:`Removed`},I={APPROVED:`approved`,REQUESTED_CHANGES:`requested changes on`,COMMENTED:`commented on`},L=c(`middle`);function ce(){try{return localStorage.getItem(M)===`1`}catch{return!1}}function R(){try{localStorage.setItem(M,`1`)}catch{}}function z({children:e,...t}){let n=u(L);return/* @__PURE__ */ x(O,{...t,placement:`top`,fallbackPlacements:[],arrowPosition:n===`middle`?`center`:n,children:e})}function B(){let n=u(e),{state:r,error:o,submitting:c,addComment:f,deleteComment:m}=s(),[h,g]=p(null),{barRef:v,slot:y,dragging:C,style:w,onDragStart:T}=t({storageKey:`realm.review-bar-slot`,defaultSlot:`middle`,frozen:h!==null}),[E,D]=p(!1),[O,A]=p(!1),[ie,oe]=p(0),[j,M]=p(ce),N=l(()=>{let e=v.current?.getBoundingClientRect().width;!e||window.matchMedia(`(prefers-reduced-motion: reduce)`).matches?M(!0):g(e)},[v]);if(d(()=>{if(j||h!==null||E||O)return;let e=e=>{e.target instanceof Node&&v.current?.contains(e.target)||N()};return window.addEventListener(`wheel`,e,{passive:!0}),window.addEventListener(`touchmove`,e,{passive:!0}),()=>{window.removeEventListener(`wheel`,e),window.removeEventListener(`touchmove`,e)}},[j,h,E,O,v,N]),d(()=>{if(!E&&!O)return;let e=e=>{e.key===`Escape`&&(O?A(!1):D(!1))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[E,O]),window.self!==window.top)return null;let P=n?.slug??`/`,F=n?.auth?.loginUrl,I=r?.signedIn?r.pullRequest:null,B=E&&I!==null,V=I?.pageComments.filter(e=>!e.replyToId&&!e.isResolved&&i(e.pageSlug,P)).length??0,H=/* @__PURE__ */ S(b,{children:[/* @__PURE__ */ x(z,{tip:`Drag to move`,disabled:C,children:/* @__PURE__ */ x(xe,{type:`button`,"aria-label":`Drag the review bar`,onPointerDown:T,$dragging:C,children:/* @__PURE__ */ x(ee,{size:`16px`,color:`var(--icon-color-secondary)`})})}),r===null&&!o&&/* @__PURE__ */ x(q,{children:/* @__PURE__ */ x(te,{size:`16px`,color:`var(--icon-color-secondary)`})}),r?.signedIn===!1&&F&&/* @__PURE__ */ x(_,{variant:`primary`,onClick:()=>{R(),window.location.assign(a(F,n?.path??`/`))},children:`Log in to review`}),r?.signedIn&&!I&&/* @__PURE__ */ x(Y,{children:`No open pull request`}),I&&/* @__PURE__ */ S(b,{children:[/* @__PURE__ */ S(K,{children:[/* @__PURE__ */ x(z,{tip:`${I.title} — open in Platform`,children:/* @__PURE__ */ S(_,{variant:`text`,to:I.url,external:!0,children:[`#`,I.number]})}),/* @__PURE__ */ x(J,{})]}),/* @__PURE__ */ x(ue,{pullRequest:I,currentSlug:P,open:O,onToggle:()=>{R(),oe(v.current?.getBoundingClientRect().top??0),A(e=>!e)}}),B?/* @__PURE__ */ S(b,{children:[/* @__PURE__ */ x(ye,{}),/* @__PURE__ */ x(z,{tip:`Close`,children:/* @__PURE__ */ x(_,{variant:`text`,icon:/* @__PURE__ */ x(k,{color:`currentColor`}),"aria-label":`Close the review`,onClick:()=>D(!1)})})]}):/* @__PURE__ */ S(b,{children:[/* @__PURE__ */ x(J,{}),/* @__PURE__ */ x(z,{tip:I.decision===`APPROVED`?`You approved`:I.decision===`REQUESTED_CHANGES`?`You requested changes`:`Comment on pages, then finish your review in Platform`,children:/* @__PURE__ */ S(_,{variant:`primary`,"aria-expanded":!1,onClick:()=>{R(),A(!1),D(!0)},icon:I.decision===`APPROVED`?/* @__PURE__ */ x(re,{color:`currentColor`}):I.decision===`REQUESTED_CHANGES`?/* @__PURE__ */ x(k,{color:`currentColor`}):void 0,children:[`Review`,V>0&&/* @__PURE__ */ S(Ie,{"aria-label":`${V} open comments on this page`,children:[/* @__PURE__ */ x(ne,{size:`12px`,color:`currentColor`}),V]})]})})]})]}),o&&/* @__PURE__ */ x(z,{tip:o,children:/* @__PURE__ */ x(q,{role:`alert`,"aria-label":o,children:/* @__PURE__ */ x(se,{size:`16px`,color:`var(--color-error-base)`})})}),!B&&/* @__PURE__ */ x(z,{tip:`Collapse`,children:/* @__PURE__ */ x(_,{variant:`text`,icon:/* @__PURE__ */ x(ae,{color:`currentColor`}),"aria-label":`Collapse the review bar`,onClick:()=>{R(),A(!1),N()}})})]}),U=o??(r?.signedIn===!1?`Log in to review`:r?.signedIn&&!I?`No open pull request`:`Review`),W=/* @__PURE__ */ x(z,{tip:U,children:/* @__PURE__ */ S(ge,{type:`button`,"aria-label":U,"aria-expanded":!1,onClick:()=>{R(),M(!1)},children:[/* @__PURE__ */ x(ne,{size:`18px`,color:`var(--icon-color-primary)`}),o?/* @__PURE__ */ x(G,{role:`alert`,$tone:`error`}):r?.signedIn===!1&&F?/* @__PURE__ */ x(G,{$tone:`info`}):V>0?/* @__PURE__ */ x(_e,{children:V}):null]})});return/* @__PURE__ */ x(L.Provider,{value:y,children:/* @__PURE__ */ S(he,{ref:v,style:h===null?w:{...w,"--review-bar-collapse-from":`${h}px`},$dragging:C,$expanded:B,$collapsed:j,$collapsing:h!==null,onAnimationEnd:e=>{e.target===e.currentTarget&&h!==null&&(g(null),M(!0))},"data-testid":`review-bar`,children:[j?W:B?/* @__PURE__ */ S(b,{children:[/* @__PURE__ */ x(ve,{children:H}),/* @__PURE__ */ x(be,{children:/* @__PURE__ */ x(le,{pullRequest:I,currentSlug:P,submitting:c,onComment:e=>f({pageSlug:P,text:e}),onDelete:m})})]}):H,!j&&O&&I&&/* @__PURE__ */ x(Ce,{$slot:y,style:{maxHeight:`min(50vh, calc(${ie}px - 2 * var(--spacing-xs)))`},children:/* @__PURE__ */ x(de,{pages:I.changedPages??[],currentSlug:P,onOpen:()=>A(!1)})})]})})}function le({pullRequest:e,currentSlug:t,submitting:n,onComment:r,onDelete:i}){let a=e.pageComments.filter(e=>e.isPending).length;return/* @__PURE__ */ S(b,{children:[/* @__PURE__ */ x(V,{pullRequest:e,currentSlug:t,submitting:n,onSubmit:r,onDelete:i}),/* @__PURE__ */ S(Fe,{children:[/* @__PURE__ */ x($,{children:a===0?`Comments are posted when you finish your review.`:`${a} pending ${a===1?`comment`:`comments`}`}),e.url&&/* @__PURE__ */ x(z,{tip:`Approve or request changes in Platform`,children:/* @__PURE__ */ x(_,{variant:`primary`,to:`${e.url}/review?finishReview=true`,external:!0,children:`Finish review`})})]})]})}function V({pullRequest:e,currentSlug:t,submitting:n,onSubmit:r,onDelete:a}){let[s,c]=p(``),[l,u]=p(!1),m=f(null),h=!n&&s.trim()!==``,g=o(e).filter(e=>l||e.kind===`comment`&&i(e.comment.pageSlug,t));d(()=>{m.current?.scrollTo({top:m.current.scrollHeight})},[g.length]);let v=n=>{if(i(n,t))return/* @__PURE__ */ x(Xe,{children:`this page`});let r=e.changedPages?.find(e=>i(e.slug,n));return/* @__PURE__ */ x(Ze,{to:n,languageInsensitive:!0,children:r?.name||n})};return/* @__PURE__ */ S(b,{children:[/* @__PURE__ */ x(Re,{children:/* @__PURE__ */ x(E,{size:`small`,value:l,onChange:({value:e})=>u(e),options:[{value:!1,label:`This page`},{value:!0,label:`All pages`}]})}),g.length===0?/* @__PURE__ */ x(ze,{children:l?`No reviews or comments yet.`:`No comments on this page yet.`}):/* @__PURE__ */ x(Be,{ref:m,children:g.map(e=>e.kind===`review`?/* @__PURE__ */ x(H,{author:e.review.author,createdAt:e.review.createdAt,action:/* @__PURE__ */ S(b,{children:[I[e.review.status],` `,/* @__PURE__ */ x(Xe,{children:`the pull request`})]}),text:e.review.comment},e.review.id):/* @__PURE__ */ x(H,{author:e.comment.author,createdAt:e.comment.createdAt,action:/* @__PURE__ */ S(b,{children:[`commented on `,v(e.comment.pageSlug)]}),text:e.comment.comment,tag:e.comment.isPending?/* @__PURE__ */ x(D,{children:`Pending`}):e.comment.isResolved&&/* @__PURE__ */ x(D,{children:`Resolved`}),aside:e.comment.isPending&&/* @__PURE__ */ x(z,{tip:`Delete pending comment`,children:/* @__PURE__ */ x(_,{variant:`text`,size:`small`,icon:/* @__PURE__ */ x(j,{color:`currentColor`}),"aria-label":`Delete pending comment`,disabled:n,onClick:()=>void a(e.comment.id)})}),children:e.replies.length>0&&/* @__PURE__ */ x(Ve,{children:e.replies.map(e=>/* @__PURE__ */ x(H,{author:e.author,createdAt:e.createdAt,action:`replied`,text:e.comment},e.id))})},e.comment.id))}),/* @__PURE__ */ x(we,{onSubmit:async e=>{e.preventDefault(),h&&await r(s.trim())&&c(``)},children:/* @__PURE__ */ S(Te,{children:[/* @__PURE__ */ x(Ee,{autoFocus:!0,rows:2,placeholder:`Comment on this page`,value:s,onChange:e=>c(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),e.currentTarget.form?.requestSubmit())}}),/* @__PURE__ */ S(De,{children:[/* @__PURE__ */ x($,{children:P}),/* @__PURE__ */ x(_,{type:`submit`,size:`small`,disabled:!h,children:`Comment`})]})]})})]})}function H({author:e,createdAt:t,action:n,text:r,tag:i,aside:a,children:o}){let{format:s}=C();return/* @__PURE__ */ S(He,{children:[e.avatarUrl?/* @__PURE__ */ x(We,{src:e.avatarUrl,alt:``}):/* @__PURE__ */ x(Ge,{"aria-hidden":!0,children:U(e.name)}),/* @__PURE__ */ S(Ke,{children:[/* @__PURE__ */ S(qe,{children:[/* @__PURE__ */ x(`strong`,{children:e.name||`Someone`}),/* @__PURE__ */ x(Je,{dateTime:t,children:s(new Date(t))}),i]}),/* @__PURE__ */ x(Ye,{children:n}),r&&/* @__PURE__ */ x(Qe,{children:r}),o]}),a]})}function U(e){return e.split(/\s+/).filter(Boolean).slice(0,2).map(e=>e.charAt(0).toUpperCase()).join(``)||`?`}function ue({pullRequest:e,currentSlug:t,open:r,onToggle:i}){if(e.changedPages===null)return/* @__PURE__ */ x(z,{tip:`Platform has not compared this preview with production yet`,children:/* @__PURE__ */ x(Y,{children:`…`})});if(e.changedPages.length===0)return/* @__PURE__ */ x(z,{tip:`No page content changed; navigation, styles, or config can still differ`,children:/* @__PURE__ */ x(Y,{children:`No changed pages`})});let{openable:a,index:o,previous:s,next:c}=n(e.changedPages,t);return/* @__PURE__ */ S(Se,{children:[/* @__PURE__ */ x(z,{tip:s?`Previous: ${s.name||s.slug}`:``,disabled:!s,children:/* @__PURE__ */ x(_,{variant:`text`,icon:/* @__PURE__ */ x(A,{color:`currentColor`}),to:s?.slug,languageInsensitive:!0,disabled:!s,"aria-label":`Previous changed page`})}),/* @__PURE__ */ x(z,{tip:`Changed pages`,disabled:r,children:/* @__PURE__ */ x(_,{variant:`text`,onClick:i,"aria-expanded":r,children:o>=0?`${o+1}/${a.length}`:`${a.length} changed`})}),/* @__PURE__ */ x(z,{tip:c?`Next: ${c.name||c.slug}`:``,disabled:!c,children:/* @__PURE__ */ x(_,{variant:`text`,icon:/* @__PURE__ */ x(ie,{color:`currentColor`}),to:c?.slug,languageInsensitive:!0,disabled:!c,"aria-label":`Next changed page`})})]})}function de({pages:e,currentSlug:t,onOpen:a}){let[o,s]=p(``),[c,l]=p(`all`),u=e.length>5,m=r(e,c,o),h=m.slice(0,500),[g,_]=p(()=>Math.max(h.findIndex(e=>i(e.slug,t)),0)),v=f(null),{openable:y,index:C}=n(e,t);return d(()=>{v.current?.querySelector(`[data-active]`)?.scrollIntoView({block:`nearest`})},[g,o,c]),/* @__PURE__ */ S(b,{children:[u&&/* @__PURE__ */ S(Oe,{children:[/* @__PURE__ */ S(ke,{children:[/* @__PURE__ */ x(oe,{size:`16px`,color:`var(--icon-color-secondary)`}),/* @__PURE__ */ x(Ae,{autoFocus:!0,"aria-label":`Search changed pages`,placeholder:`Search ${e.length} changed pages`,value:o,onChange:e=>{s(e.target.value),_(0)},onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let t=e.key===`ArrowDown`?1:-1;_(e=>Math.min(Math.max(e+t,0),h.length-1))}else e.key===`Enter`&&(e.preventDefault(),v.current?.querySelector(`[data-active] a`)?.click())}})]}),/* @__PURE__ */ x(je,{children:/* @__PURE__ */ x(E,{size:`small`,value:c,onChange:({value:e})=>{l(e),_(0)},options:N.map(({value:t,label:n})=>({value:t,label:n,element:/* @__PURE__ */ S(b,{children:[n,` `,/* @__PURE__ */ x(Me,{children:r(e,t,``).length})]})}))})})]}),/* @__PURE__ */ S($e,{ref:v,children:[h.map((e,n)=>{let r=i(e.slug,t),o=/* @__PURE__ */ S(b,{children:[/* @__PURE__ */ S(nt,{children:[/* @__PURE__ */ x(rt,{children:e.name||e.slug}),e.name&&e.name!==e.slug&&/* @__PURE__ */ x(it,{children:e.slug})]}),r?/* @__PURE__ */ x(at,{children:`Current`}):!u&&e.mode&&/* @__PURE__ */ x(at,{children:F[e.mode]})]});return/* @__PURE__ */ x(`li`,{"data-active":u&&n===g?``:void 0,children:e.mode===`removed`?/* @__PURE__ */ x(ot,{children:o}):/* @__PURE__ */ x(tt,{to:e.slug,languageInsensitive:!0,onClick:a,$current:r,children:o})},e.slug)}),h.length===0&&/* @__PURE__ */ x(Le,{children:`No changed pages match.`})]}),m.length>h.length&&/* @__PURE__ */ S(Le,{children:[`Showing `,h.length,` of `,m.length,` changed pages. Search to narrow them down.`]}),u&&/* @__PURE__ */ S(Ne,{children:[/* @__PURE__ */ x(`span`,{children:C>=0?`Page ${C+1} of ${y.length}`:`${y.length} changed pages`}),/* @__PURE__ */ x(K,{children:/* @__PURE__ */ S(Pe,{children:[/* @__PURE__ */ x(Q,{children:`↑`}),` `,/* @__PURE__ */ x(Q,{children:`↓`}),` to move · `,/* @__PURE__ */ x(Q,{children:`Enter`}),` to open`]})})]})]})}const W=g`
|
|
2
|
+
from {
|
|
3
|
+
opacity: 0;
|
|
4
|
+
}
|
|
5
|
+
`,fe=g`
|
|
6
|
+
to {
|
|
7
|
+
opacity: 0;
|
|
8
|
+
}
|
|
9
|
+
`,pe=g`
|
|
10
|
+
from {
|
|
11
|
+
width: var(--review-bar-collapse-from);
|
|
12
|
+
}
|
|
13
|
+
to {
|
|
14
|
+
width: var(--ai-assistant-button-icon-size);
|
|
15
|
+
border-radius: calc(var(--ai-assistant-button-icon-size) / 2);
|
|
16
|
+
}
|
|
17
|
+
`,me=g`
|
|
18
|
+
from {
|
|
19
|
+
opacity: 0;
|
|
20
|
+
transform: scale(0.6);
|
|
21
|
+
}
|
|
22
|
+
`,he=m.div`
|
|
2
23
|
position: fixed;
|
|
3
|
-
bottom: var(--
|
|
24
|
+
bottom: var(--ai-assistant-button-bottom);
|
|
4
25
|
display: inline-flex;
|
|
5
26
|
align-items: center;
|
|
6
27
|
gap: var(--spacing-xxs);
|
|
7
|
-
|
|
28
|
+
min-height: var(--ai-assistant-button-text-height);
|
|
29
|
+
padding: calc(var(--spacing-xxs) - 1px);
|
|
8
30
|
border: 1px solid var(--border-color-secondary);
|
|
9
31
|
border-radius: var(--border-radius-xl);
|
|
10
32
|
background: var(--bg-color-raised);
|
|
@@ -16,36 +38,108 @@ import{withPathPrefix as e}from"../../shared/path-prefix.js";import{PageContext
|
|
|
16
38
|
user-select: none;
|
|
17
39
|
z-index: var(--z-index-raised);
|
|
18
40
|
cursor: ${({$dragging:e})=>e?`grabbing`:`default`};
|
|
41
|
+
${y}
|
|
42
|
+
|
|
43
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
44
|
+
& > * {
|
|
45
|
+
animation: ${W} 160ms ease-out;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
19
48
|
|
|
20
|
-
${({$expanded:e})=>e&&
|
|
49
|
+
${({$expanded:e})=>e&&h`
|
|
21
50
|
flex-direction: column;
|
|
22
51
|
align-items: stretch;
|
|
23
52
|
width: 480px;
|
|
24
|
-
max-width: calc(100vw - 2 * var(--spacing-
|
|
53
|
+
max-width: calc(100vw - 2 * var(--spacing-xl));
|
|
25
54
|
max-height: 70vh;
|
|
26
55
|
white-space: normal;
|
|
27
56
|
`}
|
|
28
|
-
|
|
57
|
+
|
|
58
|
+
${({$collapsed:e})=>e&&h`
|
|
59
|
+
width: var(--ai-assistant-button-icon-size);
|
|
60
|
+
height: var(--ai-assistant-button-icon-size);
|
|
61
|
+
padding: 0;
|
|
62
|
+
border-radius: var(--ai-assistant-button-border-radius-icon);
|
|
63
|
+
|
|
64
|
+
& > * {
|
|
65
|
+
flex: 1;
|
|
66
|
+
align-self: stretch;
|
|
67
|
+
}
|
|
68
|
+
`}
|
|
69
|
+
|
|
70
|
+
${({$collapsing:e})=>e&&h`
|
|
71
|
+
overflow: hidden;
|
|
72
|
+
|
|
73
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
74
|
+
animation: ${pe} 220ms ease-in-out forwards;
|
|
75
|
+
|
|
76
|
+
& > * {
|
|
77
|
+
animation: ${fe} 120ms ease-in forwards;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
`}
|
|
81
|
+
`,ge=m.button`
|
|
82
|
+
position: relative;
|
|
83
|
+
display: inline-flex;
|
|
84
|
+
flex: 1;
|
|
85
|
+
align-items: center;
|
|
86
|
+
justify-content: center;
|
|
87
|
+
border: 0;
|
|
88
|
+
border-radius: var(--ai-assistant-button-border-radius-icon);
|
|
89
|
+
padding: 0;
|
|
90
|
+
background: transparent;
|
|
91
|
+
cursor: pointer;
|
|
92
|
+
|
|
93
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
94
|
+
animation: ${me} 180ms ease-out;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&:hover {
|
|
98
|
+
background: var(--bg-color-hover);
|
|
99
|
+
}
|
|
100
|
+
`,G=m.span`
|
|
101
|
+
position: absolute;
|
|
102
|
+
top: var(--spacing-xs);
|
|
103
|
+
right: var(--spacing-xs);
|
|
104
|
+
width: 8px;
|
|
105
|
+
height: 8px;
|
|
106
|
+
border-radius: 50%;
|
|
107
|
+
background: ${({$tone:e})=>e===`error`?`var(--color-error-base)`:`var(--color-info-base)`};
|
|
108
|
+
box-shadow: 0 0 0 2px var(--bg-color-raised);
|
|
109
|
+
`,_e=m.span`
|
|
110
|
+
position: absolute;
|
|
111
|
+
top: calc(-1 * var(--spacing-xxs));
|
|
112
|
+
right: calc(-1 * var(--spacing-xxs));
|
|
113
|
+
min-width: 16px;
|
|
114
|
+
height: 16px;
|
|
115
|
+
padding: 0 var(--spacing-xxs);
|
|
116
|
+
border-radius: var(--border-radius-lg);
|
|
117
|
+
background: var(--color-info-base);
|
|
118
|
+
color: var(--color-static-white);
|
|
119
|
+
font-size: var(--font-size-sm);
|
|
120
|
+
line-height: 16px;
|
|
121
|
+
text-align: center;
|
|
122
|
+
`,ve=m.div`
|
|
29
123
|
display: flex;
|
|
30
124
|
align-items: center;
|
|
31
125
|
gap: var(--spacing-xxs);
|
|
32
126
|
white-space: nowrap;
|
|
33
|
-
`,
|
|
127
|
+
`,ye=m.span`
|
|
34
128
|
flex: 1;
|
|
35
|
-
`,
|
|
129
|
+
`,be=m.div`
|
|
36
130
|
display: flex;
|
|
37
131
|
flex-direction: column;
|
|
38
132
|
min-height: 0;
|
|
39
133
|
border-top: 1px solid var(--border-color-secondary);
|
|
40
134
|
user-select: text;
|
|
41
135
|
cursor: auto;
|
|
42
|
-
`,
|
|
136
|
+
`,K=m.span`
|
|
43
137
|
display: contents;
|
|
44
138
|
|
|
45
|
-
@media screen and (max-width: ${
|
|
139
|
+
@media screen and (max-width: ${v.small}) {
|
|
46
140
|
display: none;
|
|
47
141
|
}
|
|
48
|
-
`,
|
|
142
|
+
`,xe=m.button`
|
|
49
143
|
display: inline-flex;
|
|
50
144
|
align-items: center;
|
|
51
145
|
align-self: stretch;
|
|
@@ -54,26 +148,26 @@ import{withPathPrefix as e}from"../../shared/path-prefix.js";import{PageContext
|
|
|
54
148
|
background: transparent;
|
|
55
149
|
touch-action: none;
|
|
56
150
|
cursor: ${({$dragging:e})=>e?`grabbing`:`grab`};
|
|
57
|
-
`,
|
|
151
|
+
`,q=m.span`
|
|
58
152
|
display: inline-flex;
|
|
59
153
|
padding: 0 var(--spacing-xs);
|
|
60
|
-
`,
|
|
154
|
+
`,Se=m.span`
|
|
61
155
|
display: inline-flex;
|
|
62
156
|
align-items: center;
|
|
63
|
-
`,
|
|
157
|
+
`,J=m.span`
|
|
64
158
|
align-self: stretch;
|
|
65
159
|
width: 1px;
|
|
66
160
|
margin: var(--spacing-xs) 0;
|
|
67
161
|
background: var(--border-color-secondary);
|
|
68
|
-
`,
|
|
162
|
+
`,Y=m.span`
|
|
69
163
|
padding: 0 var(--spacing-xs);
|
|
70
164
|
color: var(--text-color-description);
|
|
71
|
-
`,
|
|
165
|
+
`,Ce=m.div`
|
|
72
166
|
position: absolute;
|
|
73
167
|
display: flex;
|
|
74
168
|
flex-direction: column;
|
|
75
169
|
bottom: calc(100% + var(--spacing-xs));
|
|
76
|
-
${({$slot:e})=>e===`left`?`left: 0;`:e===`right`?`right:
|
|
170
|
+
${({$slot:e})=>e===`left`?`left: 0;`:e===`right`?`right: calc(-1 * var(--bar-right-inset, 0px));`:`left: 50%; transform: translateX(-50%);`}
|
|
77
171
|
width: 360px;
|
|
78
172
|
max-width: calc(100vw - 2 * var(--spacing-lg));
|
|
79
173
|
overflow: hidden;
|
|
@@ -84,10 +178,10 @@ import{withPathPrefix as e}from"../../shared/path-prefix.js";import{PageContext
|
|
|
84
178
|
white-space: normal;
|
|
85
179
|
user-select: text;
|
|
86
180
|
cursor: auto;
|
|
87
|
-
`,
|
|
181
|
+
`,we=m.form`
|
|
88
182
|
padding: var(--spacing-xs);
|
|
89
183
|
border-top: 1px solid var(--border-color-secondary);
|
|
90
|
-
`,
|
|
184
|
+
`,X=h`
|
|
91
185
|
border: 1px solid var(--input-border-color);
|
|
92
186
|
border-radius: var(--input-border-radius);
|
|
93
187
|
background: var(--input-bg-color);
|
|
@@ -100,7 +194,7 @@ import{withPathPrefix as e}from"../../shared/path-prefix.js";import{PageContext
|
|
|
100
194
|
border-color: var(--text-color-disabled);
|
|
101
195
|
box-shadow: 0 0 0 2px var(--border-color-secondary);
|
|
102
196
|
}
|
|
103
|
-
`,
|
|
197
|
+
`,Z=h`
|
|
104
198
|
border: 0;
|
|
105
199
|
outline: none;
|
|
106
200
|
background: transparent;
|
|
@@ -110,40 +204,40 @@ import{withPathPrefix as e}from"../../shared/path-prefix.js";import{PageContext
|
|
|
110
204
|
&::placeholder {
|
|
111
205
|
color: var(--input-content-placeholder-color);
|
|
112
206
|
}
|
|
113
|
-
`,
|
|
114
|
-
${
|
|
207
|
+
`,Te=m.div`
|
|
208
|
+
${X}
|
|
115
209
|
display: flex;
|
|
116
210
|
flex-direction: column;
|
|
117
211
|
padding: var(--spacing-xxs) var(--spacing-xs);
|
|
118
|
-
`,
|
|
119
|
-
${
|
|
212
|
+
`,Ee=m.textarea`
|
|
213
|
+
${Z}
|
|
120
214
|
box-sizing: border-box;
|
|
121
215
|
width: 100%;
|
|
122
216
|
padding: var(--spacing-xxs);
|
|
123
217
|
resize: none;
|
|
124
|
-
`,
|
|
218
|
+
`,De=m.div`
|
|
125
219
|
display: flex;
|
|
126
220
|
align-items: center;
|
|
127
221
|
justify-content: flex-end;
|
|
128
222
|
gap: var(--spacing-xs);
|
|
129
|
-
`,
|
|
223
|
+
`,Oe=m.div`
|
|
130
224
|
display: flex;
|
|
131
225
|
flex-direction: column;
|
|
132
226
|
gap: var(--spacing-xs);
|
|
133
227
|
padding: var(--spacing-xs);
|
|
134
228
|
border-bottom: 1px solid var(--border-color-secondary);
|
|
135
|
-
`,
|
|
136
|
-
${
|
|
229
|
+
`,ke=m.label`
|
|
230
|
+
${X}
|
|
137
231
|
display: flex;
|
|
138
232
|
align-items: center;
|
|
139
233
|
gap: var(--spacing-xs);
|
|
140
234
|
padding: var(--spacing-xxs) var(--spacing-sm);
|
|
141
|
-
`,
|
|
142
|
-
${
|
|
235
|
+
`,Ae=m.input`
|
|
236
|
+
${Z}
|
|
143
237
|
flex: 1;
|
|
144
238
|
min-width: 0;
|
|
145
239
|
padding: 0;
|
|
146
|
-
`,
|
|
240
|
+
`,je=m.div`
|
|
147
241
|
> div {
|
|
148
242
|
width: 100%;
|
|
149
243
|
}
|
|
@@ -152,9 +246,9 @@ import{withPathPrefix as e}from"../../shared/path-prefix.js";import{PageContext
|
|
|
152
246
|
flex: 1 1 auto;
|
|
153
247
|
padding-inline: var(--spacing-xs);
|
|
154
248
|
}
|
|
155
|
-
`,
|
|
249
|
+
`,Me=m.span`
|
|
156
250
|
color: var(--text-color-description);
|
|
157
|
-
`,
|
|
251
|
+
`,Ne=m.div`
|
|
158
252
|
display: flex;
|
|
159
253
|
align-items: center;
|
|
160
254
|
justify-content: space-between;
|
|
@@ -164,39 +258,39 @@ import{withPathPrefix as e}from"../../shared/path-prefix.js";import{PageContext
|
|
|
164
258
|
color: var(--text-color-description);
|
|
165
259
|
font-size: var(--font-size-sm);
|
|
166
260
|
line-height: var(--line-height-sm);
|
|
167
|
-
`,
|
|
261
|
+
`,Pe=m.span`
|
|
168
262
|
white-space: nowrap;
|
|
169
|
-
`,
|
|
263
|
+
`,Q=m.kbd`
|
|
170
264
|
padding: 0 var(--spacing-xxs);
|
|
171
265
|
border-radius: var(--border-radius-sm);
|
|
172
266
|
background: var(--border-color-secondary);
|
|
173
267
|
color: var(--text-color-secondary);
|
|
174
268
|
font: inherit;
|
|
175
|
-
|
|
269
|
+
`,$=m.div`
|
|
176
270
|
color: var(--text-color-description);
|
|
177
271
|
font-size: var(--font-size-sm);
|
|
178
272
|
line-height: var(--line-height-sm);
|
|
179
|
-
`,
|
|
273
|
+
`,Fe=m.div`
|
|
180
274
|
display: flex;
|
|
181
275
|
align-items: center;
|
|
182
276
|
justify-content: space-between;
|
|
183
277
|
gap: var(--spacing-sm);
|
|
184
278
|
padding: var(--spacing-xs);
|
|
185
279
|
border-top: 1px solid var(--border-color-secondary);
|
|
186
|
-
`,
|
|
280
|
+
`,Ie=m.span`
|
|
187
281
|
display: inline-flex;
|
|
188
282
|
align-items: center;
|
|
189
283
|
gap: var(--spacing-xxs);
|
|
190
284
|
margin-left: var(--spacing-xs);
|
|
191
|
-
`,
|
|
285
|
+
`,Le=m($)`
|
|
192
286
|
padding: var(--spacing-xs) var(--spacing-sm);
|
|
193
|
-
`,
|
|
287
|
+
`,Re=m.div`
|
|
194
288
|
padding: var(--spacing-xs);
|
|
195
289
|
border-bottom: 1px solid var(--border-color-secondary);
|
|
196
|
-
`,
|
|
290
|
+
`,ze=m.div`
|
|
197
291
|
padding: var(--spacing-sm);
|
|
198
292
|
color: var(--text-color-description);
|
|
199
|
-
`,
|
|
293
|
+
`,Be=m.ol`
|
|
200
294
|
display: flex;
|
|
201
295
|
flex-direction: column;
|
|
202
296
|
gap: var(--spacing-md);
|
|
@@ -205,37 +299,37 @@ import{withPathPrefix as e}from"../../shared/path-prefix.js";import{PageContext
|
|
|
205
299
|
padding: var(--spacing-xs);
|
|
206
300
|
overflow: auto;
|
|
207
301
|
list-style: none;
|
|
208
|
-
`,
|
|
302
|
+
`,Ve=m.ul`
|
|
209
303
|
display: flex;
|
|
210
304
|
flex-direction: column;
|
|
211
305
|
gap: var(--spacing-sm);
|
|
212
306
|
margin: var(--spacing-sm) 0 0;
|
|
213
307
|
padding: 0;
|
|
214
308
|
list-style: none;
|
|
215
|
-
`,
|
|
309
|
+
`,He=m.li`
|
|
216
310
|
display: flex;
|
|
217
311
|
align-items: flex-start;
|
|
218
312
|
gap: var(--spacing-xs);
|
|
219
|
-
`,
|
|
313
|
+
`,Ue=h`
|
|
220
314
|
flex: none;
|
|
221
315
|
width: 24px;
|
|
222
316
|
height: 24px;
|
|
223
317
|
border-radius: 50%;
|
|
224
|
-
`,
|
|
225
|
-
${
|
|
318
|
+
`,We=m.img`
|
|
319
|
+
${Ue}
|
|
226
320
|
object-fit: cover;
|
|
227
|
-
`,
|
|
228
|
-
${
|
|
321
|
+
`,Ge=m.span`
|
|
322
|
+
${Ue}
|
|
229
323
|
display: inline-flex;
|
|
230
324
|
align-items: center;
|
|
231
325
|
justify-content: center;
|
|
232
326
|
background: var(--border-color-secondary);
|
|
233
327
|
color: var(--text-color-secondary);
|
|
234
328
|
font-size: var(--font-size-sm);
|
|
235
|
-
`,
|
|
329
|
+
`,Ke=m.div`
|
|
236
330
|
flex: 1;
|
|
237
331
|
min-width: 0;
|
|
238
|
-
`,
|
|
332
|
+
`,qe=m.div`
|
|
239
333
|
display: flex;
|
|
240
334
|
flex-wrap: wrap;
|
|
241
335
|
align-items: center;
|
|
@@ -245,25 +339,25 @@ import{withPathPrefix as e}from"../../shared/path-prefix.js";import{PageContext
|
|
|
245
339
|
color: var(--text-color-primary);
|
|
246
340
|
font-weight: var(--font-weight-semibold);
|
|
247
341
|
}
|
|
248
|
-
`,
|
|
342
|
+
`,Je=m.time`
|
|
249
343
|
color: var(--text-color-description);
|
|
250
344
|
font-size: var(--font-size-sm);
|
|
251
|
-
`,
|
|
345
|
+
`,Ye=m.div`
|
|
252
346
|
overflow: hidden;
|
|
253
347
|
color: var(--text-color-secondary);
|
|
254
348
|
text-overflow: ellipsis;
|
|
255
349
|
white-space: nowrap;
|
|
256
|
-
`,
|
|
350
|
+
`,Xe=m.span`
|
|
257
351
|
color: var(--text-color-primary);
|
|
258
352
|
font-weight: var(--font-weight-medium);
|
|
259
|
-
`,
|
|
260
|
-
${
|
|
261
|
-
`,
|
|
353
|
+
`,Ze=m(w)`
|
|
354
|
+
${T}
|
|
355
|
+
`,Qe=m.p`
|
|
262
356
|
margin: var(--spacing-xxs) 0 0;
|
|
263
357
|
color: var(--text-color-primary);
|
|
264
358
|
white-space: pre-wrap;
|
|
265
359
|
overflow-wrap: anywhere;
|
|
266
|
-
|
|
360
|
+
`,$e=m.ul`
|
|
267
361
|
flex: 1;
|
|
268
362
|
min-height: 0;
|
|
269
363
|
margin: 0;
|
|
@@ -274,7 +368,7 @@ import{withPathPrefix as e}from"../../shared/path-prefix.js";import{PageContext
|
|
|
274
368
|
li[data-active] > * {
|
|
275
369
|
background: var(--dropdown-menu-item-bg-color-hover);
|
|
276
370
|
}
|
|
277
|
-
`,
|
|
371
|
+
`,et=h`
|
|
278
372
|
display: flex;
|
|
279
373
|
align-items: center;
|
|
280
374
|
justify-content: space-between;
|
|
@@ -283,39 +377,39 @@ import{withPathPrefix as e}from"../../shared/path-prefix.js";import{PageContext
|
|
|
283
377
|
border-radius: var(--dropdown-menu-item-border-radius);
|
|
284
378
|
color: var(--dropdown-menu-item-color);
|
|
285
379
|
text-decoration: none;
|
|
286
|
-
`,
|
|
287
|
-
${
|
|
380
|
+
`,tt=m(w)`
|
|
381
|
+
${et}
|
|
288
382
|
background: ${({$current:e})=>e?`var(--dropdown-menu-item-bg-color-active)`:`transparent`};
|
|
289
383
|
|
|
290
384
|
&:hover {
|
|
291
385
|
background: var(--dropdown-menu-item-bg-color-hover);
|
|
292
386
|
color: var(--dropdown-menu-item-color-hover);
|
|
293
387
|
}
|
|
294
|
-
`,
|
|
388
|
+
`,nt=m.span`
|
|
295
389
|
display: flex;
|
|
296
390
|
flex-direction: column;
|
|
297
391
|
min-width: 0;
|
|
298
|
-
`,
|
|
392
|
+
`,rt=m.span`
|
|
299
393
|
overflow: hidden;
|
|
300
394
|
text-overflow: ellipsis;
|
|
301
395
|
white-space: nowrap;
|
|
302
|
-
`,
|
|
396
|
+
`,it=m.span`
|
|
303
397
|
overflow: hidden;
|
|
304
398
|
color: var(--text-color-description);
|
|
305
399
|
font-size: var(--font-size-sm);
|
|
306
400
|
line-height: var(--line-height-sm);
|
|
307
401
|
text-overflow: ellipsis;
|
|
308
402
|
white-space: nowrap;
|
|
309
|
-
|
|
403
|
+
`,at=m.span`
|
|
310
404
|
flex: none;
|
|
311
405
|
color: var(--text-color-description);
|
|
312
406
|
font-size: var(--font-size-sm);
|
|
313
407
|
line-height: var(--line-height-sm);
|
|
314
|
-
`,
|
|
315
|
-
${
|
|
408
|
+
`,ot=m.span`
|
|
409
|
+
${et}
|
|
316
410
|
color: var(--dropdown-menu-item-color-disabled);
|
|
317
411
|
|
|
318
|
-
${
|
|
412
|
+
${rt} {
|
|
319
413
|
text-decoration: line-through;
|
|
320
414
|
}
|
|
321
|
-
`;export{
|
|
415
|
+
`;export{B as ReviewBar};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{PLATFORM_LOGIN_PARAM as e}from"../../shared/constants/review.js";import{withPathPrefix as t}from"../../shared/path-prefix.js";function n(n,r){return t(`${n}?redirectTo=${encodeURIComponent(r)}&${e}=true`)}export{n as reviewLoginUrl};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{delocalizeRouteSlug as e,toLocaleSlug as t}from"../shared/utils/l10n.js";import{stripPathPrefix as n,withPathPrefix as r}from"../shared/path-prefix.js";import{SIDEBAR_ROUTE_DEP_KEY as i}from"../shared/constants/route-deps.js";import{LoaderDataContext as a,PageContext as o}from"./contexts.js";import{useL10nConfig as s}from"./l10n/use-l10n-config.js";import{normalizePageSlug as c}from"./utils/routes/normalize-page-slug.js";import{HistoryMount as l}from"./history-mount.js";import{selectEntityRevisions as u}from"./use-entity-revisions.js";import{selectPageVersions as d}from"./use-page-versions.js";import{flattenTabItems as f,isTabbedSidebar as p}from"./sidebar/navigation-tabs.js";import{pageLoader as m}from"./app.js";import{useContext as h,useEffect as g,useRef as _}from"react";import{useLocation as v,useNavigate as y}from"react-router";import{jsx as b,jsxs as x}from"react/jsx-runtime";import{CatalogEntityHistoryButton as S}from"@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistoryButton";import{CatalogEntityHistorySidebar as C}from"@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar";async function w(e,n,a,o,s=``){let c=new URL(r(t(n,s)),window.location.origin),l=await m({request:new Request(c)});if(l instanceof Response)return t(n,s);let u=l.loaderData[i],h=p(u)?f(u.tabs):u,g=d(h,{...a,slug:o});return t(g.find(t=>t.version===e)?.link??n,s)}function T({pageVersion:r}){let i=h(a),d=h(o),{key:f,search:p}=v(),m=y(),{entityKey:T,items:E}=u(i),{currentLocale:D,defaultLocale:O}=s(),k=_(null);if(g(()=>()=>{k.current=null},[f]),!T||E.length===0)return null;let A=new URLSearchParams(p),j=A.get(`revision`),M=A.get(`version`)??r??E.find(e=>e.isCurrent)?.version??null,N=E.some(e=>e.version===M&&e.isDefaultVersion===!0),P=E.find(e=>e.version===M)?.versionLabel;return/* @__PURE__ */ x(l,{onClickCapture:i=>{let a=i.target.closest(`a`);if(!a||i.metaKey||i.ctrlKey||i.shiftKey)return;let o=D===O?``:D,s=t=>o&&e(t,o)||t,l=e=>s(c(n(e)??e)),u=l(a.pathname),f=E.find(e=>e.versionLink!==void 0&&s(e.versionLink)===u)?.version;if(!f)return;i.preventDefault();let p=l(window.location.pathname),h=f===r?Promise.resolve(t(p,o)):w(f,u,d,p,o).catch(()=>t(u,o)),g={};k.current=g,h.then(e=>{k.current===g&&m(`${e}${a.search}`)})},children:[/* @__PURE__ */ b(S,{version:M,isDefaultVersion:N,versionLabel:P}),/* @__PURE__ */ b(C,{entityKey:T,revision:j??void 0,version:M??void 0})]})}export{T as PageRevisionsHistory,w as resolveVersionSwitch};
|