@knotx/core 0.2.14 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/definition.d.cts +1 -1
- package/dist/definition.d.mts +1 -1
- package/dist/definition.d.ts +1 -1
- package/dist/index.cjs +57 -29
- package/dist/index.d.cts +6 -163
- package/dist/index.d.mts +6 -163
- package/dist/index.d.ts +6 -163
- package/dist/index.js +57 -29
- package/dist/shared/core.CpyG0nWq.d.cts +323 -0
- package/dist/shared/core.CpyG0nWq.d.mts +323 -0
- package/dist/shared/core.CpyG0nWq.d.ts +323 -0
- package/package.json +6 -6
- package/dist/shared/core.B-u2ysAC.d.cts +0 -148
- package/dist/shared/core.B-u2ysAC.d.mts +0 -148
- package/dist/shared/core.B-u2ysAC.d.ts +0 -148
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'jsonschema';
|
|
2
|
-
import { SubscriptionLike, BehaviorSubject } from 'rxjs';
|
|
3
|
-
import { DataOperationPipe, DataOperation } from '@knotx/data';
|
|
4
|
-
|
|
5
|
-
declare abstract class BasePlugin<TPluginName extends string = string, TPluginConfig extends IRecord | undefined = undefined, TRenderType extends RenderType = RenderType> implements IPlugin<TPluginName, TPluginConfig, TRenderType> {
|
|
6
|
-
abstract name: TPluginName;
|
|
7
|
-
constructor(__: TPluginConfig);
|
|
8
|
-
private static _instanceId;
|
|
9
|
-
private _instanceId;
|
|
10
|
-
get pluginId(): string;
|
|
11
|
-
/**
|
|
12
|
-
* 插件生命周期中的订阅回调
|
|
13
|
-
* 可随时存入,销毁时会自动执行
|
|
14
|
-
*/
|
|
15
|
-
protected subscriptions: (SubscriptionLike | (() => void))[];
|
|
16
|
-
onDestroy(): void;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
type HorizontalAlignment = 'left' | 'right';
|
|
20
|
-
type VerticalAlignment = 'top' | 'bottom';
|
|
21
|
-
type IRecord = Record<string, any>;
|
|
22
|
-
interface NodePosition {
|
|
23
|
-
x: number;
|
|
24
|
-
y: number;
|
|
25
|
-
}
|
|
26
|
-
interface NodeMeasured {
|
|
27
|
-
width: number;
|
|
28
|
-
height: number;
|
|
29
|
-
}
|
|
30
|
-
interface Node<TData extends IRecord = IRecord> {
|
|
31
|
-
id: string;
|
|
32
|
-
type?: string;
|
|
33
|
-
position: NodePosition;
|
|
34
|
-
measured?: NodeMeasured;
|
|
35
|
-
data: TData;
|
|
36
|
-
}
|
|
37
|
-
interface NodeProps<TData extends IRecord = IRecord> {
|
|
38
|
-
node: Node<TData>;
|
|
39
|
-
}
|
|
40
|
-
interface Edge<TData extends IRecord = IRecord> {
|
|
41
|
-
id: string;
|
|
42
|
-
source: string;
|
|
43
|
-
target: string;
|
|
44
|
-
type?: string;
|
|
45
|
-
data?: TData;
|
|
46
|
-
}
|
|
47
|
-
interface EdgeProps<TData extends IRecord = IRecord> {
|
|
48
|
-
edge: Edge<TData>;
|
|
49
|
-
sourceX: number;
|
|
50
|
-
sourceY: number;
|
|
51
|
-
targetX: number;
|
|
52
|
-
targetY: number;
|
|
53
|
-
}
|
|
54
|
-
interface Container {
|
|
55
|
-
width: number;
|
|
56
|
-
height: number;
|
|
57
|
-
}
|
|
58
|
-
type Position = 'top' | 'right' | 'bottom' | 'left';
|
|
59
|
-
type RenderType = (...args: any[]) => any;
|
|
60
|
-
type NodeRenderType<TD extends IRecord = any, TR = any> = (props: NodeProps<TD>) => TR;
|
|
61
|
-
type EdgeRenderType<TD extends IRecord = any, TR = any> = (props: EdgeProps<TD>) => TR;
|
|
62
|
-
declare enum Layer {
|
|
63
|
-
Canvas = 0,
|
|
64
|
-
Background = 4,
|
|
65
|
-
Edges = 16,
|
|
66
|
-
Nodes = 64,
|
|
67
|
-
Foreground = 256
|
|
68
|
-
}
|
|
69
|
-
interface LayerComponent<TRenderType> {
|
|
70
|
-
plugin: string;
|
|
71
|
-
name: string;
|
|
72
|
-
layer: Layer;
|
|
73
|
-
render: TRenderType;
|
|
74
|
-
/**
|
|
75
|
-
* 层级偏移量
|
|
76
|
-
* @default 0
|
|
77
|
-
* (layer >> 1, layer << 1]
|
|
78
|
-
*/
|
|
79
|
-
offset?: number;
|
|
80
|
-
}
|
|
81
|
-
interface IPlugin<TPluginName extends string = string, TPluginConfig extends IRecord | undefined = any, TRenderType extends RenderType = RenderType> {
|
|
82
|
-
name: TPluginName;
|
|
83
|
-
pluginId: string;
|
|
84
|
-
description?: string;
|
|
85
|
-
onInit?: (config: TPluginConfig) => void;
|
|
86
|
-
onConfigChange?: (config: TPluginConfig) => void;
|
|
87
|
-
onDestroy?: () => void;
|
|
88
|
-
render?: (...args: Parameters<TRenderType>) => ReturnType<TRenderType>;
|
|
89
|
-
}
|
|
90
|
-
type Plugin<TName extends string = string, TConfig extends IRecord | undefined = any, TRenderType extends RenderType = RenderType> = new (__: TConfig) => BasePlugin<TName, TConfig, TRenderType>;
|
|
91
|
-
type PluginConfigs<TPlugins extends Plugin[]> = ((TPlugins[number] extends Plugin<infer T> ? {
|
|
92
|
-
[TName in T as Extract<TPlugins[number], Plugin<TName>> extends Plugin<TName, undefined> ? never : TName]: Extract<TPlugins[number], Plugin<TName>> extends infer T ? T extends Plugin<TName, infer TConfig> ? TConfig : never : never;
|
|
93
|
-
} : {}));
|
|
94
|
-
/**
|
|
95
|
-
* plugin data host
|
|
96
|
-
* @example
|
|
97
|
-
* `declare module '@knotx/core' {
|
|
98
|
-
* interface PluginData {
|
|
99
|
-
* pluginName: {
|
|
100
|
-
* property: any
|
|
101
|
-
* }
|
|
102
|
-
* }
|
|
103
|
-
* }`
|
|
104
|
-
*/
|
|
105
|
-
interface PluginData {
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* plugin tools host
|
|
109
|
-
* @example
|
|
110
|
-
* `declare module '@knotx/core' {
|
|
111
|
-
* interface PluginTools {
|
|
112
|
-
* pluginName: {
|
|
113
|
-
* toolName: (params: any) => any
|
|
114
|
-
* }
|
|
115
|
-
* }
|
|
116
|
-
* }`
|
|
117
|
-
*/
|
|
118
|
-
interface PluginTools {
|
|
119
|
-
}
|
|
120
|
-
interface EngineTools {
|
|
121
|
-
}
|
|
122
|
-
interface IPluginInfo {
|
|
123
|
-
name: string;
|
|
124
|
-
description?: string;
|
|
125
|
-
}
|
|
126
|
-
interface IPluginToolInfo {
|
|
127
|
-
type: 'function';
|
|
128
|
-
name: string;
|
|
129
|
-
description: string;
|
|
130
|
-
parameters: Schema;
|
|
131
|
-
}
|
|
132
|
-
type NodeOperationPipe<T extends IRecord = any> = DataOperationPipe<Node<T>>;
|
|
133
|
-
type EdgeOperationPipe<T extends IRecord = any> = DataOperationPipe<Edge<T>>;
|
|
134
|
-
type NodeOperation<T extends IRecord = any> = DataOperation<Node<T>>;
|
|
135
|
-
type EdgeOperation<T extends IRecord = any> = DataOperation<Edge<T>>;
|
|
136
|
-
type NodeOperatorFunction<T extends IRecord = any, TArgs extends any[] = any[]> = (...args: TArgs) => NodeOperation<T>[];
|
|
137
|
-
type EdgeOperatorFunction<T extends IRecord = any, TArgs extends any[] = any[]> = (...args: TArgs) => EdgeOperation<T>[];
|
|
138
|
-
interface IEngineRuntime {
|
|
139
|
-
render?: {
|
|
140
|
-
getValue: <T, R = T>(value: BehaviorSubject<T> | T, options: {
|
|
141
|
-
paths: string[];
|
|
142
|
-
selector?: (value: T, context?: any) => R;
|
|
143
|
-
context?: any;
|
|
144
|
-
}) => T | R;
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
export { BasePlugin as B, type Container as C, type Edge as E, type HorizontalAlignment as H, type IRecord as I, type LayerComponent as L, type Node as N, type Plugin as P, type RenderType as R, type VerticalAlignment as V, type IEngineRuntime as a, type IPlugin as b, Layer as c, type NodeRenderType as d, type EdgeRenderType as e, type PluginData as f, type PluginTools as g, type EngineTools as h, type IPluginInfo as i, type IPluginToolInfo as j, type NodePosition as k, type NodeMeasured as l, type NodeProps as m, type EdgeProps as n, type Position as o, type PluginConfigs as p, type NodeOperationPipe as q, type EdgeOperationPipe as r, type NodeOperation as s, type EdgeOperation as t, type NodeOperatorFunction as u, type EdgeOperatorFunction as v };
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'jsonschema';
|
|
2
|
-
import { SubscriptionLike, BehaviorSubject } from 'rxjs';
|
|
3
|
-
import { DataOperationPipe, DataOperation } from '@knotx/data';
|
|
4
|
-
|
|
5
|
-
declare abstract class BasePlugin<TPluginName extends string = string, TPluginConfig extends IRecord | undefined = undefined, TRenderType extends RenderType = RenderType> implements IPlugin<TPluginName, TPluginConfig, TRenderType> {
|
|
6
|
-
abstract name: TPluginName;
|
|
7
|
-
constructor(__: TPluginConfig);
|
|
8
|
-
private static _instanceId;
|
|
9
|
-
private _instanceId;
|
|
10
|
-
get pluginId(): string;
|
|
11
|
-
/**
|
|
12
|
-
* 插件生命周期中的订阅回调
|
|
13
|
-
* 可随时存入,销毁时会自动执行
|
|
14
|
-
*/
|
|
15
|
-
protected subscriptions: (SubscriptionLike | (() => void))[];
|
|
16
|
-
onDestroy(): void;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
type HorizontalAlignment = 'left' | 'right';
|
|
20
|
-
type VerticalAlignment = 'top' | 'bottom';
|
|
21
|
-
type IRecord = Record<string, any>;
|
|
22
|
-
interface NodePosition {
|
|
23
|
-
x: number;
|
|
24
|
-
y: number;
|
|
25
|
-
}
|
|
26
|
-
interface NodeMeasured {
|
|
27
|
-
width: number;
|
|
28
|
-
height: number;
|
|
29
|
-
}
|
|
30
|
-
interface Node<TData extends IRecord = IRecord> {
|
|
31
|
-
id: string;
|
|
32
|
-
type?: string;
|
|
33
|
-
position: NodePosition;
|
|
34
|
-
measured?: NodeMeasured;
|
|
35
|
-
data: TData;
|
|
36
|
-
}
|
|
37
|
-
interface NodeProps<TData extends IRecord = IRecord> {
|
|
38
|
-
node: Node<TData>;
|
|
39
|
-
}
|
|
40
|
-
interface Edge<TData extends IRecord = IRecord> {
|
|
41
|
-
id: string;
|
|
42
|
-
source: string;
|
|
43
|
-
target: string;
|
|
44
|
-
type?: string;
|
|
45
|
-
data?: TData;
|
|
46
|
-
}
|
|
47
|
-
interface EdgeProps<TData extends IRecord = IRecord> {
|
|
48
|
-
edge: Edge<TData>;
|
|
49
|
-
sourceX: number;
|
|
50
|
-
sourceY: number;
|
|
51
|
-
targetX: number;
|
|
52
|
-
targetY: number;
|
|
53
|
-
}
|
|
54
|
-
interface Container {
|
|
55
|
-
width: number;
|
|
56
|
-
height: number;
|
|
57
|
-
}
|
|
58
|
-
type Position = 'top' | 'right' | 'bottom' | 'left';
|
|
59
|
-
type RenderType = (...args: any[]) => any;
|
|
60
|
-
type NodeRenderType<TD extends IRecord = any, TR = any> = (props: NodeProps<TD>) => TR;
|
|
61
|
-
type EdgeRenderType<TD extends IRecord = any, TR = any> = (props: EdgeProps<TD>) => TR;
|
|
62
|
-
declare enum Layer {
|
|
63
|
-
Canvas = 0,
|
|
64
|
-
Background = 4,
|
|
65
|
-
Edges = 16,
|
|
66
|
-
Nodes = 64,
|
|
67
|
-
Foreground = 256
|
|
68
|
-
}
|
|
69
|
-
interface LayerComponent<TRenderType> {
|
|
70
|
-
plugin: string;
|
|
71
|
-
name: string;
|
|
72
|
-
layer: Layer;
|
|
73
|
-
render: TRenderType;
|
|
74
|
-
/**
|
|
75
|
-
* 层级偏移量
|
|
76
|
-
* @default 0
|
|
77
|
-
* (layer >> 1, layer << 1]
|
|
78
|
-
*/
|
|
79
|
-
offset?: number;
|
|
80
|
-
}
|
|
81
|
-
interface IPlugin<TPluginName extends string = string, TPluginConfig extends IRecord | undefined = any, TRenderType extends RenderType = RenderType> {
|
|
82
|
-
name: TPluginName;
|
|
83
|
-
pluginId: string;
|
|
84
|
-
description?: string;
|
|
85
|
-
onInit?: (config: TPluginConfig) => void;
|
|
86
|
-
onConfigChange?: (config: TPluginConfig) => void;
|
|
87
|
-
onDestroy?: () => void;
|
|
88
|
-
render?: (...args: Parameters<TRenderType>) => ReturnType<TRenderType>;
|
|
89
|
-
}
|
|
90
|
-
type Plugin<TName extends string = string, TConfig extends IRecord | undefined = any, TRenderType extends RenderType = RenderType> = new (__: TConfig) => BasePlugin<TName, TConfig, TRenderType>;
|
|
91
|
-
type PluginConfigs<TPlugins extends Plugin[]> = ((TPlugins[number] extends Plugin<infer T> ? {
|
|
92
|
-
[TName in T as Extract<TPlugins[number], Plugin<TName>> extends Plugin<TName, undefined> ? never : TName]: Extract<TPlugins[number], Plugin<TName>> extends infer T ? T extends Plugin<TName, infer TConfig> ? TConfig : never : never;
|
|
93
|
-
} : {}));
|
|
94
|
-
/**
|
|
95
|
-
* plugin data host
|
|
96
|
-
* @example
|
|
97
|
-
* `declare module '@knotx/core' {
|
|
98
|
-
* interface PluginData {
|
|
99
|
-
* pluginName: {
|
|
100
|
-
* property: any
|
|
101
|
-
* }
|
|
102
|
-
* }
|
|
103
|
-
* }`
|
|
104
|
-
*/
|
|
105
|
-
interface PluginData {
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* plugin tools host
|
|
109
|
-
* @example
|
|
110
|
-
* `declare module '@knotx/core' {
|
|
111
|
-
* interface PluginTools {
|
|
112
|
-
* pluginName: {
|
|
113
|
-
* toolName: (params: any) => any
|
|
114
|
-
* }
|
|
115
|
-
* }
|
|
116
|
-
* }`
|
|
117
|
-
*/
|
|
118
|
-
interface PluginTools {
|
|
119
|
-
}
|
|
120
|
-
interface EngineTools {
|
|
121
|
-
}
|
|
122
|
-
interface IPluginInfo {
|
|
123
|
-
name: string;
|
|
124
|
-
description?: string;
|
|
125
|
-
}
|
|
126
|
-
interface IPluginToolInfo {
|
|
127
|
-
type: 'function';
|
|
128
|
-
name: string;
|
|
129
|
-
description: string;
|
|
130
|
-
parameters: Schema;
|
|
131
|
-
}
|
|
132
|
-
type NodeOperationPipe<T extends IRecord = any> = DataOperationPipe<Node<T>>;
|
|
133
|
-
type EdgeOperationPipe<T extends IRecord = any> = DataOperationPipe<Edge<T>>;
|
|
134
|
-
type NodeOperation<T extends IRecord = any> = DataOperation<Node<T>>;
|
|
135
|
-
type EdgeOperation<T extends IRecord = any> = DataOperation<Edge<T>>;
|
|
136
|
-
type NodeOperatorFunction<T extends IRecord = any, TArgs extends any[] = any[]> = (...args: TArgs) => NodeOperation<T>[];
|
|
137
|
-
type EdgeOperatorFunction<T extends IRecord = any, TArgs extends any[] = any[]> = (...args: TArgs) => EdgeOperation<T>[];
|
|
138
|
-
interface IEngineRuntime {
|
|
139
|
-
render?: {
|
|
140
|
-
getValue: <T, R = T>(value: BehaviorSubject<T> | T, options: {
|
|
141
|
-
paths: string[];
|
|
142
|
-
selector?: (value: T, context?: any) => R;
|
|
143
|
-
context?: any;
|
|
144
|
-
}) => T | R;
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
export { BasePlugin as B, type Container as C, type Edge as E, type HorizontalAlignment as H, type IRecord as I, type LayerComponent as L, type Node as N, type Plugin as P, type RenderType as R, type VerticalAlignment as V, type IEngineRuntime as a, type IPlugin as b, Layer as c, type NodeRenderType as d, type EdgeRenderType as e, type PluginData as f, type PluginTools as g, type EngineTools as h, type IPluginInfo as i, type IPluginToolInfo as j, type NodePosition as k, type NodeMeasured as l, type NodeProps as m, type EdgeProps as n, type Position as o, type PluginConfigs as p, type NodeOperationPipe as q, type EdgeOperationPipe as r, type NodeOperation as s, type EdgeOperation as t, type NodeOperatorFunction as u, type EdgeOperatorFunction as v };
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'jsonschema';
|
|
2
|
-
import { SubscriptionLike, BehaviorSubject } from 'rxjs';
|
|
3
|
-
import { DataOperationPipe, DataOperation } from '@knotx/data';
|
|
4
|
-
|
|
5
|
-
declare abstract class BasePlugin<TPluginName extends string = string, TPluginConfig extends IRecord | undefined = undefined, TRenderType extends RenderType = RenderType> implements IPlugin<TPluginName, TPluginConfig, TRenderType> {
|
|
6
|
-
abstract name: TPluginName;
|
|
7
|
-
constructor(__: TPluginConfig);
|
|
8
|
-
private static _instanceId;
|
|
9
|
-
private _instanceId;
|
|
10
|
-
get pluginId(): string;
|
|
11
|
-
/**
|
|
12
|
-
* 插件生命周期中的订阅回调
|
|
13
|
-
* 可随时存入,销毁时会自动执行
|
|
14
|
-
*/
|
|
15
|
-
protected subscriptions: (SubscriptionLike | (() => void))[];
|
|
16
|
-
onDestroy(): void;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
type HorizontalAlignment = 'left' | 'right';
|
|
20
|
-
type VerticalAlignment = 'top' | 'bottom';
|
|
21
|
-
type IRecord = Record<string, any>;
|
|
22
|
-
interface NodePosition {
|
|
23
|
-
x: number;
|
|
24
|
-
y: number;
|
|
25
|
-
}
|
|
26
|
-
interface NodeMeasured {
|
|
27
|
-
width: number;
|
|
28
|
-
height: number;
|
|
29
|
-
}
|
|
30
|
-
interface Node<TData extends IRecord = IRecord> {
|
|
31
|
-
id: string;
|
|
32
|
-
type?: string;
|
|
33
|
-
position: NodePosition;
|
|
34
|
-
measured?: NodeMeasured;
|
|
35
|
-
data: TData;
|
|
36
|
-
}
|
|
37
|
-
interface NodeProps<TData extends IRecord = IRecord> {
|
|
38
|
-
node: Node<TData>;
|
|
39
|
-
}
|
|
40
|
-
interface Edge<TData extends IRecord = IRecord> {
|
|
41
|
-
id: string;
|
|
42
|
-
source: string;
|
|
43
|
-
target: string;
|
|
44
|
-
type?: string;
|
|
45
|
-
data?: TData;
|
|
46
|
-
}
|
|
47
|
-
interface EdgeProps<TData extends IRecord = IRecord> {
|
|
48
|
-
edge: Edge<TData>;
|
|
49
|
-
sourceX: number;
|
|
50
|
-
sourceY: number;
|
|
51
|
-
targetX: number;
|
|
52
|
-
targetY: number;
|
|
53
|
-
}
|
|
54
|
-
interface Container {
|
|
55
|
-
width: number;
|
|
56
|
-
height: number;
|
|
57
|
-
}
|
|
58
|
-
type Position = 'top' | 'right' | 'bottom' | 'left';
|
|
59
|
-
type RenderType = (...args: any[]) => any;
|
|
60
|
-
type NodeRenderType<TD extends IRecord = any, TR = any> = (props: NodeProps<TD>) => TR;
|
|
61
|
-
type EdgeRenderType<TD extends IRecord = any, TR = any> = (props: EdgeProps<TD>) => TR;
|
|
62
|
-
declare enum Layer {
|
|
63
|
-
Canvas = 0,
|
|
64
|
-
Background = 4,
|
|
65
|
-
Edges = 16,
|
|
66
|
-
Nodes = 64,
|
|
67
|
-
Foreground = 256
|
|
68
|
-
}
|
|
69
|
-
interface LayerComponent<TRenderType> {
|
|
70
|
-
plugin: string;
|
|
71
|
-
name: string;
|
|
72
|
-
layer: Layer;
|
|
73
|
-
render: TRenderType;
|
|
74
|
-
/**
|
|
75
|
-
* 层级偏移量
|
|
76
|
-
* @default 0
|
|
77
|
-
* (layer >> 1, layer << 1]
|
|
78
|
-
*/
|
|
79
|
-
offset?: number;
|
|
80
|
-
}
|
|
81
|
-
interface IPlugin<TPluginName extends string = string, TPluginConfig extends IRecord | undefined = any, TRenderType extends RenderType = RenderType> {
|
|
82
|
-
name: TPluginName;
|
|
83
|
-
pluginId: string;
|
|
84
|
-
description?: string;
|
|
85
|
-
onInit?: (config: TPluginConfig) => void;
|
|
86
|
-
onConfigChange?: (config: TPluginConfig) => void;
|
|
87
|
-
onDestroy?: () => void;
|
|
88
|
-
render?: (...args: Parameters<TRenderType>) => ReturnType<TRenderType>;
|
|
89
|
-
}
|
|
90
|
-
type Plugin<TName extends string = string, TConfig extends IRecord | undefined = any, TRenderType extends RenderType = RenderType> = new (__: TConfig) => BasePlugin<TName, TConfig, TRenderType>;
|
|
91
|
-
type PluginConfigs<TPlugins extends Plugin[]> = ((TPlugins[number] extends Plugin<infer T> ? {
|
|
92
|
-
[TName in T as Extract<TPlugins[number], Plugin<TName>> extends Plugin<TName, undefined> ? never : TName]: Extract<TPlugins[number], Plugin<TName>> extends infer T ? T extends Plugin<TName, infer TConfig> ? TConfig : never : never;
|
|
93
|
-
} : {}));
|
|
94
|
-
/**
|
|
95
|
-
* plugin data host
|
|
96
|
-
* @example
|
|
97
|
-
* `declare module '@knotx/core' {
|
|
98
|
-
* interface PluginData {
|
|
99
|
-
* pluginName: {
|
|
100
|
-
* property: any
|
|
101
|
-
* }
|
|
102
|
-
* }
|
|
103
|
-
* }`
|
|
104
|
-
*/
|
|
105
|
-
interface PluginData {
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* plugin tools host
|
|
109
|
-
* @example
|
|
110
|
-
* `declare module '@knotx/core' {
|
|
111
|
-
* interface PluginTools {
|
|
112
|
-
* pluginName: {
|
|
113
|
-
* toolName: (params: any) => any
|
|
114
|
-
* }
|
|
115
|
-
* }
|
|
116
|
-
* }`
|
|
117
|
-
*/
|
|
118
|
-
interface PluginTools {
|
|
119
|
-
}
|
|
120
|
-
interface EngineTools {
|
|
121
|
-
}
|
|
122
|
-
interface IPluginInfo {
|
|
123
|
-
name: string;
|
|
124
|
-
description?: string;
|
|
125
|
-
}
|
|
126
|
-
interface IPluginToolInfo {
|
|
127
|
-
type: 'function';
|
|
128
|
-
name: string;
|
|
129
|
-
description: string;
|
|
130
|
-
parameters: Schema;
|
|
131
|
-
}
|
|
132
|
-
type NodeOperationPipe<T extends IRecord = any> = DataOperationPipe<Node<T>>;
|
|
133
|
-
type EdgeOperationPipe<T extends IRecord = any> = DataOperationPipe<Edge<T>>;
|
|
134
|
-
type NodeOperation<T extends IRecord = any> = DataOperation<Node<T>>;
|
|
135
|
-
type EdgeOperation<T extends IRecord = any> = DataOperation<Edge<T>>;
|
|
136
|
-
type NodeOperatorFunction<T extends IRecord = any, TArgs extends any[] = any[]> = (...args: TArgs) => NodeOperation<T>[];
|
|
137
|
-
type EdgeOperatorFunction<T extends IRecord = any, TArgs extends any[] = any[]> = (...args: TArgs) => EdgeOperation<T>[];
|
|
138
|
-
interface IEngineRuntime {
|
|
139
|
-
render?: {
|
|
140
|
-
getValue: <T, R = T>(value: BehaviorSubject<T> | T, options: {
|
|
141
|
-
paths: string[];
|
|
142
|
-
selector?: (value: T, context?: any) => R;
|
|
143
|
-
context?: any;
|
|
144
|
-
}) => T | R;
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
export { BasePlugin as B, type Container as C, type Edge as E, type HorizontalAlignment as H, type IRecord as I, type LayerComponent as L, type Node as N, type Plugin as P, type RenderType as R, type VerticalAlignment as V, type IEngineRuntime as a, type IPlugin as b, Layer as c, type NodeRenderType as d, type EdgeRenderType as e, type PluginData as f, type PluginTools as g, type EngineTools as h, type IPluginInfo as i, type IPluginToolInfo as j, type NodePosition as k, type NodeMeasured as l, type NodeProps as m, type EdgeProps as n, type Position as o, type PluginConfigs as p, type NodeOperationPipe as q, type EdgeOperationPipe as r, type NodeOperation as s, type EdgeOperation as t, type NodeOperatorFunction as u, type EdgeOperatorFunction as v };
|