import { HeaderFooterKind, HeaderFooterState } from './header-footer-diffing.js';
export interface PartSnapshot {
    kind: 'xml' | 'binary';
    content: unknown;
}
export interface HeaderFooterPartClosure {
    refId: string;
    kind: HeaderFooterKind;
    partPath: string;
    parts: Record<string, PartSnapshot>;
}
export interface PartsState {
    bodyClosure: Record<string, PartSnapshot>;
    headerFooterClosures: Record<string, HeaderFooterPartClosure>;
}
/**
 * Generic part-level diff payload.
 *
 * This is intentionally coarse-grained: callers can upsert or delete
 * normalized parts without requiring OOXML tree diffs.
 */
export interface PartsDiff {
    upserts: Record<string, PartSnapshot>;
    deletes: string[];
}
/**
 * Minimal editor shape needed to capture part closures.
 *
 * Part fidelity currently depends on `convertedXml` for XML parts and the
 * editor media stores for binary targets.
 */
export type PartsStateEditor = {
    converter?: {
        convertedXml?: Record<string, unknown>;
    } | null;
    options?: {
        mediaFiles?: Record<string, unknown>;
    };
    storage?: {
        image?: {
            media?: Record<string, unknown>;
        };
    };
};
/**
 * Captures the body and header/footer part closures needed for coarse
 * parts-aware replay.
 */
export declare function capturePartsState(editor: PartsStateEditor, headerFooters: HeaderFooterState | null | undefined): PartsState;
/**
 * Computes a coarse parts diff for body and header/footer changes.
 *
 * Body changes currently use a conservative strategy: any document diff
 * causes the captured body relationship closure to be compared and emitted.
 */
export declare function diffParts(previousPartsState: PartsState | null | undefined, nextPartsState: PartsState | null | undefined): PartsDiff | null;
//# sourceMappingURL=parts-diffing.d.ts.map