import { Node, ResolvedPos } from "prosemirror-model";
import { EditorState } from "prosemirror-state";
type SingleBlockInfo = {
    node: Node;
    beforePos: number;
    afterPos: number;
};
export type BlockInfo = {
    blockContainer: SingleBlockInfo;
    blockContent: SingleBlockInfo;
    blockGroup?: SingleBlockInfo;
};
/**
 * Retrieves the position just before the nearest blockContainer node in a
 * ProseMirror doc, relative to a position. If the position is within a
 * blockContainer node or its descendants, the position just before it is
 * returned. If the position is not within a blockContainer node or its
 * descendants, the position just before the next closest blockContainer node
 * is returned. If the position is beyond the last blockContainer, the position
 * just before the last blockContainer is returned.
 * @param doc The ProseMirror doc.
 * @param pos An integer position in the document.
 * @returns The position just before the nearest blockContainer node.
 */
export declare function getNearestBlockContainerPos(doc: Node, pos: number): {
    posBeforeNode: number;
    node: Node;
};
/**
 * Gets information regarding the ProseMirror nodes that make up a block in a
 * BlockNote document. This includes the main `blockContainer` node, the
 * `blockContent` node with the block's main body, and the optional `blockGroup`
 * node which contains the block's children. As well as the nodes, also returns
 * the ProseMirror positions just before & after each node.
 * @param node The main `blockContainer` node that the block information should
 * be retrieved from,
 * @param blockContainerBeforePosOffset the position just before the
 * `blockContainer` node in the document.
 */
export declare function getBlockInfoWithManualOffset(node: Node, blockContainerBeforePosOffset: number): BlockInfo;
/**
 * Gets information regarding the ProseMirror nodes that make up a block in a
 * BlockNote document. This includes the main `blockContainer` node, the
 * `blockContent` node with the block's main body, and the optional `blockGroup`
 * node which contains the block's children. As well as the nodes, also returns
 * the ProseMirror positions just before & after each node.
 * @param posInfo An object with the main `blockContainer` node that the block
 * information should be retrieved from, and the position just before it in the
 * document.
 */
export declare function getBlockInfo(posInfo: {
    posBeforeNode: number;
    node: Node;
}): BlockInfo;
/**
 * Gets information regarding the ProseMirror nodes that make up a block from a
 * resolved position just before the `blockContainer` node in the document that
 * corresponds to it.
 * @param resolvedPos The resolved position just before the `blockContainer`
 * node.
 */
export declare function getBlockInfoFromResolvedPos(resolvedPos: ResolvedPos): BlockInfo;
/**
 * Gets information regarding the ProseMirror nodes that make up a block. The
 * block chosen is the one currently containing the current ProseMirror
 * selection.
 * @param state The ProseMirror editor state.
 */
export declare function getBlockInfoFromSelection(state: EditorState): BlockInfo;
export {};
