@foresthubai/workflow-builder 0.4.4 → 0.4.6
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/BuilderLayout.d.ts.map +1 -1
- package/dist/BuilderLayout.js +52 -61
- package/dist/BuilderLayout.js.map +1 -1
- package/dist/Canvas.d.ts.map +1 -1
- package/dist/Canvas.js +10 -3
- package/dist/Canvas.js.map +1 -1
- package/dist/CanvasEditor.d.ts.map +1 -1
- package/dist/CanvasEditor.js.map +1 -1
- package/dist/CanvasTabsToolbar.d.ts.map +1 -1
- package/dist/CanvasTabsToolbar.js +3 -0
- package/dist/CanvasTabsToolbar.js.map +1 -1
- package/dist/RightConfigPanel.d.ts.map +1 -1
- package/dist/RightConfigPanel.js +3 -0
- package/dist/RightConfigPanel.js.map +1 -1
- package/dist/WorkflowBuilder.d.ts +7 -13
- package/dist/WorkflowBuilder.d.ts.map +1 -1
- package/dist/WorkflowBuilder.js +25 -13
- package/dist/WorkflowBuilder.js.map +1 -1
- package/dist/cn.d.ts.map +1 -1
- package/dist/cn.js +3 -0
- package/dist/cn.js.map +1 -1
- package/dist/components/ui/add-button.d.ts.map +1 -1
- package/dist/components/ui/add-button.js +3 -0
- package/dist/components/ui/add-button.js.map +1 -1
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.js +3 -0
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/alert.js +3 -0
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +3 -0
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/card.d.ts.map +1 -1
- package/dist/components/ui/card.js +3 -0
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox.js +3 -0
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/collapsible.d.ts.map +1 -1
- package/dist/components/ui/collapsible.js +3 -0
- package/dist/components/ui/collapsible.js.map +1 -1
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js +3 -0
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/delete-button.d.ts.map +1 -1
- package/dist/components/ui/delete-button.js +3 -0
- package/dist/components/ui/delete-button.js.map +1 -1
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +3 -0
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.js +3 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/input.js +3 -0
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/label.js +3 -0
- package/dist/components/ui/label.js.map +1 -1
- package/dist/components/ui/readonly-banner.d.ts.map +1 -1
- package/dist/components/ui/readonly-banner.js +3 -0
- package/dist/components/ui/readonly-banner.js.map +1 -1
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/resizable.js +3 -0
- package/dist/components/ui/resizable.js.map +1 -1
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +3 -0
- package/dist/components/ui/scroll-area.js.map +1 -1
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/select.js +3 -0
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/separator.d.ts.map +1 -1
- package/dist/components/ui/separator.js +3 -0
- package/dist/components/ui/separator.js.map +1 -1
- package/dist/components/ui/switch.d.ts.map +1 -1
- package/dist/components/ui/switch.js +3 -0
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/textarea.d.ts.map +1 -1
- package/dist/components/ui/textarea.js +3 -0
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/components/ui/toast.d.ts.map +1 -1
- package/dist/components/ui/toast.js +3 -0
- package/dist/components/ui/toast.js.map +1 -1
- package/dist/components/ui/toaster.d.ts.map +1 -1
- package/dist/components/ui/toaster.js +3 -0
- package/dist/components/ui/toaster.js.map +1 -1
- package/dist/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/components/ui/toggle-group.js +3 -0
- package/dist/components/ui/toggle-group.js.map +1 -1
- package/dist/components/ui/toggle.d.ts.map +1 -1
- package/dist/components/ui/toggle.js +3 -0
- package/dist/components/ui/toggle.js.map +1 -1
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip.js +3 -0
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/dialogs/NodePickerDialog.d.ts.map +1 -1
- package/dist/dialogs/NodePickerDialog.js +3 -0
- package/dist/dialogs/NodePickerDialog.js.map +1 -1
- package/dist/dialogs/ValidationDialog.d.ts.map +1 -1
- package/dist/dialogs/ValidationDialog.js +3 -0
- package/dist/dialogs/ValidationDialog.js.map +1 -1
- package/dist/graph/BaseNode.d.ts.map +1 -1
- package/dist/graph/BaseNode.js +18 -12
- package/dist/graph/BaseNode.js.map +1 -1
- package/dist/graph/CustomEdge.d.ts.map +1 -1
- package/dist/graph/CustomEdge.js +6 -6
- package/dist/graph/CustomEdge.js.map +1 -1
- package/dist/graph/CustomNode.d.ts.map +1 -1
- package/dist/graph/CustomNode.js +3 -0
- package/dist/graph/CustomNode.js.map +1 -1
- package/dist/graph/FunctionCallNode.d.ts.map +1 -1
- package/dist/graph/FunctionCallNode.js.map +1 -1
- package/dist/graph/PortHandle.d.ts.map +1 -1
- package/dist/graph/PortHandle.js.map +1 -1
- package/dist/graph/reactFlowRegistry.d.ts.map +1 -1
- package/dist/graph/reactFlowRegistry.js +3 -1
- package/dist/graph/reactFlowRegistry.js.map +1 -1
- package/dist/hooks/use-toast.d.ts.map +1 -1
- package/dist/hooks/use-toast.js +3 -0
- package/dist/hooks/use-toast.js.map +1 -1
- package/dist/hooks/useAvailableVariables.d.ts.map +1 -1
- package/dist/hooks/useAvailableVariables.js +3 -0
- package/dist/hooks/useAvailableVariables.js.map +1 -1
- package/dist/hooks/useCanvasHistory.d.ts.map +1 -1
- package/dist/hooks/useCanvasHistory.js +3 -0
- package/dist/hooks/useCanvasHistory.js.map +1 -1
- package/dist/hooks/useCanvasTabs.d.ts.map +1 -1
- package/dist/hooks/useCanvasTabs.js +3 -0
- package/dist/hooks/useCanvasTabs.js.map +1 -1
- package/dist/hooks/useFunctionDiagnosticsSync.d.ts.map +1 -1
- package/dist/hooks/useFunctionDiagnosticsSync.js +3 -0
- package/dist/hooks/useFunctionDiagnosticsSync.js.map +1 -1
- package/dist/hooks/useFunctionRegistry.d.ts.map +1 -1
- package/dist/hooks/useFunctionRegistry.js +3 -0
- package/dist/hooks/useFunctionRegistry.js.map +1 -1
- package/dist/hooks/useFunctions.d.ts.map +1 -1
- package/dist/hooks/useFunctions.js +3 -0
- package/dist/hooks/useFunctions.js.map +1 -1
- package/dist/hooks/useGraph.d.ts.map +1 -1
- package/dist/hooks/useGraph.js +3 -0
- package/dist/hooks/useGraph.js.map +1 -1
- package/dist/hooks/useNodeDefinitions.d.ts.map +1 -1
- package/dist/hooks/useNodeDefinitions.js +3 -0
- package/dist/hooks/useNodeDefinitions.js.map +1 -1
- package/dist/hooks/useParamErrors.d.ts.map +1 -1
- package/dist/hooks/useParamErrors.js +3 -0
- package/dist/hooks/useParamErrors.js.map +1 -1
- package/dist/hooks/useResolvedTheme.d.ts.map +1 -1
- package/dist/hooks/useResolvedTheme.js +3 -0
- package/dist/hooks/useResolvedTheme.js.map +1 -1
- package/dist/hooks/useResourceDiagnosticsSync.d.ts.map +1 -1
- package/dist/hooks/useResourceDiagnosticsSync.js +3 -0
- package/dist/hooks/useResourceDiagnosticsSync.js.map +1 -1
- package/dist/hooks/useSuppressThemeTransition.d.ts.map +1 -1
- package/dist/hooks/useSuppressThemeTransition.js +3 -0
- package/dist/hooks/useSuppressThemeTransition.js.map +1 -1
- package/dist/hooks/useWorkflowSerialization.d.ts.map +1 -1
- package/dist/hooks/useWorkflowSerialization.js +3 -0
- package/dist/hooks/useWorkflowSerialization.js.map +1 -1
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/index.js +3 -0
- package/dist/i18n/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/inputs/ExpressionInput.d.ts.map +1 -1
- package/dist/inputs/ExpressionInput.js +3 -0
- package/dist/inputs/ExpressionInput.js.map +1 -1
- package/dist/inputs/ParameterEditor.d.ts.map +1 -1
- package/dist/inputs/ParameterEditor.js +3 -0
- package/dist/inputs/ParameterEditor.js.map +1 -1
- package/dist/inputs/PortSection.d.ts.map +1 -1
- package/dist/inputs/PortSection.js.map +1 -1
- package/dist/mode.d.ts +11 -0
- package/dist/mode.d.ts.map +1 -0
- package/dist/mode.js +8 -0
- package/dist/mode.js.map +1 -0
- package/dist/panels/BuilderSidebar.d.ts.map +1 -1
- package/dist/panels/BuilderSidebar.js +3 -0
- package/dist/panels/BuilderSidebar.js.map +1 -1
- package/dist/panels/ChannelConfigPanel.d.ts.map +1 -1
- package/dist/panels/ChannelConfigPanel.js +3 -0
- package/dist/panels/ChannelConfigPanel.js.map +1 -1
- package/dist/panels/ChannelsPanel.d.ts.map +1 -1
- package/dist/panels/ChannelsPanel.js +3 -0
- package/dist/panels/ChannelsPanel.js.map +1 -1
- package/dist/panels/DebugConsolePanel.d.ts.map +1 -1
- package/dist/panels/DebugConsolePanel.js +3 -0
- package/dist/panels/DebugConsolePanel.js.map +1 -1
- package/dist/panels/DebugContextPanel.d.ts.map +1 -1
- package/dist/panels/DebugContextPanel.js +3 -0
- package/dist/panels/DebugContextPanel.js.map +1 -1
- package/dist/panels/DebugExternalIOPanel.d.ts.map +1 -1
- package/dist/panels/DebugExternalIOPanel.js +3 -0
- package/dist/panels/DebugExternalIOPanel.js.map +1 -1
- package/dist/panels/DiagnosticsPanel.d.ts.map +1 -1
- package/dist/panels/DiagnosticsPanel.js +3 -0
- package/dist/panels/DiagnosticsPanel.js.map +1 -1
- package/dist/panels/EdgeConfigPanel.d.ts.map +1 -1
- package/dist/panels/EdgeConfigPanel.js +4 -1
- package/dist/panels/EdgeConfigPanel.js.map +1 -1
- package/dist/panels/FunctionConfigPanel.d.ts.map +1 -1
- package/dist/panels/FunctionConfigPanel.js +4 -1
- package/dist/panels/FunctionConfigPanel.js.map +1 -1
- package/dist/panels/FunctionListPanel.d.ts.map +1 -1
- package/dist/panels/FunctionListPanel.js +3 -0
- package/dist/panels/FunctionListPanel.js.map +1 -1
- package/dist/panels/MemoryConfigPanel.d.ts.map +1 -1
- package/dist/panels/MemoryConfigPanel.js +3 -0
- package/dist/panels/MemoryConfigPanel.js.map +1 -1
- package/dist/panels/MemoryPanel.d.ts.map +1 -1
- package/dist/panels/MemoryPanel.js +3 -0
- package/dist/panels/MemoryPanel.js.map +1 -1
- package/dist/panels/ModelConfigPanel.d.ts.map +1 -1
- package/dist/panels/ModelConfigPanel.js +3 -0
- package/dist/panels/ModelConfigPanel.js.map +1 -1
- package/dist/panels/ModelsPanel.d.ts.map +1 -1
- package/dist/panels/ModelsPanel.js +3 -0
- package/dist/panels/ModelsPanel.js.map +1 -1
- package/dist/panels/NodeConfigPanel.d.ts.map +1 -1
- package/dist/panels/NodeConfigPanel.js +4 -1
- package/dist/panels/NodeConfigPanel.js.map +1 -1
- package/dist/panels/NodeLibrary.d.ts.map +1 -1
- package/dist/panels/NodeLibrary.js +4 -1
- package/dist/panels/NodeLibrary.js.map +1 -1
- package/dist/panels/ResourceConfigPanel.d.ts.map +1 -1
- package/dist/panels/ResourceConfigPanel.js +4 -1
- package/dist/panels/ResourceConfigPanel.js.map +1 -1
- package/dist/panels/ResourceListPanel.d.ts.map +1 -1
- package/dist/panels/ResourceListPanel.js +4 -1
- package/dist/panels/ResourceListPanel.js.map +1 -1
- package/dist/panels/VariableConfigPanel.d.ts.map +1 -1
- package/dist/panels/VariableConfigPanel.js +4 -1
- package/dist/panels/VariableConfigPanel.js.map +1 -1
- package/dist/panels/VariablesPanel.d.ts.map +1 -1
- package/dist/panels/VariablesPanel.js +4 -1
- package/dist/panels/VariablesPanel.js.map +1 -1
- package/dist/stores/canvasStore.d.ts.map +1 -1
- package/dist/stores/canvasStore.js +3 -0
- package/dist/stores/canvasStore.js.map +1 -1
- package/dist/stores/debugStore.d.ts.map +1 -1
- package/dist/stores/debugStore.js +3 -0
- package/dist/stores/debugStore.js.map +1 -1
- package/dist/stores/diagnosticsStore.d.ts.map +1 -1
- package/dist/stores/diagnosticsStore.js +3 -0
- package/dist/stores/diagnosticsStore.js.map +1 -1
- package/dist/stores/editorStore.d.ts +1 -1
- package/dist/stores/editorStore.d.ts.map +1 -1
- package/dist/stores/editorStore.js +3 -0
- package/dist/stores/editorStore.js.map +1 -1
- package/dist/utils/categoryConstants.d.ts.map +1 -1
- package/dist/utils/categoryConstants.js +3 -0
- package/dist/utils/categoryConstants.js.map +1 -1
- package/dist/utils/channelOperations.d.ts.map +1 -1
- package/dist/utils/channelOperations.js +3 -0
- package/dist/utils/channelOperations.js.map +1 -1
- package/dist/utils/connectionRules.d.ts +3 -1
- package/dist/utils/connectionRules.d.ts.map +1 -1
- package/dist/utils/connectionRules.js +11 -16
- package/dist/utils/connectionRules.js.map +1 -1
- package/dist/utils/functionOperations.d.ts.map +1 -1
- package/dist/utils/functionOperations.js +3 -0
- package/dist/utils/functionOperations.js.map +1 -1
- package/dist/utils/graphOperations.d.ts.map +1 -1
- package/dist/utils/graphOperations.js +3 -0
- package/dist/utils/graphOperations.js.map +1 -1
- package/dist/utils/history.d.ts.map +1 -1
- package/dist/utils/history.js +4 -1
- package/dist/utils/history.js.map +1 -1
- package/dist/utils/memoryOperations.d.ts.map +1 -1
- package/dist/utils/memoryOperations.js +3 -0
- package/dist/utils/memoryOperations.js.map +1 -1
- package/dist/utils/migrateFunctionNodes.d.ts.map +1 -1
- package/dist/utils/migrateFunctionNodes.js +3 -0
- package/dist/utils/migrateFunctionNodes.js.map +1 -1
- package/dist/utils/modelOperations.d.ts.map +1 -1
- package/dist/utils/modelOperations.js +3 -0
- package/dist/utils/modelOperations.js.map +1 -1
- package/dist/utils/paramDisplay.d.ts.map +1 -1
- package/dist/utils/paramDisplay.js +3 -0
- package/dist/utils/paramDisplay.js.map +1 -1
- package/dist/utils/resourceHelpers.d.ts.map +1 -1
- package/dist/utils/resourceHelpers.js +3 -0
- package/dist/utils/resourceHelpers.js.map +1 -1
- package/dist/utils/translation.d.ts.map +1 -1
- package/dist/utils/translation.js +3 -0
- package/dist/utils/translation.js.map +1 -1
- package/dist/utils/variableOperations.d.ts.map +1 -1
- package/dist/utils/variableOperations.js +3 -0
- package/dist/utils/variableOperations.js.map +1 -1
- package/package.json +2 -2
- package/src/BuilderLayout.tsx +54 -61
- package/src/Canvas.tsx +12 -3
- package/src/CanvasEditor.tsx +4 -0
- package/src/CanvasTabsToolbar.tsx +4 -0
- package/src/RightConfigPanel.tsx +4 -0
- package/src/WorkflowBuilder.tsx +33 -18
- package/src/cn.ts +4 -0
- package/src/components/ui/add-button.tsx +4 -0
- package/src/components/ui/alert-dialog.tsx +4 -0
- package/src/components/ui/alert.tsx +4 -0
- package/src/components/ui/badge.tsx +4 -0
- package/src/components/ui/button.tsx +4 -0
- package/src/components/ui/card.tsx +4 -0
- package/src/components/ui/checkbox.tsx +4 -0
- package/src/components/ui/collapsible.tsx +4 -0
- package/src/components/ui/command.tsx +4 -0
- package/src/components/ui/delete-button.tsx +4 -0
- package/src/components/ui/dialog.tsx +4 -0
- package/src/components/ui/dropdown-menu.tsx +4 -0
- package/src/components/ui/input.tsx +4 -0
- package/src/components/ui/label.tsx +4 -0
- package/src/components/ui/readonly-banner.tsx +4 -0
- package/src/components/ui/resizable.tsx +4 -0
- package/src/components/ui/scroll-area.tsx +4 -0
- package/src/components/ui/select.tsx +4 -0
- package/src/components/ui/separator.tsx +4 -0
- package/src/components/ui/switch.tsx +4 -0
- package/src/components/ui/textarea.tsx +4 -0
- package/src/components/ui/toast.tsx +4 -0
- package/src/components/ui/toaster.tsx +4 -0
- package/src/components/ui/toggle-group.tsx +4 -0
- package/src/components/ui/toggle.tsx +4 -0
- package/src/components/ui/tooltip.tsx +4 -0
- package/src/dialogs/NodePickerDialog.tsx +4 -0
- package/src/dialogs/ValidationDialog.tsx +4 -0
- package/src/graph/BaseNode.tsx +19 -11
- package/src/graph/CustomEdge.tsx +7 -5
- package/src/graph/CustomNode.tsx +4 -0
- package/src/graph/FunctionCallNode.tsx +4 -0
- package/src/graph/PortHandle.tsx +4 -0
- package/src/graph/reactFlowRegistry.ts +4 -1
- package/src/hooks/use-toast.ts +4 -0
- package/src/hooks/useAvailableVariables.ts +4 -0
- package/src/hooks/useCanvasHistory.ts +4 -0
- package/src/hooks/useCanvasTabs.ts +4 -0
- package/src/hooks/useFunctionDiagnosticsSync.ts +4 -0
- package/src/hooks/useFunctionRegistry.ts +4 -0
- package/src/hooks/useFunctions.ts +4 -0
- package/src/hooks/useGraph.ts +4 -0
- package/src/hooks/useNodeDefinitions.ts +4 -0
- package/src/hooks/useParamErrors.ts +4 -0
- package/src/hooks/useResolvedTheme.ts +4 -0
- package/src/hooks/useResourceDiagnosticsSync.ts +4 -0
- package/src/hooks/useSuppressThemeTransition.ts +4 -0
- package/src/hooks/useWorkflowSerialization.ts +4 -0
- package/src/i18n/index.ts +4 -0
- package/src/index.ts +5 -1
- package/src/inputs/ExpressionInput.tsx +4 -0
- package/src/inputs/ParameterEditor.tsx +4 -0
- package/src/inputs/PortSection.tsx +4 -0
- package/src/mode.ts +15 -0
- package/src/panels/BuilderSidebar.tsx +4 -0
- package/src/panels/ChannelConfigPanel.tsx +4 -0
- package/src/panels/ChannelsPanel.tsx +4 -0
- package/src/panels/DebugConsolePanel.tsx +4 -0
- package/src/panels/DebugContextPanel.tsx +4 -0
- package/src/panels/DebugExternalIOPanel.tsx +4 -0
- package/src/panels/DiagnosticsPanel.tsx +4 -0
- package/src/panels/EdgeConfigPanel.tsx +5 -1
- package/src/panels/FunctionConfigPanel.tsx +5 -1
- package/src/panels/FunctionListPanel.tsx +4 -0
- package/src/panels/MemoryConfigPanel.tsx +4 -0
- package/src/panels/MemoryPanel.tsx +4 -0
- package/src/panels/ModelConfigPanel.tsx +4 -0
- package/src/panels/ModelsPanel.tsx +4 -0
- package/src/panels/NodeConfigPanel.tsx +5 -1
- package/src/panels/NodeLibrary.tsx +5 -1
- package/src/panels/ResourceConfigPanel.tsx +5 -1
- package/src/panels/ResourceListPanel.tsx +5 -1
- package/src/panels/VariableConfigPanel.tsx +5 -1
- package/src/panels/VariablesPanel.tsx +5 -1
- package/src/stores/canvasStore.test.ts +4 -0
- package/src/stores/canvasStore.ts +4 -0
- package/src/stores/debugStore.ts +4 -0
- package/src/stores/diagnosticsStore.ts +4 -0
- package/src/stores/editorStore.ts +5 -1
- package/src/utils/categoryConstants.ts +4 -0
- package/src/utils/channelOperations.ts +4 -0
- package/src/utils/connectionRules.ts +12 -9
- package/src/utils/functionOperations.ts +4 -0
- package/src/utils/graphOperations.ts +4 -0
- package/src/utils/history.test.ts +92 -0
- package/src/utils/history.ts +5 -1
- package/src/utils/memoryOperations.ts +4 -0
- package/src/utils/migrateFunctionNodes.ts +4 -0
- package/src/utils/modelOperations.ts +4 -0
- package/src/utils/paramDisplay.ts +4 -0
- package/src/utils/resourceHelpers.ts +4 -0
- package/src/utils/translation.ts +4 -0
- package/src/utils/variableOperations.ts +4 -0
- package/tailwind-preset.ts +4 -0
package/src/graph/BaseNode.tsx
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { Badge } from "../components/ui/badge";
|
|
2
6
|
import { Tooltip, TooltipContent, TooltipTrigger } from "../components/ui/tooltip";
|
|
3
7
|
import {
|
|
@@ -16,7 +20,7 @@ import { getOrCreateCanvasStore } from "../stores/canvasStore";
|
|
|
16
20
|
import { useDebugStore } from "../stores/debugStore";
|
|
17
21
|
import { useDiagnosticsStore } from "../stores/diagnosticsStore";
|
|
18
22
|
import { useEditorStore } from "../stores/editorStore";
|
|
19
|
-
import { isReadOnly } from "../
|
|
23
|
+
import { isReadOnly } from "../mode";
|
|
20
24
|
import { categoryIcons } from "../utils/categoryConstants";
|
|
21
25
|
import { computeNodeDiagnostics } from "@foresthubai/workflow-core/diagnostics";
|
|
22
26
|
import {
|
|
@@ -46,8 +50,9 @@ export const BaseNode = memo(
|
|
|
46
50
|
({ id, data, selected, nodeDefinition, isStale = false, isDeleted = false }: BaseNodeProps) => {
|
|
47
51
|
const nodeData = data as NodeData;
|
|
48
52
|
const isHighlighted = selected ?? false;
|
|
49
|
-
//
|
|
50
|
-
|
|
53
|
+
// Read-only (preview/debug) disables edit affordances (e.g. add-edge handles)
|
|
54
|
+
// but must NOT hide diagnostics — a viewer still needs to see errors/warnings.
|
|
55
|
+
const isReadOnlyMode = useEditorStore((s) => isReadOnly(s.builderMode));
|
|
51
56
|
|
|
52
57
|
// Debug cursor: true when this node is the current debug step target
|
|
53
58
|
const isDebugCursor = useDebugStore(
|
|
@@ -63,10 +68,12 @@ export const BaseNode = memo(
|
|
|
63
68
|
// Get active canvas ID with imperative access (no subscription), since it doesn't change for a node
|
|
64
69
|
const activeCanvasId = useEditorStore.getState().activeCanvasId;
|
|
65
70
|
|
|
66
|
-
// Get necessary canvas store data
|
|
71
|
+
// Get necessary canvas store data.
|
|
72
|
+
// BaseNode must NEVER subscribe to s.nodes: dragging replaces the nodes array
|
|
73
|
+
// every frame, so a nodes subscription re-renders all N nodes per frame (O(N²)).
|
|
74
|
+
// Subscribing to s.edges is fine — edges keep their identity during a drag.
|
|
67
75
|
const canvasStore = getOrCreateCanvasStore(activeCanvasId);
|
|
68
76
|
const edges = canvasStore((s) => s.edges);
|
|
69
|
-
const nodes = canvasStore((s) => s.nodes);
|
|
70
77
|
const channels = useEditorStore((s) => s.channels);
|
|
71
78
|
const memory = useEditorStore((s) => s.memory);
|
|
72
79
|
const models = useEditorStore((s) => s.models);
|
|
@@ -103,7 +110,7 @@ export const BaseNode = memo(
|
|
|
103
110
|
}, [availableModels, models]);
|
|
104
111
|
|
|
105
112
|
// Get port definitions using centralized dispatcher
|
|
106
|
-
const portDefinitions = getPorts(nodeData);
|
|
113
|
+
const portDefinitions = useMemo(() => getPorts(nodeData), [nodeData]);
|
|
107
114
|
|
|
108
115
|
// Separate ports by type for positioning
|
|
109
116
|
const { executionInputs, toolInputs, executionOutputs, toolOutputs } = useMemo(() => {
|
|
@@ -187,14 +194,15 @@ export const BaseNode = memo(
|
|
|
187
194
|
const hasErrors = diagnostics.some((d) => d.severity === "error");
|
|
188
195
|
const hasWarnings = diagnostics.some((d) => d.severity === "warning");
|
|
189
196
|
|
|
190
|
-
// Write diagnostics to store (cleanup on unmount; validateAllCanvases handles full-project)
|
|
197
|
+
// Write diagnostics to store (cleanup on unmount; validateAllCanvases handles full-project).
|
|
198
|
+
// Runs in every mode: read-only viewers still need errors/warnings surfaced in
|
|
199
|
+
// the sidebar and config panels.
|
|
191
200
|
const setNodeDiagnostics = useDiagnosticsStore((s) => s.setNodeDiagnostics);
|
|
192
201
|
const clearNodeDiagnostics = useDiagnosticsStore((s) => s.clearNodeDiagnostics);
|
|
193
202
|
useEffect(() => {
|
|
194
|
-
if (isPreview) return;
|
|
195
203
|
setNodeDiagnostics(id, diagnostics);
|
|
196
204
|
return () => clearNodeDiagnostics(id);
|
|
197
|
-
}, [id, diagnostics, setNodeDiagnostics, clearNodeDiagnostics
|
|
205
|
+
}, [id, diagnostics, setNodeDiagnostics, clearNodeDiagnostics]);
|
|
198
206
|
|
|
199
207
|
const usedInControlFlow = useMemo(() => {
|
|
200
208
|
return edges.some((e) => {
|
|
@@ -508,7 +516,7 @@ export const BaseNode = memo(
|
|
|
508
516
|
|
|
509
517
|
{/* Execution output handles (right) — disabled when tool input is connected */}
|
|
510
518
|
{executionOutputs.map((port, index) => {
|
|
511
|
-
const canAccept = !
|
|
519
|
+
const canAccept = !isReadOnlyMode && !usedAsToolInput && canPortAcceptEdge(nodeData, port.id, edges);
|
|
512
520
|
return (
|
|
513
521
|
<PortHandle
|
|
514
522
|
key={port.id}
|
|
@@ -533,7 +541,7 @@ export const BaseNode = memo(
|
|
|
533
541
|
|
|
534
542
|
{/* Tool output handles (bottom) */}
|
|
535
543
|
{toolOutputs.map((port, index) => {
|
|
536
|
-
const canAccept = !
|
|
544
|
+
const canAccept = !isReadOnlyMode && canPortAcceptEdge(nodeData, port.id, edges);
|
|
537
545
|
return (
|
|
538
546
|
<PortHandle
|
|
539
547
|
key={port.id}
|
package/src/graph/CustomEdge.tsx
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { Tooltip, TooltipContent, TooltipTrigger } from "../components/ui/tooltip";
|
|
2
6
|
import { BaseEdge, EdgeLabelRenderer, getBezierPath, Position, useEdges } from "@xyflow/react";
|
|
3
7
|
import { AlertTriangle } from "lucide-react";
|
|
@@ -6,7 +10,6 @@ import { useEffect, useMemo } from "react";
|
|
|
6
10
|
import { useAvailableVariables } from "../hooks/useAvailableVariables";
|
|
7
11
|
import { useDiagnosticsStore } from "../stores/diagnosticsStore";
|
|
8
12
|
import { useEditorStore } from "../stores/editorStore";
|
|
9
|
-
import { isReadOnly } from "../WorkflowBuilder";
|
|
10
13
|
import { computeEdgeDiagnostics } from "@foresthubai/workflow-core/diagnostics";
|
|
11
14
|
|
|
12
15
|
const EDGE_BASE_COLOR = "hsl(var(--edge-default))";
|
|
@@ -56,7 +59,6 @@ export const CustomEdge = ({
|
|
|
56
59
|
selected?: boolean;
|
|
57
60
|
}) => {
|
|
58
61
|
const isHighlighted = selected ?? false;
|
|
59
|
-
const isPreview = useEditorStore((s) => isReadOnly(s.builderMode));
|
|
60
62
|
const edgeType = (type ?? "control") as EdgeType;
|
|
61
63
|
const edges = useEdges();
|
|
62
64
|
const activeCanvasId = useEditorStore.getState().activeCanvasId;
|
|
@@ -80,14 +82,14 @@ export const CustomEdge = ({
|
|
|
80
82
|
|
|
81
83
|
const hasErrors = diagnostics.length > 0;
|
|
82
84
|
|
|
83
|
-
// Write diagnostics to store (cleanup on unmount; validateAllCanvases handles full-project)
|
|
85
|
+
// Write diagnostics to store (cleanup on unmount; validateAllCanvases handles full-project).
|
|
86
|
+
// Runs in every mode: read-only viewers still need errors/warnings surfaced in the sidebar.
|
|
84
87
|
const setEdgeDiagnostics = useDiagnosticsStore((s) => s.setEdgeDiagnostics);
|
|
85
88
|
const clearEdgeDiagnostics = useDiagnosticsStore((s) => s.clearEdgeDiagnostics);
|
|
86
89
|
useEffect(() => {
|
|
87
|
-
if (isPreview) return;
|
|
88
90
|
setEdgeDiagnostics(id, diagnostics);
|
|
89
91
|
return () => clearEdgeDiagnostics(id);
|
|
90
|
-
}, [id, diagnostics, setEdgeDiagnostics, clearEdgeDiagnostics
|
|
92
|
+
}, [id, diagnostics, setEdgeDiagnostics, clearEdgeDiagnostics]);
|
|
91
93
|
|
|
92
94
|
const getEdgePath = () => {
|
|
93
95
|
if (isToolFlow(edgeType)) {
|
package/src/graph/CustomNode.tsx
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { NodeData, NodeRegistry } from "@foresthubai/workflow-core/node";
|
|
2
6
|
import { NodeProps } from "@xyflow/react";
|
|
3
7
|
import { memo, useMemo } from "react";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { FunctionCallNode as DomainFunctionCallNode } from "@foresthubai/workflow-core/node";
|
|
2
6
|
import { NodeProps } from "@xyflow/react";
|
|
3
7
|
import { memo, useMemo } from "react";
|
package/src/graph/PortHandle.tsx
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import React from "react";
|
|
2
6
|
import { Handle, Position } from "@xyflow/react";
|
|
3
7
|
import { Plus } from "lucide-react";
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
// ReactFlow node/edge type registries
|
|
2
6
|
// Maps ReactFlow type strings to the React components that render them.
|
|
3
|
-
// Shared between CanvasArea (editor) and VersionPreviewCanvas (read-only preview).
|
|
4
7
|
// Lives in graph/ because it references sibling components, but is only consumed
|
|
5
8
|
// by higher-level composing components — no graph/ component imports this file.
|
|
6
9
|
|
package/src/hooks/use-toast.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { useMemo } from "react";
|
|
2
6
|
import { getOrCreateCanvasStore, MAIN_CANVAS_ID } from "../stores/canvasStore";
|
|
3
7
|
import { computeAvailableVariables } from "@foresthubai/workflow-core/variable";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { useState, useCallback, useEffect } from "react";
|
|
2
6
|
import { MAIN_CANVAS_ID } from "../stores/canvasStore";
|
|
3
7
|
import { useEditorStore } from "../stores/editorStore";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { useEffect } from "react";
|
|
2
6
|
import { validateFunction } from "@foresthubai/workflow-core/diagnostics";
|
|
3
7
|
import { computeAvailableVariables } from "@foresthubai/workflow-core/variable";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { useCallback, useMemo } from "react";
|
|
2
6
|
import { useEditorStore } from "../stores/editorStore";
|
|
3
7
|
import type { FunctionDeclaration } from "@foresthubai/workflow-core/function";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { useCallback } from "react";
|
|
2
6
|
import { useEditorStore } from "../stores/editorStore";
|
|
3
7
|
import { getOrCreateCanvasStore } from "../stores/canvasStore";
|
package/src/hooks/useGraph.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { NodeDefinition, NodeData } from "@foresthubai/workflow-core/node";
|
|
2
6
|
import { Connection, Edge, Node } from "@xyflow/react";
|
|
3
7
|
import type { EdgeData } from "@foresthubai/workflow-core/edge";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { useMemo, useCallback } from "react";
|
|
2
6
|
import i18n from "../i18n";
|
|
3
7
|
import { NodeCategory, NodeRegistry, NodeDefinition, NodeData } from "@foresthubai/workflow-core/node";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { useMemo } from "react";
|
|
2
6
|
import type { Diagnostic } from "@foresthubai/workflow-core/diagnostics";
|
|
3
7
|
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { useEffect } from "react";
|
|
2
6
|
import { useEditorStore } from "../stores/editorStore";
|
|
3
7
|
import { useDiagnosticsStore } from "../stores/diagnosticsStore";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { useEffect, useLayoutEffect } from "react";
|
|
2
6
|
|
|
3
7
|
import { useResolvedTheme } from "./useResolvedTheme";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { useCallback } from "react";
|
|
2
6
|
import { serialize, deserialize, type ApiWorkflow, type Workflow, type Canvas } from "@foresthubai/workflow-core/workflow";
|
|
3
7
|
import { migrate } from "@foresthubai/workflow-core/migration";
|
package/src/i18n/index.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
// Main component + its contract
|
|
2
6
|
export { WorkflowBuilder } from "./WorkflowBuilder";
|
|
3
7
|
export type { WorkflowBuilderProps, WorkflowBuilderHandle } from "./WorkflowBuilder";
|
|
4
8
|
|
|
5
9
|
// Editor mode the embedder constructs and passes via setMode / initialMode
|
|
6
|
-
export type { BuilderMode } from "./
|
|
10
|
+
export type { BuilderMode } from "./mode";
|
|
7
11
|
|
|
8
12
|
// Debug phase the embedder pushes from the engine via setDebugPhase
|
|
9
13
|
export type { DebugSessionPhase } from "./stores/debugStore";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { useState, useRef, useEffect, useCallback, useMemo } from "react";
|
|
2
6
|
import { useTranslation } from "react-i18next";
|
|
3
7
|
import { NodeRegistry } from "@foresthubai/workflow-core/node";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { Input } from "../components/ui/input";
|
|
2
6
|
import { Textarea } from "../components/ui/textarea";
|
|
3
7
|
import { Label } from "../components/ui/label";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import type { ReactNode } from "react";
|
|
2
6
|
import { Button } from "../components/ui/button";
|
|
3
7
|
import { Input } from "../components/ui/input";
|
package/src/mode.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
5
|
+
// Leaf module on purpose: BuilderMode is consumed across the whole tree
|
|
6
|
+
// (panels, graph, stores), so it must not live in WorkflowBuilder.tsx —
|
|
7
|
+
// importing it from there creates module cycles back through the root.
|
|
8
|
+
|
|
9
|
+
/** BuilderMode steers the overall behavior of the workflow builder. */
|
|
10
|
+
export type BuilderMode = { type: "edit" } | { type: "preview" } | { type: "debug" };
|
|
11
|
+
|
|
12
|
+
/** True when canvas mutations should be blocked (preview or debug). */
|
|
13
|
+
export function isReadOnly(mode: BuilderMode): boolean {
|
|
14
|
+
return mode.type !== "edit";
|
|
15
|
+
}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { Button } from "../components/ui/button";
|
|
2
6
|
import { ScrollArea } from "../components/ui/scroll-area";
|
|
3
7
|
import { Tooltip, TooltipContent, TooltipTrigger } from "../components/ui/tooltip";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { useTranslation } from "react-i18next";
|
|
2
6
|
import { CHANNEL_DEFINITION, type Channel, type ChannelType } from "@foresthubai/workflow-core/channel";
|
|
3
7
|
import { isParameterActive, type Parameter } from "@foresthubai/workflow-core/parameter";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { useTranslation } from "react-i18next";
|
|
2
6
|
import { Cpu, Plus } from "lucide-react";
|
|
3
7
|
import { useDiagnosticsStore } from "../stores/diagnosticsStore";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { Button } from "../components/ui/button";
|
|
2
6
|
import { ScrollArea } from "../components/ui/scroll-area";
|
|
3
7
|
import { Trash2 } from "lucide-react";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { Input } from "../components/ui/input";
|
|
2
6
|
import { Label } from "../components/ui/label";
|
|
3
7
|
import { Switch } from "../components/ui/switch";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { Button } from "../components/ui/button";
|
|
2
6
|
import { Input } from "../components/ui/input";
|
|
3
7
|
import { Label } from "../components/ui/label";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { useState } from "react";
|
|
2
6
|
import { useTranslation } from "react-i18next";
|
|
3
7
|
import { Badge } from "../components/ui/badge";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { useCallback } from "react";
|
|
2
6
|
import { useTranslation } from "react-i18next";
|
|
3
7
|
import { Button } from "../components/ui/button";
|
|
@@ -7,7 +11,7 @@ import { getEdgeDefinition } from "@foresthubai/workflow-core/edge";
|
|
|
7
11
|
import type { EdgeData, EdgeType } from "@foresthubai/workflow-core/edge";
|
|
8
12
|
import ParameterEditor from "../inputs/ParameterEditor";
|
|
9
13
|
import { useEditorStore } from "../stores/editorStore";
|
|
10
|
-
import { isReadOnly } from "../
|
|
14
|
+
import { isReadOnly } from "../mode";
|
|
11
15
|
import { useDiagnosticsStore } from "../stores/diagnosticsStore";
|
|
12
16
|
import { useParamErrors } from "../hooks/useParamErrors";
|
|
13
17
|
import { ReadOnlyBanner } from "../components/ui/readonly-banner";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { useEffect, useMemo, useState } from "react";
|
|
2
6
|
import { useTranslation } from "react-i18next";
|
|
3
7
|
import { Button } from "../components/ui/button";
|
|
@@ -16,7 +20,7 @@ import { ChevronRight } from "lucide-react";
|
|
|
16
20
|
import type { FunctionDeclaration } from "@foresthubai/workflow-core/function";
|
|
17
21
|
import { useEditorStore } from "../stores/editorStore";
|
|
18
22
|
import { useDiagnosticsStore } from "../stores/diagnosticsStore";
|
|
19
|
-
import { isReadOnly } from "../
|
|
23
|
+
import { isReadOnly } from "../mode";
|
|
20
24
|
import { ReadOnlyBanner } from "../components/ui/readonly-banner";
|
|
21
25
|
import { DeleteButton } from "../components/ui/delete-button";
|
|
22
26
|
import { PortSection } from "../inputs/PortSection";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { useTranslation } from "react-i18next";
|
|
2
6
|
import { FunctionSquare, Plus } from "lucide-react";
|
|
3
7
|
import { useDiagnosticsStore } from "../stores/diagnosticsStore";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { useTranslation } from "react-i18next";
|
|
2
6
|
import { MemoryRegistry, type Memory } from "@foresthubai/workflow-core/memory";
|
|
3
7
|
import { useEditorStore } from "../stores/editorStore";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { useTranslation } from "react-i18next";
|
|
2
6
|
import { Database, FileText } from "lucide-react";
|
|
3
7
|
import type { MemoryType } from "@foresthubai/workflow-core/memory";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { useTranslation } from "react-i18next";
|
|
2
6
|
import { ModelRegistry, type Model } from "@foresthubai/workflow-core/model";
|
|
3
7
|
import { useDiagnosticsStore } from "../stores/diagnosticsStore";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { useTranslation } from "react-i18next";
|
|
2
6
|
import { BrainCircuit, Plus } from "lucide-react";
|
|
3
7
|
import { useDiagnosticsStore } from "../stores/diagnosticsStore";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { Button } from "../components/ui/button";
|
|
2
6
|
import { AddButton } from "../components/ui/add-button";
|
|
3
7
|
import { ReadOnlyBanner } from "../components/ui/readonly-banner";
|
|
@@ -33,7 +37,7 @@ import { useFunctionRegistry } from "../hooks/useFunctionRegistry";
|
|
|
33
37
|
import { useParamErrors } from "../hooks/useParamErrors";
|
|
34
38
|
import { buildFunctionNodeDef } from "../hooks/useNodeDefinitions";
|
|
35
39
|
import { useEditorStore } from "../stores/editorStore";
|
|
36
|
-
import { isReadOnly } from "../
|
|
40
|
+
import { isReadOnly } from "../mode";
|
|
37
41
|
import { migrateFunctionCallNodes } from "../utils/migrateFunctionNodes";
|
|
38
42
|
import { getNodeDescription } from "../utils/translation";
|
|
39
43
|
import { useAvailableVariables } from "../hooks/useAvailableVariables";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { Badge } from "../components/ui/badge";
|
|
2
6
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../components/ui/collapsible";
|
|
3
7
|
import { Input } from "../components/ui/input";
|
|
@@ -13,7 +17,7 @@ import { useTranslation } from "react-i18next";
|
|
|
13
17
|
import { NodeDefinition } from "@foresthubai/workflow-core/node";
|
|
14
18
|
import { categoryIcons, categoryColors } from "../utils/categoryConstants";
|
|
15
19
|
import { useEditorStore } from "../stores/editorStore";
|
|
16
|
-
import { isReadOnly } from "../
|
|
20
|
+
import { isReadOnly } from "../mode";
|
|
17
21
|
import { FunctionNodeDefinition } from "@foresthubai/workflow-core/node";
|
|
18
22
|
import { Parameter } from "@foresthubai/workflow-core/parameter";
|
|
19
23
|
import { getNodeDescription } from "../utils/translation";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { useEffect, useState, type ReactNode } from "react";
|
|
2
6
|
import { Button } from "../components/ui/button";
|
|
3
7
|
import { Separator } from "../components/ui/separator";
|
|
@@ -7,7 +11,7 @@ import type { Diagnostic } from "@foresthubai/workflow-core/diagnostics";
|
|
|
7
11
|
import ParameterEditor from "../inputs/ParameterEditor";
|
|
8
12
|
import { MAIN_CANVAS_ID } from "../stores/canvasStore";
|
|
9
13
|
import { useEditorStore } from "../stores/editorStore";
|
|
10
|
-
import { isReadOnly } from "../
|
|
14
|
+
import { isReadOnly } from "../mode";
|
|
11
15
|
import { useParamErrors } from "../hooks/useParamErrors";
|
|
12
16
|
import { ReadOnlyBanner } from "../components/ui/readonly-banner";
|
|
13
17
|
import { DeleteButton } from "../components/ui/delete-button";
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { AlertTriangle, type LucideIcon } from "lucide-react";
|
|
2
6
|
import { AddButton } from "../components/ui/add-button";
|
|
3
7
|
import { cn } from "../cn";
|
|
4
8
|
import { useEditorStore } from "../stores/editorStore";
|
|
5
|
-
import { isReadOnly } from "../
|
|
9
|
+
import { isReadOnly } from "../mode";
|
|
6
10
|
import type { Diagnostic } from "@foresthubai/workflow-core/diagnostics";
|
|
7
11
|
|
|
8
12
|
interface ResourceListItem {
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import { useEffect, useState } from "react";
|
|
2
6
|
import { useTranslation } from "react-i18next";
|
|
3
7
|
import { Button } from "../components/ui/button";
|
|
@@ -8,7 +12,7 @@ import { ChevronRight } from "lucide-react";
|
|
|
8
12
|
import type { DeclaredVariable } from "@foresthubai/workflow-core/variable";
|
|
9
13
|
import type { DataType } from "@foresthubai/workflow-core";
|
|
10
14
|
import { useEditorStore } from "../stores/editorStore";
|
|
11
|
-
import { isReadOnly } from "../
|
|
15
|
+
import { isReadOnly } from "../mode";
|
|
12
16
|
import { ReadOnlyBanner } from "../components/ui/readonly-banner";
|
|
13
17
|
import { DeleteButton } from "../components/ui/delete-button";
|
|
14
18
|
import { deleteDeclaredVariable, setDeclaredVariableType, updateDeclaredVariable } from "../utils/variableOperations";
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (c) 2026 ForestHub. All rights reserved.
|
|
3
|
+
// For commercial licensing, contact root@foresthub.ai
|
|
4
|
+
|
|
1
5
|
import React from "react";
|
|
2
6
|
import { useTranslation } from "react-i18next";
|
|
3
7
|
import { AddButton } from "../components/ui/add-button";
|
|
4
8
|
import { Variable as VariableIcon } from "lucide-react";
|
|
5
9
|
import { cn } from "../cn";
|
|
6
10
|
import { useEditorStore } from "../stores/editorStore";
|
|
7
|
-
import { isReadOnly } from "../
|
|
11
|
+
import { isReadOnly } from "../mode";
|
|
8
12
|
import { useAvailableVariables } from "../hooks/useAvailableVariables";
|
|
9
13
|
import { getOrCreateCanvasStore, MAIN_CANVAS_ID } from "../stores/canvasStore";
|
|
10
14
|
import { type Variable, type DeclaredVariable } from "@foresthubai/workflow-core/variable";
|