@uipath/apollo-react 3.64.0-pr431.cb6b0b8 → 3.65.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.
Files changed (48) hide show
  1. package/dist/canvas/components/NodePropertiesPanel/hooks/index.cjs +1 -4
  2. package/dist/canvas/components/NodePropertiesPanel/hooks/index.d.ts +1 -1
  3. package/dist/canvas/components/NodePropertiesPanel/hooks/index.d.ts.map +1 -1
  4. package/dist/canvas/components/NodePropertiesPanel/hooks/index.js +2 -2
  5. package/dist/canvas/components/NodePropertiesPanel/hooks/useNodeSelection.cjs +6 -27
  6. package/dist/canvas/components/NodePropertiesPanel/hooks/useNodeSelection.d.ts +0 -3
  7. package/dist/canvas/components/NodePropertiesPanel/hooks/useNodeSelection.d.ts.map +1 -1
  8. package/dist/canvas/components/NodePropertiesPanel/hooks/useNodeSelection.js +5 -23
  9. package/dist/canvas/components/StageNode/DraggableTask.cjs +5 -14
  10. package/dist/canvas/components/StageNode/DraggableTask.d.ts +1 -1
  11. package/dist/canvas/components/StageNode/DraggableTask.d.ts.map +1 -1
  12. package/dist/canvas/components/StageNode/DraggableTask.js +5 -14
  13. package/dist/canvas/components/StageNode/DraggableTask.types.d.ts +3 -3
  14. package/dist/canvas/components/StageNode/DraggableTask.types.d.ts.map +1 -1
  15. package/dist/canvas/components/StageNode/StageEdge.cjs +11 -34
  16. package/dist/canvas/components/StageNode/StageEdge.d.ts +1 -2
  17. package/dist/canvas/components/StageNode/StageEdge.d.ts.map +1 -1
  18. package/dist/canvas/components/StageNode/StageEdge.js +12 -35
  19. package/dist/canvas/components/StageNode/StageNode.cjs +51 -54
  20. package/dist/canvas/components/StageNode/StageNode.d.ts +1 -1
  21. package/dist/canvas/components/StageNode/StageNode.d.ts.map +1 -1
  22. package/dist/canvas/components/StageNode/StageNode.js +56 -59
  23. package/dist/canvas/components/StageNode/StageNode.stories.cjs +157 -116
  24. package/dist/canvas/components/StageNode/StageNode.stories.d.ts.map +1 -1
  25. package/dist/canvas/components/StageNode/StageNode.stories.js +153 -112
  26. package/dist/canvas/components/StageNode/StageNode.types.d.ts +2 -9
  27. package/dist/canvas/components/StageNode/StageNode.types.d.ts.map +1 -1
  28. package/dist/canvas/components/StageNode/StageNodeTaskUtilities.cjs +3 -2
  29. package/dist/canvas/components/StageNode/StageNodeTaskUtilities.d.ts +1 -1
  30. package/dist/canvas/components/StageNode/StageNodeTaskUtilities.d.ts.map +1 -1
  31. package/dist/canvas/components/StageNode/StageNodeTaskUtilities.js +3 -2
  32. package/dist/canvas/components/StageNode/TaskMenu.cjs +17 -13
  33. package/dist/canvas/components/StageNode/TaskMenu.d.ts +2 -1
  34. package/dist/canvas/components/StageNode/TaskMenu.d.ts.map +1 -1
  35. package/dist/canvas/components/StageNode/TaskMenu.js +18 -14
  36. package/package.json +1 -1
  37. package/dist/canvas/components/CanvasPerformance.stories.cjs +0 -361
  38. package/dist/canvas/components/CanvasPerformance.stories.d.ts +0 -6
  39. package/dist/canvas/components/CanvasPerformance.stories.d.ts.map +0 -1
  40. package/dist/canvas/components/CanvasPerformance.stories.js +0 -324
  41. package/dist/canvas/components/StageNode/StageNode.stories.utils.cjs +0 -42
  42. package/dist/canvas/components/StageNode/StageNode.stories.utils.d.ts +0 -3
  43. package/dist/canvas/components/StageNode/StageNode.stories.utils.d.ts.map +0 -1
  44. package/dist/canvas/components/StageNode/StageNode.stories.utils.js +0 -8
  45. package/dist/canvas/components/StageNode/StageTaskDragOverlay.cjs +0 -68
  46. package/dist/canvas/components/StageNode/StageTaskDragOverlay.d.ts +0 -3
  47. package/dist/canvas/components/StageNode/StageTaskDragOverlay.d.ts.map +0 -1
  48. package/dist/canvas/components/StageNode/StageTaskDragOverlay.js +0 -34
@@ -1,324 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { ConnectionMode, Panel, ReactFlowProvider, addEdge, useEdgesState, useNodesState } from "../xyflow/react.js";
3
- import { useCallback, useMemo, useState } from "react";
4
- import { DefaultCanvasTranslations } from "../types.js";
5
- import { BaseCanvas } from "./BaseCanvas/index.js";
6
- import { CanvasPositionControls } from "./CanvasPositionControls.js";
7
- import { StageConnectionEdge } from "./StageNode/StageConnectionEdge.js";
8
- import { StageEdge } from "./StageNode/StageEdge.js";
9
- import { StageNodeWrapper } from "./StageNode/StageNode.stories.utils.js";
10
- const meta = {
11
- title: 'Canvas/Performance',
12
- parameters: {
13
- layout: 'fullscreen'
14
- }
15
- };
16
- const CanvasPerformance_stories = meta;
17
- const PERFORMANCE_STAGE_NODE_WIDTH = 304;
18
- const PERFORMANCE_STAGE_SPACING_X = 400;
19
- const PERFORMANCE_STAGE_SPACING_Y = 384;
20
- const DEFAULT_STAGE_COUNT = 48;
21
- const MIN_STAGE_COUNT = 1;
22
- const MAX_STAGE_COUNT = 200;
23
- const VerificationIcon = ()=>/*#__PURE__*/ jsxs("svg", {
24
- viewBox: "0 0 24 24",
25
- fill: "none",
26
- stroke: "currentColor",
27
- strokeWidth: "1.5",
28
- children: [
29
- /*#__PURE__*/ jsx("path", {
30
- d: "M9 11L12 14L20 6"
31
- }),
32
- /*#__PURE__*/ jsx("path", {
33
- d: "M20 12V18C20 19.1046 19.1046 20 18 20H6C4.89543 20 4 19.1046 4 18V6C4 4.89543 4.89543 4 6 4H13"
34
- })
35
- ]
36
- });
37
- const DocumentIcon = ()=>/*#__PURE__*/ jsxs("svg", {
38
- viewBox: "0 0 24 24",
39
- fill: "none",
40
- stroke: "currentColor",
41
- strokeWidth: "1.5",
42
- children: [
43
- /*#__PURE__*/ jsx("path", {
44
- d: "M14 2H6C4.9 2 4 2.9 4 4V20C4 21.1 4.9 22 6 22H18C19.1 22 20 21.1 20 20V8L14 2Z"
45
- }),
46
- /*#__PURE__*/ jsx("path", {
47
- d: "M14 2V8H20"
48
- }),
49
- /*#__PURE__*/ jsx("path", {
50
- d: "M8 12H16"
51
- }),
52
- /*#__PURE__*/ jsx("path", {
53
- d: "M8 16H16"
54
- })
55
- ]
56
- });
57
- const ProcessIcon = ()=>/*#__PURE__*/ jsxs("svg", {
58
- viewBox: "0 0 24 24",
59
- fill: "none",
60
- stroke: "currentColor",
61
- strokeWidth: "1.5",
62
- children: [
63
- /*#__PURE__*/ jsx("rect", {
64
- x: "3",
65
- y: "3",
66
- width: "7",
67
- height: "7",
68
- rx: "1"
69
- }),
70
- /*#__PURE__*/ jsx("rect", {
71
- x: "14",
72
- y: "3",
73
- width: "7",
74
- height: "7",
75
- rx: "1"
76
- }),
77
- /*#__PURE__*/ jsx("rect", {
78
- x: "3",
79
- y: "14",
80
- width: "7",
81
- height: "7",
82
- rx: "1"
83
- }),
84
- /*#__PURE__*/ jsx("rect", {
85
- x: "14",
86
- y: "14",
87
- width: "7",
88
- height: "7",
89
- rx: "1"
90
- })
91
- ]
92
- });
93
- function createPerformanceStageTasks(index) {
94
- return [
95
- [
96
- {
97
- id: `stage-${index}-task-intake`,
98
- label: 'Intake Review',
99
- icon: /*#__PURE__*/ jsx(VerificationIcon, {})
100
- }
101
- ],
102
- [
103
- {
104
- id: `stage-${index}-task-documents`,
105
- label: 'Document Processing',
106
- icon: /*#__PURE__*/ jsx(DocumentIcon, {})
107
- }
108
- ],
109
- [
110
- {
111
- id: `stage-${index}-task-risk`,
112
- label: 'Risk Assessment',
113
- icon: /*#__PURE__*/ jsx(VerificationIcon, {})
114
- },
115
- {
116
- id: `stage-${index}-task-policy`,
117
- label: 'Policy Validation',
118
- icon: /*#__PURE__*/ jsx(VerificationIcon, {})
119
- }
120
- ],
121
- [
122
- {
123
- id: `stage-${index}-task-review`,
124
- label: 'Final Review',
125
- icon: /*#__PURE__*/ jsx(ProcessIcon, {})
126
- }
127
- ]
128
- ];
129
- }
130
- function createPerformanceStageNodes(stageCount) {
131
- const columns = Math.ceil(Math.sqrt(stageCount));
132
- return Array.from({
133
- length: stageCount
134
- }, (_, index)=>{
135
- const row = Math.floor(index / columns);
136
- const col = index % columns;
137
- const stageId = `performance-stage-${index}`;
138
- return {
139
- id: stageId,
140
- type: 'stage',
141
- position: {
142
- x: col * PERFORMANCE_STAGE_SPACING_X,
143
- y: row * PERFORMANCE_STAGE_SPACING_Y
144
- },
145
- width: PERFORMANCE_STAGE_NODE_WIDTH,
146
- data: {
147
- stageDetails: {
148
- label: `Performance Stage ${index + 1}`,
149
- tasks: createPerformanceStageTasks(index)
150
- },
151
- execution: {
152
- stageStatus: {
153
- duration: `SLA: ${30 + index % 5 * 15}m`
154
- }
155
- }
156
- }
157
- };
158
- });
159
- }
160
- function createPerformanceStageEdges(stageCount) {
161
- const columns = Math.ceil(Math.sqrt(stageCount));
162
- const edges = [];
163
- for(let index = 0; index < stageCount; index++){
164
- const col = index % columns;
165
- const sourceId = `performance-stage-${index}`;
166
- const rightIndex = index + 1;
167
- if (col < columns - 1 && rightIndex < stageCount) {
168
- const targetId = `performance-stage-${rightIndex}`;
169
- edges.push({
170
- id: `performance-edge-right-${index}`,
171
- type: 'stage',
172
- source: sourceId,
173
- sourceHandle: `${sourceId}____source____right`,
174
- target: targetId,
175
- targetHandle: `${targetId}____target____left`
176
- });
177
- }
178
- const downIndex = index + columns;
179
- if (downIndex < stageCount) {
180
- const targetId = `performance-stage-${downIndex}`;
181
- edges.push({
182
- id: `performance-edge-down-${index}`,
183
- type: 'stage',
184
- source: sourceId,
185
- sourceHandle: `${sourceId}____source____bottom`,
186
- target: targetId,
187
- targetHandle: `${targetId}____target____top`
188
- });
189
- }
190
- }
191
- return edges;
192
- }
193
- const CanvasPerformanceStory = ()=>{
194
- const nodeTypes = useMemo(()=>({
195
- stage: StageNodeWrapper
196
- }), []);
197
- const edgeTypes = useMemo(()=>({
198
- stage: StageEdge
199
- }), []);
200
- const defaultEdgeOptions = useMemo(()=>({
201
- type: 'stage'
202
- }), []);
203
- const [stageCount, setStageCount] = useState(DEFAULT_STAGE_COUNT);
204
- const [nodes, setNodes, onNodesChange] = useNodesState(createPerformanceStageNodes(DEFAULT_STAGE_COUNT));
205
- const [edges, setEdges, onEdgesChange] = useEdgesState(createPerformanceStageEdges(DEFAULT_STAGE_COUNT));
206
- const onConnect = useCallback((connection)=>setEdges((eds)=>addEdge(connection, eds)), [
207
- setEdges
208
- ]);
209
- const handleStageCountChange = useCallback((e)=>{
210
- const nextCount = Number.parseInt(e.target.value, 10);
211
- setStageCount(nextCount);
212
- setNodes(createPerformanceStageNodes(nextCount));
213
- setEdges(createPerformanceStageEdges(nextCount));
214
- }, [
215
- setEdges,
216
- setNodes
217
- ]);
218
- return /*#__PURE__*/ jsx("div", {
219
- style: {
220
- width: '100vw',
221
- height: '100vh'
222
- },
223
- children: /*#__PURE__*/ jsx(ReactFlowProvider, {
224
- children: /*#__PURE__*/ jsxs(BaseCanvas, {
225
- nodes: nodes,
226
- edges: edges,
227
- onNodesChange: onNodesChange,
228
- onEdgesChange: onEdgesChange,
229
- onConnect: onConnect,
230
- nodeTypes: nodeTypes,
231
- edgeTypes: edgeTypes,
232
- mode: "design",
233
- connectionMode: ConnectionMode.Strict,
234
- defaultEdgeOptions: defaultEdgeOptions,
235
- connectionLineComponent: StageConnectionEdge,
236
- elevateEdgesOnSelect: true,
237
- children: [
238
- /*#__PURE__*/ jsx(Panel, {
239
- position: "top-left",
240
- children: /*#__PURE__*/ jsxs("div", {
241
- className: "nodrag nopan nowheel",
242
- style: {
243
- width: 240,
244
- background: 'var(--uix-canvas-background)',
245
- border: '1px solid var(--uix-canvas-border-de-emp)',
246
- borderRadius: 16,
247
- padding: 16,
248
- boxShadow: '0 8px 32px rgba(15, 23, 42, 0.08)'
249
- },
250
- children: [
251
- /*#__PURE__*/ jsx("div", {
252
- style: {
253
- fontWeight: 600,
254
- fontSize: 14
255
- },
256
- children: "Performance Test"
257
- }),
258
- /*#__PURE__*/ jsx("div", {
259
- style: {
260
- marginTop: 6,
261
- color: 'var(--uix-canvas-foreground-de-emp)',
262
- fontSize: 12,
263
- lineHeight: 1.4
264
- },
265
- children: "Adjust the number of stage nodes to profile drag and pan performance."
266
- }),
267
- /*#__PURE__*/ jsxs("div", {
268
- style: {
269
- display: 'flex',
270
- justifyContent: 'space-between',
271
- alignItems: 'center',
272
- marginTop: 12,
273
- marginBottom: 8,
274
- fontSize: 12
275
- },
276
- children: [
277
- /*#__PURE__*/ jsx("span", {
278
- children: "Stage Count"
279
- }),
280
- /*#__PURE__*/ jsx("strong", {
281
- style: {
282
- fontSize: 14
283
- },
284
- children: stageCount
285
- })
286
- ]
287
- }),
288
- /*#__PURE__*/ jsx("input", {
289
- type: "range",
290
- min: MIN_STAGE_COUNT,
291
- max: MAX_STAGE_COUNT,
292
- value: stageCount,
293
- onChange: handleStageCountChange,
294
- style: {
295
- width: '100%',
296
- cursor: 'pointer'
297
- }
298
- })
299
- ]
300
- })
301
- }),
302
- /*#__PURE__*/ jsx(Panel, {
303
- position: "bottom-right",
304
- children: /*#__PURE__*/ jsx(CanvasPositionControls, {
305
- translations: DefaultCanvasTranslations
306
- })
307
- })
308
- ]
309
- })
310
- })
311
- });
312
- };
313
- const StageWorkflow = {
314
- name: 'Stage Workflow',
315
- parameters: {
316
- docs: {
317
- description: {
318
- story: 'Standalone performance story with adjustable stage count. Use this to profile stage workflow drag and pan behavior under load.'
319
- }
320
- }
321
- },
322
- render: ()=>/*#__PURE__*/ jsx(CanvasPerformanceStory, {})
323
- };
324
- export { StageWorkflow, CanvasPerformance_stories as default };
@@ -1,42 +0,0 @@
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
- StageNodeWrapper: ()=>StageNodeWrapper
28
- });
29
- const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
- const external_react_namespaceObject = require("react");
31
- const external_StageNode_cjs_namespaceObject = require("./StageNode.cjs");
32
- const StageNodeWrapper = /*#__PURE__*/ (0, external_react_namespaceObject.memo)((props)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_StageNode_cjs_namespaceObject.StageNode, {
33
- ...props,
34
- ...props.data
35
- }));
36
- exports.StageNodeWrapper = __webpack_exports__.StageNodeWrapper;
37
- for(var __rspack_i in __webpack_exports__)if (-1 === [
38
- "StageNodeWrapper"
39
- ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
40
- Object.defineProperty(exports, '__esModule', {
41
- value: true
42
- });
@@ -1,3 +0,0 @@
1
- import type { NodeProps } from '../../xyflow/react.ts';
2
- export declare const StageNodeWrapper: import("react").MemoExoticComponent<(props: NodeProps) => import("react/jsx-runtime").JSX.Element>;
3
- //# sourceMappingURL=StageNode.stories.utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StageNode.stories.utils.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageNode.stories.utils.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAK1E,eAAO,MAAM,gBAAgB,8CAAgB,SAAS,6CAEpD,CAAC"}
@@ -1,8 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { memo } from "react";
3
- import { StageNode } from "./StageNode.js";
4
- const StageNodeWrapper = /*#__PURE__*/ memo((props)=>/*#__PURE__*/ jsx(StageNode, {
5
- ...props,
6
- ...props.data
7
- }));
8
- export { StageNodeWrapper };
@@ -1,68 +0,0 @@
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
- StageTaskDragOverlay: ()=>StageTaskDragOverlay
28
- });
29
- const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
- const core_namespaceObject = require("@dnd-kit/core");
31
- const react_cjs_namespaceObject = require("../../xyflow/react.cjs");
32
- const external_react_namespaceObject = require("react");
33
- const external_react_dom_namespaceObject = require("react-dom");
34
- const external_DraggableTask_cjs_namespaceObject = require("./DraggableTask.cjs");
35
- const external_StageNode_styles_cjs_namespaceObject = require("./StageNode.styles.cjs");
36
- const StageTaskDragOverlay = ({ activeTask, isActiveTaskParallel, taskWidthStyle })=>{
37
- const { zoom } = (0, react_cjs_namespaceObject.useViewport)();
38
- const dragOverlayStyle = (0, external_react_namespaceObject.useMemo)(()=>({
39
- transform: `scale(${zoom})`,
40
- transformOrigin: 'top left'
41
- }), [
42
- zoom
43
- ]);
44
- return /*#__PURE__*/ (0, external_react_dom_namespaceObject.createPortal)(/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(core_namespaceObject.DragOverlay, {
45
- children: activeTask ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
46
- style: dragOverlayStyle,
47
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_StageNode_styles_cjs_namespaceObject.StageTask, {
48
- selected: true,
49
- isParallel: isActiveTaskParallel,
50
- style: {
51
- cursor: 'grabbing',
52
- ...taskWidthStyle
53
- },
54
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_DraggableTask_cjs_namespaceObject.TaskContent, {
55
- task: activeTask,
56
- isDragging: true
57
- })
58
- })
59
- }) : null
60
- }), document.body);
61
- };
62
- exports.StageTaskDragOverlay = __webpack_exports__.StageTaskDragOverlay;
63
- for(var __rspack_i in __webpack_exports__)if (-1 === [
64
- "StageTaskDragOverlay"
65
- ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
66
- Object.defineProperty(exports, '__esModule', {
67
- value: true
68
- });
@@ -1,3 +0,0 @@
1
- import type { StageTaskDragOverlayProps } from './StageNode.types';
2
- export declare const StageTaskDragOverlay: ({ activeTask, isActiveTaskParallel, taskWidthStyle, }: StageTaskDragOverlayProps) => import("react").ReactPortal;
3
- //# sourceMappingURL=StageTaskDragOverlay.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StageTaskDragOverlay.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/StageTaskDragOverlay.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAEnE,eAAO,MAAM,oBAAoB,GAAI,uDAIlC,yBAAyB,gCA0B3B,CAAC"}
@@ -1,34 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { DragOverlay } from "@dnd-kit/core";
3
- import { useViewport } from "../../xyflow/react.js";
4
- import { useMemo } from "react";
5
- import { createPortal } from "react-dom";
6
- import { TaskContent } from "./DraggableTask.js";
7
- import { StageTask } from "./StageNode.styles.js";
8
- const StageTaskDragOverlay = ({ activeTask, isActiveTaskParallel, taskWidthStyle })=>{
9
- const { zoom } = useViewport();
10
- const dragOverlayStyle = useMemo(()=>({
11
- transform: `scale(${zoom})`,
12
- transformOrigin: 'top left'
13
- }), [
14
- zoom
15
- ]);
16
- return /*#__PURE__*/ createPortal(/*#__PURE__*/ jsx(DragOverlay, {
17
- children: activeTask ? /*#__PURE__*/ jsx("div", {
18
- style: dragOverlayStyle,
19
- children: /*#__PURE__*/ jsx(StageTask, {
20
- selected: true,
21
- isParallel: isActiveTaskParallel,
22
- style: {
23
- cursor: 'grabbing',
24
- ...taskWidthStyle
25
- },
26
- children: /*#__PURE__*/ jsx(TaskContent, {
27
- task: activeTask,
28
- isDragging: true
29
- })
30
- })
31
- }) : null
32
- }), document.body);
33
- };
34
- export { StageTaskDragOverlay };