import type { InspectApplyPayload, SourceEditScope, SourceIdentity } from './inspect.js'; import type { NodeModel, PageModel } from './store.js'; type JournalNode = Pick; type JournalPage = Pick; type ParseSourceIdentity = (raw: string | null | undefined) => SourceIdentity | null; export interface SourceJournalSnapshot { revision: number; payload: InspectApplyPayload; } /** * A source-backed baseline journal in a regular canvas patch. * The baseline is maintained even after ack, so undo appears again as a reverse source change. */ export declare class SourcePatchJournal { private baselines; private parseIdentity; revision: number; constructor(parseIdentity: ParseSourceIdentity); captureBefore(pages: readonly JournalPage[], nodeId: string, partial: Partial): boolean; markContextChanged(): void; /** After restoring the canvas based on the last reflection standard, the remaining pending baselines are also discarded. */ discard(): void; markModelRestored(): void; snapshot(pages: readonly JournalPage[], scopeForNode: (nodeId: string, identity: SourceIdentity) => SourceEditScope): SourceJournalSnapshot; ack(expectedRevision: number, pages: readonly JournalPage[], scopeForNode: (nodeId: string, identity: SourceIdentity) => SourceEditScope): boolean; } export {};