@mocanvas/sync · interface
interface PresenceEditorThe part of the editor presence reads. Declared structurally so that the
sync layer does not need a live Editor (and its WASM engine) to be tested.
Methods · 4
getCamera(): {getCurrentPageId(): stringgetInstanceState(): {getSelectedShapeIds(): readonly string[]Properties · 5
getInstancePresenceId?(): InstancePresenceIdOptional: the id this instance's presence record is published under.
A real Editor has one and it is the identity that matters here — a user
id is per browser, so two tabs of one browser are one user and would
discard each other's presence as their own. Structural stand-ins (tests,
a headless participant) may omit it and fall back to
presenceIdForClient.
readonly inputs: {on?(name: "event", fn: () => void): () => voidOptional: used to sample the cursor, which is not itself a signal.
readonly store: Store<any, any>readonly user: {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.