import { MutableRefObject } from 'react'; /** * Scoped guard for RTC remote → local apply. * * `remoteUpdateRef` used to stay true for seconds (holdRemoteApplyLock), which * blocked real user metadata writes via guardRemoteEcho. Depth tracks only the * synchronous remote-apply window (plus one paint for structural remounts). */ export type RemoteApplyGuardRefs = { remoteApplyDepthRef: MutableRefObject; remoteUpdateRef: MutableRefObject; }; export declare function syncRemoteUpdateFlag(refs: RemoteApplyGuardRefs): void; export declare function beginRemoteApply(refs: RemoteApplyGuardRefs): void; export declare function endRemoteApply(refs: RemoteApplyGuardRefs): void; export declare function runUnderRemoteApply(refs: RemoteApplyGuardRefs, fn: () => void): void; /** End after Workbook remount hooks have flushed (2 rAF ≈ one paint). */ export declare function endRemoteApplyAfterPaint(refs: RemoteApplyGuardRefs): void;