import { ComponentView } from 'grapesjs'; import { MarkType, NodeType, Node as PmNode } from 'prosemirror-model'; import { EditorState, Transaction } from 'prosemirror-state'; import { EditorView } from 'prosemirror-view'; export declare const mapElToView: WeakMap; export declare const mapViewToEl: WeakMap; export declare const setElToViewMapping: (el: HTMLElement, view: EditorView, gjsView: ComponentView) => void; export declare const deleteElToViewMapping: (el: HTMLElement, view: EditorView) => void; export declare const getViewFromEl: (el: HTMLElement) => { view: EditorView; gjsView: ComponentView; initialDoc: PmNode; } | undefined; export declare const getElFromView: (view: EditorView) => { el: HTMLElement; gjsView: ComponentView; } | undefined; export declare const isDocChangedByEl: (el: HTMLElement) => boolean; /** * Get the GrapesJS component from the PM view */ export declare const getComponentFromView: (view: EditorView) => import('grapesjs').Component | undefined; export declare const dispatchInput: (el: HTMLElement) => boolean; export declare const isMarkActive: (state: EditorState, type: MarkType | null | undefined) => boolean; export declare const isBlockActive: (state: EditorState, type: NodeType | null | undefined, attrs?: Record) => boolean; export declare function unwrapInlineFragment(container: HTMLElement): void; export declare function updateNodeAttributes(tr: Transaction, pos: number, newAttrs: Record): void; export declare function handleNodeSplitting(tr: Transaction, from: number): { splittedElementPos: number; splittedInlineFragmentPos: number; }; export declare function removeInlineFragmentMarks(tr: Transaction, pos: number, textLength: number): void; /** * Remove trailing
elements from blocks before ProseMirror parses. * ProseMirror will add its own trailing break for cursor positioning, * so we remove existing ones to avoid duplication and visual jumps. */ export declare const removeLastBreaks: (node: Node) => void;