@fieldnotes/sync
v0.7.0
Published
Real-time element sync for Field Notes canvas SDK
Downloads
1,627
Maintainers
Readme
@fieldnotes/sync
Real-time element sync for the Field Notes canvas SDK.
This package keeps multiple Field Notes canvases in sync by streaming element changes over a pluggable transport. It is framework-free vanilla TypeScript.
Zero-infra proof: BroadcastChannel
BroadcastChannelTransport syncs canvases across tabs of the same origin with no server, using
the browser's BroadcastChannel
API. It is the reference SyncTransport implementation — open two tabs, edit in one, see it in the
other. The same SyncTransport interface can be backed by WebSocket, WebRTC, or any other channel.
The transport is SSR-safe (degrades to a no-op when no BroadcastChannel is available) and accepts an
injectable BroadcastChannel factory for testing.
Install
pnpm add @fieldnotes/sync @fieldnotes/coreRequires @fieldnotes/core >=0.46.0 (peer dependency).
