import type { EditorInputAdapter, EditorInputState } from "./contracts"; /** * Default textarea-based input adapter. * * This adapter provides a lightweight editing experience * using a native HTMLTextAreaElement. * * Responsibilities: * * - manage editor content * - track cursor and selection state * - notify content changes * - support content insertion at the current selection */ export declare class TextareaInputAdapter implements EditorInputAdapter { private textarea; private listeners; /** * Creates and mounts the editor textarea. * * Change events are forwarded to all registered * listeners. */ mount(element: HTMLElement, initialValue: string): void; /** * Returns the current editor state. * * The returned state contains the current content * and selection information used by commands and * content insertion operations. */ getState(): EditorInputState; setSelection(start: number, end: number): void; getValue(): string; setValue(value: string): void; /** * Inserts content at the current cursor position. * * If text is currently selected, the selection is * replaced by the provided content. * * After insertion, the cursor is moved to the end * of the inserted content and change listeners are * notified. */ insertContent(content: string): void; focus(): void; onChange(listener: (value: string) => void): () => void; destroy(): void; private generateId; /** * Applies default attributes to the editor textarea. */ private setTextareaAttributes; /** * Returns the mounted textarea element. * * @throws Error When the adapter has not been mounted. */ private getElement; }