import { autocompletion } from '@codemirror/autocomplete';
import type { Extension, StateCommand } from '@codemirror/state';
import { EditorView, type EditorViewConfig, type KeyBinding, placeholder } from '@codemirror/view';
import type { ParseInsertedUrlAsImage } from "../../bundle/index.js";
import type { EventMap } from "../../bundle/Editor.js";
import type { ReactRenderStorage } from "../../extensions/index.js";
import type { Receiver } from "../../utils/index.js";
import type { DirectiveSyntaxContext } from "../../utils/directive.js";
import { type FileUploadHandler } from "./files-upload-facet.js";
import { type YfmLangOptions } from "./yfm.js";
export type { YfmLangOptions };
type Autocompletion = Parameters<typeof autocompletion>[0];
export type CreateCodemirrorParams = {
    doc: EditorViewConfig['doc'];
    placeholder: Parameters<typeof placeholder>[0];
    onCancel: () => void;
    onSubmit: () => void;
    onChange: () => void;
    onDocChange: () => void;
    onScroll: (event: Event) => void;
    reactRenderer: ReactRenderStorage;
    uploadHandler?: FileUploadHandler;
    parseHtmlOnPaste?: boolean;
    parseInsertedUrlAsImage?: ParseInsertedUrlAsImage;
    needImageDimensions?: boolean;
    enableNewImageSizeCalculation?: boolean;
    extensions?: Extension[];
    disabledExtensions?: {
        history?: boolean;
    };
    keymaps?: readonly KeyBinding[];
    receiver?: Receiver<EventMap>;
    yfmLangOptions?: YfmLangOptions;
    autocompletion?: Autocompletion;
    directiveSyntax: DirectiveSyntaxContext;
    preserveEmptyRows: boolean;
};
export declare function createCodemirror(params: CreateCodemirrorParams): EditorView;
export declare function withLogger(action: string, command: StateCommand): StateCommand;
