@yorab/react-paint 0.14.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/README.md +46 -283
  2. package/dist/canvas/components/Canvas.d.ts +1 -0
  3. package/dist/canvas/components/EditTextBox.d.ts +2 -2
  4. package/dist/canvas/constants/app.d.ts +2 -0
  5. package/dist/canvas/constants/keyboard.d.ts +24 -0
  6. package/dist/canvas/hooks/useComponent.d.ts +3 -1
  7. package/dist/canvas/hooks/useDebounce.d.ts +2 -0
  8. package/dist/canvas/hooks/useDrawableCanvas.d.ts +2 -1
  9. package/dist/canvas/hooks/useKeyboard.d.ts +5 -1
  10. package/dist/canvas/hooks/useReactPaint.d.ts +1845 -8
  11. package/dist/canvas/hooks/useShapes.d.ts +1378 -4
  12. package/dist/canvas/index.d.ts +3 -3
  13. package/dist/canvas/utils/data.d.ts +2 -2
  14. package/dist/canvas/utils/file.d.ts +233 -4
  15. package/dist/canvas/utils/intersect.d.ts +4 -4
  16. package/dist/canvas/utils/selection/groupSelection.d.ts +2 -2
  17. package/dist/canvas/utils/selection/lineSelection.d.ts +6 -2
  18. package/dist/canvas/utils/selection/rectSelection.d.ts +9 -4
  19. package/dist/canvas/utils/selection.d.ts +1 -1
  20. package/dist/canvas/utils/shapes/brush.d.ts +14 -11
  21. package/dist/canvas/utils/shapes/circle.d.ts +13 -9
  22. package/dist/canvas/utils/shapes/curve.d.ts +15 -10
  23. package/dist/canvas/utils/shapes/ellipse.d.ts +13 -9
  24. package/dist/canvas/utils/shapes/index.d.ts +19 -10
  25. package/dist/canvas/utils/shapes/line.d.ts +13 -8
  26. package/dist/canvas/utils/shapes/path.d.ts +18 -2
  27. package/dist/canvas/utils/shapes/picture.d.ts +13 -9
  28. package/dist/canvas/utils/shapes/polygon.d.ts +14 -8
  29. package/dist/canvas/utils/shapes/rectangle.d.ts +54 -9
  30. package/dist/canvas/utils/shapes/text.d.ts +12 -7
  31. package/dist/canvas/utils/shapes/triangle.d.ts +4 -3
  32. package/dist/canvas/utils/trigo.d.ts +1 -1
  33. package/dist/common/types/Shapes.d.ts +63 -26
  34. package/dist/common/types/utils.d.ts +1 -1
  35. package/dist/editor/components/common/Button.d.ts +2 -2
  36. package/dist/editor/components/common/FileInput.d.ts +13 -0
  37. package/dist/editor/index.d.ts +11 -11
  38. package/dist/react-paint.css +1 -1
  39. package/dist/react-paint.js +1185 -1143
  40. package/dist/react-paint.umd.cjs +1 -1
  41. package/package.json +19 -15
@@ -14,8 +14,8 @@ type UseReactPaintProps = {
14
14
  declare const useReactPaint: ({ width, height, shapes: defaultShapes, mode, disabled, options }?: UseReactPaintProps) => {
15
15
  annotationsProps: {
16
16
  style: {
17
- 'user-select': string;
18
- 'touch-action': string;
17
+ userSelect: "none";
18
+ touchAction: string;
19
19
  transformOrigin: string;
20
20
  transform: string;
21
21
  '--react-paint-canvas-zoom': number;
@@ -26,7 +26,236 @@ declare const useReactPaint: ({ width, height, shapes: defaultShapes, mode, disa
26
26
  };
27
27
  };
28
28
  editorProps: {
29
- shapesRef: import("react").RefObject<ShapeEntity[]>;
29
+ shapesRef: import("react").RefObject<(({
30
+ id: string;
31
+ computed: {
32
+ borders: import("./../../common/types/Shapes").Rect;
33
+ outerBorders: import("./../../common/types/Shapes").Rect;
34
+ center: Point;
35
+ boundingBox: import("./../../common/types/Shapes").Rect;
36
+ };
37
+ } & {
38
+ rotation?: number;
39
+ toolId?: string;
40
+ visible?: boolean;
41
+ locked?: boolean;
42
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
43
+ } & import("./../../common/types/Shapes").Line & {
44
+ type: "line";
45
+ } & {
46
+ selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
47
+ path?: Path2D | undefined;
48
+ arrows?: import("./../../common/types/Shapes").TriangleEntity[];
49
+ type: "line";
50
+ }) | ({
51
+ id: string;
52
+ computed: {
53
+ borders: import("./../../common/types/Shapes").Rect;
54
+ outerBorders: import("./../../common/types/Shapes").Rect;
55
+ center: Point;
56
+ boundingBox: import("./../../common/types/Shapes").Rect;
57
+ };
58
+ } & {
59
+ rotation?: number;
60
+ toolId?: string;
61
+ visible?: boolean;
62
+ locked?: boolean;
63
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
64
+ } & import("./../../common/types/Shapes").Rect & {
65
+ src: string;
66
+ } & {
67
+ img: HTMLImageElement;
68
+ type: "picture";
69
+ } & {
70
+ img: HTMLImageElement;
71
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
72
+ type: "picture";
73
+ }) | ({
74
+ id: string;
75
+ computed: {
76
+ borders: import("./../../common/types/Shapes").Rect;
77
+ outerBorders: import("./../../common/types/Shapes").Rect;
78
+ center: Point;
79
+ boundingBox: import("./../../common/types/Shapes").Rect;
80
+ };
81
+ } & {
82
+ rotation?: number;
83
+ toolId?: string;
84
+ visible?: boolean;
85
+ locked?: boolean;
86
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
87
+ } & import("./../../common/types/Shapes").Rect & {
88
+ value: string[];
89
+ fontSize: number;
90
+ } & {
91
+ type: "text";
92
+ } & {
93
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
94
+ type: "text";
95
+ }) | ({
96
+ id: string;
97
+ computed: {
98
+ borders: import("./../../common/types/Shapes").Rect;
99
+ outerBorders: import("./../../common/types/Shapes").Rect;
100
+ center: Point;
101
+ boundingBox: import("./../../common/types/Shapes").Rect;
102
+ };
103
+ } & {
104
+ rotation?: number;
105
+ toolId?: string;
106
+ visible?: boolean;
107
+ locked?: boolean;
108
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
109
+ } & import("./../../common/types/Shapes").Rect & {
110
+ type: "rect";
111
+ } & {
112
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
113
+ path?: Path2D | undefined;
114
+ type: "rect";
115
+ }) | ({
116
+ id: string;
117
+ computed: {
118
+ borders: import("./../../common/types/Shapes").Rect;
119
+ outerBorders: import("./../../common/types/Shapes").Rect;
120
+ center: Point;
121
+ boundingBox: import("./../../common/types/Shapes").Rect;
122
+ };
123
+ } & {
124
+ rotation?: number;
125
+ toolId?: string;
126
+ visible?: boolean;
127
+ locked?: boolean;
128
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
129
+ } & import("./../../common/types/Shapes").Rect & {
130
+ type: "square";
131
+ } & {
132
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
133
+ path?: Path2D | undefined;
134
+ type: "square";
135
+ }) | ({
136
+ id: string;
137
+ computed: {
138
+ borders: import("./../../common/types/Shapes").Rect;
139
+ outerBorders: import("./../../common/types/Shapes").Rect;
140
+ center: Point;
141
+ boundingBox: import("./../../common/types/Shapes").Rect;
142
+ };
143
+ } & {
144
+ rotation?: number;
145
+ toolId?: string;
146
+ visible?: boolean;
147
+ locked?: boolean;
148
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
149
+ } & import("./../../common/types/Shapes").Circle & {
150
+ type: "circle";
151
+ } & {
152
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
153
+ path?: Path2D | undefined;
154
+ type: "circle";
155
+ }) | ({
156
+ id: string;
157
+ computed: {
158
+ borders: import("./../../common/types/Shapes").Rect;
159
+ outerBorders: import("./../../common/types/Shapes").Rect;
160
+ center: Point;
161
+ boundingBox: import("./../../common/types/Shapes").Rect;
162
+ };
163
+ } & {
164
+ rotation?: number;
165
+ toolId?: string;
166
+ visible?: boolean;
167
+ locked?: boolean;
168
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
169
+ } & import("./../../common/types/Shapes").Ellipse & {
170
+ type: "ellipse";
171
+ } & {
172
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
173
+ path?: Path2D | undefined;
174
+ type: "ellipse";
175
+ }) | ({
176
+ id: string;
177
+ computed: {
178
+ borders: import("./../../common/types/Shapes").Rect;
179
+ outerBorders: import("./../../common/types/Shapes").Rect;
180
+ center: Point;
181
+ boundingBox: import("./../../common/types/Shapes").Rect;
182
+ };
183
+ } & {
184
+ rotation?: number;
185
+ toolId?: string;
186
+ visible?: boolean;
187
+ locked?: boolean;
188
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
189
+ } & import("./../../common/types/Shapes").Polygon & {
190
+ type: "polygon";
191
+ } & {
192
+ selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
193
+ path?: Path2D | undefined;
194
+ type: "polygon";
195
+ }) | ({
196
+ id: string;
197
+ computed: {
198
+ borders: import("./../../common/types/Shapes").Rect;
199
+ outerBorders: import("./../../common/types/Shapes").Rect;
200
+ center: Point;
201
+ boundingBox: import("./../../common/types/Shapes").Rect;
202
+ };
203
+ } & {
204
+ rotation?: number;
205
+ toolId?: string;
206
+ visible?: boolean;
207
+ locked?: boolean;
208
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
209
+ } & import("./../../common/types/Shapes").Curve & {
210
+ type: "curve";
211
+ } & {
212
+ selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
213
+ path?: Path2D | undefined;
214
+ type: "curve";
215
+ }) | ({
216
+ id: string;
217
+ computed: {
218
+ borders: import("./../../common/types/Shapes").Rect;
219
+ outerBorders: import("./../../common/types/Shapes").Rect;
220
+ center: Point;
221
+ boundingBox: import("./../../common/types/Shapes").Rect;
222
+ };
223
+ } & {
224
+ rotation?: number;
225
+ toolId?: string;
226
+ visible?: boolean;
227
+ locked?: boolean;
228
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
229
+ } & import("./../../common/types/Shapes").Brush & {
230
+ type: "brush";
231
+ scaleX?: number;
232
+ scaleY?: number;
233
+ } & {
234
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
235
+ path?: Path2D | undefined;
236
+ type: "brush";
237
+ }) | ({
238
+ id: string;
239
+ computed: {
240
+ borders: import("./../../common/types/Shapes").Rect;
241
+ outerBorders: import("./../../common/types/Shapes").Rect;
242
+ center: Point;
243
+ boundingBox: import("./../../common/types/Shapes").Rect;
244
+ };
245
+ } & {
246
+ rotation?: number;
247
+ toolId?: string;
248
+ visible?: boolean;
249
+ locked?: boolean;
250
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
251
+ } & import("./../../common/types/Shapes").Rect & {
252
+ shapes: ShapeEntity[];
253
+ type: "group";
254
+ } & {
255
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
256
+ path?: Path2D | undefined;
257
+ type: "group";
258
+ }))[]>;
30
259
  addPictureShape: (fileOrUrl: File | string, maxWidth?: number, maxHeight?: number) => Promise<ShapeEntity<"picture">>;
31
260
  moveShapes: (startPositionShapeId: string, endPositionShapeId: string) => void;
32
261
  toggleShapeVisibility: (shapes: ShapeEntity[]) => void;
@@ -34,7 +263,236 @@ declare const useReactPaint: ({ width, height, shapes: defaultShapes, mode, disa
34
263
  canGoBackward: boolean;
35
264
  canGoForward: boolean;
36
265
  canClear: boolean;
37
- selectedShape: import("./../../common/types/Shapes").SelectionType | undefined;
266
+ selectedShape: ({
267
+ id: string;
268
+ computed: {
269
+ borders: import("./../../common/types/Shapes").Rect;
270
+ outerBorders: import("./../../common/types/Shapes").Rect;
271
+ center: Point;
272
+ boundingBox: import("./../../common/types/Shapes").Rect;
273
+ };
274
+ } & {
275
+ rotation?: number;
276
+ toolId?: string;
277
+ visible?: boolean;
278
+ locked?: boolean;
279
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
280
+ } & import("./../../common/types/Shapes").Line & {
281
+ type: "line";
282
+ } & {
283
+ selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
284
+ path?: Path2D | undefined;
285
+ arrows?: import("./../../common/types/Shapes").TriangleEntity[];
286
+ type: "line";
287
+ }) | ({
288
+ id: string;
289
+ computed: {
290
+ borders: import("./../../common/types/Shapes").Rect;
291
+ outerBorders: import("./../../common/types/Shapes").Rect;
292
+ center: Point;
293
+ boundingBox: import("./../../common/types/Shapes").Rect;
294
+ };
295
+ } & {
296
+ rotation?: number;
297
+ toolId?: string;
298
+ visible?: boolean;
299
+ locked?: boolean;
300
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
301
+ } & import("./../../common/types/Shapes").Rect & {
302
+ src: string;
303
+ } & {
304
+ img: HTMLImageElement;
305
+ type: "picture";
306
+ } & {
307
+ img: HTMLImageElement;
308
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
309
+ type: "picture";
310
+ }) | ({
311
+ id: string;
312
+ computed: {
313
+ borders: import("./../../common/types/Shapes").Rect;
314
+ outerBorders: import("./../../common/types/Shapes").Rect;
315
+ center: Point;
316
+ boundingBox: import("./../../common/types/Shapes").Rect;
317
+ };
318
+ } & {
319
+ rotation?: number;
320
+ toolId?: string;
321
+ visible?: boolean;
322
+ locked?: boolean;
323
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
324
+ } & import("./../../common/types/Shapes").Rect & {
325
+ value: string[];
326
+ fontSize: number;
327
+ } & {
328
+ type: "text";
329
+ } & {
330
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
331
+ type: "text";
332
+ }) | ({
333
+ id: string;
334
+ computed: {
335
+ borders: import("./../../common/types/Shapes").Rect;
336
+ outerBorders: import("./../../common/types/Shapes").Rect;
337
+ center: Point;
338
+ boundingBox: import("./../../common/types/Shapes").Rect;
339
+ };
340
+ } & {
341
+ rotation?: number;
342
+ toolId?: string;
343
+ visible?: boolean;
344
+ locked?: boolean;
345
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
346
+ } & import("./../../common/types/Shapes").Rect & {
347
+ type: "rect";
348
+ } & {
349
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
350
+ path?: Path2D | undefined;
351
+ type: "rect";
352
+ }) | ({
353
+ id: string;
354
+ computed: {
355
+ borders: import("./../../common/types/Shapes").Rect;
356
+ outerBorders: import("./../../common/types/Shapes").Rect;
357
+ center: Point;
358
+ boundingBox: import("./../../common/types/Shapes").Rect;
359
+ };
360
+ } & {
361
+ rotation?: number;
362
+ toolId?: string;
363
+ visible?: boolean;
364
+ locked?: boolean;
365
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
366
+ } & import("./../../common/types/Shapes").Rect & {
367
+ type: "square";
368
+ } & {
369
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
370
+ path?: Path2D | undefined;
371
+ type: "square";
372
+ }) | ({
373
+ id: string;
374
+ computed: {
375
+ borders: import("./../../common/types/Shapes").Rect;
376
+ outerBorders: import("./../../common/types/Shapes").Rect;
377
+ center: Point;
378
+ boundingBox: import("./../../common/types/Shapes").Rect;
379
+ };
380
+ } & {
381
+ rotation?: number;
382
+ toolId?: string;
383
+ visible?: boolean;
384
+ locked?: boolean;
385
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
386
+ } & import("./../../common/types/Shapes").Circle & {
387
+ type: "circle";
388
+ } & {
389
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
390
+ path?: Path2D | undefined;
391
+ type: "circle";
392
+ }) | ({
393
+ id: string;
394
+ computed: {
395
+ borders: import("./../../common/types/Shapes").Rect;
396
+ outerBorders: import("./../../common/types/Shapes").Rect;
397
+ center: Point;
398
+ boundingBox: import("./../../common/types/Shapes").Rect;
399
+ };
400
+ } & {
401
+ rotation?: number;
402
+ toolId?: string;
403
+ visible?: boolean;
404
+ locked?: boolean;
405
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
406
+ } & import("./../../common/types/Shapes").Ellipse & {
407
+ type: "ellipse";
408
+ } & {
409
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
410
+ path?: Path2D | undefined;
411
+ type: "ellipse";
412
+ }) | ({
413
+ id: string;
414
+ computed: {
415
+ borders: import("./../../common/types/Shapes").Rect;
416
+ outerBorders: import("./../../common/types/Shapes").Rect;
417
+ center: Point;
418
+ boundingBox: import("./../../common/types/Shapes").Rect;
419
+ };
420
+ } & {
421
+ rotation?: number;
422
+ toolId?: string;
423
+ visible?: boolean;
424
+ locked?: boolean;
425
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
426
+ } & import("./../../common/types/Shapes").Polygon & {
427
+ type: "polygon";
428
+ } & {
429
+ selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
430
+ path?: Path2D | undefined;
431
+ type: "polygon";
432
+ }) | ({
433
+ id: string;
434
+ computed: {
435
+ borders: import("./../../common/types/Shapes").Rect;
436
+ outerBorders: import("./../../common/types/Shapes").Rect;
437
+ center: Point;
438
+ boundingBox: import("./../../common/types/Shapes").Rect;
439
+ };
440
+ } & {
441
+ rotation?: number;
442
+ toolId?: string;
443
+ visible?: boolean;
444
+ locked?: boolean;
445
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
446
+ } & import("./../../common/types/Shapes").Curve & {
447
+ type: "curve";
448
+ } & {
449
+ selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
450
+ path?: Path2D | undefined;
451
+ type: "curve";
452
+ }) | ({
453
+ id: string;
454
+ computed: {
455
+ borders: import("./../../common/types/Shapes").Rect;
456
+ outerBorders: import("./../../common/types/Shapes").Rect;
457
+ center: Point;
458
+ boundingBox: import("./../../common/types/Shapes").Rect;
459
+ };
460
+ } & {
461
+ rotation?: number;
462
+ toolId?: string;
463
+ visible?: boolean;
464
+ locked?: boolean;
465
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
466
+ } & import("./../../common/types/Shapes").Brush & {
467
+ type: "brush";
468
+ scaleX?: number;
469
+ scaleY?: number;
470
+ } & {
471
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
472
+ path?: Path2D | undefined;
473
+ type: "brush";
474
+ }) | ({
475
+ id: string;
476
+ computed: {
477
+ borders: import("./../../common/types/Shapes").Rect;
478
+ outerBorders: import("./../../common/types/Shapes").Rect;
479
+ center: Point;
480
+ boundingBox: import("./../../common/types/Shapes").Rect;
481
+ };
482
+ } & {
483
+ rotation?: number;
484
+ toolId?: string;
485
+ visible?: boolean;
486
+ locked?: boolean;
487
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
488
+ } & import("./../../common/types/Shapes").Rect & {
489
+ shapes: ShapeEntity[];
490
+ type: "group";
491
+ } & {
492
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
493
+ path?: Path2D | undefined;
494
+ type: "group";
495
+ }) | undefined;
38
496
  removeShape: (shapes: ShapeEntity[]) => void;
39
497
  updateShape: (updatedShapes: ShapeEntity[], withSave?: boolean) => void;
40
498
  backwardShape: () => void;
@@ -61,6 +519,7 @@ declare const useReactPaint: ({ width, height, shapes: defaultShapes, mode, disa
61
519
  clearCanvas: () => void;
62
520
  settings: UtilsSettings;
63
521
  setCanvasZoom: (action: "unzoom" | "zoom" | "default") => void;
522
+ resetZoom: () => void;
64
523
  canvas: {
65
524
  canGrow: boolean;
66
525
  canShrink: boolean;
@@ -72,15 +531,1389 @@ declare const useReactPaint: ({ width, height, shapes: defaultShapes, mode, disa
72
531
  };
73
532
  };
74
533
  canvasProps: {
75
- shapesRef: import("react").RefObject<ShapeEntity[]>;
76
- selectedShape: import("./../../common/types/Shapes").SelectionType | undefined;
534
+ shapesRef: import("react").RefObject<(({
535
+ id: string;
536
+ computed: {
537
+ borders: import("./../../common/types/Shapes").Rect;
538
+ outerBorders: import("./../../common/types/Shapes").Rect;
539
+ center: Point;
540
+ boundingBox: import("./../../common/types/Shapes").Rect;
541
+ };
542
+ } & {
543
+ rotation?: number;
544
+ toolId?: string;
545
+ visible?: boolean;
546
+ locked?: boolean;
547
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
548
+ } & import("./../../common/types/Shapes").Line & {
549
+ type: "line";
550
+ } & {
551
+ selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
552
+ path?: Path2D | undefined;
553
+ arrows?: import("./../../common/types/Shapes").TriangleEntity[];
554
+ type: "line";
555
+ }) | ({
556
+ id: string;
557
+ computed: {
558
+ borders: import("./../../common/types/Shapes").Rect;
559
+ outerBorders: import("./../../common/types/Shapes").Rect;
560
+ center: Point;
561
+ boundingBox: import("./../../common/types/Shapes").Rect;
562
+ };
563
+ } & {
564
+ rotation?: number;
565
+ toolId?: string;
566
+ visible?: boolean;
567
+ locked?: boolean;
568
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
569
+ } & import("./../../common/types/Shapes").Rect & {
570
+ src: string;
571
+ } & {
572
+ img: HTMLImageElement;
573
+ type: "picture";
574
+ } & {
575
+ img: HTMLImageElement;
576
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
577
+ type: "picture";
578
+ }) | ({
579
+ id: string;
580
+ computed: {
581
+ borders: import("./../../common/types/Shapes").Rect;
582
+ outerBorders: import("./../../common/types/Shapes").Rect;
583
+ center: Point;
584
+ boundingBox: import("./../../common/types/Shapes").Rect;
585
+ };
586
+ } & {
587
+ rotation?: number;
588
+ toolId?: string;
589
+ visible?: boolean;
590
+ locked?: boolean;
591
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
592
+ } & import("./../../common/types/Shapes").Rect & {
593
+ value: string[];
594
+ fontSize: number;
595
+ } & {
596
+ type: "text";
597
+ } & {
598
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
599
+ type: "text";
600
+ }) | ({
601
+ id: string;
602
+ computed: {
603
+ borders: import("./../../common/types/Shapes").Rect;
604
+ outerBorders: import("./../../common/types/Shapes").Rect;
605
+ center: Point;
606
+ boundingBox: import("./../../common/types/Shapes").Rect;
607
+ };
608
+ } & {
609
+ rotation?: number;
610
+ toolId?: string;
611
+ visible?: boolean;
612
+ locked?: boolean;
613
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
614
+ } & import("./../../common/types/Shapes").Rect & {
615
+ type: "rect";
616
+ } & {
617
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
618
+ path?: Path2D | undefined;
619
+ type: "rect";
620
+ }) | ({
621
+ id: string;
622
+ computed: {
623
+ borders: import("./../../common/types/Shapes").Rect;
624
+ outerBorders: import("./../../common/types/Shapes").Rect;
625
+ center: Point;
626
+ boundingBox: import("./../../common/types/Shapes").Rect;
627
+ };
628
+ } & {
629
+ rotation?: number;
630
+ toolId?: string;
631
+ visible?: boolean;
632
+ locked?: boolean;
633
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
634
+ } & import("./../../common/types/Shapes").Rect & {
635
+ type: "square";
636
+ } & {
637
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
638
+ path?: Path2D | undefined;
639
+ type: "square";
640
+ }) | ({
641
+ id: string;
642
+ computed: {
643
+ borders: import("./../../common/types/Shapes").Rect;
644
+ outerBorders: import("./../../common/types/Shapes").Rect;
645
+ center: Point;
646
+ boundingBox: import("./../../common/types/Shapes").Rect;
647
+ };
648
+ } & {
649
+ rotation?: number;
650
+ toolId?: string;
651
+ visible?: boolean;
652
+ locked?: boolean;
653
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
654
+ } & import("./../../common/types/Shapes").Circle & {
655
+ type: "circle";
656
+ } & {
657
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
658
+ path?: Path2D | undefined;
659
+ type: "circle";
660
+ }) | ({
661
+ id: string;
662
+ computed: {
663
+ borders: import("./../../common/types/Shapes").Rect;
664
+ outerBorders: import("./../../common/types/Shapes").Rect;
665
+ center: Point;
666
+ boundingBox: import("./../../common/types/Shapes").Rect;
667
+ };
668
+ } & {
669
+ rotation?: number;
670
+ toolId?: string;
671
+ visible?: boolean;
672
+ locked?: boolean;
673
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
674
+ } & import("./../../common/types/Shapes").Ellipse & {
675
+ type: "ellipse";
676
+ } & {
677
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
678
+ path?: Path2D | undefined;
679
+ type: "ellipse";
680
+ }) | ({
681
+ id: string;
682
+ computed: {
683
+ borders: import("./../../common/types/Shapes").Rect;
684
+ outerBorders: import("./../../common/types/Shapes").Rect;
685
+ center: Point;
686
+ boundingBox: import("./../../common/types/Shapes").Rect;
687
+ };
688
+ } & {
689
+ rotation?: number;
690
+ toolId?: string;
691
+ visible?: boolean;
692
+ locked?: boolean;
693
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
694
+ } & import("./../../common/types/Shapes").Polygon & {
695
+ type: "polygon";
696
+ } & {
697
+ selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
698
+ path?: Path2D | undefined;
699
+ type: "polygon";
700
+ }) | ({
701
+ id: string;
702
+ computed: {
703
+ borders: import("./../../common/types/Shapes").Rect;
704
+ outerBorders: import("./../../common/types/Shapes").Rect;
705
+ center: Point;
706
+ boundingBox: import("./../../common/types/Shapes").Rect;
707
+ };
708
+ } & {
709
+ rotation?: number;
710
+ toolId?: string;
711
+ visible?: boolean;
712
+ locked?: boolean;
713
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
714
+ } & import("./../../common/types/Shapes").Curve & {
715
+ type: "curve";
716
+ } & {
717
+ selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
718
+ path?: Path2D | undefined;
719
+ type: "curve";
720
+ }) | ({
721
+ id: string;
722
+ computed: {
723
+ borders: import("./../../common/types/Shapes").Rect;
724
+ outerBorders: import("./../../common/types/Shapes").Rect;
725
+ center: Point;
726
+ boundingBox: import("./../../common/types/Shapes").Rect;
727
+ };
728
+ } & {
729
+ rotation?: number;
730
+ toolId?: string;
731
+ visible?: boolean;
732
+ locked?: boolean;
733
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
734
+ } & import("./../../common/types/Shapes").Brush & {
735
+ type: "brush";
736
+ scaleX?: number;
737
+ scaleY?: number;
738
+ } & {
739
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
740
+ path?: Path2D | undefined;
741
+ type: "brush";
742
+ }) | ({
743
+ id: string;
744
+ computed: {
745
+ borders: import("./../../common/types/Shapes").Rect;
746
+ outerBorders: import("./../../common/types/Shapes").Rect;
747
+ center: Point;
748
+ boundingBox: import("./../../common/types/Shapes").Rect;
749
+ };
750
+ } & {
751
+ rotation?: number;
752
+ toolId?: string;
753
+ visible?: boolean;
754
+ locked?: boolean;
755
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
756
+ } & import("./../../common/types/Shapes").Rect & {
757
+ shapes: ShapeEntity[];
758
+ type: "group";
759
+ } & {
760
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
761
+ path?: Path2D | undefined;
762
+ type: "group";
763
+ }))[]>;
764
+ selectedShape: ({
765
+ id: string;
766
+ computed: {
767
+ borders: import("./../../common/types/Shapes").Rect;
768
+ outerBorders: import("./../../common/types/Shapes").Rect;
769
+ center: Point;
770
+ boundingBox: import("./../../common/types/Shapes").Rect;
771
+ };
772
+ } & {
773
+ rotation?: number;
774
+ toolId?: string;
775
+ visible?: boolean;
776
+ locked?: boolean;
777
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
778
+ } & import("./../../common/types/Shapes").Line & {
779
+ type: "line";
780
+ } & {
781
+ selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
782
+ path?: Path2D | undefined;
783
+ arrows?: import("./../../common/types/Shapes").TriangleEntity[];
784
+ type: "line";
785
+ }) | ({
786
+ id: string;
787
+ computed: {
788
+ borders: import("./../../common/types/Shapes").Rect;
789
+ outerBorders: import("./../../common/types/Shapes").Rect;
790
+ center: Point;
791
+ boundingBox: import("./../../common/types/Shapes").Rect;
792
+ };
793
+ } & {
794
+ rotation?: number;
795
+ toolId?: string;
796
+ visible?: boolean;
797
+ locked?: boolean;
798
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
799
+ } & import("./../../common/types/Shapes").Rect & {
800
+ src: string;
801
+ } & {
802
+ img: HTMLImageElement;
803
+ type: "picture";
804
+ } & {
805
+ img: HTMLImageElement;
806
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
807
+ type: "picture";
808
+ }) | ({
809
+ id: string;
810
+ computed: {
811
+ borders: import("./../../common/types/Shapes").Rect;
812
+ outerBorders: import("./../../common/types/Shapes").Rect;
813
+ center: Point;
814
+ boundingBox: import("./../../common/types/Shapes").Rect;
815
+ };
816
+ } & {
817
+ rotation?: number;
818
+ toolId?: string;
819
+ visible?: boolean;
820
+ locked?: boolean;
821
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
822
+ } & import("./../../common/types/Shapes").Rect & {
823
+ value: string[];
824
+ fontSize: number;
825
+ } & {
826
+ type: "text";
827
+ } & {
828
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
829
+ type: "text";
830
+ }) | ({
831
+ id: string;
832
+ computed: {
833
+ borders: import("./../../common/types/Shapes").Rect;
834
+ outerBorders: import("./../../common/types/Shapes").Rect;
835
+ center: Point;
836
+ boundingBox: import("./../../common/types/Shapes").Rect;
837
+ };
838
+ } & {
839
+ rotation?: number;
840
+ toolId?: string;
841
+ visible?: boolean;
842
+ locked?: boolean;
843
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
844
+ } & import("./../../common/types/Shapes").Rect & {
845
+ type: "rect";
846
+ } & {
847
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
848
+ path?: Path2D | undefined;
849
+ type: "rect";
850
+ }) | ({
851
+ id: string;
852
+ computed: {
853
+ borders: import("./../../common/types/Shapes").Rect;
854
+ outerBorders: import("./../../common/types/Shapes").Rect;
855
+ center: Point;
856
+ boundingBox: import("./../../common/types/Shapes").Rect;
857
+ };
858
+ } & {
859
+ rotation?: number;
860
+ toolId?: string;
861
+ visible?: boolean;
862
+ locked?: boolean;
863
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
864
+ } & import("./../../common/types/Shapes").Rect & {
865
+ type: "square";
866
+ } & {
867
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
868
+ path?: Path2D | undefined;
869
+ type: "square";
870
+ }) | ({
871
+ id: string;
872
+ computed: {
873
+ borders: import("./../../common/types/Shapes").Rect;
874
+ outerBorders: import("./../../common/types/Shapes").Rect;
875
+ center: Point;
876
+ boundingBox: import("./../../common/types/Shapes").Rect;
877
+ };
878
+ } & {
879
+ rotation?: number;
880
+ toolId?: string;
881
+ visible?: boolean;
882
+ locked?: boolean;
883
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
884
+ } & import("./../../common/types/Shapes").Circle & {
885
+ type: "circle";
886
+ } & {
887
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
888
+ path?: Path2D | undefined;
889
+ type: "circle";
890
+ }) | ({
891
+ id: string;
892
+ computed: {
893
+ borders: import("./../../common/types/Shapes").Rect;
894
+ outerBorders: import("./../../common/types/Shapes").Rect;
895
+ center: Point;
896
+ boundingBox: import("./../../common/types/Shapes").Rect;
897
+ };
898
+ } & {
899
+ rotation?: number;
900
+ toolId?: string;
901
+ visible?: boolean;
902
+ locked?: boolean;
903
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
904
+ } & import("./../../common/types/Shapes").Ellipse & {
905
+ type: "ellipse";
906
+ } & {
907
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
908
+ path?: Path2D | undefined;
909
+ type: "ellipse";
910
+ }) | ({
911
+ id: string;
912
+ computed: {
913
+ borders: import("./../../common/types/Shapes").Rect;
914
+ outerBorders: import("./../../common/types/Shapes").Rect;
915
+ center: Point;
916
+ boundingBox: import("./../../common/types/Shapes").Rect;
917
+ };
918
+ } & {
919
+ rotation?: number;
920
+ toolId?: string;
921
+ visible?: boolean;
922
+ locked?: boolean;
923
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
924
+ } & import("./../../common/types/Shapes").Polygon & {
925
+ type: "polygon";
926
+ } & {
927
+ selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
928
+ path?: Path2D | undefined;
929
+ type: "polygon";
930
+ }) | ({
931
+ id: string;
932
+ computed: {
933
+ borders: import("./../../common/types/Shapes").Rect;
934
+ outerBorders: import("./../../common/types/Shapes").Rect;
935
+ center: Point;
936
+ boundingBox: import("./../../common/types/Shapes").Rect;
937
+ };
938
+ } & {
939
+ rotation?: number;
940
+ toolId?: string;
941
+ visible?: boolean;
942
+ locked?: boolean;
943
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
944
+ } & import("./../../common/types/Shapes").Curve & {
945
+ type: "curve";
946
+ } & {
947
+ selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
948
+ path?: Path2D | undefined;
949
+ type: "curve";
950
+ }) | ({
951
+ id: string;
952
+ computed: {
953
+ borders: import("./../../common/types/Shapes").Rect;
954
+ outerBorders: import("./../../common/types/Shapes").Rect;
955
+ center: Point;
956
+ boundingBox: import("./../../common/types/Shapes").Rect;
957
+ };
958
+ } & {
959
+ rotation?: number;
960
+ toolId?: string;
961
+ visible?: boolean;
962
+ locked?: boolean;
963
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
964
+ } & import("./../../common/types/Shapes").Brush & {
965
+ type: "brush";
966
+ scaleX?: number;
967
+ scaleY?: number;
968
+ } & {
969
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
970
+ path?: Path2D | undefined;
971
+ type: "brush";
972
+ }) | ({
973
+ id: string;
974
+ computed: {
975
+ borders: import("./../../common/types/Shapes").Rect;
976
+ outerBorders: import("./../../common/types/Shapes").Rect;
977
+ center: Point;
978
+ boundingBox: import("./../../common/types/Shapes").Rect;
979
+ };
980
+ } & {
981
+ rotation?: number;
982
+ toolId?: string;
983
+ visible?: boolean;
984
+ locked?: boolean;
985
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
986
+ } & import("./../../common/types/Shapes").Rect & {
987
+ shapes: ShapeEntity[];
988
+ type: "group";
989
+ } & {
990
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
991
+ path?: Path2D | undefined;
992
+ type: "group";
993
+ }) | undefined;
77
994
  selectionFrame: {
78
995
  oldSelection: import("./../../common/types/Shapes").SelectionType | undefined;
79
996
  frame: [Point, Point];
80
997
  } | undefined;
81
- hoveredShape: ShapeEntity | undefined;
998
+ hoveredShape: ({
999
+ id: string;
1000
+ computed: {
1001
+ borders: import("./../../common/types/Shapes").Rect;
1002
+ outerBorders: import("./../../common/types/Shapes").Rect;
1003
+ center: Point;
1004
+ boundingBox: import("./../../common/types/Shapes").Rect;
1005
+ };
1006
+ } & {
1007
+ rotation?: number;
1008
+ toolId?: string;
1009
+ visible?: boolean;
1010
+ locked?: boolean;
1011
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1012
+ } & import("./../../common/types/Shapes").Line & {
1013
+ type: "line";
1014
+ } & {
1015
+ selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
1016
+ path?: Path2D | undefined;
1017
+ arrows?: import("./../../common/types/Shapes").TriangleEntity[];
1018
+ type: "line";
1019
+ }) | ({
1020
+ id: string;
1021
+ computed: {
1022
+ borders: import("./../../common/types/Shapes").Rect;
1023
+ outerBorders: import("./../../common/types/Shapes").Rect;
1024
+ center: Point;
1025
+ boundingBox: import("./../../common/types/Shapes").Rect;
1026
+ };
1027
+ } & {
1028
+ rotation?: number;
1029
+ toolId?: string;
1030
+ visible?: boolean;
1031
+ locked?: boolean;
1032
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1033
+ } & import("./../../common/types/Shapes").Rect & {
1034
+ src: string;
1035
+ } & {
1036
+ img: HTMLImageElement;
1037
+ type: "picture";
1038
+ } & {
1039
+ img: HTMLImageElement;
1040
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1041
+ type: "picture";
1042
+ }) | ({
1043
+ id: string;
1044
+ computed: {
1045
+ borders: import("./../../common/types/Shapes").Rect;
1046
+ outerBorders: import("./../../common/types/Shapes").Rect;
1047
+ center: Point;
1048
+ boundingBox: import("./../../common/types/Shapes").Rect;
1049
+ };
1050
+ } & {
1051
+ rotation?: number;
1052
+ toolId?: string;
1053
+ visible?: boolean;
1054
+ locked?: boolean;
1055
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1056
+ } & import("./../../common/types/Shapes").Rect & {
1057
+ value: string[];
1058
+ fontSize: number;
1059
+ } & {
1060
+ type: "text";
1061
+ } & {
1062
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1063
+ type: "text";
1064
+ }) | ({
1065
+ id: string;
1066
+ computed: {
1067
+ borders: import("./../../common/types/Shapes").Rect;
1068
+ outerBorders: import("./../../common/types/Shapes").Rect;
1069
+ center: Point;
1070
+ boundingBox: import("./../../common/types/Shapes").Rect;
1071
+ };
1072
+ } & {
1073
+ rotation?: number;
1074
+ toolId?: string;
1075
+ visible?: boolean;
1076
+ locked?: boolean;
1077
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1078
+ } & import("./../../common/types/Shapes").Rect & {
1079
+ type: "rect";
1080
+ } & {
1081
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1082
+ path?: Path2D | undefined;
1083
+ type: "rect";
1084
+ }) | ({
1085
+ id: string;
1086
+ computed: {
1087
+ borders: import("./../../common/types/Shapes").Rect;
1088
+ outerBorders: import("./../../common/types/Shapes").Rect;
1089
+ center: Point;
1090
+ boundingBox: import("./../../common/types/Shapes").Rect;
1091
+ };
1092
+ } & {
1093
+ rotation?: number;
1094
+ toolId?: string;
1095
+ visible?: boolean;
1096
+ locked?: boolean;
1097
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1098
+ } & import("./../../common/types/Shapes").Rect & {
1099
+ type: "square";
1100
+ } & {
1101
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1102
+ path?: Path2D | undefined;
1103
+ type: "square";
1104
+ }) | ({
1105
+ id: string;
1106
+ computed: {
1107
+ borders: import("./../../common/types/Shapes").Rect;
1108
+ outerBorders: import("./../../common/types/Shapes").Rect;
1109
+ center: Point;
1110
+ boundingBox: import("./../../common/types/Shapes").Rect;
1111
+ };
1112
+ } & {
1113
+ rotation?: number;
1114
+ toolId?: string;
1115
+ visible?: boolean;
1116
+ locked?: boolean;
1117
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1118
+ } & import("./../../common/types/Shapes").Circle & {
1119
+ type: "circle";
1120
+ } & {
1121
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1122
+ path?: Path2D | undefined;
1123
+ type: "circle";
1124
+ }) | ({
1125
+ id: string;
1126
+ computed: {
1127
+ borders: import("./../../common/types/Shapes").Rect;
1128
+ outerBorders: import("./../../common/types/Shapes").Rect;
1129
+ center: Point;
1130
+ boundingBox: import("./../../common/types/Shapes").Rect;
1131
+ };
1132
+ } & {
1133
+ rotation?: number;
1134
+ toolId?: string;
1135
+ visible?: boolean;
1136
+ locked?: boolean;
1137
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1138
+ } & import("./../../common/types/Shapes").Ellipse & {
1139
+ type: "ellipse";
1140
+ } & {
1141
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1142
+ path?: Path2D | undefined;
1143
+ type: "ellipse";
1144
+ }) | ({
1145
+ id: string;
1146
+ computed: {
1147
+ borders: import("./../../common/types/Shapes").Rect;
1148
+ outerBorders: import("./../../common/types/Shapes").Rect;
1149
+ center: Point;
1150
+ boundingBox: import("./../../common/types/Shapes").Rect;
1151
+ };
1152
+ } & {
1153
+ rotation?: number;
1154
+ toolId?: string;
1155
+ visible?: boolean;
1156
+ locked?: boolean;
1157
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1158
+ } & import("./../../common/types/Shapes").Polygon & {
1159
+ type: "polygon";
1160
+ } & {
1161
+ selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
1162
+ path?: Path2D | undefined;
1163
+ type: "polygon";
1164
+ }) | ({
1165
+ id: string;
1166
+ computed: {
1167
+ borders: import("./../../common/types/Shapes").Rect;
1168
+ outerBorders: import("./../../common/types/Shapes").Rect;
1169
+ center: Point;
1170
+ boundingBox: import("./../../common/types/Shapes").Rect;
1171
+ };
1172
+ } & {
1173
+ rotation?: number;
1174
+ toolId?: string;
1175
+ visible?: boolean;
1176
+ locked?: boolean;
1177
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1178
+ } & import("./../../common/types/Shapes").Curve & {
1179
+ type: "curve";
1180
+ } & {
1181
+ selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
1182
+ path?: Path2D | undefined;
1183
+ type: "curve";
1184
+ }) | ({
1185
+ id: string;
1186
+ computed: {
1187
+ borders: import("./../../common/types/Shapes").Rect;
1188
+ outerBorders: import("./../../common/types/Shapes").Rect;
1189
+ center: Point;
1190
+ boundingBox: import("./../../common/types/Shapes").Rect;
1191
+ };
1192
+ } & {
1193
+ rotation?: number;
1194
+ toolId?: string;
1195
+ visible?: boolean;
1196
+ locked?: boolean;
1197
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1198
+ } & import("./../../common/types/Shapes").Brush & {
1199
+ type: "brush";
1200
+ scaleX?: number;
1201
+ scaleY?: number;
1202
+ } & {
1203
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1204
+ path?: Path2D | undefined;
1205
+ type: "brush";
1206
+ }) | ({
1207
+ id: string;
1208
+ computed: {
1209
+ borders: import("./../../common/types/Shapes").Rect;
1210
+ outerBorders: import("./../../common/types/Shapes").Rect;
1211
+ center: Point;
1212
+ boundingBox: import("./../../common/types/Shapes").Rect;
1213
+ };
1214
+ } & {
1215
+ rotation?: number;
1216
+ toolId?: string;
1217
+ visible?: boolean;
1218
+ locked?: boolean;
1219
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1220
+ } & import("./../../common/types/Shapes").Rect & {
1221
+ shapes: ShapeEntity[];
1222
+ type: "group";
1223
+ } & {
1224
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1225
+ path?: Path2D | undefined;
1226
+ type: "group";
1227
+ }) | undefined;
82
1228
  addShape: (newShapes: ShapeEntity[]) => void;
83
- setSelectedShape: import("react").Dispatch<import("react").SetStateAction<import("./../../common/types/Shapes").SelectionType | undefined>>;
1229
+ setSelectedShape: import("react").Dispatch<({
1230
+ id: string;
1231
+ computed: {
1232
+ borders: import("./../../common/types/Shapes").Rect;
1233
+ outerBorders: import("./../../common/types/Shapes").Rect;
1234
+ center: Point;
1235
+ boundingBox: import("./../../common/types/Shapes").Rect;
1236
+ };
1237
+ } & {
1238
+ rotation?: number;
1239
+ toolId?: string;
1240
+ visible?: boolean;
1241
+ locked?: boolean;
1242
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1243
+ } & import("./../../common/types/Shapes").Line & {
1244
+ type: "line";
1245
+ } & {
1246
+ selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
1247
+ path?: Path2D | undefined;
1248
+ arrows?: import("./../../common/types/Shapes").TriangleEntity[];
1249
+ type: "line";
1250
+ }) | ({
1251
+ id: string;
1252
+ computed: {
1253
+ borders: import("./../../common/types/Shapes").Rect;
1254
+ outerBorders: import("./../../common/types/Shapes").Rect;
1255
+ center: Point;
1256
+ boundingBox: import("./../../common/types/Shapes").Rect;
1257
+ };
1258
+ } & {
1259
+ rotation?: number;
1260
+ toolId?: string;
1261
+ visible?: boolean;
1262
+ locked?: boolean;
1263
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1264
+ } & import("./../../common/types/Shapes").Rect & {
1265
+ src: string;
1266
+ } & {
1267
+ img: HTMLImageElement;
1268
+ type: "picture";
1269
+ } & {
1270
+ img: HTMLImageElement;
1271
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1272
+ type: "picture";
1273
+ }) | ({
1274
+ id: string;
1275
+ computed: {
1276
+ borders: import("./../../common/types/Shapes").Rect;
1277
+ outerBorders: import("./../../common/types/Shapes").Rect;
1278
+ center: Point;
1279
+ boundingBox: import("./../../common/types/Shapes").Rect;
1280
+ };
1281
+ } & {
1282
+ rotation?: number;
1283
+ toolId?: string;
1284
+ visible?: boolean;
1285
+ locked?: boolean;
1286
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1287
+ } & import("./../../common/types/Shapes").Rect & {
1288
+ value: string[];
1289
+ fontSize: number;
1290
+ } & {
1291
+ type: "text";
1292
+ } & {
1293
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1294
+ type: "text";
1295
+ }) | ({
1296
+ id: string;
1297
+ computed: {
1298
+ borders: import("./../../common/types/Shapes").Rect;
1299
+ outerBorders: import("./../../common/types/Shapes").Rect;
1300
+ center: Point;
1301
+ boundingBox: import("./../../common/types/Shapes").Rect;
1302
+ };
1303
+ } & {
1304
+ rotation?: number;
1305
+ toolId?: string;
1306
+ visible?: boolean;
1307
+ locked?: boolean;
1308
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1309
+ } & import("./../../common/types/Shapes").Rect & {
1310
+ type: "rect";
1311
+ } & {
1312
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1313
+ path?: Path2D | undefined;
1314
+ type: "rect";
1315
+ }) | ({
1316
+ id: string;
1317
+ computed: {
1318
+ borders: import("./../../common/types/Shapes").Rect;
1319
+ outerBorders: import("./../../common/types/Shapes").Rect;
1320
+ center: Point;
1321
+ boundingBox: import("./../../common/types/Shapes").Rect;
1322
+ };
1323
+ } & {
1324
+ rotation?: number;
1325
+ toolId?: string;
1326
+ visible?: boolean;
1327
+ locked?: boolean;
1328
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1329
+ } & import("./../../common/types/Shapes").Rect & {
1330
+ type: "square";
1331
+ } & {
1332
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1333
+ path?: Path2D | undefined;
1334
+ type: "square";
1335
+ }) | ({
1336
+ id: string;
1337
+ computed: {
1338
+ borders: import("./../../common/types/Shapes").Rect;
1339
+ outerBorders: import("./../../common/types/Shapes").Rect;
1340
+ center: Point;
1341
+ boundingBox: import("./../../common/types/Shapes").Rect;
1342
+ };
1343
+ } & {
1344
+ rotation?: number;
1345
+ toolId?: string;
1346
+ visible?: boolean;
1347
+ locked?: boolean;
1348
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1349
+ } & import("./../../common/types/Shapes").Circle & {
1350
+ type: "circle";
1351
+ } & {
1352
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1353
+ path?: Path2D | undefined;
1354
+ type: "circle";
1355
+ }) | ({
1356
+ id: string;
1357
+ computed: {
1358
+ borders: import("./../../common/types/Shapes").Rect;
1359
+ outerBorders: import("./../../common/types/Shapes").Rect;
1360
+ center: Point;
1361
+ boundingBox: import("./../../common/types/Shapes").Rect;
1362
+ };
1363
+ } & {
1364
+ rotation?: number;
1365
+ toolId?: string;
1366
+ visible?: boolean;
1367
+ locked?: boolean;
1368
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1369
+ } & import("./../../common/types/Shapes").Ellipse & {
1370
+ type: "ellipse";
1371
+ } & {
1372
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1373
+ path?: Path2D | undefined;
1374
+ type: "ellipse";
1375
+ }) | ({
1376
+ id: string;
1377
+ computed: {
1378
+ borders: import("./../../common/types/Shapes").Rect;
1379
+ outerBorders: import("./../../common/types/Shapes").Rect;
1380
+ center: Point;
1381
+ boundingBox: import("./../../common/types/Shapes").Rect;
1382
+ };
1383
+ } & {
1384
+ rotation?: number;
1385
+ toolId?: string;
1386
+ visible?: boolean;
1387
+ locked?: boolean;
1388
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1389
+ } & import("./../../common/types/Shapes").Polygon & {
1390
+ type: "polygon";
1391
+ } & {
1392
+ selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
1393
+ path?: Path2D | undefined;
1394
+ type: "polygon";
1395
+ }) | ({
1396
+ id: string;
1397
+ computed: {
1398
+ borders: import("./../../common/types/Shapes").Rect;
1399
+ outerBorders: import("./../../common/types/Shapes").Rect;
1400
+ center: Point;
1401
+ boundingBox: import("./../../common/types/Shapes").Rect;
1402
+ };
1403
+ } & {
1404
+ rotation?: number;
1405
+ toolId?: string;
1406
+ visible?: boolean;
1407
+ locked?: boolean;
1408
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1409
+ } & import("./../../common/types/Shapes").Curve & {
1410
+ type: "curve";
1411
+ } & {
1412
+ selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
1413
+ path?: Path2D | undefined;
1414
+ type: "curve";
1415
+ }) | ({
1416
+ id: string;
1417
+ computed: {
1418
+ borders: import("./../../common/types/Shapes").Rect;
1419
+ outerBorders: import("./../../common/types/Shapes").Rect;
1420
+ center: Point;
1421
+ boundingBox: import("./../../common/types/Shapes").Rect;
1422
+ };
1423
+ } & {
1424
+ rotation?: number;
1425
+ toolId?: string;
1426
+ visible?: boolean;
1427
+ locked?: boolean;
1428
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1429
+ } & import("./../../common/types/Shapes").Brush & {
1430
+ type: "brush";
1431
+ scaleX?: number;
1432
+ scaleY?: number;
1433
+ } & {
1434
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1435
+ path?: Path2D | undefined;
1436
+ type: "brush";
1437
+ }) | ({
1438
+ id: string;
1439
+ computed: {
1440
+ borders: import("./../../common/types/Shapes").Rect;
1441
+ outerBorders: import("./../../common/types/Shapes").Rect;
1442
+ center: Point;
1443
+ boundingBox: import("./../../common/types/Shapes").Rect;
1444
+ };
1445
+ } & {
1446
+ rotation?: number;
1447
+ toolId?: string;
1448
+ visible?: boolean;
1449
+ locked?: boolean;
1450
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1451
+ } & import("./../../common/types/Shapes").Rect & {
1452
+ shapes: ShapeEntity[];
1453
+ type: "group";
1454
+ } & {
1455
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1456
+ path?: Path2D | undefined;
1457
+ type: "group";
1458
+ }) | ((prevState: ({
1459
+ id: string;
1460
+ computed: {
1461
+ borders: import("./../../common/types/Shapes").Rect;
1462
+ outerBorders: import("./../../common/types/Shapes").Rect;
1463
+ center: Point;
1464
+ boundingBox: import("./../../common/types/Shapes").Rect;
1465
+ };
1466
+ } & {
1467
+ rotation?: number;
1468
+ toolId?: string;
1469
+ visible?: boolean;
1470
+ locked?: boolean;
1471
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1472
+ } & import("./../../common/types/Shapes").Line & {
1473
+ type: "line";
1474
+ } & {
1475
+ selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
1476
+ path?: Path2D | undefined;
1477
+ arrows?: import("./../../common/types/Shapes").TriangleEntity[];
1478
+ type: "line";
1479
+ }) | ({
1480
+ id: string;
1481
+ computed: {
1482
+ borders: import("./../../common/types/Shapes").Rect;
1483
+ outerBorders: import("./../../common/types/Shapes").Rect;
1484
+ center: Point;
1485
+ boundingBox: import("./../../common/types/Shapes").Rect;
1486
+ };
1487
+ } & {
1488
+ rotation?: number;
1489
+ toolId?: string;
1490
+ visible?: boolean;
1491
+ locked?: boolean;
1492
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1493
+ } & import("./../../common/types/Shapes").Rect & {
1494
+ src: string;
1495
+ } & {
1496
+ img: HTMLImageElement;
1497
+ type: "picture";
1498
+ } & {
1499
+ img: HTMLImageElement;
1500
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1501
+ type: "picture";
1502
+ }) | ({
1503
+ id: string;
1504
+ computed: {
1505
+ borders: import("./../../common/types/Shapes").Rect;
1506
+ outerBorders: import("./../../common/types/Shapes").Rect;
1507
+ center: Point;
1508
+ boundingBox: import("./../../common/types/Shapes").Rect;
1509
+ };
1510
+ } & {
1511
+ rotation?: number;
1512
+ toolId?: string;
1513
+ visible?: boolean;
1514
+ locked?: boolean;
1515
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1516
+ } & import("./../../common/types/Shapes").Rect & {
1517
+ value: string[];
1518
+ fontSize: number;
1519
+ } & {
1520
+ type: "text";
1521
+ } & {
1522
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1523
+ type: "text";
1524
+ }) | ({
1525
+ id: string;
1526
+ computed: {
1527
+ borders: import("./../../common/types/Shapes").Rect;
1528
+ outerBorders: import("./../../common/types/Shapes").Rect;
1529
+ center: Point;
1530
+ boundingBox: import("./../../common/types/Shapes").Rect;
1531
+ };
1532
+ } & {
1533
+ rotation?: number;
1534
+ toolId?: string;
1535
+ visible?: boolean;
1536
+ locked?: boolean;
1537
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1538
+ } & import("./../../common/types/Shapes").Rect & {
1539
+ type: "rect";
1540
+ } & {
1541
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1542
+ path?: Path2D | undefined;
1543
+ type: "rect";
1544
+ }) | ({
1545
+ id: string;
1546
+ computed: {
1547
+ borders: import("./../../common/types/Shapes").Rect;
1548
+ outerBorders: import("./../../common/types/Shapes").Rect;
1549
+ center: Point;
1550
+ boundingBox: import("./../../common/types/Shapes").Rect;
1551
+ };
1552
+ } & {
1553
+ rotation?: number;
1554
+ toolId?: string;
1555
+ visible?: boolean;
1556
+ locked?: boolean;
1557
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1558
+ } & import("./../../common/types/Shapes").Rect & {
1559
+ type: "square";
1560
+ } & {
1561
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1562
+ path?: Path2D | undefined;
1563
+ type: "square";
1564
+ }) | ({
1565
+ id: string;
1566
+ computed: {
1567
+ borders: import("./../../common/types/Shapes").Rect;
1568
+ outerBorders: import("./../../common/types/Shapes").Rect;
1569
+ center: Point;
1570
+ boundingBox: import("./../../common/types/Shapes").Rect;
1571
+ };
1572
+ } & {
1573
+ rotation?: number;
1574
+ toolId?: string;
1575
+ visible?: boolean;
1576
+ locked?: boolean;
1577
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1578
+ } & import("./../../common/types/Shapes").Circle & {
1579
+ type: "circle";
1580
+ } & {
1581
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1582
+ path?: Path2D | undefined;
1583
+ type: "circle";
1584
+ }) | ({
1585
+ id: string;
1586
+ computed: {
1587
+ borders: import("./../../common/types/Shapes").Rect;
1588
+ outerBorders: import("./../../common/types/Shapes").Rect;
1589
+ center: Point;
1590
+ boundingBox: import("./../../common/types/Shapes").Rect;
1591
+ };
1592
+ } & {
1593
+ rotation?: number;
1594
+ toolId?: string;
1595
+ visible?: boolean;
1596
+ locked?: boolean;
1597
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1598
+ } & import("./../../common/types/Shapes").Ellipse & {
1599
+ type: "ellipse";
1600
+ } & {
1601
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1602
+ path?: Path2D | undefined;
1603
+ type: "ellipse";
1604
+ }) | ({
1605
+ id: string;
1606
+ computed: {
1607
+ borders: import("./../../common/types/Shapes").Rect;
1608
+ outerBorders: import("./../../common/types/Shapes").Rect;
1609
+ center: Point;
1610
+ boundingBox: import("./../../common/types/Shapes").Rect;
1611
+ };
1612
+ } & {
1613
+ rotation?: number;
1614
+ toolId?: string;
1615
+ visible?: boolean;
1616
+ locked?: boolean;
1617
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1618
+ } & import("./../../common/types/Shapes").Polygon & {
1619
+ type: "polygon";
1620
+ } & {
1621
+ selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
1622
+ path?: Path2D | undefined;
1623
+ type: "polygon";
1624
+ }) | ({
1625
+ id: string;
1626
+ computed: {
1627
+ borders: import("./../../common/types/Shapes").Rect;
1628
+ outerBorders: import("./../../common/types/Shapes").Rect;
1629
+ center: Point;
1630
+ boundingBox: import("./../../common/types/Shapes").Rect;
1631
+ };
1632
+ } & {
1633
+ rotation?: number;
1634
+ toolId?: string;
1635
+ visible?: boolean;
1636
+ locked?: boolean;
1637
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1638
+ } & import("./../../common/types/Shapes").Curve & {
1639
+ type: "curve";
1640
+ } & {
1641
+ selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
1642
+ path?: Path2D | undefined;
1643
+ type: "curve";
1644
+ }) | ({
1645
+ id: string;
1646
+ computed: {
1647
+ borders: import("./../../common/types/Shapes").Rect;
1648
+ outerBorders: import("./../../common/types/Shapes").Rect;
1649
+ center: Point;
1650
+ boundingBox: import("./../../common/types/Shapes").Rect;
1651
+ };
1652
+ } & {
1653
+ rotation?: number;
1654
+ toolId?: string;
1655
+ visible?: boolean;
1656
+ locked?: boolean;
1657
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1658
+ } & import("./../../common/types/Shapes").Brush & {
1659
+ type: "brush";
1660
+ scaleX?: number;
1661
+ scaleY?: number;
1662
+ } & {
1663
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1664
+ path?: Path2D | undefined;
1665
+ type: "brush";
1666
+ }) | ({
1667
+ id: string;
1668
+ computed: {
1669
+ borders: import("./../../common/types/Shapes").Rect;
1670
+ outerBorders: import("./../../common/types/Shapes").Rect;
1671
+ center: Point;
1672
+ boundingBox: import("./../../common/types/Shapes").Rect;
1673
+ };
1674
+ } & {
1675
+ rotation?: number;
1676
+ toolId?: string;
1677
+ visible?: boolean;
1678
+ locked?: boolean;
1679
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1680
+ } & import("./../../common/types/Shapes").Rect & {
1681
+ shapes: ShapeEntity[];
1682
+ type: "group";
1683
+ } & {
1684
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1685
+ path?: Path2D | undefined;
1686
+ type: "group";
1687
+ }) | undefined) => ({
1688
+ id: string;
1689
+ computed: {
1690
+ borders: import("./../../common/types/Shapes").Rect;
1691
+ outerBorders: import("./../../common/types/Shapes").Rect;
1692
+ center: Point;
1693
+ boundingBox: import("./../../common/types/Shapes").Rect;
1694
+ };
1695
+ } & {
1696
+ rotation?: number;
1697
+ toolId?: string;
1698
+ visible?: boolean;
1699
+ locked?: boolean;
1700
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1701
+ } & import("./../../common/types/Shapes").Line & {
1702
+ type: "line";
1703
+ } & {
1704
+ selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
1705
+ path?: Path2D | undefined;
1706
+ arrows?: import("./../../common/types/Shapes").TriangleEntity[];
1707
+ type: "line";
1708
+ }) | ({
1709
+ id: string;
1710
+ computed: {
1711
+ borders: import("./../../common/types/Shapes").Rect;
1712
+ outerBorders: import("./../../common/types/Shapes").Rect;
1713
+ center: Point;
1714
+ boundingBox: import("./../../common/types/Shapes").Rect;
1715
+ };
1716
+ } & {
1717
+ rotation?: number;
1718
+ toolId?: string;
1719
+ visible?: boolean;
1720
+ locked?: boolean;
1721
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1722
+ } & import("./../../common/types/Shapes").Rect & {
1723
+ src: string;
1724
+ } & {
1725
+ img: HTMLImageElement;
1726
+ type: "picture";
1727
+ } & {
1728
+ img: HTMLImageElement;
1729
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1730
+ type: "picture";
1731
+ }) | ({
1732
+ id: string;
1733
+ computed: {
1734
+ borders: import("./../../common/types/Shapes").Rect;
1735
+ outerBorders: import("./../../common/types/Shapes").Rect;
1736
+ center: Point;
1737
+ boundingBox: import("./../../common/types/Shapes").Rect;
1738
+ };
1739
+ } & {
1740
+ rotation?: number;
1741
+ toolId?: string;
1742
+ visible?: boolean;
1743
+ locked?: boolean;
1744
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1745
+ } & import("./../../common/types/Shapes").Rect & {
1746
+ value: string[];
1747
+ fontSize: number;
1748
+ } & {
1749
+ type: "text";
1750
+ } & {
1751
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1752
+ type: "text";
1753
+ }) | ({
1754
+ id: string;
1755
+ computed: {
1756
+ borders: import("./../../common/types/Shapes").Rect;
1757
+ outerBorders: import("./../../common/types/Shapes").Rect;
1758
+ center: Point;
1759
+ boundingBox: import("./../../common/types/Shapes").Rect;
1760
+ };
1761
+ } & {
1762
+ rotation?: number;
1763
+ toolId?: string;
1764
+ visible?: boolean;
1765
+ locked?: boolean;
1766
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1767
+ } & import("./../../common/types/Shapes").Rect & {
1768
+ type: "rect";
1769
+ } & {
1770
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1771
+ path?: Path2D | undefined;
1772
+ type: "rect";
1773
+ }) | ({
1774
+ id: string;
1775
+ computed: {
1776
+ borders: import("./../../common/types/Shapes").Rect;
1777
+ outerBorders: import("./../../common/types/Shapes").Rect;
1778
+ center: Point;
1779
+ boundingBox: import("./../../common/types/Shapes").Rect;
1780
+ };
1781
+ } & {
1782
+ rotation?: number;
1783
+ toolId?: string;
1784
+ visible?: boolean;
1785
+ locked?: boolean;
1786
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1787
+ } & import("./../../common/types/Shapes").Rect & {
1788
+ type: "square";
1789
+ } & {
1790
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1791
+ path?: Path2D | undefined;
1792
+ type: "square";
1793
+ }) | ({
1794
+ id: string;
1795
+ computed: {
1796
+ borders: import("./../../common/types/Shapes").Rect;
1797
+ outerBorders: import("./../../common/types/Shapes").Rect;
1798
+ center: Point;
1799
+ boundingBox: import("./../../common/types/Shapes").Rect;
1800
+ };
1801
+ } & {
1802
+ rotation?: number;
1803
+ toolId?: string;
1804
+ visible?: boolean;
1805
+ locked?: boolean;
1806
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1807
+ } & import("./../../common/types/Shapes").Circle & {
1808
+ type: "circle";
1809
+ } & {
1810
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1811
+ path?: Path2D | undefined;
1812
+ type: "circle";
1813
+ }) | ({
1814
+ id: string;
1815
+ computed: {
1816
+ borders: import("./../../common/types/Shapes").Rect;
1817
+ outerBorders: import("./../../common/types/Shapes").Rect;
1818
+ center: Point;
1819
+ boundingBox: import("./../../common/types/Shapes").Rect;
1820
+ };
1821
+ } & {
1822
+ rotation?: number;
1823
+ toolId?: string;
1824
+ visible?: boolean;
1825
+ locked?: boolean;
1826
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1827
+ } & import("./../../common/types/Shapes").Ellipse & {
1828
+ type: "ellipse";
1829
+ } & {
1830
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1831
+ path?: Path2D | undefined;
1832
+ type: "ellipse";
1833
+ }) | ({
1834
+ id: string;
1835
+ computed: {
1836
+ borders: import("./../../common/types/Shapes").Rect;
1837
+ outerBorders: import("./../../common/types/Shapes").Rect;
1838
+ center: Point;
1839
+ boundingBox: import("./../../common/types/Shapes").Rect;
1840
+ };
1841
+ } & {
1842
+ rotation?: number;
1843
+ toolId?: string;
1844
+ visible?: boolean;
1845
+ locked?: boolean;
1846
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1847
+ } & import("./../../common/types/Shapes").Polygon & {
1848
+ type: "polygon";
1849
+ } & {
1850
+ selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
1851
+ path?: Path2D | undefined;
1852
+ type: "polygon";
1853
+ }) | ({
1854
+ id: string;
1855
+ computed: {
1856
+ borders: import("./../../common/types/Shapes").Rect;
1857
+ outerBorders: import("./../../common/types/Shapes").Rect;
1858
+ center: Point;
1859
+ boundingBox: import("./../../common/types/Shapes").Rect;
1860
+ };
1861
+ } & {
1862
+ rotation?: number;
1863
+ toolId?: string;
1864
+ visible?: boolean;
1865
+ locked?: boolean;
1866
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1867
+ } & import("./../../common/types/Shapes").Curve & {
1868
+ type: "curve";
1869
+ } & {
1870
+ selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
1871
+ path?: Path2D | undefined;
1872
+ type: "curve";
1873
+ }) | ({
1874
+ id: string;
1875
+ computed: {
1876
+ borders: import("./../../common/types/Shapes").Rect;
1877
+ outerBorders: import("./../../common/types/Shapes").Rect;
1878
+ center: Point;
1879
+ boundingBox: import("./../../common/types/Shapes").Rect;
1880
+ };
1881
+ } & {
1882
+ rotation?: number;
1883
+ toolId?: string;
1884
+ visible?: boolean;
1885
+ locked?: boolean;
1886
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1887
+ } & import("./../../common/types/Shapes").Brush & {
1888
+ type: "brush";
1889
+ scaleX?: number;
1890
+ scaleY?: number;
1891
+ } & {
1892
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1893
+ path?: Path2D | undefined;
1894
+ type: "brush";
1895
+ }) | ({
1896
+ id: string;
1897
+ computed: {
1898
+ borders: import("./../../common/types/Shapes").Rect;
1899
+ outerBorders: import("./../../common/types/Shapes").Rect;
1900
+ center: Point;
1901
+ boundingBox: import("./../../common/types/Shapes").Rect;
1902
+ };
1903
+ } & {
1904
+ rotation?: number;
1905
+ toolId?: string;
1906
+ visible?: boolean;
1907
+ locked?: boolean;
1908
+ style?: import("./../../common/types/Shapes").StyleShape | undefined;
1909
+ } & import("./../../common/types/Shapes").Rect & {
1910
+ shapes: ShapeEntity[];
1911
+ type: "group";
1912
+ } & {
1913
+ selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1914
+ path?: Path2D | undefined;
1915
+ type: "group";
1916
+ }) | undefined) | undefined>;
84
1917
  setSelectionFrame: import("react").Dispatch<import("react").SetStateAction<{
85
1918
  oldSelection: import("./../../common/types/Shapes").SelectionType | undefined;
86
1919
  frame: [Point, Point];
@@ -103,10 +1936,12 @@ declare const useReactPaint: ({ width, height, shapes: defaultShapes, mode, disa
103
1936
  setCanvasSize: import("react").Dispatch<import("react").SetStateAction<CanvasSize>>;
104
1937
  setCanvasOffset: (newOffset: Point) => void;
105
1938
  setCanvasZoom: (action: "unzoom" | "zoom" | "default") => void;
1939
+ resetZoom: () => void;
106
1940
  selectShapes: (shapes: ShapeEntity[]) => void;
107
1941
  activeTool: ToolsType;
108
1942
  setActiveTool: import("react").Dispatch<import("react").SetStateAction<ToolsType>>;
109
1943
  isInsideComponent: boolean;
1944
+ isInsideCanvas: boolean;
110
1945
  isEditMode: boolean;
111
1946
  canvas: {
112
1947
  withSkeleton: boolean;
@@ -127,8 +1962,10 @@ declare const useReactPaint: ({ width, height, shapes: defaultShapes, mode, disa
127
1962
  setCanvasMoveAcceleration: import("react").Dispatch<import("react").SetStateAction<Point>>;
128
1963
  isShiftPressed: boolean;
129
1964
  isAltPressed: boolean;
1965
+ isSpacePressed: boolean;
130
1966
  setShiftPressed: import("react").Dispatch<import("react").SetStateAction<boolean>>;
131
1967
  setAltPressed: import("react").Dispatch<import("react").SetStateAction<boolean>>;
1968
+ setIsSpacePressed: import("react").Dispatch<import("react").SetStateAction<boolean>>;
132
1969
  };
133
1970
  registerEvent: (event: "dataChanged", fn: (data: StateData, source: "user" | "remote") => void) => void;
134
1971
  unregisterEvent: (event: "dataChanged", fn?: (data: StateData, source: "user" | "remote") => void) => void;