|
|
|
@ -2,8 +2,6 @@ import type { NodeType, SmartImageNodeData, WorkflowNode } from "@/types"; |
|
|
|
import type { Connection } from "@xyflow/react"; |
|
|
|
import { SINGLE_INPUT_HANDLE_ID, SINGLE_OUTPUT_HANDLE_ID } from "@/utils/nodeHandles"; |
|
|
|
|
|
|
|
export type VideoFrameCaptureMode = "first" | "last" | "current"; |
|
|
|
|
|
|
|
type AddNode = ( |
|
|
|
type: NodeType, |
|
|
|
position: { x: number; y: number }, |
|
|
|
@ -18,7 +16,6 @@ function getNodeWidth(node: WorkflowNode): number { |
|
|
|
export async function createVideoFrameSmartImageNode({ |
|
|
|
sourceNode, |
|
|
|
time, |
|
|
|
mode, |
|
|
|
addNode, |
|
|
|
onConnect, |
|
|
|
selectSingleNode, |
|
|
|
@ -26,7 +23,6 @@ export async function createVideoFrameSmartImageNode({ |
|
|
|
}: { |
|
|
|
sourceNode: WorkflowNode; |
|
|
|
time: number; |
|
|
|
mode: VideoFrameCaptureMode; |
|
|
|
addNode: AddNode; |
|
|
|
onConnect: (connection: Connection) => void; |
|
|
|
selectSingleNode: (nodeId: string) => void; |
|
|
|
@ -50,7 +46,6 @@ export async function createVideoFrameSmartImageNode({ |
|
|
|
operation: "videoFrame", |
|
|
|
task: { |
|
|
|
time, |
|
|
|
mode, |
|
|
|
}, |
|
|
|
}, |
|
|
|
status: "loading", |
|
|
|
|