import { OverlayBox } from './editor-overlay'; import { RichSurface } from './rich-surface'; import { MarkdownAiOptions } from './use-markdown-ai'; import { MarkdownBox } from './use-markdown-overlay'; /** * The bar over text selected on the rich surface: formats, a comment and the * AI. It shows once the selection settles, the pointer released or the keys * still for a moment, and not in code or a formula, where formatting does not * apply. The AI's panel, loaded on first use, opens under the text it * rewrites and follows that text's highlight. */ export interface MarkdownBubbleOptions extends Omit { /** The rich surface, while the bar applies to it: active, editable, the bar on. */ surface: () => RichSurface | null; /** The element the bar is anchored in. */ page: () => HTMLElement | null; /** Something else has the selection's attention: a prompt, a menu. */ busy: () => boolean; /** The overlay's boxes, in the page: the AI panel goes under the text's. */ boxes: () => OverlayBox[]; } export declare function useMarkdownBubble(options: MarkdownBubbleOptions): { box: import('vue').ShallowRef; reference: import('vue').Raw<{ getBoundingClientRect: () => DOMRect; }>; aiBox: import('vue').ShallowRef; aiReference: import('vue').Raw<{ getBoundingClientRect: () => DOMRect; }>; panel: import('vue').ShallowRef | import('vue').ShallowRef, import('vue').ComponentOptions> | import('vue').ShallowRef, import('vue').FunctionalComponent> | import('vue').ShallowRef<{ new (...args: any[]): any; __isFragment?: never; __isTeleport?: never; __isSuspense?: never; }, { new (...args: any[]): any; __isFragment?: never; __isTeleport?: never; __isSuspense?: never; }>; ai: { session: import('vue').ShallowRef; open: (selection: import('./types').MarkdownEditorSelection) => boolean; run: (action: import('./types').MarkdownEditorAiAction, instruction?: string) => Promise; stop: () => void; retry: () => void; accept: (below?: boolean) => void; discard: () => void; close: () => import('./types').MarkdownEditorSelection | null; marks: () => import('./editor-overlay').EditorRangeMark[]; }; update: () => void; hide: () => void; dismiss: () => void; keydown: (event: KeyboardEvent) => boolean; ask: () => void; marks: () => import('./editor-overlay').EditorRangeMark[]; }; export type MarkdownBubble = ReturnType;