@xyflow/system 0.0.32 → 0.0.34

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/index.js CHANGED
@@ -266,22 +266,25 @@ const getConnectedEdges = (nodes, edges) => {
266
266
  });
267
267
  return edges.filter((edge) => nodeIds.has(edge.source) || nodeIds.has(edge.target));
268
268
  };
269
- function fitView({ nodeLookup, width, height, panZoom, minZoom, maxZoom }, options) {
270
- const filteredNodes = new Map();
269
+ function getFitViewNodes(nodeLookup, options) {
270
+ const fitViewNodes = new Map();
271
271
  const optionNodeIds = options?.nodes ? new Set(options.nodes.map((node) => node.id)) : null;
272
272
  nodeLookup.forEach((n) => {
273
273
  const isVisible = n.measured.width && n.measured.height && (options?.includeHiddenNodes || !n.hidden);
274
274
  if (isVisible && (!optionNodeIds || optionNodeIds.has(n.id))) {
275
- filteredNodes.set(n.id, n);
275
+ fitViewNodes.set(n.id, n);
276
276
  }
277
277
  });
278
- if (filteredNodes.size > 0) {
279
- const bounds = getInternalNodesBounds(filteredNodes);
280
- const viewport = getViewportForBounds(bounds, width, height, options?.minZoom ?? minZoom, options?.maxZoom ?? maxZoom, options?.padding ?? 0.1);
281
- panZoom.setViewport(viewport, { duration: options?.duration });
282
- return true;
278
+ return fitViewNodes;
279
+ }
280
+ async function fitView({ nodes, width, height, panZoom, minZoom, maxZoom }, options) {
281
+ if (nodes.size === 0) {
282
+ return Promise.resolve(false);
283
283
  }
284
- return false;
284
+ const bounds = getInternalNodesBounds(nodes);
285
+ const viewport = getViewportForBounds(bounds, width, height, options?.minZoom ?? minZoom, options?.maxZoom ?? maxZoom, options?.padding ?? 0.1);
286
+ await panZoom.setViewport(viewport, { duration: options?.duration });
287
+ return Promise.resolve(true);
285
288
  }
286
289
  /**
287
290
  * This function clamps the passed extend by the node's width and height.
@@ -1402,11 +1405,11 @@ function updateNodeInternals(updates, nodeLookup, parentLookup, domNode, nodeOri
1402
1405
  }
1403
1406
  return { changes, updatedInternals };
1404
1407
  }
1405
- function panBy({ delta, panZoom, transform, translateExtent, width, height, }) {
1408
+ async function panBy({ delta, panZoom, transform, translateExtent, width, height, }) {
1406
1409
  if (!panZoom || (!delta.x && !delta.y)) {
1407
- return false;
1410
+ return Promise.resolve(false);
1408
1411
  }
1409
- const nextViewport = panZoom.setViewportConstrained({
1412
+ const nextViewport = await panZoom.setViewportConstrained({
1410
1413
  x: transform[0] + delta.x,
1411
1414
  y: transform[1] + delta.y,
1412
1415
  zoom: transform[2],
@@ -1416,7 +1419,7 @@ function panBy({ delta, panZoom, transform, translateExtent, width, height, }) {
1416
1419
  ], translateExtent);
1417
1420
  const transformChanged = !!nextViewport &&
1418
1421
  (nextViewport.x !== transform[0] || nextViewport.y !== transform[1] || nextViewport.k !== transform[2]);
1419
- return transformChanged;
1422
+ return Promise.resolve(transformChanged);
1420
1423
  }
1421
1424
  function updateConnectionLookup(connectionLookup, edgeLookup, edges) {
1422
1425
  connectionLookup.clear();
@@ -1511,7 +1514,7 @@ function getDragItems(nodeLookup, nodesDraggable, mousePos, nodeId) {
1511
1514
  // returns two params:
1512
1515
  // 1. the dragged node (or the first of the list, if we are dragging a node selection)
1513
1516
  // 2. array of selected nodes (for multi selections)
1514
- function getEventHandlerParams({ nodeId, dragItems, nodeLookup, }) {
1517
+ function getEventHandlerParams({ nodeId, dragItems, nodeLookup, dragging = true, }) {
1515
1518
  const nodesFromDragItems = [];
1516
1519
  for (const [id, dragItem] of dragItems) {
1517
1520
  const node = nodeLookup.get(id)?.internals.userNode;
@@ -1519,6 +1522,7 @@ function getEventHandlerParams({ nodeId, dragItems, nodeLookup, }) {
1519
1522
  nodesFromDragItems.push({
1520
1523
  ...node,
1521
1524
  position: dragItem.position,
1525
+ dragging,
1522
1526
  });
1523
1527
  }
1524
1528
  }
@@ -1530,6 +1534,7 @@ function getEventHandlerParams({ nodeId, dragItems, nodeLookup, }) {
1530
1534
  {
1531
1535
  ...node,
1532
1536
  position: dragItems.get(nodeId)?.position || node.position,
1537
+ dragging,
1533
1538
  },
1534
1539
  nodesFromDragItems,
1535
1540
  ];
@@ -1610,7 +1615,7 @@ function XYDrag({ onNodeMouseDown, getStoreItems, onDragStart, onDrag, onDragSto
1610
1615
  }
1611
1616
  }
1612
1617
  }
1613
- function autoPan() {
1618
+ async function autoPan() {
1614
1619
  if (!containerBounds) {
1615
1620
  return;
1616
1621
  }
@@ -1619,7 +1624,7 @@ function XYDrag({ onNodeMouseDown, getStoreItems, onDragStart, onDrag, onDragSto
1619
1624
  if (xMovement !== 0 || yMovement !== 0) {
1620
1625
  lastPos.x = (lastPos.x ?? 0) - xMovement / transform[2];
1621
1626
  lastPos.y = (lastPos.y ?? 0) - yMovement / transform[2];
1622
- if (panBy({ x: xMovement, y: yMovement })) {
1627
+ if (await panBy({ x: xMovement, y: yMovement })) {
1623
1628
  updateNodes(lastPos, null);
1624
1629
  }
1625
1630
  }
@@ -1708,6 +1713,7 @@ function XYDrag({ onNodeMouseDown, getStoreItems, onDragStart, onDrag, onDragSto
1708
1713
  nodeId,
1709
1714
  dragItems,
1710
1715
  nodeLookup,
1716
+ dragging: false,
1711
1717
  });
1712
1718
  onDragStop?.(event.sourceEvent, dragItems, currentNode, currentNodes);
1713
1719
  onNodeDragStop?.(event.sourceEvent, currentNode, currentNodes);
@@ -2085,7 +2091,13 @@ const transformToViewport = (transform) => ({
2085
2091
  const viewportToTransform = ({ x, y, zoom }) => zoomIdentity.translate(x, y).scale(zoom);
2086
2092
  const isWrappedWithClass = (event, className) => event.target.closest(`.${className}`);
2087
2093
  const isRightClickPan = (panOnDrag, usedButton) => usedButton === 2 && Array.isArray(panOnDrag) && panOnDrag.includes(2);
2088
- const getD3Transition = (selection, duration = 0) => typeof duration === 'number' && duration > 0 ? selection.transition().duration(duration) : selection;
2094
+ const getD3Transition = (selection, duration = 0, onEnd = () => { }) => {
2095
+ const hasDuration = typeof duration === 'number' && duration > 0;
2096
+ if (!hasDuration) {
2097
+ onEnd();
2098
+ }
2099
+ return hasDuration ? selection.transition().duration(duration).on('end', onEnd) : selection;
2100
+ };
2089
2101
  const wheelDelta = (event) => {
2090
2102
  const factor = event.ctrlKey && isMacOs() ? 10 : 1;
2091
2103
  return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 0.002) * factor;
@@ -2259,7 +2271,7 @@ function createFilter({ zoomActivationKeyPressed, zoomOnScroll, zoomOnPinch, pan
2259
2271
  };
2260
2272
  }
2261
2273
 
2262
- function XYPanZoom({ domNode, minZoom, maxZoom, translateExtent, viewport, onPanZoom, onPanZoomStart, onPanZoomEnd, onTransformChange, onDraggingChange, }) {
2274
+ function XYPanZoom({ domNode, minZoom, maxZoom, paneClickDistance, translateExtent, viewport, onPanZoom, onPanZoomStart, onPanZoomEnd, onTransformChange, onDraggingChange, }) {
2263
2275
  const zoomPanValues = {
2264
2276
  isZoomingOrPanning: false,
2265
2277
  usedRightMouseButton: false,
@@ -2270,7 +2282,10 @@ function XYPanZoom({ domNode, minZoom, maxZoom, translateExtent, viewport, onPan
2270
2282
  isPanScrolling: false,
2271
2283
  };
2272
2284
  const bbox = domNode.getBoundingClientRect();
2273
- const d3ZoomInstance = zoom().scaleExtent([minZoom, maxZoom]).translateExtent(translateExtent);
2285
+ const d3ZoomInstance = zoom()
2286
+ .clickDistance(!isNumeric(paneClickDistance) || paneClickDistance < 0 ? 0 : paneClickDistance)
2287
+ .scaleExtent([minZoom, maxZoom])
2288
+ .translateExtent(translateExtent);
2274
2289
  const d3Selection = select(domNode).call(d3ZoomInstance);
2275
2290
  setViewportConstrained({
2276
2291
  x: viewport.x,
@@ -2285,8 +2300,11 @@ function XYPanZoom({ domNode, minZoom, maxZoom, translateExtent, viewport, onPan
2285
2300
  d3ZoomInstance.wheelDelta(wheelDelta);
2286
2301
  function setTransform(transform, options) {
2287
2302
  if (d3Selection) {
2288
- d3ZoomInstance?.transform(getD3Transition(d3Selection, options?.duration), transform);
2303
+ return new Promise((resolve) => {
2304
+ d3ZoomInstance?.transform(getD3Transition(d3Selection, options?.duration, () => resolve(true)), transform);
2305
+ });
2289
2306
  }
2307
+ return Promise.resolve(false);
2290
2308
  }
2291
2309
  // public functions
2292
2310
  function update({ noWheelClassName, noPanClassName, onPaneContextMenu, userSelectionActive, panOnScroll, panOnDrag, panOnScrollMode, panOnScrollSpeed, preventScrolling, zoomOnPinch, zoomOnScroll, zoomOnDoubleClick, zoomActivationKeyPressed, lib, }) {
@@ -2367,18 +2385,18 @@ function XYPanZoom({ domNode, minZoom, maxZoom, translateExtent, viewport, onPan
2367
2385
  function destroy() {
2368
2386
  d3ZoomInstance.on('zoom', null);
2369
2387
  }
2370
- function setViewportConstrained(viewport, extent, translateExtent) {
2388
+ async function setViewportConstrained(viewport, extent, translateExtent) {
2371
2389
  const nextTransform = viewportToTransform(viewport);
2372
2390
  const contrainedTransform = d3ZoomInstance?.constrain()(nextTransform, extent, translateExtent);
2373
2391
  if (contrainedTransform) {
2374
- setTransform(contrainedTransform);
2392
+ await setTransform(contrainedTransform);
2375
2393
  }
2376
- return contrainedTransform;
2394
+ return new Promise((resolve) => resolve(contrainedTransform));
2377
2395
  }
2378
- function setViewport(viewport, options) {
2396
+ async function setViewport(viewport, options) {
2379
2397
  const nextTransform = viewportToTransform(viewport);
2380
- setTransform(nextTransform, options);
2381
- return nextTransform;
2398
+ await setTransform(nextTransform, options);
2399
+ return new Promise((resolve) => resolve(nextTransform));
2382
2400
  }
2383
2401
  function syncViewport(viewport) {
2384
2402
  if (d3Selection) {
@@ -2399,13 +2417,19 @@ function XYPanZoom({ domNode, minZoom, maxZoom, translateExtent, viewport, onPan
2399
2417
  }
2400
2418
  function scaleTo(zoom, options) {
2401
2419
  if (d3Selection) {
2402
- d3ZoomInstance?.scaleTo(getD3Transition(d3Selection, options?.duration), zoom);
2420
+ return new Promise((resolve) => {
2421
+ d3ZoomInstance?.scaleTo(getD3Transition(d3Selection, options?.duration, () => resolve(true)), zoom);
2422
+ });
2403
2423
  }
2424
+ return Promise.resolve(false);
2404
2425
  }
2405
2426
  function scaleBy(factor, options) {
2406
2427
  if (d3Selection) {
2407
- d3ZoomInstance?.scaleBy(getD3Transition(d3Selection, options?.duration), factor);
2428
+ return new Promise((resolve) => {
2429
+ d3ZoomInstance?.scaleBy(getD3Transition(d3Selection, options?.duration, () => resolve(true)), factor);
2430
+ });
2408
2431
  }
2432
+ return Promise.resolve(false);
2409
2433
  }
2410
2434
  function setScaleExtent(scaleExtent) {
2411
2435
  d3ZoomInstance?.scaleExtent(scaleExtent);
@@ -2413,6 +2437,10 @@ function XYPanZoom({ domNode, minZoom, maxZoom, translateExtent, viewport, onPan
2413
2437
  function setTranslateExtent(translateExtent) {
2414
2438
  d3ZoomInstance?.translateExtent(translateExtent);
2415
2439
  }
2440
+ function setClickDistance(distance) {
2441
+ const validDistance = !isNumeric(distance) || distance < 0 ? 0 : distance;
2442
+ d3ZoomInstance?.clickDistance(validDistance);
2443
+ }
2416
2444
  return {
2417
2445
  update,
2418
2446
  destroy,
@@ -2424,6 +2452,7 @@ function XYPanZoom({ domNode, minZoom, maxZoom, translateExtent, viewport, onPan
2424
2452
  setScaleExtent,
2425
2453
  setTranslateExtent,
2426
2454
  syncViewport,
2455
+ setClickDistance,
2427
2456
  };
2428
2457
  }
2429
2458
 
@@ -2829,4 +2858,4 @@ function XYResizer({ domNode, nodeId, getStoreItems, onChange, onEnd }) {
2829
2858
  };
2830
2859
  }
2831
2860
 
2832
- export { ConnectionLineType, ConnectionMode, MarkerType, PanOnScrollMode, Position, ResizeControlVariant, SelectionMode, XYDrag, XYHandle, XYMinimap, XYPanZoom, XYResizer, XY_RESIZER_HANDLE_POSITIONS, XY_RESIZER_LINE_POSITIONS, addEdge, adoptUserNodes, areConnectionMapsEqual, boxToRect, calcAutoPan, calculateNodePosition, clamp, clampPosition, createMarkerIds, devWarn, elementSelectionKeys, errorMessages, evaluateAbsolutePosition, fitView, getBezierEdgeCenter, getBezierPath, getBoundsOfBoxes, getBoundsOfRects, getConnectedEdges, getConnectionStatus, getDimensions, getEdgeCenter, getEdgePosition, getElementsToRemove, getElevatedEdgeZIndex, getEventPosition, getHandleBounds, getHandlePosition, getHostForElement, getIncomers, getInternalNodesBounds, getMarkerId, getNodeDimensions, getNodePositionWithOrigin, getNodeToolbarTransform, getNodesBounds, getNodesInside, getOutgoers, getOverlappingArea, getPointerPosition, getSmoothStepPath, getStraightPath, getViewportForBounds, handleConnectionChange, handleExpandParent, infiniteExtent, initialConnection, isCoordinateExtent, isEdgeBase, isEdgeVisible, isInputDOMNode, isInternalNodeBase, isMacOs, isMouseEvent, isNodeBase, isNumeric, isRectObject, nodeHasDimensions, nodeToBox, nodeToRect, oppositePosition, panBy, pointToRendererPoint, reconnectEdge, rectToBox, rendererPointToPoint, shallowNodeData, snapPosition, updateAbsolutePositions, updateConnectionLookup, updateNodeInternals };
2861
+ export { ConnectionLineType, ConnectionMode, MarkerType, PanOnScrollMode, Position, ResizeControlVariant, SelectionMode, XYDrag, XYHandle, XYMinimap, XYPanZoom, XYResizer, XY_RESIZER_HANDLE_POSITIONS, XY_RESIZER_LINE_POSITIONS, addEdge, adoptUserNodes, areConnectionMapsEqual, boxToRect, calcAutoPan, calculateNodePosition, clamp, clampPosition, createMarkerIds, devWarn, elementSelectionKeys, errorMessages, evaluateAbsolutePosition, fitView, getBezierEdgeCenter, getBezierPath, getBoundsOfBoxes, getBoundsOfRects, getConnectedEdges, getConnectionStatus, getDimensions, getEdgeCenter, getEdgePosition, getElementsToRemove, getElevatedEdgeZIndex, getEventPosition, getFitViewNodes, getHandleBounds, getHandlePosition, getHostForElement, getIncomers, getInternalNodesBounds, getMarkerId, getNodeDimensions, getNodePositionWithOrigin, getNodeToolbarTransform, getNodesBounds, getNodesInside, getOutgoers, getOverlappingArea, getPointerPosition, getSmoothStepPath, getStraightPath, getViewportForBounds, handleConnectionChange, handleExpandParent, infiniteExtent, initialConnection, isCoordinateExtent, isEdgeBase, isEdgeVisible, isInputDOMNode, isInternalNodeBase, isMacOs, isMouseEvent, isNodeBase, isNumeric, isRectObject, nodeHasDimensions, nodeToBox, nodeToRect, oppositePosition, panBy, pointToRendererPoint, reconnectEdge, rectToBox, rendererPointToPoint, shallowNodeData, snapPosition, updateAbsolutePositions, updateConnectionLookup, updateNodeInternals };
@@ -266,22 +266,25 @@ const getConnectedEdges = (nodes, edges) => {
266
266
  });
267
267
  return edges.filter((edge) => nodeIds.has(edge.source) || nodeIds.has(edge.target));
268
268
  };
269
- function fitView({ nodeLookup, width, height, panZoom, minZoom, maxZoom }, options) {
270
- const filteredNodes = new Map();
269
+ function getFitViewNodes(nodeLookup, options) {
270
+ const fitViewNodes = new Map();
271
271
  const optionNodeIds = options?.nodes ? new Set(options.nodes.map((node) => node.id)) : null;
272
272
  nodeLookup.forEach((n) => {
273
273
  const isVisible = n.measured.width && n.measured.height && (options?.includeHiddenNodes || !n.hidden);
274
274
  if (isVisible && (!optionNodeIds || optionNodeIds.has(n.id))) {
275
- filteredNodes.set(n.id, n);
275
+ fitViewNodes.set(n.id, n);
276
276
  }
277
277
  });
278
- if (filteredNodes.size > 0) {
279
- const bounds = getInternalNodesBounds(filteredNodes);
280
- const viewport = getViewportForBounds(bounds, width, height, options?.minZoom ?? minZoom, options?.maxZoom ?? maxZoom, options?.padding ?? 0.1);
281
- panZoom.setViewport(viewport, { duration: options?.duration });
282
- return true;
278
+ return fitViewNodes;
279
+ }
280
+ async function fitView({ nodes, width, height, panZoom, minZoom, maxZoom }, options) {
281
+ if (nodes.size === 0) {
282
+ return Promise.resolve(false);
283
283
  }
284
- return false;
284
+ const bounds = getInternalNodesBounds(nodes);
285
+ const viewport = getViewportForBounds(bounds, width, height, options?.minZoom ?? minZoom, options?.maxZoom ?? maxZoom, options?.padding ?? 0.1);
286
+ await panZoom.setViewport(viewport, { duration: options?.duration });
287
+ return Promise.resolve(true);
285
288
  }
286
289
  /**
287
290
  * This function clamps the passed extend by the node's width and height.
@@ -1402,11 +1405,11 @@ function updateNodeInternals(updates, nodeLookup, parentLookup, domNode, nodeOri
1402
1405
  }
1403
1406
  return { changes, updatedInternals };
1404
1407
  }
1405
- function panBy({ delta, panZoom, transform, translateExtent, width, height, }) {
1408
+ async function panBy({ delta, panZoom, transform, translateExtent, width, height, }) {
1406
1409
  if (!panZoom || (!delta.x && !delta.y)) {
1407
- return false;
1410
+ return Promise.resolve(false);
1408
1411
  }
1409
- const nextViewport = panZoom.setViewportConstrained({
1412
+ const nextViewport = await panZoom.setViewportConstrained({
1410
1413
  x: transform[0] + delta.x,
1411
1414
  y: transform[1] + delta.y,
1412
1415
  zoom: transform[2],
@@ -1416,7 +1419,7 @@ function panBy({ delta, panZoom, transform, translateExtent, width, height, }) {
1416
1419
  ], translateExtent);
1417
1420
  const transformChanged = !!nextViewport &&
1418
1421
  (nextViewport.x !== transform[0] || nextViewport.y !== transform[1] || nextViewport.k !== transform[2]);
1419
- return transformChanged;
1422
+ return Promise.resolve(transformChanged);
1420
1423
  }
1421
1424
  function updateConnectionLookup(connectionLookup, edgeLookup, edges) {
1422
1425
  connectionLookup.clear();
@@ -1511,7 +1514,7 @@ function getDragItems(nodeLookup, nodesDraggable, mousePos, nodeId) {
1511
1514
  // returns two params:
1512
1515
  // 1. the dragged node (or the first of the list, if we are dragging a node selection)
1513
1516
  // 2. array of selected nodes (for multi selections)
1514
- function getEventHandlerParams({ nodeId, dragItems, nodeLookup, }) {
1517
+ function getEventHandlerParams({ nodeId, dragItems, nodeLookup, dragging = true, }) {
1515
1518
  const nodesFromDragItems = [];
1516
1519
  for (const [id, dragItem] of dragItems) {
1517
1520
  const node = nodeLookup.get(id)?.internals.userNode;
@@ -1519,6 +1522,7 @@ function getEventHandlerParams({ nodeId, dragItems, nodeLookup, }) {
1519
1522
  nodesFromDragItems.push({
1520
1523
  ...node,
1521
1524
  position: dragItem.position,
1525
+ dragging,
1522
1526
  });
1523
1527
  }
1524
1528
  }
@@ -1530,6 +1534,7 @@ function getEventHandlerParams({ nodeId, dragItems, nodeLookup, }) {
1530
1534
  {
1531
1535
  ...node,
1532
1536
  position: dragItems.get(nodeId)?.position || node.position,
1537
+ dragging,
1533
1538
  },
1534
1539
  nodesFromDragItems,
1535
1540
  ];
@@ -1610,7 +1615,7 @@ function XYDrag({ onNodeMouseDown, getStoreItems, onDragStart, onDrag, onDragSto
1610
1615
  }
1611
1616
  }
1612
1617
  }
1613
- function autoPan() {
1618
+ async function autoPan() {
1614
1619
  if (!containerBounds) {
1615
1620
  return;
1616
1621
  }
@@ -1619,7 +1624,7 @@ function XYDrag({ onNodeMouseDown, getStoreItems, onDragStart, onDrag, onDragSto
1619
1624
  if (xMovement !== 0 || yMovement !== 0) {
1620
1625
  lastPos.x = (lastPos.x ?? 0) - xMovement / transform[2];
1621
1626
  lastPos.y = (lastPos.y ?? 0) - yMovement / transform[2];
1622
- if (panBy({ x: xMovement, y: yMovement })) {
1627
+ if (await panBy({ x: xMovement, y: yMovement })) {
1623
1628
  updateNodes(lastPos, null);
1624
1629
  }
1625
1630
  }
@@ -1708,6 +1713,7 @@ function XYDrag({ onNodeMouseDown, getStoreItems, onDragStart, onDrag, onDragSto
1708
1713
  nodeId,
1709
1714
  dragItems,
1710
1715
  nodeLookup,
1716
+ dragging: false,
1711
1717
  });
1712
1718
  onDragStop?.(event.sourceEvent, dragItems, currentNode, currentNodes);
1713
1719
  onNodeDragStop?.(event.sourceEvent, currentNode, currentNodes);
@@ -2085,7 +2091,13 @@ const transformToViewport = (transform) => ({
2085
2091
  const viewportToTransform = ({ x, y, zoom }) => zoomIdentity.translate(x, y).scale(zoom);
2086
2092
  const isWrappedWithClass = (event, className) => event.target.closest(`.${className}`);
2087
2093
  const isRightClickPan = (panOnDrag, usedButton) => usedButton === 2 && Array.isArray(panOnDrag) && panOnDrag.includes(2);
2088
- const getD3Transition = (selection, duration = 0) => typeof duration === 'number' && duration > 0 ? selection.transition().duration(duration) : selection;
2094
+ const getD3Transition = (selection, duration = 0, onEnd = () => { }) => {
2095
+ const hasDuration = typeof duration === 'number' && duration > 0;
2096
+ if (!hasDuration) {
2097
+ onEnd();
2098
+ }
2099
+ return hasDuration ? selection.transition().duration(duration).on('end', onEnd) : selection;
2100
+ };
2089
2101
  const wheelDelta = (event) => {
2090
2102
  const factor = event.ctrlKey && isMacOs() ? 10 : 1;
2091
2103
  return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 0.002) * factor;
@@ -2259,7 +2271,7 @@ function createFilter({ zoomActivationKeyPressed, zoomOnScroll, zoomOnPinch, pan
2259
2271
  };
2260
2272
  }
2261
2273
 
2262
- function XYPanZoom({ domNode, minZoom, maxZoom, translateExtent, viewport, onPanZoom, onPanZoomStart, onPanZoomEnd, onTransformChange, onDraggingChange, }) {
2274
+ function XYPanZoom({ domNode, minZoom, maxZoom, paneClickDistance, translateExtent, viewport, onPanZoom, onPanZoomStart, onPanZoomEnd, onTransformChange, onDraggingChange, }) {
2263
2275
  const zoomPanValues = {
2264
2276
  isZoomingOrPanning: false,
2265
2277
  usedRightMouseButton: false,
@@ -2270,7 +2282,10 @@ function XYPanZoom({ domNode, minZoom, maxZoom, translateExtent, viewport, onPan
2270
2282
  isPanScrolling: false,
2271
2283
  };
2272
2284
  const bbox = domNode.getBoundingClientRect();
2273
- const d3ZoomInstance = zoom().scaleExtent([minZoom, maxZoom]).translateExtent(translateExtent);
2285
+ const d3ZoomInstance = zoom()
2286
+ .clickDistance(!isNumeric(paneClickDistance) || paneClickDistance < 0 ? 0 : paneClickDistance)
2287
+ .scaleExtent([minZoom, maxZoom])
2288
+ .translateExtent(translateExtent);
2274
2289
  const d3Selection = select(domNode).call(d3ZoomInstance);
2275
2290
  setViewportConstrained({
2276
2291
  x: viewport.x,
@@ -2285,8 +2300,11 @@ function XYPanZoom({ domNode, minZoom, maxZoom, translateExtent, viewport, onPan
2285
2300
  d3ZoomInstance.wheelDelta(wheelDelta);
2286
2301
  function setTransform(transform, options) {
2287
2302
  if (d3Selection) {
2288
- d3ZoomInstance?.transform(getD3Transition(d3Selection, options?.duration), transform);
2303
+ return new Promise((resolve) => {
2304
+ d3ZoomInstance?.transform(getD3Transition(d3Selection, options?.duration, () => resolve(true)), transform);
2305
+ });
2289
2306
  }
2307
+ return Promise.resolve(false);
2290
2308
  }
2291
2309
  // public functions
2292
2310
  function update({ noWheelClassName, noPanClassName, onPaneContextMenu, userSelectionActive, panOnScroll, panOnDrag, panOnScrollMode, panOnScrollSpeed, preventScrolling, zoomOnPinch, zoomOnScroll, zoomOnDoubleClick, zoomActivationKeyPressed, lib, }) {
@@ -2367,18 +2385,18 @@ function XYPanZoom({ domNode, minZoom, maxZoom, translateExtent, viewport, onPan
2367
2385
  function destroy() {
2368
2386
  d3ZoomInstance.on('zoom', null);
2369
2387
  }
2370
- function setViewportConstrained(viewport, extent, translateExtent) {
2388
+ async function setViewportConstrained(viewport, extent, translateExtent) {
2371
2389
  const nextTransform = viewportToTransform(viewport);
2372
2390
  const contrainedTransform = d3ZoomInstance?.constrain()(nextTransform, extent, translateExtent);
2373
2391
  if (contrainedTransform) {
2374
- setTransform(contrainedTransform);
2392
+ await setTransform(contrainedTransform);
2375
2393
  }
2376
- return contrainedTransform;
2394
+ return new Promise((resolve) => resolve(contrainedTransform));
2377
2395
  }
2378
- function setViewport(viewport, options) {
2396
+ async function setViewport(viewport, options) {
2379
2397
  const nextTransform = viewportToTransform(viewport);
2380
- setTransform(nextTransform, options);
2381
- return nextTransform;
2398
+ await setTransform(nextTransform, options);
2399
+ return new Promise((resolve) => resolve(nextTransform));
2382
2400
  }
2383
2401
  function syncViewport(viewport) {
2384
2402
  if (d3Selection) {
@@ -2399,13 +2417,19 @@ function XYPanZoom({ domNode, minZoom, maxZoom, translateExtent, viewport, onPan
2399
2417
  }
2400
2418
  function scaleTo(zoom, options) {
2401
2419
  if (d3Selection) {
2402
- d3ZoomInstance?.scaleTo(getD3Transition(d3Selection, options?.duration), zoom);
2420
+ return new Promise((resolve) => {
2421
+ d3ZoomInstance?.scaleTo(getD3Transition(d3Selection, options?.duration, () => resolve(true)), zoom);
2422
+ });
2403
2423
  }
2424
+ return Promise.resolve(false);
2404
2425
  }
2405
2426
  function scaleBy(factor, options) {
2406
2427
  if (d3Selection) {
2407
- d3ZoomInstance?.scaleBy(getD3Transition(d3Selection, options?.duration), factor);
2428
+ return new Promise((resolve) => {
2429
+ d3ZoomInstance?.scaleBy(getD3Transition(d3Selection, options?.duration, () => resolve(true)), factor);
2430
+ });
2408
2431
  }
2432
+ return Promise.resolve(false);
2409
2433
  }
2410
2434
  function setScaleExtent(scaleExtent) {
2411
2435
  d3ZoomInstance?.scaleExtent(scaleExtent);
@@ -2413,6 +2437,10 @@ function XYPanZoom({ domNode, minZoom, maxZoom, translateExtent, viewport, onPan
2413
2437
  function setTranslateExtent(translateExtent) {
2414
2438
  d3ZoomInstance?.translateExtent(translateExtent);
2415
2439
  }
2440
+ function setClickDistance(distance) {
2441
+ const validDistance = !isNumeric(distance) || distance < 0 ? 0 : distance;
2442
+ d3ZoomInstance?.clickDistance(validDistance);
2443
+ }
2416
2444
  return {
2417
2445
  update,
2418
2446
  destroy,
@@ -2424,6 +2452,7 @@ function XYPanZoom({ domNode, minZoom, maxZoom, translateExtent, viewport, onPan
2424
2452
  setScaleExtent,
2425
2453
  setTranslateExtent,
2426
2454
  syncViewport,
2455
+ setClickDistance,
2427
2456
  };
2428
2457
  }
2429
2458
 
@@ -2829,4 +2858,4 @@ function XYResizer({ domNode, nodeId, getStoreItems, onChange, onEnd }) {
2829
2858
  };
2830
2859
  }
2831
2860
 
2832
- export { ConnectionLineType, ConnectionMode, MarkerType, PanOnScrollMode, Position, ResizeControlVariant, SelectionMode, XYDrag, XYHandle, XYMinimap, XYPanZoom, XYResizer, XY_RESIZER_HANDLE_POSITIONS, XY_RESIZER_LINE_POSITIONS, addEdge, adoptUserNodes, areConnectionMapsEqual, boxToRect, calcAutoPan, calculateNodePosition, clamp, clampPosition, createMarkerIds, devWarn, elementSelectionKeys, errorMessages, evaluateAbsolutePosition, fitView, getBezierEdgeCenter, getBezierPath, getBoundsOfBoxes, getBoundsOfRects, getConnectedEdges, getConnectionStatus, getDimensions, getEdgeCenter, getEdgePosition, getElementsToRemove, getElevatedEdgeZIndex, getEventPosition, getHandleBounds, getHandlePosition, getHostForElement, getIncomers, getInternalNodesBounds, getMarkerId, getNodeDimensions, getNodePositionWithOrigin, getNodeToolbarTransform, getNodesBounds, getNodesInside, getOutgoers, getOverlappingArea, getPointerPosition, getSmoothStepPath, getStraightPath, getViewportForBounds, handleConnectionChange, handleExpandParent, infiniteExtent, initialConnection, isCoordinateExtent, isEdgeBase, isEdgeVisible, isInputDOMNode, isInternalNodeBase, isMacOs, isMouseEvent, isNodeBase, isNumeric, isRectObject, nodeHasDimensions, nodeToBox, nodeToRect, oppositePosition, panBy, pointToRendererPoint, reconnectEdge, rectToBox, rendererPointToPoint, shallowNodeData, snapPosition, updateAbsolutePositions, updateConnectionLookup, updateNodeInternals };
2861
+ export { ConnectionLineType, ConnectionMode, MarkerType, PanOnScrollMode, Position, ResizeControlVariant, SelectionMode, XYDrag, XYHandle, XYMinimap, XYPanZoom, XYResizer, XY_RESIZER_HANDLE_POSITIONS, XY_RESIZER_LINE_POSITIONS, addEdge, adoptUserNodes, areConnectionMapsEqual, boxToRect, calcAutoPan, calculateNodePosition, clamp, clampPosition, createMarkerIds, devWarn, elementSelectionKeys, errorMessages, evaluateAbsolutePosition, fitView, getBezierEdgeCenter, getBezierPath, getBoundsOfBoxes, getBoundsOfRects, getConnectedEdges, getConnectionStatus, getDimensions, getEdgeCenter, getEdgePosition, getElementsToRemove, getElevatedEdgeZIndex, getEventPosition, getFitViewNodes, getHandleBounds, getHandlePosition, getHostForElement, getIncomers, getInternalNodesBounds, getMarkerId, getNodeDimensions, getNodePositionWithOrigin, getNodeToolbarTransform, getNodesBounds, getNodesInside, getOutgoers, getOverlappingArea, getPointerPosition, getSmoothStepPath, getStraightPath, getViewportForBounds, handleConnectionChange, handleExpandParent, infiniteExtent, initialConnection, isCoordinateExtent, isEdgeBase, isEdgeVisible, isInputDOMNode, isInternalNodeBase, isMacOs, isMouseEvent, isNodeBase, isNumeric, isRectObject, nodeHasDimensions, nodeToBox, nodeToRect, oppositePosition, panBy, pointToRendererPoint, reconnectEdge, rectToBox, rendererPointToPoint, shallowNodeData, snapPosition, updateAbsolutePositions, updateConnectionLookup, updateNodeInternals };
@@ -10,13 +10,13 @@ export type Project = (position: XYPosition) => XYPosition;
10
10
  export type OnMove = (event: MouseEvent | TouchEvent | null, viewport: Viewport) => void;
11
11
  export type OnMoveStart = OnMove;
12
12
  export type OnMoveEnd = OnMove;
13
- export type ZoomInOut = (options?: ViewportHelperFunctionOptions) => void;
14
- export type ZoomTo = (zoomLevel: number, options?: ViewportHelperFunctionOptions) => void;
13
+ export type ZoomInOut = (options?: ViewportHelperFunctionOptions) => Promise<boolean>;
14
+ export type ZoomTo = (zoomLevel: number, options?: ViewportHelperFunctionOptions) => Promise<boolean>;
15
15
  export type GetZoom = () => number;
16
16
  export type GetViewport = () => Viewport;
17
- export type SetViewport = (viewport: Viewport, options?: ViewportHelperFunctionOptions) => void;
18
- export type SetCenter = (x: number, y: number, options?: SetCenterOptions) => void;
19
- export type FitBounds = (bounds: Rect, options?: FitBoundsOptions) => void;
17
+ export type SetViewport = (viewport: Viewport, options?: ViewportHelperFunctionOptions) => Promise<boolean>;
18
+ export type SetCenter = (x: number, y: number, options?: SetCenterOptions) => Promise<boolean>;
19
+ export type FitBounds = (bounds: Rect, options?: FitBoundsOptions) => Promise<boolean>;
20
20
  export type Connection = {
21
21
  source: string;
22
22
  target: string;
@@ -40,7 +40,7 @@ export type OnConnect = (connection: Connection) => void;
40
40
  export type OnConnectEnd = (event: MouseEvent | TouchEvent) => void;
41
41
  export type IsValidConnection = (edge: EdgeBase | Connection) => boolean;
42
42
  export type FitViewParamsBase<NodeType extends NodeBase> = {
43
- nodeLookup: Map<string, InternalNodeBase<NodeType>>;
43
+ nodes: Map<string, InternalNodeBase<NodeType>>;
44
44
  width: number;
45
45
  height: number;
46
46
  panZoom: PanZoomInstance;
@@ -99,7 +99,7 @@ export type SelectionRect = Rect & {
99
99
  };
100
100
  export type OnError = (id: string, message: string) => void;
101
101
  export type UpdateNodePositions = (dragItems: Map<string, NodeDragItem | InternalNodeBase>, dragging?: boolean) => void;
102
- export type PanBy = (delta: XYPosition) => boolean;
102
+ export type PanBy = (delta: XYPosition) => Promise<boolean>;
103
103
  export declare const initialConnection: NoConnection;
104
104
  export type NoConnection = {
105
105
  inProgress: false;
@@ -1 +1 @@
1
- {"version":3,"file":"general.d.ts","sourceRoot":"","sources":["../../src/types/general.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAK5C,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAE9B,MAAM,MAAM,OAAO,GAAG,CAAC,QAAQ,EAAE,UAAU,KAAK,UAAU,CAAC;AAE3D,MAAM,MAAM,MAAM,GAAG,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI,EAAE,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC;AACzF,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AACjC,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B,MAAM,MAAM,SAAS,GAAG,C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,CAAC;IACvB,QAAQ,EAAE,QAAQ,CAAC;IAEnB,EAAE,EAAE,UAAU,CAAC;IACf,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,QAAQ,CAAC;IACrB,MAAM,EAAE,QAAQ,GAAG,IAAI,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,oBAAoB,GAAG,YAAY,CAAC;AAElE,MAAM,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;AAEjE,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,MAAM,CAAC;AAC9C,MAAM,MAAM,SAAS,GAAG,cAAc,GAAG,QAAQ,CAAC;AAElD,MAAM,MAAM,gBAAgB,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAE1E,MAAM,MAAM,kBAAkB,CAAC,QAAQ,SAAS,QAAQ,GAAG,QAAQ,EAAE,QAAQ,SAAS,QAAQ,GAAG,QAAQ,IAAI,CAAC,EAC5G,KAAK,EACL,KAAK,GACN,EAAE;IACD,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB,KAAK,OAAO,CAAC,OAAO,GAAG;IAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;IAAC,KAAK,EAAE,QAAQ,EAAE,CAAA;CAAE,CAAC,CAAC"}
@@ -6,6 +6,7 @@ export type PanZoomParams = {
6
6
  domNode: Element;
7
7
  minZoom: number;
8
8
  maxZoom: number;
9
+ paneClickDistance: number;
9
10
  viewport: Viewport;
10
11
  translateExtent: CoordinateExtent;
11
12
  onTransformChange: OnTransformChange;
@@ -38,12 +39,13 @@ export type PanZoomInstance = {
38
39
  update: (params: PanZoomUpdateOptions) => void;
39
40
  destroy: () => void;
40
41
  getViewport: () => Viewport;
41
- setViewport: (viewport: Viewport, options?: PanZoomTransformOptions) => ZoomTransform | undefined;
42
- setViewportConstrained: (viewport: Viewport, extent: CoordinateExtent, translateExtent: CoordinateExtent) => ZoomTransform | undefined;
42
+ setViewport: (viewport: Viewport, options?: PanZoomTransformOptions) => Promise<ZoomTransform | undefined>;
43
+ setViewportConstrained: (viewport: Viewport, extent: CoordinateExtent, translateExtent: CoordinateExtent) => Promise<ZoomTransform | undefined>;
43
44
  setScaleExtent: (scaleExtent: [number, number]) => void;
44
45
  setTranslateExtent: (translateExtent: CoordinateExtent) => void;
45
- scaleTo: (scale: number, options?: PanZoomTransformOptions) => void;
46
- scaleBy: (factor: number, options?: PanZoomTransformOptions) => void;
46
+ scaleTo: (scale: number, options?: PanZoomTransformOptions) => Promise<boolean>;
47
+ scaleBy: (factor: number, options?: PanZoomTransformOptions) => Promise<boolean>;
47
48
  syncViewport: (viewport: Viewport) => void;
49
+ setClickDistance: (distance: number) => void;
48
50
  };
49
51
  //# sourceMappingURL=panzoom.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"panzoom.d.ts","sourceRoot":"","sources":["../../src/types/panzoom.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,EAAE,eAAe,EAAE,KAAK,gBAAgB,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,IAAI,CAAC;AAE3F,MAAM,MAAM,gBAAgB,GAAG,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;AAC3D,MAAM,MAAM,iBAAiB,GAAG,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;AAE/D,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,QAAQ,CAAC;IACnB,eAAe,EAAE,gBAAgB,CAAC;IAClC,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,gBAAgB,EAA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CAAC;IACxC,cAAc,EAAE,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IACxD,kBAAkB,EAAE,CAAC,eAAe,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAChE,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,uBAAuB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAChF,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,uBAAuB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACjF,YAAY,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC;IAC3C,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C,CAAC"}
@@ -68,7 +68,8 @@ export declare const getNodesInside: <NodeType extends NodeBase = NodeBase>(node
68
68
  * @returns Array of edges that connect any of the given nodes with each other
69
69
  */
70
70
  export declare const getConnectedEdges: <NodeType extends NodeBase = NodeBase, EdgeType extends EdgeBase = EdgeBase>(nodes: NodeType[], edges: EdgeType[]) => EdgeType[];
71
- export declare function fitView<Params extends FitViewParamsBase<NodeBase>, Options extends FitViewOptionsBase<NodeBase>>({ nodeLookup, width, height, panZoom, minZoom, maxZoom }: Params, options?: Options): boolean;
71
+ export declare function getFitViewNodes<Params extends NodeLookup<InternalNodeBase<NodeBase>>, Options extends FitViewOptionsBase<NodeBase>>(nodeLookup: Params, options?: Pick<Options, 'nodes' | 'includeHiddenNodes'>): NodeLookup;
72
+ export declare function fitView<Params extends FitViewParamsBase<NodeBase>, Options extends FitViewOptionsBase<NodeBase>>({ nodes, width, height, panZoom, minZoom, maxZoom }: Params, options?: Omit<Options, 'nodes' | 'includeHiddenNodes'>): Promise<boolean>;
72
73
  /**
73
74
  * This function calculates the next position of a node, taking into account the node's extent, parent node, and origin.
74
75
  *
@@ -1 +1 @@
1
- {"version":3,"file":"gra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Extent, widt
20
20
  translateExtent: CoordinateExtent;
21
21
  width: number;
22
22
  height: number;
23
- }): boolean;
23
+ }): Promise<boolean>;
24
24
  export declare function updateConnectionLookup(connectionLookup: ConnectionLookup, edgeLookup: EdgeLookup, edges: EdgeBase[]): void;
25
25
  export {};
26
26
  //# sourceMappingURL=store.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/utils/store.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,EACV,eAAe,EACf,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,UAAU,EACV,gBAAgB,EAChB,UAAU,EAEV,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACb,MAAM,UAAU,CAAC;AAIlB,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAY5C,wBAAgB,uBAAuB,CAAC,QAAQ,SAAS,QAAQ,EAC/D,UAAU,EAAE,UAAU,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,EAClD,YAAY,EAAE,YAAY,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,EACtD,OAAO,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,QAUvC;AAED,KAAK,kBAAkB,CAAC,QAAQ,SAAS,QAAQ,IAAI;IACnD,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC7B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,wBAAgB,cAAc,CAAC,QAAQ,SAAS,QAAQ,EACtD,KAAK,EAAE,QAAQ,EAAE,EACjB,UAAU,EAAE,UAAU,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,EAClD,YAAY,EAAE,YAAY,CAAC,gBAAgB,CAAC,QAAQ,C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