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 with automatic tab visibility resync and phantom cleanup.

TypeScriptexample.ts
import { injectYjsAwareness } from '@angular-helpers/yjs'

# Properties

FieldTypeDescription
awarenessAwarenessThe Yjs Awareness protocol instance (from y-websocket or custom provider).
initialLocalState?TStateOptional initial presence state for the local user.
options?YjsAwarenessOptionsConfiguration options including clearOnDestroy and autoResyncOnVisibility.
LCP N/A
CLS N/A
INP N/A