@reductoai/pptx/collab lets many writers edit one deck at the same time. Each writer keeps its own copy of the deck. Its edits go to a central sequencer as changes, and the other writers’ changes come back and merge in. Writers merge by shape, property and character, and concurrent slide adds, removes and moves all land.
The parts
Every writer opens the same bytes at the same sequence number. Each writer gets its own id block (1 and up), so two writers never make a shape with the same id. A reader that never edits needs no block.
The loop
apply(command)runs a command and sends its change.remote(change, seq)merges another writer’s change and returns the new view.ack(seq)tells the writer that the server took its change.resend()sends what is not yet acknowledged again, for example after a reconnect.
Without an editor
PptxReplica does the same for a PowerPointPresentation, for example a server-side agent that edits through the facade:
The server orders and rebases changes; it does not open the deck.