Editing together, text now travels as it is typed. Only with collaboration.edit_together.
New in this release
Type together. Each text frame's story is shared keystroke by keystroke: what one person
types appears in the other windows within a moment, two people typing in the same paragraph both
keep what they typed, and making a word bold while someone types in it keeps both. A caret or
selection moves with the text around it. Until now text travelled when the typing run ended.
Editors from before this release keep working in the same room. One loaded earlier sees what
was typed live when the typing run ends, and what it types reaches the others when its own run
ends, as before.
No API change: nothing for a host to call or pass. See "Editing together" in
docs/Collaboration.md.
Known limits
Between an editor from before this release and one typing live, a frame's text still goes by the
last typing run, as it did before: what the live window typed after the older editor last heard
from it is lost when the older editor's run arrives. Reloading the older page ends it.
A table is shared as a whole: two people editing in one table at once, the last one wins for the
whole table.
Typograph developers notes
TYP-919, editor feat/TYP-919-type-together: src/elementsync.ts keeps a text frame's story
as a Y.Text (@text) in its node, fed by canvas's typograph_text_changes and applied to the
others with apply_remote_text(). For editors from before, the node keeps story_data as a copy,
stamped @story_mirror when a live window writes it; an unstamped story_data is an older
editor's typing and is folded into the Y.Text by one live window (the lowest client id that
announces live_text, Collaboration.folds_old_text()). Tests: tests/textsync.test.ts.
Canvas pin: canvas live text (set_text_change_events(), typograph_text_changes,
apply_remote_text()), see canvas docs/collaboration.md, "Text, keystroke by keystroke".