|
|
@ -39,15 +39,6 @@ const IMAGE_TARGET_OPTIONS: MenuOption[] = [ |
|
|
</svg> |
|
|
</svg> |
|
|
), |
|
|
), |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
|
|
|
type: "nanoBanana", |
|
|
|
|
|
label: "Generate Image", |
|
|
|
|
|
icon: ( |
|
|
|
|
|
<svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={1.5}> |
|
|
|
|
|
<path strokeLinecap="round" strokeLinejoin="round" d="M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z" /> |
|
|
|
|
|
</svg> |
|
|
|
|
|
), |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
{ |
|
|
type: "generateVideo", |
|
|
type: "generateVideo", |
|
|
label: "Generate Video", |
|
|
label: "Generate Video", |
|
|
@ -197,15 +188,6 @@ const TEXT_TARGET_OPTIONS: MenuOption[] = [ |
|
|
</svg> |
|
|
</svg> |
|
|
), |
|
|
), |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
|
|
|
type: "nanoBanana", |
|
|
|
|
|
label: "Generate Image", |
|
|
|
|
|
icon: ( |
|
|
|
|
|
<svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={1.5}> |
|
|
|
|
|
<path strokeLinecap="round" strokeLinejoin="round" d="M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z" /> |
|
|
|
|
|
</svg> |
|
|
|
|
|
), |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
{ |
|
|
type: "generateVideo", |
|
|
type: "generateVideo", |
|
|
label: "Generate Video", |
|
|
label: "Generate Video", |
|
|
@ -277,8 +259,8 @@ const TEXT_TARGET_OPTIONS: MenuOption[] = [ |
|
|
// Define which nodes can provide sources for handle types (when dragging to a target handle)
|
|
|
// Define which nodes can provide sources for handle types (when dragging to a target handle)
|
|
|
const IMAGE_SOURCE_OPTIONS: MenuOption[] = [ |
|
|
const IMAGE_SOURCE_OPTIONS: MenuOption[] = [ |
|
|
{ |
|
|
{ |
|
|
type: "imageInput", |
|
|
type: "smartImage", |
|
|
label: "Image Input", |
|
|
label: "Image", |
|
|
icon: ( |
|
|
icon: ( |
|
|
<svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={1.5}> |
|
|
<svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={1.5}> |
|
|
<path strokeLinecap="round" strokeLinejoin="round" d="M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z" /> |
|
|
<path strokeLinecap="round" strokeLinejoin="round" d="M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z" /> |
|
|
@ -312,15 +294,6 @@ const IMAGE_SOURCE_OPTIONS: MenuOption[] = [ |
|
|
</svg> |
|
|
</svg> |
|
|
), |
|
|
), |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
|
|
|
type: "nanoBanana", |
|
|
|
|
|
label: "Generate Image", |
|
|
|
|
|
icon: ( |
|
|
|
|
|
<svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={1.5}> |
|
|
|
|
|
<path strokeLinecap="round" strokeLinejoin="round" d="M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z" /> |
|
|
|
|
|
</svg> |
|
|
|
|
|
), |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
{ |
|
|
type: "router", |
|
|
type: "router", |
|
|
label: "Router", |
|
|
label: "Router", |
|
|
@ -729,8 +702,8 @@ const THREE_D_SOURCE_OPTIONS: MenuOption[] = [ |
|
|
]; |
|
|
]; |
|
|
|
|
|
|
|
|
const COMMON_QUICK_ADD_PRIORITIES: Record<ConnectionHandleType, QuickAddOptionType[]> = { |
|
|
const COMMON_QUICK_ADD_PRIORITIES: Record<ConnectionHandleType, QuickAddOptionType[]> = { |
|
|
image: ["smartImage", "nanoBanana", "generateVideo", "output", "annotation", "imageCompare"], |
|
|
image: ["smartImage", "generateVideo", "output", "annotation", "imageCompare"], |
|
|
text: ["smartImage", "nanoBanana", "generateVideo", "llmGenerate", "promptConstructor", "generateAudio"], |
|
|
text: ["smartImage", "generateVideo", "llmGenerate", "promptConstructor", "generateAudio"], |
|
|
video: ["generateVideo", "output", "videoTrim", "videoFrameGrab", "videoStitch"], |
|
|
video: ["generateVideo", "output", "videoTrim", "videoFrameGrab", "videoStitch"], |
|
|
audio: ["generateVideo", "output", "videoStitch", "router", "switch"], |
|
|
audio: ["generateVideo", "output", "videoStitch", "router", "switch"], |
|
|
"3d": ["glbViewer", "output", "generate3d", "router", "switch"], |
|
|
"3d": ["glbViewer", "output", "generate3d", "router", "switch"], |
|
|
@ -743,7 +716,7 @@ const RELATED_QUICK_ADD_PRIORITIES: Partial<Record<NodeType, QuickAddOptionType[ |
|
|
nanoBanana: ["multiAngleImage", "splitGridImmediate"], |
|
|
nanoBanana: ["multiAngleImage", "splitGridImmediate"], |
|
|
prompt: ["array", "promptConstructor"], |
|
|
prompt: ["array", "promptConstructor"], |
|
|
promptConstructor: ["llmGenerate", "array"], |
|
|
promptConstructor: ["llmGenerate", "array"], |
|
|
llmGenerate: ["nanoBanana", "generateVideo"], |
|
|
llmGenerate: ["smartImage", "generateVideo"], |
|
|
videoInput: ["videoTrim", "videoFrameGrab"], |
|
|
videoInput: ["videoTrim", "videoFrameGrab"], |
|
|
generateVideo: ["easeCurve", "videoFrameGrab"], |
|
|
generateVideo: ["easeCurve", "videoFrameGrab"], |
|
|
videoStitch: ["videoTrim", "easeCurve"], |
|
|
videoStitch: ["videoTrim", "easeCurve"], |
|
|
@ -751,7 +724,7 @@ const RELATED_QUICK_ADD_PRIORITIES: Partial<Record<NodeType, QuickAddOptionType[ |
|
|
audioInput: ["generateVideo", "output"], |
|
|
audioInput: ["generateVideo", "output"], |
|
|
generateAudio: ["generateVideo", "output"], |
|
|
generateAudio: ["generateVideo", "output"], |
|
|
generate3d: ["glbViewer", "output"], |
|
|
generate3d: ["glbViewer", "output"], |
|
|
glbViewer: ["nanoBanana", "output"], |
|
|
glbViewer: ["smartImage", "output"], |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
const pickPrioritizedOptions = ( |
|
|
const pickPrioritizedOptions = ( |
|
|
@ -972,7 +945,7 @@ export function ConnectionDropMenu({ |
|
|
key={option.type} |
|
|
key={option.type} |
|
|
onClick={() => onSelect({ type: option.type, isAction: option.isAction || false })} |
|
|
onClick={() => onSelect({ type: option.type, isAction: option.isAction || false })} |
|
|
onMouseEnter={() => setSelectedIndex(index)} |
|
|
onMouseEnter={() => setSelectedIndex(index)} |
|
|
data-tutorial={option.type === "nanoBanana" ? "generate-image-option" : undefined} |
|
|
data-tutorial={option.type === "smartImage" ? "generate-image-option" : undefined} |
|
|
className={`w-full px-3 py-2 text-left text-[11px] font-medium flex items-center gap-2 transition-colors ${ |
|
|
className={`w-full px-3 py-2 text-left text-[11px] font-medium flex items-center gap-2 transition-colors ${ |
|
|
index === selectedIndex |
|
|
index === selectedIndex |
|
|
? "bg-neutral-700 text-neutral-100" |
|
|
? "bg-neutral-700 text-neutral-100" |
|
|
|