import { EditorView } from 'codemirror';
export { basicSetup, minimalSetup } from 'codemirror';
import { EditorSelection, SelectionRange } from '@codemirror/state';

type Extension = unknown;
declare class EditorDocument {
    #private;
    /**
     * @hidden
     */
    constructor(unkInner: unknown);
    /**
     *
     */
    /**
     *
     * @returns the document as a string, using newline characters to separate lines.
     */
    toString(): string;
    /**
     * @hidden
     */
    get unkInner(): unknown;
}
declare class EditSession {
    #private;
    /**
     * @hidden
     */
    constructor(unkInner: unknown);
    get document(): EditorDocument;
    get selection(): Selection;
    wordAt(pos: number): Range;
    /**
     * @hidden
     */
    get unkInner(): unknown;
}
interface EditSessionConfig {
    document?: string;
    selection?: Selection | {
        anchor: number;
        head?: number;
    };
    extensions?: Extension[];
}
interface EditorConfig extends EditSessionConfig {
    parent?: Element | DocumentFragment;
}
declare function create_editor(config: EditorConfig): Editor;
declare class Editor {
    #private;
    /**
     * @hidden
     */
    constructor(unkInner: EditorView);
    get session(): EditSession;
    addRef(): void;
    focus(): void;
    insert(from: number, text: string): void;
    get hasFocus(): boolean;
    release(): void;
    select(ranges: readonly Range[], mainIndex?: number): void;
    /**
     * @hidden
     */
    get unkInner(): EditorView;
}
interface StyleSpec {
}
declare function create_theme(spec: {
    [selector: string]: StyleSpec;
}, options?: {
    dark?: boolean;
}): Extension;
declare class Selection {
    #private;
    /**
     * @hidden
     */
    constructor(unkInner: EditorSelection);
    get ranges(): Range[];
    /**
     * @hidden
     */
    get unkInner(): EditorSelection;
}
declare class Range {
    #private;
    /**
     * @hidden
     */
    constructor(unkInner: SelectionRange);
    /**
     * The lower boundary of the range.
     */
    get from(): number;
    /**
     * The upper boundary of the range.
     */
    get to(): number;
    /**
     * @hidden
     */
    get unkInner(): SelectionRange;
}
declare function create_anchor_range(anchor: number, head: number, goalColumn?: number, bidiLevel?: number): Range;
declare function create_cursor_range(pos: number, assoc?: number, bidiLevel?: number, goalColumn?: number): Range;
declare function create_selection(ranges: readonly Range[], mainIndex?: number): Selection;

export { EditSession, type EditSessionConfig, Editor, type EditorConfig, EditorDocument, type Extension, Range, Selection, type StyleSpec, create_anchor_range, create_cursor_range, create_editor, create_selection, create_theme };
