import * as React from "react"; import type { ComponentProps, EntityInfo, PageBundle } from "../types/index.js"; import type { RuntimeAdapter } from "../platform/adapters/base.js"; import type { VeryfrontConfig } from "../config/index.js"; import { ComponentRegistry } from "./ssr/component-registry.js"; import type { RenderResult } from "./orchestrator/types.js"; import type { DependencyPinningSourceInput } from "../transforms/esm/package-registry.js"; import type { RenderEnvironment } from "./context/render-context.js"; interface PageRenderOptions { params?: Record; url?: URL; props?: ComponentProps; nonce?: string; /** Project ID for multi-project SSR module isolation */ projectId?: string; /** Enable node position injection for Studio Navigator */ studioEmbed?: boolean; /** Project slug for HTTP fallback in multi-project mode */ projectSlug?: string; /** Content source identifier for cache isolation (branch name or release ID) */ contentSourceId?: string; /** Release that owns the immutable browser artifacts for this render. */ releaseId?: string; /** Request-scoped dependency-pinning state used by transform caches. */ dependencyPinningCacheKey?: string; /** Immutable package map paired with dependencyPinningCacheKey. */ dependencyPinningDependencies?: Readonly>; /** Exact package source namespace paired with the immutable snapshot. */ dependencyPinningSource?: DependencyPinningSourceInput; /** Internal signal for the render owner's total deadline. */ abortSignal?: AbortSignal; /** * Request environment for this render. Takes precedence over the renderer's * own, so a renderer instance reused across environments never carries one * render's instrumentation into the next. */ environment?: RenderEnvironment; } interface PageBundleResult { pageElement?: React.ReactElement; pageBundle?: PageBundle; clientModuleCode?: string; pageModuleType?: "mdx" | "component"; collectedMetadata: Record; scriptResult?: RenderResult; } export declare class PageRenderer { private readonly projectDir; /** Compile vocabulary: "development" | "production". */ private readonly mode; /** * Request vocabulary: "preview" | "production". Drives studio * instrumentation. Only the fallback: a per-render environment wins. */ private readonly environment; private readonly config; private readonly adapter; private readonly componentRegistry; private readonly compileMDX; private readonly moduleServerUrl?; private readonly isLocalProject; private reactVersionPromise; constructor(options: { projectDir: string; /** Compile vocabulary: "development" | "production". */ mode: string; /** * Request vocabulary: "preview" | "production". A hosted preview render is * mode "production" with environment "preview", so the two are separate. */ environment: RenderEnvironment; config: VeryfrontConfig; adapter: RuntimeAdapter; componentRegistry: ComponentRegistry; compileMDX: (content: string, frontmatter?: Record, filePath?: string) => Promise; moduleServerUrl?: string; /** Server-trusted local-project identity. */ isLocalProject?: boolean; }); private getMergedComponents; private getReactVersion; private detectPageType; preparePageBundles(pageInfo: EntityInfo, slug: string, cachedModule: RenderResult["pageModule"] | undefined, options?: PageRenderOptions): Promise; getPageType(pageInfo: EntityInfo): { type: "mdx" | "component" | "script"; extension: string; description: string; }; validatePageBundle(result: PageBundleResult, slug: string): void; } export {}; //# sourceMappingURL=page-renderer.d.ts.map