import { EditorState, EditorView, Schema, Node, Plugin, NodeViewDesc } from '../../prosemirror';
import stateKey from './plugin-key';
export { stateKey };
export declare type HyperlinkStateSubscriber = (state: HyperlinkState) => any;
export declare type StateChangeHandler = (state: HyperlinkState) => any;
export interface HyperlinkOptions {
    href: string;
    text?: string;
}
export declare type Coordinates = {
    left: number;
    right: number;
    top: number;
    bottom: number;
};
export declare class HyperlinkState {
    href?: string;
    text?: string;
    active: boolean;
    linkable: boolean;
    editorFocused: boolean;
    element?: HTMLElement;
    activeElement?: HTMLElement;
    showToolbarPanel: boolean;
    activeLinkNode?: Node;
    private changeHandlers;
    private state;
    private activeLinkMark?;
    private activeLinkStartPos?;
    constructor(state: EditorState<any>);
    subscribe(cb: HyperlinkStateSubscriber): void;
    unsubscribe(cb: HyperlinkStateSubscriber): void;
    addLink(options: HyperlinkOptions, view: EditorView): void;
    removeLink(view: EditorView): void;
    updateLink(options: HyperlinkOptions, view: EditorView): void;
    updateLinkText(text: string, view: EditorView): void;
    update(state: EditorState<any>, docView: NodeViewDesc, dirty?: boolean): void;
    escapeFromMark(editorView: EditorView): void;
    showLinkPanel(editorView: EditorView): void;
    hideLinkPanel(): void;
    getCoordinates(editorView: EditorView, offsetParent: Element): Coordinates;
    private triggerOnChange();
    private isShouldEscapeFromMark(nodeInfo);
    private getActiveLinkNodeInfo();
    private getActiveLinkMark(activeLinkNode);
    private getDomElement(docView);
    /**
     * Returns active dom element for current selection.
     * Used by Hyperlink edit popup to position relative to cursor.
     */
    private getActiveDomElement(selection, docView);
    private isActiveNodeLinkable();
}
export declare const plugin: Plugin;
declare const plugins: (schema: Schema<any, any>, props?: {}) => Plugin[];
export default plugins;
