import { ReadonlySignal, Signal } from '@preact/signals-core'; import { EventHandlersProperties } from '../events.js'; import { Component } from './component.js'; import { Vector2Tuple } from 'three'; import { BaseOutProperties, InProperties, WithSignal } from '../properties/index.js'; import { InstancedText } from '../text/index.js'; import { Text, TextOutProperties } from './text.js'; import { RenderContext } from '../context.js'; import { ReadonlyProperties } from '@pmndrs/uikit-pub-sub'; export declare const canvasInputProps: { onPointerDown: (e: { nativeEvent: any; preventDefault: () => void; }) => void; }; export type InputType = 'text' | 'password' | 'number'; export type InputOutProperties = Omit & { placeholder?: string; defaultValue?: string; value?: string; disabled: boolean; tabIndex: number; autocomplete: string; type: InputType; onValueChange?: (value: string) => void; onFocusChange?: (focus: boolean) => void; } & Omit, 'width' | 'height' | 'value' | 'disabled' | 'type' | 'focus' | 'active' | 'checked' | 'defaultChecked' | 'size' | 'classList'>; export type InputProperties = Omit, 'text'>; export declare const inputDefaults: InputOutProperties; export declare class Input extends Text { protected inputConfig?: { renderContext?: RenderContext; defaultOverrides?: InProperties; multiline?: boolean; defaults?: WithSignal; } | undefined; readonly element: HTMLInputElement | HTMLTextAreaElement; readonly selectionRange: Signal; readonly hasFocus: Signal; readonly uncontrolledSignal: Signal; readonly currentSignal: ReadonlySignal; constructor(inputProperties?: InProperties, initialClasses?: Array | string>, inputConfig?: { renderContext?: RenderContext; defaultOverrides?: InProperties; multiline?: boolean; defaults?: WithSignal; } | undefined); focus(start?: number, end?: number, direction?: 'forward' | 'backward' | 'none'): void; clone(recursive?: boolean): this; blur(): void; } export declare function setupSelectionHandlers(target: Signal, properties: ReadonlyProperties, text: ReadonlySignal, component: Component, instancedTextRef: { current?: InstancedText; }, focus: (start?: number, end?: number, direction?: 'forward' | 'backward' | 'none') => void, abortSignal: AbortSignal): void; export declare function createHtmlInputElement(selectionRange: Signal, onChange: (value: string) => void, multiline: boolean): HTMLInputElement | HTMLTextAreaElement;