import{type TemplateResult,type PropertyValues}from'lit';import{LyraElement}from'../../../internal/lyra-element.js'; /** Largest accepted overscan on either side of the visible range. This keeps * an accidental huge value from defeating virtualization. */ export declare const MAX_OVERSCAN_ROWS=100; /** `lr-visible-range-change` detail -- the current visible (non-overscanned) item index range. */ export interface LyraVirtualListRange{start:number;end:number;} /** A visible group label anchored to the first row in its group. */ export interface LyraVirtualListGroup{key:string|number;label?:string;startIndex:number;} /** The ARIA role pairing each rendered row participates in -- see `itemRole`'s own doc for what * each value maps to. */ export type LyraVirtualListItemRole='listitem'|'row'; /** * Where `renderItem`'s output is instantiated. * * - `'shadow'` (the default) stamps it inside this component's shadow root, where only inherited * custom properties and an explicitly exported part reach it. * - `'light'` stamps it into the HOST'S OWN light DOM, assigned back into the windowed row wrapper * through an internal named slot, so an ordinary document stylesheet styles a virtualized row. * Windowing, measurement, spacer sizing, `scrollToIndex()`, the external-scroller mode and the * ARIA contract all stay with this component either way. */ export type LyraVirtualListRowProjection='shadow'|'light'; /** * Reserved attribute marking a light-DOM row wrapper this component created in * `row-projection="light"` mode, so consumer CSS, DOM diffing and snapshot tests can recognise a * library-owned light-DOM node. `::part()` cannot address one -- a projected row is in the * document's tree, not a shadow tree -- so this replaces `closest('[part="row"]')` for a delegated * listener in that mode. Built through `tag()`, exactly like `ANNOUNCEMENT_SINK_ATTRIBUTE`. */ export declare const VIRTUAL_LIST_ROW_ATTRIBUTE:string; /** Reserved attribute marking the projected sticky-band wrapper. Same rationale as * {@linkcode VIRTUAL_LIST_ROW_ATTRIBUTE}. */ export declare const VIRTUAL_LIST_STICKY_ATTRIBUTE:string; /** A fixed positive pixel height, or live per-row measurement. */ export type LyraVirtualListRowHeight=number|'auto';type VirtualListKey=string|number; /** A random-access collection that does not have to materialize one JavaScript value per row. */ export interface LyraVirtualListIndexedSource{ /** Number of addressable rows. Fractional, negative, and non-finite values normalize safely. */ readonly count:number; /** Returns the value at `index`. The component calls this only for rows it needs to render. */ itemAt(index:number):T; /** Returns a stable identity without first allocating or reading the row value. */ keyAt?(index:number):string|number; /** * Resolves a stable key back to its row index without a count-sized scan. Use this alongside * `keyAt` whenever `active-item-id` should target an indexed collection. Indexed sources deliberately * do not fall back to a count-sized scan when this is absent. Invalid and out-of-range results * are treated as a missing key. */ indexOfKey?(key:string|number):number;} /** Either an ordinary readonly array or a count/index-backed random-access collection. */ export type LyraVirtualListSource =readonly T[]|LyraVirtualListIndexedSource; /** `lr-virtual-scroll` detail -- the scroll position and height after a coalesced tick. */ export interface LyraVirtualListScroll{scrollTop:number;viewportHeight:number;}export interface LyraVirtualListEventMap{'lr-visible-range-change':CustomEvent;'lr-load-more':CustomEvent;'lr-virtual-scroll':CustomEvent;} /** * `` — a generic windowed/virtualized list host. Renders * only the items within the current viewport (plus `overscan` padding rows * on each side) as real DOM, regardless of how large its effective source is, so a * multi-thousand-row chat history sidebar or long message thread stays cheap * to scroll. * * Content is entirely caller-supplied: `renderItem(item, index)` returns * whatever `lit-html` value should represent that row (typically a * `TemplateResult`). That value is instantiated inside this component's shadow root, not in the * caller's light DOM; style callback output in its own template/custom element, through inherited * custom properties, or through an explicitly exported part. `keyFunction(item, index)` gives the * row a stable `repeat()` reconciliation key, so scroll position and any per-row state (e.g. an * `