generated from google-gemini/aistudio-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 62
Expand file tree
/
Copy pathtypes.ts
More file actions
106 lines (94 loc) · 1.87 KB
/
types.ts
File metadata and controls
106 lines (94 loc) · 1.87 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
export enum NodeType {
TEXT_INPUT = 'TEXT_INPUT',
IMAGE_INPUT = 'IMAGE_INPUT',
TEXT_GENERATOR = 'TEXT_GENERATOR',
IMAGE_EDITOR = 'IMAGE_EDITOR',
VIDEO_GENERATOR = 'VIDEO_GENERATOR',
OUTPUT_DISPLAY = 'OUTPUT_DISPLAY',
PROMPT_PRESET = 'PROMPT_PRESET',
}
export enum NodeStatus {
IDLE = 'IDLE',
PROCESSING = 'PROCESSING',
COMPLETED = 'COMPLETED',
ERROR = 'ERROR',
}
export interface NodeInput {
id: string;
label: string;
type: 'text' | 'image' | 'video' | 'any';
}
export interface NodeOutput {
id: string;
label: string;
type: 'text' | 'image' | 'video' | 'any';
}
export interface NodeData {
label: string;
inputs: NodeInput[];
outputs: NodeOutput[];
content: any;
status: NodeStatus;
errorMessage?: string;
width?: number;
height?: number;
prompt?: string;
isMuted?: boolean;
}
export interface Node {
id: string;
type: NodeType;
position: { x: number; y: number };
data: NodeData;
zIndex?: number;
}
export interface Edge {
id:string;
sourceNodeId: string;
sourceHandleId: string;
targetNodeId: string;
targetHandleId: string;
}
export interface Point {
x: number;
y: number;
}
export interface HistoryItem {
id: string;
type: 'image';
dataUrl: string;
prompt: string;
}
export interface Group {
id: string;
label: string;
color: string;
nodeIds: string[];
}
export interface Theme {
canvasBackground: string;
nodeBackground: string; // Hex color
nodeOpacity: number; // 0.0 to 1.0
nodeTextColor: string;
uploaderTextColor: string;
canvasBackgroundImage: string | null;
edgeWidth: number;
edgeColors: {
text: string;
image: string;
video: string;
any: string;
};
buttonColor: string;
}
export interface Shortcuts {
run: string;
save: string;
load: string;
copy: string;
paste: string;
delete: string;
group: string;
ungroup: string;
mute: string;
}