import { Injector } from '@angular/core'; import { BaseSchemes, CanAssignSignal, Scope } from 'rete'; import { NgElement, Position, RenderSignal } from './types'; import { RenderPreset } from './presets/types'; declare type Item = { key: string; ngElement: NgElement; }; declare type Renderer = { get(element: HTMLElement): Item | undefined; mount(element: HTMLElement, key: string, component: any, injector: Injector, props: Record): void; update(item: Item, props: Record): void; unmount(element: HTMLElement): void; }; /** * Signals that can be emitted by the plugin * @priority 10 */ export declare type Produces = { type: 'connectionpath'; data: { payload: Schemes['Connection']; path?: string; points: Position[]; }; }; declare type Requires = RenderSignal<'node', { payload: Schemes['Node']; }> | RenderSignal<'connection', { payload: Schemes['Connection']; start?: Position; end?: Position; }> | { type: 'unmount'; data: { element: HTMLElement; }; }; /** * Angular plugin. Renders nodes, connections and other elements using React. * @priority 9 * @emits connectionpath * @listens render * @listens unmount */ export declare class AngularPlugin> extends Scope, [Requires | T]> { private params; presets: RenderPreset[]; renderer: Renderer; owners: WeakMap>; /** * @constructor * @param params Plugin properties * @param params.injector Angular's Injector instance */ constructor(params: { injector: Injector; }); setParent(scope: Scope | T>): void; private unmount; private mount; /** * Adds a preset to the plugin. * @param preset Preset that can render nodes, connections and other elements. */ addPreset(preset: RenderPreset extends true ? K : 'Cannot apply preset. Provided signals are not compatible'>): void; } export {};