evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Implement a mention-enabled editing helper that keeps the suggestion dropdown anchored to the caret using contextual balloon positioning with right-to-left aware fallbacks. The helper should rely on the provided mention package rather than manual DOM math.
export interface MentionFeedInput {
marker: string;
feed: string[] | ( ( query: string ) => Promise<Array<string | { id: string; text?: string }>> );
minimumCharacters?: number;
dropdownLimit?: number;
}
export interface MentionBalloonConfig {
element: HTMLElement;
feeds: MentionFeedInput[];
enableRtl?: boolean;
}
export interface MentionBalloonController {
destroy(): Promise<void>;
/** Returns the last positioned balloon slot (e.g., 'below' or 'above') for testing. */
getLastPosition(): string | undefined;
}
export async function setupMentionBalloon( config: MentionBalloonConfig ): Promise<MentionBalloonController>;Provides mention detection, contextual balloon positioning, and dropdown interactions with RTL-aware fallbacks.