API for rete-angular-plugin package - Rete.js

API for rete-angular-plugin package

Produces

src/core.ts

Signals that can be emitted by the plugin

ts
type Produces<Schemes extends BaseSchemes> = {
  data: Object;
  type: "connectionpath";
};
ParameterExtendsDescription
SchemesBaseSchemes

AngularPlugin

src/core.ts

Angular plugin. Renders nodes, connections and other elements using React.

ts
class AngularPlugin<Schemes extends BaseSchemes, T extends unknown>
ParameterExtendsDescription
SchemesBaseSchemes
Tunknown

Extends Scope<Produces, Requires | T>

Emits connectionpath

Listens render unmount

constructor

src/core.ts

ts
constructor(params: { injector: Injector }): AngularPlugin<Schemes, T>
ParameterTypeDescription
params{ injector: Injector }Plugin properties

Returns AngularPlugin<Schemes, T>

addPreset

src/core.ts

Adds a preset to the plugin.

ts
addPreset(preset: RenderPreset<Schemes, CanAssignEachTupleElemmentToAnyOf<T, UnionToTuple<K>> extends true ? K : "Cannot apply preset. Provided signals are not compatible">): void
ParameterTypeDescription
presetRenderPreset<Schemes, CanAssignEachTupleElemmentToAnyOf<T, UnionToTuple<K>> extends true ? K : "Cannot apply preset. Provided signals are not compatible">Preset that can render nodes, connections and other elements.

Returns void

Presets

src/presets/index.ts

Built-in presets, responsible for rendering different parts of the editor.

classic

src/presets/classic/index.ts

setup

src/presets/classic/index.ts

Classic preset for rendering nodes, connections, controls and sockets.

ts
setup(props: ClassicProps<Schemes, K>): RenderPreset<Schemes, K>
ParameterTypeDescription
propsClassicProps<Schemes, K>

Returns RenderPreset<Schemes, K>

contextMenu

src/presets/context-menu/index.ts

setup

src/presets/context-menu/index.ts

Preset for rendering context menu.

ts
setup(props: { delay: number }): RenderPreset<Schemes, K>
ParameterTypeDescription
props{ delay: number }

Returns RenderPreset<Schemes, K>

minimap

src/presets/minimap/index.ts

setup

src/presets/minimap/index.ts

Preset for rendering minimap.

ts
setup(props: { size: number }): RenderPreset<Schemes, K>
ParameterTypeDescription
props{ size: number }

Returns RenderPreset<Schemes, K>

reroute

src/presets/reroute/index.ts

setup

src/presets/reroute/index.ts

Preset for rendering pins.

ts
setup(props: Props): RenderPreset<Schemes, K>
ParameterTypeDescription
propsProps

Returns RenderPreset<Schemes, K>