import { ConnectionId, NodeId, Root, Scope } from 'rete'; import { BaseArea, BaseAreaPlugin } from 'rete-area-plugin'; import { Area, TransformEventParams } from './area'; import { ConnectionView } from './connection-view'; import { ElementsHolder } from './elements-holder'; import { NodeView } from './node-view'; import { ExpectSchemes, GetRenderTypes, Position } from './types'; export type { Area } from './area'; export * as Area3DExtensions from './extensions'; export type { HybridScene } from './scene'; export type { HybridRenderer } from './scene/HybridRenderer'; export type RenderMeta = { filled?: boolean; }; /** * Signal types produced by Area3DPlugin instance * @priority 10 */ export type Area3D = BaseArea | { type: 'transform'; data: TransformEventParams; } | { type: 'transformed'; data: TransformEventParams; } | { type: 'resized'; data: { event: Event; }; }; export type Area3DInherited = [Area3D | ExtraSignals, Root]; /** * Plugin for embedding node editor into 3D scene. * @priority 9 */ export declare class Area3DPlugin extends BaseAreaPlugin | ExtraSignals> { /** * Area instance, contains nodes, connections and other elements */ area: Area>; nodeViews: Map; connectionViews: Map; elements: ElementsHolder; container: HTMLElement; /** * @param container HTML element to render area in */ constructor(container: HTMLElement); constructor(shared: Area3DPlugin); /** * Share the 3D scene with multiple instances of Area3DPlugin * @returns new instance of Area3DPlugin */ share(): Area3DPlugin; setParent(scope: Scope>): void; private onContextMenu; addNodeView(node: Schemes['Node']): NodeView; removeNodeView(id: NodeId): void; addConnectionView(connection: Schemes['Connection']): ConnectionView; removeConnectionView(id: ConnectionId): void; /** * Translate node to position * @param id Node id * @param position Position */ translate(id: NodeId, { x, y }: Position): Promise; /** * Resize node * @param id Node id * @param width Desired width * @param height Desired height */ resize(id: NodeId, width: number, height: number): Promise; /** * Force update rendered element by id (node, connection, etc.) * @param type Element type * @param id Element id * @emits render */ update(type: GetRenderTypes> | GetRenderTypes, id: string): Promise; /** * Destroy all views and remove all event listeners */ destroy(): void; } //# sourceMappingURL=index.d.ts.map