import { Node as ProsemirrorNode, Schema } from 'prosemirror-model'; import { EditorState, Plugin, Transaction } from 'prosemirror-state'; export declare type Dispatch = (tr: Transaction) => void; export interface ReactEditorView { state: EditorState; isFocused: boolean; dispatch: Dispatch; subscribe: (sb: StateSubscription) => StateUnsubscribe; setRootElement: (element: HTMLElement) => void; getRootElement: () => HTMLElement | undefined; focus: () => void; blur: () => void; } export interface ReactEditorViewNullable { state: EditorState | null; dispatch: Dispatch; } export declare type StateSubscription = (state: EditorState) => void; declare type StateUnsubscribe = () => void; export declare class EditorView implements ReactEditorView { private listeners; private rootElement; isFocused: boolean; state: EditorState; constructor(state: EditorState); dispatch: (tr: Transaction) => void; private notifySubscribers; subscribe(cb: StateSubscription): () => void; getRootElement(): HTMLElement | undefined; setRootElement(element: HTMLElement): void; blur(): void; focus(): void; } export declare const useEditor: >(schema: S, initialDoc?: ProsemirrorNode | undefined, plugins?: Plugin[] | undefined) => ReactEditorView | null; export {}; //# sourceMappingURL=useEditor.d.ts.map