-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
43 lines (37 loc) · 765 Bytes
/
Copy pathtypes.ts
File metadata and controls
43 lines (37 loc) · 765 Bytes
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
export interface Point {
x: number;
y: number;
}
export type NodeType = 'upload' | 'image' | 'prompt' | 'generated';
export interface NodeData {
text?: string;
imageUrl?: string;
base64?: string;
mimeType?: string;
isLoading?: boolean;
isGenerating?: boolean;
loadingMessage?: string;
// Fix: Add optional type property to allow for node type transitions.
type?: NodeType;
}
export interface Node {
id: string;
type: NodeType;
position: Point;
data: NodeData;
size?: { width: number; height: number };
}
export interface Edge {
id: string;
source: string;
target: string;
}
export interface CanvasTransform {
x: number;
y: number;
zoom: number;
}
export interface ImagePart {
base64: string;
mimeType: string;
}