-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathtypes.ts
More file actions
62 lines (52 loc) · 1.4 KB
/
types.ts
File metadata and controls
62 lines (52 loc) · 1.4 KB
1
2
3
4
5
6
7
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
export enum NodeType {
TEXT_TO_IMAGE = 'TEXT_TO_IMAGE',
TEXT_TO_VIDEO = 'TEXT_TO_VIDEO',
IMAGE_TO_IMAGE = 'IMAGE_TO_IMAGE',
IMAGE_TO_VIDEO = 'IMAGE_TO_VIDEO',
START_END_TO_VIDEO = 'START_END_TO_VIDEO',
CREATIVE_DESC = 'CREATIVE_DESC',
ORIGINAL_IMAGE = 'ORIGINAL_IMAGE',
}
export interface NodeData {
id: string;
type: NodeType;
x: number;
y: number;
width: number;
height: number;
title: string;
// State
prompt?: string;
imageSrc?: string; // Result or Input (Active Selection)
videoSrc?: string; // Result (Active Selection)
outputArtifacts?: string[]; // History/Batch results
isLoading?: boolean;
isStackOpen?: boolean; // UI State for expanded gallery
// Configs
aspectRatio?: string;
resolution?: string;
duration?: string; // Video duration (5s, 10s, 15s)
count?: number;
model?: string;
promptOptimize?: boolean; // Prompt Extension/Optimization switch
swapFrames?: boolean; // For START_END_TO_VIDEO: swap first/last frame order
// Creative Desc specific
optimizedPrompt?: string;
// UI State
activeToolbarItem?: string;
}
export interface Connection {
id: string;
sourceId: string;
targetId: string;
}
export interface CanvasTransform {
x: number;
y: number;
k: number; // Scale
}
export type DragMode = 'NONE' | 'PAN' | 'DRAG_NODE' | 'SELECT' | 'CONNECT' | 'RESIZE_NODE';
export interface Point {
x: number;
y: number;
}