/** * accept_changes — accept all tracked changes in a OOXML document body. * * Resolves the supported revision subset by: * - Removing w:del elements and their content * - Unwrapping w:ins elements (promoting children) * - Removing w:moveFrom (source), unwrapping w:moveTo (destination) * - Removing all *PrChange property change records * - Stripping paragraph-level revision markers, merging a paragraph whose * mark was a tracked deletion into the following paragraph * - Cleaning up move range markers and rsidDel attributes * * Numbering, table-grid/exception, cell-topology, custom XML, and extension * conflict records are not semantically resolved here; see the advanced * revision classification manifest. * * Operates on the W3C DOM (`@xmldom/xmldom`) — the same API used * throughout docx-primitives-ts (contrast with docx-comparison's * custom WmlElement AST). */ export type AcceptChangesResult = { insertionsAccepted: number; deletionsAccepted: number; movesResolved: number; propertyChangesResolved: number; }; /** * Predicate selecting which revision elements a sweep processes. The default * ({@link ACCEPT_ALL}) processes every revision — the original whole-document * behavior. `acceptAIEdits`/`rejectAIEdits` (#123) pass a predicate that matches * only the targeted revision ids so foreign (non-target) revisions are left * byte-untouched. */ export type RevisionFilter = (el: Element) => boolean; /** The package-wide revision id (`w:id`) of a revision element, if any. */ export declare function revisionElementId(el: Element): string | null; /** * Accept all tracked changes in the document body or story root, producing a * document with supported revision records resolved. * * Mutates the Document in place (same convention as simplifyRedlines * and mergeRuns). * * @conformance ECMA-376 edition 5, Part 1 § 17.13.5.21 * @conformance ECMA-376 edition 5, Part 1 § 17.13.5.22 * @conformance ECMA-376 edition 5, Part 1 § 17.13.5.25 * @conformance ECMA-376 edition 5, Part 1 § 17.13.5.26 * @conformance ECMA-376 edition 5, Part 1 § 17.13.5.29 * @conformance ECMA-376 edition 5, Part 1 § 17.13.5.30 * @conformance ECMA-376 edition 5, Part 1 § 17.13.5.31 * @conformance ECMA-376 edition 5, Part 1 § 17.13.5.32 * @conformance ECMA-376 edition 5, Part 1 § 17.13.5.34 * @conformance ECMA-376 edition 5, Part 1 § 17.13.5.36 * @conformance ECMA-376 edition 5, Part 1 § 17.13.5.37 * @ooxmlSpec ooxml.ecma376.5ed.part1.revisions.moves * @ooxmlSpec ooxml.ecma376.5ed.part1.revisions.run-properties-paragraph-mark * @ooxmlSpec ooxml.ecma376.5ed.part1.revisions.section-properties * @ooxmlSpec ooxml.ecma376.5ed.part1.revisions.table-properties * @ooxmlSpec ooxml.ecma376.5ed.part1.revisions.table-cell-properties */ export declare function acceptChanges(doc: Document, opts?: { filter?: RevisionFilter; }): AcceptChangesResult; //# sourceMappingURL=accept_changes.d.ts.map