@xyflow/react 12.0.0-next.12 → 12.0.0-next.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/base.css +7 -0
- 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 +1 -0
- package/dist/esm/additional-components/Controls/types.d.ts.map +1 -1
- package/dist/esm/additional-components/MiniMap/MiniMap.d.ts.map +1 -1
- package/dist/esm/additional-components/MiniMap/MiniMapNodes.d.ts.map +1 -1
- package/dist/esm/additional-components/NodeResizer/NodeResizeControl.d.ts.map +1 -1
- package/dist/esm/components/ConnectionLine/index.d.ts.map +1 -1
- package/dist/esm/components/NodeWrapper/index.d.ts.map +1 -1
- package/dist/esm/components/NodeWrapper/utils.d.ts +2 -2
- package/dist/esm/components/NodeWrapper/utils.d.ts.map +1 -1
- package/dist/esm/components/NodesSelection/index.d.ts.map +1 -1
- package/dist/esm/components/StoreUpdater/index.d.ts.map +1 -1
- package/dist/esm/container/NodeRenderer/useResizeObserver.d.ts.map +1 -1
- package/dist/esm/container/Pane/index.d.ts.map +1 -1
- package/dist/esm/hooks/useInternalNode.d.ts +10 -0
- package/dist/esm/hooks/useInternalNode.d.ts.map +1 -0
- package/dist/esm/hooks/useKeyPress.d.ts.map +1 -1
- package/dist/esm/hooks/useMoveSelectedNodes.d.ts.map +1 -1
- package/dist/esm/hooks/useNodesInitialized.d.ts.map +1 -1
- package/dist/esm/hooks/useReactFlow.d.ts.map +1 -1
- package/dist/esm/index.d.ts +3 -2
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +160 -172
- package/dist/esm/index.mjs +160 -172
- package/dist/esm/store/index.d.ts.map +1 -1
- package/dist/esm/types/general.d.ts +2 -2
- package/dist/esm/types/general.d.ts.map +1 -1
- package/dist/esm/types/index.d.ts +0 -1
- package/dist/esm/types/index.d.ts.map +1 -1
- package/dist/esm/types/instance.d.ts +9 -1
- package/dist/esm/types/instance.d.ts.map +1 -1
- package/dist/esm/types/nodes.d.ts +2 -1
- package/dist/esm/types/nodes.d.ts.map +1 -1
- package/dist/esm/types/store.d.ts +4 -4
- package/dist/esm/types/store.d.ts.map +1 -1
- package/dist/esm/utils/changes.d.ts +4 -5
- package/dist/esm/utils/changes.d.ts.map +1 -1
- package/dist/style.css +8 -3
- 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 +1 -0
- package/dist/umd/additional-components/Controls/types.d.ts.map +1 -1
- package/dist/umd/additional-components/MiniMap/MiniMap.d.ts.map +1 -1
- package/dist/umd/additional-components/MiniMap/MiniMapNodes.d.ts.map +1 -1
- package/dist/umd/additional-components/NodeResizer/NodeResizeControl.d.ts.map +1 -1
- package/dist/umd/components/ConnectionLine/index.d.ts.map +1 -1
- package/dist/umd/components/NodeWrapper/index.d.ts.map +1 -1
- package/dist/umd/components/NodeWrapper/utils.d.ts +2 -2
- package/dist/umd/components/NodeWrapper/utils.d.ts.map +1 -1
- package/dist/umd/components/NodesSelection/index.d.ts.map +1 -1
- package/dist/umd/components/StoreUpdater/index.d.ts.map +1 -1
- package/dist/umd/container/NodeRenderer/useResizeObserver.d.ts.map +1 -1
- package/dist/umd/container/Pane/index.d.ts.map +1 -1
- package/dist/umd/hooks/useInternalNode.d.ts +10 -0
- package/dist/umd/hooks/useInternalNode.d.ts.map +1 -0
- package/dist/umd/hooks/useKeyPress.d.ts.map +1 -1
- package/dist/umd/hooks/useMoveSelectedNodes.d.ts.map +1 -1
- package/dist/umd/hooks/useNodesInitialized.d.ts.map +1 -1
- package/dist/umd/hooks/useReactFlow.d.ts.map +1 -1
- package/dist/umd/index.d.ts +3 -2
- package/dist/umd/index.d.ts.map +1 -1
- package/dist/umd/index.js +2 -2
- package/dist/umd/store/index.d.ts.map +1 -1
- package/dist/umd/types/general.d.ts +2 -2
- package/dist/umd/types/general.d.ts.map +1 -1
- package/dist/umd/types/index.d.ts +0 -1
- package/dist/umd/types/index.d.ts.map +1 -1
- package/dist/umd/types/instance.d.ts +9 -1
- package/dist/umd/types/instance.d.ts.map +1 -1
- package/dist/umd/types/nodes.d.ts +2 -1
- package/dist/umd/types/nodes.d.ts.map +1 -1
- package/dist/umd/types/store.d.ts +4 -4
- package/dist/umd/types/store.d.ts.map +1 -1
- package/dist/umd/utils/changes.d.ts +4 -5
- package/dist/umd/utils/changes.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/react/src/store/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/react/src/store/index.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,EAA6D,MAAM,UAAU,CAAC;AAEtH,QAAA,MAAM,aAAa;;;;;;;;2GA6ShB,CAAC;AAEJ,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentType } from 'react';
|
|
2
|
-
import { FitViewParamsBase, FitViewOptionsBase, ZoomInOut, ZoomTo, SetViewport, GetZoom, GetViewport, SetCenter, FitBounds, XYPosition, OnBeforeDeleteBase, Connection } from '@xyflow/system';
|
|
3
|
-
import type {
|
|
2
|
+
import { FitViewParamsBase, FitViewOptionsBase, ZoomInOut, ZoomTo, SetViewport, GetZoom, GetViewport, SetCenter, FitBounds, XYPosition, OnBeforeDeleteBase, Connection, NodeChange, EdgeChange } from '@xyflow/system';
|
|
3
|
+
import type { Node, Edge, ReactFlowInstance, EdgeProps, NodeProps } from '.';
|
|
4
4
|
export type OnNodesChange<NodeType extends Node = Node> = (changes: NodeChange<NodeType>[]) => void;
|
|
5
5
|
export type OnEdgesChange<EdgeType extends Edge = Edge> = (changes: EdgeChange<EdgeType>[]) => void;
|
|
6
6
|
export type OnNodesDelete<NodeType extends Node = Node> = (nodes: NodeType[]) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"general.d.ts","sourceRoot":"","sources":["../../../../packages/react/src/types/general.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,MAAM,EACN,WAAW,EACX,OAAO,EACP,WAAW,EACX,SAAS,EACT,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,UAAU,EACX,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"general.d.ts","sourceRoot":"","sources":["../../../../packages/react/src/types/general.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,MAAM,EACN,WAAW,EACX,OAAO,EACP,WAAW,EACX,SAAS,EACT,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,UAAU,EACX,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,iBAAiB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,GAAG,CAAC;AAE7E,MAAM,MAAM,aAAa,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,QAAQ,CAAC,EAAE,KAAK,IAAI,CAAC;AACpG,MAAM,MAAM,aAAa,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,QAAQ,CAAC,EAAE,KAAK,IAAI,CAAC;AAEpG,MAAM,MAAM,aAAa,CAAC,QAAQ,SAAS,IAAI,GAAG,IA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ts","sourceRoot":"","sources":["../../../../packages/react/src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/react/src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Rect, Viewport } from '@xyflow/system';
|
|
2
|
-
import type { Node, Edge, ViewportHelperFunctions } from '.';
|
|
2
|
+
import type { Node, Edge, ViewportHelperFunctions, InternalNode } from '.';
|
|
3
3
|
export type ReactFlowJsonObject<NodeType extends Node = Node, EdgeType extends Edge = Edge> = {
|
|
4
4
|
nodes: NodeType[];
|
|
5
5
|
edges: EdgeType[];
|
|
@@ -18,6 +18,7 @@ export declare namespace Instance {
|
|
|
18
18
|
type SetNodes<NodeType extends Node = Node> = (payload: NodeType[] | ((nodes: NodeType[]) => NodeType[])) => void;
|
|
19
19
|
type AddNodes<NodeType extends Node = Node> = (payload: NodeType[] | NodeType) => void;
|
|
20
20
|
type GetNode<NodeType extends Node = Node> = (id: string) => NodeType | undefined;
|
|
21
|
+
type GetInternalNode<NodeType extends Node = Node> = (id: string) => InternalNode<NodeType> | undefined;
|
|
21
22
|
type GetEdges<EdgeType extends Edge = Edge> = () => EdgeType[];
|
|
22
23
|
type SetEdges<EdgeType extends Edge = Edge> = (payload: EdgeType[] | ((edges: EdgeType[]) => EdgeType[])) => void;
|
|
23
24
|
type GetEdge<EdgeType extends Edge = Edge> = (id: string) => EdgeType | undefined;
|
|
@@ -66,6 +67,13 @@ export type ReactFlowInstance<NodeType extends Node = Node, EdgeType extends Edg
|
|
|
66
67
|
* @returns the node or undefined if no node was found
|
|
67
68
|
*/
|
|
68
69
|
getNode: Instance.GetNode<NodeType>;
|
|
70
|
+
/**
|
|
71
|
+
* Returns an internal node by id.
|
|
72
|
+
*
|
|
73
|
+
* @param id - the node id
|
|
74
|
+
* @returns the internal node or undefined if no node was found
|
|
75
|
+
*/
|
|
76
|
+
getInternalNode: Instance.GetInternalNode<NodeType>;
|
|
69
77
|
/**
|
|
70
78
|
* Returns edges.
|
|
71
79
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instance.d.ts","sourceRoot":"","sources":["../../../../packages/react/src/types/instance.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,uBAAuB,EAAE,MAAM,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"instance.d.ts","sourceRoot":"","sources":["../../../../packages/react/src/types/instance.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,GAAG,CAAC;AAE3E,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,CAA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AAC;IAC1D;;;;;;;;;OASG;IACH,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC1C;;;;;;;;;OASG;IACH,cAAc,EAAE,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IAClD,mBAAmB,EAAE,OAAO,CAAC;CAC9B,GAAG,IAAI,CAAC,uBAAuB,EAAE,aAAa,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CSSProperties, MouseEvent as ReactMouseEvent } from 'react';
|
|
2
|
-
import type { CoordinateExtent, NodeBase, NodeOrigin, OnError, NodeProps as NodePropsBase } from '@xyflow/system';
|
|
2
|
+
import type { CoordinateExtent, NodeBase, NodeOrigin, OnError, NodeProps as NodePropsBase, InternalNodeBase } from '@xyflow/system';
|
|
3
3
|
import { NodeTypes } from './general';
|
|
4
4
|
/**
|
|
5
5
|
* The node data structure that gets used for the nodes prop.
|
|
@@ -11,6 +11,7 @@ export type Node<NodeData extends Record<string, unknown> = Record<string, unkno
|
|
|
11
11
|
resizing?: boolean;
|
|
12
12
|
focusable?: boolean;
|
|
13
13
|
};
|
|
14
|
+
export type InternalNode<NodeType extends Node = Node> = InternalNodeBase<NodeType>;
|
|
14
15
|
export type NodeMouseHandler<NodeType extends Node = Node> = (event: ReactMouseEvent, node: NodeType) => void;
|
|
15
16
|
export type SelectionDragHandler<NodeType extends Node = Node> = (event: ReactMouseEvent, nodes: NodeType[]) => void;
|
|
16
17
|
export type OnNodeDrag<NodeType extends Node = Node> = (event: ReactMouseEvent, node: NodeType, nodes: NodeType[]) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../../../../packages/react/src/types/nodes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,IAAI,eAAe,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":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NodePositions, type NodeOrigin, type OnConnect, type OnError, type OnViewportChange, type SelectionRect, type SnapGrid, type ConnectingHandle, type Transform, type XYPosition, type PanZoomInstance, type PanBy, type OnConnectStart, type OnConnectEnd, type OnSelectionDrag, type OnMoveStart, type OnMove, type OnMoveEnd, type UpdateConnection, type EdgeLookup, type ConnectionLookup, type NodeLookup } from '@xyflow/system';
|
|
2
|
-
import type { Edge, Node,
|
|
1
|
+
import { ConnectionMode, type ConnectionStatus, type CoordinateExtent, type NodeDimensionUpdate, type UpdateNodePositions, type NodeOrigin, type OnConnect, type OnError, type OnViewportChange, type SelectionRect, type SnapGrid, type ConnectingHandle, type Transform, type XYPosition, type PanZoomInstance, type PanBy, type OnConnectStart, type OnConnectEnd, type OnSelectionDrag, type OnMoveStart, type OnMove, type OnMoveEnd, type UpdateConnection, type EdgeLookup, type ConnectionLookup, type NodeLookup, NodeChange, EdgeChange } from '@xyflow/system';
|
|
2
|
+
import type { Edge, Node, OnNodesChange, OnEdgesChange, DefaultEdgeOptions, FitViewOptions, OnNodesDelete, OnEdgesDelete, OnSelectionChangeFunc, UnselectNodesAndEdgesParams, OnDelete, OnNodeDrag, OnBeforeDelete, IsValidConnection, InternalNode } from '.';
|
|
3
3
|
export type ReactFlowStore<NodeType extends Node = Node, EdgeType extends Edge = Edge> = {
|
|
4
4
|
rfId: string;
|
|
5
5
|
width: number;
|
|
6
6
|
height: number;
|
|
7
7
|
transform: Transform;
|
|
8
8
|
nodes: NodeType[];
|
|
9
|
-
nodeLookup: NodeLookup<NodeType
|
|
9
|
+
nodeLookup: NodeLookup<InternalNode<NodeType>>;
|
|
10
10
|
edges: Edge[];
|
|
11
11
|
edgeLookup: EdgeLookup<EdgeType>;
|
|
12
12
|
connectionLookup: ConnectionLookup;
|
|
@@ -101,7 +101,7 @@ export type ReactFlowActions<NodeType extends Node, EdgeType extends Edge> = {
|
|
|
101
101
|
triggerNodeChanges: (changes: NodeChange<NodeType>[]) => void;
|
|
102
102
|
triggerEdgeChanges: (changes: EdgeChange<EdgeType>[]) => void;
|
|
103
103
|
panBy: PanBy;
|
|
104
|
-
fitView: (
|
|
104
|
+
fitView: (options?: FitViewOptions) => boolean;
|
|
105
105
|
};
|
|
106
106
|
export type ReactFlowState<NodeType extends Node = Node, EdgeType extends Edge = Edge> = ReactFlowStore<NodeType, EdgeType> & ReactFlowActions<NodeType, EdgeType>;
|
|
107
107
|
//# sourceMappingURL=store.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../packages/react/src/types/store.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,OAAO,EACZ,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,KAAK,EACV,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,UAAU,
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../packages/react/src/types/store.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,OAAO,EACZ,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,eAAe,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EAAE,CAAC,OAAO,CAAC,EAAE,cAAc,KAAK,OAAO,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,cAAc,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,QAAQ,SAAS,IAAI,GAAG,IAAI,IAAI,cAAc,CACrG,QAAQ,EACR,QAAQ,CACT,GACC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { EdgeLookup, NodeLookup } from '@xyflow/system';
|
|
2
|
-
import type { Node, Edge,
|
|
3
|
-
export declare function handleParentExpand(updatedElements: any[], updateItem: any): void;
|
|
1
|
+
import { EdgeLookup, NodeLookup, EdgeChange, NodeChange, NodeSelectionChange, EdgeSelectionChange } from '@xyflow/system';
|
|
2
|
+
import type { Node, Edge, InternalNode } from '../types';
|
|
4
3
|
/**
|
|
5
4
|
* Drop in function that applies node changes to an array of nodes.
|
|
6
5
|
* @public
|
|
@@ -44,7 +43,7 @@ export declare function applyNodeChanges<NodeType extends Node = Node>(changes:
|
|
|
44
43
|
*/
|
|
45
44
|
export declare function applyEdgeChanges<EdgeType extends Edge = Edge>(changes: EdgeChange<EdgeType>[], edges: EdgeType[]): EdgeType[];
|
|
46
45
|
export declare function createSelectionChange(id: string, selected: boolean): NodeSelectionChange | EdgeSelectionChange;
|
|
47
|
-
export declare function getSelectionChanges(items:
|
|
46
|
+
export declare function getSelectionChanges(items: Map<string, any>, selectedIds?: Set<string>, mutateItem?: boolean): NodeSelectionChange[] | EdgeSelectionChange[];
|
|
48
47
|
/**
|
|
49
48
|
* This function is used to find the changes between two sets of elements.
|
|
50
49
|
* It is used to determine which nodes or edges have been added, removed or replaced.
|
|
@@ -56,7 +55,7 @@ export declare function getSelectionChanges(items: any[], selectedIds?: Set<stri
|
|
|
56
55
|
*/
|
|
57
56
|
export declare function getElementsDiffChanges({ items, lookup, }: {
|
|
58
57
|
items: Node[] | undefined;
|
|
59
|
-
lookup: NodeLookup<Node
|
|
58
|
+
lookup: NodeLookup<InternalNode<Node>>;
|
|
60
59
|
}): NodeChange[];
|
|
61
60
|
export declare function getElementsDiffChanges({ items, lookup, }: {
|
|
62
61
|
items: Edge[] | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changes.d.ts","sourceRoot":"","sources":["../../../../packages/react/src/utils/changes.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"changes.d.ts","sourceRoot":"","sources":["../../../../packages/react/src/utils/changes.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,UAAU,EACV,UAAU,EACV,UAAU,EACV,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AA4GzD;;;;;;;;;;;;;;;;;;;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,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,mBAAmB,GAAG,mBAAmB,CAM9G;AAED,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,EACvB,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,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;CACxC,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"}
|
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.13",
|
|
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.22"
|
|
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",
|
|
65
66
|
"@xyflow/rollup-config": "0.0.0",
|
|
66
|
-
"@xyflow/eslint-config": "0.0.0"
|
|
67
|
-
"@xyflow/tsconfig": "0.0.0"
|
|
67
|
+
"@xyflow/eslint-config": "0.0.0"
|
|
68
68
|
},
|
|
69
69
|
"rollup": {
|
|
70
70
|
"globals": {
|