import { type WordSpan } from "./word-diff.js";
/** Lines of unchanged context kept around each change, matching git's default. */
export declare const CONTEXT_LINES = 3;
/** A single rendered diff line, already classified and numbered. */
export interface DiffLine {
    kind: "context" | "added" | "removed";
    /** The old-file line number, or undefined for added lines. */
    oldLine?: number;
    /** The new-file line number, or undefined for removed lines. */
    newLine?: number;
    /** The line text without its `+`/`-`/space diff prefix. */
    text: string;
    /**
     * Word-level segments for intra-line highlighting. Present only on added /
     * removed lines that were paired with their counterpart; context lines and
     * unpaired changes leave this undefined (render the whole line one colour).
     */
    spans?: WordSpan[];
}
/** One contiguous change region: classified lines plus a hunk header marker. */
export interface DiffHunk {
    oldStart: number;
    newStart: number;
    lines: DiffLine[];
}
export interface StructuredDiff {
    hunks: DiffHunk[];
    addedCount: number;
    removedCount: number;
}
/**
 * Build a structured diff between `oldStr` and `newStr` using the `diff`
 * package's {@link structuredPatch} with {@link CONTEXT_LINES} of context.
 *
 * The raw hunk `lines` (prefixed `+`/`-`/space) are walked into typed
 * {@link DiffLine}s carrying gutter line numbers. Adjacent removed→added runs
 * are paired index-for-index and handed to {@link wordDiffLine} so the renderer
 * can emphasise only the changed sub-range of each line. Returns `null` when
 * there is nothing to show (identical input or an empty patch).
 */
export declare function buildStructuredDiff(oldStr: string, newStr: string, filePath?: string): StructuredDiff | null;
