polotno 3.3.0 → 3.4.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 (115) hide show
  1. package/blueprint/toolbar/text-toolbar.js +2 -2
  2. package/blueprint.polotno.css +297 -297
  3. package/canvas/apply-filters.d.ts +1 -2
  4. package/canvas/apply-filters.js +1 -1
  5. package/canvas/figure-element.js +1 -1
  6. package/canvas/gif-element.js +1 -1
  7. package/canvas/hotkeys.js +1 -1
  8. package/canvas/html-element.js +1 -1
  9. package/canvas/image-element.js +1 -1
  10. package/canvas/line-element.js +1 -1
  11. package/canvas/page.js +1 -1
  12. package/canvas/quill-font-formats.js +1 -1
  13. package/canvas/render-tag-element.d.ts +2 -2
  14. package/canvas/render-tag-element.js +1 -1
  15. package/canvas/rich-editor.d.ts +2 -2
  16. package/canvas/rich-editor.js +10 -3
  17. package/canvas/text-element/fit-font-size.d.ts +3 -6
  18. package/canvas/text-element/fit-font-size.js +1 -1
  19. package/canvas/text-element.d.ts +2 -2
  20. package/canvas/text-element.js +1 -1
  21. package/canvas/use-color.js +1 -1
  22. package/canvas/use-mediabunny-video.js +1 -1
  23. package/canvas/video-element.d.ts +1 -1
  24. package/canvas/video-element.js +1 -1
  25. package/model/group-model.d.ts +1 -2
  26. package/model/group-model.js +1 -1
  27. package/model/store.js +1 -1
  28. package/model/table-model.js +1 -1
  29. package/package.json +34 -48
  30. package/polotno.bundle.js +222 -221
  31. package/primitives/slider-field.d.ts +2 -1
  32. package/primitives/slider-field.js +1 -1
  33. package/primitives/slider.js +1 -1
  34. package/primitives/tabs.d.ts +1 -1
  35. package/side-panel/ai-images-panel.js +1 -1
  36. package/side-panel/draw-panel.js +1 -1
  37. package/side-panel/effect-card.d.ts +1 -1
  38. package/side-panel/effect-card.js +1 -1
  39. package/side-panel/effects-panel.js +1 -1
  40. package/side-panel/image-clip-panel.js +1 -1
  41. package/side-panel/layers-panel.js +1 -1
  42. package/side-panel/select-gif.js +1 -1
  43. package/side-panel/select-image.js +1 -1
  44. package/side-panel/select-svg.js +1 -1
  45. package/side-panel/select-video.js +1 -1
  46. package/toolbar/color-picker.js +1 -1
  47. package/toolbar/figure-toolbar.js +1 -1
  48. package/toolbar/html-toolbar.js +1 -1
  49. package/toolbar/image-toolbar.js +1 -1
  50. package/toolbar/svg-toolbar.js +1 -1
  51. package/toolbar/text-toolbar.js +1 -1
  52. package/toolbar/video-toolbar.js +1 -1
  53. package/ui.css +1 -1
  54. package/utils/background-shape.d.ts +1 -21
  55. package/utils/background-shape.js +1 -1
  56. package/utils/clipboard.js +1 -1
  57. package/utils/css-optimizer.js +1 -1
  58. package/utils/deprecation.d.ts +1 -0
  59. package/utils/deprecation.js +7 -0
  60. package/utils/errors.d.ts +3 -6
  61. package/utils/errors.js +1 -1
  62. package/utils/figure-to-svg.d.ts +1 -650
  63. package/utils/figure-to-svg.js +1 -1
  64. package/utils/filters.d.ts +1 -19
  65. package/utils/filters.js +1 -1
  66. package/utils/flags.d.ts +2 -1
  67. package/utils/fonts.d.ts +1 -3
  68. package/utils/fonts.js +1 -1
  69. package/utils/from-svg.js +1 -1
  70. package/utils/gradient.d.ts +1 -8
  71. package/utils/gradient.js +1 -1
  72. package/utils/html-to-svg/font-inliner.js +1 -1
  73. package/utils/html-to-svg/index.js +1 -1
  74. package/utils/html-to-svg/render-cache.js +1 -1
  75. package/utils/html-to-svg/xhtml.js +1 -1
  76. package/utils/html.js +1 -1
  77. package/utils/html2canvas.d.ts +1 -10
  78. package/utils/html2canvas.js +1 -1
  79. package/utils/image.d.ts +1 -14
  80. package/utils/image.js +1 -1
  81. package/utils/list-marker-geometry.d.ts +1 -14
  82. package/utils/list-marker-geometry.js +1 -1
  83. package/utils/loader.d.ts +1 -1
  84. package/utils/loader.js +1 -1
  85. package/utils/luma.js +1 -1
  86. package/utils/measure-text.js +1 -1
  87. package/utils/path-to-svg.js +1 -1
  88. package/utils/px.d.ts +48 -0
  89. package/utils/px.js +1 -0
  90. package/utils/reset-style.d.ts +1 -2
  91. package/utils/reset-style.js +1 -1
  92. package/utils/rich-text-html.d.ts +3 -16
  93. package/utils/rich-text-html.js +1 -1
  94. package/utils/svg.d.ts +2 -12
  95. package/utils/svg.js +2 -1
  96. package/utils/text-format-state.js +1 -1
  97. package/utils/text-format.js +1 -1
  98. package/utils/text-html.d.ts +3 -35
  99. package/utils/text-html.js +1 -1
  100. package/utils/text-types.d.ts +1 -48
  101. package/utils/text-types.js +1 -1
  102. package/utils/text.d.ts +1 -16
  103. package/utils/text.js +1 -1
  104. package/utils/to-html.d.ts +6 -17
  105. package/utils/to-html.js +1 -1
  106. package/utils/to-pptx.js +1 -1
  107. package/utils/to-svg.d.ts +6 -17
  108. package/utils/to-svg.js +1 -1
  109. package/utils/use-svg-colors.d.ts +1 -0
  110. package/utils/use-svg-colors.js +1 -0
  111. package/utils/validate-key.js +1 -1
  112. package/utils/video.d.ts +1 -7
  113. package/utils/video.js +1 -1
  114. package/utils/xml.d.ts +1 -1
  115. package/utils/xml.js +1 -7
@@ -1,650 +1 @@
1
- import { FigureElementType } from '../model/figure-model.js';
2
- export declare const rectData: ({ width, height, cornerRadius, }: FigureElementType) => string;
3
- export declare const triangleData: ({ width, height }: FigureElementType) => string;
4
- export declare const rightTriangleData: ({ width, height }: FigureElementType) => string;
5
- export declare const circleData: ({ width, height }: FigureElementType) => string;
6
- export declare function starPath({ width, height }: FigureElementType): string;
7
- export declare function diamondPath({ width, height }: FigureElementType): string;
8
- export declare function pentagonPath({ width, height }: FigureElementType): string;
9
- export declare function hexagonPath({ width, height }: FigureElementType): string;
10
- export declare function speechBubblePath({ width, height }: {
11
- width: any;
12
- height: any;
13
- }): string;
14
- export declare function crossPath({ width, height }: {
15
- width: any;
16
- height: any;
17
- }): string;
18
- export declare const TYPES: {
19
- rect: ({ width, height, cornerRadius, }: FigureElementType) => string;
20
- circle: ({ width, height }: FigureElementType) => string;
21
- star: typeof starPath;
22
- triangle: ({ width, height }: FigureElementType) => string;
23
- rightTriangle: ({ width, height }: FigureElementType) => string;
24
- diamond: typeof diamondPath;
25
- pentagon: typeof pentagonPath;
26
- hexagon: typeof hexagonPath;
27
- speechBubble: typeof speechBubblePath;
28
- cross: typeof crossPath;
29
- arc: ({ width, height }: {
30
- width: any;
31
- height: any;
32
- }) => {
33
- path: any;
34
- scaleX: number;
35
- scaleY: number;
36
- };
37
- cloud: ({ width, height }: {
38
- width: any;
39
- height: any;
40
- }) => {
41
- path: any;
42
- scaleX: number;
43
- scaleY: number;
44
- };
45
- rightArrow: ({ width, height }: {
46
- width: any;
47
- height: any;
48
- }) => string;
49
- leftArrow: ({ width, height }: {
50
- width: any;
51
- height: any;
52
- }) => string;
53
- downArrow: ({ width, height }: {
54
- width: any;
55
- height: any;
56
- }) => string;
57
- upArrow: ({ width, height }: {
58
- width: any;
59
- height: any;
60
- }) => string;
61
- asterisk1: ({ width, height }: {
62
- width: any;
63
- height: any;
64
- }) => {
65
- path: any;
66
- scaleX: number;
67
- scaleY: number;
68
- };
69
- asterisk2: ({ width, height }: {
70
- width: any;
71
- height: any;
72
- }) => {
73
- path: any;
74
- scaleX: number;
75
- scaleY: number;
76
- };
77
- bookmark: ({ width, height }: {
78
- width: any;
79
- height: any;
80
- }) => {
81
- path: any;
82
- scaleX: number;
83
- scaleY: number;
84
- };
85
- butterfly: ({ width, height }: {
86
- width: any;
87
- height: any;
88
- }) => {
89
- path: any;
90
- scaleX: number;
91
- scaleY: number;
92
- };
93
- cylinder: ({ width, height }: {
94
- width: any;
95
- height: any;
96
- }) => {
97
- path: any;
98
- scaleX: number;
99
- scaleY: number;
100
- };
101
- diamond2: ({ width, height }: {
102
- width: any;
103
- height: any;
104
- }) => {
105
- path: any;
106
- scaleX: number;
107
- scaleY: number;
108
- };
109
- door: ({ width, height }: {
110
- width: any;
111
- height: any;
112
- }) => {
113
- path: any;
114
- scaleX: number;
115
- scaleY: number;
116
- };
117
- drop1: ({ width, height }: {
118
- width: any;
119
- height: any;
120
- }) => {
121
- path: any;
122
- scaleX: number;
123
- scaleY: number;
124
- };
125
- drop2: ({ width, height }: {
126
- width: any;
127
- height: any;
128
- }) => {
129
- path: any;
130
- scaleX: number;
131
- scaleY: number;
132
- };
133
- explosion: ({ width, height }: {
134
- width: any;
135
- height: any;
136
- }) => {
137
- path: any;
138
- scaleX: number;
139
- scaleY: number;
140
- };
141
- flag: ({ width, height }: {
142
- width: any;
143
- height: any;
144
- }) => {
145
- path: any;
146
- scaleX: number;
147
- scaleY: number;
148
- };
149
- flower: ({ width, height }: {
150
- width: any;
151
- height: any;
152
- }) => {
153
- path: any;
154
- scaleX: number;
155
- scaleY: number;
156
- };
157
- frame: ({ width, height }: {
158
- width: any;
159
- height: any;
160
- }) => {
161
- path: any;
162
- scaleX: number;
163
- scaleY: number;
164
- };
165
- heart1: ({ width, height }: {
166
- width: any;
167
- height: any;
168
- }) => {
169
- path: any;
170
- scaleX: number;
171
- scaleY: number;
172
- };
173
- home: ({ width, height }: {
174
- width: any;
175
- height: any;
176
- }) => {
177
- path: any;
178
- scaleX: number;
179
- scaleY: number;
180
- };
181
- home2: ({ width, height }: {
182
- width: any;
183
- height: any;
184
- }) => {
185
- path: any;
186
- scaleX: number;
187
- scaleY: number;
188
- };
189
- hourglass: ({ width, height }: {
190
- width: any;
191
- height: any;
192
- }) => {
193
- path: any;
194
- scaleX: number;
195
- scaleY: number;
196
- };
197
- house: ({ width, height }: {
198
- width: any;
199
- height: any;
200
- }) => {
201
- path: any;
202
- scaleX: number;
203
- scaleY: number;
204
- };
205
- keyhole: ({ width, height }: {
206
- width: any;
207
- height: any;
208
- }) => {
209
- path: any;
210
- scaleX: number;
211
- scaleY: number;
212
- };
213
- kiss: ({ width, height }: {
214
- width: any;
215
- height: any;
216
- }) => {
217
- path: any;
218
- scaleX: number;
219
- scaleY: number;
220
- };
221
- leaf: ({ width, height }: {
222
- width: any;
223
- height: any;
224
- }) => {
225
- path: any;
226
- scaleX: number;
227
- scaleY: number;
228
- };
229
- lightning1: ({ width, height }: {
230
- width: any;
231
- height: any;
232
- }) => {
233
- path: any;
234
- scaleX: number;
235
- scaleY: number;
236
- };
237
- lightning2: ({ width, height }: {
238
- width: any;
239
- height: any;
240
- }) => {
241
- path: any;
242
- scaleX: number;
243
- scaleY: number;
244
- };
245
- magnet: ({ width, height }: {
246
- width: any;
247
- height: any;
248
- }) => {
249
- path: any;
250
- scaleX: number;
251
- scaleY: number;
252
- };
253
- mithosis: ({ width, height }: {
254
- width: any;
255
- height: any;
256
- }) => {
257
- path: any;
258
- scaleX: number;
259
- scaleY: number;
260
- };
261
- orangeRicky: ({ width, height }: {
262
- width: any;
263
- height: any;
264
- }) => {
265
- path: any;
266
- scaleX: number;
267
- scaleY: number;
268
- };
269
- party: ({ width, height }: {
270
- width: any;
271
- height: any;
272
- }) => {
273
- path: any;
274
- scaleX: number;
275
- scaleY: number;
276
- };
277
- pillow: ({ width, height }: {
278
- width: any;
279
- height: any;
280
- }) => {
281
- path: any;
282
- scaleX: number;
283
- scaleY: number;
284
- };
285
- polygon: ({ width, height }: {
286
- width: any;
287
- height: any;
288
- }) => {
289
- path: any;
290
- scaleX: number;
291
- scaleY: number;
292
- };
293
- rainbow: ({ width, height }: {
294
- width: any;
295
- height: any;
296
- }) => {
297
- path: any;
298
- scaleX: number;
299
- scaleY: number;
300
- };
301
- rhodeIsland: ({ width, height }: {
302
- width: any;
303
- height: any;
304
- }) => {
305
- path: any;
306
- scaleX: number;
307
- scaleY: number;
308
- };
309
- shell: ({ width, height }: {
310
- width: any;
311
- height: any;
312
- }) => {
313
- path: any;
314
- scaleX: number;
315
- scaleY: number;
316
- };
317
- shield1: ({ width, height }: {
318
- width: any;
319
- height: any;
320
- }) => {
321
- path: any;
322
- scaleX: number;
323
- scaleY: number;
324
- };
325
- shield2: ({ width, height }: {
326
- width: any;
327
- height: any;
328
- }) => {
329
- path: any;
330
- scaleX: number;
331
- scaleY: number;
332
- };
333
- skewedRectangle: ({ width, height }: {
334
- width: any;
335
- height: any;
336
- }) => {
337
- path: any;
338
- scaleX: number;
339
- scaleY: number;
340
- };
341
- softFlower: ({ width, height }: {
342
- width: any;
343
- height: any;
344
- }) => {
345
- path: any;
346
- scaleX: number;
347
- scaleY: number;
348
- };
349
- softStar: ({ width, height }: {
350
- width: any;
351
- height: any;
352
- }) => {
353
- path: any;
354
- scaleX: number;
355
- scaleY: number;
356
- };
357
- stairs1: ({ width, height }: {
358
- width: any;
359
- height: any;
360
- }) => {
361
- path: any;
362
- scaleX: number;
363
- scaleY: number;
364
- };
365
- stairs2: ({ width, height }: {
366
- width: any;
367
- height: any;
368
- }) => {
369
- path: any;
370
- scaleX: number;
371
- scaleY: number;
372
- };
373
- teewee: ({ width, height }: {
374
- width: any;
375
- height: any;
376
- }) => {
377
- path: any;
378
- scaleX: number;
379
- scaleY: number;
380
- };
381
- blob1: ({ width, height }: {
382
- width: any;
383
- height: any;
384
- }) => {
385
- path: any;
386
- scaleX: number;
387
- scaleY: number;
388
- };
389
- blob10: ({ width, height }: {
390
- width: any;
391
- height: any;
392
- }) => {
393
- path: any;
394
- scaleX: number;
395
- scaleY: number;
396
- };
397
- blob11: ({ width, height }: {
398
- width: any;
399
- height: any;
400
- }) => {
401
- path: any;
402
- scaleX: number;
403
- scaleY: number;
404
- };
405
- blob12: ({ width, height }: {
406
- width: any;
407
- height: any;
408
- }) => {
409
- path: any;
410
- scaleX: number;
411
- scaleY: number;
412
- };
413
- blob13: ({ width, height }: {
414
- width: any;
415
- height: any;
416
- }) => {
417
- path: any;
418
- scaleX: number;
419
- scaleY: number;
420
- };
421
- blob14: ({ width, height }: {
422
- width: any;
423
- height: any;
424
- }) => {
425
- path: any;
426
- scaleX: number;
427
- scaleY: number;
428
- };
429
- blob15: ({ width, height }: {
430
- width: any;
431
- height: any;
432
- }) => {
433
- path: any;
434
- scaleX: number;
435
- scaleY: number;
436
- };
437
- blob16: ({ width, height }: {
438
- width: any;
439
- height: any;
440
- }) => {
441
- path: any;
442
- scaleX: number;
443
- scaleY: number;
444
- };
445
- blob17: ({ width, height }: {
446
- width: any;
447
- height: any;
448
- }) => {
449
- path: any;
450
- scaleX: number;
451
- scaleY: number;
452
- };
453
- blob18: ({ width, height }: {
454
- width: any;
455
- height: any;
456
- }) => {
457
- path: any;
458
- scaleX: number;
459
- scaleY: number;
460
- };
461
- blob19: ({ width, height }: {
462
- width: any;
463
- height: any;
464
- }) => {
465
- path: any;
466
- scaleX: number;
467
- scaleY: number;
468
- };
469
- blob2: ({ width, height }: {
470
- width: any;
471
- height: any;
472
- }) => {
473
- path: any;
474
- scaleX: number;
475
- scaleY: number;
476
- };
477
- blob20: ({ width, height }: {
478
- width: any;
479
- height: any;
480
- }) => {
481
- path: any;
482
- scaleX: number;
483
- scaleY: number;
484
- };
485
- blob21: ({ width, height }: {
486
- width: any;
487
- height: any;
488
- }) => {
489
- path: any;
490
- scaleX: number;
491
- scaleY: number;
492
- };
493
- blob22: ({ width, height }: {
494
- width: any;
495
- height: any;
496
- }) => {
497
- path: any;
498
- scaleX: number;
499
- scaleY: number;
500
- };
501
- blob23: ({ width, height }: {
502
- width: any;
503
- height: any;
504
- }) => {
505
- path: any;
506
- scaleX: number;
507
- scaleY: number;
508
- };
509
- blob24: ({ width, height }: {
510
- width: any;
511
- height: any;
512
- }) => {
513
- path: any;
514
- scaleX: number;
515
- scaleY: number;
516
- };
517
- blob25: ({ width, height }: {
518
- width: any;
519
- height: any;
520
- }) => {
521
- path: any;
522
- scaleX: number;
523
- scaleY: number;
524
- };
525
- blob26: ({ width, height }: {
526
- width: any;
527
- height: any;
528
- }) => {
529
- path: any;
530
- scaleX: number;
531
- scaleY: number;
532
- };
533
- blob27: ({ width, height }: {
534
- width: any;
535
- height: any;
536
- }) => {
537
- path: any;
538
- scaleX: number;
539
- scaleY: number;
540
- };
541
- blob28: ({ width, height }: {
542
- width: any;
543
- height: any;
544
- }) => {
545
- path: any;
546
- scaleX: number;
547
- scaleY: number;
548
- };
549
- blob29: ({ width, height }: {
550
- width: any;
551
- height: any;
552
- }) => {
553
- path: any;
554
- scaleX: number;
555
- scaleY: number;
556
- };
557
- blob3: ({ width, height }: {
558
- width: any;
559
- height: any;
560
- }) => {
561
- path: any;
562
- scaleX: number;
563
- scaleY: number;
564
- };
565
- blob30: ({ width, height }: {
566
- width: any;
567
- height: any;
568
- }) => {
569
- path: any;
570
- scaleX: number;
571
- scaleY: number;
572
- };
573
- blob31: ({ width, height }: {
574
- width: any;
575
- height: any;
576
- }) => {
577
- path: any;
578
- scaleX: number;
579
- scaleY: number;
580
- };
581
- blob32: ({ width, height }: {
582
- width: any;
583
- height: any;
584
- }) => {
585
- path: any;
586
- scaleX: number;
587
- scaleY: number;
588
- };
589
- blob4: ({ width, height }: {
590
- width: any;
591
- height: any;
592
- }) => {
593
- path: any;
594
- scaleX: number;
595
- scaleY: number;
596
- };
597
- blob5: ({ width, height }: {
598
- width: any;
599
- height: any;
600
- }) => {
601
- path: any;
602
- scaleX: number;
603
- scaleY: number;
604
- };
605
- blob6: ({ width, height }: {
606
- width: any;
607
- height: any;
608
- }) => {
609
- path: any;
610
- scaleX: number;
611
- scaleY: number;
612
- };
613
- blob7: ({ width, height }: {
614
- width: any;
615
- height: any;
616
- }) => {
617
- path: any;
618
- scaleX: number;
619
- scaleY: number;
620
- };
621
- blob8: ({ width, height }: {
622
- width: any;
623
- height: any;
624
- }) => {
625
- path: any;
626
- scaleX: number;
627
- scaleY: number;
628
- };
629
- blob9: ({ width, height }: {
630
- width: any;
631
- height: any;
632
- }) => {
633
- path: any;
634
- scaleX: number;
635
- scaleY: number;
636
- };
637
- };
638
- export declare function subTypeToPathDataFunc(subType: string): any;
639
- export type FigureSvgInput = {
640
- subType: string;
641
- width: number;
642
- height: number;
643
- fill: string;
644
- stroke: string;
645
- strokeWidth: number;
646
- dash?: number[];
647
- cornerRadius?: number;
648
- id?: string;
649
- };
650
- export declare function figureToSvg(element: FigureSvgInput): string;
1
+ export * from '@polotno/core/figure-to-svg';