@uipath/apollo-react 4.7.0 → 4.8.1

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 (53) hide show
  1. package/dist/canvas/components/AgentCanvas/agent-flow.manifest.d.ts +2 -2
  2. package/dist/canvas/components/AgentCanvas/nodes/AgentNode.cjs +0 -4
  3. package/dist/canvas/components/AgentCanvas/nodes/AgentNode.d.ts.map +1 -1
  4. package/dist/canvas/components/AgentCanvas/nodes/AgentNode.js +0 -4
  5. package/dist/canvas/components/AgentCanvas/nodes/ResourceNode.cjs +5 -10
  6. package/dist/canvas/components/AgentCanvas/nodes/ResourceNode.d.ts.map +1 -1
  7. package/dist/canvas/components/AgentCanvas/nodes/ResourceNode.js +5 -10
  8. package/dist/canvas/components/BaseNode/BaseNode.cjs +29 -21
  9. package/dist/canvas/components/BaseNode/BaseNode.d.ts.map +1 -1
  10. package/dist/canvas/components/BaseNode/BaseNode.js +30 -22
  11. package/dist/canvas/components/BaseNode/BaseNodeContainer.cjs +1 -1
  12. package/dist/canvas/components/BaseNode/BaseNodeContainer.d.ts.map +1 -1
  13. package/dist/canvas/components/BaseNode/BaseNodeContainer.js +1 -1
  14. package/dist/canvas/components/BaseNode/BaseNodeInnerShape.cjs +1 -1
  15. package/dist/canvas/components/BaseNode/BaseNodeInnerShape.js +1 -1
  16. package/dist/canvas/components/ButtonHandle/ButtonHandle.cjs +75 -128
  17. package/dist/canvas/components/ButtonHandle/ButtonHandle.d.ts +6 -5
  18. package/dist/canvas/components/ButtonHandle/ButtonHandle.d.ts.map +1 -1
  19. package/dist/canvas/components/ButtonHandle/ButtonHandle.js +77 -130
  20. package/dist/canvas/components/ButtonHandle/HandleButton.cjs +152 -0
  21. package/dist/canvas/components/ButtonHandle/HandleButton.d.ts +16 -0
  22. package/dist/canvas/components/ButtonHandle/HandleButton.d.ts.map +1 -0
  23. package/dist/canvas/components/ButtonHandle/HandleButton.js +115 -0
  24. package/dist/canvas/components/ButtonHandle/HandleLabel.cjs +62 -0
  25. package/dist/canvas/components/ButtonHandle/HandleLabel.d.ts +9 -0
  26. package/dist/canvas/components/ButtonHandle/HandleLabel.d.ts.map +1 -0
  27. package/dist/canvas/components/ButtonHandle/HandleLabel.js +28 -0
  28. package/dist/canvas/components/ButtonHandle/HandleNotch.cjs +53 -0
  29. package/dist/canvas/components/ButtonHandle/HandleNotch.d.ts +9 -0
  30. package/dist/canvas/components/ButtonHandle/HandleNotch.d.ts.map +1 -0
  31. package/dist/canvas/components/ButtonHandle/HandleNotch.js +19 -0
  32. package/dist/canvas/components/ButtonHandle/SmartHandle.cjs +28 -91
  33. package/dist/canvas/components/ButtonHandle/SmartHandle.d.ts +1 -2
  34. package/dist/canvas/components/ButtonHandle/SmartHandle.d.ts.map +1 -1
  35. package/dist/canvas/components/ButtonHandle/SmartHandle.js +29 -92
  36. package/dist/canvas/components/ButtonHandle/useButtonHandles.cjs +5 -4
  37. package/dist/canvas/components/ButtonHandle/useButtonHandles.d.ts +4 -2
  38. package/dist/canvas/components/ButtonHandle/useButtonHandles.d.ts.map +1 -1
  39. package/dist/canvas/components/ButtonHandle/useButtonHandles.js +5 -4
  40. package/dist/canvas/constants.cjs +4 -0
  41. package/dist/canvas/constants.d.ts +1 -0
  42. package/dist/canvas/constants.d.ts.map +1 -1
  43. package/dist/canvas/constants.js +2 -1
  44. package/dist/canvas/schema/node-definition/category-manifest.cjs +2 -2
  45. package/dist/canvas/schema/node-definition/category-manifest.d.ts +2 -2
  46. package/dist/canvas/schema/node-definition/category-manifest.js +2 -2
  47. package/dist/canvas/storybook-utils/manifests/index.d.ts +2 -2
  48. package/dist/canvas/styles/tailwind.canvas.css +1 -1
  49. package/package.json +2 -2
  50. package/dist/canvas/components/ButtonHandle/ButtonHandle.styles.cjs +0 -220
  51. package/dist/canvas/components/ButtonHandle/ButtonHandle.styles.d.ts +0 -46
  52. package/dist/canvas/components/ButtonHandle/ButtonHandle.styles.d.ts.map +0 -1
  53. 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 icon_registry_cjs_namespaceObject = require("../../utils/icon-registry.cjs");
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, color = 'var(--canvas-border)', showNotches = true, onAction, visible = true, configOrder, ...rest }) {
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
- label && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_ButtonHandle_styles_cjs_namespaceObject.StyledLabel, {
430
- $position: computedPosition,
431
- $backgroundColor: labelBackgroundColor,
432
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Row, {
433
- align: "center",
434
- gap: 4,
435
- children: [
436
- labelIcon,
437
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
438
- className: "text-xs font-bold text-foreground-muted",
439
- children: label
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)(external_ButtonHandle_styles_cjs_namespaceObject.StyledNotch, {
464
- $notchColor: color,
465
- $handleType: handleType,
466
- $visible: true,
467
- $isVertical: isVertical,
468
- $selected: selected,
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, color, showNotches, onAction, visible, configOrder, ...rest }: SmartHandleProps): import("react/jsx-runtime").JSX.Element;
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":"AACA,OAAO,EAGL,KAAK,WAAW,EAEhB,QAAQ,EAKT,MAAM,eAAe,CAAC;AAcvB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAiBxD,MA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ACrB,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 { AnimatePresence } from "motion/react";
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 { CanvasIcon } from "../../utils/icon-registry.js";
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, color = 'var(--canvas-border)', showNotches = true, onAction, visible = true, configOrder, ...rest }) {
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
- label && /*#__PURE__*/ jsx(StyledLabel, {
399
- $position: computedPosition,
400
- $backgroundColor: labelBackgroundColor,
401
- children: /*#__PURE__*/ jsxs(Row, {
402
- align: "center",
403
- gap: 4,
404
- children: [
405
- labelIcon,
406
- /*#__PURE__*/ jsx("span", {
407
- className: "text-xs font-bold text-foreground-muted",
408
- children: label
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(StyledNotch, {
433
- $notchColor: color,
434
- $handleType: handleType,
435
- $visible: true,
436
- $isVertical: isVertical,
437
- $selected: selected,
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 hasConnectedHandle = config.handles.some((h)=>connectedHandleIds.has(h.id));
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
- visible: finalVisible,
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,wJAW9B;IACD,oBAAoB,EAAE,mBAAmB,EAAE,CAAC;IAC5C,iBAAiB,EAAE,OAAO,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,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,GACT,EAAE;QACD,aAAa,EAAE,OAAO,CAAC;QACvB,QAAQ,EAAE,OAAO,CAAC;KACnB,KAAK,OAAO,CAAC;CACf,wFA2DA,CAAC"}
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 hasConnectedHandle = config.handles.some((h)=>connectedHandleIds.has(h.id));
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
- visible: finalVisible,
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,
@@ -32,6 +32,7 @@ __webpack_require__.d(__webpack_exports__, {
32
32
  NODE_BADGE_INSET_CIRCLE: ()=>NODE_BADGE_INSET_CIRCLE,
33
33
  NODE_BADGE_INSET_SQUARE: ()=>NODE_BADGE_INSET_SQUARE,
34
34
  NODE_BADGE_SIZE: ()=>NODE_BADGE_SIZE,
35
+ NODE_BORDER_SIZE: ()=>NODE_BORDER_SIZE,
35
36
  NODE_CONTAINER_RADIUS_RATIO: ()=>NODE_CONTAINER_RADIUS_RATIO,
36
37
  NODE_ERROR_ICON_SIZE: ()=>NODE_ERROR_ICON_SIZE,
37
38
  NODE_HEIGHT_DEFAULT: ()=>NODE_HEIGHT_DEFAULT,
@@ -71,6 +72,7 @@ const NODE_CONTAINER_RADIUS_RATIO = 32 / DEFAULT_NODE_SIZE;
71
72
  const NODE_INNER_SHAPE_RATIO = 80 / DEFAULT_NODE_SIZE;
72
73
  const NODE_INNER_ICON_RATIO = 40 / DEFAULT_NODE_SIZE;
73
74
  const NODE_INNER_RADIUS_RATIO = 24 / DEFAULT_NODE_SIZE;
75
+ const NODE_BORDER_SIZE = 2;
74
76
  const NODE_ERROR_ICON_SIZE = 40;
75
77
  const NODE_TEXT_BOTTOM_OFFSET = -8;
76
78
  const NODE_TEXT_BOTTOM_OFFSET_WITH_HANDLES = -40;
@@ -85,6 +87,7 @@ exports.GRID_SPACING = __webpack_exports__.GRID_SPACING;
85
87
  exports.NODE_BADGE_INSET_CIRCLE = __webpack_exports__.NODE_BADGE_INSET_CIRCLE;
86
88
  exports.NODE_BADGE_INSET_SQUARE = __webpack_exports__.NODE_BADGE_INSET_SQUARE;
87
89
  exports.NODE_BADGE_SIZE = __webpack_exports__.NODE_BADGE_SIZE;
90
+ exports.NODE_BORDER_SIZE = __webpack_exports__.NODE_BORDER_SIZE;
88
91
  exports.NODE_CONTAINER_RADIUS_RATIO = __webpack_exports__.NODE_CONTAINER_RADIUS_RATIO;
89
92
  exports.NODE_ERROR_ICON_SIZE = __webpack_exports__.NODE_ERROR_ICON_SIZE;
90
93
  exports.NODE_HEIGHT_DEFAULT = __webpack_exports__.NODE_HEIGHT_DEFAULT;
@@ -112,6 +115,7 @@ for(var __rspack_i in __webpack_exports__)if (-1 === [
112
115
  "NODE_BADGE_INSET_CIRCLE",
113
116
  "NODE_BADGE_INSET_SQUARE",
114
117
  "NODE_BADGE_SIZE",
118
+ "NODE_BORDER_SIZE",
115
119
  "NODE_CONTAINER_RADIUS_RATIO",
116
120
  "NODE_ERROR_ICON_SIZE",
117
121
  "NODE_HEIGHT_DEFAULT",
@@ -18,6 +18,7 @@ export declare const NODE_CONTAINER_RADIUS_RATIO: number;
18
18
  export declare const NODE_INNER_SHAPE_RATIO: number;
19
19
  export declare const NODE_INNER_ICON_RATIO: number;
20
20
  export declare const NODE_INNER_RADIUS_RATIO: number;
21
+ export declare const NODE_BORDER_SIZE = 2;
21
22
  export declare const NODE_ERROR_ICON_SIZE = 40;
22
23
  export declare const NODE_TEXT_BOTTOM_OFFSET = -8;
23
24
  export declare const NODE_TEXT_BOTTOM_OFFSET_WITH_HANDLES = -40;
@@ -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,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;AA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,yBAAyB,QAAoB,CAAC;AAC3D,eAAO,MAAM,yBAAyB,QAAoB,CAAC;AAO3D,eAAO,MAAM,2BAA2B,QAAyB,CAAC;AAClE,eAAO,MAAM,sBAAsB,QAAyB,CAAC;AAC7D,eAAO,MAAM,qBAAqB,QAAyB,CAAC;AAC5D,eAAO,MAAM,uBAAuB,QAAyB,CAAC;AAC9D,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAGlC,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAGvC,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAC1C,eAAO,MAAM,oCAAoC,MAAM,CAAC;AAGxD,eAAO,MAAM,eAAe,KAAK,CAAC;AAClC,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,eAAO,MAAM,uBAAuB,KAAK,CAAC"}
@@ -18,10 +18,11 @@ const NODE_CONTAINER_RADIUS_RATIO = 32 / DEFAULT_NODE_SIZE;
18
18
  const NODE_INNER_SHAPE_RATIO = 80 / DEFAULT_NODE_SIZE;
19
19
  const NODE_INNER_ICON_RATIO = 40 / DEFAULT_NODE_SIZE;
20
20
  const NODE_INNER_RADIUS_RATIO = 24 / DEFAULT_NODE_SIZE;
21
+ const NODE_BORDER_SIZE = 2;
21
22
  const NODE_ERROR_ICON_SIZE = 40;
22
23
  const NODE_TEXT_BOTTOM_OFFSET = -8;
23
24
  const NODE_TEXT_BOTTOM_OFFSET_WITH_HANDLES = -40;
24
25
  const NODE_BADGE_SIZE = 20;
25
26
  const NODE_BADGE_INSET_SQUARE = 6;
26
27
  const NODE_BADGE_INSET_CIRCLE = 12;
27
- export { CANVAS_COMPACT_BREAKPOINT, DEFAULT_NODE_SIZE, DEFAULT_RECTANGLE_NODE_WIDTH, FLOATING_CANVAS_PANEL_OFFSET, 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, TOOLBOX_GAP, TOOLBOX_HEIGHT, TOOLBOX_PADDING_X, TOOLBOX_PADDING_Y, TOOLBOX_WIDTH };
28
+ export { CANVAS_COMPACT_BREAKPOINT, DEFAULT_NODE_SIZE, DEFAULT_RECTANGLE_NODE_WIDTH, FLOATING_CANVAS_PANEL_OFFSET, GRID_SPACING, NODE_BADGE_INSET_CIRCLE, NODE_BADGE_INSET_SQUARE, NODE_BADGE_SIZE, NODE_BORDER_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, TOOLBOX_GAP, TOOLBOX_HEIGHT, TOOLBOX_PADDING_X, TOOLBOX_PADDING_Y, TOOLBOX_WIDTH };
@@ -32,8 +32,8 @@ const categoryManifestSchema = external_zod_namespaceObject.z.object({
32
32
  name: external_zod_namespaceObject.z.string().min(1),
33
33
  parentId: external_zod_namespaceObject.z.string().optional(),
34
34
  sortOrder: external_zod_namespaceObject.z.number().int().nonnegative(),
35
- color: external_zod_namespaceObject.z.string().min(1),
36
- colorDark: external_zod_namespaceObject.z.string().min(1),
35
+ color: external_zod_namespaceObject.z.string().min(1).optional(),
36
+ colorDark: external_zod_namespaceObject.z.string().min(1).optional(),
37
37
  icon: external_zod_namespaceObject.z.string().min(1),
38
38
  tags: external_zod_namespaceObject.z.array(external_zod_namespaceObject.z.string())
39
39
  });
@@ -4,8 +4,8 @@ export declare const categoryManifestSchema: z.ZodObject<{
4
4
  name: z.ZodString;
5
5
  parentId: z.ZodOptional<z.ZodString>;
6
6
  sortOrder: z.ZodNumber;
7
- color: z.ZodString;
8
- colorDark: z.ZodString;
7
+ color: z.ZodOptional<z.ZodString>;
8
+ colorDark: z.ZodOptional<z.ZodString>;
9
9
  icon: z.ZodString;
10
10
  tags: z.ZodArray<z.ZodString>;
11
11
  }, z.core.$strip>;
@@ -4,8 +4,8 @@ const categoryManifestSchema = z.object({
4
4
  name: z.string().min(1),
5
5
  parentId: z.string().optional(),
6
6
  sortOrder: z.number().int().nonnegative(),
7
- color: z.string().min(1),
8
- colorDark: z.string().min(1),
7
+ color: z.string().min(1).optional(),
8
+ colorDark: z.string().min(1).optional(),
9
9
  icon: z.string().min(1),
10
10
  tags: z.array(z.string())
11
11
  });
@@ -6,11 +6,11 @@ export declare const defaultWorkflowManifest: {
6
6
  id: string;
7
7
  name: string;
8
8
  sortOrder: number;
9
- color: string;
10
- colorDark: string;
11
9
  icon: string;
12
10
  tags: string[];
13
11
  parentId?: string | undefined;
12
+ color?: string | undefined;
13
+ colorDark?: string | undefined;
14
14
  }[];
15
15
  nodes: {
16
16
  nodeType: string;