import { type ReactNode } from 'react'; import type { PromptInputMentionItem, PromptInputMentionRef } from './prompt-input-mention-registry'; export interface PromptInputMentionsProps { /** * The character that opens the menu. * @defaultValue "@" */ trigger?: string; /** Sync data — filtered internally with match-sorter on the label. */ items?: PromptInputMentionItem[]; /** * Async data — debounced ~150 ms, superseded requests aborted through * `signal`, stale resolutions discarded. Wins over `items`. */ onSearch?: (query: string, context: { trigger: string; signal: AbortSignal; }) => Promise; /** * Fills in the icon, trailing content, `data` and a fresh label for chips * parsed out of `value` / `defaultValue`, which cannot carry them. Batched * into one call per trigger and cached by `trigger|type|id`. */ resolveMentions?: (refs: PromptInputMentionRef[]) => Promise; /** Observes the menu's open state. */ onOpenChange?: (open: boolean) => void; /** * Empty-state content. * @defaultValue "No results" */ emptyMessage?: ReactNode; /** * Skeleton rows shown while `onSearch` is in flight. * @defaultValue 3 */ loadingRowCount?: number; } /** * Declares a trigger and supplies its data. Renders nothing itself — the * caret-anchored menu belongs to `PromptInput.Editor`, which owns the document * the query lives in, because the query is the text the chip replaces. * * Requires `PromptInput.Editor`: next to a `Textarea` it no-ops and warns in * development, since a native textarea cannot host inline chips. */ export declare function PromptInputMentions({ trigger, items, onSearch, resolveMentions, onOpenChange, emptyMessage, loadingRowCount }: PromptInputMentionsProps): null; export declare namespace PromptInputMentions { var displayName: string; } //# sourceMappingURL=prompt-input-mentions.d.ts.map