import { ReplaceStep } from 'prosemirror-transform';
import { Slice } from 'prosemirror-model';
export function compileTrackedEdit({ state, tr, intent, replacements }: {
    state: import('prosemirror-state').EditorState;
    tr: import('prosemirror-state').Transaction;
    intent: TrackedEditIntent;
    replacements?: "paired" | "independent";
}): TrackedEditResult;
export namespace compilerInternalsForTest {
    export { stripTrackedMarksFromSlice };
    export { classifySegment };
}
export type TrackedEditIntent = import('./edit-intent.js').TrackedEditIntent;
export type SelectionHint = {
    kind: "near" | "exact-text";
    pos: number;
    bias?: 1 | -1 | undefined;
};
export type GraphDiagnostic = {
    code: string;
    severity: "info" | "warning" | "error";
    message: string;
    changeIds?: string[] | undefined;
    details?: unknown;
};
export type TrackedEditSuccess = {
    ok: true;
    tr: import('prosemirror-state').Transaction;
    createdChangeIds: string[];
    updatedChangeIds: string[];
    removedChangeIds: string[];
    remappedChangeIds: Array<{
        from: string;
        to: string;
    }>;
    selection?: SelectionHint | undefined;
    diagnostics?: GraphDiagnostic[] | undefined;
    insertedMark?: import('prosemirror-model').Mark | null | undefined;
    deletionMark?: import('prosemirror-model').Mark | null | undefined;
    deletionMarks?: import('prosemirror-model').Mark[] | undefined;
    formatMarks?: import('prosemirror-model').Mark[] | undefined;
    insertedFrom?: number | undefined;
    insertedTo?: number | undefined;
    deletedFrom?: number | undefined;
    deletedTo?: number | undefined;
    insertedNodes?: import('prosemirror-model').Node[] | undefined;
    deletionNodes?: import('prosemirror-model').Node[] | undefined;
    insertedStep?: ReplaceStep | null | undefined;
};
export type TrackedEditFailure = {
    ok: false;
    code: "CAPABILITY_UNAVAILABLE" | "INVALID_TARGET" | "PRECONDITION_FAILED";
    message: string;
    details?: unknown;
};
export type TrackedEditResult = TrackedEditSuccess | TrackedEditFailure;
export type ExistingDeletionReassignMode = false | "different-user" | "all";
/**
 * Strip every tracked insert/delete mark from a slice's text nodes. The
 * compiler always re-marks inserted content under its own logical id, so
 * leftover marks from the caller would shadow that decision.
 *
 * @param {import('prosemirror-model').Slice} slice
 * @param {*} schema
 */
declare function stripTrackedMarksFromSlice(slice: import('prosemirror-model').Slice, schema: any): Slice;
/**
 * Classify whether the segment is same-user-owned by the intent's user.
 *
 * @param {*} ctx
 * @param {*} segment
 * @returns {'same-user'|'different-user'}
 */
declare function classifySegment(ctx: any, segment: any): "same-user" | "different-user";
export {};
//# sourceMappingURL=overlap-compiler.d.ts.map