type CaughtError = { error: unknown; componentStack: string | null; }; export type PreviewHealthActions = { /** The boundary committed the page: a mount, or a recovery after a reset. */ boundaryRendered: (boundaryId: string) => void; boundaryCaughtError: (boundaryId: string, caught: CaughtError) => void; boundaryUnmounted: (boundaryId: string) => void; rootCaughtError: (error: unknown) => void; buildErrorsChanged: (messages: string[]) => void; }; type PreviewHealthMonitor = { actions: PreviewHealthActions; dispose: () => void; }; declare global { interface Window { __reploPreviewHealthMonitor?: PreviewHealthMonitor; } } /** * Next's error dialog locks the body's scroll while it's open, and the * stylesheet above hides that dialog, so the page would stop scrolling for no * visible reason. Only a lock taken while the dialog is mounted is released; * a site's own lock (a mobile menu, a modal) is left alone. */ export declare function releaseNextOverlayScrollLock(): () => void; /** The document's preview health actions; null outside an embedded preview. */ export declare function getPreviewHealthActions(): PreviewHealthActions | null; export declare function resetPreviewHealthMonitorForTests(): void; export {};