@uipath/apollo-react 4.15.1-pr556.f7e5934 → 4.16.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/canvas/components/AddNodePanel/AddNodeManager.cjs +5 -2
- package/dist/canvas/components/AddNodePanel/AddNodeManager.d.ts.map +1 -1
- package/dist/canvas/components/AddNodePanel/AddNodeManager.js +5 -2
- package/dist/canvas/components/ButtonHandle/ButtonHandle.cjs +5 -119
- package/dist/canvas/components/ButtonHandle/ButtonHandle.d.ts.map +1 -1
- package/dist/canvas/components/ButtonHandle/ButtonHandle.js +4 -118
- package/dist/canvas/components/ButtonHandle/ButtonHandleLayoutUtils.cjs +159 -0
- package/dist/canvas/components/ButtonHandle/ButtonHandleLayoutUtils.d.ts +21 -0
- package/dist/canvas/components/ButtonHandle/ButtonHandleLayoutUtils.d.ts.map +1 -0
- package/dist/canvas/components/ButtonHandle/ButtonHandleLayoutUtils.js +122 -0
- package/dist/canvas/components/LoopNode/LoopNode.cjs +41 -26
- package/dist/canvas/components/LoopNode/LoopNode.constants.cjs +7 -24
- package/dist/canvas/components/LoopNode/LoopNode.constants.d.ts +3 -7
- package/dist/canvas/components/LoopNode/LoopNode.constants.d.ts.map +1 -1
- package/dist/canvas/components/LoopNode/LoopNode.constants.js +4 -9
- package/dist/canvas/components/LoopNode/LoopNode.d.ts.map +1 -1
- package/dist/canvas/components/LoopNode/LoopNode.helpers.cjs +1 -1
- package/dist/canvas/components/LoopNode/LoopNode.helpers.js +1 -1
- package/dist/canvas/components/LoopNode/LoopNode.js +42 -27
- package/dist/canvas/constants.cjs +2 -2
- package/dist/canvas/constants.js +2 -2
- package/dist/canvas/styles/tailwind.canvas.css +1 -1
- package/package.json +2 -2
|
@@ -79,14 +79,17 @@ const AddNodeManager = ({ initializing, customPanel: CustomPanel, createNodeData
|
|
|
79
79
|
...baseNodeData,
|
|
80
80
|
useSmartHandles: true
|
|
81
81
|
} : baseNodeData;
|
|
82
|
+
const previewNodeScope = currentPreviewNode.parentId ? {
|
|
83
|
+
parentId: currentPreviewNode.parentId,
|
|
84
|
+
extent: currentPreviewNode.extent
|
|
85
|
+
} : {};
|
|
82
86
|
const newNode = {
|
|
83
87
|
id: newNodeId,
|
|
84
88
|
type: nodeItem.data.type,
|
|
85
89
|
position: currentPreviewNode.position,
|
|
86
90
|
selected: true,
|
|
87
91
|
data: nodeData,
|
|
88
|
-
|
|
89
|
-
extent: currentPreviewNode.extent
|
|
92
|
+
...previewNodeScope
|
|
90
93
|
};
|
|
91
94
|
const newNodeManifest = registry?.getManifest(nodeItem.data.type);
|
|
92
95
|
const newEdges = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddNodeManager.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/AddNodePanel/AddNodeManager.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,0CAA0C,CAAC;AAE3E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,WAAW,mBAAmB;IAKlC,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC;IAI7E,YAAY,CAAC,EAAE,OAAO,CAAC;IAIvB,gBAAgB,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;IAK7F,cAAc,CAAC,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC,YAAY,CAAC,KAAK,YAAY,CAAC;IAOtE,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK;QAAE,OAAO,EAAE,IAAI,CAAC;QAAC,QAAQ,EAAE,IAAI,EAAE,CAAA;KAAE,CAAC;IAK7F,WAAW,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,KAAK,IAAI,CAAC;IAMpF,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B;AASD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,
|
|
1
|
+
{"version":3,"file":"AddNodeManager.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/AddNodePanel/AddNodeManager.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,0CAA0C,CAAC;AAE3E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,WAAW,mBAAmB;IAKlC,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC;IAI7E,YAAY,CAAC,EAAE,OAAO,CAAC;IAIvB,gBAAgB,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;IAK7F,cAAc,CAAC,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC,YAAY,CAAC,KAAK,YAAY,CAAC;IAOtE,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK;QAAE,OAAO,EAAE,IAAI,CAAC;QAAC,QAAQ,EAAE,IAAI,EAAE,CAAA;KAAE,CAAC;IAK7F,WAAW,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,KAAK,IAAI,CAAC;IAMpF,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B;AASD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAyMxD,CAAC"}
|
|
@@ -51,14 +51,17 @@ const AddNodeManager = ({ initializing, customPanel: CustomPanel, createNodeData
|
|
|
51
51
|
...baseNodeData,
|
|
52
52
|
useSmartHandles: true
|
|
53
53
|
} : baseNodeData;
|
|
54
|
+
const previewNodeScope = currentPreviewNode.parentId ? {
|
|
55
|
+
parentId: currentPreviewNode.parentId,
|
|
56
|
+
extent: currentPreviewNode.extent
|
|
57
|
+
} : {};
|
|
54
58
|
const newNode = {
|
|
55
59
|
id: newNodeId,
|
|
56
60
|
type: nodeItem.data.type,
|
|
57
61
|
position: currentPreviewNode.position,
|
|
58
62
|
selected: true,
|
|
59
63
|
data: nodeData,
|
|
60
|
-
|
|
61
|
-
extent: currentPreviewNode.extent
|
|
64
|
+
...previewNodeScope
|
|
62
65
|
};
|
|
63
66
|
const newNodeManifest = registry?.getManifest(nodeItem.data.type);
|
|
64
67
|
const newEdges = [];
|
|
@@ -30,21 +30,14 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
30
30
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
31
|
const react_cjs_namespaceObject = require("../../xyflow/react.cjs");
|
|
32
32
|
const external_react_namespaceObject = require("react");
|
|
33
|
-
const external_constants_cjs_namespaceObject = require("../../constants.cjs");
|
|
34
33
|
const CanvasEventBus_cjs_namespaceObject = require("../../utils/CanvasEventBus.cjs");
|
|
35
34
|
const CssUtil_cjs_namespaceObject = require("../../utils/CssUtil.cjs");
|
|
35
|
+
const external_ButtonHandleLayoutUtils_cjs_namespaceObject = require("./ButtonHandleLayoutUtils.cjs");
|
|
36
36
|
const external_ButtonHandleStyleUtils_cjs_namespaceObject = require("./ButtonHandleStyleUtils.cjs");
|
|
37
37
|
const external_HandleButton_cjs_namespaceObject = require("./HandleButton.cjs");
|
|
38
38
|
const external_HandleLabel_cjs_namespaceObject = require("./HandleLabel.cjs");
|
|
39
39
|
const external_HandleNotch_cjs_namespaceObject = require("./HandleNotch.cjs");
|
|
40
40
|
const external_useButtonHandleSizeAndPosition_cjs_namespaceObject = require("./useButtonHandleSizeAndPosition.cjs");
|
|
41
|
-
const INWARD_HANDLE_ANCHOR_SIZE_PX = external_constants_cjs_namespaceObject.GRID_SPACING;
|
|
42
|
-
const INWARD_HANDLE_ANCHOR_RADIUS_PX = INWARD_HANDLE_ANCHOR_SIZE_PX / 2;
|
|
43
|
-
const INWARD_NOTCH_OVERLAP_PX = {
|
|
44
|
-
artifact: 5,
|
|
45
|
-
input: 4,
|
|
46
|
-
output: 6
|
|
47
|
-
};
|
|
48
41
|
const ButtonHandleBase = ({ id, nodeId, type, position, connectionPosition = position, handleType, label, labelIcon, labelBackgroundColor, visible = true, showButton = true, selected = false, index = 0, total = 1, onAction, showNotches = true, customPositionAndOffsets, nodeWidth, nodeHeight, portalAction = false })=>{
|
|
49
42
|
const handleRef = (0, external_react_namespaceObject.useRef)(null);
|
|
50
43
|
const [isHovered, setIsHovered] = (0, external_react_namespaceObject.useState)(false);
|
|
@@ -97,7 +90,7 @@ const ButtonHandleBase = ({ id, nodeId, type, position, connectionPosition = pos
|
|
|
97
90
|
customPositionAndOffsets
|
|
98
91
|
});
|
|
99
92
|
if (connectionPosition !== position) {
|
|
100
|
-
const layout = getInwardHandleLayout(position, handleType);
|
|
93
|
+
const layout = (0, external_ButtonHandleLayoutUtils_cjs_namespaceObject.getInwardHandleLayout)(position, handleType);
|
|
101
94
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
102
95
|
className: (0, CssUtil_cjs_namespaceObject.cx)('absolute flex overflow-visible', visible ? 'pointer-events-auto opacity-100' : 'pointer-events-none opacity-0'),
|
|
103
96
|
style: {
|
|
@@ -131,11 +124,7 @@ const ButtonHandleBase = ({ id, nodeId, type, position, connectionPosition = pos
|
|
|
131
124
|
onMouseLeave: unmarkAsHovered,
|
|
132
125
|
onMouseDown: unmarkAsHovered,
|
|
133
126
|
className: (0, CssUtil_cjs_namespaceObject.cx)('absolute! z-20 flex! items-center! justify-center! overflow-visible! border-0! rounded-none! bg-transparent!', visible ? 'cursor-crosshair! pointer-events-auto! opacity-100' : 'cursor-default! pointer-events-none! opacity-0'),
|
|
134
|
-
style:
|
|
135
|
-
...layout.anchorStyle,
|
|
136
|
-
width: INWARD_HANDLE_ANCHOR_SIZE_PX,
|
|
137
|
-
height: INWARD_HANDLE_ANCHOR_SIZE_PX
|
|
138
|
-
}
|
|
127
|
+
style: layout.anchorStyle
|
|
139
128
|
}),
|
|
140
129
|
showActionButton ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_HandleButton_cjs_namespaceObject.HandleButton, {
|
|
141
130
|
visible: showButton,
|
|
@@ -147,7 +136,7 @@ const ButtonHandleBase = ({ id, nodeId, type, position, connectionPosition = pos
|
|
|
147
136
|
]
|
|
148
137
|
});
|
|
149
138
|
}
|
|
150
|
-
const portal = showActionButton && portalAction && !customPositionAndOffsets ? getHandleActionPortal({
|
|
139
|
+
const portal = showActionButton && portalAction && !customPositionAndOffsets ? (0, external_ButtonHandleLayoutUtils_cjs_namespaceObject.getHandleActionPortal)({
|
|
151
140
|
nodeId,
|
|
152
141
|
position,
|
|
153
142
|
positionPercent,
|
|
@@ -201,55 +190,9 @@ const ButtonHandleBase = ({ id, nodeId, type, position, connectionPosition = pos
|
|
|
201
190
|
});
|
|
202
191
|
};
|
|
203
192
|
const ButtonHandle = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(ButtonHandleBase);
|
|
204
|
-
function getHandleActionPortal({ nodeId, position, positionPercent, total, nodeWidth, nodeHeight }) {
|
|
205
|
-
if (!nodeWidth || !nodeHeight) return;
|
|
206
|
-
const edgeCoverageRatio = external_ButtonHandleStyleUtils_cjs_namespaceObject.HANDLE_EDGE_COVERAGE_RATIO / total;
|
|
207
|
-
const horizontalWidth = nodeWidth * edgeCoverageRatio;
|
|
208
|
-
const verticalHeight = nodeHeight * edgeCoverageRatio;
|
|
209
|
-
const x = positionPercent / 100 * nodeWidth;
|
|
210
|
-
const y = positionPercent / 100 * nodeHeight;
|
|
211
|
-
switch(position){
|
|
212
|
-
case react_cjs_namespaceObject.Position.Top:
|
|
213
|
-
return {
|
|
214
|
-
nodeId,
|
|
215
|
-
left: x,
|
|
216
|
-
top: 0,
|
|
217
|
-
width: horizontalWidth,
|
|
218
|
-
height: external_ButtonHandleStyleUtils_cjs_namespaceObject.HANDLE_CROSS_AXIS_SIZE_PX,
|
|
219
|
-
transform: 'translate(-50%, -50%)'
|
|
220
|
-
};
|
|
221
|
-
case react_cjs_namespaceObject.Position.Bottom:
|
|
222
|
-
return {
|
|
223
|
-
nodeId,
|
|
224
|
-
left: x,
|
|
225
|
-
top: nodeHeight - external_ButtonHandleStyleUtils_cjs_namespaceObject.HANDLE_CROSS_AXIS_SIZE_PX,
|
|
226
|
-
width: horizontalWidth,
|
|
227
|
-
height: external_ButtonHandleStyleUtils_cjs_namespaceObject.HANDLE_CROSS_AXIS_SIZE_PX,
|
|
228
|
-
transform: 'translate(-50%, 50%)'
|
|
229
|
-
};
|
|
230
|
-
case react_cjs_namespaceObject.Position.Left:
|
|
231
|
-
return {
|
|
232
|
-
nodeId,
|
|
233
|
-
left: 0,
|
|
234
|
-
top: y,
|
|
235
|
-
width: external_ButtonHandleStyleUtils_cjs_namespaceObject.HANDLE_CROSS_AXIS_SIZE_PX,
|
|
236
|
-
height: verticalHeight,
|
|
237
|
-
transform: 'translate(-50%, -50%)'
|
|
238
|
-
};
|
|
239
|
-
case react_cjs_namespaceObject.Position.Right:
|
|
240
|
-
return {
|
|
241
|
-
nodeId,
|
|
242
|
-
left: nodeWidth - external_ButtonHandleStyleUtils_cjs_namespaceObject.HANDLE_CROSS_AXIS_SIZE_PX,
|
|
243
|
-
top: y,
|
|
244
|
-
width: external_ButtonHandleStyleUtils_cjs_namespaceObject.HANDLE_CROSS_AXIS_SIZE_PX,
|
|
245
|
-
height: verticalHeight,
|
|
246
|
-
transform: 'translate(50%, -50%)'
|
|
247
|
-
};
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
193
|
function InwardHandleContent({ handleType, isVertical, selected, hovered, showNotch, label, labelIcon, labelBackgroundColor, layout }) {
|
|
251
194
|
const labelElement = label ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
252
|
-
className: (0, CssUtil_cjs_namespaceObject.cx)('pointer-events-none flex
|
|
195
|
+
className: (0, CssUtil_cjs_namespaceObject.cx)('pointer-events-none flex items-center gap-1.5 whitespace-nowrap rounded-full border border-border-subtle bg-transparent px-2 py-0.5', 'text-xs font-medium leading-4 text-foreground-muted'),
|
|
253
196
|
style: labelBackgroundColor ? {
|
|
254
197
|
backgroundColor: labelBackgroundColor
|
|
255
198
|
} : void 0,
|
|
@@ -279,63 +222,6 @@ function InwardHandleContent({ handleType, isVertical, selected, hovered, showNo
|
|
|
279
222
|
]
|
|
280
223
|
});
|
|
281
224
|
}
|
|
282
|
-
function getInwardHandleLayout(position, handleType) {
|
|
283
|
-
const notchOverlap = -INWARD_NOTCH_OVERLAP_PX[handleType];
|
|
284
|
-
switch(position){
|
|
285
|
-
case react_cjs_namespaceObject.Position.Left:
|
|
286
|
-
return {
|
|
287
|
-
rootTransform: 'translate(0, -50%)',
|
|
288
|
-
contentDirectionClassName: 'flex-row',
|
|
289
|
-
notchStyle: {
|
|
290
|
-
marginLeft: notchOverlap
|
|
291
|
-
},
|
|
292
|
-
anchorStyle: {
|
|
293
|
-
left: `calc(100% - ${INWARD_HANDLE_ANCHOR_RADIUS_PX}px)`,
|
|
294
|
-
top: '50%',
|
|
295
|
-
transform: 'translateY(-50%)'
|
|
296
|
-
}
|
|
297
|
-
};
|
|
298
|
-
case react_cjs_namespaceObject.Position.Right:
|
|
299
|
-
return {
|
|
300
|
-
rootTransform: 'translate(0, -50%)',
|
|
301
|
-
contentDirectionClassName: 'flex-row-reverse',
|
|
302
|
-
notchStyle: {
|
|
303
|
-
marginRight: notchOverlap
|
|
304
|
-
},
|
|
305
|
-
anchorStyle: {
|
|
306
|
-
left: -INWARD_HANDLE_ANCHOR_RADIUS_PX,
|
|
307
|
-
top: '50%',
|
|
308
|
-
transform: 'translateY(-50%)'
|
|
309
|
-
}
|
|
310
|
-
};
|
|
311
|
-
case react_cjs_namespaceObject.Position.Top:
|
|
312
|
-
return {
|
|
313
|
-
rootTransform: 'translate(-50%, 0)',
|
|
314
|
-
contentDirectionClassName: 'flex-col',
|
|
315
|
-
notchStyle: {
|
|
316
|
-
marginTop: notchOverlap
|
|
317
|
-
},
|
|
318
|
-
anchorStyle: {
|
|
319
|
-
left: '50%',
|
|
320
|
-
top: `calc(100% - ${INWARD_HANDLE_ANCHOR_RADIUS_PX}px)`,
|
|
321
|
-
transform: 'translateX(-50%)'
|
|
322
|
-
}
|
|
323
|
-
};
|
|
324
|
-
case react_cjs_namespaceObject.Position.Bottom:
|
|
325
|
-
return {
|
|
326
|
-
rootTransform: 'translate(-50%, 0)',
|
|
327
|
-
contentDirectionClassName: 'flex-col-reverse',
|
|
328
|
-
notchStyle: {
|
|
329
|
-
marginBottom: notchOverlap
|
|
330
|
-
},
|
|
331
|
-
anchorStyle: {
|
|
332
|
-
left: '50%',
|
|
333
|
-
top: -INWARD_HANDLE_ANCHOR_RADIUS_PX,
|
|
334
|
-
transform: 'translateX(-50%)'
|
|
335
|
-
}
|
|
336
|
-
};
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
225
|
const ButtonHandlesBase = ({ nodeId, handles, position, connectionPosition = position, selected = false, hovered = false, visible = true, showAddButton = true, showNotches = true, customPositionAndOffsets, shouldShowAddButtonFn = ({ showAddButton, selected, hovered })=>showAddButton && (selected || hovered), nodeWidth, nodeHeight, portalActions = false })=>{
|
|
340
226
|
const finalSelected = shouldShowAddButtonFn({
|
|
341
227
|
showAddButton,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonHandle.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/ButtonHandle/ButtonHandle.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,QAAQ,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"ButtonHandle.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/ButtonHandle/ButtonHandle.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Handle, Position } from "../../xyflow/react.js";
|
|
3
3
|
import { memo, useCallback, useMemo, useRef, useState } from "react";
|
|
4
|
-
import { GRID_SPACING } from "../../constants.js";
|
|
5
4
|
import { canvasEventBus } from "../../utils/CanvasEventBus.js";
|
|
6
5
|
import { cx } from "../../utils/CssUtil.js";
|
|
7
|
-
import {
|
|
6
|
+
import { getHandleActionPortal, getInwardHandleLayout } from "./ButtonHandleLayoutUtils.js";
|
|
7
|
+
import { calculateGridAlignedHandlePositions, pixelToPercent } from "./ButtonHandleStyleUtils.js";
|
|
8
8
|
import { HandleButton, HandleHoverBridge } from "./HandleButton.js";
|
|
9
9
|
import { HandleLabel } from "./HandleLabel.js";
|
|
10
10
|
import { HandleNotch } from "./HandleNotch.js";
|
|
11
11
|
import { useButtonHandleSizeAndPosition } from "./useButtonHandleSizeAndPosition.js";
|
|
12
|
-
const INWARD_HANDLE_ANCHOR_SIZE_PX = GRID_SPACING;
|
|
13
|
-
const INWARD_HANDLE_ANCHOR_RADIUS_PX = INWARD_HANDLE_ANCHOR_SIZE_PX / 2;
|
|
14
|
-
const INWARD_NOTCH_OVERLAP_PX = {
|
|
15
|
-
artifact: 5,
|
|
16
|
-
input: 4,
|
|
17
|
-
output: 6
|
|
18
|
-
};
|
|
19
12
|
const ButtonHandleBase = ({ id, nodeId, type, position, connectionPosition = position, handleType, label, labelIcon, labelBackgroundColor, visible = true, showButton = true, selected = false, index = 0, total = 1, onAction, showNotches = true, customPositionAndOffsets, nodeWidth, nodeHeight, portalAction = false })=>{
|
|
20
13
|
const handleRef = useRef(null);
|
|
21
14
|
const [isHovered, setIsHovered] = useState(false);
|
|
@@ -102,11 +95,7 @@ const ButtonHandleBase = ({ id, nodeId, type, position, connectionPosition = pos
|
|
|
102
95
|
onMouseLeave: unmarkAsHovered,
|
|
103
96
|
onMouseDown: unmarkAsHovered,
|
|
104
97
|
className: cx('absolute! z-20 flex! items-center! justify-center! overflow-visible! border-0! rounded-none! bg-transparent!', visible ? 'cursor-crosshair! pointer-events-auto! opacity-100' : 'cursor-default! pointer-events-none! opacity-0'),
|
|
105
|
-
style:
|
|
106
|
-
...layout.anchorStyle,
|
|
107
|
-
width: INWARD_HANDLE_ANCHOR_SIZE_PX,
|
|
108
|
-
height: INWARD_HANDLE_ANCHOR_SIZE_PX
|
|
109
|
-
}
|
|
98
|
+
style: layout.anchorStyle
|
|
110
99
|
}),
|
|
111
100
|
showActionButton ? /*#__PURE__*/ jsx(HandleButton, {
|
|
112
101
|
visible: showButton,
|
|
@@ -172,55 +161,9 @@ const ButtonHandleBase = ({ id, nodeId, type, position, connectionPosition = pos
|
|
|
172
161
|
});
|
|
173
162
|
};
|
|
174
163
|
const ButtonHandle = /*#__PURE__*/ memo(ButtonHandleBase);
|
|
175
|
-
function getHandleActionPortal({ nodeId, position, positionPercent, total, nodeWidth, nodeHeight }) {
|
|
176
|
-
if (!nodeWidth || !nodeHeight) return;
|
|
177
|
-
const edgeCoverageRatio = HANDLE_EDGE_COVERAGE_RATIO / total;
|
|
178
|
-
const horizontalWidth = nodeWidth * edgeCoverageRatio;
|
|
179
|
-
const verticalHeight = nodeHeight * edgeCoverageRatio;
|
|
180
|
-
const x = positionPercent / 100 * nodeWidth;
|
|
181
|
-
const y = positionPercent / 100 * nodeHeight;
|
|
182
|
-
switch(position){
|
|
183
|
-
case Position.Top:
|
|
184
|
-
return {
|
|
185
|
-
nodeId,
|
|
186
|
-
left: x,
|
|
187
|
-
top: 0,
|
|
188
|
-
width: horizontalWidth,
|
|
189
|
-
height: HANDLE_CROSS_AXIS_SIZE_PX,
|
|
190
|
-
transform: 'translate(-50%, -50%)'
|
|
191
|
-
};
|
|
192
|
-
case Position.Bottom:
|
|
193
|
-
return {
|
|
194
|
-
nodeId,
|
|
195
|
-
left: x,
|
|
196
|
-
top: nodeHeight - HANDLE_CROSS_AXIS_SIZE_PX,
|
|
197
|
-
width: horizontalWidth,
|
|
198
|
-
height: HANDLE_CROSS_AXIS_SIZE_PX,
|
|
199
|
-
transform: 'translate(-50%, 50%)'
|
|
200
|
-
};
|
|
201
|
-
case Position.Left:
|
|
202
|
-
return {
|
|
203
|
-
nodeId,
|
|
204
|
-
left: 0,
|
|
205
|
-
top: y,
|
|
206
|
-
width: HANDLE_CROSS_AXIS_SIZE_PX,
|
|
207
|
-
height: verticalHeight,
|
|
208
|
-
transform: 'translate(-50%, -50%)'
|
|
209
|
-
};
|
|
210
|
-
case Position.Right:
|
|
211
|
-
return {
|
|
212
|
-
nodeId,
|
|
213
|
-
left: nodeWidth - HANDLE_CROSS_AXIS_SIZE_PX,
|
|
214
|
-
top: y,
|
|
215
|
-
width: HANDLE_CROSS_AXIS_SIZE_PX,
|
|
216
|
-
height: verticalHeight,
|
|
217
|
-
transform: 'translate(50%, -50%)'
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
164
|
function InwardHandleContent({ handleType, isVertical, selected, hovered, showNotch, label, labelIcon, labelBackgroundColor, layout }) {
|
|
222
165
|
const labelElement = label ? /*#__PURE__*/ jsxs("div", {
|
|
223
|
-
className: cx('pointer-events-none flex
|
|
166
|
+
className: cx('pointer-events-none flex items-center gap-1.5 whitespace-nowrap rounded-full border border-border-subtle bg-transparent px-2 py-0.5', 'text-xs font-medium leading-4 text-foreground-muted'),
|
|
224
167
|
style: labelBackgroundColor ? {
|
|
225
168
|
backgroundColor: labelBackgroundColor
|
|
226
169
|
} : void 0,
|
|
@@ -250,63 +193,6 @@ function InwardHandleContent({ handleType, isVertical, selected, hovered, showNo
|
|
|
250
193
|
]
|
|
251
194
|
});
|
|
252
195
|
}
|
|
253
|
-
function getInwardHandleLayout(position, handleType) {
|
|
254
|
-
const notchOverlap = -INWARD_NOTCH_OVERLAP_PX[handleType];
|
|
255
|
-
switch(position){
|
|
256
|
-
case Position.Left:
|
|
257
|
-
return {
|
|
258
|
-
rootTransform: 'translate(0, -50%)',
|
|
259
|
-
contentDirectionClassName: 'flex-row',
|
|
260
|
-
notchStyle: {
|
|
261
|
-
marginLeft: notchOverlap
|
|
262
|
-
},
|
|
263
|
-
anchorStyle: {
|
|
264
|
-
left: `calc(100% - ${INWARD_HANDLE_ANCHOR_RADIUS_PX}px)`,
|
|
265
|
-
top: '50%',
|
|
266
|
-
transform: 'translateY(-50%)'
|
|
267
|
-
}
|
|
268
|
-
};
|
|
269
|
-
case Position.Right:
|
|
270
|
-
return {
|
|
271
|
-
rootTransform: 'translate(0, -50%)',
|
|
272
|
-
contentDirectionClassName: 'flex-row-reverse',
|
|
273
|
-
notchStyle: {
|
|
274
|
-
marginRight: notchOverlap
|
|
275
|
-
},
|
|
276
|
-
anchorStyle: {
|
|
277
|
-
left: -INWARD_HANDLE_ANCHOR_RADIUS_PX,
|
|
278
|
-
top: '50%',
|
|
279
|
-
transform: 'translateY(-50%)'
|
|
280
|
-
}
|
|
281
|
-
};
|
|
282
|
-
case Position.Top:
|
|
283
|
-
return {
|
|
284
|
-
rootTransform: 'translate(-50%, 0)',
|
|
285
|
-
contentDirectionClassName: 'flex-col',
|
|
286
|
-
notchStyle: {
|
|
287
|
-
marginTop: notchOverlap
|
|
288
|
-
},
|
|
289
|
-
anchorStyle: {
|
|
290
|
-
left: '50%',
|
|
291
|
-
top: `calc(100% - ${INWARD_HANDLE_ANCHOR_RADIUS_PX}px)`,
|
|
292
|
-
transform: 'translateX(-50%)'
|
|
293
|
-
}
|
|
294
|
-
};
|
|
295
|
-
case Position.Bottom:
|
|
296
|
-
return {
|
|
297
|
-
rootTransform: 'translate(-50%, 0)',
|
|
298
|
-
contentDirectionClassName: 'flex-col-reverse',
|
|
299
|
-
notchStyle: {
|
|
300
|
-
marginBottom: notchOverlap
|
|
301
|
-
},
|
|
302
|
-
anchorStyle: {
|
|
303
|
-
left: '50%',
|
|
304
|
-
top: -INWARD_HANDLE_ANCHOR_RADIUS_PX,
|
|
305
|
-
transform: 'translateX(-50%)'
|
|
306
|
-
}
|
|
307
|
-
};
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
196
|
const ButtonHandlesBase = ({ nodeId, handles, position, connectionPosition = position, selected = false, hovered = false, visible = true, showAddButton = true, showNotches = true, customPositionAndOffsets, shouldShowAddButtonFn = ({ showAddButton, selected, hovered })=>showAddButton && (selected || hovered), nodeWidth, nodeHeight, portalActions = false })=>{
|
|
311
197
|
const finalSelected = shouldShowAddButtonFn({
|
|
312
198
|
showAddButton,
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
getHandleActionPortal: ()=>getHandleActionPortal,
|
|
28
|
+
getInwardHandleLayout: ()=>getInwardHandleLayout
|
|
29
|
+
});
|
|
30
|
+
const react_cjs_namespaceObject = require("../../xyflow/react.cjs");
|
|
31
|
+
const external_constants_cjs_namespaceObject = require("../../constants.cjs");
|
|
32
|
+
const external_ButtonHandleStyleUtils_cjs_namespaceObject = require("./ButtonHandleStyleUtils.cjs");
|
|
33
|
+
const INWARD_HANDLE_ANCHOR_SIZE_PX = external_constants_cjs_namespaceObject.GRID_SPACING;
|
|
34
|
+
const INWARD_HANDLE_ANCHOR_RADIUS_PX = INWARD_HANDLE_ANCHOR_SIZE_PX / 2;
|
|
35
|
+
const INWARD_NOTCH_OVERLAP_PX = {
|
|
36
|
+
artifact: 5,
|
|
37
|
+
input: 4,
|
|
38
|
+
output: 6
|
|
39
|
+
};
|
|
40
|
+
function getHandleActionPortal({ nodeId, position, positionPercent, total, nodeWidth, nodeHeight }) {
|
|
41
|
+
if (!nodeWidth || !nodeHeight) return;
|
|
42
|
+
const edgeCoverageRatio = external_ButtonHandleStyleUtils_cjs_namespaceObject.HANDLE_EDGE_COVERAGE_RATIO / total;
|
|
43
|
+
const horizontalWidth = nodeWidth * edgeCoverageRatio;
|
|
44
|
+
const verticalHeight = nodeHeight * edgeCoverageRatio;
|
|
45
|
+
const x = positionPercent / 100 * nodeWidth;
|
|
46
|
+
const y = positionPercent / 100 * nodeHeight;
|
|
47
|
+
switch(position){
|
|
48
|
+
case react_cjs_namespaceObject.Position.Top:
|
|
49
|
+
return {
|
|
50
|
+
nodeId,
|
|
51
|
+
left: x,
|
|
52
|
+
top: 0,
|
|
53
|
+
width: horizontalWidth,
|
|
54
|
+
height: external_ButtonHandleStyleUtils_cjs_namespaceObject.HANDLE_CROSS_AXIS_SIZE_PX,
|
|
55
|
+
transform: 'translate(-50%, -50%)'
|
|
56
|
+
};
|
|
57
|
+
case react_cjs_namespaceObject.Position.Bottom:
|
|
58
|
+
return {
|
|
59
|
+
nodeId,
|
|
60
|
+
left: x,
|
|
61
|
+
top: nodeHeight - external_ButtonHandleStyleUtils_cjs_namespaceObject.HANDLE_CROSS_AXIS_SIZE_PX,
|
|
62
|
+
width: horizontalWidth,
|
|
63
|
+
height: external_ButtonHandleStyleUtils_cjs_namespaceObject.HANDLE_CROSS_AXIS_SIZE_PX,
|
|
64
|
+
transform: 'translate(-50%, 50%)'
|
|
65
|
+
};
|
|
66
|
+
case react_cjs_namespaceObject.Position.Left:
|
|
67
|
+
return {
|
|
68
|
+
nodeId,
|
|
69
|
+
left: 0,
|
|
70
|
+
top: y,
|
|
71
|
+
width: external_ButtonHandleStyleUtils_cjs_namespaceObject.HANDLE_CROSS_AXIS_SIZE_PX,
|
|
72
|
+
height: verticalHeight,
|
|
73
|
+
transform: 'translate(-50%, -50%)'
|
|
74
|
+
};
|
|
75
|
+
case react_cjs_namespaceObject.Position.Right:
|
|
76
|
+
return {
|
|
77
|
+
nodeId,
|
|
78
|
+
left: nodeWidth - external_ButtonHandleStyleUtils_cjs_namespaceObject.HANDLE_CROSS_AXIS_SIZE_PX,
|
|
79
|
+
top: y,
|
|
80
|
+
width: external_ButtonHandleStyleUtils_cjs_namespaceObject.HANDLE_CROSS_AXIS_SIZE_PX,
|
|
81
|
+
height: verticalHeight,
|
|
82
|
+
transform: 'translate(50%, -50%)'
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
function getInwardHandleLayout(position, handleType) {
|
|
87
|
+
const notchOverlap = -INWARD_NOTCH_OVERLAP_PX[handleType];
|
|
88
|
+
const anchorSize = {
|
|
89
|
+
width: INWARD_HANDLE_ANCHOR_SIZE_PX,
|
|
90
|
+
height: INWARD_HANDLE_ANCHOR_SIZE_PX
|
|
91
|
+
};
|
|
92
|
+
switch(position){
|
|
93
|
+
case react_cjs_namespaceObject.Position.Left:
|
|
94
|
+
return {
|
|
95
|
+
rootTransform: 'translate(0, -50%)',
|
|
96
|
+
contentDirectionClassName: 'flex-row',
|
|
97
|
+
notchStyle: {
|
|
98
|
+
marginLeft: notchOverlap
|
|
99
|
+
},
|
|
100
|
+
anchorStyle: {
|
|
101
|
+
...anchorSize,
|
|
102
|
+
left: `calc(100% - ${INWARD_HANDLE_ANCHOR_RADIUS_PX}px)`,
|
|
103
|
+
top: '50%',
|
|
104
|
+
transform: 'translateY(-50%)'
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
case react_cjs_namespaceObject.Position.Right:
|
|
108
|
+
return {
|
|
109
|
+
rootTransform: 'translate(0, -50%)',
|
|
110
|
+
contentDirectionClassName: 'flex-row-reverse',
|
|
111
|
+
notchStyle: {
|
|
112
|
+
marginRight: notchOverlap
|
|
113
|
+
},
|
|
114
|
+
anchorStyle: {
|
|
115
|
+
...anchorSize,
|
|
116
|
+
left: -INWARD_HANDLE_ANCHOR_RADIUS_PX,
|
|
117
|
+
top: '50%',
|
|
118
|
+
transform: 'translateY(-50%)'
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
case react_cjs_namespaceObject.Position.Top:
|
|
122
|
+
return {
|
|
123
|
+
rootTransform: 'translate(-50%, 0)',
|
|
124
|
+
contentDirectionClassName: 'flex-col',
|
|
125
|
+
notchStyle: {
|
|
126
|
+
marginTop: notchOverlap
|
|
127
|
+
},
|
|
128
|
+
anchorStyle: {
|
|
129
|
+
...anchorSize,
|
|
130
|
+
left: '50%',
|
|
131
|
+
top: `calc(100% - ${INWARD_HANDLE_ANCHOR_RADIUS_PX}px)`,
|
|
132
|
+
transform: 'translateX(-50%)'
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
case react_cjs_namespaceObject.Position.Bottom:
|
|
136
|
+
return {
|
|
137
|
+
rootTransform: 'translate(-50%, 0)',
|
|
138
|
+
contentDirectionClassName: 'flex-col-reverse',
|
|
139
|
+
notchStyle: {
|
|
140
|
+
marginBottom: notchOverlap
|
|
141
|
+
},
|
|
142
|
+
anchorStyle: {
|
|
143
|
+
...anchorSize,
|
|
144
|
+
left: '50%',
|
|
145
|
+
top: -INWARD_HANDLE_ANCHOR_RADIUS_PX,
|
|
146
|
+
transform: 'translateX(-50%)'
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
exports.getHandleActionPortal = __webpack_exports__.getHandleActionPortal;
|
|
152
|
+
exports.getInwardHandleLayout = __webpack_exports__.getInwardHandleLayout;
|
|
153
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
154
|
+
"getHandleActionPortal",
|
|
155
|
+
"getInwardHandleLayout"
|
|
156
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
157
|
+
Object.defineProperty(exports, '__esModule', {
|
|
158
|
+
value: true
|
|
159
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Position } from '../../xyflow/react.ts';
|
|
2
|
+
import type { CSSProperties } from 'react';
|
|
3
|
+
import type { HandleButtonPortal } from './HandleButton';
|
|
4
|
+
import type { HandleType } from './HandleNotch';
|
|
5
|
+
export interface HandleActionPortalOptions {
|
|
6
|
+
nodeId: string;
|
|
7
|
+
position: Position;
|
|
8
|
+
positionPercent: number;
|
|
9
|
+
total: number;
|
|
10
|
+
nodeWidth?: number;
|
|
11
|
+
nodeHeight?: number;
|
|
12
|
+
}
|
|
13
|
+
export type InwardHandleLayout = {
|
|
14
|
+
rootTransform: string;
|
|
15
|
+
contentDirectionClassName: string;
|
|
16
|
+
notchStyle: CSSProperties;
|
|
17
|
+
anchorStyle: CSSProperties;
|
|
18
|
+
};
|
|
19
|
+
export declare function getHandleActionPortal({ nodeId, position, positionPercent, total, nodeWidth, nodeHeight, }: HandleActionPortalOptions): HandleButtonPortal | undefined;
|
|
20
|
+
export declare function getInwardHandleLayout(position: Position, handleType: HandleType): InwardHandleLayout;
|
|
21
|
+
//# sourceMappingURL=ButtonHandleLayoutUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonHandleLayoutUtils.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/ButtonHandle/ButtonHandleLayoutUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAUhD,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,QAAQ,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,yBAAyB,EAAE,MAAM,CAAC;IAClC,UAAU,EAAE,aAAa,CAAC;IAC1B,WAAW,EAAE,aAAa,CAAC;CAC5B,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,QAAQ,EACR,eAAe,EACf,KAAK,EACL,SAAS,EACT,UAAU,GACX,EAAE,yBAAyB,GAAG,kBAAkB,GAAG,SAAS,CAiD5D;AAED,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,GACrB,kBAAkB,CAyDpB"}
|