/** * Change Tracking & Diff (T016) * * Tracks all modifications to a document and provides diff capabilities */ import type { Change } from './transaction.js'; export interface DiffEntry { path: string; type: 'added' | 'modified' | 'deleted'; oldValue?: any; newValue?: any; } export interface DiffResult { changes: DiffEntry[]; hasChanges: boolean; summary: { added: number; modified: number; deleted: number; total: number; }; } export declare class ChangeTracker { private changes; private enabled; /** * Record a change */ record(change: Change): void; /** * Get all recorded changes */ getChanges(): Change[]; /** * Clear all changes */ clear(): void; /** * Get number of changes */ count(): number; /** * Check if there are any changes */ hasChanges(): boolean; /** * Enable change tracking */ enable(): void; /** * Disable change tracking */ disable(): void; /** * Check if tracking is enabled */ isEnabled(): boolean; } /** * Compare two documents and generate a diff */ export declare function diff(original: any, modified: any, path?: string): DiffResult; /** * Apply a diff to a document */ export declare function applyDiff(document: any, diffResult: DiffResult): void; /** * Format diff as a human-readable string */ export declare function formatDiff(diffResult: DiffResult): string; //# sourceMappingURL=change-tracker.d.ts.map