@mocanvas/editor · function
declare function getDefaultUserPresence(store: EditorStore, user: PresenceUser): TLPresenceStateInfo | nullRead this client's presence state out of the store: the default CreatePresenceStateDerivationOpts.getUserPresence.
Exported so a host that only wants to *adjust* the default — blank the
cursor, add some meta — can call it and edit the result, rather than
reimplementing the store reads and drifting out of step with them.
Returns null before the store has an instance record, i.e. before the
editor has finished starting up: there is nothing meaningful to broadcast
about a client that is not looking at anything yet.
Mentioned here
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.