import { Compartment, Extension } from "@codemirror/state"; import { KeyBinding, ViewUpdate } from "@codemirror/view"; import { EditorView } from "codemirror"; import { MiniCodeContext } from "../context"; export type EditorCommand = { id: string; label: string; run: (view: EditorView) => boolean; }; export type CustomKeybind = { key: string; command: string; }; export declare const editorCommands: EditorCommand[]; export declare const editorCommandMap: Record; export declare class CmPlugin { protected name: string; private compartment; private editor; constructor(name: string, compartment: Compartment, editor: EditorView); /** replaces all extensions with the list given. removes all if none provided */ replace(...extensions: Extension[]): void; } export declare class CmEditor { private ctx; private initialContent; private onChange; _editor: EditorView; private freeCompartments; private plugins; private keymapCompartment; private emitter; constructor(ctx: MiniCodeContext, initialContent: string, onChange: (content: string) => void, maxPlugins: number); onUpdate(listener: (update: ViewUpdate) => void): () => void; editor(): EditorView; addPlugin(name: string): CmPlugin; getPlugin(name: string): CmPlugin | undefined; getOrAddPlugin(name: string): CmPlugin; keymap(): KeyBinding[]; reconfigureKeymap(): void; } //# sourceMappingURL=cm-ext.d.ts.map