/** * Represents a single attribute change capturing the previous and next values. */ export interface AttributeChange { from: unknown; to: unknown; } /** * Aggregated attribute diff broken down into added, deleted, and modified dotted paths. */ export interface AttributesDiff { /** Attributes added in the new payload. */ added: Record; /** Attributes removed from the old payload. */ deleted: Record; /** Attributes that changed values between old and new payloads. */ modified: Record; } /** * Aggregated marks diff broken down into added, deleted, and modified marks. */ export interface MarksDiff { /** Marks added in the new payload. */ added: { name: string; attrs: Record; }[]; /** Marks removed from the old payload. */ deleted: { name: string; attrs: Record; }[]; /** Marks whose attributes changed between old and new payloads. */ modified: { name: string; oldAttrs: Record; newAttrs: Record; }[]; } /** * Computes the attribute level diff between two arbitrary objects. * Produces a map of dotted paths to added, deleted and modified values. * * @param objectA Baseline attributes to compare. * @param objectB Updated attributes to compare. * @param ignoreKeys Additional attribute keys to ignore. * @returns Structured diff or null when objects are effectively equal. */ export declare function getAttributesDiff(objectA?: Record | null | undefined, objectB?: Record | null | undefined, ignoreKeys?: string[]): AttributesDiff | null; /** * Computes the attribute level diff between two sets of ProseMirror marks. * Produces a map of dotted paths to added, deleted and modified values. * * @param marksA Baseline marks to compare. * @param marksB Updated marks to compare. * @returns Structured diff or null when marks are effectively equal. * */ export declare function getMarksDiff(marksA?: Array<{ type: string; attrs?: Record; }> | null, marksB?: Array<{ type: string; attrs?: Record; }> | null): MarksDiff | null; /** * Checks deep equality for primitives, arrays, and plain objects. * * @param a First value. * @param b Second value. * @returns True when both values are deeply equal. */ export declare function deepEquals(a: unknown, b: unknown): boolean; //# sourceMappingURL=attributes-diffing.d.ts.map