-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
53 lines (48 loc) · 932 Bytes
/
types.ts
File metadata and controls
53 lines (48 loc) · 932 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
44
45
46
47
48
49
50
51
52
53
export enum ToolType {
SELECT = 'SELECT',
PEN = 'PEN',
ARROW = 'ARROW',
RECTANGLE = 'RECTANGLE',
CIRCLE = 'CIRCLE',
TEXT = 'TEXT',
PIXELATE = 'PIXELATE',
NUMBER = 'NUMBER'
}
export interface Point {
x: number;
y: number;
}
export interface Annotation {
id: string;
type: ToolType;
points: Point[];
color: string;
strokeWidth: number;
text?: string;
filled?: boolean;
}
export interface AppState {
currentTool: ToolType;
currentColor: string;
strokeWidth: number;
history: Annotation[];
historyStep: number; // For undo/redo
}
declare global {
interface Window {
acquireVsCodeApi: () => any;
}
function acquireVsCodeApi(): any;
}
export const COLORS = [
'#ef4444', // Red
'#f97316', // Orange
'#eab308', // Yellow
'#22c55e', // Green
'#06b6d4', // Cyan
'#3b82f6', // Blue
'#a855f7', // Purple
'#ec4899', // Pink
'#ffffff', // White
'#000000', // Black
];