@datatechsolutions/ui 2.11.33 → 2.11.35

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.
@@ -1,15 +1,15 @@
1
1
  "use client";
2
2
  import '../chunk-JB6RNAD2.mjs';
3
3
  export { topologicalSortAgents, validateWorkflowGraph } from '../chunk-BLNXRUC4.mjs';
4
- import { Workspace, useModalStore, CATEGORY_COLORS, CATEGORY_PILL_COLORS, ICON_MAP, WorkflowCanvas, getEntityIcon, getEntityGradient, useWorkflowStore, LOGIC_ICON_MAP, LOGIC_NODE_GRADIENTS, getFrameworkMeta, getCompatibleModels, isModelCompatibleWithFramework, FRAMEWORK_META, isFrameworkCompatibleWithProviders } from '../chunk-3NXUTBDV.mjs';
5
- export { AgentFlowNode, AgentToolFlowNode, AnswerFlowNode, AnthropicIcon, CodeFlowNode, CrewAIIcon, DocumentExtractorFlowNode, EndFlowNode, EntityFlowNode, FRAMEWORK_META, GoogleADKIcon, GroupFlowNode, HttpRequestFlowNode, IfElseFlowNode, IterationFlowNode, IterationStartFlowNode, KnowledgeBaseFlowNode, LOGIC_ICON_MAP, LOGIC_NODE_BADGE_COLORS, LOGIC_NODE_GRADIENTS, LOGIC_NODE_HANDLE_COLORS, LangChainIcon, ListOperatorFlowNode, LogicNodeModal, MINIMAP_NODE_COLORS, ModelProviderFlowNode, NODE_EXECUTION_ACCENT_COLORS, NodeCard, NodeContextMenu, NoteFlowNode, OpenAIIcon, PanelContextMenu, ParameterExtractorFlowNode, QuestionClassifierFlowNode, RuleFlowNode, SelectionContextMenu, StartFlowNode, StrandsIcon, TemplateTransformFlowNode, ToolFlowNode, VariableAggregatorFlowNode, VariableAssignerFlowNode, WorkflowBuilderProvider, Workspace, getCompatibleModels, getDefaultFrameworkForModel, getEntityBadgeColor, getEntityGradient, getEntityHandleColor, getEntityIcon, getEntityMinimapColor, getFrameworkMeta, getNodeExecutionAccent, getNodeExecutionAccentRgb, isModelCompatibleWithFramework, useModalStore, useWorkflowBuilderClient, useWorkflowBuilderClientOptional, useWorkflowStore } from '../chunk-3NXUTBDV.mjs';
6
- import { GlassModal, Button, FormInput, FormTextarea, ToggleSwitch, Input, DynamicIslandConfirm } from '../chunk-2JS5B55J.mjs';
4
+ import { Workspace, useModalStore, CATEGORY_COLORS, CATEGORY_PILL_COLORS, ICON_MAP, WorkflowCanvas, getEntityIcon, getEntityGradient, useWorkflowStore, LOGIC_ICON_MAP, LOGIC_NODE_GRADIENTS, getFrameworkMeta, getCompatibleModels, isModelCompatibleWithFramework, FRAMEWORK_META, isFrameworkCompatibleWithProviders } from '../chunk-AXC4INNY.mjs';
5
+ export { AgentFlowNode, AgentToolFlowNode, AnswerFlowNode, AnthropicIcon, CodeFlowNode, CrewAIIcon, DocumentExtractorFlowNode, EndFlowNode, EntityFlowNode, FRAMEWORK_META, GoogleADKIcon, GroupFlowNode, HttpRequestFlowNode, IfElseFlowNode, IterationFlowNode, IterationStartFlowNode, KnowledgeBaseFlowNode, LOGIC_ICON_MAP, LOGIC_NODE_BADGE_COLORS, LOGIC_NODE_GRADIENTS, LOGIC_NODE_HANDLE_COLORS, LangChainIcon, ListOperatorFlowNode, LogicNodeModal, MINIMAP_NODE_COLORS, ModelProviderFlowNode, NODE_EXECUTION_ACCENT_COLORS, NodeCard, NodeContextMenu, NoteFlowNode, OpenAIIcon, PanelContextMenu, ParameterExtractorFlowNode, QuestionClassifierFlowNode, RuleFlowNode, SelectionContextMenu, StartFlowNode, StrandsIcon, TemplateTransformFlowNode, ToolFlowNode, VariableAggregatorFlowNode, VariableAssignerFlowNode, WorkflowBuilderProvider, Workspace, getCompatibleModels, getDefaultFrameworkForModel, getEntityBadgeColor, getEntityGradient, getEntityHandleColor, getEntityIcon, getEntityMinimapColor, getFrameworkMeta, getNodeExecutionAccent, getNodeExecutionAccentRgb, isModelCompatibleWithFramework, useModalStore, useWorkflowBuilderClient, useWorkflowBuilderClientOptional, useWorkflowStore } from '../chunk-AXC4INNY.mjs';
6
+ import { GlassModal, Button, FormInput, FormTextarea, ToggleSwitch, Input, DynamicIslandConfirm } from '../chunk-DNGI4ASL.mjs';
7
+ import { useTranslations } from '../chunk-7VJ7CMMT.mjs';
7
8
  import '../chunk-QWG2FMUN.mjs';
8
9
  import '../chunk-D2JF6C3E.mjs';
9
10
  export { GraphNodeBadge, GraphNodeHeader, GraphNodeIconBubble, GraphNodeMeta } from '../chunk-OZNTQROP.mjs';
10
11
  import { getAgentTier, createDefaultLogicNodeConfig } from '../chunk-TLPPVL3W.mjs';
11
12
  export { applyDagreLayout, createDefaultLogicNodeConfig, getAgentTier } from '../chunk-TLPPVL3W.mjs';
12
- import { useTranslations } from '../chunk-7VJ7CMMT.mjs';
13
13
  import { memo, useCallback, useState, useEffect, useMemo, useRef, Children } from 'react';
14
14
  import { UserCircleIcon, Cog6ToothIcon, SparklesIcon, CommandLineIcon, KeyIcon, PlayCircleIcon, CpuChipIcon, ArrowPathRoundedSquareIcon, ArrowsPointingOutIcon, ArrowsPointingInIcon, BoltIcon, ClockIcon, CheckIcon, AdjustmentsHorizontalIcon, CircleStackIcon, TrashIcon, PlusIcon, XMarkIcon, EyeIcon, ArrowPathIcon, PlayIcon, StopIcon, XCircleIcon, CheckCircleIcon, VariableIcon, ChevronDownIcon, ChevronRightIcon, ExclamationCircleIcon, ClipboardDocumentIcon, ArrowDownTrayIcon, ArrowUpTrayIcon, ExclamationTriangleIcon } from '@heroicons/react/24/outline';
15
15
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -1,19 +1,19 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var chunkHSUB5MTJ_js = require('../chunk-HSUB5MTJ.js');
5
- require('../chunk-LH2JDCO3.js');
4
+ var chunkBXVUUI2B_js = require('../chunk-BXVUUI2B.js');
5
+ require('../chunk-KEUOCEOO.js');
6
+ require('../chunk-YXN2K77G.js');
6
7
  require('../chunk-S7KHTUHA.js');
7
8
  require('../chunk-UZ3CMNUJ.js');
8
9
  require('../chunk-P4YYEM4B.js');
9
10
  require('../chunk-PWBWP5FJ.js');
10
- require('../chunk-YXN2K77G.js');
11
11
 
12
12
 
13
13
 
14
14
  Object.defineProperty(exports, "Workspace", {
15
15
  enumerable: true,
16
- get: function () { return chunkHSUB5MTJ_js.Workspace; }
16
+ get: function () { return chunkBXVUUI2B_js.Workspace; }
17
17
  });
18
18
  //# sourceMappingURL=workflow-canvas.js.map
19
19
  //# sourceMappingURL=workflow-canvas.js.map
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- export { Workspace } from '../chunk-3NXUTBDV.mjs';
3
- import '../chunk-2JS5B55J.mjs';
2
+ export { Workspace } from '../chunk-AXC4INNY.mjs';
3
+ import '../chunk-DNGI4ASL.mjs';
4
+ import '../chunk-7VJ7CMMT.mjs';
4
5
  import '../chunk-QWG2FMUN.mjs';
5
6
  import '../chunk-D2JF6C3E.mjs';
6
7
  import '../chunk-OZNTQROP.mjs';
7
8
  import '../chunk-TLPPVL3W.mjs';
8
- import '../chunk-7VJ7CMMT.mjs';
9
9
  //# sourceMappingURL=workflow-canvas.mjs.map
10
10
  //# sourceMappingURL=workflow-canvas.mjs.map
@@ -1,8 +1,8 @@
1
1
  "use client";
2
- import { ToggleSwitch, GlassModal, ContextMenu, FormInput, FormSelect, FormTextarea, Button, IconButton } from './chunk-2JS5B55J.mjs';
2
+ import { ToggleSwitch, GlassModal, ContextMenu, FormInput, FormSelect, FormTextarea, Button, IconButton } from './chunk-DNGI4ASL.mjs';
3
+ import { useTranslations, I18nProvider, createI18nFromMessages } from './chunk-7VJ7CMMT.mjs';
3
4
  import { GraphNodeHeader, GraphNodeMeta, GraphNodeBadge, GraphNodeIconBubble } from './chunk-OZNTQROP.mjs';
4
5
  import { getAgentTier, createDefaultLogicNodeConfig, applyDagreLayout } from './chunk-TLPPVL3W.mjs';
5
- import { useTranslations, I18nProvider, createI18nFromMessages } from './chunk-7VJ7CMMT.mjs';
6
6
  import { memo, useState, useRef, useCallback, useEffect, lazy, createContext, useMemo, useContext } from 'react';
7
7
  import { Position, NodeResizer, MarkerType, useReactFlow, getBezierPath, BaseEdge, EdgeLabelRenderer, Handle, ReactFlowProvider, useNodesState, useEdgesState, addEdge, BackgroundVariant } from '@xyflow/react';
8
8
  import '@xyflow/react/dist/style.css';
@@ -668,6 +668,15 @@ function ConditionalEdgeComponent({
668
668
  }) {
669
669
  const [isHovered, setIsHovered] = useState(false);
670
670
  const [showInsertPopup, setShowInsertPopup] = useState(false);
671
+ const hoverTimeout = useRef(null);
672
+ const handleMouseEnter = useCallback(() => {
673
+ if (hoverTimeout.current) clearTimeout(hoverTimeout.current);
674
+ hoverTimeout.current = null;
675
+ setIsHovered(true);
676
+ }, []);
677
+ const handleMouseLeave = useCallback(() => {
678
+ hoverTimeout.current = setTimeout(() => setIsHovered(false), 100);
679
+ }, []);
671
680
  const { setEdges } = useReactFlow();
672
681
  const [edgePath, labelX, labelY] = getBezierPath({
673
682
  sourceX,
@@ -698,68 +707,77 @@ function ConditionalEdgeComponent({
698
707
  const hasLabel = Boolean(label && labelStyle);
699
708
  const insertButtonOffset = hasLabel ? -20 : 0;
700
709
  const deleteButtonOffset = hasLabel ? showInsertPopup ? -40 : -40 : showInsertPopup ? -20 : -20;
701
- return /* @__PURE__ */ jsxs(Fragment, { children: [
702
- /* @__PURE__ */ jsx(
703
- "path",
704
- {
705
- d: edgePath,
706
- fill: "none",
707
- stroke: "transparent",
708
- strokeWidth: 20,
709
- onMouseEnter: () => setIsHovered(true),
710
- onMouseLeave: () => setIsHovered(false),
711
- className: "react-flow__edge-interaction"
712
- }
713
- ),
714
- /* @__PURE__ */ jsx(BaseEdge, { id, path: edgePath, markerEnd, style }),
715
- /* @__PURE__ */ jsxs(EdgeLabelRenderer, { children: [
716
- hasLabel && labelStyle && /* @__PURE__ */ jsx(
717
- "div",
718
- {
719
- className: `nodrag nopan pointer-events-auto absolute rounded-full px-2 py-0.5 text-[10px] font-semibold ${labelStyle.background} ${labelStyle.text} ${labelStyle.darkBackground} ${labelStyle.darkText}`,
720
- style: {
721
- transform: `translate(-50%, -50%) translate(${labelX}px,${labelY}px)`
722
- },
723
- "data-testid": `edge-label-${id}`,
724
- children: label
725
- }
726
- ),
727
- showControls && !showInsertPopup && /* @__PURE__ */ jsx(
728
- "button",
729
- {
730
- type: "button",
731
- className: "nodrag nopan pointer-events-auto absolute flex h-5 w-5 items-center justify-center rounded-full border border-teal-300 bg-white shadow-md transition-all hover:scale-110 hover:bg-teal-50 dark:border-teal-600 dark:bg-gray-800 dark:hover:bg-teal-900/30",
732
- style: {
733
- transform: `translate(-50%, -50%) translate(${labelX}px,${labelY + insertButtonOffset}px)`
734
- },
735
- onClick: handleInsertClick,
736
- "aria-label": "Insert node",
737
- children: /* @__PURE__ */ jsx(PlusIcon, { className: "h-3 w-3 text-teal-500 dark:text-teal-400" })
738
- }
739
- ),
740
- showInsertPopup && /* @__PURE__ */ jsx(
741
- EdgeInsertPopup,
742
- {
743
- position: { x: labelX, y: labelY + insertButtonOffset },
744
- onSelect: handleInsertNodeSelect,
745
- onClose: () => setShowInsertPopup(false)
746
- }
747
- ),
748
- showControls && /* @__PURE__ */ jsx(
749
- "button",
750
- {
751
- type: "button",
752
- className: "nodrag nopan pointer-events-auto absolute flex h-5 w-5 items-center justify-center rounded-full border border-red-300 bg-white shadow-md transition-all hover:scale-110 hover:bg-red-50 dark:border-red-600 dark:bg-gray-800 dark:hover:bg-red-900/30",
753
- style: {
754
- transform: `translate(-50%, -50%) translate(${labelX}px,${labelY + deleteButtonOffset}px)`
755
- },
756
- onClick: handleDeleteEdge,
757
- "aria-label": "Delete connection",
758
- children: /* @__PURE__ */ jsx(XMarkIcon, { className: "h-3 w-3 text-red-500 dark:text-red-400" })
759
- }
760
- )
761
- ] })
762
- ] });
710
+ return /* @__PURE__ */ jsxs(
711
+ "g",
712
+ {
713
+ onMouseEnter: handleMouseEnter,
714
+ onMouseLeave: handleMouseLeave,
715
+ children: [
716
+ /* @__PURE__ */ jsx(
717
+ "path",
718
+ {
719
+ d: edgePath,
720
+ fill: "none",
721
+ stroke: "transparent",
722
+ strokeWidth: 20,
723
+ className: "react-flow__edge-interaction"
724
+ }
725
+ ),
726
+ /* @__PURE__ */ jsx(BaseEdge, { id, path: edgePath, markerEnd, style }),
727
+ /* @__PURE__ */ jsxs(EdgeLabelRenderer, { children: [
728
+ hasLabel && labelStyle && /* @__PURE__ */ jsx(
729
+ "div",
730
+ {
731
+ className: `nodrag nopan pointer-events-auto absolute rounded-full px-2 py-0.5 text-[10px] font-semibold ${labelStyle.background} ${labelStyle.text} ${labelStyle.darkBackground} ${labelStyle.darkText}`,
732
+ style: {
733
+ transform: `translate(-50%, -50%) translate(${labelX}px,${labelY}px)`
734
+ },
735
+ "data-testid": `edge-label-${id}`,
736
+ children: label
737
+ }
738
+ ),
739
+ showControls && !showInsertPopup && /* @__PURE__ */ jsx(
740
+ "button",
741
+ {
742
+ type: "button",
743
+ className: "nodrag nopan pointer-events-auto absolute flex h-5 w-5 items-center justify-center rounded-full border border-teal-300 bg-white shadow-md transition-all hover:scale-110 hover:bg-teal-50 dark:border-teal-600 dark:bg-gray-800 dark:hover:bg-teal-900/30",
744
+ style: {
745
+ transform: `translate(-50%, -50%) translate(${labelX}px,${labelY + insertButtonOffset}px)`
746
+ },
747
+ onClick: handleInsertClick,
748
+ onMouseEnter: handleMouseEnter,
749
+ onMouseLeave: handleMouseLeave,
750
+ "aria-label": "Insert node",
751
+ children: /* @__PURE__ */ jsx(PlusIcon, { className: "h-3 w-3 text-teal-500 dark:text-teal-400" })
752
+ }
753
+ ),
754
+ showInsertPopup && /* @__PURE__ */ jsx(
755
+ EdgeInsertPopup,
756
+ {
757
+ position: { x: labelX, y: labelY + insertButtonOffset },
758
+ onSelect: handleInsertNodeSelect,
759
+ onClose: () => setShowInsertPopup(false)
760
+ }
761
+ ),
762
+ showControls && /* @__PURE__ */ jsx(
763
+ "button",
764
+ {
765
+ type: "button",
766
+ className: "nodrag nopan pointer-events-auto absolute flex h-5 w-5 items-center justify-center rounded-full border border-red-300 bg-white shadow-md transition-all hover:scale-110 hover:bg-red-50 dark:border-red-600 dark:bg-gray-800 dark:hover:bg-red-900/30",
767
+ style: {
768
+ transform: `translate(-50%, -50%) translate(${labelX}px,${labelY + deleteButtonOffset}px)`
769
+ },
770
+ onClick: handleDeleteEdge,
771
+ onMouseEnter: handleMouseEnter,
772
+ onMouseLeave: handleMouseLeave,
773
+ "aria-label": "Delete connection",
774
+ children: /* @__PURE__ */ jsx(XMarkIcon, { className: "h-3 w-3 text-red-500 dark:text-red-400" })
775
+ }
776
+ )
777
+ ] })
778
+ ]
779
+ }
780
+ );
763
781
  }
764
782
  var ConditionalEdge = memo(ConditionalEdgeComponent);
765
783
  function CustomConnectionLine({
@@ -7601,5 +7619,5 @@ function Workspace({
7601
7619
  }
7602
7620
 
7603
7621
  export { AgentFlowNode, AgentToolFlowNode, AnswerFlowNode, AnthropicIcon, CATEGORY_COLORS, CATEGORY_PILL_COLORS, CodeFlowNode, CrewAIIcon, DocumentExtractorFlowNode, EndFlowNode, EntityFlowNode, FRAMEWORK_META, GoogleADKIcon, GroupFlowNode, HttpRequestFlowNode, ICON_MAP, IfElseFlowNode, IterationFlowNode, IterationStartFlowNode, KnowledgeBaseFlowNode, LOGIC_ICON_MAP, LOGIC_NODE_BADGE_COLORS, LOGIC_NODE_GRADIENTS, LOGIC_NODE_HANDLE_COLORS, LangChainIcon, ListOperatorFlowNode, LogicNodeModal, MINIMAP_NODE_COLORS, ModelProviderFlowNode, NODE_EXECUTION_ACCENT_COLORS, NodeCard, NodeContextMenu, NoteFlowNode, OpenAIIcon, PanelContextMenu, ParameterExtractorFlowNode, QuestionClassifierFlowNode, RuleFlowNode, SelectionContextMenu, StartFlowNode, StrandsIcon, TemplateTransformFlowNode, ToolFlowNode, VariableAggregatorFlowNode, VariableAssignerFlowNode, WorkflowBuilderProvider, WorkflowCanvas, Workspace, getCompatibleModels, getDefaultFrameworkForModel, getEntityBadgeColor, getEntityGradient, getEntityHandleColor, getEntityIcon, getEntityMinimapColor, getFrameworkMeta, getNodeExecutionAccent, getNodeExecutionAccentRgb, isFrameworkCompatibleWithProviders, isModelCompatibleWithFramework, useModalStore, useWorkflowBuilderClient, useWorkflowBuilderClientOptional, useWorkflowStore };
7604
- //# sourceMappingURL=chunk-3NXUTBDV.mjs.map
7605
- //# sourceMappingURL=chunk-3NXUTBDV.mjs.map
7622
+ //# sourceMappingURL=chunk-AXC4INNY.mjs.map
7623
+ //# sourceMappingURL=chunk-AXC4INNY.mjs.map