import { RefObject } from 'react'; import { Context } from '../../core'; import { SetContextOptions } from '../context'; export type FormulaHistoryEntry = { html: string; caret: number; }; /** Which editor receives caret placement and drives history snapshots. */ export type FormulaEditorHistoryPrimary = 'cell' | 'fx'; type SetContext = (recipe: (ctx: Context) => void, options?: SetContextOptions) => void; /** * Custom undo/redo for the cell overlay and Fx bar — **one code path** for * formulas (=…) and plain/rich text (same snapshot shape: text, html, spans). */ export declare function useFormulaEditorHistory(primaryRef: RefObject, cellInputRef: RefObject, fxInputRef: RefObject, _setContext: SetContext, primary: FormulaEditorHistoryPrimary): { formulaHistoryRef: import('react').MutableRefObject<{ active: boolean; entries: FormulaHistoryEntry[]; index: number; }>; preTextRef: import('react').MutableRefObject; resetFormulaHistory: () => void; handleFormulaHistoryUndoRedo: (isRedo: boolean) => boolean; capturePreEditorHistoryState: () => void; appendEditorHistoryFromPrimaryEditor: (getCaret: () => number) => void; capturePreFormulaState: () => void; appendFormulaHistoryFromPrimaryEditor: (getCaret: () => number) => void; }; export {};