yjs
npmBidirectional Angular Signal bindings for Yjs CRDT real-time collaborative state.
import { yjsSignal, YjsDocService } from '@angular-helpers/yjs';
const yjs = inject(YjsDocService);
const yMap = yjs.doc.getMap('doc');
const title = yjsSignal(yMap, { key: 'title' });π Signals & State
yjsSignal
Creates a bidirectional Angular WritableSignal synchronized with Yjs CRDT types (Y.Map, Y.Array, Y.Text). Local signal updates transact onto the Yjs document, and remote Yjs transactions automatically update the Angular Signal with zero feedback loops.
injectYjsUndoManager
Creates a reactive Angular adapter for Yjs UndoManager. Exposes canUndo and canRedo read-only Signals to easily bind undo/redo UI buttons in collaborative editors.
injectYjsAwareness
Connects an Angular component or service to a Yjs Awareness protocol instance. Exposes reactive signals for local presence, active remote collaborators, and cursor/state updates.
injectYjsWebsocket
Connects a Y.Doc to a y-websocket server. Exposes status() and isSynced() read-only Signals to track real-time WebSocket connection state.
injectYjsIndexeddb
Persists a Y.Doc to local IndexedDB storage using y-indexeddb. Exposes a synced() Signal to detect when local document hydration is complete.
YjsDocService
Injectable Angular service providing a managed singleton Y.Doc instance with lifecycle management and cleanup helpers.