@yorab/react-paint 0.16.0 → 0.16.1

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.
@@ -11,6 +11,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
11
11
  center: Point;
12
12
  boundingBox: import("./../../common/types/Shapes").Rect;
13
13
  };
14
+ path?: Path2D | undefined;
14
15
  } & {
15
16
  rotation?: number;
16
17
  toolId?: string;
@@ -21,7 +22,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
21
22
  type: "line";
22
23
  } & {
23
24
  selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
24
- path?: Path2D | undefined;
25
25
  arrows?: import("./../../common/types/Shapes").TriangleEntity[];
26
26
  type: "line";
27
27
  }) | ({
@@ -32,6 +32,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
32
32
  center: Point;
33
33
  boundingBox: import("./../../common/types/Shapes").Rect;
34
34
  };
35
+ path?: Path2D | undefined;
35
36
  } & {
36
37
  rotation?: number;
37
38
  toolId?: string;
@@ -44,6 +45,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
44
45
  img: HTMLImageElement;
45
46
  flipX?: boolean;
46
47
  flipY?: boolean;
48
+ ratio?: number;
47
49
  type: "picture";
48
50
  } & {
49
51
  img: HTMLImageElement;
@@ -57,6 +59,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
57
59
  center: Point;
58
60
  boundingBox: import("./../../common/types/Shapes").Rect;
59
61
  };
62
+ path?: Path2D | undefined;
60
63
  } & {
61
64
  rotation?: number;
62
65
  toolId?: string;
@@ -69,6 +72,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
69
72
  } & {
70
73
  flipX?: boolean;
71
74
  flipY?: boolean;
75
+ ratio?: number;
72
76
  type: "text";
73
77
  } & {
74
78
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
@@ -81,6 +85,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
81
85
  center: Point;
82
86
  boundingBox: import("./../../common/types/Shapes").Rect;
83
87
  };
88
+ path?: Path2D | undefined;
84
89
  } & {
85
90
  rotation?: number;
86
91
  toolId?: string;
@@ -91,7 +96,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
91
96
  type: "rect";
92
97
  } & {
93
98
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
94
- path?: Path2D | undefined;
95
99
  type: "rect";
96
100
  }) | ({
97
101
  id: string;
@@ -101,6 +105,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
101
105
  center: Point;
102
106
  boundingBox: import("./../../common/types/Shapes").Rect;
103
107
  };
108
+ path?: Path2D | undefined;
104
109
  } & {
105
110
  rotation?: number;
106
111
  toolId?: string;
@@ -111,7 +116,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
111
116
  type: "square";
112
117
  } & {
113
118
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
114
- path?: Path2D | undefined;
115
119
  type: "square";
116
120
  }) | ({
117
121
  id: string;
@@ -121,6 +125,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
121
125
  center: Point;
122
126
  boundingBox: import("./../../common/types/Shapes").Rect;
123
127
  };
128
+ path?: Path2D | undefined;
124
129
  } & {
125
130
  rotation?: number;
126
131
  toolId?: string;
@@ -131,7 +136,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
131
136
  type: "circle";
132
137
  } & {
133
138
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
134
- path?: Path2D | undefined;
135
139
  type: "circle";
136
140
  }) | ({
137
141
  id: string;
@@ -141,6 +145,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
141
145
  center: Point;
142
146
  boundingBox: import("./../../common/types/Shapes").Rect;
143
147
  };
148
+ path?: Path2D | undefined;
144
149
  } & {
145
150
  rotation?: number;
146
151
  toolId?: string;
@@ -151,7 +156,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
151
156
  type: "ellipse";
152
157
  } & {
153
158
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
154
- path?: Path2D | undefined;
155
159
  type: "ellipse";
156
160
  }) | ({
157
161
  id: string;
@@ -161,6 +165,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
161
165
  center: Point;
162
166
  boundingBox: import("./../../common/types/Shapes").Rect;
163
167
  };
168
+ path?: Path2D | undefined;
164
169
  } & {
165
170
  rotation?: number;
166
171
  toolId?: string;
@@ -171,7 +176,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
171
176
  type: "polygon";
172
177
  } & {
173
178
  selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
174
- path?: Path2D | undefined;
175
179
  type: "polygon";
176
180
  }) | ({
177
181
  id: string;
@@ -181,6 +185,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
181
185
  center: Point;
182
186
  boundingBox: import("./../../common/types/Shapes").Rect;
183
187
  };
188
+ path?: Path2D | undefined;
184
189
  } & {
185
190
  rotation?: number;
186
191
  toolId?: string;
@@ -191,7 +196,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
191
196
  type: "curve";
192
197
  } & {
193
198
  selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
194
- path?: Path2D | undefined;
195
199
  type: "curve";
196
200
  }) | ({
197
201
  id: string;
@@ -201,6 +205,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
201
205
  center: Point;
202
206
  boundingBox: import("./../../common/types/Shapes").Rect;
203
207
  };
208
+ path?: Path2D | undefined;
204
209
  } & {
205
210
  rotation?: number;
206
211
  toolId?: string;
@@ -213,7 +218,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
213
218
  scaleY?: number;
214
219
  } & {
215
220
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
216
- path?: Path2D | undefined;
217
221
  type: "brush";
218
222
  }) | ({
219
223
  id: string;
@@ -223,6 +227,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
223
227
  center: Point;
224
228
  boundingBox: import("./../../common/types/Shapes").Rect;
225
229
  };
230
+ path?: Path2D | undefined;
226
231
  } & {
227
232
  rotation?: number;
228
233
  toolId?: string;
@@ -234,7 +239,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
234
239
  type: "group";
235
240
  } & {
236
241
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
237
- path?: Path2D | undefined;
238
242
  type: "group";
239
243
  }))[]>;
240
244
  selectedShape: ({
@@ -245,6 +249,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
245
249
  center: Point;
246
250
  boundingBox: import("./../../common/types/Shapes").Rect;
247
251
  };
252
+ path?: Path2D | undefined;
248
253
  } & {
249
254
  rotation?: number;
250
255
  toolId?: string;
@@ -255,7 +260,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
255
260
  type: "line";
256
261
  } & {
257
262
  selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
258
- path?: Path2D | undefined;
259
263
  arrows?: import("./../../common/types/Shapes").TriangleEntity[];
260
264
  type: "line";
261
265
  }) | ({
@@ -266,6 +270,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
266
270
  center: Point;
267
271
  boundingBox: import("./../../common/types/Shapes").Rect;
268
272
  };
273
+ path?: Path2D | undefined;
269
274
  } & {
270
275
  rotation?: number;
271
276
  toolId?: string;
@@ -278,6 +283,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
278
283
  img: HTMLImageElement;
279
284
  flipX?: boolean;
280
285
  flipY?: boolean;
286
+ ratio?: number;
281
287
  type: "picture";
282
288
  } & {
283
289
  img: HTMLImageElement;
@@ -291,6 +297,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
291
297
  center: Point;
292
298
  boundingBox: import("./../../common/types/Shapes").Rect;
293
299
  };
300
+ path?: Path2D | undefined;
294
301
  } & {
295
302
  rotation?: number;
296
303
  toolId?: string;
@@ -303,6 +310,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
303
310
  } & {
304
311
  flipX?: boolean;
305
312
  flipY?: boolean;
313
+ ratio?: number;
306
314
  type: "text";
307
315
  } & {
308
316
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
@@ -315,6 +323,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
315
323
  center: Point;
316
324
  boundingBox: import("./../../common/types/Shapes").Rect;
317
325
  };
326
+ path?: Path2D | undefined;
318
327
  } & {
319
328
  rotation?: number;
320
329
  toolId?: string;
@@ -325,7 +334,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
325
334
  type: "rect";
326
335
  } & {
327
336
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
328
- path?: Path2D | undefined;
329
337
  type: "rect";
330
338
  }) | ({
331
339
  id: string;
@@ -335,6 +343,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
335
343
  center: Point;
336
344
  boundingBox: import("./../../common/types/Shapes").Rect;
337
345
  };
346
+ path?: Path2D | undefined;
338
347
  } & {
339
348
  rotation?: number;
340
349
  toolId?: string;
@@ -345,7 +354,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
345
354
  type: "square";
346
355
  } & {
347
356
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
348
- path?: Path2D | undefined;
349
357
  type: "square";
350
358
  }) | ({
351
359
  id: string;
@@ -355,6 +363,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
355
363
  center: Point;
356
364
  boundingBox: import("./../../common/types/Shapes").Rect;
357
365
  };
366
+ path?: Path2D | undefined;
358
367
  } & {
359
368
  rotation?: number;
360
369
  toolId?: string;
@@ -365,7 +374,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
365
374
  type: "circle";
366
375
  } & {
367
376
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
368
- path?: Path2D | undefined;
369
377
  type: "circle";
370
378
  }) | ({
371
379
  id: string;
@@ -375,6 +383,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
375
383
  center: Point;
376
384
  boundingBox: import("./../../common/types/Shapes").Rect;
377
385
  };
386
+ path?: Path2D | undefined;
378
387
  } & {
379
388
  rotation?: number;
380
389
  toolId?: string;
@@ -385,7 +394,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
385
394
  type: "ellipse";
386
395
  } & {
387
396
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
388
- path?: Path2D | undefined;
389
397
  type: "ellipse";
390
398
  }) | ({
391
399
  id: string;
@@ -395,6 +403,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
395
403
  center: Point;
396
404
  boundingBox: import("./../../common/types/Shapes").Rect;
397
405
  };
406
+ path?: Path2D | undefined;
398
407
  } & {
399
408
  rotation?: number;
400
409
  toolId?: string;
@@ -405,7 +414,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
405
414
  type: "polygon";
406
415
  } & {
407
416
  selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
408
- path?: Path2D | undefined;
409
417
  type: "polygon";
410
418
  }) | ({
411
419
  id: string;
@@ -415,6 +423,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
415
423
  center: Point;
416
424
  boundingBox: import("./../../common/types/Shapes").Rect;
417
425
  };
426
+ path?: Path2D | undefined;
418
427
  } & {
419
428
  rotation?: number;
420
429
  toolId?: string;
@@ -425,7 +434,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
425
434
  type: "curve";
426
435
  } & {
427
436
  selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
428
- path?: Path2D | undefined;
429
437
  type: "curve";
430
438
  }) | ({
431
439
  id: string;
@@ -435,6 +443,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
435
443
  center: Point;
436
444
  boundingBox: import("./../../common/types/Shapes").Rect;
437
445
  };
446
+ path?: Path2D | undefined;
438
447
  } & {
439
448
  rotation?: number;
440
449
  toolId?: string;
@@ -447,7 +456,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
447
456
  scaleY?: number;
448
457
  } & {
449
458
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
450
- path?: Path2D | undefined;
451
459
  type: "brush";
452
460
  }) | ({
453
461
  id: string;
@@ -457,6 +465,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
457
465
  center: Point;
458
466
  boundingBox: import("./../../common/types/Shapes").Rect;
459
467
  };
468
+ path?: Path2D | undefined;
460
469
  } & {
461
470
  rotation?: number;
462
471
  toolId?: string;
@@ -468,7 +477,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
468
477
  type: "group";
469
478
  } & {
470
479
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
471
- path?: Path2D | undefined;
472
480
  type: "group";
473
481
  }) | undefined;
474
482
  hoveredShape: ({
@@ -479,6 +487,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
479
487
  center: Point;
480
488
  boundingBox: import("./../../common/types/Shapes").Rect;
481
489
  };
490
+ path?: Path2D | undefined;
482
491
  } & {
483
492
  rotation?: number;
484
493
  toolId?: string;
@@ -489,7 +498,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
489
498
  type: "line";
490
499
  } & {
491
500
  selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
492
- path?: Path2D | undefined;
493
501
  arrows?: import("./../../common/types/Shapes").TriangleEntity[];
494
502
  type: "line";
495
503
  }) | ({
@@ -500,6 +508,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
500
508
  center: Point;
501
509
  boundingBox: import("./../../common/types/Shapes").Rect;
502
510
  };
511
+ path?: Path2D | undefined;
503
512
  } & {
504
513
  rotation?: number;
505
514
  toolId?: string;
@@ -512,6 +521,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
512
521
  img: HTMLImageElement;
513
522
  flipX?: boolean;
514
523
  flipY?: boolean;
524
+ ratio?: number;
515
525
  type: "picture";
516
526
  } & {
517
527
  img: HTMLImageElement;
@@ -525,6 +535,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
525
535
  center: Point;
526
536
  boundingBox: import("./../../common/types/Shapes").Rect;
527
537
  };
538
+ path?: Path2D | undefined;
528
539
  } & {
529
540
  rotation?: number;
530
541
  toolId?: string;
@@ -537,6 +548,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
537
548
  } & {
538
549
  flipX?: boolean;
539
550
  flipY?: boolean;
551
+ ratio?: number;
540
552
  type: "text";
541
553
  } & {
542
554
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
@@ -549,6 +561,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
549
561
  center: Point;
550
562
  boundingBox: import("./../../common/types/Shapes").Rect;
551
563
  };
564
+ path?: Path2D | undefined;
552
565
  } & {
553
566
  rotation?: number;
554
567
  toolId?: string;
@@ -559,7 +572,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
559
572
  type: "rect";
560
573
  } & {
561
574
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
562
- path?: Path2D | undefined;
563
575
  type: "rect";
564
576
  }) | ({
565
577
  id: string;
@@ -569,6 +581,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
569
581
  center: Point;
570
582
  boundingBox: import("./../../common/types/Shapes").Rect;
571
583
  };
584
+ path?: Path2D | undefined;
572
585
  } & {
573
586
  rotation?: number;
574
587
  toolId?: string;
@@ -579,7 +592,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
579
592
  type: "square";
580
593
  } & {
581
594
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
582
- path?: Path2D | undefined;
583
595
  type: "square";
584
596
  }) | ({
585
597
  id: string;
@@ -589,6 +601,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
589
601
  center: Point;
590
602
  boundingBox: import("./../../common/types/Shapes").Rect;
591
603
  };
604
+ path?: Path2D | undefined;
592
605
  } & {
593
606
  rotation?: number;
594
607
  toolId?: string;
@@ -599,7 +612,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
599
612
  type: "circle";
600
613
  } & {
601
614
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
602
- path?: Path2D | undefined;
603
615
  type: "circle";
604
616
  }) | ({
605
617
  id: string;
@@ -609,6 +621,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
609
621
  center: Point;
610
622
  boundingBox: import("./../../common/types/Shapes").Rect;
611
623
  };
624
+ path?: Path2D | undefined;
612
625
  } & {
613
626
  rotation?: number;
614
627
  toolId?: string;
@@ -619,7 +632,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
619
632
  type: "ellipse";
620
633
  } & {
621
634
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
622
- path?: Path2D | undefined;
623
635
  type: "ellipse";
624
636
  }) | ({
625
637
  id: string;
@@ -629,6 +641,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
629
641
  center: Point;
630
642
  boundingBox: import("./../../common/types/Shapes").Rect;
631
643
  };
644
+ path?: Path2D | undefined;
632
645
  } & {
633
646
  rotation?: number;
634
647
  toolId?: string;
@@ -639,7 +652,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
639
652
  type: "polygon";
640
653
  } & {
641
654
  selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
642
- path?: Path2D | undefined;
643
655
  type: "polygon";
644
656
  }) | ({
645
657
  id: string;
@@ -649,6 +661,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
649
661
  center: Point;
650
662
  boundingBox: import("./../../common/types/Shapes").Rect;
651
663
  };
664
+ path?: Path2D | undefined;
652
665
  } & {
653
666
  rotation?: number;
654
667
  toolId?: string;
@@ -659,7 +672,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
659
672
  type: "curve";
660
673
  } & {
661
674
  selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
662
- path?: Path2D | undefined;
663
675
  type: "curve";
664
676
  }) | ({
665
677
  id: string;
@@ -669,6 +681,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
669
681
  center: Point;
670
682
  boundingBox: import("./../../common/types/Shapes").Rect;
671
683
  };
684
+ path?: Path2D | undefined;
672
685
  } & {
673
686
  rotation?: number;
674
687
  toolId?: string;
@@ -681,7 +694,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
681
694
  scaleY?: number;
682
695
  } & {
683
696
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
684
- path?: Path2D | undefined;
685
697
  type: "brush";
686
698
  }) | ({
687
699
  id: string;
@@ -691,6 +703,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
691
703
  center: Point;
692
704
  boundingBox: import("./../../common/types/Shapes").Rect;
693
705
  };
706
+ path?: Path2D | undefined;
694
707
  } & {
695
708
  rotation?: number;
696
709
  toolId?: string;
@@ -702,7 +715,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
702
715
  type: "group";
703
716
  } & {
704
717
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
705
- path?: Path2D | undefined;
706
718
  type: "group";
707
719
  }) | undefined;
708
720
  selectionFrame: {
@@ -727,6 +739,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
727
739
  center: Point;
728
740
  boundingBox: import("./../../common/types/Shapes").Rect;
729
741
  };
742
+ path?: Path2D | undefined;
730
743
  } & {
731
744
  rotation?: number;
732
745
  toolId?: string;
@@ -737,7 +750,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
737
750
  type: "line";
738
751
  } & {
739
752
  selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
740
- path?: Path2D | undefined;
741
753
  arrows?: import("./../../common/types/Shapes").TriangleEntity[];
742
754
  type: "line";
743
755
  }) | ({
@@ -748,6 +760,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
748
760
  center: Point;
749
761
  boundingBox: import("./../../common/types/Shapes").Rect;
750
762
  };
763
+ path?: Path2D | undefined;
751
764
  } & {
752
765
  rotation?: number;
753
766
  toolId?: string;
@@ -760,6 +773,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
760
773
  img: HTMLImageElement;
761
774
  flipX?: boolean;
762
775
  flipY?: boolean;
776
+ ratio?: number;
763
777
  type: "picture";
764
778
  } & {
765
779
  img: HTMLImageElement;
@@ -773,6 +787,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
773
787
  center: Point;
774
788
  boundingBox: import("./../../common/types/Shapes").Rect;
775
789
  };
790
+ path?: Path2D | undefined;
776
791
  } & {
777
792
  rotation?: number;
778
793
  toolId?: string;
@@ -785,6 +800,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
785
800
  } & {
786
801
  flipX?: boolean;
787
802
  flipY?: boolean;
803
+ ratio?: number;
788
804
  type: "text";
789
805
  } & {
790
806
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
@@ -797,6 +813,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
797
813
  center: Point;
798
814
  boundingBox: import("./../../common/types/Shapes").Rect;
799
815
  };
816
+ path?: Path2D | undefined;
800
817
  } & {
801
818
  rotation?: number;
802
819
  toolId?: string;
@@ -807,7 +824,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
807
824
  type: "rect";
808
825
  } & {
809
826
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
810
- path?: Path2D | undefined;
811
827
  type: "rect";
812
828
  }) | ({
813
829
  id: string;
@@ -817,6 +833,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
817
833
  center: Point;
818
834
  boundingBox: import("./../../common/types/Shapes").Rect;
819
835
  };
836
+ path?: Path2D | undefined;
820
837
  } & {
821
838
  rotation?: number;
822
839
  toolId?: string;
@@ -827,7 +844,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
827
844
  type: "square";
828
845
  } & {
829
846
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
830
- path?: Path2D | undefined;
831
847
  type: "square";
832
848
  }) | ({
833
849
  id: string;
@@ -837,6 +853,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
837
853
  center: Point;
838
854
  boundingBox: import("./../../common/types/Shapes").Rect;
839
855
  };
856
+ path?: Path2D | undefined;
840
857
  } & {
841
858
  rotation?: number;
842
859
  toolId?: string;
@@ -847,7 +864,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
847
864
  type: "circle";
848
865
  } & {
849
866
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
850
- path?: Path2D | undefined;
851
867
  type: "circle";
852
868
  }) | ({
853
869
  id: string;
@@ -857,6 +873,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
857
873
  center: Point;
858
874
  boundingBox: import("./../../common/types/Shapes").Rect;
859
875
  };
876
+ path?: Path2D | undefined;
860
877
  } & {
861
878
  rotation?: number;
862
879
  toolId?: string;
@@ -867,7 +884,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
867
884
  type: "ellipse";
868
885
  } & {
869
886
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
870
- path?: Path2D | undefined;
871
887
  type: "ellipse";
872
888
  }) | ({
873
889
  id: string;
@@ -877,6 +893,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
877
893
  center: Point;
878
894
  boundingBox: import("./../../common/types/Shapes").Rect;
879
895
  };
896
+ path?: Path2D | undefined;
880
897
  } & {
881
898
  rotation?: number;
882
899
  toolId?: string;
@@ -887,7 +904,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
887
904
  type: "polygon";
888
905
  } & {
889
906
  selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
890
- path?: Path2D | undefined;
891
907
  type: "polygon";
892
908
  }) | ({
893
909
  id: string;
@@ -897,6 +913,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
897
913
  center: Point;
898
914
  boundingBox: import("./../../common/types/Shapes").Rect;
899
915
  };
916
+ path?: Path2D | undefined;
900
917
  } & {
901
918
  rotation?: number;
902
919
  toolId?: string;
@@ -907,7 +924,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
907
924
  type: "curve";
908
925
  } & {
909
926
  selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
910
- path?: Path2D | undefined;
911
927
  type: "curve";
912
928
  }) | ({
913
929
  id: string;
@@ -917,6 +933,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
917
933
  center: Point;
918
934
  boundingBox: import("./../../common/types/Shapes").Rect;
919
935
  };
936
+ path?: Path2D | undefined;
920
937
  } & {
921
938
  rotation?: number;
922
939
  toolId?: string;
@@ -929,7 +946,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
929
946
  scaleY?: number;
930
947
  } & {
931
948
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
932
- path?: Path2D | undefined;
933
949
  type: "brush";
934
950
  }) | ({
935
951
  id: string;
@@ -939,6 +955,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
939
955
  center: Point;
940
956
  boundingBox: import("./../../common/types/Shapes").Rect;
941
957
  };
958
+ path?: Path2D | undefined;
942
959
  } & {
943
960
  rotation?: number;
944
961
  toolId?: string;
@@ -950,7 +967,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
950
967
  type: "group";
951
968
  } & {
952
969
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
953
- path?: Path2D | undefined;
954
970
  type: "group";
955
971
  }) | ((prevState: ({
956
972
  id: string;
@@ -960,6 +976,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
960
976
  center: Point;
961
977
  boundingBox: import("./../../common/types/Shapes").Rect;
962
978
  };
979
+ path?: Path2D | undefined;
963
980
  } & {
964
981
  rotation?: number;
965
982
  toolId?: string;
@@ -970,7 +987,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
970
987
  type: "line";
971
988
  } & {
972
989
  selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
973
- path?: Path2D | undefined;
974
990
  arrows?: import("./../../common/types/Shapes").TriangleEntity[];
975
991
  type: "line";
976
992
  }) | ({
@@ -981,6 +997,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
981
997
  center: Point;
982
998
  boundingBox: import("./../../common/types/Shapes").Rect;
983
999
  };
1000
+ path?: Path2D | undefined;
984
1001
  } & {
985
1002
  rotation?: number;
986
1003
  toolId?: string;
@@ -993,6 +1010,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
993
1010
  img: HTMLImageElement;
994
1011
  flipX?: boolean;
995
1012
  flipY?: boolean;
1013
+ ratio?: number;
996
1014
  type: "picture";
997
1015
  } & {
998
1016
  img: HTMLImageElement;
@@ -1006,6 +1024,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1006
1024
  center: Point;
1007
1025
  boundingBox: import("./../../common/types/Shapes").Rect;
1008
1026
  };
1027
+ path?: Path2D | undefined;
1009
1028
  } & {
1010
1029
  rotation?: number;
1011
1030
  toolId?: string;
@@ -1018,6 +1037,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1018
1037
  } & {
1019
1038
  flipX?: boolean;
1020
1039
  flipY?: boolean;
1040
+ ratio?: number;
1021
1041
  type: "text";
1022
1042
  } & {
1023
1043
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
@@ -1030,6 +1050,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1030
1050
  center: Point;
1031
1051
  boundingBox: import("./../../common/types/Shapes").Rect;
1032
1052
  };
1053
+ path?: Path2D | undefined;
1033
1054
  } & {
1034
1055
  rotation?: number;
1035
1056
  toolId?: string;
@@ -1040,7 +1061,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1040
1061
  type: "rect";
1041
1062
  } & {
1042
1063
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1043
- path?: Path2D | undefined;
1044
1064
  type: "rect";
1045
1065
  }) | ({
1046
1066
  id: string;
@@ -1050,6 +1070,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1050
1070
  center: Point;
1051
1071
  boundingBox: import("./../../common/types/Shapes").Rect;
1052
1072
  };
1073
+ path?: Path2D | undefined;
1053
1074
  } & {
1054
1075
  rotation?: number;
1055
1076
  toolId?: string;
@@ -1060,7 +1081,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1060
1081
  type: "square";
1061
1082
  } & {
1062
1083
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1063
- path?: Path2D | undefined;
1064
1084
  type: "square";
1065
1085
  }) | ({
1066
1086
  id: string;
@@ -1070,6 +1090,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1070
1090
  center: Point;
1071
1091
  boundingBox: import("./../../common/types/Shapes").Rect;
1072
1092
  };
1093
+ path?: Path2D | undefined;
1073
1094
  } & {
1074
1095
  rotation?: number;
1075
1096
  toolId?: string;
@@ -1080,7 +1101,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1080
1101
  type: "circle";
1081
1102
  } & {
1082
1103
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1083
- path?: Path2D | undefined;
1084
1104
  type: "circle";
1085
1105
  }) | ({
1086
1106
  id: string;
@@ -1090,6 +1110,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1090
1110
  center: Point;
1091
1111
  boundingBox: import("./../../common/types/Shapes").Rect;
1092
1112
  };
1113
+ path?: Path2D | undefined;
1093
1114
  } & {
1094
1115
  rotation?: number;
1095
1116
  toolId?: string;
@@ -1100,7 +1121,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1100
1121
  type: "ellipse";
1101
1122
  } & {
1102
1123
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1103
- path?: Path2D | undefined;
1104
1124
  type: "ellipse";
1105
1125
  }) | ({
1106
1126
  id: string;
@@ -1110,6 +1130,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1110
1130
  center: Point;
1111
1131
  boundingBox: import("./../../common/types/Shapes").Rect;
1112
1132
  };
1133
+ path?: Path2D | undefined;
1113
1134
  } & {
1114
1135
  rotation?: number;
1115
1136
  toolId?: string;
@@ -1120,7 +1141,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1120
1141
  type: "polygon";
1121
1142
  } & {
1122
1143
  selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
1123
- path?: Path2D | undefined;
1124
1144
  type: "polygon";
1125
1145
  }) | ({
1126
1146
  id: string;
@@ -1130,6 +1150,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1130
1150
  center: Point;
1131
1151
  boundingBox: import("./../../common/types/Shapes").Rect;
1132
1152
  };
1153
+ path?: Path2D | undefined;
1133
1154
  } & {
1134
1155
  rotation?: number;
1135
1156
  toolId?: string;
@@ -1140,7 +1161,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1140
1161
  type: "curve";
1141
1162
  } & {
1142
1163
  selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
1143
- path?: Path2D | undefined;
1144
1164
  type: "curve";
1145
1165
  }) | ({
1146
1166
  id: string;
@@ -1150,6 +1170,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1150
1170
  center: Point;
1151
1171
  boundingBox: import("./../../common/types/Shapes").Rect;
1152
1172
  };
1173
+ path?: Path2D | undefined;
1153
1174
  } & {
1154
1175
  rotation?: number;
1155
1176
  toolId?: string;
@@ -1162,7 +1183,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1162
1183
  scaleY?: number;
1163
1184
  } & {
1164
1185
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1165
- path?: Path2D | undefined;
1166
1186
  type: "brush";
1167
1187
  }) | ({
1168
1188
  id: string;
@@ -1172,6 +1192,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1172
1192
  center: Point;
1173
1193
  boundingBox: import("./../../common/types/Shapes").Rect;
1174
1194
  };
1195
+ path?: Path2D | undefined;
1175
1196
  } & {
1176
1197
  rotation?: number;
1177
1198
  toolId?: string;
@@ -1183,7 +1204,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1183
1204
  type: "group";
1184
1205
  } & {
1185
1206
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1186
- path?: Path2D | undefined;
1187
1207
  type: "group";
1188
1208
  }) | undefined) => ({
1189
1209
  id: string;
@@ -1193,6 +1213,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1193
1213
  center: Point;
1194
1214
  boundingBox: import("./../../common/types/Shapes").Rect;
1195
1215
  };
1216
+ path?: Path2D | undefined;
1196
1217
  } & {
1197
1218
  rotation?: number;
1198
1219
  toolId?: string;
@@ -1203,7 +1224,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1203
1224
  type: "line";
1204
1225
  } & {
1205
1226
  selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
1206
- path?: Path2D | undefined;
1207
1227
  arrows?: import("./../../common/types/Shapes").TriangleEntity[];
1208
1228
  type: "line";
1209
1229
  }) | ({
@@ -1214,6 +1234,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1214
1234
  center: Point;
1215
1235
  boundingBox: import("./../../common/types/Shapes").Rect;
1216
1236
  };
1237
+ path?: Path2D | undefined;
1217
1238
  } & {
1218
1239
  rotation?: number;
1219
1240
  toolId?: string;
@@ -1226,6 +1247,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1226
1247
  img: HTMLImageElement;
1227
1248
  flipX?: boolean;
1228
1249
  flipY?: boolean;
1250
+ ratio?: number;
1229
1251
  type: "picture";
1230
1252
  } & {
1231
1253
  img: HTMLImageElement;
@@ -1239,6 +1261,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1239
1261
  center: Point;
1240
1262
  boundingBox: import("./../../common/types/Shapes").Rect;
1241
1263
  };
1264
+ path?: Path2D | undefined;
1242
1265
  } & {
1243
1266
  rotation?: number;
1244
1267
  toolId?: string;
@@ -1251,6 +1274,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1251
1274
  } & {
1252
1275
  flipX?: boolean;
1253
1276
  flipY?: boolean;
1277
+ ratio?: number;
1254
1278
  type: "text";
1255
1279
  } & {
1256
1280
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
@@ -1263,6 +1287,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1263
1287
  center: Point;
1264
1288
  boundingBox: import("./../../common/types/Shapes").Rect;
1265
1289
  };
1290
+ path?: Path2D | undefined;
1266
1291
  } & {
1267
1292
  rotation?: number;
1268
1293
  toolId?: string;
@@ -1273,7 +1298,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1273
1298
  type: "rect";
1274
1299
  } & {
1275
1300
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1276
- path?: Path2D | undefined;
1277
1301
  type: "rect";
1278
1302
  }) | ({
1279
1303
  id: string;
@@ -1283,6 +1307,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1283
1307
  center: Point;
1284
1308
  boundingBox: import("./../../common/types/Shapes").Rect;
1285
1309
  };
1310
+ path?: Path2D | undefined;
1286
1311
  } & {
1287
1312
  rotation?: number;
1288
1313
  toolId?: string;
@@ -1293,7 +1318,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1293
1318
  type: "square";
1294
1319
  } & {
1295
1320
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1296
- path?: Path2D | undefined;
1297
1321
  type: "square";
1298
1322
  }) | ({
1299
1323
  id: string;
@@ -1303,6 +1327,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1303
1327
  center: Point;
1304
1328
  boundingBox: import("./../../common/types/Shapes").Rect;
1305
1329
  };
1330
+ path?: Path2D | undefined;
1306
1331
  } & {
1307
1332
  rotation?: number;
1308
1333
  toolId?: string;
@@ -1313,7 +1338,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1313
1338
  type: "circle";
1314
1339
  } & {
1315
1340
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1316
- path?: Path2D | undefined;
1317
1341
  type: "circle";
1318
1342
  }) | ({
1319
1343
  id: string;
@@ -1323,6 +1347,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1323
1347
  center: Point;
1324
1348
  boundingBox: import("./../../common/types/Shapes").Rect;
1325
1349
  };
1350
+ path?: Path2D | undefined;
1326
1351
  } & {
1327
1352
  rotation?: number;
1328
1353
  toolId?: string;
@@ -1333,7 +1358,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1333
1358
  type: "ellipse";
1334
1359
  } & {
1335
1360
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1336
- path?: Path2D | undefined;
1337
1361
  type: "ellipse";
1338
1362
  }) | ({
1339
1363
  id: string;
@@ -1343,6 +1367,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1343
1367
  center: Point;
1344
1368
  boundingBox: import("./../../common/types/Shapes").Rect;
1345
1369
  };
1370
+ path?: Path2D | undefined;
1346
1371
  } & {
1347
1372
  rotation?: number;
1348
1373
  toolId?: string;
@@ -1353,7 +1378,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1353
1378
  type: "polygon";
1354
1379
  } & {
1355
1380
  selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
1356
- path?: Path2D | undefined;
1357
1381
  type: "polygon";
1358
1382
  }) | ({
1359
1383
  id: string;
@@ -1363,6 +1387,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1363
1387
  center: Point;
1364
1388
  boundingBox: import("./../../common/types/Shapes").Rect;
1365
1389
  };
1390
+ path?: Path2D | undefined;
1366
1391
  } & {
1367
1392
  rotation?: number;
1368
1393
  toolId?: string;
@@ -1373,7 +1398,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1373
1398
  type: "curve";
1374
1399
  } & {
1375
1400
  selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
1376
- path?: Path2D | undefined;
1377
1401
  type: "curve";
1378
1402
  }) | ({
1379
1403
  id: string;
@@ -1383,6 +1407,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1383
1407
  center: Point;
1384
1408
  boundingBox: import("./../../common/types/Shapes").Rect;
1385
1409
  };
1410
+ path?: Path2D | undefined;
1386
1411
  } & {
1387
1412
  rotation?: number;
1388
1413
  toolId?: string;
@@ -1395,7 +1420,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1395
1420
  scaleY?: number;
1396
1421
  } & {
1397
1422
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1398
- path?: Path2D | undefined;
1399
1423
  type: "brush";
1400
1424
  }) | ({
1401
1425
  id: string;
@@ -1405,6 +1429,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1405
1429
  center: Point;
1406
1430
  boundingBox: import("./../../common/types/Shapes").Rect;
1407
1431
  };
1432
+ path?: Path2D | undefined;
1408
1433
  } & {
1409
1434
  rotation?: number;
1410
1435
  toolId?: string;
@@ -1416,7 +1441,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
1416
1441
  type: "group";
1417
1442
  } & {
1418
1443
  selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
1419
- path?: Path2D | undefined;
1420
1444
  type: "group";
1421
1445
  }) | undefined) | undefined>;
1422
1446
  refreshHoveredShape: (e: MouseEvent | TouchEvent, ctx: CanvasRenderingContext2D, cursorPosition: Point, isInsideMask: boolean) => void;