asdf98 commited on
Commit
7a58b0e
·
verified ·
1 Parent(s): 9150827

fix: add captureId to RefImage for reliable capture dedupe

Browse files
Files changed (1) hide show
  1. src/types.ts +60 -60
src/types.ts CHANGED
@@ -1,60 +1,60 @@
1
- export interface RefImage {
2
- id: string;
3
- url: string;
4
- sourceUrl?: string;
5
- x: number;
6
- y: number;
7
- width: number;
8
- height: number;
9
- aspectRatio: number;
10
- isDesaturated?: boolean;
11
- isFlippedH?: boolean;
12
- isFlippedV?: boolean;
13
- groupId?: string;
14
- crop?: { left: number; right: number; top: number; bottom: number };
15
- }
16
-
17
- export interface TextNote {
18
- id: string;
19
- text: string;
20
- x: number;
21
- y: number;
22
- width: number;
23
- height?: number;
24
- color?: string;
25
- bgColor?: string;
26
- fontSize?: number;
27
- fontFamily?: string;
28
- alignment?: 'left' | 'center' | 'right';
29
- isBold?: boolean;
30
- isItalic?: boolean;
31
- isUnderline?: boolean;
32
- groupId?: string;
33
- }
34
-
35
- export type ContextMenuState = {
36
- x: number;
37
- y: number;
38
- imageId: string | null;
39
- } | null;
40
-
41
- export interface Point {
42
- x: number;
43
- y: number;
44
- }
45
-
46
- export interface Palette {
47
- imageId: string;
48
- colors: string[];
49
- x: number;
50
- y: number;
51
- }
52
-
53
- export interface AnnotationPath {
54
- id: string;
55
- points: Point[];
56
- color: string;
57
- strokeWidth: number;
58
- groupId?: string;
59
- isHighlighter?: boolean;
60
- }
 
1
+ export interface RefImage {
2
+ id: string;
3
+ url: string;
4
+ sourceUrl?: string;
5
+ captureId?: string;
6
+ x: number;
7
+ y: number;
8
+ width: number;
9
+ height: number;
10
+ aspectRatio: number;
11
+ isDesaturated?: boolean;
12
+ isFlippedH?: boolean;
13
+ isFlippedV?: boolean;
14
+ groupId?: string;
15
+ crop?: { left: number; right: number; top: number; bottom: number };
16
+ }
17
+
18
+ export interface TextNote {
19
+ id: string;
20
+ text: string;
21
+ x: number;
22
+ y: number;
23
+ width: number;
24
+ height?: number;
25
+ color?: string;
26
+ bgColor?: string;
27
+ fontSize?: number;
28
+ fontFamily?: string;
29
+ alignment?: 'left' | 'center' | 'right';
30
+ isBold?: boolean;
31
+ isItalic?: boolean;
32
+ isUnderline?: boolean;
33
+ groupId?: string;
34
+ }
35
+
36
+ export type ContextMenuState = {
37
+ x: number;
38
+ y: number;
39
+ imageId: string | null;
40
+ } | null;
41
+
42
+ export interface Point {
43
+ x: number;
44
+ y: number;
45
+ }
46
+
47
+ export interface Palette {
48
+ imageId: string;
49
+ colors: string[];
50
+ x: number;
51
+ y: number;
52
+ }
53
+
54
+ export interface AnnotationPath {
55
+ id: string;
56
+ points: Point[];
57
+ color: string;
58
+ strokeWidth: number;
59
+ groupId?: string;
60
+ }