import type { PresetName } from 'markdown-it';
import type { CommonEditor, MarkupString } from "../common/index.js";
import { Logger2 } from "../logger.js";
import type { TransformFn } from "./markdown/ProseMirrorTransformer/index.js";
import type { ActionStorage } from "./types/actions.js";
import type { Extension } from "./types/extension.js";
import type { Parser } from "./types/parser.js";
import type { Serializer } from "./types/serializer.js";
type OnChange = (editor: WysiwygEditor) => void;
export type EscapeConfig = {
    commonEscape?: RegExp;
    startOfLineEscape?: RegExp;
};
export type WysiwygEditorOptions = {
    domElem?: Element;
    /** markdown markup */
    initialContent?: string;
    extensions?: Extension;
    /** @default 'default' */
    mdPreset?: PresetName;
    allowHTML?: boolean;
    linkify?: boolean;
    pmTransformers?: TransformFn[];
    linkifyTlds?: string | string[];
    escapeConfig?: EscapeConfig;
    /** Call on any state change (move cursor, change selection, etc...) */
    onChange?: OnChange;
    /** Call only if document change */
    onDocChange?: OnChange;
    logger?: Logger2.ILogger;
};
export declare class WysiwygEditor implements CommonEditor, ActionStorage {
    #private;
    get dom(): HTMLElement;
    get serializer(): Serializer;
    get parser(): Parser;
    get actions(): WysiwygEditor.Actions;
    constructor({ domElem, initialContent, extensions, allowHTML, mdPreset, linkify, pmTransformers, linkifyTlds, escapeConfig, onChange, onDocChange, modifiers, logger, }: WysiwygEditorOptions);
    action<T extends keyof WysiwygEditor.Actions>(actionName: T): WysiwygEditor.Actions[T];
    focus(): void;
    hasFocus(): boolean;
    getValue(): MarkupString;
    isEmpty(): boolean;
    clear(): void;
    replace(newMarkup: MarkupString): void;
    prepend(markup: MarkupString): void;
    append(markup: MarkupString): void;
    moveCursor(position: 'start' | 'end'): void;
    destroy(): void;
    private tryOnChange;
}
declare global {
    namespace WysiwygEditor {
        interface Actions {
        }
    }
}
export {};
