/** The common public row vocabulary for catalog-backed controls. */ export interface LyraCatalogEntry{id:string;label:string; /** * Marks this row non-actionable: it cannot be selected by pointer or keyboard, `aria-disabled` * replaces the row's stateful selected/active affordances, and active-descendant navigation * (arrow keys, Home/End) steps over it instead of landing on it. Omitted or `false` renders the * row exactly as before this field existed. Does not affect any other affordance a specific * catalog-backed control renders on the same row (for example ``'s independent * preview control), only the row's own selection. */ disabled?:boolean;} /** * A homogeneous, readonly catalog. String shorthand uses the same string for the row id and * label; object catalogs retain the caller's extended row type. Ids are stable occurrence * identities: empty ids, rows without a nonblank string label, and later duplicates are omitted, * with the first valid occurrence winning. */ export type LyraCatalog =readonly string[]|readonly T[];export type DisplayCatalogEntry =T&{synthetic:boolean;};export declare function normalizeCatalog(catalog:LyraCatalog |undefined):T[]; /** * Appends the committed `value` as a synthetic trailing row when no catalog row claims it, so a * stale id is visible and re-selectable instead of silently vanishing. * * The `value.trim() !== ''` test is a deliberate contract, not the truthiness defect * ``/`` were corrected for. There, `''` was a legitimate option value being * misread as "no value". Here `normalizeCatalog()` rejects a blank `id` outright, so `''` can never * name a row: it is this family's single "nothing committed" sentinel. Synthesizing a row for it * would render an unlabelled option badged "not in catalog", turning an empty field into a fake * stale selection. */ export declare function withSyntheticCatalogValue(catalog:readonly T[],value:string):DisplayCatalogEntry[];export declare function filterCatalogEntries(entries:readonly T[],query:string,locale:string,fields:(entry:T)=>readonly string[]):T[];interface CatalogPickerChangeDetail{value:string;inCatalog:boolean;}interface CatalogPickerHost extends HTMLElement{readonly renderRoot:HTMLElement|DocumentFragment;readonly effectiveDisabled:boolean;}interface CatalogPickerControllerOptions{catalog:()=>LyraCatalog |undefined;allowCustom:()=>boolean;isReadonly:()=>boolean;locale:()=>string;searchableFields:(entry:T)=>readonly string[];emitChange:(detail:CatalogPickerChangeDetail)=>void;onValueChange:(value:string,oldValue:string)=>void;onDefaultValueChange:(value:string,oldValue:string)=>void;onStateChange:(state:'open'|'query'|'activeIndex',oldValue:boolean|string|number)=>void;beforeValueChange?:(value:string,oldValue:string)=>void;beforeActiveIndexChange?:(next:number,oldValue:number)=>void;afterQueryChange?:(query:string,oldValue:string)=>void;onControlFocus?:(event:FocusEvent)=>void;onControlBlur?:(event:FocusEvent)=>void;containsFocusTarget?:(target:EventTarget|null)=>boolean;forwardFreeInputClick?:boolean;} /** * Shared dual-mode state machine for catalog-backed text/form controls. Rendering and * component-specific behavior stay on the host; catalog normalization, editing state, keyboard * transitions, popup ownership, commits, and native/prefixed event relays have one authority. */ export declare class CatalogPickerController{private readonly host;private readonly options;private readonly popupPosition;private overlay?;private pointerListenerDocument?;private pointerListener?;private _activeIndex;private _query;private _open;private _value;private _defaultValue;private valueDirty;private settingDefaultValue;private reflectingDefaultValue;suppressControlEvents:boolean;constructor(host:CatalogPickerHost,options:CatalogPickerControllerOptions);get normalizedCatalog():T[];get closedMode():boolean;private get isReadonly();get effectiveEntries():DisplayCatalogEntry[];get filteredEntries():DisplayCatalogEntry[];get visibleEntries():DisplayCatalogEntry[]; /** The display label for a committed id, falling back to the raw id when no row claims it. * The `!id` short-circuit is behaviour-identical to letting the lookup run -- no row can carry a * blank id (see `normalizeCatalog`), so the find would miss and `?? id` would return `''` too -- * and is kept only to skip the scan on the common empty-field path. It is therefore not an * instance of the `''`-as-missing-value shape corrected in ``/``. */ labelFor(id:string):string;get activeIndex():number;setActiveIndex(next:number):void;get query():string;setQuery(next:string):void;get open():boolean;setOpen(next:boolean):void;show():void;hide():void;get value():string;set value(next:string);get defaultValue():string;set defaultValue(next:string);resetValue():void;restoreState(state:string|File|FormData|null):void;private restoreLiveValueFromDefault;private reflectDefaultValue;commitValue(next:string):void;emitValueEvents():void;commitFreeText():void; /** A `disabled` row can never be committed -- by pointer or by keyboard -- and activating one * emits nothing and changes no state, matching every other declared-non-actionable entry in * this library. */ selectEntry(entry:DisplayCatalogEntry):void;reconcileRows(activeValue:string|undefined,rebaseQuery:boolean,clampMissing?:boolean):void;handleTriggerKeyDown(event:KeyboardEvent):void;handleInputKeyDown(event:KeyboardEvent):void;handleInput(event:Event):void;handleInputFocus(event:FocusEvent):void;handleControlFocus(event:FocusEvent):void;handleControlBlur(event:FocusEvent):void;handleComboMouseDown(event:MouseEvent):void;handleListboxMouseDown(event:MouseEvent):void;handleListboxClick(event:MouseEvent):void;get input():HTMLInputElement|null;click():void;focus(options?:FocusOptions):void;blur():void;select():void;setSelectionRange(start:number|null,end:number|null,direction?:'forward'|'backward'|'none'):void;setRangeText(replacement:string,start?:number,end?:number,selectMode?:SelectionMode):void;connected(hasUpdated:boolean):void;disconnected():void;adopted():void;updated(reposition:boolean):void;private containsFocusTarget;private bindDocumentPointer;private unbindDocumentPointer;private activatePopupOverlay;private deactivateOverlay;private dismissFromEscape;private syncPopup;}export{};