@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkDUZLPHRC_js = require('./chunk-DUZLPHRC.js');
|
|
4
|
+
var chunkIHF35QZD_js = require('./chunk-IHF35QZD.js');
|
|
5
5
|
var lucideReact = require('lucide-react');
|
|
6
6
|
var react = require('react');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -104,10 +104,10 @@ function SaveAsDialog({ isOpen, currentName, onSave, onClose }) {
|
|
|
104
104
|
] });
|
|
105
105
|
}
|
|
106
106
|
function SaveIndicator() {
|
|
107
|
-
const isDirty =
|
|
108
|
-
const isSaving =
|
|
109
|
-
const autoSaveEnabled =
|
|
110
|
-
const toggleAutoSave =
|
|
107
|
+
const isDirty = chunkIHF35QZD_js.useWorkflowStore((state) => state.isDirty);
|
|
108
|
+
const isSaving = chunkIHF35QZD_js.useWorkflowStore((state) => state.isSaving);
|
|
109
|
+
const autoSaveEnabled = chunkDUZLPHRC_js.useSettingsStore((state) => state.autoSaveEnabled);
|
|
110
|
+
const toggleAutoSave = chunkDUZLPHRC_js.useSettingsStore((state) => state.toggleAutoSave);
|
|
111
111
|
if (!autoSaveEnabled) {
|
|
112
112
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
113
113
|
"button",
|
|
@@ -240,25 +240,25 @@ function Toolbar({
|
|
|
240
240
|
showSettings = true,
|
|
241
241
|
rightContent
|
|
242
242
|
}) {
|
|
243
|
-
const { exportWorkflow, workflowName } =
|
|
244
|
-
const { undo, redo } =
|
|
243
|
+
const { exportWorkflow, workflowName } = chunkIHF35QZD_js.useWorkflowStore();
|
|
244
|
+
const { undo, redo } = chunkIHF35QZD_js.useWorkflowStore.temporal.getState();
|
|
245
245
|
const [canUndo, setCanUndo] = react.useState(false);
|
|
246
246
|
const [canRedo, setCanRedo] = react.useState(false);
|
|
247
247
|
const [showSaveAsDialog, setShowSaveAsDialog] = react.useState(false);
|
|
248
|
-
const validationErrors =
|
|
249
|
-
const clearValidationErrors =
|
|
250
|
-
const { openModal } =
|
|
251
|
-
const debugMode =
|
|
248
|
+
const validationErrors = chunkDUZLPHRC_js.useExecutionStore((state) => state.validationErrors);
|
|
249
|
+
const clearValidationErrors = chunkDUZLPHRC_js.useExecutionStore((state) => state.clearValidationErrors);
|
|
250
|
+
const { openModal } = chunkDUZLPHRC_js.useUIStore();
|
|
251
|
+
const debugMode = chunkDUZLPHRC_js.useSettingsStore((s) => s.debugMode);
|
|
252
252
|
const uniqueErrorMessages = react.useMemo(() => {
|
|
253
253
|
if (!validationErrors?.errors.length) return [];
|
|
254
254
|
return [...new Set(validationErrors.errors.map((e) => e.message))];
|
|
255
255
|
}, [validationErrors]);
|
|
256
256
|
react.useEffect(() => {
|
|
257
|
-
const unsubscribe =
|
|
257
|
+
const unsubscribe = chunkIHF35QZD_js.useWorkflowStore.temporal.subscribe((state) => {
|
|
258
258
|
setCanUndo(state.pastStates.length > 0);
|
|
259
259
|
setCanRedo(state.futureStates.length > 0);
|
|
260
260
|
});
|
|
261
|
-
const temporal =
|
|
261
|
+
const temporal = chunkIHF35QZD_js.useWorkflowStore.temporal.getState();
|
|
262
262
|
setCanUndo(temporal.pastStates.length > 0);
|
|
263
263
|
setCanRedo(temporal.futureStates.length > 0);
|
|
264
264
|
return unsubscribe;
|
|
@@ -292,7 +292,7 @@ function Toolbar({
|
|
|
292
292
|
console.warn("[Toolbar] Invalid workflow file structure");
|
|
293
293
|
return;
|
|
294
294
|
}
|
|
295
|
-
|
|
295
|
+
chunkIHF35QZD_js.useWorkflowStore.getState().loadWorkflow(data);
|
|
296
296
|
} catch {
|
|
297
297
|
console.warn("[Toolbar] Failed to parse workflow file");
|
|
298
298
|
}
|
|
@@ -461,16 +461,16 @@ function BottomBar() {
|
|
|
461
461
|
const [dropdownOpen, setDropdownOpen] = react.useState(false);
|
|
462
462
|
const batchCancelledRef = react.useRef(false);
|
|
463
463
|
const dropdownRef = react.useRef(null);
|
|
464
|
-
const isRunning =
|
|
465
|
-
const executeWorkflow =
|
|
466
|
-
const executeSelectedNodes =
|
|
467
|
-
const resumeFromFailed =
|
|
468
|
-
const canResumeFromFailed =
|
|
469
|
-
const stopExecution =
|
|
470
|
-
|
|
471
|
-
const selectedNodeIds =
|
|
472
|
-
const nodes =
|
|
473
|
-
const validateWorkflow =
|
|
464
|
+
const isRunning = chunkDUZLPHRC_js.useExecutionStore((s) => s.isRunning);
|
|
465
|
+
const executeWorkflow = chunkDUZLPHRC_js.useExecutionStore((s) => s.executeWorkflow);
|
|
466
|
+
const executeSelectedNodes = chunkDUZLPHRC_js.useExecutionStore((s) => s.executeSelectedNodes);
|
|
467
|
+
const resumeFromFailed = chunkDUZLPHRC_js.useExecutionStore((s) => s.resumeFromFailed);
|
|
468
|
+
const canResumeFromFailed = chunkDUZLPHRC_js.useExecutionStore((s) => s.canResumeFromFailed);
|
|
469
|
+
const stopExecution = chunkDUZLPHRC_js.useExecutionStore((s) => s.stopExecution);
|
|
470
|
+
chunkDUZLPHRC_js.useExecutionStore((s) => s.lastFailedNodeId);
|
|
471
|
+
const selectedNodeIds = chunkIHF35QZD_js.useWorkflowStore((s) => s.selectedNodeIds);
|
|
472
|
+
const nodes = chunkIHF35QZD_js.useWorkflowStore((s) => s.nodes);
|
|
473
|
+
const validateWorkflow = chunkIHF35QZD_js.useWorkflowStore((s) => s.validateWorkflow);
|
|
474
474
|
const canRunWorkflow = react.useMemo(() => {
|
|
475
475
|
if (nodes.length === 0) return false;
|
|
476
476
|
const validation = validateWorkflow();
|
|
@@ -486,11 +486,11 @@ function BottomBar() {
|
|
|
486
486
|
}, []);
|
|
487
487
|
const waitForExecutionEnd = react.useCallback(() => {
|
|
488
488
|
return new Promise((resolve) => {
|
|
489
|
-
if (!
|
|
489
|
+
if (!chunkDUZLPHRC_js.useExecutionStore.getState().isRunning) {
|
|
490
490
|
resolve();
|
|
491
491
|
return;
|
|
492
492
|
}
|
|
493
|
-
const unsubscribe =
|
|
493
|
+
const unsubscribe = chunkDUZLPHRC_js.useExecutionStore.subscribe((state) => {
|
|
494
494
|
if (!state.isRunning) {
|
|
495
495
|
unsubscribe();
|
|
496
496
|
resolve();
|
|
@@ -507,10 +507,10 @@ function BottomBar() {
|
|
|
507
507
|
setCurrentBatchRun(i + 1);
|
|
508
508
|
executeWorkflow();
|
|
509
509
|
await new Promise((r) => setTimeout(r, 50));
|
|
510
|
-
if (!
|
|
510
|
+
if (!chunkDUZLPHRC_js.useExecutionStore.getState().isRunning) break;
|
|
511
511
|
await waitForExecutionEnd();
|
|
512
|
-
if (
|
|
513
|
-
const { nodes: currentNodes, updateNodeData } =
|
|
512
|
+
if (chunkDUZLPHRC_js.useExecutionStore.getState().lastFailedNodeId) break;
|
|
513
|
+
const { nodes: currentNodes, updateNodeData } = chunkIHF35QZD_js.useWorkflowStore.getState();
|
|
514
514
|
for (const node of currentNodes) {
|
|
515
515
|
if (node.type !== "imageGen") continue;
|
|
516
516
|
const nodeData = node.data;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Checkbox, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, Slider, Label, Input, GridPositionSelector, ComparisonSlider } from './chunk-ZJD5WMR3.mjs';
|
|
2
2
|
import { generateHandlesFromSchema, DEFAULT_IMAGE_MODEL, IMAGE_MODEL_MAP, IMAGE_MODEL_ID_MAP, IMAGE_MODELS, LIPSYNC_MODELS, LIPSYNC_SYNC_MODES, DEFAULT_LLM_MODEL, LLM_MODEL_MAP, LLM_MODEL_ID_MAP, LLM_MODELS, DEFAULT_VIDEO_MODEL, VIDEO_MODEL_MAP, VIDEO_MODEL_ID_MAP, VIDEO_MODELS, EASING_PRESETS, getMediaFromNode } from './chunk-E323WAZG.mjs';
|
|
3
|
-
import { useNodeExecution, useCanGenerate, useModelSelection, useAutoLoadModelSchema, useAIGenNode, useAIGenNodeHeader, useMediaUpload, usePromptAutocomplete, useRequiredInputs } from './chunk-
|
|
3
|
+
import { useNodeExecution, useCanGenerate, useModelSelection, useAutoLoadModelSchema, useAIGenNode, useAIGenNodeHeader, useMediaUpload, usePromptAutocomplete, useRequiredInputs } from './chunk-3PMLER6D.mjs';
|
|
4
4
|
import { Button } from './chunk-7SKSRSS7.mjs';
|
|
5
5
|
import { getImageDimensions, getVideoMetadata } from './chunk-EFXQT23N.mjs';
|
|
6
6
|
import { usePromptEditorStore, useAnnotationStore } from './chunk-CV4M7CNU.mjs';
|
|
7
|
-
import { useUIStore, useExecutionStore } from './chunk-
|
|
8
|
-
import {
|
|
7
|
+
import { useUIStore, useExecutionStore } from './chunk-73V6SUEO.mjs';
|
|
8
|
+
import { useWorkflowStore } from './chunk-RIGVIEYB.mjs';
|
|
9
9
|
import { useWorkflowUIConfig } from './chunk-FT33LFII.mjs';
|
|
10
10
|
import { usePromptLibraryStore } from './chunk-VRN3UWE5.mjs';
|
|
11
|
-
import {
|
|
11
|
+
import { NODE_DEFINITIONS, NodeStatusEnum } from '@genfeedai/types';
|
|
12
12
|
import { useUpdateNodeInternals, NodeResizer, Handle, Position } from '@xyflow/react';
|
|
13
13
|
import { clsx } from 'clsx';
|
|
14
14
|
import { GitBranch, ArrowLeftFromLine, ArrowRightToLine, Subtitles, Pencil, Columns2, LayoutGrid, Grid3X3, Puzzle, Navigation, Volume2, AudioLines, Mic, Maximize, Crop, RefreshCw, AtSign, Download, Eye, CheckCircle, Share2, Scissors, Layers, Wand2, Maximize2, Brain, Video, Sparkles, Film, FileVideo, FileText, MessageSquare, Image as Image$1, Square, Lock, Unlock, Copy, RotateCcw, Loader2, ChevronDown, ChevronRight, AlertCircle, ImageIcon, Expand, Play, AlertTriangle, CheckCircle2, Upload, Link, X, Music, Save, Clock, Shapes, ChevronLeft, SplitSquareHorizontal, Zap } from 'lucide-react';
|
|
@@ -20,8 +20,6 @@ import { ReactCompareSlider, ReactCompareSliderImage } from 'react-compare-slide
|
|
|
20
20
|
import { useShallow } from 'zustand/react/shallow';
|
|
21
21
|
import { LUMA_ASPECT_RATIOS } from '@genfeedai/core';
|
|
22
22
|
|
|
23
|
-
// src/nodes/BaseNode.tsx
|
|
24
|
-
var import_types = __toESM(require_dist());
|
|
25
23
|
var NodeErrorBoundary = class extends Component {
|
|
26
24
|
constructor(props) {
|
|
27
25
|
super(props);
|
|
@@ -209,7 +207,7 @@ function BaseNodeComponent({
|
|
|
209
207
|
const stopExecution = useExecutionStore((state) => state.stopExecution);
|
|
210
208
|
const stopNodeExecution = useExecutionStore((state) => state.stopNodeExecution);
|
|
211
209
|
const updateNodeInternals = useUpdateNodeInternals();
|
|
212
|
-
const nodeDef =
|
|
210
|
+
const nodeDef = NODE_DEFINITIONS[type];
|
|
213
211
|
const nodeData = data;
|
|
214
212
|
const nodeRef = useRef(null);
|
|
215
213
|
const hoverTimeoutRef = useRef(null);
|
|
@@ -239,7 +237,7 @@ function BaseNodeComponent({
|
|
|
239
237
|
(e) => {
|
|
240
238
|
e.stopPropagation();
|
|
241
239
|
if (!nodeExecuting) {
|
|
242
|
-
updateNodeData(id, { error: void 0, status:
|
|
240
|
+
updateNodeData(id, { error: void 0, status: NodeStatusEnum.PROCESSING });
|
|
243
241
|
executeNode(id);
|
|
244
242
|
}
|
|
245
243
|
},
|
|
@@ -253,7 +251,7 @@ function BaseNodeComponent({
|
|
|
253
251
|
} else if (nodeExecuting) {
|
|
254
252
|
stopNodeExecution(id);
|
|
255
253
|
} else {
|
|
256
|
-
updateNodeData(id, { status:
|
|
254
|
+
updateNodeData(id, { status: NodeStatusEnum.IDLE, error: void 0 });
|
|
257
255
|
}
|
|
258
256
|
},
|
|
259
257
|
[id, isRunning, nodeExecuting, stopExecution, stopNodeExecution, updateNodeData]
|
|
@@ -1898,9 +1896,6 @@ function TextToSpeechNodeComponent(props) {
|
|
|
1898
1896
|
] }) });
|
|
1899
1897
|
}
|
|
1900
1898
|
var TextToSpeechNode = memo(TextToSpeechNodeComponent);
|
|
1901
|
-
|
|
1902
|
-
// src/nodes/ai/TranscribeNode.tsx
|
|
1903
|
-
var import_types2 = __toESM(require_dist());
|
|
1904
1899
|
var LANGUAGES = [
|
|
1905
1900
|
{ value: "auto", label: "Auto-detect" },
|
|
1906
1901
|
{ value: "en", label: "English" },
|
|
@@ -1937,7 +1932,7 @@ function TranscribeNodeComponent(props) {
|
|
|
1937
1932
|
[id, updateNodeData]
|
|
1938
1933
|
);
|
|
1939
1934
|
const handleTranscribe = useCallback(() => {
|
|
1940
|
-
updateNodeData(id, { status:
|
|
1935
|
+
updateNodeData(id, { status: NodeStatusEnum.PROCESSING });
|
|
1941
1936
|
executeNode(id);
|
|
1942
1937
|
}, [id, executeNode, updateNodeData]);
|
|
1943
1938
|
const handleExpand = useCallback(() => {
|
|
@@ -2126,9 +2121,6 @@ function VideoGenNodeComponent(props) {
|
|
|
2126
2121
|
);
|
|
2127
2122
|
}
|
|
2128
2123
|
var VideoGenNode = memo(VideoGenNodeComponent);
|
|
2129
|
-
|
|
2130
|
-
// src/nodes/ai/VoiceChangeNode.tsx
|
|
2131
|
-
var import_types3 = __toESM(require_dist());
|
|
2132
2124
|
function VoiceChangeNodeComponent(props) {
|
|
2133
2125
|
const { id, type, data } = props;
|
|
2134
2126
|
const nodeData = data;
|
|
@@ -2154,7 +2146,7 @@ function VoiceChangeNodeComponent(props) {
|
|
|
2154
2146
|
[id, updateNodeData]
|
|
2155
2147
|
);
|
|
2156
2148
|
const handleProcess = useCallback(() => {
|
|
2157
|
-
updateNodeData(id, { status:
|
|
2149
|
+
updateNodeData(id, { status: NodeStatusEnum.PROCESSING });
|
|
2158
2150
|
executeNode(id);
|
|
2159
2151
|
}, [id, executeNode, updateNodeData]);
|
|
2160
2152
|
const handleExpand = useCallback(() => {
|
|
@@ -3584,9 +3576,6 @@ function DownloadNodeComponent(props) {
|
|
|
3584
3576
|
}
|
|
3585
3577
|
var DownloadNode = memo(DownloadNodeComponent);
|
|
3586
3578
|
var OutputNode = DownloadNode;
|
|
3587
|
-
|
|
3588
|
-
// src/nodes/processing/AnimationNode.tsx
|
|
3589
|
-
var import_types4 = __toESM(require_dist());
|
|
3590
3579
|
var PRESET_OPTIONS = [
|
|
3591
3580
|
{ value: "linear", label: "Linear" },
|
|
3592
3581
|
{ value: "easeIn", label: "Ease In" },
|
|
@@ -3634,7 +3623,7 @@ function AnimationNodeComponent(props) {
|
|
|
3634
3623
|
[id, updateNodeData]
|
|
3635
3624
|
);
|
|
3636
3625
|
const handleProcess = useCallback(() => {
|
|
3637
|
-
updateNodeData(id, { status:
|
|
3626
|
+
updateNodeData(id, { status: NodeStatusEnum.PROCESSING });
|
|
3638
3627
|
executeNode(id);
|
|
3639
3628
|
}, [id, executeNode, updateNodeData]);
|
|
3640
3629
|
const handleExpand = useCallback(() => {
|
|
@@ -3883,9 +3872,6 @@ function ImageCompareNodeComponent(props) {
|
|
|
3883
3872
|
] }) });
|
|
3884
3873
|
}
|
|
3885
3874
|
var ImageCompareNode = memo(ImageCompareNodeComponent);
|
|
3886
|
-
|
|
3887
|
-
// src/nodes/processing/ImageGridSplitNode.tsx
|
|
3888
|
-
var import_types5 = __toESM(require_dist());
|
|
3889
3875
|
var OUTPUT_FORMATS = [
|
|
3890
3876
|
{ value: "jpg", label: "JPEG" },
|
|
3891
3877
|
{ value: "png", label: "PNG" },
|
|
@@ -3936,7 +3922,7 @@ function ImageGridSplitNodeComponent(props) {
|
|
|
3936
3922
|
[id, updateNodeData]
|
|
3937
3923
|
);
|
|
3938
3924
|
const handleProcess = useCallback(() => {
|
|
3939
|
-
updateNodeData(id, { status:
|
|
3925
|
+
updateNodeData(id, { status: NodeStatusEnum.PROCESSING });
|
|
3940
3926
|
executeNode(id);
|
|
3941
3927
|
}, [id, executeNode, updateNodeData]);
|
|
3942
3928
|
const handleDownload = useCallback(
|
|
@@ -4351,9 +4337,6 @@ function OutputGalleryNodeComponent(props) {
|
|
|
4351
4337
|
] });
|
|
4352
4338
|
}
|
|
4353
4339
|
var OutputGalleryNode = memo(OutputGalleryNodeComponent);
|
|
4354
|
-
|
|
4355
|
-
// src/nodes/processing/ReframeNode.tsx
|
|
4356
|
-
var import_types6 = __toESM(require_dist());
|
|
4357
4340
|
var MODELS = [
|
|
4358
4341
|
{ value: "photon-flash-1", label: "Photon Flash", price: "$0.01" },
|
|
4359
4342
|
{ value: "photon-1", label: "Photon", price: "$0.03" }
|
|
@@ -4406,7 +4389,7 @@ function ReframeNodeComponent(props) {
|
|
|
4406
4389
|
[id, updateNodeData]
|
|
4407
4390
|
);
|
|
4408
4391
|
const handleProcess = useCallback(() => {
|
|
4409
|
-
updateNodeData(id, { status:
|
|
4392
|
+
updateNodeData(id, { status: NodeStatusEnum.PROCESSING });
|
|
4410
4393
|
executeNode(id);
|
|
4411
4394
|
}, [id, executeNode, updateNodeData]);
|
|
4412
4395
|
const togglePlayback = useCallback(() => {
|
|
@@ -4529,9 +4512,6 @@ function ReframeNodeComponent(props) {
|
|
|
4529
4512
|
] }) });
|
|
4530
4513
|
}
|
|
4531
4514
|
var ReframeNode = memo(ReframeNodeComponent);
|
|
4532
|
-
|
|
4533
|
-
// src/nodes/processing/ResizeNode.tsx
|
|
4534
|
-
var import_types7 = __toESM(require_dist());
|
|
4535
4515
|
var MODELS2 = {
|
|
4536
4516
|
image: { id: "photon-flash-1", label: "Luma Photon Flash", price: "$0.01" },
|
|
4537
4517
|
video: { id: "luma-reframe", label: "Luma Reframe", price: "$0.05" }
|
|
@@ -4572,7 +4552,7 @@ function ResizeNodeComponent(props) {
|
|
|
4572
4552
|
[id, updateNodeData]
|
|
4573
4553
|
);
|
|
4574
4554
|
const handleProcess = useCallback(() => {
|
|
4575
|
-
updateNodeData(id, { status:
|
|
4555
|
+
updateNodeData(id, { status: NodeStatusEnum.PROCESSING });
|
|
4576
4556
|
executeNode(id);
|
|
4577
4557
|
}, [id, executeNode, updateNodeData]);
|
|
4578
4558
|
return /* @__PURE__ */ jsx(BaseNode, { ...props, children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
@@ -4666,9 +4646,6 @@ function ResizeNodeComponent(props) {
|
|
|
4666
4646
|
] }) });
|
|
4667
4647
|
}
|
|
4668
4648
|
var ResizeNode = memo(ResizeNodeComponent);
|
|
4669
|
-
|
|
4670
|
-
// src/nodes/processing/SubtitleNode.tsx
|
|
4671
|
-
var import_types8 = __toESM(require_dist());
|
|
4672
4649
|
var STYLE_OPTIONS = [
|
|
4673
4650
|
{ value: "modern", label: "Modern" },
|
|
4674
4651
|
{ value: "default", label: "Default" },
|
|
@@ -4710,7 +4687,7 @@ function SubtitleNodeComponent(props) {
|
|
|
4710
4687
|
[id, updateNodeData]
|
|
4711
4688
|
);
|
|
4712
4689
|
const handleProcess = useCallback(() => {
|
|
4713
|
-
updateNodeData(id, { status:
|
|
4690
|
+
updateNodeData(id, { status: NodeStatusEnum.PROCESSING });
|
|
4714
4691
|
executeNode(id);
|
|
4715
4692
|
}, [id, executeNode, updateNodeData]);
|
|
4716
4693
|
const hasRequiredInputs = nodeData.inputVideo && nodeData.inputText;
|
|
@@ -4791,9 +4768,6 @@ function SubtitleNodeComponent(props) {
|
|
|
4791
4768
|
] }) });
|
|
4792
4769
|
}
|
|
4793
4770
|
var SubtitleNode = memo(SubtitleNodeComponent);
|
|
4794
|
-
|
|
4795
|
-
// src/nodes/processing/UpscaleNode.tsx
|
|
4796
|
-
var import_types9 = __toESM(require_dist());
|
|
4797
4771
|
var IMAGE_MODELS2 = [
|
|
4798
4772
|
{ value: "topaz-standard-v2", label: "Standard V2" },
|
|
4799
4773
|
{ value: "topaz-low-res-v2", label: "Low Resolution V2" },
|
|
@@ -4902,7 +4876,7 @@ function UpscaleNodeComponent(props) {
|
|
|
4902
4876
|
[id, updateNodeData]
|
|
4903
4877
|
);
|
|
4904
4878
|
const handleProcess = useCallback(() => {
|
|
4905
|
-
updateNodeData(id, { status:
|
|
4879
|
+
updateNodeData(id, { status: NodeStatusEnum.PROCESSING });
|
|
4906
4880
|
executeNode(id);
|
|
4907
4881
|
}, [id, executeNode, updateNodeData]);
|
|
4908
4882
|
const handleExpand = useCallback(() => {
|
|
@@ -5164,9 +5138,6 @@ function UpscaleNodeComponent(props) {
|
|
|
5164
5138
|
] }) });
|
|
5165
5139
|
}
|
|
5166
5140
|
var UpscaleNode = memo(UpscaleNodeComponent);
|
|
5167
|
-
|
|
5168
|
-
// src/nodes/processing/VideoFrameExtractNode.tsx
|
|
5169
|
-
var import_types10 = __toESM(require_dist());
|
|
5170
5141
|
var SELECTION_MODES = [
|
|
5171
5142
|
{ value: "last", label: "Last Frame" },
|
|
5172
5143
|
{ value: "first", label: "First Frame" }
|
|
@@ -5188,7 +5159,7 @@ function VideoFrameExtractNodeComponent(props) {
|
|
|
5188
5159
|
[id, updateNodeData]
|
|
5189
5160
|
);
|
|
5190
5161
|
const handleProcess = useCallback(() => {
|
|
5191
|
-
updateNodeData(id, { status:
|
|
5162
|
+
updateNodeData(id, { status: NodeStatusEnum.PROCESSING });
|
|
5192
5163
|
executeNode(id);
|
|
5193
5164
|
}, [id, executeNode, updateNodeData]);
|
|
5194
5165
|
return /* @__PURE__ */ jsx(BaseNode, { ...props, children: /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
@@ -5240,9 +5211,6 @@ function VideoFrameExtractNodeComponent(props) {
|
|
|
5240
5211
|
] }) });
|
|
5241
5212
|
}
|
|
5242
5213
|
var VideoFrameExtractNode = memo(VideoFrameExtractNodeComponent);
|
|
5243
|
-
|
|
5244
|
-
// src/nodes/processing/VideoStitchNode.tsx
|
|
5245
|
-
var import_types11 = __toESM(require_dist());
|
|
5246
5214
|
var TRANSITIONS = [
|
|
5247
5215
|
{ value: "cut", label: "Cut (No transition)" },
|
|
5248
5216
|
{ value: "crossfade", label: "Crossfade" },
|
|
@@ -5304,7 +5272,7 @@ function VideoStitchNodeComponent(props) {
|
|
|
5304
5272
|
[id, updateNodeData]
|
|
5305
5273
|
);
|
|
5306
5274
|
const handleProcess = useCallback(() => {
|
|
5307
|
-
updateNodeData(id, { status:
|
|
5275
|
+
updateNodeData(id, { status: NodeStatusEnum.PROCESSING });
|
|
5308
5276
|
executeNode(id);
|
|
5309
5277
|
}, [id, executeNode, updateNodeData]);
|
|
5310
5278
|
return /* @__PURE__ */ jsx(BaseNode, { ...props, children: /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
@@ -5438,9 +5406,6 @@ function VideoStitchNodeComponent(props) {
|
|
|
5438
5406
|
] }) });
|
|
5439
5407
|
}
|
|
5440
5408
|
var VideoStitchNode = memo(VideoStitchNodeComponent);
|
|
5441
|
-
|
|
5442
|
-
// src/nodes/processing/VideoTrimNode.tsx
|
|
5443
|
-
var import_types12 = __toESM(require_dist());
|
|
5444
5409
|
function formatTime2(seconds) {
|
|
5445
5410
|
const mins = Math.floor(seconds / 60);
|
|
5446
5411
|
const secs = Math.floor(seconds % 60);
|
|
@@ -5484,7 +5449,7 @@ function VideoTrimNodeComponent(props) {
|
|
|
5484
5449
|
[id, updateNodeData]
|
|
5485
5450
|
);
|
|
5486
5451
|
const handleProcess = useCallback(() => {
|
|
5487
|
-
updateNodeData(id, { status:
|
|
5452
|
+
updateNodeData(id, { status: NodeStatusEnum.PROCESSING });
|
|
5488
5453
|
executeNode(id);
|
|
5489
5454
|
}, [id, executeNode, updateNodeData]);
|
|
5490
5455
|
const handleExpand = useCallback(() => {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkH3JOHAS5_js = require('./chunk-H3JOHAS5.js');
|
|
4
4
|
var chunk3YFFDHC5_js = require('./chunk-3YFFDHC5.js');
|
|
5
|
-
var
|
|
5
|
+
var chunkEMGXUNBL_js = require('./chunk-EMGXUNBL.js');
|
|
6
6
|
var chunk5HJFQVUR_js = require('./chunk-5HJFQVUR.js');
|
|
7
7
|
var chunk6DOEUDD5_js = require('./chunk-6DOEUDD5.js');
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var chunkZ7PWFZG5_js = require('./chunk-Z7PWFZG5.js');
|
|
8
|
+
var chunkDUZLPHRC_js = require('./chunk-DUZLPHRC.js');
|
|
9
|
+
var chunkIHF35QZD_js = require('./chunk-IHF35QZD.js');
|
|
11
10
|
var react$1 = require('@xyflow/react');
|
|
12
11
|
var lucideReact = require('lucide-react');
|
|
13
12
|
var react = require('react');
|
|
14
13
|
require('@xyflow/react/dist/style.css');
|
|
14
|
+
var types = require('@genfeedai/types');
|
|
15
15
|
var clsx = require('clsx');
|
|
16
16
|
var jsxRuntime = require('react/jsx-runtime');
|
|
17
17
|
var Image = require('next/image');
|
|
@@ -20,9 +20,6 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
20
20
|
|
|
21
21
|
var Image__default = /*#__PURE__*/_interopDefault(Image);
|
|
22
22
|
|
|
23
|
-
// src/canvas/WorkflowCanvas.tsx
|
|
24
|
-
var import_types3 = chunkZ7PWFZG5_js.__toESM(chunkNSDLGLAQ_js.require_dist());
|
|
25
|
-
|
|
26
23
|
// src/types/groups.ts
|
|
27
24
|
var GROUP_COLORS = {
|
|
28
25
|
purple: {
|
|
@@ -126,7 +123,7 @@ function GroupBackground({ group, bounds }) {
|
|
|
126
123
|
}
|
|
127
124
|
function GroupControls({ group, bounds, nodeMap, zoom }) {
|
|
128
125
|
const { setNodes } = react$1.useReactFlow();
|
|
129
|
-
const { toggleGroupLock, deleteGroup, setGroupColor, setDirty, renameGroup } =
|
|
126
|
+
const { toggleGroupLock, deleteGroup, setGroupColor, setDirty, renameGroup } = chunkIHF35QZD_js.useWorkflowStore();
|
|
130
127
|
const [showColorPicker, setShowColorPicker] = react.useState(false);
|
|
131
128
|
const [isEditing, setIsEditing] = react.useState(false);
|
|
132
129
|
const [editName, setEditName] = react.useState(group.name);
|
|
@@ -356,7 +353,7 @@ function GroupControls({ group, bounds, nodeMap, zoom }) {
|
|
|
356
353
|
] });
|
|
357
354
|
}
|
|
358
355
|
function GroupBackgroundsPortalComponent() {
|
|
359
|
-
const { groups } =
|
|
356
|
+
const { groups } = chunkIHF35QZD_js.useWorkflowStore();
|
|
360
357
|
const nodes = react$1.useNodes();
|
|
361
358
|
const nodeMap = react.useMemo(() => new Map(nodes.map((n) => [n.id, n])), [nodes]);
|
|
362
359
|
const groupBounds = react.useMemo(() => {
|
|
@@ -377,7 +374,7 @@ function GroupBackgroundsPortalComponent() {
|
|
|
377
374
|
}) }) });
|
|
378
375
|
}
|
|
379
376
|
function GroupControlsOverlayComponent() {
|
|
380
|
-
const { groups } =
|
|
377
|
+
const { groups } = chunkIHF35QZD_js.useWorkflowStore();
|
|
381
378
|
const nodes = react$1.useNodes();
|
|
382
379
|
const { zoom } = react$1.useViewport();
|
|
383
380
|
const nodeMap = react.useMemo(() => new Map(nodes.map((n) => [n.id, n])), [nodes]);
|
|
@@ -419,7 +416,7 @@ var GroupOverlay = react.memo(GroupOverlayComponent);
|
|
|
419
416
|
var SNAP_THRESHOLD = 5;
|
|
420
417
|
function HelperLinesComponent({ draggingNodeId }) {
|
|
421
418
|
const [lines, setLines] = react.useState([]);
|
|
422
|
-
const nodes =
|
|
419
|
+
const nodes = chunkIHF35QZD_js.useWorkflowStore((state) => state.nodes);
|
|
423
420
|
const transform = react$1.useStore((state) => state.transform);
|
|
424
421
|
const calculateHelperLines = react.useCallback(
|
|
425
422
|
(draggingId) => {
|
|
@@ -562,12 +559,9 @@ function HelperLinesComponent({ draggingNodeId }) {
|
|
|
562
559
|
);
|
|
563
560
|
}
|
|
564
561
|
var HelperLines = react.memo(HelperLinesComponent);
|
|
565
|
-
|
|
566
|
-
// src/canvas/NodeSearch.tsx
|
|
567
|
-
var import_types = chunkZ7PWFZG5_js.__toESM(chunkNSDLGLAQ_js.require_dist());
|
|
568
562
|
function NodeSearch() {
|
|
569
|
-
const { activeModal, closeModal } =
|
|
570
|
-
const { nodes, setSelectedNodeIds } =
|
|
563
|
+
const { activeModal, closeModal } = chunkDUZLPHRC_js.useUIStore();
|
|
564
|
+
const { nodes, setSelectedNodeIds } = chunkIHF35QZD_js.useWorkflowStore();
|
|
571
565
|
const reactFlow = react$1.useReactFlow();
|
|
572
566
|
const [search, setSearch] = react.useState("");
|
|
573
567
|
const [selectedIndex, setSelectedIndex] = react.useState(0);
|
|
@@ -587,7 +581,7 @@ function NodeSearch() {
|
|
|
587
581
|
const label = (node.data.label || "").toLowerCase();
|
|
588
582
|
const type = (node.type || "").toLowerCase();
|
|
589
583
|
const comment = (node.data.comment || "").toLowerCase();
|
|
590
|
-
const nodeDefLabel =
|
|
584
|
+
const nodeDefLabel = types.NODE_DEFINITIONS[node.type]?.label?.toLowerCase() || "";
|
|
591
585
|
return label.includes(query) || type.includes(query) || comment.includes(query) || nodeDefLabel.includes(query);
|
|
592
586
|
});
|
|
593
587
|
}, [nodes, search]);
|
|
@@ -687,7 +681,7 @@ function NodeSearch() {
|
|
|
687
681
|
)
|
|
688
682
|
] }),
|
|
689
683
|
/* @__PURE__ */ jsxRuntime.jsx("div", { ref: listRef, className: "max-h-[300px] overflow-y-auto space-y-1", children: filteredNodes.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center text-muted-foreground py-8", children: search ? `No nodes found for "${search}"` : "No nodes in workflow" }) : filteredNodes.map((node, index) => {
|
|
690
|
-
const nodeDef =
|
|
684
|
+
const nodeDef = types.NODE_DEFINITIONS[node.type];
|
|
691
685
|
const comment = node.data.comment;
|
|
692
686
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
693
687
|
"button",
|
|
@@ -764,7 +758,7 @@ var SHORTCUTS = [
|
|
|
764
758
|
];
|
|
765
759
|
var CATEGORIES = ["Navigation", "Selection", "Editing", "Nodes", "Organization", "Help"];
|
|
766
760
|
function ShortcutHelpModal() {
|
|
767
|
-
const { activeModal, closeModal } =
|
|
761
|
+
const { activeModal, closeModal } = chunkDUZLPHRC_js.useUIStore();
|
|
768
762
|
const [searchQuery, setSearchQuery] = react.useState("");
|
|
769
763
|
const backdropRef = react.useRef(null);
|
|
770
764
|
const inputRef = react.useRef(null);
|
|
@@ -868,13 +862,10 @@ function ShortcutHelpModal() {
|
|
|
868
862
|
}
|
|
869
863
|
);
|
|
870
864
|
}
|
|
871
|
-
|
|
872
|
-
// src/nodes/NodeDetailModal.tsx
|
|
873
|
-
var import_types2 = chunkZ7PWFZG5_js.__toESM(chunkNSDLGLAQ_js.require_dist());
|
|
874
865
|
var PROMPT_NODE_TYPES = ["prompt"];
|
|
875
866
|
function NodeDetailModal() {
|
|
876
|
-
const { activeModal, nodeDetailNodeId, nodeDetailStartIndex, closeNodeDetailModal } =
|
|
877
|
-
const { getNodeById } =
|
|
867
|
+
const { activeModal, nodeDetailNodeId, nodeDetailStartIndex, closeNodeDetailModal } = chunkDUZLPHRC_js.useUIStore();
|
|
868
|
+
const { getNodeById } = chunkIHF35QZD_js.useWorkflowStore();
|
|
878
869
|
const { openEditor } = chunk6DOEUDD5_js.usePromptEditorStore();
|
|
879
870
|
const [zoomLevel, setZoomLevel] = react.useState(1);
|
|
880
871
|
const [panOffset, setPanOffset] = react.useState({ x: 0, y: 0 });
|
|
@@ -899,7 +890,7 @@ function NodeDetailModal() {
|
|
|
899
890
|
}, [node]);
|
|
900
891
|
const nodeDef = react.useMemo(() => {
|
|
901
892
|
if (!node) return null;
|
|
902
|
-
return
|
|
893
|
+
return types.NODE_DEFINITIONS[node.type];
|
|
903
894
|
}, [node]);
|
|
904
895
|
const imageUrls = mediaInfo.urls ?? [];
|
|
905
896
|
const hasMultipleImages = imageUrls.length > 1;
|
|
@@ -1129,7 +1120,7 @@ function supportsImageInput(schema) {
|
|
|
1129
1120
|
function getEdgeDataType(edge, nodeMap) {
|
|
1130
1121
|
const sourceNode = nodeMap.get(edge.source);
|
|
1131
1122
|
if (!sourceNode) return null;
|
|
1132
|
-
const nodeDef =
|
|
1123
|
+
const nodeDef = types.NODE_DEFINITIONS[sourceNode.type];
|
|
1133
1124
|
if (!nodeDef) return null;
|
|
1134
1125
|
const sourceHandle = nodeDef.outputs.find((h) => h.id === edge.sourceHandle);
|
|
1135
1126
|
return sourceHandle?.type ?? null;
|
|
@@ -1152,7 +1143,7 @@ function WorkflowCanvas({ nodeTypes: nodeTypesProp } = {}) {
|
|
|
1152
1143
|
unlockAllNodes,
|
|
1153
1144
|
groups,
|
|
1154
1145
|
getConnectedNodeIds
|
|
1155
|
-
} =
|
|
1146
|
+
} = chunkIHF35QZD_js.useWorkflowStore();
|
|
1156
1147
|
const {
|
|
1157
1148
|
selectNode,
|
|
1158
1149
|
setHighlightedNodeIds,
|
|
@@ -1160,21 +1151,21 @@ function WorkflowCanvas({ nodeTypes: nodeTypesProp } = {}) {
|
|
|
1160
1151
|
showPalette,
|
|
1161
1152
|
togglePalette,
|
|
1162
1153
|
openModal
|
|
1163
|
-
} =
|
|
1154
|
+
} = chunkDUZLPHRC_js.useUIStore();
|
|
1164
1155
|
const reactFlow = react$1.useReactFlow();
|
|
1165
|
-
const { edgeStyle, showMinimap } =
|
|
1166
|
-
const isRunning =
|
|
1167
|
-
const currentNodeId =
|
|
1168
|
-
const executingNodeIds =
|
|
1169
|
-
const activeNodeExecutions =
|
|
1170
|
-
const hasActiveNodeExecutions =
|
|
1156
|
+
const { edgeStyle, showMinimap } = chunkDUZLPHRC_js.useSettingsStore();
|
|
1157
|
+
const isRunning = chunkDUZLPHRC_js.useExecutionStore((state) => state.isRunning);
|
|
1158
|
+
const currentNodeId = chunkDUZLPHRC_js.useExecutionStore((state) => state.currentNodeId);
|
|
1159
|
+
const executingNodeIds = chunkDUZLPHRC_js.useExecutionStore((state) => state.executingNodeIds);
|
|
1160
|
+
const activeNodeExecutions = chunkDUZLPHRC_js.useExecutionStore((state) => state.activeNodeExecutions);
|
|
1161
|
+
const hasActiveNodeExecutions = chunkDUZLPHRC_js.useExecutionStore((state) => state.activeNodeExecutions.size > 0);
|
|
1171
1162
|
const [isMinimapVisible, setIsMinimapVisible] = react.useState(false);
|
|
1172
1163
|
const [draggingNodeId, setDraggingNodeId] = react.useState(null);
|
|
1173
1164
|
const hideTimeoutRef = react.useRef(null);
|
|
1174
1165
|
const MINIMAP_HIDE_DELAY = 1500;
|
|
1175
1166
|
const openShortcutHelp = react.useCallback(() => openModal("shortcutHelp"), [openModal]);
|
|
1176
1167
|
const openNodeSearch = react.useCallback(() => openModal("nodeSearch"), [openModal]);
|
|
1177
|
-
|
|
1168
|
+
chunkEMGXUNBL_js.useCanvasKeyboardShortcuts({
|
|
1178
1169
|
selectedNodeIds,
|
|
1179
1170
|
groups,
|
|
1180
1171
|
nodes,
|
|
@@ -1443,7 +1434,7 @@ function WorkflowCanvas({ nodeTypes: nodeTypesProp } = {}) {
|
|
|
1443
1434
|
onNodeDrag: handleNodeDrag,
|
|
1444
1435
|
onNodeDragStop: handleNodeDragStop,
|
|
1445
1436
|
isValidConnection: checkValidConnection,
|
|
1446
|
-
nodeTypes: nodeTypesProp ??
|
|
1437
|
+
nodeTypes: nodeTypesProp ?? chunkH3JOHAS5_js.nodeTypes,
|
|
1447
1438
|
fitView: true,
|
|
1448
1439
|
snapToGrid: true,
|
|
1449
1440
|
snapGrid: [16, 16],
|