import { Node as ProseMirrorNode, Schema } from 'prosemirror-model'; import { EditorState, Transaction } from 'prosemirror-state'; import { KeyboardEvent } from 'react'; import { MarkComponentType, NodeComponentType } from './components/dom-serializer/types'; export declare type Command = (tr: Transaction) => void; export interface PartialEditorView { state: EditorState; dispatch: Command; endOfTextblock: () => boolean; } export declare type SchemaNodes = S extends Schema ? N : never; export declare type SchemaMarks = S extends Schema ? M : never; export interface PMEditorProps { handleKeyDown?: ((view: PartialEditorView, event: KeyboardEvent) => boolean) | null; /** * Handler for `keypress` events. */ handleKeyPress?: ((view: PartialEditorView, event: KeyboardEvent) => boolean) | null; handleTextInput?: ((view: PartialEditorView, from: number, to: number, text: string) => boolean) | null; toReact?: { [P in SchemaNodes | SchemaMarks]: P extends SchemaNodes ? NodeComponentType : MarkComponentType; }; } export declare type ProseMirrorNodeWithId = ProseMirrorNode & { id?: number; }; //# sourceMappingURL=types.d.ts.map