You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generalize Leafdown’s existing inline source-projection plugin into a reusable source-projection session engine and rename the capability from inlineSourceProjection to sourceProjection.
This is a behavior-preserving enabling rework for:
The current session representation assumes one text range with a uniform set of marks and reconstructs canonical content from text + marks. It cannot safely represent either a rich inline fragment or an inline atomic node.
Retain the established session lifecycle: projection-local undo/redo, restore-before-commit native history bridging, dirty-state integration, transient Markdown-update suppression, selection preservation, target switching, save-time finalization, and exact literal fallback.
Expected behavior
The shared engine owns one active session, its projected range, original ProseMirror content, projected source, local history, transaction metadata, and finalization lifecycle.
Sessions preserve the original target as an immutable ProseMirror Slice or equivalent fragment rather than reconstructing it only from uniform marks.
Projection entry replaces the complete target with unmarked editable source text.
Clean finalization restores the original content exactly.
Edited finalization restores the original content before applying the adapter-produced replacement as the native history change.
Invalid source commits every projected character as literal document text.
Object-specific adapters own target discovery and precedence, source generation, validation and rehydration, presentation spans, and selection mapping.
Summary
Generalize Leafdown’s existing inline source-projection plugin into a reusable source-projection session engine and rename the capability from
inlineSourceProjectiontosourceProjection.This is a behavior-preserving enabling rework for:
The current session representation assumes one text range with a uniform set of marks and reconstructs canonical content from
text + marks. It cannot safely represent either a rich inline fragment or an inline atomic node.Retain the established session lifecycle: projection-local undo/redo, restore-before-commit native history bridging, dirty-state integration, transient Markdown-update suppression, selection preservation, target switching, save-time finalization, and exact literal fallback.
Expected behavior
Sliceor equivalent fragment rather than reconstructing it only from uniform marks.sourceProjectionterminology.markerPresentationremains a separate capability.Related docs
Done when
sourceProjectionterminology.Out of scope