import * as React from "react"; import type { EntityInfo, LayoutItem, MdxBundle, MDXComponents } from "../../types/index.js"; import type { RuntimeAdapter } from "../../platform/adapters/base.js"; import type { VeryfrontConfig } from "../../config/index.js"; import type { ImportMapConfig } from "../../modules/import-map/types.js"; import type { LayoutCollector, LayoutCompiler } from "../layouts/index.js"; import type { LayoutComponentCache } from "../layouts/utils/component-loader.js"; import { type DependencyPinningSourceInput } from "../../transforms/esm/package-registry.js"; import type { ComponentRegistry } from "../ssr/component-registry.js"; import type { RenderEnvironment } from "../context/render-context.js"; export interface LayoutOrchestratorConfig { projectDir: string; projectId: string; projectSlug: string; contentSourceId: string; adapter: RuntimeAdapter; config: VeryfrontConfig; /** Compile vocabulary. Selects minification and tree shaking. */ mode: "development" | "production"; /** * Request vocabulary. Selects preview-only instrumentation. A hosted preview * render is mode "production" with environment "preview". */ environment: RenderEnvironment; moduleServerUrl?: string; layoutCollector: LayoutCollector; layoutCompiler: LayoutCompiler; layoutCache: LayoutComponentCache; componentRegistry: MDXComponents | ComponentRegistry; /** Server-trusted local-project identity. */ isLocalProject?: boolean; } export interface LayoutCollectionResult { layoutBundle: MdxBundle | undefined; nestedLayouts: LayoutItem[]; } interface LayoutPreloadSummary { tsxTotal: number; tsxSuccess: number; tsxFailures: Array<{ path: string; error: string; }>; mdxTotal: number; mdxSuccess: number; mdxFailures: Array<{ path: string; error: string; }>; importMapSuccess: boolean; importMapError?: string; durationMs: number; allSuccess: boolean; } export declare class LayoutOrchestrator { private config; private _preloadedImportMap; private reactVersionPromise; constructor(config: LayoutOrchestratorConfig); private get renderModes(); private getReactVersion; getPreloadedImportMap(): ImportMapConfig | null; clearCache(): void; collectLayouts(pageInfo: EntityInfo): Promise; preloadLayoutModules(nestedLayouts: LayoutItem[], dependencyPinningCacheKey?: string, dependencyPinningDependencies?: Readonly>, dependencyPinningSource?: DependencyPinningSourceInput, moduleServerOrigin?: string, signal?: AbortSignal, environment?: RenderEnvironment): Promise; applyLayoutsAndWrappers(pageElement: React.ReactElement, pageInfo: EntityInfo, layoutBundle: MdxBundle | undefined, nestedLayouts: LayoutItem[], layoutDataMap?: Map>, requestUrl?: URL, params?: Record, frontmatter?: Record, headings?: Array<{ id: string; text: string; level: number; }>, projectSlug?: string, clientPageIsland?: { clientLayoutPaths: readonly string[]; }, pageProps?: Record, dependencyPinningCacheKey?: string, dependencyPinningDependencies?: Readonly>, dependencyPinningSource?: DependencyPinningSourceInput, signal?: AbortSignal, /** * Request environment for this render. Takes precedence over the * orchestrator's own, so a reused orchestrator never carries one render's * instrumentation into the next. */ environment?: RenderEnvironment): Promise; } export {}; //# sourceMappingURL=layout.d.ts.map