import type { Schema } from '@markdoc/markdoc';
import type { HookSet } from '@refrakt-md/content';
import type { ThemeConfig, RendererNode } from '@refrakt-md/transform';
import type { AggregatedData } from '@refrakt-md/types';
export interface PagePreviewData {
    renderable: unknown;
    regions: Record<string, {
        name: string;
        mode: string;
        content: unknown[];
    }>;
    title: string;
    description: string;
    frontmatter: Record<string, unknown>;
    url: string;
    pages: Array<{
        url: string;
        path: string;
        title: string;
        draft: boolean;
    }>;
}
/**
 * Resolves layouts and builds complete page data for the Svelte preview runtime.
 * Maintains a ContentTree that can be refreshed when files change.
 */
export declare class LayoutResolver {
    private contentDir;
    private themeConfig;
    private tree;
    private router;
    private pagesList;
    private hookSets;
    private aggregated;
    private mergedTags;
    constructor(contentDir: string, themeConfig: ThemeConfig, extraTags?: Record<string, Schema>);
    /** Update the cached aggregated data and hook sets for Phase 4 preview support */
    setAggregated(aggregated: AggregatedData, hookSets: HookSet[]): void;
    /** Build/refresh the ContentTree (call on startup + after file saves) */
    refresh(): Promise<void>;
    /**
     * Build preview data for a regular page.
     * Runs the full Markdoc pipeline + layout resolution.
     */
    buildPreviewData(filePath: string, rawContent: string, identityTransform: (tree: RendererNode) => RendererNode, highlightTransform?: (tree: RendererNode) => RendererNode): PagePreviewData;
    /**
     * Build preview data for a _layout.md file.
     * Shows the layout's regions with a placeholder for the main content area.
     */
    buildLayoutPreviewData(filePath: string, rawContent: string, identityTransform: (tree: RendererNode) => RendererNode, highlightTransform?: (tree: RendererNode) => RendererNode): PagePreviewData;
    /**
     * Resolve layouts for a file path and transform all region content
     * through the identity transform + highlight pipeline.
     *
     * For layout previews, `liveLayoutContent` and `liveLayoutPath` can be
     * provided to substitute the on-disk layout with the live-edited content.
     */
    private resolveAndTransformRegions;
    /**
     * Find a page in the tree by relative path.
     * For synthetic paths (layout preview), creates a minimal ContentPage stub.
     */
    private findPageOrSynthetic;
    /** Build the pages list for Nav component link resolution */
    private buildPagesList;
    /**
     * Run Phase 4 postProcess hooks on a pre-serialized Markdoc renderable.
     * Returns the (possibly modified) renderable. Errors degrade silently.
     */
    private runPostProcess;
}
//# sourceMappingURL=layout-resolver.d.ts.map