UNPKG

@casual-simulation/aux-vm-browser

Version:

A set of utilities required to securely run an AUX in a web browser.

50 lines 1.45 kB
import type { Observable, SubscriptionLike } from 'rxjs'; import type { BotHelper, BotWatcher } from '@casual-simulation/aux-vm'; export type IdeNode = IdeFolderNode | IdeTagNode; export interface IdeFolderNode { type: 'folder'; name: string; key: string; children: IdeNode[]; } export interface IdeTagNode { type: 'tag'; botId: string; tag: string; key: string; name: string; prefix?: string; isScript?: boolean; isFormula?: boolean; } export interface IdePortalUpdate { hasPortal: boolean; items: IdeTagNode[]; } /** * Defines a class that manages the bot panel. */ export declare class IdePortalManager implements SubscriptionLike { private _helper; private _watcher; private _buffer; private _itemsUpdated; private _subs; closed: boolean; /** * Gets an observable that resolves whenever the list of selected bots is updated. */ get itemsUpdated(): Observable<IdePortalUpdate>; get items(): IdePortalUpdate; /** * 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 _findMatchingItems; private _calculateItemsUpdated; } //# sourceMappingURL=IdePortalManager.d.ts.map