Interface: CursorStore\<TCursor\>
@roomful/svelte / CursorStore
Interface: CursorStore<TCursor>
Section titled “Interface: CursorStore<TCursor>”Defined in: packages/svelte/src/index.ts:191
Readable cursor store augmented with DOM helpers.
Extends
Section titled “Extends”Readable<CursorPosition<TCursor>[]>
Type Parameters
Section titled “Type Parameters”TCursor
Section titled “TCursor”TCursor extends CursorData = CursorData
The custom cursor payload shape.
Properties
Section titled “Properties”mount:
Action<HTMLElement,undefined>
Defined in: packages/svelte/src/index.ts:197
Svelte action that mounts cursor tracking on an element.
Methods
Section titled “Methods”render()
Section titled “render()”render(
options?):void
Defined in: packages/svelte/src/index.ts:205
Renders remote cursors into the DOM.
Parameters
Section titled “Parameters”options?
Section titled “options?”CursorRenderOptions
Optional cursor rendering overrides.
Returns
Section titled “Returns”void
Nothing.
set(
value):void
Defined in: packages/svelte/src/index.ts:213
Partially updates the local cursor payload.
Parameters
Section titled “Parameters”Partial<CursorPosition<TCursor>>
The partial cursor payload to publish.
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<CursorPosition<TCursor>[]>
subscription callback
invalidate?
Section titled “invalidate?”Invalidator<CursorPosition<TCursor>[]>
cleanup callback
Returns
Section titled “Returns”Unsubscriber
Inherited from
Section titled “Inherited from”Readable.subscribe
unmount()
Section titled “unmount()”unmount():
void
Defined in: packages/svelte/src/index.ts:220
Unmounts cursor tracking and rendering.
Returns
Section titled “Returns”void
Nothing.
update()
Section titled “update()”update(
updater):void
Defined in: packages/svelte/src/index.ts:228
Updates the local cursor payload from the previous value.
Parameters
Section titled “Parameters”updater
Section titled “updater”Updater<Partial<CursorPosition<TCursor>>>
The updater that returns the next partial cursor payload.
Returns
Section titled “Returns”void
Nothing.