@xyflow/react 12.1.0 → 12.2.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/base.css +6 -6
- 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/Pane/index.d.ts.map +1 -1
- package/dist/esm/hooks/useReactFlow.d.ts.map +1 -1
- package/dist/esm/index.js +34 -19
- package/dist/esm/index.mjs +34 -19
- package/dist/esm/types/instance.d.ts +14 -1
- package/dist/esm/types/instance.d.ts.map +1 -1
- package/dist/esm/types/store.d.ts +1 -1
- package/dist/esm/types/store.d.ts.map +1 -1
- package/dist/esm/utils/changes.d.ts.map +1 -1
- package/dist/style.css +6 -6
- 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/Pane/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/types/store.d.ts +1 -1
- package/dist/umd/types/store.d.ts.map +1 -1
- package/dist/umd/utils/changes.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/base.css
CHANGED
|
@@ -73,15 +73,15 @@
|
|
|
73
73
|
.react-flow__pane {
|
|
74
74
|
z-index: 1;
|
|
75
75
|
}
|
|
76
|
-
.react-flow__pane.selection {
|
|
77
|
-
cursor: pointer;
|
|
78
|
-
}
|
|
79
76
|
.react-flow__pane.draggable {
|
|
80
77
|
cursor: grab;
|
|
81
78
|
}
|
|
82
|
-
.react-flow__pane.
|
|
83
|
-
|
|
84
|
-
|
|
79
|
+
.react-flow__pane.dragging {
|
|
80
|
+
cursor: grabbing;
|
|
81
|
+
}
|
|
82
|
+
.react-flow__pane.selection {
|
|
83
|
+
cursor: pointer;
|
|
84
|
+
}
|
|
85
85
|
.react-flow__viewport {
|
|
86
86
|
transform-origin: 0 0;
|
|
87
87
|
z-index: 2;
|
|
@@ -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/Pane/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AASf,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,aAAa,CAAC;AAElE,KAAK,SAAS,GAAG;IACf,WAAW,EAAE,OAAO,CAAC;IACrB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,OAAO,CACT,IAAI,CACF,cAAc,EACZ,eAAe,GACf,WAAW,GACX,kBAAkB,GAClB,gBAAgB,GAChB,aAAa,GACb,mBAAmB,GACnB,cAAc,GACd,kBAAkB,GAClB,iBAAiB,GACjB,kBAAkB,GAClB,iBAAiB,CACpB,CACF,CAAC;AAoBF,wBAAgB,IAAI,CAAC,EACnB,WAAW,EACX,mBAAmB,EACnB,aAAkC,EAClC,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,QAAQ,GACT,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/container/Pane/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AASf,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,aAAa,CAAC;AAElE,KAAK,SAAS,GAAG;IACf,WAAW,EAAE,OAAO,CAAC;IACrB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,OAAO,CACT,IAAI,CACF,cAAc,EACZ,eAAe,GACf,WAAW,GACX,kBAAkB,GAClB,gBAAgB,GAChB,aAAa,GACb,mBAAmB,GACnB,cAAc,GACd,kBAAkB,GAClB,iBAAiB,GACjB,kBAAkB,GAClB,iBAAiB,CACpB,CACF,CAAC;AAoBF,wBAAgB,IAAI,CAAC,EACnB,WAAW,EACX,mBAAmB,EACnB,aAAkC,EAClC,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,QAAQ,GACT,EAAE,SAAS,2CAyMX"}
|
|
@@ -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(() => {
|
|
@@ -1311,7 +1328,8 @@ function Pane({ isSelecting, selectionKeyPressed, selectionMode = SelectionMode.
|
|
|
1311
1328
|
}
|
|
1312
1329
|
selectionStarted.current = false;
|
|
1313
1330
|
};
|
|
1314
|
-
|
|
1331
|
+
const draggable = panOnDrag === true || (Array.isArray(panOnDrag) && panOnDrag.includes(0));
|
|
1332
|
+
return (jsxs("div", { className: cc(['react-flow__pane', { draggable, dragging, selection: isSelecting }]), onClick: hasActiveSelection ? undefined : wrapHandler(onClick, container), onContextMenu: wrapHandler(onContextMenu, container), onWheel: wrapHandler(onWheel, container), onPointerEnter: hasActiveSelection ? undefined : onPaneMouseEnter, onPointerDown: hasActiveSelection ? onPointerDown : onPaneMouseMove, onPointerMove: hasActiveSelection ? onPointerMove : onPaneMouseMove, onPointerUp: hasActiveSelection ? onPointerUp : undefined, onPointerLeave: onPaneMouseLeave, ref: container, style: containerStyle, children: [children, jsx(UserSelection, {})] }));
|
|
1315
1333
|
}
|
|
1316
1334
|
|
|
1317
1335
|
// this handler is called by
|
|
@@ -2241,23 +2259,20 @@ function EdgeAnchor({ position, centerX, centerY, radius = 10, onMouseDown, onMo
|
|
|
2241
2259
|
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" }));
|
|
2242
2260
|
}
|
|
2243
2261
|
|
|
2244
|
-
function EdgeUpdateAnchors({ isReconnectable, reconnectRadius, edge,
|
|
2262
|
+
function EdgeUpdateAnchors({ isReconnectable, reconnectRadius, edge, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, onReconnect, onReconnectStart, onReconnectEnd, setReconnecting, setUpdateHover, }) {
|
|
2245
2263
|
const store = useStoreApi();
|
|
2246
|
-
const handleEdgeUpdater = (event,
|
|
2264
|
+
const handleEdgeUpdater = (event, oppositeHandle) => {
|
|
2247
2265
|
// avoid triggering edge updater if mouse btn is not left
|
|
2248
2266
|
if (event.button !== 0) {
|
|
2249
2267
|
return;
|
|
2250
2268
|
}
|
|
2251
2269
|
const { autoPanOnConnect, domNode, isValidConnection, connectionMode, connectionRadius, lib, onConnectStart, onConnectEnd, cancelConnection, nodeLookup, rfId: flowId, panBy, updateConnection, } = store.getState();
|
|
2252
|
-
const
|
|
2253
|
-
const handleId = (isSourceHandle ? targetHandleId : sourceHandleId) || null;
|
|
2254
|
-
const handleType = isSourceHandle ? 'target' : 'source';
|
|
2255
|
-
const isTarget = isSourceHandle;
|
|
2270
|
+
const isTarget = oppositeHandle.type === 'target';
|
|
2256
2271
|
setReconnecting(true);
|
|
2257
|
-
onReconnectStart?.(event, edge,
|
|
2272
|
+
onReconnectStart?.(event, edge, oppositeHandle.type);
|
|
2258
2273
|
const _onReconnectEnd = (evt, connectionState) => {
|
|
2259
2274
|
setReconnecting(false);
|
|
2260
|
-
onReconnectEnd?.(evt, edge,
|
|
2275
|
+
onReconnectEnd?.(evt, edge, oppositeHandle.type, connectionState);
|
|
2261
2276
|
};
|
|
2262
2277
|
const onConnectEdge = (connection) => onReconnect?.(edge, connection);
|
|
2263
2278
|
XYHandle.onPointerDown(event.nativeEvent, {
|
|
@@ -2265,11 +2280,11 @@ function EdgeUpdateAnchors({ isReconnectable, reconnectRadius, edge, targetHandl
|
|
|
2265
2280
|
connectionMode,
|
|
2266
2281
|
connectionRadius,
|
|
2267
2282
|
domNode,
|
|
2268
|
-
handleId,
|
|
2269
|
-
nodeId,
|
|
2283
|
+
handleId: oppositeHandle.id,
|
|
2284
|
+
nodeId: oppositeHandle.nodeId,
|
|
2270
2285
|
nodeLookup,
|
|
2271
2286
|
isTarget,
|
|
2272
|
-
edgeUpdaterType:
|
|
2287
|
+
edgeUpdaterType: oppositeHandle.type,
|
|
2273
2288
|
lib,
|
|
2274
2289
|
flowId,
|
|
2275
2290
|
cancelConnection,
|
|
@@ -2284,11 +2299,11 @@ function EdgeUpdateAnchors({ isReconnectable, reconnectRadius, edge, targetHandl
|
|
|
2284
2299
|
getFromHandle: () => store.getState().connection.fromHandle,
|
|
2285
2300
|
});
|
|
2286
2301
|
};
|
|
2287
|
-
const onReconnectSourceMouseDown = (event) => handleEdgeUpdater(event,
|
|
2288
|
-
const onReconnectTargetMouseDown = (event) => handleEdgeUpdater(event,
|
|
2302
|
+
const onReconnectSourceMouseDown = (event) => handleEdgeUpdater(event, { nodeId: edge.target, id: edge.targetHandle ?? null, type: 'target' });
|
|
2303
|
+
const onReconnectTargetMouseDown = (event) => handleEdgeUpdater(event, { nodeId: edge.source, id: edge.sourceHandle ?? null, type: 'source' });
|
|
2289
2304
|
const onReconnectMouseEnter = () => setUpdateHover(true);
|
|
2290
2305
|
const onReconnectMouseOut = () => setUpdateHover(false);
|
|
2291
|
-
return (jsxs(Fragment, { children: [(isReconnectable ===
|
|
2306
|
+
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" }))] }));
|
|
2292
2307
|
}
|
|
2293
2308
|
|
|
2294
2309
|
function EdgeWrapper({ id, edgesFocusable, edgesReconnectable, elementsSelectable, onClick, onDoubleClick, onContextMenu, onMouseEnter, onMouseMove, onMouseLeave, reconnectRadius, onReconnect, onReconnectStart, onReconnectEnd, rfId, edgeTypes, noPanClassName, onError, disableKeyboardA11y, }) {
|
|
@@ -2411,7 +2426,7 @@ function EdgeWrapper({ id, edgesFocusable, edgesReconnectable, elementsSelectabl
|
|
|
2411
2426
|
updating: updateHover,
|
|
2412
2427
|
selectable: isSelectable,
|
|
2413
2428
|
},
|
|
2414
|
-
]), 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
|
|
2429
|
+
]), 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 }))] }) }));
|
|
2415
2430
|
}
|
|
2416
2431
|
|
|
2417
2432
|
const selector$a = (s) => ({
|
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(() => {
|
|
@@ -1311,7 +1328,8 @@ function Pane({ isSelecting, selectionKeyPressed, selectionMode = SelectionMode.
|
|
|
1311
1328
|
}
|
|
1312
1329
|
selectionStarted.current = false;
|
|
1313
1330
|
};
|
|
1314
|
-
|
|
1331
|
+
const draggable = panOnDrag === true || (Array.isArray(panOnDrag) && panOnDrag.includes(0));
|
|
1332
|
+
return (jsxs("div", { className: cc(['react-flow__pane', { draggable, dragging, selection: isSelecting }]), onClick: hasActiveSelection ? undefined : wrapHandler(onClick, container), onContextMenu: wrapHandler(onContextMenu, container), onWheel: wrapHandler(onWheel, container), onPointerEnter: hasActiveSelection ? undefined : onPaneMouseEnter, onPointerDown: hasActiveSelection ? onPointerDown : onPaneMouseMove, onPointerMove: hasActiveSelection ? onPointerMove : onPaneMouseMove, onPointerUp: hasActiveSelection ? onPointerUp : undefined, onPointerLeave: onPaneMouseLeave, ref: container, style: containerStyle, children: [children, jsx(UserSelection, {})] }));
|
|
1315
1333
|
}
|
|
1316
1334
|
|
|
1317
1335
|
// this handler is called by
|
|
@@ -2241,23 +2259,20 @@ function EdgeAnchor({ position, centerX, centerY, radius = 10, onMouseDown, onMo
|
|
|
2241
2259
|
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" }));
|
|
2242
2260
|
}
|
|
2243
2261
|
|
|
2244
|
-
function EdgeUpdateAnchors({ isReconnectable, reconnectRadius, edge,
|
|
2262
|
+
function EdgeUpdateAnchors({ isReconnectable, reconnectRadius, edge, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, onReconnect, onReconnectStart, onReconnectEnd, setReconnecting, setUpdateHover, }) {
|
|
2245
2263
|
const store = useStoreApi();
|
|
2246
|
-
const handleEdgeUpdater = (event,
|
|
2264
|
+
const handleEdgeUpdater = (event, oppositeHandle) => {
|
|
2247
2265
|
// avoid triggering edge updater if mouse btn is not left
|
|
2248
2266
|
if (event.button !== 0) {
|
|
2249
2267
|
return;
|
|
2250
2268
|
}
|
|
2251
2269
|
const { autoPanOnConnect, domNode, isValidConnection, connectionMode, connectionRadius, lib, onConnectStart, onConnectEnd, cancelConnection, nodeLookup, rfId: flowId, panBy, updateConnection, } = store.getState();
|
|
2252
|
-
const
|
|
2253
|
-
const handleId = (isSourceHandle ? targetHandleId : sourceHandleId) || null;
|
|
2254
|
-
const handleType = isSourceHandle ? 'target' : 'source';
|
|
2255
|
-
const isTarget = isSourceHandle;
|
|
2270
|
+
const isTarget = oppositeHandle.type === 'target';
|
|
2256
2271
|
setReconnecting(true);
|
|
2257
|
-
onReconnectStart?.(event, edge,
|
|
2272
|
+
onReconnectStart?.(event, edge, oppositeHandle.type);
|
|
2258
2273
|
const _onReconnectEnd = (evt, connectionState) => {
|
|
2259
2274
|
setReconnecting(false);
|
|
2260
|
-
onReconnectEnd?.(evt, edge,
|
|
2275
|
+
onReconnectEnd?.(evt, edge, oppositeHandle.type, connectionState);
|
|
2261
2276
|
};
|
|
2262
2277
|
const onConnectEdge = (connection) => onReconnect?.(edge, connection);
|
|
2263
2278
|
XYHandle.onPointerDown(event.nativeEvent, {
|
|
@@ -2265,11 +2280,11 @@ function EdgeUpdateAnchors({ isReconnectable, reconnectRadius, edge, targetHandl
|
|
|
2265
2280
|
connectionMode,
|
|
2266
2281
|
connectionRadius,
|
|
2267
2282
|
domNode,
|
|
2268
|
-
handleId,
|
|
2269
|
-
nodeId,
|
|
2283
|
+
handleId: oppositeHandle.id,
|
|
2284
|
+
nodeId: oppositeHandle.nodeId,
|
|
2270
2285
|
nodeLookup,
|
|
2271
2286
|
isTarget,
|
|
2272
|
-
edgeUpdaterType:
|
|
2287
|
+
edgeUpdaterType: oppositeHandle.type,
|
|
2273
2288
|
lib,
|
|
2274
2289
|
flowId,
|
|
2275
2290
|
cancelConnection,
|
|
@@ -2284,11 +2299,11 @@ function EdgeUpdateAnchors({ isReconnectable, reconnectRadius, edge, targetHandl
|
|
|
2284
2299
|
getFromHandle: () => store.getState().connection.fromHandle,
|
|
2285
2300
|
});
|
|
2286
2301
|
};
|
|
2287
|
-
const onReconnectSourceMouseDown = (event) => handleEdgeUpdater(event,
|
|
2288
|
-
const onReconnectTargetMouseDown = (event) => handleEdgeUpdater(event,
|
|
2302
|
+
const onReconnectSourceMouseDown = (event) => handleEdgeUpdater(event, { nodeId: edge.target, id: edge.targetHandle ?? null, type: 'target' });
|
|
2303
|
+
const onReconnectTargetMouseDown = (event) => handleEdgeUpdater(event, { nodeId: edge.source, id: edge.sourceHandle ?? null, type: 'source' });
|
|
2289
2304
|
const onReconnectMouseEnter = () => setUpdateHover(true);
|
|
2290
2305
|
const onReconnectMouseOut = () => setUpdateHover(false);
|
|
2291
|
-
return (jsxs(Fragment, { children: [(isReconnectable ===
|
|
2306
|
+
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" }))] }));
|
|
2292
2307
|
}
|
|
2293
2308
|
|
|
2294
2309
|
function EdgeWrapper({ id, edgesFocusable, edgesReconnectable, elementsSelectable, onClick, onDoubleClick, onContextMenu, onMouseEnter, onMouseMove, onMouseLeave, reconnectRadius, onReconnect, onReconnectStart, onReconnectEnd, rfId, edgeTypes, noPanClassName, onError, disableKeyboardA11y, }) {
|
|
@@ -2411,7 +2426,7 @@ function EdgeWrapper({ id, edgesFocusable, edgesReconnectable, elementsSelectabl
|
|
|
2411
2426
|
updating: updateHover,
|
|
2412
2427
|
selectable: isSelectable,
|
|
2413
2428
|
},
|
|
2414
|
-
]), 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
|
|
2429
|
+
]), 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 }))] }) }));
|
|
2415
2430
|
}
|
|
2416
2431
|
|
|
2417
2432
|
const selector$a = (s) => ({
|
|
@@ -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":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ACJ,EAAE,EACF,MAAM,GACP,EAAE;QACD,IAAI,EAAE,UAAU,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACpB,KAAK,gBAAgB,EAAE,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,iBAAiB,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,QAAQ,SAAS,IAAI,GAAG,IAAI,IAAI,cAAc,CACxG,QAAQ,EACR,QAAQ,CACT,GACC,IAAI,CAAC,uBAAuB,EAAE,aAAa,CAAC,GAAG;IAC7C,mBAAmB,EAAE,OAAO,CAAC;CAC9B,CAAC"}
|
|
@@ -8,7 +8,7 @@ export type ReactFlowStore<NodeType extends Node = Node, EdgeType extends Edge =
|
|
|
8
8
|
nodes: NodeType[];
|
|
9
9
|
nodeLookup: NodeLookup<InternalNode<NodeType>>;
|
|
10
10
|
parentLookup: ParentLookup<InternalNode<NodeType>>;
|
|
11
|
-
edges:
|
|
11
|
+
edges: EdgeType[];
|
|
12
12
|
edgeLookup: EdgeLookup<EdgeType>;
|
|
13
13
|
connectionLookup: ConnectionLookup;
|
|
14
14
|
onNodesChange: OnNodesChange<NodeType> | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/types/store.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,OAAO,EACZ,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,MAAM,EACX,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,KAAK,EACV,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,MAAM,E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,IAAI,CAAC;IAC9D,kBAAkB,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,QAAQ,CAAC,EAAE,KAAK,IAAI,CAAC;IAC9D,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE,cAAc,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACxD,WAAW,EAAE,CAAC,OAAO,CAAC,EAAE,cAAc,KAAK,OAAO,CAAC;IACnD,oBAAoB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CAClD,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 +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,Q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
|
z-index: 1;
|
|
112
112
|
}
|
|
113
|
-
.react-flow__pane.selection {
|
|
114
|
-
cursor: pointer;
|
|
115
|
-
}
|
|
116
113
|
.react-flow__pane.draggable {
|
|
117
114
|
cursor: grab;
|
|
118
115
|
}
|
|
119
|
-
.react-flow__pane.
|
|
120
|
-
|
|
121
|
-
|
|
116
|
+
.react-flow__pane.dragging {
|
|
117
|
+
cursor: grabbing;
|
|
118
|
+
}
|
|
119
|
+
.react-flow__pane.selection {
|
|
120
|
+
cursor: pointer;
|
|
121
|
+
}
|
|
122
122
|
.react-flow__viewport {
|
|
123
123
|
transform-origin: 0 0;
|
|
124
124
|
z-index: 2;
|
|
@@ -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/Pane/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AASf,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,aAAa,CAAC;AAElE,KAAK,SAAS,GAAG;IACf,WAAW,EAAE,OAAO,CAAC;IACrB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,OAAO,CACT,IAAI,CACF,cAAc,EACZ,eAAe,GACf,WAAW,GACX,kBAAkB,GAClB,gBAAgB,GAChB,aAAa,GACb,mBAAmB,GACnB,cAAc,GACd,kBAAkB,GAClB,iBAAiB,GACjB,kBAAkB,GAClB,iBAAiB,CACpB,CACF,CAAC;AAoBF,wBAAgB,IAAI,CAAC,EACnB,WAAW,EACX,mBAAmB,EACnB,aAAkC,EAClC,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,QAAQ,GACT,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/container/Pane/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AASf,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,aAAa,CAAC;AAElE,KAAK,SAAS,GAAG;IACf,WAAW,EAAE,OAAO,CAAC;IACrB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,OAAO,CACT,IAAI,CACF,cAAc,EACZ,eAAe,GACf,WAAW,GACX,kBAAkB,GAClB,gBAAgB,GAChB,aAAa,GACb,mBAAmB,GACnB,cAAc,GACd,kBAAkB,GAClB,iBAAiB,GACjB,kBAAkB,GAClB,iBAAiB,CACpB,CACF,CAAC;AAoBF,wBAAgB,IAAI,CAAC,EACnB,WAAW,EACX,mBAAmB,EACnB,aAAkC,EAClC,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,QAAQ,GACT,EAAE,SAAS,2CAyMX"}
|
|
@@ -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"}
|