Interface: AwarenessStore
@roomful/svelte / AwarenessStore
Interface: AwarenessStore
Section titled “Interface: AwarenessStore”Defined in: packages/svelte/src/index.ts:234
Readable awareness store augmented with write helpers.
Extends
Section titled “Extends”Readable<AwarenessStoreValue>
Methods
Section titled “Methods”set(
value):void
Defined in: packages/svelte/src/index.ts:241
Merges arbitrary awareness metadata into the local peer.
Parameters
Section titled “Parameters”Record<string, unknown>
The awareness fields to merge.
Returns
Section titled “Returns”void
Nothing.
setFocus()
Section titled “setFocus()”setFocus(
elementId):void
Defined in: packages/svelte/src/index.ts:249
Updates the local focus target.
Parameters
Section titled “Parameters”elementId
Section titled “elementId”The focused element identifier, or null to clear it.
string | null
Returns
Section titled “Returns”void
Nothing.
setSelection()
Section titled “setSelection()”setSelection(
selection):void
Defined in: packages/svelte/src/index.ts:257
Updates the local selection.
Parameters
Section titled “Parameters”selection
Section titled “selection”The active selection, or null to clear it.
AwarenessSelection | null
Returns
Section titled “Returns”void
Nothing.
setTyping()
Section titled “setTyping()”setTyping(
isTyping):void
Defined in: packages/svelte/src/index.ts:265
Updates the local typing state.
Parameters
Section titled “Parameters”isTyping
Section titled “isTyping”boolean
Whether the local peer is currently typing.
Returns
Section titled “Returns”void
Nothing.
subscribe()
Section titled “subscribe()”subscribe(
this,run,invalidate?):Unsubscriber
Defined in: node_modules/.pnpm/svelte@4.2.20/node_modules/svelte/types/index.d.ts:1619
Subscribe on value changes.
Parameters
Section titled “Parameters”void
Subscriber<AwarenessStoreValue>
subscription callback
invalidate?
Section titled “invalidate?”Invalidator<AwarenessStoreValue>
cleanup callback
Returns
Section titled “Returns”Unsubscriber
Inherited from
Section titled “Inherited from”Readable.subscribe
update()
Section titled “update()”update(
updater):void
Defined in: packages/svelte/src/index.ts:273
Updates awareness fields from the previous value.
Parameters
Section titled “Parameters”updater
Section titled “updater”Updater<Record<string, unknown>>
The updater that returns the next awareness patch.
Returns
Section titled “Returns”void
Nothing.