docs/research/sources/editor-architecture/prosemirror-transaction-view-dom-runtime.md
Compile the ProseMirror evidence that matters to Slate v2's transaction and DOM selection discipline.
Slate already has operations and transactions. ProseMirror reinforces that the transaction should own:
For Slate v2, editor.update should create the transaction, and
EditorCommit should be the durable local record.
ProseMirror maps selection through transaction steps. Slate v2 should map selection through operations and runtime ids instead of relying on stale public fields or full snapshots.
SelectionBookmark is the clean durable anchor model:
Slate v2 should preserve this as the public durable selection/anchor story for history, collaboration, comments, and review systems.
ProseMirror's view code has explicit selectionFromDOM, selectionToDOM, DOM
observer flushing, and composition handling. Slate v2 should keep the same
discipline:
ProseMirror decorations prove overlays should be mapped view data. Slate v2
should keep projection sources and dirty-source invalidation instead of
reviving render-time decorate as the primary API.
The ProseMirror lesson is not "be ProseMirror".
It is:
transactions own state changes
selection maps through mutations
DOM selection import/export is centralized
view overlays are data
Slate v2 should implement those disciplines with paths, runtime ids, operations, commits, and a React-optimized renderer.