/**
 * @license
 * Copyright 2026 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */
import { type RegionNode, type RegionUpdate } from './output.js';
import { type StickyHeader } from './dom.js';
export type ReplayData = {
    type: 'single' | 'sequence';
    columns: number;
    rows: number;
    frames: ReplayFrame[];
};
export type ReplayFrame = {
    tree: RegionNode;
    updates: ReplayRegionUpdate[];
    cursorPosition?: {
        row: number;
        col: number;
    };
    timestamp: number;
};
export type ReplayRegionUpdate = Omit<RegionUpdate, 'lines' | 'stickyHeaders'> & {
    lines?: {
        updates: Array<{
            start: number;
            end: number;
            data: string;
            source?: string;
        }>;
        totalLength: number;
    };
    stickyHeaders?: ReplayStickyHeader[];
};
export type ReplayStickyHeader = Omit<StickyHeader, 'node' | 'anchor' | 'lines' | 'stuckLines' | 'styledOutput'> & {
    lines: string;
    stuckLines?: string;
    styledOutput: string;
};
export declare function serializeReplayUpdate(update: RegionUpdate): ReplayRegionUpdate;
export declare function deserializeReplayUpdate(update: ReplayRegionUpdate): RegionUpdate;
export declare function saveReplay(data: ReplayData, filename: string): void;
export type LoadedReplayData = {
    type: 'single' | 'sequence';
    columns: number;
    rows: number;
    frames: LoadedReplayFrame[];
};
export type LoadedReplayFrame = {
    tree: RegionNode;
    updates: RegionUpdate[];
    cursorPosition?: {
        row: number;
        col: number;
    };
    timestamp: number;
};
export declare function loadReplay(jsonStr: string): LoadedReplayData;
export declare function createHumanReadableDump(data: LoadedReplayData): string;
