import type { Editor } from "@tiptap/core"; import { type CompareSource, type CompareSummary, type EditorCompareOptions } from "@pixerate/editor"; export type { CompareSource, CompareSummary, EditorCompareOptions } from "@pixerate/editor"; export interface SvelteDocumentCompare { /** Summary of the last comparison, or `null` (reactive). */ readonly summary: CompareSummary | null; /** * Replaces the editor content with the comparison of two versions (nodes, * JSON or HTML) as tracked changes, ready to review with `ReviewToolbar`. * Returns the summary, or `null` without an editor. */ compare(original: CompareSource, revised: CompareSource, options?: EditorCompareOptions): CompareSummary | null; /** Forgets the last summary. */ clear(): void; } /** * Compare two document versions into an editor using `TrackChanges`. * `options` are defaults for every comparison. */ export declare function createDocumentCompare(editor: Editor | null | undefined, options?: EditorCompareOptions): SvelteDocumentCompare;