/** * Large-paste placeholders (INPUT-003, V2-042). * * A large paste is replaced in the visible buffer by a single short token so * it stays scannable and cheap to edit around; the real text is kept in a * registry and swapped back in at submit time. Because the placeholder is * inserted with one `insertText` call, it is one undo step — undoing it * removes the whole paste, not one character at a time. * * The composer also renders a blue chip above the input for each active * paste (hover preview + double-click expand). */ export interface PasteThresholds { readonly lines?: number; readonly chars?: number; } export declare function countLines(text: string): number; export declare function isLargePaste(text: string, thresholds?: PasteThresholds): boolean; /** First N non-empty-friendly lines for hover preview. */ export declare function pastePreviewLines(text: string, maxLines?: number): string[]; /** Blue chip label: "10 lines pasted" / "1 line pasted". */ export declare function pasteChipLabel(lines: number, chars: number): string; export interface PastePlaceholderEntry { readonly id: number; /** Token inserted into the textarea (kept short for editing). */ readonly token: string; readonly text: string; readonly lines: number; readonly chars: number; /** Human chip label (blue). */ readonly label: string; } export declare function samePastePlaceholderEntries(a: readonly PastePlaceholderEntry[], b: readonly PastePlaceholderEntry[]): boolean; /** * Holds full pasted text keyed by an incrementing id and renders the token * shown in the composer buffer in its place. */ export declare class PasteRegistry { private readonly entries; private nextId; register(text: string): PastePlaceholderEntry; resolve(id: number): PastePlaceholderEntry | undefined; /** Entries whose token still appears in the composer buffer. */ activeIn(value: string): PastePlaceholderEntry[]; clear(): void; /** Replace every known placeholder token in `value` with its full text. */ expand(value: string): string; /** Expand a single paste id (double-click chip). */ expandOne(value: string, id: number): string; }