@xyflow/react 12.0.0-next.5 → 12.0.0-next.7
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/LICENSE +1 -1
- package/dist/esm/additional-components/Background/types.d.ts +13 -0
- package/dist/esm/additional-components/Background/types.d.ts.map +1 -1
- package/dist/esm/additional-components/Controls/Controls.d.ts +1 -1
- package/dist/esm/additional-components/Controls/Controls.d.ts.map +1 -1
- package/dist/esm/additional-components/Controls/types.d.ts +19 -2
- package/dist/esm/additional-components/Controls/types.d.ts.map +1 -1
- package/dist/esm/additional-components/MiniMap/types.d.ts +21 -0
- package/dist/esm/additional-components/MiniMap/types.d.ts.map +1 -1
- package/dist/esm/additional-components/NodeResizer/types.d.ts +25 -0
- package/dist/esm/additional-components/NodeResizer/types.d.ts.map +1 -1
- package/dist/esm/additional-components/NodeToolbar/types.d.ts +10 -0
- package/dist/esm/additional-components/NodeToolbar/types.d.ts.map +1 -1
- package/dist/esm/components/EdgeWrapper/EdgeUpdateAnchors.d.ts.map +1 -1
- package/dist/esm/components/Handle/index.d.ts.map +1 -1
- package/dist/esm/components/Panel/index.d.ts +3 -0
- package/dist/esm/components/Panel/index.d.ts.map +1 -1
- package/dist/esm/container/ReactFlow/index.d.ts +3 -3
- package/dist/esm/hooks/useNodesEdgesState.d.ts +2 -2
- package/dist/esm/hooks/useNodesEdgesState.d.ts.map +1 -1
- package/dist/esm/hooks/useReactFlow.d.ts.map +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +168 -163
- package/dist/esm/index.mjs +168 -163
- package/dist/esm/types/changes.d.ts +8 -6
- package/dist/esm/types/changes.d.ts.map +1 -1
- package/dist/esm/types/component-props.d.ts +339 -1
- package/dist/esm/types/component-props.d.ts.map +1 -1
- package/dist/esm/types/edges.d.ts +11 -0
- package/dist/esm/types/edges.d.ts.map +1 -1
- package/dist/esm/types/general.d.ts +5 -3
- package/dist/esm/types/general.d.ts.map +1 -1
- package/dist/esm/types/instance.d.ts +1 -11
- package/dist/esm/types/instance.d.ts.map +1 -1
- package/dist/esm/utils/changes.d.ts +20 -2
- package/dist/esm/utils/changes.d.ts.map +1 -1
- package/dist/esm/utils/general.d.ts +2 -49
- package/dist/esm/utils/general.d.ts.map +1 -1
- package/dist/umd/additional-components/Background/types.d.ts +13 -0
- package/dist/umd/additional-components/Background/types.d.ts.map +1 -1
- package/dist/umd/additional-components/Controls/Controls.d.ts +1 -1
- package/dist/umd/additional-components/Controls/Controls.d.ts.map +1 -1
- package/dist/umd/additional-components/Controls/types.d.ts +19 -2
- package/dist/umd/additional-components/Controls/types.d.ts.map +1 -1
- package/dist/umd/additional-components/MiniMap/types.d.ts +21 -0
- package/dist/umd/additional-components/MiniMap/types.d.ts.map +1 -1
- package/dist/umd/additional-components/NodeResizer/types.d.ts +25 -0
- package/dist/umd/additional-components/NodeResizer/types.d.ts.map +1 -1
- package/dist/umd/additional-components/NodeToolbar/types.d.ts +10 -0
- package/dist/umd/additional-components/NodeToolbar/types.d.ts.map +1 -1
- package/dist/umd/components/EdgeWrapper/EdgeUpdateAnchors.d.ts.map +1 -1
- package/dist/umd/components/Handle/index.d.ts.map +1 -1
- package/dist/umd/components/Panel/index.d.ts +3 -0
- package/dist/umd/components/Panel/index.d.ts.map +1 -1
- package/dist/umd/container/ReactFlow/index.d.ts +3 -3
- package/dist/umd/hooks/useNodesEdgesState.d.ts +2 -2
- package/dist/umd/hooks/useNodesEdgesState.d.ts.map +1 -1
- package/dist/umd/hooks/useReactFlow.d.ts.map +1 -1
- package/dist/umd/index.d.ts +2 -2
- package/dist/umd/index.d.ts.map +1 -1
- package/dist/umd/index.js +2 -2
- package/dist/umd/types/changes.d.ts +8 -6
- package/dist/umd/types/changes.d.ts.map +1 -1
- package/dist/umd/types/component-props.d.ts +339 -1
- package/dist/umd/types/component-props.d.ts.map +1 -1
- package/dist/umd/types/edges.d.ts +11 -0
- package/dist/umd/types/edges.d.ts.map +1 -1
- package/dist/umd/types/general.d.ts +5 -3
- package/dist/umd/types/general.d.ts.map +1 -1
- package/dist/umd/types/instance.d.ts +1 -11
- package/dist/umd/types/instance.d.ts.map +1 -1
- package/dist/umd/utils/changes.d.ts +20 -2
- package/dist/umd/utils/changes.d.ts.map +1 -1
- package/dist/umd/utils/general.d.ts +2 -49
- package/dist/umd/utils/general.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instance.d.ts","sourceRoot":"","sources":["../../../../packages/react/src/types/instance.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"instance.d.ts","sourceRoot":"","sources":["../../../../packages/react/src/types/instance.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,uBAAuB,EAAE,MAAM,GAAG,CAAC;AAE7D,MAAM,MAAM,mBAAmB,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,QAAQ,SAAS,IAAI,GAAG,IAAI,IAAI;IAC5F,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,CAAC,EAAE,CAAC,IAAI,GAAG;QAAE,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;KAAE,CAAC,EAAE,CAAC;IACtC,KAAK,CAAC,EAAE,CAAC,IAAI,GAAG;QAAE,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;KAAE,CAAC,EAAE,CAAC;CACvC,CAAC;AAEF,yBAAiB,QAAQ,CAAC;IACxB,KAAY,QAAQ,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,IA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,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACtC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACtC,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACpC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACtC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACtC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACtC,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACpC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAChD,cAAc,EAAE,QAAQ,CAAC,cAAc,CAAC;IACxC,oBAAoB,EAAE,QAAQ,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IAC9D,kBAAkB,EAAE,QAAQ,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAC1D,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC1C,cAAc,EAAE,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IAClD,mBAAmB,EAAE,OAAO,CAAC;CAC9B,GAAG,IAAI,CAAC,uBAAuB,EAAE,aAAa,CAAC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EdgeLookup, NodeLookup } from '@xyflow/system';
|
|
1
2
|
import type { Node, Edge, EdgeChange, NodeChange, NodeSelectionChange, EdgeSelectionChange } from '../types';
|
|
2
3
|
export declare function handleParentExpand(updatedElements: any[], updateItem: any): void;
|
|
3
4
|
/**
|
|
@@ -20,7 +21,7 @@ export declare function handleParentExpand(updatedElements: any[], updateItem: a
|
|
|
20
21
|
<ReactFLow nodes={nodes} edges={edges} onNodesChange={onNodesChange} />
|
|
21
22
|
);
|
|
22
23
|
*/
|
|
23
|
-
export declare function applyNodeChanges<NodeType extends Node = Node>(changes: NodeChange[], nodes: NodeType[]): NodeType[];
|
|
24
|
+
export declare function applyNodeChanges<NodeType extends Node = Node>(changes: NodeChange<NodeType>[], nodes: NodeType[]): NodeType[];
|
|
24
25
|
/**
|
|
25
26
|
* Drop in function that applies edge changes to an array of edges.
|
|
26
27
|
* @public
|
|
@@ -41,7 +42,24 @@ export declare function applyNodeChanges<NodeType extends Node = Node>(changes:
|
|
|
41
42
|
<ReactFlow nodes={nodes} edges={edges} onEdgesChange={onEdgesChange} />
|
|
42
43
|
);
|
|
43
44
|
*/
|
|
44
|
-
export declare function applyEdgeChanges<EdgeType extends Edge = Edge>(changes: EdgeChange[], edges: EdgeType[]): EdgeType[];
|
|
45
|
+
export declare function applyEdgeChanges<EdgeType extends Edge = Edge>(changes: EdgeChange<EdgeType>[], edges: EdgeType[]): EdgeType[];
|
|
45
46
|
export declare const createSelectionChange: (id: string, selected: boolean) => NodeSelectionChange | EdgeSelectionChange;
|
|
46
47
|
export declare function getSelectionChanges(items: any[], selectedIds?: Set<string>, mutateItem?: boolean): NodeSelectionChange[] | EdgeSelectionChange[];
|
|
48
|
+
/**
|
|
49
|
+
* This function is used to find the changes between two sets of elements.
|
|
50
|
+
* It is used to determine which nodes or edges have been added, removed or replaced.
|
|
51
|
+
*
|
|
52
|
+
* @internal
|
|
53
|
+
* @param params.items = the next set of elements (nodes or edges)
|
|
54
|
+
* @param params.lookup = a lookup map of the current store elements
|
|
55
|
+
* @returns an array of changes
|
|
56
|
+
*/
|
|
57
|
+
export declare function getElementsDiffChanges({ items, lookup, }: {
|
|
58
|
+
items: Node[] | undefined;
|
|
59
|
+
lookup: NodeLookup<Node>;
|
|
60
|
+
}): NodeChange[];
|
|
61
|
+
export declare function getElementsDiffChanges({ items, lookup, }: {
|
|
62
|
+
items: Edge[] | undefined;
|
|
63
|
+
lookup: EdgeLookup;
|
|
64
|
+
}): EdgeChange[];
|
|
47
65
|
//# sourceMappingURL=changes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changes.d.ts","sourceRoot":"","sources":["../../../../packages/react/src/utils/changes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE7G,wBAAgB,kBAAkB,CAAC,eAAe,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,GAAG,QA8CzE;
|
|
1
|
+
{"version":3,"file":"changes.d.ts","sourceRoot":"","sources":["../../../../packages/react/src/utils/changes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE7G,wBAAgB,kBAAkB,CAAC,eAAe,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,GAAG,QA8CzE;AAwHD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAC3D,OAAO,EAAE,UAAU,CAAC,QAAQ,CAAC,EAAE,EAC/B,KAAK,EAAE,QAAQ,EAAE,GAChB,QAAQ,EAAE,CAEZ;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAC3D,OAAO,EAAE,UAAU,CAAC,QAAQ,CAAC,EAAE,EAC/B,KAAK,EAAE,QAAQ,EAAE,GAChB,QAAQ,EAAE,CAEZ;AAED,eAAO,MAAM,qBAAqB,OAAQ,MAAM,YAAY,OAAO,KAAG,mBAAmB,GAAG,mBAI1F,CAAC;AAEH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,GAAG,EAAE,EACZ,WAAW,GAAE,GAAG,CAAC,MAAM,CAAa,EACpC,UAAU,UAAQ,GACjB,mBAAmB,EAAE,GAAG,mBAAmB,EAAE,CAmB/C;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,KAAK,EACL,MAAM,GACP,EAAE;IACD,KAAK,EAAE,IAAI,EAAE,GAAG,SAAS,CAAC;IAC1B,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;CAC1B,GAAG,UAAU,EAAE,CAAC;AACjB,wBAAgB,sBAAsB,CAAC,EACrC,KAAK,EACL,MAAM,GACP,EAAE;IACD,KAAK,EAAE,IAAI,EAAE,GAAG,SAAS,CAAC;IAC1B,MAAM,EAAE,UAAU,CAAC;CACpB,GAAG,UAAU,EAAE,CAAC"}
|
|
@@ -6,7 +6,7 @@ import type { Edge, Node } from '../types';
|
|
|
6
6
|
* @param element - The element to test
|
|
7
7
|
* @returns A boolean indicating whether the element is an Node
|
|
8
8
|
*/
|
|
9
|
-
export declare const isNode:
|
|
9
|
+
export declare const isNode: <NodeType extends Node<any, string | undefined> = Node<any, string | undefined>>(element: unknown) => element is NodeType;
|
|
10
10
|
/**
|
|
11
11
|
* Test whether an object is useable as an Edge
|
|
12
12
|
* @public
|
|
@@ -14,52 +14,5 @@ export declare const isNode: (element: any) => element is Node<any, string | und
|
|
|
14
14
|
* @param element - The element to test
|
|
15
15
|
* @returns A boolean indicating whether the element is an Edge
|
|
16
16
|
*/
|
|
17
|
-
export declare const isEdge: (element:
|
|
18
|
-
/**
|
|
19
|
-
* Pass in a node, and get connected nodes where edge.source === node.id
|
|
20
|
-
* @public
|
|
21
|
-
* @param node - The node to get the connected nodes from
|
|
22
|
-
* @param nodes - The array of all nodes
|
|
23
|
-
* @param edges - The array of all edges
|
|
24
|
-
* @returns An array of nodes that are connected over eges where the source is the given node
|
|
25
|
-
*/
|
|
26
|
-
export declare const getOutgoers: (node: Node<any, string | undefined> | {
|
|
27
|
-
id: string;
|
|
28
|
-
}, nodes: Node<any, string | undefined>[], edges: Edge<any>[]) => Node<any, string | undefined>[];
|
|
29
|
-
/**
|
|
30
|
-
* Pass in a node, and get connected nodes where edge.target === node.id
|
|
31
|
-
* @public
|
|
32
|
-
* @param node - The node to get the connected nodes from
|
|
33
|
-
* @param nodes - The array of all nodes
|
|
34
|
-
* @param edges - The array of all edges
|
|
35
|
-
* @returns An array of nodes that are connected over eges where the target is the given node
|
|
36
|
-
*/
|
|
37
|
-
export declare const getIncomers: (node: Node<any, string | undefined> | {
|
|
38
|
-
id: string;
|
|
39
|
-
}, nodes: Node<any, string | undefined>[], edges: Edge<any>[]) => Node<any, string | undefined>[];
|
|
40
|
-
/**
|
|
41
|
-
* This util is a convenience function to add a new Edge to an array of edges
|
|
42
|
-
* @remarks It also performs some validation to make sure you don't add an invalid edge or duplicate an existing one.
|
|
43
|
-
* @public
|
|
44
|
-
* @param edgeParams - Either an Edge or a Connection you want to add
|
|
45
|
-
* @param edges - The array of all current edges
|
|
46
|
-
* @returns A new array of edges with the new edge added
|
|
47
|
-
*/
|
|
48
|
-
export declare const addEdge: (edgeParams: Edge<any> | import("@xyflow/system").Connection, edges: Edge<any>[]) => Edge<any>[];
|
|
49
|
-
/**
|
|
50
|
-
* A handy utility to update an existing Edge with new properties
|
|
51
|
-
* @param oldEdge - The edge you want to update
|
|
52
|
-
* @param newConnection - The new connection you want to update the edge with
|
|
53
|
-
* @param edges - The array of all current edges
|
|
54
|
-
* @param options.shouldReplaceId - should the id of the old edge be replaced with the new connection id
|
|
55
|
-
* @returns the updated edges array
|
|
56
|
-
*/
|
|
57
|
-
export declare const updateEdge: (oldEdge: Edge<any>, newConnection: import("@xyflow/system").Connection, edges: Edge<any>[], options?: import("@xyflow/system").UpdateEdgeOptions | undefined) => Edge<any>[];
|
|
58
|
-
/**
|
|
59
|
-
* Get all connecting edges for a given set of nodes
|
|
60
|
-
* @param nodes - Nodes you want to get the connected edges for
|
|
61
|
-
* @param edges - All edges
|
|
62
|
-
* @returns Array of edges that connect any of the given nodes with each other
|
|
63
|
-
*/
|
|
64
|
-
export declare const getConnectedEdges: (nodes: Node<any, string | undefined>[], edges: Edge<any>[]) => Edge<any>[];
|
|
17
|
+
export declare const isEdge: <EdgeType extends Edge<any> = Edge<any>>(element: unknown) => element is EdgeType;
|
|
65
18
|
//# sourceMappingURL=general.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"general.d.ts","sourceRoot":"","sources":["../../../../packages/react/src/utils/general.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"general.d.ts","sourceRoot":"","sources":["../../../../packages/react/src/utils/general.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAE3C;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,4FAA2C,OAAO,wBACtC,CAAC;AAEhC;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,oDAA2C,OAAO,wBACtC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyflow/react",
|
|
3
|
-
"version": "12.0.0-next.
|
|
3
|
+
"version": "12.0.0-next.7",
|
|
4
4
|
"description": "React Flow - A highly customizable React library for building node-based editors and interactive flow charts.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"classcat": "^5.0.3",
|
|
44
44
|
"zustand": "^4.4.0",
|
|
45
|
-
"@xyflow/system": "0.0.
|
|
45
|
+
"@xyflow/system": "0.0.15"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"react": ">=17",
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
"postcss-rename": "^0.6.1",
|
|
63
63
|
"react": "^18.2.0",
|
|
64
64
|
"typescript": "5.1.3",
|
|
65
|
-
"@xyflow/tsconfig": "0.0.0",
|
|
66
65
|
"@xyflow/rollup-config": "0.0.0",
|
|
67
|
-
"@xyflow/eslint-config": "0.0.0"
|
|
66
|
+
"@xyflow/eslint-config": "0.0.0",
|
|
67
|
+
"@xyflow/tsconfig": "0.0.0"
|
|
68
68
|
},
|
|
69
69
|
"rollup": {
|
|
70
70
|
"globals": {
|