Whether this window types live: its stories travel keystroke by keystroke.
Merge a version of the template saved outside the room into it (TYP-1140): what the file
changed since the version the room last saved goes into the room, for every window; what the
room changed and the file did not stays. Where both changed one element or spread, the file
wins: that change was saved, the room's not yet. Then the room holds version.
A three-way merge without the base itself: each node keeps a hash of how the saved version
had it (@saved), so any window can merge, not only the one that saved last. False when the
room has no spread list to compare with, or the file has no spread: merged, that would
remove every page.
The room's document was saved as this version: spreads as they were saved (the document's
spreads), or the room's own spread list when the host did not say. Each element and spread
keeps a hash of how the saved version has it, which a merge compares a newer file with.
Optionalspreads: any[]The saved version of the template the room holds: the one it was seeded from, or the last one its writer saved. null when no host told it one.
Resolves once this canvas has everything the shared document holds: at once, or when the drag that holds the others' changes back ends. A merge reaches this window's canvas as any change of the others does, so the host saves after this, or it saves the canvas without it.
Join the shared document, once the provider has synced it. The first editor in an empty room puts the template into it; everyone after brings their spread up to what is in it, which also carries over what the others changed since this window loaded the template.
Two editors seeding at once write the same values — every position is derived from the element's index — so they agree rather than compete.
The spread list as the shared document has it, each spread with its elements, or null; see spread_order().
One spread as the shared document has it, repaired, in the shape diff_spreads() reads.
One local structure step into the shared document, in one transaction: the spreads that came, went or moved, their own changes, then the elements — every removal first.
folds: whether this window is the one that folds an older editor's text into the Y.Text. Only one may, or two windows would insert the same text twice (Collaboration picks it).version: the saved version of the template this window loaded, as the host passed it (the storage's ETag); the room records it when this window seeds it.