import { RichSurface } from './rich-surface'; /** A revealed span's text as source: no step-out spaces, non-breaking spaces as spaces. */ export declare function revealedText(node: Node): string; /** The toolbar states a piece of a revealed span presses. */ export declare function revealedFormats(piece: Element): string[]; export declare class RichReveal { private readonly surface; private current; private pointerDown; /** After a typing-style toggle: nothing opens until the key or click the style is for. */ private suspended; private preview; private timer; constructor(surface: RichSurface); destroy(): void; /** The revealed span, while it is still in the document. */ private live; holds(node: Node | null): boolean; /** The pointer went down in the surface: the layout holds still until it is released. */ onPointerDown(event: MouseEvent): void; onPointerUp(): void; onKeydown(): void; /** A typing style is about to be toggled: it needs the rendered text, and the caret where it is. */ suspend(): void; /** The selection changed: reveal what the caret touches, put back what it left. */ update(): void; /** A formula or a callout's title was clicked: its source, the caret before the closing `$` or `]`. */ revealElement(el: HTMLElement): boolean; /** Puts the element back. A caret in the span keeps its place in the source. */ conceal(): void; /** * After an input: lexes the span again so its colouring follows the new * source. True when the caret is in it, where no typing rule applies. */ restyle(): boolean; private piecesOf; private paint; private invalidate; private collapse; /** Whether a caret outside the span is still at one of its edges. */ private touches; /** The outermost formatted element the caret is in, or else touches. */ private find; private open; private showPreview; private hidePreview; }