@genfeedai/workflow-ui 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/canvas.js +12 -13
- package/dist/canvas.mjs +6 -7
- package/dist/{chunk-FT64PCUP.mjs → chunk-3PMLER6D.mjs} +6 -15
- package/dist/{chunk-CSUBLSKZ.mjs → chunk-73V6SUEO.mjs} +27 -36
- package/dist/{chunk-HPQT36RR.js → chunk-DICI5FSP.js} +18 -27
- package/dist/{chunk-EC2ZIWOK.js → chunk-DUZLPHRC.js} +36 -45
- package/dist/{chunk-ADWNF7V3.js → chunk-EMGXUNBL.js} +3 -3
- package/dist/{chunk-VOGL2WCE.mjs → chunk-EYL6J4MW.mjs} +9 -18
- package/dist/{chunk-H6LZKSLY.js → chunk-H3JOHAS5.js} +113 -148
- package/dist/{chunk-E544XUBL.js → chunk-HWY6IBWT.js} +8 -11
- package/dist/{chunk-22PDGHNQ.mjs → chunk-I3GNO2SR.mjs} +2 -2
- package/dist/{chunk-UQQUWGHW.mjs → chunk-IASLG6IA.mjs} +1 -1
- package/dist/chunk-IHF35QZD.js +1095 -0
- package/dist/{chunk-SW7QNEZU.js → chunk-OZNYKFMX.js} +30 -30
- package/dist/{chunk-XV5Z5XYR.mjs → chunk-PFHFGSM5.mjs} +18 -53
- package/dist/{chunk-CETJJ73S.js → chunk-PVWLMJGZ.js} +28 -37
- package/dist/chunk-RIGVIEYB.mjs +1093 -0
- package/dist/{chunk-LAJ34AH2.mjs → chunk-XOC5ETTX.mjs} +4 -7
- package/dist/hooks.js +14 -15
- package/dist/hooks.mjs +4 -5
- package/dist/index.js +41 -42
- package/dist/index.mjs +8 -9
- package/dist/lib.js +0 -1
- package/dist/lib.mjs +0 -1
- package/dist/nodes.js +37 -38
- package/dist/nodes.mjs +4 -5
- package/dist/panels.js +6 -7
- package/dist/panels.mjs +3 -4
- package/dist/provider.js +0 -1
- package/dist/provider.mjs +0 -1
- package/dist/stores.js +7 -8
- package/dist/stores.mjs +2 -3
- package/dist/toolbar.js +9 -10
- package/dist/toolbar.mjs +3 -4
- package/dist/ui.js +0 -1
- package/dist/ui.mjs +0 -1
- package/dist/workflowStore-32ZH5REM.js +11 -0
- package/dist/workflowStore-ZCSVIZQF.mjs +2 -0
- package/package.json +3 -3
- package/dist/chunk-AC6TWLRT.mjs +0 -27
- package/dist/chunk-BJ3R5R32.mjs +0 -2163
- package/dist/chunk-NSDLGLAQ.js +0 -2166
- package/dist/chunk-Z7PWFZG5.js +0 -30
- package/dist/workflowStore-4EGKJLYK.mjs +0 -3
- package/dist/workflowStore-KM32FDL7.js +0 -12
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
var chunk3SPPKCWR_js = require('./chunk-3SPPKCWR.js');
|
|
4
4
|
var chunk3YFFDHC5_js = require('./chunk-3YFFDHC5.js');
|
|
5
|
-
var
|
|
5
|
+
var chunkDICI5FSP_js = require('./chunk-DICI5FSP.js');
|
|
6
6
|
var chunk5HJFQVUR_js = require('./chunk-5HJFQVUR.js');
|
|
7
7
|
var chunkEMUMKW5C_js = require('./chunk-EMUMKW5C.js');
|
|
8
8
|
var chunk6DOEUDD5_js = require('./chunk-6DOEUDD5.js');
|
|
9
|
-
var
|
|
10
|
-
var
|
|
9
|
+
var chunkDUZLPHRC_js = require('./chunk-DUZLPHRC.js');
|
|
10
|
+
var chunkIHF35QZD_js = require('./chunk-IHF35QZD.js');
|
|
11
11
|
var chunkRJ262NXS_js = require('./chunk-RJ262NXS.js');
|
|
12
12
|
var chunkRXNEDWK2_js = require('./chunk-RXNEDWK2.js');
|
|
13
|
-
var
|
|
13
|
+
var types = require('@genfeedai/types');
|
|
14
14
|
var react$1 = require('@xyflow/react');
|
|
15
15
|
var clsx = require('clsx');
|
|
16
16
|
var lucideReact = require('lucide-react');
|
|
@@ -26,8 +26,6 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
26
26
|
|
|
27
27
|
var Image4__default = /*#__PURE__*/_interopDefault(Image4);
|
|
28
28
|
|
|
29
|
-
// src/nodes/BaseNode.tsx
|
|
30
|
-
var import_types = chunkZ7PWFZG5_js.__toESM(chunkNSDLGLAQ_js.require_dist());
|
|
31
29
|
var NodeErrorBoundary = class extends react.Component {
|
|
32
30
|
constructor(props) {
|
|
33
31
|
super(props);
|
|
@@ -204,18 +202,18 @@ function BaseNodeComponent({
|
|
|
204
202
|
disabledInputs
|
|
205
203
|
}) {
|
|
206
204
|
const isResized = width !== void 0 || height !== void 0;
|
|
207
|
-
const selectNode =
|
|
208
|
-
const selectedNodeId =
|
|
209
|
-
const highlightedNodeIds =
|
|
210
|
-
const toggleNodeLock =
|
|
211
|
-
const isNodeLocked =
|
|
212
|
-
const updateNodeData =
|
|
213
|
-
const executeNode =
|
|
214
|
-
const isRunning =
|
|
215
|
-
const stopExecution =
|
|
216
|
-
const stopNodeExecution =
|
|
205
|
+
const selectNode = chunkDUZLPHRC_js.useUIStore((state) => state.selectNode);
|
|
206
|
+
const selectedNodeId = chunkDUZLPHRC_js.useUIStore((state) => state.selectedNodeId);
|
|
207
|
+
const highlightedNodeIds = chunkDUZLPHRC_js.useUIStore((state) => state.highlightedNodeIds);
|
|
208
|
+
const toggleNodeLock = chunkIHF35QZD_js.useWorkflowStore((state) => state.toggleNodeLock);
|
|
209
|
+
const isNodeLocked = chunkIHF35QZD_js.useWorkflowStore((state) => state.isNodeLocked);
|
|
210
|
+
const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
|
|
211
|
+
const executeNode = chunkDUZLPHRC_js.useExecutionStore((state) => state.executeNode);
|
|
212
|
+
const isRunning = chunkDUZLPHRC_js.useExecutionStore((state) => state.isRunning);
|
|
213
|
+
const stopExecution = chunkDUZLPHRC_js.useExecutionStore((state) => state.stopExecution);
|
|
214
|
+
const stopNodeExecution = chunkDUZLPHRC_js.useExecutionStore((state) => state.stopNodeExecution);
|
|
217
215
|
const updateNodeInternals = react$1.useUpdateNodeInternals();
|
|
218
|
-
const nodeDef =
|
|
216
|
+
const nodeDef = types.NODE_DEFINITIONS[type];
|
|
219
217
|
const nodeData = data;
|
|
220
218
|
const nodeRef = react.useRef(null);
|
|
221
219
|
const hoverTimeoutRef = react.useRef(null);
|
|
@@ -240,12 +238,12 @@ function BaseNodeComponent({
|
|
|
240
238
|
return () => cancelAnimationFrame(rafId);
|
|
241
239
|
}, [id, updateNodeInternals, handlesKey]);
|
|
242
240
|
const isHighlighted = highlightedNodeIds.length === 0 || highlightedNodeIds.includes(id);
|
|
243
|
-
const nodeExecuting =
|
|
241
|
+
const nodeExecuting = chunkDUZLPHRC_js.useExecutionStore((state) => state.activeNodeExecutions.has(id));
|
|
244
242
|
const handleRetry = react.useCallback(
|
|
245
243
|
(e) => {
|
|
246
244
|
e.stopPropagation();
|
|
247
245
|
if (!nodeExecuting) {
|
|
248
|
-
updateNodeData(id, { error: void 0, status:
|
|
246
|
+
updateNodeData(id, { error: void 0, status: types.NodeStatusEnum.PROCESSING });
|
|
249
247
|
executeNode(id);
|
|
250
248
|
}
|
|
251
249
|
},
|
|
@@ -259,7 +257,7 @@ function BaseNodeComponent({
|
|
|
259
257
|
} else if (nodeExecuting) {
|
|
260
258
|
stopNodeExecution(id);
|
|
261
259
|
} else {
|
|
262
|
-
updateNodeData(id, { status:
|
|
260
|
+
updateNodeData(id, { status: types.NodeStatusEnum.IDLE, error: void 0 });
|
|
263
261
|
}
|
|
264
262
|
},
|
|
265
263
|
[id, isRunning, nodeExecuting, stopExecution, stopNodeExecution, updateNodeData]
|
|
@@ -948,9 +946,9 @@ function ImageGenNodeComponent(props) {
|
|
|
948
946
|
const { id, type, data } = props;
|
|
949
947
|
const nodeData = data;
|
|
950
948
|
const { ModelBrowserModal } = chunkRJ262NXS_js.useWorkflowUIConfig();
|
|
951
|
-
const openNodeDetailModal =
|
|
952
|
-
const { handleGenerate, handleStop } =
|
|
953
|
-
const { canGenerate } =
|
|
949
|
+
const openNodeDetailModal = chunkDUZLPHRC_js.useUIStore((state) => state.openNodeDetailModal);
|
|
950
|
+
const { handleGenerate, handleStop } = chunkDICI5FSP_js.useNodeExecution(id);
|
|
951
|
+
const { canGenerate } = chunkDICI5FSP_js.useCanGenerate({
|
|
954
952
|
nodeId: id,
|
|
955
953
|
nodeType: type,
|
|
956
954
|
inputSchema: nodeData.selectedModel?.inputSchema,
|
|
@@ -978,12 +976,12 @@ function ImageGenNodeComponent(props) {
|
|
|
978
976
|
setTimeout(() => handleDownload(index), index * 100);
|
|
979
977
|
});
|
|
980
978
|
}, [nodeData.outputImages, handleDownload]);
|
|
981
|
-
const { handleModelSelect } =
|
|
979
|
+
const { handleModelSelect } = chunkDICI5FSP_js.useModelSelection({
|
|
982
980
|
nodeId: id,
|
|
983
981
|
modelMap: chunk3YFFDHC5_js.IMAGE_MODEL_MAP,
|
|
984
982
|
fallbackModel: chunk3YFFDHC5_js.DEFAULT_IMAGE_MODEL
|
|
985
983
|
});
|
|
986
|
-
|
|
984
|
+
chunkDICI5FSP_js.useAutoLoadModelSchema({
|
|
987
985
|
currentModel: nodeData.model,
|
|
988
986
|
selectedModel: nodeData.selectedModel,
|
|
989
987
|
modelIdMap: chunk3YFFDHC5_js.IMAGE_MODEL_ID_MAP,
|
|
@@ -995,7 +993,7 @@ function ImageGenNodeComponent(props) {
|
|
|
995
993
|
modelSupportsImageInput,
|
|
996
994
|
handleSchemaParamChange,
|
|
997
995
|
componentSchemas
|
|
998
|
-
} =
|
|
996
|
+
} = chunkDICI5FSP_js.useAIGenNode({
|
|
999
997
|
nodeId: id,
|
|
1000
998
|
selectedModel: nodeData.selectedModel,
|
|
1001
999
|
schemaParams: nodeData.schemaParams
|
|
@@ -1009,7 +1007,7 @@ function ImageGenNodeComponent(props) {
|
|
|
1009
1007
|
);
|
|
1010
1008
|
const isProcessing = nodeData.status === "processing";
|
|
1011
1009
|
const handleModelBrowse = react.useCallback(() => setIsModelBrowserOpen(true), []);
|
|
1012
|
-
const { titleElement, headerActions } =
|
|
1010
|
+
const { titleElement, headerActions } = chunkDICI5FSP_js.useAIGenNodeHeader({
|
|
1013
1011
|
modelDisplayName,
|
|
1014
1012
|
isProcessing,
|
|
1015
1013
|
canGenerate,
|
|
@@ -1155,10 +1153,10 @@ var ImageGenNode = react.memo(ImageGenNodeComponent);
|
|
|
1155
1153
|
function LipSyncNodeComponent(props) {
|
|
1156
1154
|
const { id, type, data } = props;
|
|
1157
1155
|
const nodeData = data;
|
|
1158
|
-
const updateNodeData =
|
|
1159
|
-
const openNodeDetailModal =
|
|
1160
|
-
const { handleGenerate } =
|
|
1161
|
-
const { canGenerate } =
|
|
1156
|
+
const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
|
|
1157
|
+
const openNodeDetailModal = chunkDUZLPHRC_js.useUIStore((state) => state.openNodeDetailModal);
|
|
1158
|
+
const { handleGenerate } = chunkDICI5FSP_js.useNodeExecution(id);
|
|
1159
|
+
const { canGenerate } = chunkDICI5FSP_js.useCanGenerate({
|
|
1162
1160
|
nodeId: id,
|
|
1163
1161
|
nodeType: type
|
|
1164
1162
|
});
|
|
@@ -1294,10 +1292,10 @@ function LLMNodeComponent(props) {
|
|
|
1294
1292
|
const { id, type, data } = props;
|
|
1295
1293
|
const nodeData = data;
|
|
1296
1294
|
const { ModelBrowserModal } = chunkRJ262NXS_js.useWorkflowUIConfig();
|
|
1297
|
-
const updateNodeData =
|
|
1298
|
-
const openNodeDetailModal =
|
|
1299
|
-
const { handleGenerate, handleStop } =
|
|
1300
|
-
const { canGenerate: hasRequiredConnections } =
|
|
1295
|
+
const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
|
|
1296
|
+
const openNodeDetailModal = chunkDUZLPHRC_js.useUIStore((state) => state.openNodeDetailModal);
|
|
1297
|
+
const { handleGenerate, handleStop } = chunkDICI5FSP_js.useNodeExecution(id);
|
|
1298
|
+
const { canGenerate: hasRequiredConnections } = chunkDICI5FSP_js.useCanGenerate({
|
|
1301
1299
|
nodeId: id,
|
|
1302
1300
|
nodeType: type
|
|
1303
1301
|
});
|
|
@@ -1305,12 +1303,12 @@ function LLMNodeComponent(props) {
|
|
|
1305
1303
|
const hasInputPrompt = !!nodeData.inputPrompt?.trim();
|
|
1306
1304
|
const canGenerate = hasRequiredConnections && hasSystemPrompt && hasInputPrompt;
|
|
1307
1305
|
const [isModelBrowserOpen, setIsModelBrowserOpen] = react.useState(false);
|
|
1308
|
-
const { handleModelSelect } =
|
|
1306
|
+
const { handleModelSelect } = chunkDICI5FSP_js.useModelSelection({
|
|
1309
1307
|
nodeId: id,
|
|
1310
1308
|
modelMap: chunk3YFFDHC5_js.LLM_MODEL_MAP,
|
|
1311
1309
|
fallbackModel: chunk3YFFDHC5_js.DEFAULT_LLM_MODEL
|
|
1312
1310
|
});
|
|
1313
|
-
|
|
1311
|
+
chunkDICI5FSP_js.useAutoLoadModelSchema({
|
|
1314
1312
|
currentModel: nodeData.model,
|
|
1315
1313
|
selectedModel: nodeData.selectedModel,
|
|
1316
1314
|
modelIdMap: chunk3YFFDHC5_js.LLM_MODEL_ID_MAP,
|
|
@@ -1343,7 +1341,7 @@ function LLMNodeComponent(props) {
|
|
|
1343
1341
|
);
|
|
1344
1342
|
const isProcessing = nodeData.status === "processing";
|
|
1345
1343
|
const handleModelBrowse = react.useCallback(() => setIsModelBrowserOpen(true), []);
|
|
1346
|
-
const { titleElement, headerActions } =
|
|
1344
|
+
const { titleElement, headerActions } = chunkDICI5FSP_js.useAIGenNodeHeader({
|
|
1347
1345
|
modelDisplayName,
|
|
1348
1346
|
isProcessing,
|
|
1349
1347
|
canGenerate,
|
|
@@ -1499,10 +1497,10 @@ var DURATIONS = [
|
|
|
1499
1497
|
function MotionControlNodeComponent(props) {
|
|
1500
1498
|
const { id, type, data } = props;
|
|
1501
1499
|
const nodeData = data;
|
|
1502
|
-
const updateNodeData =
|
|
1503
|
-
const openNodeDetailModal =
|
|
1504
|
-
const { handleGenerate, handleStop } =
|
|
1505
|
-
const { canGenerate } =
|
|
1500
|
+
const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
|
|
1501
|
+
const openNodeDetailModal = chunkDUZLPHRC_js.useUIStore((state) => state.openNodeDetailModal);
|
|
1502
|
+
const { handleGenerate, handleStop } = chunkDICI5FSP_js.useNodeExecution(id);
|
|
1503
|
+
const { canGenerate } = chunkDICI5FSP_js.useCanGenerate({
|
|
1506
1504
|
nodeId: id,
|
|
1507
1505
|
nodeType: type
|
|
1508
1506
|
});
|
|
@@ -1736,9 +1734,9 @@ var VOICES = [
|
|
|
1736
1734
|
function TextToSpeechNodeComponent(props) {
|
|
1737
1735
|
const { id, type, data } = props;
|
|
1738
1736
|
const nodeData = data;
|
|
1739
|
-
const updateNodeData =
|
|
1740
|
-
const { handleGenerate } =
|
|
1741
|
-
const { canGenerate } =
|
|
1737
|
+
const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
|
|
1738
|
+
const { handleGenerate } = chunkDICI5FSP_js.useNodeExecution(id);
|
|
1739
|
+
const { canGenerate } = chunkDICI5FSP_js.useCanGenerate({
|
|
1742
1740
|
nodeId: id,
|
|
1743
1741
|
nodeType: type
|
|
1744
1742
|
});
|
|
@@ -1904,9 +1902,6 @@ function TextToSpeechNodeComponent(props) {
|
|
|
1904
1902
|
] }) });
|
|
1905
1903
|
}
|
|
1906
1904
|
var TextToSpeechNode = react.memo(TextToSpeechNodeComponent);
|
|
1907
|
-
|
|
1908
|
-
// src/nodes/ai/TranscribeNode.tsx
|
|
1909
|
-
var import_types2 = chunkZ7PWFZG5_js.__toESM(chunkNSDLGLAQ_js.require_dist());
|
|
1910
1905
|
var LANGUAGES = [
|
|
1911
1906
|
{ value: "auto", label: "Auto-detect" },
|
|
1912
1907
|
{ value: "en", label: "English" },
|
|
@@ -1921,10 +1916,10 @@ var LANGUAGES = [
|
|
|
1921
1916
|
function TranscribeNodeComponent(props) {
|
|
1922
1917
|
const { id, type, data } = props;
|
|
1923
1918
|
const nodeData = data;
|
|
1924
|
-
const updateNodeData =
|
|
1925
|
-
const executeNode =
|
|
1926
|
-
const openNodeDetailModal =
|
|
1927
|
-
const { canGenerate } =
|
|
1919
|
+
const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
|
|
1920
|
+
const executeNode = chunkDUZLPHRC_js.useExecutionStore((state) => state.executeNode);
|
|
1921
|
+
const openNodeDetailModal = chunkDUZLPHRC_js.useUIStore((state) => state.openNodeDetailModal);
|
|
1922
|
+
const { canGenerate } = chunkDICI5FSP_js.useCanGenerate({
|
|
1928
1923
|
nodeId: id,
|
|
1929
1924
|
nodeType: type
|
|
1930
1925
|
});
|
|
@@ -1943,7 +1938,7 @@ function TranscribeNodeComponent(props) {
|
|
|
1943
1938
|
[id, updateNodeData]
|
|
1944
1939
|
);
|
|
1945
1940
|
const handleTranscribe = react.useCallback(() => {
|
|
1946
|
-
updateNodeData(id, { status:
|
|
1941
|
+
updateNodeData(id, { status: types.NodeStatusEnum.PROCESSING });
|
|
1947
1942
|
executeNode(id);
|
|
1948
1943
|
}, [id, executeNode, updateNodeData]);
|
|
1949
1944
|
const handleExpand = react.useCallback(() => {
|
|
@@ -2019,21 +2014,21 @@ function VideoGenNodeComponent(props) {
|
|
|
2019
2014
|
const { id, type, data } = props;
|
|
2020
2015
|
const nodeData = data;
|
|
2021
2016
|
const { ModelBrowserModal } = chunkRJ262NXS_js.useWorkflowUIConfig();
|
|
2022
|
-
const openNodeDetailModal =
|
|
2023
|
-
const { handleGenerate, handleStop } =
|
|
2024
|
-
const { canGenerate } =
|
|
2017
|
+
const openNodeDetailModal = chunkDUZLPHRC_js.useUIStore((state) => state.openNodeDetailModal);
|
|
2018
|
+
const { handleGenerate, handleStop } = chunkDICI5FSP_js.useNodeExecution(id);
|
|
2019
|
+
const { canGenerate } = chunkDICI5FSP_js.useCanGenerate({
|
|
2025
2020
|
nodeId: id,
|
|
2026
2021
|
nodeType: type,
|
|
2027
2022
|
inputSchema: nodeData.selectedModel?.inputSchema,
|
|
2028
2023
|
schemaParams: nodeData.schemaParams
|
|
2029
2024
|
});
|
|
2030
2025
|
const [isModelBrowserOpen, setIsModelBrowserOpen] = react.useState(false);
|
|
2031
|
-
const { handleModelSelect } =
|
|
2026
|
+
const { handleModelSelect } = chunkDICI5FSP_js.useModelSelection({
|
|
2032
2027
|
nodeId: id,
|
|
2033
2028
|
modelMap: chunk3YFFDHC5_js.VIDEO_MODEL_MAP,
|
|
2034
2029
|
fallbackModel: chunk3YFFDHC5_js.DEFAULT_VIDEO_MODEL
|
|
2035
2030
|
});
|
|
2036
|
-
|
|
2031
|
+
chunkDICI5FSP_js.useAutoLoadModelSchema({
|
|
2037
2032
|
currentModel: nodeData.model,
|
|
2038
2033
|
selectedModel: nodeData.selectedModel,
|
|
2039
2034
|
modelIdMap: chunk3YFFDHC5_js.VIDEO_MODEL_ID_MAP,
|
|
@@ -2045,7 +2040,7 @@ function VideoGenNodeComponent(props) {
|
|
|
2045
2040
|
modelSupportsImageInput,
|
|
2046
2041
|
handleSchemaParamChange,
|
|
2047
2042
|
componentSchemas
|
|
2048
|
-
} =
|
|
2043
|
+
} = chunkDICI5FSP_js.useAIGenNode({
|
|
2049
2044
|
nodeId: id,
|
|
2050
2045
|
selectedModel: nodeData.selectedModel,
|
|
2051
2046
|
schemaParams: nodeData.schemaParams
|
|
@@ -2059,7 +2054,7 @@ function VideoGenNodeComponent(props) {
|
|
|
2059
2054
|
);
|
|
2060
2055
|
const isProcessing = nodeData.status === "processing";
|
|
2061
2056
|
const handleModelBrowse = react.useCallback(() => setIsModelBrowserOpen(true), []);
|
|
2062
|
-
const { titleElement, headerActions } =
|
|
2057
|
+
const { titleElement, headerActions } = chunkDICI5FSP_js.useAIGenNodeHeader({
|
|
2063
2058
|
modelDisplayName,
|
|
2064
2059
|
isProcessing,
|
|
2065
2060
|
canGenerate,
|
|
@@ -2132,16 +2127,13 @@ function VideoGenNodeComponent(props) {
|
|
|
2132
2127
|
);
|
|
2133
2128
|
}
|
|
2134
2129
|
var VideoGenNode = react.memo(VideoGenNodeComponent);
|
|
2135
|
-
|
|
2136
|
-
// src/nodes/ai/VoiceChangeNode.tsx
|
|
2137
|
-
var import_types3 = chunkZ7PWFZG5_js.__toESM(chunkNSDLGLAQ_js.require_dist());
|
|
2138
2130
|
function VoiceChangeNodeComponent(props) {
|
|
2139
2131
|
const { id, type, data } = props;
|
|
2140
2132
|
const nodeData = data;
|
|
2141
|
-
const updateNodeData =
|
|
2142
|
-
const executeNode =
|
|
2143
|
-
const openNodeDetailModal =
|
|
2144
|
-
const { canGenerate } =
|
|
2133
|
+
const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
|
|
2134
|
+
const executeNode = chunkDUZLPHRC_js.useExecutionStore((state) => state.executeNode);
|
|
2135
|
+
const openNodeDetailModal = chunkDUZLPHRC_js.useUIStore((state) => state.openNodeDetailModal);
|
|
2136
|
+
const { canGenerate } = chunkDICI5FSP_js.useCanGenerate({
|
|
2145
2137
|
nodeId: id,
|
|
2146
2138
|
nodeType: type
|
|
2147
2139
|
});
|
|
@@ -2160,7 +2152,7 @@ function VoiceChangeNodeComponent(props) {
|
|
|
2160
2152
|
[id, updateNodeData]
|
|
2161
2153
|
);
|
|
2162
2154
|
const handleProcess = react.useCallback(() => {
|
|
2163
|
-
updateNodeData(id, { status:
|
|
2155
|
+
updateNodeData(id, { status: types.NodeStatusEnum.PROCESSING });
|
|
2164
2156
|
executeNode(id);
|
|
2165
2157
|
}, [id, executeNode, updateNodeData]);
|
|
2166
2158
|
const handleExpand = react.useCallback(() => {
|
|
@@ -2263,7 +2255,7 @@ var INPUT_TYPES = [
|
|
|
2263
2255
|
function WorkflowInputNodeComponent(props) {
|
|
2264
2256
|
const { id, data } = props;
|
|
2265
2257
|
const nodeData = data;
|
|
2266
|
-
const updateNodeData =
|
|
2258
|
+
const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
|
|
2267
2259
|
const handleNameChange = react.useCallback(
|
|
2268
2260
|
(e) => {
|
|
2269
2261
|
updateNodeData(id, {
|
|
@@ -2363,7 +2355,7 @@ var OUTPUT_TYPES = [
|
|
|
2363
2355
|
function WorkflowOutputNodeComponent(props) {
|
|
2364
2356
|
const { id, data } = props;
|
|
2365
2357
|
const nodeData = data;
|
|
2366
|
-
const updateNodeData =
|
|
2358
|
+
const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
|
|
2367
2359
|
const videoRef = react.useRef(null);
|
|
2368
2360
|
const [isPlaying, setIsPlaying] = react.useState(false);
|
|
2369
2361
|
const handleNameChange = react.useCallback(
|
|
@@ -2504,7 +2496,7 @@ function setWorkflowRefApi(api) {
|
|
|
2504
2496
|
function WorkflowRefNodeComponent(props) {
|
|
2505
2497
|
const { id, data, selected } = props;
|
|
2506
2498
|
const nodeData = data;
|
|
2507
|
-
const { updateNodeData, workflowId: currentWorkflowId } =
|
|
2499
|
+
const { updateNodeData, workflowId: currentWorkflowId } = chunkIHF35QZD_js.useWorkflowStore();
|
|
2508
2500
|
const [workflows, setWorkflows] = react.useState([]);
|
|
2509
2501
|
const [isLoading, setIsLoading] = react.useState(false);
|
|
2510
2502
|
const [error, setError] = react.useState(null);
|
|
@@ -2760,8 +2752,8 @@ var WorkflowRefNode = react.memo(WorkflowRefNodeComponent);
|
|
|
2760
2752
|
function AudioInputNodeComponent(props) {
|
|
2761
2753
|
const { id, data } = props;
|
|
2762
2754
|
const nodeData = data;
|
|
2763
|
-
const updateNodeData =
|
|
2764
|
-
const openNodeDetailModal =
|
|
2755
|
+
const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
|
|
2756
|
+
const openNodeDetailModal = chunkDUZLPHRC_js.useUIStore((state) => state.openNodeDetailModal);
|
|
2765
2757
|
const fileInputRef = react.useRef(null);
|
|
2766
2758
|
const [showUrlInput, setShowUrlInput] = react.useState(false);
|
|
2767
2759
|
const [urlValue, setUrlValue] = react.useState(nodeData.url || "");
|
|
@@ -2937,7 +2929,7 @@ var AudioInputNode = react.memo(AudioInputNodeComponent);
|
|
|
2937
2929
|
function ImageInputNodeComponent(props) {
|
|
2938
2930
|
const { id, data } = props;
|
|
2939
2931
|
const nodeData = data;
|
|
2940
|
-
const openNodeDetailModal =
|
|
2932
|
+
const openNodeDetailModal = chunkDUZLPHRC_js.useUIStore((state) => state.openNodeDetailModal);
|
|
2941
2933
|
const {
|
|
2942
2934
|
fileInputRef,
|
|
2943
2935
|
showUrlInput,
|
|
@@ -2949,7 +2941,7 @@ function ImageInputNodeComponent(props) {
|
|
|
2949
2941
|
handleRemove,
|
|
2950
2942
|
handleUrlSubmit,
|
|
2951
2943
|
handleUrlKeyDown
|
|
2952
|
-
} =
|
|
2944
|
+
} = chunkDICI5FSP_js.useMediaUpload({
|
|
2953
2945
|
nodeId: id,
|
|
2954
2946
|
mediaType: "image",
|
|
2955
2947
|
initialUrl: nodeData.url || "",
|
|
@@ -3089,9 +3081,9 @@ var ImageInputNode = react.memo(ImageInputNodeComponent);
|
|
|
3089
3081
|
function PromptConstructorNodeComponent(props) {
|
|
3090
3082
|
const { id, data } = props;
|
|
3091
3083
|
const nodeData = data;
|
|
3092
|
-
const updateNodeData =
|
|
3093
|
-
const edges =
|
|
3094
|
-
const nodes =
|
|
3084
|
+
const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
|
|
3085
|
+
const edges = chunkIHF35QZD_js.useWorkflowStore((state) => state.edges);
|
|
3086
|
+
const nodes = chunkIHF35QZD_js.useWorkflowStore((state) => state.nodes);
|
|
3095
3087
|
const [localTemplate, setLocalTemplate] = react.useState(nodeData.template);
|
|
3096
3088
|
const [isEditing, setIsEditing] = react.useState(false);
|
|
3097
3089
|
const textareaRef = react.useRef(null);
|
|
@@ -3125,7 +3117,7 @@ function PromptConstructorNodeComponent(props) {
|
|
|
3125
3117
|
handleKeyDown,
|
|
3126
3118
|
handleAutocompleteSelect,
|
|
3127
3119
|
closeAutocomplete
|
|
3128
|
-
} =
|
|
3120
|
+
} = chunkDICI5FSP_js.usePromptAutocomplete({
|
|
3129
3121
|
availableVariables,
|
|
3130
3122
|
textareaRef,
|
|
3131
3123
|
localTemplate,
|
|
@@ -3234,7 +3226,7 @@ function PromptNodeComponent(props) {
|
|
|
3234
3226
|
const { id, data } = props;
|
|
3235
3227
|
const nodeData = data;
|
|
3236
3228
|
const { PromptPicker } = chunkRJ262NXS_js.useWorkflowUIConfig();
|
|
3237
|
-
const updateNodeData =
|
|
3229
|
+
const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
|
|
3238
3230
|
const { openCreateModal } = chunkRXNEDWK2_js.usePromptLibraryStore();
|
|
3239
3231
|
const { openEditor } = chunk6DOEUDD5_js.usePromptEditorStore();
|
|
3240
3232
|
const handlePromptChange = react.useCallback(
|
|
@@ -3299,7 +3291,7 @@ var PromptNode = react.memo(PromptNodeComponent);
|
|
|
3299
3291
|
function VideoInputNodeComponent(props) {
|
|
3300
3292
|
const { id, data } = props;
|
|
3301
3293
|
const nodeData = data;
|
|
3302
|
-
const openNodeDetailModal =
|
|
3294
|
+
const openNodeDetailModal = chunkDUZLPHRC_js.useUIStore((state) => state.openNodeDetailModal);
|
|
3303
3295
|
const {
|
|
3304
3296
|
fileInputRef,
|
|
3305
3297
|
showUrlInput,
|
|
@@ -3311,7 +3303,7 @@ function VideoInputNodeComponent(props) {
|
|
|
3311
3303
|
handleRemove,
|
|
3312
3304
|
handleUrlSubmit,
|
|
3313
3305
|
handleUrlKeyDown
|
|
3314
|
-
} =
|
|
3306
|
+
} = chunkDICI5FSP_js.useMediaUpload({
|
|
3315
3307
|
nodeId: id,
|
|
3316
3308
|
mediaType: "video",
|
|
3317
3309
|
initialUrl: nodeData.url || "",
|
|
@@ -3489,9 +3481,9 @@ function getExtensionFromUrl(url, inputType) {
|
|
|
3489
3481
|
function DownloadNodeComponent(props) {
|
|
3490
3482
|
const { id, data } = props;
|
|
3491
3483
|
const nodeData = data;
|
|
3492
|
-
const updateNodeData =
|
|
3493
|
-
const edges =
|
|
3494
|
-
const isRunning =
|
|
3484
|
+
const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
|
|
3485
|
+
const edges = chunkIHF35QZD_js.useWorkflowStore((state) => state.edges);
|
|
3486
|
+
const isRunning = chunkDUZLPHRC_js.useExecutionStore((state) => state.isRunning);
|
|
3495
3487
|
const [isDownloading, setIsDownloading] = react.useState(false);
|
|
3496
3488
|
const isConnected = edges.some((edge) => edge.target === id);
|
|
3497
3489
|
const activeMedia = nodeData.inputVideo || nodeData.inputImage;
|
|
@@ -3590,9 +3582,6 @@ function DownloadNodeComponent(props) {
|
|
|
3590
3582
|
}
|
|
3591
3583
|
var DownloadNode = react.memo(DownloadNodeComponent);
|
|
3592
3584
|
var OutputNode = DownloadNode;
|
|
3593
|
-
|
|
3594
|
-
// src/nodes/processing/AnimationNode.tsx
|
|
3595
|
-
var import_types4 = chunkZ7PWFZG5_js.__toESM(chunkNSDLGLAQ_js.require_dist());
|
|
3596
3585
|
var PRESET_OPTIONS = [
|
|
3597
3586
|
{ value: "linear", label: "Linear" },
|
|
3598
3587
|
{ value: "easeIn", label: "Ease In" },
|
|
@@ -3611,10 +3600,10 @@ var PRESET_OPTIONS = [
|
|
|
3611
3600
|
function AnimationNodeComponent(props) {
|
|
3612
3601
|
const { id, type, data } = props;
|
|
3613
3602
|
const nodeData = data;
|
|
3614
|
-
const updateNodeData =
|
|
3615
|
-
const executeNode =
|
|
3616
|
-
const openNodeDetailModal =
|
|
3617
|
-
const { hasRequiredInputs } =
|
|
3603
|
+
const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
|
|
3604
|
+
const executeNode = chunkDUZLPHRC_js.useExecutionStore((state) => state.executeNode);
|
|
3605
|
+
const openNodeDetailModal = chunkDUZLPHRC_js.useUIStore((state) => state.openNodeDetailModal);
|
|
3606
|
+
const { hasRequiredInputs } = chunkDICI5FSP_js.useRequiredInputs(id, type);
|
|
3618
3607
|
const handleCurveTypeChange = react.useCallback(
|
|
3619
3608
|
(type2) => {
|
|
3620
3609
|
updateNodeData(id, { curveType: type2 });
|
|
@@ -3640,7 +3629,7 @@ function AnimationNodeComponent(props) {
|
|
|
3640
3629
|
[id, updateNodeData]
|
|
3641
3630
|
);
|
|
3642
3631
|
const handleProcess = react.useCallback(() => {
|
|
3643
|
-
updateNodeData(id, { status:
|
|
3632
|
+
updateNodeData(id, { status: types.NodeStatusEnum.PROCESSING });
|
|
3644
3633
|
executeNode(id);
|
|
3645
3634
|
}, [id, executeNode, updateNodeData]);
|
|
3646
3635
|
const handleExpand = react.useCallback(() => {
|
|
@@ -3759,8 +3748,8 @@ function AnnotationNodeComponent(props) {
|
|
|
3759
3748
|
const { id, data } = props;
|
|
3760
3749
|
const nodeData = data;
|
|
3761
3750
|
const openAnnotation = chunk6DOEUDD5_js.useAnnotationStore((state) => state.openAnnotation);
|
|
3762
|
-
const openNodeDetailModal =
|
|
3763
|
-
const getConnectedInputs =
|
|
3751
|
+
const openNodeDetailModal = chunkDUZLPHRC_js.useUIStore((state) => state.openNodeDetailModal);
|
|
3752
|
+
const getConnectedInputs = chunkIHF35QZD_js.useWorkflowStore((state) => state.getConnectedInputs);
|
|
3764
3753
|
const connectedInputs = getConnectedInputs(id);
|
|
3765
3754
|
const inputImage = connectedInputs.get("image") ?? nodeData.inputImage;
|
|
3766
3755
|
const handleEditAnnotations = react.useCallback(() => {
|
|
@@ -3827,8 +3816,8 @@ var AnnotationNode = react.memo(AnnotationNodeComponent);
|
|
|
3827
3816
|
function ImageCompareNodeComponent(props) {
|
|
3828
3817
|
const { id, data } = props;
|
|
3829
3818
|
const nodeData = data;
|
|
3830
|
-
const edges =
|
|
3831
|
-
const nodes =
|
|
3819
|
+
const edges = chunkIHF35QZD_js.useWorkflowStore((state) => state.edges);
|
|
3820
|
+
const nodes = chunkIHF35QZD_js.useWorkflowStore((state) => state.nodes);
|
|
3832
3821
|
const displayImages = react.useMemo(() => {
|
|
3833
3822
|
const connectedImages = [];
|
|
3834
3823
|
const sortedEdges = edges.filter((edge) => edge.target === id).sort((a, b) => {
|
|
@@ -3889,9 +3878,6 @@ function ImageCompareNodeComponent(props) {
|
|
|
3889
3878
|
] }) });
|
|
3890
3879
|
}
|
|
3891
3880
|
var ImageCompareNode = react.memo(ImageCompareNodeComponent);
|
|
3892
|
-
|
|
3893
|
-
// src/nodes/processing/ImageGridSplitNode.tsx
|
|
3894
|
-
var import_types5 = chunkZ7PWFZG5_js.__toESM(chunkNSDLGLAQ_js.require_dist());
|
|
3895
3881
|
var OUTPUT_FORMATS = [
|
|
3896
3882
|
{ value: "jpg", label: "JPEG" },
|
|
3897
3883
|
{ value: "png", label: "PNG" },
|
|
@@ -3900,8 +3886,8 @@ var OUTPUT_FORMATS = [
|
|
|
3900
3886
|
function ImageGridSplitNodeComponent(props) {
|
|
3901
3887
|
const { id, data } = props;
|
|
3902
3888
|
const nodeData = data;
|
|
3903
|
-
const updateNodeData =
|
|
3904
|
-
const executeNode =
|
|
3889
|
+
const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
|
|
3890
|
+
const executeNode = chunkDUZLPHRC_js.useExecutionStore((state) => state.executeNode);
|
|
3905
3891
|
const [selectedPreview, setSelectedPreview] = react.useState(null);
|
|
3906
3892
|
const handleRowsChange = react.useCallback(
|
|
3907
3893
|
(e) => {
|
|
@@ -3942,7 +3928,7 @@ function ImageGridSplitNodeComponent(props) {
|
|
|
3942
3928
|
[id, updateNodeData]
|
|
3943
3929
|
);
|
|
3944
3930
|
const handleProcess = react.useCallback(() => {
|
|
3945
|
-
updateNodeData(id, { status:
|
|
3931
|
+
updateNodeData(id, { status: types.NodeStatusEnum.PROCESSING });
|
|
3946
3932
|
executeNode(id);
|
|
3947
3933
|
}, [id, executeNode, updateNodeData]);
|
|
3948
3934
|
const handleDownload = react.useCallback(
|
|
@@ -4169,7 +4155,7 @@ var ImageGridSplitNode = react.memo(ImageGridSplitNodeComponent);
|
|
|
4169
4155
|
function OutputGalleryNodeComponent(props) {
|
|
4170
4156
|
const { id, data } = props;
|
|
4171
4157
|
const nodeData = data;
|
|
4172
|
-
const { edges, nodes } =
|
|
4158
|
+
const { edges, nodes } = chunkIHF35QZD_js.useWorkflowStore(
|
|
4173
4159
|
shallow.useShallow((state) => ({ edges: state.edges, nodes: state.nodes }))
|
|
4174
4160
|
);
|
|
4175
4161
|
const [lightboxIndex, setLightboxIndex] = react.useState(null);
|
|
@@ -4357,9 +4343,6 @@ function OutputGalleryNodeComponent(props) {
|
|
|
4357
4343
|
] });
|
|
4358
4344
|
}
|
|
4359
4345
|
var OutputGalleryNode = react.memo(OutputGalleryNodeComponent);
|
|
4360
|
-
|
|
4361
|
-
// src/nodes/processing/ReframeNode.tsx
|
|
4362
|
-
var import_types6 = chunkZ7PWFZG5_js.__toESM(chunkNSDLGLAQ_js.require_dist());
|
|
4363
4346
|
var MODELS = [
|
|
4364
4347
|
{ value: "photon-flash-1", label: "Photon Flash", price: "$0.01" },
|
|
4365
4348
|
{ value: "photon-1", label: "Photon", price: "$0.03" }
|
|
@@ -4376,8 +4359,8 @@ var ASPECT_RATIOS2 = [
|
|
|
4376
4359
|
function ReframeNodeComponent(props) {
|
|
4377
4360
|
const { id, data } = props;
|
|
4378
4361
|
const nodeData = data;
|
|
4379
|
-
const updateNodeData =
|
|
4380
|
-
const executeNode =
|
|
4362
|
+
const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
|
|
4363
|
+
const executeNode = chunkDUZLPHRC_js.useExecutionStore((state) => state.executeNode);
|
|
4381
4364
|
const videoRef = react.useRef(null);
|
|
4382
4365
|
const [isPlaying, setIsPlaying] = react.useState(false);
|
|
4383
4366
|
const inputType = nodeData.inputType ?? (nodeData.inputImage ? "image" : nodeData.inputVideo ? "video" : null);
|
|
@@ -4412,7 +4395,7 @@ function ReframeNodeComponent(props) {
|
|
|
4412
4395
|
[id, updateNodeData]
|
|
4413
4396
|
);
|
|
4414
4397
|
const handleProcess = react.useCallback(() => {
|
|
4415
|
-
updateNodeData(id, { status:
|
|
4398
|
+
updateNodeData(id, { status: types.NodeStatusEnum.PROCESSING });
|
|
4416
4399
|
executeNode(id);
|
|
4417
4400
|
}, [id, executeNode, updateNodeData]);
|
|
4418
4401
|
const togglePlayback = react.useCallback(() => {
|
|
@@ -4535,9 +4518,6 @@ function ReframeNodeComponent(props) {
|
|
|
4535
4518
|
] }) });
|
|
4536
4519
|
}
|
|
4537
4520
|
var ReframeNode = react.memo(ReframeNodeComponent);
|
|
4538
|
-
|
|
4539
|
-
// src/nodes/processing/ResizeNode.tsx
|
|
4540
|
-
var import_types7 = chunkZ7PWFZG5_js.__toESM(chunkNSDLGLAQ_js.require_dist());
|
|
4541
4521
|
var MODELS2 = {
|
|
4542
4522
|
image: { id: "photon-flash-1", label: "Luma Photon Flash", price: "$0.01" },
|
|
4543
4523
|
video: { id: "luma-reframe", label: "Luma Reframe", price: "$0.05" }
|
|
@@ -4545,8 +4525,8 @@ var MODELS2 = {
|
|
|
4545
4525
|
function ResizeNodeComponent(props) {
|
|
4546
4526
|
const { id, data } = props;
|
|
4547
4527
|
const nodeData = data;
|
|
4548
|
-
const updateNodeData =
|
|
4549
|
-
const executeNode =
|
|
4528
|
+
const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
|
|
4529
|
+
const executeNode = chunkDUZLPHRC_js.useExecutionStore((state) => state.executeNode);
|
|
4550
4530
|
const mediaType = nodeData.inputType ?? "image";
|
|
4551
4531
|
const currentModel = MODELS2[mediaType];
|
|
4552
4532
|
const handleTypeChange = react.useCallback(
|
|
@@ -4578,7 +4558,7 @@ function ResizeNodeComponent(props) {
|
|
|
4578
4558
|
[id, updateNodeData]
|
|
4579
4559
|
);
|
|
4580
4560
|
const handleProcess = react.useCallback(() => {
|
|
4581
|
-
updateNodeData(id, { status:
|
|
4561
|
+
updateNodeData(id, { status: types.NodeStatusEnum.PROCESSING });
|
|
4582
4562
|
executeNode(id);
|
|
4583
4563
|
}, [id, executeNode, updateNodeData]);
|
|
4584
4564
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseNode, { ...props, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
@@ -4672,9 +4652,6 @@ function ResizeNodeComponent(props) {
|
|
|
4672
4652
|
] }) });
|
|
4673
4653
|
}
|
|
4674
4654
|
var ResizeNode = react.memo(ResizeNodeComponent);
|
|
4675
|
-
|
|
4676
|
-
// src/nodes/processing/SubtitleNode.tsx
|
|
4677
|
-
var import_types8 = chunkZ7PWFZG5_js.__toESM(chunkNSDLGLAQ_js.require_dist());
|
|
4678
4655
|
var STYLE_OPTIONS = [
|
|
4679
4656
|
{ value: "modern", label: "Modern" },
|
|
4680
4657
|
{ value: "default", label: "Default" },
|
|
@@ -4689,8 +4666,8 @@ var POSITION_OPTIONS = [
|
|
|
4689
4666
|
function SubtitleNodeComponent(props) {
|
|
4690
4667
|
const { id, data } = props;
|
|
4691
4668
|
const nodeData = data;
|
|
4692
|
-
const updateNodeData =
|
|
4693
|
-
const executeNode =
|
|
4669
|
+
const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
|
|
4670
|
+
const executeNode = chunkDUZLPHRC_js.useExecutionStore((state) => state.executeNode);
|
|
4694
4671
|
const handleStyleChange = react.useCallback(
|
|
4695
4672
|
(value) => {
|
|
4696
4673
|
updateNodeData(id, { style: value });
|
|
@@ -4716,7 +4693,7 @@ function SubtitleNodeComponent(props) {
|
|
|
4716
4693
|
[id, updateNodeData]
|
|
4717
4694
|
);
|
|
4718
4695
|
const handleProcess = react.useCallback(() => {
|
|
4719
|
-
updateNodeData(id, { status:
|
|
4696
|
+
updateNodeData(id, { status: types.NodeStatusEnum.PROCESSING });
|
|
4720
4697
|
executeNode(id);
|
|
4721
4698
|
}, [id, executeNode, updateNodeData]);
|
|
4722
4699
|
const hasRequiredInputs = nodeData.inputVideo && nodeData.inputText;
|
|
@@ -4797,9 +4774,6 @@ function SubtitleNodeComponent(props) {
|
|
|
4797
4774
|
] }) });
|
|
4798
4775
|
}
|
|
4799
4776
|
var SubtitleNode = react.memo(SubtitleNodeComponent);
|
|
4800
|
-
|
|
4801
|
-
// src/nodes/processing/UpscaleNode.tsx
|
|
4802
|
-
var import_types9 = chunkZ7PWFZG5_js.__toESM(chunkNSDLGLAQ_js.require_dist());
|
|
4803
4777
|
var IMAGE_MODELS2 = [
|
|
4804
4778
|
{ value: "topaz-standard-v2", label: "Standard V2" },
|
|
4805
4779
|
{ value: "topaz-low-res-v2", label: "Low Resolution V2" },
|
|
@@ -4830,9 +4804,9 @@ var FPS_OPTIONS = [
|
|
|
4830
4804
|
function UpscaleNodeComponent(props) {
|
|
4831
4805
|
const { id, data } = props;
|
|
4832
4806
|
const nodeData = data;
|
|
4833
|
-
const updateNodeData =
|
|
4834
|
-
const executeNode =
|
|
4835
|
-
const openNodeDetailModal =
|
|
4807
|
+
const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
|
|
4808
|
+
const executeNode = chunkDUZLPHRC_js.useExecutionStore((state) => state.executeNode);
|
|
4809
|
+
const openNodeDetailModal = chunkDUZLPHRC_js.useUIStore((state) => state.openNodeDetailModal);
|
|
4836
4810
|
const videoRef = react.useRef(null);
|
|
4837
4811
|
const [isPlaying, setIsPlaying] = react.useState(false);
|
|
4838
4812
|
const inputType = nodeData.inputType ?? (nodeData.inputImage ? "image" : nodeData.inputVideo ? "video" : null);
|
|
@@ -4908,7 +4882,7 @@ function UpscaleNodeComponent(props) {
|
|
|
4908
4882
|
[id, updateNodeData]
|
|
4909
4883
|
);
|
|
4910
4884
|
const handleProcess = react.useCallback(() => {
|
|
4911
|
-
updateNodeData(id, { status:
|
|
4885
|
+
updateNodeData(id, { status: types.NodeStatusEnum.PROCESSING });
|
|
4912
4886
|
executeNode(id);
|
|
4913
4887
|
}, [id, executeNode, updateNodeData]);
|
|
4914
4888
|
const handleExpand = react.useCallback(() => {
|
|
@@ -5170,9 +5144,6 @@ function UpscaleNodeComponent(props) {
|
|
|
5170
5144
|
] }) });
|
|
5171
5145
|
}
|
|
5172
5146
|
var UpscaleNode = react.memo(UpscaleNodeComponent);
|
|
5173
|
-
|
|
5174
|
-
// src/nodes/processing/VideoFrameExtractNode.tsx
|
|
5175
|
-
var import_types10 = chunkZ7PWFZG5_js.__toESM(chunkNSDLGLAQ_js.require_dist());
|
|
5176
5147
|
var SELECTION_MODES = [
|
|
5177
5148
|
{ value: "last", label: "Last Frame" },
|
|
5178
5149
|
{ value: "first", label: "First Frame" }
|
|
@@ -5185,8 +5156,8 @@ function formatTime(seconds) {
|
|
|
5185
5156
|
function VideoFrameExtractNodeComponent(props) {
|
|
5186
5157
|
const { id, data } = props;
|
|
5187
5158
|
const nodeData = data;
|
|
5188
|
-
const updateNodeData =
|
|
5189
|
-
const executeNode =
|
|
5159
|
+
const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
|
|
5160
|
+
const executeNode = chunkDUZLPHRC_js.useExecutionStore((state) => state.executeNode);
|
|
5190
5161
|
const handleModeChange = react.useCallback(
|
|
5191
5162
|
(value) => {
|
|
5192
5163
|
updateNodeData(id, { selectionMode: value });
|
|
@@ -5194,7 +5165,7 @@ function VideoFrameExtractNodeComponent(props) {
|
|
|
5194
5165
|
[id, updateNodeData]
|
|
5195
5166
|
);
|
|
5196
5167
|
const handleProcess = react.useCallback(() => {
|
|
5197
|
-
updateNodeData(id, { status:
|
|
5168
|
+
updateNodeData(id, { status: types.NodeStatusEnum.PROCESSING });
|
|
5198
5169
|
executeNode(id);
|
|
5199
5170
|
}, [id, executeNode, updateNodeData]);
|
|
5200
5171
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseNode, { ...props, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
@@ -5246,9 +5217,6 @@ function VideoFrameExtractNodeComponent(props) {
|
|
|
5246
5217
|
] }) });
|
|
5247
5218
|
}
|
|
5248
5219
|
var VideoFrameExtractNode = react.memo(VideoFrameExtractNodeComponent);
|
|
5249
|
-
|
|
5250
|
-
// src/nodes/processing/VideoStitchNode.tsx
|
|
5251
|
-
var import_types11 = chunkZ7PWFZG5_js.__toESM(chunkNSDLGLAQ_js.require_dist());
|
|
5252
5220
|
var TRANSITIONS = [
|
|
5253
5221
|
{ value: "cut", label: "Cut (No transition)" },
|
|
5254
5222
|
{ value: "crossfade", label: "Crossfade" },
|
|
@@ -5263,8 +5231,8 @@ function VideoStitchNodeComponent(props) {
|
|
|
5263
5231
|
const { id, data } = props;
|
|
5264
5232
|
const nodeData = data;
|
|
5265
5233
|
const inputVideos = nodeData.inputVideos ?? [];
|
|
5266
|
-
const updateNodeData =
|
|
5267
|
-
const executeNode =
|
|
5234
|
+
const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
|
|
5235
|
+
const executeNode = chunkDUZLPHRC_js.useExecutionStore((state) => state.executeNode);
|
|
5268
5236
|
const handleTransitionChange = react.useCallback(
|
|
5269
5237
|
(value) => {
|
|
5270
5238
|
updateNodeData(id, {
|
|
@@ -5310,7 +5278,7 @@ function VideoStitchNodeComponent(props) {
|
|
|
5310
5278
|
[id, updateNodeData]
|
|
5311
5279
|
);
|
|
5312
5280
|
const handleProcess = react.useCallback(() => {
|
|
5313
|
-
updateNodeData(id, { status:
|
|
5281
|
+
updateNodeData(id, { status: types.NodeStatusEnum.PROCESSING });
|
|
5314
5282
|
executeNode(id);
|
|
5315
5283
|
}, [id, executeNode, updateNodeData]);
|
|
5316
5284
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseNode, { ...props, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
@@ -5444,9 +5412,6 @@ function VideoStitchNodeComponent(props) {
|
|
|
5444
5412
|
] }) });
|
|
5445
5413
|
}
|
|
5446
5414
|
var VideoStitchNode = react.memo(VideoStitchNodeComponent);
|
|
5447
|
-
|
|
5448
|
-
// src/nodes/processing/VideoTrimNode.tsx
|
|
5449
|
-
var import_types12 = chunkZ7PWFZG5_js.__toESM(chunkNSDLGLAQ_js.require_dist());
|
|
5450
5415
|
function formatTime2(seconds) {
|
|
5451
5416
|
const mins = Math.floor(seconds / 60);
|
|
5452
5417
|
const secs = Math.floor(seconds % 60);
|
|
@@ -5459,9 +5424,9 @@ function parseTime(timeStr) {
|
|
|
5459
5424
|
function VideoTrimNodeComponent(props) {
|
|
5460
5425
|
const { id, data } = props;
|
|
5461
5426
|
const nodeData = data;
|
|
5462
|
-
const updateNodeData =
|
|
5463
|
-
const executeNode =
|
|
5464
|
-
const openNodeDetailModal =
|
|
5427
|
+
const updateNodeData = chunkIHF35QZD_js.useWorkflowStore((state) => state.updateNodeData);
|
|
5428
|
+
const executeNode = chunkDUZLPHRC_js.useExecutionStore((state) => state.executeNode);
|
|
5429
|
+
const openNodeDetailModal = chunkDUZLPHRC_js.useUIStore((state) => state.openNodeDetailModal);
|
|
5465
5430
|
const hasRequiredInputs = !!nodeData.inputVideo;
|
|
5466
5431
|
const handleStartTimeChange = react.useCallback(
|
|
5467
5432
|
(e) => {
|
|
@@ -5490,7 +5455,7 @@ function VideoTrimNodeComponent(props) {
|
|
|
5490
5455
|
[id, updateNodeData]
|
|
5491
5456
|
);
|
|
5492
5457
|
const handleProcess = react.useCallback(() => {
|
|
5493
|
-
updateNodeData(id, { status:
|
|
5458
|
+
updateNodeData(id, { status: types.NodeStatusEnum.PROCESSING });
|
|
5494
5459
|
executeNode(id);
|
|
5495
5460
|
}, [id, executeNode, updateNodeData]);
|
|
5496
5461
|
const handleExpand = react.useCallback(() => {
|