export { basicSetup, minimalSetup } from 'codemirror';
import { Extension as Extension$1 } from '@codemirror/state';

type Extension = Extension$1;
interface Line {
    from: number;
    to: number;
    number: number;
    text: string;
    length: number;
}
declare class Text {
    #private;
    constructor(punkInner: unknown);
    /**
     *
     */
    /**
     *
     * @returns the document as a string, using newline characters to separate lines.
     */
    toString(): string;
}
interface ChangeDesc {
    length: number;
    newLength: number;
    empty: boolean;
    invertedDesc: ChangeDesc;
    composeDesc(other: ChangeDesc): ChangeDesc;
}
declare class EditorState {
    #private;
    constructor(punkInner: unknown);
    get doc(): Text;
    get punkInner(): unknown;
}
interface EditorStateConfig {
    doc?: string;
    selection?: Selection | {
        anchor: number;
        head?: number;
    };
    extensions?: Extension[];
}
interface EditorViewConfig extends EditorStateConfig {
    parent?: Element | DocumentFragment;
}
interface ChangeSet {
    from: number;
    insert: string;
}
interface Transaction {
    startState: EditorState;
    changes: ChangeSet | ChangeSet[];
    selection: Selection | undefined;
    scrollIntoView: boolean;
    newDoc: Text;
    newSelection: Selection;
    state: EditorState;
    docChanged: boolean;
    reconfigured: boolean;
    isUserEvent(event: string): boolean;
}
type ChangeSpec = {
    from: number;
    to?: number;
    insert?: string | Text;
} | ChangeSet | readonly ChangeSpec[];
interface TransactionSpec {
    changes?: ChangeSpec;
}
declare class EditorView {
    #private;
    constructor(config: EditorViewConfig);
    get state(): EditorState;
    dispatch(arg: {
        changes?: {
            from: number;
            insert: string;
        };
        selection?: Selection;
    }): void;
    get punkInner(): unknown;
}
interface StyleSpec {
}
declare function theme(spec: {
    [selector: string]: StyleSpec;
}, options?: {
    dark?: boolean;
}): Extension;
interface TagStyle {
}
declare class Selection {
    #private;
    constructor(unkInner: unknown);
    get ranges(): SelectionRange[];
    get unkInner(): unknown;
}
declare class SelectionRange {
    #private;
    constructor(unkInner: unknown);
    /**
     * The lower boundary of the range.
     */
    get from(): number;
    /**
     * The upper boundary of the range.
     */
    get to(): number;
    get unkInner(): unknown;
}
declare function range_selection_range(anchor: number, head: number, goalColumn?: number, bidiLevel?: number): SelectionRange;
declare function cursor_selection_range(pos: number, assoc?: number, bidiLevel?: number, goalColumn?: number): SelectionRange;
declare function selection(ranges: readonly SelectionRange[], mainIndex?: number): Selection;

export { type ChangeDesc, type ChangeSet, type ChangeSpec, EditorState, type EditorStateConfig, EditorView, type EditorViewConfig, type Line, Selection, SelectionRange, type StyleSpec, type TagStyle, type Transaction, type TransactionSpec, cursor_selection_range, range_selection_range, selection, theme };
