@xyflow/system 0.0.14 → 0.0.16

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.
Files changed (45) hide show
  1. package/LICENSE +1 -1
  2. package/dist/esm/index.js +91 -71
  3. package/dist/esm/index.mjs +91 -71
  4. package/dist/esm/types/edges.d.ts +18 -0
  5. package/dist/esm/types/edges.d.ts.map +1 -1
  6. package/dist/esm/types/general.d.ts +1 -1
  7. package/dist/esm/types/general.d.ts.map +1 -1
  8. package/dist/esm/types/handles.d.ts +17 -0
  9. package/dist/esm/types/handles.d.ts.map +1 -1
  10. package/dist/esm/types/nodes.d.ts +39 -4
  11. package/dist/esm/types/nodes.d.ts.map +1 -1
  12. package/dist/esm/utils/edges/general.d.ts +2 -2
  13. package/dist/esm/utils/edges/general.d.ts.map +1 -1
  14. package/dist/esm/utils/general.d.ts +1 -0
  15. package/dist/esm/utils/general.d.ts.map +1 -1
  16. package/dist/esm/utils/graph.d.ts +28 -9
  17. package/dist/esm/utils/graph.d.ts.map +1 -1
  18. package/dist/esm/utils/marker.d.ts +3 -1
  19. package/dist/esm/utils/marker.d.ts.map +1 -1
  20. package/dist/esm/xydrag/XYDrag.d.ts +5 -5
  21. package/dist/esm/xydrag/XYDrag.d.ts.map +1 -1
  22. package/dist/esm/xyhandle/XYHandle.d.ts +2 -0
  23. package/dist/esm/xyhandle/XYHandle.d.ts.map +1 -1
  24. package/dist/umd/index.js +1 -1
  25. package/dist/umd/types/edges.d.ts +18 -0
  26. package/dist/umd/types/edges.d.ts.map +1 -1
  27. package/dist/umd/types/general.d.ts +1 -1
  28. package/dist/umd/types/general.d.ts.map +1 -1
  29. package/dist/umd/types/handles.d.ts +17 -0
  30. package/dist/umd/types/handles.d.ts.map +1 -1
  31. package/dist/umd/types/nodes.d.ts +39 -4
  32. package/dist/umd/types/nodes.d.ts.map +1 -1
  33. package/dist/umd/utils/edges/general.d.ts +2 -2
  34. package/dist/umd/utils/edges/general.d.ts.map +1 -1
  35. package/dist/umd/utils/general.d.ts +1 -0
  36. package/dist/umd/utils/general.d.ts.map +1 -1
  37. package/dist/umd/utils/graph.d.ts +28 -9
  38. package/dist/umd/utils/graph.d.ts.map +1 -1
  39. package/dist/umd/utils/marker.d.ts +3 -1
  40. package/dist/umd/utils/marker.d.ts.map +1 -1
  41. package/dist/umd/xydrag/XYDrag.d.ts +5 -5
  42. package/dist/umd/xydrag/XYDrag.d.ts.map +1 -1
  43. package/dist/umd/xyhandle/XYHandle.d.ts +2 -0
  44. package/dist/umd/xyhandle/XYHandle.d.ts.map +1 -1
  45. package/package.json +3 -3
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2019-2023 webkid GmbH
3
+ Copyright (c) 2019-2024 webkid GmbH
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/dist/esm/index.js CHANGED
@@ -128,7 +128,7 @@ const isNodeBase = (element) => 'id' in element && !('source' in element) && !('
128
128
  * @param edges - The array of all edges
129
129
  * @returns An array of nodes that are connected over eges where the source is the given node
130
130
  */
131
- const getOutgoersBase = (node, nodes, edges) => {
131
+ const getOutgoers = (node, nodes, edges) => {
132
132
  if (!node.id) {
133
133
  return [];
134
134
  }
@@ -148,7 +148,7 @@ const getOutgoersBase = (node, nodes, edges) => {
148
148
  * @param edges - The array of all edges
149
149
  * @returns An array of nodes that are connected over eges where the target is the given node
150
150
  */
151
- const getIncomersBase = (node, nodes, edges) => {
151
+ const getIncomers = (node, nodes, edges) => {
152
152
  if (!node.id) {
153
153
  return [];
154
154
  }
@@ -163,8 +163,10 @@ const getIncomersBase = (node, nodes, edges) => {
163
163
  const getNodePositionWithOrigin = (node, nodeOrigin = [0, 0]) => {
164
164
  if (!node) {
165
165
  return {
166
- x: 0,
167
- y: 0,
166
+ position: {
167
+ x: 0,
168
+ y: 0,
169
+ },
168
170
  positionAbsolute: {
169
171
  x: 0,
170
172
  y: 0,
@@ -178,7 +180,7 @@ const getNodePositionWithOrigin = (node, nodeOrigin = [0, 0]) => {
178
180
  y: node.position.y - offsetY,
179
181
  };
180
182
  return {
181
- ...position,
183
+ position,
182
184
  positionAbsolute: node.computed?.positionAbsolute
183
185
  ? {
184
186
  x: node.computed.positionAbsolute.x - offsetX,
@@ -192,18 +194,18 @@ const getNodePositionWithOrigin = (node, nodeOrigin = [0, 0]) => {
192
194
  * @public
193
195
  * @remarks Useful when combined with {@link getViewportForBounds} to calculate the correct transform to fit the given nodes in a viewport.
194
196
  * @param nodes - Nodes to calculate the bounds for
195
- * @param nodeOrigin - Origin of the nodes: [0, 0] - top left, [0.5, 0.5] - center
197
+ * @param params.nodeOrigin - Origin of the nodes: [0, 0] - top left, [0.5, 0.5] - center
198
+ * @param params.useRelativePosition - Whether to use the relative or absolute node positions
196
199
  * @returns Bounding box enclosing all nodes
197
200
  */
198
- const getNodesBounds = (nodes, nodeOrigin = [0, 0]) => {
201
+ const getNodesBounds = (nodes, params = { nodeOrigin: [0, 0], useRelativePosition: false }) => {
199
202
  if (nodes.length === 0) {
200
203
  return { x: 0, y: 0, width: 0, height: 0 };
201
204
  }
202
205
  const box = nodes.reduce((currBox, node) => {
203
- const { x, y } = getNodePositionWithOrigin(node, node.origin || nodeOrigin).positionAbsolute;
206
+ const nodePos = getNodePositionWithOrigin(node, node.origin || params.nodeOrigin);
204
207
  return getBoundsOfBoxes(currBox, rectToBox({
205
- x,
206
- y,
208
+ ...nodePos[params.useRelativePosition ? 'position' : 'positionAbsolute'],
207
209
  width: node.computed?.width ?? node.width ?? 0,
208
210
  height: node.computed?.height ?? node.height ?? 0,
209
211
  }));
@@ -243,7 +245,7 @@ excludeNonSelectableNodes = false, nodeOrigin = [0, 0]) => {
243
245
  * @param edges - All edges
244
246
  * @returns Array of edges that connect any of the given nodes with each other
245
247
  */
246
- const getConnectedEdgesBase = (nodes, edges) => {
248
+ const getConnectedEdges = (nodes, edges) => {
247
249
  const nodeIds = new Set();
248
250
  nodes.forEach((node) => {
249
251
  nodeIds.add(node.id);
@@ -259,64 +261,73 @@ function fitView({ nodes, width, height, panZoom, minZoom, maxZoom, nodeOrigin =
259
261
  return isVisible;
260
262
  });
261
263
  if (filteredNodes.length > 0) {
262
- const bounds = getNodesBounds(filteredNodes, nodeOrigin);
264
+ const bounds = getNodesBounds(filteredNodes, { nodeOrigin });
263
265
  const viewport = getViewportForBounds(bounds, width, height, options?.minZoom ?? minZoom, options?.maxZoom ?? maxZoom, options?.padding ?? 0.1);
264
266
  panZoom.setViewport(viewport, { duration: options?.duration });
265
267
  return true;
266
268
  }
267
269
  return false;
268
270
  }
271
+ /**
272
+ * This function clamps the passed extend by the node's width and height.
273
+ * This is needed to prevent the node from being dragged outside of its extent.
274
+ *
275
+ * @param node
276
+ * @param extent
277
+ * @returns
278
+ */
269
279
  function clampNodeExtent(node, extent) {
270
280
  if (!extent || extent === 'parent') {
271
281
  return extent;
272
282
  }
273
283
  return [extent[0], [extent[1][0] - (node.computed?.width ?? 0), extent[1][1] - (node.computed?.height ?? 0)]];
274
284
  }
275
- function calcNextPosition(node, nextPosition, nodes, nodeExtent, nodeOrigin = [0, 0], onError) {
276
- const clampedNodeExtent = clampNodeExtent(node, node.extent || nodeExtent);
277
- let currentExtent = clampedNodeExtent;
278
- let parentNode = null;
279
- let parentPos = { x: 0, y: 0 };
280
- if (node.parentNode) {
281
- parentNode = nodes.find((n) => n.id === node.parentNode) || null;
282
- parentPos = parentNode
283
- ? getNodePositionWithOrigin(parentNode, parentNode.origin || nodeOrigin).positionAbsolute
284
- : parentPos;
285
- }
285
+ /**
286
+ * This function calculates the next position of a node, taking into account the node's extent, parent node, and origin.
287
+ *
288
+ * @internal
289
+ * @returns position, positionAbsolute
290
+ */
291
+ function calculateNodePosition({ nodeId, nextPosition, nodeLookup, nodeOrigin = [0, 0], nodeExtent, onError, }) {
292
+ const node = nodeLookup.get(nodeId);
293
+ const parentNode = node.parentNode ? nodeLookup.get(node.parentNode) : undefined;
294
+ const { x: parentX, y: parentY } = parentNode
295
+ ? getNodePositionWithOrigin(parentNode, parentNode.origin || nodeOrigin).positionAbsolute
296
+ : { x: 0, y: 0 };
297
+ let currentExtent = clampNodeExtent(node, node.extent || nodeExtent);
286
298
  if (node.extent === 'parent' && !node.expandParent) {
287
- const nodeWidth = node.computed?.width;
288
- const nodeHeight = node.computed?.height;
289
- if (node.parentNode && nodeWidth && nodeHeight) {
290
- const currNodeOrigin = node.origin || nodeOrigin;
291
- currentExtent =
292
- parentNode && isNumeric(parentNode.computed?.width) && isNumeric(parentNode.computed?.height)
293
- ? [
294
- [parentPos.x + nodeWidth * currNodeOrigin[0], parentPos.y + nodeHeight * currNodeOrigin[1]],
295
- [
296
- parentPos.x + (parentNode.computed?.width ?? 0) - nodeWidth + nodeWidth * currNodeOrigin[0],
297
- parentPos.y + (parentNode.computed?.height ?? 0) - nodeHeight + nodeHeight * currNodeOrigin[1],
298
- ],
299
- ]
300
- : currentExtent;
299
+ if (!parentNode) {
300
+ onError?.('005', errorMessages['error005']());
301
301
  }
302
302
  else {
303
- onError?.('005', errorMessages['error005']());
304
- currentExtent = clampedNodeExtent;
303
+ const nodeWidth = node.computed?.width;
304
+ const nodeHeight = node.computed?.height;
305
+ const parentWidth = parentNode?.computed?.width;
306
+ const parentHeight = parentNode?.computed?.height;
307
+ if (nodeWidth && nodeHeight && parentWidth && parentHeight) {
308
+ const currNodeOrigin = node.origin || nodeOrigin;
309
+ const extentX = parentX + nodeWidth * currNodeOrigin[0];
310
+ const extentY = parentY + nodeHeight * currNodeOrigin[1];
311
+ currentExtent = [
312
+ [extentX, extentY],
313
+ [extentX + parentWidth - nodeWidth, extentY + parentHeight - nodeHeight],
314
+ ];
315
+ }
305
316
  }
306
317
  }
307
- else if (node.extent && node.parentNode && node.extent !== 'parent') {
318
+ else if (parentNode && isCoordinateExtent(node.extent)) {
308
319
  currentExtent = [
309
- [node.extent[0][0] + parentPos.x, node.extent[0][1] + parentPos.y],
310
- [node.extent[1][0] + parentPos.x, node.extent[1][1] + parentPos.y],
320
+ [node.extent[0][0] + parentX, node.extent[0][1] + parentY],
321
+ [node.extent[1][0] + parentX, node.extent[1][1] + parentY],
311
322
  ];
312
323
  }
313
- const positionAbsolute = currentExtent && currentExtent !== 'parent'
324
+ const positionAbsolute = isCoordinateExtent(currentExtent)
314
325
  ? clampPosition(nextPosition, currentExtent)
315
326
  : nextPosition;
316
327
  return {
317
328
  position: {
318
- x: positionAbsolute.x - parentPos.x,
319
- y: positionAbsolute.y - parentPos.y,
329
+ x: positionAbsolute.x - parentX,
330
+ y: positionAbsolute.y - parentY,
320
331
  },
321
332
  positionAbsolute,
322
333
  };
@@ -346,7 +357,7 @@ async function getElementsToRemove({ nodesToRemove = [], edgesToRemove = [], nod
346
357
  }
347
358
  const edgeIds = edgesToRemove.map((edge) => edge.id);
348
359
  const deletableEdges = edges.filter((edge) => edge.deletable !== false);
349
- const connectedEdges = getConnectedEdgesBase(matchingNodes, deletableEdges);
360
+ const connectedEdges = getConnectedEdges(matchingNodes, deletableEdges);
350
361
  const matchingEdges = connectedEdges;
351
362
  for (const edge of deletableEdges) {
352
363
  const isIncluded = edgeIds.includes(edge.id);
@@ -503,6 +514,9 @@ const getViewportForBounds = (bounds, width, height, minZoom, maxZoom, padding)
503
514
  return { x, y, zoom: clampedZoom };
504
515
  };
505
516
  const isMacOs = () => typeof navigator !== 'undefined' && navigator?.userAgent?.indexOf('Mac') >= 0;
517
+ function isCoordinateExtent(extent) {
518
+ return extent !== undefined && extent !== 'parent';
519
+ }
506
520
 
507
521
  function getPointerPosition(event, { snapGrid = [0, 0], snapToGrid = false, transform }) {
508
522
  const { x, y } = getEventPosition(event);
@@ -700,7 +714,7 @@ const connectionExists = (edge, edges) => {
700
714
  * @param edges - The array of all current edges
701
715
  * @returns A new array of edges with the new edge added
702
716
  */
703
- const addEdgeBase = (edgeParams, edges) => {
717
+ const addEdge = (edgeParams, edges) => {
704
718
  if (!edgeParams.source || !edgeParams.target) {
705
719
  devWarn('006', errorMessages['error006']());
706
720
  return edges;
@@ -734,7 +748,7 @@ const addEdgeBase = (edgeParams, edges) => {
734
748
  * @param options.shouldReplaceId - should the id of the old edge be replaced with the new connection id
735
749
  * @returns the updated edges array
736
750
  */
737
- const updateEdgeBase = (oldEdge, newConnection, edges, options = { shouldReplaceId: true }) => {
751
+ const updateEdge = (oldEdge, newConnection, edges, options = { shouldReplaceId: true }) => {
738
752
  const { id: oldEdgeId, ...rest } = oldEdge;
739
753
  if (!newConnection.source || !newConnection.target) {
740
754
  devWarn('006', errorMessages['error006']());
@@ -1048,13 +1062,8 @@ function getHandle(bounds, handleId) {
1048
1062
  if (!bounds) {
1049
1063
  return null;
1050
1064
  }
1051
- if (bounds.length === 1 || !handleId) {
1052
- return bounds[0];
1053
- }
1054
- else if (handleId) {
1055
- return bounds.find((d) => d.id === handleId) || null;
1056
- }
1057
- return null;
1065
+ // if no handleId is given, we use the first handle, otherwise we check for the id
1066
+ return (!handleId ? bounds[0] : bounds.find((d) => d.id === handleId)) || null;
1058
1067
  }
1059
1068
 
1060
1069
  function getMarkerId(marker, id) {
@@ -1070,16 +1079,16 @@ function getMarkerId(marker, id) {
1070
1079
  .map((key) => `${key}=${marker[key]}`)
1071
1080
  .join('&')}`;
1072
1081
  }
1073
- function createMarkerIds(edges, { id, defaultColor }) {
1074
- const ids = [];
1082
+ function createMarkerIds(edges, { id, defaultColor, defaultMarkerStart, defaultMarkerEnd, }) {
1083
+ const ids = new Set();
1075
1084
  return edges
1076
1085
  .reduce((markers, edge) => {
1077
- [edge.markerStart, edge.markerEnd].forEach((marker) => {
1086
+ [edge.markerStart || defaultMarkerStart, edge.markerEnd || defaultMarkerEnd].forEach((marker) => {
1078
1087
  if (marker && typeof marker === 'object') {
1079
1088
  const markerId = getMarkerId(marker, id);
1080
- if (!ids.includes(markerId)) {
1089
+ if (!ids.has(markerId)) {
1081
1090
  markers.push({ id: markerId, color: marker.color || defaultColor, ...marker });
1082
- ids.push(markerId);
1091
+ ids.add(markerId);
1083
1092
  }
1084
1093
  }
1085
1094
  });
@@ -1201,7 +1210,7 @@ function calculateXYZPosition(node, nodes, nodeLookup, result, nodeOrigin) {
1201
1210
  return result;
1202
1211
  }
1203
1212
  const parentNode = nodeLookup.get(node.parentNode);
1204
- const parentNodePosition = getNodePositionWithOrigin(parentNode, parentNode?.origin || nodeOrigin);
1213
+ const { position: parentNodePosition } = getNodePositionWithOrigin(parentNode, parentNode?.origin || nodeOrigin);
1205
1214
  return calculateXYZPosition(parentNode, nodes, nodeLookup, {
1206
1215
  x: (result.x ?? 0) + parentNodePosition.x,
1207
1216
  y: (result.y ?? 0) + parentNodePosition.y,
@@ -1351,6 +1360,7 @@ function getEventHandlerParams({ nodeId, dragItems, nodeLookup, }) {
1351
1360
  return [nodeId ? nodesFromDragItems.find((n) => n.id === nodeId) : nodesFromDragItems[0], nodesFromDragItems];
1352
1361
  }
1353
1362
 
1363
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1354
1364
  function XYDrag({ domNode, onNodeMouseDown, getStoreItems, onDragStart, onDrag, onDragStop, }) {
1355
1365
  let lastPos = { x: null, y: null };
1356
1366
  let autoPanId = 0;
@@ -1364,12 +1374,12 @@ function XYDrag({ domNode, onNodeMouseDown, getStoreItems, onDragStart, onDrag,
1364
1374
  // public functions
1365
1375
  function update({ noDragClassName, handleSelector, domNode, isSelectable, nodeId }) {
1366
1376
  function updateNodes({ x, y }) {
1367
- const { nodes, nodeLookup, nodeExtent, snapGrid, snapToGrid, nodeOrigin, onNodeDrag, onSelectionDrag, onError, updateNodePositions, } = getStoreItems();
1377
+ const { nodeLookup, nodeExtent, snapGrid, snapToGrid, nodeOrigin, onNodeDrag, onSelectionDrag, onError, updateNodePositions, } = getStoreItems();
1368
1378
  lastPos = { x, y };
1369
1379
  let hasChange = false;
1370
1380
  let nodesBox = { x: 0, y: 0, x2: 0, y2: 0 };
1371
1381
  if (dragItems.length > 1 && nodeExtent) {
1372
- const rect = getNodesBounds(dragItems, nodeOrigin);
1382
+ const rect = getNodesBounds(dragItems, { nodeOrigin });
1373
1383
  nodesBox = rectToBox(rect);
1374
1384
  }
1375
1385
  dragItems = dragItems.map((n) => {
@@ -1391,11 +1401,18 @@ function XYDrag({ domNode, onNodeMouseDown, getStoreItems, onDragStart, onDrag,
1391
1401
  adjustedNodeExtent[1][1] =
1392
1402
  n.computed.positionAbsolute.y + (n.computed?.height ?? 0) - nodesBox.y2 + nodeExtent[1][1];
1393
1403
  }
1394
- const updatedPos = calcNextPosition(n, nextPosition, nodes, adjustedNodeExtent, nodeOrigin, onError);
1404
+ const { position, positionAbsolute } = calculateNodePosition({
1405
+ nodeId: n.id,
1406
+ nextPosition,
1407
+ nodeLookup,
1408
+ nodeExtent: adjustedNodeExtent,
1409
+ nodeOrigin,
1410
+ onError,
1411
+ });
1395
1412
  // we want to make sure that we only fire a change event when there is a change
1396
- hasChange = hasChange || n.position.x !== updatedPos.position.x || n.position.y !== updatedPos.position.y;
1397
- n.position = updatedPos.position;
1398
- n.computed.positionAbsolute = updatedPos.positionAbsolute;
1413
+ hasChange = hasChange || n.position.x !== position.x || n.position.y !== position.y;
1414
+ n.position = position;
1415
+ n.computed.positionAbsolute = positionAbsolute;
1399
1416
  return n;
1400
1417
  });
1401
1418
  if (!hasChange) {
@@ -1610,7 +1627,7 @@ function getConnectionStatus(isInsideConnectionRadius, isHandleValid) {
1610
1627
 
1611
1628
  const alwaysValid = () => true;
1612
1629
  let connectionStartHandle = null;
1613
- function onPointerDown(event, { connectionMode, connectionRadius, handleId, nodeId, edgeUpdaterType, isTarget, domNode, nodes, lib, autoPanOnConnect, panBy, cancelConnection, onConnectStart, onConnect, onConnectEnd, isValidConnection = alwaysValid, onEdgeUpdateEnd, updateConnection, getTransform, }) {
1630
+ function onPointerDown(event, { connectionMode, connectionRadius, handleId, nodeId, edgeUpdaterType, isTarget, domNode, nodes, lib, autoPanOnConnect, flowId, panBy, cancelConnection, onConnectStart, onConnect, onConnectEnd, isValidConnection = alwaysValid, onEdgeUpdateEnd, updateConnection, getTransform, }) {
1614
1631
  // when xyflow is used inside a shadow root we can't use document
1615
1632
  const doc = getHostForElement(event.target);
1616
1633
  let autoPanId = 0;
@@ -1674,6 +1691,7 @@ function onPointerDown(event, { connectionMode, connectionRadius, handleId, node
1674
1691
  isValidConnection,
1675
1692
  doc,
1676
1693
  lib,
1694
+ flowId,
1677
1695
  });
1678
1696
  handleDomNode = result.handleDomNode;
1679
1697
  connection = result.connection;
@@ -1729,9 +1747,11 @@ function onPointerDown(event, { connectionMode, connectionRadius, handleId, node
1729
1747
  doc.addEventListener('touchend', onPointerUp);
1730
1748
  }
1731
1749
  // checks if and returns connection in fom of an object { source: 123, target: 312 }
1732
- function isValidHandle(event, { handle, connectionMode, fromNodeId, fromHandleId, fromType, doc, lib, isValidConnection = alwaysValid, }) {
1750
+ function isValidHandle(event, { handle, connectionMode, fromNodeId, fromHandleId, fromType, doc, lib, flowId, isValidConnection = alwaysValid, }) {
1733
1751
  const isTarget = fromType === 'target';
1734
- const handleDomNode = doc.querySelector(`.${lib}-flow__handle[data-id="${handle?.nodeId}-${handle?.id}-${handle?.type}"]`);
1752
+ const handleDomNode = handle
1753
+ ? doc.querySelector(`.${lib}-flow__handle[data-id="${flowId}-${handle?.nodeId}-${handle?.id}-${handle?.type}"]`)
1754
+ : null;
1735
1755
  const { x, y } = getEventPosition(event);
1736
1756
  const handleBelow = doc.elementFromPoint(x, y);
1737
1757
  // we always want to prioritize the handle below the mouse cursor over the closest distance handle,
@@ -2390,4 +2410,4 @@ function XYResizer({ domNode, nodeId, getStoreItems, onChange }) {
2390
2410
  };
2391
2411
  }
2392
2412
 
2393
- export { ConnectionLineType, ConnectionMode, MarkerType, PanOnScrollMode, Position, ResizeControlVariant, SelectionMode, XYDrag, XYHandle, XYMinimap, XYPanZoom, XYResizer, XY_RESIZER_HANDLE_POSITIONS, XY_RESIZER_LINE_POSITIONS, addEdgeBase, adoptUserProvidedNodes, areConnectionMapsEqual, boxToRect, calcAutoPan, calcNextPosition, clamp, clampPosition, createMarkerIds, devWarn, elementSelectionKeys, errorMessages, fitView, getBezierEdgeCenter, getBezierPath, getBoundsOfBoxes, getBoundsOfRects, getConnectedEdgesBase, getDimensions, getEdgeCenter, getEdgePosition, getElementsToRemove, getElevatedEdgeZIndex, getEventPosition, getHandleBounds, getHostForElement, getIncomersBase, getMarkerId, getNodePositionWithOrigin, getNodeToolbarTransform, getNodesBounds, getNodesInside, getOutgoersBase, getOverlappingArea, getPointerPosition, getPositionWithOrigin, getSmoothStepPath, getStraightPath, getViewportForBounds, handleConnectionChange, infiniteExtent, internalsSymbol, isEdgeBase, isEdgeVisible, isInputDOMNode, isMacOs, isMouseEvent, isNodeBase, isNumeric, isRectObject, nodeToBox, nodeToRect, panBy, pointToRendererPoint, rectToBox, rendererPointToPoint, snapPosition, updateAbsolutePositions, updateConnectionLookup, updateEdgeBase, updateNodeDimensions };
2413
+ export { ConnectionLineType, ConnectionMode, MarkerType, PanOnScrollMode, Position, ResizeControlVariant, SelectionMode, XYDrag, XYHandle, XYMinimap, XYPanZoom, XYResizer, XY_RESIZER_HANDLE_POSITIONS, XY_RESIZER_LINE_POSITIONS, addEdge, adoptUserProvidedNodes, areConnectionMapsEqual, boxToRect, calcAutoPan, calculateNodePosition, clamp, clampPosition, createMarkerIds, devWarn, elementSelectionKeys, errorMessages, fitView, getBezierEdgeCenter, getBezierPath, getBoundsOfBoxes, getBoundsOfRects, getConnectedEdges, getDimensions, getEdgeCenter, getEdgePosition, getElementsToRemove, getElevatedEdgeZIndex, getEventPosition, getHandleBounds, getHostForElement, getIncomers, getMarkerId, getNodePositionWithOrigin, getNodeToolbarTransform, getNodesBounds, getNodesInside, getOutgoers, getOverlappingArea, getPointerPosition, getPositionWithOrigin, getSmoothStepPath, getStraightPath, getViewportForBounds, handleConnectionChange, infiniteExtent, internalsSymbol, isCoordinateExtent, isEdgeBase, isEdgeVisible, isInputDOMNode, isMacOs, isMouseEvent, isNodeBase, isNumeric, isRectObject, nodeToBox, nodeToRect, panBy, pointToRendererPoint, rectToBox, rendererPointToPoint, snapPosition, updateAbsolutePositions, updateConnectionLookup, updateEdge, updateNodeDimensions };