import { Extension } from '@tiptap/core'; import { Node as ProseMirrorNode } from '@tiptap/pm/model'; import { Transaction } from '@tiptap/pm/state'; import { EditorView } from '@tiptap/pm/view'; interface TrackedRange { from: number; to: number; } /** * Keeps the target range of in-flight uploads in step with edits made while * they upload, so a dropped/pasted file still lands where it was dropped */ export declare const UploadPosition: Extension; /** * Tracks `range` through later edits. Without the plugin registered the range * is used as given, as before */ export declare const trackRange: (view: EditorView, range: TrackedRange) => { get: () => TrackedRange; set: (tr: Transaction, next: TrackedRange) => void; release: () => void; }; export type TrackedTarget = ReturnType; /** * Inserts an uploaded node at the tracked target and moves the target after * it, so further files follow in order. * `at`: insert at a position (drop), or replace the range (selection at the * time of the paste / toolbar pick), as `replaceSelectionWith` would */ export declare const insertAtTarget: (view: EditorView, target: TrackedTarget, node: ProseMirrorNode, at: "position" | "selection", inheritMarks: boolean) => void; export {};