/**
 * Shared Diff Components and Utilities
 *
 * Common code for DiffRenderer and FilePreviewRenderer.
 * Handles unified diff parsing, word-level diff highlighting, and line rendering.
 */
export interface ParsedHunk {
    oldStart: number;
    newStart: number;
    lines: ParsedLine[];
}
export interface ParsedLine {
    type: 'context' | 'addition' | 'deletion';
    content: string;
    lineNum: number;
}
export interface WordDiffPart {
    value: string;
    added?: boolean;
    removed?: boolean;
}
/**
 * Parse unified diff into structured hunks
 */
export declare function parseUnifiedDiff(unified: string): ParsedHunk[];
/**
 * Find paired deletion/addition lines for word-level diff
 */
export declare function findLinePairs(lines: ParsedLine[]): Map<number, {
    del: ParsedLine;
    add: ParsedLine;
}>;
/**
 * Compute word-level diff between two strings
 */
export declare function computeWordDiff(oldStr: string, newStr: string): {
    oldParts: WordDiffPart[];
    newParts: WordDiffPart[];
};
export declare function getLineNumWidth(maxLineNum: number): number;
export declare function formatLineNum(num: number, width: number): string;
interface DiffLineProps {
    type: 'context' | 'addition' | 'deletion';
    lineNum: number;
    lineNumWidth: number;
    content: string;
    wordDiffParts?: WordDiffPart[];
}
/**
 * Render a single diff line with true 2-column layout.
 * Column 1: Fixed-width gutter (line number + symbol)
 * Column 2: Fixed-width content area (remaining terminal width)
 * This prevents content/backgrounds from leaking beyond boundaries.
 */
export declare function DiffLine({ type, lineNum, lineNumWidth, content, wordDiffParts }: DiffLineProps): import("react/jsx-runtime").JSX.Element;
/**
 * Hunk separator component
 */
export declare function HunkSeparator(): import("react/jsx-runtime").JSX.Element;
export {};
//# sourceMappingURL=diff-shared.d.ts.map