import { type EditorState, type Line, type SelectionRange, type StateCommand, type Text, type TransactionSpec } from '@codemirror/state';
export declare function getBlockExtraLineBreaks(state: EditorState, { from: fromLine, to: toLine }: {
    from: Line;
    to: Line;
}): {
    before: number;
    after: number;
};
export declare function replaceOrInsertAfter(state: EditorState, markup: string): TransactionSpec;
export declare const wrapToBlock: (before: string | ((arg: Pick<EditorState, "lineBreak">) => string), after: string | ((arg: Pick<EditorState, "lineBreak">) => string), perLine?: {
    before: string | ((arg: Pick<EditorState, "lineBreak">) => string);
    after: string | ((arg: Pick<EditorState, "lineBreak">) => string);
    /** @default false */
    skipEmptyLine?: boolean;
}) => StateCommand;
export declare function inlineWrapTo(before: string, after?: string): StateCommand;
export declare function toggleInlineMarkupFactory(markup: string | {
    before: string;
    after?: string;
}): StateCommand;
type WrapPerLineOptions = {
    beforeText: string;
    afterText?: string;
    skipEmptyLine?: boolean;
};
export declare const wrapPerLine: ({ beforeText: before, skipEmptyLine }: WrapPerLineOptions) => StateCommand;
export declare function iterateOverRangeLines(doc: Text, range: SelectionRange, fn: (line: Line) => void): void;
export {};
