@uipath/apollo-react 4.6.3 → 4.8.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/AgentCanvas/nodes/AgentNode.cjs +0 -4
- package/dist/canvas/components/AgentCanvas/nodes/AgentNode.d.ts.map +1 -1
- package/dist/canvas/components/AgentCanvas/nodes/AgentNode.js +0 -4
- package/dist/canvas/components/AgentCanvas/nodes/ResourceNode.cjs +5 -10
- package/dist/canvas/components/AgentCanvas/nodes/ResourceNode.d.ts.map +1 -1
- package/dist/canvas/components/AgentCanvas/nodes/ResourceNode.js +5 -10
- package/dist/canvas/components/BaseNode/BaseNode.cjs +93 -86
- package/dist/canvas/components/BaseNode/BaseNode.d.ts.map +1 -1
- package/dist/canvas/components/BaseNode/BaseNode.js +88 -81
- package/dist/canvas/components/BaseNode/BaseNodeBadgeSlot.cjs +68 -0
- package/dist/canvas/components/BaseNode/BaseNodeBadgeSlot.d.ts +9 -0
- package/dist/canvas/components/BaseNode/BaseNodeBadgeSlot.d.ts.map +1 -0
- package/dist/canvas/components/BaseNode/BaseNodeBadgeSlot.js +34 -0
- package/dist/canvas/components/BaseNode/BaseNodeConfigContext.d.ts +2 -1
- package/dist/canvas/components/BaseNode/BaseNodeConfigContext.d.ts.map +1 -1
- package/dist/canvas/components/BaseNode/BaseNodeContainer.cjs +88 -0
- package/dist/canvas/components/BaseNode/BaseNodeContainer.d.ts +21 -0
- package/dist/canvas/components/BaseNode/BaseNodeContainer.d.ts.map +1 -0
- package/dist/canvas/components/BaseNode/BaseNodeContainer.js +51 -0
- package/dist/canvas/components/BaseNode/BaseNodeInnerShape.cjs +49 -0
- package/dist/canvas/components/BaseNode/BaseNodeInnerShape.d.ts +9 -0
- package/dist/canvas/components/BaseNode/BaseNodeInnerShape.d.ts.map +1 -0
- package/dist/canvas/components/BaseNode/BaseNodeInnerShape.js +15 -0
- package/dist/canvas/components/BaseNode/BaseNodeMissingManifest.cjs +62 -0
- package/dist/canvas/components/BaseNode/BaseNodeMissingManifest.d.ts +9 -0
- package/dist/canvas/components/BaseNode/BaseNodeMissingManifest.d.ts.map +1 -0
- package/dist/canvas/components/BaseNode/BaseNodeMissingManifest.js +28 -0
- package/dist/canvas/components/BaseNode/NodeLabel.cjs +64 -18
- package/dist/canvas/components/BaseNode/NodeLabel.d.ts +8 -1
- package/dist/canvas/components/BaseNode/NodeLabel.d.ts.map +1 -1
- package/dist/canvas/components/BaseNode/NodeLabel.js +58 -15
- package/dist/canvas/components/ButtonHandle/ButtonHandle.cjs +75 -128
- package/dist/canvas/components/ButtonHandle/ButtonHandle.d.ts +6 -5
- package/dist/canvas/components/ButtonHandle/ButtonHandle.d.ts.map +1 -1
- package/dist/canvas/components/ButtonHandle/ButtonHandle.js +77 -130
- package/dist/canvas/components/ButtonHandle/ButtonHandleStyleUtils.cjs +4 -7
- package/dist/canvas/components/ButtonHandle/ButtonHandleStyleUtils.d.ts.map +1 -1
- package/dist/canvas/components/ButtonHandle/ButtonHandleStyleUtils.js +4 -7
- package/dist/canvas/components/ButtonHandle/HandleButton.cjs +152 -0
- package/dist/canvas/components/ButtonHandle/HandleButton.d.ts +16 -0
- package/dist/canvas/components/ButtonHandle/HandleButton.d.ts.map +1 -0
- package/dist/canvas/components/ButtonHandle/HandleButton.js +115 -0
- package/dist/canvas/components/ButtonHandle/HandleLabel.cjs +62 -0
- package/dist/canvas/components/ButtonHandle/HandleLabel.d.ts +9 -0
- package/dist/canvas/components/ButtonHandle/HandleLabel.d.ts.map +1 -0
- package/dist/canvas/components/ButtonHandle/HandleLabel.js +28 -0
- package/dist/canvas/components/ButtonHandle/HandleNotch.cjs +53 -0
- package/dist/canvas/components/ButtonHandle/HandleNotch.d.ts +9 -0
- package/dist/canvas/components/ButtonHandle/HandleNotch.d.ts.map +1 -0
- package/dist/canvas/components/ButtonHandle/HandleNotch.js +19 -0
- package/dist/canvas/components/ButtonHandle/SmartHandle.cjs +28 -91
- package/dist/canvas/components/ButtonHandle/SmartHandle.d.ts +1 -2
- package/dist/canvas/components/ButtonHandle/SmartHandle.d.ts.map +1 -1
- package/dist/canvas/components/ButtonHandle/SmartHandle.js +29 -92
- package/dist/canvas/components/ButtonHandle/useButtonHandles.cjs +5 -4
- package/dist/canvas/components/ButtonHandle/useButtonHandles.d.ts +4 -2
- package/dist/canvas/components/ButtonHandle/useButtonHandles.d.ts.map +1 -1
- package/dist/canvas/components/ButtonHandle/useButtonHandles.js +5 -4
- package/dist/canvas/components/CodedAgent/CodedAgentFlow.cjs +4 -4
- package/dist/canvas/components/CodedAgent/CodedAgentFlow.js +4 -4
- package/dist/canvas/constants.cjs +64 -0
- package/dist/canvas/constants.d.ts +16 -0
- package/dist/canvas/constants.d.ts.map +1 -1
- package/dist/canvas/constants.js +17 -1
- package/dist/canvas/index.cjs +39 -35
- package/dist/canvas/index.d.ts +1 -0
- package/dist/canvas/index.d.ts.map +1 -1
- package/dist/canvas/index.js +1 -0
- package/dist/canvas/storybook-utils/manifests/node-definitions.d.ts.map +1 -1
- package/dist/canvas/styles/reactflow-reset.css +12 -0
- package/dist/canvas/styles/tailwind.canvas.css +1 -1
- package/package.json +2 -2
- package/dist/canvas/components/BaseNode/BaseNode.styles.cjs +0 -410
- package/dist/canvas/components/BaseNode/BaseNode.styles.d.ts +0 -75
- package/dist/canvas/components/BaseNode/BaseNode.styles.d.ts.map +0 -1
- package/dist/canvas/components/BaseNode/BaseNode.styles.js +0 -342
- package/dist/canvas/components/ButtonHandle/ButtonHandle.styles.cjs +0 -220
- package/dist/canvas/components/ButtonHandle/ButtonHandle.styles.d.ts +0 -46
- package/dist/canvas/components/ButtonHandle/ButtonHandle.styles.d.ts.map +0 -1
- package/dist/canvas/components/ButtonHandle/ButtonHandle.styles.js +0 -161
|
@@ -30,14 +30,14 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
30
30
|
SmartSourceHandle: ()=>SmartSourceHandle
|
|
31
31
|
});
|
|
32
32
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
33
|
-
const index_cjs_namespaceObject = require("../../layouts/index.cjs");
|
|
34
33
|
const react_namespaceObject = require("@xyflow/react");
|
|
35
|
-
const external_motion_react_namespaceObject = require("motion/react");
|
|
36
34
|
const external_react_namespaceObject = require("react");
|
|
37
35
|
const CanvasEventBus_cjs_namespaceObject = require("../../utils/CanvasEventBus.cjs");
|
|
38
|
-
const
|
|
39
|
-
const external_ButtonHandle_styles_cjs_namespaceObject = require("./ButtonHandle.styles.cjs");
|
|
36
|
+
const CssUtil_cjs_namespaceObject = require("../../utils/CssUtil.cjs");
|
|
40
37
|
const external_ButtonHandleStyleUtils_cjs_namespaceObject = require("./ButtonHandleStyleUtils.cjs");
|
|
38
|
+
const external_HandleButton_cjs_namespaceObject = require("./HandleButton.cjs");
|
|
39
|
+
const external_HandleLabel_cjs_namespaceObject = require("./HandleLabel.cjs");
|
|
40
|
+
const external_HandleNotch_cjs_namespaceObject = require("./HandleNotch.cjs");
|
|
41
41
|
const external_useButtonHandleSizeAndPosition_cjs_namespaceObject = require("./useButtonHandleSizeAndPosition.cjs");
|
|
42
42
|
const SIDE_TO_POSITION = {
|
|
43
43
|
top: react_namespaceObject.Position.Top,
|
|
@@ -51,42 +51,6 @@ const NEXT_SIDE_CLOCKWISE = {
|
|
|
51
51
|
bottom: 'left',
|
|
52
52
|
left: 'top'
|
|
53
53
|
};
|
|
54
|
-
const AddButton = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ onAction })=>{
|
|
55
|
-
const handleClick = (0, external_react_namespaceObject.useCallback)((e)=>{
|
|
56
|
-
e.stopPropagation();
|
|
57
|
-
onAction(e);
|
|
58
|
-
}, [
|
|
59
|
-
onAction
|
|
60
|
-
]);
|
|
61
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_motion_react_namespaceObject.AnimatePresence, {
|
|
62
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_ButtonHandle_styles_cjs_namespaceObject.StyledAddButton, {
|
|
63
|
-
initial: {
|
|
64
|
-
opacity: 0,
|
|
65
|
-
scale: 0.5
|
|
66
|
-
},
|
|
67
|
-
animate: {
|
|
68
|
-
opacity: 1,
|
|
69
|
-
scale: 1
|
|
70
|
-
},
|
|
71
|
-
exit: {
|
|
72
|
-
opacity: 0,
|
|
73
|
-
scale: 0.5
|
|
74
|
-
},
|
|
75
|
-
transition: {
|
|
76
|
-
duration: 0.25
|
|
77
|
-
},
|
|
78
|
-
whileHover: {
|
|
79
|
-
scale: 1.05
|
|
80
|
-
},
|
|
81
|
-
onClick: handleClick,
|
|
82
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icon_registry_cjs_namespaceObject.CanvasIcon, {
|
|
83
|
-
icon: "plus",
|
|
84
|
-
size: 14
|
|
85
|
-
})
|
|
86
|
-
})
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
AddButton.displayName = 'AddButton';
|
|
90
54
|
const SmartHandleContext = /*#__PURE__*/ (0, external_react_namespaceObject.createContext)(null);
|
|
91
55
|
function SmartHandleProvider({ children, nodeWidth: _nodeWidth, nodeHeight: _nodeHeight }) {
|
|
92
56
|
const registrationsRef = (0, external_react_namespaceObject.useRef)(new Map());
|
|
@@ -283,11 +247,12 @@ function useSmartPosition(nodeId, handleId, handleType, defaultPosition, hasSour
|
|
|
283
247
|
hasSourceHandles
|
|
284
248
|
]);
|
|
285
249
|
}
|
|
286
|
-
function SmartHandle({ type, id, defaultPosition = 'source' === type ? react_namespaceObject.Position.Right : react_namespaceObject.Position.Left, handleType = 'source' === type ? 'output' : 'input', style, className, nodeWidth, nodeHeight, label, labelIcon, labelBackgroundColor = 'var(--canvas-background-secondary)', showButton = false, selected = false,
|
|
250
|
+
function SmartHandle({ type, id, defaultPosition = 'source' === type ? react_namespaceObject.Position.Right : react_namespaceObject.Position.Left, handleType = 'source' === type ? 'output' : 'input', style, className, nodeWidth, nodeHeight, label, labelIcon, labelBackgroundColor = 'var(--canvas-background-secondary)', showButton = false, selected = false, showNotches = true, onAction, visible = true, configOrder, ...rest }) {
|
|
287
251
|
const nodeId = (0, react_namespaceObject.useNodeId)();
|
|
288
252
|
const updateNodeInternals = (0, react_namespaceObject.useUpdateNodeInternals)();
|
|
289
253
|
const [isHovered, setIsHovered] = (0, external_react_namespaceObject.useState)(false);
|
|
290
254
|
const smartHandleContext = useSmartHandleContext();
|
|
255
|
+
const handleRef = (0, external_react_namespaceObject.useRef)(null);
|
|
291
256
|
const prevPositionRef = (0, external_react_namespaceObject.useRef)(null);
|
|
292
257
|
const contextVersion = smartHandleContext?.version ?? 0;
|
|
293
258
|
const hasSourceHandles = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
@@ -397,18 +362,16 @@ function SmartHandle({ type, id, defaultPosition = 'source' === type ? react_nam
|
|
|
397
362
|
onAction
|
|
398
363
|
]);
|
|
399
364
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_namespaceObject.Handle, {
|
|
365
|
+
ref: handleRef,
|
|
400
366
|
type: type,
|
|
401
367
|
position: computedPosition,
|
|
402
368
|
id: id,
|
|
403
|
-
className: className,
|
|
369
|
+
className: (0, CssUtil_cjs_namespaceObject.cx)('flex! items-center! justify-center! border-0! rounded-none! bg-transparent!', visible ? 'cursor-crosshair! pointer-events-auto!' : 'cursor-default! pointer-events-none!', className),
|
|
404
370
|
isConnectable: visible && 'artifact' !== handleType,
|
|
405
371
|
onMouseEnter: ()=>setIsHovered(true),
|
|
406
372
|
onMouseLeave: ()=>setIsHovered(false),
|
|
407
373
|
onMouseDown: ()=>setIsHovered(false),
|
|
408
374
|
style: {
|
|
409
|
-
display: 'flex',
|
|
410
|
-
alignItems: 'center',
|
|
411
|
-
justifyContent: 'center',
|
|
412
375
|
width,
|
|
413
376
|
height,
|
|
414
377
|
top,
|
|
@@ -416,58 +379,32 @@ function SmartHandle({ type, id, defaultPosition = 'source' === type ? react_nam
|
|
|
416
379
|
left,
|
|
417
380
|
right,
|
|
418
381
|
transform,
|
|
419
|
-
borderWidth: 0,
|
|
420
|
-
borderRadius: 0,
|
|
421
|
-
backgroundColor: 'transparent',
|
|
422
|
-
cursor: visible ? 'crosshair' : 'default',
|
|
423
|
-
pointerEvents: visible ? 'auto' : 'none',
|
|
424
382
|
...style
|
|
425
383
|
},
|
|
426
384
|
...rest,
|
|
427
385
|
children: visible && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
428
386
|
children: [
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
}),
|
|
444
|
-
showButton && onAction && 'source' === type && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_ButtonHandle_styles_cjs_namespaceObject.StyledWrapper, {
|
|
445
|
-
$position: computedPosition,
|
|
446
|
-
children: [
|
|
447
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_ButtonHandle_styles_cjs_namespaceObject.StyledLine, {
|
|
448
|
-
$isVertical: isVertical,
|
|
449
|
-
$selected: selected,
|
|
450
|
-
$size: label ? '60px' : '16px'
|
|
451
|
-
}),
|
|
452
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
453
|
-
className: "nodrag nopan",
|
|
454
|
-
style: {
|
|
455
|
-
pointerEvents: 'auto'
|
|
456
|
-
},
|
|
457
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(AddButton, {
|
|
458
|
-
onAction: handleButtonClick
|
|
459
|
-
})
|
|
460
|
-
})
|
|
461
|
-
]
|
|
387
|
+
onAction && 'source' === type ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_HandleButton_cjs_namespaceObject.HandleButton, {
|
|
388
|
+
visible: showButton,
|
|
389
|
+
labelVisible: visible,
|
|
390
|
+
position: computedPosition,
|
|
391
|
+
onAction: handleButtonClick,
|
|
392
|
+
handleRef: handleRef,
|
|
393
|
+
label: label,
|
|
394
|
+
labelIcon: labelIcon,
|
|
395
|
+
labelBackgroundColor: labelBackgroundColor
|
|
396
|
+
}) : label && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_HandleLabel_cjs_namespaceObject.HandleLabel, {
|
|
397
|
+
position: computedPosition,
|
|
398
|
+
backgroundColor: labelBackgroundColor,
|
|
399
|
+
label: label,
|
|
400
|
+
labelIcon: labelIcon
|
|
462
401
|
}),
|
|
463
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
$hovered: isHovered,
|
|
470
|
-
$showNotch: showNotches
|
|
402
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_HandleNotch_cjs_namespaceObject.HandleNotch, {
|
|
403
|
+
handleType: handleType,
|
|
404
|
+
isVertical: isVertical,
|
|
405
|
+
selected: selected,
|
|
406
|
+
hovered: isHovered,
|
|
407
|
+
showNotch: showNotches
|
|
471
408
|
})
|
|
472
409
|
]
|
|
473
410
|
})
|
|
@@ -12,7 +12,6 @@ export interface SmartHandleProps extends Omit<HandleProps, 'position'> {
|
|
|
12
12
|
labelBackgroundColor?: string;
|
|
13
13
|
showButton?: boolean;
|
|
14
14
|
selected?: boolean;
|
|
15
|
-
color?: string;
|
|
16
15
|
showNotches?: boolean;
|
|
17
16
|
onAction?: (event: HandleActionEvent) => void;
|
|
18
17
|
visible?: boolean;
|
|
@@ -23,7 +22,7 @@ export declare function SmartHandleProvider({ children, nodeWidth: _nodeWidth, n
|
|
|
23
22
|
nodeWidth?: number;
|
|
24
23
|
nodeHeight?: number;
|
|
25
24
|
}): import("react/jsx-runtime").JSX.Element;
|
|
26
|
-
export declare function SmartHandle({ type, id, defaultPosition, handleType, style, className, nodeWidth, nodeHeight, label, labelIcon, labelBackgroundColor, showButton, selected,
|
|
25
|
+
export declare function SmartHandle({ type, id, defaultPosition, handleType, style, className, nodeWidth, nodeHeight, label, labelIcon, labelBackgroundColor, showButton, selected, showNotches, onAction, visible, configOrder, ...rest }: SmartHandleProps): import("react/jsx-runtime").JSX.Element;
|
|
27
26
|
export declare function SmartSourceHandle(props: Omit<SmartHandleProps, 'type'>): import("react/jsx-runtime").JSX.Element;
|
|
28
27
|
export declare function SmartTargetHandle(props: Omit<SmartHandleProps, 'type'>): import("react/jsx-runtime").JSX.Element;
|
|
29
28
|
//# sourceMappingURL=SmartHandle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SmartHandle.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/ButtonHandle/SmartHandle.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SmartHandle.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/ButtonHandle/SmartHandle.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,WAAW,EAEhB,QAAQ,EAKT,MAAM,eAAe,CAAC;AAYvB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAaxD,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC;IAErE,eAAe,CAAC,EAAE,QAAQ,CAAC;IAE3B,UAAU,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,UAAU,CAAC;IAE7C,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAE5B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE5B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAM9C,OAAO,CAAC,EAAE,OAAO,CAAC;IAMlB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAoED,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,SAAS,EAAE,UAAU,EACrB,UAAU,EAAE,WAAW,GACxB,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,2CAiEA;AAyUD,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,EAAE,EACF,eAAoE,EACpE,UAAmD,EACnD,KAAK,EACL,SAAS,EACT,SAAS,EACT,UAAU,EACV,KAAK,EACL,SAAS,EACT,oBAA2D,EAC3D,UAAkB,EAClB,QAAgB,EAChB,WAAkB,EAClB,QAAQ,EACR,OAAc,EACd,WAAW,EACX,GAAG,IAAI,EACR,EAAE,gBAAgB,2CAgMlB;AASD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC,2CAEtE;AAKD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC,2CAEtE"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Row } from "../../layouts/index.js";
|
|
3
2
|
import { Handle, Position, useNodeId, useStore, useUpdateNodeInternals } from "@xyflow/react";
|
|
4
|
-
import {
|
|
5
|
-
import { createContext, memo, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
3
|
+
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
6
4
|
import { canvasEventBus } from "../../utils/CanvasEventBus.js";
|
|
7
|
-
import {
|
|
8
|
-
import { StyledAddButton, StyledLabel, StyledLine, StyledNotch, StyledWrapper } from "./ButtonHandle.styles.js";
|
|
5
|
+
import { cx } from "../../utils/CssUtil.js";
|
|
9
6
|
import { calculateGridAlignedHandlePositions, pixelToPercent } from "./ButtonHandleStyleUtils.js";
|
|
7
|
+
import { HandleButton } from "./HandleButton.js";
|
|
8
|
+
import { HandleLabel } from "./HandleLabel.js";
|
|
9
|
+
import { HandleNotch } from "./HandleNotch.js";
|
|
10
10
|
import { useButtonHandleSizeAndPosition } from "./useButtonHandleSizeAndPosition.js";
|
|
11
11
|
const SIDE_TO_POSITION = {
|
|
12
12
|
top: Position.Top,
|
|
@@ -20,42 +20,6 @@ const NEXT_SIDE_CLOCKWISE = {
|
|
|
20
20
|
bottom: 'left',
|
|
21
21
|
left: 'top'
|
|
22
22
|
};
|
|
23
|
-
const AddButton = /*#__PURE__*/ memo(({ onAction })=>{
|
|
24
|
-
const handleClick = useCallback((e)=>{
|
|
25
|
-
e.stopPropagation();
|
|
26
|
-
onAction(e);
|
|
27
|
-
}, [
|
|
28
|
-
onAction
|
|
29
|
-
]);
|
|
30
|
-
return /*#__PURE__*/ jsx(AnimatePresence, {
|
|
31
|
-
children: /*#__PURE__*/ jsx(StyledAddButton, {
|
|
32
|
-
initial: {
|
|
33
|
-
opacity: 0,
|
|
34
|
-
scale: 0.5
|
|
35
|
-
},
|
|
36
|
-
animate: {
|
|
37
|
-
opacity: 1,
|
|
38
|
-
scale: 1
|
|
39
|
-
},
|
|
40
|
-
exit: {
|
|
41
|
-
opacity: 0,
|
|
42
|
-
scale: 0.5
|
|
43
|
-
},
|
|
44
|
-
transition: {
|
|
45
|
-
duration: 0.25
|
|
46
|
-
},
|
|
47
|
-
whileHover: {
|
|
48
|
-
scale: 1.05
|
|
49
|
-
},
|
|
50
|
-
onClick: handleClick,
|
|
51
|
-
children: /*#__PURE__*/ jsx(CanvasIcon, {
|
|
52
|
-
icon: "plus",
|
|
53
|
-
size: 14
|
|
54
|
-
})
|
|
55
|
-
})
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
AddButton.displayName = 'AddButton';
|
|
59
23
|
const SmartHandleContext = /*#__PURE__*/ createContext(null);
|
|
60
24
|
function SmartHandleProvider({ children, nodeWidth: _nodeWidth, nodeHeight: _nodeHeight }) {
|
|
61
25
|
const registrationsRef = useRef(new Map());
|
|
@@ -252,11 +216,12 @@ function useSmartPosition(nodeId, handleId, handleType, defaultPosition, hasSour
|
|
|
252
216
|
hasSourceHandles
|
|
253
217
|
]);
|
|
254
218
|
}
|
|
255
|
-
function SmartHandle({ type, id, defaultPosition = 'source' === type ? Position.Right : Position.Left, handleType = 'source' === type ? 'output' : 'input', style, className, nodeWidth, nodeHeight, label, labelIcon, labelBackgroundColor = 'var(--canvas-background-secondary)', showButton = false, selected = false,
|
|
219
|
+
function SmartHandle({ type, id, defaultPosition = 'source' === type ? Position.Right : Position.Left, handleType = 'source' === type ? 'output' : 'input', style, className, nodeWidth, nodeHeight, label, labelIcon, labelBackgroundColor = 'var(--canvas-background-secondary)', showButton = false, selected = false, showNotches = true, onAction, visible = true, configOrder, ...rest }) {
|
|
256
220
|
const nodeId = useNodeId();
|
|
257
221
|
const updateNodeInternals = useUpdateNodeInternals();
|
|
258
222
|
const [isHovered, setIsHovered] = useState(false);
|
|
259
223
|
const smartHandleContext = useSmartHandleContext();
|
|
224
|
+
const handleRef = useRef(null);
|
|
260
225
|
const prevPositionRef = useRef(null);
|
|
261
226
|
const contextVersion = smartHandleContext?.version ?? 0;
|
|
262
227
|
const hasSourceHandles = useMemo(()=>{
|
|
@@ -366,18 +331,16 @@ function SmartHandle({ type, id, defaultPosition = 'source' === type ? Position.
|
|
|
366
331
|
onAction
|
|
367
332
|
]);
|
|
368
333
|
return /*#__PURE__*/ jsx(Handle, {
|
|
334
|
+
ref: handleRef,
|
|
369
335
|
type: type,
|
|
370
336
|
position: computedPosition,
|
|
371
337
|
id: id,
|
|
372
|
-
className: className,
|
|
338
|
+
className: cx('flex! items-center! justify-center! border-0! rounded-none! bg-transparent!', visible ? 'cursor-crosshair! pointer-events-auto!' : 'cursor-default! pointer-events-none!', className),
|
|
373
339
|
isConnectable: visible && 'artifact' !== handleType,
|
|
374
340
|
onMouseEnter: ()=>setIsHovered(true),
|
|
375
341
|
onMouseLeave: ()=>setIsHovered(false),
|
|
376
342
|
onMouseDown: ()=>setIsHovered(false),
|
|
377
343
|
style: {
|
|
378
|
-
display: 'flex',
|
|
379
|
-
alignItems: 'center',
|
|
380
|
-
justifyContent: 'center',
|
|
381
344
|
width,
|
|
382
345
|
height,
|
|
383
346
|
top,
|
|
@@ -385,58 +348,32 @@ function SmartHandle({ type, id, defaultPosition = 'source' === type ? Position.
|
|
|
385
348
|
left,
|
|
386
349
|
right,
|
|
387
350
|
transform,
|
|
388
|
-
borderWidth: 0,
|
|
389
|
-
borderRadius: 0,
|
|
390
|
-
backgroundColor: 'transparent',
|
|
391
|
-
cursor: visible ? 'crosshair' : 'default',
|
|
392
|
-
pointerEvents: visible ? 'auto' : 'none',
|
|
393
351
|
...style
|
|
394
352
|
},
|
|
395
353
|
...rest,
|
|
396
354
|
children: visible && /*#__PURE__*/ jsxs(Fragment, {
|
|
397
355
|
children: [
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
}),
|
|
413
|
-
showButton && onAction && 'source' === type && /*#__PURE__*/ jsxs(StyledWrapper, {
|
|
414
|
-
$position: computedPosition,
|
|
415
|
-
children: [
|
|
416
|
-
/*#__PURE__*/ jsx(StyledLine, {
|
|
417
|
-
$isVertical: isVertical,
|
|
418
|
-
$selected: selected,
|
|
419
|
-
$size: label ? '60px' : '16px'
|
|
420
|
-
}),
|
|
421
|
-
/*#__PURE__*/ jsx("div", {
|
|
422
|
-
className: "nodrag nopan",
|
|
423
|
-
style: {
|
|
424
|
-
pointerEvents: 'auto'
|
|
425
|
-
},
|
|
426
|
-
children: /*#__PURE__*/ jsx(AddButton, {
|
|
427
|
-
onAction: handleButtonClick
|
|
428
|
-
})
|
|
429
|
-
})
|
|
430
|
-
]
|
|
356
|
+
onAction && 'source' === type ? /*#__PURE__*/ jsx(HandleButton, {
|
|
357
|
+
visible: showButton,
|
|
358
|
+
labelVisible: visible,
|
|
359
|
+
position: computedPosition,
|
|
360
|
+
onAction: handleButtonClick,
|
|
361
|
+
handleRef: handleRef,
|
|
362
|
+
label: label,
|
|
363
|
+
labelIcon: labelIcon,
|
|
364
|
+
labelBackgroundColor: labelBackgroundColor
|
|
365
|
+
}) : label && /*#__PURE__*/ jsx(HandleLabel, {
|
|
366
|
+
position: computedPosition,
|
|
367
|
+
backgroundColor: labelBackgroundColor,
|
|
368
|
+
label: label,
|
|
369
|
+
labelIcon: labelIcon
|
|
431
370
|
}),
|
|
432
|
-
/*#__PURE__*/ jsx(
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
$hovered: isHovered,
|
|
439
|
-
$showNotch: showNotches
|
|
371
|
+
/*#__PURE__*/ jsx(HandleNotch, {
|
|
372
|
+
handleType: handleType,
|
|
373
|
+
isVertical: isVertical,
|
|
374
|
+
selected: selected,
|
|
375
|
+
hovered: isHovered,
|
|
376
|
+
showNotch: showNotches
|
|
440
377
|
})
|
|
441
378
|
]
|
|
442
379
|
})
|
|
@@ -32,17 +32,17 @@ const external_react_namespaceObject = require("react");
|
|
|
32
32
|
const manifest_resolver_cjs_namespaceObject = require("../../utils/manifest-resolver.cjs");
|
|
33
33
|
const ConnectedHandlesContext_cjs_namespaceObject = require("../BaseCanvas/ConnectedHandlesContext.cjs");
|
|
34
34
|
const external_index_cjs_namespaceObject = require("./index.cjs");
|
|
35
|
-
const useButtonHandles = ({ handleConfigurations, shouldShowHandles, handleAction, nodeId, selected, showAddButton, showNotches, shouldShowAddButtonFn, nodeWidth, nodeHeight })=>{
|
|
35
|
+
const useButtonHandles = ({ handleConfigurations, shouldShowHandles, handleAction, nodeId, selected, hovered, showAddButton, showNotches, shouldShowAddButtonFn, nodeWidth, nodeHeight })=>{
|
|
36
36
|
const connectedHandleIds = (0, ConnectedHandlesContext_cjs_namespaceObject.useConnectedHandles)(nodeId);
|
|
37
37
|
const node = (0, react_namespaceObject.useNodesData)(nodeId);
|
|
38
38
|
const handleElements = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
39
39
|
if (!handleConfigurations || !Array.isArray(handleConfigurations) || 0 === handleConfigurations.length) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(jsx_runtime_namespaceObject.Fragment, {});
|
|
40
40
|
const resolvedHandles = (0, manifest_resolver_cjs_namespaceObject.resolveHandles)(handleConfigurations, node?.data ?? {});
|
|
41
41
|
const elements = resolvedHandles.map((config, i)=>{
|
|
42
|
-
const
|
|
43
|
-
const finalVisible = hasConnectedHandle || shouldShowHandles && (config.visible ?? true);
|
|
42
|
+
const groupVisible = shouldShowHandles && (config.visible ?? true);
|
|
44
43
|
const enhancedHandles = config.handles.map((handle)=>({
|
|
45
44
|
...handle,
|
|
45
|
+
showHandle: connectedHandleIds.has(handle.id) || groupVisible,
|
|
46
46
|
onAction: handle.onAction || handleAction
|
|
47
47
|
}));
|
|
48
48
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_index_cjs_namespaceObject.ButtonHandles, {
|
|
@@ -50,7 +50,7 @@ const useButtonHandles = ({ handleConfigurations, shouldShowHandles, handleActio
|
|
|
50
50
|
handles: enhancedHandles,
|
|
51
51
|
position: config.position,
|
|
52
52
|
selected: selected,
|
|
53
|
-
|
|
53
|
+
hovered: hovered,
|
|
54
54
|
showAddButton: showAddButton,
|
|
55
55
|
showNotches: showNotches,
|
|
56
56
|
customPositionAndOffsets: config.customPositionAndOffsets,
|
|
@@ -63,6 +63,7 @@ const useButtonHandles = ({ handleConfigurations, shouldShowHandles, handleActio
|
|
|
63
63
|
}, [
|
|
64
64
|
handleConfigurations,
|
|
65
65
|
selected,
|
|
66
|
+
hovered,
|
|
66
67
|
shouldShowHandles,
|
|
67
68
|
connectedHandleIds,
|
|
68
69
|
handleAction,
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import type { HandleGroupManifest } from '../../schema/node-definition';
|
|
2
2
|
import type { HandleActionEvent } from '../ButtonHandle';
|
|
3
|
-
export declare const useButtonHandles: ({ handleConfigurations, shouldShowHandles, handleAction, nodeId, selected, showAddButton, showNotches, shouldShowAddButtonFn, nodeWidth, nodeHeight, }: {
|
|
3
|
+
export declare const useButtonHandles: ({ handleConfigurations, shouldShowHandles, handleAction, nodeId, selected, hovered, showAddButton, showNotches, shouldShowAddButtonFn, nodeWidth, nodeHeight, }: {
|
|
4
4
|
handleConfigurations: HandleGroupManifest[];
|
|
5
5
|
shouldShowHandles: boolean;
|
|
6
6
|
nodeId: string;
|
|
7
7
|
selected: boolean;
|
|
8
|
+
hovered?: boolean;
|
|
8
9
|
handleAction?: (event: HandleActionEvent) => void;
|
|
9
10
|
showAddButton?: boolean;
|
|
10
11
|
showNotches?: boolean;
|
|
11
12
|
nodeWidth?: number;
|
|
12
13
|
nodeHeight?: number;
|
|
13
|
-
shouldShowAddButtonFn?: ({ showAddButton, selected, }: {
|
|
14
|
+
shouldShowAddButtonFn?: ({ showAddButton, selected, hovered, }: {
|
|
14
15
|
showAddButton: boolean;
|
|
15
16
|
selected: boolean;
|
|
17
|
+
hovered: boolean;
|
|
16
18
|
}) => boolean;
|
|
17
19
|
}) => import("react/jsx-runtime").JSX.Element | import("react/jsx-runtime").JSX.Element[];
|
|
18
20
|
//# sourceMappingURL=useButtonHandles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useButtonHandles.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/ButtonHandle/useButtonHandles.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAGxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGzD,eAAO,MAAM,gBAAgB,GAAI,
|
|
1
|
+
{"version":3,"file":"useButtonHandles.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/ButtonHandle/useButtonHandles.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAGxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGzD,eAAO,MAAM,gBAAgB,GAAI,iKAY9B;IACD,oBAAoB,EAAE,mBAAmB,EAAE,CAAC;IAC5C,iBAAiB,EAAE,OAAO,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAClD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IAUpB,qBAAqB,CAAC,EAAE,CAAC,EACvB,aAAa,EACb,QAAQ,EACR,OAAO,GACR,EAAE;QACD,aAAa,EAAE,OAAO,CAAC;QACvB,QAAQ,EAAE,OAAO,CAAC;QAClB,OAAO,EAAE,OAAO,CAAC;KAClB,KAAK,OAAO,CAAC;CACf,wFAgEA,CAAC"}
|
|
@@ -4,17 +4,17 @@ import { useMemo } from "react";
|
|
|
4
4
|
import { resolveHandles } from "../../utils/manifest-resolver.js";
|
|
5
5
|
import { useConnectedHandles } from "../BaseCanvas/ConnectedHandlesContext.js";
|
|
6
6
|
import { ButtonHandles } from "./index.js";
|
|
7
|
-
const useButtonHandles = ({ handleConfigurations, shouldShowHandles, handleAction, nodeId, selected, showAddButton, showNotches, shouldShowAddButtonFn, nodeWidth, nodeHeight })=>{
|
|
7
|
+
const useButtonHandles = ({ handleConfigurations, shouldShowHandles, handleAction, nodeId, selected, hovered, showAddButton, showNotches, shouldShowAddButtonFn, nodeWidth, nodeHeight })=>{
|
|
8
8
|
const connectedHandleIds = useConnectedHandles(nodeId);
|
|
9
9
|
const node = useNodesData(nodeId);
|
|
10
10
|
const handleElements = useMemo(()=>{
|
|
11
11
|
if (!handleConfigurations || !Array.isArray(handleConfigurations) || 0 === handleConfigurations.length) return /*#__PURE__*/ jsx(Fragment, {});
|
|
12
12
|
const resolvedHandles = resolveHandles(handleConfigurations, node?.data ?? {});
|
|
13
13
|
const elements = resolvedHandles.map((config, i)=>{
|
|
14
|
-
const
|
|
15
|
-
const finalVisible = hasConnectedHandle || shouldShowHandles && (config.visible ?? true);
|
|
14
|
+
const groupVisible = shouldShowHandles && (config.visible ?? true);
|
|
16
15
|
const enhancedHandles = config.handles.map((handle)=>({
|
|
17
16
|
...handle,
|
|
17
|
+
showHandle: connectedHandleIds.has(handle.id) || groupVisible,
|
|
18
18
|
onAction: handle.onAction || handleAction
|
|
19
19
|
}));
|
|
20
20
|
return /*#__PURE__*/ jsx(ButtonHandles, {
|
|
@@ -22,7 +22,7 @@ const useButtonHandles = ({ handleConfigurations, shouldShowHandles, handleActio
|
|
|
22
22
|
handles: enhancedHandles,
|
|
23
23
|
position: config.position,
|
|
24
24
|
selected: selected,
|
|
25
|
-
|
|
25
|
+
hovered: hovered,
|
|
26
26
|
showAddButton: showAddButton,
|
|
27
27
|
showNotches: showNotches,
|
|
28
28
|
customPositionAndOffsets: config.customPositionAndOffsets,
|
|
@@ -35,6 +35,7 @@ const useButtonHandles = ({ handleConfigurations, shouldShowHandles, handleActio
|
|
|
35
35
|
}, [
|
|
36
36
|
handleConfigurations,
|
|
37
37
|
selected,
|
|
38
|
+
hovered,
|
|
38
39
|
shouldShowHandles,
|
|
39
40
|
connectedHandleIds,
|
|
40
41
|
handleAction,
|
|
@@ -131,8 +131,8 @@ const createCodedAgentNodeWrapper = (translations = external_types_cjs_namespace
|
|
|
131
131
|
const nodeData = data;
|
|
132
132
|
const executionStatus = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
133
133
|
if (nodeData.hasError) return 'Failed';
|
|
134
|
-
if (nodeData.hasSuccess) return '
|
|
135
|
-
if (nodeData.hasRunning) return '
|
|
134
|
+
if (nodeData.hasSuccess) return 'Completed';
|
|
135
|
+
if (nodeData.hasRunning) return 'InProgress';
|
|
136
136
|
}, [
|
|
137
137
|
nodeData.hasError,
|
|
138
138
|
nodeData.hasSuccess,
|
|
@@ -207,8 +207,8 @@ const CodedResourceNodeElement = /*#__PURE__*/ (0, external_react_namespaceObjec
|
|
|
207
207
|
const label = nodeData.label.toLowerCase();
|
|
208
208
|
const executionStatus = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
209
209
|
if (nodeData.hasError) return 'Failed';
|
|
210
|
-
if (nodeData.hasSuccess) return '
|
|
211
|
-
if (nodeData.hasRunning) return '
|
|
210
|
+
if (nodeData.hasSuccess) return 'Completed';
|
|
211
|
+
if (nodeData.hasRunning) return 'InProgress';
|
|
212
212
|
}, [
|
|
213
213
|
nodeData.hasError,
|
|
214
214
|
nodeData.hasSuccess,
|
|
@@ -93,8 +93,8 @@ const createCodedAgentNodeWrapper = (translations = DefaultCodedAgentNodeTransla
|
|
|
93
93
|
const nodeData = data;
|
|
94
94
|
const executionStatus = useMemo(()=>{
|
|
95
95
|
if (nodeData.hasError) return 'Failed';
|
|
96
|
-
if (nodeData.hasSuccess) return '
|
|
97
|
-
if (nodeData.hasRunning) return '
|
|
96
|
+
if (nodeData.hasSuccess) return 'Completed';
|
|
97
|
+
if (nodeData.hasRunning) return 'InProgress';
|
|
98
98
|
}, [
|
|
99
99
|
nodeData.hasError,
|
|
100
100
|
nodeData.hasSuccess,
|
|
@@ -169,8 +169,8 @@ const CodedResourceNodeElement = /*#__PURE__*/ memo(({ data, selected, id, ...no
|
|
|
169
169
|
const label = nodeData.label.toLowerCase();
|
|
170
170
|
const executionStatus = useMemo(()=>{
|
|
171
171
|
if (nodeData.hasError) return 'Failed';
|
|
172
|
-
if (nodeData.hasSuccess) return '
|
|
173
|
-
if (nodeData.hasRunning) return '
|
|
172
|
+
if (nodeData.hasSuccess) return 'Completed';
|
|
173
|
+
if (nodeData.hasRunning) return 'InProgress';
|
|
174
174
|
}, [
|
|
175
175
|
nodeData.hasError,
|
|
176
176
|
nodeData.hasSuccess,
|
|
@@ -26,8 +26,24 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
27
|
CANVAS_COMPACT_BREAKPOINT: ()=>CANVAS_COMPACT_BREAKPOINT,
|
|
28
28
|
DEFAULT_NODE_SIZE: ()=>DEFAULT_NODE_SIZE,
|
|
29
|
+
DEFAULT_RECTANGLE_NODE_WIDTH: ()=>DEFAULT_RECTANGLE_NODE_WIDTH,
|
|
29
30
|
FLOATING_CANVAS_PANEL_OFFSET: ()=>FLOATING_CANVAS_PANEL_OFFSET,
|
|
30
31
|
GRID_SPACING: ()=>GRID_SPACING,
|
|
32
|
+
NODE_BADGE_INSET_CIRCLE: ()=>NODE_BADGE_INSET_CIRCLE,
|
|
33
|
+
NODE_BADGE_INSET_SQUARE: ()=>NODE_BADGE_INSET_SQUARE,
|
|
34
|
+
NODE_BADGE_SIZE: ()=>NODE_BADGE_SIZE,
|
|
35
|
+
NODE_BORDER_SIZE: ()=>NODE_BORDER_SIZE,
|
|
36
|
+
NODE_CONTAINER_RADIUS_RATIO: ()=>NODE_CONTAINER_RADIUS_RATIO,
|
|
37
|
+
NODE_ERROR_ICON_SIZE: ()=>NODE_ERROR_ICON_SIZE,
|
|
38
|
+
NODE_HEIGHT_DEFAULT: ()=>NODE_HEIGHT_DEFAULT,
|
|
39
|
+
NODE_HEIGHT_FOOTER_BUTTON: ()=>NODE_HEIGHT_FOOTER_BUTTON,
|
|
40
|
+
NODE_HEIGHT_FOOTER_DOUBLE: ()=>NODE_HEIGHT_FOOTER_DOUBLE,
|
|
41
|
+
NODE_HEIGHT_FOOTER_SINGLE: ()=>NODE_HEIGHT_FOOTER_SINGLE,
|
|
42
|
+
NODE_INNER_ICON_RATIO: ()=>NODE_INNER_ICON_RATIO,
|
|
43
|
+
NODE_INNER_RADIUS_RATIO: ()=>NODE_INNER_RADIUS_RATIO,
|
|
44
|
+
NODE_INNER_SHAPE_RATIO: ()=>NODE_INNER_SHAPE_RATIO,
|
|
45
|
+
NODE_TEXT_BOTTOM_OFFSET: ()=>NODE_TEXT_BOTTOM_OFFSET,
|
|
46
|
+
NODE_TEXT_BOTTOM_OFFSET_WITH_HANDLES: ()=>NODE_TEXT_BOTTOM_OFFSET_WITH_HANDLES,
|
|
31
47
|
PREVIEW_EDGE_ID: ()=>PREVIEW_EDGE_ID,
|
|
32
48
|
PREVIEW_NODE_ID: ()=>PREVIEW_NODE_ID,
|
|
33
49
|
TOOLBOX_GAP: ()=>TOOLBOX_GAP,
|
|
@@ -47,10 +63,42 @@ const TOOLBOX_PADDING_X = 20;
|
|
|
47
63
|
const TOOLBOX_PADDING_Y = 12;
|
|
48
64
|
const TOOLBOX_GAP = 12;
|
|
49
65
|
const FLOATING_CANVAS_PANEL_OFFSET = 10;
|
|
66
|
+
const DEFAULT_RECTANGLE_NODE_WIDTH = 288;
|
|
67
|
+
const NODE_HEIGHT_DEFAULT = 6 * GRID_SPACING;
|
|
68
|
+
const NODE_HEIGHT_FOOTER_BUTTON = 9 * GRID_SPACING;
|
|
69
|
+
const NODE_HEIGHT_FOOTER_SINGLE = 10 * GRID_SPACING;
|
|
70
|
+
const NODE_HEIGHT_FOOTER_DOUBLE = 11 * GRID_SPACING;
|
|
71
|
+
const NODE_CONTAINER_RADIUS_RATIO = 32 / DEFAULT_NODE_SIZE;
|
|
72
|
+
const NODE_INNER_SHAPE_RATIO = 80 / DEFAULT_NODE_SIZE;
|
|
73
|
+
const NODE_INNER_ICON_RATIO = 40 / DEFAULT_NODE_SIZE;
|
|
74
|
+
const NODE_INNER_RADIUS_RATIO = 24 / DEFAULT_NODE_SIZE;
|
|
75
|
+
const NODE_BORDER_SIZE = 2;
|
|
76
|
+
const NODE_ERROR_ICON_SIZE = 40;
|
|
77
|
+
const NODE_TEXT_BOTTOM_OFFSET = -8;
|
|
78
|
+
const NODE_TEXT_BOTTOM_OFFSET_WITH_HANDLES = -40;
|
|
79
|
+
const NODE_BADGE_SIZE = 20;
|
|
80
|
+
const NODE_BADGE_INSET_SQUARE = 6;
|
|
81
|
+
const NODE_BADGE_INSET_CIRCLE = 12;
|
|
50
82
|
exports.CANVAS_COMPACT_BREAKPOINT = __webpack_exports__.CANVAS_COMPACT_BREAKPOINT;
|
|
51
83
|
exports.DEFAULT_NODE_SIZE = __webpack_exports__.DEFAULT_NODE_SIZE;
|
|
84
|
+
exports.DEFAULT_RECTANGLE_NODE_WIDTH = __webpack_exports__.DEFAULT_RECTANGLE_NODE_WIDTH;
|
|
52
85
|
exports.FLOATING_CANVAS_PANEL_OFFSET = __webpack_exports__.FLOATING_CANVAS_PANEL_OFFSET;
|
|
53
86
|
exports.GRID_SPACING = __webpack_exports__.GRID_SPACING;
|
|
87
|
+
exports.NODE_BADGE_INSET_CIRCLE = __webpack_exports__.NODE_BADGE_INSET_CIRCLE;
|
|
88
|
+
exports.NODE_BADGE_INSET_SQUARE = __webpack_exports__.NODE_BADGE_INSET_SQUARE;
|
|
89
|
+
exports.NODE_BADGE_SIZE = __webpack_exports__.NODE_BADGE_SIZE;
|
|
90
|
+
exports.NODE_BORDER_SIZE = __webpack_exports__.NODE_BORDER_SIZE;
|
|
91
|
+
exports.NODE_CONTAINER_RADIUS_RATIO = __webpack_exports__.NODE_CONTAINER_RADIUS_RATIO;
|
|
92
|
+
exports.NODE_ERROR_ICON_SIZE = __webpack_exports__.NODE_ERROR_ICON_SIZE;
|
|
93
|
+
exports.NODE_HEIGHT_DEFAULT = __webpack_exports__.NODE_HEIGHT_DEFAULT;
|
|
94
|
+
exports.NODE_HEIGHT_FOOTER_BUTTON = __webpack_exports__.NODE_HEIGHT_FOOTER_BUTTON;
|
|
95
|
+
exports.NODE_HEIGHT_FOOTER_DOUBLE = __webpack_exports__.NODE_HEIGHT_FOOTER_DOUBLE;
|
|
96
|
+
exports.NODE_HEIGHT_FOOTER_SINGLE = __webpack_exports__.NODE_HEIGHT_FOOTER_SINGLE;
|
|
97
|
+
exports.NODE_INNER_ICON_RATIO = __webpack_exports__.NODE_INNER_ICON_RATIO;
|
|
98
|
+
exports.NODE_INNER_RADIUS_RATIO = __webpack_exports__.NODE_INNER_RADIUS_RATIO;
|
|
99
|
+
exports.NODE_INNER_SHAPE_RATIO = __webpack_exports__.NODE_INNER_SHAPE_RATIO;
|
|
100
|
+
exports.NODE_TEXT_BOTTOM_OFFSET = __webpack_exports__.NODE_TEXT_BOTTOM_OFFSET;
|
|
101
|
+
exports.NODE_TEXT_BOTTOM_OFFSET_WITH_HANDLES = __webpack_exports__.NODE_TEXT_BOTTOM_OFFSET_WITH_HANDLES;
|
|
54
102
|
exports.PREVIEW_EDGE_ID = __webpack_exports__.PREVIEW_EDGE_ID;
|
|
55
103
|
exports.PREVIEW_NODE_ID = __webpack_exports__.PREVIEW_NODE_ID;
|
|
56
104
|
exports.TOOLBOX_GAP = __webpack_exports__.TOOLBOX_GAP;
|
|
@@ -61,8 +109,24 @@ exports.TOOLBOX_WIDTH = __webpack_exports__.TOOLBOX_WIDTH;
|
|
|
61
109
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
62
110
|
"CANVAS_COMPACT_BREAKPOINT",
|
|
63
111
|
"DEFAULT_NODE_SIZE",
|
|
112
|
+
"DEFAULT_RECTANGLE_NODE_WIDTH",
|
|
64
113
|
"FLOATING_CANVAS_PANEL_OFFSET",
|
|
65
114
|
"GRID_SPACING",
|
|
115
|
+
"NODE_BADGE_INSET_CIRCLE",
|
|
116
|
+
"NODE_BADGE_INSET_SQUARE",
|
|
117
|
+
"NODE_BADGE_SIZE",
|
|
118
|
+
"NODE_BORDER_SIZE",
|
|
119
|
+
"NODE_CONTAINER_RADIUS_RATIO",
|
|
120
|
+
"NODE_ERROR_ICON_SIZE",
|
|
121
|
+
"NODE_HEIGHT_DEFAULT",
|
|
122
|
+
"NODE_HEIGHT_FOOTER_BUTTON",
|
|
123
|
+
"NODE_HEIGHT_FOOTER_DOUBLE",
|
|
124
|
+
"NODE_HEIGHT_FOOTER_SINGLE",
|
|
125
|
+
"NODE_INNER_ICON_RATIO",
|
|
126
|
+
"NODE_INNER_RADIUS_RATIO",
|
|
127
|
+
"NODE_INNER_SHAPE_RATIO",
|
|
128
|
+
"NODE_TEXT_BOTTOM_OFFSET",
|
|
129
|
+
"NODE_TEXT_BOTTOM_OFFSET_WITH_HANDLES",
|
|
66
130
|
"PREVIEW_EDGE_ID",
|
|
67
131
|
"PREVIEW_NODE_ID",
|
|
68
132
|
"TOOLBOX_GAP",
|
|
@@ -9,4 +9,20 @@ export declare const TOOLBOX_PADDING_X = 20;
|
|
|
9
9
|
export declare const TOOLBOX_PADDING_Y = 12;
|
|
10
10
|
export declare const TOOLBOX_GAP = 12;
|
|
11
11
|
export declare const FLOATING_CANVAS_PANEL_OFFSET = 10;
|
|
12
|
+
export declare const DEFAULT_RECTANGLE_NODE_WIDTH = 288;
|
|
13
|
+
export declare const NODE_HEIGHT_DEFAULT: number;
|
|
14
|
+
export declare const NODE_HEIGHT_FOOTER_BUTTON: number;
|
|
15
|
+
export declare const NODE_HEIGHT_FOOTER_SINGLE: number;
|
|
16
|
+
export declare const NODE_HEIGHT_FOOTER_DOUBLE: number;
|
|
17
|
+
export declare const NODE_CONTAINER_RADIUS_RATIO: number;
|
|
18
|
+
export declare const NODE_INNER_SHAPE_RATIO: number;
|
|
19
|
+
export declare const NODE_INNER_ICON_RATIO: number;
|
|
20
|
+
export declare const NODE_INNER_RADIUS_RATIO: number;
|
|
21
|
+
export declare const NODE_BORDER_SIZE = 2;
|
|
22
|
+
export declare const NODE_ERROR_ICON_SIZE = 40;
|
|
23
|
+
export declare const NODE_TEXT_BOTTOM_OFFSET = -8;
|
|
24
|
+
export declare const NODE_TEXT_BOTTOM_OFFSET_WITH_HANDLES = -40;
|
|
25
|
+
export declare const NODE_BADGE_SIZE = 20;
|
|
26
|
+
export declare const NODE_BADGE_INSET_SQUARE = 6;
|
|
27
|
+
export declare const NODE_BADGE_INSET_CIRCLE = 12;
|
|
12
28
|
//# sourceMappingURL=constants.d.ts.map
|