import { SDFragment, NestingPolicy, Placement } from '../../../../../../document-api/src/index.js';
import { Editor } from '../../core/Editor.js';
import { StructuralTarget } from './target-resolver.js';
/** Options for structural insert. */
export interface StructuralInsertOptions {
    target?: StructuralTarget;
    content: SDFragment;
    placement?: Placement;
    nestingPolicy?: NestingPolicy;
    /** Tracked or direct mode. When 'tracked', the transaction carries tracked-change metadata. */
    changeMode?: 'direct' | 'tracked';
    /** When true, runs all validation (target resolution, materialization, nesting policy) but skips the transaction dispatch. */
    dryRun?: boolean;
}
/** Options for structural replace. */
export interface StructuralReplaceOptions {
    target: StructuralTarget;
    content: SDFragment;
    nestingPolicy?: NestingPolicy;
    /** Tracked or direct mode. When 'tracked', the transaction carries tracked-change metadata. */
    changeMode?: 'direct' | 'tracked';
    /** When true, runs all validation (target resolution, materialization, nesting policy) but skips the transaction dispatch. */
    dryRun?: boolean;
    /**
     * Pre-resolved replacement range. When present, skips single-block target
     * resolution and uses this range directly. Used by the wrapper for
     * multi-block locators (SelectionTarget spanning blocks, multi-segment refs).
     */
    resolvedRange?: {
        from: number;
        to: number;
    };
}
/** Result of a structural write operation. */
export interface StructuralWriteResult {
    success: boolean;
    insertedBlockIds: string[];
}
/**
 * Executes a structural insert: materializes an SDFragment and inserts
 * it at the resolved position in the ProseMirror document.
 */
export declare function executeStructuralInsert(editor: Editor, options: StructuralInsertOptions): StructuralWriteResult;
/**
 * Executes a structural replace: materializes an SDFragment and replaces
 * the target block in the ProseMirror document.
 *
 * Target resolution uses block-level addressing: the entire block node
 * (from pos to pos + nodeSize) is replaced, not just its text content.
 */
export declare function executeStructuralReplace(editor: Editor, options: StructuralReplaceOptions): StructuralWriteResult;
export { materializeFragment } from './node-materializer.js';
export { resolveInsertTarget, resolveReplaceTarget } from './target-resolver.js';
export { resolvePlacement } from './placement-resolver.js';
export { enforceNestingPolicy } from './nesting-guard.js';
//# sourceMappingURL=index.d.ts.map