Skip to content

Interface: FieldPresenceEngine

@roomful/vue


@roomful/vue / FieldPresenceEngine

Defined in: core/dist/types.d.ts:1251

A field-oriented view of the awareness channel: which remote peers are active on which field right now. setActiveField declares the local peer’s field (e.g. on focus); the reads answer “who else is here”. Rides the awareness transport, so no relay change is needed. Purpose-built for collaborative forms, tables, and admin records. See docs/reference/engines-field-presence.md.

getActiveFields(): FieldPresenceState[]

Defined in: core/dist/types.d.ts:1271

Returns every field with at least one remote peer, ordered by field id.

FieldPresenceState[]

The active fields.


getFieldPeers(fieldId): Peer<PresenceData>[]

Defined in: core/dist/types.d.ts:1265

Returns the remote peers currently active on a field.

string

The field to query.

Peer<PresenceData>[]

The remote peers on the field (empty when none).


setActiveField(fieldId): void

Defined in: core/dist/types.d.ts:1258

Declares the field the local peer is active on, or null to clear it (e.g. on blur).

The active field id, or null.

string | null

void

Nothing.


subscribe(callback): Unsubscribe

Defined in: core/dist/types.d.ts:1278

Subscribes to field-presence changes. Fires immediately with the current fields.

(fields) => void

Invoked with the active fields on every change.

Unsubscribe

A function that removes the listener.