A stack item was added, updated or popped. Delivered by Yex.UndoManager.observe/2.
:type-:addedwhen a captured change created a new item,:updatedwhen it was merged into the last item (withincapture_timeout),:poppedwhenundo/1orredo/1applied the item.:kind- for:addedand:updated, the stack the item is on::redowhen the change came from an undo,:undootherwise. For:popped,:undowhen popped byundo/1and:redowhen popped byredo/1.:item- the item's id, stable for its whole life. Use it withYex.UndoManager.put_meta/3andYex.UndoManager.get_meta/2.:origin- the origin of the transaction that caused the event: the term given toYex.Doc.transaction/3,nil, or the%Yex.UndoManager{}for undo and redo.:meta- the item's meta at the time of the event,niluntil set.
Summary
Types
@type t() :: %Yex.UndoManager.StackItemEvent{ item: pos_integer(), kind: :undo | :redo, meta: term(), origin: term(), type: :added | :updated | :popped }