import { CanonicalChangeType, ChangeSubtype, SegmentSide } from './mark-metadata.js';
export function buildReviewGraph({ state, story, replacementsMode }: {
    state: import('prosemirror-state').EditorState | {
        doc?: import('prosemirror-model').Node;
    };
    story?: import('./story-locator.js').StoryLocator;
    replacementsMode?: "paired" | "independent";
}): TrackedReviewGraph;
export function getOrBuildReviewGraph({ editor, state, story, replacementsMode }: {
    editor: object;
    state?: import('prosemirror-state').EditorState | {
        doc?: import('prosemirror-model').Node;
    };
    story?: import('./story-locator.js').StoryLocator;
    replacementsMode?: "paired" | "independent";
}): TrackedReviewGraph;
export function invalidateReviewGraphCache(editor: object): void;
export function validateGraph(graph: TrackedReviewGraph): Array<GraphDiagnostic>;
export function signatureOf(change: LogicalTrackedChange): string;
export type TrackedMarkRun = {
    from: number;
    to: number;
    mark: import('prosemirror-model').Mark;
};
export type TrackedSegment = {
    segmentId: string;
    changeId: string;
    markType: string;
    /**
     * 'inserted' | 'deleted' | 'formatting'.
     */
    side: string;
    from: number;
    to: number;
    text: string;
    mark: import('prosemirror-model').Mark;
    markRuns: Array<TrackedMarkRun>;
    attrs: import('./mark-metadata.js').NormalizedTrackedAttrs;
    parentId: string;
    parentSide: string;
    overlapRole: "parent" | "child" | "standalone";
    /**
     * optional diagnostics nodePath.
     */
    nodePath?: number[] | undefined;
};
export type LogicalReplacementProjection = {
    groupId: string;
    inserted: Array<TrackedSegment>;
    deleted: Array<TrackedSegment>;
    insertedSideId: string;
    deletedSideId: string;
};
export type LogicalTrackedChange = {
    id: string;
    type: string;
    subtype: string;
    state: "open";
    segments: Array<TrackedSegment>;
    coverageSegments: Array<TrackedSegment>;
    insertedSegments: Array<TrackedSegment>;
    deletedSegments: Array<TrackedSegment>;
    formattingSegments: Array<TrackedSegment>;
    replacement: LogicalReplacementProjection | null;
    author: string;
    authorId: string;
    authorEmail: string;
    authorImage: string;
    date: string;
    sourceIds: Record<string, unknown>;
    revisionGroupId: string;
    splitFromId: string;
    sourcePlatform: string;
    story: import('./story-locator.js').StoryLocator;
    parent: string | null;
    children: Array<string>;
    before: Array<unknown>;
    after: Array<unknown>;
    excerpt: string;
};
export type GraphDiagnostic = {
    code: string;
    severity: "info" | "warning" | "error";
    message: string;
    changeIds?: string[] | undefined;
    details?: unknown;
};
export type TrackedReviewGraph = {
    changes: Map<string, LogicalTrackedChange>;
    segments: Array<TrackedSegment>;
    bySegmentId: Map<string, TrackedSegment>;
    byRevisionGroupId: Map<string, Array<string>>;
    byReplacementGroupId: Map<string, Array<string>>;
    byParentId: Map<string, Array<string>>;
    story: import('./story-locator.js').StoryLocator;
    overlapAt: (pos: number) => Array<TrackedSegment>;
    segmentsInRange: (from: number, to: number) => Array<TrackedSegment>;
    changesInRange: (from: number, to: number) => Array<LogicalTrackedChange>;
    validate: () => Array<GraphDiagnostic>;
};
export { CanonicalChangeType, ChangeSubtype, SegmentSide };
//# sourceMappingURL=review-graph.d.ts.map