OptionalcontextOptional opaque context (e.g. view path and selection) returned on undo and redo so the UI can return to where the change happened.
Derives the input for the inverse operation from the forward operation's input and output. Return undefined to indicate the operation is not undoable.
The inverse operation to invoke for undo.
OptionalmergeOptional fold of two merged invocations into one forward, from which the inverse is derived again.
OptionalmergeOptional merge key; consecutive entries in one scope with equal keys inside the tracker's merge window fold into one undo step (e.g. typing into one field).
OptionalmessageOptional message to show in the undo toast. Can be a static Label or a function that derives the message from input/output.
The forward operation.
OptionalscopeOptional scope (document or subject id) so scoped undo/redo can act on this entry alone. Return undefined to leave the entry reachable only by unscoped undo/redo.
OptionaltoastWhether recording an entry offers the undo toast; true when absent.
Props for creating an UndoMapping.