@foresthubai/workflow-builder 0.4.3 → 0.4.5
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/LICENSE +661 -661
- package/NOTICE +16 -16
- package/README.md +110 -110
- 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 +2 -2
- 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 +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 +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 +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 +21 -16
- package/dist/graph/BaseNode.js.map +1 -1
- package/dist/graph/CustomEdge.d.ts.map +1 -1
- package/dist/graph/CustomEdge.js +4 -1
- 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 -0
- 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 +338 -345
- package/src/Canvas.tsx +270 -261
- package/src/CanvasEditor.tsx +146 -142
- package/src/CanvasTabsToolbar.tsx +180 -176
- package/src/RightConfigPanel.tsx +270 -266
- package/src/WorkflowBuilder.tsx +423 -408
- package/src/cn.ts +10 -6
- package/src/components/ui/add-button.tsx +43 -39
- package/src/components/ui/alert-dialog.tsx +145 -141
- package/src/components/ui/alert.tsx +63 -59
- package/src/components/ui/badge.tsx +40 -36
- package/src/components/ui/button.tsx +89 -85
- package/src/components/ui/card.tsx +83 -79
- package/src/components/ui/checkbox.tsx +32 -28
- package/src/components/ui/collapsible.tsx +13 -9
- package/src/components/ui/command.tsx +157 -153
- package/src/components/ui/delete-button.tsx +27 -23
- package/src/components/ui/dialog.tsx +129 -125
- package/src/components/ui/dropdown-menu.tsx +202 -198
- package/src/components/ui/input.tsx +59 -55
- package/src/components/ui/label.tsx +28 -24
- package/src/components/ui/readonly-banner.tsx +19 -15
- package/src/components/ui/resizable.tsx +47 -43
- package/src/components/ui/scroll-area.tsx +106 -102
- package/src/components/ui/select.tsx +164 -160
- package/src/components/ui/separator.tsx +33 -29
- package/src/components/ui/switch.tsx +31 -27
- package/src/components/ui/textarea.tsx +55 -51
- package/src/components/ui/toast.tsx +131 -127
- package/src/components/ui/toaster.tsx +37 -33
- package/src/components/ui/toggle-group.tsx +63 -59
- package/src/components/ui/toggle.tsx +47 -43
- package/src/components/ui/tooltip.tsx +36 -32
- package/src/dialogs/NodePickerDialog.tsx +88 -84
- package/src/dialogs/ValidationDialog.tsx +188 -184
- package/src/graph/BaseNode.tsx +563 -557
- package/src/graph/CustomEdge.tsx +189 -185
- package/src/graph/CustomNode.tsx +20 -16
- package/src/graph/FunctionCallNode.tsx +34 -30
- package/src/graph/PortHandle.tsx +193 -189
- package/src/graph/reactFlowRegistry.ts +30 -26
- package/src/hooks/use-toast.ts +129 -125
- package/src/hooks/useAvailableVariables.ts +24 -20
- package/src/hooks/useCanvasHistory.ts +26 -22
- package/src/hooks/useCanvasTabs.ts +172 -168
- package/src/hooks/useFunctionDiagnosticsSync.ts +44 -40
- package/src/hooks/useFunctionRegistry.ts +30 -26
- package/src/hooks/useFunctions.ts +48 -44
- package/src/hooks/useGraph.ts +165 -161
- package/src/hooks/useNodeDefinitions.ts +86 -82
- package/src/hooks/useParamErrors.ts +30 -26
- package/src/hooks/useResolvedTheme.ts +34 -30
- package/src/hooks/useResourceDiagnosticsSync.ts +62 -58
- package/src/hooks/useSuppressThemeTransition.ts +83 -79
- package/src/hooks/useWorkflowSerialization.ts +145 -141
- package/src/i18n/index.ts +57 -53
- package/src/i18n/locales/de.json +501 -501
- package/src/i18n/locales/en.json +557 -557
- package/src/index.ts +31 -27
- package/src/inputs/ExpressionInput.tsx +301 -297
- package/src/inputs/ParameterEditor.tsx +519 -515
- package/src/inputs/PortSection.tsx +148 -144
- package/src/mode.ts +15 -0
- package/src/panels/BuilderSidebar.tsx +305 -301
- package/src/panels/ChannelConfigPanel.tsx +53 -49
- package/src/panels/ChannelsPanel.tsx +32 -28
- package/src/panels/DebugConsolePanel.tsx +77 -73
- package/src/panels/DebugContextPanel.tsx +81 -77
- package/src/panels/DebugExternalIOPanel.tsx +184 -180
- package/src/panels/DiagnosticsPanel.tsx +174 -170
- package/src/panels/EdgeConfigPanel.tsx +108 -104
- package/src/panels/FunctionConfigPanel.tsx +183 -179
- package/src/panels/FunctionListPanel.tsx +49 -45
- package/src/panels/MemoryConfigPanel.tsx +59 -55
- package/src/panels/MemoryPanel.tsx +44 -40
- package/src/panels/ModelConfigPanel.tsx +45 -41
- package/src/panels/ModelsPanel.tsx +40 -36
- package/src/panels/NodeConfigPanel.tsx +634 -630
- package/src/panels/NodeLibrary.tsx +292 -288
- package/src/panels/ResourceConfigPanel.tsx +136 -132
- package/src/panels/ResourceListPanel.tsx +117 -113
- package/src/panels/VariableConfigPanel.tsx +165 -161
- package/src/panels/VariablesPanel.tsx +149 -145
- package/src/stores/canvasStore.test.ts +48 -44
- package/src/stores/canvasStore.ts +249 -245
- package/src/stores/debugStore.ts +78 -74
- package/src/stores/diagnosticsStore.ts +134 -130
- package/src/stores/editorStore.ts +194 -190
- package/src/styles/index.css +526 -526
- package/src/utils/categoryConstants.ts +30 -26
- package/src/utils/channelOperations.ts +90 -86
- package/src/utils/connectionRules.ts +140 -137
- package/src/utils/functionOperations.ts +183 -179
- package/src/utils/graphOperations.ts +554 -550
- package/src/utils/history.test.ts +92 -0
- package/src/utils/history.ts +211 -207
- package/src/utils/memoryOperations.ts +61 -57
- package/src/utils/migrateFunctionNodes.ts +111 -107
- package/src/utils/modelOperations.ts +59 -55
- package/src/utils/paramDisplay.ts +75 -71
- package/src/utils/resourceHelpers.ts +36 -32
- package/src/utils/translation.ts +32 -28
- package/src/utils/variableOperations.ts +79 -75
- package/tailwind-preset.ts +170 -166
- package/dist/lib/utils.d.ts +0 -3
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/utils.js +0 -6
- package/dist/lib/utils.js.map +0 -1
- package/dist/toolbars/CanvasTabsToolbar.d.ts +0 -11
- package/dist/toolbars/CanvasTabsToolbar.d.ts.map +0 -1
- package/dist/toolbars/CanvasTabsToolbar.js +0 -101
- package/dist/toolbars/CanvasTabsToolbar.js.map +0 -1
|
@@ -1,49 +1,53 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
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
|
+
import { useTranslation } from "react-i18next";
|
|
6
|
+
import { CHANNEL_DEFINITION, type Channel, type ChannelType } from "@foresthubai/workflow-core/channel";
|
|
7
|
+
import { isParameterActive, type Parameter } from "@foresthubai/workflow-core/parameter";
|
|
8
|
+
import { useDiagnosticsStore } from "../stores/diagnosticsStore";
|
|
9
|
+
import { deleteChannel, updateChannel } from "../utils/channelOperations";
|
|
10
|
+
import { ResourceConfigPanel } from "./ResourceConfigPanel";
|
|
11
|
+
|
|
12
|
+
interface ChannelConfigPanelProps {
|
|
13
|
+
channel: Channel;
|
|
14
|
+
onClose: () => void;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const ChannelConfigPanel = ({ channel, onClose }: ChannelConfigPanelProps) => {
|
|
18
|
+
const { t } = useTranslation();
|
|
19
|
+
|
|
20
|
+
// `type` is a parameter, so it's exposed through the same `arguments`-shaped
|
|
21
|
+
// record ParameterEditor reads — the top-level `type` is mirrored under the
|
|
22
|
+
// `type` key so the activation-rule evaluator can see it.
|
|
23
|
+
const allArguments: Record<string, unknown> = { ...channel.arguments, type: channel.type };
|
|
24
|
+
const parameters = CHANNEL_DEFINITION.parameters.filter((p) => isParameterActive(p, allArguments, false));
|
|
25
|
+
const channelDiags = useDiagnosticsStore((s) => s.byChannelId[channel.id]);
|
|
26
|
+
|
|
27
|
+
const handleParamChange = (paramId: string, value: unknown) => {
|
|
28
|
+
if (paramId === "type") {
|
|
29
|
+
updateChannel(channel.id, { type: value as ChannelType });
|
|
30
|
+
} else {
|
|
31
|
+
updateChannel(channel.id, { arguments: { [paramId]: value } });
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<ResourceConfigPanel
|
|
37
|
+
resetKey={channel.id}
|
|
38
|
+
label={channel.label}
|
|
39
|
+
labelTitle={t("channelLabel", "Channel label")}
|
|
40
|
+
onLabelChange={(label) => updateChannel(channel.id, { label })}
|
|
41
|
+
description={t("channelDescription", "Hardware interface declaration")}
|
|
42
|
+
parameters={parameters}
|
|
43
|
+
getValue={(p: Parameter) => (p.id === "type" ? channel.type : channel.arguments[p.id])}
|
|
44
|
+
allArguments={allArguments}
|
|
45
|
+
onParamChange={handleParamChange}
|
|
46
|
+
diagnostics={channelDiags}
|
|
47
|
+
translationPrefix="channels"
|
|
48
|
+
deleteLabel={t("deleteChannel", "Delete channel")}
|
|
49
|
+
onDelete={() => deleteChannel(channel.id)}
|
|
50
|
+
onClose={onClose}
|
|
51
|
+
/>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
@@ -1,28 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
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
|
+
import { useTranslation } from "react-i18next";
|
|
6
|
+
import { Cpu, Plus } from "lucide-react";
|
|
7
|
+
import { useDiagnosticsStore } from "../stores/diagnosticsStore";
|
|
8
|
+
import { useEditorStore } from "../stores/editorStore";
|
|
9
|
+
import { addChannel } from "../utils/channelOperations";
|
|
10
|
+
import { ResourceListPanel } from "./ResourceListPanel";
|
|
11
|
+
|
|
12
|
+
export const ChannelsPanel = () => {
|
|
13
|
+
const { t } = useTranslation();
|
|
14
|
+
const channels = useEditorStore((s) => s.channels);
|
|
15
|
+
const selection = useEditorStore((s) => s.selection);
|
|
16
|
+
const selectChannel = useEditorStore((s) => s.selectChannel);
|
|
17
|
+
const byChannelId = useDiagnosticsStore((s) => s.byChannelId);
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<ResourceListPanel
|
|
21
|
+
items={Object.values(channels)}
|
|
22
|
+
selectedId={selection.kind === "channel" ? selection.id : null}
|
|
23
|
+
onSelect={selectChannel}
|
|
24
|
+
diagnosticsSlot={byChannelId}
|
|
25
|
+
badge={(c) => c.type}
|
|
26
|
+
emptyIcon={Cpu}
|
|
27
|
+
emptyText={t("noChannels")}
|
|
28
|
+
emptyHint={t("noChannelsHint")}
|
|
29
|
+
addActions={[{ label: t("addChannel"), icon: Plus, onAdd: () => selectChannel(addChannel("GPIOIN").id) }]}
|
|
30
|
+
/>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
@@ -1,73 +1,77 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
//
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
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
|
+
import { Button } from "../components/ui/button";
|
|
6
|
+
import { ScrollArea } from "../components/ui/scroll-area";
|
|
7
|
+
import { Trash2 } from "lucide-react";
|
|
8
|
+
import { useEffect, useRef } from "react";
|
|
9
|
+
import { useTranslation } from "react-i18next";
|
|
10
|
+
import { useDebugStore, type ConsoleEntry } from "../stores/debugStore";
|
|
11
|
+
|
|
12
|
+
export const DebugConsolePanel = () => {
|
|
13
|
+
const { t } = useTranslation();
|
|
14
|
+
const entries = useDebugStore((s) => s.console);
|
|
15
|
+
const clearConsole = useDebugStore((s) => s.clearConsole);
|
|
16
|
+
// Ref points at the ScrollArea Viewport (the element with overflow:scroll),
|
|
17
|
+
// not the Root — the Root is overflow:hidden and won't scroll.
|
|
18
|
+
const scrollRef = useRef<HTMLDivElement>(null);
|
|
19
|
+
|
|
20
|
+
// Auto-scroll to bottom on new entries
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (scrollRef.current) {
|
|
23
|
+
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
24
|
+
}
|
|
25
|
+
}, [entries]);
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<div className="h-full flex flex-col bg-background border-t border-border">
|
|
29
|
+
{/* Header */}
|
|
30
|
+
<div className="flex items-center justify-between px-3 py-1.5 border-b border-border/50 shrink-0">
|
|
31
|
+
<span className="text-xs font-semibold text-muted-foreground uppercase tracking-wider">
|
|
32
|
+
{t("debug.console")}
|
|
33
|
+
</span>
|
|
34
|
+
<Button
|
|
35
|
+
variant="ghost"
|
|
36
|
+
size="icon"
|
|
37
|
+
className="w-6 h-6 text-muted-foreground hover:text-foreground"
|
|
38
|
+
onClick={clearConsole}
|
|
39
|
+
title={t("debug.clearConsole")}
|
|
40
|
+
>
|
|
41
|
+
<Trash2 className="w-3.5 h-3.5" />
|
|
42
|
+
</Button>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
{/* Console output. Radix wraps Viewport children in its own div, so
|
|
46
|
+
row-spacing utilities (space-y-*) on the Viewport don't reach the
|
|
47
|
+
actual rows — apply them on an explicit wrapper instead. */}
|
|
48
|
+
<ScrollArea className="flex-1" viewportRef={scrollRef} viewportClassName="p-2">
|
|
49
|
+
<div className="font-mono text-xs space-y-0.5">
|
|
50
|
+
{entries.length === 0 ? (
|
|
51
|
+
<div className="text-muted-foreground text-center py-4">{t("debug.consoleEmpty")}</div>
|
|
52
|
+
) : (
|
|
53
|
+
entries.map((entry) => <ConsoleRow key={entry.id} entry={entry} />)
|
|
54
|
+
)}
|
|
55
|
+
</div>
|
|
56
|
+
</ScrollArea>
|
|
57
|
+
</div>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
function ConsoleRow({ entry }: { entry: ConsoleEntry }) {
|
|
62
|
+
const time = new Date(entry.timestamp).toLocaleTimeString(undefined, {
|
|
63
|
+
hour: "2-digit",
|
|
64
|
+
minute: "2-digit",
|
|
65
|
+
second: "2-digit",
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
const colorClass =
|
|
69
|
+
entry.type === "error" ? "text-destructive" : entry.type === "system" ? "text-muted-foreground" : "text-foreground";
|
|
70
|
+
|
|
71
|
+
return (
|
|
72
|
+
<div className={`flex gap-2 leading-relaxed ${colorClass}`}>
|
|
73
|
+
<span className="text-muted-foreground/50 shrink-0">{time}</span>
|
|
74
|
+
<span className="whitespace-pre-wrap break-all">{entry.text}</span>
|
|
75
|
+
</div>
|
|
76
|
+
);
|
|
77
|
+
}
|
|
@@ -1,77 +1,81 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<div className="
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
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
|
+
import { Input } from "../components/ui/input";
|
|
6
|
+
import { Label } from "../components/ui/label";
|
|
7
|
+
import { Switch } from "../components/ui/switch";
|
|
8
|
+
import { useTranslation } from "react-i18next";
|
|
9
|
+
import { useDebugStore } from "../stores/debugStore";
|
|
10
|
+
import { getOrCreateCanvasStore, MAIN_CANVAS_ID } from "../stores/canvasStore";
|
|
11
|
+
import type { DataType } from "@foresthubai/workflow-core";
|
|
12
|
+
|
|
13
|
+
interface VariableEntry {
|
|
14
|
+
key: string;
|
|
15
|
+
name: string;
|
|
16
|
+
dataType: DataType;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Build the list of editable variables from the main canvas store. */
|
|
20
|
+
function getVariableEntries(): VariableEntry[] {
|
|
21
|
+
const variables = getOrCreateCanvasStore(MAIN_CANVAS_ID).getState().variables;
|
|
22
|
+
const entries: VariableEntry[] = [];
|
|
23
|
+
for (const v of Object.values(variables)) {
|
|
24
|
+
if (v.kind === "declared" || v.kind === "node") {
|
|
25
|
+
entries.push({ key: v.name, name: v.name, dataType: v.dataType });
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return entries.sort((a, b) => a.name.localeCompare(b.name));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const DebugContextPanel = () => {
|
|
32
|
+
const { t } = useTranslation();
|
|
33
|
+
const context = useDebugStore((s) => s.context);
|
|
34
|
+
const updateContextVar = useDebugStore((s) => s.updateContextVar);
|
|
35
|
+
const entries = getVariableEntries();
|
|
36
|
+
|
|
37
|
+
if (entries.length === 0) {
|
|
38
|
+
return <div className="text-sm text-muted-foreground text-center py-4">{t("debug.noVariables")}</div>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<div className="space-y-3">
|
|
43
|
+
{entries.map(({ key, name, dataType }) => {
|
|
44
|
+
const value = context[key];
|
|
45
|
+
return (
|
|
46
|
+
<div key={key} className="space-y-1">
|
|
47
|
+
<Label className="text-xs font-medium flex items-center gap-1.5">
|
|
48
|
+
<span>{name}</span>
|
|
49
|
+
<span className="text-muted-foreground font-mono">({dataType})</span>
|
|
50
|
+
</Label>
|
|
51
|
+
{dataType === "bool" ? (
|
|
52
|
+
<Switch checked={!!value} onCheckedChange={(checked) => updateContextVar(key, checked)} />
|
|
53
|
+
) : dataType === "int" ? (
|
|
54
|
+
<Input
|
|
55
|
+
type="number"
|
|
56
|
+
step={1}
|
|
57
|
+
value={(value as number) ?? 0}
|
|
58
|
+
onChange={(e) => updateContextVar(key, parseInt(e.target.value) || 0)}
|
|
59
|
+
className="h-8 font-mono text-sm"
|
|
60
|
+
/>
|
|
61
|
+
) : dataType === "float" ? (
|
|
62
|
+
<Input
|
|
63
|
+
type="number"
|
|
64
|
+
step={0.1}
|
|
65
|
+
value={(value as number) ?? 0}
|
|
66
|
+
onChange={(e) => updateContextVar(key, parseFloat(e.target.value) || 0)}
|
|
67
|
+
className="h-8 font-mono text-sm"
|
|
68
|
+
/>
|
|
69
|
+
) : (
|
|
70
|
+
<Input
|
|
71
|
+
value={String(value ?? "")}
|
|
72
|
+
onChange={(e) => updateContextVar(key, e.target.value)}
|
|
73
|
+
className="h-8 font-mono text-sm"
|
|
74
|
+
/>
|
|
75
|
+
)}
|
|
76
|
+
</div>
|
|
77
|
+
);
|
|
78
|
+
})}
|
|
79
|
+
</div>
|
|
80
|
+
);
|
|
81
|
+
};
|