@mocanvas/editor · interface

CreatePresenceStateDerivationOpts

interface CreatePresenceStateDerivationOpts

Options for createPresenceStateDerivation, under the documented name.

getUserPresence is the override point: replace it to broadcast something other than the default reading of the store — an agent that has a selection but no cursor, a viewer whose camera should stay private, a host that wants to attach its own meta. Return null to broadcast nothing at all this tick, which is how a client goes quiet without disconnecting.


Properties · 2

getUserPresence?(store: EditorStore, user: PresenceUser): TLPresenceStateInfo | null

Override how presence state is read out of the store.

instanceId?: InstancePresenceId

The id to publish under. Defaults to a fresh one per derivation, which is the right thing: presence is per *instance*, so a second tab belonging to the same person is a second cursor.

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.