import { EditorTransform, Node, NodeType, ProseMirror, ResolvedPos, Selection } from '../prosemirror'; /** * Step through block-nodes between $from and $to and returns false if a node is * found that isn't of the specified type */ export declare function isRangeOfType(pm: ProseMirror, $from: ResolvedPos, $to: ResolvedPos, nodeType: NodeType): boolean; /** * Determines if content inside a selection can be joined with the next block. * We need this check since the built-in method for "joinDown" will join a ordered_list with bullet_list. */ export declare function canJoinDown(pm: ProseMirror, selection: Selection, doc: any, nodeType: NodeType): boolean; /** * Determines if content inside a selection can be joined with the previous block. * We need this check since the built-in method for "joinUp" will join a ordered_list with bullet_list. */ export declare function canJoinUp(pm: ProseMirror, selection: Selection, doc: any, nodeType: NodeType): boolean; /** * Returns all top-level ancestor-nodes between $from and $to */ export declare function getAncestorNodesBetween(pm: ProseMirror, $from: ResolvedPos, $to: ResolvedPos): Node[]; /** * Finds all "selection-groups" within a range. A selection group is based on ancestors. * * Example: * Given the following document and selection ({<} = start of selection and {>} = end) * doc * blockquote * ul * li * li{<} * li * p * p{>} * * The output will be two selection-groups. One within the ul and one with the two paragraphs. */ export declare function getGroupsInRange(pm: ProseMirror, $from: ResolvedPos, $to: ResolvedPos, isNodeValid?: (node: Node) => boolean): Array<{ $from: ResolvedPos; $to: ResolvedPos; }>; /** * Traverse the document until an "ancestor" is found. Any nestable block can be an ancestor. */ export declare function findAncestorPosition(pm: ProseMirror, pos: ResolvedPos): ResolvedPos; /** * Determine if two positions have a common ancestor. */ export declare function hasCommonAncestor(pm: ProseMirror, $from: ResolvedPos, $to: ResolvedPos): boolean; /** * Takes a selection $from and $to and lift all text nodes from their parents to document-level */ export declare function liftSelection(pm: ProseMirror, $from: ResolvedPos, $to: ResolvedPos): EditorTransform;