import { ISelectionOptions, Network, NodeId } from './network'; import { IEventSelectionChanged } from './events'; import { ILayoutProvider } from './layout'; import { IRectOptions } from './ui'; /** * Represents an instance of the Mycelium viewer. */ export interface INetworkViewerOptions { width: number; height: number; showBreadcrumbs: boolean; showResetView: boolean; watermark: boolean; minimap: boolean; /** * Allows to customize the layout algorithm. This API is still experimental and might be subject to changes in the future. * @experimental * @typeParam @internal ILayoutProvider */ layoutProvider: ILayoutProvider; autoResize: boolean; multiSelection: boolean; } export declare class NetworkViewer { private readonly app; private readonly options; private readonly decorations; private constructor(); /** * Creates an instance of the Mycelium viewer and attaches it to the DOM. */ static create(network: Network, domElement: HTMLElement, options?: Partial): NetworkViewer; onSelectionDidChange(listener: (event: IEventSelectionChanged) => void): void; setSelection(nodeId: NodeId, option?: Partial): Promise; setSelections(nodeIds: Array, option?: Partial): Promise; collapseAll(): Promise; clearSelections(): Promise; /** Changes the view so that `target` is in the center. * @param target The `NodeId` of the node that the viewer will focus on. * If `target` is undefined, the view will be reset to show the entire graph. */ setFocus(target: NodeId | Array, transition?: boolean): Promise; resetFocus(transition?: boolean): Promise; setDecoration(nodeId: NodeId, decoration: Partial): void; removeDecoration(nodeId: NodeId): void; clearDecorations(): void; setNetwork(network: Network): void; getOptions(): INetworkViewerOptions; }