import type { SelectOption } from '../fields/field-config.js'; import type { SearchSelectOptionLoader, SearchSelectOptionResolver } from '../fields/search-select-data-source.js'; /** Localized text consumed by a SearchSelect instance. */ export interface SearchSelectMessages { readonly clear: string; readonly instructions: string; readonly noResults: string; readonly placeholder: string; readonly results: string; readonly searchPlaceholder: string; readonly selection: string; readonly loading: string; readonly loadError: string; readonly searchTooShort: string; } /** Construction arguments for one local single-value SearchSelect. */ export interface SearchSelectArguments { readonly allowClear: boolean; readonly allowManualValue: boolean; readonly debounceMs: number; readonly fieldId: string; readonly locale: string; readonly messages: Readonly; readonly onCommit: () => void; readonly options?: readonly SelectOption[]; readonly loadOptions?: SearchSelectOptionLoader; readonly resolveOption?: SearchSelectOptionResolver; readonly searchEnabled?: boolean; readonly searchThreshold: number; readonly sortOptions: boolean; } /** * Native DOM SearchSelect with typed local options, keyboard support, and IME safety. */ export declare class SearchSelect { #private; readonly element: HTMLDivElement; readonly inputElement: HTMLInputElement; readonly instructionsId: string; readonly listboxElement: HTMLDivElement; private activeToken; private debounceTimerId; private filteredEntries; private enabledOptionIndices; private isComposing; private compositionStartValue; private isDestroyed; private isOpen; private isPositionTrackingActive; private readOnlyState; private isLoading; private isResolving; private manualValue; private searchOrigin; private readonly clearButtonElement; private readonly listboxId; private readonly messages; private readonly onCommit; private readonly optionElementByToken; private readonly optionElementCacheByToken; private readonly resultStatusElement; private readonly resolveErrorElement; private readonly shouldAllowClear; private readonly shouldAllowManualValue; private readonly shouldSortOptions; private readonly isSearchEnabled; private readonly locale; private readonly searchThreshold; private readonly debounceMs; private readonly unsubscribeDocumentPointerDown; private selectedToken; private selectedValue; private selectedResolvedOption; private seedOptions; private currentRemoteOptions; private tokenMap; private isRequiredState; /** Creates an unmounted SearchSelect subtree. */ constructor(configuration: SearchSelectArguments); /** Reads the exact selected option value or current manual string. */ getValue(): TValue | string | undefined; /** Returns the current immutable local or seed option snapshot. */ getOptions(): readonly SelectOption[]; /** Writes an exact option value, manual string, or clear state. */ setValue(value: unknown): void; /** Rebuilds typed option tokens while retaining a still-present value. */ setOptions(options: readonly SelectOption[]): void; /** Updates the disabled state and closes an unavailable listbox. */ setDisabled(isDisabled: boolean): void; isDisabled(): boolean; /** Updates readonly semantics without omitting the current value. */ setReadOnly(isReadOnly: boolean): void; isReadOnly(): boolean; /** Updates required-value validation without rebuilding the component. */ setRequired(isRequired: boolean): void; isRequired(): boolean; /** Removes all owned listeners and pending local filtering work. */ destroy(): void; private readonly handleFocusOut; private readonly handleClearClick; private readonly handleClearMouseDown; private readonly handleCompositionEnd; private readonly handleCompositionStart; private readonly handleDocumentPointerDown; private readonly handleFocus; private readonly handleInput; private readonly handleKeyDown; private readonly handleOptionMouseDown; private readonly handlePositionChange; private cancelScheduledRender; private clear; private close; private commitManualValue; private getCommittedValue; private moveActiveOption; private open; private renderOptions; private renderOptionElements; private scheduleRender; private selectToken; private setActiveToken; private startPositionTracking; private stopPositionTracking; private updateListboxPosition; private updateClearButton; private isRemote; private findOption; private findKnownOption; private assertRemoteOptions; private setCurrentOptions; private cancelSearchRequest; private startRemoteSearch; private renderRemoteFeedback; private cancelResolveRequest; private startResolve; private showResolveError; private updateBusyState; }