import { Bijective, ObservableOption, Predicate, Procedure, Subscription, Terminable } from "@opendaw/lib-std"; import { Addressable } from "@opendaw/lib-box"; import { RootBox, UserInterfaceBox } from "@opendaw/studio-boxes"; import { SelectableVertex } from "./SelectableVertex"; import { FilteredRemoteSelection } from "./FilteredRemoteSelection"; export interface RemoteSelectionListener { onSelected(selectable: T, user: UserInterfaceBox): void; onDeselected(selectable: T, user: UserInterfaceBox): void; } /** * Read only index of every *other* user's selections in a live room. * * Mirrors {@link VertexSelection}'s two layer watch, but once per remote user instead of once for * the followed user, and indexes `(selectable, user)` pairs so that painting can ask synchronously * who else selects a vertex. The followed user is excluded (the local {@link FilteredSelection} * renders it), so with a single user the index stays empty and {@link ownersOf} is a miss against an * empty set. */ export declare class RemoteSelections implements Terminable { #private; constructor(rootBox: RootBox, followed: ObservableOption); ownersOf(vertex: SelectableVertex): ReadonlyArray; forEach(procedure: Procedure<{ selectable: SelectableVertex; user: UserInterfaceBox; }>): void; subscribe(listener: RemoteSelectionListener): Subscription; catchupAndSubscribe(listener: RemoteSelectionListener): Subscription; createFilteredSelection(filter: Predicate, mapping: Bijective): FilteredRemoteSelection; terminate(): void; } //# sourceMappingURL=RemoteSelections.d.ts.map