@designa8/vibedesign-stripe-deepseek-85ea 0.1.2 → 0.1.3
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/README.md +1 -1
- package/dist/index.cjs +162 -50
- package/dist/index.js +162 -50
- package/package.json +1 -1
- package/src/atoms/PaymentRoutingCanvas/PaymentRoutingCanvas.tsx +215 -47
- package/src/atoms/PaymentRoutingCanvas/preview.tsx +21 -10
- package/src/atoms/RoutingNode/RoutingNode.tsx +18 -13
package/dist/index.js
CHANGED
|
@@ -11718,7 +11718,7 @@ var RoutingNode = React60.forwardRef(
|
|
|
11718
11718
|
...rest
|
|
11719
11719
|
}, ref) => {
|
|
11720
11720
|
const glyph5 = icon ?? defaultIconByType[type];
|
|
11721
|
-
const
|
|
11721
|
+
const highlighted = selected || active;
|
|
11722
11722
|
return /* @__PURE__ */ jsxs57(
|
|
11723
11723
|
"div",
|
|
11724
11724
|
{
|
|
@@ -11727,6 +11727,7 @@ var RoutingNode = React60.forwardRef(
|
|
|
11727
11727
|
style: { width: NODE_WIDTH, ...style },
|
|
11728
11728
|
"data-node-type": type,
|
|
11729
11729
|
"data-selected": selected || void 0,
|
|
11730
|
+
"data-active": active || void 0,
|
|
11730
11731
|
...rest,
|
|
11731
11732
|
children: [
|
|
11732
11733
|
/* @__PURE__ */ jsxs57(
|
|
@@ -11735,8 +11736,8 @@ var RoutingNode = React60.forwardRef(
|
|
|
11735
11736
|
className: cn52(
|
|
11736
11737
|
"flex items-stretch overflow-hidden rounded-md border bg-surface",
|
|
11737
11738
|
"transition duration-150 ease-out",
|
|
11738
|
-
disabled ? "border-hairline-soft opacity-50" : unreachable ? "border-dashed border-semantic-warning" : selected
|
|
11739
|
-
dragging ? "shadow-lg" :
|
|
11739
|
+
disabled ? "border-hairline-soft opacity-50" : selected && unreachable ? "border-dashed border-semantic-warning ring-2 ring-primary" : selected ? "border-primary ring-2 ring-primary" : unreachable ? "border-dashed border-semantic-warning" : active ? "border-primary ring-2 ring-primary/25" : conflict ? "border-semantic-error/50" : "border-hairline",
|
|
11740
|
+
dragging ? "shadow-lg" : highlighted ? "shadow-md" : "shadow-sm",
|
|
11740
11741
|
disabled ? "" : "group-hover/node:border-hairline-strong group-hover/node:shadow-md"
|
|
11741
11742
|
),
|
|
11742
11743
|
children: [
|
|
@@ -11792,7 +11793,7 @@ var RoutingNode = React60.forwardRef(
|
|
|
11792
11793
|
"aria-hidden": "true",
|
|
11793
11794
|
className: cn52(
|
|
11794
11795
|
"absolute -left-xs top-1/2 size-sm -translate-y-1/2 rounded-full border-2 transition-colors duration-150 ease-out",
|
|
11795
|
-
|
|
11796
|
+
highlighted ? "border-primary bg-primary" : "border-hairline-strong bg-surface"
|
|
11796
11797
|
)
|
|
11797
11798
|
}
|
|
11798
11799
|
),
|
|
@@ -11802,7 +11803,7 @@ var RoutingNode = React60.forwardRef(
|
|
|
11802
11803
|
"aria-hidden": "true",
|
|
11803
11804
|
className: cn52(
|
|
11804
11805
|
"absolute -right-xs top-1/2 size-sm -translate-y-1/2 rounded-full border-2 transition-colors duration-150 ease-out",
|
|
11805
|
-
|
|
11806
|
+
highlighted ? "border-primary bg-primary" : "border-hairline-strong bg-surface"
|
|
11806
11807
|
)
|
|
11807
11808
|
}
|
|
11808
11809
|
),
|
|
@@ -11825,7 +11826,7 @@ var RoutingNode = React60.forwardRef(
|
|
|
11825
11826
|
size: "inline",
|
|
11826
11827
|
disabled,
|
|
11827
11828
|
"aria-label": ariaLabel ?? `${eyebrowByType2[type]}, ${title}`,
|
|
11828
|
-
"aria-
|
|
11829
|
+
"aria-pressed": selected,
|
|
11829
11830
|
onClick: onNodeSelect,
|
|
11830
11831
|
className: "absolute inset-0 rounded-md focus-visible:ring-focus-blue focus-visible:ring-offset-0",
|
|
11831
11832
|
children: /* @__PURE__ */ jsx60("span", { className: "sr-only", children: title })
|
|
@@ -11970,6 +11971,7 @@ var SCENE_H = 342;
|
|
|
11970
11971
|
var PLANE_H = 372;
|
|
11971
11972
|
var PLANE_PAD = 18;
|
|
11972
11973
|
var PANEL_W = 296;
|
|
11974
|
+
var SNAP = 8;
|
|
11973
11975
|
var DEFAULT_NODES = [
|
|
11974
11976
|
{
|
|
11975
11977
|
id: "source",
|
|
@@ -12082,6 +12084,7 @@ var DEFAULT_SAMPLES = [
|
|
|
12082
12084
|
]
|
|
12083
12085
|
}
|
|
12084
12086
|
];
|
|
12087
|
+
var DEFAULT_SELECTION = ["brand"];
|
|
12085
12088
|
var computeIssues = (nodes, edges) => {
|
|
12086
12089
|
const issues = [];
|
|
12087
12090
|
const seenFields = /* @__PURE__ */ new Map();
|
|
@@ -12120,6 +12123,7 @@ var computeIssues = (nodes, edges) => {
|
|
|
12120
12123
|
});
|
|
12121
12124
|
return issues;
|
|
12122
12125
|
};
|
|
12126
|
+
var sameIds = (a, b) => a.length === b.length && a.every((id, index) => id === b[index]);
|
|
12123
12127
|
var PaymentRoutingCanvas = React62.forwardRef(
|
|
12124
12128
|
({
|
|
12125
12129
|
nodes,
|
|
@@ -12127,6 +12131,9 @@ var PaymentRoutingCanvas = React62.forwardRef(
|
|
|
12127
12131
|
onNodesChange,
|
|
12128
12132
|
onEdgesChange,
|
|
12129
12133
|
onNodeSelect,
|
|
12134
|
+
selectedNodeIds,
|
|
12135
|
+
defaultSelectedNodeIds,
|
|
12136
|
+
onSelectionChange,
|
|
12130
12137
|
sampleTransaction,
|
|
12131
12138
|
onSimulationStep,
|
|
12132
12139
|
onValidationChange,
|
|
@@ -12137,7 +12144,7 @@ var PaymentRoutingCanvas = React62.forwardRef(
|
|
|
12137
12144
|
const graphEdges = edges ?? DEFAULT_EDGES;
|
|
12138
12145
|
const samples = sampleTransaction ?? DEFAULT_SAMPLES;
|
|
12139
12146
|
const [localNodes, setLocalNodes] = React62.useState(incomingNodes);
|
|
12140
|
-
const [
|
|
12147
|
+
const [panelNodeId, setPanelNodeId] = React62.useState("brand");
|
|
12141
12148
|
const [panelOpen, setPanelOpen] = React62.useState(true);
|
|
12142
12149
|
const [zoom, setZoom] = React62.useState(1);
|
|
12143
12150
|
const [fit, setFit] = React62.useState(1);
|
|
@@ -12155,12 +12162,23 @@ var PaymentRoutingCanvas = React62.forwardRef(
|
|
|
12155
12162
|
const [replaying, setReplaying] = React62.useState(false);
|
|
12156
12163
|
const [focusedId, setFocusedId] = React62.useState(null);
|
|
12157
12164
|
const [anchor, setAnchor] = React62.useState({ top: 0, right: 16 });
|
|
12165
|
+
const controlledSelection = selectedNodeIds !== void 0;
|
|
12166
|
+
const [internalSelection, setInternalSelection] = React62.useState(
|
|
12167
|
+
() => defaultSelectedNodeIds ?? DEFAULT_SELECTION
|
|
12168
|
+
);
|
|
12169
|
+
const selection = controlledSelection ? selectedNodeIds : internalSelection;
|
|
12170
|
+
const selectionRef = React62.useRef(selection);
|
|
12171
|
+
selectionRef.current = selection;
|
|
12172
|
+
const onSelectionChangeRef = React62.useRef(onSelectionChange);
|
|
12173
|
+
onSelectionChangeRef.current = onSelectionChange;
|
|
12158
12174
|
const rootRef = React62.useRef(null);
|
|
12159
12175
|
const planeRef = React62.useRef(null);
|
|
12160
12176
|
const triggerRef = React62.useRef(null);
|
|
12161
12177
|
const nodeRefs = React62.useRef({});
|
|
12162
12178
|
const suppressClick = React62.useRef(false);
|
|
12163
12179
|
const nodeDragActive = React62.useRef(false);
|
|
12180
|
+
const nodesRef = React62.useRef(localNodes);
|
|
12181
|
+
nodesRef.current = localNodes;
|
|
12164
12182
|
React62.useEffect(() => {
|
|
12165
12183
|
setLocalNodes(incomingNodes);
|
|
12166
12184
|
}, [incomingNodes]);
|
|
@@ -12231,56 +12249,126 @@ var PaymentRoutingCanvas = React62.forwardRef(
|
|
|
12231
12249
|
x: node.x + (side === "out" ? NODE_W : 0),
|
|
12232
12250
|
y: node.y + (node.h ?? NODE_H) / 2
|
|
12233
12251
|
});
|
|
12234
|
-
const focusedNode =
|
|
12252
|
+
const focusedNode = panelNodeId ? nodeById.get(panelNodeId) : void 0;
|
|
12253
|
+
const selectionSet = React62.useMemo(() => new Set(selection), [selection]);
|
|
12254
|
+
const commitSelection = React62.useCallback(
|
|
12255
|
+
(next) => {
|
|
12256
|
+
const unique = next.filter((id, index) => next.indexOf(id) === index);
|
|
12257
|
+
if (sameIds(unique, selectionRef.current)) return;
|
|
12258
|
+
selectionRef.current = unique;
|
|
12259
|
+
if (!controlledSelection) setInternalSelection(unique);
|
|
12260
|
+
onSelectionChangeRef.current?.(unique);
|
|
12261
|
+
},
|
|
12262
|
+
[controlledSelection]
|
|
12263
|
+
);
|
|
12264
|
+
const openNodePanel = (node) => {
|
|
12265
|
+
commitSelection([node.id]);
|
|
12266
|
+
setPanelNodeId(node.id);
|
|
12267
|
+
setPanelOpen(true);
|
|
12268
|
+
onNodeSelect?.(node);
|
|
12269
|
+
};
|
|
12235
12270
|
const selectNode = (node) => {
|
|
12236
12271
|
if (suppressClick.current) {
|
|
12237
12272
|
suppressClick.current = false;
|
|
12238
12273
|
return;
|
|
12239
12274
|
}
|
|
12240
|
-
|
|
12241
|
-
setPanelOpen(true);
|
|
12242
|
-
onNodeSelect?.(node);
|
|
12275
|
+
openNodePanel(node);
|
|
12243
12276
|
};
|
|
12244
12277
|
const closePanel = () => {
|
|
12245
|
-
const previous =
|
|
12278
|
+
const previous = panelNodeId;
|
|
12246
12279
|
setPanelOpen(false);
|
|
12247
|
-
|
|
12280
|
+
setPanelNodeId(null);
|
|
12248
12281
|
onNodeSelect?.(null);
|
|
12249
12282
|
if (previous) nodeRefs.current[previous]?.querySelector("button")?.focus();
|
|
12250
12283
|
};
|
|
12284
|
+
const clearSelection = () => {
|
|
12285
|
+
commitSelection([]);
|
|
12286
|
+
if (panelOpen) {
|
|
12287
|
+
setPanelOpen(false);
|
|
12288
|
+
setPanelNodeId(null);
|
|
12289
|
+
onNodeSelect?.(null);
|
|
12290
|
+
}
|
|
12291
|
+
};
|
|
12292
|
+
const nudgeSelection = (key) => {
|
|
12293
|
+
const ids = new Set(selectionRef.current);
|
|
12294
|
+
if (ids.size === 0) return;
|
|
12295
|
+
const dx = key === "ArrowLeft" ? -SNAP : key === "ArrowRight" ? SNAP : 0;
|
|
12296
|
+
const dy = key === "ArrowUp" ? -SNAP : key === "ArrowDown" ? SNAP : 0;
|
|
12297
|
+
if (!dx && !dy) return;
|
|
12298
|
+
const next = nodesRef.current.map(
|
|
12299
|
+
(node) => ids.has(node.id) ? { ...node, x: node.x + dx, y: node.y + dy } : node
|
|
12300
|
+
);
|
|
12301
|
+
setLocalNodes(next);
|
|
12302
|
+
onNodesChange?.(next);
|
|
12303
|
+
onEdgesChange?.(graphEdges);
|
|
12304
|
+
};
|
|
12251
12305
|
const beginDrag = (event, node) => {
|
|
12252
12306
|
if (event.button !== 0) return;
|
|
12253
12307
|
event.stopPropagation();
|
|
12308
|
+
suppressClick.current = false;
|
|
12254
12309
|
nodeDragActive.current = true;
|
|
12310
|
+
const additive = event.metaKey || event.ctrlKey;
|
|
12311
|
+
const current = selectionRef.current;
|
|
12312
|
+
const isIn = current.includes(node.id);
|
|
12313
|
+
let dragIds;
|
|
12314
|
+
let deselectOnClick = false;
|
|
12315
|
+
let openOnClick = false;
|
|
12316
|
+
if (additive) {
|
|
12317
|
+
if (isIn) {
|
|
12318
|
+
dragIds = current;
|
|
12319
|
+
deselectOnClick = true;
|
|
12320
|
+
} else {
|
|
12321
|
+
dragIds = [...current, node.id];
|
|
12322
|
+
commitSelection(dragIds);
|
|
12323
|
+
}
|
|
12324
|
+
} else if (isIn && current.length > 1) {
|
|
12325
|
+
dragIds = current;
|
|
12326
|
+
openOnClick = true;
|
|
12327
|
+
} else {
|
|
12328
|
+
dragIds = [node.id];
|
|
12329
|
+
if (!(current.length === 1 && current[0] === node.id)) commitSelection([node.id]);
|
|
12330
|
+
openOnClick = true;
|
|
12331
|
+
}
|
|
12332
|
+
const dragged = new Set(dragIds);
|
|
12333
|
+
const origins = /* @__PURE__ */ new Map();
|
|
12334
|
+
nodesRef.current.forEach((item) => {
|
|
12335
|
+
if (dragged.has(item.id)) origins.set(item.id, { x: item.x, y: item.y });
|
|
12336
|
+
});
|
|
12255
12337
|
const startX = event.clientX;
|
|
12256
12338
|
const startY = event.clientY;
|
|
12257
12339
|
const scale2 = fit * zoom || 1;
|
|
12258
12340
|
let moved = false;
|
|
12341
|
+
let finalNodes = null;
|
|
12259
12342
|
const move = (moveEvent) => {
|
|
12260
|
-
const
|
|
12261
|
-
const
|
|
12262
|
-
if (!moved && Math.abs(
|
|
12343
|
+
const rawX = (moveEvent.clientX - startX) / scale2;
|
|
12344
|
+
const rawY = (moveEvent.clientY - startY) / scale2;
|
|
12345
|
+
if (!moved && Math.abs(rawX) + Math.abs(rawY) < 4) return;
|
|
12263
12346
|
moved = true;
|
|
12264
|
-
|
|
12265
|
-
|
|
12266
|
-
|
|
12267
|
-
|
|
12268
|
-
|
|
12269
|
-
|
|
12270
|
-
|
|
12271
|
-
|
|
12272
|
-
);
|
|
12347
|
+
const dx = Math.round(rawX / SNAP) * SNAP;
|
|
12348
|
+
const dy = Math.round(rawY / SNAP) * SNAP;
|
|
12349
|
+
const next = nodesRef.current.map((item) => {
|
|
12350
|
+
const origin = origins.get(item.id);
|
|
12351
|
+
return origin ? { ...item, x: origin.x + dx, y: origin.y + dy } : item;
|
|
12352
|
+
});
|
|
12353
|
+
finalNodes = next;
|
|
12354
|
+
setLocalNodes(next);
|
|
12273
12355
|
};
|
|
12274
12356
|
const end = () => {
|
|
12275
12357
|
nodeDragActive.current = false;
|
|
12276
12358
|
window.removeEventListener("pointermove", move);
|
|
12277
|
-
if (!moved) return;
|
|
12278
12359
|
suppressClick.current = true;
|
|
12279
|
-
|
|
12280
|
-
|
|
12281
|
-
|
|
12282
|
-
|
|
12283
|
-
|
|
12360
|
+
if (moved) {
|
|
12361
|
+
if (finalNodes) {
|
|
12362
|
+
onNodesChange?.(finalNodes);
|
|
12363
|
+
onEdgesChange?.(graphEdges);
|
|
12364
|
+
}
|
|
12365
|
+
return;
|
|
12366
|
+
}
|
|
12367
|
+
if (deselectOnClick) {
|
|
12368
|
+
commitSelection(selectionRef.current.filter((id) => id !== node.id));
|
|
12369
|
+
return;
|
|
12370
|
+
}
|
|
12371
|
+
if (openOnClick) openNodePanel(node);
|
|
12284
12372
|
};
|
|
12285
12373
|
window.addEventListener("pointermove", move);
|
|
12286
12374
|
window.addEventListener("pointerup", end, { once: true });
|
|
@@ -12291,13 +12379,18 @@ var PaymentRoutingCanvas = React62.forwardRef(
|
|
|
12291
12379
|
const startX = event.clientX;
|
|
12292
12380
|
const startY = event.clientY;
|
|
12293
12381
|
const origin = pan;
|
|
12382
|
+
let moved = false;
|
|
12294
12383
|
const move = (moveEvent) => {
|
|
12295
|
-
|
|
12296
|
-
|
|
12297
|
-
|
|
12298
|
-
|
|
12384
|
+
const dx = moveEvent.clientX - startX;
|
|
12385
|
+
const dy = moveEvent.clientY - startY;
|
|
12386
|
+
if (!moved && Math.abs(dx) + Math.abs(dy) < 4) return;
|
|
12387
|
+
moved = true;
|
|
12388
|
+
setPan({ x: origin.x + dx, y: origin.y + dy });
|
|
12389
|
+
};
|
|
12390
|
+
const end = () => {
|
|
12391
|
+
window.removeEventListener("pointermove", move);
|
|
12392
|
+
if (!moved) clearSelection();
|
|
12299
12393
|
};
|
|
12300
|
-
const end = () => window.removeEventListener("pointermove", move);
|
|
12301
12394
|
window.addEventListener("pointermove", move);
|
|
12302
12395
|
window.addEventListener("pointerup", end, { once: true });
|
|
12303
12396
|
};
|
|
@@ -12325,7 +12418,7 @@ var PaymentRoutingCanvas = React62.forwardRef(
|
|
|
12325
12418
|
y: Math.min(Math.max(node.y / SCENE_H * 100 + 2, 2), 82),
|
|
12326
12419
|
w: 21,
|
|
12327
12420
|
h: 18,
|
|
12328
|
-
highlighted: node.id
|
|
12421
|
+
highlighted: selectionSet.has(node.id) || traversed.has(node.id)
|
|
12329
12422
|
}));
|
|
12330
12423
|
const issueByNode = (nodeId) => issues.filter((issue) => issue.nodeId === nodeId);
|
|
12331
12424
|
const currentStep = steps[stepIndex];
|
|
@@ -12417,12 +12510,26 @@ var PaymentRoutingCanvas = React62.forwardRef(
|
|
|
12417
12510
|
ref: planeRef,
|
|
12418
12511
|
role: "application",
|
|
12419
12512
|
"aria-label": "Payment routing graph",
|
|
12513
|
+
"aria-describedby": "routing-selection-status",
|
|
12420
12514
|
tabIndex: 0,
|
|
12421
12515
|
onPointerDown: beginPan,
|
|
12422
12516
|
onKeyDown: (event) => {
|
|
12517
|
+
const modifier = event.metaKey || event.ctrlKey;
|
|
12518
|
+
if (modifier && (event.key === "a" || event.key === "A")) {
|
|
12519
|
+
event.preventDefault();
|
|
12520
|
+
commitSelection(localNodes.map((item) => item.id));
|
|
12521
|
+
return;
|
|
12522
|
+
}
|
|
12423
12523
|
if (event.key === "Escape") {
|
|
12524
|
+
event.preventDefault();
|
|
12424
12525
|
setIssuesOpen(false);
|
|
12425
|
-
|
|
12526
|
+
clearSelection();
|
|
12527
|
+
return;
|
|
12528
|
+
}
|
|
12529
|
+
if (event.shiftKey && (event.key === "ArrowUp" || event.key === "ArrowDown" || event.key === "ArrowLeft" || event.key === "ArrowRight")) {
|
|
12530
|
+
event.preventDefault();
|
|
12531
|
+
nudgeSelection(event.key);
|
|
12532
|
+
return;
|
|
12426
12533
|
}
|
|
12427
12534
|
if (event.key === "+" || event.key === "=") {
|
|
12428
12535
|
setZoom((current) => Math.min(current + 0.1, 1.6));
|
|
@@ -12447,6 +12554,7 @@ var PaymentRoutingCanvas = React62.forwardRef(
|
|
|
12447
12554
|
backgroundSize: "16px 16px"
|
|
12448
12555
|
},
|
|
12449
12556
|
children: [
|
|
12557
|
+
/* @__PURE__ */ jsx62("p", { id: "routing-selection-status", role: "status", "aria-live": "polite", className: "sr-only", children: selection.length === 0 ? "No nodes selected" : `${selection.length} node${selection.length === 1 ? "" : "s"} selected` }),
|
|
12450
12558
|
/* @__PURE__ */ jsxs59(
|
|
12451
12559
|
"div",
|
|
12452
12560
|
{
|
|
@@ -12491,6 +12599,7 @@ var PaymentRoutingCanvas = React62.forwardRef(
|
|
|
12491
12599
|
(issue) => issue.kind === "no-fallback"
|
|
12492
12600
|
);
|
|
12493
12601
|
const active = traversed.has(node.id);
|
|
12602
|
+
const isSelected = selectionSet.has(node.id);
|
|
12494
12603
|
return /* @__PURE__ */ jsx62(
|
|
12495
12604
|
"div",
|
|
12496
12605
|
{
|
|
@@ -12508,31 +12617,35 @@ var PaymentRoutingCanvas = React62.forwardRef(
|
|
|
12508
12617
|
metric: node.metric,
|
|
12509
12618
|
trailing: node.trailing,
|
|
12510
12619
|
icon: node.icon,
|
|
12511
|
-
selected:
|
|
12620
|
+
selected: isSelected,
|
|
12512
12621
|
active: active && !unreachable,
|
|
12513
12622
|
unreachable,
|
|
12514
12623
|
noFallback,
|
|
12515
12624
|
conflict: conflict ? "Conflicts with Priority 2" : void 0,
|
|
12516
12625
|
disabled: node.disabled,
|
|
12517
|
-
showHint: focusedId === node.id &&
|
|
12518
|
-
ariaLabel: `${node.type}, ${node.title}${node.metric ? `, ${node.metric}` : ""}${unreachable ? ", unreachable" : ""}`,
|
|
12626
|
+
showHint: focusedId === node.id && isSelected,
|
|
12627
|
+
ariaLabel: `${node.type}, ${node.title}${node.metric ? `, ${node.metric}` : ""}${isSelected ? ", selected" : ""}${unreachable ? ", unreachable" : ""}`,
|
|
12519
12628
|
onNodeSelect: () => selectNode(node),
|
|
12520
12629
|
onFocus: () => setFocusedId(node.id),
|
|
12521
12630
|
onKeyDown: (event) => {
|
|
12631
|
+
if (event.shiftKey && (event.key === "ArrowUp" || event.key === "ArrowDown" || event.key === "ArrowLeft" || event.key === "ArrowRight")) {
|
|
12632
|
+
return;
|
|
12633
|
+
}
|
|
12522
12634
|
if (event.key === "ArrowUp" || event.key === "ArrowDown" || event.key === "ArrowLeft" || event.key === "ArrowRight") {
|
|
12523
12635
|
event.preventDefault();
|
|
12524
12636
|
moveFocus(node, event.key);
|
|
12637
|
+
return;
|
|
12525
12638
|
}
|
|
12526
|
-
if (event.key === "
|
|
12639
|
+
if (event.key === " " || event.shiftKey && event.key === "Enter") {
|
|
12527
12640
|
event.preventDefault();
|
|
12528
|
-
|
|
12529
|
-
|
|
12530
|
-
|
|
12641
|
+
commitSelection(
|
|
12642
|
+
selectionRef.current.includes(node.id) ? selectionRef.current.filter((id) => id !== node.id) : [...selectionRef.current, node.id]
|
|
12643
|
+
);
|
|
12644
|
+
return;
|
|
12531
12645
|
}
|
|
12532
|
-
if (event.key === "
|
|
12646
|
+
if (event.key === "Enter") {
|
|
12533
12647
|
event.preventDefault();
|
|
12534
|
-
|
|
12535
|
-
if (panelOpen) closePanel();
|
|
12648
|
+
openNodePanel(node);
|
|
12536
12649
|
}
|
|
12537
12650
|
}
|
|
12538
12651
|
}
|
|
@@ -12568,8 +12681,7 @@ var PaymentRoutingCanvas = React62.forwardRef(
|
|
|
12568
12681
|
onJump: (id) => {
|
|
12569
12682
|
const target = localNodes.find((node) => node.title === id);
|
|
12570
12683
|
if (!target) return;
|
|
12571
|
-
|
|
12572
|
-
setPanelOpen(true);
|
|
12684
|
+
openNodePanel(target);
|
|
12573
12685
|
setPan({ x: PLANE_PAD - target.x, y: -target.y });
|
|
12574
12686
|
}
|
|
12575
12687
|
}
|
package/package.json
CHANGED