import { Vec4 } from "../math/Vec4"; import type { Shape } from "../font/shapeText"; import type { Lookups } from "../font/types"; import { View } from "../layout/View"; import type { KeyDownHandler, FocusHandler, BlurHandler } from "../layout/eventTypes"; import type { TextStyleProps, ViewStyleProps } from "../layout/styling"; export declare class Input extends View { readonly props: { cursorColor?: string; lookups: Lookups; onBlur?: BlurHandler; onChange?: (value: string) => void; onClick?(): void; onFocus?: FocusHandler; onKeyDown?: KeyDownHandler; placeholder?: string; selectionColor?: string; style?: ViewStyleProps; testID?: string; textStyle?: Partial; value?: string; }; value: string; /** * The index of the cursor. */ cursor: number; previousCursor: number; /** * The index of the other end of the selection. If there's no selection, it's the same as cursor. */ mark: number; /** * Start and end coordinates. */ mouseDrag: Vec4 | null; textShape: Shape | null; horizontalScroll: number; scrollWhenDragStarted: number; isFocused: boolean; constructor(props: { cursorColor?: string; lookups: Lookups; onBlur?: BlurHandler; onChange?: (value: string) => void; onClick?(): void; onFocus?: FocusHandler; onKeyDown?: KeyDownHandler; placeholder?: string; selectionColor?: string; style?: ViewStyleProps; testID?: string; textStyle?: Partial; value?: string; }); private onClick; private onBlur; private onLayout; private onMouseEnterNOOP; private onKeyDown; private onKeyPress; private onMouseDownForDragging; private onMouseUpForDragging; private onMouseMoveForDragging; private setSelection; /** * Apply changes like update scroll position etc. in response to changing value, in a way that * will be reflected in the next frame. */ update(): void; }