import { Node as PMNode } from 'prosemirror-model'; import { EditorView, NodeView } from 'prosemirror-view'; /** * Attaches four corner drag-handles to a wrapper and returns a cleanup * function. Dragging previews by mutating the target's style; on release the * final width is committed through onCommit (one transaction). */ export declare function attachResizeHandles(wrapper: HTMLElement, img: HTMLElement, onCommit: (width: number) => void, minWidth?: number): void; export declare function isResizeEvent(event: Event): boolean; /** Inline image with drag-resize handles shown while selected. */ export declare class ImageView implements NodeView { private node; dom: HTMLSpanElement; private img; constructor(node: PMNode, view: EditorView, getPos: () => number | undefined); private applyAttrs; update(node: PMNode): boolean; selectNode(): void; deselectNode(): void; stopEvent(event: Event): boolean; ignoreMutation(): boolean; } /** * Captioned figure: non-editable image (with resize handles) above an * editable figcaption (the node's content). Clicking the image selects the * whole figure. */ export declare class FigureView implements NodeView { private node; dom: HTMLElement; contentDOM: HTMLElement; private img; private wrapper; constructor(node: PMNode, view: EditorView, getPos: () => number | undefined); private applyAttrs; update(node: PMNode): boolean; selectNode(): void; deselectNode(): void; stopEvent(event: Event): boolean; ignoreMutation(mutation: MutationRecord): boolean; }