@uipath/apollo-react 4.6.2-pr525.30a5d08 → 4.6.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/dist/canvas/components/AddNodePanel/AddNodeManager.cjs +1 -1
- package/dist/canvas/components/AddNodePanel/AddNodeManager.js +2 -2
- package/dist/canvas/components/BaseNode/BaseNode.cjs +75 -74
- package/dist/canvas/components/BaseNode/BaseNode.d.ts.map +1 -1
- package/dist/canvas/components/BaseNode/BaseNode.js +70 -69
- package/dist/canvas/components/BaseNode/BaseNode.styles.cjs +410 -0
- package/dist/canvas/components/BaseNode/BaseNode.styles.d.ts +75 -0
- package/dist/canvas/components/BaseNode/BaseNode.styles.d.ts.map +1 -0
- package/dist/canvas/components/BaseNode/BaseNode.styles.js +342 -0
- package/dist/canvas/components/BaseNode/BaseNodeConfigContext.d.ts +1 -2
- package/dist/canvas/components/BaseNode/BaseNodeConfigContext.d.ts.map +1 -1
- package/dist/canvas/components/BaseNode/NodeLabel.cjs +18 -64
- package/dist/canvas/components/BaseNode/NodeLabel.d.ts +1 -8
- package/dist/canvas/components/BaseNode/NodeLabel.d.ts.map +1 -1
- package/dist/canvas/components/BaseNode/NodeLabel.js +15 -58
- package/dist/canvas/components/ButtonHandle/ButtonHandleStyleUtils.cjs +7 -4
- package/dist/canvas/components/ButtonHandle/ButtonHandleStyleUtils.d.ts.map +1 -1
- package/dist/canvas/components/ButtonHandle/ButtonHandleStyleUtils.js +7 -4
- package/dist/canvas/components/CodedAgent/CodedAgentFlow.cjs +4 -4
- package/dist/canvas/components/CodedAgent/CodedAgentFlow.js +4 -4
- package/dist/canvas/components/NodeInspector.cjs +3 -2
- package/dist/canvas/components/NodeInspector.d.ts.map +1 -1
- package/dist/canvas/components/NodeInspector.js +3 -2
- package/dist/canvas/components/Toolbox/Toolbox.cjs +6 -5
- package/dist/canvas/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/canvas/components/Toolbox/Toolbox.js +6 -5
- package/dist/canvas/constants.cjs +26 -62
- package/dist/canvas/constants.d.ts +6 -15
- package/dist/canvas/constants.d.ts.map +1 -1
- package/dist/canvas/constants.js +7 -16
- package/dist/canvas/index.cjs +35 -39
- package/dist/canvas/index.d.ts +0 -1
- package/dist/canvas/index.d.ts.map +1 -1
- package/dist/canvas/index.js +0 -1
- package/dist/canvas/storybook-utils/manifests/node-definitions.d.ts.map +1 -1
- package/dist/canvas/styles/tailwind.canvas.css +1 -1
- package/package.json +1 -1
- package/dist/canvas/components/BaseNode/BaseNodeBadgeSlot.cjs +0 -68
- package/dist/canvas/components/BaseNode/BaseNodeBadgeSlot.d.ts +0 -9
- package/dist/canvas/components/BaseNode/BaseNodeBadgeSlot.d.ts.map +0 -1
- package/dist/canvas/components/BaseNode/BaseNodeBadgeSlot.js +0 -34
- package/dist/canvas/components/BaseNode/BaseNodeContainer.cjs +0 -88
- package/dist/canvas/components/BaseNode/BaseNodeContainer.d.ts +0 -21
- package/dist/canvas/components/BaseNode/BaseNodeContainer.d.ts.map +0 -1
- package/dist/canvas/components/BaseNode/BaseNodeContainer.js +0 -51
- package/dist/canvas/components/BaseNode/BaseNodeInnerShape.cjs +0 -49
- package/dist/canvas/components/BaseNode/BaseNodeInnerShape.d.ts +0 -9
- package/dist/canvas/components/BaseNode/BaseNodeInnerShape.d.ts.map +0 -1
- package/dist/canvas/components/BaseNode/BaseNodeInnerShape.js +0 -15
- package/dist/canvas/components/BaseNode/BaseNodeMissingManifest.cjs +0 -62
- package/dist/canvas/components/BaseNode/BaseNodeMissingManifest.d.ts +0 -9
- package/dist/canvas/components/BaseNode/BaseNodeMissingManifest.d.ts.map +0 -1
- package/dist/canvas/components/BaseNode/BaseNodeMissingManifest.js +0 -28
- package/dist/canvas/styles/reactflow-reset.css +0 -12
|
@@ -1,21 +1,7 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { NODE_TEXT_BOTTOM_OFFSET, NODE_TEXT_BOTTOM_OFFSET_WITH_HANDLES } from "../../constants.js";
|
|
4
|
-
import { cx } from "../../utils/CssUtil.js";
|
|
2
|
+
import { memo, useCallback, useEffect, useRef, useState } from "react";
|
|
5
3
|
import { CanvasTooltip } from "../CanvasTooltip.js";
|
|
6
|
-
|
|
7
|
-
if ('rectangle' === shape) return /*#__PURE__*/ jsx("div", {
|
|
8
|
-
className: "flex flex-1 min-w-0 flex-col items-start text-left",
|
|
9
|
-
children: children
|
|
10
|
-
});
|
|
11
|
-
return /*#__PURE__*/ jsx("div", {
|
|
12
|
-
className: cx('absolute left-1/2 w-[150%] flex flex-col z-10 transition-transform duration-200', hasBottomHandles ? 'items-start text-left translate-x-[20%] translate-y-1/2' : 'items-center text-center -translate-x-1/2 translate-y-full'),
|
|
13
|
-
style: {
|
|
14
|
-
bottom: hasBottomHandles ? NODE_TEXT_BOTTOM_OFFSET_WITH_HANDLES : NODE_TEXT_BOTTOM_OFFSET
|
|
15
|
-
},
|
|
16
|
-
children: children
|
|
17
|
-
});
|
|
18
|
-
};
|
|
4
|
+
import { BaseHeader, BaseSubHeader, BaseTextContainer, EditableLabel, EmptyLabelPlaceholder } from "./BaseNode.styles.js";
|
|
19
5
|
const ConditionalTooltip = ({ content, children })=>{
|
|
20
6
|
if (!content) return children;
|
|
21
7
|
return /*#__PURE__*/ jsx(CanvasTooltip, {
|
|
@@ -26,43 +12,6 @@ const ConditionalTooltip = ({ content, children })=>{
|
|
|
26
12
|
children: children
|
|
27
13
|
});
|
|
28
14
|
};
|
|
29
|
-
const Header = ({ shape, backgroundColor, onDoubleClick, children, 'data-testid': dataTestId })=>/*#__PURE__*/ jsx("div", {
|
|
30
|
-
"data-testid": dataTestId,
|
|
31
|
-
onDoubleClick: onDoubleClick,
|
|
32
|
-
className: cx('text-center text-sm leading-[18px] font-semibold text-foreground overflow-hidden', backgroundColor && 'px-1.5 py-0.5 rounded-sm', 'rectangle' === shape ? 'w-full text-left whitespace-nowrap text-ellipsis' : 'wrap-break-word line-clamp-3'),
|
|
33
|
-
style: backgroundColor ? {
|
|
34
|
-
backgroundColor
|
|
35
|
-
} : void 0,
|
|
36
|
-
children: children
|
|
37
|
-
});
|
|
38
|
-
const SubHeader = ({ shape, onDoubleClick, children, 'data-testid': dataTestId })=>/*#__PURE__*/ jsx("div", {
|
|
39
|
-
"data-testid": dataTestId,
|
|
40
|
-
onDoubleClick: onDoubleClick,
|
|
41
|
-
className: cx('text-center text-xs leading-[18px] text-foreground-muted wrap-break-word overflow-hidden', 'rectangle' === shape ? 'w-full text-left line-clamp-2' : 'line-clamp-5'),
|
|
42
|
-
children: children
|
|
43
|
-
});
|
|
44
|
-
const EditableLabel = /*#__PURE__*/ forwardRef(({ shape, backgroundColor, variant, value, placeholder, rows, onChange, onKeyDown, onBlur, 'aria-label': ariaLabel }, ref)=>/*#__PURE__*/ jsx("textarea", {
|
|
45
|
-
ref: ref,
|
|
46
|
-
value: value,
|
|
47
|
-
placeholder: placeholder,
|
|
48
|
-
rows: rows,
|
|
49
|
-
"aria-label": ariaLabel,
|
|
50
|
-
onChange: onChange,
|
|
51
|
-
onKeyDown: onKeyDown,
|
|
52
|
-
onBlur: onBlur,
|
|
53
|
-
className: cx('nodrag nowheel resize-none font-[inherit] text-foreground border-none rounded-sm outline-1 outline-dashed outline-border-de-emp max-w-full', 'subtext' === variant ? 'text-xs leading-[18px] font-normal mb-0' : 'text-sm leading-[18px] font-semibold mb-0.5', 'rectangle' === shape ? 'field-sizing-fixed w-full' : 'field-sizing-content text-center', backgroundColor && 'px-1.5 py-0.5'),
|
|
54
|
-
style: backgroundColor ? {
|
|
55
|
-
backgroundColor
|
|
56
|
-
} : void 0
|
|
57
|
-
}));
|
|
58
|
-
EditableLabel.displayName = 'EditableLabel';
|
|
59
|
-
const EmptyLabelPlaceholder = ({ onDoubleClick })=>/*#__PURE__*/ jsx("button", {
|
|
60
|
-
type: "button",
|
|
61
|
-
onDoubleClick: onDoubleClick,
|
|
62
|
-
className: "nodrag nowheel text-sm leading-[18px] font-semibold text-foreground-muted bg-transparent border border-dashed border-border-de-emp rounded-sm cursor-pointer opacity-0 transition-opacity duration-200 min-w-5 min-h-5 hover:opacity-100",
|
|
63
|
-
"aria-label": "Add node label",
|
|
64
|
-
"data-testid": "empty-label-placeholder"
|
|
65
|
-
});
|
|
66
15
|
const NodeLabelInternal = ({ label = '', subLabel = '', labelTooltip, labelBackgroundColor, shape, hasBottomHandles, selected, dragging, centerAdornment, readonly, onChange })=>{
|
|
67
16
|
const [isEditing, setIsEditing] = useState(false);
|
|
68
17
|
const [localLabel, setLocalLabel] = useState('');
|
|
@@ -73,7 +22,7 @@ const NodeLabelInternal = ({ label = '', subLabel = '', labelTooltip, labelBackg
|
|
|
73
22
|
const handleSave = useCallback(()=>{
|
|
74
23
|
setIsEditing(false);
|
|
75
24
|
setFocusTarget(null);
|
|
76
|
-
if (localLabel !== label || localSubLabel !== subLabel) onChange
|
|
25
|
+
if (localLabel !== label || localSubLabel !== subLabel) onChange({
|
|
77
26
|
label: localLabel,
|
|
78
27
|
subLabel: localSubLabel
|
|
79
28
|
});
|
|
@@ -152,7 +101,11 @@ const NodeLabelInternal = ({ label = '', subLabel = '', labelTooltip, labelBackg
|
|
|
152
101
|
shape: shape,
|
|
153
102
|
children: [
|
|
154
103
|
/*#__PURE__*/ jsx(EmptyLabelPlaceholder, {
|
|
155
|
-
onDoubleClick: readonly ? void 0 : handleDoubleClick(labelInputRef)
|
|
104
|
+
onDoubleClick: readonly ? void 0 : handleDoubleClick(labelInputRef),
|
|
105
|
+
className: "nodrag nowheel",
|
|
106
|
+
role: "button",
|
|
107
|
+
"aria-label": "Add node label",
|
|
108
|
+
"data-testid": "empty-label-placeholder"
|
|
156
109
|
}),
|
|
157
110
|
centerAdornment
|
|
158
111
|
]
|
|
@@ -172,8 +125,10 @@ const NodeLabelInternal = ({ label = '', subLabel = '', labelTooltip, labelBackg
|
|
|
172
125
|
shape: shape,
|
|
173
126
|
variant: "normal",
|
|
174
127
|
backgroundColor: labelBackgroundColor,
|
|
128
|
+
className: "nodrag nowheel",
|
|
175
129
|
placeholder: "Name",
|
|
176
130
|
rows: 'rectangle' === shape ? 1 : void 0,
|
|
131
|
+
role: "textbox",
|
|
177
132
|
"aria-label": "Edit node name"
|
|
178
133
|
}),
|
|
179
134
|
/*#__PURE__*/ jsx(EditableLabel, {
|
|
@@ -184,22 +139,24 @@ const NodeLabelInternal = ({ label = '', subLabel = '', labelTooltip, labelBackg
|
|
|
184
139
|
onBlur: handleBlur,
|
|
185
140
|
shape: shape,
|
|
186
141
|
variant: "subtext",
|
|
142
|
+
className: "nodrag nowheel",
|
|
187
143
|
placeholder: "Description",
|
|
188
144
|
rows: 'rectangle' === shape ? 2 : void 0,
|
|
145
|
+
role: "textbox",
|
|
189
146
|
"aria-label": "Edit node description"
|
|
190
147
|
})
|
|
191
148
|
]
|
|
192
149
|
}) : /*#__PURE__*/ jsxs(ConditionalTooltip, {
|
|
193
150
|
content: labelTooltip,
|
|
194
151
|
children: [
|
|
195
|
-
/*#__PURE__*/ jsx(
|
|
152
|
+
/*#__PURE__*/ jsx(BaseHeader, {
|
|
196
153
|
shape: shape,
|
|
197
154
|
backgroundColor: labelBackgroundColor,
|
|
198
155
|
onDoubleClick: readonly ? void 0 : handleDoubleClick(labelInputRef),
|
|
199
156
|
"data-testid": "node-label",
|
|
200
157
|
children: label
|
|
201
158
|
}),
|
|
202
|
-
subLabel && /*#__PURE__*/ jsx(
|
|
159
|
+
subLabel && /*#__PURE__*/ jsx(BaseSubHeader, {
|
|
203
160
|
shape: shape,
|
|
204
161
|
onDoubleClick: readonly ? void 0 : handleDoubleClick(subLabelInputRef),
|
|
205
162
|
"data-testid": "node-sublabel",
|
|
@@ -212,4 +169,4 @@ const NodeLabelInternal = ({ label = '', subLabel = '', labelTooltip, labelBackg
|
|
|
212
169
|
});
|
|
213
170
|
};
|
|
214
171
|
const NodeLabel = /*#__PURE__*/ memo(NodeLabelInternal);
|
|
215
|
-
export {
|
|
172
|
+
export { NodeLabel };
|
|
@@ -40,16 +40,19 @@ const external_constants_cjs_namespaceObject = require("../../constants.cjs");
|
|
|
40
40
|
const isHorizontalEdge = (position)=>position === react_cjs_namespaceObject.Position.Top || position === react_cjs_namespaceObject.Position.Bottom;
|
|
41
41
|
const isVerticalEdge = (position)=>position === react_cjs_namespaceObject.Position.Left || position === react_cjs_namespaceObject.Position.Right;
|
|
42
42
|
const snapToGrid = (value, gridSize = external_constants_cjs_namespaceObject.GRID_SPACING)=>Math.round(value / gridSize) * gridSize;
|
|
43
|
-
const calculateGridAlignedHandlePositions = (nodeSize, numHandles, gridSize = external_constants_cjs_namespaceObject.GRID_SPACING
|
|
43
|
+
const calculateGridAlignedHandlePositions = (nodeSize, numHandles, gridSize = external_constants_cjs_namespaceObject.GRID_SPACING)=>{
|
|
44
44
|
if (0 === numHandles) return [];
|
|
45
45
|
if (nodeSize <= 0) return [];
|
|
46
46
|
const idealSpacing = nodeSize / (numHandles + 1);
|
|
47
|
-
const
|
|
48
|
-
const gridAlignedSpacing = Math.max(gridSize, roundedSpacing);
|
|
47
|
+
const gridAlignedSpacing = Math.round(idealSpacing / gridSize) * gridSize;
|
|
49
48
|
const totalSpan = (numHandles - 1) * gridAlignedSpacing;
|
|
50
49
|
const startPosition = (nodeSize - totalSpan) / 2;
|
|
51
50
|
const positions = [];
|
|
52
|
-
for(let i = 0; i < numHandles; i++)
|
|
51
|
+
for(let i = 0; i < numHandles; i++){
|
|
52
|
+
const position = startPosition + i * gridAlignedSpacing;
|
|
53
|
+
const snappedPosition = snapToGrid(position, gridSize);
|
|
54
|
+
positions.push(snappedPosition);
|
|
55
|
+
}
|
|
53
56
|
return positions;
|
|
54
57
|
};
|
|
55
58
|
const pixelToPercent = (pixelPosition, nodeSize)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonHandleStyleUtils.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/ButtonHandle/ButtonHandleStyleUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AAEpE,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,qCAAqC,CAAC;AAoB/F,eAAO,MAAM,UAAU,GAAI,OAAO,MAAM,EAAE,WAAU,MAAqB,KAAG,MAE3E,CAAC;
|
|
1
|
+
{"version":3,"file":"ButtonHandleStyleUtils.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/ButtonHandle/ButtonHandleStyleUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AAEpE,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,qCAAqC,CAAC;AAoB/F,eAAO,MAAM,UAAU,GAAI,OAAO,MAAM,EAAE,WAAU,MAAqB,KAAG,MAE3E,CAAC;AASF,eAAO,MAAM,mCAAmC,GAC9C,UAAU,MAAM,EAChB,YAAY,MAAM,EAClB,WAAU,MAAqB,KAC9B,MAAM,EAuBR,CAAC;AAQF,eAAO,MAAM,cAAc,GAAI,eAAe,MAAM,EAAE,UAAU,MAAM,KAAG,MAGxE,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,wCAIxC;IACD,QAAQ,EAAE,QAAQ,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,KAAG,MAMH,CAAC;AAEF,eAAO,MAAM,2BAA2B,GAAI,yCAIzC;IACD,QAAQ,EAAE,QAAQ,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,KAAG,MAMH,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,uEAMlC;IACD,QAAQ,EAAE,QAAQ,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,KAAG,MAyBH,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,uEAMrC;IACD,QAAQ,EAAE,QAAQ,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,KAAG,MAsBH,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,sEAMnC;IACD,QAAQ,EAAE,QAAQ,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,KAAG,MAyBH,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,sEAMpC;IACD,QAAQ,EAAE,QAAQ,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,KAAG,MAsBH,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,yCAGhC;IACD,QAAQ,EAAE,QAAQ,CAAC;IACnB,wBAAwB,CAAC,EAAE,mCAAmC,CAAC;CAChE,KAAG,MAgBH,CAAC"}
|
|
@@ -3,16 +3,19 @@ import { GRID_SPACING } from "../../constants.js";
|
|
|
3
3
|
const isHorizontalEdge = (position)=>position === Position.Top || position === Position.Bottom;
|
|
4
4
|
const isVerticalEdge = (position)=>position === Position.Left || position === Position.Right;
|
|
5
5
|
const snapToGrid = (value, gridSize = GRID_SPACING)=>Math.round(value / gridSize) * gridSize;
|
|
6
|
-
const calculateGridAlignedHandlePositions = (nodeSize, numHandles, gridSize = GRID_SPACING
|
|
6
|
+
const calculateGridAlignedHandlePositions = (nodeSize, numHandles, gridSize = GRID_SPACING)=>{
|
|
7
7
|
if (0 === numHandles) return [];
|
|
8
8
|
if (nodeSize <= 0) return [];
|
|
9
9
|
const idealSpacing = nodeSize / (numHandles + 1);
|
|
10
|
-
const
|
|
11
|
-
const gridAlignedSpacing = Math.max(gridSize, roundedSpacing);
|
|
10
|
+
const gridAlignedSpacing = Math.round(idealSpacing / gridSize) * gridSize;
|
|
12
11
|
const totalSpan = (numHandles - 1) * gridAlignedSpacing;
|
|
13
12
|
const startPosition = (nodeSize - totalSpan) / 2;
|
|
14
13
|
const positions = [];
|
|
15
|
-
for(let i = 0; i < numHandles; i++)
|
|
14
|
+
for(let i = 0; i < numHandles; i++){
|
|
15
|
+
const position = startPosition + i * gridAlignedSpacing;
|
|
16
|
+
const snappedPosition = snapToGrid(position, gridSize);
|
|
17
|
+
positions.push(snappedPosition);
|
|
18
|
+
}
|
|
16
19
|
return positions;
|
|
17
20
|
};
|
|
18
21
|
const pixelToPercent = (pixelPosition, nodeSize)=>{
|
|
@@ -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 'Success';
|
|
135
|
+
if (nodeData.hasRunning) return 'Running';
|
|
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 'Success';
|
|
211
|
+
if (nodeData.hasRunning) return 'Running';
|
|
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 'Success';
|
|
97
|
+
if (nodeData.hasRunning) return 'Running';
|
|
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 'Success';
|
|
173
|
+
if (nodeData.hasRunning) return 'Running';
|
|
174
174
|
}, [
|
|
175
175
|
nodeData.hasError,
|
|
176
176
|
nodeData.hasSuccess,
|
|
@@ -29,6 +29,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29
29
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
30
|
const index_cjs_namespaceObject = require("../layouts/index.cjs");
|
|
31
31
|
const react_cjs_namespaceObject = require("../xyflow/react.cjs");
|
|
32
|
+
const external_constants_cjs_namespaceObject = require("../constants.cjs");
|
|
32
33
|
const external_FloatingCanvasPanel_index_cjs_namespaceObject = require("./FloatingCanvasPanel/index.cjs");
|
|
33
34
|
function safeStringify(obj, indent = 2) {
|
|
34
35
|
const seen = new WeakSet();
|
|
@@ -345,7 +346,7 @@ function NodeInspector({ nodeFilter, edgeFilter, showCloseButton = false, onClos
|
|
|
345
346
|
nodeId: node.id,
|
|
346
347
|
title: "Node Inspector",
|
|
347
348
|
placement: "right-start",
|
|
348
|
-
offset:
|
|
349
|
+
offset: external_constants_cjs_namespaceObject.FLOATING_CANVAS_PANEL_OFFSET,
|
|
349
350
|
onClose: showCloseButton ? onClose : void 0,
|
|
350
351
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(NodeInfoContent, {
|
|
351
352
|
node: node,
|
|
@@ -363,7 +364,7 @@ function NodeInspector({ nodeFilter, edgeFilter, showCloseButton = false, onClos
|
|
|
363
364
|
nodeId: nodeId,
|
|
364
365
|
title: "Edge Inspector",
|
|
365
366
|
placement: "right-start",
|
|
366
|
-
offset:
|
|
367
|
+
offset: external_constants_cjs_namespaceObject.FLOATING_CANVAS_PANEL_OFFSET + (nodesToShow.length > 0 ? 420 : 0) + 420 * index,
|
|
367
368
|
onClose: showCloseButton ? onClose : void 0,
|
|
368
369
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(EdgeInfoContent, {
|
|
369
370
|
edge: edge
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeInspector.d.ts","sourceRoot":"","sources":["../../../src/canvas/components/NodeInspector.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,IAAI,EACT,KAAK,IAAI,EAKV,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"NodeInspector.d.ts","sourceRoot":"","sources":["../../../src/canvas/components/NodeInspector.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,IAAI,EACT,KAAK,IAAI,EAKV,MAAM,0CAA0C,CAAC;AAsOlD,MAAM,MAAM,kBAAkB,GAAG;IAI/B,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC;IAIrC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC;IAIrC,eAAe,CAAC,EAAE,OAAO,CAAC;IAI1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAIrB,YAAY,CAAC,EAAE,OAAO,CAAC;IAIvB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,wBAAgB,aAAa,CAAC,EAC5B,UAAU,EACV,UAAU,EACV,eAAuB,EACvB,OAAO,EACP,YAAmB,EACnB,YAAmB,GACpB,GAAE,kBAAuB,kDAwFzB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Column, Row } from "../layouts/index.js";
|
|
3
3
|
import { useEdges, useNodes, useReactFlow } from "../xyflow/react.js";
|
|
4
|
+
import { FLOATING_CANVAS_PANEL_OFFSET } from "../constants.js";
|
|
4
5
|
import { FloatingCanvasPanel } from "./FloatingCanvasPanel/index.js";
|
|
5
6
|
function safeStringify(obj, indent = 2) {
|
|
6
7
|
const seen = new WeakSet();
|
|
@@ -317,7 +318,7 @@ function NodeInspector({ nodeFilter, edgeFilter, showCloseButton = false, onClos
|
|
|
317
318
|
nodeId: node.id,
|
|
318
319
|
title: "Node Inspector",
|
|
319
320
|
placement: "right-start",
|
|
320
|
-
offset:
|
|
321
|
+
offset: FLOATING_CANVAS_PANEL_OFFSET,
|
|
321
322
|
onClose: showCloseButton ? onClose : void 0,
|
|
322
323
|
children: /*#__PURE__*/ jsx(NodeInfoContent, {
|
|
323
324
|
node: node,
|
|
@@ -335,7 +336,7 @@ function NodeInspector({ nodeFilter, edgeFilter, showCloseButton = false, onClos
|
|
|
335
336
|
nodeId: nodeId,
|
|
336
337
|
title: "Edge Inspector",
|
|
337
338
|
placement: "right-start",
|
|
338
|
-
offset:
|
|
339
|
+
offset: FLOATING_CANVAS_PANEL_OFFSET + (nodesToShow.length > 0 ? 420 : 0) + 420 * index,
|
|
339
340
|
onClose: showCloseButton ? onClose : void 0,
|
|
340
341
|
children: /*#__PURE__*/ jsx(EdgeInfoContent, {
|
|
341
342
|
edge: edge
|
|
@@ -31,6 +31,7 @@ const index_cjs_namespaceObject = require("../../hooks/index.cjs");
|
|
|
31
31
|
const external_layouts_index_cjs_namespaceObject = require("../../layouts/index.cjs");
|
|
32
32
|
const external_react_namespaceObject = require("react");
|
|
33
33
|
const external_react_window_namespaceObject = require("react-window");
|
|
34
|
+
const external_constants_cjs_namespaceObject = require("../../constants.cjs");
|
|
34
35
|
const external_Header_cjs_namespaceObject = require("./Header.cjs");
|
|
35
36
|
const external_ListView_cjs_namespaceObject = require("./ListView.cjs");
|
|
36
37
|
const external_SearchBox_cjs_namespaceObject = require("./SearchBox.cjs");
|
|
@@ -389,11 +390,11 @@ function Toolbox({ onClose, onBack, onItemSelect, onSearch, onItemHover, title,
|
|
|
389
390
|
ref: containerRef,
|
|
390
391
|
"data-testid": "toolbox-container",
|
|
391
392
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_layouts_index_cjs_namespaceObject.Column, {
|
|
392
|
-
px:
|
|
393
|
-
py:
|
|
394
|
-
gap:
|
|
395
|
-
w: fullWidth ? '100%' :
|
|
396
|
-
h: fullHeight ? '100%' :
|
|
393
|
+
px: external_constants_cjs_namespaceObject.TOOLBOX_PADDING_X,
|
|
394
|
+
py: external_constants_cjs_namespaceObject.TOOLBOX_PADDING_Y,
|
|
395
|
+
gap: external_constants_cjs_namespaceObject.TOOLBOX_GAP,
|
|
396
|
+
w: fullWidth ? '100%' : external_constants_cjs_namespaceObject.TOOLBOX_WIDTH,
|
|
397
|
+
h: fullHeight ? '100%' : external_constants_cjs_namespaceObject.TOOLBOX_HEIGHT,
|
|
397
398
|
children: [
|
|
398
399
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_Header_cjs_namespaceObject.Header, {
|
|
399
400
|
title: currentParentItem?.name || title,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toolbox.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/Toolbox/Toolbox.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Toolbox.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/Toolbox/Toolbox.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,KAAK,QAAQ,EAAkD,MAAM,YAAY,CAAC;AAwC3F,MAAM,MAAM,oBAAoB,CAAC,CAAC,GAAG,GAAG,IAAI,CAC1C,KAAK,EAAE,MAAM,EACb,gBAAgB,EAAE,OAAO,EACzB,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE;IAAE,YAAY,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,KAC5E,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAE5B,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC1D,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC1C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAAC;CACpC;AAgDD,wBAAgB,OAAO,CAAC,CAAC,EAAE,EACzB,OAAO,EACP,MAAM,EACN,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,KAAK,EACL,YAAY,EACZ,OAAO,EACP,SAAiB,EACjB,UAAkB,GACnB,EAAE,YAAY,CAAC,CAAC,CAAC,2CA0cjB"}
|
|
@@ -3,6 +3,7 @@ import { useNavigationStack } from "../../hooks/index.js";
|
|
|
3
3
|
import { Column } from "../../layouts/index.js";
|
|
4
4
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
5
5
|
import { useListRef } from "react-window";
|
|
6
|
+
import { TOOLBOX_GAP, TOOLBOX_HEIGHT, TOOLBOX_PADDING_X, TOOLBOX_PADDING_Y, TOOLBOX_WIDTH } from "../../constants.js";
|
|
6
7
|
import { Header } from "./Header.js";
|
|
7
8
|
import { ListView } from "./ListView.js";
|
|
8
9
|
import { SearchBox } from "./SearchBox.js";
|
|
@@ -361,11 +362,11 @@ function Toolbox({ onClose, onBack, onItemSelect, onSearch, onItemHover, title,
|
|
|
361
362
|
ref: containerRef,
|
|
362
363
|
"data-testid": "toolbox-container",
|
|
363
364
|
children: /*#__PURE__*/ jsxs(Column, {
|
|
364
|
-
px:
|
|
365
|
-
py:
|
|
366
|
-
gap:
|
|
367
|
-
w: fullWidth ? '100%' :
|
|
368
|
-
h: fullHeight ? '100%' :
|
|
365
|
+
px: TOOLBOX_PADDING_X,
|
|
366
|
+
py: TOOLBOX_PADDING_Y,
|
|
367
|
+
gap: TOOLBOX_GAP,
|
|
368
|
+
w: fullWidth ? '100%' : TOOLBOX_WIDTH,
|
|
369
|
+
h: fullHeight ? '100%' : TOOLBOX_HEIGHT,
|
|
369
370
|
children: [
|
|
370
371
|
/*#__PURE__*/ jsx(Header, {
|
|
371
372
|
title: currentParentItem?.name || title,
|
|
@@ -26,86 +26,50 @@ __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
|
-
|
|
29
|
+
FLOATING_CANVAS_PANEL_OFFSET: ()=>FLOATING_CANVAS_PANEL_OFFSET,
|
|
30
30
|
GRID_SPACING: ()=>GRID_SPACING,
|
|
31
|
-
NODE_BADGE_INSET_CIRCLE: ()=>NODE_BADGE_INSET_CIRCLE,
|
|
32
|
-
NODE_BADGE_INSET_SQUARE: ()=>NODE_BADGE_INSET_SQUARE,
|
|
33
|
-
NODE_BADGE_SIZE: ()=>NODE_BADGE_SIZE,
|
|
34
|
-
NODE_CONTAINER_RADIUS_RATIO: ()=>NODE_CONTAINER_RADIUS_RATIO,
|
|
35
|
-
NODE_ERROR_ICON_SIZE: ()=>NODE_ERROR_ICON_SIZE,
|
|
36
|
-
NODE_HEIGHT_DEFAULT: ()=>NODE_HEIGHT_DEFAULT,
|
|
37
|
-
NODE_HEIGHT_FOOTER_BUTTON: ()=>NODE_HEIGHT_FOOTER_BUTTON,
|
|
38
|
-
NODE_HEIGHT_FOOTER_DOUBLE: ()=>NODE_HEIGHT_FOOTER_DOUBLE,
|
|
39
|
-
NODE_HEIGHT_FOOTER_SINGLE: ()=>NODE_HEIGHT_FOOTER_SINGLE,
|
|
40
|
-
NODE_INNER_ICON_RATIO: ()=>NODE_INNER_ICON_RATIO,
|
|
41
|
-
NODE_INNER_RADIUS_RATIO: ()=>NODE_INNER_RADIUS_RATIO,
|
|
42
|
-
NODE_INNER_SHAPE_RATIO: ()=>NODE_INNER_SHAPE_RATIO,
|
|
43
|
-
NODE_TEXT_BOTTOM_OFFSET: ()=>NODE_TEXT_BOTTOM_OFFSET,
|
|
44
|
-
NODE_TEXT_BOTTOM_OFFSET_WITH_HANDLES: ()=>NODE_TEXT_BOTTOM_OFFSET_WITH_HANDLES,
|
|
45
31
|
PREVIEW_EDGE_ID: ()=>PREVIEW_EDGE_ID,
|
|
46
|
-
PREVIEW_NODE_ID: ()=>PREVIEW_NODE_ID
|
|
32
|
+
PREVIEW_NODE_ID: ()=>PREVIEW_NODE_ID,
|
|
33
|
+
TOOLBOX_GAP: ()=>TOOLBOX_GAP,
|
|
34
|
+
TOOLBOX_HEIGHT: ()=>TOOLBOX_HEIGHT,
|
|
35
|
+
TOOLBOX_PADDING_X: ()=>TOOLBOX_PADDING_X,
|
|
36
|
+
TOOLBOX_PADDING_Y: ()=>TOOLBOX_PADDING_Y,
|
|
37
|
+
TOOLBOX_WIDTH: ()=>TOOLBOX_WIDTH
|
|
47
38
|
});
|
|
48
39
|
const PREVIEW_NODE_ID = 'preview-node-id';
|
|
49
40
|
const PREVIEW_EDGE_ID = 'preview-edge-id';
|
|
50
41
|
const DEFAULT_NODE_SIZE = 96;
|
|
51
42
|
const GRID_SPACING = 16;
|
|
52
43
|
const CANVAS_COMPACT_BREAKPOINT = 600;
|
|
53
|
-
const
|
|
54
|
-
const
|
|
55
|
-
const
|
|
56
|
-
const
|
|
57
|
-
const
|
|
58
|
-
const
|
|
59
|
-
const NODE_INNER_SHAPE_RATIO = 80 / DEFAULT_NODE_SIZE;
|
|
60
|
-
const NODE_INNER_ICON_RATIO = 40 / DEFAULT_NODE_SIZE;
|
|
61
|
-
const NODE_INNER_RADIUS_RATIO = 24 / DEFAULT_NODE_SIZE;
|
|
62
|
-
const NODE_ERROR_ICON_SIZE = 40;
|
|
63
|
-
const NODE_TEXT_BOTTOM_OFFSET = -8;
|
|
64
|
-
const NODE_TEXT_BOTTOM_OFFSET_WITH_HANDLES = -40;
|
|
65
|
-
const NODE_BADGE_SIZE = 20;
|
|
66
|
-
const NODE_BADGE_INSET_SQUARE = 6;
|
|
67
|
-
const NODE_BADGE_INSET_CIRCLE = 12;
|
|
44
|
+
const TOOLBOX_WIDTH = 320;
|
|
45
|
+
const TOOLBOX_HEIGHT = 440;
|
|
46
|
+
const TOOLBOX_PADDING_X = 20;
|
|
47
|
+
const TOOLBOX_PADDING_Y = 12;
|
|
48
|
+
const TOOLBOX_GAP = 12;
|
|
49
|
+
const FLOATING_CANVAS_PANEL_OFFSET = 10;
|
|
68
50
|
exports.CANVAS_COMPACT_BREAKPOINT = __webpack_exports__.CANVAS_COMPACT_BREAKPOINT;
|
|
69
51
|
exports.DEFAULT_NODE_SIZE = __webpack_exports__.DEFAULT_NODE_SIZE;
|
|
70
|
-
exports.
|
|
52
|
+
exports.FLOATING_CANVAS_PANEL_OFFSET = __webpack_exports__.FLOATING_CANVAS_PANEL_OFFSET;
|
|
71
53
|
exports.GRID_SPACING = __webpack_exports__.GRID_SPACING;
|
|
72
|
-
exports.NODE_BADGE_INSET_CIRCLE = __webpack_exports__.NODE_BADGE_INSET_CIRCLE;
|
|
73
|
-
exports.NODE_BADGE_INSET_SQUARE = __webpack_exports__.NODE_BADGE_INSET_SQUARE;
|
|
74
|
-
exports.NODE_BADGE_SIZE = __webpack_exports__.NODE_BADGE_SIZE;
|
|
75
|
-
exports.NODE_CONTAINER_RADIUS_RATIO = __webpack_exports__.NODE_CONTAINER_RADIUS_RATIO;
|
|
76
|
-
exports.NODE_ERROR_ICON_SIZE = __webpack_exports__.NODE_ERROR_ICON_SIZE;
|
|
77
|
-
exports.NODE_HEIGHT_DEFAULT = __webpack_exports__.NODE_HEIGHT_DEFAULT;
|
|
78
|
-
exports.NODE_HEIGHT_FOOTER_BUTTON = __webpack_exports__.NODE_HEIGHT_FOOTER_BUTTON;
|
|
79
|
-
exports.NODE_HEIGHT_FOOTER_DOUBLE = __webpack_exports__.NODE_HEIGHT_FOOTER_DOUBLE;
|
|
80
|
-
exports.NODE_HEIGHT_FOOTER_SINGLE = __webpack_exports__.NODE_HEIGHT_FOOTER_SINGLE;
|
|
81
|
-
exports.NODE_INNER_ICON_RATIO = __webpack_exports__.NODE_INNER_ICON_RATIO;
|
|
82
|
-
exports.NODE_INNER_RADIUS_RATIO = __webpack_exports__.NODE_INNER_RADIUS_RATIO;
|
|
83
|
-
exports.NODE_INNER_SHAPE_RATIO = __webpack_exports__.NODE_INNER_SHAPE_RATIO;
|
|
84
|
-
exports.NODE_TEXT_BOTTOM_OFFSET = __webpack_exports__.NODE_TEXT_BOTTOM_OFFSET;
|
|
85
|
-
exports.NODE_TEXT_BOTTOM_OFFSET_WITH_HANDLES = __webpack_exports__.NODE_TEXT_BOTTOM_OFFSET_WITH_HANDLES;
|
|
86
54
|
exports.PREVIEW_EDGE_ID = __webpack_exports__.PREVIEW_EDGE_ID;
|
|
87
55
|
exports.PREVIEW_NODE_ID = __webpack_exports__.PREVIEW_NODE_ID;
|
|
56
|
+
exports.TOOLBOX_GAP = __webpack_exports__.TOOLBOX_GAP;
|
|
57
|
+
exports.TOOLBOX_HEIGHT = __webpack_exports__.TOOLBOX_HEIGHT;
|
|
58
|
+
exports.TOOLBOX_PADDING_X = __webpack_exports__.TOOLBOX_PADDING_X;
|
|
59
|
+
exports.TOOLBOX_PADDING_Y = __webpack_exports__.TOOLBOX_PADDING_Y;
|
|
60
|
+
exports.TOOLBOX_WIDTH = __webpack_exports__.TOOLBOX_WIDTH;
|
|
88
61
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
89
62
|
"CANVAS_COMPACT_BREAKPOINT",
|
|
90
63
|
"DEFAULT_NODE_SIZE",
|
|
91
|
-
"
|
|
64
|
+
"FLOATING_CANVAS_PANEL_OFFSET",
|
|
92
65
|
"GRID_SPACING",
|
|
93
|
-
"NODE_BADGE_INSET_CIRCLE",
|
|
94
|
-
"NODE_BADGE_INSET_SQUARE",
|
|
95
|
-
"NODE_BADGE_SIZE",
|
|
96
|
-
"NODE_CONTAINER_RADIUS_RATIO",
|
|
97
|
-
"NODE_ERROR_ICON_SIZE",
|
|
98
|
-
"NODE_HEIGHT_DEFAULT",
|
|
99
|
-
"NODE_HEIGHT_FOOTER_BUTTON",
|
|
100
|
-
"NODE_HEIGHT_FOOTER_DOUBLE",
|
|
101
|
-
"NODE_HEIGHT_FOOTER_SINGLE",
|
|
102
|
-
"NODE_INNER_ICON_RATIO",
|
|
103
|
-
"NODE_INNER_RADIUS_RATIO",
|
|
104
|
-
"NODE_INNER_SHAPE_RATIO",
|
|
105
|
-
"NODE_TEXT_BOTTOM_OFFSET",
|
|
106
|
-
"NODE_TEXT_BOTTOM_OFFSET_WITH_HANDLES",
|
|
107
66
|
"PREVIEW_EDGE_ID",
|
|
108
|
-
"PREVIEW_NODE_ID"
|
|
67
|
+
"PREVIEW_NODE_ID",
|
|
68
|
+
"TOOLBOX_GAP",
|
|
69
|
+
"TOOLBOX_HEIGHT",
|
|
70
|
+
"TOOLBOX_PADDING_X",
|
|
71
|
+
"TOOLBOX_PADDING_Y",
|
|
72
|
+
"TOOLBOX_WIDTH"
|
|
109
73
|
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
110
74
|
Object.defineProperty(exports, '__esModule', {
|
|
111
75
|
value: true
|
|
@@ -3,19 +3,10 @@ export declare const PREVIEW_EDGE_ID = "preview-edge-id";
|
|
|
3
3
|
export declare const DEFAULT_NODE_SIZE = 96;
|
|
4
4
|
export declare const GRID_SPACING = 16;
|
|
5
5
|
export declare const CANVAS_COMPACT_BREAKPOINT = 600;
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
12
|
-
export declare const NODE_INNER_SHAPE_RATIO: number;
|
|
13
|
-
export declare const NODE_INNER_ICON_RATIO: number;
|
|
14
|
-
export declare const NODE_INNER_RADIUS_RATIO: number;
|
|
15
|
-
export declare const NODE_ERROR_ICON_SIZE = 40;
|
|
16
|
-
export declare const NODE_TEXT_BOTTOM_OFFSET = -8;
|
|
17
|
-
export declare const NODE_TEXT_BOTTOM_OFFSET_WITH_HANDLES = -40;
|
|
18
|
-
export declare const NODE_BADGE_SIZE = 20;
|
|
19
|
-
export declare const NODE_BADGE_INSET_SQUARE = 6;
|
|
20
|
-
export declare const NODE_BADGE_INSET_CIRCLE = 12;
|
|
6
|
+
export declare const TOOLBOX_WIDTH = 320;
|
|
7
|
+
export declare const TOOLBOX_HEIGHT = 440;
|
|
8
|
+
export declare const TOOLBOX_PADDING_X = 20;
|
|
9
|
+
export declare const TOOLBOX_PADDING_Y = 12;
|
|
10
|
+
export declare const TOOLBOX_GAP = 12;
|
|
11
|
+
export declare const FLOATING_CANVAS_PANEL_OFFSET = 10;
|
|
21
12
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/canvas/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,eAAO,MAAM,YAAY,KAAK,CAAC;AAG/B,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAG7C,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/canvas/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,eAAO,MAAM,YAAY,KAAK,CAAC;AAG/B,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAG7C,eAAO,MAAM,aAAa,MAAM,CAAC;AAEjC,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,eAAO,MAAM,WAAW,KAAK,CAAC;AAU9B,eAAO,MAAM,4BAA4B,KAAK,CAAC"}
|
package/dist/canvas/constants.js
CHANGED
|
@@ -3,19 +3,10 @@ const PREVIEW_EDGE_ID = 'preview-edge-id';
|
|
|
3
3
|
const DEFAULT_NODE_SIZE = 96;
|
|
4
4
|
const GRID_SPACING = 16;
|
|
5
5
|
const CANVAS_COMPACT_BREAKPOINT = 600;
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
const NODE_INNER_ICON_RATIO = 40 / DEFAULT_NODE_SIZE;
|
|
14
|
-
const NODE_INNER_RADIUS_RATIO = 24 / DEFAULT_NODE_SIZE;
|
|
15
|
-
const NODE_ERROR_ICON_SIZE = 40;
|
|
16
|
-
const NODE_TEXT_BOTTOM_OFFSET = -8;
|
|
17
|
-
const NODE_TEXT_BOTTOM_OFFSET_WITH_HANDLES = -40;
|
|
18
|
-
const NODE_BADGE_SIZE = 20;
|
|
19
|
-
const NODE_BADGE_INSET_SQUARE = 6;
|
|
20
|
-
const NODE_BADGE_INSET_CIRCLE = 12;
|
|
21
|
-
export { CANVAS_COMPACT_BREAKPOINT, DEFAULT_NODE_SIZE, DEFAULT_RECTANGLE_NODE_WIDTH, GRID_SPACING, NODE_BADGE_INSET_CIRCLE, NODE_BADGE_INSET_SQUARE, NODE_BADGE_SIZE, NODE_CONTAINER_RADIUS_RATIO, NODE_ERROR_ICON_SIZE, NODE_HEIGHT_DEFAULT, NODE_HEIGHT_FOOTER_BUTTON, NODE_HEIGHT_FOOTER_DOUBLE, NODE_HEIGHT_FOOTER_SINGLE, NODE_INNER_ICON_RATIO, NODE_INNER_RADIUS_RATIO, NODE_INNER_SHAPE_RATIO, NODE_TEXT_BOTTOM_OFFSET, NODE_TEXT_BOTTOM_OFFSET_WITH_HANDLES, PREVIEW_EDGE_ID, PREVIEW_NODE_ID };
|
|
6
|
+
const TOOLBOX_WIDTH = 320;
|
|
7
|
+
const TOOLBOX_HEIGHT = 440;
|
|
8
|
+
const TOOLBOX_PADDING_X = 20;
|
|
9
|
+
const TOOLBOX_PADDING_Y = 12;
|
|
10
|
+
const TOOLBOX_GAP = 12;
|
|
11
|
+
const FLOATING_CANVAS_PANEL_OFFSET = 10;
|
|
12
|
+
export { CANVAS_COMPACT_BREAKPOINT, DEFAULT_NODE_SIZE, FLOATING_CANVAS_PANEL_OFFSET, GRID_SPACING, PREVIEW_EDGE_ID, PREVIEW_NODE_ID, TOOLBOX_GAP, TOOLBOX_HEIGHT, TOOLBOX_PADDING_X, TOOLBOX_PADDING_Y, TOOLBOX_WIDTH };
|