@redocly/redoc-revel 0.138.0-next.7 → 0.138.0
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/CHANGELOG.md +355 -0
- package/dist/api-schemas/mcp-fetch-count.d.ts +24 -0
- package/dist/api-schemas/mcp-fetch-count.js +1 -0
- package/dist/bin.js +0 -0
- package/dist/cli/build/analytics/collect-analytics.js +1 -1
- package/dist/cli/build/analytics/collectors/get-processed-config-stats-usage.js +1 -1
- package/dist/cli/build/index.js +1 -1
- package/dist/cli/develop.js +1 -1
- package/dist/cli/eject/ejectTheme.js +1 -1
- package/dist/cli/translations/collect-config-translations.js +1 -1
- package/dist/client/App.js +1 -1
- package/dist/client/app/ReviewComments/ReviewComments.js +2 -2
- package/dist/client/app/l10n/hooks/useTranslationKeys.js +1 -1
- package/dist/client/app/markdoc/custom-components/openapi/openapi-example.js +1 -1
- package/dist/client/app/markdoc/custom-components/openapi/openapi-response-sample.js +1 -1
- package/dist/client/app/markdoc/custom-components/openapi/replay-openapi.js +1 -1
- package/dist/client/app/markdoc/hooks/use-store.d.ts +2 -3
- package/dist/client/app/pages/Invite/Invite.js +1 -1
- package/dist/client/app/search/useSearch.js +1 -1
- package/dist/client/app/utils/loadAndNavigate.js +1 -1
- package/dist/client/polyfills.js +1 -1
- package/dist/client/runtime/loader.js +1 -1
- package/dist/client/utils/catalog/parse-filter-query.js +1 -1
- package/dist/compiled/svgo/svgo-node.js +39 -39
- package/dist/constants/api.d.ts +1 -0
- package/dist/constants/api.js +1 -1
- package/dist/constants/common.d.ts +6 -0
- package/dist/constants/common.js +1 -1
- package/dist/constants/l10n/langs/ar.js +1 -1
- package/dist/constants/l10n/langs/de.js +1 -1
- package/dist/constants/l10n/langs/en.js +1 -1
- package/dist/constants/l10n/langs/es.js +1 -1
- package/dist/constants/l10n/langs/fr.js +1 -1
- package/dist/constants/l10n/langs/hi.js +1 -1
- package/dist/constants/l10n/langs/it.js +1 -1
- package/dist/constants/l10n/langs/ja.js +1 -1
- package/dist/constants/l10n/langs/ko.js +1 -1
- package/dist/constants/l10n/langs/pl.js +1 -1
- package/dist/constants/l10n/langs/pt-BR.js +1 -1
- package/dist/constants/l10n/langs/pt.js +1 -1
- package/dist/constants/l10n/langs/ru.js +1 -1
- package/dist/constants/l10n/langs/uk.js +1 -1
- package/dist/constants/l10n/langs/zh.js +1 -1
- package/dist/markdoc/helpers/get-inner-text.js +2 -2
- package/dist/markdoc/helpers/guards/is-prompt-node.d.ts +13 -0
- package/dist/markdoc/helpers/guards/is-prompt-node.js +1 -0
- package/dist/server/config/env-config.d.ts +0 -4
- package/dist/server/config/env-schema.d.ts +0 -10
- package/dist/server/config/env-schemas/feature-flags.d.ts +0 -8
- package/dist/server/config/env-schemas/feature-flags.js +1 -1
- package/dist/server/constants/entitlements.js +1 -1
- package/dist/server/entitlements/entitlements-provider.js +1 -1
- package/dist/server/esbuild/esbuild.js +3 -3
- package/dist/server/esbuild/plugins/on-rebuild.js +1 -1
- package/dist/server/esbuild/plugins/styled-components-ssr.js +1 -1
- package/dist/server/esbuild/plugins/yaml-loader.js +1 -1
- package/dist/server/fs/content-fs.js +1 -1
- package/dist/server/fs/utils/is-l10n-root-file.d.ts +3 -0
- package/dist/server/fs/utils/is-l10n-root-file.js +1 -0
- package/dist/server/plugins/analytics/amplitude/index.js +1 -1
- package/dist/server/plugins/analytics/heap/browser-hooks.js +1 -1
- package/dist/server/plugins/api-docs/index.js +1 -1
- package/dist/server/plugins/api-docs/loader.js +3 -3
- package/dist/server/plugins/api-docs/spec-download.api.js +1 -1
- package/dist/server/plugins/api-docs/utils/apply-nav-item-to-root.js +1 -1
- package/dist/server/plugins/api-docs/utils/decorators.d.ts +11 -0
- package/dist/server/plugins/api-docs/utils/decorators.js +1 -1
- package/dist/server/plugins/arazzo-docs/arazzo-doc-loader.js +2 -2
- package/dist/server/plugins/catalog-entities/extensions/extractors/api-description/openapi-entities-extractor.js +1 -1
- package/dist/server/plugins/catalog-entities/utils/extract-parts-from-channels-message-ref.js +1 -1
- package/dist/server/plugins/config-parser/format-custom-tags.js +1 -1
- package/dist/server/plugins/config-parser/loaders/content-slugs-loader.js +1 -1
- package/dist/server/plugins/config-parser/loaders/versions-config-loader.js +1 -1
- package/dist/server/plugins/config-parser/resolve-mutual-exclusion.js +1 -1
- package/dist/server/plugins/config-parser/safe-parse.js +1 -1
- package/dist/server/plugins/default-theme/resolve-logo.js +1 -1
- package/dist/server/plugins/dev-onboarding/api/adapters/apigee/adapter.js +2 -2
- package/dist/server/plugins/dev-onboarding/api/adapters/gravitee/client.js +2 -2
- package/dist/server/plugins/dev-onboarding/api/combine.js +1 -1
- package/dist/server/plugins/dev-onboarding/template/components/ApiKeyOverview.js +3 -3
- package/dist/server/plugins/dev-onboarding/template/components/AppOverview.js +1 -1
- package/dist/server/plugins/dev-onboarding/template/components/useSortableData.js +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/code-walkthrough/file-chunk-parser.d.ts +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/index.js +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-link.js +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-svg-content.js +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-tag-raw-content.d.ts +4 -0
- package/dist/server/plugins/markdown/attribute-resolvers/resolve-tag-raw-content.js +2 -0
- package/dist/server/plugins/markdown/compiler.js +1 -1
- package/dist/server/plugins/markdown/create-source-lines-reader.d.ts +7 -0
- package/dist/server/plugins/markdown/create-source-lines-reader.js +1 -0
- package/dist/server/plugins/markdown/html/normalize-html-headings.d.ts +9 -0
- package/dist/server/plugins/markdown/html/normalize-html-headings.js +1 -0
- package/dist/server/plugins/markdown/markdoc/markdoc-options.js +1 -1
- package/dist/server/plugins/markdown/markdoc/plugins/utils.d.ts +1 -1
- package/dist/server/plugins/markdown/markdoc/plugins/utils.js +1 -1
- package/dist/server/plugins/markdown/markdown-static-data-loader.js +1 -1
- package/dist/server/plugins/markdown/search/get-ai-search-documents.js +2 -2
- package/dist/server/plugins/markdown/search/search-resolver.js +1 -1
- package/dist/server/plugins/markdown/search/to-markdown.js +13 -13
- package/dist/server/plugins/markdown/search/walk-sections.d.ts +3 -1
- package/dist/server/plugins/markdown/search/walk-sections.js +3 -3
- package/dist/server/plugins/markdown/utils/sanitize-malformed-md-content.js +2 -2
- package/dist/server/plugins/mcp/audit/audit-log.d.ts +1 -1
- package/dist/server/plugins/mcp/audit/audit-log.js +1 -1
- package/dist/server/plugins/mcp/audit/code-credentials.d.ts +9 -0
- package/dist/server/plugins/mcp/audit/code-credentials.js +2 -0
- package/dist/server/plugins/mcp/codemode/capabilities/fetch/index.js +5 -5
- package/dist/server/plugins/mcp/codemode/capabilities/types.d.ts +3 -1
- package/dist/server/plugins/mcp/codemode/capabilities/utils.d.ts +2 -1
- package/dist/server/plugins/mcp/codemode/capabilities/utils.js +3 -3
- package/dist/server/plugins/mcp/codemode/code-audit.d.ts +4 -3
- package/dist/server/plugins/mcp/codemode/code-execution-audit.js +1 -1
- package/dist/server/plugins/mcp/custom-tools/scan-custom-tools.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tool-schemas.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/core/utils.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/core/whoami.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/openapi/list-apis.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/tools/openapi/utils.d.ts +12 -3
- package/dist/server/plugins/mcp/docs-mcp/tools/openapi/utils.js +1 -1
- package/dist/server/plugins/mcp/docs-mcp/utils/resolve-refs.d.ts +2 -2
- package/dist/server/plugins/mcp/docs-mcp/utils/resolve-refs.js +1 -1
- package/dist/server/plugins/mcp/gateway-mcp/allowed-http-methods.d.ts +11 -0
- package/dist/server/plugins/mcp/gateway-mcp/allowed-http-methods.js +1 -0
- package/dist/server/plugins/mcp/gateway-mcp/api-call-operations.d.ts +32 -0
- package/dist/server/plugins/mcp/gateway-mcp/api-call-operations.js +1 -0
- package/dist/server/plugins/mcp/gateway-mcp/callable-apis.d.ts +7 -4
- package/dist/server/plugins/mcp/gateway-mcp/callable-apis.js +1 -1
- package/dist/server/plugins/mcp/gateway-mcp/caller-api-calls.d.ts +9 -0
- package/dist/server/plugins/mcp/gateway-mcp/caller-api-calls.js +1 -0
- package/dist/server/plugins/mcp/gateway-mcp/credential-validation.js +1 -1
- package/dist/server/plugins/mcp/gateway-mcp/elicitation.d.ts +1 -0
- package/dist/server/plugins/mcp/gateway-mcp/elicitation.js +5 -5
- package/dist/server/plugins/mcp/gateway-mcp/eligibility.d.ts +8 -4
- package/dist/server/plugins/mcp/gateway-mcp/eligibility.js +1 -1
- package/dist/server/plugins/mcp/gateway-mcp/fetch/fetch-audit.d.ts +2 -1
- package/dist/server/plugins/mcp/gateway-mcp/fetch/fetch-audit.js +1 -1
- package/dist/server/plugins/mcp/gateway-mcp/fetch/fetch-bridge.d.ts +11 -1
- package/dist/server/plugins/mcp/gateway-mcp/fetch/fetch-bridge.js +1 -1
- package/dist/server/plugins/mcp/gateway-mcp/fetch/redact.d.ts +11 -0
- package/dist/server/plugins/mcp/gateway-mcp/fetch/redact.js +1 -1
- package/dist/server/plugins/mcp/gateway-mcp/fetch-capability.js +1 -1
- package/dist/server/plugins/mcp/gateway-mcp/rate-limit/fetch-limiter/fetch-count-client.d.ts +4 -0
- package/dist/server/plugins/mcp/gateway-mcp/rate-limit/fetch-limiter/fetch-count-client.js +1 -0
- package/dist/server/plugins/mcp/gateway-mcp/rate-limit/fetch-limiter/fetch-count-secret.d.ts +4 -0
- package/dist/server/plugins/mcp/gateway-mcp/rate-limit/fetch-limiter/fetch-count-secret.js +1 -0
- package/dist/server/plugins/mcp/gateway-mcp/rate-limit/fetch-limiter/fetch-count.d.ts +11 -0
- package/dist/server/plugins/mcp/gateway-mcp/rate-limit/fetch-limiter/fetch-count.js +1 -0
- package/dist/server/plugins/mcp/gateway-mcp/rate-limit/fetch-limiter/fetch-counter-repository.d.ts +13 -0
- package/dist/server/plugins/mcp/gateway-mcp/rate-limit/fetch-limiter/fetch-counter-repository.js +13 -0
- package/dist/server/plugins/mcp/gateway-mcp/rate-limit/{limits.d.ts → fetch-limiter/fetch-limits.d.ts} +1 -1
- package/dist/server/plugins/mcp/gateway-mcp/rate-limit/fetch-limiter/fetch-limits.js +1 -0
- package/dist/server/plugins/mcp/gateway-mcp/rate-limit/{apply-edge-rate-limit.d.ts → request-limiter/apply-edge-rate-limit.d.ts} +1 -1
- package/dist/server/plugins/mcp/gateway-mcp/rate-limit/request-limiter/apply-edge-rate-limit.js +1 -0
- package/dist/server/plugins/mcp/gateway-mcp/rate-limit/{edge-limiter.d.ts → request-limiter/edge-limiter.d.ts} +3 -3
- package/dist/server/plugins/mcp/gateway-mcp/rate-limit/request-limiter/edge-limiter.js +1 -0
- package/dist/server/plugins/mcp/gateway-mcp/rate-limit/request-limiter/rate-limit-telemetry.js +1 -0
- package/dist/server/plugins/mcp/gateway-mcp/rate-limit/request-limiter/request-limits.d.ts +6 -0
- package/dist/server/plugins/mcp/gateway-mcp/rate-limit/request-limiter/request-limits.js +1 -0
- package/dist/server/plugins/mcp/gateway-mcp/rate-limit/utils/ip-key.js +1 -0
- package/dist/server/plugins/mcp/gateway-mcp/rate-limit/{window-counter.d.ts → utils/window-counter.d.ts} +1 -1
- package/dist/server/plugins/mcp/gateway-mcp/rate-limit/utils/window-counter.js +1 -0
- package/dist/server/plugins/mcp/gateway-mcp/route-pattern.d.ts +18 -0
- package/dist/server/plugins/mcp/gateway-mcp/route-pattern.js +1 -0
- package/dist/server/plugins/mcp/gateway-mcp/secret-store.d.ts +9 -3
- package/dist/server/plugins/mcp/gateway-mcp/secret-store.js +1 -1
- package/dist/server/plugins/mcp/gateway-mcp/subject.js +1 -1
- package/dist/server/plugins/mcp/gateway-mcp/upstream-auth-scheme.d.ts +2 -0
- package/dist/server/plugins/mcp/gateway-mcp/upstream-auth-scheme.js +2 -2
- package/dist/server/plugins/mcp/gateway-mcp/upstream-auth.d.ts +0 -2
- package/dist/server/plugins/mcp/gateway-mcp/upstream-auth.js +1 -1
- package/dist/server/plugins/mcp/handlers/credentials-page/constants.d.ts +7 -0
- package/dist/server/plugins/mcp/handlers/credentials-page/constants.js +1 -0
- package/dist/server/plugins/mcp/handlers/credentials-page/form-contract.d.ts +5 -0
- package/dist/server/plugins/mcp/handlers/credentials-page/form-contract.js +1 -0
- package/dist/server/plugins/mcp/handlers/credentials-page/form-page.d.ts +14 -0
- package/dist/server/plugins/mcp/handlers/credentials-page/form-page.js +62 -0
- package/dist/server/plugins/mcp/handlers/credentials-page/layout.d.ts +17 -0
- package/dist/server/plugins/mcp/handlers/credentials-page/layout.js +11 -0
- package/dist/server/plugins/mcp/handlers/credentials-page/outcome-pages.d.ts +10 -0
- package/dist/server/plugins/mcp/handlers/credentials-page/outcome-pages.js +11 -0
- package/dist/server/plugins/mcp/handlers/credentials-page/site-branding.d.ts +10 -0
- package/dist/server/plugins/mcp/handlers/credentials-page/site-branding.js +1 -0
- package/dist/server/plugins/mcp/handlers/credentials-page/styles.d.ts +4 -0
- package/dist/server/plugins/mcp/handlers/credentials-page/styles.js +186 -0
- package/dist/server/plugins/mcp/handlers/credentials-page/types.d.ts +32 -0
- package/dist/server/plugins/mcp/handlers/credentials-page/types.js +0 -0
- package/dist/server/plugins/mcp/handlers/docs-mcp-handler.js +1 -1
- package/dist/server/plugins/mcp/handlers/handle-mcp-request.js +1 -1
- package/dist/server/plugins/mcp/handlers/mcp-credentials-handler.d.ts +0 -1
- package/dist/server/plugins/mcp/handlers/mcp-credentials-handler.js +1 -1
- package/dist/server/plugins/mcp/index.js +1 -1
- package/dist/server/plugins/mcp/servers/docs-server.js +1 -1
- package/dist/server/plugins/mcp/servers/mcp-server.js +2 -2
- package/dist/server/plugins/mcp/types.d.ts +16 -1
- package/dist/server/plugins/mcp/utils/mode.d.ts +4 -1
- package/dist/server/plugins/mcp/utils/mode.js +1 -1
- package/dist/server/plugins/mcp/utils/xmcp-utils.d.ts +3 -5
- package/dist/server/plugins/mcp/utils/xmcp-utils.js +1 -1
- package/dist/server/plugins/nav-utils.js +1 -1
- package/dist/server/plugins/scorecard-classic/loaders/scorecard.js +1 -1
- package/dist/server/plugins/scorecard-classic/template/components.js +1 -1
- package/dist/server/plugins/scorecard-classic/template/useData.js +1 -1
- package/dist/server/plugins/scorecard-classic/template/views.js +1 -1
- package/dist/server/plugins/search/engines/flexsearch/index.js +2 -2
- package/dist/server/plugins/sidebars/index.js +2 -2
- package/dist/server/plugins/sidebars/tabs.js +1 -1
- package/dist/server/plugins/sidebars/utils.js +1 -1
- package/dist/server/providers/database/client.d.ts +5 -0
- package/dist/server/providers/database/client.js +1 -1
- package/dist/server/providers/database/copy-migrations.js +1 -1
- package/dist/server/providers/database/database-connections-manager.js +1 -1
- package/dist/server/providers/database/has-project-database.d.ts +3 -0
- package/dist/server/providers/database/has-project-database.js +1 -0
- package/dist/server/store.d.ts +2 -0
- package/dist/server/store.js +1 -1
- package/dist/server/tools/notifiers/formatter.js +1 -1
- package/dist/server/tools/notifiers/helpers/privacy/mask-email.js +1 -1
- package/dist/server/tools/notifiers/logger.js +1 -1
- package/dist/server/types/plugins/markdown.d.ts +2 -0
- package/dist/server/types/web-server.d.ts +1 -0
- package/dist/server/utils/codeframes/codeframes.js +2 -2
- package/dist/server/utils/entitlements/read-entitlement-number.d.ts +3 -0
- package/dist/server/utils/entitlements/read-entitlement-number.js +1 -0
- package/dist/server/utils/fs.js +1 -1
- package/dist/server/utils/is-api-download-link.d.ts +1 -0
- package/dist/server/utils/is-api-download-link.js +1 -1
- package/dist/server/utils/rbac.js +1 -1
- package/dist/server/utils/redact-url.d.ts +3 -2
- package/dist/server/utils/redact-url.js +1 -1
- package/dist/server/utils/sandbox-context.d.ts +7 -4
- package/dist/server/utils/sandbox-context.js +1 -1
- package/dist/server/web-server/auth.d.ts +0 -1
- package/dist/server/web-server/auth.js +4 -4
- package/dist/server/web-server/dev-server.js +1 -1
- package/dist/server/web-server/http.d.ts +2 -1
- package/dist/server/web-server/http.js +2 -2
- package/dist/server/web-server/jwt/token-types.d.ts +1 -0
- package/dist/server/web-server/jwt/token-types.js +1 -1
- package/dist/server/web-server/middleware/catalogAuthMiddleware.js +1 -1
- package/dist/server/web-server/middleware/dynamic-middleware/hono-compose.js +1 -1
- package/dist/server/web-server/middleware/responseHeadersMiddleware.js +1 -1
- package/dist/server/web-server/routes/auth.d.ts +1 -1
- package/dist/server/web-server/routes/auth.js +1 -1
- package/dist/server/web-server/routes/catalog/helpers/create-entity-schema.d.ts +1756 -1756
- package/dist/server/web-server/routes/catalog/helpers/create-entity-update-schema.d.ts +295 -295
- package/dist/server/web-server/routes/cors-proxy.js +2 -2
- package/dist/server/web-server/routes/index.js +1 -1
- package/dist/server/web-server/routes/mcp-routes/mcp-consent-page.d.ts +24 -0
- package/dist/server/web-server/routes/mcp-routes/mcp-consent-page.js +35 -0
- package/dist/server/web-server/routes/mcp-routes/mcp-fetch-count.d.ts +8 -0
- package/dist/server/web-server/routes/mcp-routes/mcp-fetch-count.js +1 -0
- package/dist/server/web-server/routes/mcp-routes/mcp-oauth-store.d.ts +15 -0
- package/dist/server/web-server/routes/mcp-routes/mcp-oauth-store.js +1 -0
- package/dist/server/web-server/routes/mcp-routes/mcp-oauth.d.ts +3 -1
- package/dist/server/web-server/routes/mcp-routes/mcp-oauth.js +1 -1
- package/dist/server/web-server/routes/mcp-routes/mcp-routes.js +1 -1
- package/dist/server/web-server/routes/mcp-routes/mcp-server-card.js +1 -1
- package/dist/server/web-server/routes/resolve-route.js +1 -1
- package/dist/server/workers/worker-pool.js +1 -1
- package/dist/types/entitlements.d.ts +2 -0
- package/dist/utils/time/debounce.js +1 -1
- package/package.json +10 -11
- package/dist/client/app/utils/withLoadProgress.d.ts +0 -2
- package/dist/client/app/utils/withLoadProgress.js +0 -1
- package/dist/server/plugins/mcp/gateway-mcp/rate-limit/apply-edge-rate-limit.js +0 -1
- package/dist/server/plugins/mcp/gateway-mcp/rate-limit/edge-limiter.js +0 -1
- package/dist/server/plugins/mcp/gateway-mcp/rate-limit/ip-key.js +0 -1
- package/dist/server/plugins/mcp/gateway-mcp/rate-limit/limits.js +0 -1
- package/dist/server/plugins/mcp/gateway-mcp/rate-limit/rate-limit-telemetry.js +0 -1
- package/dist/server/plugins/mcp/gateway-mcp/rate-limit/window-counter.js +0 -1
- package/dist/server/plugins/mcp/handlers/mcp-credentials-page.d.ts +0 -12
- package/dist/server/plugins/mcp/handlers/mcp-credentials-page.js +0 -225
- /package/dist/server/plugins/mcp/gateway-mcp/rate-limit/{rate-limit-telemetry.d.ts → request-limiter/rate-limit-telemetry.d.ts} +0 -0
- /package/dist/server/plugins/mcp/gateway-mcp/rate-limit/{ip-key.d.ts → utils/ip-key.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e,{useState as m}from"react";import d from"styled-components";import{Button as s}from"@redocly/theme/components/Button/Button";import{H3 as p}from"@redocly/theme/components/Typography/H3";import{ServerRoutes as u}from"../../../../constants/api";import{withPathPrefix as f}from"@redocly/theme/core/utils";function g(){const t=new URLSearchParams(window.location.search);return{code:t.get("code")||"",org:t.get("org")||"",invitedBy:t.get("invitedBy")||""}}function P(){const{code:t,org:a,invitedBy:i}=g(),[o,l]=m(t),c=async r=>{if(r.preventDefault(),!o)return;const n=new URL(f(u.IDP_LOGIN),window.location.href);n.searchParams.set("inviteCode",o),n.searchParams.set("redirectTo","/"),window.location.href=n.toString()};return e.createElement(v,null,e.createElement(p,null
|
|
1
|
+
import e,{useState as m}from"react";import d from"styled-components";import{Button as s}from"@redocly/theme/components/Button/Button";import{H3 as p}from"@redocly/theme/components/Typography/H3";import{ServerRoutes as u}from"../../../../constants/api";import{withPathPrefix as f}from"@redocly/theme/core/utils";function g(){const t=new URLSearchParams(window.location.search);return{code:t.get("code")||"",org:t.get("org")||"",invitedBy:t.get("invitedBy")||""}}function P(){const{code:t,org:a,invitedBy:i}=g(),[o,l]=m(t),c=async r=>{if(r.preventDefault(),!o)return;const n=new URL(f(u.IDP_LOGIN),window.location.href);n.searchParams.set("inviteCode",o),n.searchParams.set("redirectTo","/"),window.location.href=n.toString()};return e.createElement(v,null,e.createElement(p,null,`Join ${a||"Redocly"}`),e.createElement("form",{onSubmit:c},e.createElement("div",{className:"form-content"},!t&&e.createElement(e.Fragment,null,e.createElement("span",{className:"label",id:"invite-code-label"},"Enter your invite code"),e.createElement("input",{type:"text","aria-labelledby":"invite-code-label",value:o,onChange:r=>l(r.target.value),placeholder:"Invite code",autoFocus:!0})),i&&e.createElement("div",{className:"invite-info"},e.createElement("strong",null,i)," has invited you to join"),e.createElement(s,{fullWidth:!0,size:"large",variant:"primary",type:"submit",disabled:!o},"Accept invite"))))}const v=d.div`
|
|
2
2
|
font-family: var(--font-family-base);
|
|
3
3
|
display: flex;
|
|
4
4
|
justify-content: center;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useCallback as
|
|
1
|
+
import{useCallback as D,useEffect as k,useMemo as L,useState as S,useRef as A}from"react";import{SEARCH_DEBOUNCE_TIME_MS as U}from"@redocly/theme/core/constants";import{getBaseDataAttributes as B,withPathPrefix as v}from"@redocly/theme/core/utils";import{ServerRoutes as H}from"../../../constants/api";import{SEARCH_GROUP_FACET_FIELD as T,SEARCH_PRODUCT_FIELD as J,SEARCH_VERSION_FIELD as K}from"../../../constants/common";import{debounce as $}from"../../../utils/time/debounce.js";import{useSearchSession as z}from"@redocly/theme/core/contexts";import{useGlobalData as j,useI18nConfig as x}from"../hooks";import{usePageVersions as W}from"../../providers/page-data/hooks";import{useFacets as X}from"./useFacets";import{telemetry as Y}from"../telemetry/index.js";const Z=(n,u,r,i,R,s,F,l,o,d)=>{const{searchSessionId:C}=z(),{currentLocale:E}=x(),f=A(""),p=A(null),h=A(async(e,a)=>{try{F(null);const t=await fetch(v(H.SEARCH),a);if(!t.ok)throw new Error(t.statusText||`Search failed (${t.status})`);if(y(e)){const c=await t.json();i(c.facets),r(c.documents),R(c.groupCounts??{}),p.current=null,e.trim().length>1&&Y.sendSearchQueryMessage([{...B("searchQuery","search"),query:e,resultCount:Object.keys(c.documents).length.toString(),searchSessionId:C,...o&&{product:o}}]),s(!1)}}catch(t){if(!y(e))return;p.current={query:e,requestParams:a},r({}),s(!1),F(t instanceof Error?t.message:"An unknown error occurred")}}),y=e=>f.current===e,m=L(()=>$(async(e,a,t,c)=>{if(!e.trim().length&&!a.length){r({}),i({}),R({}),s(!1),F(null),p.current=null;return}const g={method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:e,filter:G(a,c,l),locale:t})};await h.current(e,g)},U),[l?.version,l?.folderId,o]);return k(()=>{d||(s(!0),m(n,u,E,o),f.current=n)},[d,u,E,o,n,m,s]),{retrySearch:D(async()=>{const e=p.current;e&&(s(!0),f.current=e.query,await h.current(e.query,e.requestParams))},[s])}},V=(n,u,r,i,R,s,F,l,o,d)=>{const{currentLocale:C}=x();k(()=>{E(r,n,u,C,i,R,o,d)},[i,o,d?.version,d?.folderId]);const E=D(async(f,p,h,y,m,b,e,a)=>{if(m){const{groupKey:t}=m;l(!0);const g={method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:p,filter:(()=>{const I=b.find(O=>O.field===T);let _=h;return I&&(h.find(q=>q.field===I.field)||(_=[...h,{field:I.field,values:[t]}])),G(_,e,a)})(),loadMore:m,locale:y})},w=await(await fetch(v(H.SEARCH),g)).json(),M=f[t]||[],N=w.documents[t]??[],Q={...f,[t]:[...M,...N]};s(Q),w.groupCounts&&F(I=>({...I,...w.groupCounts})),l(!1)}},[]);return{}};function fe(){const{searchFeatures:n}=j();return{askAi:n?.ai?.enabled}}function me(n,u){const{searchFeatures:r}=j(),[i,R]=S(""),[s,F]=S([]),[l,o]=S({}),[d,C]=S({}),[E,f]=S({}),[p,h]=S(),[y,m]=S(!1),[b,e]=S(null),{facets:a}=X(d),{versions:t=[]}=W()||{},c=t.find(P=>P?.active),{retrySearch:g}=Z(i,s,o,C,f,m,e,c,n,u);return V(i,s,l,p,a,o,f,m,n,c),{query:i,setQuery:R,filter:s,setFilter:F,items:l,isSearchLoading:y,searchError:b,facets:a,groupCounts:E,groupField:T,setLoadMore:h,retrySearch:g,advancedSearch:r?.advanced?.enabled,askAi:r?.ai?.enabled}}function G(n,u,r){return[...n,...u?[{field:J,values:[u]}]:[],...r?[{field:K,values:[...r.default?["default"]:[r.folderId,r.version]]}]:[]]}export{me as useSearch,fe as useSearchFeatures};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{withLoadProgress as f}from"@redocly/theme/core/utils";import{isLocalLink as m}from"../../../utils/path/is-local-link.js";import{isAuthRoutePath as u}from"../../../utils/auth/is-auth-route-path.js";import{scrollToAnchor as p}from"./scroll-to-anchor";let s;async function A({navigate:r,to:o,origin:a="browser",options:c}){o===""&&(o="/"),s=o;const{pathname:i,hash:d,search:t}=new URL(o,window.location.origin+window.location.pathname),n=decodeURIComponent(d),h=decodeURIComponent(window.location.hash);if(u(i)){window.location.href=o;return}const w=window.__LOADER,e=await f(w.tryLoad(i,void 0,t));if(e?.redirectTo){if(!m(e.redirectTo)){window.location.href=e.redirectTo;return}return A({navigate:r,to:e.redirectTo,origin:a,options:c})}if(e&&s===o){if(i!==window.location.pathname||t!==window.location.search||n!==h?r({pathname:i,search:t,hash:n},{...c,state:{origin:a},flushSync:!0}):n&&window.dispatchEvent(new HashChangeEvent("hashchange")),e.props?.disableAutoScroll)return;requestAnimationFrame(()=>{if(n){const l=n.slice(1);p(l)}else window.scrollTo(0,0)})}}export{A as loadAndNavigate};
|
package/dist/client/polyfills.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
typeof Element<"u"&&!Element.prototype.scrollIntoViewIfNeeded&&(Element.prototype.scrollIntoViewIfNeeded=function(e){e=arguments.length===0?!0:!!e;
|
|
1
|
+
typeof Element<"u"&&!Element.prototype.scrollIntoViewIfNeeded&&(Element.prototype.scrollIntoViewIfNeeded=function(e){e=arguments.length===0?!0:!!e;const t=i(this);if(!t)return;const n=t.getBoundingClientRect(),o=this.getBoundingClientRect();(o.top<n.top||o.bottom>n.bottom||o.right>n.right||o.left<n.left)&&this.scrollIntoView({block:e?"center":"nearest",inline:e?"center":"nearest"})});function i(e){const t=e.parentNode;return!t||t===document?null:t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth?t:i(t)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as g from"react";import{withPathPrefix as x}from"@redocly/theme/core/utils";import{appendSearchParams as z}from"../utils";import{mapObject as I}from"../../utils/object/map-object.js";import{mapObjectAsync as $}from"../../utils/object/map-object-async.js";import{isFunction as A}from"../../utils/guards/is-function.js";import{isBrowser as G}from"../../utils/env/is-browser.js";import{GLOBAL_DATA_URL as N}from"../../constants/common.js";import{getClientPageDataUrl as V}from"../../utils/url/get-client-page-data-url.js";import{getSharedDataFetchUrl as B}from"../../utils/url/get-shared-data-fetch-url.js";import{normalizeRouteSlug as c}from"../../utils/path/normalize-route-slug.js";import{templates as b}from"./generated/templates.js";import{AsyncCache as S}from"./cache.js";import{fetch as y}from"./fetch.js";import{updateTranslations as F}from"../app/l10n";import{PageMissingDefaultExportError as v}from"./errors/page-missing-default-export-error.js";const l=new S,d=new S;let D=null,m,K;const u=new Set;async function W(){const o=await(await y(x(N))).json();return m=o,o}async function C(o){const t=B(o,process.env.NODE_ENV==="development");return await(await y(t)).json()}async function q(o){return d.has(o)||d.set(o,C(o)),d.get(o)}function dt(){const[,o]=g.useReducer(t=>t+1,0);g.useEffect(()=>{process.env.NODE_ENV!=="production"&&(window.__redoclyRefresh=o)},[o])}function _(o,t){const e=t?new URLSearchParams(t).get("revision"):null,a=t?new URLSearchParams(t).get("version"):null;return e||a?`${o}?${e?`revision=${encodeURIComponent(e)}`:""}${a?`&version=${encodeURIComponent(a)}`:""}`.trim():o}class p{static markdocComponents={};static async updateTemplate(t,e,a){const n=c(t);b[a]=()=>e;const r=c(window.location.pathname);n===r&&(await this.load(t,!0),window.__redoclyRefresh())}static async update(t){const e=c(t),a=c(window.location.pathname);if(e!==a){l.delete(e);return}await this.load(t,!0),window.__redoclyRefresh()}static async updateSharedData(t){await d.set(t,C(t)),window.__redoclyRefresh()}static addGlobalDataListener(t){u.add(t)}static removeGlobalDataListener(t){u.delete(t)}static updateGlobalData(t){u.forEach(e=>e(t)),m=t,F(m.l10n)}static async tryLoad(t,e,a){try{return await this.load(t,e,a)}catch{return null}}static async loadDynamicMarkdocComponents(t){const e=this.markdocComponents?.[t];e&&A(e)&&Object.assign(this.markdocComponents,await e())}static async load(t,e,a){const n=c(t),r=_(n,a);if(!m&&!D&&(D=W()),!e&&l.has(r)){const f=await l.get(r);if(f)return f}const[i]=await Promise.all([l.set(r,s(a)),D]);return i;async function s(f){const E=V(n),T=z(E,f),k=await y(T),{templateId:P,sharedDataIds:w,props:R,userData:L,versions:M,redirectTo:O,isPublic:U}=await k.json(),[j]=await Promise.all([(async()=>p.loadTemplate(P))(),Promise.all((R.dynamicMarkdocComponents||[]).map(h=>p.loadDynamicMarkdocComponents(h))),w?$(w,h=>q(h)):Promise.resolve({})]);return{templateId:P,slug:n,sharedDataIds:w,redirectTo:O,props:R,Template:j,userData:L,versions:M,isPublic:U}}}static loadSync(t){const e=c(t),a=_(e,typeof window<"u"?window.location.search:void 0),n=l.tryGetSync(a);if(!n)return;const r=I(n.sharedDataIds,i=>d.getSync(i,"Data dependency not cached ahead of time: "+i));return{...n,sharedData:r}}static async prepare(t,e,a,n){const r=t.templateId;if(await Promise.all((t.props.dynamicMarkdocComponents||[]).map(s=>this.loadDynamicMarkdocComponents(s))),e)for(const s of Object.keys(e))d.setSync(s,e[s]);const i=await p.loadTemplate(r);if(i){const s=c(t.slug);l.setSync(s,{templateId:r,slug:s,props:t.props,sharedDataIds:t.sharedDataIds||{},Template:i,userData:t.userInfo,versions:t.versions,isPublic:t.isPublic})}m=a,K=n}static async loadTemplate(t){try{const e=await b[t]();if(t.endsWith("page.tsx")&&!e.default)throw new v(t);const a=e.default;return H(a)?a:a?.default}catch(e){if(!(process.env.NODE_ENV==="development")||!G())throw e;return e instanceof v?()=>(window.location.reload(),null):(window.location.reload(),null)}}static clear(){u.clear(),d.clear(),l.clear()}}(typeof window<"u"?window:global).__LOADER=p;function H(o){return typeof o=="function"||typeof o=="object"&&o!==null&&"$$typeof"in o}export{p as Loader,q as getSharedData,m as globalData,K as initLocale,dt as useRefresh};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function m(
|
|
1
|
+
function m(f,s=[]){const n=Array.from({length:s.length},()=>new Set),r=decodeURIComponent(f);if(!r)return n;const o=r.split(/(?<!\s)\s+(?:AND|OR)\s+|\(|\)/).reduce((t,e)=>{const l=e.trim();return l.length>0&&t.push(l),t},[]);for(const t of o){const e=Math.max(t.indexOf(":"),t.indexOf("~"));if(e===-1)continue;const l=t.slice(0,e),a=t.slice(e+1),i=s.findIndex(c=>c.property===l);if(i===-1)continue;if(s[i].type==="date-range"&&a.includes("..")){const[c,u]=a.split("..");n[i]={from:c,to:u}}else{const c=d(a.toLowerCase()),u=n[i]instanceof Set?n[i]:new Set;c.forEach(p=>u.add(p))}}return n}function d(f){const s=[];let n="",r=!1,o="";for(let t=0;t<f.length;t++){const e=f[t];!r&&(e==='"'||e==="'")?(r=!0,o=e):r&&e===o?(r=!1,o=""):!r&&e===","?(s.push(n.trim()),n=""):n+=e}return n.trim()&&s.push(n.trim()),s.map(t=>t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?t.slice(1,-1):t)}export{m as parseFilterQuery};
|