@octaviaflow/core 3.0.18-beta.12 → 3.0.18-beta.14

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/index.cjs CHANGED
@@ -29840,6 +29840,8 @@ function FlowEdgeImpl({
29840
29840
  const targetDesc = registry.resolve(targetNode.id, "target", targetHandleId);
29841
29841
  const sourceSide = sourceDesc?.side ?? sourceNode.sourcePosition ?? "bottom";
29842
29842
  const targetSide = targetDesc?.side ?? targetNode.targetPosition ?? "top";
29843
+ const sourceRoute = sourceDesc?.routeSide ?? sourceSide;
29844
+ const targetRoute = targetDesc?.routeSide ?? targetSide;
29843
29845
  const sourceIndex = sourceDesc?.index ?? 0;
29844
29846
  const sourceTotal = sourceDesc?.total ?? 1;
29845
29847
  const targetIndex = targetDesc?.index ?? 0;
@@ -29847,14 +29849,14 @@ function FlowEdgeImpl({
29847
29849
  const rawStart = handleCentre(sourceNode, sourceSide, sourceIndex, sourceTotal);
29848
29850
  const rawEnd = handleCentre(targetNode, targetSide, targetIndex, targetTotal);
29849
29851
  const HANDLE_GAP = 8;
29850
- const start = offsetAlongSide3(rawStart, sourceSide, HANDLE_GAP);
29851
- const end = offsetAlongSide3(rawEnd, targetSide, HANDLE_GAP);
29852
+ const start = offsetAlongSide3(rawStart, sourceRoute, HANDLE_GAP);
29853
+ const end = offsetAlongSide3(rawEnd, targetRoute, HANDLE_GAP);
29852
29854
  const routing = edge.routing ?? "bezier";
29853
- const { d, midX, midY } = buildEdgePath(routing, start, sourceSide, end, targetSide, {
29855
+ const { d, midX, midY } = buildEdgePath(routing, start, sourceRoute, end, targetRoute, {
29854
29856
  curvature,
29855
29857
  borderRadius
29856
29858
  });
29857
- const { d: hitD } = buildEdgePath(routing, rawStart, sourceSide, rawEnd, targetSide, {
29859
+ const { d: hitD } = buildEdgePath(routing, rawStart, sourceRoute, rawEnd, targetRoute, {
29858
29860
  curvature,
29859
29861
  borderRadius
29860
29862
  });
@@ -30172,6 +30174,7 @@ var DEFAULT_HANDLE_ID = "default";
30172
30174
  function Handle({
30173
30175
  type,
30174
30176
  position,
30177
+ routeSide,
30175
30178
  id = DEFAULT_HANDLE_ID,
30176
30179
  isConnectable = true,
30177
30180
  isConnectableStart,
@@ -30194,13 +30197,14 @@ function Handle({
30194
30197
  handleId: id,
30195
30198
  type,
30196
30199
  side: position,
30200
+ routeSide: routeSide ?? position,
30197
30201
  index,
30198
30202
  total,
30199
30203
  canStart,
30200
30204
  canEnd
30201
30205
  });
30202
30206
  return dispose;
30203
- }, [registry, node.id, id, type, position, index, total, canStart, canEnd]);
30207
+ }, [registry, node.id, id, type, position, routeSide, index, total, canStart, canEnd]);
30204
30208
  const handlePointerDown = (e) => {
30205
30209
  if (!canStart) return;
30206
30210
  e.stopPropagation();