import { BlockNodeAddress, TextAddress } from '../../../../../../document-api/src/index.js';
import { Node as ProseMirrorNode } from 'prosemirror-model';
import { Editor } from '../../core/Editor.js';
/** Target selector for structural operations — either a typed block address or a text address. */
export type StructuralTarget = BlockNodeAddress | TextAddress;
/** Resolved insertion target with absolute ProseMirror position. */
export interface ResolvedInsertTarget {
    /** Absolute ProseMirror position for insertion. */
    insertPos: number;
    /** Whether the target is at the structural end of the document (no text blocks). */
    structuralEnd: boolean;
    /** The effective TextAddress used for resolution (may differ from input). */
    effectiveTarget?: TextAddress;
    /** The ProseMirror node at the target position (for placement resolution). */
    targetNode?: ProseMirrorNode;
    /** The starting position of the target node (for placement resolution). */
    targetNodePos?: number;
}
/** Resolved replacement target covering a full block node range. */
export interface ResolvedReplaceTarget {
    /** Absolute start position of the block node. */
    from: number;
    /** Absolute end position of the block node (pos + nodeSize). */
    to: number;
    /** The effective TextAddress used for resolution. */
    effectiveTarget: TextAddress;
}
/**
 * Resolves an optional target to an absolute ProseMirror insertion position.
 *
 * Uses block-level lookup so ALL block types (paragraphs, tables, images, etc.)
 * are addressable — not just text blocks.
 *
 * When target is omitted, falls back to end-of-document insertion.
 */
export declare function resolveInsertTarget(editor: Editor, target?: StructuralTarget): ResolvedInsertTarget;
/**
 * Resolves a required target for structural replace operations.
 *
 * Resolves to the FULL block node range. This ensures tr.replaceWith
 * replaces the entire block — not just its text content.
 */
export declare function resolveReplaceTarget(editor: Editor, target: StructuralTarget): ResolvedReplaceTarget;
//# sourceMappingURL=target-resolver.d.ts.map