open-agreements
Version:
Open-source legal template filling CLI and library
27 lines • 1.86 kB
TypeScript
/**
* In-Place AST Modifier
*
* Modifies the revised document's AST in-place to add track changes markup.
* This replaces the reconstruction-based approach with direct tree manipulation.
*
* Key operations:
* - wrapAsInserted: Wrap run elements with <w:ins> for inserted content
* - insertDeletedContent: Clone and insert deleted content with <w:del> wrapper
* - wrapAsMoveFrom/wrapAsMoveTo: Add move tracking with range markers
* - addFormatChange: Add <w:rPrChange> for formatting differences
*/
import type { ComparisonUnitAtom } from '../../core-types.js';
export interface InPlaceModifierOptions {
/** Author name for track changes */
author: string;
/** Timestamp for track changes */
date: Date;
}
export declare function modifyRevisedDocument(revisedRoot: Element, originalAtoms: ComparisonUnitAtom[], revisedAtoms: ComparisonUnitAtom[], mergedAtoms: ComparisonUnitAtom[], options: InPlaceModifierOptions): string;
export { createRevisionIdState, type RevisionIdState, } from './inPlaceModifier-shared.js';
export { ContainerResolutionError, getContainerPath, resolveContainerInRevised, validateContainerTopology, } from './inPlaceModifier-containers.js';
export { addFormatChange, addParagraphPropertyChange, runHasVisibleContent, wrapAsDeleted, wrapAsInserted, wrapAsMoveFrom, wrapAsMoveTo, wrapParagraphAsDeleted, wrapParagraphAsInserted, } from './inPlaceModifier-wrappers.js';
export { insertDeletedParagraph, insertDeletedRun, insertMoveFromRun, } from './inPlaceModifier-deletion.js';
export { preSplitInterleavedWordRuns, preSplitMixedStatusRuns, } from './inPlaceModifier-presplit.js';
export { coalesceDelInsPairChains, groupDeletionsBeforeInsertions, isNoOpPair, mergeWhitespaceBridgedTrackChanges, suppressNoOpChangePairs, } from './inPlaceModifier-postprocess.js';
//# sourceMappingURL=inPlaceModifier.d.ts.map