Active users in the whiteboard
Broadcast a whiteboard update
Whether connected to room
Persistent audit-log buffer. Append-only across the hook's
lifetime; capped to auditLogCap (default 10K) with a
truncation sentinel. Reset on fileId change and on the initial
mount of a freshly-loaded file (via initialEvents).
Read the current audit log without subscribing to state updates.
Used by useWhiteboardFile.saveFile to roll the latest events
into the persisted file without depending on a stale closure.
Returns true while a snapshot or STATE_REPLACED payload is
being applied to the canvas. The Whiteboard component reads this
to skip debounced undo-stack pushes during snapshot enliven —
Fabric's per-object object:added events fire from inside the
load and would otherwise capture partial-snapshot states as undo
entries. Stable identity (does not change between renders).
Returns the ms timestamp of the most recent remote message
applied to the canvas, or 0 if none. Consumed by
useWhiteboardFile's autosave guard so a save can't snapshot a
canvas that's mid-application of a peer's update.
Whether the current user is the owner
Whether owner is present (for non-owners)
Whether in read-only mode
Request full state from owner
Send full state to a specific user
Seed the audit log from a loaded / snapshot-received source. Replaces the current log atomically. Used by the file-load path and the late-joiner snapshot-apply path.
Mark a load in progress. Mirrors setSuppressBroadcast and is
read by broadcastUpdate to drop any in-flight events while the
canvas is being torn down + rebuilt.
Pause local broadcasts. Used by the file-load and snapshot-apply paths so canvas mutations from the load don't get re-broadcast.
Throttled version of broadcastUpdate for high-frequency events. Limits broadcasts to once per broadcastThrottleInterval (default 50ms = 20 updates/sec). Includes a cancel() method to cancel pending broadcasts.
Sync hook return type