Build an op-batched undo/redo History, defaulting restore-time op
hydration to core's global op-factory registry and its diagnostics to the
kit's debug namespace.
The engine in @weasel-js/history is registry-agnostic: it can only rebuild
a serialized (name, args) pair through the rebuildOp hook it is handed,
which is what lets that package build without depending on core. Core owns
the registry, so this wrapper supplies it — meaning createHistory(adapter)
with no options still restores kit-emitted ops, exactly as before.
A caller-supplied rebuildOp wins; return null from it to fall through to
the registry.
Build an op-batched undo/redo
History, defaulting restore-time op hydration to core's global op-factory registry and its diagnostics to the kit's debug namespace.The engine in
@weasel-js/historyis registry-agnostic: it can only rebuild a serialized(name, args)pair through therebuildOphook it is handed, which is what lets that package build without depending on core. Core owns the registry, so this wrapper supplies it — meaningcreateHistory(adapter)with no options still restores kit-emitted ops, exactly as before.A caller-supplied
rebuildOpwins; returnnullfrom it to fall through to the registry.