Skip to main content

Libraries

  • @veltdev/crdt
  • @veltdev/crdt-react
5.0.0-beta.1
March 12, 2026

New Features

  • [Core]: Added six methods on CrdtElement implementing a unified message stream for Yjs-backed collaborative editors. The stream carries both sync and awareness messages over a single channel per document, with encryption at rest, ordered serialization, and automatic pruning after snapshot checkpoints.
The six new methods are:
  • pushMessage(query) — push a lib0-encoded sync or awareness message to the stream
  • onMessage(query) — subscribe to real-time messages; returns an unsubscribe function
  • getMessages(query) — fetch all messages after a given timestamp (one-time read for replay)
  • getSnapshot(query) — retrieve the latest full-state snapshot as a baseline for replay
  • saveSnapshot(query) — checkpoint the current Y.Doc state and vector clock
  • pruneMessages(query) — remove messages older than a given timestamp to keep storage bounded