import { AfterViewInit, ChangeDetectorRef, EventEmitter, OnChanges, SimpleChanges } from '@angular/core'; import * as i0 from "@angular/core"; /** * A rich text input that supports `@`-mentions inside a `contenteditable` div. * * ## Data Model * - **Input/Output**: `ContentItem[]` (mentions, text, newlines) * * ## DOM Invariant * Every mention `` is wrapped * by exactly one zero-width-space (ZWS) text node before and after it. ZWS gives * the cursor a valid landing spot adjacent to a non-editable element. The * invariant is established at render time and re-established by * `normalizeMentionPadding()` after any DOM-mutating operation. * * ## Copy/Paste * - **Copy**: `range.cloneContents()` preserves `data-*` attributes (only the * browser's default copy path strips them). We override copy, serialize the * clone ourselves, and strip ZWS from the output. * - **Paste**: HTML paths look for `data-type="mention"` spans and rebuild * them; otherwise plaintext fallback. */ export declare class MentionsInputComponent implements OnChanges, AfterViewInit { private readonly cdr; constructor(cdr: ChangeDetectorRef); content: MentionsInputComponent.ContentItem[]; users: MentionsInputComponent.User[]; readonly: boolean; placeholder: string; readonly contentChange: EventEmitter; private readonly inputElement?; mentionsVisible: boolean; mentionSearchText: string; mentionAnchor: DOMRect | null; selectedUserIndex: number; private savedRange; ngAfterViewInit(): void; ngOnChanges(changes: SimpleChanges): void; private renderContent; private static contentItemToHtml; private static escapeHtml; onInput(): void; onKeyDown(event: KeyboardEvent): void; onPaste(event: ClipboardEvent): void; onCopy(event: ClipboardEvent): void; onCut(event: ClipboardEvent): void; private static isMention; private static isZws; private resolveAdjacentNode; private findMentionAdjacentToCursor; private findBrAdjacentToCursor; private extendSelectionAcrossMention; private placeCursorAdjacentToMention; private removeMention; private normalizeMentionPadding; private handleMentionsDropdownNav; private plainTextToNodes; private parsePastedHtml; private insertNodesAtCursor; private insertLineBreak; private checkForMentionTrigger; private getTextBeforeCursor; getFilteredUsers(): MentionsInputComponent.User[]; onUserHover(index: number): void; selectUser(user: MentionsInputComponent.User): void; private deleteAtMentionSearch; private isInsideMentionSpan; private findDomPositionAtCharIndex; private closeMentions; private emitContentChange; private domToContentItems; onCalloutClose(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } export declare namespace MentionsInputComponent { const ContentTypes: readonly ["mention", "text", "newline"]; type ContentType = (typeof MentionsInputComponent.ContentTypes)[number]; interface User { id: number; name: string; } type Content = { type: T; }; type UserMention = Content<'mention'> & User; type Text = Content<'text'> & { text: string; }; type Newline = Content<'newline'>; type ContentItem = UserMention | Text | Newline; function contentToPlainText(content: ContentItem[]): string; }