import type { InputEvent } from "../../input/event.ts"; import type { Component } from "../../runtime/component.ts"; import type { AutocompleteProvider } from "./autocomplete-provider.ts"; export interface EditorOptions { readonly value?: string; readonly placeholder?: string; readonly prompt?: string; readonly maxHeight?: number; readonly disabled?: boolean; readonly clearOnSubmit?: boolean; readonly multiline?: boolean; readonly submitOnEnter?: boolean; readonly history?: readonly string[]; readonly autocompleteProvider?: AutocompleteProvider; readonly placeholderStyle?: (text: string) => string; readonly onChange?: (value: string) => void; readonly onSubmit?: (value: string) => void; } export declare class Editor implements Component { private readonly options; private value; private cursor; private history; private historyCursor; private draft; private focusedState; disabledSubmit: boolean; onSubmit?: (value: string) => void; constructor(options?: EditorOptions); get text(): string; get cursorIndex(): number; focus(): void; blur(): void; setText(value: string): void; addToHistory(value: string): void; setAutocompleteProvider(provider: AutocompleteProvider): void; handleInput(event: InputEvent): boolean; render(width: number, height?: number): string[]; private stylePlaceholder; private insert; private submit; private completeAutocomplete; private applyAutocomplete; private deleteBeforeCursor; private deleteAfterCursor; private moveCursor; private normalizedCursor; private boundaryIndex; private cursorBoundaries; private previousHistory; private nextHistory; private changed; } //# sourceMappingURL=component.d.ts.map