@casual-simulation/aux-vm-browser
Version:
A set of utilities required to securely run an AUX in a web browser.
36 lines • 1.2 kB
TypeScript
import type { Observable, SubscriptionLike } from 'rxjs';
import type { BotHelper, BotWatcher } from '@casual-simulation/aux-vm';
import type { PrecalculatedBot } from '@casual-simulation/aux-common';
/**
* Defines a class that manages the bot panel.
*/
export declare class BotPanelManager implements SubscriptionLike {
private _helper;
private _watcher;
private _buffer;
private _botsUpdated;
private _subs;
closed: boolean;
get state(): BotsUpdatedEvent;
/**
* Gets an observable that resolves whenever the list of selected bots is updated.
*/
get botsUpdated(): Observable<BotsUpdatedEvent>;
/**
* Creates a new bot panel manager.
* @param watcher The bot watcher to use.
* @param helper The bot helper to use.
* @param bufferEvents Whether to buffer the update events.
*/
constructor(watcher: BotWatcher, helper: BotHelper, bufferEvents?: boolean);
unsubscribe(): void;
private _calculateBotsUpdated;
}
export interface BotsUpdatedEvent {
bots: PrecalculatedBot[];
dimension: string;
hasPortal: boolean;
isDiff: boolean;
isSingleBot: boolean;
}
//# sourceMappingURL=BotPanelManager.d.ts.map