import { autocompletion } from '@codemirror/autocomplete'; import type { Extension, StateCommand } from '@codemirror/state'; import { EditorView, type EditorViewConfig, type KeyBinding, placeholder, tooltips } 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 Logger2 } from "../../logger.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[0]; type Tooltips = Parameters[0]; export type CreateCodemirrorParams = { doc: EditorViewConfig['doc']; placeholder: Parameters[0]; logger: Logger2.ILogger; 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; yfmLangOptions?: YfmLangOptions; autocompletion?: Autocompletion; tooltips?: Tooltips; directiveSyntax: DirectiveSyntaxContext; preserveEmptyRows: boolean; searchPanel?: boolean; }; export declare function createCodemirror(params: CreateCodemirrorParams): EditorView; export declare function withLogger(action: string, command: StateCommand): StateCommand;