import { HeaderFooterKind, HeaderFooterState } from './header-footer-diffing'; export interface PartSnapshot { kind: 'xml' | 'binary'; content: unknown; } export interface HeaderFooterPartClosure { refId: string; kind: HeaderFooterKind; partPath: string; parts: Record; } export interface PartsState { bodyClosure: Record; headerFooterClosures: Record; } /** * 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; 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; } | null; options?: { mediaFiles?: Record; }; storage?: { image?: { media?: Record; }; }; }; /** * 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