@xyflow/react 12.1.1 → 12.2.1
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/esm/additional-components/Background/Background.d.ts.map +1 -1
- package/dist/esm/components/EdgeWrapper/EdgeUpdateAnchors.d.ts +1 -3
- package/dist/esm/components/EdgeWrapper/EdgeUpdateAnchors.d.ts.map +1 -1
- package/dist/esm/components/EdgeWrapper/index.d.ts.map +1 -1
- package/dist/esm/container/ZoomPane/index.d.ts.map +1 -1
- package/dist/esm/hooks/useReactFlow.d.ts.map +1 -1
- package/dist/esm/index.js +44 -25
- package/dist/esm/index.mjs +44 -25
- package/dist/esm/types/instance.d.ts +14 -1
- package/dist/esm/types/instance.d.ts.map +1 -1
- package/dist/esm/utils/changes.d.ts.map +1 -1
- package/dist/umd/additional-components/Background/Background.d.ts.map +1 -1
- package/dist/umd/components/EdgeWrapper/EdgeUpdateAnchors.d.ts +1 -3
- package/dist/umd/components/EdgeWrapper/EdgeUpdateAnchors.d.ts.map +1 -1
- package/dist/umd/components/EdgeWrapper/index.d.ts.map +1 -1
- package/dist/umd/container/ZoomPane/index.d.ts.map +1 -1
- package/dist/umd/hooks/useReactFlow.d.ts.map +1 -1
- package/dist/umd/index.js +2 -2
- package/dist/umd/types/instance.d.ts +14 -1
- package/dist/umd/types/instance.d.ts.map +1 -1
- package/dist/umd/utils/changes.d.ts.map +1 -1
- package/package.json +11 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Background.d.ts","sourceRoot":"","sources":["../../../src/additional-components/Background/Background.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,KAAK,eAAe,EAAqB,MAAM,SAAS,CAAC;AAWlE,iBAAS,mBAAmB,CAAC,EAC3B,EAAE,EACF,OAAgC,EAEhC,GAAQ,EAER,IAAI,EACJ,SAAa,EACb,MAAU,EACV,KAAK,EACL,OAAO,EACP,KAAK,EACL,SAAS,EACT,gBAAgB,GACjB,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"Background.d.ts","sourceRoot":"","sources":["../../../src/additional-components/Background/Background.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,KAAK,eAAe,EAAqB,MAAM,SAAS,CAAC;AAWlE,iBAAS,mBAAmB,CAAC,EAC3B,EAAE,EACF,OAAgC,EAEhC,GAAQ,EAER,IAAI,EACJ,SAAa,EACb,MAAU,EACV,KAAK,EACL,OAAO,EACP,KAAK,EACL,SAAS,EACT,gBAAgB,GACjB,EAAE,eAAe,2CAwDjB;kBAtEQ,mBAAmB;;;AA0E5B,eAAO,MAAM,UAAU,iEAA4B,CAAC"}
|
|
@@ -4,14 +4,12 @@ type EdgeUpdateAnchorsProps<EdgeType extends Edge = Edge> = {
|
|
|
4
4
|
edge: EdgeType;
|
|
5
5
|
isReconnectable: boolean | 'source' | 'target';
|
|
6
6
|
reconnectRadius: EdgeWrapperProps['reconnectRadius'];
|
|
7
|
-
sourceHandleId: Edge['sourceHandle'];
|
|
8
|
-
targetHandleId: Edge['targetHandle'];
|
|
9
7
|
onReconnect: EdgeWrapperProps<EdgeType>['onReconnect'];
|
|
10
8
|
onReconnectStart: EdgeWrapperProps<EdgeType>['onReconnectStart'];
|
|
11
9
|
onReconnectEnd: EdgeWrapperProps<EdgeType>['onReconnectEnd'];
|
|
12
10
|
setUpdateHover: (hover: boolean) => void;
|
|
13
11
|
setReconnecting: (updating: boolean) => void;
|
|
14
12
|
} & EdgePosition;
|
|
15
|
-
export declare function EdgeUpdateAnchors<EdgeType extends Edge = Edge>({ isReconnectable, reconnectRadius, edge,
|
|
13
|
+
export declare function EdgeUpdateAnchors<EdgeType extends Edge = Edge>({ isReconnectable, reconnectRadius, edge, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, onReconnect, onReconnectStart, onReconnectEnd, setReconnecting, setUpdateHover, }: EdgeUpdateAnchorsProps<EdgeType>): import("react/jsx-runtime").JSX.Element;
|
|
16
14
|
export {};
|
|
17
15
|
//# sourceMappingURL=EdgeUpdateAnchors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EdgeUpdateAnchors.d.ts","sourceRoot":"","sources":["../../../src/components/EdgeWrapper/EdgeUpdateAnchors.tsx"],"names":[],"mappings":"AACA,OAAO,EAA6B,YAAY,
|
|
1
|
+
{"version":3,"file":"EdgeUpdateAnchors.d.ts","sourceRoot":"","sources":["../../../src/components/EdgeWrapper/EdgeUpdateAnchors.tsx"],"names":[],"mappings":"AACA,OAAO,EAA6B,YAAY,EAAoC,MAAM,gBAAgB,CAAC;AAG3G,OAAO,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAGhE,KAAK,sBAAsB,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,IAAI;IAC1D,IAAI,EAAE,QAAQ,CAAC;IACf,eAAe,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC/C,eAAe,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;IACrD,WAAW,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC,aAAa,CAAC,CAAC;IACvD,gBAAgB,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC,kBAAkB,CAAC,CAAC;IACjE,cAAc,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC,gBAAgB,CAAC,CAAC;IAC7D,cAAc,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,eAAe,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CAC9C,GAAG,YAAY,CAAC;AAEjB,wBAAgB,iBAAiB,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,EAC9D,eAAe,EACf,eAAe,EACf,IAAI,EACJ,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,cAAc,EACd,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,cAAc,GACf,EAAE,sBAAsB,CAAC,QAAQ,CAAC,2CAmGlC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/EdgeWrapper/index.tsx"],"names":[],"mappings":";AAeA,OAAO,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE1D,wBAAgB,WAAW,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,EACxD,EAAE,EACF,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,OAAO,EACP,aAAa,EACb,aAAa,EACb,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,IAAI,EACJ,SAAS,EACT,cAAc,EACd,OAAO,EACP,mBAAmB,GACpB,EAAE,gBAAgB,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/EdgeWrapper/index.tsx"],"names":[],"mappings":";AAeA,OAAO,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE1D,wBAAgB,WAAW,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,EACxD,EAAE,EACF,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,OAAO,EACP,aAAa,EACb,aAAa,EACb,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,IAAI,EACJ,SAAS,EACT,cAAc,EACd,OAAO,EACP,mBAAmB,GACpB,EAAE,gBAAgB,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CAiOjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/container/ZoomPane/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGzD,KAAK,aAAa,GAAG,IAAI,CACvB,iBAAiB,EACf,eAAe,GACf,kBAAkB,GAClB,uBAAuB,GACvB,iBAAiB,GACjB,qBAAqB,GACrB,iBAAiB,CACpB,GAAG;IACF,oBAAoB,EAAE,OAAO,CAAC;CAC/B,CAAC;AAOF,wBAAgB,QAAQ,CAAC,EACvB,iBAAiB,EACjB,YAAmB,EACnB,WAAkB,EAClB,WAAmB,EACnB,gBAAsB,EACtB,eAAsC,EACtC,iBAAwB,EACxB,SAAgB,EAChB,eAAe,EACf,eAAe,EACf,OAAO,EACP,OAAO,EACP,qBAAqB,EACrB,gBAAuB,EACvB,QAAQ,EACR,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/container/ZoomPane/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGzD,KAAK,aAAa,GAAG,IAAI,CACvB,iBAAiB,EACf,eAAe,GACf,kBAAkB,GAClB,uBAAuB,GACvB,iBAAiB,GACjB,qBAAqB,GACrB,iBAAiB,CACpB,GAAG;IACF,oBAAoB,EAAE,OAAO,CAAC;CAC/B,CAAC;AAOF,wBAAgB,QAAQ,CAAC,EACvB,iBAAiB,EACjB,YAAmB,EACnB,WAAkB,EAClB,WAAmB,EACnB,gBAAsB,EACtB,eAAsC,EACtC,iBAAwB,EACxB,SAAgB,EAChB,eAAe,EACf,eAAe,EACf,OAAO,EACP,OAAO,EACP,qBAAqB,EACrB,gBAAuB,EACvB,QAAQ,EACR,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,aAAa,2CAsGf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useReactFlow.d.ts","sourceRoot":"","sources":["../../src/hooks/useReactFlow.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,IAAI,EAAE,IAAI,EAAgD,MAAM,UAAU,CAAC;AAI5G;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,QAAQ,SAAS,IAAI,GAAG,IAAI,KAAK,iBAAiB,CAC3G,QAAQ,EACR,QAAQ,CACT,
|
|
1
|
+
{"version":3,"file":"useReactFlow.d.ts","sourceRoot":"","sources":["../../src/hooks/useReactFlow.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,IAAI,EAAE,IAAI,EAAgD,MAAM,UAAU,CAAC;AAI5G;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,QAAQ,SAAS,IAAI,GAAG,IAAI,KAAK,iBAAiB,CAC3G,QAAQ,EACR,QAAQ,CACT,CA4NA"}
|
package/dist/esm/index.js
CHANGED
|
@@ -511,9 +511,10 @@ function applyChanges(changes, elements) {
|
|
|
511
511
|
// By storing a map of changes for each element, we can a quick lookup as we
|
|
512
512
|
// iterate over the elements array!
|
|
513
513
|
const changesMap = new Map();
|
|
514
|
+
const addItemChanges = [];
|
|
514
515
|
for (const change of changes) {
|
|
515
516
|
if (change.type === 'add') {
|
|
516
|
-
|
|
517
|
+
addItemChanges.push(change);
|
|
517
518
|
continue;
|
|
518
519
|
}
|
|
519
520
|
else if (change.type === 'remove' || change.type === 'replace') {
|
|
@@ -558,6 +559,18 @@ function applyChanges(changes, elements) {
|
|
|
558
559
|
}
|
|
559
560
|
updatedElements.push(updatedElement);
|
|
560
561
|
}
|
|
562
|
+
// we need to wait for all changes to be applied before adding new items
|
|
563
|
+
// to be able to add them at the correct index
|
|
564
|
+
if (addItemChanges.length) {
|
|
565
|
+
addItemChanges.forEach((change) => {
|
|
566
|
+
if (change.index !== undefined) {
|
|
567
|
+
updatedElements.splice(change.index, 0, { ...change.item });
|
|
568
|
+
}
|
|
569
|
+
else {
|
|
570
|
+
updatedElements.push({ ...change.item });
|
|
571
|
+
}
|
|
572
|
+
});
|
|
573
|
+
}
|
|
561
574
|
return updatedElements;
|
|
562
575
|
}
|
|
563
576
|
// Applies a single change to an element. This is a *mutable* update.
|
|
@@ -666,14 +679,14 @@ function getSelectionChanges(items, selectedIds = new Set(), mutateItem = false)
|
|
|
666
679
|
function getElementsDiffChanges({ items = [], lookup, }) {
|
|
667
680
|
const changes = [];
|
|
668
681
|
const itemsLookup = new Map(items.map((item) => [item.id, item]));
|
|
669
|
-
for (const item of items) {
|
|
682
|
+
for (const [index, item] of items.entries()) {
|
|
670
683
|
const lookupItem = lookup.get(item.id);
|
|
671
684
|
const storeItem = lookupItem?.internals?.userNode ?? lookupItem;
|
|
672
685
|
if (storeItem !== undefined && storeItem !== item) {
|
|
673
686
|
changes.push({ id: item.id, item: item, type: 'replace' });
|
|
674
687
|
}
|
|
675
688
|
if (storeItem === undefined) {
|
|
676
|
-
changes.push({ item: item, type: 'add' });
|
|
689
|
+
changes.push({ item: item, type: 'add', index });
|
|
677
690
|
}
|
|
678
691
|
}
|
|
679
692
|
for (const [id] of lookup) {
|
|
@@ -980,6 +993,10 @@ function useReactFlow() {
|
|
|
980
993
|
return options.replace ? { ...edge, data: nextData } : { ...edge, data: { ...edge.data, ...nextData } };
|
|
981
994
|
}, options);
|
|
982
995
|
},
|
|
996
|
+
getHandleConnections: ({ type, id, nodeId }) => Array.from(store
|
|
997
|
+
.getState()
|
|
998
|
+
.connectionLookup.get(`${nodeId}-${type}-${id ?? null}`)
|
|
999
|
+
?.values() ?? []),
|
|
983
1000
|
};
|
|
984
1001
|
}, []);
|
|
985
1002
|
return useMemo(() => {
|
|
@@ -1068,6 +1085,12 @@ function ZoomPane({ onPaneContextMenu, zoomOnScroll = true, zoomOnPinch = true,
|
|
|
1068
1085
|
const zoomActivationKeyPressed = useKeyPress(zoomActivationKeyCode);
|
|
1069
1086
|
const panZoom = useRef();
|
|
1070
1087
|
useResizeHandler(zoomPane);
|
|
1088
|
+
const onTransformChange = useCallback((transform) => {
|
|
1089
|
+
onViewportChange?.({ x: transform[0], y: transform[1], zoom: transform[2] });
|
|
1090
|
+
if (!isControlledViewport) {
|
|
1091
|
+
store.setState({ transform });
|
|
1092
|
+
}
|
|
1093
|
+
}, [onViewportChange, isControlledViewport]);
|
|
1071
1094
|
useEffect(() => {
|
|
1072
1095
|
if (zoomPane.current) {
|
|
1073
1096
|
panZoom.current = XYPanZoom({
|
|
@@ -1077,12 +1100,6 @@ function ZoomPane({ onPaneContextMenu, zoomOnScroll = true, zoomOnPinch = true,
|
|
|
1077
1100
|
translateExtent,
|
|
1078
1101
|
viewport: defaultViewport,
|
|
1079
1102
|
paneClickDistance,
|
|
1080
|
-
onTransformChange: (transform) => {
|
|
1081
|
-
onViewportChange?.({ x: transform[0], y: transform[1], zoom: transform[2] });
|
|
1082
|
-
if (!isControlledViewport) {
|
|
1083
|
-
store.setState({ transform });
|
|
1084
|
-
}
|
|
1085
|
-
},
|
|
1086
1103
|
onDraggingChange: (paneDragging) => store.setState({ paneDragging }),
|
|
1087
1104
|
onPanZoomStart: (event, vp) => {
|
|
1088
1105
|
const { onViewportChangeStart, onMoveStart } = store.getState();
|
|
@@ -1127,6 +1144,7 @@ function ZoomPane({ onPaneContextMenu, zoomOnScroll = true, zoomOnPinch = true,
|
|
|
1127
1144
|
userSelectionActive,
|
|
1128
1145
|
noWheelClassName,
|
|
1129
1146
|
lib,
|
|
1147
|
+
onTransformChange,
|
|
1130
1148
|
});
|
|
1131
1149
|
}, [
|
|
1132
1150
|
onPaneContextMenu,
|
|
@@ -1143,6 +1161,7 @@ function ZoomPane({ onPaneContextMenu, zoomOnScroll = true, zoomOnPinch = true,
|
|
|
1143
1161
|
userSelectionActive,
|
|
1144
1162
|
noWheelClassName,
|
|
1145
1163
|
lib,
|
|
1164
|
+
onTransformChange,
|
|
1146
1165
|
]);
|
|
1147
1166
|
return (jsx("div", { className: "react-flow__renderer", ref: zoomPane, style: containerStyle, children: children }));
|
|
1148
1167
|
}
|
|
@@ -2242,23 +2261,20 @@ function EdgeAnchor({ position, centerX, centerY, radius = 10, onMouseDown, onMo
|
|
|
2242
2261
|
return (jsx("circle", { onMouseDown: onMouseDown, onMouseEnter: onMouseEnter, onMouseOut: onMouseOut, className: cc([EdgeUpdaterClassName, `${EdgeUpdaterClassName}-${type}`]), cx: shiftX(centerX, radius, position), cy: shiftY(centerY, radius, position), r: radius, stroke: "transparent", fill: "transparent" }));
|
|
2243
2262
|
}
|
|
2244
2263
|
|
|
2245
|
-
function EdgeUpdateAnchors({ isReconnectable, reconnectRadius, edge,
|
|
2264
|
+
function EdgeUpdateAnchors({ isReconnectable, reconnectRadius, edge, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, onReconnect, onReconnectStart, onReconnectEnd, setReconnecting, setUpdateHover, }) {
|
|
2246
2265
|
const store = useStoreApi();
|
|
2247
|
-
const handleEdgeUpdater = (event,
|
|
2266
|
+
const handleEdgeUpdater = (event, oppositeHandle) => {
|
|
2248
2267
|
// avoid triggering edge updater if mouse btn is not left
|
|
2249
2268
|
if (event.button !== 0) {
|
|
2250
2269
|
return;
|
|
2251
2270
|
}
|
|
2252
2271
|
const { autoPanOnConnect, domNode, isValidConnection, connectionMode, connectionRadius, lib, onConnectStart, onConnectEnd, cancelConnection, nodeLookup, rfId: flowId, panBy, updateConnection, } = store.getState();
|
|
2253
|
-
const
|
|
2254
|
-
const handleId = (isSourceHandle ? targetHandleId : sourceHandleId) || null;
|
|
2255
|
-
const handleType = isSourceHandle ? 'target' : 'source';
|
|
2256
|
-
const isTarget = isSourceHandle;
|
|
2272
|
+
const isTarget = oppositeHandle.type === 'target';
|
|
2257
2273
|
setReconnecting(true);
|
|
2258
|
-
onReconnectStart?.(event, edge,
|
|
2274
|
+
onReconnectStart?.(event, edge, oppositeHandle.type);
|
|
2259
2275
|
const _onReconnectEnd = (evt, connectionState) => {
|
|
2260
2276
|
setReconnecting(false);
|
|
2261
|
-
onReconnectEnd?.(evt, edge,
|
|
2277
|
+
onReconnectEnd?.(evt, edge, oppositeHandle.type, connectionState);
|
|
2262
2278
|
};
|
|
2263
2279
|
const onConnectEdge = (connection) => onReconnect?.(edge, connection);
|
|
2264
2280
|
XYHandle.onPointerDown(event.nativeEvent, {
|
|
@@ -2266,11 +2282,11 @@ function EdgeUpdateAnchors({ isReconnectable, reconnectRadius, edge, targetHandl
|
|
|
2266
2282
|
connectionMode,
|
|
2267
2283
|
connectionRadius,
|
|
2268
2284
|
domNode,
|
|
2269
|
-
handleId,
|
|
2270
|
-
nodeId,
|
|
2285
|
+
handleId: oppositeHandle.id,
|
|
2286
|
+
nodeId: oppositeHandle.nodeId,
|
|
2271
2287
|
nodeLookup,
|
|
2272
2288
|
isTarget,
|
|
2273
|
-
edgeUpdaterType:
|
|
2289
|
+
edgeUpdaterType: oppositeHandle.type,
|
|
2274
2290
|
lib,
|
|
2275
2291
|
flowId,
|
|
2276
2292
|
cancelConnection,
|
|
@@ -2285,11 +2301,11 @@ function EdgeUpdateAnchors({ isReconnectable, reconnectRadius, edge, targetHandl
|
|
|
2285
2301
|
getFromHandle: () => store.getState().connection.fromHandle,
|
|
2286
2302
|
});
|
|
2287
2303
|
};
|
|
2288
|
-
const onReconnectSourceMouseDown = (event) => handleEdgeUpdater(event,
|
|
2289
|
-
const onReconnectTargetMouseDown = (event) => handleEdgeUpdater(event,
|
|
2304
|
+
const onReconnectSourceMouseDown = (event) => handleEdgeUpdater(event, { nodeId: edge.target, id: edge.targetHandle ?? null, type: 'target' });
|
|
2305
|
+
const onReconnectTargetMouseDown = (event) => handleEdgeUpdater(event, { nodeId: edge.source, id: edge.sourceHandle ?? null, type: 'source' });
|
|
2290
2306
|
const onReconnectMouseEnter = () => setUpdateHover(true);
|
|
2291
2307
|
const onReconnectMouseOut = () => setUpdateHover(false);
|
|
2292
|
-
return (jsxs(Fragment, { children: [(isReconnectable ===
|
|
2308
|
+
return (jsxs(Fragment, { children: [(isReconnectable === true || isReconnectable === 'source') && (jsx(EdgeAnchor, { position: sourcePosition, centerX: sourceX, centerY: sourceY, radius: reconnectRadius, onMouseDown: onReconnectSourceMouseDown, onMouseEnter: onReconnectMouseEnter, onMouseOut: onReconnectMouseOut, type: "source" })), (isReconnectable === true || isReconnectable === 'target') && (jsx(EdgeAnchor, { position: targetPosition, centerX: targetX, centerY: targetY, radius: reconnectRadius, onMouseDown: onReconnectTargetMouseDown, onMouseEnter: onReconnectMouseEnter, onMouseOut: onReconnectMouseOut, type: "target" }))] }));
|
|
2293
2309
|
}
|
|
2294
2310
|
|
|
2295
2311
|
function EdgeWrapper({ id, edgesFocusable, edgesReconnectable, elementsSelectable, onClick, onDoubleClick, onContextMenu, onMouseEnter, onMouseMove, onMouseLeave, reconnectRadius, onReconnect, onReconnectStart, onReconnectEnd, rfId, edgeTypes, noPanClassName, onError, disableKeyboardA11y, }) {
|
|
@@ -2412,7 +2428,7 @@ function EdgeWrapper({ id, edgesFocusable, edgesReconnectable, elementsSelectabl
|
|
|
2412
2428
|
updating: updateHover,
|
|
2413
2429
|
selectable: isSelectable,
|
|
2414
2430
|
},
|
|
2415
|
-
]), onClick: onEdgeClick, onDoubleClick: onEdgeDoubleClick, onContextMenu: onEdgeContextMenu, onMouseEnter: onEdgeMouseEnter, onMouseMove: onEdgeMouseMove, onMouseLeave: onEdgeMouseLeave, onKeyDown: isFocusable ? onKeyDown : undefined, tabIndex: isFocusable ? 0 : undefined, role: isFocusable ? 'button' : 'img', "data-id": id, "data-testid": `rf__edge-${id}`, "aria-label": edge.ariaLabel === null ? undefined : edge.ariaLabel || `Edge from ${edge.source} to ${edge.target}`, "aria-describedby": isFocusable ? `${ARIA_EDGE_DESC_KEY}-${rfId}` : undefined, ref: edgeRef, children: [!reconnecting && (jsx(EdgeComponent, { id: id, source: edge.source, target: edge.target, type: edge.type, selected: edge.selected, animated: edge.animated, selectable: isSelectable, deletable: edge.deletable ?? true, label: edge.label, labelStyle: edge.labelStyle, labelShowBg: edge.labelShowBg, labelBgStyle: edge.labelBgStyle, labelBgPadding: edge.labelBgPadding, labelBgBorderRadius: edge.labelBgBorderRadius, sourceX: sourceX, sourceY: sourceY, targetX: targetX, targetY: targetY, sourcePosition: sourcePosition, targetPosition: targetPosition, data: edge.data, style: edge.style, sourceHandleId: edge.sourceHandle, targetHandleId: edge.targetHandle, markerStart: markerStartUrl, markerEnd: markerEndUrl, pathOptions: 'pathOptions' in edge ? edge.pathOptions : undefined, interactionWidth: edge.interactionWidth })), isReconnectable && (jsx(EdgeUpdateAnchors, { edge: edge, isReconnectable: isReconnectable, reconnectRadius: reconnectRadius, onReconnect: onReconnect, onReconnectStart: onReconnectStart, onReconnectEnd: onReconnectEnd, sourceX: sourceX, sourceY: sourceY, targetX: targetX, targetY: targetY, sourcePosition: sourcePosition, targetPosition: targetPosition, setUpdateHover: setUpdateHover, setReconnecting: setReconnecting
|
|
2431
|
+
]), onClick: onEdgeClick, onDoubleClick: onEdgeDoubleClick, onContextMenu: onEdgeContextMenu, onMouseEnter: onEdgeMouseEnter, onMouseMove: onEdgeMouseMove, onMouseLeave: onEdgeMouseLeave, onKeyDown: isFocusable ? onKeyDown : undefined, tabIndex: isFocusable ? 0 : undefined, role: isFocusable ? 'button' : 'img', "data-id": id, "data-testid": `rf__edge-${id}`, "aria-label": edge.ariaLabel === null ? undefined : edge.ariaLabel || `Edge from ${edge.source} to ${edge.target}`, "aria-describedby": isFocusable ? `${ARIA_EDGE_DESC_KEY}-${rfId}` : undefined, ref: edgeRef, children: [!reconnecting && (jsx(EdgeComponent, { id: id, source: edge.source, target: edge.target, type: edge.type, selected: edge.selected, animated: edge.animated, selectable: isSelectable, deletable: edge.deletable ?? true, label: edge.label, labelStyle: edge.labelStyle, labelShowBg: edge.labelShowBg, labelBgStyle: edge.labelBgStyle, labelBgPadding: edge.labelBgPadding, labelBgBorderRadius: edge.labelBgBorderRadius, sourceX: sourceX, sourceY: sourceY, targetX: targetX, targetY: targetY, sourcePosition: sourcePosition, targetPosition: targetPosition, data: edge.data, style: edge.style, sourceHandleId: edge.sourceHandle, targetHandleId: edge.targetHandle, markerStart: markerStartUrl, markerEnd: markerEndUrl, pathOptions: 'pathOptions' in edge ? edge.pathOptions : undefined, interactionWidth: edge.interactionWidth })), isReconnectable && (jsx(EdgeUpdateAnchors, { edge: edge, isReconnectable: isReconnectable, reconnectRadius: reconnectRadius, onReconnect: onReconnect, onReconnectStart: onReconnectStart, onReconnectEnd: onReconnectEnd, sourceX: sourceX, sourceY: sourceY, targetX: targetX, targetY: targetY, sourcePosition: sourcePosition, targetPosition: targetPosition, setUpdateHover: setUpdateHover, setReconnecting: setReconnecting }))] }) }));
|
|
2416
2432
|
}
|
|
2417
2433
|
|
|
2418
2434
|
const selector$a = (s) => ({
|
|
@@ -3233,8 +3249,11 @@ size, lineWidth = 1, offset = 0, color, bgColor, style, className, patternClassN
|
|
|
3233
3249
|
const scaledGap = [gapXY[0] * transform[2] || 1, gapXY[1] * transform[2] || 1];
|
|
3234
3250
|
const scaledSize = patternSize * transform[2];
|
|
3235
3251
|
const offsetXY = Array.isArray(offset) ? offset : [offset, offset];
|
|
3236
|
-
const scaledOffset = [offsetXY[0] * transform[2] || 1, offsetXY[1] * transform[2] || 1];
|
|
3237
3252
|
const patternDimensions = isCross ? [scaledSize, scaledSize] : scaledGap;
|
|
3253
|
+
const scaledOffset = [
|
|
3254
|
+
offsetXY[0] * transform[2] || 1 + patternDimensions[0] / 2,
|
|
3255
|
+
offsetXY[1] * transform[2] || 1 + patternDimensions[1] / 2,
|
|
3256
|
+
];
|
|
3238
3257
|
const _patternId = `${patternId}${id ? id : ''}`;
|
|
3239
3258
|
return (jsxs("svg", { className: cc(['react-flow__background', className]), style: {
|
|
3240
3259
|
...style,
|
package/dist/esm/index.mjs
CHANGED
|
@@ -511,9 +511,10 @@ function applyChanges(changes, elements) {
|
|
|
511
511
|
// By storing a map of changes for each element, we can a quick lookup as we
|
|
512
512
|
// iterate over the elements array!
|
|
513
513
|
const changesMap = new Map();
|
|
514
|
+
const addItemChanges = [];
|
|
514
515
|
for (const change of changes) {
|
|
515
516
|
if (change.type === 'add') {
|
|
516
|
-
|
|
517
|
+
addItemChanges.push(change);
|
|
517
518
|
continue;
|
|
518
519
|
}
|
|
519
520
|
else if (change.type === 'remove' || change.type === 'replace') {
|
|
@@ -558,6 +559,18 @@ function applyChanges(changes, elements) {
|
|
|
558
559
|
}
|
|
559
560
|
updatedElements.push(updatedElement);
|
|
560
561
|
}
|
|
562
|
+
// we need to wait for all changes to be applied before adding new items
|
|
563
|
+
// to be able to add them at the correct index
|
|
564
|
+
if (addItemChanges.length) {
|
|
565
|
+
addItemChanges.forEach((change) => {
|
|
566
|
+
if (change.index !== undefined) {
|
|
567
|
+
updatedElements.splice(change.index, 0, { ...change.item });
|
|
568
|
+
}
|
|
569
|
+
else {
|
|
570
|
+
updatedElements.push({ ...change.item });
|
|
571
|
+
}
|
|
572
|
+
});
|
|
573
|
+
}
|
|
561
574
|
return updatedElements;
|
|
562
575
|
}
|
|
563
576
|
// Applies a single change to an element. This is a *mutable* update.
|
|
@@ -666,14 +679,14 @@ function getSelectionChanges(items, selectedIds = new Set(), mutateItem = false)
|
|
|
666
679
|
function getElementsDiffChanges({ items = [], lookup, }) {
|
|
667
680
|
const changes = [];
|
|
668
681
|
const itemsLookup = new Map(items.map((item) => [item.id, item]));
|
|
669
|
-
for (const item of items) {
|
|
682
|
+
for (const [index, item] of items.entries()) {
|
|
670
683
|
const lookupItem = lookup.get(item.id);
|
|
671
684
|
const storeItem = lookupItem?.internals?.userNode ?? lookupItem;
|
|
672
685
|
if (storeItem !== undefined && storeItem !== item) {
|
|
673
686
|
changes.push({ id: item.id, item: item, type: 'replace' });
|
|
674
687
|
}
|
|
675
688
|
if (storeItem === undefined) {
|
|
676
|
-
changes.push({ item: item, type: 'add' });
|
|
689
|
+
changes.push({ item: item, type: 'add', index });
|
|
677
690
|
}
|
|
678
691
|
}
|
|
679
692
|
for (const [id] of lookup) {
|
|
@@ -980,6 +993,10 @@ function useReactFlow() {
|
|
|
980
993
|
return options.replace ? { ...edge, data: nextData } : { ...edge, data: { ...edge.data, ...nextData } };
|
|
981
994
|
}, options);
|
|
982
995
|
},
|
|
996
|
+
getHandleConnections: ({ type, id, nodeId }) => Array.from(store
|
|
997
|
+
.getState()
|
|
998
|
+
.connectionLookup.get(`${nodeId}-${type}-${id ?? null}`)
|
|
999
|
+
?.values() ?? []),
|
|
983
1000
|
};
|
|
984
1001
|
}, []);
|
|
985
1002
|
return useMemo(() => {
|
|
@@ -1068,6 +1085,12 @@ function ZoomPane({ onPaneContextMenu, zoomOnScroll = true, zoomOnPinch = true,
|
|
|
1068
1085
|
const zoomActivationKeyPressed = useKeyPress(zoomActivationKeyCode);
|
|
1069
1086
|
const panZoom = useRef();
|
|
1070
1087
|
useResizeHandler(zoomPane);
|
|
1088
|
+
const onTransformChange = useCallback((transform) => {
|
|
1089
|
+
onViewportChange?.({ x: transform[0], y: transform[1], zoom: transform[2] });
|
|
1090
|
+
if (!isControlledViewport) {
|
|
1091
|
+
store.setState({ transform });
|
|
1092
|
+
}
|
|
1093
|
+
}, [onViewportChange, isControlledViewport]);
|
|
1071
1094
|
useEffect(() => {
|
|
1072
1095
|
if (zoomPane.current) {
|
|
1073
1096
|
panZoom.current = XYPanZoom({
|
|
@@ -1077,12 +1100,6 @@ function ZoomPane({ onPaneContextMenu, zoomOnScroll = true, zoomOnPinch = true,
|
|
|
1077
1100
|
translateExtent,
|
|
1078
1101
|
viewport: defaultViewport,
|
|
1079
1102
|
paneClickDistance,
|
|
1080
|
-
onTransformChange: (transform) => {
|
|
1081
|
-
onViewportChange?.({ x: transform[0], y: transform[1], zoom: transform[2] });
|
|
1082
|
-
if (!isControlledViewport) {
|
|
1083
|
-
store.setState({ transform });
|
|
1084
|
-
}
|
|
1085
|
-
},
|
|
1086
1103
|
onDraggingChange: (paneDragging) => store.setState({ paneDragging }),
|
|
1087
1104
|
onPanZoomStart: (event, vp) => {
|
|
1088
1105
|
const { onViewportChangeStart, onMoveStart } = store.getState();
|
|
@@ -1127,6 +1144,7 @@ function ZoomPane({ onPaneContextMenu, zoomOnScroll = true, zoomOnPinch = true,
|
|
|
1127
1144
|
userSelectionActive,
|
|
1128
1145
|
noWheelClassName,
|
|
1129
1146
|
lib,
|
|
1147
|
+
onTransformChange,
|
|
1130
1148
|
});
|
|
1131
1149
|
}, [
|
|
1132
1150
|
onPaneContextMenu,
|
|
@@ -1143,6 +1161,7 @@ function ZoomPane({ onPaneContextMenu, zoomOnScroll = true, zoomOnPinch = true,
|
|
|
1143
1161
|
userSelectionActive,
|
|
1144
1162
|
noWheelClassName,
|
|
1145
1163
|
lib,
|
|
1164
|
+
onTransformChange,
|
|
1146
1165
|
]);
|
|
1147
1166
|
return (jsx("div", { className: "react-flow__renderer", ref: zoomPane, style: containerStyle, children: children }));
|
|
1148
1167
|
}
|
|
@@ -2242,23 +2261,20 @@ function EdgeAnchor({ position, centerX, centerY, radius = 10, onMouseDown, onMo
|
|
|
2242
2261
|
return (jsx("circle", { onMouseDown: onMouseDown, onMouseEnter: onMouseEnter, onMouseOut: onMouseOut, className: cc([EdgeUpdaterClassName, `${EdgeUpdaterClassName}-${type}`]), cx: shiftX(centerX, radius, position), cy: shiftY(centerY, radius, position), r: radius, stroke: "transparent", fill: "transparent" }));
|
|
2243
2262
|
}
|
|
2244
2263
|
|
|
2245
|
-
function EdgeUpdateAnchors({ isReconnectable, reconnectRadius, edge,
|
|
2264
|
+
function EdgeUpdateAnchors({ isReconnectable, reconnectRadius, edge, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, onReconnect, onReconnectStart, onReconnectEnd, setReconnecting, setUpdateHover, }) {
|
|
2246
2265
|
const store = useStoreApi();
|
|
2247
|
-
const handleEdgeUpdater = (event,
|
|
2266
|
+
const handleEdgeUpdater = (event, oppositeHandle) => {
|
|
2248
2267
|
// avoid triggering edge updater if mouse btn is not left
|
|
2249
2268
|
if (event.button !== 0) {
|
|
2250
2269
|
return;
|
|
2251
2270
|
}
|
|
2252
2271
|
const { autoPanOnConnect, domNode, isValidConnection, connectionMode, connectionRadius, lib, onConnectStart, onConnectEnd, cancelConnection, nodeLookup, rfId: flowId, panBy, updateConnection, } = store.getState();
|
|
2253
|
-
const
|
|
2254
|
-
const handleId = (isSourceHandle ? targetHandleId : sourceHandleId) || null;
|
|
2255
|
-
const handleType = isSourceHandle ? 'target' : 'source';
|
|
2256
|
-
const isTarget = isSourceHandle;
|
|
2272
|
+
const isTarget = oppositeHandle.type === 'target';
|
|
2257
2273
|
setReconnecting(true);
|
|
2258
|
-
onReconnectStart?.(event, edge,
|
|
2274
|
+
onReconnectStart?.(event, edge, oppositeHandle.type);
|
|
2259
2275
|
const _onReconnectEnd = (evt, connectionState) => {
|
|
2260
2276
|
setReconnecting(false);
|
|
2261
|
-
onReconnectEnd?.(evt, edge,
|
|
2277
|
+
onReconnectEnd?.(evt, edge, oppositeHandle.type, connectionState);
|
|
2262
2278
|
};
|
|
2263
2279
|
const onConnectEdge = (connection) => onReconnect?.(edge, connection);
|
|
2264
2280
|
XYHandle.onPointerDown(event.nativeEvent, {
|
|
@@ -2266,11 +2282,11 @@ function EdgeUpdateAnchors({ isReconnectable, reconnectRadius, edge, targetHandl
|
|
|
2266
2282
|
connectionMode,
|
|
2267
2283
|
connectionRadius,
|
|
2268
2284
|
domNode,
|
|
2269
|
-
handleId,
|
|
2270
|
-
nodeId,
|
|
2285
|
+
handleId: oppositeHandle.id,
|
|
2286
|
+
nodeId: oppositeHandle.nodeId,
|
|
2271
2287
|
nodeLookup,
|
|
2272
2288
|
isTarget,
|
|
2273
|
-
edgeUpdaterType:
|
|
2289
|
+
edgeUpdaterType: oppositeHandle.type,
|
|
2274
2290
|
lib,
|
|
2275
2291
|
flowId,
|
|
2276
2292
|
cancelConnection,
|
|
@@ -2285,11 +2301,11 @@ function EdgeUpdateAnchors({ isReconnectable, reconnectRadius, edge, targetHandl
|
|
|
2285
2301
|
getFromHandle: () => store.getState().connection.fromHandle,
|
|
2286
2302
|
});
|
|
2287
2303
|
};
|
|
2288
|
-
const onReconnectSourceMouseDown = (event) => handleEdgeUpdater(event,
|
|
2289
|
-
const onReconnectTargetMouseDown = (event) => handleEdgeUpdater(event,
|
|
2304
|
+
const onReconnectSourceMouseDown = (event) => handleEdgeUpdater(event, { nodeId: edge.target, id: edge.targetHandle ?? null, type: 'target' });
|
|
2305
|
+
const onReconnectTargetMouseDown = (event) => handleEdgeUpdater(event, { nodeId: edge.source, id: edge.sourceHandle ?? null, type: 'source' });
|
|
2290
2306
|
const onReconnectMouseEnter = () => setUpdateHover(true);
|
|
2291
2307
|
const onReconnectMouseOut = () => setUpdateHover(false);
|
|
2292
|
-
return (jsxs(Fragment, { children: [(isReconnectable ===
|
|
2308
|
+
return (jsxs(Fragment, { children: [(isReconnectable === true || isReconnectable === 'source') && (jsx(EdgeAnchor, { position: sourcePosition, centerX: sourceX, centerY: sourceY, radius: reconnectRadius, onMouseDown: onReconnectSourceMouseDown, onMouseEnter: onReconnectMouseEnter, onMouseOut: onReconnectMouseOut, type: "source" })), (isReconnectable === true || isReconnectable === 'target') && (jsx(EdgeAnchor, { position: targetPosition, centerX: targetX, centerY: targetY, radius: reconnectRadius, onMouseDown: onReconnectTargetMouseDown, onMouseEnter: onReconnectMouseEnter, onMouseOut: onReconnectMouseOut, type: "target" }))] }));
|
|
2293
2309
|
}
|
|
2294
2310
|
|
|
2295
2311
|
function EdgeWrapper({ id, edgesFocusable, edgesReconnectable, elementsSelectable, onClick, onDoubleClick, onContextMenu, onMouseEnter, onMouseMove, onMouseLeave, reconnectRadius, onReconnect, onReconnectStart, onReconnectEnd, rfId, edgeTypes, noPanClassName, onError, disableKeyboardA11y, }) {
|
|
@@ -2412,7 +2428,7 @@ function EdgeWrapper({ id, edgesFocusable, edgesReconnectable, elementsSelectabl
|
|
|
2412
2428
|
updating: updateHover,
|
|
2413
2429
|
selectable: isSelectable,
|
|
2414
2430
|
},
|
|
2415
|
-
]), onClick: onEdgeClick, onDoubleClick: onEdgeDoubleClick, onContextMenu: onEdgeContextMenu, onMouseEnter: onEdgeMouseEnter, onMouseMove: onEdgeMouseMove, onMouseLeave: onEdgeMouseLeave, onKeyDown: isFocusable ? onKeyDown : undefined, tabIndex: isFocusable ? 0 : undefined, role: isFocusable ? 'button' : 'img', "data-id": id, "data-testid": `rf__edge-${id}`, "aria-label": edge.ariaLabel === null ? undefined : edge.ariaLabel || `Edge from ${edge.source} to ${edge.target}`, "aria-describedby": isFocusable ? `${ARIA_EDGE_DESC_KEY}-${rfId}` : undefined, ref: edgeRef, children: [!reconnecting && (jsx(EdgeComponent, { id: id, source: edge.source, target: edge.target, type: edge.type, selected: edge.selected, animated: edge.animated, selectable: isSelectable, deletable: edge.deletable ?? true, label: edge.label, labelStyle: edge.labelStyle, labelShowBg: edge.labelShowBg, labelBgStyle: edge.labelBgStyle, labelBgPadding: edge.labelBgPadding, labelBgBorderRadius: edge.labelBgBorderRadius, sourceX: sourceX, sourceY: sourceY, targetX: targetX, targetY: targetY, sourcePosition: sourcePosition, targetPosition: targetPosition, data: edge.data, style: edge.style, sourceHandleId: edge.sourceHandle, targetHandleId: edge.targetHandle, markerStart: markerStartUrl, markerEnd: markerEndUrl, pathOptions: 'pathOptions' in edge ? edge.pathOptions : undefined, interactionWidth: edge.interactionWidth })), isReconnectable && (jsx(EdgeUpdateAnchors, { edge: edge, isReconnectable: isReconnectable, reconnectRadius: reconnectRadius, onReconnect: onReconnect, onReconnectStart: onReconnectStart, onReconnectEnd: onReconnectEnd, sourceX: sourceX, sourceY: sourceY, targetX: targetX, targetY: targetY, sourcePosition: sourcePosition, targetPosition: targetPosition, setUpdateHover: setUpdateHover, setReconnecting: setReconnecting
|
|
2431
|
+
]), onClick: onEdgeClick, onDoubleClick: onEdgeDoubleClick, onContextMenu: onEdgeContextMenu, onMouseEnter: onEdgeMouseEnter, onMouseMove: onEdgeMouseMove, onMouseLeave: onEdgeMouseLeave, onKeyDown: isFocusable ? onKeyDown : undefined, tabIndex: isFocusable ? 0 : undefined, role: isFocusable ? 'button' : 'img', "data-id": id, "data-testid": `rf__edge-${id}`, "aria-label": edge.ariaLabel === null ? undefined : edge.ariaLabel || `Edge from ${edge.source} to ${edge.target}`, "aria-describedby": isFocusable ? `${ARIA_EDGE_DESC_KEY}-${rfId}` : undefined, ref: edgeRef, children: [!reconnecting && (jsx(EdgeComponent, { id: id, source: edge.source, target: edge.target, type: edge.type, selected: edge.selected, animated: edge.animated, selectable: isSelectable, deletable: edge.deletable ?? true, label: edge.label, labelStyle: edge.labelStyle, labelShowBg: edge.labelShowBg, labelBgStyle: edge.labelBgStyle, labelBgPadding: edge.labelBgPadding, labelBgBorderRadius: edge.labelBgBorderRadius, sourceX: sourceX, sourceY: sourceY, targetX: targetX, targetY: targetY, sourcePosition: sourcePosition, targetPosition: targetPosition, data: edge.data, style: edge.style, sourceHandleId: edge.sourceHandle, targetHandleId: edge.targetHandle, markerStart: markerStartUrl, markerEnd: markerEndUrl, pathOptions: 'pathOptions' in edge ? edge.pathOptions : undefined, interactionWidth: edge.interactionWidth })), isReconnectable && (jsx(EdgeUpdateAnchors, { edge: edge, isReconnectable: isReconnectable, reconnectRadius: reconnectRadius, onReconnect: onReconnect, onReconnectStart: onReconnectStart, onReconnectEnd: onReconnectEnd, sourceX: sourceX, sourceY: sourceY, targetX: targetX, targetY: targetY, sourcePosition: sourcePosition, targetPosition: targetPosition, setUpdateHover: setUpdateHover, setReconnecting: setReconnecting }))] }) }));
|
|
2416
2432
|
}
|
|
2417
2433
|
|
|
2418
2434
|
const selector$a = (s) => ({
|
|
@@ -3233,8 +3249,11 @@ size, lineWidth = 1, offset = 0, color, bgColor, style, className, patternClassN
|
|
|
3233
3249
|
const scaledGap = [gapXY[0] * transform[2] || 1, gapXY[1] * transform[2] || 1];
|
|
3234
3250
|
const scaledSize = patternSize * transform[2];
|
|
3235
3251
|
const offsetXY = Array.isArray(offset) ? offset : [offset, offset];
|
|
3236
|
-
const scaledOffset = [offsetXY[0] * transform[2] || 1, offsetXY[1] * transform[2] || 1];
|
|
3237
3252
|
const patternDimensions = isCross ? [scaledSize, scaledSize] : scaledGap;
|
|
3253
|
+
const scaledOffset = [
|
|
3254
|
+
offsetXY[0] * transform[2] || 1 + patternDimensions[0] / 2,
|
|
3255
|
+
offsetXY[1] * transform[2] || 1 + patternDimensions[1] / 2,
|
|
3256
|
+
];
|
|
3238
3257
|
const _patternId = `${patternId}${id ? id : ''}`;
|
|
3239
3258
|
return (jsxs("svg", { className: cc(['react-flow__background', className]), style: {
|
|
3240
3259
|
...style,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Rect, Viewport } from '@xyflow/system';
|
|
1
|
+
import type { HandleConnection, HandleType, Rect, Viewport } from '@xyflow/system';
|
|
2
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[];
|
|
@@ -165,6 +165,19 @@ export type GeneralHelpers<NodeType extends Node = Node, EdgeType extends Edge =
|
|
|
165
165
|
updateEdgeData: (id: string, dataUpdate: Partial<EdgeType['data']> | ((edge: EdgeType) => Partial<EdgeType['data']>), options?: {
|
|
166
166
|
replace: boolean;
|
|
167
167
|
}) => void;
|
|
168
|
+
/**
|
|
169
|
+
* Gets all connections for a given handle belonging to a specific node.
|
|
170
|
+
*
|
|
171
|
+
* @param type - handle type 'source' or 'target'
|
|
172
|
+
* @param id - the handle id (this is only needed if you have multiple handles of the same type, meaning you have to provide a unique id for each handle)
|
|
173
|
+
* @param nodeId - the node id the handle belongs to
|
|
174
|
+
* @returns an array with handle connections
|
|
175
|
+
*/
|
|
176
|
+
getHandleConnections: ({ type, id, nodeId, }: {
|
|
177
|
+
type: HandleType;
|
|
178
|
+
nodeId: string;
|
|
179
|
+
id?: string | null;
|
|
180
|
+
}) => HandleConnection[];
|
|
168
181
|
};
|
|
169
182
|
export type ReactFlowInstance<NodeType extends Node = Node, EdgeType extends Edge = Edge> = GeneralHelpers<NodeType, EdgeType> & Omit<ViewportHelperFunctions, 'initialized'> & {
|
|
170
183
|
viewportInitialized: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instance.d.ts","sourceRoot":"","sources":["../../src/types/instance.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"instance.d.ts","sourceRoot":"","sources":["../../src/types/instance.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changes.d.ts","sourceRoot":"","sources":["../../src/utils/changes.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,UAAU,EACV,UAAU,EACV,UAAU,EACV,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"changes.d.ts","sourceRoot":"","sources":["../../src/utils/changes.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,UAAU,EACV,UAAU,EACV,UAAU,EACV,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAyHzD;;;;;;;;;;;;;;;;;;;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;AAmCjB,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,IAAI,GAAG,IAAI,EAAE,IAAI,EAAE,CAAC,GAAG,gBAAgB,GAAG,gBAAgB,CAKzG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Background.d.ts","sourceRoot":"","sources":["../../../src/additional-components/Background/Background.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,KAAK,eAAe,EAAqB,MAAM,SAAS,CAAC;AAWlE,iBAAS,mBAAmB,CAAC,EAC3B,EAAE,EACF,OAAgC,EAEhC,GAAQ,EAER,IAAI,EACJ,SAAa,EACb,MAAU,EACV,KAAK,EACL,OAAO,EACP,KAAK,EACL,SAAS,EACT,gBAAgB,GACjB,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"Background.d.ts","sourceRoot":"","sources":["../../../src/additional-components/Background/Background.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,KAAK,eAAe,EAAqB,MAAM,SAAS,CAAC;AAWlE,iBAAS,mBAAmB,CAAC,EAC3B,EAAE,EACF,OAAgC,EAEhC,GAAQ,EAER,IAAI,EACJ,SAAa,EACb,MAAU,EACV,KAAK,EACL,OAAO,EACP,KAAK,EACL,SAAS,EACT,gBAAgB,GACjB,EAAE,eAAe,2CAwDjB;kBAtEQ,mBAAmB;;;AA0E5B,eAAO,MAAM,UAAU,iEAA4B,CAAC"}
|
|
@@ -4,14 +4,12 @@ type EdgeUpdateAnchorsProps<EdgeType extends Edge = Edge> = {
|
|
|
4
4
|
edge: EdgeType;
|
|
5
5
|
isReconnectable: boolean | 'source' | 'target';
|
|
6
6
|
reconnectRadius: EdgeWrapperProps['reconnectRadius'];
|
|
7
|
-
sourceHandleId: Edge['sourceHandle'];
|
|
8
|
-
targetHandleId: Edge['targetHandle'];
|
|
9
7
|
onReconnect: EdgeWrapperProps<EdgeType>['onReconnect'];
|
|
10
8
|
onReconnectStart: EdgeWrapperProps<EdgeType>['onReconnectStart'];
|
|
11
9
|
onReconnectEnd: EdgeWrapperProps<EdgeType>['onReconnectEnd'];
|
|
12
10
|
setUpdateHover: (hover: boolean) => void;
|
|
13
11
|
setReconnecting: (updating: boolean) => void;
|
|
14
12
|
} & EdgePosition;
|
|
15
|
-
export declare function EdgeUpdateAnchors<EdgeType extends Edge = Edge>({ isReconnectable, reconnectRadius, edge,
|
|
13
|
+
export declare function EdgeUpdateAnchors<EdgeType extends Edge = Edge>({ isReconnectable, reconnectRadius, edge, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, onReconnect, onReconnectStart, onReconnectEnd, setReconnecting, setUpdateHover, }: EdgeUpdateAnchorsProps<EdgeType>): import("react/jsx-runtime").JSX.Element;
|
|
16
14
|
export {};
|
|
17
15
|
//# sourceMappingURL=EdgeUpdateAnchors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EdgeUpdateAnchors.d.ts","sourceRoot":"","sources":["../../../src/components/EdgeWrapper/EdgeUpdateAnchors.tsx"],"names":[],"mappings":"AACA,OAAO,EAA6B,YAAY,
|
|
1
|
+
{"version":3,"file":"EdgeUpdateAnchors.d.ts","sourceRoot":"","sources":["../../../src/components/EdgeWrapper/EdgeUpdateAnchors.tsx"],"names":[],"mappings":"AACA,OAAO,EAA6B,YAAY,EAAoC,MAAM,gBAAgB,CAAC;AAG3G,OAAO,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAGhE,KAAK,sBAAsB,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,IAAI;IAC1D,IAAI,EAAE,QAAQ,CAAC;IACf,eAAe,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC/C,eAAe,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;IACrD,WAAW,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC,aAAa,CAAC,CAAC;IACvD,gBAAgB,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC,kBAAkB,CAAC,CAAC;IACjE,cAAc,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC,gBAAgB,CAAC,CAAC;IAC7D,cAAc,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,eAAe,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CAC9C,GAAG,YAAY,CAAC;AAEjB,wBAAgB,iBAAiB,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,EAC9D,eAAe,EACf,eAAe,EACf,IAAI,EACJ,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,cAAc,EACd,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,cAAc,GACf,EAAE,sBAAsB,CAAC,QAAQ,CAAC,2CAmGlC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/EdgeWrapper/index.tsx"],"names":[],"mappings":";AAeA,OAAO,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE1D,wBAAgB,WAAW,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,EACxD,EAAE,EACF,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,OAAO,EACP,aAAa,EACb,aAAa,EACb,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,IAAI,EACJ,SAAS,EACT,cAAc,EACd,OAAO,EACP,mBAAmB,GACpB,EAAE,gBAAgB,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/EdgeWrapper/index.tsx"],"names":[],"mappings":";AAeA,OAAO,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE1D,wBAAgB,WAAW,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,EACxD,EAAE,EACF,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,OAAO,EACP,aAAa,EACb,aAAa,EACb,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,IAAI,EACJ,SAAS,EACT,cAAc,EACd,OAAO,EACP,mBAAmB,GACpB,EAAE,gBAAgB,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CAiOjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/container/ZoomPane/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGzD,KAAK,aAAa,GAAG,IAAI,CACvB,iBAAiB,EACf,eAAe,GACf,kBAAkB,GAClB,uBAAuB,GACvB,iBAAiB,GACjB,qBAAqB,GACrB,iBAAiB,CACpB,GAAG;IACF,oBAAoB,EAAE,OAAO,CAAC;CAC/B,CAAC;AAOF,wBAAgB,QAAQ,CAAC,EACvB,iBAAiB,EACjB,YAAmB,EACnB,WAAkB,EAClB,WAAmB,EACnB,gBAAsB,EACtB,eAAsC,EACtC,iBAAwB,EACxB,SAAgB,EAChB,eAAe,EACf,eAAe,EACf,OAAO,EACP,OAAO,EACP,qBAAqB,EACrB,gBAAuB,EACvB,QAAQ,EACR,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/container/ZoomPane/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGzD,KAAK,aAAa,GAAG,IAAI,CACvB,iBAAiB,EACf,eAAe,GACf,kBAAkB,GAClB,uBAAuB,GACvB,iBAAiB,GACjB,qBAAqB,GACrB,iBAAiB,CACpB,GAAG;IACF,oBAAoB,EAAE,OAAO,CAAC;CAC/B,CAAC;AAOF,wBAAgB,QAAQ,CAAC,EACvB,iBAAiB,EACjB,YAAmB,EACnB,WAAkB,EAClB,WAAmB,EACnB,gBAAsB,EACtB,eAAsC,EACtC,iBAAwB,EACxB,SAAgB,EAChB,eAAe,EACf,eAAe,EACf,OAAO,EACP,OAAO,EACP,qBAAqB,EACrB,gBAAuB,EACvB,QAAQ,EACR,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,aAAa,2CAsGf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useReactFlow.d.ts","sourceRoot":"","sources":["../../src/hooks/useReactFlow.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,IAAI,EAAE,IAAI,EAAgD,MAAM,UAAU,CAAC;AAI5G;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,QAAQ,SAAS,IAAI,GAAG,IAAI,KAAK,iBAAiB,CAC3G,QAAQ,EACR,QAAQ,CACT,
|
|
1
|
+
{"version":3,"file":"useReactFlow.d.ts","sourceRoot":"","sources":["../../src/hooks/useReactFlow.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,IAAI,EAAE,IAAI,EAAgD,MAAM,UAAU,CAAC;AAI5G;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,QAAQ,SAAS,IAAI,GAAG,IAAI,KAAK,iBAAiB,CAC3G,QAAQ,EACR,QAAQ,CACT,CA4NA"}
|