import { WorkbookInstance } from '../../sheet-engine/react'; import { SheetChangePath } from './update-ydoc'; import * as Y from 'yjs'; type SyncContext = { currentSheetId: string; oldSheet: Record; ydoc: Y.Doc; }; /** * Build a stable sync context from current editor sheet and Yjs snapshot. * This keeps all field-level sync handlers aligned on the same baseline. */ export declare const getSheetYdocSyncContext: ({ sheetEditorRef, ydocRef, dsheetId, }: { sheetEditorRef: React.RefObject; ydocRef: React.RefObject; dsheetId: string; }) => SyncContext | null; export declare const buildMapFieldChanges: ({ sheetId, fieldPath, oldData, newData, }: { sheetId: string; fieldPath: string; oldData: Record; newData: Record; }) => SheetChangePath[]; export declare const applyYdocSheetChanges: ({ ydoc, dsheetId, changes, handleContentPortal, }: { ydoc: Y.Doc; dsheetId: string; changes: SheetChangePath[]; handleContentPortal?: any; }) => void; export {};