@knotx/plugins-connection-line 0.2.11 → 0.2.13

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/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { NodeData, EdgeData, BasePlugin, NodeOperation, EdgeOperation, InteractionPriority } from '@knotx/core';
1
+ import { Node, Edge, BasePlugin, NodeOperation, EdgeOperation, InteractionPriority } from '@knotx/core';
2
2
 
3
3
  interface ConnectionLineConfig {
4
4
  /**
@@ -29,9 +29,9 @@ interface ConnectionLineConfig {
29
29
  }
30
30
  interface ConnectionValidateContext {
31
31
  sourceNodeId: string;
32
- sourceNode: NodeData;
32
+ sourceNode: Node;
33
33
  targetNodeId?: string;
34
- targetNode?: NodeData;
34
+ targetNode?: Node;
35
35
  isValid: boolean;
36
36
  }
37
37
  type ConnectionValidator = (context: ConnectionValidateContext) => boolean;
@@ -40,9 +40,9 @@ declare module '@knotx/core' {
40
40
  connectionLine: {
41
41
  config: ConnectionLineConfig;
42
42
  registerValidator: (validator: ConnectionValidator) => () => void;
43
- registerNewNodeCreator: (creator: (sourceNodeIds: string[], node: NodeData, edges: EdgeData[]) => ({
44
- node: NodeData;
45
- edges: EdgeData[];
43
+ registerNewNodeCreator: (creator: (sourceNodeIds: string[], node: Node, edges: Edge[]) => ({
44
+ node: Node;
45
+ edges: Edge[];
46
46
  }) | false) => () => void;
47
47
  /**
48
48
  * 获取连接点的属性
@@ -61,7 +61,7 @@ declare module '@knotx/core' {
61
61
  */
62
62
  declare class ConnectionLine extends BasePlugin<'connectionLine', ConnectionLineConfig> {
63
63
  name: "connectionLine";
64
- getNode: (id: string) => NodeData | undefined;
64
+ getNode: (id: string) => Node | undefined;
65
65
  dispatchNodeOperation: (operation: NodeOperation) => void;
66
66
  dispatchEdgeOperation: (operation: EdgeOperation) => void;
67
67
  startInteraction: (pluginId: string, type: string, priority: InteractionPriority) => void;
@@ -87,9 +87,9 @@ declare class ConnectionLine extends BasePlugin<'connectionLine', ConnectionLine
87
87
  private creators$;
88
88
  config: ConnectionLineConfig;
89
89
  registerValidator: (validator: ConnectionValidator) => () => void;
90
- registerNewNodeCreator: (creator: (sourceNodeIds: string[], node: NodeData, edges: EdgeData[]) => ({
91
- node: NodeData;
92
- edges: EdgeData[];
90
+ registerNewNodeCreator: (creator: (sourceNodeIds: string[], node: Node, edges: Edge[]) => ({
91
+ node: Node;
92
+ edges: Edge[];
93
93
  }) | false) => () => void;
94
94
  containerRender(): JSX.Element;
95
95
  /**
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { NodeData, EdgeData, BasePlugin, NodeOperation, EdgeOperation, InteractionPriority } from '@knotx/core';
1
+ import { Node, Edge, BasePlugin, NodeOperation, EdgeOperation, InteractionPriority } from '@knotx/core';
2
2
 
3
3
  interface ConnectionLineConfig {
4
4
  /**
@@ -29,9 +29,9 @@ interface ConnectionLineConfig {
29
29
  }
30
30
  interface ConnectionValidateContext {
31
31
  sourceNodeId: string;
32
- sourceNode: NodeData;
32
+ sourceNode: Node;
33
33
  targetNodeId?: string;
34
- targetNode?: NodeData;
34
+ targetNode?: Node;
35
35
  isValid: boolean;
36
36
  }
37
37
  type ConnectionValidator = (context: ConnectionValidateContext) => boolean;
@@ -40,9 +40,9 @@ declare module '@knotx/core' {
40
40
  connectionLine: {
41
41
  config: ConnectionLineConfig;
42
42
  registerValidator: (validator: ConnectionValidator) => () => void;
43
- registerNewNodeCreator: (creator: (sourceNodeIds: string[], node: NodeData, edges: EdgeData[]) => ({
44
- node: NodeData;
45
- edges: EdgeData[];
43
+ registerNewNodeCreator: (creator: (sourceNodeIds: string[], node: Node, edges: Edge[]) => ({
44
+ node: Node;
45
+ edges: Edge[];
46
46
  }) | false) => () => void;
47
47
  /**
48
48
  * 获取连接点的属性
@@ -61,7 +61,7 @@ declare module '@knotx/core' {
61
61
  */
62
62
  declare class ConnectionLine extends BasePlugin<'connectionLine', ConnectionLineConfig> {
63
63
  name: "connectionLine";
64
- getNode: (id: string) => NodeData | undefined;
64
+ getNode: (id: string) => Node | undefined;
65
65
  dispatchNodeOperation: (operation: NodeOperation) => void;
66
66
  dispatchEdgeOperation: (operation: EdgeOperation) => void;
67
67
  startInteraction: (pluginId: string, type: string, priority: InteractionPriority) => void;
@@ -87,9 +87,9 @@ declare class ConnectionLine extends BasePlugin<'connectionLine', ConnectionLine
87
87
  private creators$;
88
88
  config: ConnectionLineConfig;
89
89
  registerValidator: (validator: ConnectionValidator) => () => void;
90
- registerNewNodeCreator: (creator: (sourceNodeIds: string[], node: NodeData, edges: EdgeData[]) => ({
91
- node: NodeData;
92
- edges: EdgeData[];
90
+ registerNewNodeCreator: (creator: (sourceNodeIds: string[], node: Node, edges: Edge[]) => ({
91
+ node: Node;
92
+ edges: Edge[];
93
93
  }) | false) => () => void;
94
94
  containerRender(): JSX.Element;
95
95
  /**
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { NodeData, EdgeData, BasePlugin, NodeOperation, EdgeOperation, InteractionPriority } from '@knotx/core';
1
+ import { Node, Edge, BasePlugin, NodeOperation, EdgeOperation, InteractionPriority } from '@knotx/core';
2
2
 
3
3
  interface ConnectionLineConfig {
4
4
  /**
@@ -29,9 +29,9 @@ interface ConnectionLineConfig {
29
29
  }
30
30
  interface ConnectionValidateContext {
31
31
  sourceNodeId: string;
32
- sourceNode: NodeData;
32
+ sourceNode: Node;
33
33
  targetNodeId?: string;
34
- targetNode?: NodeData;
34
+ targetNode?: Node;
35
35
  isValid: boolean;
36
36
  }
37
37
  type ConnectionValidator = (context: ConnectionValidateContext) => boolean;
@@ -40,9 +40,9 @@ declare module '@knotx/core' {
40
40
  connectionLine: {
41
41
  config: ConnectionLineConfig;
42
42
  registerValidator: (validator: ConnectionValidator) => () => void;
43
- registerNewNodeCreator: (creator: (sourceNodeIds: string[], node: NodeData, edges: EdgeData[]) => ({
44
- node: NodeData;
45
- edges: EdgeData[];
43
+ registerNewNodeCreator: (creator: (sourceNodeIds: string[], node: Node, edges: Edge[]) => ({
44
+ node: Node;
45
+ edges: Edge[];
46
46
  }) | false) => () => void;
47
47
  /**
48
48
  * 获取连接点的属性
@@ -61,7 +61,7 @@ declare module '@knotx/core' {
61
61
  */
62
62
  declare class ConnectionLine extends BasePlugin<'connectionLine', ConnectionLineConfig> {
63
63
  name: "connectionLine";
64
- getNode: (id: string) => NodeData | undefined;
64
+ getNode: (id: string) => Node | undefined;
65
65
  dispatchNodeOperation: (operation: NodeOperation) => void;
66
66
  dispatchEdgeOperation: (operation: EdgeOperation) => void;
67
67
  startInteraction: (pluginId: string, type: string, priority: InteractionPriority) => void;
@@ -87,9 +87,9 @@ declare class ConnectionLine extends BasePlugin<'connectionLine', ConnectionLine
87
87
  private creators$;
88
88
  config: ConnectionLineConfig;
89
89
  registerValidator: (validator: ConnectionValidator) => () => void;
90
- registerNewNodeCreator: (creator: (sourceNodeIds: string[], node: NodeData, edges: EdgeData[]) => ({
91
- node: NodeData;
92
- edges: EdgeData[];
90
+ registerNewNodeCreator: (creator: (sourceNodeIds: string[], node: Node, edges: Edge[]) => ({
91
+ node: Node;
92
+ edges: Edge[];
93
93
  }) | false) => () => void;
94
94
  containerRender(): JSX.Element;
95
95
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knotx/plugins-connection-line",
3
- "version": "0.2.11",
3
+ "version": "0.2.13",
4
4
  "description": "Connectionline Plugin for Knotx",
5
5
  "author": "boenfu",
6
6
  "license": "MIT",
@@ -33,14 +33,14 @@
33
33
  "@interactjs/modifiers": "^1.10.27",
34
34
  "@interactjs/types": "^1.10.27",
35
35
  "interactjs": "^1.10.27",
36
- "@knotx/jsx": "0.2.10",
37
- "@knotx/plugins-selection": "0.2.11"
36
+ "@knotx/jsx": "0.2.11",
37
+ "@knotx/plugins-selection": "0.2.13"
38
38
  },
39
39
  "dependencies": {
40
40
  "lodash-es": "^4.17.21",
41
41
  "rxjs": "^7.8.1",
42
- "@knotx/core": "0.2.10",
43
- "@knotx/decorators": "0.2.11"
42
+ "@knotx/core": "0.2.12",
43
+ "@knotx/decorators": "0.2.13"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@interactjs/actions": "^1.10.27",
@@ -49,11 +49,11 @@
49
49
  "@interactjs/types": "^1.10.27",
50
50
  "@types/lodash-es": "^4.17.12",
51
51
  "interactjs": "^1.10.27",
52
- "@knotx/build-config": "0.2.10",
53
- "@knotx/eslint-config": "0.2.10",
54
- "@knotx/jsx": "0.2.10",
55
- "@knotx/plugins-selection": "0.2.11",
56
- "@knotx/typescript-config": "0.2.10"
52
+ "@knotx/build-config": "0.2.11",
53
+ "@knotx/eslint-config": "0.2.11",
54
+ "@knotx/jsx": "0.2.11",
55
+ "@knotx/plugins-selection": "0.2.13",
56
+ "@knotx/typescript-config": "0.2.11"
57
57
  },
58
58
  "scripts": {
59
59
  "build": "unbuild",