import{type PropertyDeclaration,type PropertyValues,type TemplateResult}from'lit';import{LyraElement}from'../../../internal/lyra-element.js'; /** One candidate row — an `@`-mentionable person/entity, or a `/`-command. */ export interface LyraMentionItem{ /** Stable business id. Duplicate ids remain distinguishable through the selection index. */ readonly suggestionId:string;readonly label:string;readonly description?:string; /** Literal icon hint (e.g. an emoji), rendered next to `label` -- same * "opaque string, not a registry lookup" convention as * ``'s/``'s own `icon`. */ readonly icon?:string; /** * Marks this row non-actionable: `aria-disabled="true"` replaces its selected/active * affordances, activating it (click, or Enter/Tab while highlighted) commits nothing and emits * no `lr-mention-select`, and ArrowDown/ArrowUp highlighting steps past it instead of landing on * it. Omitted or `false` renders the row exactly as before this field existed. */ readonly disabled?:boolean;} /** Predicate deciding whether `item` matches a (already-trimmed, locale-lowercased) `query`. * Mirrors ``'s `OptionFilter` convention -- override `filter` to replace the * built-in case-insensitive label/description substring match entirely. */ export type LyraMentionFilter=(item:LyraMentionItem,query:string)=>boolean;export interface LyraMentionSelectDetail{readonly suggestionId:string; /** Occurrence in the assigned `items` collection, before query filtering. */ readonly index:number;readonly label:string;} /** Guards an asynchronous same-tree focus transfer against stale caller ownership. */ export interface LyraMentionFocusOptions{ /** Re-evaluated immediately before focus moves and during later popover-owned navigation. */ readonly ownsFocus?:()=>boolean;}export interface LyraMentionPopoverEventMap{'lr-mention-select':CustomEvent;'lr-mention-close':CustomEvent;} /** * `` — a caret-anchored, keyboard-navigable popover for * `@`-mention and `/`-slash-command autocomplete inside a plain-text * ` * * * ``` * * An `items` entry may also set `disabled`, marking it non-actionable: `aria-disabled="true"` * replaces its selected/active affordances, activating it (click, or Enter/Tab while highlighted) * commits nothing and emits no `lr-mention-select`, and ArrowDown/ArrowUp highlighting steps past * it instead of landing on it -- including the default pre-highlighted first row. Omitted or * `false` renders the row exactly as before this field existed. * * @customElement lr-mention-popover * @event lr-mention-select - An item was committed (Enter/Tab/click). * `detail: { suggestionId, index, label }`; `index` disambiguates repeated business ids. * @event lr-mention-close - The popover was dismissed with no selection — Escape, or `open` * transitioning to `false` by any other means (a direct host assignment included). Never fires * for a close that followed a `lr-mention-select` commit. * @csspart listbox - The popover's root element (`role="listbox"`). * @csspart option - A candidate row (`role="option"`). Carries `aria-disabled="true"` while that * row's `disabled` is set. * @csspart option-icon - A row's leading icon glyph, when `icon` is set. * @csspart option-label - Wrapper around a row's label/description. * @csspart option-description - A row's optional secondary line, when `description` is set. * @csspart empty - The "no matches" message, shown when `items`/`query` produce zero rows. * @cssprop [--lr-mention-popover-option-active-bg=var(--lr-color-brand-quiet)] - Background of the * hovered or `[data-active]` (keyboard-highlighted) suggestion row. * @cssprop [--lr-mention-popover-option-disabled-opacity=0.5] - Opacity of a row whose `items` entry sets `disabled`. * @cssprop [--lr-overlay-surface=var(--lr-color-surface-overlay)] - Shared floating-surface fill, * on the listbox. * @cssprop [--lr-overlay-border=var(--lr-color-border)] - Shared floating-surface edge colour, on * the listbox. * @cssprop [--lr-overlay-radius=var(--lr-radius)] - Shared floating-surface corner radius, on * the listbox. * @cssprop [--lr-overlay-shadow-anchored=var(--lr-shadow-m)] - Elevation of the anchored surface. * @cssprop --lr-positioning-strategy - Cascading `absolute`/`fixed` override for the listbox's * `fixed` default, read from computed style when it is (re)positioned. Set it once on `:root`, * a theme, or one clipping ancestor to change every unset mention popover beneath it; an * unrecognized value falls back to `fixed`. * @status stable * @since 4.0.0 */ export declare class LyraMentionPopover extends LyraElement{static styles:import("lit").CSSResultGroup[];static properties:{items:{attribute:boolean;noAccessor:boolean;};};private _textareaFocusSessionGeneration;requestUpdate(name?:PropertyKey,oldValue?:unknown,options?:PropertyDeclaration):void;private hasTextareaFocusSession; /** The element to position the popup relative to. When this is a plain * `