import type{LyraEventDetailSnapshot}from'../../../internal/lyra-element.js';import{type PropertyValues,type TemplateResult}from'lit';import type{DocumentRef}from'../../../ai/types.js';import{LyraElement}from'../../../internal/lyra-element.js';import type{LyraAttachmentCapability,LyraAttachmentFilesDetail}from'../../media/attachment-trigger/attachment-trigger.class.js';import type{LyraSourceEntry}from'../../retrieval/source-picker/source-picker.class.js';export type{LyraSourceEntry}from'../../retrieval/source-picker/source-picker.class.js';import type{LyraMentionItem}from'../../utility/mention-popover/mention-popover.class.js';import type{ChatComposerSelectionDirection,ChatComposerStatus,ChatComposerWrap}from'../chat-composer/chat-composer.class.js';import type{LyraCatalog,LyraModelCatalogEntry}from'../model-select/model-select.class.js';import type{PromptQueueItem}from'../prompt-queue/prompt-queue.class.js';export type{PromptQueueItem}from'../prompt-queue/prompt-queue.class.js';import type{PromptQueueChangeDetail}from'../prompt-queue/prompt-queue.class.js';import type{LyraAttachmentIdDetail,LyraAttachmentPreviewRequestDetail,LyraAttachmentUploadStatus}from'../../media/attachment-chip/attachment-chip.class.js';import type{LyraVoiceCatalogEntry}from'../voice-picker/voice-picker.class.js';export type{LyraVoiceCatalogEntry}from'../voice-picker/voice-picker.class.js';export interface LyraPromptSuggestion extends LyraMentionItem{ /** Inserted after the trigger. Defaults to `label`. */ insertText?:string;}export interface LyraPromptInputAttachment extends Omit{attachmentId:string;file?:File; /** File size in bytes, forwarded to the rendered attachment chip. */ bytes?:number;status?:LyraAttachmentUploadStatus;progress?:number;}export interface LyraPromptInputEventMap{input:InputEvent;change:Event;focus:FocusEvent;blur:FocusEvent;'lr-input':CustomEvent<{value:string;}>;'lr-change':CustomEvent<{value:string;}>;'lr-submit':CustomEvent<{value:string;}>;'lr-stop':CustomEvent;'lr-mention-select':CustomEvent<{suggestionId:string;index:number;label:string;trigger:'@'|'/';}>;'lr-attachments-add':CustomEvent>;'lr-attachment-remove':CustomEvent;'lr-model-change':CustomEvent<{value:string;inCatalog:boolean;}>;'lr-voice-change':CustomEvent<{value:string;inCatalog:boolean;}>;'lr-sources-change':CustomEvent>;'lr-queue-change':CustomEvent>;'lr-send-now':CustomEvent>;'lr-camera-request':CustomEvent;'lr-audio-request':CustomEvent;'lr-attachment-retry':CustomEvent;'lr-attachment-preview-request':CustomEvent;} /** * `` — a composed AI prompt surface combining the chat composer with attachments, * model and voice selection, retrieval sources, mentions, slash commands, and a queued-turn list. * It performs no upload, model call, retrieval, or persistence. * * Deliberately not form-associated: this is a composite application interaction whose complete * state includes attachments, source scope, model, voice, and queued turns, not one successful * string form entry. Observe `lr-input` for controlled text and handle `lr-submit` as the * submission request. `label` names the prompt section; it is not generic field chrome. * * The composed text surface exposes the same native editing-assistance, selection, and range-edit * APIs as ``. Silent `setRangeText()` calls keep this outer `value` synchronized * without emitting `lr-input`; selection APIs are no-ops before the nested textarea renders. * * Public collection properties take bounded, clone-owned readonly snapshots. Create a new * collection and reassign it after changes; mutating the assigned array does not update the view. * Attachment ids are unique, nonempty occurrence identities; malformed rows and later duplicate * ids are omitted before chip rendering or attachment events, with the first occurrence winning. * * @customElement lr-prompt-input * @slot controls - Replaces the data-driven model, voice, and source controls. * @slot start - Attachment-control content rendered before the textarea. Replaces the default * attachment trigger. * @slot chips - Replaces the data-driven attachment chips. * @slot end - Custom send/stop action replacing the built-in composer action. * @slot footer - Content below the composer. * @event input - One native `InputEvent` for a user edit of the primary prompt value. * @event change - One native `Event` when the primary prompt edit is committed. * @event focus - One native `FocusEvent` relayed only from the primary prompt textarea, not from * any composed control (model/voice picker, attachment trigger, prompt queue). * @event blur - One native `FocusEvent` relayed only from the primary prompt textarea, not from * any composed control. * @event lr-input - Prompt text changed. `detail: { value }`. * @event lr-change - Prompt text edit was committed. `detail: { value }`. * @event lr-submit - Prompt submission was requested. `detail: { value }`. * @event lr-stop - Stop generation was requested. * @event lr-mention-select - A mention or slash command was inserted. * @event lr-attachments-add - Files were selected. `detail: { files, capability }`. * @event lr-attachment-remove - Attachment removal was requested. `detail: { attachmentId }`. * @event lr-model-change - Model selection changed. `detail: { value, inCatalog }`. * @event lr-voice-change - Voice selection changed. `detail: { value, inCatalog }`. * @event lr-sources-change - Retrieval source selection changed. `detail: { selectedSourceIds }`. * @event lr-queue-change - The queued prompts changed. * @event lr-send-now - Immediate submission of a queued prompt was requested. `detail: { item }`. * @event lr-camera-request - Camera capture was requested. * @event lr-audio-request - Audio capture was requested. * @event lr-attachment-retry - Retrying an attachment was requested. `detail: { attachmentId }`. * @event lr-attachment-preview-request - Cancelable preview request. * `detail: { attachmentId, name, mimeType, src }`. * @csspart base - The prompt surface. * @csspart controls - Model, voice, and source controls. * @csspart sources - The collapsible source-picker region. * @csspart sources-summary - The source-picker disclosure. * @csspart source-picker - The composed source picker. * @csspart queue - The composed prompt queue. * @csspart composer - The composed chat composer. * @csspart start - The composer's `start` attachment control, or its default attachment trigger. * @csspart chips - The attachment-chip tray. * @csspart footer - The footer slot. * @cssprop [--lr-prompt-input-control-width=--lr-size-12rem] - Preferred width of each generated * model, voice, and source control before wrapping. * @status stable * @since 7.0.0 */ export declare class LyraPromptInput extends LyraElement{protected static readonly ownedCollectionProperties:readonly string[];static styles:import("lit").CSSResultGroup[];protected static readonly immutableEventDetails:readonly string[]; /** Prompt-queue metadata is opaque caller state; retain it while freezing the forwarding * envelope instead of recursively reflecting a detail the child has already canonicalized. */ protected static readonly identityEventDetailProperties:Readonly<{'lr-send-now':readonly string[];}>;protected static readonly identityEventDetailCollectionItems:Readonly<{'lr-queue-change':readonly string[];}>;private suggestionCaretGeneration;private _value;get value():string;set value(next:string);private statusValue; /** Forwarded composer state. Invalid input reads as the safe idle state without rewriting this host's attribute. */ get status():ChatComposerStatus;set status(value:ChatComposerStatus);placeholder:string;disabled:boolean;readOnly:boolean;minLength?:number;maxLength?:number;submitOnEnter:boolean; /** Forwarded to the composed native textarea. `spellcheck="false"` parses as `false`, matching * the textarea's true default while remaining usable from plain HTML. */ spellcheck:boolean; /** Forwarded to the composed native textarea's own `autocapitalize`. Empty string omits the * attribute and preserves the browser default. */ autocapitalize:string;private autocorrectValue; /** Native autocorrect state forwarded through the composer. Reads are boolean; writes accept * boolean or the legacy `'off'`/`'false'` strings. */ get autocorrect():boolean;set autocorrect(next:boolean|string); /** Native wrapping behavior forwarded to the composed textarea. */ wrap:ChatComposerWrap; /** Native autocomplete hint forwarded to the composed textarea. */ autocomplete:string; /** Virtual-keyboard input hint forwarded to the composed textarea. */ inputMode:string; /** Virtual-keyboard enter-action hint forwarded to the composed textarea. */ enterKeyHint:string; /** Attachment chips keyed by unique, nonempty `attachmentId`; the first duplicate wins. */ attachments:readonly LyraPromptInputAttachment[];attachmentCapabilities:readonly LyraAttachmentCapability[];mentionItems:readonly LyraPromptSuggestion[];commandItems:readonly LyraPromptSuggestion[];modelCatalog?:LyraCatalog;model:string;voiceCatalog?:LyraCatalog;voice:string; /** Retrieval sources keyed by unique nonblank `id`; malformed and later duplicate roots are * omitted before controls are rendered or forwarded. */ sources:readonly LyraSourceEntry[]; /** Controlled source identities, normalized to unique nonblank values before forwarding. */ selectedSourceIds:readonly string[]; /** Queued prompts keyed by unique nonblank `id`; malformed and later duplicate rows are omitted * before section gating or forwarding. */ queue:readonly PromptQueueItem[];label:string;accessibleLabel:string|null;private activeSuggestion;private readonly slotPresence;private composer?;private suggestionPopover?;private suggestionAnchor?;private pendingSuggestionValue;private suggestionNavigationGeneration;focus(options?:FocusOptions):void;blur():void;click():void; /** The composed native textarea, or `null` before it has rendered. */ get input():HTMLTextAreaElement|null;get selectionStart():number|null;set selectionStart(value:number|null);get selectionEnd():number|null;set selectionEnd(value:number|null);get selectionDirection():ChatComposerSelectionDirection|null;set selectionDirection(value:ChatComposerSelectionDirection|null);select():void; /** Forwards the native selection range to the composed textarea; a pre-render call is a no-op. */ setSelectionRange(start:number|null,end:number|null,direction?:ChatComposerSelectionDirection):void;setRangeText(replacement:string):void;setRangeText(replacement:string,start:number,end:number,selectMode?:SelectionMode):void;protected willUpdate(changed:PropertyValues):void;connectedCallback():void;disconnectedCallback():void;protected updated(_changed:PropertyValues):void;private suggestions;private detectSuggestion;private onInput;private onChange;private onSubmit;private onStop;private onKeyDown; /** A suggestion session owns only its textarea and its own popup, never sibling prompt controls. */ private suggestionFocusIsOwned;private closeSuggestions;private onCompositeKeyDown;private onCompositeFocusOut;private onNativeInput;private onNativeChange;private onNativeFocus;private onNativeBlur;private onSuggestionSelect;private onFiles;private get effectiveAttachments();private get effectiveSources();private get effectiveSelectedSourceIds();private get effectiveQueue();private renderDefaultAttachmentTrigger;private reemit;private renderAttachment;private onAttachmentPreviewRequest;private renderControls;render():TemplateResult;}declare global{interface HTMLElementTagNameMap{'lr-prompt-input':LyraPromptInput;}}