/** * useContentSave - Synchronous content save with smart typing batches. * * Replaces useDebouncedSave. Key differences: * - Format and structural changes (Enter, Delete, bold, alignment) save immediately * - Typing batches with a short idle timer so undo reverts a chunk, not one char * - Token restoration before every save * - recentSavesRef (Set) for round-trip detection in useContentSync */ interface ContentSaveArgs { richTextContent: string; onOptionsChange?: (options: Record) => void; restoreTokensInHtml: (html: string) => string; } interface ContentSaveResult { /** Called by useContentSync on every content change. immediate=true skips batching. */ handleContentChange: (html: string, immediate?: boolean) => void; /** Flush any pending batched typing content (blur, unmount). */ flushPendingChanges: () => void; /** * Cancel any pending batched typing without saving. Used when the caller * has already taken responsibility for saving the latest content (e.g. a * token-display toggle that needs to save with a previous restore function). */ cancelPendingChanges: () => void; /** Tracks recently saved HTML values for round-trip detection. */ recentSavesRef: React.MutableRefObject>; } export declare function useContentSave({ richTextContent, onOptionsChange, restoreTokensInHtml, }: ContentSaveArgs): ContentSaveResult; export {}; //# sourceMappingURL=useContentSave.d.ts.map